@bookedsolid/reagent 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +322 -50
- package/agents/ai-platforms/ai-agentic-systems-architect.md +85 -0
- package/agents/ai-platforms/ai-anthropic-specialist.md +84 -0
- package/agents/ai-platforms/ai-cost-optimizer.md +85 -0
- package/agents/ai-platforms/ai-evaluation-specialist.md +78 -0
- package/agents/ai-platforms/ai-fine-tuning-specialist.md +96 -0
- package/agents/ai-platforms/ai-gemini-specialist.md +88 -0
- package/agents/ai-platforms/ai-governance-officer.md +77 -0
- package/agents/ai-platforms/ai-knowledge-engineer.md +76 -0
- package/agents/ai-platforms/ai-mcp-developer.md +108 -0
- package/agents/ai-platforms/ai-multi-modal-specialist.md +208 -0
- package/agents/ai-platforms/ai-open-source-models-specialist.md +139 -0
- package/agents/ai-platforms/ai-openai-specialist.md +94 -0
- package/agents/ai-platforms/ai-platform-strategist.md +100 -0
- package/agents/ai-platforms/ai-prompt-engineer.md +94 -0
- package/agents/ai-platforms/ai-rag-architect.md +97 -0
- package/agents/ai-platforms/ai-rea.md +82 -0
- package/agents/ai-platforms/ai-research-scientist.md +77 -0
- package/agents/ai-platforms/ai-safety-reviewer.md +91 -0
- package/agents/ai-platforms/ai-security-red-teamer.md +80 -0
- package/agents/ai-platforms/ai-synthetic-data-engineer.md +76 -0
- package/agents/engineering/accessibility-engineer.md +97 -0
- package/agents/engineering/aws-architect.md +104 -0
- package/agents/engineering/backend-engineer-payments.md +274 -0
- package/agents/engineering/backend-engineering-manager.md +206 -0
- package/agents/engineering/code-reviewer.md +283 -0
- package/agents/engineering/css3-animation-purist.md +114 -0
- package/agents/engineering/data-engineer.md +88 -0
- package/agents/engineering/database-architect.md +224 -0
- package/agents/engineering/design-system-developer.md +74 -0
- package/agents/engineering/design-systems-animator.md +82 -0
- package/agents/engineering/devops-engineer.md +153 -0
- package/agents/engineering/drupal-integration-specialist.md +211 -0
- package/agents/engineering/drupal-specialist.md +128 -0
- package/agents/engineering/engineering-manager-frontend.md +118 -0
- package/agents/engineering/frontend-specialist.md +72 -0
- package/agents/engineering/infrastructure-engineer.md +67 -0
- package/agents/engineering/lit-specialist.md +75 -0
- package/agents/engineering/migration-specialist.md +122 -0
- package/agents/engineering/ml-engineer.md +99 -0
- package/agents/engineering/mobile-engineer.md +173 -0
- package/agents/engineering/motion-designer-interactive.md +100 -0
- package/agents/engineering/nextjs-specialist.md +140 -0
- package/agents/engineering/open-source-specialist.md +111 -0
- package/agents/engineering/performance-engineer.md +95 -0
- package/agents/engineering/performance-qa-engineer.md +99 -0
- package/agents/engineering/pr-maintainer.md +112 -0
- package/agents/engineering/principal-engineer.md +80 -0
- package/agents/engineering/privacy-engineer.md +93 -0
- package/agents/engineering/qa-engineer.md +158 -0
- package/agents/engineering/security-engineer.md +141 -0
- package/agents/engineering/security-qa-engineer.md +92 -0
- package/agents/engineering/senior-backend-engineer.md +300 -0
- package/agents/engineering/senior-database-engineer.md +52 -0
- package/agents/engineering/senior-frontend-engineer.md +115 -0
- package/agents/engineering/senior-product-manager-platform.md +29 -0
- package/agents/engineering/senior-technical-project-manager.md +51 -0
- package/agents/engineering/site-reliability-engineer-2.md +52 -0
- package/agents/engineering/solutions-architect.md +74 -0
- package/agents/engineering/sre-lead.md +123 -0
- package/agents/engineering/staff-engineer-platform.md +228 -0
- package/agents/engineering/staff-software-engineer.md +60 -0
- package/agents/engineering/storybook-specialist.md +142 -0
- package/agents/engineering/supabase-specialist.md +106 -0
- package/agents/engineering/technical-project-manager.md +50 -0
- package/agents/engineering/technical-writer.md +129 -0
- package/agents/engineering/test-architect.md +93 -0
- package/agents/engineering/typescript-specialist.md +101 -0
- package/agents/engineering/ux-researcher.md +35 -0
- package/agents/engineering/vp-engineering.md +72 -0
- package/agents/reagent-orchestrator.md +14 -15
- package/dist/cli/commands/check.d.ts +2 -0
- package/dist/cli/commands/check.d.ts.map +1 -0
- package/dist/cli/commands/check.js +87 -0
- package/dist/cli/commands/check.js.map +1 -0
- package/dist/cli/commands/freeze.d.ts +2 -0
- package/dist/cli/commands/freeze.d.ts.map +1 -0
- package/dist/cli/commands/freeze.js +24 -0
- package/dist/cli/commands/freeze.js.map +1 -0
- package/dist/cli/commands/init.d.ts +2 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +511 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/serve.d.ts +2 -0
- package/dist/cli/commands/serve.d.ts.map +1 -0
- package/dist/cli/commands/serve.js +12 -0
- package/dist/cli/commands/serve.js.map +1 -0
- package/dist/cli/commands/unfreeze.d.ts +2 -0
- package/dist/cli/commands/unfreeze.d.ts.map +1 -0
- package/dist/cli/commands/unfreeze.js +14 -0
- package/dist/cli/commands/unfreeze.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +71 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/utils.d.ts +5 -0
- package/dist/cli/utils.d.ts.map +1 -0
- package/dist/cli/utils.js +34 -0
- package/dist/cli/utils.js.map +1 -0
- package/dist/config/gateway-config.d.ts +3 -0
- package/dist/config/gateway-config.d.ts.map +1 -0
- package/dist/config/gateway-config.js +60 -0
- package/dist/config/gateway-config.js.map +1 -0
- package/dist/config/policy-loader.d.ts +3 -0
- package/dist/config/policy-loader.d.ts.map +1 -0
- package/dist/config/policy-loader.js +38 -0
- package/dist/config/policy-loader.js.map +1 -0
- package/dist/config/tier-map.d.ts +12 -0
- package/dist/config/tier-map.d.ts.map +1 -0
- package/dist/config/tier-map.js +76 -0
- package/dist/config/tier-map.js.map +1 -0
- package/dist/gateway/client-manager.d.ts +26 -0
- package/dist/gateway/client-manager.d.ts.map +1 -0
- package/dist/gateway/client-manager.js +75 -0
- package/dist/gateway/client-manager.js.map +1 -0
- package/dist/gateway/middleware/audit.d.ts +12 -0
- package/dist/gateway/middleware/audit.d.ts.map +1 -0
- package/dist/gateway/middleware/audit.js +88 -0
- package/dist/gateway/middleware/audit.js.map +1 -0
- package/dist/gateway/middleware/chain.d.ts +27 -0
- package/dist/gateway/middleware/chain.d.ts.map +1 -0
- package/dist/gateway/middleware/chain.js +37 -0
- package/dist/gateway/middleware/chain.js.map +1 -0
- package/dist/gateway/middleware/kill-switch.d.ts +10 -0
- package/dist/gateway/middleware/kill-switch.d.ts.map +1 -0
- package/dist/gateway/middleware/kill-switch.js +61 -0
- package/dist/gateway/middleware/kill-switch.js.map +1 -0
- package/dist/gateway/middleware/policy.d.ts +10 -0
- package/dist/gateway/middleware/policy.d.ts.map +1 -0
- package/dist/gateway/middleware/policy.js +52 -0
- package/dist/gateway/middleware/policy.js.map +1 -0
- package/dist/gateway/middleware/redact.d.ts +17 -0
- package/dist/gateway/middleware/redact.d.ts.map +1 -0
- package/dist/gateway/middleware/redact.js +109 -0
- package/dist/gateway/middleware/redact.js.map +1 -0
- package/dist/gateway/middleware/session.d.ts +11 -0
- package/dist/gateway/middleware/session.d.ts.map +1 -0
- package/dist/gateway/middleware/session.js +19 -0
- package/dist/gateway/middleware/session.js.map +1 -0
- package/dist/gateway/middleware/tier.d.ts +7 -0
- package/dist/gateway/middleware/tier.d.ts.map +1 -0
- package/dist/gateway/middleware/tier.js +11 -0
- package/dist/gateway/middleware/tier.js.map +1 -0
- package/dist/gateway/server.d.ts +14 -0
- package/dist/gateway/server.d.ts.map +1 -0
- package/dist/gateway/server.js +79 -0
- package/dist/gateway/server.js.map +1 -0
- package/dist/gateway/tool-proxy.d.ts +21 -0
- package/dist/gateway/tool-proxy.d.ts.map +1 -0
- package/dist/gateway/tool-proxy.js +134 -0
- package/dist/gateway/tool-proxy.js.map +1 -0
- package/dist/types/audit.d.ts +16 -0
- package/dist/types/audit.d.ts.map +1 -0
- package/dist/types/audit.js +2 -0
- package/dist/types/audit.js.map +1 -0
- package/dist/types/enums.d.ts +21 -0
- package/dist/types/enums.d.ts.map +1 -0
- package/dist/types/enums.js +25 -0
- package/dist/types/enums.js.map +1 -0
- package/dist/types/gateway.d.ts +16 -0
- package/dist/types/gateway.d.ts.map +1 -0
- package/dist/types/gateway.js +2 -0
- package/dist/types/gateway.js.map +1 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/policy.d.ts +14 -0
- package/dist/types/policy.d.ts.map +1 -0
- package/dist/types/policy.js +2 -0
- package/dist/types/policy.js.map +1 -0
- package/hooks/attribution-advisory.sh +78 -26
- package/husky/commit-msg.sh +102 -22
- package/package.json +24 -12
- package/profiles/bst-internal.json +3 -1
- package/profiles/client-engagement.json +3 -1
- package/bin/init.js +0 -818
package/README.md
CHANGED
|
@@ -1,97 +1,336 @@
|
|
|
1
1
|
# @bookedsolid/reagent
|
|
2
2
|
|
|
3
|
-
Zero-trust agentic infrastructure for AI-assisted development.
|
|
3
|
+
Zero-trust MCP gateway and agentic infrastructure for AI-assisted development.
|
|
4
4
|
|
|
5
|
-
Reagent
|
|
5
|
+
Reagent is two things:
|
|
6
6
|
|
|
7
|
-
|
|
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, secret redaction, and hash-chained audit logging.
|
|
8
8
|
|
|
9
|
-
`reagent init`
|
|
9
|
+
2. **Config Scaffolder** (`reagent init`) — installs safety hooks, behavioral policies, and developer tooling into any project.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
- **Policy
|
|
16
|
-
- **
|
|
17
|
-
- **
|
|
11
|
+
## Why Reagent?
|
|
12
|
+
|
|
13
|
+
AI coding assistants are powerful but unconstrained. Reagent adds the missing governance layer:
|
|
14
|
+
|
|
15
|
+
- **Policy enforcement** — graduated autonomy levels (L0 read-only → L3 full access) control which tiers of tools an agent can invoke
|
|
16
|
+
- **Kill switch** — `reagent freeze` immediately blocks all tool calls across every connected MCP server
|
|
17
|
+
- **Secret redaction** — tool outputs are scanned for AWS keys, GitHub tokens, API keys, PEM private keys, Discord tokens, and more — redacted before they reach the AI
|
|
18
|
+
- **Audit trail** — every tool invocation is logged as hash-chained JSONL, providing tamper-evident compliance records
|
|
19
|
+
- **Tool blocking** — individual tools can be permanently blocked regardless of autonomy level
|
|
18
20
|
|
|
19
21
|
## Quick Start
|
|
20
22
|
|
|
23
|
+
### As an MCP Gateway
|
|
24
|
+
|
|
21
25
|
```bash
|
|
22
|
-
|
|
26
|
+
npm install -g @bookedsolid/reagent
|
|
27
|
+
|
|
28
|
+
# Initialize a project with policy and gateway config
|
|
29
|
+
reagent init --profile bst-internal
|
|
30
|
+
|
|
31
|
+
# Configure your downstream MCP servers in .reagent/gateway.yaml
|
|
32
|
+
# Then start the gateway
|
|
33
|
+
reagent serve
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Point your AI assistant's MCP configuration at the gateway:
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"mcpServers": {
|
|
41
|
+
"reagent": {
|
|
42
|
+
"command": "reagent",
|
|
43
|
+
"args": ["serve"]
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
23
47
|
```
|
|
24
48
|
|
|
25
|
-
|
|
49
|
+
All downstream tool calls now flow through Reagent's middleware chain.
|
|
50
|
+
|
|
51
|
+
### As a Config Scaffolder
|
|
26
52
|
|
|
27
53
|
```bash
|
|
28
|
-
|
|
29
|
-
npx @bookedsolid/reagent init --profile bst-internal
|
|
54
|
+
npx @bookedsolid/reagent init
|
|
30
55
|
|
|
31
|
-
#
|
|
56
|
+
# With a profile
|
|
57
|
+
npx @bookedsolid/reagent init --profile bst-internal
|
|
32
58
|
npx @bookedsolid/reagent init --profile client-engagement
|
|
59
|
+
|
|
60
|
+
# Preview without changes
|
|
61
|
+
npx @bookedsolid/reagent init --dry-run
|
|
33
62
|
```
|
|
34
63
|
|
|
35
|
-
|
|
64
|
+
## Commands
|
|
36
65
|
|
|
37
|
-
|
|
38
|
-
|
|
66
|
+
| Command | Description |
|
|
67
|
+
| ------------------------------- | ------------------------------------------------- |
|
|
68
|
+
| `reagent serve` | Start the MCP gateway server (stdio transport) |
|
|
69
|
+
| `reagent init` | Install reagent config into the current directory |
|
|
70
|
+
| `reagent check` | Verify what reagent components are installed |
|
|
71
|
+
| `reagent freeze --reason "..."` | Create `.reagent/HALT` — suspends all tool calls |
|
|
72
|
+
| `reagent unfreeze` | Remove `.reagent/HALT` — resumes tool calls |
|
|
73
|
+
| `reagent help` | Show usage help |
|
|
74
|
+
|
|
75
|
+
## MCP Gateway
|
|
76
|
+
|
|
77
|
+
### How It Works
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
AI Assistant (Claude Code, Cursor, etc.)
|
|
81
|
+
│
|
|
82
|
+
│ stdio (MCP protocol)
|
|
83
|
+
▼
|
|
84
|
+
┌─────────────────────────────┐
|
|
85
|
+
│ Reagent Gateway │
|
|
86
|
+
│ │
|
|
87
|
+
│ ┌───────────────────────┐ │
|
|
88
|
+
│ │ Middleware Chain │ │
|
|
89
|
+
│ │ │ │
|
|
90
|
+
│ │ 1. Audit (outermost) │ │
|
|
91
|
+
│ │ 2. Session context │ │
|
|
92
|
+
│ │ 3. Kill switch │ │
|
|
93
|
+
│ │ 4. Tier classify │ │
|
|
94
|
+
│ │ 5. Policy enforce │ │
|
|
95
|
+
│ │ 6. Secret redaction │ │
|
|
96
|
+
│ │ 7. [Execute] │ │
|
|
97
|
+
│ └───────────────────────┘ │
|
|
98
|
+
│ │
|
|
99
|
+
└──────────┬──────────────────┘
|
|
100
|
+
│ stdio (MCP protocol)
|
|
101
|
+
▼
|
|
102
|
+
Downstream MCP Servers
|
|
103
|
+
(discord-ops, filesystem, etc.)
|
|
39
104
|
```
|
|
40
105
|
|
|
41
|
-
|
|
106
|
+
The gateway:
|
|
107
|
+
|
|
108
|
+
1. Connects to all downstream MCP servers defined in `.reagent/gateway.yaml`
|
|
109
|
+
2. Discovers their tools via MCP `tools/list`
|
|
110
|
+
3. Re-registers each tool on the gateway with namespace prefixes (`servername__toolname`)
|
|
111
|
+
4. Wraps every tool call in the middleware chain
|
|
112
|
+
5. Listens on stdio for incoming MCP requests from the AI assistant
|
|
113
|
+
|
|
114
|
+
### Gateway Configuration
|
|
115
|
+
|
|
116
|
+
Create `.reagent/gateway.yaml`:
|
|
117
|
+
|
|
118
|
+
```yaml
|
|
119
|
+
version: '1'
|
|
120
|
+
servers:
|
|
121
|
+
discord-ops:
|
|
122
|
+
command: node
|
|
123
|
+
args:
|
|
124
|
+
- /path/to/discord-ops/dist/index.js
|
|
125
|
+
env:
|
|
126
|
+
DISCORD_BOT_TOKEN: '${DISCORD_BOT_TOKEN}'
|
|
127
|
+
tool_overrides:
|
|
128
|
+
get_messages:
|
|
129
|
+
tier: read
|
|
130
|
+
send_message:
|
|
131
|
+
tier: write
|
|
132
|
+
purge_messages:
|
|
133
|
+
tier: destructive
|
|
134
|
+
delete_channel:
|
|
135
|
+
tier: destructive
|
|
136
|
+
blocked: true
|
|
137
|
+
```
|
|
42
138
|
|
|
43
|
-
|
|
44
|
-
|
|
139
|
+
**Environment variable resolution:** Use `${VAR_NAME}` syntax in env values — Reagent resolves them from `process.env` at startup.
|
|
140
|
+
|
|
141
|
+
**Tool overrides:** Each downstream tool can be assigned a tier (`read`, `write`, `destructive`) and optionally blocked entirely.
|
|
142
|
+
|
|
143
|
+
### Tool Namespacing
|
|
144
|
+
|
|
145
|
+
Downstream tools are namespaced as `servername__toolname` to prevent collisions:
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
discord-ops__send_message
|
|
149
|
+
discord-ops__get_messages
|
|
150
|
+
filesystem__read_file
|
|
151
|
+
filesystem__write_file
|
|
45
152
|
```
|
|
46
153
|
|
|
47
|
-
|
|
154
|
+
### Multiple Downstream Servers
|
|
155
|
+
|
|
156
|
+
```yaml
|
|
157
|
+
version: '1'
|
|
158
|
+
servers:
|
|
159
|
+
discord-ops:
|
|
160
|
+
command: node
|
|
161
|
+
args: [/path/to/discord-ops/dist/index.js]
|
|
162
|
+
filesystem:
|
|
163
|
+
command: npx
|
|
164
|
+
args: [-y, '@modelcontextprotocol/server-filesystem', '/allowed/path']
|
|
165
|
+
github:
|
|
166
|
+
command: npx
|
|
167
|
+
args: [-y, '@modelcontextprotocol/server-github']
|
|
168
|
+
env:
|
|
169
|
+
GITHUB_PERSONAL_ACCESS_TOKEN: '${GITHUB_TOKEN}'
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
All tools from all servers are aggregated into a single gateway.
|
|
48
173
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
174
|
+
## Middleware Chain
|
|
175
|
+
|
|
176
|
+
Every tool call passes through the middleware chain in onion (Koa-style) order. The chain is designed with security invariants:
|
|
177
|
+
|
|
178
|
+
### 1. Audit (outermost)
|
|
179
|
+
|
|
180
|
+
Records every invocation — including denials — as a hash-chained JSONL entry. Written to `.reagent/audit/YYYY-MM-DD.jsonl`. Each record contains:
|
|
181
|
+
|
|
182
|
+
```json
|
|
183
|
+
{
|
|
184
|
+
"timestamp": "2026-04-09T12:00:00.000Z",
|
|
185
|
+
"session_id": "a1b2c3d4-...",
|
|
186
|
+
"tool_name": "send_message",
|
|
187
|
+
"server_name": "discord-ops",
|
|
188
|
+
"tier": "write",
|
|
189
|
+
"status": "allowed",
|
|
190
|
+
"autonomy_level": "L1",
|
|
191
|
+
"duration_ms": 42,
|
|
192
|
+
"prev_hash": "0000...0000",
|
|
193
|
+
"hash": "abc123..."
|
|
194
|
+
}
|
|
195
|
+
```
|
|
56
196
|
|
|
57
|
-
|
|
197
|
+
The `prev_hash` field chains records together — tamper with one record and every subsequent hash becomes invalid.
|
|
58
198
|
|
|
59
|
-
|
|
199
|
+
### 2. Session Context
|
|
200
|
+
|
|
201
|
+
Attaches a unique session ID (UUID) to every invocation. Each gateway instance generates one session ID at startup.
|
|
202
|
+
|
|
203
|
+
### 3. Kill Switch
|
|
204
|
+
|
|
205
|
+
Checks for `.reagent/HALT` file. If present, the invocation is immediately denied. The HALT file contents become the denial reason.
|
|
60
206
|
|
|
61
207
|
```bash
|
|
62
|
-
# Emergency stop
|
|
63
|
-
|
|
208
|
+
# Emergency stop — all tool calls blocked immediately
|
|
209
|
+
reagent freeze --reason "security incident at 2026-04-09T12:00:00Z"
|
|
64
210
|
|
|
65
211
|
# Resume
|
|
66
|
-
|
|
212
|
+
reagent unfreeze
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### 4. Tier Classification
|
|
216
|
+
|
|
217
|
+
Classifies the tool into one of three tiers:
|
|
218
|
+
|
|
219
|
+
| Tier | Description | Examples |
|
|
220
|
+
| ------------- | ------------------------------- | ------------------------------------------------ |
|
|
221
|
+
| `read` | Observes state, no side effects | `get_messages`, `list_channels`, `health_check` |
|
|
222
|
+
| `write` | Modifies state | `send_message`, `create_channel`, `edit_message` |
|
|
223
|
+
| `destructive` | Irreversible state changes | `delete_channel`, `purge_messages`, `ban_member` |
|
|
224
|
+
|
|
225
|
+
Tiers are assigned via `tool_overrides` in gateway config. Unknown tools default to `write`.
|
|
226
|
+
|
|
227
|
+
### 5. Policy Enforcement
|
|
228
|
+
|
|
229
|
+
Checks the tool's tier against the project's autonomy level:
|
|
230
|
+
|
|
231
|
+
| Autonomy Level | Allowed Tiers |
|
|
232
|
+
| ------------------ | -------------------------------- |
|
|
233
|
+
| `L0` (read-only) | `read` only |
|
|
234
|
+
| `L1` (standard) | `read` + `write` |
|
|
235
|
+
| `L2` (elevated) | `read` + `write` + `destructive` |
|
|
236
|
+
| `L3` (full access) | All tiers |
|
|
237
|
+
|
|
238
|
+
Also checks for explicitly blocked tools — a tool marked `blocked: true` in gateway config is denied regardless of autonomy level.
|
|
239
|
+
|
|
240
|
+
### 6. Secret Redaction
|
|
241
|
+
|
|
242
|
+
Post-execution: scans tool output for sensitive patterns and replaces them with `[REDACTED]`:
|
|
243
|
+
|
|
244
|
+
- AWS Access Keys (`AKIA...`)
|
|
245
|
+
- AWS Secret Keys
|
|
246
|
+
- GitHub Tokens (`ghp_...`, `gho_...`, `ghs_...`, `ghu_...`, `ghr_...`)
|
|
247
|
+
- Generic API Keys
|
|
248
|
+
- Bearer Tokens
|
|
249
|
+
- PEM Private Keys
|
|
250
|
+
- Discord Bot Tokens
|
|
251
|
+
- Base64-encoded AWS Keys
|
|
252
|
+
|
|
253
|
+
Redaction operates on individual string values within structured results — it never corrupts JSON structure.
|
|
254
|
+
|
|
255
|
+
### Security Invariants
|
|
256
|
+
|
|
257
|
+
- **Denial is permanent** — once any middleware denies an invocation, no subsequent middleware can revert it
|
|
258
|
+
- **Audit records everything** — audit is outermost, so even kill-switch denials are recorded
|
|
259
|
+
- **Policy re-derives tier** — never trusts mutable context; always re-classifies from tool name
|
|
260
|
+
- **Fail-closed** — errors in kill-switch or policy checks result in denial, not passthrough
|
|
261
|
+
- **All logging to stderr** — stdout is reserved for the MCP stdio transport
|
|
262
|
+
|
|
263
|
+
## Policy File
|
|
264
|
+
|
|
265
|
+
`.reagent/policy.yaml` controls agent behavior:
|
|
266
|
+
|
|
267
|
+
```yaml
|
|
268
|
+
version: '1'
|
|
269
|
+
profile: bst-internal
|
|
270
|
+
installed_by: 'reagent init'
|
|
271
|
+
installed_at: '2026-04-09T00:00:00.000Z'
|
|
272
|
+
autonomy_level: L1
|
|
273
|
+
max_autonomy_level: L3
|
|
274
|
+
promotion_requires_human_approval: true
|
|
275
|
+
blocked_paths:
|
|
276
|
+
- .github/workflows/
|
|
277
|
+
- .env
|
|
278
|
+
notification_channel: '#reagent-alerts'
|
|
67
279
|
```
|
|
68
280
|
|
|
69
|
-
|
|
281
|
+
| Field | Description |
|
|
282
|
+
| ----------------------------------- | ------------------------------------------------------------- |
|
|
283
|
+
| `autonomy_level` | Current level (L0-L3) — controls which tool tiers are allowed |
|
|
284
|
+
| `max_autonomy_level` | Ceiling — agents cannot request escalation beyond this |
|
|
285
|
+
| `promotion_requires_human_approval` | Whether level changes need human sign-off |
|
|
286
|
+
| `blocked_paths` | Directories the agent must never modify |
|
|
287
|
+
|
|
288
|
+
## Config Scaffolder
|
|
289
|
+
|
|
290
|
+
`reagent init` configures your repository with:
|
|
291
|
+
|
|
292
|
+
- **Git hooks** — commit-msg validation (Co-Authored-By attribution, secret detection) and pre-push quality gates
|
|
293
|
+
- **Cursor rules** — AI behavioral constraints for Cursor IDE
|
|
294
|
+
- **Claude hooks** — dangerous command interception, env file protection, secret scanning
|
|
295
|
+
- **Claude settings** — permission boundaries for Claude Code
|
|
296
|
+
- **Policy file** — `.reagent/policy.yaml` with graduated autonomy levels
|
|
297
|
+
- **CLAUDE.md** — project-level AI agent instructions
|
|
298
|
+
- **Commands** — `/restart` (session handoff) and `/rea` (AI team orchestration)
|
|
299
|
+
|
|
300
|
+
### What Gets Installed
|
|
301
|
+
|
|
302
|
+
| Path | Committed | Purpose |
|
|
303
|
+
| ----------------------- | --------------- | ------------------------------------ |
|
|
304
|
+
| `.reagent/policy.yaml` | Yes | Autonomy levels and agent policy |
|
|
305
|
+
| `.reagent/gateway.yaml` | Yes | MCP gateway downstream server config |
|
|
306
|
+
| `.reagent/audit/` | No (gitignored) | Hash-chained JSONL audit logs |
|
|
307
|
+
| `.cursor/rules/` | Yes | Cursor IDE behavioral rules |
|
|
308
|
+
| `.husky/commit-msg` | Yes | Git commit message validation |
|
|
309
|
+
| `.claude/hooks/` | No (gitignored) | Claude Code safety hooks |
|
|
310
|
+
| `.claude/settings.json` | No (gitignored) | Claude Code permissions |
|
|
311
|
+
| `.claude/commands/` | Yes | Slash commands (restart, rea) |
|
|
312
|
+
| `CLAUDE.md` | Yes | AI agent project instructions |
|
|
313
|
+
|
|
314
|
+
### Profiles
|
|
70
315
|
|
|
71
316
|
| Profile | Use Case | Hooks |
|
|
72
317
|
| ------------------- | -------------------------- | --------------------------------- |
|
|
73
318
|
| `bst-internal` | BST's own repositories | Full hook suite + Claude commands |
|
|
74
319
|
| `client-engagement` | Client consulting projects | Full hook suite + Claude commands |
|
|
75
320
|
|
|
76
|
-
|
|
321
|
+
### Idempotent
|
|
77
322
|
|
|
78
323
|
Run `reagent init` as many times as you want. It skips files that are already up-to-date and only updates what has changed.
|
|
79
324
|
|
|
80
|
-
|
|
325
|
+
### Verify Installation
|
|
81
326
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
| `.husky/commit-msg` | Yes | Git commit message validation |
|
|
86
|
-
| `.claude/hooks/` | No (gitignored) | Claude Code safety hooks |
|
|
87
|
-
| `.claude/settings.json` | No (gitignored) | Claude Code permissions |
|
|
88
|
-
| `.claude/commands/` | Yes | Slash commands (restart, rea) |
|
|
89
|
-
| `.reagent/policy.yaml` | Yes | Autonomy levels and agent policy |
|
|
90
|
-
| `CLAUDE.md` | Yes | AI agent project instructions |
|
|
327
|
+
```bash
|
|
328
|
+
reagent check
|
|
329
|
+
```
|
|
91
330
|
|
|
92
331
|
## Removing Reagent
|
|
93
332
|
|
|
94
|
-
To remove reagent from a project
|
|
333
|
+
To remove reagent from a project:
|
|
95
334
|
|
|
96
335
|
```bash
|
|
97
336
|
# Remove reagent-managed files
|
|
@@ -104,15 +343,48 @@ rm -rf .reagent/
|
|
|
104
343
|
rm -f .husky/commit-msg .husky/pre-commit .husky/pre-push
|
|
105
344
|
```
|
|
106
345
|
|
|
107
|
-
##
|
|
346
|
+
## Architecture
|
|
108
347
|
|
|
109
|
-
|
|
348
|
+
```
|
|
349
|
+
@bookedsolid/reagent
|
|
350
|
+
├── src/
|
|
351
|
+
│ ├── cli/ # CLI entry point and commands
|
|
352
|
+
│ │ ├── index.ts # ESM entry point, routes to commands
|
|
353
|
+
│ │ ├── commands/ # init, check, freeze, unfreeze, serve
|
|
354
|
+
│ │ └── utils.ts # Shared CLI utilities
|
|
355
|
+
│ ├── config/ # Configuration loaders
|
|
356
|
+
│ │ ├── policy-loader.ts # Zod-validated policy.yaml parser
|
|
357
|
+
│ │ ├── gateway-config.ts # Zod-validated gateway.yaml parser
|
|
358
|
+
│ │ └── tier-map.ts # Tool tier classification
|
|
359
|
+
│ ├── gateway/ # MCP gateway core
|
|
360
|
+
│ │ ├── server.ts # Gateway orchestrator (startup, shutdown)
|
|
361
|
+
│ │ ├── client-manager.ts # Downstream MCP server connections
|
|
362
|
+
│ │ ├── tool-proxy.ts # Tool discovery, namespacing, registration
|
|
363
|
+
│ │ └── middleware/ # Middleware chain
|
|
364
|
+
│ │ ├── chain.ts # Onion-style middleware executor
|
|
365
|
+
│ │ ├── session.ts # Session ID attachment
|
|
366
|
+
│ │ ├── kill-switch.ts # HALT file check
|
|
367
|
+
│ │ ├── tier.ts # Tier classification
|
|
368
|
+
│ │ ├── policy.ts # Autonomy level enforcement
|
|
369
|
+
│ │ ├── redact.ts # Secret pattern redaction
|
|
370
|
+
│ │ └── audit.ts # Hash-chained JSONL logging
|
|
371
|
+
│ └── types/ # TypeScript type definitions
|
|
372
|
+
├── profiles/ # Init profiles (bst-internal, client-engagement)
|
|
373
|
+
├── templates/ # Template files for scaffolding
|
|
374
|
+
├── hooks/ # Git hook scripts
|
|
375
|
+
├── cursor/ # Cursor IDE rules
|
|
376
|
+
└── agents/ # Agent definitions
|
|
377
|
+
```
|
|
110
378
|
|
|
111
379
|
## Requirements
|
|
112
380
|
|
|
113
381
|
- Node.js >= 22
|
|
114
382
|
- Git repository
|
|
115
383
|
|
|
384
|
+
## Scope
|
|
385
|
+
|
|
386
|
+
Reagent is a **local CLI tool** and **MCP gateway server**. It configures files in your repository and proxies MCP tool calls on your machine. It does not collect data, phone home, or operate as a hosted service.
|
|
387
|
+
|
|
116
388
|
## License
|
|
117
389
|
|
|
118
390
|
MIT
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-agentic-systems-architect
|
|
3
|
+
description: Agentic systems architect designing multi-agent orchestration patterns, MCP server architecture, tool use strategies, and agent-native infrastructure for production deployments
|
|
4
|
+
firstName: Kira
|
|
5
|
+
middleInitial: T
|
|
6
|
+
lastName: Vasquez
|
|
7
|
+
fullName: Kira T. Vasquez
|
|
8
|
+
category: ai-platforms
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Agentic Systems Architect — Kira T. Vasquez
|
|
12
|
+
|
|
13
|
+
You are the Agentic Systems Architect for this project, the expert on designing multi-agent systems, MCP infrastructure, tool use patterns, and agent-native architecture for production deployments.
|
|
14
|
+
|
|
15
|
+
## Expertise
|
|
16
|
+
|
|
17
|
+
### Architecture Patterns
|
|
18
|
+
|
|
19
|
+
| Pattern | Description | When to Use |
|
|
20
|
+
| ----------------- | --------------------------------------------- | -------------------------------------- |
|
|
21
|
+
| **Hub-and-spoke** | Central orchestrator delegates to specialists | Known task taxonomy, clear routing |
|
|
22
|
+
| **Pipeline** | Sequential agent handoffs | Linear workflows, data transformation |
|
|
23
|
+
| **Swarm** | Peer agents self-organize | Exploratory tasks, creative generation |
|
|
24
|
+
| **Hierarchical** | Tiered authority (lead → senior → specialist) | Complex projects, quality gates |
|
|
25
|
+
| **Event-driven** | Agents react to system events | Monitoring, incident response |
|
|
26
|
+
|
|
27
|
+
### MCP Infrastructure
|
|
28
|
+
|
|
29
|
+
| Component | Scope |
|
|
30
|
+
| ---------------------- | -------------------------------------------------------- |
|
|
31
|
+
| **Server Design** | Tool/resource/prompt authoring, transport layers, auth |
|
|
32
|
+
| **Tool Composition** | Combining tools across servers, dependency management |
|
|
33
|
+
| **Context Management** | Memory, state persistence, conversation handoffs |
|
|
34
|
+
| **Security** | Zero-trust tool access, permission models, audit logging |
|
|
35
|
+
| **Scaling** | Connection pooling, rate limiting, failover strategies |
|
|
36
|
+
|
|
37
|
+
### Agent Design Principles
|
|
38
|
+
|
|
39
|
+
| Principle | Implementation |
|
|
40
|
+
| ------------------------- | -------------------------------------------------------- |
|
|
41
|
+
| **Single Responsibility** | One agent, one domain — compose don't monolith |
|
|
42
|
+
| **Graceful Degradation** | Agent failure shouldn't cascade; fallback paths required |
|
|
43
|
+
| **Observable** | Every agent action is loggable and auditable |
|
|
44
|
+
| **Stateless Preference** | Minimize agent state; use external stores (files, DB) |
|
|
45
|
+
| **Human-in-the-Loop** | Escalation paths at every decision point |
|
|
46
|
+
|
|
47
|
+
### Relevance
|
|
48
|
+
|
|
49
|
+
- Design the project's agent infrastructure (reagent framework, `.claude/` configuration)
|
|
50
|
+
- Architect multi-agent solutions for project requirements
|
|
51
|
+
- MCP server design and integration patterns
|
|
52
|
+
- Agent team composition and orchestration strategy
|
|
53
|
+
- Tool use optimization (minimize tokens, maximize reliability)
|
|
54
|
+
|
|
55
|
+
## Zero-Trust Protocol
|
|
56
|
+
|
|
57
|
+
1. Validate all agent-to-agent communication — no implicit trust between agents
|
|
58
|
+
2. Verify tool availability before designing tool-dependent workflows
|
|
59
|
+
3. Check MCP server health before assuming connectivity
|
|
60
|
+
4. Cross-reference architecture decisions against actual system constraints
|
|
61
|
+
5. Test agent interactions in isolation before composing
|
|
62
|
+
6. Respect reagent autonomy levels from `.reagent/policy.yaml`
|
|
63
|
+
7. Check `.reagent/HALT` before any action
|
|
64
|
+
|
|
65
|
+
## When to Use This Agent
|
|
66
|
+
|
|
67
|
+
- "How should we orchestrate these agents?" — Architecture design
|
|
68
|
+
- "Design an MCP server for [use case]" — Server specification
|
|
69
|
+
- "What's the right agent pattern for [workflow]?" — Pattern selection
|
|
70
|
+
- "How do we handle agent failures?" — Resilience design
|
|
71
|
+
- "Evaluate our current agent architecture" — Architecture review
|
|
72
|
+
- Need a multi-agent system designed from scratch
|
|
73
|
+
|
|
74
|
+
## Constraints
|
|
75
|
+
|
|
76
|
+
- NEVER design agent systems without considering failure modes
|
|
77
|
+
- NEVER assume reliable connectivity between agents or MCP servers
|
|
78
|
+
- NEVER create circular dependencies between agents
|
|
79
|
+
- NEVER design systems that require more than L2 autonomy without explicit human approval paths
|
|
80
|
+
- ALWAYS include human escalation in every agent workflow
|
|
81
|
+
- ALWAYS consider token cost and latency in architecture decisions
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
_Part of the [reagent](https://github.com/bookedsolidtech/reagent) agent team._
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-anthropic-specialist
|
|
3
|
+
description: Anthropic Claude API and Agent SDK specialist with deep expertise in Claude models, tool use, MCP server development, prompt engineering, and building production agentic systems
|
|
4
|
+
firstName: Elena
|
|
5
|
+
middleInitial: V
|
|
6
|
+
lastName: Kowalski
|
|
7
|
+
fullName: Elena V. Kowalski
|
|
8
|
+
category: ai-platforms
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Anthropic Specialist — Elena V. Kowalski
|
|
12
|
+
|
|
13
|
+
You are the Anthropic/Claude platform specialist for this project.
|
|
14
|
+
|
|
15
|
+
## Expertise
|
|
16
|
+
|
|
17
|
+
### Claude Models
|
|
18
|
+
|
|
19
|
+
- **Opus 4.6**: Deep reasoning, architecture, complex analysis. Highest capability.
|
|
20
|
+
- **Sonnet 4.6**: Balanced performance/cost for standard engineering work.
|
|
21
|
+
- **Haiku 4.5**: Fast, cheap. Formatting, simple QA, board fixes.
|
|
22
|
+
- Model selection: Match complexity to model tier. Never waste Opus on formatting.
|
|
23
|
+
|
|
24
|
+
### Claude API
|
|
25
|
+
|
|
26
|
+
- Messages API (streaming, tool use, vision, PDF)
|
|
27
|
+
- Prompt caching (reduce costs on repeated context)
|
|
28
|
+
- Token counting and cost estimation
|
|
29
|
+
- Rate limiting and retry strategies
|
|
30
|
+
- Batch API for high-throughput processing
|
|
31
|
+
|
|
32
|
+
### Tool Use (Function Calling)
|
|
33
|
+
|
|
34
|
+
- JSON Schema tool definitions
|
|
35
|
+
- Multi-tool orchestration patterns
|
|
36
|
+
- Forced tool use (`tool_choice`)
|
|
37
|
+
- Error handling and retry in tool chains
|
|
38
|
+
- Parallel tool execution
|
|
39
|
+
|
|
40
|
+
### Agent SDK
|
|
41
|
+
|
|
42
|
+
- Building autonomous agents with Claude
|
|
43
|
+
- Agent loops (observe → think → act)
|
|
44
|
+
- Memory patterns (short-term, long-term, episodic)
|
|
45
|
+
- Guardrails and safety constraints
|
|
46
|
+
- Multi-agent coordination
|
|
47
|
+
|
|
48
|
+
### MCP (Model Context Protocol)
|
|
49
|
+
|
|
50
|
+
- MCP server development (TypeScript SDK)
|
|
51
|
+
- Tool registration and schema design
|
|
52
|
+
- Resource management (file systems, databases, APIs)
|
|
53
|
+
- Transport layers (stdio, SSE, HTTP)
|
|
54
|
+
|
|
55
|
+
## Zero-Trust Protocol
|
|
56
|
+
|
|
57
|
+
1. **Validate sources** — Check docs date, version, relevance before citing
|
|
58
|
+
2. **Never trust LLM memory** — Always verify via tools, code, or documentation. Programmatic project memory (`.claude/MEMORY.md`, `.reagent/`) is OK
|
|
59
|
+
3. **Cross-validate** — Verify claims against authoritative sources before recommending
|
|
60
|
+
4. **Cite freshness** — Flag potentially stale information with dates; AI moves fast
|
|
61
|
+
5. **Graduated autonomy** — Respect reagent L0-L4 levels from `.reagent/policy.yaml`
|
|
62
|
+
6. **HALT compliance** — Check `.reagent/HALT` before any action; if present, stop immediately
|
|
63
|
+
7. **Audit awareness** — All tool invocations may be logged; behave as if every action is observed
|
|
64
|
+
|
|
65
|
+
## When to Use This Agent
|
|
66
|
+
|
|
67
|
+
- Designing Claude API integrations for projects
|
|
68
|
+
- Optimizing prompt engineering for agentic workflows
|
|
69
|
+
- Building MCP servers for new tool capabilities
|
|
70
|
+
- Cost optimization across Claude model tiers
|
|
71
|
+
- Debugging agent behavior and tool use patterns
|
|
72
|
+
- Evaluating Claude capabilities for specific use cases
|
|
73
|
+
|
|
74
|
+
## Constraints
|
|
75
|
+
|
|
76
|
+
- ALWAYS use the latest Claude model IDs (opus-4-6, sonnet-4-6, haiku-4-5)
|
|
77
|
+
- ALWAYS implement proper error handling for API calls
|
|
78
|
+
- NEVER hardcode API keys
|
|
79
|
+
- NEVER use deprecated model IDs
|
|
80
|
+
- ALWAYS consider cost implications of model selection
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
_Part of the [reagent](https://github.com/bookedsolidtech/reagent) agent team._
|