forge-workflow 0.0.2 → 0.0.3
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/.claude/commands/plan.md +93 -4
- package/.cline/workflows/dev.md +311 -0
- package/.cline/workflows/plan.md +475 -0
- package/.cline/workflows/premerge.md +176 -0
- package/.cline/workflows/research.md +39 -0
- package/.cline/workflows/review.md +439 -0
- package/.cline/workflows/rollback.md +718 -0
- package/.cline/workflows/ship.md +131 -0
- package/.cline/workflows/sonarcloud.md +146 -0
- package/.cline/workflows/status.md +74 -0
- package/.cline/workflows/validate.md +234 -0
- package/.cline/workflows/verify.md +218 -0
- package/.codex/config.toml +11 -0
- package/.codex/skills/dev/SKILL.md +314 -0
- package/.codex/skills/plan/SKILL.md +478 -0
- package/.codex/skills/premerge/SKILL.md +179 -0
- package/.codex/skills/research/SKILL.md +42 -0
- package/.codex/skills/review/SKILL.md +442 -0
- package/.codex/skills/rollback/SKILL.md +721 -0
- package/.codex/skills/ship/SKILL.md +134 -0
- package/.codex/skills/sonarcloud/SKILL.md +149 -0
- package/.codex/skills/status/SKILL.md +77 -0
- package/.codex/skills/validate/SKILL.md +237 -0
- package/.codex/skills/verify/SKILL.md +221 -0
- package/.cursor/commands/dev.md +311 -0
- package/.cursor/commands/plan.md +475 -0
- package/.cursor/commands/premerge.md +176 -0
- package/.cursor/commands/research.md +39 -0
- package/.cursor/commands/review.md +439 -0
- package/.cursor/commands/rollback.md +718 -0
- package/.cursor/commands/ship.md +131 -0
- package/.cursor/commands/sonarcloud.md +146 -0
- package/.cursor/commands/status.md +74 -0
- package/.cursor/commands/validate.md +234 -0
- package/.cursor/commands/verify.md +218 -0
- package/.cursor/rules/permissions-guidance.mdc +37 -0
- package/.github/prompts/dev.prompt.md +316 -0
- package/.github/prompts/plan.prompt.md +480 -0
- package/.github/prompts/premerge.prompt.md +181 -0
- package/.github/prompts/research.prompt.md +44 -0
- package/.github/prompts/review.prompt.md +444 -0
- package/.github/prompts/rollback.prompt.md +723 -0
- package/.github/prompts/ship.prompt.md +136 -0
- package/.github/prompts/sonarcloud.prompt.md +151 -0
- package/.github/prompts/status.prompt.md +79 -0
- package/.github/prompts/validate.prompt.md +239 -0
- package/.github/prompts/verify.prompt.md +223 -0
- package/.kilocode/workflows/dev.md +315 -0
- package/.kilocode/workflows/plan.md +479 -0
- package/.kilocode/workflows/premerge.md +180 -0
- package/.kilocode/workflows/research.md +43 -0
- package/.kilocode/workflows/review.md +443 -0
- package/.kilocode/workflows/rollback.md +722 -0
- package/.kilocode/workflows/ship.md +135 -0
- package/.kilocode/workflows/sonarcloud.md +150 -0
- package/.kilocode/workflows/status.md +78 -0
- package/.kilocode/workflows/validate.md +238 -0
- package/.kilocode/workflows/verify.md +222 -0
- package/.opencode/commands/dev.md +314 -0
- package/.opencode/commands/plan.md +478 -0
- package/.opencode/commands/premerge.md +179 -0
- package/.opencode/commands/research.md +42 -0
- package/.opencode/commands/review.md +442 -0
- package/.opencode/commands/rollback.md +721 -0
- package/.opencode/commands/ship.md +134 -0
- package/.opencode/commands/sonarcloud.md +149 -0
- package/.opencode/commands/status.md +77 -0
- package/.opencode/commands/validate.md +237 -0
- package/.opencode/commands/verify.md +221 -0
- package/.roo/commands/dev.md +315 -0
- package/.roo/commands/plan.md +479 -0
- package/.roo/commands/premerge.md +180 -0
- package/.roo/commands/research.md +43 -0
- package/.roo/commands/review.md +443 -0
- package/.roo/commands/rollback.md +722 -0
- package/.roo/commands/ship.md +135 -0
- package/.roo/commands/sonarcloud.md +150 -0
- package/.roo/commands/status.md +78 -0
- package/.roo/commands/validate.md +238 -0
- package/.roo/commands/verify.md +222 -0
- package/LICENSE +21 -21
- package/docs/ENHANCED_ONBOARDING.md +2 -2
- package/docs/TOOLCHAIN.md +15 -234
- package/install.sh +32 -36
- package/lib/commands/plan.js +11 -15
- package/lib/commands/recommend.js +2 -2
- package/lib/dep-guard/analyzer.js +294 -0
- package/lib/dep-guard/behavior-detector.js +98 -0
- package/lib/dep-guard/contract-detector.js +162 -0
- package/lib/dep-guard/import-detector.js +498 -0
- package/lib/dep-guard/path-utils.js +13 -0
- package/lib/dep-guard/rubric.js +120 -0
- package/lib/dep-guard/task-parser.js +318 -0
- package/lib/plugin-catalog.js +18 -28
- package/lib/workflow-profiles.js +5 -11
- package/package.json +15 -4
- package/skills/parallel-deep-research/SKILL.md +108 -0
- package/skills/parallel-deep-research/evals/README.md +27 -0
- package/skills/parallel-deep-research/evals/evals.json +62 -0
- package/skills/sonarcloud-analysis/SKILL.md +171 -0
- package/skills/sonarcloud-analysis/evals/README.md +27 -0
- package/skills/sonarcloud-analysis/evals/evals.json +50 -0
- package/skills/sonarcloud-analysis/references/api-reference.md +466 -0
- package/docs/planning/PROGRESS.md +0 -396
- package/docs/plans/.gitkeep +0 -0
- package/docs/plans/2026-02-27-forge-test-suite-v2-decisions.md +0 -21
- package/docs/plans/2026-02-27-forge-test-suite-v2-design.md +0 -362
- package/docs/plans/2026-02-27-forge-test-suite-v2-tasks.md +0 -343
- package/docs/plans/2026-03-02-superpowers-gaps-decisions.md +0 -26
- package/docs/plans/2026-03-02-superpowers-gaps-design.md +0 -239
- package/docs/plans/2026-03-02-superpowers-gaps-tasks.md +0 -260
- package/docs/plans/2026-03-04-agent-command-parity-design.md +0 -163
- package/docs/plans/2026-03-04-verify-worktree-cleanup-decisions.md +0 -7
- package/docs/plans/2026-03-04-verify-worktree-cleanup-design.md +0 -165
- package/docs/plans/2026-03-05-forge-uto-decisions.md +0 -6
- package/docs/plans/2026-03-05-forge-uto-design.md +0 -116
- package/docs/plans/2026-03-05-forge-uto-tasks.md +0 -244
- package/docs/plans/2026-03-10-command-creator-and-eval-decisions.md +0 -52
- package/docs/plans/2026-03-10-command-creator-and-eval-design.md +0 -350
- package/docs/plans/2026-03-10-command-creator-and-eval-tasks.md +0 -426
- package/docs/plans/2026-03-10-stale-workflow-refs-decisions.md +0 -8
- package/docs/plans/2026-03-10-stale-workflow-refs-design.md +0 -80
- package/docs/plans/2026-03-10-stale-workflow-refs-tasks.md +0 -90
- package/docs/plans/2026-03-14-beads-plan-context-decisions.md +0 -9
- package/docs/plans/2026-03-14-beads-plan-context-design.md +0 -171
- package/docs/plans/2026-03-14-beads-plan-context-tasks.md +0 -160
- package/docs/plans/2026-03-14-skill-eval-loop-decisions.md +0 -33
- package/docs/plans/2026-03-14-skill-eval-loop-design.md +0 -118
- package/docs/plans/2026-03-14-skill-eval-loop-results.md +0 -78
- package/docs/plans/2026-03-14-skill-eval-loop-tasks.md +0 -160
- package/docs/plans/2026-03-15-agent-command-parity-v2-decisions.md +0 -11
- package/docs/plans/2026-03-15-agent-command-parity-v2-design.md +0 -145
- package/docs/plans/2026-03-15-agent-command-parity-v2-tasks.md +0 -211
- package/docs/research/TEMPLATE.md +0 -292
- package/docs/research/advanced-testing.md +0 -297
- package/docs/research/agent-permissions.md +0 -167
- package/docs/research/dependency-chain.md +0 -328
- package/docs/research/forge-workflow-v2.md +0 -550
- package/docs/research/plugin-architecture.md +0 -772
- package/docs/research/pr4-cli-automation.md +0 -326
- package/docs/research/premerge-verify-restructure.md +0 -205
- package/docs/research/skills-restructure.md +0 -508
- package/docs/research/sonarcloud-perfection-plan.md +0 -166
- package/docs/research/sonarcloud-quality-gate.md +0 -184
- package/docs/research/superpowers-integration.md +0 -403
- package/docs/research/superpowers.md +0 -319
- package/docs/research/test-environment.md +0 -519
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Post-merge health check — confirm merge landed, CI is clean, deployments are up
|
|
3
|
+
mode: code
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Verify that the merge landed correctly and everything is running properly after merge.
|
|
7
|
+
|
|
8
|
+
# Verify
|
|
9
|
+
|
|
10
|
+
This command runs AFTER the user has merged the PR. It checks system health — not documentation (that was handled in `/premerge`).
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
/verify
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## What This Command Does
|
|
19
|
+
|
|
20
|
+
### Step 1: Switch to Main and Pull
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
git checkout master
|
|
24
|
+
git pull
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Confirm the merge actually landed on main. If the PR isn't merged yet, stop and tell the user to merge first.
|
|
28
|
+
|
|
29
|
+
### Step 2: Confirm PR Is Merged
|
|
30
|
+
|
|
31
|
+
Detect the most recently merged PR from the current HEAD commit:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
gh pr list --state merged --base master --limit 1 --json number,state,mergedAt,mergedBy
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
- `state` should be `MERGED`
|
|
38
|
+
- If no PR found: the merge may not have landed yet — stop and tell the user to merge first
|
|
39
|
+
- If the wrong PR appears: user can specify the number directly with `gh pr view <number> --json state,mergedAt,mergedBy`
|
|
40
|
+
|
|
41
|
+
### Step 3: Check CI on Main After Merge
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
gh run list --branch master --limit 5
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Check the most recent workflow runs on `master`:
|
|
48
|
+
- All should be passing or in progress
|
|
49
|
+
- If any failed: identify which workflow and what failed
|
|
50
|
+
- Failed CI on main after merge may need a hotfix PR
|
|
51
|
+
|
|
52
|
+
### Step 4: Check Deployments (if applicable)
|
|
53
|
+
|
|
54
|
+
Check if the project has a deployment target:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Check deployment status from latest run
|
|
58
|
+
gh run list --branch master --limit 1
|
|
59
|
+
|
|
60
|
+
# Check Vercel deployments for the merged PR (use number from Step 2)
|
|
61
|
+
gh pr view <number> --json deployments
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
If deployments exist:
|
|
65
|
+
- Are they showing as successful?
|
|
66
|
+
- Is the production/preview URL responding?
|
|
67
|
+
|
|
68
|
+
### Step 5: Report Status
|
|
69
|
+
|
|
70
|
+
**If everything is clean**:
|
|
71
|
+
```
|
|
72
|
+
✅ Merge verified — everything is healthy
|
|
73
|
+
|
|
74
|
+
PR: #<number> merged by <user> at <time>
|
|
75
|
+
CI on master: ✓ All passing
|
|
76
|
+
Deployments: ✓ Up (if applicable)
|
|
77
|
+
|
|
78
|
+
Ready for next feature → run /status
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**If issues found**:
|
|
82
|
+
```
|
|
83
|
+
⚠️ Post-merge issues detected
|
|
84
|
+
|
|
85
|
+
PR: #<number> merged ✓
|
|
86
|
+
CI on master: ✗ <workflow-name> failing
|
|
87
|
+
- Error: <description>
|
|
88
|
+
- Action needed: <hotfix or investigation>
|
|
89
|
+
|
|
90
|
+
Deployments: ✗ <deployment> not responding
|
|
91
|
+
|
|
92
|
+
Next: Create hotfix branch or investigate root cause
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Step 6: Clean Up Worktree and Branch
|
|
96
|
+
|
|
97
|
+
Only run this step after CI is confirmed healthy (Step 3 passed).
|
|
98
|
+
|
|
99
|
+
Get the merged branch name:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
gh pr view <number> --json headRefName --jq '.headRefName'
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
If the branch name cannot be determined (empty output or error), skip cleanup and tell the user to run `git worktree list` and clean up manually.
|
|
106
|
+
|
|
107
|
+
Find and remove the matching worktree (if it exists):
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
# Get the worktree path for this exact branch
|
|
111
|
+
WORKTREE_PATH=$(git worktree list --porcelain \
|
|
112
|
+
| awk -v branch="refs/heads/<branch>" '
|
|
113
|
+
/^worktree / { path=substr($0, 10) }
|
|
114
|
+
$0 == "branch " branch { print path }
|
|
115
|
+
')
|
|
116
|
+
|
|
117
|
+
if [ -n "$WORKTREE_PATH" ]; then
|
|
118
|
+
git worktree remove "$WORKTREE_PATH" --force
|
|
119
|
+
echo "Worktree: removed ✓ ($WORKTREE_PATH)"
|
|
120
|
+
else
|
|
121
|
+
echo "Worktree: not found (already removed or never created) — skipping"
|
|
122
|
+
fi
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
If no worktree is found for that branch, skip gracefully with a note: "Worktree: not found (already removed or never created)".
|
|
126
|
+
|
|
127
|
+
Delete the local branch (safe delete only):
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
git branch -d <branch> 2>/dev/null || echo "Branch: already deleted — skipping"
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
The `|| echo` fallback handles the case where the branch is already gone (e.g., deleted by a previous run or the remote), so the command never fails the verify step.
|
|
134
|
+
|
|
135
|
+
Report cleanup in output:
|
|
136
|
+
```
|
|
137
|
+
Worktree: removed ✓
|
|
138
|
+
Branch: <branch-name> deleted ✓
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Step 7: If Issues Found — Create Beads Issue
|
|
142
|
+
|
|
143
|
+
**Never commit inline.** If something is wrong, create a tracking issue:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
bd create --title="Post-merge: <description of issue>" --type=bug --priority=1
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Step 8: Close Beads Issue (if healthy)
|
|
150
|
+
|
|
151
|
+
If everything is clean, close the Beads issue:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
bd close <id> --reason="Merged and verified on master"
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
<HARD-GATE: /verify exit>
|
|
159
|
+
Do NOT declare /verify complete until:
|
|
160
|
+
1. gh run list --branch master --limit 3 shows actual CI output (not "should be fine")
|
|
161
|
+
2. If healthy: Beads issue is closed (bd close <id> run and confirmed)
|
|
162
|
+
3. If issues found: Beads tracking issue created for every problem
|
|
163
|
+
4. Worktree removed (or confirmed already gone) — OR Step 6 was intentionally skipped because CI was unhealthy; if skipped, state explicitly: "cleanup deferred, CI was not healthy"
|
|
164
|
+
"It should be fine" is not evidence. Run the command. Show the output.
|
|
165
|
+
</HARD-GATE>
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Rules
|
|
169
|
+
|
|
170
|
+
- **Never commits** — this command is read-only
|
|
171
|
+
- **Never creates PRs** — if fixes are needed, that's a new /dev cycle
|
|
172
|
+
- **Runs after user confirms merge** — not before
|
|
173
|
+
- **Reports honestly** — if CI is broken on main, say so clearly
|
|
174
|
+
|
|
175
|
+
## Example Output (Healthy)
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
✅ Merge verified — everything is healthy
|
|
179
|
+
|
|
180
|
+
PR: #89 merged by harshanandak at 2026-02-24T14:30:00Z
|
|
181
|
+
Branch: feat/auth-refresh deleted ✓
|
|
182
|
+
CI on master:
|
|
183
|
+
✓ Test Suite (ubuntu, node 20): passing
|
|
184
|
+
✓ Test Suite (windows, node 22): passing
|
|
185
|
+
✓ ESLint: passing
|
|
186
|
+
✓ SonarCloud: passing
|
|
187
|
+
✓ CodeQL: passing
|
|
188
|
+
Deployments: N/A (no deployment configured)
|
|
189
|
+
|
|
190
|
+
Ready for next feature → run /status
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## Example Output (Issues Found)
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
⚠️ Post-merge issues detected
|
|
197
|
+
|
|
198
|
+
PR: #89 merged ✓
|
|
199
|
+
CI on master:
|
|
200
|
+
✓ Test Suite: passing
|
|
201
|
+
✗ SonarCloud: quality gate failing
|
|
202
|
+
- 2 new code smells introduced
|
|
203
|
+
- Action: investigate or create hotfix
|
|
204
|
+
|
|
205
|
+
Created Beads issue: forge-xyz
|
|
206
|
+
"Post-merge: SonarCloud quality gate failing on master after PR #89"
|
|
207
|
+
|
|
208
|
+
Run /status to assess next steps
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## Integration with Workflow
|
|
212
|
+
|
|
213
|
+
```
|
|
214
|
+
Utility: /status → Understand current context before starting
|
|
215
|
+
Stage 1: /plan → Design intent → research → branch + worktree + task list
|
|
216
|
+
Stage 2: /dev → Implement each task with subagent-driven TDD
|
|
217
|
+
Stage 3: /validate → Type check, lint, tests, security — all fresh output
|
|
218
|
+
Stage 4: /ship → Push + create PR
|
|
219
|
+
Stage 5: /review → Address GitHub Actions, Greptile, SonarCloud
|
|
220
|
+
Stage 6: /premerge → Update docs, hand off PR to user
|
|
221
|
+
Stage 7: /verify → Post-merge CI check on main (you are here) ✓
|
|
222
|
+
```
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Harsha Nandak
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Harsha Nandak
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -333,10 +333,10 @@ git checkout -b feat/user-authentication
|
|
|
333
333
|
bunx forge setup --type=critical
|
|
334
334
|
|
|
335
335
|
# Auto-escalates to Critical profile:
|
|
336
|
-
# -
|
|
336
|
+
# - 7-stage workflow
|
|
337
337
|
# - Research required
|
|
338
338
|
# - OWASP analysis
|
|
339
|
-
# -
|
|
339
|
+
# - Design docs for strategic changes
|
|
340
340
|
```
|
|
341
341
|
|
|
342
342
|
### Scenario 4: Production Hotfix
|
package/docs/TOOLCHAIN.md
CHANGED
|
@@ -9,20 +9,20 @@ Complete reference for all tools integrated with the Forge workflow.
|
|
|
9
9
|
│ FORGE TOOLCHAIN │
|
|
10
10
|
├─────────────────────────────────────────────────────────────────┤
|
|
11
11
|
│ │
|
|
12
|
-
│ ┌─────────────┐
|
|
13
|
-
│ │ BEADS │ │
|
|
14
|
-
│ │ (bd) │ │
|
|
15
|
-
│ │ │ │
|
|
16
|
-
│ │ Git-backed │ │
|
|
17
|
-
│ │ Issue │ │
|
|
18
|
-
│ │ Tracking │ │
|
|
19
|
-
│ └─────────────┘
|
|
20
|
-
│ │
|
|
21
|
-
│
|
|
12
|
+
│ ┌─────────────┐ ┌─────────────────────┐ │
|
|
13
|
+
│ │ BEADS │ │ EXTERNAL SERVICES │ │
|
|
14
|
+
│ │ (bd) │ │ │ │
|
|
15
|
+
│ │ │ │ Parallel AI │ │
|
|
16
|
+
│ │ Git-backed │ │ Greptile │ │
|
|
17
|
+
│ │ Issue │ │ SonarCloud │ │
|
|
18
|
+
│ │ Tracking │ │ GitHub CLI │ │
|
|
19
|
+
│ └─────────────┘ └─────────────────────┘ │
|
|
20
|
+
│ │ │ │
|
|
21
|
+
│ └─────────────────────┘ │
|
|
22
22
|
│ │ │
|
|
23
23
|
│ ┌─────▼─────┐ │
|
|
24
24
|
│ │ FORGE │ │
|
|
25
|
-
│ │
|
|
25
|
+
│ │ 7-Stage │ │
|
|
26
26
|
│ │ Workflow │ │
|
|
27
27
|
│ └───────────┘ │
|
|
28
28
|
│ │
|
|
@@ -219,200 +219,6 @@ bd sync # Always sync at end!
|
|
|
219
219
|
|
|
220
220
|
---
|
|
221
221
|
|
|
222
|
-
## OpenSpec - Spec-Driven Development
|
|
223
|
-
|
|
224
|
-
**Package**: `@fission-ai/openspec`
|
|
225
|
-
**Repository**: [github.com/Fission-AI/OpenSpec](https://github.com/Fission-AI/OpenSpec)
|
|
226
|
-
**Website**: [openspec.dev](https://openspec.dev)
|
|
227
|
-
**Purpose**: Structured specifications for AI-assisted development
|
|
228
|
-
|
|
229
|
-
### Why OpenSpec?
|
|
230
|
-
|
|
231
|
-
- **Specs before code** - AI reads requirements, not just vibes
|
|
232
|
-
- **Non-linear workflow** - Commands execute in any order
|
|
233
|
-
- **Git-native** - Specs versioned like code
|
|
234
|
-
- **Multi-agent** - Works with 21+ AI tools
|
|
235
|
-
- **Zero dependencies** - No API keys, no external services
|
|
236
|
-
|
|
237
|
-
### Installation
|
|
238
|
-
|
|
239
|
-
**Auto-installation** (Recommended):
|
|
240
|
-
```bash
|
|
241
|
-
bunx forge setup
|
|
242
|
-
# Prompts: "Install OpenSpec? (y/n)"
|
|
243
|
-
# Automatically installs and initializes (if selected)
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
**Manual installation**:
|
|
247
|
-
```bash
|
|
248
|
-
# bun (global - requires Node.js 20.19+)
|
|
249
|
-
bun add -g @fission-ai/openspec
|
|
250
|
-
openspec init
|
|
251
|
-
|
|
252
|
-
# bun (local)
|
|
253
|
-
bun add -d @fission-ai/openspec
|
|
254
|
-
bunx openspec init
|
|
255
|
-
|
|
256
|
-
# Or with bunx (no install needed)
|
|
257
|
-
bunx @fission-ai/openspec init
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
### File Structure
|
|
261
|
-
|
|
262
|
-
After `openspec init`:
|
|
263
|
-
|
|
264
|
-
```
|
|
265
|
-
openspec/
|
|
266
|
-
├── specs/
|
|
267
|
-
│ └── [domain]/
|
|
268
|
-
│ └── spec.md # Source of truth for each domain
|
|
269
|
-
│
|
|
270
|
-
├── changes/
|
|
271
|
-
│ ├── [change-name]/
|
|
272
|
-
│ │ ├── proposal.md # Intent, scope, rationale
|
|
273
|
-
│ │ ├── design.md # Technical approach
|
|
274
|
-
│ │ ├── tasks.md # Implementation checklist
|
|
275
|
-
│ │ └── specs/
|
|
276
|
-
│ │ └── [domain]/
|
|
277
|
-
│ │ └── spec.md # Delta specifications
|
|
278
|
-
│ └── archive/ # Completed changes
|
|
279
|
-
│
|
|
280
|
-
├── schemas/
|
|
281
|
-
│ └── default.yaml # Workflow schema
|
|
282
|
-
│
|
|
283
|
-
└── config.yaml # Project configuration
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
### CLI Commands
|
|
287
|
-
|
|
288
|
-
```bash
|
|
289
|
-
# Setup
|
|
290
|
-
openspec init [path] # Initialize OpenSpec
|
|
291
|
-
openspec update # Update after CLI upgrade
|
|
292
|
-
|
|
293
|
-
# Browse
|
|
294
|
-
openspec list # Display changes/specs
|
|
295
|
-
openspec view # Interactive terminal dashboard
|
|
296
|
-
openspec show [name] # Show detailed content
|
|
297
|
-
openspec status # Artifact completion progress
|
|
298
|
-
|
|
299
|
-
# Validation
|
|
300
|
-
openspec validate [name] # Check structural integrity
|
|
301
|
-
openspec validate --strict # Strict validation
|
|
302
|
-
|
|
303
|
-
# Lifecycle
|
|
304
|
-
openspec sync # Merge delta specs into main specs
|
|
305
|
-
openspec archive [name] # Finalize completed changes
|
|
306
|
-
|
|
307
|
-
# Schema
|
|
308
|
-
openspec schema init # Create new schema
|
|
309
|
-
openspec schema fork # Fork existing schema
|
|
310
|
-
openspec schema validate # Validate schema
|
|
311
|
-
openspec schemas # List available schemas
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
### AI Slash Commands (Claude Code, Cursor)
|
|
315
|
-
|
|
316
|
-
```bash
|
|
317
|
-
/opsx:explore # Think through ideas, investigate
|
|
318
|
-
/opsx:new # Start a new change initiative
|
|
319
|
-
/opsx:continue # Create next artifact (incremental)
|
|
320
|
-
/opsx:ff # Fast-forward: generate all planning artifacts
|
|
321
|
-
/opsx:apply # Implement tasks
|
|
322
|
-
/opsx:sync # Merge delta specs into main specs
|
|
323
|
-
/opsx:archive # Mark change complete
|
|
324
|
-
/opsx:verify # Validate implementation matches specs
|
|
325
|
-
/opsx:onboard # Interactive tutorial
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
### Spec Format
|
|
329
|
-
|
|
330
|
-
OpenSpec uses structured markdown with normative language:
|
|
331
|
-
|
|
332
|
-
```markdown
|
|
333
|
-
# Authentication Specification
|
|
334
|
-
|
|
335
|
-
## Purpose
|
|
336
|
-
Enable secure user identity verification and session management
|
|
337
|
-
|
|
338
|
-
## Requirements
|
|
339
|
-
|
|
340
|
-
### Requirement: Session Token Validation
|
|
341
|
-
The system SHALL validate session tokens on every request
|
|
342
|
-
|
|
343
|
-
#### Scenario: Valid Session
|
|
344
|
-
- **GIVEN** user has authenticated
|
|
345
|
-
- **WHEN** request includes valid session token
|
|
346
|
-
- **THEN** process the request
|
|
347
|
-
- **AND** update token expiration time
|
|
348
|
-
|
|
349
|
-
#### Scenario: Expired Session
|
|
350
|
-
- **GIVEN** user had authenticated but 24 hours have passed
|
|
351
|
-
- **WHEN** request includes expired session token
|
|
352
|
-
- **THEN** invalidate the token
|
|
353
|
-
- **AND** redirect to login
|
|
354
|
-
```
|
|
355
|
-
|
|
356
|
-
### Delta Format
|
|
357
|
-
|
|
358
|
-
Changes use ADDED/MODIFIED/REMOVED notation:
|
|
359
|
-
|
|
360
|
-
```markdown
|
|
361
|
-
# Delta for Authentication
|
|
362
|
-
|
|
363
|
-
## ADDED Requirements
|
|
364
|
-
### Requirement: Two-Factor Authentication
|
|
365
|
-
The system SHALL support optional 2FA
|
|
366
|
-
|
|
367
|
-
#### Scenario: 2FA Enrollment
|
|
368
|
-
- **GIVEN** user enables 2FA in settings
|
|
369
|
-
- **WHEN** they scan QR code with authenticator app
|
|
370
|
-
- **THEN** 2FA is activated for their account
|
|
371
|
-
|
|
372
|
-
## MODIFIED Requirements
|
|
373
|
-
### Requirement: Session Token Validation
|
|
374
|
-
[Updated content here]
|
|
375
|
-
|
|
376
|
-
## REMOVED Requirements
|
|
377
|
-
### Requirement: Remember Me Cookie
|
|
378
|
-
```
|
|
379
|
-
|
|
380
|
-
### When to Use OpenSpec
|
|
381
|
-
|
|
382
|
-
| Scope | Use OpenSpec? | Example |
|
|
383
|
-
|-------|---------------|---------|
|
|
384
|
-
| **Tactical** (< 1 day) | No | Bug fix, small feature |
|
|
385
|
-
| **Strategic** (architecture) | Yes | New service, API redesign |
|
|
386
|
-
| **Breaking changes** | Yes | Schema migrations |
|
|
387
|
-
| **Multi-session work** | Yes | Large features |
|
|
388
|
-
|
|
389
|
-
### Workflow Example
|
|
390
|
-
|
|
391
|
-
```bash
|
|
392
|
-
# 1. Start new change
|
|
393
|
-
/opsx:new
|
|
394
|
-
# Describe: "Add payment processing with Stripe"
|
|
395
|
-
# Select schema: default
|
|
396
|
-
|
|
397
|
-
# 2. Generate all planning docs
|
|
398
|
-
/opsx:ff
|
|
399
|
-
# Creates: proposal.md, design.md, tasks.md, specs/
|
|
400
|
-
|
|
401
|
-
# 3. Implement
|
|
402
|
-
/opsx:apply
|
|
403
|
-
# AI writes code following tasks.md
|
|
404
|
-
|
|
405
|
-
# 4. Verify
|
|
406
|
-
/opsx:verify
|
|
407
|
-
# Confirms implementation matches specs
|
|
408
|
-
|
|
409
|
-
# 5. Finalize
|
|
410
|
-
/opsx:sync # Merge deltas into main specs
|
|
411
|
-
/opsx:archive # Move to archive
|
|
412
|
-
```
|
|
413
|
-
|
|
414
|
-
---
|
|
415
|
-
|
|
416
222
|
## MCP Servers
|
|
417
223
|
|
|
418
224
|
### Context7 - Library Documentation
|
|
@@ -710,7 +516,7 @@ volumes:
|
|
|
710
516
|
### GitHub CLI - PR Workflow
|
|
711
517
|
|
|
712
518
|
**Installation**: [cli.github.com](https://cli.github.com)
|
|
713
|
-
**Used in**: `/ship`, `/review`, `/
|
|
519
|
+
**Used in**: `/ship`, `/review`, `/premerge` stages
|
|
714
520
|
|
|
715
521
|
```bash
|
|
716
522
|
# Install
|
|
@@ -735,14 +541,14 @@ gh issue create --title "..." --body "..."
|
|
|
735
541
|
|
|
736
542
|
| Stage | Tools Used |
|
|
737
543
|
|-------|------------|
|
|
738
|
-
| `/status` | `bd ready`, `bd list`, `git status
|
|
544
|
+
| `/status` | `bd ready`, `bd list`, `git status` |
|
|
739
545
|
| `/plan` (Phase 2) | Parallel AI, Context7, grep.app, codebase exploration |
|
|
740
|
-
| `/plan` | `bd create`, `
|
|
546
|
+
| `/plan` | `bd create`, `git checkout -b` |
|
|
741
547
|
| `/dev` | Tests, code, `bd update`, `/tasks save` |
|
|
742
548
|
| `/validate` | Type check, lint, tests, SonarCloud |
|
|
743
549
|
| `/ship` | `bd update --status done`, `gh pr create` |
|
|
744
550
|
| `/review` | `gh pr view`, Greptile, SonarCloud |
|
|
745
|
-
| `/
|
|
551
|
+
| `/premerge` | `bd sync`, doc updates, hand off PR |
|
|
746
552
|
| `/verify` | Documentation cross-check |
|
|
747
553
|
|
|
748
554
|
---
|
|
@@ -762,17 +568,6 @@ bd close <id> # Complete
|
|
|
762
568
|
bd sync # Git sync
|
|
763
569
|
```
|
|
764
570
|
|
|
765
|
-
### OpenSpec (Specifications)
|
|
766
|
-
|
|
767
|
-
```bash
|
|
768
|
-
openspec init # Initialize
|
|
769
|
-
/opsx:new # Start change (AI)
|
|
770
|
-
/opsx:ff # Generate all docs (AI)
|
|
771
|
-
/opsx:apply # Implement (AI)
|
|
772
|
-
openspec validate <name> # Validate
|
|
773
|
-
openspec archive <name> # Complete
|
|
774
|
-
```
|
|
775
|
-
|
|
776
571
|
### GitHub CLI
|
|
777
572
|
|
|
778
573
|
```bash
|
|
@@ -816,19 +611,6 @@ bd sync --force
|
|
|
816
611
|
bd sync # Re-imports from JSONL
|
|
817
612
|
```
|
|
818
613
|
|
|
819
|
-
### OpenSpec
|
|
820
|
-
|
|
821
|
-
**"openspec: command not found"**
|
|
822
|
-
```bash
|
|
823
|
-
bun add -g @fission-ai/openspec
|
|
824
|
-
# Or use bunx @fission-ai/openspec <command>
|
|
825
|
-
```
|
|
826
|
-
|
|
827
|
-
**Validation errors**
|
|
828
|
-
```bash
|
|
829
|
-
openspec validate <name> --verbose
|
|
830
|
-
```
|
|
831
|
-
|
|
832
614
|
### GitHub CLI
|
|
833
615
|
|
|
834
616
|
**"gh: not authenticated"**
|
|
@@ -842,7 +624,6 @@ gh auth status
|
|
|
842
624
|
## Resources
|
|
843
625
|
|
|
844
626
|
- **Beads**: [github.com/steveyegge/beads](https://github.com/steveyegge/beads)
|
|
845
|
-
- **OpenSpec**: [openspec.dev](https://openspec.dev) | [github.com/Fission-AI/OpenSpec](https://github.com/Fission-AI/OpenSpec)
|
|
846
627
|
- **Parallel AI**: [platform.parallel.ai](https://platform.parallel.ai)
|
|
847
628
|
- **Greptile**: [greptile.com](https://greptile.com)
|
|
848
629
|
- **SonarCloud**: [sonarcloud.io](https://sonarcloud.io)
|