@m2015agg/git-skill 0.5.6 → 0.5.8
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const WALKTHROUGH = "#
|
|
1
|
+
export declare const WALKTHROUGH = "---\ndescription: Interactive walkthrough of git history \u2014 hotspots, decisions, expertise, health trends via git-skill CLI\nallowed-tools: Read, Bash(git-skill:*)\n---\n\n# /git-history \u2014 Codebase History Walkthrough\n\nWhen the user invokes this command, guide them through their codebase history interactively.\n\n## Steps\n\n1. **Check setup health**\n Run: `git-skill doctor`\n Confirm the database is fresh and hook is installed. Note commit count and snapshot age.\n\n2. **Show what's churning**\n Run: `git-skill hotspots --limit 10`\n Explain which files have the most churn. Flag any that are suspicious (high edit count in a short period = instability).\n\n3. **Show recent decisions**\n Run: `git-skill decisions --limit 10`\n Walk through the major decision points \u2014 reverts, big refactors, architecture changes. Explain the impact of each.\n\n4. **Health trends**\n Run: `git-skill trends`\n Summarize the metric trends: is revert rate going up or down? Is scope creep improving? Are commits getting smaller or larger?\n\n5. **Explore a specific area**\n Ask the user which file or directory they want to investigate, or pick the top hotspot.\n Run: `git-skill timeline <path>`\n Show the full evolution \u2014 every commit, who made it, what changed.\n\n6. **Who knows what**\n Run: `git-skill experts <path>` (using the path from step 5)\n Show who has the most context on that area of the codebase.\n\n7. **Check for co-change patterns**\n Run: `git-skill coupling <path>`\n Reveal files that always change together \u2014 hidden dependencies the team should know about.\n\n8. **Open Q&A**\n Say: \"Ask me anything about your codebase history \u2014 I can search commits, trace file evolution, find decision points, or check what was tried before.\"\n\n## Tips\n- Use `git-skill search \"<query>\"` for free-text search across all commits and file paths\n- Use `git-skill why <hash>` to understand the intent behind any commit (requires enrichment)\n- Use `git-skill verify` before committing to check if staged changes repeat past mistakes\n- Use `git-skill diff-summary v1.0..v1.1` for a release-level summary between two refs\n- Use `git-skill regression` to detect change-point shifts in metrics\n";
|
|
2
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
|
|
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
|
-
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. **
|
|
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";
|
|
@@ -1,14 +1,52 @@
|
|
|
1
|
-
export const WALKTHROUGH =
|
|
1
|
+
export const WALKTHROUGH = `---
|
|
2
|
+
description: Interactive walkthrough of git history — hotspots, decisions, expertise, health trends via git-skill CLI
|
|
3
|
+
allowed-tools: Read, Bash(git-skill:*)
|
|
4
|
+
---
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
# /git-history — Codebase History Walkthrough
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
git-skill
|
|
11
|
-
|
|
8
|
+
When the user invokes this command, guide them through their codebase history interactively.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. **Check setup health**
|
|
13
|
+
Run: \`git-skill doctor\`
|
|
14
|
+
Confirm the database is fresh and hook is installed. Note commit count and snapshot age.
|
|
15
|
+
|
|
16
|
+
2. **Show what's churning**
|
|
17
|
+
Run: \`git-skill hotspots --limit 10\`
|
|
18
|
+
Explain which files have the most churn. Flag any that are suspicious (high edit count in a short period = instability).
|
|
19
|
+
|
|
20
|
+
3. **Show recent decisions**
|
|
21
|
+
Run: \`git-skill decisions --limit 10\`
|
|
22
|
+
Walk through the major decision points — reverts, big refactors, architecture changes. Explain the impact of each.
|
|
23
|
+
|
|
24
|
+
4. **Health trends**
|
|
25
|
+
Run: \`git-skill trends\`
|
|
26
|
+
Summarize the metric trends: is revert rate going up or down? Is scope creep improving? Are commits getting smaller or larger?
|
|
27
|
+
|
|
28
|
+
5. **Explore a specific area**
|
|
29
|
+
Ask the user which file or directory they want to investigate, or pick the top hotspot.
|
|
30
|
+
Run: \`git-skill timeline <path>\`
|
|
31
|
+
Show the full evolution — every commit, who made it, what changed.
|
|
32
|
+
|
|
33
|
+
6. **Who knows what**
|
|
34
|
+
Run: \`git-skill experts <path>\` (using the path from step 5)
|
|
35
|
+
Show who has the most context on that area of the codebase.
|
|
36
|
+
|
|
37
|
+
7. **Check for co-change patterns**
|
|
38
|
+
Run: \`git-skill coupling <path>\`
|
|
39
|
+
Reveal files that always change together — hidden dependencies the team should know about.
|
|
40
|
+
|
|
41
|
+
8. **Open Q&A**
|
|
42
|
+
Say: "Ask me anything about your codebase history — I can search commits, trace file evolution, find decision points, or check what was tried before."
|
|
43
|
+
|
|
44
|
+
## Tips
|
|
45
|
+
- Use \`git-skill search "<query>"\` for free-text search across all commits and file paths
|
|
46
|
+
- Use \`git-skill why <hash>\` to understand the intent behind any commit (requires enrichment)
|
|
47
|
+
- Use \`git-skill verify\` before committing to check if staged changes repeat past mistakes
|
|
48
|
+
- Use \`git-skill diff-summary v1.0..v1.1\` for a release-level summary between two refs
|
|
49
|
+
- Use \`git-skill regression\` to detect change-point shifts in metrics
|
|
12
50
|
`;
|
|
13
51
|
export const PLAN_COMMAND = `---
|
|
14
52
|
description: "Plan a feature with git history awareness — checks what was tried before"
|
|
@@ -100,9 +138,15 @@ Implement feature according to the plan file.
|
|
|
100
138
|
5. **For Each Task**:
|
|
101
139
|
- Make changes following existing patterns in the codebase
|
|
102
140
|
- Run tests after each change
|
|
141
|
+
- Before committing, verify against history:
|
|
142
|
+
\`\`\`bash
|
|
143
|
+
git add .
|
|
144
|
+
git-skill verify
|
|
145
|
+
\`\`\`
|
|
146
|
+
If BLOCK: stop and discuss. If WARN: note it and proceed carefully.
|
|
103
147
|
- Push commits frequently (backup points):
|
|
104
148
|
\`\`\`bash
|
|
105
|
-
git
|
|
149
|
+
git commit -m "wip: [task]" && git push
|
|
106
150
|
\`\`\`
|
|
107
151
|
|
|
108
152
|
6. **STOP**: Notify completion — DO NOT finalize or merge
|
|
@@ -203,10 +247,10 @@ Review the current branch changes before merging.
|
|
|
203
247
|
- **WARN**: Note the warning. Check if the current approach addresses the previous failure. Proceed with caution.
|
|
204
248
|
- **PASS**: No concerns from history.
|
|
205
249
|
|
|
206
|
-
3. **
|
|
250
|
+
3. **Review scope and codebase health**:
|
|
207
251
|
\`\`\`bash
|
|
208
|
-
git-skill
|
|
209
|
-
git-skill hotspots --limit 5
|
|
252
|
+
git-skill diff-summary HEAD~5..HEAD # summarize what changed in this branch
|
|
253
|
+
git-skill hotspots --limit 5 # flag churning files
|
|
210
254
|
\`\`\`
|
|
211
255
|
Flag any files being modified that appear in the hotspots list.
|
|
212
256
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"walkthrough.js","sourceRoot":"","sources":["../../src/templates/walkthrough.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG
|
|
1
|
+
{"version":3,"file":"walkthrough.js","sourceRoot":"","sources":["../../src/templates/walkthrough.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiD1B,CAAC;AAGF,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6D3B,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8ChC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8D/B,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsD7B,CAAC"}
|