@m2015agg/git-skill 0.4.6 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -45,11 +45,22 @@ If `git-skill` is not found after install, run `hash -r` to refresh your shell's
45
45
  ## Quick Start
46
46
 
47
47
  ```bash
48
+ # First time only — interactive wizard configures embeddings + API key
49
+ git-skill install
50
+
51
+ # Then in each repo
48
52
  cd your-project
49
- git-skill init # Install hook, index history, set up CLAUDE.md
53
+ git-skill init # Hook, snapshot, /review command, 30-day context
50
54
  git-skill doctor # Verify setup
51
55
  ```
52
56
 
57
+ Or skip the wizard and add your key directly:
58
+
59
+ ```bash
60
+ git-skill add-key sk-ant-your-key-here # auto-detects Anthropic
61
+ git-skill add-key sk-your-key-here # auto-detects OpenAI
62
+ ```
63
+
53
64
  ## Embeddings (Optional)
54
65
 
55
66
  For semantic search, configure an embedding provider. Works with any OpenAI-compatible endpoint (OpenAI, Ollama, LMStudio).
@@ -166,8 +177,9 @@ git-skill why <hash> # View enrichment for a commit
166
177
 
167
178
  | Command | Description |
168
179
  |---------|-------------|
169
- | `git-skill install` | Global setup (embedding config, CLAUDE.md) |
170
- | `git-skill init` | Per-project setup (hook, snapshot, permissions) |
180
+ | `git-skill install` | Interactive setup wizard (embeddings, enrichment, API key) |
181
+ | `git-skill init` | Per-project setup (hook, snapshot, /review command, 30-day context) |
182
+ | `git-skill add-key <key>` | Add or update API key (auto-detects Anthropic/OpenAI) |
171
183
  | `git-skill approve` | Pre-approve read commands in Claude Code |
172
184
  | `git-skill docs` | Output CLAUDE.md snippet |
173
185
  | `git-skill cron` | Nightly fetch + snapshot + embed automation |
@@ -180,6 +192,23 @@ git-skill why <hash> # View enrichment for a commit
180
192
  - `--limit N` — Cap results
181
193
  - `--since <date>` / `--until <date>` — Time filter
182
194
 
195
+ ## Dev Workflow Commands
196
+
197
+ `git-skill init` installs four slash commands for a gated development workflow:
198
+
199
+ ```
200
+ /plan → /implement → /review → /finalize
201
+ ```
202
+
203
+ | Command | What It Does | git-skill Integration |
204
+ |---------|-------------|----------------------|
205
+ | `/plan` | Design a feature, check what was tried before | `search`, `decisions`, `hotspots`, `coupling` |
206
+ | `/implement` | TDD, branch, draft PR, frequent commits | — |
207
+ | `/review` | Code review with history verification | `verify` (PASS/WARN/BLOCK), `hotspots` |
208
+ | `/finalize` | Tests, clean commit, PR ready | `verify`, `doctor` |
209
+
210
+ Each phase **stops and waits** for your approval before proceeding. See [docs/workflow.md](docs/workflow.md) for the full guide with examples.
211
+
183
212
  ## How It Works
184
213
 
185
214
  Three-layer SQLite cache at `.git-history/history.db`:
@@ -279,6 +308,7 @@ Claude can read the config, run the commands, and interpret the results. When in
279
308
 
280
309
  ## Detailed Documentation
281
310
 
311
+ - [Dev Workflow Guide](docs/workflow.md) — How `/plan`, `/implement`, `/review`, `/finalize` work together
282
312
  - [Design Spec](docs/specs/2026-03-31-git-skill-design.md) — Full architecture, schema, algorithms, and test strategy
283
313
  - [GeorgeWorks: Memory Integration](docs/specs/context-injection.md) — How context-update writes to Claude's memory system, internal architecture of `findRelevantMemories`, consolidation phases, and thresholds
284
314
  - [Opus Verification Layer](docs/specs/opus-verification-layer.md) — Design and real-world case studies for the verify command
@@ -6,7 +6,7 @@ import { installHook } from "../util/hooks.js";
6
6
  import { isGitRepo } from "../util/git.js";
7
7
  import { upsertSection } from "../util/claude-md.js";
8
8
  import { getSkillDoc } from "./docs.js";
9
- import { WALKTHROUGH, REVIEW_COMMAND } from "../templates/walkthrough.js";
9
+ import { WALKTHROUGH, REVIEW_COMMAND, PLAN_COMMAND, IMPLEMENT_COMMAND, FINALIZE_COMMAND } from "../templates/walkthrough.js";
10
10
  import { runContextUpdate } from "./context-update.js";
11
11
  function write(msg) { process.stdout.write(msg); }
12
12
  export function initCommand() {
@@ -71,6 +71,33 @@ export function initCommand() {
71
71
  else {
72
72
  write(" /review — already exists (not overwritten)\n");
73
73
  }
74
+ // Install plan command if it doesn't already exist
75
+ const planPath = join(walkthroughDir, "plan.md");
76
+ if (!existsSync(planPath)) {
77
+ writeFileSync(planPath, PLAN_COMMAND);
78
+ write(" /plan — plan features with git history awareness (NEW)\n");
79
+ }
80
+ else {
81
+ write(" /plan — already exists (not overwritten)\n");
82
+ }
83
+ // Install implement command if it doesn't already exist
84
+ const implementPath = join(walkthroughDir, "implement.md");
85
+ if (!existsSync(implementPath)) {
86
+ writeFileSync(implementPath, IMPLEMENT_COMMAND);
87
+ write(" /implement — implement features with TDD and frequent commits (NEW)\n");
88
+ }
89
+ else {
90
+ write(" /implement — already exists (not overwritten)\n");
91
+ }
92
+ // Install finalize command if it doesn't already exist
93
+ const finalizePath = join(walkthroughDir, "finalize.md");
94
+ if (!existsSync(finalizePath)) {
95
+ writeFileSync(finalizePath, FINALIZE_COMMAND);
96
+ write(" /finalize — finalize features with verification (NEW)\n");
97
+ }
98
+ else {
99
+ write(" /finalize — already exists (not overwritten)\n");
100
+ }
74
101
  // 6. Run snapshot
75
102
  if (!opts.skipSnapshot) {
76
103
  write("5. Running initial snapshot...\n");
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACxF,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,c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AE,UAAU,CAAC,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;YAC5E,CAAC;YAAC,MAAM,CAAC;gBACP,KAAK,CAAC,mEAAmE,CAAC,CAAC;YAC7E,CAAC;QACH,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,yBAAyB,CAAC,CAAC;QACnC,CAAC;QAED,iBAAiB;QACjB,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAClD,IAAI,CAAC;YACH,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACnC,YAAY,CAAC,MAAM,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAC3E,CAAC;QAAC,MAAM,CAAC;YACP,KAAK,CAAC,iEAAiE,CAAC,CAAC;QAC3E,CAAC;QAED,2CAA2C;QAC3C,KAAK,CAAC,iDAAiD,CAAC,CAAC;QACzD,IAAI,CAAC;YACH,gBAAgB,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;YAC1B,KAAK,CAAC,6CAA6C,CAAC,CAAC;QACvD,CAAC;QAAC,MAAM,CAAC;YACP,KAAK,CAAC,2FAA2F,CAAC,CAAC;QACrG,CAAC;QAED,qBAAqB;QACrB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,KAAK,CAAC,2BAA2B,CAAC,CAAC;QACrC,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAC/B,CAAC;QAED,KAAK,CAAC,4BAA4B,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -1,2 +1,5 @@
1
1
  export declare const WALKTHROUGH = "# Git History Walkthrough\n\nUse git-skill to explore this repository's history.\n\n## Quick Start\n```\ngit-skill doctor # Check setup health\ngit-skill hotspots # Find churning files\ngit-skill trends # View metric trends\ngit-skill search \"auth\" # Search history\n```\n";
2
+ export declare const PLAN_COMMAND = "---\ndescription: \"Plan a feature with git history awareness \u2014 checks what was tried before\"\n---\n\n# Planning Phase\n\nPlan implementation for the requested feature.\n\n**PROCESS:**\n\n1. **Gather Context**:\n - `git-skill search \"<feature>\"` \u2014 check if this was attempted before\n - `git-skill timeline <file>` \u2014 review history of files you plan to change\n - `git-skill hotspots` \u2014 identify unstable files to approach carefully\n - `git-skill coupling <file>` \u2014 what co-changes with target files\n\n2. **Check Git History**: Before designing changes, verify nothing was tried and reverted:\n ```bash\n git-skill search \"<feature keywords>\"\n git-skill decisions --type revert\n ```\n If a similar approach was tried and reverted, note it in the plan and explain why this attempt is different.\n\n3. **Ask Questions**: Clarify requirements (max 5-7 questions)\n\n4. **Write Plan**: Create plan at `docs/plans/YYYY-MM-DD-[feature-name].md`\n\n**PLAN STRUCTURE:**\n```markdown\n# Feature Name\n\n## TLDR\n2-3 sentence summary\n\n## Context from Git History\n- Prior attempts: [what git-skill found]\n- Hotspot files: [files to be careful with]\n- Related decisions: [reverts, refactors that matter]\n\n## Requirements\n- Bullet points\n\n## Implementation Steps\n1. Step 1\n2. Step 2\n\n## Files to Modify/Create\n- `path/to/file` \u2014 description\n\n## Testing\n- How to verify this works\n```\n\n5. **Create GitHub Issue**: `gh issue create --title \"feat: ...\" --body \"See docs/plans/...\"`\n\n6. **STOP**: Wait for approval \u2014 DO NOT start implementation\n\n**CRITICAL:**\n- Check git history FIRST \u2014 don't re-try reverted approaches\n- Plans live in git (`docs/plans/`), not external tools\n- Be concise \u2014 the plan is for implementation, not documentation\n";
3
+ export declare const IMPLEMENT_COMMAND = "---\ndescription: \"Implement a planned feature with TDD and frequent commits\"\n---\n\n# Implementation Phase\n\nImplement feature according to the plan file.\n\n**PROCESS:**\n\n1. **Read Plan**: Read the plan file carefully\n2. **Create Branch**:\n ```bash\n git checkout -b [feature-name]\n git push -u origin [feature-name]\n ```\n3. **Create Draft PR**:\n ```bash\n gh pr create --draft --title \"WIP: [Feature Name]\" --body \"See docs/plans/...\"\n ```\n4. **Follow TDD** (Red \u2192 Green \u2192 Refactor):\n - Write test that fails\n - Implement minimal code to pass\n - Refactor while keeping tests green\n\n5. **For Each Task**:\n - Make changes following existing patterns in the codebase\n - Run tests after each change\n - Push commits frequently (backup points):\n ```bash\n git add . && git commit -m \"wip: [task]\" && git push\n ```\n\n6. **STOP**: Notify completion \u2014 DO NOT finalize or merge\n\n**IMPORTANT:**\n- Follow plan exactly \u2014 don't deviate without asking\n- Push commits often (rollback points)\n- Keep user updated every 3-4 tasks\n- DO NOT finalize \u2014 just implement\n";
4
+ export declare const FINALIZE_COMMAND = "---\ndescription: \"Finalize a feature \u2014 tests, lint, commit, PR ready\"\n---\n\n# Finalization Phase\n\nFinalize the implemented feature.\n\n**PROCESS:**\n\n1. **Verify Tests Pass**:\n ```bash\n # Run your project's test suite\n npm test # Node.js\n # pytest tests/ # Python\n # cargo test # Rust\n ```\n If tests fail, STOP and return to implementation.\n\n2. **Run git-skill verify**:\n ```bash\n git-skill verify\n ```\n Address any WARN or BLOCK findings before proceeding.\n\n3. **Update Documentation**: Add/update docs if needed\n\n4. **Create Final Commit**:\n ```bash\n git add .\n git commit -m \"feat: [description]\n\n Closes #[issue-number]\"\n git push\n ```\n\n5. **Convert PR to Ready**:\n ```bash\n gh pr ready\n ```\n\n6. **Run Final Verification**:\n ```bash\n git-skill doctor\n git-skill hotspots --limit 3\n ```\n Show output \u2014 never claim completion without proof.\n\n7. **STOP**: Report completion with PR link and verification output\n\n**CHECKLIST:**\n- [ ] All tests passing\n- [ ] `git-skill verify` \u2014 no BLOCK findings\n- [ ] Documentation updated\n- [ ] Commit message follows conventions\n- [ ] PR converted to ready\n- [ ] Verification output shown\n\n**IMPORTANT:**\n- NEVER skip verification\n- NEVER merge PR \u2014 user reviews and merges\n- If anything fails, return to implementation\n";
2
5
  export declare const REVIEW_COMMAND = "---\ndescription: \"Code review with git history verification \u2014 checks for repeated mistakes before merge\"\n---\n\n# Code Review with History Verification\n\nReview the current branch changes before merging.\n\n**PROCESS:**\n\n1. **Run tests**:\n ```bash\n # Run the project's test suite (adjust command for your project)\n npm test # Node.js\n # pytest # Python\n # cargo test # Rust\n ```\n\n2. **Git History Verification** (prevent re-trying failed approaches):\n ```bash\n git-skill verify\n ```\n If `git-skill verify` returns WARN or BLOCK:\n - **BLOCK**: STOP. This change re-introduces something that was explicitly reverted. Ask the user before proceeding.\n - **WARN**: Note the warning. Check if the current approach addresses the previous failure. Proceed with caution.\n - **PASS**: No concerns from history.\n\n3. **Check codebase health**:\n ```bash\n git-skill doctor\n git-skill hotspots --limit 5\n ```\n Flag any files being modified that appear in the hotspots list.\n\n4. **Review against criteria**:\n - **Critical** (must fix): Security vulnerabilities, data loss risks, breaking changes, tests failing\n - **Major** (should fix): Missing error handling, pattern violations, missing tests\n - **Minor** (optional): Style, docs, optimization\n\n5. **Auto-fix critical/major issues**:\n - Fix issues following established patterns\n - Run tests after each fix\n - Commit fixes separately\n\n6. **Report findings**:\n - List issues found and fixed\n - List any WARN/BLOCK from git-skill verify\n - Provide verification commands\n - Recommend proceeding or returning to implementation\n\n**IMPORTANT:**\n- `git-skill verify` is authoritative \u2014 if it says something was reverted before, take it seriously\n- Auto-fix critical/major issues, don't just report them\n- Always run tests after fixes\n";
@@ -10,6 +10,172 @@ git-skill trends # View metric trends
10
10
  git-skill search "auth" # Search history
11
11
  \`\`\`
12
12
  `;
13
+ export const PLAN_COMMAND = `---
14
+ description: "Plan a feature with git history awareness — checks what was tried before"
15
+ ---
16
+
17
+ # Planning Phase
18
+
19
+ Plan implementation for the requested feature.
20
+
21
+ **PROCESS:**
22
+
23
+ 1. **Gather Context**:
24
+ - \`git-skill search "<feature>"\` — check if this was attempted before
25
+ - \`git-skill timeline <file>\` — review history of files you plan to change
26
+ - \`git-skill hotspots\` — identify unstable files to approach carefully
27
+ - \`git-skill coupling <file>\` — what co-changes with target files
28
+
29
+ 2. **Check Git History**: Before designing changes, verify nothing was tried and reverted:
30
+ \`\`\`bash
31
+ git-skill search "<feature keywords>"
32
+ git-skill decisions --type revert
33
+ \`\`\`
34
+ If a similar approach was tried and reverted, note it in the plan and explain why this attempt is different.
35
+
36
+ 3. **Ask Questions**: Clarify requirements (max 5-7 questions)
37
+
38
+ 4. **Write Plan**: Create plan at \`docs/plans/YYYY-MM-DD-[feature-name].md\`
39
+
40
+ **PLAN STRUCTURE:**
41
+ \`\`\`markdown
42
+ # Feature Name
43
+
44
+ ## TLDR
45
+ 2-3 sentence summary
46
+
47
+ ## Context from Git History
48
+ - Prior attempts: [what git-skill found]
49
+ - Hotspot files: [files to be careful with]
50
+ - Related decisions: [reverts, refactors that matter]
51
+
52
+ ## Requirements
53
+ - Bullet points
54
+
55
+ ## Implementation Steps
56
+ 1. Step 1
57
+ 2. Step 2
58
+
59
+ ## Files to Modify/Create
60
+ - \`path/to/file\` — description
61
+
62
+ ## Testing
63
+ - How to verify this works
64
+ \`\`\`
65
+
66
+ 5. **Create GitHub Issue**: \`gh issue create --title "feat: ..." --body "See docs/plans/..."\`
67
+
68
+ 6. **STOP**: Wait for approval — DO NOT start implementation
69
+
70
+ **CRITICAL:**
71
+ - Check git history FIRST — don't re-try reverted approaches
72
+ - Plans live in git (\`docs/plans/\`), not external tools
73
+ - Be concise — the plan is for implementation, not documentation
74
+ `;
75
+ export const IMPLEMENT_COMMAND = `---
76
+ description: "Implement a planned feature with TDD and frequent commits"
77
+ ---
78
+
79
+ # Implementation Phase
80
+
81
+ Implement feature according to the plan file.
82
+
83
+ **PROCESS:**
84
+
85
+ 1. **Read Plan**: Read the plan file carefully
86
+ 2. **Create Branch**:
87
+ \`\`\`bash
88
+ git checkout -b [feature-name]
89
+ git push -u origin [feature-name]
90
+ \`\`\`
91
+ 3. **Create Draft PR**:
92
+ \`\`\`bash
93
+ gh pr create --draft --title "WIP: [Feature Name]" --body "See docs/plans/..."
94
+ \`\`\`
95
+ 4. **Follow TDD** (Red → Green → Refactor):
96
+ - Write test that fails
97
+ - Implement minimal code to pass
98
+ - Refactor while keeping tests green
99
+
100
+ 5. **For Each Task**:
101
+ - Make changes following existing patterns in the codebase
102
+ - Run tests after each change
103
+ - Push commits frequently (backup points):
104
+ \`\`\`bash
105
+ git add . && git commit -m "wip: [task]" && git push
106
+ \`\`\`
107
+
108
+ 6. **STOP**: Notify completion — DO NOT finalize or merge
109
+
110
+ **IMPORTANT:**
111
+ - Follow plan exactly — don't deviate without asking
112
+ - Push commits often (rollback points)
113
+ - Keep user updated every 3-4 tasks
114
+ - DO NOT finalize — just implement
115
+ `;
116
+ export const FINALIZE_COMMAND = `---
117
+ description: "Finalize a feature — tests, lint, commit, PR ready"
118
+ ---
119
+
120
+ # Finalization Phase
121
+
122
+ Finalize the implemented feature.
123
+
124
+ **PROCESS:**
125
+
126
+ 1. **Verify Tests Pass**:
127
+ \`\`\`bash
128
+ # Run your project's test suite
129
+ npm test # Node.js
130
+ # pytest tests/ # Python
131
+ # cargo test # Rust
132
+ \`\`\`
133
+ If tests fail, STOP and return to implementation.
134
+
135
+ 2. **Run git-skill verify**:
136
+ \`\`\`bash
137
+ git-skill verify
138
+ \`\`\`
139
+ Address any WARN or BLOCK findings before proceeding.
140
+
141
+ 3. **Update Documentation**: Add/update docs if needed
142
+
143
+ 4. **Create Final Commit**:
144
+ \`\`\`bash
145
+ git add .
146
+ git commit -m "feat: [description]
147
+
148
+ Closes #[issue-number]"
149
+ git push
150
+ \`\`\`
151
+
152
+ 5. **Convert PR to Ready**:
153
+ \`\`\`bash
154
+ gh pr ready
155
+ \`\`\`
156
+
157
+ 6. **Run Final Verification**:
158
+ \`\`\`bash
159
+ git-skill doctor
160
+ git-skill hotspots --limit 3
161
+ \`\`\`
162
+ Show output — never claim completion without proof.
163
+
164
+ 7. **STOP**: Report completion with PR link and verification output
165
+
166
+ **CHECKLIST:**
167
+ - [ ] All tests passing
168
+ - [ ] \`git-skill verify\` — no BLOCK findings
169
+ - [ ] Documentation updated
170
+ - [ ] Commit message follows conventions
171
+ - [ ] PR converted to ready
172
+ - [ ] Verification output shown
173
+
174
+ **IMPORTANT:**
175
+ - NEVER skip verification
176
+ - NEVER merge PR — user reviews and merges
177
+ - If anything fails, return to implementation
178
+ `;
13
179
  export const REVIEW_COMMAND = `---
14
180
  description: "Code review with git history verification — checks for repeated mistakes before merge"
15
181
  ---
@@ -1 +1 @@
1
- {"version":3,"file":"walkthrough.js","sourceRoot":"","sources":["../../src/templates/walkthrough.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;CAW1B,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsD7B,CAAC"}
1
+ {"version":3,"file":"walkthrough.js","sourceRoot":"","sources":["../../src/templates/walkthrough.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;CAW1B,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6D3B,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwChC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8D/B,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsD7B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m2015agg/git-skill",
3
- "version": "0.4.6",
3
+ "version": "0.5.0",
4
4
  "description": "Git history intelligence for LLMs — institutional memory over codebase evolution",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",