forge-workflow 0.0.3 → 0.0.4

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 (83) hide show
  1. package/.claude/commands/dev.md +26 -0
  2. package/.claude/commands/plan.md +48 -5
  3. package/.claude/commands/premerge.md +0 -3
  4. package/.claude/commands/rollback.md +4 -4
  5. package/.claude/commands/ship.md +71 -41
  6. package/.claude/commands/status.md +9 -38
  7. package/.claude/commands/validate.md +47 -2
  8. package/.cline/workflows/dev.md +26 -0
  9. package/.cline/workflows/plan.md +48 -5
  10. package/.cline/workflows/premerge.md +0 -3
  11. package/.cline/workflows/rollback.md +4 -4
  12. package/.cline/workflows/ship.md +71 -41
  13. package/.cline/workflows/status.md +9 -38
  14. package/.cline/workflows/validate.md +47 -2
  15. package/.codex/skills/dev/SKILL.md +26 -0
  16. package/.codex/skills/plan/SKILL.md +48 -5
  17. package/.codex/skills/premerge/SKILL.md +0 -3
  18. package/.codex/skills/rollback/SKILL.md +4 -4
  19. package/.codex/skills/ship/SKILL.md +71 -41
  20. package/.codex/skills/status/SKILL.md +9 -38
  21. package/.codex/skills/validate/SKILL.md +47 -2
  22. package/.cursor/commands/dev.md +26 -0
  23. package/.cursor/commands/plan.md +48 -5
  24. package/.cursor/commands/premerge.md +0 -3
  25. package/.cursor/commands/rollback.md +4 -4
  26. package/.cursor/commands/ship.md +71 -41
  27. package/.cursor/commands/status.md +9 -38
  28. package/.cursor/commands/validate.md +47 -2
  29. package/.cursor/hooks/state/continual-learning-index.json +19 -0
  30. package/.cursor/hooks/state/continual-learning.json +8 -0
  31. package/.github/prompts/dev.prompt.md +26 -0
  32. package/.github/prompts/plan.prompt.md +48 -5
  33. package/.github/prompts/premerge.prompt.md +0 -3
  34. package/.github/prompts/rollback.prompt.md +4 -4
  35. package/.github/prompts/ship.prompt.md +71 -41
  36. package/.github/prompts/status.prompt.md +9 -38
  37. package/.github/prompts/validate.prompt.md +47 -2
  38. package/.kilocode/workflows/dev.md +26 -0
  39. package/.kilocode/workflows/plan.md +48 -5
  40. package/.kilocode/workflows/premerge.md +0 -3
  41. package/.kilocode/workflows/rollback.md +4 -4
  42. package/.kilocode/workflows/ship.md +71 -41
  43. package/.kilocode/workflows/status.md +9 -38
  44. package/.kilocode/workflows/validate.md +47 -2
  45. package/.opencode/commands/dev.md +26 -0
  46. package/.opencode/commands/plan.md +48 -5
  47. package/.opencode/commands/premerge.md +0 -3
  48. package/.opencode/commands/rollback.md +4 -4
  49. package/.opencode/commands/ship.md +71 -41
  50. package/.opencode/commands/status.md +9 -38
  51. package/.opencode/commands/validate.md +47 -2
  52. package/.roo/commands/dev.md +26 -0
  53. package/.roo/commands/plan.md +48 -5
  54. package/.roo/commands/premerge.md +0 -3
  55. package/.roo/commands/rollback.md +4 -4
  56. package/.roo/commands/ship.md +71 -41
  57. package/.roo/commands/status.md +9 -38
  58. package/.roo/commands/validate.md +47 -2
  59. package/AGENTS.md +7 -1
  60. package/CLAUDE.md +5 -4
  61. package/LICENSE +21 -21
  62. package/README.md +21 -19
  63. package/bin/{forge-validate.js → forge-preflight.js} +21 -15
  64. package/bin/forge.js +209 -138
  65. package/docs/AGENT_INSTALL_PROMPT.md +1 -1
  66. package/docs/BEADS_GITHUB_SYNC.md +251 -0
  67. package/docs/ENHANCED_ONBOARDING.md +6 -6
  68. package/docs/EXAMPLES.md +4 -4
  69. package/docs/GREPTILE_SETUP.md +1 -1
  70. package/docs/MANUAL_REVIEW_GUIDE.md +1 -1
  71. package/docs/ROADMAP.md +6 -6
  72. package/docs/SETUP.md +1 -2
  73. package/docs/VALIDATION.md +11 -11
  74. package/install.sh +1 -3
  75. package/lib/agents-config.js +3 -3
  76. package/lib/detect-agent.js +191 -0
  77. package/lib/detect-worktree.js +47 -0
  78. package/lib/file-hash.js +26 -0
  79. package/lib/setup-action-log.js +139 -0
  80. package/lib/setup-summary-renderer.js +106 -0
  81. package/lib/setup.js +75 -1
  82. package/package.json +3 -4
  83. package/docs/WORKFLOW.md +0 -400
@@ -0,0 +1,251 @@
1
+ # GitHub <-> Beads Issue Sync
2
+
3
+ Automatic synchronization between GitHub Issues and Beads issue tracking.
4
+
5
+ **GitHub Issues** = human/team/public interface.
6
+ **Beads** = AI agent engine (`bd ready`, `bd close`).
7
+
8
+ Neither side needs to know about the other. Contributors file issues on GitHub; AI agents pick up work via Beads. Status changes propagate automatically.
9
+
10
+ ---
11
+
12
+ ## Architecture
13
+
14
+ ### Phase 1: GitHub -> Beads (CI-driven)
15
+
16
+ ```mermaid
17
+ sequenceDiagram
18
+ participant U as User
19
+ participant GH as GitHub Issues
20
+ participant WF as GitHub Actions
21
+ participant BD as Beads CLI
22
+ participant Repo as .beads/ + mapping
23
+
24
+ U->>GH: Opens issue #42
25
+ GH->>WF: issues.opened trigger
26
+ WF->>WF: Guard checks (bot? skip label? no-beads?)
27
+ WF->>WF: Idempotency check (existing bot comment?)
28
+ WF->>BD: bd create --title "..." --type bug --priority 1
29
+ BD->>Repo: Write .beads/issues.jsonl
30
+ WF->>Repo: Write .github/beads-mapping.json {"42": "forge-abc"}
31
+ WF->>GH: Post bot comment <!-- beads-sync:42 -->
32
+ WF->>Repo: git commit + push
33
+
34
+ U->>GH: Closes issue #42
35
+ GH->>WF: issues.closed trigger
36
+ WF->>Repo: Read mapping: "42" -> "forge-abc"
37
+ WF->>BD: bd close forge-abc --reason "Closed via GitHub #42"
38
+ WF->>Repo: git commit + push
39
+ ```
40
+
41
+ ### Phase 2: Beads -> GitHub (push-triggered)
42
+
43
+ ```mermaid
44
+ sequenceDiagram
45
+ participant AI as AI Agent
46
+ participant BD as Beads CLI
47
+ participant Repo as .beads/
48
+ participant WF as GitHub Actions
49
+ participant GH as GitHub Issues
50
+
51
+ AI->>BD: bd close forge-abc
52
+ BD->>Repo: Update issues.jsonl
53
+ AI->>Repo: git push
54
+ Repo->>WF: push trigger (paths: .beads/**)
55
+ WF->>WF: Guard: skip if commit msg starts with "chore(beads):"
56
+ WF->>Repo: Diff issues.jsonl for closed transitions
57
+ WF->>GH: gh api PATCH /issues/42 state=closed
58
+ ```
59
+
60
+ ### Loop Prevention
61
+
62
+ Three guards prevent infinite ping-pong:
63
+
64
+ 1. **Bot detection** -- workflows skip events from `github-actions[bot]`
65
+ 2. **Commit message prefix** -- Phase 2 workflow skips commits starting with `chore(beads):`
66
+ 3. **Opt-out label** -- `skip-beads-sync` label on any issue disables sync entirely
67
+
68
+ ---
69
+
70
+ ## Setup
71
+
72
+ ### Via Forge Setup (recommended)
73
+
74
+ ```bash
75
+ bunx forge setup
76
+ # During interactive prompts:
77
+ # "Enable GitHub <-> Beads sync? (y/n)" -> y
78
+ ```
79
+
80
+ This scaffolds:
81
+ - `.github/workflows/github-to-beads.yml`
82
+ - `.github/workflows/beads-to-github.yml` (Phase 2)
83
+ - `.github/beads-mapping.json`
84
+ - `scripts/github-beads-sync/` (Node modules)
85
+ - `scripts/github-beads-sync.config.json`
86
+
87
+ ### Manual Setup
88
+
89
+ 1. Copy workflow files from `templates/` into `.github/workflows/`
90
+ 2. Copy `scripts/github-beads-sync/` and `scripts/github-beads-sync.config.json`
91
+ 3. Create `.github/beads-mapping.json` with `{}`
92
+ 4. Ensure Beads is initialized: `bd init`
93
+ 5. Commit and push to enable the workflows
94
+
95
+ ---
96
+
97
+ ## Configuration Reference
98
+
99
+ All settings live in `scripts/github-beads-sync.config.json`.
100
+
101
+ ### Label and Type Mapping
102
+
103
+ | Field | Type | Default | Description |
104
+ |-------|------|---------|-------------|
105
+ | `labelToType` | `object` | `{"bug":"bug", "enhancement":"feature", "documentation":"task", "question":"task"}` | Maps GitHub labels to Beads issue types. First matching label wins. |
106
+ | `labelToPriority` | `object` | `{"P0":0, "critical":0, "P1":1, "high":1, "P2":2, "medium":2, "P3":3, "low":3, "P4":4, "backlog":4}` | Maps GitHub labels to Beads priority levels (0-4). First matching label wins. |
107
+ | `defaultType` | `string` | `"task"` | Beads type when no label matches `labelToType`. |
108
+ | `defaultPriority` | `number` | `2` | Beads priority when no label matches `labelToPriority`. |
109
+ | `mapAssignee` | `boolean` | `true` | Whether to copy GitHub assignee to Beads issue on creation. |
110
+
111
+ ### Security Gates (Public Repos)
112
+
113
+ | Field | Type | Default | Description |
114
+ |-------|------|---------|-------------|
115
+ | `publicRepoGate` | `string` | `"none"` | Access control for public repos. See [Security](#security) section. |
116
+ | `gateLabelName` | `string` | `"beads-track"` | Required label when `publicRepoGate` is `"label"`. |
117
+ | `gateAssociations` | `string[]` | `["MEMBER", "COLLABORATOR", "OWNER"]` | Allowed author associations when `publicRepoGate` is `"author_association"`. |
118
+
119
+ ### Example: Custom Configuration
120
+
121
+ ```json
122
+ {
123
+ "labelToType": {
124
+ "bug": "bug",
125
+ "feature": "feature",
126
+ "chore": "chore",
127
+ "spike": "task"
128
+ },
129
+ "labelToPriority": {
130
+ "urgent": 0,
131
+ "important": 1,
132
+ "normal": 2,
133
+ "nice-to-have": 3
134
+ },
135
+ "defaultType": "task",
136
+ "defaultPriority": 2,
137
+ "mapAssignee": true,
138
+ "publicRepoGate": "author_association",
139
+ "gateAssociations": ["MEMBER", "COLLABORATOR", "OWNER"]
140
+ }
141
+ ```
142
+
143
+ ---
144
+
145
+ ## Security
146
+
147
+ ### Public Repo Gate
148
+
149
+ On public repos, anyone can open an issue -- which triggers a commit to your default branch via the sync workflow. The `publicRepoGate` setting controls who can trigger sync:
150
+
151
+ | Value | Behavior | Recommended For |
152
+ |-------|----------|-----------------|
153
+ | `"none"` | All issues sync (default). | Private repos, trusted teams. |
154
+ | `"author_association"` | Only issues from authors in `gateAssociations` sync. | Public repos with known contributors. |
155
+ | `"label"` | Only issues with the `gateLabelName` label sync. A maintainer must add the label. | Public repos accepting external issues. |
156
+
157
+ ### Input Sanitization
158
+
159
+ - Issue titles and bodies are **never interpolated in shell commands**. The sync scripts use Node `execFile` with array arguments (no shell).
160
+ - Workflow files pass event data via `env:` blocks, never via `${{ }}` in `run:` blocks (prevents GitHub Actions injection).
161
+ - Only title, URL, mapped type, and priority are stored in Beads -- raw issue body is not committed.
162
+
163
+ ### SHA-Pinned Actions
164
+
165
+ All third-party actions in the workflow files are pinned to full commit SHAs, not tags. This prevents supply-chain attacks via tag mutation.
166
+
167
+ ```yaml
168
+ # Good: SHA-pinned
169
+ - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
170
+
171
+ # Bad: tag-only (never used)
172
+ - uses: actions/checkout@v4
173
+ ```
174
+
175
+ ---
176
+
177
+ ## Opt-Out
178
+
179
+ Two ways to prevent an issue from syncing:
180
+
181
+ 1. **Label**: Add `skip-beads-sync` to the GitHub issue. The workflow checks labels before processing.
182
+ 2. **Body keyword**: Include `no-beads` anywhere in the issue body. Useful for quick one-off exclusions.
183
+
184
+ Both are checked at the `issues.opened` trigger. If added after creation, they prevent close-sync but not the already-created Beads issue.
185
+
186
+ ---
187
+
188
+ ## Troubleshooting
189
+
190
+ ### Sync not triggering
191
+
192
+ - **Check workflow is enabled**: Go to Actions tab in GitHub, verify `github-to-beads` workflow exists and is active.
193
+ - **Check branch**: Workflows must exist on the default branch (usually `main` or `master`).
194
+ - **Check permissions**: The workflow needs `contents: write` and `issues: write` permissions.
195
+
196
+ ### Duplicate Beads issues
197
+
198
+ - The workflow checks for an existing `<!-- beads-sync:N -->` bot comment before creating. If the comment was deleted, a duplicate may be created.
199
+ - Fix: Check `.github/beads-mapping.json` for the existing mapping and manually remove the duplicate Beads issue with `bd delete`.
200
+
201
+ ### Loop detection firing incorrectly
202
+
203
+ - If legitimate commits starting with `chore(beads):` are being skipped by the Phase 2 workflow, rename the commit prefix in the workflow file.
204
+ - The bot-actor check uses `github.actor` -- ensure your CI bot user matches the expected name.
205
+
206
+ ### Mapping file conflicts
207
+
208
+ - If two issues are created simultaneously, the `git push` for the second may fail due to a stale mapping file.
209
+ - The workflow retries with `git pull --rebase` up to 3 times. If it still fails, the workflow run will show as failed -- re-run it manually.
210
+
211
+ ### `bd` command not found in CI
212
+
213
+ - The workflow installs Beads fresh each run: `bun add -g @beads/bd`.
214
+ - If this fails, check that the workflow uses a runner with Node/Bun available.
215
+
216
+ ---
217
+
218
+ ## Fork Behavior
219
+
220
+ Sync does **not** work in forks. The `GITHUB_TOKEN` provided to forked repo workflows is scoped to the fork and cannot write to the upstream repo's `.beads/` directory or post comments on upstream issues.
221
+
222
+ When a fork PR uses `Closes #N`, GitHub closes the issue on the **upstream** repo on merge. This triggers the upstream's `issues.closed` workflow, which handles the Beads close normally.
223
+
224
+ ---
225
+
226
+ ## GitHub Projects Integration
227
+
228
+ This plugin creates well-labeled GitHub issues but does **not** manage GitHub Projects boards. Use GitHub's built-in automation instead:
229
+
230
+ ### Setting Up Auto-Add to Project
231
+
232
+ 1. Go to your GitHub Project (Projects tab on your profile or org)
233
+ 2. Click the `...` menu, then **Workflows**
234
+ 3. Enable **"Auto-add to project"**
235
+ 4. Set the filter, for example: `is:issue is:open label:bug,enhancement`
236
+ 5. All matching issues (including those created by the sync) will auto-appear on your board
237
+
238
+ ### Recommended Project Views
239
+
240
+ - **Board view**: Columns for `Open`, `In Progress`, `Done` -- map to Beads statuses
241
+ - **Table view**: Add `Labels`, `Assignees`, `Priority` fields for triage
242
+ - **Filter by label**: Use the labels mapped in your config to create focused views
243
+
244
+ This approach is more flexible than automating board placement -- you control the filters and views entirely within GitHub's UI.
245
+
246
+ ---
247
+
248
+ ## Related Documentation
249
+
250
+ - [Design doc](plans/2026-03-21-github-beads-sync-design.md) -- full design decisions, OWASP analysis, and edge cases
251
+ - [Toolchain reference](TOOLCHAIN.md) -- Beads CLI commands, installation, and troubleshooting
@@ -180,12 +180,12 @@ bunx forge setup --type=feature
180
180
 
181
181
  **Critical Workflow (9 stages):**
182
182
  ```
183
- /status → /research → /plan → /dev → /validate → /ship → /review → /merge → /verify
183
+ /status → /research → /plan → /dev → /validate → /ship → /review → /premerge → /verify
184
184
  ```
185
185
 
186
186
  **Standard Workflow (6 stages):**
187
187
  ```
188
- /status → /plan → /dev → /validate → /ship → /merge
188
+ /status → /plan → /dev → /validate → /ship → /premerge
189
189
  ```
190
190
 
191
191
  #### 2. Fix
@@ -208,7 +208,7 @@ bunx forge setup --type=fix
208
208
 
209
209
  **Simple Workflow (4 stages):**
210
210
  ```
211
- /dev → /validate → /ship → /merge
211
+ /dev → /validate → /ship → /premerge
212
212
  ```
213
213
 
214
214
  #### 3. Refactor
@@ -221,7 +221,7 @@ bunx forge setup --type=refactor
221
221
 
222
222
  **Workflow (5 stages):**
223
223
  ```
224
- /plan → /dev → /validate → /ship → /merge
224
+ /plan → /dev → /validate → /ship → /premerge
225
225
  ```
226
226
 
227
227
  - Strict TDD to preserve behavior
@@ -237,7 +237,7 @@ bunx forge setup --type=chore
237
237
 
238
238
  **Workflow (3 stages):**
239
239
  ```
240
- /verify → /ship → /merge
240
+ /verify → /ship → /premerge
241
241
  ```
242
242
 
243
243
  - Minimal workflow for maintenance tasks
@@ -582,7 +582,7 @@ Share project knowledge with team.
582
582
  ## Related Documentation
583
583
 
584
584
  - [Main README](../README.md) - Overview and quick start
585
- - [Workflow Guide](WORKFLOW.md) - Complete 9-stage workflow
585
+ - [Workflow Guide](../AGENTS.md) - Complete 7-stage workflow
586
586
  - [Setup Guide](SETUP.md) - Agent-specific setup
587
587
  - [Agent Install Prompt](AGENT_INSTALL_PROMPT.md) - AI-assisted setup
588
588
 
package/docs/EXAMPLES.md CHANGED
@@ -70,7 +70,7 @@ router.get('/health', (req, res) => {
70
70
  git commit -m "feat: add health check endpoint"
71
71
 
72
72
  # ═══════════════════════════════════════════════════════════
73
- # STAGE 5: CHECK
73
+ # STAGE 5: VALIDATE
74
74
  # ═══════════════════════════════════════════════════════════
75
75
  /validate
76
76
 
@@ -174,7 +174,7 @@ git commit -m "fix: prevent SQL injection in search endpoint
174
174
  OWASP A03:2021 Injection"
175
175
 
176
176
  # ═══════════════════════════════════════════════════════════
177
- # STAGE 5: CHECK
177
+ # STAGE 5: VALIDATE
178
178
  # ═══════════════════════════════════════════════════════════
179
179
  /validate
180
180
 
@@ -294,7 +294,7 @@ git commit -m "refactor: extract login to AuthService"
294
294
  # 5-6 commits total
295
295
 
296
296
  # ═══════════════════════════════════════════════════════════
297
- # STAGE 5: CHECK
297
+ # STAGE 5: VALIDATE
298
298
  # ═══════════════════════════════════════════════════════════
299
299
  /validate
300
300
 
@@ -475,7 +475,7 @@ bd sync
475
475
 
476
476
  📚 **New to Forge?** → [QUICKSTART.md](../QUICKSTART.md)
477
477
 
478
- 📖 **Learn workflow** → [WORKFLOW.md](WORKFLOW.md)
478
+ 📖 **Learn workflow** → [AGENTS.md](../AGENTS.md)
479
479
 
480
480
  🛠️ **Setup tools** → [SETUP.md](SETUP.md)
481
481
 
@@ -372,7 +372,7 @@ A: Yes, via `.greptile/config.yml` configuration file.
372
372
  - **Greptile Documentation**: https://docs.greptile.com
373
373
  - **GitHub App Settings**: https://github.com/settings/installations
374
374
  - **Branch Protection Guide**: [../.github/BRANCH_PROTECTION_GUIDE.md](../.github/BRANCH_PROTECTION_GUIDE.md)
375
- - **Your PR #13** (example): https://github.com/harshanandak/forge/pull/13
375
+ - **Your PRs**: Check the [pull requests page](https://github.com/harshanandak/forge/pulls) for examples
376
376
 
377
377
  ---
378
378
 
@@ -23,7 +23,7 @@ Manual review remains essential even with AI-powered tools like Greptile and Cod
23
23
  This guide integrates with the Forge 9-Stage TDD Workflow:
24
24
 
25
25
  ```
26
- /status → /research → /plan → /dev → /validate → /ship → /review → /merge → /verify
26
+ /status → /research → /plan → /dev → /validate → /ship → /review → /premerge → /verify
27
27
 
28
28
  You are here
29
29
  ```
package/docs/ROADMAP.md CHANGED
@@ -3,8 +3,8 @@
3
3
  **Comprehensive implementation plan for transforming Forge into a fully automated, orchestrated workflow system.**
4
4
 
5
5
  **Plan Created**: 2026-02-10
6
- **Status**: Phase 2 complete. PR5/PR6 research done, ready for planning.
7
- **Timeline**: 3-4 weeks total
6
+ **Status**: Phase 2 complete. PRs 0-6 merged, PR7-PR8 pending.
7
+ **Timeline**: Originally 3-4 weeks; Phases 0-2 complete as of March 2026.
8
8
  **Strategy**: Quick wins first → Build testing foundation → Add automation → Enable extensibility
9
9
 
10
10
  ---
@@ -87,8 +87,8 @@ PR0 (Simplification) → PR1 (Fixes) → PR2 (Security) → PR3 (Test Infra)
87
87
  | PR5 | PR4 | PR5.5 | ✅ MERGED (2026-02-20, PR #40) |
88
88
  | PR5.5 | PR5 | PR6 | ✅ MERGED (2026-02-23, PR #43) |
89
89
  | PR6 | PR5.5 | PR7 | ✅ MERGED (2026-02-21, PR #41) |
90
- | PR7 | PR6 | PR8 | Blocked |
91
- | PR8 | PR7 | None | Blocked |
90
+ | PR7 | PR6 | PR8 | Planned |
91
+ | PR8 | PR7 | None | Planned |
92
92
 
93
93
  ---
94
94
 
@@ -300,7 +300,7 @@ All PRs tracked in Beads with proper dependencies:
300
300
  Each PR follows the Forge workflow:
301
301
 
302
302
  ```
303
- /status → /research → /plan → /dev → /validate → /ship → /review → /merge → /verify
303
+ /status → /research → /plan → /dev → /validate → /ship → /review → /premerge → /verify
304
304
  ```
305
305
 
306
306
  **Current branch**: `master` (ready for next feature branch)
@@ -349,7 +349,7 @@ Each PR is self-contained and can be rolled back independently:
349
349
 
350
350
  - **Master Plan**: `.claude/plans/*.md`
351
351
  - **Beads Issues**: `bd list` or `bd show <issue-id>`
352
- - **Workflow Guide**: [WORKFLOW.md](./WORKFLOW.md)
352
+ - **Workflow Guide**: [AGENTS.md](../AGENTS.md)
353
353
  - **Architecture Docs**: Coming in PR0 - [ARCHITECTURE.md](./ARCHITECTURE.md)
354
354
 
355
355
  ---
package/docs/SETUP.md CHANGED
@@ -533,7 +533,6 @@ your-project/
533
533
  │ └── skills/forge-workflow/
534
534
 
535
535
  ├── docs/
536
- │ ├── WORKFLOW.md # Complete guide
537
536
  │ ├── TOOLCHAIN.md # Tool reference
538
537
  │ ├── SETUP.md # This file
539
538
  │ ├── EXAMPLES.md # Real examples
@@ -621,7 +620,7 @@ curl -s -X POST "https://api.parallel.ai/v1beta/search" \
621
620
 
622
621
  ✅ Setup complete? Try your [first feature](../QUICKSTART.md)
623
622
 
624
- 📖 Learn the workflow in [WORKFLOW.md](WORKFLOW.md)
623
+ 📖 Learn the workflow in [AGENTS.md](../AGENTS.md)
625
624
 
626
625
  🛠️ Explore toolchain in [TOOLCHAIN.md](TOOLCHAIN.md)
627
626
 
@@ -70,12 +70,12 @@ LEFTHOOK=0 git push # Skip all hooks
70
70
 
71
71
  ## Validation CLI
72
72
 
73
- The `forge-validate` CLI checks prerequisites for each workflow stage.
73
+ The `forge-preflight` CLI checks prerequisites for each workflow stage.
74
74
 
75
75
  ### Usage
76
76
 
77
77
  ```bash
78
- forge-validate <command>
78
+ forge-preflight <command>
79
79
  ```
80
80
 
81
81
  ### Commands
@@ -90,7 +90,7 @@ forge-validate <command>
90
90
 
91
91
  ## Validators by Stage
92
92
 
93
- ### `forge-validate status`
93
+ ### `forge-preflight status`
94
94
 
95
95
  **Purpose**: Check basic project setup
96
96
 
@@ -102,7 +102,7 @@ forge-validate <command>
102
102
 
103
103
  **Example**:
104
104
  ```bash
105
- $ forge-validate status
105
+ $ forge-preflight status
106
106
 
107
107
  Checking project prerequisites...
108
108
 
@@ -118,7 +118,7 @@ Validation Results:
118
118
 
119
119
  ---
120
120
 
121
- ### `forge-validate dev`
121
+ ### `forge-preflight dev`
122
122
 
123
123
  **Purpose**: Validate before starting implementation (`/dev`)
124
124
 
@@ -130,7 +130,7 @@ Validation Results:
130
130
 
131
131
  **Example**:
132
132
  ```bash
133
- $ forge-validate dev
133
+ $ forge-preflight dev
134
134
 
135
135
  Validating prerequisites for /dev stage...
136
136
 
@@ -146,7 +146,7 @@ Validation Results:
146
146
 
147
147
  **Failed Example**:
148
148
  ```bash
149
- $ forge-validate dev
149
+ $ forge-preflight dev
150
150
 
151
151
  Validating prerequisites for /dev stage...
152
152
 
@@ -163,7 +163,7 @@ Validation Results:
163
163
 
164
164
  ---
165
165
 
166
- ### `forge-validate ship`
166
+ ### `forge-preflight ship`
167
167
 
168
168
  **Purpose**: Validate before creating PR (`/ship`)
169
169
 
@@ -175,7 +175,7 @@ Validation Results:
175
175
 
176
176
  **Example**:
177
177
  ```bash
178
- $ forge-validate ship
178
+ $ forge-preflight ship
179
179
 
180
180
  Validating prerequisites for /ship stage...
181
181
 
@@ -269,7 +269,7 @@ const testPatterns = [
269
269
 
270
270
  ### Validation CLI Customization
271
271
 
272
- Edit `bin/forge-validate.js` to add custom validators:
272
+ Edit `bin/forge-preflight.js` to add custom validators:
273
273
 
274
274
  ```javascript
275
275
  function validateCustomStage() {
@@ -358,6 +358,6 @@ git push
358
358
 
359
359
  ## See Also
360
360
 
361
- - [Workflow Guide](WORKFLOW.md) - Complete 9-stage workflow
361
+ - [Workflow Guide](../AGENTS.md) - Complete 7-stage workflow
362
362
  - [TDD Guide](../CLAUDE.md) - TDD principles and practices
363
363
  - [Lefthook Docs](https://github.com/evilmartians/lefthook) - Full hook configuration
package/install.sh CHANGED
@@ -285,7 +285,6 @@ echo -e " ${GREEN}Created: AGENTS.md${NC}"
285
285
 
286
286
  # Download documentation
287
287
  echo "Downloading documentation..."
288
- curl -fsSL "$BASE_URL/docs/WORKFLOW.md" -o "docs/WORKFLOW.md" 2>/dev/null || true
289
288
  curl -fsSL "$BASE_URL/docs/research/TEMPLATE.md" -o "docs/research/TEMPLATE.md" 2>/dev/null || true
290
289
 
291
290
  # Create PROGRESS.md if not exists
@@ -723,7 +722,6 @@ if [ "$INSTALL_AIDER" = true ]; then
723
722
  # Read AGENTS.md for workflow instructions
724
723
  read:
725
724
  - AGENTS.md
726
- - docs/WORKFLOW.md
727
725
  EOF
728
726
  echo -e " ${GREEN}Created: .aider.conf.yml${NC}"
729
727
  else
@@ -1049,7 +1047,7 @@ echo " /review - Address PR feedback"
1049
1047
  echo " /premerge - Update docs, hand off PR"
1050
1048
  echo " /verify - Post-merge health check"
1051
1049
  echo ""
1052
- echo " Full guide: docs/WORKFLOW.md"
1050
+ echo " Full guide: AGENTS.md"
1053
1051
  echo ""
1054
1052
  echo "Optional tools:"
1055
1053
  echo " - Beads: $PKG_MANAGER install -g @beads/bd && bd init"
@@ -248,7 +248,7 @@ Generate with: \`bunx forge setup --agent=<name>\`
248
248
  ## Support
249
249
 
250
250
  - **Documentation**: \`docs/\` directory
251
- - **Workflow Guide**: \`docs/WORKFLOW.md\`
251
+ - **Workflow Guide**: \`AGENTS.md\`
252
252
  - **Architecture**: \`docs/ARCHITECTURE.md\` (if it exists)
253
253
  - **Configuration**: \`docs/CONFIGURATION.md\` (if it exists)
254
254
 
@@ -503,7 +503,7 @@ ${meta.language === 'TypeScript' ? `
503
503
 
504
504
  ## Additional Resources
505
505
 
506
- - **Workflow Guide**: \`docs/WORKFLOW.md\`
506
+ - **Workflow Guide**: \`AGENTS.md\`
507
507
  - **Architecture**: \`docs/ARCHITECTURE.md\`
508
508
  - **Configuration**: \`docs/CONFIGURATION.md\`
509
509
  `;
@@ -1769,7 +1769,7 @@ bunx forge setup --config=.forgerc.ci.json
1769
1769
 
1770
1770
  - [ARCHITECTURE.md](./ARCHITECTURE.md) - How multi-agent support works
1771
1771
  - [MCP_SETUP.md](./MCP_SETUP.md) - MCP server configuration
1772
- - [WORKFLOW.md](./WORKFLOW.md) - Complete workflow guide
1772
+ - [AGENTS.md](../AGENTS.md) - Complete workflow guide
1773
1773
  `;
1774
1774
  }
1775
1775