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.
- package/README.md +96 -10
- package/dist/cli.js +225 -7
- package/dist/cli.js.map +1 -1
- package/dist/go/auto-chain.d.ts +37 -5
- package/dist/go/auto-chain.js +220 -81
- package/dist/go/auto-chain.js.map +1 -1
- package/dist/go/executor.d.ts +2 -0
- package/dist/go/executor.js.map +1 -1
- package/dist/hooks/pre-commit.js +9 -3
- package/dist/hooks/pre-commit.js.map +1 -1
- package/dist/reporter/human.d.ts +5 -0
- package/dist/reporter/human.js +30 -0
- package/dist/reporter/human.js.map +1 -1
- package/dist/setup/templates.js +97 -122
- package/dist/setup/templates.js.map +1 -1
- package/dist/spec/generator.d.ts +20 -0
- package/dist/spec/generator.js +23 -2
- package/dist/spec/generator.js.map +1 -1
- package/dist/spec/interview.d.ts +20 -2
- package/dist/spec/interview.js +8 -0
- package/dist/spec/interview.js.map +1 -1
- package/dist/spec/scanner.d.ts +34 -0
- package/dist/spec/scanner.js +93 -0
- package/dist/spec/scanner.js.map +1 -1
- package/dist/spec/templates.d.ts +22 -0
- package/dist/spec/templates.js +8 -0
- package/dist/spec/templates.js.map +1 -1
- package/dist/utils/platform.d.ts +29 -0
- package/dist/utils/platform.js +90 -0
- package/dist/utils/platform.js.map +1 -0
- package/dist/worktree/identity.d.ts +9 -0
- package/dist/worktree/identity.js +32 -0
- package/dist/worktree/identity.js.map +1 -0
- package/dist/worktree/manager.d.ts +70 -0
- package/dist/worktree/manager.js +217 -0
- package/dist/worktree/manager.js.map +1 -0
- package/dist/worktree/parallel.d.ts +87 -0
- package/dist/worktree/parallel.js +328 -0
- package/dist/worktree/parallel.js.map +1 -0
- package/dist/worktree/session.d.ts +64 -0
- package/dist/worktree/session.js +193 -0
- package/dist/worktree/session.js.map +1 -0
- package/dist/worktree/state-merge.d.ts +43 -0
- package/dist/worktree/state-merge.js +162 -0
- package/dist/worktree/state-merge.js.map +1 -0
- package/hooks/pre-commit-verify.js +9 -3
- package/hooks/version-check.js +78 -78
- package/package.json +1 -1
- package/skills/forge-go.md +39 -0
- package/skills/forge-setup.md +183 -157
- package/skills/forge-spec.md +50 -12
- package/skills/forge-update.md +92 -72
package/skills/forge-update.md
CHANGED
|
@@ -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 —
|
|
52
|
-
|
|
53
|
-
After updating,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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.
|