forge-workflow 1.3.0 → 1.3.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.
- package/.claude/settings.local.json +4 -1
- package/.mcp.json.example +12 -0
- package/AGENTS.md +87 -9
- package/CLAUDE.md +108 -0
- package/bin/forge.js +181 -1
- package/docs/TOOLCHAIN.md +92 -3
- package/package.json +4 -2
|
@@ -15,7 +15,10 @@
|
|
|
15
15
|
"Bash(\"C:\\\\Program Files\\\\nodejs\\\\npm.cmd\" pkg fix)",
|
|
16
16
|
"WebFetch(domain:www.aihero.dev)",
|
|
17
17
|
"Bash(\"C:\\\\Program Files\\\\nodejs\\\\npm.cmd\" version minor --no-git-tag-version)",
|
|
18
|
-
"WebFetch(domain:ohmyopencode.com)"
|
|
18
|
+
"WebFetch(domain:ohmyopencode.com)",
|
|
19
|
+
"WebFetch(domain:grep.app)",
|
|
20
|
+
"Bash(test:*)",
|
|
21
|
+
"Bash(\"C:\\\\Program Files\\\\nodejs\\\\npm.cmd\" publish)"
|
|
19
22
|
]
|
|
20
23
|
}
|
|
21
24
|
}
|
package/AGENTS.md
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Project Instructions
|
|
2
2
|
|
|
3
3
|
This is a [describe what this project does in one sentence].
|
|
4
4
|
|
|
5
5
|
**Package manager**: npm (or specify: pnpm/yarn/bun)
|
|
6
6
|
|
|
7
7
|
**Build commands**:
|
|
8
|
+
|
|
8
9
|
```bash
|
|
9
10
|
npm install # Install dependencies
|
|
10
11
|
npm run dev # Start development
|
|
@@ -12,23 +13,100 @@ npm run build # Production build
|
|
|
12
13
|
npm test # Run tests
|
|
13
14
|
```
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Forge Workflow
|
|
19
|
+
|
|
20
|
+
This project uses the **Forge 9-stage TDD workflow**:
|
|
21
|
+
|
|
22
|
+
| Stage | Command | Purpose |
|
|
23
|
+
|-------|-------------|----------------------------------------------|
|
|
24
|
+
| 1 | `/status` | Check current context, active work |
|
|
25
|
+
| 2 | `/research` | Research with web search, document findings |
|
|
26
|
+
| 3 | `/plan` | Create implementation plan, branch, OpenSpec |
|
|
27
|
+
| 4 | `/dev` | TDD development (RED-GREEN-REFACTOR) |
|
|
28
|
+
| 5 | `/check` | Validation (type/lint/security/tests) |
|
|
29
|
+
| 6 | `/ship` | Create PR with documentation |
|
|
30
|
+
| 7 | `/review` | Address ALL PR feedback |
|
|
31
|
+
| 8 | `/merge` | Update docs, merge PR, cleanup |
|
|
32
|
+
| 9 | `/verify` | Final documentation verification |
|
|
33
|
+
|
|
34
|
+
**Flow**: `/status` → `/research` → `/plan` → `/dev` → `/check` → `/ship` → `/review` → `/merge` → `/verify`
|
|
35
|
+
|
|
36
|
+
See [docs/WORKFLOW.md](docs/WORKFLOW.md) for complete workflow guide.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Core Principles
|
|
41
|
+
|
|
42
|
+
- **TDD-First**: Write tests BEFORE implementation (RED-GREEN-REFACTOR)
|
|
43
|
+
- **Research-First**: Understand before building, document decisions
|
|
44
|
+
- **Security Built-In**: OWASP Top 10 analysis for every feature
|
|
45
|
+
- **Documentation Progressive**: Update at each stage, verify at end
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
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:
|
|
52
|
+
|
|
53
|
+
**Available MCP servers:**
|
|
54
|
+
|
|
55
|
+
- **Context7**: Up-to-date library documentation and API reference
|
|
56
|
+
- **grep.app**: Search 1M+ GitHub repos for real-world code examples
|
|
57
|
+
|
|
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.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Quick Start
|
|
16
82
|
|
|
17
|
-
|
|
83
|
+
1. `/status` - Check where you are
|
|
84
|
+
2. `/research <feature-name>` - Research the feature
|
|
85
|
+
3. `/plan <feature-slug>` - Create formal plan
|
|
86
|
+
4. `/dev` - Implement with TDD
|
|
87
|
+
5. `/check` - Validate everything
|
|
88
|
+
6. `/ship` - Create PR
|
|
18
89
|
|
|
19
90
|
---
|
|
20
91
|
|
|
21
|
-
|
|
92
|
+
## Toolchain
|
|
22
93
|
|
|
23
|
-
|
|
94
|
+
- **Beads** (recommended): `npm i -g @beads/bd && bd init` - Git-backed issue tracking
|
|
95
|
+
- **OpenSpec** (optional): `npm i -g @fission-ai/openspec && openspec init` - Spec-driven development
|
|
96
|
+
- **GitHub CLI**: `gh auth login` - PR workflow
|
|
97
|
+
|
|
98
|
+
See [docs/TOOLCHAIN.md](docs/TOOLCHAIN.md) for comprehensive tool reference.
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
<!-- USER:START - Add project-specific learnings here as you work -->
|
|
103
|
+
|
|
104
|
+
💡 **Keep this section focused** - Add patterns you discover while working.
|
|
24
105
|
|
|
25
106
|
As you work, when you give the same instruction twice, add it here:
|
|
107
|
+
|
|
26
108
|
- Coding style preferences
|
|
27
109
|
- Architecture decisions
|
|
28
110
|
- Domain concepts unique to this project
|
|
29
111
|
|
|
30
112
|
<!-- USER:END -->
|
|
31
|
-
|
|
32
|
-
---
|
|
33
|
-
|
|
34
|
-
See [`docs/TOOLCHAIN.md`](docs/TOOLCHAIN.md) for comprehensive tool reference.
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Claude Code - Project Instructions
|
|
2
|
+
|
|
3
|
+
This is a [describe what this project does in one sentence].
|
|
4
|
+
|
|
5
|
+
**Package manager**: npm (or specify: pnpm/yarn/bun)
|
|
6
|
+
|
|
7
|
+
**Build commands**:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install # Install dependencies
|
|
11
|
+
npm run dev # Start development
|
|
12
|
+
npm run build # Production build
|
|
13
|
+
npm test # Run tests
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Forge Workflow
|
|
19
|
+
|
|
20
|
+
This project uses the **Forge 9-stage TDD workflow**:
|
|
21
|
+
|
|
22
|
+
| Stage | Command | Purpose |
|
|
23
|
+
|-------|-------------|----------------------------------------------|
|
|
24
|
+
| 1 | `/status` | Check current context, active work |
|
|
25
|
+
| 2 | `/research` | Research with web search, document findings |
|
|
26
|
+
| 3 | `/plan` | Create implementation plan, branch, OpenSpec |
|
|
27
|
+
| 4 | `/dev` | TDD development (RED-GREEN-REFACTOR) |
|
|
28
|
+
| 5 | `/check` | Validation (type/lint/security/tests) |
|
|
29
|
+
| 6 | `/ship` | Create PR with documentation |
|
|
30
|
+
| 7 | `/review` | Address ALL PR feedback |
|
|
31
|
+
| 8 | `/merge` | Update docs, merge PR, cleanup |
|
|
32
|
+
| 9 | `/verify` | Final documentation verification |
|
|
33
|
+
|
|
34
|
+
**Flow**: `/status` → `/research` → `/plan` → `/dev` → `/check` → `/ship` → `/review` → `/merge` → `/verify`
|
|
35
|
+
|
|
36
|
+
See [docs/WORKFLOW.md](docs/WORKFLOW.md) for complete workflow guide.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Core Principles
|
|
41
|
+
|
|
42
|
+
- **TDD-First**: Write tests BEFORE implementation (RED-GREEN-REFACTOR)
|
|
43
|
+
- **Research-First**: Understand before building, document decisions
|
|
44
|
+
- **Security Built-In**: OWASP Top 10 analysis for every feature
|
|
45
|
+
- **Documentation Progressive**: Update at each stage, verify at end
|
|
46
|
+
|
|
47
|
+
---
|
|
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
|
+
```
|
|
67
|
+
|
|
68
|
+
**Available MCP servers**:
|
|
69
|
+
|
|
70
|
+
- **Context7**: Up-to-date library documentation and API reference
|
|
71
|
+
- **grep.app**: Search 1M+ GitHub repos for real-world code examples
|
|
72
|
+
|
|
73
|
+
See [docs/TOOLCHAIN.md](docs/TOOLCHAIN.md) for complete setup instructions.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Quick Start
|
|
78
|
+
|
|
79
|
+
1. `/status` - Check where you are
|
|
80
|
+
2. `/research <feature-name>` - Research the feature
|
|
81
|
+
3. `/plan <feature-slug>` - Create formal plan
|
|
82
|
+
4. `/dev` - Implement with TDD
|
|
83
|
+
5. `/check` - Validate everything
|
|
84
|
+
6. `/ship` - Create PR
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Toolchain
|
|
89
|
+
|
|
90
|
+
- **Beads** (recommended): `npm i -g @beads/bd && bd init` - Git-backed issue tracking
|
|
91
|
+
- **OpenSpec** (optional): `npm i -g @fission-ai/openspec && openspec init` - Spec-driven development
|
|
92
|
+
- **GitHub CLI**: `gh auth login` - PR workflow
|
|
93
|
+
|
|
94
|
+
See [docs/TOOLCHAIN.md](docs/TOOLCHAIN.md) for comprehensive tool reference.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
<!-- USER:START - Add project-specific learnings here as you work -->
|
|
99
|
+
|
|
100
|
+
💡 **Keep this section focused** - Add patterns you discover while working.
|
|
101
|
+
|
|
102
|
+
As you work, when you give the same instruction twice, add it here:
|
|
103
|
+
|
|
104
|
+
- Coding style preferences
|
|
105
|
+
- Architecture decisions
|
|
106
|
+
- Domain concepts unique to this project
|
|
107
|
+
|
|
108
|
+
<!-- USER:END -->
|
package/bin/forge.js
CHANGED
|
@@ -659,12 +659,34 @@ function detectProjectStatus() {
|
|
|
659
659
|
const status = {
|
|
660
660
|
type: 'fresh', // 'fresh', 'upgrade', or 'partial'
|
|
661
661
|
hasAgentsMd: fs.existsSync(path.join(projectRoot, 'AGENTS.md')),
|
|
662
|
+
hasClaudeMd: fs.existsSync(path.join(projectRoot, 'CLAUDE.md')),
|
|
662
663
|
hasClaudeCommands: fs.existsSync(path.join(projectRoot, '.claude/commands')),
|
|
663
664
|
hasEnvLocal: fs.existsSync(path.join(projectRoot, '.env.local')),
|
|
664
665
|
hasDocsWorkflow: fs.existsSync(path.join(projectRoot, 'docs/WORKFLOW.md')),
|
|
665
|
-
existingEnvVars: {}
|
|
666
|
+
existingEnvVars: {},
|
|
667
|
+
agentsMdSize: 0,
|
|
668
|
+
claudeMdSize: 0,
|
|
669
|
+
agentsMdLines: 0,
|
|
670
|
+
claudeMdLines: 0
|
|
666
671
|
};
|
|
667
672
|
|
|
673
|
+
// Get file sizes and line counts for context warnings
|
|
674
|
+
if (status.hasAgentsMd) {
|
|
675
|
+
const agentsPath = path.join(projectRoot, 'AGENTS.md');
|
|
676
|
+
const stats = fs.statSync(agentsPath);
|
|
677
|
+
const content = fs.readFileSync(agentsPath, 'utf8');
|
|
678
|
+
status.agentsMdSize = stats.size;
|
|
679
|
+
status.agentsMdLines = content.split('\n').length;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
if (status.hasClaudeMd) {
|
|
683
|
+
const claudePath = path.join(projectRoot, 'CLAUDE.md');
|
|
684
|
+
const stats = fs.statSync(claudePath);
|
|
685
|
+
const content = fs.readFileSync(claudePath, 'utf8');
|
|
686
|
+
status.claudeMdSize = stats.size;
|
|
687
|
+
status.claudeMdLines = content.split('\n').length;
|
|
688
|
+
}
|
|
689
|
+
|
|
668
690
|
// Determine installation type
|
|
669
691
|
if (status.hasAgentsMd && status.hasClaudeCommands && status.hasDocsWorkflow) {
|
|
670
692
|
status.type = 'upgrade'; // Full forge installation exists
|
|
@@ -681,6 +703,164 @@ function detectProjectStatus() {
|
|
|
681
703
|
return status;
|
|
682
704
|
}
|
|
683
705
|
|
|
706
|
+
// Smart file selection with context warnings
|
|
707
|
+
async function handleInstructionFiles(rl, question, selectedAgents, projectStatus) {
|
|
708
|
+
const hasClaude = selectedAgents.some(a => a.key === 'claude');
|
|
709
|
+
const hasOtherAgents = selectedAgents.some(a => a.key !== 'claude');
|
|
710
|
+
|
|
711
|
+
// Calculate estimated tokens (rough: ~4 chars per token)
|
|
712
|
+
const estimateTokens = (bytes) => Math.ceil(bytes / 4);
|
|
713
|
+
|
|
714
|
+
const result = {
|
|
715
|
+
createAgentsMd: false,
|
|
716
|
+
createClaudeMd: false,
|
|
717
|
+
skipAgentsMd: false,
|
|
718
|
+
skipClaudeMd: false
|
|
719
|
+
};
|
|
720
|
+
|
|
721
|
+
// Scenario 1: Both files exist (potential context bloat)
|
|
722
|
+
if (projectStatus.hasAgentsMd && projectStatus.hasClaudeMd) {
|
|
723
|
+
const totalLines = projectStatus.agentsMdLines + projectStatus.claudeMdLines;
|
|
724
|
+
const totalTokens = estimateTokens(projectStatus.agentsMdSize + projectStatus.claudeMdSize);
|
|
725
|
+
|
|
726
|
+
console.log('');
|
|
727
|
+
console.log('⚠️ WARNING: Multiple Instruction Files Detected');
|
|
728
|
+
console.log('='.repeat(60));
|
|
729
|
+
console.log(` AGENTS.md: ${projectStatus.agentsMdLines} lines (~${estimateTokens(projectStatus.agentsMdSize)} tokens)`);
|
|
730
|
+
console.log(` CLAUDE.md: ${projectStatus.claudeMdLines} lines (~${estimateTokens(projectStatus.claudeMdSize)} tokens)`);
|
|
731
|
+
console.log(` Total: ${totalLines} lines (~${totalTokens} tokens)`);
|
|
732
|
+
console.log('');
|
|
733
|
+
console.log(' ⚠️ Claude Code reads BOTH files on every request');
|
|
734
|
+
console.log(' ⚠️ This increases context usage and costs');
|
|
735
|
+
console.log('');
|
|
736
|
+
console.log(' Options:');
|
|
737
|
+
console.log(' 1) Keep CLAUDE.md only (recommended for Claude Code only)');
|
|
738
|
+
console.log(' 2) Keep AGENTS.md only (recommended for multi-agent users)');
|
|
739
|
+
console.log(' 3) Keep both (higher context usage)');
|
|
740
|
+
console.log('');
|
|
741
|
+
|
|
742
|
+
while (true) {
|
|
743
|
+
const choice = await question('Your choice (1/2/3) [2]: ');
|
|
744
|
+
const normalized = choice.trim() || '2';
|
|
745
|
+
|
|
746
|
+
if (normalized === '1') {
|
|
747
|
+
result.skipAgentsMd = true;
|
|
748
|
+
result.createClaudeMd = false; // Keep existing
|
|
749
|
+
console.log(' ✓ Will keep CLAUDE.md, remove AGENTS.md');
|
|
750
|
+
break;
|
|
751
|
+
} else if (normalized === '2') {
|
|
752
|
+
result.skipClaudeMd = true;
|
|
753
|
+
result.createAgentsMd = false; // Keep existing
|
|
754
|
+
console.log(' ✓ Will keep AGENTS.md, remove CLAUDE.md');
|
|
755
|
+
break;
|
|
756
|
+
} else if (normalized === '3') {
|
|
757
|
+
result.createAgentsMd = false; // Keep existing
|
|
758
|
+
result.createClaudeMd = false; // Keep existing
|
|
759
|
+
console.log(' ✓ Will keep both files (context: ~' + totalTokens + ' tokens)');
|
|
760
|
+
break;
|
|
761
|
+
} else {
|
|
762
|
+
console.log(' Please enter 1, 2, or 3');
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
return result;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
// Scenario 2: Only CLAUDE.md exists
|
|
770
|
+
if (projectStatus.hasClaudeMd && !projectStatus.hasAgentsMd) {
|
|
771
|
+
if (hasOtherAgents) {
|
|
772
|
+
console.log('');
|
|
773
|
+
console.log('📋 Found existing CLAUDE.md (' + projectStatus.claudeMdLines + ' lines)');
|
|
774
|
+
console.log(' You selected multiple agents. Recommendation:');
|
|
775
|
+
console.log(' → Migrate to AGENTS.md (works with all agents)');
|
|
776
|
+
console.log('');
|
|
777
|
+
|
|
778
|
+
const migrate = await askYesNo(question, 'Migrate CLAUDE.md to AGENTS.md?', false);
|
|
779
|
+
if (migrate) {
|
|
780
|
+
result.createAgentsMd = true;
|
|
781
|
+
result.skipClaudeMd = true;
|
|
782
|
+
console.log(' ✓ Will migrate content to AGENTS.md');
|
|
783
|
+
} else {
|
|
784
|
+
result.createAgentsMd = true;
|
|
785
|
+
result.createClaudeMd = false; // Keep existing
|
|
786
|
+
console.log(' ✓ Will keep CLAUDE.md and create AGENTS.md');
|
|
787
|
+
}
|
|
788
|
+
} else {
|
|
789
|
+
// Claude Code only - keep CLAUDE.md
|
|
790
|
+
result.createClaudeMd = false; // Keep existing
|
|
791
|
+
console.log(' ✓ Keeping existing CLAUDE.md');
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
return result;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
// Scenario 3: Only AGENTS.md exists
|
|
798
|
+
if (projectStatus.hasAgentsMd && !projectStatus.hasClaudeMd) {
|
|
799
|
+
if (hasClaude && !hasOtherAgents) {
|
|
800
|
+
console.log('');
|
|
801
|
+
console.log('📋 Found existing AGENTS.md (' + projectStatus.agentsMdLines + ' lines)');
|
|
802
|
+
console.log(' You selected Claude Code only. Options:');
|
|
803
|
+
console.log(' 1) Keep AGENTS.md (works fine)');
|
|
804
|
+
console.log(' 2) Rename to CLAUDE.md (Claude-specific naming)');
|
|
805
|
+
console.log('');
|
|
806
|
+
|
|
807
|
+
const rename = await askYesNo(question, 'Rename to CLAUDE.md?', true);
|
|
808
|
+
if (rename) {
|
|
809
|
+
result.createClaudeMd = true;
|
|
810
|
+
result.skipAgentsMd = true;
|
|
811
|
+
console.log(' ✓ Will rename to CLAUDE.md');
|
|
812
|
+
} else {
|
|
813
|
+
result.createAgentsMd = false; // Keep existing
|
|
814
|
+
console.log(' ✓ Keeping AGENTS.md');
|
|
815
|
+
}
|
|
816
|
+
} else {
|
|
817
|
+
// Multi-agent or other agents - keep AGENTS.md
|
|
818
|
+
result.createAgentsMd = false; // Keep existing
|
|
819
|
+
console.log(' ✓ Keeping existing AGENTS.md');
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
return result;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
// Scenario 4: Neither file exists (fresh install)
|
|
826
|
+
if (hasClaude && !hasOtherAgents) {
|
|
827
|
+
// Claude Code only → create CLAUDE.md
|
|
828
|
+
result.createClaudeMd = true;
|
|
829
|
+
console.log(' ✓ Will create CLAUDE.md (Claude Code specific)');
|
|
830
|
+
} else if (!hasClaude && hasOtherAgents) {
|
|
831
|
+
// Other agents only → create AGENTS.md
|
|
832
|
+
result.createAgentsMd = true;
|
|
833
|
+
console.log(' ✓ Will create AGENTS.md (universal)');
|
|
834
|
+
} else {
|
|
835
|
+
// Multiple agents including Claude → create AGENTS.md + reference CLAUDE.md
|
|
836
|
+
result.createAgentsMd = true;
|
|
837
|
+
result.createClaudeMd = true; // Will be minimal reference
|
|
838
|
+
console.log(' ✓ Will create AGENTS.md (main) + CLAUDE.md (reference)');
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
return result;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
// Create minimal CLAUDE.md that references AGENTS.md
|
|
845
|
+
function createClaudeReference(destPath) {
|
|
846
|
+
const content = `# Claude Code Instructions
|
|
847
|
+
|
|
848
|
+
See [AGENTS.md](AGENTS.md) for all project instructions.
|
|
849
|
+
|
|
850
|
+
This file exists to avoid Claude Code reading both CLAUDE.md and AGENTS.md (which doubles context usage). Keep project-level instructions in AGENTS.md.
|
|
851
|
+
|
|
852
|
+
---
|
|
853
|
+
|
|
854
|
+
<!-- Add Claude Code-specific instructions below (if needed) -->
|
|
855
|
+
<!-- Examples: MCP server setup, custom commands, Claude-only workflows -->
|
|
856
|
+
|
|
857
|
+
💡 **Keep this minimal** - Main instructions are in AGENTS.md
|
|
858
|
+
`;
|
|
859
|
+
|
|
860
|
+
fs.writeFileSync(destPath, content, 'utf8');
|
|
861
|
+
return true;
|
|
862
|
+
}
|
|
863
|
+
|
|
684
864
|
// Configure external services interactively
|
|
685
865
|
async function configureExternalServices(rl, question, selectedAgents = [], projectStatus = null) {
|
|
686
866
|
console.log('');
|
package/docs/TOOLCHAIN.md
CHANGED
|
@@ -393,9 +393,10 @@ The system SHALL support optional 2FA
|
|
|
393
393
|
|
|
394
394
|
Context7 provides current documentation that may be more recent than the AI's training data.
|
|
395
395
|
|
|
396
|
-
**Installation
|
|
396
|
+
**Installation**:
|
|
397
|
+
|
|
398
|
+
**Claude Code**: Add to `.mcp.json` in your project root:
|
|
397
399
|
|
|
398
|
-
Add to `.mcp.json` in your project root:
|
|
399
400
|
|
|
400
401
|
```json
|
|
401
402
|
{
|
|
@@ -420,6 +421,28 @@ Add to `.mcp.json` in your project root:
|
|
|
420
421
|
}
|
|
421
422
|
```
|
|
422
423
|
|
|
424
|
+
**Cline (VSCode)**:
|
|
425
|
+
1. Open VSCode Settings
|
|
426
|
+
2. Search for "Cline MCP"
|
|
427
|
+
3. Add Context7 server configuration
|
|
428
|
+
|
|
429
|
+
**Continue**: Add to `.continue/config.json`:
|
|
430
|
+
|
|
431
|
+
```json
|
|
432
|
+
{
|
|
433
|
+
"mcpServers": {
|
|
434
|
+
"context7": {
|
|
435
|
+
"command": "npx",
|
|
436
|
+
"args": ["-y", "@upstash/context7-mcp@latest"]
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
**Cursor**: Check Cursor Settings → MCP Servers for configuration options
|
|
443
|
+
|
|
444
|
+
**Other agents**: If your agent supports MCP, configure using the JSON format above
|
|
445
|
+
|
|
423
446
|
**Usage**:
|
|
424
447
|
```
|
|
425
448
|
# The AI will automatically use Context7 when you ask about libraries
|
|
@@ -434,6 +457,72 @@ Add to `.mcp.json` in your project root:
|
|
|
434
457
|
- To verify API signatures and patterns
|
|
435
458
|
- For current best practices
|
|
436
459
|
|
|
460
|
+
### grep.app - Code Search
|
|
461
|
+
|
|
462
|
+
**Package**: `@ai-tools-all/grep_app_mcp` (recommended) or `@galprz/grep-mcp`
|
|
463
|
+
**Website**: [grep.app](https://grep.app)
|
|
464
|
+
**Purpose**: Search across 1M+ public GitHub repositories for real-world code examples
|
|
465
|
+
**Used in**: `/research` stage, finding implementation patterns
|
|
466
|
+
|
|
467
|
+
grep.app provides code search across public GitHub repositories to find real-world examples and patterns.
|
|
468
|
+
|
|
469
|
+
**Installation (Claude Code)**:
|
|
470
|
+
|
|
471
|
+
Add to `.mcp.json` in your project root:
|
|
472
|
+
|
|
473
|
+
```json
|
|
474
|
+
{
|
|
475
|
+
"mcpServers": {
|
|
476
|
+
"context7": {
|
|
477
|
+
"command": "npx",
|
|
478
|
+
"args": ["-y", "@upstash/context7-mcp@latest"]
|
|
479
|
+
},
|
|
480
|
+
"grep-app": {
|
|
481
|
+
"command": "npx",
|
|
482
|
+
"args": ["-y", "@ai-tools-all/grep_app_mcp"]
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
**Or with bunx**:
|
|
489
|
+
```json
|
|
490
|
+
{
|
|
491
|
+
"mcpServers": {
|
|
492
|
+
"context7": {
|
|
493
|
+
"command": "bunx",
|
|
494
|
+
"args": ["--bun", "@upstash/context7-mcp@latest"]
|
|
495
|
+
},
|
|
496
|
+
"grep-app": {
|
|
497
|
+
"command": "bunx",
|
|
498
|
+
"args": ["--bun", "@ai-tools-all/grep_app_mcp"]
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
**Usage**:
|
|
505
|
+
```
|
|
506
|
+
# The AI will use grep.app when you need real-world examples
|
|
507
|
+
"Find examples of React useEffect cleanup patterns"
|
|
508
|
+
"Show me how others implement JWT authentication in Express"
|
|
509
|
+
"Search for rate limiting implementations in Node.js"
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
**When to use grep.app**:
|
|
513
|
+
|
|
514
|
+
- Finding real-world implementation examples
|
|
515
|
+
- Discovering coding patterns in production code
|
|
516
|
+
- Validating implementation approaches
|
|
517
|
+
- Learning from open source projects
|
|
518
|
+
|
|
519
|
+
**Context7 vs grep.app**:
|
|
520
|
+
|
|
521
|
+
| Tool | Purpose | Use When |
|
|
522
|
+
|----------------|--------------------------------|-------------------------------------------|
|
|
523
|
+
| **Context7** | Official library documentation | You need API reference, official patterns |
|
|
524
|
+
| **grep.app** | Real code in the wild | You want to see how others solve problems |
|
|
525
|
+
|
|
437
526
|
---
|
|
438
527
|
|
|
439
528
|
## External Services
|
|
@@ -658,7 +747,7 @@ gh issue create --title "..." --body "..."
|
|
|
658
747
|
| Stage | Tools Used |
|
|
659
748
|
|-------|------------|
|
|
660
749
|
| `/status` | `bd ready`, `bd list`, `git status`, `openspec list` |
|
|
661
|
-
| `/research` | Parallel AI, codebase exploration |
|
|
750
|
+
| `/research` | Parallel AI, Context7, grep.app, codebase exploration |
|
|
662
751
|
| `/plan` | `bd create`, `openspec` (if strategic), `git checkout -b` |
|
|
663
752
|
| `/dev` | Tests, code, `bd update`, `/tasks save` |
|
|
664
753
|
| `/check` | Type check, lint, tests, SonarCloud |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "forge-workflow",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
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"
|
|
@@ -44,6 +44,8 @@
|
|
|
44
44
|
".claude/",
|
|
45
45
|
"docs/",
|
|
46
46
|
"install.sh",
|
|
47
|
-
"AGENTS.md"
|
|
47
|
+
"AGENTS.md",
|
|
48
|
+
"CLAUDE.md",
|
|
49
|
+
".mcp.json.example"
|
|
48
50
|
]
|
|
49
51
|
}
|