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.
- package/.claude/commands/dev.md +26 -0
- package/.claude/commands/plan.md +48 -5
- package/.claude/commands/premerge.md +0 -3
- package/.claude/commands/rollback.md +4 -4
- package/.claude/commands/ship.md +71 -41
- package/.claude/commands/status.md +9 -38
- package/.claude/commands/validate.md +47 -2
- package/.cline/workflows/dev.md +26 -0
- package/.cline/workflows/plan.md +48 -5
- package/.cline/workflows/premerge.md +0 -3
- package/.cline/workflows/rollback.md +4 -4
- package/.cline/workflows/ship.md +71 -41
- package/.cline/workflows/status.md +9 -38
- package/.cline/workflows/validate.md +47 -2
- package/.codex/skills/dev/SKILL.md +26 -0
- package/.codex/skills/plan/SKILL.md +48 -5
- package/.codex/skills/premerge/SKILL.md +0 -3
- package/.codex/skills/rollback/SKILL.md +4 -4
- package/.codex/skills/ship/SKILL.md +71 -41
- package/.codex/skills/status/SKILL.md +9 -38
- package/.codex/skills/validate/SKILL.md +47 -2
- package/.cursor/commands/dev.md +26 -0
- package/.cursor/commands/plan.md +48 -5
- package/.cursor/commands/premerge.md +0 -3
- package/.cursor/commands/rollback.md +4 -4
- package/.cursor/commands/ship.md +71 -41
- package/.cursor/commands/status.md +9 -38
- package/.cursor/commands/validate.md +47 -2
- package/.cursor/hooks/state/continual-learning-index.json +19 -0
- package/.cursor/hooks/state/continual-learning.json +8 -0
- package/.github/prompts/dev.prompt.md +26 -0
- package/.github/prompts/plan.prompt.md +48 -5
- package/.github/prompts/premerge.prompt.md +0 -3
- package/.github/prompts/rollback.prompt.md +4 -4
- package/.github/prompts/ship.prompt.md +71 -41
- package/.github/prompts/status.prompt.md +9 -38
- package/.github/prompts/validate.prompt.md +47 -2
- package/.kilocode/workflows/dev.md +26 -0
- package/.kilocode/workflows/plan.md +48 -5
- package/.kilocode/workflows/premerge.md +0 -3
- package/.kilocode/workflows/rollback.md +4 -4
- package/.kilocode/workflows/ship.md +71 -41
- package/.kilocode/workflows/status.md +9 -38
- package/.kilocode/workflows/validate.md +47 -2
- package/.opencode/commands/dev.md +26 -0
- package/.opencode/commands/plan.md +48 -5
- package/.opencode/commands/premerge.md +0 -3
- package/.opencode/commands/rollback.md +4 -4
- package/.opencode/commands/ship.md +71 -41
- package/.opencode/commands/status.md +9 -38
- package/.opencode/commands/validate.md +47 -2
- package/.roo/commands/dev.md +26 -0
- package/.roo/commands/plan.md +48 -5
- package/.roo/commands/premerge.md +0 -3
- package/.roo/commands/rollback.md +4 -4
- package/.roo/commands/ship.md +71 -41
- package/.roo/commands/status.md +9 -38
- package/.roo/commands/validate.md +47 -2
- package/AGENTS.md +7 -1
- package/CLAUDE.md +5 -4
- package/LICENSE +21 -21
- package/README.md +21 -19
- package/bin/{forge-validate.js → forge-preflight.js} +21 -15
- package/bin/forge.js +209 -138
- package/docs/AGENT_INSTALL_PROMPT.md +1 -1
- package/docs/BEADS_GITHUB_SYNC.md +251 -0
- package/docs/ENHANCED_ONBOARDING.md +6 -6
- package/docs/EXAMPLES.md +4 -4
- package/docs/GREPTILE_SETUP.md +1 -1
- package/docs/MANUAL_REVIEW_GUIDE.md +1 -1
- package/docs/ROADMAP.md +6 -6
- package/docs/SETUP.md +1 -2
- package/docs/VALIDATION.md +11 -11
- package/install.sh +1 -3
- package/lib/agents-config.js +3 -3
- package/lib/detect-agent.js +191 -0
- package/lib/detect-worktree.js +47 -0
- package/lib/file-hash.js +26 -0
- package/lib/setup-action-log.js +139 -0
- package/lib/setup-summary-renderer.js +106 -0
- package/lib/setup.js +75 -1
- package/package.json +3 -4
- package/docs/WORKFLOW.md +0 -400
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.
|
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ Ship features with confidence using a 7-stage TDD-first workflow for AI coding a
|
|
|
45
45
|
**With Forge** (systematic):
|
|
46
46
|
- Tests written BEFORE code (TDD)
|
|
47
47
|
- Research-backed decisions
|
|
48
|
-
- OWASP Top 10 analysis
|
|
48
|
+
- OWASP Top 10 analysis in every /plan
|
|
49
49
|
- Documentation at every stage
|
|
50
50
|
|
|
51
51
|
→ [See complete walkthrough in QUICKSTART.md](QUICKSTART.md)
|
|
@@ -78,7 +78,7 @@ bunx forge setup
|
|
|
78
78
|
|
|
79
79
|
| Stage | Command | Purpose |
|
|
80
80
|
|-------|---------|---------|
|
|
81
|
-
| **utility** | `/status` |
|
|
81
|
+
| **utility** | `/status` | Ranked issue dashboard with conflict detection |
|
|
82
82
|
| **1. Plan** | `/plan` | Design Q&A → research → branch + task list |
|
|
83
83
|
| **2. Dev** | `/dev` | Subagent TDD per task (spec + quality review) |
|
|
84
84
|
| **3. Validate** | `/validate` | Validate: types, lint, tests, security |
|
|
@@ -87,13 +87,13 @@ bunx forge setup
|
|
|
87
87
|
| **6. Premerge** | `/premerge` | Complete docs on feature branch, hand off PR |
|
|
88
88
|
| **7. Verify** | `/verify` | Post-merge health check (CI on main) |
|
|
89
89
|
|
|
90
|
-
**Full workflow guide**: [
|
|
90
|
+
**Full workflow guide**: [AGENTS.md](AGENTS.md)
|
|
91
91
|
|
|
92
92
|
---
|
|
93
93
|
|
|
94
94
|
## Supported AI Agents
|
|
95
95
|
|
|
96
|
-
Works with **
|
|
96
|
+
Works with **8 AI coding agents** via universal AGENTS.md:
|
|
97
97
|
|
|
98
98
|
### Tier 1 (Primary Support)
|
|
99
99
|
|
|
@@ -163,7 +163,7 @@ One workflow, works with ALL major AI agents:
|
|
|
163
163
|
|
|
164
164
|
Switch agents anytime without changing your workflow.
|
|
165
165
|
|
|
166
|
-
### 4. Built-in TDD Enforcement
|
|
166
|
+
### 4. Built-in TDD Enforcement
|
|
167
167
|
Git hooks automatically enforce TDD practices:
|
|
168
168
|
- **Pre-commit**: Blocks source commits without tests
|
|
169
169
|
- **Pre-push**: Runs full test suite before push
|
|
@@ -172,16 +172,16 @@ Git hooks automatically enforce TDD practices:
|
|
|
172
172
|
|
|
173
173
|
```bash
|
|
174
174
|
# Validation CLI
|
|
175
|
-
forge-
|
|
176
|
-
forge-
|
|
177
|
-
forge-
|
|
175
|
+
forge-preflight status # Check project prerequisites
|
|
176
|
+
forge-preflight dev # Validate before /dev stage
|
|
177
|
+
forge-preflight ship # Validate before /ship stage
|
|
178
178
|
```
|
|
179
179
|
|
|
180
|
-
### 5. Smart Tool Recommendations
|
|
181
|
-
|
|
180
|
+
### 5. Smart Tool Recommendations
|
|
181
|
+
Curated plugin catalog across 7 workflow stages — plan, dev, validate, ship, review, and more:
|
|
182
182
|
- **Auto-detection**: Scans your project for frameworks, databases, auth, payments, and more
|
|
183
183
|
- **Budget modes**: free, open-source, startup, professional, custom
|
|
184
|
-
- **
|
|
184
|
+
- **Portability-first**: MCPs included only when they add clear value over CLI alternatives
|
|
185
185
|
- **Free alternatives**: Every paid tool shows free alternatives
|
|
186
186
|
|
|
187
187
|
```bash
|
|
@@ -189,9 +189,9 @@ bunx forge recommend # Recommendations for your project
|
|
|
189
189
|
bunx forge recommend --budget free # Only free tools
|
|
190
190
|
```
|
|
191
191
|
|
|
192
|
-
→ [Validation docs](docs/VALIDATION.md) | [Plugin docs](
|
|
192
|
+
→ [Validation docs](docs/VALIDATION.md) | [Plugin docs](docs/TOOLCHAIN.md)
|
|
193
193
|
|
|
194
|
-
### 6. Enhanced Onboarding
|
|
194
|
+
### 6. Enhanced Onboarding
|
|
195
195
|
Smart setup that adapts to your project:
|
|
196
196
|
|
|
197
197
|
**Intelligent File Merging**
|
|
@@ -210,11 +210,13 @@ bunx forge setup --merge=smart # Intelligent merge
|
|
|
210
210
|
- Saves to `.forge/context.json`
|
|
211
211
|
|
|
212
212
|
**Workflow Profiles**
|
|
213
|
-
- Adapts workflow based on work type:
|
|
214
|
-
- `
|
|
215
|
-
- `
|
|
213
|
+
- Adapts workflow based on work type (3-8 stages):
|
|
214
|
+
- `critical`: Full 8-stage workflow (auth, payments, security-sensitive)
|
|
215
|
+
- `standard`: 7-stage workflow (typical features)
|
|
216
216
|
- `refactor`: Behavior-preserving 5-stage workflow
|
|
217
|
-
- `
|
|
217
|
+
- `simple`: Streamlined 4-stage workflow
|
|
218
|
+
- `hotfix`: Minimal 3-stage workflow (production fixes)
|
|
219
|
+
- `docs`: Minimal 3-stage workflow (documentation/config)
|
|
218
220
|
```bash
|
|
219
221
|
bunx forge setup --type=critical # Set workflow manually
|
|
220
222
|
```
|
|
@@ -348,7 +350,7 @@ gh auth login
|
|
|
348
350
|
**Documentation Progressive**: Update at each stage
|
|
349
351
|
**Multi-Session**: Work persists across sessions
|
|
350
352
|
|
|
351
|
-
→ [Read the philosophy in
|
|
353
|
+
→ [Read the philosophy in AGENTS.md](AGENTS.md)
|
|
352
354
|
|
|
353
355
|
---
|
|
354
356
|
|
|
@@ -358,7 +360,7 @@ gh auth login
|
|
|
358
360
|
→ [QUICKSTART.md](QUICKSTART.md) - Your first feature in 5 minutes
|
|
359
361
|
|
|
360
362
|
📖 **Learn the workflow**
|
|
361
|
-
→ [
|
|
363
|
+
→ [AGENTS.md](AGENTS.md) - Complete guide with examples
|
|
362
364
|
|
|
363
365
|
🛠️ **Setup the toolchain**
|
|
364
366
|
→ [docs/TOOLCHAIN.md](docs/TOOLCHAIN.md) - Beads, GitHub CLI
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Forge
|
|
4
|
+
* Forge Preflight CLI
|
|
5
5
|
*
|
|
6
6
|
* Prerequisite validation for workflow stages.
|
|
7
7
|
* Helps ensure developers have required tools and files before proceeding.
|
|
8
8
|
*
|
|
9
9
|
* Usage:
|
|
10
|
-
* forge-
|
|
11
|
-
* forge-
|
|
12
|
-
* forge-
|
|
10
|
+
* forge-preflight status - Check project prerequisites
|
|
11
|
+
* forge-preflight dev - Validate before /dev stage
|
|
12
|
+
* forge-preflight ship - Validate before /ship stage
|
|
13
13
|
*
|
|
14
14
|
* Security: Uses execFileSync to prevent command injection.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
const { execFileSync } = require("node:child_process");
|
|
18
18
|
const fs = require("node:fs");
|
|
19
|
-
// const path = require("node:path"); // Currently unused
|
|
20
19
|
|
|
21
20
|
// Validation results
|
|
22
21
|
let checks = [];
|
|
@@ -52,6 +51,7 @@ function printResults() {
|
|
|
52
51
|
// Validation functions
|
|
53
52
|
|
|
54
53
|
function validateStatus() {
|
|
54
|
+
checks = [];
|
|
55
55
|
console.log("Checking project prerequisites...\n");
|
|
56
56
|
|
|
57
57
|
check(
|
|
@@ -100,6 +100,7 @@ function validateStatus() {
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
function validateDev() {
|
|
103
|
+
checks = [];
|
|
103
104
|
console.log("Validating prerequisites for /dev stage...\n");
|
|
104
105
|
|
|
105
106
|
check(
|
|
@@ -129,15 +130,15 @@ function validateDev() {
|
|
|
129
130
|
"Plan file exists",
|
|
130
131
|
() => {
|
|
131
132
|
try {
|
|
132
|
-
const plansDir = "
|
|
133
|
+
const plansDir = "docs/plans";
|
|
133
134
|
if (!fs.existsSync(plansDir)) return false;
|
|
134
|
-
const plans = fs.readdirSync(plansDir).filter((f) => f.endsWith(".md"));
|
|
135
|
+
const plans = fs.readdirSync(plansDir).filter((f) => f.endsWith("-design.md"));
|
|
135
136
|
return plans.length > 0;
|
|
136
137
|
} catch {
|
|
137
138
|
return false;
|
|
138
139
|
}
|
|
139
140
|
},
|
|
140
|
-
"No plan file found in
|
|
141
|
+
"No plan file found in docs/plans/. Run: /plan",
|
|
141
142
|
);
|
|
142
143
|
|
|
143
144
|
check(
|
|
@@ -173,6 +174,7 @@ function validateDev() {
|
|
|
173
174
|
}
|
|
174
175
|
|
|
175
176
|
function validateShip() {
|
|
177
|
+
checks = [];
|
|
176
178
|
console.log("Validating prerequisites for /ship stage...\n");
|
|
177
179
|
|
|
178
180
|
check(
|
|
@@ -182,7 +184,7 @@ function validateShip() {
|
|
|
182
184
|
return testDirs.some((dir) => {
|
|
183
185
|
if (!fs.existsSync(dir)) return false;
|
|
184
186
|
try {
|
|
185
|
-
const files = fs.readdirSync(dir
|
|
187
|
+
const files = fs.readdirSync(dir);
|
|
186
188
|
return files.some(
|
|
187
189
|
(f) => f.includes(".test.") || f.includes(".spec."),
|
|
188
190
|
);
|
|
@@ -200,7 +202,11 @@ function validateShip() {
|
|
|
200
202
|
try {
|
|
201
203
|
execFileSync("npm", ["test"], { stdio: "pipe" });
|
|
202
204
|
return true;
|
|
203
|
-
} catch {
|
|
205
|
+
} catch (err) {
|
|
206
|
+
const output = ((err.stdout || "") + "\n" + (err.stderr || "")).trim();
|
|
207
|
+
if (output) {
|
|
208
|
+
console.error("\nTest output:\n" + output.slice(0, 2000));
|
|
209
|
+
}
|
|
204
210
|
return false;
|
|
205
211
|
}
|
|
206
212
|
},
|
|
@@ -235,10 +241,10 @@ function validateShip() {
|
|
|
235
241
|
|
|
236
242
|
function showHelp() {
|
|
237
243
|
console.log(`
|
|
238
|
-
Forge
|
|
244
|
+
Forge Preflight - Prerequisite validation for workflow stages
|
|
239
245
|
|
|
240
246
|
Usage:
|
|
241
|
-
forge-
|
|
247
|
+
forge-preflight <command>
|
|
242
248
|
|
|
243
249
|
Commands:
|
|
244
250
|
status Check project prerequisites (git, npm, tests)
|
|
@@ -247,9 +253,9 @@ Commands:
|
|
|
247
253
|
help Show this help message
|
|
248
254
|
|
|
249
255
|
Examples:
|
|
250
|
-
forge-
|
|
251
|
-
forge-
|
|
252
|
-
forge-
|
|
256
|
+
forge-preflight status
|
|
257
|
+
forge-preflight dev
|
|
258
|
+
forge-preflight ship
|
|
253
259
|
`);
|
|
254
260
|
}
|
|
255
261
|
|