forge-workflow 0.0.1

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 (105) hide show
  1. package/.claude/commands/dev.md +314 -0
  2. package/.claude/commands/plan.md +389 -0
  3. package/.claude/commands/premerge.md +179 -0
  4. package/.claude/commands/research.md +42 -0
  5. package/.claude/commands/review.md +442 -0
  6. package/.claude/commands/rollback.md +721 -0
  7. package/.claude/commands/ship.md +134 -0
  8. package/.claude/commands/sonarcloud.md +152 -0
  9. package/.claude/commands/status.md +77 -0
  10. package/.claude/commands/validate.md +237 -0
  11. package/.claude/commands/verify.md +221 -0
  12. package/.claude/rules/greptile-review-process.md +285 -0
  13. package/.claude/rules/workflow.md +105 -0
  14. package/.claude/scripts/greptile-resolve.sh +526 -0
  15. package/.claude/scripts/load-env.sh +32 -0
  16. package/.forge/hooks/check-tdd.js +240 -0
  17. package/.github/PLUGIN_TEMPLATE.json +32 -0
  18. package/.mcp.json.example +12 -0
  19. package/AGENTS.md +169 -0
  20. package/CLAUDE.md +99 -0
  21. package/LICENSE +21 -0
  22. package/README.md +414 -0
  23. package/bin/forge-cmd.js +313 -0
  24. package/bin/forge-validate.js +303 -0
  25. package/bin/forge.js +4228 -0
  26. package/docs/AGENT_INSTALL_PROMPT.md +342 -0
  27. package/docs/ENHANCED_ONBOARDING.md +602 -0
  28. package/docs/EXAMPLES.md +482 -0
  29. package/docs/GREPTILE_SETUP.md +400 -0
  30. package/docs/MANUAL_REVIEW_GUIDE.md +106 -0
  31. package/docs/ROADMAP.md +359 -0
  32. package/docs/SETUP.md +632 -0
  33. package/docs/TOOLCHAIN.md +849 -0
  34. package/docs/VALIDATION.md +363 -0
  35. package/docs/WORKFLOW.md +400 -0
  36. package/docs/planning/PROGRESS.md +396 -0
  37. package/docs/plans/.gitkeep +0 -0
  38. package/docs/plans/2026-02-27-forge-test-suite-v2-decisions.md +21 -0
  39. package/docs/plans/2026-02-27-forge-test-suite-v2-design.md +362 -0
  40. package/docs/plans/2026-02-27-forge-test-suite-v2-tasks.md +343 -0
  41. package/docs/plans/2026-03-02-superpowers-gaps-decisions.md +26 -0
  42. package/docs/plans/2026-03-02-superpowers-gaps-design.md +239 -0
  43. package/docs/plans/2026-03-02-superpowers-gaps-tasks.md +260 -0
  44. package/docs/plans/2026-03-04-agent-command-parity-design.md +163 -0
  45. package/docs/plans/2026-03-04-verify-worktree-cleanup-decisions.md +7 -0
  46. package/docs/plans/2026-03-04-verify-worktree-cleanup-design.md +165 -0
  47. package/docs/plans/2026-03-05-forge-uto-decisions.md +6 -0
  48. package/docs/plans/2026-03-05-forge-uto-design.md +116 -0
  49. package/docs/plans/2026-03-05-forge-uto-tasks.md +244 -0
  50. package/docs/plans/2026-03-10-command-creator-and-eval-decisions.md +52 -0
  51. package/docs/plans/2026-03-10-command-creator-and-eval-design.md +350 -0
  52. package/docs/plans/2026-03-10-command-creator-and-eval-tasks.md +426 -0
  53. package/docs/plans/2026-03-10-stale-workflow-refs-decisions.md +8 -0
  54. package/docs/plans/2026-03-10-stale-workflow-refs-design.md +80 -0
  55. package/docs/plans/2026-03-10-stale-workflow-refs-tasks.md +90 -0
  56. package/docs/plans/2026-03-14-beads-plan-context-decisions.md +9 -0
  57. package/docs/plans/2026-03-14-beads-plan-context-design.md +171 -0
  58. package/docs/plans/2026-03-14-beads-plan-context-tasks.md +160 -0
  59. package/docs/plans/2026-03-14-skill-eval-loop-decisions.md +33 -0
  60. package/docs/plans/2026-03-14-skill-eval-loop-design.md +118 -0
  61. package/docs/plans/2026-03-14-skill-eval-loop-results.md +78 -0
  62. package/docs/plans/2026-03-14-skill-eval-loop-tasks.md +160 -0
  63. package/docs/plans/2026-03-15-agent-command-parity-v2-decisions.md +11 -0
  64. package/docs/plans/2026-03-15-agent-command-parity-v2-design.md +145 -0
  65. package/docs/plans/2026-03-15-agent-command-parity-v2-tasks.md +211 -0
  66. package/docs/research/TEMPLATE.md +292 -0
  67. package/docs/research/advanced-testing.md +297 -0
  68. package/docs/research/agent-permissions.md +167 -0
  69. package/docs/research/dependency-chain.md +328 -0
  70. package/docs/research/forge-workflow-v2.md +550 -0
  71. package/docs/research/plugin-architecture.md +772 -0
  72. package/docs/research/pr4-cli-automation.md +326 -0
  73. package/docs/research/premerge-verify-restructure.md +205 -0
  74. package/docs/research/skills-restructure.md +508 -0
  75. package/docs/research/sonarcloud-perfection-plan.md +166 -0
  76. package/docs/research/sonarcloud-quality-gate.md +184 -0
  77. package/docs/research/superpowers-integration.md +403 -0
  78. package/docs/research/superpowers.md +319 -0
  79. package/docs/research/test-environment.md +519 -0
  80. package/install.sh +1062 -0
  81. package/lefthook.yml +39 -0
  82. package/lib/agents/README.md +198 -0
  83. package/lib/agents/claude.plugin.json +28 -0
  84. package/lib/agents/cline.plugin.json +22 -0
  85. package/lib/agents/codex.plugin.json +19 -0
  86. package/lib/agents/copilot.plugin.json +24 -0
  87. package/lib/agents/cursor.plugin.json +25 -0
  88. package/lib/agents/kilocode.plugin.json +22 -0
  89. package/lib/agents/opencode.plugin.json +20 -0
  90. package/lib/agents/roo.plugin.json +23 -0
  91. package/lib/agents-config.js +2112 -0
  92. package/lib/commands/dev.js +513 -0
  93. package/lib/commands/plan.js +696 -0
  94. package/lib/commands/recommend.js +119 -0
  95. package/lib/commands/ship.js +377 -0
  96. package/lib/commands/status.js +378 -0
  97. package/lib/commands/validate.js +602 -0
  98. package/lib/context-merge.js +359 -0
  99. package/lib/plugin-catalog.js +360 -0
  100. package/lib/plugin-manager.js +166 -0
  101. package/lib/plugin-recommender.js +141 -0
  102. package/lib/project-discovery.js +491 -0
  103. package/lib/setup.js +118 -0
  104. package/lib/workflow-profiles.js +203 -0
  105. package/package.json +115 -0
@@ -0,0 +1,116 @@
1
+ # Design Doc: forge-uto — Agent Config Cleanup + Codex CLI
2
+
3
+ - **Feature**: forge-uto
4
+ - **Date**: 2026-03-05
5
+ - **Status**: approved
6
+ - **Beads**: forge-uto
7
+
8
+ ---
9
+
10
+ ## Purpose
11
+
12
+ Reduce maintenance surface and improve correctness of the forge setup CLI:
13
+
14
+ 1. `CLAUDE.md` currently duplicates `AGENTS.md` content — make it a symlink so Claude Code reads the single source of truth
15
+ 2. Google Antigravity is no longer a supported agent — remove all traces to avoid misleading users
16
+ 3. Aider requires complex, non-universal setup — drop plugin and setup logic
17
+ 4. OpenSpec is no longer part of the forge workflow — remove from setup CLI entirely
18
+ 5. Codex CLI is a supported agent that lacks a plugin — add it
19
+ 6. OpenCode plugin exists but has issues — fix it
20
+ 7. Stage listing in `bin/forge.js` says 9-stage (with `/research`) — update to current 7-stage
21
+
22
+ ---
23
+
24
+ ## Success Criteria
25
+
26
+ - `CLAUDE.md` is a symlink pointing to `AGENTS.md` at repo root
27
+ - `GEMINI.md` is deleted; no Antigravity references remain in `.clinerules`, `.windsurfrules`, `docs/SETUP.md`, `lib/agents/`
28
+ - `lib/agents/aider.plugin.json` is deleted; `setupAiderAgent()` and `customSetup === 'aider'` branch are removed from `bin/forge.js`
29
+ - `promptOpenSpecSetup()`, `checkForOpenSpec()`, `initializeOpenSpec()`, `isOpenSpecInitialized()` are removed from `bin/forge.js`; all call sites removed
30
+ - `openspecInstallType` field removed from project status object
31
+ - Stage listing in `bin/forge.js` updated from 9-stage to 7-stage (remove `/research` row and references)
32
+ - `lib/agents/codex.plugin.json` exists with correct directories for AGENTS.md + `.codex/config.toml`
33
+ - OpenCode plugin is verified correct and any issues fixed
34
+ - `bun test` passes (0 failures)
35
+
36
+ ---
37
+
38
+ ## Out of Scope
39
+
40
+ - Adding any new agents beyond Codex
41
+ - Changing the content of `AGENTS.md`
42
+ - Modifying the workflow stage commands themselves
43
+ - Migrating existing user projects that have Antigravity or Aider set up
44
+
45
+ ---
46
+
47
+ ## Approach Selected
48
+
49
+ **Direct surgical edits** to `bin/forge.js` + plugin files. No abstraction changes.
50
+
51
+ - CLAUDE.md symlink: created by `bin/forge.js` setup (not pre-committed to repo, since it's generated per-project). The existing setup already handles CLAUDE.md creation — change the logic to create a symlink to AGENTS.md instead of copying content.
52
+ - Removals: delete plugin JSONs, remove function definitions and all call sites
53
+ - Codex plugin: new `lib/agents/codex.plugin.json` following existing plugin schema
54
+
55
+ ---
56
+
57
+ ## Constraints
58
+
59
+ - `bin/forge.js` has strict ESLint with `--max-warnings 0` — no unused vars after removal
60
+ - Unused parameters must be prefixed with `_`
61
+ - Pre-push hooks run full test suite — all tests must pass before push
62
+
63
+ ---
64
+
65
+ ## Edge Cases
66
+
67
+ - **Symlink on Windows**: `fs.symlinkSync` requires Developer Mode or admin on Windows. The setup CLI should catch `EPERM` and fall back to a redirect stub with a clear warning message.
68
+ - **Existing CLAUDE.md**: If a project already has a CLAUDE.md with custom content, the setup should detect it and ask before overwriting with a symlink (current merge/keep logic already handles this).
69
+ - **OpenSpec references in status display**: Lines 2486–2491 in `bin/forge.js` display OpenSpec status at setup end — these must also be removed.
70
+ - **`openspecInstallType` in project status object**: Field at line 811 references `checkForOpenSpec()` — must be removed alongside the function.
71
+ - **Line 3525**: Additional `openspecStatus` reference — must be removed.
72
+
73
+ ---
74
+
75
+ ## Ambiguity Policy
76
+
77
+ Use the 7-dimension decision gate rubric. If a decision scores ambiguous mid-dev, pause and ask.
78
+
79
+ ---
80
+
81
+ ## Technical Research
82
+
83
+ ### DRY Check
84
+
85
+ - Symlink creation: `fs.symlinkSync` already used at `bin/forge.js:589` — extend that pattern
86
+ - Plugin JSON schema: established pattern in `lib/agents/` — codex plugin follows same structure
87
+ - OpenSpec removal: 4 functions (`checkForOpenSpec`, `initializeOpenSpec`, `isOpenSpecInitialized`, `promptOpenSpecSetup`) + call sites at lines 808, 811, 2486–2491, 3438, 3525
88
+
89
+ ### OpenCode Issues Found
90
+
91
+ The current `opencode.plugin.json` homepage is `https://github.com/opencode` — incorrect URL. The real project is at `https://opencode.ai`. This is a cosmetic issue but should be fixed. No structural issues found with directories or setup logic.
92
+
93
+ ### Codex CLI Config
94
+
95
+ - Instructions: `AGENTS.md` at repo root (already exists in forge projects)
96
+ - Tool config: `.codex/config.toml` (per-project) or `~/.codex/config.toml` (user-level)
97
+ - Plugin needs: `rootConfig` pointing to AGENTS.md (already installed by forge setup), optional `.codex/` directory setup
98
+
99
+ ### OWASP Top 10 Analysis
100
+
101
+ | Risk | Applies? | Mitigation |
102
+ |------|----------|------------|
103
+ | A01 Broken Access Control | No | No auth changes |
104
+ | A02 Cryptographic Failures | No | No crypto |
105
+ | A03 Injection | Low | `bin/forge.js` uses `secureExecFileSync` — existing pattern maintained; no new exec calls added |
106
+ | A04 Insecure Design | No | Removing complexity, not adding |
107
+ | A05 Security Misconfiguration | Low | Symlink creation — handle EPERM gracefully, don't silently fail |
108
+ | A06–A10 | No | Not applicable to CLI config file changes |
109
+
110
+ ### TDD Test Scenarios
111
+
112
+ 1. **Happy path — Codex plugin loads**: `forge setup` with Codex selected → `lib/agents/codex.plugin.json` is read by plugin loader → Codex directories are created
113
+ 2. **OpenSpec removed — setup completes without prompt**: Running setup flow does not call `promptOpenSpecSetup` or display OpenSpec install prompt
114
+ 3. **Antigravity absent — plugin loader ignores deleted file**: No `antigravity.plugin.json` → plugin loader does not attempt Antigravity setup
115
+ 4. **Aider absent — no `.aider.conf.yml` created**: No `aider.plugin.json`, no `customSetup === 'aider'` branch → Aider setup never runs
116
+ 5. **CLAUDE.md symlink**: On supported filesystem, `forge setup` creates `CLAUDE.md` as symlink → `fs.lstatSync('CLAUDE.md').isSymbolicLink() === true`
@@ -0,0 +1,244 @@
1
+ # Task List: forge-uto — Agent Config Cleanup + Codex CLI
2
+
3
+ - **Feature**: forge-uto
4
+ - **Date**: 2026-03-05
5
+ - **Design doc**: docs/plans/2026-03-05-forge-uto-design.md
6
+ - **Beads**: forge-uto
7
+
8
+ ---
9
+
10
+ ## Task 1: Remove Antigravity plugin + files
11
+ **File(s)**:
12
+ - `lib/agents/antigravity.plugin.json` (delete)
13
+ - `GEMINI.md` (delete)
14
+ - `.agent/` directory (delete)
15
+
16
+ **What to implement**:
17
+ Delete the Antigravity plugin JSON, the GEMINI.md root config, and the entire `.agent/` directory tree. These contain Antigravity-specific workflows, rules, and skills that are no longer supported.
18
+
19
+ **TDD steps**:
20
+ 1. Write test in `test/agent-detection.test.js`: assert that `lib/agents/antigravity.plugin.json` does not exist (file system check) and that loading the plugin list does not include `antigravity`
21
+ 2. Run test: confirm it fails — plugin file exists
22
+ 3. Delete `lib/agents/antigravity.plugin.json`, `GEMINI.md`, `.agent/`
23
+ 4. Run test: confirm it passes
24
+ 5. Commit: `feat: remove Antigravity plugin and files`
25
+
26
+ **Expected output**: No Antigravity plugin file, no GEMINI.md, no `.agent/` directory.
27
+
28
+ ---
29
+
30
+ ## Task 2: Remove Windsurf plugin + files
31
+ **File(s)**:
32
+ - `lib/agents/windsurf.plugin.json` (delete)
33
+ - `.windsurfrules` (delete)
34
+ - `.windsurf/` directory (delete)
35
+
36
+ **What to implement**:
37
+ Delete the Windsurf plugin JSON, the `.windsurfrules` root config file, and the `.windsurf/` directory. Windsurf has been deprecated in favour of Antigravity (now also dropped).
38
+
39
+ **TDD steps**:
40
+ 1. Write test: assert `lib/agents/windsurf.plugin.json` does not exist and plugin list does not include `windsurf`
41
+ 2. Run test: confirm it fails — plugin file exists
42
+ 3. Delete `lib/agents/windsurf.plugin.json`, `.windsurfrules`, `.windsurf/`
43
+ 4. Run test: confirm it passes
44
+ 5. Commit: `feat: remove Windsurf plugin and files`
45
+
46
+ **Expected output**: No Windsurf plugin file, no `.windsurfrules`, no `.windsurf/` directory.
47
+
48
+ ---
49
+
50
+ ## Task 3: Remove Aider plugin + setup logic from bin/forge.js
51
+ **File(s)**:
52
+ - `lib/agents/aider.plugin.json` (delete)
53
+ - `bin/forge.js` (remove `setupAiderAgent()` function at ~line 1938 and `customSetup === 'aider'` branch at ~line 2100)
54
+ - `test/other-agents-config-generation.test.js` (remove Aider tests)
55
+ - `test/agent-detection.test.js` (remove Aider detection tests)
56
+
57
+ **What to implement**:
58
+ Delete the Aider plugin JSON. Remove `setupAiderAgent()` function definition from `bin/forge.js`. Remove the `if (agent.customSetup === 'aider') { setupAiderAgent(); }` branch. Remove all Aider tests from test files.
59
+
60
+ **TDD steps**:
61
+ 1. Write test: assert `lib/agents/aider.plugin.json` does not exist and setup flow never creates `.aider.conf.yml`
62
+ 2. Run test: confirm it fails — plugin and setup logic exist
63
+ 3. Delete plugin file; remove function + call site from `bin/forge.js`; remove Aider tests
64
+ 4. Run test + `bun run lint`: confirm passes with 0 ESLint warnings
65
+ 5. Commit: `feat: drop Aider support — remove plugin and setup logic`
66
+
67
+ **Expected output**: No Aider plugin, no `.aider.conf.yml` created, no Aider references in setup flow.
68
+
69
+ ---
70
+
71
+ ## Task 4: Remove OpenSpec from bin/forge.js
72
+ **File(s)**:
73
+ - `bin/forge.js` (remove 4 functions + all call sites)
74
+
75
+ **What to implement**:
76
+ Remove these 4 functions entirely from `bin/forge.js`:
77
+ - `checkForOpenSpec()` (~line 2972)
78
+ - `isOpenSpecInitialized()` (~line 3011)
79
+ - `initializeOpenSpec()` (~line 3038)
80
+ - `promptOpenSpecSetup()` (~line 3244)
81
+
82
+ Also remove all call sites:
83
+ - `openspecInstallType: checkForOpenSpec()` in project status object (~line 811)
84
+ - `hasOpenSpec: isOpenSpecInitialized()` (~line 808)
85
+ - OpenSpec status display block (~lines 2485–2491)
86
+ - `await promptOpenSpecSetup(question)` (~line 3438)
87
+ - `const openspecStatus = checkForOpenSpec()` + `if (openspecStatus && !isOpenSpecInitialized())` block (~lines 3524–3529)
88
+ - Stage listing line: `| 3 | \`/plan\` | Create implementation plan, branch, OpenSpec if strategic |` (~line 442) — update to remove OpenSpec mention
89
+
90
+ **TDD steps**:
91
+ 1. Write test: `grep` the compiled/source `bin/forge.js` and assert strings `promptOpenSpecSetup`, `checkForOpenSpec`, `initializeOpenSpec`, `isOpenSpecInitialized` are absent
92
+ 2. Run test: confirm it fails — functions exist
93
+ 3. Remove all 4 functions and call sites from `bin/forge.js`
94
+ 4. Run test + `bun run lint`: 0 errors, 0 warnings
95
+ 5. Commit: `feat: remove OpenSpec from setup CLI`
96
+
97
+ **Expected output**: `bin/forge.js` has no OpenSpec logic. `bun run lint` passes clean.
98
+
99
+ ---
100
+
101
+ ## Task 5: Update 9-stage → 7-stage listing in bin/forge.js
102
+ **File(s)**:
103
+ - `bin/forge.js` (~line 418 and surrounding stage table)
104
+
105
+ **What to implement**:
106
+ Find the description string `"9-stage TDD-first workflow"` at ~line 418 and any inline stage listing table that shows 9 stages (including the old `/research` stage). Update to say `"7-stage TDD-first workflow"` and align the stage table with the current 7 stages: `/plan`, `/dev`, `/validate`, `/ship`, `/review`, `/premerge`, `/verify`.
107
+
108
+ **TDD steps**:
109
+ 1. Write test: parse `bin/forge.js` source and assert the string `9-stage` is absent and `7-stage` is present
110
+ 2. Run test: confirm it fails — `9-stage` string exists
111
+ 3. Update the description string and stage table
112
+ 4. Run test: confirm passes
113
+ 5. Commit: `docs: update stage count from 9 to 7 in forge setup description`
114
+
115
+ **Expected output**: `bin/forge.js` says `7-stage`, stage table matches current workflow.
116
+
117
+ ---
118
+
119
+ ## Task 6: Add Codex CLI plugin
120
+ **File(s)**:
121
+ - `lib/agents/codex.plugin.json` (create)
122
+
123
+ **What to implement**:
124
+ Create a new plugin JSON for Codex CLI following the established schema. Codex uses `AGENTS.md` for instructions (already installed by forge setup — no extra step needed) and `.codex/config.toml` for tool config.
125
+
126
+ Plugin JSON structure:
127
+ ```json
128
+ {
129
+ "id": "codex",
130
+ "name": "OpenAI Codex CLI",
131
+ "version": "1.0.0",
132
+ "description": "OpenAI's terminal coding agent",
133
+ "homepage": "https://github.com/openai/codex",
134
+ "capabilities": {
135
+ "commands": false,
136
+ "skills": false,
137
+ "hooks": false
138
+ },
139
+ "directories": {},
140
+ "files": {
141
+ "rootConfig": "AGENTS.md"
142
+ },
143
+ "setup": {
144
+ "copyRules": false,
145
+ "createSkill": false
146
+ }
147
+ }
148
+ ```
149
+
150
+ **TDD steps**:
151
+ 1. Write test: assert `lib/agents/codex.plugin.json` exists and parses as valid JSON with `id === "codex"` and `files.rootConfig === "AGENTS.md"`
152
+ 2. Run test: confirm it fails — file does not exist
153
+ 3. Create `lib/agents/codex.plugin.json`
154
+ 4. Run test: confirm passes
155
+ 5. Commit: `feat: add Codex CLI agent plugin`
156
+
157
+ **Expected output**: `lib/agents/codex.plugin.json` exists with correct schema.
158
+
159
+ ---
160
+
161
+ ## Task 7: Fix OpenCode plugin homepage URL
162
+ **File(s)**:
163
+ - `lib/agents/opencode.plugin.json`
164
+
165
+ **What to implement**:
166
+ Fix the incorrect `homepage` field. Current value: `"https://github.com/opencode"` (does not exist). Correct value: `"https://opencode.ai"`.
167
+
168
+ **TDD steps**:
169
+ 1. Write test: parse `lib/agents/opencode.plugin.json` and assert `homepage` does not contain `github.com/opencode` and equals `https://opencode.ai`
170
+ 2. Run test: confirm it fails — wrong URL exists
171
+ 3. Update the `homepage` field in `lib/agents/opencode.plugin.json`
172
+ 4. Run test: confirm passes
173
+ 5. Commit: `fix: correct OpenCode plugin homepage URL`
174
+
175
+ **Expected output**: `lib/agents/opencode.plugin.json` has `homepage: "https://opencode.ai"`.
176
+
177
+ ---
178
+
179
+ ## Task 8: Make CLAUDE.md a symlink to AGENTS.md in setup flow
180
+ **File(s)**:
181
+ - `bin/forge.js` (modify `_createClaudeReference()` → replace write with symlink, handle EPERM gracefully)
182
+
183
+ **What to implement**:
184
+ The function `_createClaudeReference()` at ~line 1486 currently writes a stub text file. Replace it with symlink creation:
185
+ 1. Use `fs.symlinkSync('AGENTS.md', destPath)` (relative target, so symlink points to sibling AGENTS.md)
186
+ 2. Catch `EPERM` (Windows without Developer Mode) — fall back to writing the stub with a console warning
187
+ 3. Remove `@private - Currently unused` comment — this function should now be wired into the active setup flow
188
+
189
+ Also wire it: where `createClaudeMd: true` is set in `createInstructionFilesResult` flows, ensure `_createClaudeReference()` (renamed to `createClaudeSymlink()`) is called rather than creating a full copy.
190
+
191
+ **TDD steps**:
192
+ 1. Write test: mock `fs.symlinkSync` to succeed → assert `createClaudeSymlink(destPath)` calls `symlinkSync('AGENTS.md', destPath)`; second test: mock `symlinkSync` to throw `EPERM` → assert fallback stub file is written and warning is logged
193
+ 2. Run tests: confirm they fail — function doesn't exist yet
194
+ 3. Rename `_createClaudeReference` to `createClaudeSymlink`, replace body, add EPERM catch
195
+ 4. Run tests: confirm passes
196
+ 5. Commit: `feat: CLAUDE.md created as symlink to AGENTS.md`
197
+
198
+ **Expected output**: On supported filesystems, `CLAUDE.md` is a symlink pointing to `AGENTS.md`. On EPERM, a redirect stub is written with a warning.
199
+
200
+ ---
201
+
202
+ ## Task 9: Clean up doc references (clinerules, windsurfrules, SETUP.md)
203
+ **File(s)**:
204
+ - `.clinerules` (remove Antigravity row, Windsurf row, Aider row from agent table; remove GEMINI.md, `.agent/`, `.windsurf/` from directory tree)
205
+ - `.windsurfrules` — **delete entirely** (Windsurf dropped)
206
+ - `docs/SETUP.md` (remove `### Google Antigravity`, `### Windsurf`, Aider mention in `### Kilo Code, OpenCode...` heading; remove directory tree entries)
207
+ - `docs/TOOLCHAIN.md` if it has Antigravity/Windsurf/Aider references
208
+
209
+ **What to implement**:
210
+ Pure doc cleanup — remove all references to dropped agents from rule files and documentation. Update agent support tables to reflect current supported agents only.
211
+
212
+ **TDD steps**:
213
+ 1. Write test: `grep` `.clinerules` and `docs/SETUP.md` for strings `Antigravity`, `Windsurf`, `GEMINI.md`, `aider` — assert none found
214
+ 2. Run test: confirm fails — references exist
215
+ 3. Edit all files to remove dropped agent references
216
+ 4. Run test: confirm passes
217
+ 5. Commit: `docs: remove Antigravity, Windsurf, Aider references from docs`
218
+
219
+ **Expected output**: No dropped agent references in any doc file. `.windsurfrules` deleted.
220
+
221
+ ---
222
+
223
+ ## Task 10: Update tests — remove deleted agent test coverage, add Codex test
224
+ **File(s)**:
225
+ - `test/agent-detection.test.js`
226
+ - `test/other-agents-config-generation.test.js`
227
+ - `test/cli/forge.test.js`
228
+ - `test/cross-platform-install.test.js`
229
+ - `test/e2e/setup-workflow.test.js`
230
+
231
+ **What to implement**:
232
+ - Remove any remaining test cases that reference Antigravity, Windsurf, or Aider (Tasks 1–3 may have done this partially — verify none remain)
233
+ - Remove any `openspec`-related test cases
234
+ - Add a test that `lib/agents/codex.plugin.json` loads correctly in the plugin registry
235
+ - Verify `bun test` reports 0 failures
236
+
237
+ **TDD steps**:
238
+ 1. Write test: load all plugin JSONs from `lib/agents/` — assert `codex` is present, `antigravity`/`windsurf`/`aider` are absent
239
+ 2. Run test: confirm it fails — codex missing, others present
240
+ 3. Clean up remaining stale tests across all affected files
241
+ 4. Run `bun test`: 0 failures
242
+ 5. Commit: `test: update agent test suite for removed and added agents`
243
+
244
+ **Expected output**: `bun test` passes with 0 failures. No stale tests for dropped agents.
@@ -0,0 +1,52 @@
1
+ # Decisions Log: Command Creator & Eval
2
+
3
+ - **Feature**: command-creator-and-eval
4
+ - **Date**: 2026-03-14
5
+ - **Task list**: docs/plans/2026-03-10-command-creator-and-eval-tasks.md
6
+ - **Design doc**: docs/plans/2026-03-10-command-creator-and-eval-design.md
7
+
8
+ ---
9
+
10
+ <!-- Decisions will be logged below as they arise during /dev -->
11
+
12
+ ## Decision: Skip agnix integration (Task 7)
13
+
14
+ **Date**: 2026-03-14
15
+ **Decision**: SKIP -- agnix does not provide sufficient value beyond our existing structural tests.
16
+
17
+ ### Evaluation Summary
18
+
19
+ Ran `npx agnix@0.16.1 . --format json` against the repo.
20
+
21
+ **Results**: 228 diagnostics (26 errors, 196 warnings, 6 info) across 128 files checked.
22
+
23
+ ### Rule Breakdown
24
+
25
+ | Count | Rule | Level | Assessment |
26
+ |-------|------|-------|------------|
27
+ | 161 | XP-003 (cross-platform) | warning | **False positive.** Flags `.claude/` paths as portability issues. This is the standard Claude Code directory -- by design, not a bug. |
28
+ | 16 | AS-010 (agent-skills) | warning | **Not applicable.** Wants "Use when..." trigger phrases in `.codex/skills/` SKILL.md frontmatter. Codex-specific formatting. |
29
+ | 11 | AS-002 (agent-skills) | error | **Not applicable.** Missing `name` field in `.codex/skills/` frontmatter. Codex skills follow a different spec than the universal agent skills spec agnix expects. |
30
+ | 7 | XML-003 (xml) | error | **False positive.** Flags `</HARD-GATE>` as unmatched XML. This is intentional prompt engineering markup in markdown, not XML. |
31
+ | 5 | XP-SK-001 (cross-platform) | info | Noise. Client-specific frontmatter fields. |
32
+ | 4 | CDX-AG-005 (codex) | warning | Codex-specific formatting suggestions. |
33
+ | 3 | REF-002 (references) | error | **Partially valid.** Broken links in `.codex/skills/rollback/SKILL.md`. But our existing `command-files.test.js` already covers dead reference checks for `.claude/commands/`. |
34
+ | 3 | PE-001 (prompt-engineering) | warning | Subjective. "Critical keyword in lost-in-the-middle zone." |
35
+ | 18 | Various | mixed | Legacy `.cursorrules` warning, AGENTS.md duplicate (test fixture), misc. |
36
+
37
+ ### Why SKIP
38
+
39
+ 1. **70% false positives**: 161 of 228 diagnostics are XP-003 warnings about `.claude/` paths. These are not portability issues -- `.claude/` is the standard Claude Code directory structure.
40
+ 2. **XML false positives**: The 7 XML-003 errors about `<HARD-GATE>` are false positives. `HARD-GATE` is intentional prompt engineering markup, not XML.
41
+ 3. **Existing coverage**: Our structural tests (`command-files.test.js`, `command-contracts.test.js`, `command-sync.test.js`) already cover dead references, contract validation, and sync drift -- the categories where agnix has some valid findings.
42
+ 4. **Suppression burden**: Integrating agnix would require suppressing 200+ false positives to surface 3-5 genuinely useful findings. The maintenance cost exceeds the value.
43
+ 5. **No Forge-specific checks**: agnix checks generic multi-agent patterns but does not understand Forge's 7-stage workflow, HARD-GATE semantics, or command contract structure.
44
+
45
+ ### What agnix IS good at (for other projects)
46
+
47
+ - Detecting broken markdown links across agent config files
48
+ - Checking agent skill frontmatter against universal spec
49
+ - Cross-platform portability analysis for repos targeting multiple AI tools
50
+ - Prompt engineering anti-patterns (lost-in-the-middle, ambiguous terms)
51
+
52
+ For Forge specifically, these checks either don't apply or are already covered by custom structural tests that understand our domain.