--- id: wiki-2026-0508-adr-0001-project-chronicle-indep title: 'ADR-0001: Project Chronicle as Independent Module' category: 10_Wiki/Topics status: verified canonical_id: self aliases: [ADR-0001, Project Chronicle Guard, src/features/projectChronicle] duplicate_of: none source_trust_level: A confidence_score: 0.9 verification_status: applied tags: [adr, architecture-decision, modular-design, project-chronicle, antigravity, soc] raw_sources: [] last_reinforced: 2026-05-09 github_commit: pending inferred_by: Claude Opus 4.7 (manual cleanup 2026-05-09) tech_stack: language: TypeScript framework: VS Code Extension API applied_in: [Antigravity, ConnectAI] --- # ADR-0001: Project Chronicle as Independent Module ## πŸ“Œ ν•œ 쀄 톡찰 (The Karpathy Summary) > **Project Chronicle (planning / decision / log / bug / retro 의 record) 의 chat / agent 와 뢄리 module 둜 implement**. SoC 의 적용 β€” λ§€ chat / agent 의 regression 의 risk 의 κ°μ†Œ. ## πŸ“– κ΅¬μ‘°ν™”λœ 지식 (Synthesized Content) ### Status **Accepted** (2026-05-02). ### Context - λ§€ μƒˆ feature: project planning, Q, decision, dev log, bug, retro 의 record. - λ§€ existing chat / agent system 의 model interaction + agent skill manage. - λ§€ μƒˆ feature 의 mix vs separate 의 κ²°μ •. ### Decision **Project Chronicle Guard 의 separate module** under `src/features/projectChronicle`. ### Reason (μ™œ separate?) 1. **Regression risk ↓**: chat / agent 의 active code path 의 untouched. 2. **Independent test**: λ§€ module 의 own test suite. 3. **Independent deploy**: λ§€ module 의 disable κ°€λŠ₯. 4. **Clear ownership**: λ§€ team 의 own area. 5. **DDD bounded context**: chronicle 의 own model / vocabulary. 6. **Future evolution**: λ§€ module 의 self-contained β†’ easier extract / refactor. ### Alternatives considered - **Embed in agent**: chat 의 agent skill 의 μΆ”κ°€. **Reject**: regression μœ„ν—˜ + complexity ↑. - **External service**: separate process / container. **Reject**: deployment overhead. - **Plugin**: dynamic load. **Reject**: complexity premature. ### Consequences **Positive**: - Chat / agent 의 stable. - λ§€ chronicle 의 independent iterate. - Test isolation. **Negative**: - Cross-module communication 의 explicit. - λ§€ boundary 의 maintain cost. - λ§€ user 의 module-aware. ### Implementation ``` src/features/projectChronicle/ β”œβ”€β”€ domain/ # Plan, Decision, Log, Bug, Retro β”œβ”€β”€ application/ # ChronicleService β”œβ”€β”€ infrastructure/ # File / DB β”œβ”€β”€ api/ # Webview / command └── index.ts # Public API ``` β†’ Hexagonal-ish 의 λ§€ boundary. ### Module 의 public API ```ts // src/features/projectChronicle/index.ts export { ChronicleService } from './application/ChronicleService'; export { Plan, Decision, Log } from './domain'; // λ§€ λ‹€λ₯Έ module 의 use: import { ChronicleService } from '@/features/projectChronicle'; ``` ## πŸ’» νŒ¨ν„΄ (Code) ### Domain model ```ts // domain/Plan.ts export class Plan { constructor( public id: string, public title: string, public goals: string[], public createdAt: Date, public status: 'draft' | 'active' | 'done' ) {} } ``` ### Service ```ts // application/ChronicleService.ts export class ChronicleService { constructor(private store: ChronicleStore) {} async createPlan(input: PlanInput): Promise { const plan = new Plan(uuid(), input.title, input.goals, new Date(), 'draft'); await this.store.savePlan(plan); return plan; } } ``` ### Wire-up (extension.ts) ```ts import { ChronicleService } from './features/projectChronicle'; export function activate(context: vscode.ExtensionContext) { const chronicleService = new ChronicleService(new FileChronicleStore(context)); context.subscriptions.push( vscode.commands.registerCommand('chronicle.createPlan', async () => { const plan = await chronicleService.createPlan({...}); vscode.window.showInformationMessage(`Plan ${plan.id} created`); }) ); } ``` ## πŸ€” μ˜μ‚¬κ²°μ • κΈ°μ€€ (Decision Criteria) | μƒˆ feature 의 μΆ”κ°€ μ‹œ | μΆ”μ²œ | |---|---| | λ§€ existing module 의 minor extension | Embed | | λ§€ distinct domain | Separate module | | λ§€ risk of regression | Separate | | λ§€ independent lifecycle | Separate | | λ§€ team boundary | Separate | **κΈ°λ³Έκ°’**: λ§€ distinct domain = separate module. ## πŸ”— 지식 μ—°κ²° (Graph) - λΆ€λͺ¨: [[ADR (Architecture Decision Record)]] Β· [[Modular-Design]] Β· [[Separation of Concerns]] ## πŸ€– LLM ν™œμš© 힌트 **μ–Έμ œ μ‚¬μš©**: λ§€ μƒˆ feature 의 architecture 의 κ²°μ •. λ§€ modular boundary 의 example. **μ–Έμ œ X**: λ§€ small bugfix. λ§€ prototype. ## ❌ μ•ˆν‹°νŒ¨ν„΄ - **Embed everything**: monolith 의 regression. - **Module 의 cross-private access**: SoC violation. - **Module 의 own DB without need**: over-engineer. ## πŸ§ͺ 검증 / 쀑볡 - **Verified** (applied to Antigravity). - 신뒰도 A (project's own ADR). - Related: ADR-0002+ (λ‹€λ₯Έ module). ## πŸ•“ Changelog | λ‚ μ§œ | λ³€κ²½ | 처리 | 신뒰도 | |---|---|---|---| | 2026-05-08 | Phase 1 μ •κ·œν™” | UPDATE | A | | 2026-05-09 | Manual cleanup β€” λ§€ ADR section + code + κ²°μ • κΈ°μ€€ | UPDATE | A |