vibe-forge 0.4.0 → 0.8.2

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.
Files changed (129) hide show
  1. package/.claude/commands/clear-attention.md +63 -63
  2. package/.claude/commands/compact-context.md +52 -0
  3. package/.claude/commands/configure-vcs.md +5 -5
  4. package/.claude/commands/forge.md +50 -3
  5. package/.claude/commands/need-help.md +77 -77
  6. package/.claude/commands/update-status.md +64 -64
  7. package/.claude/commands/worker-loop.md +106 -106
  8. package/.claude/hooks/worker-loop.js +37 -4
  9. package/.claude/scripts/setup-worker-loop.sh +45 -45
  10. package/.claude/settings.json +89 -0
  11. package/LICENSE +21 -21
  12. package/README.md +211 -232
  13. package/agents/aegis/personality.md +35 -1
  14. package/agents/anvil/personality.md +39 -1
  15. package/agents/architect/personality.md +26 -0
  16. package/agents/crucible/personality.md +54 -1
  17. package/agents/crucible-x/personality.md +210 -0
  18. package/agents/ember/personality.md +29 -1
  19. package/agents/flux/personality.md +248 -0
  20. package/agents/furnace/personality.md +52 -1
  21. package/agents/herald/personality.md +3 -1
  22. package/agents/loki/personality.md +108 -0
  23. package/agents/oracle/personality.md +284 -0
  24. package/agents/pixel/personality.md +140 -0
  25. package/agents/planning-hub/personality.md +222 -0
  26. package/agents/scribe/personality.md +3 -1
  27. package/agents/slag/personality.md +268 -0
  28. package/agents/{sentinel → temper}/personality.md +85 -9
  29. package/bin/cli.js +77 -30
  30. package/bin/dashboard/api/agents.js +333 -0
  31. package/bin/dashboard/api/dispatch.js +507 -0
  32. package/bin/dashboard/api/tasks.js +416 -0
  33. package/bin/dashboard/public/assets/index-BpHfsx1r.js +2 -0
  34. package/bin/dashboard/public/assets/index-QODv4Zn9.css +1 -0
  35. package/bin/dashboard/public/index.html +14 -0
  36. package/bin/dashboard/server.js +645 -0
  37. package/bin/forge-daemon.sh +176 -550
  38. package/bin/forge-setup.sh +28 -11
  39. package/bin/forge-spawn.sh +5 -5
  40. package/bin/forge.cmd +83 -83
  41. package/bin/forge.sh +210 -31
  42. package/config/agent-manifest.yaml +237 -243
  43. package/config/agents.json +207 -132
  44. package/config/task-types.yaml +111 -106
  45. package/context/agent-overrides/README.md +41 -0
  46. package/context/architecture.md +42 -0
  47. package/context/modern-conventions.md +129 -129
  48. package/docs/agents.md +473 -409
  49. package/docs/architecture.md +194 -162
  50. package/docs/commands.md +451 -388
  51. package/docs/security.md +195 -144
  52. package/package.json +38 -11
  53. package/src/lib/check-aliases.js +50 -0
  54. package/{bin → src}/lib/colors.sh +2 -1
  55. package/src/lib/config.sh +347 -0
  56. package/{bin → src}/lib/constants.sh +48 -13
  57. package/src/lib/daemon/budgets.sh +107 -0
  58. package/src/lib/daemon/dependencies.sh +146 -0
  59. package/src/lib/daemon/display.sh +128 -0
  60. package/src/lib/daemon/notifications.sh +273 -0
  61. package/src/lib/daemon/routing.sh +93 -0
  62. package/src/lib/daemon/state.sh +163 -0
  63. package/src/lib/daemon/sync.sh +103 -0
  64. package/{bin → src}/lib/database.sh +52 -0
  65. package/src/lib/frontmatter.js +106 -0
  66. package/src/lib/heimdall-setup.js +113 -0
  67. package/src/lib/heimdall.js +265 -0
  68. package/src/lib/index.sh +25 -0
  69. package/{bin → src}/lib/json.sh +7 -1
  70. package/{bin → src}/lib/terminal.js +7 -1
  71. package/.claude/settings.local.json +0 -33
  72. package/agents/forge-master/capabilities.md +0 -144
  73. package/agents/forge-master/context-template.md +0 -128
  74. package/agents/forge-master/personality.md +0 -138
  75. package/bin/lib/config.sh +0 -313
  76. package/config/task-template.md +0 -87
  77. package/context/forge-state.yaml +0 -19
  78. package/docs/TODO.md +0 -150
  79. package/docs/getting-started.md +0 -243
  80. package/docs/npm-publishing.md +0 -95
  81. package/docs/workflows/README.md +0 -32
  82. package/docs/workflows/azure-devops.md +0 -108
  83. package/docs/workflows/bitbucket.md +0 -104
  84. package/docs/workflows/git-only.md +0 -130
  85. package/docs/workflows/gitea.md +0 -168
  86. package/docs/workflows/github.md +0 -103
  87. package/docs/workflows/gitlab.md +0 -105
  88. package/docs/workflows.md +0 -454
  89. package/tasks/completed/ARCH-001-duplicate-agent-config.md +0 -121
  90. package/tasks/completed/ARCH-002-mixed-bash-node-implementation.md +0 -88
  91. package/tasks/completed/ARCH-003-worker-loop-hook-duplication.md +0 -77
  92. package/tasks/completed/ARCH-009-test-organization.md +0 -78
  93. package/tasks/completed/ARCH-011-jq-vs-nodejs-json.md +0 -94
  94. package/tasks/completed/ARCH-012-tmp-files-in-root.md +0 -71
  95. package/tasks/completed/ARCH-013-exit-code-constants.md +0 -65
  96. package/tasks/completed/ARCH-014-sed-incompatibility.md +0 -96
  97. package/tasks/completed/ARCH-015-docs-todo-tracking.md +0 -83
  98. package/tasks/completed/CLEAN-001.md +0 -38
  99. package/tasks/completed/CLEAN-003.md +0 -47
  100. package/tasks/completed/CLEAN-004.md +0 -56
  101. package/tasks/completed/CLEAN-005.md +0 -75
  102. package/tasks/completed/CLEAN-006.md +0 -47
  103. package/tasks/completed/CLEAN-007.md +0 -34
  104. package/tasks/completed/CLEAN-008.md +0 -49
  105. package/tasks/completed/CLEAN-012.md +0 -58
  106. package/tasks/completed/CLEAN-013.md +0 -45
  107. package/tasks/completed/SEC-001-sql-injection-fix.md +0 -58
  108. package/tasks/completed/SEC-002-notification-injection-fix.md +0 -45
  109. package/tasks/completed/SEC-003-eval-injection-fix.md +0 -54
  110. package/tasks/completed/SEC-004-pid-race-condition-fix.md +0 -49
  111. package/tasks/completed/SEC-005-worker-loop-path-fix.md +0 -51
  112. package/tasks/completed/SEC-006-eval-agent-names.md +0 -55
  113. package/tasks/completed/SEC-007-spawn-escaping.md +0 -67
  114. package/tasks/pending/ARCH-004-git-bash-detection-duplication.md +0 -72
  115. package/tasks/pending/ARCH-005-missing-src-directory.md +0 -95
  116. package/tasks/pending/ARCH-006-task-template-location.md +0 -64
  117. package/tasks/pending/ARCH-007-daemon-monolith.md +0 -91
  118. package/tasks/pending/ARCH-008-forge-master-vs-hub.md +0 -81
  119. package/tasks/pending/ARCH-010-missing-index-files.md +0 -84
  120. package/tasks/pending/CLEAN-002.md +0 -29
  121. package/tasks/pending/CLEAN-009.md +0 -31
  122. package/tasks/pending/CLEAN-010.md +0 -30
  123. package/tasks/pending/CLEAN-011.md +0 -30
  124. package/tasks/pending/CLEAN-014.md +0 -32
  125. package/tasks/review/task-001.md +0 -78
  126. /package/{bin → src}/lib/agents.sh +0 -0
  127. /package/{bin → src}/lib/util.sh +0 -0
  128. /package/{bin → src}/lib/vcs.js +0 -0
  129. /package/{context → templates}/project-context-template.md +0 -0
package/README.md CHANGED
@@ -1,232 +1,211 @@
1
- # Vibe Forge ⚒️
2
-
3
- A multi-agent development orchestration system for terminal-native vibe coding.
4
-
5
- ## Vision
6
-
7
- Vibe Forge transforms your terminal into a collaborative AI development environment. Multiple Claude agents - each with distinct personalities and specializations - work together to build software, coordinated through a file-based task system.
8
-
9
- ```
10
- ┌─────────────────────────────────────────────────────────────────┐
11
- │ PLANNING HUB │
12
- │ (Your main terminal session) │
13
- │ │
14
- │ You + Sage (Architect) + Oracle (Analyst) + Quartermaster (PM)│
15
- └─────────────────────────────────────────────────────────────────┘
16
-
17
-
18
- ┌─────────────────────────────────────────────────────────────────┐
19
- │ FORGE MASTER ⚒️ │
20
- │ Task Distribution & Orchestration │
21
- └─────────────────────────────────────────────────────────────────┘
22
-
23
- ┌────────────┬───────┴───────┬────────────┐
24
- ▼ ▼ ▼ ▼
25
- ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐
26
- │ Anvil │ │ Furnace │ │Crucible │ │Sentinel │
27
- │ 🔨 │ │ 🔥 │ │ 🧪 │ │ 🛡️ │
28
- │Frontend │ │ Backend │ │ Testing │ │ Review │
29
- └─────────┘ └─────────┘ └─────────┘ └─────────┘
30
- ```
31
-
32
- ## Key Features
33
-
34
- - **Personality-driven agents** - Each agent has a distinct voice, expertise, and decision-making style
35
- - **File-based task coordination** - Reliable, debuggable, no WebSocket complexity
36
- - **Token-efficient design** - Context stored locally, minimal wire traffic
37
- - **Terminal-native** - Built for Windows Terminal, works with any terminal supporting tabs
38
-
39
- ## Agents
40
-
41
- ### Core Agents (Always Running)
42
-
43
- | Agent | Icon | Role |
44
- |-------|------|------|
45
- | Forge Master | ⚒️ | Chief Orchestrator - distributes tasks, tracks progress |
46
- | Sentinel | 🛡️ | Code Reviewer - quality gates, adversarial review |
47
-
48
- ### Worker Agents (Per-Task)
49
-
50
- | Agent | Icon | Role |
51
- |-------|------|------|
52
- | Anvil | 🔨 | Frontend Dev - components, UI, styling |
53
- | Furnace | 🔥 | Backend Dev - APIs, database, services |
54
- | Crucible | 🧪 | Tester/QA - tests, bug hunting |
55
- | Scribe | 📜 | Documentation - docs, README, API specs |
56
- | Herald | 📯 | Release Manager - versioning, deployment |
57
-
58
- ### Planning Hub Agents (Your Terminal)
59
-
60
- | Agent | Icon | Role |
61
- |-------|------|------|
62
- | Sage | 🏛️ | System Architect |
63
- | Oracle | 🔮 | Requirements Analyst |
64
- | Quartermaster | 📋 | Product Manager |
65
-
66
- ### Specialists (On-Demand)
67
-
68
- | Agent | Icon | Role |
69
- |-------|------|------|
70
- | Architect | 🏛️ | System Architect |
71
- | Ember | ⚙️ | DevOps/Infrastructure |
72
- | Aegis | 🔒 | Security Specialist |
73
-
74
- ## Project Structure
75
-
76
- ```
77
- vibe-forge/
78
- ├── agents/ # Agent definitions
79
- │ ├── forge-master/
80
- │ │ ├── personality.md # Identity, voice, principles
81
- │ │ ├── capabilities.md # Commands, tools, decisions
82
- │ │ └── context-template.md # Session startup context
83
- │ ├── sentinel/
84
- │ ├── anvil/
85
- │ ├── furnace/
86
- │ ├── crucible/
87
- │ └── ...
88
- ├── tasks/ # Task lifecycle folders
89
- │ ├── pending/ # New tasks waiting for pickup
90
- │ ├── in-progress/ # Currently being worked on
91
- │ ├── completed/ # Done, ready for review
92
- │ ├── review/ # Under Sentinel review
93
- │ ├── approved/ # Passed review
94
- │ ├── needs-changes/ # Review feedback to address
95
- │ └── merged/ # Archive
96
- ├── specs/ # Planning documents
97
- │ ├── epics/
98
- │ └── stories/
99
- ├── context/ # Shared context files
100
- │ ├── project-context.md # Tech stack, patterns, rules
101
- │ └── forge-state.yaml # Current forge status
102
- └── config/ # Configuration
103
- ├── agents.json # Agent roster (source of truth)
104
- ├── agent-manifest.yaml # Agent documentation (non-normative)
105
- ├── task-template.md # Task file template
106
- └── task-types.yaml # Task routing rules
107
- ```
108
-
109
- ## Task Lifecycle
110
-
111
- ```
112
- ┌─────────┐ ┌─────────────┐ ┌───────────┐ ┌────────┐
113
- │ pending │ -> │ in-progress │ -> │ completed │ -> │ review │
114
- └─────────┘ └─────────────┘ └───────────┘ └────────┘
115
-
116
- ┌──────────────┐ │
117
- │ needs-changes│ <────────────────┤
118
- └──────────────┘ │
119
- │ │
120
- ▼ ▼
121
- ┌─────────────┐ ┌──────────┐
122
- │ in-progress │ │ approved │
123
- └─────────────┘ └──────────┘
124
-
125
-
126
- ┌─────────┐
127
- │ merged │
128
- └─────────┘
129
- ```
130
-
131
- ## Getting Started
132
-
133
- ### Prerequisites
134
-
135
- - Claude Code CLI ([install](https://claude.ai/download))
136
- - Windows Terminal (recommended) or any terminal with tabs
137
- - Node.js 16+ (for npx installer)
138
- - Git
139
-
140
- ### Quick Start
141
-
142
- ```bash
143
- # In your project directory
144
- npx vibe-forge init
145
- ```
146
-
147
- This will:
148
-
149
- 1. Clone Vibe Forge into `_vibe-forge/`
150
- 2. Detect your platform and terminal
151
- 3. Set up the daemon and configuration
152
- 4. Create a project context file
153
-
154
- Then start the Planning Hub:
155
-
156
- ```bash
157
- cd _vibe-forge
158
- ./bin/forge.sh
159
- ```
160
-
161
- ### Manual Setup
162
-
163
- If you prefer not to use npx:
164
-
165
- ```bash
166
- # Clone into your project
167
- git clone https://github.com/SpasticPalate/vibe-forge.git _vibe-forge
168
-
169
- # Run setup
170
- cd _vibe-forge
171
- ./bin/forge-setup.sh
172
-
173
- # Start the Planning Hub
174
- ./bin/forge.sh
175
- ```
176
-
177
- ### Updating
178
-
179
- ```bash
180
- npx vibe-forge update
181
- ```
182
-
183
- ## Slash Commands
184
-
185
- When using Claude Code inside your project, use the `/forge` command:
186
-
187
- ```
188
- /forge - Start the Planning Hub (default)
189
- /forge status - Show status dashboard
190
- /forge spawn <agent> - Spawn worker in new terminal
191
- /forge task [desc] - Create a new task
192
- /forge help - Show available commands
193
- ```
194
-
195
- Agents (with aliases):
196
-
197
- | Agent | Aliases | Role |
198
- |-------|---------|------|
199
- | anvil | frontend, ui, fe | Frontend Developer |
200
- | furnace | backend, api, be | Backend Developer |
201
- | crucible | test, testing, qa | Tester / QA |
202
- | sentinel | review, reviewer, cr | Code Reviewer |
203
- | scribe | docs, documentation | Documentation |
204
- | herald | release, deploy | Release Manager |
205
- | ember | devops, ops, infra | DevOps |
206
- | aegis | security, sec, appsec | Security |
207
-
208
- Use either the forge name or any alias: `/forge spawn frontend` or `/forge spawn anvil`
209
-
210
- ## Token Efficiency
211
-
212
- Vibe Forge is designed for minimal token usage:
213
-
214
- 1. **Local context** - Agents read from files, not conversation history
215
- 2. **Task files as truth** - Instructions in files, not repeated in chat
216
- 3. **Reference, don't duplicate** - Point to paths, don't paste contents
217
- 4. **Batch updates** - One status report per cycle, not per task
218
- 5. **Exception-based** - Report problems, not smooth operations
219
-
220
- ## Philosophy
221
-
222
- > "A forge is not a factory. Each piece is crafted with intention."
223
-
224
- Vibe Forge embraces the craft of software development. Each agent brings expertise and personality to their work. The goal isn't maximum automation - it's maximum collaboration between human and AI.
225
-
226
- ## Acknowledgments
227
-
228
- Inspired by BMAD (Business Model-Agnostic Development) methodology and its multi-agent workflow system.
229
-
230
- ## License
231
-
232
- MIT
1
+ # Vibe Forge
2
+
3
+ A multi-agent development orchestration system for terminal-native vibe coding.
4
+
5
+ ## What Is This?
6
+
7
+ Vibe Forge transforms your terminal into a collaborative AI development environment. Multiple Claude agents, each with distinct personalities and specializations, work together to build software. You talk to a Planning Hub that coordinates the team, then spawn workers into separate terminal tabs to execute in parallel.
8
+
9
+ ```
10
+ YOU
11
+ |
12
+ /forge plan
13
+ |
14
+ +-----------+-----------+
15
+ | PLANNING HUB |
16
+ | Oracle Architect |
17
+ | Aegis Pixel |
18
+ | Ember Crucible |
19
+ +-----------+-----------+
20
+ |
21
+ /forge spawn <agent>
22
+ |
23
+ +--------+-------+-------+--------+
24
+ | | | | |
25
+ Anvil Furnace Crucible Temper Scribe
26
+ FE BE QA Review Docs
27
+ ```
28
+
29
+ ## Install
30
+
31
+ ```bash
32
+ npx vibe-forge init
33
+ ```
34
+
35
+ This sets up Vibe Forge in your project: detects your platform, configures your terminal, creates project context files, and installs the `/forge` slash command into Claude Code.
36
+
37
+ **Prerequisites:** [Claude Code CLI](https://claude.ai/download), Node.js 18+, Git
38
+
39
+ ## Quick Start
40
+
41
+ ```bash
42
+ # Start the Planning Hub (multi-expert planning session)
43
+ /forge
44
+
45
+ # Or jump straight to planning a feature
46
+ /forge plan user authentication
47
+
48
+ # Spawn a worker agent in a new terminal tab
49
+ /forge spawn anvil
50
+
51
+ # Check what's happening
52
+ /forge status
53
+
54
+ # See all commands
55
+ /forge help
56
+ ```
57
+
58
+ ## Agents
59
+
60
+ ### Planning Hub (Your Terminal)
61
+
62
+ When you run `/forge`, a multi-voice planning session starts. These expert voices collaborate to help you scope, design, and decompose work:
63
+
64
+ | Voice | Icon | Speaks When |
65
+ |-------|------|-------------|
66
+ | Forge Master | :fire: | Tasks, assignments, workflow, coordination |
67
+ | Architect | :classical_building: | Architecture, patterns, tech decisions |
68
+ | Aegis | :shield: | Auth, security, vulnerabilities |
69
+ | Ember | :gear: | DevOps, CI/CD, deployment |
70
+ | Pixel | :art: | UX, user flows, accessibility |
71
+ | Oracle | :bar_chart: | Requirements, scope, priorities |
72
+ | Crucible | :test_tube: | Edge cases, test strategy, quality |
73
+ | Loki | :performing_arts: | Challenges assumptions, lateral thinking |
74
+
75
+ ### Worker Agents (Separate Terminals)
76
+
77
+ Spawn these into new terminal tabs to execute tasks:
78
+
79
+ | Agent | Aliases | Role |
80
+ |-------|---------|------|
81
+ | anvil | frontend, ui, fe | Frontend Developer |
82
+ | furnace | backend, api, be | Backend Developer |
83
+ | crucible | test, qa | Tester / QA |
84
+ | scribe | docs, documentation | Documentation |
85
+ | herald | release, deploy | Release Manager |
86
+ | ember | devops, infra | DevOps Engineer |
87
+
88
+ ### Review Agents
89
+
90
+ | Agent | Aliases | Role |
91
+ |-------|---------|------|
92
+ | temper | review, cr | Code Reviewer (compliance + correctness) |
93
+ | crucible-x | adversarial, cx | Adversarial Reviewer (tries to break it) |
94
+
95
+ ### Specialists
96
+
97
+ | Agent | Aliases | Role |
98
+ |-------|---------|------|
99
+ | architect | arch, sage | System Architect |
100
+ | aegis | security, sec | Security Specialist |
101
+ | pixel | ux, ui-design | UX Designer |
102
+ | oracle | product, po | Product Owner |
103
+ | loki | brainstorm, contrarian | Assumption Challenger |
104
+
105
+ ### Red Team
106
+
107
+ | Agent | Aliases | Role |
108
+ |-------|---------|------|
109
+ | slag | redteam, pentest | Red Team Lead |
110
+ | flux | infra-sec, chaos | Infrastructure Security |
111
+
112
+ ## How It Works
113
+
114
+ ### Planning Mode
115
+
116
+ When you describe a goal, the Hub enters a 4-phase planning flow:
117
+
118
+ 1. **Discovery** - Oracle asks clarifying questions about users, goals, constraints
119
+ 2. **Decomposition** - Architect breaks the goal into epics with success metrics
120
+ 3. **Tasking** - Forge Master creates stories and tasks, assigns to agents
121
+ 4. **Commit** - Epic and task files written to disk, ready for workers
122
+
123
+ ### Task System
124
+
125
+ Tasks flow through folders on disk. No database required.
126
+
127
+ ```
128
+ pending/ -> in-progress/ -> completed/ -> review/ -> approved/ -> merged/
129
+ |
130
+ needs-changes/ (back to worker)
131
+ ```
132
+
133
+ Workers pick up tasks from `pending/` on startup. Temper reviews completed work. The daemon routes tasks automatically.
134
+
135
+ ### Daemon
136
+
137
+ An optional background daemon monitors the forge:
138
+
139
+ ```bash
140
+ ./bin/forge.sh daemon start # Start background monitoring
141
+ ./bin/forge.sh daemon status # Check what's happening
142
+ ./bin/forge.sh daemon stop # Stop the daemon
143
+ ```
144
+
145
+ The daemon provides:
146
+ - Task routing between folders
147
+ - Agent status tracking
148
+ - Token budget warnings for long-running agents
149
+ - Dependency resolution (respects `blocked_by` in task files)
150
+ - Attention notifications when agents need help
151
+
152
+ ### Dashboard
153
+
154
+ A web dashboard at `http://localhost:2800` shows:
155
+ - Task counts and status
156
+ - Agent activity feed
157
+ - Issue detection
158
+ - Real-time updates via WebSocket
159
+
160
+ ### Per-Project Customization
161
+
162
+ Add agent-specific rules for your project in `context/agent-overrides/`:
163
+
164
+ ```markdown
165
+ <!-- context/agent-overrides/anvil.md -->
166
+ - Use Tailwind CSS, no custom CSS files
167
+ - All components in src/components/ with PascalCase
168
+ - Use shadcn/ui for base components
169
+ ```
170
+
171
+ These rules are injected into the agent's system prompt at spawn time.
172
+
173
+ ## Project Structure
174
+
175
+ ```
176
+ your-project/
177
+ _vibe-forge/
178
+ agents/ # Agent personalities (16 agents)
179
+ bin/ # CLI, daemon, dashboard, spawn scripts
180
+ config/ # agents.json, task templates
181
+ context/ # Project context, agent overrides
182
+ specs/ # Epics and stories
183
+ tasks/ # Task lifecycle folders
184
+ docs/ # Security, architecture, agent docs
185
+ ```
186
+
187
+ ## Commands Reference
188
+
189
+ | Command | Description |
190
+ |---------|-------------|
191
+ | `/forge` | Start the Planning Hub |
192
+ | `/forge plan <feature>` | Plan a feature with the full team |
193
+ | `/forge status` | Show status dashboard |
194
+ | `/forge spawn <agent>` | Spawn worker in new terminal |
195
+ | `/forge task [desc]` | Create a new task |
196
+ | `/forge redteam [scope]` | Launch red team engagement |
197
+ | `/forge help` | Show all commands |
198
+
199
+ ## Security
200
+
201
+ Vibe Forge uses a defense-in-depth permission model:
202
+
203
+ 1. **Allowlist** (`.claude/settings.json`) - Pre-approves safe operations
204
+ 2. **Heimdall** (pre-tool hook) - Enforces forge policies (branch protection, naming)
205
+ 3. **Claude Code prompts** - Anything not allowlisted still requires approval
206
+
207
+ See [docs/security.md](docs/security.md) for the full security model.
208
+
209
+ ## License
210
+
211
+ MIT
@@ -234,7 +234,7 @@ if (!JWT_SECRET) throw new Error('JWT_SECRET not configured');
234
234
 
235
235
  ## Interaction with Other Agents
236
236
 
237
- ### With Forge Master
237
+ ### With Planning Hub
238
238
  - Receives security tasks
239
239
  - Can BLOCK releases for critical findings
240
240
  - Reports security status
@@ -258,6 +258,13 @@ if (!JWT_SECRET) throw new Error('JWT_SECRET not configured');
258
258
  - Must approve releases (security sign-off)
259
259
  - Can halt release for security issues
260
260
 
261
+ ### With Red Team (Slag/Flux)
262
+ - NO collaboration during active engagements (separation of duties)
263
+ - Receives findings as remediation tasks post-engagement
264
+ - Validates fixes; Slag retests after Aegis confirms remediation
265
+ - Blue team / red team dynamic: Aegis defends, Slag attacks
266
+ - Can request re-engagement if threat model changes
267
+
261
268
  ---
262
269
 
263
270
  ## Token Efficiency
@@ -267,3 +274,30 @@ if (!JWT_SECRET) throw new Error('JWT_SECRET not configured');
267
274
  3. **CVE references** - "CVE-2026-1234" links to details
268
275
  4. **Fix patterns** - Reference secure patterns, don't re-explain
269
276
  5. **Risk/Impact/Fix format** - Consistent structure, quick scan
277
+
278
+ ---
279
+
280
+ ## When to STOP
281
+
282
+ Write `tasks/attention/{task-id}-aegis-blocked.md` and set status to `blocked` immediately if:
283
+
284
+ 1. **CRITICAL blocks release** — a critical vulnerability is found that cannot be mitigated within the current task scope; raise a blocking issue immediately and do not allow the release to proceed
285
+ 2. **Cannot verify without production access** — a security concern requires access to production data or systems that cannot be safely simulated; document the risk and escalate to human review
286
+ 3. **Ambiguous threat model** — the task does not define what assets are being protected or who the threat actors are; cannot scope a security review without this
287
+ 4. **Missing dependency** — security tooling (scanner, linter, test harness) is absent and cannot be added without approval
288
+ 5. **Three failures, same blocker** — three consecutive attempts at a fix fail for the same root cause
289
+ 6. **Context window pressure** — see Token Budget Management below
290
+
291
+ ---
292
+
293
+ ## Token Budget Management
294
+ - **Self-monitor for degradation** — if your responses become repetitive, you forget earlier decisions, or you struggle to track the full task context, immediately use /compact-context before continuing. A fresh compact is better than degraded output.
295
+ - **Write a handoff if ending mid-task** — if you must stop before completing the task (context limit, blocked, too complex), write a handoff file to `tasks/handoffs/` using the template at `templates/handoff-template.md`. Document what was done, what remains, and how to resume. The next agent session will read this file to continue seamlessly.
296
+
297
+ Context windows are finite. Treat them like fuel.
298
+
299
+ - **Externalise as you go** — write findings to the task file as you identify them; never hold findings only in conversation memory
300
+ - **The completion summary is live** — update it incrementally so no finding is lost if the session ends early
301
+ - **Before reading large files** — focus on the changed surfaces, not the full codebase
302
+ - **Signal before saturating** — if you have reviewed many files, write current findings and create an attention note requesting a continuation session
303
+ - **Hand off cleanly** — the next session must be able to resume from the task file alone; never rely on conversation memory persisting
@@ -212,7 +212,7 @@ describe('DatePicker', () => {
212
212
 
213
213
  ## Interaction with Other Agents
214
214
 
215
- ### With Forge Master
215
+ ### With Planning Hub
216
216
  - Receives tasks via `/tasks/pending/`
217
217
  - Reports completion via `/tasks/completed/`
218
218
  - Reports blockers directly in task file
@@ -238,3 +238,41 @@ describe('DatePicker', () => {
238
238
  3. **Pattern references** - "Following Select.tsx pattern" not re-explaining
239
239
  4. **Diff-style updates** - What changed, not full file contents
240
240
  5. **Batch questions** - Ask all blockers at once, not one at a time
241
+
242
+ ---
243
+
244
+ ## When to STOP
245
+
246
+ Write `tasks/attention/{task-id}-anvil-blocked.md` and set status to `blocked` immediately if:
247
+
248
+ 1. **Ambiguous AC** — acceptance criteria cannot be implemented as written; multiple valid interpretations exist
249
+ 2. **Missing design spec** — the task requires visual design decisions not documented anywhere; request Pixel input before building
250
+ 3. **API contract missing** — the frontend requires an API endpoint or data shape that Furnace has not defined yet
251
+ 4. **Missing dependency** — required package, component, or asset is absent; do not install or create without approval
252
+ 5. **Accessibility conflict** — implementing the spec as written would fail WCAG; flag before building the inaccessible version
253
+ 6. **Three failures, same blocker** — three consecutive attempts fail for the same root cause
254
+ 7. **Context window pressure** — see Token Budget Management below
255
+
256
+ Attention file format:
257
+ ```
258
+ task: {TASK_ID}
259
+ agent: anvil
260
+ blocked_since: {ISO8601}
261
+ reason: one line
262
+ what_was_tried: brief description
263
+ what_is_needed: specific ask
264
+ ```
265
+
266
+ ---
267
+
268
+ ## Token Budget Management
269
+ - **Self-monitor for degradation** — if your responses become repetitive, you forget earlier decisions, or you struggle to track the full task context, immediately use /compact-context before continuing. A fresh compact is better than degraded output.
270
+ - **Write a handoff if ending mid-task** — if you must stop before completing the task (context limit, blocked, too complex), write a handoff file to `tasks/handoffs/` using the template at `templates/handoff-template.md`. Document what was done, what remains, and how to resume. The next agent session will read this file to continue seamlessly.
271
+
272
+ Context windows are finite. Treat them like fuel.
273
+
274
+ - **Externalise as you go** — write key decisions, chosen patterns, and progress to the task file continuously, not only at completion
275
+ - **The completion summary is live** — update it incrementally so work is never lost if the session ends early
276
+ - **Before reading large files** — ask whether you need the whole file or just the relevant component
277
+ - **Signal before saturating** — if you have read many component files and are running low on context, write current progress and create an attention note requesting a continuation session
278
+ - **Hand off cleanly** — the next session must be able to resume from the task file alone; never rely on conversation memory persisting
@@ -232,3 +232,29 @@ What becomes easier or harder?
232
232
  3. **Pattern references** - "See ADR-003" not re-explaining
233
233
  4. **Diagram references** - Point to visual docs when available
234
234
  5. **Delegate implementation** - Create tasks for workers, don't implement
235
+
236
+ ---
237
+
238
+ ## When to STOP
239
+
240
+ Write `tasks/attention/{task-id}-architect-blocked.md` and set status to `blocked` immediately if:
241
+
242
+ 1. **ADR conflict unresolved** — the proposed design conflicts with an existing accepted ADR with no clear superseding rationale; do not proceed without resolution
243
+ 2. **Decision requires stakeholder input** — technical options have equal merit but different business implications; escalate to Planning Hub with a clear decision brief rather than making the call alone
244
+ 3. **Scope is unbounded** — the task requires analyzing the entire codebase with no defined starting point; request scoping before starting
245
+ 4. **Missing context** — architecture cannot be evaluated without information that does not exist in the codebase or docs (e.g., production load data, third-party constraints)
246
+ 5. **Context window pressure** — see Token Budget Management below
247
+
248
+ ---
249
+
250
+ ## Token Budget Management
251
+ - **Self-monitor for degradation** — if your responses become repetitive, you forget earlier decisions, or you struggle to track the full task context, immediately use /compact-context before continuing. A fresh compact is better than degraded output.
252
+ - **Write a handoff if ending mid-task** — if you must stop before completing the task (context limit, blocked, too complex), write a handoff file to `tasks/handoffs/` using the template at `templates/handoff-template.md`. Document what was done, what remains, and how to resume. The next agent session will read this file to continue seamlessly.
253
+
254
+ Context windows are finite. Treat them like fuel.
255
+
256
+ - **Externalise decisions as you go** — write ADRs and recommendations to files as you form them; do not hold analysis only in conversation memory
257
+ - **Decision artifacts are live** — start the ADR early and fill it in as you analyze; the document survives session boundaries
258
+ - **Before reading large files** — ask whether you need the whole file or just the relevant modules
259
+ - **Signal before saturating** — if you have read extensively and are approaching context limits, write current findings and recommendations to the task file and create an attention note
260
+ - **Hand off cleanly** — the next session must be able to resume from the task file and ADR alone; never rely on conversation memory persisting