forge-workflow 1.2.0 → 1.3.0
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 +2 -1
- package/AGENTS.md +19 -202
- package/bin/forge.js +142 -25
- package/package.json +1 -1
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"Bash(git push)",
|
|
15
15
|
"Bash(\"C:\\\\Program Files\\\\nodejs\\\\npm.cmd\" pkg fix)",
|
|
16
16
|
"WebFetch(domain:www.aihero.dev)",
|
|
17
|
-
"Bash(\"C:\\\\Program Files\\\\nodejs\\\\npm.cmd\" version minor --no-git-tag-version)"
|
|
17
|
+
"Bash(\"C:\\\\Program Files\\\\nodejs\\\\npm.cmd\" version minor --no-git-tag-version)",
|
|
18
|
+
"WebFetch(domain:ohmyopencode.com)"
|
|
18
19
|
]
|
|
19
20
|
}
|
|
20
21
|
}
|
package/AGENTS.md
CHANGED
|
@@ -1,217 +1,34 @@
|
|
|
1
|
-
#
|
|
1
|
+
# AGENTS.md
|
|
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
|
-
|
|
8
|
-
|-------|---------|-------------|
|
|
9
|
-
| 1 | `/status` | Check current context, active work, recent completions |
|
|
10
|
-
| 2 | `/research` | Deep research with web search, document to docs/research/ |
|
|
11
|
-
| 3 | `/plan` | Create implementation plan, branch, OpenSpec if strategic |
|
|
12
|
-
| 4 | `/dev` | TDD development (RED-GREEN-REFACTOR cycles) |
|
|
13
|
-
| 5 | `/check` | Validation (type/lint/security/tests) |
|
|
14
|
-
| 6 | `/ship` | Create PR with full documentation |
|
|
15
|
-
| 7 | `/review` | Address ALL PR feedback |
|
|
16
|
-
| 8 | `/merge` | Update docs, merge PR, cleanup |
|
|
17
|
-
| 9 | `/verify` | Final documentation verification |
|
|
18
|
-
|
|
19
|
-
## Workflow Flow
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
/status → /research → /plan → /dev → /check → /ship → /review → /merge → /verify
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Core Principles
|
|
26
|
-
|
|
27
|
-
- **TDD-First**: Write tests BEFORE implementation (RED-GREEN-REFACTOR)
|
|
28
|
-
- **Research-First**: Understand before building, document decisions
|
|
29
|
-
- **Security Built-In**: OWASP Top 10 analysis for every feature
|
|
30
|
-
- **Documentation Progressive**: Update at each stage, verify at end
|
|
31
|
-
|
|
32
|
-
## Prerequisites
|
|
33
|
-
|
|
34
|
-
- Git, GitHub CLI (`gh`)
|
|
35
|
-
- Beads (recommended): `npm i -g @beads/bd && bd init`
|
|
36
|
-
- OpenSpec (optional): `npm i -g @fission-ai/openspec && openspec init`
|
|
37
|
-
|
|
38
|
-
## Toolchain Quick Reference
|
|
39
|
-
|
|
40
|
-
### Beads (Issue Tracking)
|
|
7
|
+
**Build commands**:
|
|
41
8
|
```bash
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
bd close <id> # Complete
|
|
47
|
-
bd sync # Git sync (always at session end!)
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### OpenSpec (Specs - AI Commands)
|
|
51
|
-
```bash
|
|
52
|
-
/opsx:new # Start change
|
|
53
|
-
/opsx:ff # Generate all planning docs
|
|
54
|
-
/opsx:apply # Implement tasks
|
|
55
|
-
/opsx:verify # Validate
|
|
56
|
-
/opsx:archive # Complete
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### GitHub CLI
|
|
60
|
-
```bash
|
|
61
|
-
gh pr create --title "..." --body "..."
|
|
62
|
-
gh pr view <n>
|
|
63
|
-
gh pr merge <n> --squash --delete-branch
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
## Quick Start
|
|
67
|
-
|
|
68
|
-
1. `/status` - Check where you are
|
|
69
|
-
2. `/research <feature-name>` - Research the feature
|
|
70
|
-
3. `/plan <feature-slug>` - Create formal plan
|
|
71
|
-
4. `/dev` - Implement with TDD
|
|
72
|
-
5. `/check` - Validate everything
|
|
73
|
-
6. `/ship` - Create PR
|
|
74
|
-
|
|
75
|
-
## Stage Details
|
|
76
|
-
|
|
77
|
-
### 1. Status (`/status`)
|
|
78
|
-
|
|
79
|
-
Check current context before starting work:
|
|
80
|
-
- Active issues (via Beads if installed)
|
|
81
|
-
- Recent completions
|
|
82
|
-
- Current branch state
|
|
83
|
-
- OpenSpec proposals in progress
|
|
84
|
-
|
|
85
|
-
### 2. Research (`/research <feature-name>`)
|
|
86
|
-
|
|
87
|
-
Research before building:
|
|
88
|
-
- Web search for best practices
|
|
89
|
-
- Security analysis (OWASP Top 10)
|
|
90
|
-
- Existing patterns in codebase
|
|
91
|
-
- Document to `docs/research/<feature>.md`
|
|
92
|
-
|
|
93
|
-
### 3. Plan (`/plan <feature-slug>`)
|
|
94
|
-
|
|
95
|
-
Create implementation plan:
|
|
96
|
-
- Create feature branch
|
|
97
|
-
- Define scope and approach
|
|
98
|
-
- Create tracking issue (Beads)
|
|
99
|
-
- OpenSpec proposal if strategic
|
|
100
|
-
|
|
101
|
-
### 4. Development (`/dev`)
|
|
102
|
-
|
|
103
|
-
TDD implementation:
|
|
104
|
-
- RED: Write failing test
|
|
105
|
-
- GREEN: Make it pass
|
|
106
|
-
- REFACTOR: Clean up
|
|
107
|
-
- Commit after each GREEN cycle
|
|
108
|
-
|
|
109
|
-
### 5. Check (`/check`)
|
|
110
|
-
|
|
111
|
-
Validate everything:
|
|
112
|
-
- Type checking
|
|
113
|
-
- Linting
|
|
114
|
-
- Unit tests
|
|
115
|
-
- Integration tests
|
|
116
|
-
- Security scan
|
|
117
|
-
|
|
118
|
-
### 6. Ship (`/ship`)
|
|
119
|
-
|
|
120
|
-
Create pull request:
|
|
121
|
-
- Push branch
|
|
122
|
-
- Create PR with documentation
|
|
123
|
-
- Link to research doc
|
|
124
|
-
- List test coverage
|
|
125
|
-
|
|
126
|
-
### 7. Review (`/review`)
|
|
127
|
-
|
|
128
|
-
Address ALL feedback:
|
|
129
|
-
- GitHub Actions failures
|
|
130
|
-
- Code review comments
|
|
131
|
-
- Security scan issues
|
|
132
|
-
- Automated tool feedback
|
|
133
|
-
|
|
134
|
-
### 8. Merge (`/merge`)
|
|
135
|
-
|
|
136
|
-
Complete the work:
|
|
137
|
-
- Update documentation
|
|
138
|
-
- Squash merge PR
|
|
139
|
-
- Archive OpenSpec (if used)
|
|
140
|
-
- Close tracking issues
|
|
141
|
-
|
|
142
|
-
### 9. Verify (`/verify`)
|
|
143
|
-
|
|
144
|
-
Final documentation check:
|
|
145
|
-
- All docs updated
|
|
146
|
-
- Cross-references valid
|
|
147
|
-
- Examples work
|
|
148
|
-
- README current
|
|
149
|
-
|
|
150
|
-
## Directory Structure
|
|
151
|
-
|
|
152
|
-
```
|
|
153
|
-
your-project/
|
|
154
|
-
├── AGENTS.md # This file (universal)
|
|
155
|
-
├── CLAUDE.md # Claude Code
|
|
156
|
-
├── GEMINI.md # Google Antigravity
|
|
157
|
-
├── .cursorrules # Cursor
|
|
158
|
-
├── .windsurfrules # Windsurf
|
|
159
|
-
├── .clinerules # Cline/Roo Code
|
|
160
|
-
├── .github/
|
|
161
|
-
│ └── copilot-instructions.md # GitHub Copilot
|
|
162
|
-
│
|
|
163
|
-
├── .claude/commands/ # Claude Code commands
|
|
164
|
-
├── .agent/workflows/ # Antigravity workflows
|
|
165
|
-
├── .cursor/rules/ # Cursor rules
|
|
166
|
-
├── .windsurf/workflows/ # Windsurf workflows
|
|
167
|
-
├── .kilocode/workflows/ # Kilo Code workflows
|
|
168
|
-
├── .opencode/commands/ # OpenCode commands
|
|
169
|
-
├── .continue/prompts/ # Continue prompts
|
|
170
|
-
├── .roo/commands/ # Roo Code commands
|
|
171
|
-
│
|
|
172
|
-
└── docs/
|
|
173
|
-
├── planning/
|
|
174
|
-
│ └── PROGRESS.md
|
|
175
|
-
├── research/
|
|
176
|
-
│ └── TEMPLATE.md
|
|
177
|
-
└── WORKFLOW.md
|
|
9
|
+
npm install # Install dependencies
|
|
10
|
+
npm run dev # Start development
|
|
11
|
+
npm run build # Production build
|
|
12
|
+
npm test # Run tests
|
|
178
13
|
```
|
|
179
14
|
|
|
180
|
-
|
|
15
|
+
**Workflow**: See [`docs/WORKFLOW.md`](docs/WORKFLOW.md) for the 9-stage TDD workflow.
|
|
181
16
|
|
|
182
|
-
|
|
183
|
-
- `.claude/skills/forge-workflow/SKILL.md`
|
|
184
|
-
- `.agent/skills/forge-workflow/SKILL.md` (Antigravity)
|
|
185
|
-
- `.cursor/skills/forge-workflow/SKILL.md`
|
|
186
|
-
- `.windsurf/skills/forge-workflow/SKILL.md`
|
|
187
|
-
- `.kilocode/skills/forge-workflow/SKILL.md`
|
|
188
|
-
- `.cline/skills/forge-workflow/SKILL.md`
|
|
189
|
-
- `.continue/skills/forge-workflow/SKILL.md`
|
|
190
|
-
- `.opencode/skills/forge-workflow/SKILL.md`
|
|
17
|
+
**Project-specific conventions**: Add them below as you discover patterns.
|
|
191
18
|
|
|
192
|
-
|
|
19
|
+
---
|
|
193
20
|
|
|
194
|
-
|
|
21
|
+
<!-- USER:START - Add learnings here as you work -->
|
|
195
22
|
|
|
196
|
-
|
|
197
|
-
|-------|-------------|----------|--------|
|
|
198
|
-
| Claude Code | CLAUDE.md | .claude/commands/ | .claude/skills/ |
|
|
199
|
-
| Google Antigravity | GEMINI.md | .agent/workflows/ | .agent/skills/ |
|
|
200
|
-
| Cursor | .cursorrules | .cursor/rules/ | .cursor/skills/ |
|
|
201
|
-
| Windsurf | .windsurfrules | .windsurf/workflows/ | .windsurf/skills/ |
|
|
202
|
-
| Kilo Code | AGENTS.md | .kilocode/workflows/ | .kilocode/skills/ |
|
|
203
|
-
| OpenCode | AGENTS.md | .opencode/commands/ | .opencode/skills/ |
|
|
204
|
-
| Cline | .clinerules | AGENTS.md | .cline/skills/ |
|
|
205
|
-
| Roo Code | .clinerules | .roo/commands/ | - |
|
|
206
|
-
| Continue | .continuerules | .continue/prompts/ | .continue/skills/ |
|
|
207
|
-
| GitHub Copilot | .github/copilot-instructions.md | .github/prompts/ | - |
|
|
208
|
-
| Aider | AGENTS.md (via config) | In-chat | - |
|
|
23
|
+
💡 **Keep this section minimal** - Instruction budget is ~150-200 instructions max.
|
|
209
24
|
|
|
210
|
-
|
|
25
|
+
As you work, when you give the same instruction twice, add it here:
|
|
26
|
+
- Coding style preferences
|
|
27
|
+
- Architecture decisions
|
|
28
|
+
- Domain concepts unique to this project
|
|
211
29
|
|
|
212
|
-
|
|
30
|
+
<!-- USER:END -->
|
|
213
31
|
|
|
214
32
|
---
|
|
215
33
|
|
|
216
|
-
See `docs/
|
|
217
|
-
See `docs/TOOLCHAIN.md` for comprehensive tool reference.
|
|
34
|
+
See [`docs/TOOLCHAIN.md`](docs/TOOLCHAIN.md) for comprehensive tool reference.
|
package/bin/forge.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Forge v1.
|
|
4
|
+
* Forge v1.3.0 - Universal AI Agent Workflow
|
|
5
5
|
* https://github.com/harshanandak/forge
|
|
6
6
|
*
|
|
7
7
|
* Usage:
|
|
@@ -591,6 +591,49 @@ function writeEnvTokens(tokens, preserveExisting = true) {
|
|
|
591
591
|
}
|
|
592
592
|
|
|
593
593
|
// Detect existing project installation status
|
|
594
|
+
// Smart merge for AGENTS.md - preserves USER sections, updates FORGE sections
|
|
595
|
+
function smartMergeAgentsMd(existingContent, newContent) {
|
|
596
|
+
// Check if existing content has markers
|
|
597
|
+
const hasUserMarkers = existingContent.includes('<!-- USER:START') && existingContent.includes('<!-- USER:END');
|
|
598
|
+
const hasForgeMarkers = existingContent.includes('<!-- FORGE:START') && existingContent.includes('<!-- FORGE:END');
|
|
599
|
+
|
|
600
|
+
if (!hasUserMarkers || !hasForgeMarkers) {
|
|
601
|
+
// Old format without markers - return new content (let user decide via overwrite prompt)
|
|
602
|
+
return null;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
// Extract USER section from existing content
|
|
606
|
+
const userStartMatch = existingContent.match(/<!-- USER:START.*?-->([\s\S]*?)<!-- USER:END -->/);
|
|
607
|
+
const userSection = userStartMatch ? userStartMatch[0] : '';
|
|
608
|
+
|
|
609
|
+
// Extract FORGE section from new content
|
|
610
|
+
const forgeStartMatch = newContent.match(/(<!-- FORGE:START.*?-->[\s\S]*?<!-- FORGE:END -->)/);
|
|
611
|
+
const forgeSection = forgeStartMatch ? forgeStartMatch[0] : '';
|
|
612
|
+
|
|
613
|
+
// Build merged content
|
|
614
|
+
const setupInstructions = newContent.includes('<!-- FORGE:SETUP-INSTRUCTIONS')
|
|
615
|
+
? newContent.match(/(<!-- FORGE:SETUP-INSTRUCTIONS[\s\S]*?-->)/)?.[0] || ''
|
|
616
|
+
: '';
|
|
617
|
+
|
|
618
|
+
let merged = '# AGENTS.md\n\n';
|
|
619
|
+
|
|
620
|
+
// Add setup instructions if this is first-time setup
|
|
621
|
+
if (setupInstructions && !existingContent.includes('FORGE:SETUP-INSTRUCTIONS')) {
|
|
622
|
+
merged += setupInstructions + '\n\n';
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
// Add preserved USER section
|
|
626
|
+
merged += userSection + '\n\n';
|
|
627
|
+
|
|
628
|
+
// Add updated FORGE section
|
|
629
|
+
merged += forgeSection + '\n\n';
|
|
630
|
+
|
|
631
|
+
// Add footer
|
|
632
|
+
merged += `---\n\n## 💡 Improving This Workflow\n\nEvery time you give the same instruction twice, add it to this file:\n1. User-specific rules → Add to USER:START section above\n2. Forge workflow improvements → Suggest to forge maintainers\n\n**Keep this file updated as you learn about the project.**\n\n---\n\nSee \`docs/WORKFLOW.md\` for complete workflow guide.\nSee \`docs/TOOLCHAIN.md\` for comprehensive tool reference.\n`;
|
|
633
|
+
|
|
634
|
+
return merged;
|
|
635
|
+
}
|
|
636
|
+
|
|
594
637
|
// Helper function for yes/no prompts with validation
|
|
595
638
|
async function askYesNo(question, prompt, defaultNo = true) {
|
|
596
639
|
const defaultText = defaultNo ? '[n]' : '[y]';
|
|
@@ -888,7 +931,7 @@ function showBanner(subtitle = 'Universal AI Agent Workflow') {
|
|
|
888
931
|
console.log(' ██╔══╝ ██║ ██║██╔══██╗██║ ██║██╔══╝ ');
|
|
889
932
|
console.log(' ██║ ╚██████╔╝██║ ██║╚██████╔╝███████╗');
|
|
890
933
|
console.log(' ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝');
|
|
891
|
-
console.log(' v1.
|
|
934
|
+
console.log(' v1.3.0');
|
|
892
935
|
console.log('');
|
|
893
936
|
if (subtitle) {
|
|
894
937
|
console.log(` ${subtitle}`);
|
|
@@ -1289,8 +1332,28 @@ async function interactiveSetup() {
|
|
|
1289
1332
|
console.log(' Skipped: AGENTS.md (keeping existing)');
|
|
1290
1333
|
} else {
|
|
1291
1334
|
const agentsSrc = path.join(packageDir, 'AGENTS.md');
|
|
1292
|
-
|
|
1293
|
-
|
|
1335
|
+
const agentsDest = path.join(projectRoot, 'AGENTS.md');
|
|
1336
|
+
|
|
1337
|
+
// Try smart merge if file exists
|
|
1338
|
+
if (fs.existsSync(agentsDest)) {
|
|
1339
|
+
const existingContent = fs.readFileSync(agentsDest, 'utf8');
|
|
1340
|
+
const newContent = fs.readFileSync(agentsSrc, 'utf8');
|
|
1341
|
+
const merged = smartMergeAgentsMd(existingContent, newContent);
|
|
1342
|
+
|
|
1343
|
+
if (merged) {
|
|
1344
|
+
fs.writeFileSync(agentsDest, merged, 'utf8');
|
|
1345
|
+
console.log(' Updated: AGENTS.md (preserved USER sections)');
|
|
1346
|
+
} else {
|
|
1347
|
+
// No markers, do normal copy (user already approved overwrite)
|
|
1348
|
+
if (copyFile(agentsSrc, 'AGENTS.md')) {
|
|
1349
|
+
console.log(' Updated: AGENTS.md (universal standard)');
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
} else {
|
|
1353
|
+
// New file
|
|
1354
|
+
if (copyFile(agentsSrc, 'AGENTS.md')) {
|
|
1355
|
+
console.log(' Created: AGENTS.md (universal standard)');
|
|
1356
|
+
}
|
|
1294
1357
|
}
|
|
1295
1358
|
}
|
|
1296
1359
|
|
|
@@ -1348,7 +1411,7 @@ async function interactiveSetup() {
|
|
|
1348
1411
|
// =============================================
|
|
1349
1412
|
console.log('');
|
|
1350
1413
|
console.log('==============================================');
|
|
1351
|
-
console.log(' Forge v1.
|
|
1414
|
+
console.log(' Forge v1.3.0 Setup Complete!');
|
|
1352
1415
|
console.log('==============================================');
|
|
1353
1416
|
console.log('');
|
|
1354
1417
|
console.log('What\'s installed:');
|
|
@@ -1372,16 +1435,33 @@ async function interactiveSetup() {
|
|
|
1372
1435
|
}
|
|
1373
1436
|
});
|
|
1374
1437
|
console.log('');
|
|
1375
|
-
console.log('
|
|
1376
|
-
console.log(
|
|
1377
|
-
console.log(
|
|
1378
|
-
console.log(` ${PKG_MANAGER} install -g @fission-ai/openspec`);
|
|
1379
|
-
console.log(' 2. Start with: /status');
|
|
1380
|
-
console.log(' 3. Read the guide: docs/WORKFLOW.md');
|
|
1438
|
+
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
1439
|
+
console.log('📋 NEXT STEP - Complete AGENTS.md');
|
|
1440
|
+
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
1381
1441
|
console.log('');
|
|
1382
|
-
console.log(
|
|
1442
|
+
console.log('Ask your AI agent:');
|
|
1443
|
+
console.log(' "Fill in the project description in AGENTS.md"');
|
|
1383
1444
|
console.log('');
|
|
1384
|
-
console.log('
|
|
1445
|
+
console.log('The agent will:');
|
|
1446
|
+
console.log(' ✓ Add one-sentence project description');
|
|
1447
|
+
console.log(' ✓ Confirm package manager');
|
|
1448
|
+
console.log(' ✓ Verify build commands');
|
|
1449
|
+
console.log('');
|
|
1450
|
+
console.log('Takes ~30 seconds. Done!');
|
|
1451
|
+
console.log('');
|
|
1452
|
+
console.log('💡 As you work: Add project patterns to AGENTS.md');
|
|
1453
|
+
console.log(' USER:START section. Keep it minimal - budget is');
|
|
1454
|
+
console.log(' ~150-200 instructions max.');
|
|
1455
|
+
console.log('');
|
|
1456
|
+
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
1457
|
+
console.log('');
|
|
1458
|
+
console.log('Optional tools:');
|
|
1459
|
+
console.log(` ${PKG_MANAGER} install -g @beads/bd && bd init`);
|
|
1460
|
+
console.log(` ${PKG_MANAGER} install -g @fission-ai/openspec`);
|
|
1461
|
+
console.log('');
|
|
1462
|
+
console.log('Start with: /status');
|
|
1463
|
+
console.log('');
|
|
1464
|
+
console.log(`Package manager: ${PKG_MANAGER}`);
|
|
1385
1465
|
console.log('');
|
|
1386
1466
|
}
|
|
1387
1467
|
|
|
@@ -1569,7 +1649,7 @@ async function quickSetup(selectedAgents, skipExternal) {
|
|
|
1569
1649
|
// Final summary
|
|
1570
1650
|
console.log('');
|
|
1571
1651
|
console.log('==============================================');
|
|
1572
|
-
console.log(' Forge v1.
|
|
1652
|
+
console.log(' Forge v1.3.0 Quick Setup Complete!');
|
|
1573
1653
|
console.log('==============================================');
|
|
1574
1654
|
console.log('');
|
|
1575
1655
|
console.log('Next steps:');
|
|
@@ -1733,8 +1813,28 @@ async function interactiveSetupWithFlags(flags) {
|
|
|
1733
1813
|
console.log(' Skipped: AGENTS.md (keeping existing)');
|
|
1734
1814
|
} else {
|
|
1735
1815
|
const agentsSrc = path.join(packageDir, 'AGENTS.md');
|
|
1736
|
-
|
|
1737
|
-
|
|
1816
|
+
const agentsDest = path.join(projectRoot, 'AGENTS.md');
|
|
1817
|
+
|
|
1818
|
+
// Try smart merge if file exists
|
|
1819
|
+
if (fs.existsSync(agentsDest)) {
|
|
1820
|
+
const existingContent = fs.readFileSync(agentsDest, 'utf8');
|
|
1821
|
+
const newContent = fs.readFileSync(agentsSrc, 'utf8');
|
|
1822
|
+
const merged = smartMergeAgentsMd(existingContent, newContent);
|
|
1823
|
+
|
|
1824
|
+
if (merged) {
|
|
1825
|
+
fs.writeFileSync(agentsDest, merged, 'utf8');
|
|
1826
|
+
console.log(' Updated: AGENTS.md (preserved USER sections)');
|
|
1827
|
+
} else {
|
|
1828
|
+
// No markers, do normal copy (user already approved overwrite)
|
|
1829
|
+
if (copyFile(agentsSrc, 'AGENTS.md')) {
|
|
1830
|
+
console.log(' Updated: AGENTS.md (universal standard)');
|
|
1831
|
+
}
|
|
1832
|
+
}
|
|
1833
|
+
} else {
|
|
1834
|
+
// New file
|
|
1835
|
+
if (copyFile(agentsSrc, 'AGENTS.md')) {
|
|
1836
|
+
console.log(' Created: AGENTS.md (universal standard)');
|
|
1837
|
+
}
|
|
1738
1838
|
}
|
|
1739
1839
|
}
|
|
1740
1840
|
|
|
@@ -1797,7 +1897,7 @@ async function interactiveSetupWithFlags(flags) {
|
|
|
1797
1897
|
// =============================================
|
|
1798
1898
|
console.log('');
|
|
1799
1899
|
console.log('==============================================');
|
|
1800
|
-
console.log(' Forge v1.
|
|
1900
|
+
console.log(' Forge v1.3.0 Setup Complete!');
|
|
1801
1901
|
console.log('==============================================');
|
|
1802
1902
|
console.log('');
|
|
1803
1903
|
console.log('What\'s installed:');
|
|
@@ -1821,16 +1921,33 @@ async function interactiveSetupWithFlags(flags) {
|
|
|
1821
1921
|
}
|
|
1822
1922
|
});
|
|
1823
1923
|
console.log('');
|
|
1824
|
-
console.log('
|
|
1825
|
-
console.log(
|
|
1826
|
-
console.log(
|
|
1827
|
-
console.log(` ${PKG_MANAGER} install -g @fission-ai/openspec`);
|
|
1828
|
-
console.log(' 2. Start with: /status');
|
|
1829
|
-
console.log(' 3. Read the guide: docs/WORKFLOW.md');
|
|
1924
|
+
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
1925
|
+
console.log('📋 NEXT STEP - Complete AGENTS.md');
|
|
1926
|
+
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
1830
1927
|
console.log('');
|
|
1831
|
-
console.log(
|
|
1928
|
+
console.log('Ask your AI agent:');
|
|
1929
|
+
console.log(' "Fill in the project description in AGENTS.md"');
|
|
1832
1930
|
console.log('');
|
|
1833
|
-
console.log('
|
|
1931
|
+
console.log('The agent will:');
|
|
1932
|
+
console.log(' ✓ Add one-sentence project description');
|
|
1933
|
+
console.log(' ✓ Confirm package manager');
|
|
1934
|
+
console.log(' ✓ Verify build commands');
|
|
1935
|
+
console.log('');
|
|
1936
|
+
console.log('Takes ~30 seconds. Done!');
|
|
1937
|
+
console.log('');
|
|
1938
|
+
console.log('💡 As you work: Add project patterns to AGENTS.md');
|
|
1939
|
+
console.log(' USER:START section. Keep it minimal - budget is');
|
|
1940
|
+
console.log(' ~150-200 instructions max.');
|
|
1941
|
+
console.log('');
|
|
1942
|
+
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
1943
|
+
console.log('');
|
|
1944
|
+
console.log('Optional tools:');
|
|
1945
|
+
console.log(` ${PKG_MANAGER} install -g @beads/bd && bd init`);
|
|
1946
|
+
console.log(` ${PKG_MANAGER} install -g @fission-ai/openspec`);
|
|
1947
|
+
console.log('');
|
|
1948
|
+
console.log('Start with: /status');
|
|
1949
|
+
console.log('');
|
|
1950
|
+
console.log(`Package manager: ${PKG_MANAGER}`);
|
|
1834
1951
|
console.log('');
|
|
1835
1952
|
}
|
|
1836
1953
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "forge-workflow",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
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"
|