agentboot 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.
Files changed (78) hide show
  1. package/README.md +9 -8
  2. package/agentboot.config.json +4 -1
  3. package/package.json +2 -2
  4. package/scripts/cli.ts +465 -18
  5. package/scripts/compile.ts +724 -75
  6. package/scripts/dev-sync.ts +1 -1
  7. package/scripts/lib/config.ts +259 -1
  8. package/scripts/lib/frontmatter.ts +3 -1
  9. package/scripts/validate.ts +12 -7
  10. package/website/docusaurus.config.ts +117 -0
  11. package/website/package-lock.json +18448 -0
  12. package/website/package.json +47 -0
  13. package/website/sidebars.ts +53 -0
  14. package/website/src/css/custom.css +23 -0
  15. package/website/src/pages/index.module.css +23 -0
  16. package/website/src/pages/index.tsx +125 -0
  17. package/website/static/.nojekyll +0 -0
  18. package/website/static/CNAME +1 -0
  19. package/website/static/img/favicon.ico +0 -0
  20. package/website/static/img/logo.svg +1 -0
  21. package/.github/ISSUE_TEMPLATE/persona-request.md +0 -62
  22. package/.github/ISSUE_TEMPLATE/quality-feedback.md +0 -67
  23. package/.github/workflows/cla.yml +0 -25
  24. package/.github/workflows/validate.yml +0 -49
  25. package/.idea/agentboot.iml +0 -9
  26. package/.idea/misc.xml +0 -6
  27. package/.idea/modules.xml +0 -8
  28. package/.idea/vcs.xml +0 -6
  29. package/CLAUDE.md +0 -230
  30. package/CONTRIBUTING.md +0 -168
  31. package/PERSONAS.md +0 -156
  32. package/core/instructions/baseline.instructions.md +0 -133
  33. package/core/instructions/security.instructions.md +0 -186
  34. package/core/personas/code-reviewer/SKILL.md +0 -175
  35. package/core/personas/security-reviewer/SKILL.md +0 -233
  36. package/core/personas/test-data-expert/SKILL.md +0 -234
  37. package/core/personas/test-generator/SKILL.md +0 -262
  38. package/core/traits/audit-trail.md +0 -182
  39. package/core/traits/confidence-signaling.md +0 -172
  40. package/core/traits/critical-thinking.md +0 -129
  41. package/core/traits/schema-awareness.md +0 -132
  42. package/core/traits/source-citation.md +0 -174
  43. package/core/traits/structured-output.md +0 -199
  44. package/docs/ci-cd-automation.md +0 -548
  45. package/docs/claude-code-reference/README.md +0 -21
  46. package/docs/claude-code-reference/agentboot-coverage.md +0 -484
  47. package/docs/claude-code-reference/feature-inventory.md +0 -906
  48. package/docs/cli-commands-audit.md +0 -112
  49. package/docs/cli-design.md +0 -924
  50. package/docs/concepts.md +0 -1117
  51. package/docs/config-schema-audit.md +0 -121
  52. package/docs/configuration.md +0 -645
  53. package/docs/delivery-methods.md +0 -758
  54. package/docs/developer-onboarding.md +0 -342
  55. package/docs/extending.md +0 -448
  56. package/docs/getting-started.md +0 -298
  57. package/docs/knowledge-layer.md +0 -464
  58. package/docs/marketplace.md +0 -822
  59. package/docs/org-connection.md +0 -570
  60. package/docs/plans/architecture.md +0 -2429
  61. package/docs/plans/design.md +0 -2018
  62. package/docs/plans/prd.md +0 -1862
  63. package/docs/plans/stack-rank.md +0 -261
  64. package/docs/plans/technical-spec.md +0 -2755
  65. package/docs/privacy-and-safety.md +0 -807
  66. package/docs/prompt-optimization.md +0 -1071
  67. package/docs/test-plan.md +0 -972
  68. package/docs/third-party-ecosystem.md +0 -496
  69. package/domains/compliance-template/README.md +0 -173
  70. package/domains/compliance-template/traits/compliance-aware.md +0 -228
  71. package/examples/enterprise/agentboot.config.json +0 -184
  72. package/examples/minimal/agentboot.config.json +0 -46
  73. package/tests/REGRESSION-PLAN.md +0 -705
  74. package/tests/TEST-PLAN.md +0 -111
  75. package/tests/cli.test.ts +0 -705
  76. package/tests/pipeline.test.ts +0 -608
  77. package/tests/validate.test.ts +0 -278
  78. package/tsconfig.json +0 -62
package/docs/extending.md DELETED
@@ -1,448 +0,0 @@
1
- # Extending AgentBoot
2
-
3
- AgentBoot ships generic. Your organization almost certainly has requirements that are
4
- specific to your industry, your compliance regime, or your internal standards. This
5
- document explains how to build a domain layer on top of AgentBoot core — without
6
- modifying core, without forking the repository, and without coupling your proprietary
7
- requirements to the public codebase.
8
-
9
- ---
10
-
11
- ## When to extend vs. when to contribute back
12
-
13
- The rule is simple: if it is specific to your organization, extend. If it would be
14
- useful to any team in your vertical, contribute back.
15
-
16
- **Extend when:**
17
- - The requirement is specific to your org's interpretation of a compliance standard,
18
- not the standard itself.
19
- - The requirement references your internal systems, internal terminology, or your
20
- private codebase conventions.
21
- - The persona or trait would only make sense to people who know your company.
22
-
23
- **Contribute back when:**
24
- - The trait is generic enough to apply to any team in your industry.
25
- - The domain template would give other teams in your vertical a useful starting point.
26
- - The bug fix or improvement applies to the core behavior that everyone uses.
27
-
28
- When in doubt, start with an extension in your org personas repo. If it proves useful
29
- enough that you find yourself wishing other teams could use it, open a contribution
30
- proposal issue.
31
-
32
- ---
33
-
34
- ## The domain template structure
35
-
36
- AgentBoot provides a domain template under `domains/compliance-template/` that shows
37
- the structure of a domain layer. A domain layer is a directory that lives alongside
38
- your `agentboot.config.json` (in your org personas repo) and adds to core without
39
- replacing it.
40
-
41
- A domain layer has this structure:
42
-
43
- ```
44
- domains/
45
- my-domain/
46
- README.md ← explains the domain, how to configure it
47
- agentboot.domain.json ← domain manifest: name, version, traits, personas
48
- traits/
49
- my-domain-trait.md ← domain-specific trait definitions
50
- personas/
51
- my-domain-reviewer/
52
- SKILL.md ← domain-specific persona
53
- instructions/
54
- always-on.md ← domain-level always-on instructions
55
- path-scoped/
56
- *.domain-file.md ← path-scoped instructions for sensitive file types
57
- ```
58
-
59
- The domain manifest (`agentboot.domain.json`) registers the domain with the build system:
60
-
61
- ```json
62
- {
63
- "name": "my-domain",
64
- "version": "1.0.0",
65
- "description": "Domain layer for [your domain here]",
66
- "traits": ["my-domain-trait"],
67
- "personas": ["my-domain-reviewer"],
68
- "requires_core_version": ">=1.0.0"
69
- }
70
- ```
71
-
72
- To activate the domain, add it to your `agentboot.config.json`:
73
-
74
- ```jsonc
75
- {
76
- "extend": {
77
- "domains": ["./domains/my-domain"]
78
- }
79
- }
80
- ```
81
-
82
- ---
83
-
84
- ## How to add a domain-specific trait
85
-
86
- A domain-specific trait follows the exact same format as a core trait (see
87
- `core/traits/critical-thinking.md` for the reference implementation). The difference
88
- is that it lives in your domain layer and may reference domain-specific concepts.
89
-
90
- **Example: adding an audit-logging awareness trait**
91
-
92
- Suppose your domain requires that all database mutations emit audit log entries. You want
93
- a trait that makes any reviewing persona aware of this requirement and flags violations.
94
-
95
- Create `domains/my-domain/traits/audit-logging-awareness.md`:
96
-
97
- ```markdown
98
- # Trait: Audit Logging Awareness
99
-
100
- **ID:** `audit-logging-awareness`
101
- **Category:** Domain compliance
102
- **Configurable:** No
103
-
104
- ---
105
-
106
- ## Overview
107
-
108
- This trait makes a persona aware that all database mutations in [your domain] must emit
109
- structured audit log entries. Any reviewing persona that composes this trait will flag
110
- missing or malformed audit log calls.
111
-
112
- ---
113
-
114
- ## Behavioral Directives
115
-
116
- When reviewing code that performs database mutations:
117
-
118
- - Verify that every INSERT, UPDATE, and DELETE is accompanied by an audit log call.
119
- - Check that the audit log call captures: the actor (user/service identity), the
120
- resource affected (table + primary key), the action type, and the timestamp.
121
- - Flag any mutation that relies on a trigger or middleware for audit logging without
122
- verifying that the trigger/middleware is in place for the affected table.
123
- - Flag audit log calls that do not capture sufficient context to reconstruct the
124
- state change.
125
-
126
- ---
127
-
128
- ## Anti-Patterns to Avoid
129
-
130
- - Do not flag read operations (SELECT). Audit requirements apply to mutations only.
131
- - Do not assume audit logging is handled elsewhere without evidence.
132
- - Do not accept "the framework handles this automatically" without verifying that the
133
- framework is configured to do so for this specific table.
134
-
135
- ---
136
-
137
- ## Interaction with Other Traits
138
-
139
- - **`critical-thinking: HIGH`** — at HIGH weight, flag even cases where audit logging
140
- is present but appears incomplete or inconsistent with other tables.
141
- - **`source-citation`** — every audit finding must cite the specific line where the
142
- mutation occurs and the specific line (or lack thereof) where audit logging is absent.
143
- ```
144
-
145
- Then declare the trait in your domain manifest and compose it into your domain personas.
146
-
147
- ---
148
-
149
- ## How to add a domain-specific persona
150
-
151
- A domain persona follows the same SKILL.md format as a core persona. The difference is
152
- that its system prompt can reference your domain's specific requirements, terminology,
153
- and standards — because it lives in your domain layer, not in core.
154
-
155
- **Example: adding a compliance reviewer**
156
-
157
- Create `domains/my-domain/personas/compliance-reviewer/SKILL.md`:
158
-
159
- ```markdown
160
- ---
161
- id: compliance-review
162
- name: Compliance Reviewer
163
- version: 1.0.0
164
- traits:
165
- critical-thinking: HIGH
166
- structured-output: true
167
- source-citation: true
168
- audit-logging-awareness: true
169
- scope: pr
170
- output_format: structured
171
- ---
172
-
173
- You are the compliance reviewer for [your domain]. Your mandate is to verify that
174
- code changes conform to [your domain]'s compliance requirements before they merge.
175
-
176
- [Your domain-specific system prompt here. Describe the compliance context, the
177
- specific requirements the persona should enforce, and the scope of review.]
178
-
179
- ## Output Schema
180
-
181
- ...
182
-
183
- ## What Not To Do
184
-
185
- ...
186
- ```
187
-
188
- ---
189
-
190
- ## How to add path-scoped instructions for sensitive file types
191
-
192
- Path-scoped instructions activate only when the user's working context involves matching
193
- file patterns. They are one of the most powerful features in AgentBoot because they let
194
- you add domain-specific guidance exactly where it is needed without polluting every
195
- interaction.
196
-
197
- Create a file in `domains/my-domain/instructions/path-scoped/`. The filename determines
198
- the glob pattern that activates the instruction:
199
-
200
- ```
201
- path-scoped/
202
- *.migration.sql.md ← activates when the user is working on migration files
203
- config/secrets*.md ← activates when working in the secrets config directory
204
- api/*/handlers/*.md ← activates when working on API handler files
205
- ```
206
-
207
- The content of the file is an instruction fragment that is prepended to the system prompt
208
- when the path pattern matches. Keep it focused and specific — path-scoped instructions
209
- should add exactly the context that matters for that file type, not general guidance.
210
-
211
- Example `domains/my-domain/instructions/path-scoped/*.migration.sql.md`:
212
-
213
- ```markdown
214
- ## Database Migration Context
215
-
216
- You are working on a database migration file for [your domain].
217
-
218
- Migrations in this domain must:
219
- - [List your domain-specific migration requirements here]
220
-
221
- Before suggesting any migration change, verify:
222
- - [Your pre-migration verification checklist]
223
- ```
224
-
225
- ---
226
-
227
- ## How org-level customization works
228
-
229
- The `extend` field in `agentboot.config.json` is the integration point for all
230
- customization. It can reference:
231
-
232
- - Local directories (relative to `agentboot.config.json`): `"./personas"`, `"./domains/my-domain"`
233
- - Domain manifests: an array of domain paths, each resolved and merged in order
234
-
235
- ```jsonc
236
- {
237
- "org": "my-org",
238
- "personas": {
239
- "enabled": ["code-reviewer", "security-reviewer", "test-generator"],
240
- "extend": "./personas"
241
- },
242
- "extend": {
243
- "domains": [
244
- "./domains/my-domain",
245
- "./domains/my-second-domain"
246
- ],
247
- "instructions": "./instructions/org-always-on.md"
248
- }
249
- }
250
- ```
251
-
252
- **Precedence rules for `extend`:**
253
- 1. Core traits and personas form the base.
254
- 2. Domain layers are applied in the order listed. Later domains can add to but not
255
- remove core traits or personas.
256
- 3. The `personas.extend` directory adds org-specific personas on top of domain layers.
257
- 4. Team-level configuration (scoped via group/team in `repos.json`) layers on top of
258
- all of the above for repos in that team.
259
-
260
- Nothing in a domain layer can disable a core trait or persona that a higher scope has
261
- marked required. Extensions add; they do not subtract. This is the guarantee that
262
- org-level governance always propagates downward.
263
-
264
- ---
265
-
266
- ## Per-persona extensions
267
-
268
- Domain layers can extend individual personas without modifying the base definition. This
269
- is the "extend without modify" pattern — critical for multi-product organizations where
270
- each product has specific requirements that should layer on top of the generic persona.
271
-
272
- Create an extension file at `domains/my-domain/extensions/{persona-name}.md`:
273
-
274
- ```markdown
275
- ## Additional Review Rules (My Domain)
276
-
277
- When reviewing code in this domain, also check for:
278
-
279
- - All API endpoints must validate the `X-Tenant-ID` header before processing
280
- - Database connections must use the read replica for GET endpoints
281
- - Event payloads must include `correlationId` for distributed tracing
282
- ```
283
-
284
- The persona reads its extension file during the Setup phase (before beginning review).
285
- Extension rules **add to** the base persona's rules — they do not replace them. If an
286
- extension rule conflicts with a base rule, the extension is ignored and the conflict
287
- is logged.
288
-
289
- This pattern was validated in a production implementation, where product-level
290
- extensions added HIPAA-specific checks to the generic code reviewer, security
291
- reviewer, and test data expert without changing any base agent definitions.
292
-
293
- ---
294
-
295
- ## How to add gotchas rules
296
-
297
- Gotchas rules are path-scoped instructions that encode battle-tested operational
298
- knowledge. They are the single highest-value extension you can add — developers
299
- immediately see value when the agent warns them about a pitfall they would have hit.
300
-
301
- Create gotchas files in `domains/my-domain/instructions/path-scoped/`:
302
-
303
- ```markdown
304
- ---
305
- paths:
306
- - "**/*.lambda.ts"
307
- - "functions/**"
308
- description: "Lambda deployment gotchas"
309
- ---
310
-
311
- # Lambda Gotchas
312
-
313
- - **Cold start penalty scales with bundle size.** Keep handler files under 5MB.
314
- Tree-shake aggressively. Do not import the entire AWS SDK — import only the
315
- client you need (`@aws-sdk/client-s3`, not `aws-sdk`).
316
- - **Environment variables are NOT encrypted at rest by default.** Use SSM
317
- Parameter Store or Secrets Manager for anything sensitive. Never put API keys
318
- in Lambda env vars directly.
319
- - **Timeout default is 3 seconds.** If your handler does any I/O, set timeout
320
- explicitly. A timed-out Lambda still gets billed for the full duration.
321
- - **Do not use `console.log` with objects in production.** Use structured logging
322
- (`JSON.stringify` with defined fields) or the Lambda Powertools logger.
323
- ```
324
-
325
- Sources for gotchas:
326
- - Post-incident reviews ("what did we learn?")
327
- - Onboarding notes ("what I wish I knew")
328
- - Code review comments that keep repeating the same feedback
329
- - Production debugging sessions where the root cause was non-obvious
330
-
331
- The best gotchas rules are specific, actionable, and explain *why* — not just *what*.
332
- "Don't do X" is less useful than "Don't do X because Y will happen, and here's how
333
- to verify you haven't done it."
334
-
335
- ---
336
-
337
- ## How to add compliance hooks
338
-
339
- For organizations with compliance requirements (HIPAA, SOC 2, PCI DSS, GDPR),
340
- AgentBoot supports a defense-in-depth hook model. See
341
- [`docs/concepts.md`](concepts.md#compliance-hooks) for the three-layer model.
342
-
343
- To add compliance hooks to your domain:
344
-
345
- 1. Create the hook script in `domains/my-domain/hooks/`:
346
-
347
- ```bash
348
- #!/bin/bash
349
- # hooks/sensitive-data-scan.sh
350
- # Exit 2 = block request, Exit 0 = allow
351
-
352
- INPUT="$1"
353
-
354
- # Patterns to detect
355
- if echo "$INPUT" | grep -qE '\b\d{3}-\d{2}-\d{4}\b'; then
356
- echo '{"error": "SSN pattern detected. Remove before continuing."}' >&2
357
- exit 2
358
- fi
359
- if echo "$INPUT" | grep -qE '\b(sk|pk)_(live|test)_[A-Za-z0-9]{24,}\b'; then
360
- echo '{"error": "API key detected. Remove before continuing."}' >&2
361
- exit 2
362
- fi
363
- exit 0
364
- ```
365
-
366
- 2. Create a hook configuration fragment in `domains/my-domain/hooks/settings.json`
367
- that the build system merges into each target repo's `.claude/settings.json`:
368
-
369
- ```json
370
- {
371
- "hooks": {
372
- "UserPromptSubmit": [
373
- {
374
- "matcher": "",
375
- "hooks": [
376
- {
377
- "type": "command",
378
- "command": ".claude/hooks/sensitive-data-scan.sh",
379
- "timeout": 5000
380
- }
381
- ]
382
- }
383
- ],
384
- "Stop": [
385
- {
386
- "matcher": "",
387
- "hooks": [
388
- {
389
- "type": "command",
390
- "command": ".claude/hooks/sensitive-data-output-scan.sh"
391
- }
392
- ]
393
- }
394
- ]
395
- }
396
- }
397
- ```
398
-
399
- Claude Code supports a comprehensive set of hook events. The most relevant for compliance:
400
- - `UserPromptSubmit` — scan input before the model sees it (Layer 1, deterministic)
401
- - `PreToolUse` — intercept specific tool calls (e.g., block `Bash(rm -rf *)`)
402
- - `PostToolUse` — scan tool output for sensitive data
403
- - `Stop` — scan model output (Layer 3, advisory — fires after render)
404
- - `SessionStart` — audit logging of session initiation
405
-
406
- 3. Create the corresponding always-on instruction in
407
- `domains/my-domain/instructions/always-on.md` (the Layer 2 advisory control):
408
-
409
- ```markdown
410
- ## Sensitive Data Policy
411
-
412
- You must never process, store, or output real customer data, personally identifiable
413
- information, production credentials, or internal API keys. If user input appears to
414
- contain any of these, stop immediately, explain what you detected, and ask the user
415
- to remove it before continuing.
416
- ```
417
-
418
- 4. For HARD guardrails (non-overridable), generate managed settings artifacts in
419
- `domains/my-domain/managed/` for MDM deployment:
420
-
421
- ```
422
- managed/
423
- managed-settings.json → /Library/Application Support/ClaudeCode/ (macOS)
424
- managed-mcp.json → /Library/Application Support/ClaudeCode/ (macOS)
425
- CLAUDE.md → /Library/Application Support/ClaudeCode/ (macOS)
426
- ```
427
-
428
- Managed settings cannot be overridden by any project or user configuration. This is
429
- the native Claude Code mechanism for HARD guardrails.
430
-
431
- 5. Document the honest limitations — which platforms enforce deterministically vs.
432
- advisory-only. This transparency builds trust with compliance teams.
433
-
434
- **Platform support matrix:**
435
-
436
- | Layer | Claude Code | Copilot CLI | IDE (VS Code/IntelliJ) |
437
- |-------|-------------|-------------|------------------------|
438
- | Input hook (deterministic) | `UserPromptSubmit` | Pre-prompt hook | Not available |
439
- | Instruction refusal (advisory) | CLAUDE.md | copilot-instructions.md | copilot-instructions.md |
440
- | Output hook (advisory) | `Stop` | Not available | Not available |
441
- | Managed settings (HARD) | MDM paths | Not available | Not available |
442
-
443
- ---
444
-
445
- *See also:*
446
- - [`docs/concepts.md`](concepts.md) — the scope hierarchy and trait system explained
447
- - [`docs/configuration.md`](configuration.md) — complete `agentboot.config.json` reference
448
- - [`domains/compliance-template/README.md`](../domains/compliance-template/README.md) — worked example domain template