forge-workflow 1.4.3 → 1.4.5

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.
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: forge-workflow
3
+ description: 9-stage TDD-first workflow for feature development. Use when building features, fixing bugs, or shipping PRs.
4
+ category: Development Workflow
5
+ tags: [tdd, workflow, pr, git, testing]
6
+ tools: [Bash, Read, Write, Edit, Grep, Glob]
7
+ ---
8
+
9
+ # Forge Workflow Skill
10
+
11
+ A TDD-first workflow for AI coding agents. Ship features with confidence.
12
+
13
+ ## When to Use
14
+
15
+ Automatically invoke this skill when the user wants to:
16
+ - Build a new feature
17
+ - Fix a bug
18
+ - Create a pull request
19
+ - Run the development workflow
20
+
21
+ ## 9 Stages
22
+
23
+ | Stage | Command | Description |
24
+ |-------|---------|-------------|
25
+ | 1 | `/status` | Check current context, active work, recent completions |
26
+ | 2 | `/research` | Deep research with web search, document to docs/research/ |
27
+ | 3 | `/plan` | Create implementation plan, branch, OpenSpec if strategic |
28
+ | 4 | `/dev` | TDD development (RED-GREEN-REFACTOR cycles) |
29
+ | 5 | `/check` | Validation (type/lint/security/tests) |
30
+ | 6 | `/ship` | Create PR with full documentation |
31
+ | 7 | `/review` | Address ALL PR feedback |
32
+ | 8 | `/merge` | Update docs, merge PR, cleanup |
33
+ | 9 | `/verify` | Final documentation verification |
34
+
35
+ ## Workflow Flow
36
+
37
+ ```
38
+ /status -> /research -> /plan -> /dev -> /check -> /ship -> /review -> /merge -> /verify
39
+ ```
40
+
41
+ ## Core Principles
42
+
43
+ - **TDD-First**: Write tests BEFORE implementation (RED-GREEN-REFACTOR)
44
+ - **Research-First**: Understand before building, document decisions
45
+ - **Security Built-In**: OWASP Top 10 analysis for every feature
46
+ - **Documentation Progressive**: Update at each stage, verify at end
package/CLAUDE.md CHANGED
@@ -1,4 +1,4 @@
1
- # Claude Code - Project Instructions
1
+ # Project Instructions
2
2
 
3
3
  This is a [describe what this project does in one sentence].
4
4
 
@@ -46,31 +46,35 @@ See [docs/WORKFLOW.md](docs/WORKFLOW.md) for complete workflow guide.
46
46
 
47
47
  ---
48
48
 
49
- ## MCP Servers
50
-
51
- This project uses MCP servers for enhanced capabilities. Copy [.mcp.json.example](.mcp.json.example) to `.mcp.json`:
52
-
53
- ```json
54
- {
55
- "mcpServers": {
56
- "context7": {
57
- "command": "npx",
58
- "args": ["-y", "@upstash/context7-mcp@latest"]
59
- },
60
- "grep-app": {
61
- "command": "npx",
62
- "args": ["-y", "@ai-tools-all/grep_app_mcp"]
63
- }
64
- }
65
- }
66
- ```
49
+ ## MCP Servers (Enhanced Capabilities)
50
+
51
+ This project uses MCP (Model Context Protocol) servers for enhanced capabilities. If your AI agent supports MCP, set up these servers:
67
52
 
68
- **Available MCP servers**:
53
+ **Available MCP servers:**
69
54
 
70
55
  - **Context7**: Up-to-date library documentation and API reference
71
56
  - **grep.app**: Search 1M+ GitHub repos for real-world code examples
72
57
 
73
- See [docs/TOOLCHAIN.md](docs/TOOLCHAIN.md) for complete setup instructions.
58
+ **Setup for your agent:**
59
+
60
+ See [.mcp.json.example](.mcp.json.example) for configuration. Setup varies by agent:
61
+
62
+ - **Claude Code**: Copy `.mcp.json.example` to `.mcp.json` in project root
63
+ - **Cline**: Add MCP servers in VSCode settings (Extensions > Cline > MCP Servers)
64
+ - **Continue**: Add to `.continue/config.json` under `mcpServers`
65
+ - **Cursor**: Check Cursor Settings > MCP for setup
66
+ - **Your agent**: If MCP-capable, configure using the example file
67
+
68
+ **Agent instructions:**
69
+
70
+ ```text
71
+ If you support MCP and don't have these servers configured:
72
+ 1. Read .mcp.json.example to see the configuration
73
+ 2. Set up Context7 and grep.app based on your MCP implementation
74
+ 3. Verify by testing: "Search grep.app for React hooks examples"
75
+ ```
76
+
77
+ See [docs/TOOLCHAIN.md](docs/TOOLCHAIN.md) for detailed MCP setup instructions.
74
78
 
75
79
  ---
76
80
 
package/bin/forge.js CHANGED
@@ -1,9 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  /**
4
- * Forge v1.3.0 - Universal AI Agent Workflow
4
+ * Forge - Universal AI Agent Workflow
5
5
  * https://github.com/harshanandak/forge
6
6
  *
7
+ * Version is automatically read from package.json
8
+ *
7
9
  * Usage:
8
10
  * npm install forge-workflow -> Minimal install (AGENTS.md + docs)
9
11
  * npx forge setup -> Interactive agent configuration
@@ -35,9 +37,13 @@ const path = require('path');
35
37
  const readline = require('readline');
36
38
  const { execSync } = require('child_process');
37
39
 
38
- // Get the project root and package directory
39
- const projectRoot = process.env.INIT_CWD || process.cwd();
40
+ // Get version from package.json (single source of truth)
40
41
  const packageDir = path.dirname(__dirname);
42
+ const packageJson = require(path.join(packageDir, 'package.json'));
43
+ const VERSION = packageJson.version;
44
+
45
+ // Get the project root
46
+ const projectRoot = process.env.INIT_CWD || process.cwd();
41
47
  const args = process.argv.slice(2);
42
48
 
43
49
  // Detected package manager
@@ -1458,13 +1464,49 @@ function showBanner(subtitle = 'Universal AI Agent Workflow') {
1458
1464
  console.log(' ██╔══╝ ██║ ██║██╔══██╗██║ ██║██╔══╝ ');
1459
1465
  console.log(' ██║ ╚██████╔╝██║ ██║╚██████╔╝███████╗');
1460
1466
  console.log(' ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝');
1461
- console.log(' v1.3.0');
1467
+ console.log(` v${VERSION}`);
1462
1468
  console.log('');
1463
1469
  if (subtitle) {
1464
1470
  console.log(` ${subtitle}`);
1465
1471
  }
1466
1472
  }
1467
1473
 
1474
+ // Setup core documentation and directories
1475
+ function setupCoreDocs() {
1476
+ // Create core directories
1477
+ ensureDir('docs/planning');
1478
+ ensureDir('docs/research');
1479
+
1480
+ // Copy WORKFLOW.md
1481
+ const workflowSrc = path.join(packageDir, 'docs/WORKFLOW.md');
1482
+ if (copyFile(workflowSrc, 'docs/WORKFLOW.md')) {
1483
+ console.log(' Created: docs/WORKFLOW.md');
1484
+ }
1485
+
1486
+ // Copy research TEMPLATE.md
1487
+ const templateSrc = path.join(packageDir, 'docs/research/TEMPLATE.md');
1488
+ if (copyFile(templateSrc, 'docs/research/TEMPLATE.md')) {
1489
+ console.log(' Created: docs/research/TEMPLATE.md');
1490
+ }
1491
+
1492
+ // Create PROGRESS.md if not exists
1493
+ const progressPath = path.join(projectRoot, 'docs/planning/PROGRESS.md');
1494
+ if (!fs.existsSync(progressPath)) {
1495
+ writeFile('docs/planning/PROGRESS.md', `# Project Progress
1496
+
1497
+ ## Current Focus
1498
+ <!-- What you're working on -->
1499
+
1500
+ ## Completed
1501
+ <!-- Completed features -->
1502
+
1503
+ ## Upcoming
1504
+ <!-- Next priorities -->
1505
+ `);
1506
+ console.log(' Created: docs/planning/PROGRESS.md');
1507
+ }
1508
+ }
1509
+
1468
1510
  // Minimal installation (postinstall)
1469
1511
  function minimalInstall() {
1470
1512
  // Check if this looks like a project (has package.json)
@@ -1487,9 +1529,8 @@ function minimalInstall() {
1487
1529
  showBanner();
1488
1530
  console.log('');
1489
1531
 
1490
- // Create core directories
1491
- ensureDir('docs/planning');
1492
- ensureDir('docs/research');
1532
+ // Setup core documentation
1533
+ setupCoreDocs();
1493
1534
 
1494
1535
  // Copy AGENTS.md (only if not exists - preserve user customizations in minimal install)
1495
1536
  const agentsPath = path.join(projectRoot, 'AGENTS.md');
@@ -1509,34 +1550,6 @@ function minimalInstall() {
1509
1550
  }
1510
1551
  }
1511
1552
 
1512
- // Copy documentation
1513
- const workflowSrc = path.join(packageDir, 'docs/WORKFLOW.md');
1514
- if (copyFile(workflowSrc, 'docs/WORKFLOW.md')) {
1515
- console.log(' Created: docs/WORKFLOW.md');
1516
- }
1517
-
1518
- const templateSrc = path.join(packageDir, 'docs/research/TEMPLATE.md');
1519
- if (copyFile(templateSrc, 'docs/research/TEMPLATE.md')) {
1520
- console.log(' Created: docs/research/TEMPLATE.md');
1521
- }
1522
-
1523
- // Create PROGRESS.md if not exists
1524
- const progressPath = path.join(projectRoot, 'docs/planning/PROGRESS.md');
1525
- if (!fs.existsSync(progressPath)) {
1526
- writeFile('docs/planning/PROGRESS.md', `# Project Progress
1527
-
1528
- ## Current Focus
1529
- <!-- What you're working on -->
1530
-
1531
- ## Completed
1532
- <!-- Completed features -->
1533
-
1534
- ## Upcoming
1535
- <!-- Next priorities -->
1536
- `);
1537
- console.log(' Created: docs/planning/PROGRESS.md');
1538
- }
1539
-
1540
1553
  console.log('');
1541
1554
  console.log('Minimal installation complete!');
1542
1555
  console.log('');
@@ -1897,6 +1910,11 @@ async function interactiveSetup() {
1897
1910
  }
1898
1911
  }
1899
1912
  }
1913
+ console.log('');
1914
+
1915
+ // Setup core documentation
1916
+ setupCoreDocs();
1917
+ console.log('');
1900
1918
 
1901
1919
  // Load Claude commands if needed
1902
1920
  let claudeCommands = {};
@@ -1952,7 +1970,7 @@ async function interactiveSetup() {
1952
1970
  // =============================================
1953
1971
  console.log('');
1954
1972
  console.log('==============================================');
1955
- console.log(' Forge v1.3.0 Setup Complete!');
1973
+ console.log(` Forge v${VERSION} Setup Complete!`);
1956
1974
  console.log('==============================================');
1957
1975
  console.log('');
1958
1976
  console.log('What\'s installed:');
@@ -2128,6 +2146,11 @@ async function quickSetup(selectedAgents, skipExternal) {
2128
2146
  if (copyFile(agentsSrc, 'AGENTS.md')) {
2129
2147
  console.log(' Created: AGENTS.md (universal standard)');
2130
2148
  }
2149
+ console.log('');
2150
+
2151
+ // Setup core documentation
2152
+ setupCoreDocs();
2153
+ console.log('');
2131
2154
 
2132
2155
  // Load Claude commands if needed
2133
2156
  let claudeCommands = {};
@@ -2190,7 +2213,7 @@ async function quickSetup(selectedAgents, skipExternal) {
2190
2213
  // Final summary
2191
2214
  console.log('');
2192
2215
  console.log('==============================================');
2193
- console.log(' Forge v1.3.0 Quick Setup Complete!');
2216
+ console.log(` Forge v${VERSION} Quick Setup Complete!`);
2194
2217
  console.log('==============================================');
2195
2218
  console.log('');
2196
2219
  console.log('Next steps:');
@@ -2385,6 +2408,11 @@ async function interactiveSetupWithFlags(flags) {
2385
2408
  }
2386
2409
  }
2387
2410
  }
2411
+ console.log('');
2412
+
2413
+ // Setup core documentation
2414
+ setupCoreDocs();
2415
+ console.log('');
2388
2416
 
2389
2417
  // Load Claude commands if needed
2390
2418
  let claudeCommands = {};
@@ -2445,7 +2473,7 @@ async function interactiveSetupWithFlags(flags) {
2445
2473
  // =============================================
2446
2474
  console.log('');
2447
2475
  console.log('==============================================');
2448
- console.log(' Forge v1.3.0 Setup Complete!');
2476
+ console.log(` Forge v${VERSION} Setup Complete!`);
2449
2477
  console.log('==============================================');
2450
2478
  console.log('');
2451
2479
  console.log('What\'s installed:');
@@ -2581,6 +2609,11 @@ async function main() {
2581
2609
  if (copyFile(agentsSrc, 'AGENTS.md')) {
2582
2610
  console.log(' Created: AGENTS.md (universal standard)');
2583
2611
  }
2612
+ console.log('');
2613
+
2614
+ // Setup core documentation
2615
+ setupCoreDocs();
2616
+ console.log('');
2584
2617
 
2585
2618
  // Load Claude commands if needed
2586
2619
  let claudeCommands = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "forge-workflow",
3
- "version": "1.4.3",
3
+ "version": "1.4.5",
4
4
  "description": "9-stage TDD workflow for ALL AI coding agents (Claude, Cursor, Windsurf, Kilo, OpenCode, Copilot, Cline, Roo, Aider, Continue, Antigravity)",
5
5
  "bin": {
6
6
  "forge": "bin/forge.js"