@bookedsolid/reagent 0.7.2 → 0.10.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/README.md +277 -140
- package/agents/engineering/pr-voice-reviewer.md +229 -0
- package/agents/product-owner.md +152 -0
- package/agents/reagent-orchestrator.md +8 -0
- package/commands/pm-status.md +230 -0
- package/commands/review-pr.md +197 -0
- package/dist/cli/commands/catalyze/gap-detector.d.ts.map +1 -1
- package/dist/cli/commands/catalyze/gap-detector.js +1 -3
- package/dist/cli/commands/catalyze/gap-detector.js.map +1 -1
- package/dist/cli/commands/daemon/index.d.ts +5 -0
- package/dist/cli/commands/daemon/index.d.ts.map +1 -0
- package/dist/cli/commands/daemon/index.js +59 -0
- package/dist/cli/commands/daemon/index.js.map +1 -0
- package/dist/cli/commands/daemon/restart.d.ts +10 -0
- package/dist/cli/commands/daemon/restart.d.ts.map +1 -0
- package/dist/cli/commands/daemon/restart.js +20 -0
- package/dist/cli/commands/daemon/restart.js.map +1 -0
- package/dist/cli/commands/daemon/start.d.ts +2 -0
- package/dist/cli/commands/daemon/start.d.ts.map +1 -0
- package/dist/cli/commands/daemon/start.js +143 -0
- package/dist/cli/commands/daemon/start.js.map +1 -0
- package/dist/cli/commands/daemon/status.d.ts +2 -0
- package/dist/cli/commands/daemon/status.d.ts.map +1 -0
- package/dist/cli/commands/daemon/status.js +90 -0
- package/dist/cli/commands/daemon/status.js.map +1 -0
- package/dist/cli/commands/daemon/stop.d.ts +2 -0
- package/dist/cli/commands/daemon/stop.d.ts.map +1 -0
- package/dist/cli/commands/daemon/stop.js +73 -0
- package/dist/cli/commands/daemon/stop.js.map +1 -0
- package/dist/cli/commands/init/claude-hooks.d.ts +1 -1
- package/dist/cli/commands/init/claude-hooks.d.ts.map +1 -1
- package/dist/cli/commands/init/claude-hooks.js +10 -4
- package/dist/cli/commands/init/claude-hooks.js.map +1 -1
- package/dist/cli/commands/init/index.d.ts.map +1 -1
- package/dist/cli/commands/init/index.js +5 -1
- package/dist/cli/commands/init/index.js.map +1 -1
- package/dist/cli/commands/init/policy.d.ts.map +1 -1
- package/dist/cli/commands/init/policy.js +21 -0
- package/dist/cli/commands/init/policy.js.map +1 -1
- package/dist/cli/commands/init/types.d.ts +16 -0
- package/dist/cli/commands/init/types.d.ts.map +1 -1
- package/dist/cli/index.js +9 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/config/daemon-loader.d.ts +16 -0
- package/dist/config/daemon-loader.d.ts.map +1 -0
- package/dist/config/daemon-loader.js +76 -0
- package/dist/config/daemon-loader.js.map +1 -0
- package/dist/config/gateway-config.d.ts.map +1 -1
- package/dist/config/gateway-config.js +6 -0
- package/dist/config/gateway-config.js.map +1 -1
- package/dist/config/policy-loader.d.ts +27 -0
- package/dist/config/policy-loader.d.ts.map +1 -1
- package/dist/config/policy-loader.js +103 -10
- package/dist/config/policy-loader.js.map +1 -1
- package/dist/gateway/circuit-breaker.d.ts +60 -0
- package/dist/gateway/circuit-breaker.d.ts.map +1 -0
- package/dist/gateway/circuit-breaker.js +104 -0
- package/dist/gateway/circuit-breaker.js.map +1 -0
- package/dist/gateway/collision-detector.d.ts +31 -0
- package/dist/gateway/collision-detector.d.ts.map +1 -0
- package/dist/gateway/collision-detector.js +53 -0
- package/dist/gateway/collision-detector.js.map +1 -0
- package/dist/gateway/middleware/blocked-paths.js +2 -2
- package/dist/gateway/middleware/blocked-paths.js.map +1 -1
- package/dist/gateway/middleware/circuit-breaker.d.ts +12 -0
- package/dist/gateway/middleware/circuit-breaker.d.ts.map +1 -0
- package/dist/gateway/middleware/circuit-breaker.js +44 -0
- package/dist/gateway/middleware/circuit-breaker.js.map +1 -0
- package/dist/gateway/middleware/injection.d.ts +23 -0
- package/dist/gateway/middleware/injection.d.ts.map +1 -0
- package/dist/gateway/middleware/injection.js +129 -0
- package/dist/gateway/middleware/injection.js.map +1 -0
- package/dist/gateway/middleware/policy.js +2 -2
- package/dist/gateway/middleware/policy.js.map +1 -1
- package/dist/gateway/middleware/rate-limit.d.ts +13 -0
- package/dist/gateway/middleware/rate-limit.d.ts.map +1 -0
- package/dist/gateway/middleware/rate-limit.js +32 -0
- package/dist/gateway/middleware/rate-limit.js.map +1 -0
- package/dist/gateway/middleware/redact.d.ts.map +1 -1
- package/dist/gateway/middleware/redact.js +7 -0
- package/dist/gateway/middleware/redact.js.map +1 -1
- package/dist/gateway/middleware/result-size-cap.d.ts +14 -0
- package/dist/gateway/middleware/result-size-cap.d.ts.map +1 -0
- package/dist/gateway/middleware/result-size-cap.js +49 -0
- package/dist/gateway/middleware/result-size-cap.js.map +1 -0
- package/dist/gateway/native-tools.js +1 -1
- package/dist/gateway/native-tools.js.map +1 -1
- package/dist/gateway/rate-limiter.d.ts +47 -0
- package/dist/gateway/rate-limiter.d.ts.map +1 -0
- package/dist/gateway/rate-limiter.js +89 -0
- package/dist/gateway/rate-limiter.js.map +1 -0
- package/dist/gateway/server.d.ts.map +1 -1
- package/dist/gateway/server.js +27 -1
- package/dist/gateway/server.js.map +1 -1
- package/dist/gateway/tool-proxy.js +1 -1
- package/dist/gateway/tool-proxy.js.map +1 -1
- package/dist/types/daemon.d.ts +45 -0
- package/dist/types/daemon.d.ts.map +1 -0
- package/dist/types/daemon.js +2 -0
- package/dist/types/daemon.js.map +1 -0
- package/dist/types/gateway.d.ts +9 -0
- package/dist/types/gateway.d.ts.map +1 -1
- package/dist/types/policy.d.ts +1 -0
- package/dist/types/policy.d.ts.map +1 -1
- package/hooks/_lib/discord.sh +75 -0
- package/hooks/blocked-paths-enforcer.sh +0 -1
- package/hooks/changeset-security-gate.sh +143 -0
- package/hooks/commit-review-gate.sh +12 -4
- package/hooks/import-guard.sh +14 -0
- package/hooks/network-exfil-guard.sh +20 -2
- package/hooks/pr-issue-link-gate.sh +65 -0
- package/hooks/push-review-gate.sh +17 -2
- package/hooks/rate-limit-guard.sh +26 -2
- package/hooks/reagent-notify.sh +65 -0
- package/hooks/security-disclosure-gate.sh +146 -0
- package/husky/pre-push.sh +84 -0
- package/package.json +10 -2
- package/profiles/bst-internal.json +12 -2
- package/profiles/client-engagement.json +12 -2
package/README.md
CHANGED
|
@@ -2,28 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
Zero-trust MCP gateway and agentic infrastructure for AI-assisted development.
|
|
4
4
|
|
|
5
|
-
Reagent is
|
|
5
|
+
Reagent is four things:
|
|
6
6
|
|
|
7
|
-
1. **MCP Gateway** (`reagent serve`)
|
|
7
|
+
1. **MCP Gateway** (`reagent serve`) — a proxy server that sits between your AI assistant (Claude Code, Cursor, etc.) and downstream MCP tool servers. Every tool call flows through a zero-trust middleware chain: policy enforcement, tier classification, blocked path enforcement, secret redaction, and hash-chained audit logging.
|
|
8
8
|
|
|
9
|
-
2. **Config Scaffolder** (`reagent init`)
|
|
9
|
+
2. **Config Scaffolder** (`reagent init`) — installs safety hooks, behavioral policies, quality gates, agent teams, and developer tooling into any project.
|
|
10
10
|
|
|
11
|
-
3. **
|
|
11
|
+
3. **Stack Analyzer** (`reagent catalyze`) — detects your project's tech stack and generates a gap analysis report showing which hooks, gates, and agents are missing. Produces Markdown and HTML reports.
|
|
12
|
+
|
|
13
|
+
4. **Project Management Layer** — lightweight task tracking with JSONL event store, native MCP tools, GitHub issue sync, and a product-owner agent for task planning.
|
|
12
14
|
|
|
13
15
|
## Why Reagent?
|
|
14
16
|
|
|
15
17
|
AI coding assistants are powerful but unconstrained. Reagent adds the missing governance layer:
|
|
16
18
|
|
|
17
|
-
- **Policy enforcement**
|
|
18
|
-
- **Kill switch**
|
|
19
|
-
- **Blocked path enforcement**
|
|
20
|
-
- **Secret redaction**
|
|
21
|
-
- **Audit trail**
|
|
22
|
-
- **Tool blocking**
|
|
23
|
-
- **Tier downgrade protection**
|
|
24
|
-
- **Security hooks**
|
|
25
|
-
- **Quality gates**
|
|
26
|
-
- **Task management**
|
|
19
|
+
- **Policy enforcement** — graduated autonomy levels (L0 read-only through L3 full access) control which tiers of tools an agent can invoke
|
|
20
|
+
- **Kill switch** — `reagent freeze` immediately blocks all tool calls across every connected MCP server
|
|
21
|
+
- **Blocked path enforcement** — tool arguments referencing protected paths (including `.reagent/` itself) are denied before execution
|
|
22
|
+
- **Secret redaction** — tool arguments and outputs are scanned for AWS keys, GitHub tokens, API keys, PEM private keys, Discord tokens, and more — redacted before they reach the AI or the downstream tool
|
|
23
|
+
- **Audit trail** — every tool invocation is logged as hash-chained JSONL with serialized writes for chain integrity
|
|
24
|
+
- **Tool blocking** — individual tools can be permanently blocked regardless of autonomy level
|
|
25
|
+
- **Tier downgrade protection** — `tool_overrides` cannot lower a tool's tier below its static or convention-based classification
|
|
26
|
+
- **Security hooks** — 20 Claude Code hooks enforce settings protection, secret scanning, dangerous command interception, blocked path enforcement, symlink traversal prevention, network exfiltration blocking, and more
|
|
27
|
+
- **Quality gates** — commit and push review gates with triage scoring, review caching, and agent-spawned code review
|
|
28
|
+
- **Task management** — native MCP tools for task CRUD, GitHub issue sync, and a product-owner agent with guardrails
|
|
27
29
|
|
|
28
30
|
## Quick Start
|
|
29
31
|
|
|
@@ -60,10 +62,18 @@ All downstream tool calls now flow through Reagent's middleware chain.
|
|
|
60
62
|
```bash
|
|
61
63
|
npx @bookedsolid/reagent init
|
|
62
64
|
|
|
63
|
-
# With a profile
|
|
65
|
+
# With a base profile
|
|
64
66
|
npx @bookedsolid/reagent init --profile bst-internal
|
|
65
67
|
npx @bookedsolid/reagent init --profile client-engagement
|
|
66
68
|
|
|
69
|
+
# With a tech stack profile
|
|
70
|
+
npx @bookedsolid/reagent init --profile nextjs
|
|
71
|
+
npx @bookedsolid/reagent init --profile lit-wc
|
|
72
|
+
|
|
73
|
+
# With optional integrations
|
|
74
|
+
npx @bookedsolid/reagent init --github # scaffold GitHub labels + milestones
|
|
75
|
+
npx @bookedsolid/reagent init --discord # configure Discord notifications
|
|
76
|
+
|
|
67
77
|
# Preview without changes
|
|
68
78
|
npx @bookedsolid/reagent init --dry-run
|
|
69
79
|
```
|
|
@@ -74,9 +84,10 @@ npx @bookedsolid/reagent init --dry-run
|
|
|
74
84
|
| ------------------------------- | ------------------------------------------------- |
|
|
75
85
|
| `reagent serve` | Start the MCP gateway server (stdio transport) |
|
|
76
86
|
| `reagent init` | Install reagent config into the current directory |
|
|
87
|
+
| `reagent catalyze` | Analyze project stack and generate gap report |
|
|
77
88
|
| `reagent check` | Verify what reagent components are installed |
|
|
78
|
-
| `reagent freeze --reason "..."` | Create `.reagent/HALT`
|
|
79
|
-
| `reagent unfreeze` | Remove `.reagent/HALT`
|
|
89
|
+
| `reagent freeze --reason "..."` | Create `.reagent/HALT` — suspends all tool calls |
|
|
90
|
+
| `reagent unfreeze` | Remove `.reagent/HALT` — resumes tool calls |
|
|
80
91
|
| `reagent cache check <sha>` | Check review cache for a file SHA |
|
|
81
92
|
| `reagent cache set <sha> <res>` | Store a review result (pass/fail/advisory) |
|
|
82
93
|
| `reagent cache clear` | Clear all cached review results |
|
|
@@ -84,10 +95,28 @@ npx @bookedsolid/reagent init --dry-run
|
|
|
84
95
|
|
|
85
96
|
### `reagent init` Options
|
|
86
97
|
|
|
87
|
-
| Flag
|
|
88
|
-
|
|
|
89
|
-
| `--profile <name>`
|
|
90
|
-
| `--dry-run`
|
|
98
|
+
| Flag | Description | Default |
|
|
99
|
+
| ------------------------- | ---------------------------------------------- | ------------------- |
|
|
100
|
+
| `--profile <name>` | Profile to install | `client-engagement` |
|
|
101
|
+
| `--dry-run` | Preview what would be installed without writes | — |
|
|
102
|
+
| `--github` | Scaffold GitHub labels, milestones, and topics | — |
|
|
103
|
+
| `--discord` | Configure Discord notifications in gateway | — |
|
|
104
|
+
| `--guild-id <id>` | Discord server ID (used with `--discord`) | — |
|
|
105
|
+
| `--alerts-channel <id>` | Discord channel for security alerts | — |
|
|
106
|
+
| `--tasks-channel <id>` | Discord channel for task events | — |
|
|
107
|
+
| `--releases-channel <id>` | Discord channel for release events | — |
|
|
108
|
+
| `--dev-channel <id>` | Discord channel for dev activity | — |
|
|
109
|
+
|
|
110
|
+
### `reagent catalyze` Options
|
|
111
|
+
|
|
112
|
+
| Flag | Description | Default |
|
|
113
|
+
| ------------- | ---------------------------------------------------- | ------- |
|
|
114
|
+
| `--plan` | Analyze stack and generate gap report (default) | ✓ |
|
|
115
|
+
| `--audit` | Compare current state against last plan, show drift | — |
|
|
116
|
+
| `--dry-run` | Print analysis without writing files | — |
|
|
117
|
+
| `[targetDir]` | Directory to analyze (defaults to current directory) | `cwd` |
|
|
118
|
+
|
|
119
|
+
`--plan` generates `catalyze-report.md` and `catalyze-report.html` listing gaps by severity. `--audit` re-runs analysis and diffs against the previous report to surface new or resolved gaps.
|
|
91
120
|
|
|
92
121
|
### `reagent freeze` Options
|
|
93
122
|
|
|
@@ -150,6 +179,9 @@ AI Assistant (Claude Code, Cursor, etc.)
|
|
|
150
179
|
| task_list, task_get |
|
|
151
180
|
| task_delete |
|
|
152
181
|
| task_sync_github |
|
|
182
|
+
| repo_scaffold |
|
|
183
|
+
| project_sync |
|
|
184
|
+
| discord_notify |
|
|
153
185
|
| |
|
|
154
186
|
+----------+------------------+
|
|
155
187
|
| stdio (MCP protocol)
|
|
@@ -163,22 +195,25 @@ The gateway:
|
|
|
163
195
|
1. Connects to all downstream MCP servers defined in `.reagent/gateway.yaml`
|
|
164
196
|
2. Discovers their tools via MCP `tools/list`
|
|
165
197
|
3. Re-registers each tool on the gateway with namespace prefixes (`servername__toolname`)
|
|
166
|
-
4. Registers native first-party tools
|
|
198
|
+
4. Registers native first-party tools through the same middleware chain
|
|
167
199
|
5. Wraps every tool call in the middleware chain
|
|
168
200
|
6. Listens on stdio for incoming MCP requests from the AI assistant
|
|
169
201
|
|
|
170
202
|
### Native MCP Tools
|
|
171
203
|
|
|
172
|
-
Reagent registers
|
|
204
|
+
Reagent registers 9 first-party tools directly on the gateway. These go through the same middleware chain (audit, policy, blocked paths, redaction) as proxied tools.
|
|
173
205
|
|
|
174
|
-
| Tool | Description
|
|
175
|
-
| ------------------ |
|
|
176
|
-
| `task_create` | Create a new task in `.reagent/tasks.jsonl`
|
|
177
|
-
| `task_update` | Update a task's status, title, urgency, or fields
|
|
178
|
-
| `task_list` | List tasks with optional status/urgency/phase filter
|
|
179
|
-
| `task_get` | Get a single task by ID (T-NNN format)
|
|
180
|
-
| `task_delete` | Cancel a task (soft delete via cancelled event)
|
|
181
|
-
| `task_sync_github` | Sync local tasks to GitHub issues (requires `gh`)
|
|
206
|
+
| Tool | Description |
|
|
207
|
+
| ------------------ | ------------------------------------------------------- |
|
|
208
|
+
| `task_create` | Create a new task in `.reagent/tasks.jsonl` |
|
|
209
|
+
| `task_update` | Update a task's status, title, urgency, or fields |
|
|
210
|
+
| `task_list` | List tasks with optional status/urgency/phase filter |
|
|
211
|
+
| `task_get` | Get a single task by ID (T-NNN format) |
|
|
212
|
+
| `task_delete` | Cancel a task (soft delete via cancelled event) |
|
|
213
|
+
| `task_sync_github` | Sync local tasks to GitHub issues (requires `gh`) |
|
|
214
|
+
| `repo_scaffold` | Set GitHub repo description, topics, labels, milestones |
|
|
215
|
+
| `project_sync` | Sync tasks to a GitHub Project board |
|
|
216
|
+
| `discord_notify` | Send a notification to a configured Discord channel |
|
|
182
217
|
|
|
183
218
|
### Gateway Configuration
|
|
184
219
|
|
|
@@ -205,10 +240,26 @@ servers:
|
|
|
205
240
|
blocked: true
|
|
206
241
|
```
|
|
207
242
|
|
|
208
|
-
**Environment variable resolution:** Use `${VAR_NAME}` syntax in env values
|
|
243
|
+
**Environment variable resolution:** Use `${VAR_NAME}` syntax in env values — Reagent resolves them from `process.env` at startup. Missing env vars produce a warning and resolve to empty string.
|
|
209
244
|
|
|
210
245
|
**Tool overrides:** Each downstream tool can be assigned a tier (`read`, `write`, `destructive`) and optionally blocked entirely. Overrides cannot lower a tool's tier below its static or convention-based classification (the override is ignored with a warning if attempted).
|
|
211
246
|
|
|
247
|
+
#### Discord Notifications (optional)
|
|
248
|
+
|
|
249
|
+
When `--discord` is passed to `reagent init`, a `discord_ops` block is appended to gateway.yaml:
|
|
250
|
+
|
|
251
|
+
```yaml
|
|
252
|
+
discord_ops:
|
|
253
|
+
guild_id: '1234567890'
|
|
254
|
+
channels:
|
|
255
|
+
alerts: '111'
|
|
256
|
+
tasks: '222'
|
|
257
|
+
releases: '333'
|
|
258
|
+
dev: '444'
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
The `discord_notify` native tool reads this config to route notifications. All Discord notifications are fire-and-forget (fail-silent).
|
|
262
|
+
|
|
212
263
|
### Tool Namespacing
|
|
213
264
|
|
|
214
265
|
Downstream tools are namespaced as `servername__toolname` to prevent collisions:
|
|
@@ -246,7 +297,7 @@ Every tool call passes through the middleware chain in onion (Koa-style) order.
|
|
|
246
297
|
|
|
247
298
|
### 1. Audit (outermost)
|
|
248
299
|
|
|
249
|
-
Records every invocation
|
|
300
|
+
Records every invocation — including denials and errors — as a hash-chained JSONL entry. Written to `.reagent/audit/YYYY-MM-DD.jsonl`. Each record contains:
|
|
250
301
|
|
|
251
302
|
```json
|
|
252
303
|
{
|
|
@@ -263,7 +314,7 @@ Records every invocation -- including denials and errors -- as a hash-chained JS
|
|
|
263
314
|
}
|
|
264
315
|
```
|
|
265
316
|
|
|
266
|
-
The `prev_hash` field chains records together
|
|
317
|
+
The `prev_hash` field chains records together — tamper with one record and every subsequent hash becomes invalid. Audit writes are serialized via a queue to maintain hash chain linearity under concurrent invocations. The `autonomy_level` is sourced from the loaded policy object, not from mutable invocation context.
|
|
267
318
|
|
|
268
319
|
### 2. Session Context
|
|
269
320
|
|
|
@@ -274,7 +325,7 @@ Attaches a unique session ID (UUID via `crypto.randomUUID()`) to every invocatio
|
|
|
274
325
|
Checks for `.reagent/HALT` file. If present, the invocation is immediately denied. The HALT file contents become the denial reason. Reads are capped at 1024 bytes. The file is validated as a regular file (symlinks outside `.reagent/` are rejected).
|
|
275
326
|
|
|
276
327
|
```bash
|
|
277
|
-
# Emergency stop
|
|
328
|
+
# Emergency stop — all tool calls blocked immediately
|
|
278
329
|
reagent freeze --reason "security incident at 2026-04-09T12:00:00Z"
|
|
279
330
|
|
|
280
331
|
# Resume
|
|
@@ -309,7 +360,7 @@ Classifies the tool into one of three tiers using a layered approach:
|
|
|
309
360
|
|
|
310
361
|
### 5. Policy Enforcement
|
|
311
362
|
|
|
312
|
-
Checks the tool's tier against the project's autonomy level. The policy middleware re-derives the tier from the tool name independently
|
|
363
|
+
Checks the tool's tier against the project's autonomy level. The policy middleware re-derives the tier from the tool name independently — it never trusts `ctx.tier` from prior middleware.
|
|
313
364
|
|
|
314
365
|
| Autonomy Level | Allowed Tiers |
|
|
315
366
|
| ------------------ | -------------------------------- |
|
|
@@ -318,7 +369,7 @@ Checks the tool's tier against the project's autonomy level. The policy middlewa
|
|
|
318
369
|
| `L2` (elevated) | `read` + `write` |
|
|
319
370
|
| `L3` (full access) | `read` + `write` + `destructive` |
|
|
320
371
|
|
|
321
|
-
Also checks for explicitly blocked tools
|
|
372
|
+
Also checks for explicitly blocked tools — a tool marked `blocked: true` in gateway config is denied regardless of autonomy level.
|
|
322
373
|
|
|
323
374
|
### 6. Blocked Paths
|
|
324
375
|
|
|
@@ -341,17 +392,17 @@ Redaction uses `redactDeep` to walk object structures in-place with a circular r
|
|
|
341
392
|
|
|
342
393
|
### Security Invariants
|
|
343
394
|
|
|
344
|
-
- **Denial is permanent**
|
|
345
|
-
- **Audit records everything**
|
|
346
|
-
- **Policy re-derives tier**
|
|
347
|
-
- **Fail-closed**
|
|
348
|
-
- **All logging to stderr**
|
|
349
|
-
- **Per-tool timeout**
|
|
350
|
-
- **Graceful shutdown**
|
|
395
|
+
- **Denial is permanent** — once any middleware denies an invocation, no subsequent middleware can revert it (enforced by `executeChain`)
|
|
396
|
+
- **Audit records everything** — audit is outermost, so even kill-switch denials are recorded
|
|
397
|
+
- **Policy re-derives tier** — never trusts mutable context; always re-classifies from tool name
|
|
398
|
+
- **Fail-closed** — errors in kill-switch or policy checks result in denial, not passthrough
|
|
399
|
+
- **All logging to stderr** — stdout is reserved for the MCP stdio transport
|
|
400
|
+
- **Per-tool timeout** — each downstream tool call has a 30-second timeout with timer cleanup to prevent leaks
|
|
401
|
+
- **Graceful shutdown** — `process.exitCode = 0` (not `process.exit(0)`) to allow event loop drain
|
|
351
402
|
|
|
352
403
|
## Claude Code Hooks
|
|
353
404
|
|
|
354
|
-
Reagent installs
|
|
405
|
+
Reagent installs 20 Claude Code hooks that enforce security, quality, and project management policies. Hooks are shell scripts that run as PreToolUse or PostToolUse interceptors.
|
|
355
406
|
|
|
356
407
|
### Hook Architecture
|
|
357
408
|
|
|
@@ -436,6 +487,26 @@ When `block_ai_attribution` is enabled in policy.yaml, blocks `gh pr create`, `g
|
|
|
436
487
|
- `Generated with [Tool]` footers
|
|
437
488
|
- `AI-generated` markers
|
|
438
489
|
|
|
490
|
+
#### `symlink-guard.sh` (PreToolUse: Write, Edit)
|
|
491
|
+
|
|
492
|
+
Detects symlink traversal attempts — blocks writes to paths that resolve through a symlink outside the project root.
|
|
493
|
+
|
|
494
|
+
#### `network-exfil-guard.sh` (PreToolUse: Bash)
|
|
495
|
+
|
|
496
|
+
Blocks `curl`/`wget`/`fetch` commands targeting non-allowlisted external hosts from within Claude tool calls. Prevents data exfiltration via outbound HTTP.
|
|
497
|
+
|
|
498
|
+
#### `import-guard.sh` (PreToolUse: Write, Edit)
|
|
499
|
+
|
|
500
|
+
Flags dangerous import patterns being written to source files — `eval`, `Function()`, dynamic `require()` with user-controlled input, and known supply-chain risk patterns.
|
|
501
|
+
|
|
502
|
+
#### `git-config-guard.sh` (PreToolUse: Bash)
|
|
503
|
+
|
|
504
|
+
Blocks `git config` commands that override hook paths, rewrite signing, or modify credential helpers in ways that could bypass security controls.
|
|
505
|
+
|
|
506
|
+
#### `ci-config-protection.sh` (PreToolUse: Write, Edit)
|
|
507
|
+
|
|
508
|
+
Blocks writes to `.github/workflows/` and other CI configuration files. Prevents agents from modifying pipeline definitions that run in elevated contexts.
|
|
509
|
+
|
|
439
510
|
### Quality Gate Hooks
|
|
440
511
|
|
|
441
512
|
#### `commit-review-gate.sh` (PreToolUse: Bash)
|
|
@@ -471,7 +542,7 @@ Intercepts `git push` commands. Analyzes the full diff against the target branch
|
|
|
471
542
|
|
|
472
543
|
Returns a stderr advisory suggesting the agent consider architectural implications.
|
|
473
544
|
|
|
474
|
-
### Project Management
|
|
545
|
+
### Project Management Hooks
|
|
475
546
|
|
|
476
547
|
#### `task-link-gate.sh` (PreToolUse: Bash)
|
|
477
548
|
|
|
@@ -481,6 +552,20 @@ Returns a stderr advisory suggesting the agent consider architectural implicatio
|
|
|
481
552
|
|
|
482
553
|
Intercepts `npm install`, `pnpm add`, `yarn add`, and `npx` commands. Extracts package names and verifies each exists in the npm registry via `npm view` before allowing the install.
|
|
483
554
|
|
|
555
|
+
### Safety Hooks
|
|
556
|
+
|
|
557
|
+
#### `output-validation.sh` (PostToolUse)
|
|
558
|
+
|
|
559
|
+
Scans tool output returned to the AI for secrets before they enter the model's context. Same pattern set as `secret-scanner.sh`.
|
|
560
|
+
|
|
561
|
+
#### `file-size-guard.sh` (PreToolUse: Write)
|
|
562
|
+
|
|
563
|
+
Blocks writes of files exceeding a configurable size threshold. Prevents runaway code generation from creating oversized blobs.
|
|
564
|
+
|
|
565
|
+
#### `rate-limit-guard.sh` (PreToolUse)
|
|
566
|
+
|
|
567
|
+
Tracks tool call frequency per session and blocks when a per-minute threshold is exceeded. Logged to `.reagent/rate-limit.log`.
|
|
568
|
+
|
|
484
569
|
## Policy File
|
|
485
570
|
|
|
486
571
|
`.reagent/policy.yaml` controls agent behavior:
|
|
@@ -488,7 +573,7 @@ Intercepts `npm install`, `pnpm add`, `yarn add`, and `npx` commands. Extracts p
|
|
|
488
573
|
```yaml
|
|
489
574
|
version: '1'
|
|
490
575
|
profile: bst-internal
|
|
491
|
-
installed_by: 'reagent@0.
|
|
576
|
+
installed_by: 'reagent@0.7.2'
|
|
492
577
|
installed_at: '2026-04-09T00:00:00.000Z'
|
|
493
578
|
autonomy_level: L1
|
|
494
579
|
max_autonomy_level: L2
|
|
@@ -502,19 +587,19 @@ notification_channel: ''
|
|
|
502
587
|
task_link_gate: false
|
|
503
588
|
```
|
|
504
589
|
|
|
505
|
-
| Field | Type | Description
|
|
506
|
-
| ----------------------------------- | ---------- |
|
|
507
|
-
| `version` | `string` | Schema version (currently `"1"`)
|
|
508
|
-
| `profile` | `string` | Profile name used during init
|
|
509
|
-
| `installed_by` | `string` | Tool and version that generated this file
|
|
510
|
-
| `installed_at` | `string` | ISO 8601 timestamp of installation
|
|
511
|
-
| `autonomy_level` | `enum` | Current level (L0-L3)
|
|
512
|
-
| `max_autonomy_level` | `enum` | Ceiling
|
|
513
|
-
| `promotion_requires_human_approval` | `boolean` | Whether level changes need human sign-off
|
|
514
|
-
| `block_ai_attribution` | `boolean` | When true, commit-msg hook rejects AI attribution markers
|
|
515
|
-
| `blocked_paths` | `string[]` | Paths the agent must never modify (`.reagent/` always added)
|
|
516
|
-
| `notification_channel` | `string` | Optional notification channel identifier
|
|
517
|
-
| `task_link_gate` | `boolean` | When true, commits must reference a task ID (T-NNN)
|
|
590
|
+
| Field | Type | Description |
|
|
591
|
+
| ----------------------------------- | ---------- | ------------------------------------------------------------- |
|
|
592
|
+
| `version` | `string` | Schema version (currently `"1"`) |
|
|
593
|
+
| `profile` | `string` | Profile name used during init |
|
|
594
|
+
| `installed_by` | `string` | Tool and version that generated this file |
|
|
595
|
+
| `installed_at` | `string` | ISO 8601 timestamp of installation |
|
|
596
|
+
| `autonomy_level` | `enum` | Current level (L0-L3) — controls which tool tiers are allowed |
|
|
597
|
+
| `max_autonomy_level` | `enum` | Ceiling — `autonomy_level` is clamped to this on load |
|
|
598
|
+
| `promotion_requires_human_approval` | `boolean` | Whether level changes need human sign-off |
|
|
599
|
+
| `block_ai_attribution` | `boolean` | When true, commit-msg hook rejects AI attribution markers |
|
|
600
|
+
| `blocked_paths` | `string[]` | Paths the agent must never modify (`.reagent/` always added) |
|
|
601
|
+
| `notification_channel` | `string` | Optional notification channel identifier |
|
|
602
|
+
| `task_link_gate` | `boolean` | When true, commits must reference a task ID (T-NNN) |
|
|
518
603
|
|
|
519
604
|
The `max_autonomy_level` field is enforced at config load time: if `autonomy_level` exceeds `max_autonomy_level`, it is clamped down with a warning.
|
|
520
605
|
|
|
@@ -532,7 +617,7 @@ Tasks are stored as an append-only event log in `.reagent/tasks.jsonl`. Each lin
|
|
|
532
617
|
{"id":"T-001","type":"completed","title":"Implement review cache","commit_refs":["abc123"],"timestamp":"2026-04-09T14:00:00.000Z"}
|
|
533
618
|
```
|
|
534
619
|
|
|
535
|
-
The current state of each task is materialized by replaying events
|
|
620
|
+
The current state of each task is materialized by replaying events — the latest event for each task ID determines its status. This append-only design means no data is ever lost and concurrent writes are safe with advisory file locking.
|
|
536
621
|
|
|
537
622
|
#### Task Schema
|
|
538
623
|
|
|
@@ -568,30 +653,20 @@ The GitHub bridge syncs local tasks to GitHub issues:
|
|
|
568
653
|
|
|
569
654
|
### MCP Tools
|
|
570
655
|
|
|
571
|
-
The
|
|
656
|
+
The 9 native tools are registered directly on the gateway and go through the full middleware chain:
|
|
572
657
|
|
|
573
658
|
```
|
|
574
|
-
task_create
|
|
575
|
-
task_update
|
|
576
|
-
task_list
|
|
577
|
-
task_get
|
|
578
|
-
task_delete
|
|
579
|
-
task_sync_github
|
|
659
|
+
task_create — Create a task: title (required), description, urgency, phase, milestone, assignee, parent_id
|
|
660
|
+
task_update — Update a task: id (required), type (started|completed|blocked|cancelled), plus any updatable fields
|
|
661
|
+
task_list — List tasks: optional filters for status, urgency, phase
|
|
662
|
+
task_get — Get one task by ID (T-NNN format)
|
|
663
|
+
task_delete — Soft-delete (cancelled event) a task by ID
|
|
664
|
+
task_sync_github — Trigger GitHub issue sync (requires gh CLI)
|
|
665
|
+
repo_scaffold — Set GitHub repo description, topics, labels, and milestones
|
|
666
|
+
project_sync — Sync tasks to a GitHub Project board
|
|
667
|
+
discord_notify — Send a notification to a configured Discord channel
|
|
580
668
|
```
|
|
581
669
|
|
|
582
|
-
### Product Owner Agent
|
|
583
|
-
|
|
584
|
-
The `product-owner` agent (`agents/product-owner.md`) manages the task backlog with built-in guardrails:
|
|
585
|
-
|
|
586
|
-
| Guardrail | Rule |
|
|
587
|
-
| ----------------- | -------------------------------------------------------- |
|
|
588
|
-
| Anti-duplication | Must call `task_list` before any `task_create` |
|
|
589
|
-
| Rate limit | Max 10 task creations per invocation |
|
|
590
|
-
| Critical urgency | Cannot set `urgency: critical` without human approval |
|
|
591
|
-
| Scope boundary | Cannot modify policy, hooks, or agent definitions |
|
|
592
|
-
| Parent grouping | Must use `parent_id` when creating 5+ tasks for one goal |
|
|
593
|
-
| Evidence required | Cannot auto-close tasks without commit ref or sign-off |
|
|
594
|
-
|
|
595
670
|
### Slash Commands
|
|
596
671
|
|
|
597
672
|
| Command | Description |
|
|
@@ -605,16 +680,16 @@ The `product-owner` agent (`agents/product-owner.md`) manages the task backlog w
|
|
|
605
680
|
|
|
606
681
|
`reagent init` configures your repository with:
|
|
607
682
|
|
|
608
|
-
- **Git hooks**
|
|
609
|
-
- **Cursor rules**
|
|
610
|
-
- **Claude hooks**
|
|
611
|
-
- **Claude settings**
|
|
612
|
-
- **Policy file**
|
|
613
|
-
- **CLAUDE.md**
|
|
614
|
-
- **Agent
|
|
615
|
-
- **Commands**
|
|
616
|
-
- **Gateway config**
|
|
617
|
-
- **Task store**
|
|
683
|
+
- **Git hooks** — commit-msg validation, pre-commit checks, and pre-push quality gates (via Husky)
|
|
684
|
+
- **Cursor rules** — AI behavioral constraints for Cursor IDE (no-hallucination, verify-before-act, attribution)
|
|
685
|
+
- **Claude hooks** — 20 safety and quality hooks (see [Claude Code Hooks](#claude-code-hooks) section)
|
|
686
|
+
- **Claude settings** — permission boundaries for Claude Code (`.claude/settings.json`)
|
|
687
|
+
- **Policy file** — `.reagent/policy.yaml` with graduated autonomy levels
|
|
688
|
+
- **CLAUDE.md** — project-level AI agent instructions (managed block with markers)
|
|
689
|
+
- **Agent team** — 89 AI agent definitions installed to `.claude/agents/` (see [AGENTS.md](./AGENTS.md))
|
|
690
|
+
- **Commands** — `/restart`, `/rea`, `/tasks`, `/plan-work` slash commands
|
|
691
|
+
- **Gateway config** — `.reagent/gateway.yaml` template for MCP server configuration
|
|
692
|
+
- **Task store** — `.reagent/tasks.jsonl` (empty, gitignored) for project management
|
|
618
693
|
|
|
619
694
|
### What Gets Installed
|
|
620
695
|
|
|
@@ -631,32 +706,38 @@ The `product-owner` agent (`agents/product-owner.md`) manages the task backlog w
|
|
|
631
706
|
| `.husky/pre-push` | Yes | Pre-push quality gates |
|
|
632
707
|
| `.claude/hooks/` | No (gitignored) | Claude Code safety hooks |
|
|
633
708
|
| `.claude/settings.json` | No (gitignored) | Claude Code permissions |
|
|
634
|
-
| `.claude/agents/` | No (gitignored) | Agent team definitions
|
|
709
|
+
| `.claude/agents/` | No (gitignored) | Agent team definitions (89 agents) |
|
|
635
710
|
| `.claude/commands/` | Yes | Slash commands |
|
|
636
711
|
| `CLAUDE.md` | Yes | AI agent project instructions |
|
|
637
712
|
|
|
638
713
|
### Profiles
|
|
639
714
|
|
|
715
|
+
#### Base Profiles
|
|
716
|
+
|
|
640
717
|
| Profile | Use Case | Default Autonomy | Blocked Paths |
|
|
641
718
|
| ------------------- | -------------------------- | ---------------- | --------------------------------------------------- |
|
|
642
719
|
| `client-engagement` | Client consulting projects | L1 / max L2 | `.reagent/`, `.github/workflows/`, `.env`, `.env.*` |
|
|
643
720
|
| `bst-internal` | BST's own repositories | L1 / max L2 | `.reagent/`, `.env` |
|
|
644
721
|
|
|
645
|
-
Both profiles install the full hook suite, quality gates, Cursor rules, and Claude commands.
|
|
722
|
+
Both profiles install the full hook suite, quality gates, Cursor rules, and Claude commands.
|
|
646
723
|
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
724
|
+
#### Tech Stack Profiles
|
|
725
|
+
|
|
726
|
+
Tech stack profiles extend the base installation with domain-specific hooks and gates. Pass them with `--profile`:
|
|
727
|
+
|
|
728
|
+
| Profile | Stack | Extra Hooks |
|
|
729
|
+
| -------- | ------------------ | ----------------------------------------------------- |
|
|
730
|
+
| `nextjs` | Next.js App Router | `server-component-drift.sh` — RSC boundary violations |
|
|
731
|
+
| `lit-wc` | Lit/Web Components | `shadow-dom-guard.sh`, `cem-integrity-gate.sh` |
|
|
732
|
+
| `drupal` | Drupal CMS | `drupal-coding-standards.sh`, `hook-update-guard.sh` |
|
|
733
|
+
| `astro` | Astro | `astro-ssr-guard.sh` — SSR/static boundary violations |
|
|
734
|
+
|
|
735
|
+
Each tech profile also ships a `gates.yaml` (preflight checks for CI) and a recommended agent list.
|
|
736
|
+
|
|
737
|
+
```bash
|
|
738
|
+
# Install with a tech stack profile
|
|
739
|
+
npx @bookedsolid/reagent init --profile nextjs
|
|
740
|
+
npx @bookedsolid/reagent init --profile lit-wc
|
|
660
741
|
```
|
|
661
742
|
|
|
662
743
|
### Idempotent
|
|
@@ -669,6 +750,26 @@ Run `reagent init` as many times as you want. It skips files that are already up
|
|
|
669
750
|
reagent check
|
|
670
751
|
```
|
|
671
752
|
|
|
753
|
+
## Agent Team
|
|
754
|
+
|
|
755
|
+
Reagent installs 89 AI agent definitions into `.claude/agents/` covering engineering, AI platforms, and project management roles. Each agent has:
|
|
756
|
+
|
|
757
|
+
- A domain-specific system prompt and tool access list
|
|
758
|
+
- Zero-trust protocol (read before writing, verify before claiming, HALT compliance)
|
|
759
|
+
- Persona metadata (name, inspiration) grounded in real domain pioneers
|
|
760
|
+
|
|
761
|
+
See **[AGENTS.md](./AGENTS.md)** for the full roster with descriptions.
|
|
762
|
+
|
|
763
|
+
Key agents available in every project:
|
|
764
|
+
|
|
765
|
+
| Agent | Role |
|
|
766
|
+
| ---------------------- | ----------------------------------------------------------------------- |
|
|
767
|
+
| `reagent-orchestrator` | Team orchestrator — routes tasks to specialists, governs AI operations |
|
|
768
|
+
| `product-owner` | Task backlog management with built-in guardrails |
|
|
769
|
+
| `code-reviewer` | Code review with TypeScript, accessibility, performance, security focus |
|
|
770
|
+
| `security-engineer` | Application security, OWASP, penetration testing |
|
|
771
|
+
| `principal-engineer` | Architecture decisions and cross-cutting concerns |
|
|
772
|
+
|
|
672
773
|
## Removing Reagent
|
|
673
774
|
|
|
674
775
|
To remove reagent from a project:
|
|
@@ -693,7 +794,7 @@ rm -f .husky/commit-msg .husky/pre-commit .husky/pre-push
|
|
|
693
794
|
│ ├── cli/ # CLI entry point and commands
|
|
694
795
|
│ │ ├── index.ts # ESM entry point, routes to commands
|
|
695
796
|
│ │ ├── commands/
|
|
696
|
-
│ │ │ ├── init/ # Modular init step-runner
|
|
797
|
+
│ │ │ ├── init/ # Modular init step-runner (14 steps)
|
|
697
798
|
│ │ │ │ ├── index.ts # Step sequencer
|
|
698
799
|
│ │ │ │ ├── types.ts # InstallResult, ProfileConfig
|
|
699
800
|
│ │ │ │ ├── gitignore.ts # .gitignore entries
|
|
@@ -705,7 +806,16 @@ rm -f .husky/commit-msg .husky/pre-commit .husky/pre-push
|
|
|
705
806
|
│ │ │ │ ├── gateway-config.ts # gateway.yaml generation
|
|
706
807
|
│ │ │ │ ├── agents.ts # Agent file installation
|
|
707
808
|
│ │ │ │ ├── commands.ts # Slash command installation
|
|
708
|
-
│ │ │ │
|
|
809
|
+
│ │ │ │ ├── pm.ts # Task store scaffolding
|
|
810
|
+
│ │ │ │ ├── profiles.ts # Tech stack profile installer
|
|
811
|
+
│ │ │ │ ├── github.ts # GitHub repo scaffolding (--github)
|
|
812
|
+
│ │ │ │ └── discord.ts # Discord config (--discord)
|
|
813
|
+
│ │ │ ├── catalyze/ # Stack analyzer and gap detector
|
|
814
|
+
│ │ │ │ ├── index.ts # --plan / --audit / --dry-run modes
|
|
815
|
+
│ │ │ │ ├── stack-analyzer.ts # Detects project type from package.json
|
|
816
|
+
│ │ │ │ ├── gap-detector.ts # Per-stack hook/gate/agent catalog
|
|
817
|
+
│ │ │ │ ├── report-generator.ts # Markdown + HTML report output
|
|
818
|
+
│ │ │ │ └── types.ts # ProjectType, Gap, GapAnalysis
|
|
709
819
|
│ │ │ ├── cache.ts # Review cache CLI (check/set/clear)
|
|
710
820
|
│ │ │ ├── check.ts # Installation verification
|
|
711
821
|
│ │ │ ├── freeze.ts # Kill switch (freeze/unfreeze)
|
|
@@ -719,7 +829,7 @@ rm -f .husky/commit-msg .husky/pre-commit .husky/pre-push
|
|
|
719
829
|
│ │ ├── server.ts # Gateway orchestrator (startup, shutdown)
|
|
720
830
|
│ │ ├── client-manager.ts # Downstream MCP server connections
|
|
721
831
|
│ │ ├── tool-proxy.ts # Tool discovery, namespacing, registration
|
|
722
|
-
│ │ ├── native-tools.ts #
|
|
832
|
+
│ │ ├── native-tools.ts # 9 first-party MCP tools
|
|
723
833
|
│ │ └── middleware/ # Middleware chain
|
|
724
834
|
│ │ ├── chain.ts # Onion-style middleware executor
|
|
725
835
|
│ │ ├── session.ts # Session ID attachment
|
|
@@ -732,36 +842,63 @@ rm -f .husky/commit-msg .husky/pre-commit .husky/pre-push
|
|
|
732
842
|
│ ├── pm/ # Project management layer
|
|
733
843
|
│ │ ├── types.ts # Zod task schema (single source of truth)
|
|
734
844
|
│ │ ├── task-store.ts # JSONL event store with advisory locking
|
|
735
|
-
│ │
|
|
845
|
+
│ │ ├── github-bridge.ts # GitHub CLI integration (issues + projects)
|
|
846
|
+
│ │ └── discord-notifier.ts # Discord notification dispatch
|
|
736
847
|
│ └── types/ # TypeScript type definitions
|
|
737
|
-
├── hooks/ # Claude Code hook scripts
|
|
848
|
+
├── hooks/ # Claude Code hook scripts (20 total)
|
|
738
849
|
│ ├── _lib/
|
|
739
850
|
│ │ └── common.sh # Shared hook library
|
|
740
|
-
│ ├── settings-protection.sh
|
|
741
|
-
│ ├── blocked-paths-enforcer.sh
|
|
742
|
-
│ ├── dangerous-bash-interceptor.sh
|
|
743
|
-
│ ├── secret-scanner.sh
|
|
744
|
-
│ ├── env-file-protection.sh
|
|
745
|
-
│ ├── attribution-advisory.sh
|
|
746
|
-
│ ├──
|
|
747
|
-
│ ├──
|
|
748
|
-
│ ├──
|
|
749
|
-
│ ├──
|
|
750
|
-
│
|
|
751
|
-
├──
|
|
851
|
+
│ ├── settings-protection.sh
|
|
852
|
+
│ ├── blocked-paths-enforcer.sh
|
|
853
|
+
│ ├── dangerous-bash-interceptor.sh
|
|
854
|
+
│ ├── secret-scanner.sh
|
|
855
|
+
│ ├── env-file-protection.sh
|
|
856
|
+
│ ├── attribution-advisory.sh
|
|
857
|
+
│ ├── symlink-guard.sh
|
|
858
|
+
│ ├── network-exfil-guard.sh
|
|
859
|
+
│ ├── import-guard.sh
|
|
860
|
+
│ ├── git-config-guard.sh
|
|
861
|
+
│ ├── ci-config-protection.sh
|
|
862
|
+
│ ├── commit-review-gate.sh
|
|
863
|
+
│ ├── push-review-gate.sh
|
|
864
|
+
│ ├── architecture-review-gate.sh
|
|
865
|
+
│ ├── dependency-audit-gate.sh
|
|
866
|
+
│ ├── task-link-gate.sh
|
|
867
|
+
│ ├── output-validation.sh
|
|
868
|
+
│ ├── file-size-guard.sh
|
|
869
|
+
│ └── rate-limit-guard.sh
|
|
870
|
+
├── profiles/ # Init profiles
|
|
871
|
+
│ ├── client-engagement.json # Base profile
|
|
872
|
+
│ ├── bst-internal.json # Base profile
|
|
873
|
+
│ ├── nextjs/ # Tech stack profile
|
|
874
|
+
│ │ ├── hooks/server-component-drift.sh
|
|
875
|
+
│ │ ├── gates.yaml
|
|
876
|
+
│ │ └── agents.txt
|
|
877
|
+
│ ├── lit-wc/ # Tech stack profile
|
|
878
|
+
│ │ ├── hooks/{shadow-dom-guard,cem-integrity-gate}.sh
|
|
879
|
+
│ │ ├── gates.yaml
|
|
880
|
+
│ │ └── agents.txt
|
|
881
|
+
│ ├── drupal/ # Tech stack profile
|
|
882
|
+
│ │ ├── hooks/{drupal-coding-standards,hook-update-guard}.sh
|
|
883
|
+
│ │ ├── gates.yaml
|
|
884
|
+
│ │ └── agents.txt
|
|
885
|
+
│ └── astro/ # Tech stack profile
|
|
886
|
+
│ ├── hooks/astro-ssr-guard.sh
|
|
887
|
+
│ ├── gates.yaml
|
|
888
|
+
│ └── agents.txt
|
|
889
|
+
├── agents/ # 89 agent definitions (see AGENTS.md)
|
|
890
|
+
│ ├── product-owner.md
|
|
891
|
+
│ ├── reagent-orchestrator.md
|
|
892
|
+
│ ├── engineering/ # 64 engineering specialist agents
|
|
893
|
+
│ └── ai-platforms/ # 25 AI platform specialist agents
|
|
752
894
|
├── templates/ # Template files for scaffolding
|
|
753
895
|
├── husky/ # Husky git hook scripts
|
|
754
896
|
├── cursor/ # Cursor IDE rules
|
|
755
|
-
├── agents/ # Agent definitions
|
|
756
|
-
│ ├── product-owner.md # Task management agent with guardrails
|
|
757
|
-
│ ├── reagent-orchestrator.md # Team orchestration agent
|
|
758
|
-
│ ├── engineering/ # Engineering specialist agents
|
|
759
|
-
│ └── ai-platforms/ # AI platform specialist agents
|
|
760
897
|
└── commands/ # Claude slash commands
|
|
761
|
-
├── restart.md
|
|
762
|
-
├── rea.md
|
|
763
|
-
├── tasks.md
|
|
764
|
-
└── plan-work.md
|
|
898
|
+
├── restart.md
|
|
899
|
+
├── rea.md
|
|
900
|
+
├── tasks.md
|
|
901
|
+
└── plan-work.md
|
|
765
902
|
```
|
|
766
903
|
|
|
767
904
|
## Package Exports
|
|
@@ -779,15 +916,15 @@ rm -f .husky/commit-msg .husky/pre-commit .husky/pre-push
|
|
|
779
916
|
- Node.js >= 22
|
|
780
917
|
- Git repository (for hooks and init)
|
|
781
918
|
- `jq` (for hook scripts that parse JSON)
|
|
782
|
-
- `gh` CLI (optional, for GitHub issue sync)
|
|
919
|
+
- `gh` CLI (optional, for GitHub issue sync and repo scaffolding)
|
|
783
920
|
|
|
784
921
|
## Dependencies
|
|
785
922
|
|
|
786
923
|
3 runtime dependencies:
|
|
787
924
|
|
|
788
|
-
- `@modelcontextprotocol/sdk`
|
|
789
|
-
- `yaml`
|
|
790
|
-
- `zod`
|
|
925
|
+
- `@modelcontextprotocol/sdk` — MCP client/server protocol
|
|
926
|
+
- `yaml` — YAML parsing for policy and gateway config
|
|
927
|
+
- `zod` — Schema validation for all configuration files
|
|
791
928
|
|
|
792
929
|
## Testing
|
|
793
930
|
|
|
@@ -795,15 +932,15 @@ rm -f .husky/commit-msg .husky/pre-commit .husky/pre-push
|
|
|
795
932
|
pnpm test
|
|
796
933
|
```
|
|
797
934
|
|
|
798
|
-
|
|
935
|
+
462 tests across 41 test files covering:
|
|
799
936
|
|
|
800
|
-
- CLI commands (init step-runner, cache, check, freeze)
|
|
937
|
+
- CLI commands (init step-runner, catalyze, cache, check, freeze, profiles)
|
|
801
938
|
- Middleware chain (session, kill-switch, tier, policy, blocked-paths, redact, audit)
|
|
802
939
|
- Tier classification (static map, convention-based, overrides)
|
|
803
940
|
- Policy enforcement (autonomy levels, blocked tools, max clamping)
|
|
804
941
|
- Secret redaction (AWS, GitHub, PEM, Discord, generic patterns)
|
|
805
|
-
- Hook scripts (
|
|
806
|
-
- Project management (task store CRUD, event materialization, advisory locking)
|
|
942
|
+
- Hook scripts (all 20 hooks, including v0.6.0 additions)
|
|
943
|
+
- Project management (task store CRUD, event materialization, advisory locking, Discord notifier)
|
|
807
944
|
- End-to-end gateway smoke tests (native + proxied tools)
|
|
808
945
|
|
|
809
946
|
Quality gates (run via `pnpm preflight`):
|