@sugar-crash-studios/vibe-forge 0.4.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/commands/clear-attention.md +63 -0
- package/.claude/commands/compact-context.md +52 -0
- package/.claude/commands/configure-vcs.md +102 -0
- package/.claude/commands/forge.md +171 -0
- package/.claude/commands/need-help.md +77 -0
- package/.claude/commands/update-status.md +64 -0
- package/.claude/commands/worker-loop.md +106 -0
- package/.claude/hooks/worker-loop.js +198 -0
- package/.claude/scripts/setup-worker-loop.sh +45 -0
- package/.claude/settings.local.json +46 -0
- package/LICENSE +21 -0
- package/README.md +238 -0
- package/agents/aegis/personality.md +294 -0
- package/agents/anvil/personality.md +276 -0
- package/agents/architect/personality.md +258 -0
- package/agents/crucible/personality.md +360 -0
- package/agents/ember/personality.md +291 -0
- package/agents/forge-master/capabilities.md +144 -0
- package/agents/forge-master/context-template.md +128 -0
- package/agents/forge-master/personality.md +138 -0
- package/agents/furnace/personality.md +340 -0
- package/agents/herald/personality.md +247 -0
- package/agents/loki/personality.md +108 -0
- package/agents/oracle/personality.md +283 -0
- package/agents/pixel/personality.md +113 -0
- package/agents/planning-hub/personality.md +320 -0
- package/agents/scribe/personality.md +251 -0
- package/agents/temper/personality.md +218 -0
- package/bin/cli.js +375 -0
- package/bin/dashboard/api/agents.js +333 -0
- package/bin/dashboard/api/dispatch.js +483 -0
- package/bin/dashboard/api/tasks.js +416 -0
- package/bin/dashboard/frontend/index.html +13 -0
- package/bin/dashboard/frontend/package.json +16 -0
- package/bin/dashboard/frontend/src/App.svelte +222 -0
- package/bin/dashboard/frontend/src/app.css +1777 -0
- package/bin/dashboard/frontend/src/lib/components/AgentCard.svelte +60 -0
- package/bin/dashboard/frontend/src/lib/components/AgentsPanel.svelte +57 -0
- package/bin/dashboard/frontend/src/lib/components/DispatchModal.svelte +180 -0
- package/bin/dashboard/frontend/src/lib/components/Footer.svelte +33 -0
- package/bin/dashboard/frontend/src/lib/components/Header.svelte +84 -0
- package/bin/dashboard/frontend/src/lib/components/IssueCard.svelte +33 -0
- package/bin/dashboard/frontend/src/lib/components/IssuesPanel.svelte +73 -0
- package/bin/dashboard/frontend/src/lib/components/KeyboardShortcutsModal.svelte +108 -0
- package/bin/dashboard/frontend/src/lib/components/MobileTabs.svelte +52 -0
- package/bin/dashboard/frontend/src/lib/components/NotificationCard.svelte +60 -0
- package/bin/dashboard/frontend/src/lib/components/NotificationsPanel.svelte +44 -0
- package/bin/dashboard/frontend/src/lib/components/TaskCard.svelte +63 -0
- package/bin/dashboard/frontend/src/lib/components/TasksPanel.svelte +82 -0
- package/bin/dashboard/frontend/src/lib/components/Toast.svelte +45 -0
- package/bin/dashboard/frontend/src/lib/stores/agents.js +34 -0
- package/bin/dashboard/frontend/src/lib/stores/issues.js +54 -0
- package/bin/dashboard/frontend/src/lib/stores/notifications.js +48 -0
- package/bin/dashboard/frontend/src/lib/stores/tasks.js +63 -0
- package/bin/dashboard/frontend/src/lib/stores/theme.js +33 -0
- package/bin/dashboard/frontend/src/lib/stores/toast.js +35 -0
- package/bin/dashboard/frontend/src/lib/stores/ui.js +25 -0
- package/bin/dashboard/frontend/src/lib/stores/voice.js +275 -0
- package/bin/dashboard/frontend/src/lib/stores/websocket.js +295 -0
- package/bin/dashboard/frontend/src/lib/utils/api.js +101 -0
- package/bin/dashboard/frontend/src/lib/utils/formatters.js +54 -0
- package/bin/dashboard/frontend/src/main.js +9 -0
- package/bin/dashboard/frontend/svelte.config.js +5 -0
- package/bin/dashboard/frontend/vite.config.js +20 -0
- package/bin/dashboard/public/assets/index-DnfVj9Ce.css +1 -0
- package/bin/dashboard/public/assets/index-Ze5h0kXQ.js +2 -0
- package/bin/dashboard/public/index.html +14 -0
- package/bin/dashboard/server.js +566 -0
- package/bin/forge-daemon.sh +463 -0
- package/bin/forge-setup.sh +645 -0
- package/bin/forge-spawn.sh +164 -0
- package/bin/forge.cmd +83 -0
- package/bin/forge.sh +533 -0
- package/bin/lib/agents.sh +177 -0
- package/bin/lib/colors.sh +44 -0
- package/bin/lib/config.sh +347 -0
- package/bin/lib/constants.sh +241 -0
- package/bin/lib/daemon/display.sh +128 -0
- package/bin/lib/daemon/notifications.sh +263 -0
- package/bin/lib/daemon/routing.sh +77 -0
- package/bin/lib/daemon/state.sh +115 -0
- package/bin/lib/daemon/sync.sh +95 -0
- package/bin/lib/database.sh +310 -0
- package/bin/lib/heimdall-setup.js +113 -0
- package/bin/lib/heimdall.js +265 -0
- package/bin/lib/json.sh +264 -0
- package/bin/lib/terminal.js +451 -0
- package/bin/lib/util.sh +126 -0
- package/bin/lib/vcs.js +349 -0
- package/config/agent-manifest.yaml +203 -0
- package/config/agents.json +168 -0
- package/config/task-template.md +159 -0
- package/config/task-types.yaml +106 -0
- package/context/agent-status/aegis.json +7 -0
- package/context/agent-status/anvil.json +7 -0
- package/context/agent-status/architect.json +7 -0
- package/context/agent-status/crucible.json +7 -0
- package/context/agent-status/ember.json +7 -0
- package/context/agent-status/furnace.json +7 -0
- package/context/agent-status/loki.json +7 -0
- package/context/agent-status/oracle.json +7 -0
- package/context/agent-status/pixel.json +7 -0
- package/context/agent-status/planning-hub.json +7 -0
- package/context/agent-status/scribe.json +7 -0
- package/context/agent-status/temper.json +7 -0
- package/context/feature-brainstorm.md +426 -0
- package/context/forge-state.yaml +19 -0
- package/context/modern-conventions.md +129 -0
- package/context/project-context-template.md +122 -0
- package/context/project-context.md +122 -0
- package/docs/TODO.md +150 -0
- package/docs/agents.md +409 -0
- package/docs/architecture/decisions/ADR-001-daemon-modularization.md +122 -0
- package/docs/architecture/vibe-lab-integration.md +684 -0
- package/docs/architecture.md +194 -0
- package/docs/bmad-gap-analysis-2026-03-31.md +444 -0
- package/docs/cleanup-workflow.md +329 -0
- package/docs/commands.md +451 -0
- package/docs/dashboard-mockup.html +989 -0
- package/docs/getting-started.md +261 -0
- package/docs/integration/forge-ownership-policy.md +112 -0
- package/docs/npm-publishing.md +132 -0
- package/docs/roadmap-2026.md +519 -0
- package/docs/security.md +144 -0
- package/docs/wireframes/dashboard-mvp.md +1164 -0
- package/docs/workflows/README.md +32 -0
- package/docs/workflows/azure-devops.md +108 -0
- package/docs/workflows/bitbucket.md +104 -0
- package/docs/workflows/git-only.md +130 -0
- package/docs/workflows/gitea.md +168 -0
- package/docs/workflows/github.md +103 -0
- package/docs/workflows/gitlab.md +105 -0
- package/docs/workflows.md +454 -0
- package/package.json +73 -0
- package/tasks/completed/ARCH-001-duplicate-agent-config.md +121 -0
- package/tasks/completed/ARCH-002-mixed-bash-node-implementation.md +88 -0
- package/tasks/completed/ARCH-003-worker-loop-hook-duplication.md +77 -0
- package/tasks/completed/ARCH-009-test-organization.md +78 -0
- package/tasks/completed/ARCH-011-jq-vs-nodejs-json.md +94 -0
- package/tasks/completed/ARCH-012-tmp-files-in-root.md +71 -0
- package/tasks/completed/ARCH-013-exit-code-constants.md +65 -0
- package/tasks/completed/ARCH-014-sed-incompatibility.md +96 -0
- package/tasks/completed/ARCH-015-docs-todo-tracking.md +83 -0
- package/tasks/completed/BUG-dash-001-tasks-filter-error.md +31 -0
- package/tasks/completed/BUG-dash-002-agents-unknown.md +41 -0
- package/tasks/completed/CLEAN-001.md +38 -0
- package/tasks/completed/CLEAN-002.md +43 -0
- package/tasks/completed/CLEAN-003.md +47 -0
- package/tasks/completed/CLEAN-004.md +56 -0
- package/tasks/completed/CLEAN-005.md +75 -0
- package/tasks/completed/CLEAN-006.md +47 -0
- package/tasks/completed/CLEAN-007.md +34 -0
- package/tasks/completed/CLEAN-008.md +49 -0
- package/tasks/completed/CLEAN-012.md +58 -0
- package/tasks/completed/CLEAN-013.md +45 -0
- package/tasks/completed/FEATURE-001a-dashboard-wireframes.md +162 -0
- package/tasks/completed/IMPL-007a-daemon-notifications-module.md +82 -0
- package/tasks/completed/IMPL-007b-daemon-sync-module.md +71 -0
- package/tasks/completed/IMPL-007c-daemon-state-module.md +80 -0
- package/tasks/completed/IMPL-007d-daemon-routing-module.md +77 -0
- package/tasks/completed/IMPL-007e-daemon-display-module.md +77 -0
- package/tasks/completed/IMPL-007f-daemon-integration.md +124 -0
- package/tasks/completed/PLAT-1-heimdall.md +420 -0
- package/tasks/completed/SEC-001-sql-injection-fix.md +58 -0
- package/tasks/completed/SEC-002-notification-injection-fix.md +45 -0
- package/tasks/completed/SEC-003-eval-injection-fix.md +54 -0
- package/tasks/completed/SEC-004-pid-race-condition-fix.md +49 -0
- package/tasks/completed/SEC-005-worker-loop-path-fix.md +51 -0
- package/tasks/completed/SEC-006-eval-agent-names.md +55 -0
- package/tasks/completed/SEC-007-spawn-escaping.md +67 -0
- package/tasks/completed/TASK-DASH-001-server-infrastructure.md +185 -0
- package/tasks/completed/TASK-anvil-001-dashboard-frontend.md +133 -0
- package/tasks/completed/review-bmad-aegis.md +89 -0
- package/tasks/completed/review-bmad-anvil.md +80 -0
- package/tasks/completed/review-bmad-crucible.md +81 -0
- package/tasks/completed/review-bmad-ember.md +90 -0
- package/tasks/completed/review-bmad-furnace.md +79 -0
- package/tasks/completed/review-bmad-pixel.md +82 -0
- package/tasks/completed/review-bmad-scribe.md +92 -0
- package/tasks/completed/review-bmad-sentinel.md +83 -0
- package/tasks/pending/ARCH-004-git-bash-detection-duplication.md +72 -0
- package/tasks/pending/ARCH-005-missing-src-directory.md +95 -0
- package/tasks/pending/ARCH-006-task-template-location.md +64 -0
- package/tasks/pending/ARCH-008-forge-master-vs-hub.md +81 -0
- package/tasks/pending/ARCH-010-missing-index-files.md +84 -0
- package/tasks/pending/CLEAN-009.md +31 -0
- package/tasks/pending/CLEAN-010.md +30 -0
- package/tasks/pending/CLEAN-011.md +30 -0
- package/tasks/pending/CLEAN-014.md +32 -0
- package/tasks/pending/DESIGN-dash-001-layout-review.md +45 -0
- package/tasks/pending/FEATURE-001-dashboard-mvp.md +268 -0
- package/tasks/review/ARCH-007-daemon-monolith.md +162 -0
- package/tasks/review/bmad-review-aegis.md +349 -0
- package/tasks/review/bmad-review-anvil.md +259 -0
- package/tasks/review/bmad-review-crucible.md +277 -0
- package/tasks/review/bmad-review-ember.md +307 -0
- package/tasks/review/bmad-review-furnace.md +285 -0
- package/tasks/review/bmad-review-pixel.md +329 -0
- package/tasks/review/bmad-review-scribe.md +361 -0
- package/tasks/review/bmad-review-sentinel.md +242 -0
- package/tasks/review/task-001.md +78 -0
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
# Getting Started with Vibe Forge
|
|
2
|
+
|
|
3
|
+
Vibe Forge is a multi-agent development orchestration tool for Claude Code. It helps you coordinate multiple AI agents working on different aspects of your project - frontend, backend, testing, documentation, and more.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
Before installing Vibe Forge, ensure you have:
|
|
8
|
+
|
|
9
|
+
1. **Node.js** (v18 or later)
|
|
10
|
+
2. **Git** - Required for installation and version control
|
|
11
|
+
3. **Claude Code CLI** - Install from [claude.ai/download](https://claude.ai/download)
|
|
12
|
+
|
|
13
|
+
### Windows Users
|
|
14
|
+
|
|
15
|
+
Git Bash is required. Install Git via:
|
|
16
|
+
```bash
|
|
17
|
+
winget install Git.Git
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
### Quick Start (Recommended)
|
|
23
|
+
|
|
24
|
+
Run this command in your project directory:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npx vibe-forge init
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
This will:
|
|
31
|
+
1. Clone Vibe Forge into `_vibe-forge/`
|
|
32
|
+
2. Check prerequisites (Git, Claude Code)
|
|
33
|
+
3. Run the interactive setup wizard
|
|
34
|
+
4. Install the `/forge` slash command
|
|
35
|
+
5. Create a project context file
|
|
36
|
+
|
|
37
|
+
### Global Installation
|
|
38
|
+
|
|
39
|
+
If you prefer a global install:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npm install -g vibe-forge
|
|
43
|
+
vibe-forge init
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Update to Latest Version
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npx vibe-forge update
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## First-Time Setup
|
|
53
|
+
|
|
54
|
+
When you run `npx vibe-forge init`, you will be guided through configuration:
|
|
55
|
+
|
|
56
|
+
### 1. Platform Detection
|
|
57
|
+
|
|
58
|
+
Vibe Forge automatically detects your operating system (Windows, macOS, or Linux) and configures paths accordingly.
|
|
59
|
+
|
|
60
|
+
### 2. Terminal Selection
|
|
61
|
+
|
|
62
|
+
Choose your terminal for spawning worker agents:
|
|
63
|
+
|
|
64
|
+
- **Windows Terminal** (recommended for Windows) - Workers spawn in new tabs
|
|
65
|
+
- **Manual** - You will receive instructions to start workers manually
|
|
66
|
+
|
|
67
|
+
### 3. Daemon Configuration
|
|
68
|
+
|
|
69
|
+
The forge daemon monitors task folders and routes work automatically:
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
Enable daemon orchestration? (Y/n):
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
The daemon runs in the background and keeps track of:
|
|
76
|
+
- Pending tasks
|
|
77
|
+
- Worker status
|
|
78
|
+
- Task assignments
|
|
79
|
+
|
|
80
|
+
### 4. Worker Loop Configuration
|
|
81
|
+
|
|
82
|
+
Worker Loop keeps agents running continuously:
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
Enable persistent worker mode? (y/N):
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
When enabled, workers automatically check for new tasks after completing their current work instead of exiting.
|
|
89
|
+
|
|
90
|
+
### 5. Project Context
|
|
91
|
+
|
|
92
|
+
Vibe Forge creates `context/project-context.md` with detected information about your project. Edit this file to add:
|
|
93
|
+
- Project description
|
|
94
|
+
- Architecture overview
|
|
95
|
+
- Coding conventions
|
|
96
|
+
- Team guidelines
|
|
97
|
+
|
|
98
|
+
## Basic Usage
|
|
99
|
+
|
|
100
|
+
### Start the Planning Hub
|
|
101
|
+
|
|
102
|
+
Open Claude Code in your project and run:
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
/forge
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
This starts the Planning Hub - a multi-expert planning team that helps you:
|
|
109
|
+
- Break down features into tasks
|
|
110
|
+
- Assign work to specialized agents
|
|
111
|
+
- Coordinate development efforts
|
|
112
|
+
|
|
113
|
+
### Check Status
|
|
114
|
+
|
|
115
|
+
View the current state of your forge:
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
/forge status
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
This shows:
|
|
122
|
+
- Active agents and their status
|
|
123
|
+
- Pending tasks by category
|
|
124
|
+
- Tasks in progress
|
|
125
|
+
- Completed work
|
|
126
|
+
|
|
127
|
+
### Open the Dashboard
|
|
128
|
+
|
|
129
|
+
Launch the web-based dashboard for a visual overview:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
node bin/dashboard/server.js
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Then open `http://localhost:2800` in your browser.
|
|
136
|
+
|
|
137
|
+
The dashboard provides:
|
|
138
|
+
- Real-time task and agent status
|
|
139
|
+
- Actionable items (stale docs, failing tests)
|
|
140
|
+
- One-click dispatch to assign agents to issues
|
|
141
|
+
- WebSocket updates for live monitoring
|
|
142
|
+
|
|
143
|
+
**Port 2800?** That's the operating temperature of a forge in degrees Fahrenheit. 🔥
|
|
144
|
+
|
|
145
|
+
### Spawn a Worker
|
|
146
|
+
|
|
147
|
+
Start a specialized agent in a new terminal:
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
/forge spawn anvil
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Available agents:
|
|
154
|
+
- `anvil` - Frontend Developer
|
|
155
|
+
- `furnace` - Backend Developer
|
|
156
|
+
- `crucible` - Tester / QA
|
|
157
|
+
- `sentinel` - Code Reviewer
|
|
158
|
+
- `scribe` - Documentation
|
|
159
|
+
- `herald` - Release Manager
|
|
160
|
+
- `ember` - DevOps
|
|
161
|
+
- `aegis` - Security
|
|
162
|
+
|
|
163
|
+
### Create a Task
|
|
164
|
+
|
|
165
|
+
Add a new task to the queue:
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
/forge task Add user authentication to the login page
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
The Planning Hub will help you:
|
|
172
|
+
- Clarify requirements
|
|
173
|
+
- Assign the appropriate agent
|
|
174
|
+
- Set priority
|
|
175
|
+
|
|
176
|
+
## Project Structure
|
|
177
|
+
|
|
178
|
+
After setup, your project will have:
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
your-project/
|
|
182
|
+
├── _vibe-forge/ # Vibe Forge tool (mostly gitignored)
|
|
183
|
+
│ ├── bin/ # CLI scripts
|
|
184
|
+
│ ├── config/ # Configuration files
|
|
185
|
+
│ ├── agents/ # Agent personalities
|
|
186
|
+
│ └── .forge/ # Local config (gitignored)
|
|
187
|
+
├── context/ # Project context (committed)
|
|
188
|
+
│ └── project-context.md # Your project description
|
|
189
|
+
├── tasks/ # Task files (committed)
|
|
190
|
+
│ ├── pending/ # Awaiting assignment
|
|
191
|
+
│ ├── in-progress/ # Currently being worked
|
|
192
|
+
│ ├── review/ # Ready for review
|
|
193
|
+
│ └── completed/ # Done
|
|
194
|
+
└── .claude/
|
|
195
|
+
└── commands/
|
|
196
|
+
└── forge.md # The /forge slash command
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
## Example Workflow
|
|
200
|
+
|
|
201
|
+
Here is a typical development session:
|
|
202
|
+
|
|
203
|
+
1. **Start your day** - Open Claude Code and run `/forge`
|
|
204
|
+
|
|
205
|
+
2. **Plan features** - Discuss what you want to build with the Planning Hub
|
|
206
|
+
|
|
207
|
+
3. **Spawn workers** - `/forge spawn anvil` for frontend, `/forge spawn furnace` for backend
|
|
208
|
+
|
|
209
|
+
4. **Create tasks** - `/forge task Implement shopping cart component`
|
|
210
|
+
|
|
211
|
+
5. **Monitor progress** - `/forge status` to see what is happening
|
|
212
|
+
|
|
213
|
+
6. **Review work** - Sentinel reviews completed code automatically
|
|
214
|
+
|
|
215
|
+
7. **Ship** - Herald manages releases when ready
|
|
216
|
+
|
|
217
|
+
## Next Steps
|
|
218
|
+
|
|
219
|
+
- Read [Commands Reference](./commands.md) for all available commands
|
|
220
|
+
- Read [Agent Guide](./agents.md) to learn about each specialist
|
|
221
|
+
- Read [Workflows](./workflows.md) for common patterns
|
|
222
|
+
|
|
223
|
+
## Troubleshooting
|
|
224
|
+
|
|
225
|
+
### Claude Code not found
|
|
226
|
+
|
|
227
|
+
Ensure Claude Code CLI is installed and in your PATH:
|
|
228
|
+
```bash
|
|
229
|
+
claude --version
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
If not found, install from [claude.ai/download](https://claude.ai/download).
|
|
233
|
+
|
|
234
|
+
### Git Bash not found (Windows)
|
|
235
|
+
|
|
236
|
+
Install Git with Git Bash:
|
|
237
|
+
```bash
|
|
238
|
+
winget install Git.Git
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
Restart your terminal after installation.
|
|
242
|
+
|
|
243
|
+
### Slash command not working
|
|
244
|
+
|
|
245
|
+
The `/forge` command should be installed in `.claude/commands/forge.md`. If missing, copy it manually:
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
cp _vibe-forge/.claude/commands/forge.md .claude/commands/
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Daemon not starting
|
|
252
|
+
|
|
253
|
+
Check if the daemon is already running:
|
|
254
|
+
```bash
|
|
255
|
+
./bin/forge-daemon.sh status
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
Start it manually:
|
|
259
|
+
```bash
|
|
260
|
+
./bin/forge-daemon.sh start
|
|
261
|
+
```
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Forge / Lab Story Ownership Policy
|
|
2
|
+
|
|
3
|
+
**Status:** Accepted
|
|
4
|
+
**Date:** 2026-04-01
|
|
5
|
+
**Applies to:** vibe-forge v1.0+, vibe-lab v0.9+
|
|
6
|
+
**Co-authored by:** vibe-forge team, vibe-lab team
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## The Rule
|
|
11
|
+
|
|
12
|
+
Once a story enters the lab pipeline, **lab owns the execution lifecycle unconditionally.**
|
|
13
|
+
|
|
14
|
+
This is not a soft guideline. It is the architectural boundary between the two systems.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## What This Means in Practice
|
|
19
|
+
|
|
20
|
+
### For forge
|
|
21
|
+
|
|
22
|
+
When the Planning Hub submits a story via `create_story` MCP and receives a `lab_story_id` in return:
|
|
23
|
+
|
|
24
|
+
- Record the entry in `.forge/lab-stories.json` keyed by `{project_id}/{forge_task_id}`
|
|
25
|
+
- Do not submit the same story again — the tracking file is the dedup gate
|
|
26
|
+
- Do not attempt to modify, reprioritize, or cancel the story in lab
|
|
27
|
+
- Do not write directly to lab's `sprint-status.yaml`, `pipeline.db`, or handoff directory
|
|
28
|
+
- Observe status only: via `get_story_status` polling or relay WebSocket events
|
|
29
|
+
- If the story needs to change scope or be cancelled, that is a human action via the lab dashboard
|
|
30
|
+
|
|
31
|
+
### For lab
|
|
32
|
+
|
|
33
|
+
When a story has `source: forge` in its metadata:
|
|
34
|
+
|
|
35
|
+
- Route it to forge workers for execution (via IPC inbox when available, degraded spawn otherwise)
|
|
36
|
+
- Echo `forge_task_id` on all relay events for that story
|
|
37
|
+
- Do not callback to forge to confirm receipt — `create_story` return value is the confirmation
|
|
38
|
+
- If the story fails or is cancelled in lab, emit a `story_transition` relay event with `to_status: cancelled` or `to_status: failed` so forge can update its tracking file
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## The Promotion Decision
|
|
43
|
+
|
|
44
|
+
Not every forge task becomes a lab story. The decision belongs to the Planning Hub or the human running the session.
|
|
45
|
+
|
|
46
|
+
A forge task should be promoted to lab when:
|
|
47
|
+
- It requires the full review chain (arch, code review, tests)
|
|
48
|
+
- It produces a PR that needs to be merged to a shared branch
|
|
49
|
+
- It will be released as part of a versioned delivery
|
|
50
|
+
|
|
51
|
+
A forge task should stay in forge when:
|
|
52
|
+
- It is exploratory or experimental
|
|
53
|
+
- It will be thrown away or manually applied
|
|
54
|
+
- It is a sub-task of a larger unit that isn't ready to ship independently
|
|
55
|
+
|
|
56
|
+
This distinction is a human judgment call, not an automated rule. The Planning Hub can recommend, but the submission is intentional.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Duplicate Prevention
|
|
61
|
+
|
|
62
|
+
Forge must check `.forge/lab-stories.json` before calling `create_story`. The composite key is `{project_id}/{forge_task_id}`.
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"vibe-lab/FORGE-TASK-42": {
|
|
67
|
+
"project_id": "vibe-lab",
|
|
68
|
+
"forge_task_id": "FORGE-TASK-42",
|
|
69
|
+
"lab_story_id": "FORGE-3",
|
|
70
|
+
"status": "in-progress",
|
|
71
|
+
"last_checked": "2026-04-01T12:00:00Z"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
The same `forge_task_id` may exist in multiple projects without collision because the composite key includes `project_id`. This is expected and correct.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Status Visibility
|
|
81
|
+
|
|
82
|
+
Forge may read story status at any time. It may not write story status.
|
|
83
|
+
|
|
84
|
+
Read paths:
|
|
85
|
+
- `get_story_status(forge_task_id, project_path)` — on-demand MCP poll
|
|
86
|
+
- Relay WebSocket subscription — real-time `story_transition` events
|
|
87
|
+
|
|
88
|
+
Write paths: none. All story state transitions belong to lab.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## When Things Go Wrong
|
|
93
|
+
|
|
94
|
+
**Story is stuck in lab (no progress for N hours):**
|
|
95
|
+
Forge observes this via `get_story_status`. It is a human concern, not an automated forge action. The human uses the lab dashboard to investigate or escalate.
|
|
96
|
+
|
|
97
|
+
**Story fails in lab:**
|
|
98
|
+
Lab emits `story_transition` with `to_status: failed`. Forge updates its tracking file. The Planning Hub can decide whether to resubmit (creating a new story with a new `forge_task_id`) or drop it.
|
|
99
|
+
|
|
100
|
+
**Heimdall sounds on a worker:**
|
|
101
|
+
Lab routes the story to human review. Forge receives a relay event. The Planning Hub surfaces it. Human resolves.
|
|
102
|
+
|
|
103
|
+
**Forge daemon restarts mid-story:**
|
|
104
|
+
The `.forge/lab-stories.json` tracking file persists across restarts. On startup, the forge daemon reads the tracking file, identifies in-progress stories, and resumes relay subscription. No re-submission.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Reference
|
|
109
|
+
|
|
110
|
+
Architecture: `docs/architecture/vibe-lab-integration.md` (vibe-forge repo)
|
|
111
|
+
Lab copy: `_vibe-chain/docs/forge-ownership-policy.md` (vibe-lab repo)
|
|
112
|
+
Both copies must remain identical. When updated, update both.
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# npm Publishing with OIDC Trusted Publishing
|
|
2
|
+
|
|
3
|
+
This document explains how Vibe Forge publishes to npm using GitHub Actions OIDC trusted publishing - no npm tokens required.
|
|
4
|
+
|
|
5
|
+
## How to Release a New Version
|
|
6
|
+
|
|
7
|
+
**Do NOT run `npm publish` locally.** Publishing is done via GitHub Actions.
|
|
8
|
+
|
|
9
|
+
### Quick Release Process
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# 1. Create release branch
|
|
13
|
+
git checkout main && git pull origin main
|
|
14
|
+
git checkout -b release/vX.Y.Z
|
|
15
|
+
|
|
16
|
+
# 2. Bump version and update CHANGELOG
|
|
17
|
+
npm version minor --no-git-tag-version # or major/patch
|
|
18
|
+
# Edit CHANGELOG.md with release notes
|
|
19
|
+
|
|
20
|
+
# 3. Commit, push, create PR
|
|
21
|
+
git add -A
|
|
22
|
+
git commit -m "Release vX.Y.Z"
|
|
23
|
+
git push -u origin release/vX.Y.Z
|
|
24
|
+
gh pr create --title "Release vX.Y.Z"
|
|
25
|
+
|
|
26
|
+
# 4. Merge PR (squash)
|
|
27
|
+
gh pr merge --squash --delete-branch
|
|
28
|
+
|
|
29
|
+
# 5. Create git tag and GitHub Release (triggers npm publish)
|
|
30
|
+
git checkout main && git pull origin main
|
|
31
|
+
git tag -a vX.Y.Z -m "Release vX.Y.Z"
|
|
32
|
+
git push origin vX.Y.Z
|
|
33
|
+
gh release create vX.Y.Z --title "vX.Y.Z" --notes "Release notes here"
|
|
34
|
+
|
|
35
|
+
# 6. Verify publish succeeded
|
|
36
|
+
gh run list --workflow=publish.yml --limit=1
|
|
37
|
+
npm view vibe-forge version
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The `gh release create` command triggers the publish workflow automatically.
|
|
41
|
+
|
|
42
|
+
## Overview
|
|
43
|
+
|
|
44
|
+
npm's [trusted publishing](https://docs.npmjs.com/trusted-publishers/) uses OpenID Connect (OIDC) to authenticate GitHub Actions workflows directly with npm. This eliminates the need to store npm tokens as secrets.
|
|
45
|
+
|
|
46
|
+
## Requirements
|
|
47
|
+
|
|
48
|
+
1. **npm CLI v11.5.1+** - OIDC support was added in npm 11.5.1
|
|
49
|
+
2. **Public GitHub repository** - Provenance attestation only works with public repos
|
|
50
|
+
3. **Trusted Publisher configured on npmjs.com** - Links your package to your GitHub repo
|
|
51
|
+
|
|
52
|
+
## Setup
|
|
53
|
+
|
|
54
|
+
### 1. Configure Trusted Publisher on npm
|
|
55
|
+
|
|
56
|
+
1. Go to https://www.npmjs.com/package/vibe-forge/access
|
|
57
|
+
2. Under "Trusted Publishers", add a new publisher:
|
|
58
|
+
- **Publisher**: GitHub Actions
|
|
59
|
+
- **Organization/user**: SpasticPalate
|
|
60
|
+
- **Repository**: vibe-forge
|
|
61
|
+
- **Workflow filename**: publish.yml
|
|
62
|
+
- **Environment name**: (leave empty)
|
|
63
|
+
|
|
64
|
+
### 2. GitHub Actions Workflow
|
|
65
|
+
|
|
66
|
+
The workflow requires specific permissions and npm version:
|
|
67
|
+
|
|
68
|
+
```yaml
|
|
69
|
+
jobs:
|
|
70
|
+
publish:
|
|
71
|
+
runs-on: ubuntu-latest
|
|
72
|
+
permissions:
|
|
73
|
+
contents: read
|
|
74
|
+
id-token: write # Required for OIDC token generation
|
|
75
|
+
steps:
|
|
76
|
+
- uses: actions/checkout@v4
|
|
77
|
+
|
|
78
|
+
- uses: actions/setup-node@v4
|
|
79
|
+
with:
|
|
80
|
+
node-version: '22'
|
|
81
|
+
|
|
82
|
+
# npm 11.5.1+ required for OIDC
|
|
83
|
+
- run: npm install -g npm@latest
|
|
84
|
+
|
|
85
|
+
- run: npm publish --provenance --access public
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Key points:
|
|
89
|
+
- `id-token: write` permission enables OIDC token generation
|
|
90
|
+
- `--provenance` flag enables signed provenance attestation
|
|
91
|
+
- No `NODE_AUTH_TOKEN` or `NPM_TOKEN` needed
|
|
92
|
+
|
|
93
|
+
## Troubleshooting
|
|
94
|
+
|
|
95
|
+
### "Access token expired or revoked" with E404
|
|
96
|
+
|
|
97
|
+
**Cause**: npm CLI version is too old (< 11.5.1)
|
|
98
|
+
|
|
99
|
+
**Fix**: Add `npm install -g npm@latest` before publishing
|
|
100
|
+
|
|
101
|
+
### "Unsupported GitHub Actions source repository visibility: private"
|
|
102
|
+
|
|
103
|
+
**Cause**: Provenance attestation only works with public repositories
|
|
104
|
+
|
|
105
|
+
**Fix**: Either make the repo public, or remove `--provenance` and use a granular npm token instead
|
|
106
|
+
|
|
107
|
+
### "ENEEDAUTH - need auth"
|
|
108
|
+
|
|
109
|
+
**Cause**: OIDC token not being generated/used
|
|
110
|
+
|
|
111
|
+
**Fix**: Ensure `id-token: write` permission is set on the job
|
|
112
|
+
|
|
113
|
+
### 404 on publish despite correct setup
|
|
114
|
+
|
|
115
|
+
**Cause**: Trusted Publisher configuration doesn't match workflow
|
|
116
|
+
|
|
117
|
+
**Fix**: Verify on npmjs.com that:
|
|
118
|
+
- Organization/user matches exactly (case-sensitive)
|
|
119
|
+
- Repository name matches exactly
|
|
120
|
+
- Workflow filename matches exactly (e.g., `publish.yml`)
|
|
121
|
+
|
|
122
|
+
## Benefits
|
|
123
|
+
|
|
124
|
+
- **No secrets to manage** - No npm tokens to rotate or accidentally expose
|
|
125
|
+
- **Provenance attestation** - Packages are cryptographically signed with build info
|
|
126
|
+
- **Audit trail** - Provenance is published to Sigstore transparency log
|
|
127
|
+
|
|
128
|
+
## References
|
|
129
|
+
|
|
130
|
+
- [npm Trusted Publishers](https://docs.npmjs.com/trusted-publishers/)
|
|
131
|
+
- [npm Provenance](https://docs.npmjs.com/generating-provenance-statements/)
|
|
132
|
+
- [GitHub: npm trusted publishing GA](https://github.blog/changelog/2025-07-31-npm-trusted-publishing-with-oidc-is-generally-available/)
|