forge-cc 0.1.4 → 0.1.6

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.
Files changed (52) hide show
  1. package/README.md +96 -10
  2. package/dist/cli.js +225 -7
  3. package/dist/cli.js.map +1 -1
  4. package/dist/go/auto-chain.d.ts +37 -5
  5. package/dist/go/auto-chain.js +220 -81
  6. package/dist/go/auto-chain.js.map +1 -1
  7. package/dist/go/executor.d.ts +2 -0
  8. package/dist/go/executor.js.map +1 -1
  9. package/dist/hooks/pre-commit.js +9 -3
  10. package/dist/hooks/pre-commit.js.map +1 -1
  11. package/dist/reporter/human.d.ts +5 -0
  12. package/dist/reporter/human.js +30 -0
  13. package/dist/reporter/human.js.map +1 -1
  14. package/dist/setup/templates.js +97 -122
  15. package/dist/setup/templates.js.map +1 -1
  16. package/dist/spec/generator.d.ts +20 -0
  17. package/dist/spec/generator.js +23 -2
  18. package/dist/spec/generator.js.map +1 -1
  19. package/dist/spec/interview.d.ts +20 -2
  20. package/dist/spec/interview.js +8 -0
  21. package/dist/spec/interview.js.map +1 -1
  22. package/dist/spec/scanner.d.ts +34 -0
  23. package/dist/spec/scanner.js +93 -0
  24. package/dist/spec/scanner.js.map +1 -1
  25. package/dist/spec/templates.d.ts +22 -0
  26. package/dist/spec/templates.js +8 -0
  27. package/dist/spec/templates.js.map +1 -1
  28. package/dist/utils/platform.d.ts +29 -0
  29. package/dist/utils/platform.js +90 -0
  30. package/dist/utils/platform.js.map +1 -0
  31. package/dist/worktree/identity.d.ts +9 -0
  32. package/dist/worktree/identity.js +32 -0
  33. package/dist/worktree/identity.js.map +1 -0
  34. package/dist/worktree/manager.d.ts +70 -0
  35. package/dist/worktree/manager.js +217 -0
  36. package/dist/worktree/manager.js.map +1 -0
  37. package/dist/worktree/parallel.d.ts +87 -0
  38. package/dist/worktree/parallel.js +328 -0
  39. package/dist/worktree/parallel.js.map +1 -0
  40. package/dist/worktree/session.d.ts +64 -0
  41. package/dist/worktree/session.js +193 -0
  42. package/dist/worktree/session.js.map +1 -0
  43. package/dist/worktree/state-merge.d.ts +43 -0
  44. package/dist/worktree/state-merge.js +162 -0
  45. package/dist/worktree/state-merge.js.map +1 -0
  46. package/hooks/pre-commit-verify.js +9 -3
  47. package/hooks/version-check.js +78 -78
  48. package/package.json +1 -1
  49. package/skills/forge-go.md +39 -0
  50. package/skills/forge-setup.md +183 -157
  51. package/skills/forge-spec.md +50 -12
  52. package/skills/forge-update.md +92 -72
@@ -1,72 +1,92 @@
1
- # /forge:update — Update Forge to Latest Version
2
-
3
- Check for updates and install the latest version of forge-cc.
4
-
5
- ## Instructions
6
-
7
- ### Step 1 — Check Versions
8
-
9
- Run these commands to get version info:
10
-
11
- ```bash
12
- # Current installed version
13
- npm list -g forge-cc --json 2>/dev/null | node -e "const d=require('fs').readFileSync('/dev/stdin','utf8');const j=JSON.parse(d);console.log(j.dependencies?.['forge-cc']?.version||'not installed')"
14
-
15
- # Latest available version
16
- npm view forge-cc version
17
- ```
18
-
19
- Parse both versions. If the command fails, handle gracefully:
20
- - If forge-cc is not installed globally: print "forge-cc is not installed globally. Install with: `npm install -g forge-cc`"
21
- - If npm view fails (offline): print "Could not reach npm registry. Check your internet connection."
22
-
23
- ### Step 2 — Compare and Report
24
-
25
- Print the version status:
26
-
27
- ```
28
- ## Forge Version Check
29
-
30
- **Installed:** v{current}
31
- **Latest:** v{latest}
32
- **Status:** {Up to date / Update available}
33
- ```
34
-
35
- If already up to date, stop here with: "You're on the latest version."
36
-
37
- ### Step 3 — Update
38
-
39
- If an update is available, run:
40
-
41
- ```bash
42
- npm install -g forge-cc@latest
43
- ```
44
-
45
- Verify the update succeeded:
46
-
47
- ```bash
48
- npm list -g forge-cc --json 2>/dev/null | node -e "const d=require('fs').readFileSync('/dev/stdin','utf8');const j=JSON.parse(d);console.log(j.dependencies?.['forge-cc']?.version||'failed')"
49
- ```
50
-
51
- ### Step 4 — Post-Update Check
52
-
53
- After updating, check if the current project's forge files need refreshing:
54
-
55
- 1. Check if `.forge.json` exists in the current directory
56
- 2. If it does (this is a forge project), suggest: "Run `/forge:setup` with Refresh mode to update project files to the latest templates."
57
- 3. If it doesn't, just confirm the update.
58
-
59
- Print final summary:
60
-
61
- ```
62
- ## Update Complete
63
-
64
- **Previous:** v{old}
65
- **Current:** v{new}
66
-
67
- {If forge project: "Consider running `/forge:setup` (Refresh) to update project files."}
68
- ```
69
-
70
- ---
71
-
72
- Do NOT stage, commit, or push anything. This skill only manages the npm package.
1
+ # /forge:update — Update Forge to Latest Version
2
+
3
+ Check for updates and install the latest version of forge-cc.
4
+
5
+ ## Instructions
6
+
7
+ ### Step 1 — Check Versions
8
+
9
+ Run these commands to get version info:
10
+
11
+ ```bash
12
+ # Current installed version
13
+ npm list -g forge-cc --json 2>/dev/null | node -e "const d=require('fs').readFileSync('/dev/stdin','utf8');const j=JSON.parse(d);console.log(j.dependencies?.['forge-cc']?.version||'not installed')"
14
+
15
+ # Latest available version
16
+ npm view forge-cc version
17
+ ```
18
+
19
+ Parse both versions. If the command fails, handle gracefully:
20
+ - If forge-cc is not installed globally: print "forge-cc is not installed globally. Install with: `npm install -g forge-cc`"
21
+ - If npm view fails (offline): print "Could not reach npm registry. Check your internet connection."
22
+
23
+ ### Step 2 — Compare and Report
24
+
25
+ Print the version status:
26
+
27
+ ```
28
+ ## Forge Version Check
29
+
30
+ **Installed:** v{current}
31
+ **Latest:** v{latest}
32
+ **Status:** {Up to date / Update available}
33
+ ```
34
+
35
+ If already up to date, stop here with: "You're on the latest version."
36
+
37
+ ### Step 3 — Update
38
+
39
+ If an update is available, run:
40
+
41
+ ```bash
42
+ npm install -g forge-cc@latest
43
+ ```
44
+
45
+ Verify the update succeeded:
46
+
47
+ ```bash
48
+ npm list -g forge-cc --json 2>/dev/null | node -e "const d=require('fs').readFileSync('/dev/stdin','utf8');const j=JSON.parse(d);console.log(j.dependencies?.['forge-cc']?.version||'failed')"
49
+ ```
50
+
51
+ ### Step 4 — Re-sync Skills
52
+
53
+ After updating, copy the latest skills to `~/.claude/commands/forge/`:
54
+
55
+ ```bash
56
+ mkdir -p ~/.claude/commands/forge
57
+
58
+ SKILLS_DIR="$(dirname "$(which forge)")/../lib/node_modules/forge-cc/skills"
59
+ if [ ! -d "$SKILLS_DIR" ]; then
60
+ SKILLS_DIR="node_modules/forge-cc/skills"
61
+ fi
62
+
63
+ for f in "$SKILLS_DIR"/forge-*.md; do
64
+ name=$(basename "$f" | sed 's/^forge-//')
65
+ cp "$f" ~/.claude/commands/forge/"$name"
66
+ done
67
+ ```
68
+
69
+ Print: "Synced skills to ~/.claude/commands/forge/"
70
+
71
+ ### Step 5 — Post-Update Check
72
+
73
+ After updating, check if the current project's forge files need refreshing:
74
+
75
+ 1. Check if `.forge.json` exists in the current directory
76
+ 2. If it does (this is a forge project), suggest: "Run `/forge:setup` with Refresh mode to update project files to the latest templates."
77
+ 3. If it doesn't, just confirm the update.
78
+
79
+ Print final summary:
80
+
81
+ ```
82
+ ## Update Complete
83
+
84
+ **Previous:** v{old}
85
+ **Current:** v{new}
86
+
87
+ {If forge project: "Consider running `/forge:setup` (Refresh) to update project files."}
88
+ ```
89
+
90
+ ---
91
+
92
+ Do NOT stage, commit, or push anything. This skill only manages the npm package.