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
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 built-in
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` | Check current context, active work |
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**: [docs/WORKFLOW.md](docs/WORKFLOW.md)
90
+ **Full workflow guide**: [AGENTS.md](AGENTS.md)
91
91
 
92
92
  ---
93
93
 
94
94
  ## Supported AI Agents
95
95
 
96
- Works with **7 AI coding agents** via universal AGENTS.md:
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 (v1.5.0)
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-validate status # Check project prerequisites
176
- forge-validate dev # Validate before /dev stage
177
- forge-validate ship # Validate before /ship stage
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 (v1.7.0)
181
- Intelligent plugin catalog with 30+ curated tools:
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
- - **CLI-first**: Prefers CLI tools over MCPs for portability
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](lib/agents/README.md)
192
+ → [Validation docs](docs/VALIDATION.md) | [Plugin docs](docs/TOOLCHAIN.md)
193
193
 
194
- ### 6. Enhanced Onboarding (v1.6.0) 🆕
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
- - `feature`: Full 7-stage workflow (auto-escalates to critical for auth/payment)
215
- - `fix`: Streamlined 5-stage workflow (auto-escalates to hotfix for production)
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
- - `chore`: Minimal 3-stage workflow (docs/deps/config)
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 docs/WORKFLOW.md](docs/WORKFLOW.md)
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
- → [docs/WORKFLOW.md](docs/WORKFLOW.md) - Complete guide with examples
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 Validate CLI
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-validate status - Check project prerequisites
11
- * forge-validate dev - Validate before /dev stage
12
- * forge-validate ship - Validate before /ship stage
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 = ".claude/plans";
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 .claude/plans/. Run: /plan",
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, { recursive: true });
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 Validate - Prerequisite validation for workflow stages
244
+ Forge Preflight - Prerequisite validation for workflow stages
239
245
 
240
246
  Usage:
241
- forge-validate <command>
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-validate status
251
- forge-validate dev
252
- forge-validate ship
256
+ forge-preflight status
257
+ forge-preflight dev
258
+ forge-preflight ship
253
259
  `);
254
260
  }
255
261