forge-workflow 0.0.8 → 0.0.9
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/premerge.md +2 -2
- package/.claude/commands/review.md +5 -2
- package/.claude/commands/ship.md +4 -3
- package/.claude/rules/greptile-review-process.md +4 -4
- package/.cline/workflows/premerge.md +2 -2
- package/.cline/workflows/review.md +5 -2
- package/.cline/workflows/ship.md +4 -3
- package/.codex/skills/premerge/SKILL.md +2 -2
- package/.codex/skills/review/SKILL.md +5 -2
- package/.codex/skills/ship/SKILL.md +4 -3
- package/.cursor/commands/premerge.md +2 -2
- package/.cursor/commands/review.md +5 -2
- package/.cursor/commands/ship.md +4 -3
- package/.github/prompts/premerge.prompt.md +2 -2
- package/.github/prompts/review.prompt.md +5 -2
- package/.github/prompts/ship.prompt.md +4 -3
- package/.github/workflows/beads-to-github.yml +1 -1
- package/.github/workflows/github-to-beads.yml +1 -1
- package/.kilocode/workflows/premerge.md +2 -2
- package/.kilocode/workflows/review.md +5 -2
- package/.kilocode/workflows/ship.md +4 -3
- package/.opencode/commands/premerge.md +2 -2
- package/.opencode/commands/review.md +5 -2
- package/.opencode/commands/ship.md +4 -3
- package/.roo/commands/premerge.md +2 -2
- package/.roo/commands/review.md +5 -2
- package/.roo/commands/ship.md +4 -3
- package/AGENTS.md +9 -9
- package/README.md +12 -6
- package/bin/forge.js +14 -3
- package/docs/BEADS_GITHUB_SYNC.md +6 -2
- package/docs/EXAMPLES.md +22 -22
- package/docs/ROADMAP.md +3 -3
- package/docs/TOOLCHAIN.md +60 -52
- package/lib/agents/codex.plugin.json +3 -0
- package/lib/agents-config.js +18 -12
- package/lib/codex-skills.js +54 -1
- package/lib/commands/plan.js +5 -2
- package/lib/commands/setup.js +231 -17
- package/lib/commands/ship.js +188 -5
- package/lib/commands/status.js +20 -33
- package/lib/commands/test.js +90 -25
- package/lib/commands/validate.js +218 -1
- package/lib/setup-action-log.js +2 -0
- package/lib/setup-summary-renderer.js +15 -11
- package/lib/workflow/enforce-stage.js +12 -8
- package/lib/workflow/state-manager.js +193 -0
- package/package.json +1 -1
- package/scripts/dep-guard.sh +11 -1
- package/scripts/forge-team/lib/hooks.sh +1 -1
- package/scripts/forge-team/lib/verify.sh +1 -1
- package/scripts/forge-team/lib/workload.sh +56 -27
- package/scripts/forge-team/tests/workload.test.sh +35 -4
- package/scripts/github-beads-sync/run-bd.mjs +4 -2
- package/scripts/smart-status.sh +10 -1
- package/scripts/sync-utils.sh +39 -0
- package/scripts/test.js +144 -38
|
@@ -3,10 +3,14 @@
|
|
|
3
3
|
Automatic synchronization between GitHub Issues and Beads issue tracking.
|
|
4
4
|
|
|
5
5
|
**GitHub Issues** = human/team/public interface.
|
|
6
|
-
**Beads** =
|
|
6
|
+
**Beads** = issue engine behind Forge (`forge ready`, `forge close`).
|
|
7
7
|
|
|
8
8
|
Neither side needs to know about the other. Contributors file issues on GitHub; AI agents pick up work via Beads. Status changes propagate automatically.
|
|
9
9
|
|
|
10
|
+
For human and agent workflows, prefer the Forge wrapper commands (`forge ready`,
|
|
11
|
+
`forge create`, `forge close`, `forge sync`). The workflow automation shown below
|
|
12
|
+
still calls `bd` directly as an internal implementation detail.
|
|
13
|
+
|
|
10
14
|
---
|
|
11
15
|
|
|
12
16
|
## Architecture
|
|
@@ -48,7 +52,7 @@ sequenceDiagram
|
|
|
48
52
|
participant WF as GitHub Actions
|
|
49
53
|
participant GH as GitHub Issues
|
|
50
54
|
|
|
51
|
-
AI->>BD:
|
|
55
|
+
AI->>BD: forge close forge-abc
|
|
52
56
|
BD->>Repo: Update issues.jsonl
|
|
53
57
|
AI->>Repo: git push
|
|
54
58
|
Repo->>WF: push trigger (paths: .beads/**)
|
package/docs/EXAMPLES.md
CHANGED
|
@@ -109,7 +109,7 @@ git commit -m "feat: add health check endpoint"
|
|
|
109
109
|
/status
|
|
110
110
|
|
|
111
111
|
# If Beads installed:
|
|
112
|
-
|
|
112
|
+
forge create "SQL injection in search endpoint" \
|
|
113
113
|
--type bug \
|
|
114
114
|
--priority 0 \
|
|
115
115
|
--label "security,critical"
|
|
@@ -224,7 +224,7 @@ OWASP A03:2021 Injection"
|
|
|
224
224
|
# ═══════════════════════════════════════════════════════════
|
|
225
225
|
/status
|
|
226
226
|
|
|
227
|
-
|
|
227
|
+
forge create "Extract auth logic to service" \
|
|
228
228
|
--type chore \
|
|
229
229
|
--priority 2
|
|
230
230
|
|
|
@@ -337,35 +337,35 @@ Team of 3 developers:
|
|
|
337
337
|
# PROJECT SETUP (Once per project)
|
|
338
338
|
# ═══════════════════════════════════════════════════════════
|
|
339
339
|
bd init --prefix SHOP
|
|
340
|
-
|
|
340
|
+
forge sync # Sync initial Beads state
|
|
341
341
|
|
|
342
342
|
# ═══════════════════════════════════════════════════════════
|
|
343
343
|
# ALICE: Payment Integration
|
|
344
344
|
# ═══════════════════════════════════════════════════════════
|
|
345
345
|
|
|
346
346
|
# Morning: Check what's available
|
|
347
|
-
|
|
347
|
+
forge ready
|
|
348
348
|
# Output:
|
|
349
349
|
# SHOP-1: Payment integration (ready)
|
|
350
350
|
# SHOP-3: Admin dashboard (ready)
|
|
351
351
|
|
|
352
352
|
# Claim work
|
|
353
|
-
|
|
353
|
+
forge claim SHOP-1
|
|
354
354
|
/status
|
|
355
355
|
/plan stripe-payment-integration
|
|
356
356
|
/dev
|
|
357
357
|
|
|
358
358
|
# Midday: Progress update
|
|
359
|
-
bd comments SHOP-1 "Stripe SDK integrated, working on webhooks"
|
|
359
|
+
bd comments add SHOP-1 "Stripe SDK integrated, working on webhooks"
|
|
360
360
|
|
|
361
361
|
# Afternoon: Blocked on API keys
|
|
362
|
-
|
|
362
|
+
forge update SHOP-1 --status blocked --comment "Need production Stripe API keys"
|
|
363
363
|
|
|
364
364
|
# Create dependency
|
|
365
|
-
|
|
365
|
+
forge create "Get Stripe API keys from DevOps" --type chore --priority 1
|
|
366
366
|
bd dep add SHOP-1 SHOP-5 # SHOP-1 depends on SHOP-5
|
|
367
367
|
|
|
368
|
-
|
|
368
|
+
forge sync # Push Beads state
|
|
369
369
|
|
|
370
370
|
# ═══════════════════════════════════════════════════════════
|
|
371
371
|
# BOB: Email Notifications (Same Time)
|
|
@@ -373,24 +373,24 @@ bd sync # Push to git
|
|
|
373
373
|
|
|
374
374
|
# Morning: Pull latest, check work
|
|
375
375
|
git pull
|
|
376
|
-
|
|
376
|
+
forge sync # Sync with Alice's updates
|
|
377
377
|
|
|
378
|
-
|
|
378
|
+
forge ready
|
|
379
379
|
# Output:
|
|
380
380
|
# SHOP-3: Admin dashboard (ready)
|
|
381
381
|
# SHOP-2: Email notifications (ready)
|
|
382
382
|
|
|
383
383
|
# Claim different feature
|
|
384
|
-
|
|
384
|
+
forge claim SHOP-2
|
|
385
385
|
/plan email-notifications
|
|
386
386
|
/dev
|
|
387
387
|
|
|
388
388
|
# No conflicts with Alice (different files)
|
|
389
389
|
|
|
390
390
|
# End of day: Complete
|
|
391
|
-
|
|
391
|
+
forge close SHOP-2 --reason "Implemented with SendGrid"
|
|
392
392
|
/ship
|
|
393
|
-
|
|
393
|
+
forge sync
|
|
394
394
|
|
|
395
395
|
# ═══════════════════════════════════════════════════════════
|
|
396
396
|
# CHARLIE: Admin Dashboard (Next Day)
|
|
@@ -398,17 +398,17 @@ bd sync
|
|
|
398
398
|
|
|
399
399
|
# Morning: Check dependencies
|
|
400
400
|
git pull
|
|
401
|
-
|
|
401
|
+
forge sync
|
|
402
402
|
|
|
403
|
-
|
|
403
|
+
forge show SHOP-3
|
|
404
404
|
# Output:
|
|
405
405
|
# Status: ready
|
|
406
406
|
# Depends on: (none)
|
|
407
407
|
|
|
408
|
-
|
|
408
|
+
forge claim SHOP-3
|
|
409
409
|
|
|
410
410
|
# Discovers overlap with Bob's work
|
|
411
|
-
bd comments SHOP-3 "Need Bob's email service for user notifications"
|
|
411
|
+
bd comments add SHOP-3 "Need Bob's email service for user notifications"
|
|
412
412
|
bd dep add SHOP-3 SHOP-2 # SHOP-3 depends on SHOP-2
|
|
413
413
|
|
|
414
414
|
# Bob's work already merged, so can proceed
|
|
@@ -428,7 +428,7 @@ bd blocked
|
|
|
428
428
|
# SHOP-1: Payment integration (blocked by SHOP-5)
|
|
429
429
|
|
|
430
430
|
# Find work with no blockers:
|
|
431
|
-
|
|
431
|
+
forge ready
|
|
432
432
|
|
|
433
433
|
# See full project status:
|
|
434
434
|
bd stats
|
|
@@ -440,7 +440,7 @@ bd stats
|
|
|
440
440
|
# Done: 4
|
|
441
441
|
|
|
442
442
|
# Always sync at end of session:
|
|
443
|
-
|
|
443
|
+
forge sync
|
|
444
444
|
```
|
|
445
445
|
|
|
446
446
|
**Result**: Team can work in parallel, track dependencies, and avoid conflicts.
|
|
@@ -465,8 +465,8 @@ bd sync
|
|
|
465
465
|
|
|
466
466
|
### 4. Team Collaboration
|
|
467
467
|
- Beads tracks dependencies
|
|
468
|
-
- `
|
|
469
|
-
- `
|
|
468
|
+
- `forge ready` finds available work
|
|
469
|
+
- `forge sync` at end of every session
|
|
470
470
|
- Comments keep teammates informed
|
|
471
471
|
|
|
472
472
|
---
|
package/docs/ROADMAP.md
CHANGED
|
@@ -291,8 +291,8 @@ All PRs tracked in Beads with proper dependencies:
|
|
|
291
291
|
| PR8 | forge-dwm | Blocked | P3 | PR7 |
|
|
292
292
|
| ~~Skills CLI~~ | ~~forge-mlm~~ | ~~Absorbed into PR5.5 + PR6 + PR8~~ | — | — |
|
|
293
293
|
|
|
294
|
-
**View all issues**: `
|
|
295
|
-
**View ready work**: `
|
|
294
|
+
**View all issues**: `forge list`
|
|
295
|
+
**View ready work**: `forge ready`
|
|
296
296
|
**View blocked issues**: `bd blocked`
|
|
297
297
|
|
|
298
298
|
### Git Workflow
|
|
@@ -348,7 +348,7 @@ Each PR is self-contained and can be rolled back independently:
|
|
|
348
348
|
## Resources
|
|
349
349
|
|
|
350
350
|
- **Master Plan**: `docs/plans/*.md`
|
|
351
|
-
- **Beads Issues**: `
|
|
351
|
+
- **Beads Issues**: `forge list` or `forge show <issue-id>`
|
|
352
352
|
- **Workflow Guide**: [AGENTS.md](../AGENTS.md)
|
|
353
353
|
- **Architecture Docs**: Coming in PR0 - [ARCHITECTURE.md](./ARCHITECTURE.md)
|
|
354
354
|
|
package/docs/TOOLCHAIN.md
CHANGED
|
@@ -42,7 +42,7 @@ Complete reference for all tools integrated with the Forge workflow.
|
|
|
42
42
|
- **Persists across sessions** - Issues survive context clearing, compaction, new chats
|
|
43
43
|
- **Git-backed** - Version controlled, mergeable, team-shareable
|
|
44
44
|
- **Dependency tracking** - Know what blocks what
|
|
45
|
-
- **Ready detection** - `
|
|
45
|
+
- **Ready detection** - `forge ready` finds unblocked work automatically
|
|
46
46
|
- **AI-optimized** - JSON output, semantic compaction, audit trails
|
|
47
47
|
|
|
48
48
|
### Installation
|
|
@@ -91,6 +91,11 @@ After `bd init`, creates `.beads/` directory:
|
|
|
91
91
|
|
|
92
92
|
**Dual-database architecture**: JSONL for git versioning, SQLite for fast local queries. Background daemon keeps them in sync.
|
|
93
93
|
|
|
94
|
+
For day-to-day issue workflows, prefer the Forge wrapper commands (`forge ready`,
|
|
95
|
+
`forge create`, `forge update`, `forge close`, `forge sync`). Use `bd` directly
|
|
96
|
+
for Beads capabilities Forge does not wrap yet, such as `bd init`, `bd comments`,
|
|
97
|
+
`bd dep`, `bd blocked`, and `bd dolt *`.
|
|
98
|
+
|
|
94
99
|
### Complete Command Reference
|
|
95
100
|
|
|
96
101
|
#### Initialization
|
|
@@ -106,36 +111,36 @@ bd init --prefix PROJ # Custom issue prefix (PROJ-xxx)
|
|
|
106
111
|
|
|
107
112
|
```bash
|
|
108
113
|
# Create issues
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
114
|
+
forge create "Title" # Basic issue
|
|
115
|
+
forge create "Title" --type feature # With type (feature, bug, chore, etc.)
|
|
116
|
+
forge create "Title" --priority 1 # With priority (0=critical, 4=backlog)
|
|
117
|
+
forge create "Title" -p 0 -l "urgent,backend" # P0 with labels
|
|
113
118
|
|
|
114
119
|
# View issues
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
120
|
+
forge show <id> # Detailed view with audit trail
|
|
121
|
+
forge list # All issues
|
|
122
|
+
forge list --status open # Filter by status
|
|
123
|
+
forge list --priority 1 # Filter by priority
|
|
124
|
+
forge list --assignee bob # Filter by assignee
|
|
125
|
+
forge list --label bug # Filter by label (AND logic)
|
|
126
|
+
forge list --label-any bug,urgent # Filter by label (OR logic)
|
|
127
|
+
forge list --type feature # Filter by type
|
|
128
|
+
forge list --title-contains "auth" # Search titles
|
|
129
|
+
forge list --limit 10 # Limit results
|
|
125
130
|
|
|
126
131
|
# Update issues
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
forge claim <id> # Claim work (sets in_progress)
|
|
133
|
+
forge update <id> --priority 2 # Change priority
|
|
134
|
+
forge update <id> --assignee bob # Assign
|
|
135
|
+
forge update <id> --title "New title" # Update title
|
|
136
|
+
forge update <id> --description "..." # Update description
|
|
137
|
+
forge update <id> --notes "..." # Add notes
|
|
138
|
+
forge update <id> --add-label urgent # Add label
|
|
134
139
|
|
|
135
140
|
# Complete issues
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
141
|
+
forge close <id> # Close single issue
|
|
142
|
+
forge close <id1> <id2> <id3> # Close multiple (efficient)
|
|
143
|
+
forge close <id> --reason "Completed auth" # Close with reason
|
|
139
144
|
bd delete <id> # Delete issue
|
|
140
145
|
bd delete <id> --cascade # Delete with dependents
|
|
141
146
|
```
|
|
@@ -144,8 +149,8 @@ bd delete <id> --cascade # Delete with dependents
|
|
|
144
149
|
|
|
145
150
|
```bash
|
|
146
151
|
# Find work
|
|
147
|
-
|
|
148
|
-
|
|
152
|
+
forge ready # Issues with NO open blockers (start here!)
|
|
153
|
+
forge ready --priority 1 # Filter ready work by priority
|
|
149
154
|
bd blocked # Issues that ARE blocked
|
|
150
155
|
|
|
151
156
|
# Dependencies
|
|
@@ -158,11 +163,11 @@ bd dep cycles # Detect cycles
|
|
|
158
163
|
|
|
159
164
|
# Comments
|
|
160
165
|
bd comments <id> # View comments
|
|
161
|
-
bd comments <id> "Comment text" # Add comment
|
|
166
|
+
bd comments add <id> "Comment text" # Add comment
|
|
162
167
|
|
|
163
168
|
# Git sync
|
|
164
|
-
|
|
165
|
-
bd
|
|
169
|
+
forge sync # Pull + push Beads state through the Forge wrapper
|
|
170
|
+
bd dolt status # Check Dolt sync/server status
|
|
166
171
|
bd hooks install # Install git hooks for auto-sync
|
|
167
172
|
|
|
168
173
|
# Maintenance
|
|
@@ -203,18 +208,18 @@ bd admin compact --days 90 # Compact old closed issues
|
|
|
203
208
|
|
|
204
209
|
```bash
|
|
205
210
|
# Start of session
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
211
|
+
forge ready # What can I work on?
|
|
212
|
+
forge show <id> # Review the issue
|
|
213
|
+
forge claim <id>
|
|
209
214
|
|
|
210
215
|
# During work
|
|
211
|
-
bd comments <id> "Progress update"
|
|
212
|
-
|
|
216
|
+
bd comments add <id> "Progress update"
|
|
217
|
+
forge update <id> --notes "Found edge case"
|
|
213
218
|
|
|
214
219
|
# End of session
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
220
|
+
forge close <id> # If done, or:
|
|
221
|
+
forge update <id> --status blocked --comment "Needs API response"
|
|
222
|
+
forge sync # Always sync at end!
|
|
218
223
|
```
|
|
219
224
|
|
|
220
225
|
---
|
|
@@ -556,7 +561,10 @@ bun add -g @beads/bd
|
|
|
556
561
|
irm https://raw.githubusercontent.com/steveyegge/beads/main/install.ps1 | iex
|
|
557
562
|
```
|
|
558
563
|
|
|
559
|
-
> **Why
|
|
564
|
+
> **Why Forge + Beads?** Forge wraps the supported day-to-day issue workflow
|
|
565
|
+
> (`forge ready`, `forge create`, `forge close`, `forge sync`) while Beads
|
|
566
|
+
> remains the underlying store for initialization, dependencies, comments, and
|
|
567
|
+
> Dolt-backed sync internals.
|
|
560
568
|
|
|
561
569
|
---
|
|
562
570
|
|
|
@@ -564,14 +572,14 @@ irm https://raw.githubusercontent.com/steveyegge/beads/main/install.ps1 | iex
|
|
|
564
572
|
|
|
565
573
|
| Stage | Tools Used |
|
|
566
574
|
|-------|------------|
|
|
567
|
-
| `/status` | `
|
|
575
|
+
| `/status` | `forge ready`, `forge list`, `git status` |
|
|
568
576
|
| `/plan` (Phase 2) | Parallel AI, Context7, grep.app, codebase exploration |
|
|
569
|
-
| `/plan` | `
|
|
570
|
-
| `/dev` | Tests, code, `
|
|
577
|
+
| `/plan` | `forge create`, `git checkout -b` |
|
|
578
|
+
| `/dev` | Tests, code, `forge update`, `/tasks save` |
|
|
571
579
|
| `/validate` | Type check, lint, tests, SonarCloud |
|
|
572
|
-
| `/ship` | `
|
|
580
|
+
| `/ship` | `forge close`, `gh pr create` |
|
|
573
581
|
| `/review` | `gh pr view`, Greptile, SonarCloud |
|
|
574
|
-
| `/premerge` | `
|
|
582
|
+
| `/premerge` | `forge sync`, doc updates, hand off PR |
|
|
575
583
|
| `/verify` | Documentation cross-check |
|
|
576
584
|
|
|
577
585
|
---
|
|
@@ -582,13 +590,13 @@ irm https://raw.githubusercontent.com/steveyegge/beads/main/install.ps1 | iex
|
|
|
582
590
|
|
|
583
591
|
```bash
|
|
584
592
|
bd init # Initialize
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
593
|
+
forge ready # Find unblocked work
|
|
594
|
+
forge create "Title" # Create issue
|
|
595
|
+
forge show <id> # View details
|
|
596
|
+
forge update <id> --status X # Update status
|
|
589
597
|
bd dep add <a> <b> # a depends on b
|
|
590
|
-
|
|
591
|
-
|
|
598
|
+
forge close <id> # Complete
|
|
599
|
+
forge sync # Beads sync
|
|
592
600
|
```
|
|
593
601
|
|
|
594
602
|
### GitHub CLI
|
|
@@ -626,12 +634,12 @@ irm https://raw.githubusercontent.com/steveyegge/beads/main/install.ps1 | iex
|
|
|
626
634
|
|
|
627
635
|
**"database locked"**
|
|
628
636
|
```bash
|
|
629
|
-
|
|
637
|
+
forge sync
|
|
630
638
|
```
|
|
631
639
|
|
|
632
640
|
**Issues not showing after git pull**
|
|
633
641
|
```bash
|
|
634
|
-
|
|
642
|
+
forge sync # Re-syncs Beads state through the Forge wrapper
|
|
635
643
|
```
|
|
636
644
|
|
|
637
645
|
### GitHub CLI
|
package/lib/agents-config.js
CHANGED
|
@@ -220,16 +220,19 @@ Configuration: \`.mcp.json\` or agent-specific config files
|
|
|
220
220
|
|
|
221
221
|
## Issue Tracking
|
|
222
222
|
|
|
223
|
-
Use **Beads** for persistent tracking across sessions:
|
|
223
|
+
Use **Forge's Beads wrapper** for persistent tracking across sessions:
|
|
224
224
|
|
|
225
225
|
\`\`\`bash
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
226
|
+
forge create "Feature name" # Create issue
|
|
227
|
+
forge claim <id> # Claim work
|
|
228
|
+
forge update <id> --append-notes "Progress" # Add notes
|
|
229
|
+
forge close <id> # Complete
|
|
230
|
+
forge sync # Sync Beads state
|
|
231
231
|
\`\`\`
|
|
232
232
|
|
|
233
|
+
Use \`bd\` directly only for capabilities Forge does not wrap yet, such as
|
|
234
|
+
\`bd init\`, \`bd comments\`, \`bd dep\`, and \`bd dolt\`.
|
|
235
|
+
|
|
233
236
|
## Git Workflow
|
|
234
237
|
|
|
235
238
|
**Branch naming**:
|
|
@@ -480,16 +483,19 @@ Configure these MCP servers in \`.mcp.json\`:
|
|
|
480
483
|
|
|
481
484
|
## Issue Tracking with Beads
|
|
482
485
|
|
|
483
|
-
Use **Beads** for persistent tracking across sessions:
|
|
486
|
+
Use **Forge's Beads wrapper** for persistent tracking across sessions:
|
|
484
487
|
|
|
485
488
|
\`\`\`bash
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
489
|
+
forge create "Feature name" # Create issue
|
|
490
|
+
forge claim <id> # Claim work
|
|
491
|
+
forge update <id> --append-notes "Progress" # Add notes
|
|
492
|
+
forge close <id> # Complete
|
|
493
|
+
forge sync # Sync Beads state
|
|
491
494
|
\`\`\`
|
|
492
495
|
|
|
496
|
+
Use \`bd\` directly only for capabilities Forge does not wrap yet, such as
|
|
497
|
+
\`bd init\`, \`bd comments\`, \`bd dep\`, and \`bd dolt\`.
|
|
498
|
+
|
|
493
499
|
## Code Quality Standards
|
|
494
500
|
|
|
495
501
|
${meta.language === 'TypeScript' ? `
|
package/lib/codex-skills.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const fs = require('node:fs');
|
|
2
|
+
const os = require('node:os');
|
|
2
3
|
const path = require('node:path');
|
|
3
4
|
|
|
4
5
|
function injectForgeAdapter(content, commandName) {
|
|
@@ -37,7 +38,6 @@ function listCodexSkillEntries(sourceRoot) {
|
|
|
37
38
|
|
|
38
39
|
return {
|
|
39
40
|
commandName,
|
|
40
|
-
dir: `.codex/skills/${commandName}/`,
|
|
41
41
|
filename: 'SKILL.md',
|
|
42
42
|
content: injectForgeAdapter(fs.readFileSync(sourceFile, 'utf8'), commandName),
|
|
43
43
|
};
|
|
@@ -45,6 +45,59 @@ function listCodexSkillEntries(sourceRoot) {
|
|
|
45
45
|
.filter(Boolean);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
function resolveCodexHome(options = {}) {
|
|
49
|
+
const env = options.env || process.env;
|
|
50
|
+
const homeDir = options.homeDir || os.homedir();
|
|
51
|
+
const explicitHome = String(env.CODEX_HOME || '').trim();
|
|
52
|
+
|
|
53
|
+
if (explicitHome) {
|
|
54
|
+
return path.resolve(explicitHome);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return path.join(homeDir, '.codex');
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function resolveCodexSkillsInstallDir(options = {}) {
|
|
61
|
+
return path.join(resolveCodexHome(options), 'skills');
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function formatCodexSkillsInstallDir(options = {}) {
|
|
65
|
+
const installDir = resolveCodexSkillsInstallDir(options);
|
|
66
|
+
const homeDir = path.resolve(options.homeDir || os.homedir());
|
|
67
|
+
const explicitHome = String((options.env || process.env).CODEX_HOME || '').trim();
|
|
68
|
+
const normalizedInstallDir = installDir.replace(/\\/g, '/');
|
|
69
|
+
|
|
70
|
+
if (explicitHome) {
|
|
71
|
+
const explicitInstallDir = path.join(path.resolve(explicitHome), 'skills').replace(/\\/g, '/');
|
|
72
|
+
if (normalizedInstallDir === explicitInstallDir) {
|
|
73
|
+
return '$CODEX_HOME/skills';
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const defaultInstallDir = path.join(homeDir, '.codex', 'skills').replace(/\\/g, '/');
|
|
78
|
+
if (normalizedInstallDir === defaultInstallDir) {
|
|
79
|
+
return '~/.codex/skills';
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return normalizedInstallDir;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function buildCodexSkillInstallPlan(sourceRoot, options = {}) {
|
|
86
|
+
const installDir = resolveCodexSkillsInstallDir(options);
|
|
87
|
+
const displayRoot = formatCodexSkillsInstallDir(options);
|
|
88
|
+
|
|
89
|
+
return listCodexSkillEntries(sourceRoot).map((entry) => ({
|
|
90
|
+
...entry,
|
|
91
|
+
absolutePath: path.join(installDir, entry.commandName, entry.filename),
|
|
92
|
+
displayPath: `${displayRoot}/${entry.commandName}/${entry.filename}`,
|
|
93
|
+
displayRoot,
|
|
94
|
+
}));
|
|
95
|
+
}
|
|
96
|
+
|
|
48
97
|
module.exports = {
|
|
98
|
+
buildCodexSkillInstallPlan,
|
|
99
|
+
formatCodexSkillsInstallDir,
|
|
49
100
|
listCodexSkillEntries,
|
|
101
|
+
resolveCodexHome,
|
|
102
|
+
resolveCodexSkillsInstallDir,
|
|
50
103
|
};
|
package/lib/commands/plan.js
CHANGED
|
@@ -254,8 +254,11 @@ function createBeadsIssue(featureName, researchPath, scope) {
|
|
|
254
254
|
getExecOptions()
|
|
255
255
|
);
|
|
256
256
|
|
|
257
|
-
// Extract issue ID from output (format: "Created issue: forge-xxx")
|
|
258
|
-
|
|
257
|
+
// Extract issue ID from output (format: "Created issue: forge-xxx" or "forge-xxx.N" for dotted sub-IDs).
|
|
258
|
+
// Character class is [a-z0-9] (not [a-zA-Z0-9]) because the /i flag makes A-Z redundant.
|
|
259
|
+
const createPattern = /Created issue:\s*(forge-[a-z0-9]+(?:\.[a-z0-9]+)*)/i;
|
|
260
|
+
const fallbackPattern = /(forge-[a-z0-9]+(?:\.[a-z0-9]+)*)/i;
|
|
261
|
+
const match = createPattern.exec(result) || fallbackPattern.exec(result);
|
|
259
262
|
|
|
260
263
|
if (!match) {
|
|
261
264
|
return {
|