@m2015agg/git-skill 0.5.8 → 0.5.9

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.
@@ -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, PLAN_COMMAND, IMPLEMENT_COMMAND, FINALIZE_COMMAND } from "../templates/walkthrough.js";
9
+ import { WALKTHROUGH, REVIEW_COMMAND, PLAN_COMMAND, IMPLEMENT_COMMAND, FINALIZE_COMMAND, TRACE_COMMAND, HISTORICAL_CONTEXT_SKILL } 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() {
@@ -98,6 +98,27 @@ export function initCommand() {
98
98
  else {
99
99
  write(" /finalize — already exists (not overwritten)\n");
100
100
  }
101
+ // Install trace command
102
+ const tracePath = join(walkthroughDir, "trace.md");
103
+ if (!existsSync(tracePath)) {
104
+ writeFileSync(tracePath, TRACE_COMMAND);
105
+ write(" /trace — debug via git history (Missing Guard, Parallel Evolution, Stale Side Effect) (NEW)\n");
106
+ }
107
+ else {
108
+ write(" /trace — already exists (not overwritten)\n");
109
+ }
110
+ // Install historical-context-debugging skill
111
+ write(" Installing skills...\n");
112
+ const skillDir = join(cwd, ".claude", "skills", "historical-context-debugging");
113
+ const skillPath = join(skillDir, "SKILL.md");
114
+ if (!existsSync(skillPath)) {
115
+ mkdirSync(skillDir, { recursive: true });
116
+ writeFileSync(skillPath, HISTORICAL_CONTEXT_SKILL);
117
+ write(" historical-context-debugging — auto-triggered when code looks correct but behaves wrong (NEW)\n");
118
+ }
119
+ else {
120
+ write(" historical-context-debugging — already exists (not overwritten)\n");
121
+ }
101
122
  // 6. Run snapshot
102
123
  if (!opts.skipSnapshot) {
103
124
  write("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ACP,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,EAAE,IAAI,CAAC,CAAC;YAChC,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"}
@@ -3,3 +3,5 @@ export declare const PLAN_COMMAND = "---\ndescription: \"Plan a feature with git
3
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 - Before committing, verify against history:\n ```bash\n git add .\n git-skill verify\n ```\n If BLOCK: stop and discuss. If WARN: note it and proceed carefully.\n - Push commits frequently (backup points):\n ```bash\n 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
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";
5
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. **Review scope and codebase health**:\n ```bash\n git-skill diff-summary HEAD~5..HEAD # summarize what changed in this branch\n git-skill hotspots --limit 5 # flag churning files\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";
6
+ export declare const TRACE_COMMAND = "---\ndescription: \"Debug unexpected behavior by tracing broken assumptions across git history\"\nallowed-tools: Read, Bash(git-skill:*)\n---\n\n# Historical Context Debugging\n\nTrace broken assumptions in code using git-skill history. Use when behavior is wrong but code looks correct in isolation.\n\n**PROCESS:**\n\n1. **Name the symptom precisely** (not \"it's slow\" \u2014 say what specifically is wrong)\n2. **Follow the investigation workflow**:\n - `git-skill search \"<feature keyword>\"` \u2014 find related commits\n - `git-skill why <hash>` \u2014 understand original intent and assumptions\n - `git-skill timeline <file>` \u2014 see all changes chronologically\n - `git-skill search \"<later feature>\"` \u2014 find changes that might conflict\n - `git-skill why <later_hash>` \u2014 did the later change consider the original?\n3. **Identify the fault type**: Missing Guard, Parallel Evolution, or Stale Side Effect\n4. **Fix** and `git-skill verify` before committing\n\n**EXAMPLE:**\n```\n/trace Follow-up messages are triggering fresh RAG even when router says conversational\n```\n";
7
+ export declare const HISTORICAL_CONTEXT_SKILL = "---\nname: historical-context-debugging\ndescription: Use when debugging unexpected behavior where the code looks correct in isolation \u2014 traces broken assumptions across commits using git-skill to find where later changes invalidated earlier logic\n---\n\n# Historical Context Debugging\n\n## Overview\n\nBugs often aren't in the code you're looking at \u2014 they're in the **gap between two changes made months apart**. Feature A was built with assumption X. Feature B was added later and silently violated assumption X. Both look correct in isolation. The bug is invisible without the git history.\n\nThis skill uses `git-skill` to reconstruct the causal chain: why was the original code written, what assumptions did it make, and which later change broke those assumptions?\n\n## When to Use\n\n- Code looks correct but behaves wrong\n- A feature \"used to work\" but stopped\n- You find a guard/flag for one case but not a similar case\n- Two subsystems that should be connected aren't\n- Cache/config is stale despite code being updated\n- You're about to change code but aren't sure why it was written that way\n\n## When NOT to Use\n\n- Bug is clearly a typo or syntax error\n- Code was written in the current session\n- The issue is in a dependency, not your code\n\n## Quick Reference\n\n| Step | Command | What You Learn |\n|------|---------|----------------|\n| Find commits | `git-skill search \"feature keyword\"` | Who touched this area and when |\n| Understand intent | `git-skill why <hash>` | Why the original code was written, what assumptions it made |\n| See evolution | `git-skill timeline <file>` | All changes to a file in chronological order |\n| Find related | `git-skill search \"related feature\"` | Later changes that might affect the same logic |\n| Check for reverts | `git-skill decisions` | Was this approach tried and rolled back before? |\n| Validate fix | `git-skill verify` | Does your staged fix repeat a known mistake? |\n\n## The Three Fault Types\n\n### 1. Missing Guard (most common)\n\nFeature A adds a guard for case X. Feature B adds a new case Y that needs the same guard but nobody adds it.\n\n**Signal:** You find a flag/guard for one field but not a similar field.\n\n**Investigation:**\n```\ngit-skill search \"original_guard\" \u2192 find when guard was added\ngit-skill why <hash> \u2192 understand why it was needed\ngit-skill search \"new_feature\" \u2192 find when new feature was added\ngit-skill why <hash> \u2192 did that commit mention the guard? No.\n```\n\n### 2. Parallel Evolution\n\nTwo systems are built independently that should share logic. They diverge because neither knows about the other.\n\n**Signal:** Two different implementations of the same concept, or a new system never wired into existing code paths.\n\n**Investigation:**\n```\ngit-skill search \"system A\" \u2192 find when A was built\ngit-skill search \"system B\" \u2192 find when B was built\ngit-skill timeline <shared_file> \u2192 was B ever connected to A? No.\n```\n\n### 3. Stale Side Effect\n\nCode change is applied but a side effect (cache, config, external state) isn't updated.\n\n**Signal:** DB/code shows correct value but runtime behavior is wrong.\n\n**Investigation:**\n```\ngit-skill search \"the change\" \u2192 find the update commit\ngit-skill why <hash> \u2192 was cache/config invalidation mentioned?\n# Then check: is the runtime state matching the code state?\n```\n\n## Investigation Workflow\n\n### Step 1: Name the symptom precisely\nBad: \"Chat is slow\"\nGood: \"Follow-up messages trigger fresh RAG even when router says conversational\"\n\n### Step 2: Find the feature that should prevent this\n```bash\ngit-skill search \"relevant feature\"\n```\n\n### Step 3: Understand the original intent\n```bash\ngit-skill why <original_commit>\n```\nRead the enrichment carefully. What **assumptions** did the author make? Write them down.\n\n### Step 4: Find what changed between then and now\n```bash\ngit-skill timeline <affected_file> --since <original_date>\ngit-skill search \"feature that might conflict\"\n```\n\n### Step 5: Check each later change against the assumptions\n```bash\ngit-skill why <later_commit>\n```\nAsk: \"Did this change consider assumption X?\" If not, that's your likely fault.\n\n### Step 6: Fix and verify\n```bash\ngit add <files>\ngit-skill verify\n```\n\n## Common Mistakes\n\n| Mistake | Better |\n|---------|--------|\n| Grep the code and guess | Use `git-skill why` to understand intent first |\n| Fix the symptom without tracing the cause | Trace the full causal chain |\n| Assume the original code is wrong | Often a later change broke its assumption |\n| Skip checking for reverts | `git-skill decisions` \u2014 someone may have tried your fix and rolled it back |\n| Fix one instance of a pattern | Search for ALL instances of the same pattern |\n";
@@ -275,4 +275,156 @@ Review the current branch changes before merging.
275
275
  - Auto-fix critical/major issues, don't just report them
276
276
  - Always run tests after fixes
277
277
  `;
278
+ export const TRACE_COMMAND = `---
279
+ description: "Debug unexpected behavior by tracing broken assumptions across git history"
280
+ allowed-tools: Read, Bash(git-skill:*)
281
+ ---
282
+
283
+ # Historical Context Debugging
284
+
285
+ Trace broken assumptions in code using git-skill history. Use when behavior is wrong but code looks correct in isolation.
286
+
287
+ **PROCESS:**
288
+
289
+ 1. **Name the symptom precisely** (not "it's slow" — say what specifically is wrong)
290
+ 2. **Follow the investigation workflow**:
291
+ - \`git-skill search "<feature keyword>"\` — find related commits
292
+ - \`git-skill why <hash>\` — understand original intent and assumptions
293
+ - \`git-skill timeline <file>\` — see all changes chronologically
294
+ - \`git-skill search "<later feature>"\` — find changes that might conflict
295
+ - \`git-skill why <later_hash>\` — did the later change consider the original?
296
+ 3. **Identify the fault type**: Missing Guard, Parallel Evolution, or Stale Side Effect
297
+ 4. **Fix** and \`git-skill verify\` before committing
298
+
299
+ **EXAMPLE:**
300
+ \`\`\`
301
+ /trace Follow-up messages are triggering fresh RAG even when router says conversational
302
+ \`\`\`
303
+ `;
304
+ export const HISTORICAL_CONTEXT_SKILL = `---
305
+ name: historical-context-debugging
306
+ description: Use when debugging unexpected behavior where the code looks correct in isolation — traces broken assumptions across commits using git-skill to find where later changes invalidated earlier logic
307
+ ---
308
+
309
+ # Historical Context Debugging
310
+
311
+ ## Overview
312
+
313
+ Bugs often aren't in the code you're looking at — they're in the **gap between two changes made months apart**. Feature A was built with assumption X. Feature B was added later and silently violated assumption X. Both look correct in isolation. The bug is invisible without the git history.
314
+
315
+ This skill uses \`git-skill\` to reconstruct the causal chain: why was the original code written, what assumptions did it make, and which later change broke those assumptions?
316
+
317
+ ## When to Use
318
+
319
+ - Code looks correct but behaves wrong
320
+ - A feature "used to work" but stopped
321
+ - You find a guard/flag for one case but not a similar case
322
+ - Two subsystems that should be connected aren't
323
+ - Cache/config is stale despite code being updated
324
+ - You're about to change code but aren't sure why it was written that way
325
+
326
+ ## When NOT to Use
327
+
328
+ - Bug is clearly a typo or syntax error
329
+ - Code was written in the current session
330
+ - The issue is in a dependency, not your code
331
+
332
+ ## Quick Reference
333
+
334
+ | Step | Command | What You Learn |
335
+ |------|---------|----------------|
336
+ | Find commits | \`git-skill search "feature keyword"\` | Who touched this area and when |
337
+ | Understand intent | \`git-skill why <hash>\` | Why the original code was written, what assumptions it made |
338
+ | See evolution | \`git-skill timeline <file>\` | All changes to a file in chronological order |
339
+ | Find related | \`git-skill search "related feature"\` | Later changes that might affect the same logic |
340
+ | Check for reverts | \`git-skill decisions\` | Was this approach tried and rolled back before? |
341
+ | Validate fix | \`git-skill verify\` | Does your staged fix repeat a known mistake? |
342
+
343
+ ## The Three Fault Types
344
+
345
+ ### 1. Missing Guard (most common)
346
+
347
+ Feature A adds a guard for case X. Feature B adds a new case Y that needs the same guard but nobody adds it.
348
+
349
+ **Signal:** You find a flag/guard for one field but not a similar field.
350
+
351
+ **Investigation:**
352
+ \`\`\`
353
+ git-skill search "original_guard" → find when guard was added
354
+ git-skill why <hash> → understand why it was needed
355
+ git-skill search "new_feature" → find when new feature was added
356
+ git-skill why <hash> → did that commit mention the guard? No.
357
+ \`\`\`
358
+
359
+ ### 2. Parallel Evolution
360
+
361
+ Two systems are built independently that should share logic. They diverge because neither knows about the other.
362
+
363
+ **Signal:** Two different implementations of the same concept, or a new system never wired into existing code paths.
364
+
365
+ **Investigation:**
366
+ \`\`\`
367
+ git-skill search "system A" → find when A was built
368
+ git-skill search "system B" → find when B was built
369
+ git-skill timeline <shared_file> → was B ever connected to A? No.
370
+ \`\`\`
371
+
372
+ ### 3. Stale Side Effect
373
+
374
+ Code change is applied but a side effect (cache, config, external state) isn't updated.
375
+
376
+ **Signal:** DB/code shows correct value but runtime behavior is wrong.
377
+
378
+ **Investigation:**
379
+ \`\`\`
380
+ git-skill search "the change" → find the update commit
381
+ git-skill why <hash> → was cache/config invalidation mentioned?
382
+ # Then check: is the runtime state matching the code state?
383
+ \`\`\`
384
+
385
+ ## Investigation Workflow
386
+
387
+ ### Step 1: Name the symptom precisely
388
+ Bad: "Chat is slow"
389
+ Good: "Follow-up messages trigger fresh RAG even when router says conversational"
390
+
391
+ ### Step 2: Find the feature that should prevent this
392
+ \`\`\`bash
393
+ git-skill search "relevant feature"
394
+ \`\`\`
395
+
396
+ ### Step 3: Understand the original intent
397
+ \`\`\`bash
398
+ git-skill why <original_commit>
399
+ \`\`\`
400
+ Read the enrichment carefully. What **assumptions** did the author make? Write them down.
401
+
402
+ ### Step 4: Find what changed between then and now
403
+ \`\`\`bash
404
+ git-skill timeline <affected_file> --since <original_date>
405
+ git-skill search "feature that might conflict"
406
+ \`\`\`
407
+
408
+ ### Step 5: Check each later change against the assumptions
409
+ \`\`\`bash
410
+ git-skill why <later_commit>
411
+ \`\`\`
412
+ Ask: "Did this change consider assumption X?" If not, that's your likely fault.
413
+
414
+ ### Step 6: Fix and verify
415
+ \`\`\`bash
416
+ git add <files>
417
+ git-skill verify
418
+ \`\`\`
419
+
420
+ ## Common Mistakes
421
+
422
+ | Mistake | Better |
423
+ |---------|--------|
424
+ | Grep the code and guess | Use \`git-skill why\` to understand intent first |
425
+ | Fix the symptom without tracing the cause | Trace the full causal chain |
426
+ | Assume the original code is wrong | Often a later change broke its assumption |
427
+ | Skip checking for reverts | \`git-skill decisions\` — someone may have tried your fix and rolled it back |
428
+ | Fix one instance of a pattern | Search for ALL instances of the same pattern |
429
+ `;
278
430
  //# sourceMappingURL=walkthrough.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"walkthrough.js","sourceRoot":"","sources":["../../src/templates/walkthrough.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiD1B,CAAC;AA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AwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6HvC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m2015agg/git-skill",
3
- "version": "0.5.8",
3
+ "version": "0.5.9",
4
4
  "description": "Git history intelligence for LLMs — institutional memory over codebase evolution",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",