agentboot 0.1.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/.github/ISSUE_TEMPLATE/persona-request.md +62 -0
- package/.github/ISSUE_TEMPLATE/quality-feedback.md +67 -0
- package/.github/workflows/cla.yml +25 -0
- package/.github/workflows/validate.yml +49 -0
- package/.idea/agentboot.iml +9 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/CLA.md +98 -0
- package/CLAUDE.md +230 -0
- package/CONTRIBUTING.md +168 -0
- package/LICENSE +191 -0
- package/NOTICE +4 -0
- package/PERSONAS.md +156 -0
- package/README.md +172 -0
- package/agentboot.config.json +207 -0
- package/bin/agentboot.js +17 -0
- package/core/gotchas/README.md +35 -0
- package/core/instructions/baseline.instructions.md +133 -0
- package/core/instructions/security.instructions.md +186 -0
- package/core/personas/code-reviewer/SKILL.md +175 -0
- package/core/personas/code-reviewer/persona.config.json +11 -0
- package/core/personas/security-reviewer/SKILL.md +233 -0
- package/core/personas/security-reviewer/persona.config.json +11 -0
- package/core/personas/test-data-expert/SKILL.md +234 -0
- package/core/personas/test-data-expert/persona.config.json +10 -0
- package/core/personas/test-generator/SKILL.md +262 -0
- package/core/personas/test-generator/persona.config.json +10 -0
- package/core/traits/audit-trail.md +182 -0
- package/core/traits/confidence-signaling.md +172 -0
- package/core/traits/critical-thinking.md +129 -0
- package/core/traits/schema-awareness.md +132 -0
- package/core/traits/source-citation.md +174 -0
- package/core/traits/structured-output.md +199 -0
- package/docs/ci-cd-automation.md +548 -0
- package/docs/claude-code-reference/README.md +21 -0
- package/docs/claude-code-reference/agentboot-coverage.md +484 -0
- package/docs/claude-code-reference/feature-inventory.md +906 -0
- package/docs/cli-commands-audit.md +112 -0
- package/docs/cli-design.md +924 -0
- package/docs/concepts.md +1117 -0
- package/docs/config-schema-audit.md +121 -0
- package/docs/configuration.md +645 -0
- package/docs/delivery-methods.md +758 -0
- package/docs/developer-onboarding.md +342 -0
- package/docs/extending.md +448 -0
- package/docs/getting-started.md +298 -0
- package/docs/knowledge-layer.md +464 -0
- package/docs/marketplace.md +822 -0
- package/docs/org-connection.md +570 -0
- package/docs/plans/architecture.md +2429 -0
- package/docs/plans/design.md +2018 -0
- package/docs/plans/prd.md +1862 -0
- package/docs/plans/stack-rank.md +261 -0
- package/docs/plans/technical-spec.md +2755 -0
- package/docs/privacy-and-safety.md +807 -0
- package/docs/prompt-optimization.md +1071 -0
- package/docs/test-plan.md +972 -0
- package/docs/third-party-ecosystem.md +496 -0
- package/domains/compliance-template/README.md +173 -0
- package/domains/compliance-template/traits/compliance-aware.md +228 -0
- package/examples/enterprise/agentboot.config.json +184 -0
- package/examples/minimal/agentboot.config.json +46 -0
- package/package.json +63 -0
- package/repos.json +1 -0
- package/scripts/cli.ts +1069 -0
- package/scripts/compile.ts +1000 -0
- package/scripts/dev-sync.ts +149 -0
- package/scripts/lib/config.ts +137 -0
- package/scripts/lib/frontmatter.ts +61 -0
- package/scripts/sync.ts +687 -0
- package/scripts/validate.ts +421 -0
- package/tests/REGRESSION-PLAN.md +705 -0
- package/tests/TEST-PLAN.md +111 -0
- package/tests/cli.test.ts +705 -0
- package/tests/pipeline.test.ts +608 -0
- package/tests/validate.test.ts +278 -0
- package/tsconfig.json +62 -0
package/README.md
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# AgentBoot
|
|
2
|
+
|
|
3
|
+
**Convention over configuration for agentic development teams.**
|
|
4
|
+
|
|
5
|
+
AgentBoot is a build tool that compiles AI agent personas and distributes them across your organization's repositories. Define once, deploy everywhere. The Spring Boot of AI agent governance.
|
|
6
|
+
|
|
7
|
+
## The Problem
|
|
8
|
+
|
|
9
|
+
Every team adopting AI coding tools (Claude Code, GitHub Copilot, Cursor) ends up writing its own CLAUDE.md, its own rules, its own agents — independently, inconsistently, and without governance. There's no standard for distributing agent behavior across repos, no mechanism for enforcing compliance, no way to measure value, and no path for sharing improvements.
|
|
10
|
+
|
|
11
|
+
AgentBoot solves that. It's the shared foundation everyone was going to build anyway, done once, done well.
|
|
12
|
+
|
|
13
|
+
## How It Works
|
|
14
|
+
|
|
15
|
+
AgentBoot is a build tool, not a runtime framework. It produces files and exits.
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
Source files Build step Distributed artifacts
|
|
19
|
+
(traits, personas, → agentboot build → (.claude/, copilot-
|
|
20
|
+
instructions, gotchas) instructions.md, skills)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
1. **Define** personas from composable traits in version-controlled Markdown
|
|
24
|
+
2. **Build** — validate, compile, and lint in one step
|
|
25
|
+
3. **Sync** — distribute compiled artifacts to every registered repo
|
|
26
|
+
|
|
27
|
+
The output works without AgentBoot installed. Any platform that reads Markdown can consume it.
|
|
28
|
+
|
|
29
|
+
## Quickstart
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Install
|
|
33
|
+
npm install agentboot
|
|
34
|
+
|
|
35
|
+
# Set up a new personas repo
|
|
36
|
+
npx agentboot setup
|
|
37
|
+
|
|
38
|
+
# Configure your org
|
|
39
|
+
# Edit agentboot.config.json with your org name, groups, and teams
|
|
40
|
+
|
|
41
|
+
# Build and sync
|
|
42
|
+
npx agentboot build
|
|
43
|
+
npx agentboot sync --dry-run # preview first
|
|
44
|
+
npx agentboot sync # deploy to repos
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Your repos now have:
|
|
48
|
+
- Always-on code review and security instructions
|
|
49
|
+
- `/review-code`, `/review-security`, `/gen-tests`, `/gen-testdata` slash commands
|
|
50
|
+
- Agent skills deployable in Claude Code agent mode
|
|
51
|
+
- Platform-native output for Claude Code, GitHub Copilot, and agentskills.io
|
|
52
|
+
|
|
53
|
+
## What You Get
|
|
54
|
+
|
|
55
|
+
### Composable traits
|
|
56
|
+
|
|
57
|
+
Reusable behavioral building blocks. Change a trait once and every persona that uses it updates on the next build.
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
Security Reviewer = critical-thinking + structured-output + source-citation
|
|
61
|
+
Test Generator = schema-awareness + structured-output + source-citation
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### V1 Personas
|
|
65
|
+
|
|
66
|
+
| Persona | Invocation | What it does |
|
|
67
|
+
|---|---|---|
|
|
68
|
+
| Code Reviewer | `/review-code` | Finds real bugs, not style nits |
|
|
69
|
+
| Security Reviewer | `/review-security` | Flags vulnerabilities, secrets, risky patterns |
|
|
70
|
+
| Test Generator | `/gen-tests` | Writes tests, audits coverage, finds gaps |
|
|
71
|
+
| Test Data Expert | `/gen-testdata` | Generates realistic synthetic test data |
|
|
72
|
+
|
|
73
|
+
### Scope hierarchy
|
|
74
|
+
|
|
75
|
+
Define your org structure once. AgentBoot handles the layers.
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
Org
|
|
79
|
+
└── Group (e.g. Platform)
|
|
80
|
+
├── Team (e.g. API) → gets Org + Platform + API personas
|
|
81
|
+
└── Team (e.g. Frontend) → gets Org + Platform + Frontend personas
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Org-wide rules propagate down. Teams extend without overriding what they shouldn't.
|
|
85
|
+
|
|
86
|
+
### Multi-platform output
|
|
87
|
+
|
|
88
|
+
One build produces output for multiple platforms:
|
|
89
|
+
|
|
90
|
+
| Platform | Output | Location |
|
|
91
|
+
|---|---|---|
|
|
92
|
+
| Claude Code | Agents, skills, rules, traits, CLAUDE.md | `.claude/` |
|
|
93
|
+
| GitHub Copilot | copilot-instructions.md fragments | `.github/` |
|
|
94
|
+
| agentskills.io | Cross-platform SKILL.md | Configurable |
|
|
95
|
+
|
|
96
|
+
### Build once, deploy everywhere
|
|
97
|
+
|
|
98
|
+
Your personas repo is the source. Target repos receive the compiled output. One PR to the personas repo rebuilds and syncs to every registered repo.
|
|
99
|
+
|
|
100
|
+
AgentBoot only writes to `.claude/` and `.github/copilot-instructions.md` — it never touches application code, configuration, or dependencies. Sync PRs are safe to auto-merge.
|
|
101
|
+
|
|
102
|
+
## Configuration
|
|
103
|
+
|
|
104
|
+
Everything is driven by `agentboot.config.json`:
|
|
105
|
+
|
|
106
|
+
```jsonc
|
|
107
|
+
{
|
|
108
|
+
"org": "your-org",
|
|
109
|
+
"groups": {
|
|
110
|
+
"platform": { "teams": ["api", "infra"] },
|
|
111
|
+
"product": { "teams": ["mobile", "web"] }
|
|
112
|
+
},
|
|
113
|
+
"personas": {
|
|
114
|
+
"enabled": ["code-reviewer", "security-reviewer", "test-generator"],
|
|
115
|
+
"customDir": "./personas" // optional: org-specific additions
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## CLI Commands
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
agentboot build # Compile personas from traits
|
|
124
|
+
agentboot validate # Pre-build validation checks
|
|
125
|
+
agentboot sync # Distribute to target repos
|
|
126
|
+
agentboot full-build # clean → validate → build → sync pipeline
|
|
127
|
+
agentboot setup # Scaffold a new personas repo
|
|
128
|
+
agentboot add <type> # Create a new persona, trait, or gotcha
|
|
129
|
+
agentboot doctor # Diagnose configuration issues
|
|
130
|
+
agentboot status # Show deployment status
|
|
131
|
+
agentboot lint # Static analysis for prompt quality
|
|
132
|
+
agentboot uninstall # Remove AgentBoot from a repo
|
|
133
|
+
agentboot config # View configuration
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Run `agentboot --help` for full usage.
|
|
137
|
+
|
|
138
|
+
## Extending
|
|
139
|
+
|
|
140
|
+
AgentBoot ships generic. Your industry has specific requirements. Add domain-specific personas, traits, and gotchas without modifying core:
|
|
141
|
+
|
|
142
|
+
- **Custom personas** — add to `personas.customDir` path in config
|
|
143
|
+
- **Gotchas** — path-scoped knowledge rules in `core/gotchas/`
|
|
144
|
+
- **Domain layers** — compliance overlays for healthcare, fintech, defense
|
|
145
|
+
|
|
146
|
+
## Project Status
|
|
147
|
+
|
|
148
|
+
| Component | Status |
|
|
149
|
+
|---|---|
|
|
150
|
+
| Core traits (6) | Stable |
|
|
151
|
+
| V1 personas (4) | Stable |
|
|
152
|
+
| Build pipeline (validate, compile, sync) | Stable |
|
|
153
|
+
| CLI (12 commands) | Stable |
|
|
154
|
+
| Scope hierarchy + distribution | Stable |
|
|
155
|
+
| Lint + token budgets | Stable |
|
|
156
|
+
| Compliance domain template | Planned |
|
|
157
|
+
| MCP knowledge base | Planned |
|
|
158
|
+
| Cursor / Gemini output | Planned |
|
|
159
|
+
|
|
160
|
+
## Contributing
|
|
161
|
+
|
|
162
|
+
AgentBoot grows through community contributions — new personas, domain layers, improved traits, better tooling.
|
|
163
|
+
|
|
164
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
165
|
+
|
|
166
|
+
## License
|
|
167
|
+
|
|
168
|
+
Apache 2.0 — see [LICENSE](LICENSE).
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
*Built by [Mike Saavedra](https://github.com/saavyone).*
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
{
|
|
2
|
+
// AgentBoot configuration file.
|
|
3
|
+
// This is the only file you need to edit to configure AgentBoot for your organization.
|
|
4
|
+
//
|
|
5
|
+
// Convention over configuration: every field has a sensible default.
|
|
6
|
+
// You only need to specify what's different about your organization.
|
|
7
|
+
//
|
|
8
|
+
// Run `npm run full-build` after editing to validate, compile, and sync.
|
|
9
|
+
|
|
10
|
+
// ---------------------------------------------------------------------------
|
|
11
|
+
// Organization identity
|
|
12
|
+
// ---------------------------------------------------------------------------
|
|
13
|
+
|
|
14
|
+
// The name of your organization. Used in provenance headers written to every
|
|
15
|
+
// output file, and in PERSONAS.md. Use a slug-friendly value (lowercase, no spaces).
|
|
16
|
+
"org": "your-org",
|
|
17
|
+
|
|
18
|
+
// Human-readable display name. Used in generated docs and headers.
|
|
19
|
+
"orgDisplayName": "Your Organization",
|
|
20
|
+
|
|
21
|
+
// ---------------------------------------------------------------------------
|
|
22
|
+
// Scope hierarchy: org → group → team
|
|
23
|
+
//
|
|
24
|
+
// Personas are scoped and merged top-down:
|
|
25
|
+
// - Studio-wide (core/) applies to ALL repos
|
|
26
|
+
// - Group-level (groups/{group}/) applies to all teams in that group
|
|
27
|
+
// - Team-level (teams/{group}/{team}/) applies to that team only
|
|
28
|
+
//
|
|
29
|
+
// On filename conflict, the more specific scope wins.
|
|
30
|
+
// ---------------------------------------------------------------------------
|
|
31
|
+
|
|
32
|
+
"groups": {
|
|
33
|
+
// Platform group: infrastructure, API, and data engineering teams.
|
|
34
|
+
"platform": {
|
|
35
|
+
// Teams within this group. Each becomes a subfolder in dist/teams/platform/.
|
|
36
|
+
"teams": ["api", "infra", "data"]
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
// Product group: web, mobile, and growth teams.
|
|
40
|
+
"product": {
|
|
41
|
+
"teams": ["web", "mobile", "growth"]
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
// Security group: AppSec and compliance.
|
|
45
|
+
"security": {
|
|
46
|
+
"teams": ["appsec", "compliance"]
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
// ---------------------------------------------------------------------------
|
|
51
|
+
// Personas
|
|
52
|
+
// ---------------------------------------------------------------------------
|
|
53
|
+
|
|
54
|
+
"personas": {
|
|
55
|
+
// Which personas from core/personas/ to compile and distribute.
|
|
56
|
+
// Comment out personas your org doesn't want to use.
|
|
57
|
+
// Valid values: any directory name under core/personas/.
|
|
58
|
+
"enabled": [
|
|
59
|
+
"code-reviewer", // /review-code — PR and code quality reviews
|
|
60
|
+
"security-reviewer", // /review-security — vulnerability and risk analysis
|
|
61
|
+
"test-generator", // /gen-tests — writes unit and integration tests
|
|
62
|
+
"test-data-expert" // /gen-testdata — generates synthetic test data
|
|
63
|
+
],
|
|
64
|
+
|
|
65
|
+
// Optional: path to an org-specific personas directory.
|
|
66
|
+
// Personas found here are compiled alongside core personas.
|
|
67
|
+
// Useful for proprietary personas you don't want in this repo.
|
|
68
|
+
// Path is relative to this config file.
|
|
69
|
+
// "customDir": "./personas",
|
|
70
|
+
|
|
71
|
+
// Persona output format controls what files are generated per persona.
|
|
72
|
+
// "skill" — SKILL.md (agentskills.io-compatible)
|
|
73
|
+
// "claude" — CLAUDE.md fragment (Claude Code slash command)
|
|
74
|
+
// "copilot" — .github/copilot-instructions.md fragment
|
|
75
|
+
// Default: all three.
|
|
76
|
+
"outputFormats": ["skill", "claude", "copilot"]
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
// ---------------------------------------------------------------------------
|
|
80
|
+
// Traits
|
|
81
|
+
// ---------------------------------------------------------------------------
|
|
82
|
+
|
|
83
|
+
"traits": {
|
|
84
|
+
// Which traits from core/traits/ are active at the org level.
|
|
85
|
+
// These are available to all personas. Personas select which to use via
|
|
86
|
+
// their persona.config.json. Setting "enabled" here to a subset restricts
|
|
87
|
+
// which traits personas can reference.
|
|
88
|
+
//
|
|
89
|
+
// Default: all traits in core/traits/ are enabled.
|
|
90
|
+
// To restrict: list only the traits you want available org-wide.
|
|
91
|
+
"enabled": [
|
|
92
|
+
"critical-thinking", // increases scrutiny, flags assumptions
|
|
93
|
+
"structured-output", // enforces machine-parseable output formatting
|
|
94
|
+
"schema-awareness", // data modeling, schema contracts, migration safety
|
|
95
|
+
"source-citation", // cites code locations and docs in findings
|
|
96
|
+
"audit-trail", // decision transparency, reasoning trail
|
|
97
|
+
"confidence-signaling" // marks claims with HIGH/MEDIUM/LOW confidence
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
// ---------------------------------------------------------------------------
|
|
102
|
+
// Always-on instructions
|
|
103
|
+
// ---------------------------------------------------------------------------
|
|
104
|
+
|
|
105
|
+
"instructions": {
|
|
106
|
+
// core/instructions/ contains Markdown fragments that are ALWAYS loaded
|
|
107
|
+
// in every repo that receives a sync. These are not personas — they are
|
|
108
|
+
// baseline behavioral guardrails that run before any slash command.
|
|
109
|
+
//
|
|
110
|
+
// "enabled": list of filenames (without .md) to distribute.
|
|
111
|
+
// Default: all files in core/instructions/ are enabled.
|
|
112
|
+
"enabled": [
|
|
113
|
+
"baseline.instructions", // code quality principles, review mindset, scope discipline
|
|
114
|
+
"security.instructions" // credential/secret/injection/crypto guardrails
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
// ---------------------------------------------------------------------------
|
|
119
|
+
// Sync configuration
|
|
120
|
+
// ---------------------------------------------------------------------------
|
|
121
|
+
|
|
122
|
+
"sync": {
|
|
123
|
+
// Path to repos.json — the list of repos that receive compiled output.
|
|
124
|
+
// repos.json is an array of objects: { path, group?, team? }
|
|
125
|
+
// - path: absolute or relative path to the repo root
|
|
126
|
+
// - group: optional group name (must match a key in "groups" above)
|
|
127
|
+
// - team: optional team name (must be a member of the group's "teams")
|
|
128
|
+
//
|
|
129
|
+
// Paths are resolved relative to this config file.
|
|
130
|
+
"repos": "./repos.json",
|
|
131
|
+
|
|
132
|
+
// Where within each target repo to write the compiled files.
|
|
133
|
+
// Default: ".claude" (writes to {repo}/.claude/)
|
|
134
|
+
// Also writes copilot-instructions.md to {repo}/.github/ automatically.
|
|
135
|
+
"targetDir": ".claude",
|
|
136
|
+
|
|
137
|
+
// Whether to write a PERSONAS.md inventory to each repo.
|
|
138
|
+
// Lists all deployed personas, their invocation commands, and descriptions.
|
|
139
|
+
// Default: true
|
|
140
|
+
"writePersonasIndex": true,
|
|
141
|
+
|
|
142
|
+
// If true, sync will not modify any files. Prints what would change.
|
|
143
|
+
// Override at runtime with: npm run sync -- --dry-run
|
|
144
|
+
"dryRun": false
|
|
145
|
+
|
|
146
|
+
// PR mode (optional): create a PR instead of writing directly.
|
|
147
|
+
// Uncomment to enable. Requires `gh` CLI installed.
|
|
148
|
+
// "pr": {
|
|
149
|
+
// "enabled": false,
|
|
150
|
+
// "branchPrefix": "agentboot/sync-",
|
|
151
|
+
// "titleTemplate": "chore: AgentBoot persona sync"
|
|
152
|
+
// }
|
|
153
|
+
},
|
|
154
|
+
|
|
155
|
+
// ---------------------------------------------------------------------------
|
|
156
|
+
// Output / build configuration
|
|
157
|
+
// ---------------------------------------------------------------------------
|
|
158
|
+
|
|
159
|
+
"output": {
|
|
160
|
+
// Where compiled output is written before syncing to repos.
|
|
161
|
+
// Structure: dist/{platform}/core/, dist/{platform}/groups/{group}/, etc.
|
|
162
|
+
// Paths are relative to this config file.
|
|
163
|
+
"distPath": "./dist",
|
|
164
|
+
|
|
165
|
+
// Whether to add provenance headers to compiled output files.
|
|
166
|
+
// Headers identify the source file and compile timestamp, making it
|
|
167
|
+
// easy to trace a deployed file back to its origin.
|
|
168
|
+
// Default: true
|
|
169
|
+
"provenanceHeaders": true,
|
|
170
|
+
|
|
171
|
+
// Whether to fail the build if dist/ already contains files from a
|
|
172
|
+
// previous build. Forces explicit `rm -rf dist/` before re-building.
|
|
173
|
+
// Useful in CI to prevent stale artifacts from silently persisting.
|
|
174
|
+
// Default: false
|
|
175
|
+
"failOnDirtyDist": false
|
|
176
|
+
|
|
177
|
+
// Token budget per persona (estimated tokens). Warns when exceeded.
|
|
178
|
+
// This is informational — it warns but does not block the build.
|
|
179
|
+
// Default: 8000
|
|
180
|
+
// "tokenBudget": { "warnAt": 8000 }
|
|
181
|
+
},
|
|
182
|
+
|
|
183
|
+
// ---------------------------------------------------------------------------
|
|
184
|
+
// Claude Code-specific output configuration (only applies to "claude" platform).
|
|
185
|
+
// ---------------------------------------------------------------------------
|
|
186
|
+
|
|
187
|
+
// "claude": {
|
|
188
|
+
// "hooks": {},
|
|
189
|
+
// "permissions": { "allow": [], "deny": [] },
|
|
190
|
+
// "mcpServers": {}
|
|
191
|
+
// },
|
|
192
|
+
|
|
193
|
+
// ---------------------------------------------------------------------------
|
|
194
|
+
// Validation configuration
|
|
195
|
+
// ---------------------------------------------------------------------------
|
|
196
|
+
|
|
197
|
+
"validation": {
|
|
198
|
+
// Regex patterns that will trigger a validation failure if found in any
|
|
199
|
+
// trait or persona definition. Extend this list with patterns specific
|
|
200
|
+
// to your organization (internal hostnames, account IDs, etc.).
|
|
201
|
+
"secretPatterns": [],
|
|
202
|
+
|
|
203
|
+
// If true, validation warnings are treated as errors and block the build.
|
|
204
|
+
// Default: false (warnings are printed but do not block)
|
|
205
|
+
"strictMode": false
|
|
206
|
+
}
|
|
207
|
+
}
|
package/bin/agentboot.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { spawnSync } from "node:child_process";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { dirname, join } from "node:path";
|
|
6
|
+
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = dirname(__filename);
|
|
9
|
+
const cli = join(__dirname, "..", "scripts", "cli.ts");
|
|
10
|
+
|
|
11
|
+
const result = spawnSync(
|
|
12
|
+
process.execPath,
|
|
13
|
+
["--import", "tsx", cli, ...process.argv.slice(2)],
|
|
14
|
+
{ stdio: "inherit", env: { ...process.env } }
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
process.exit(result.status ?? 1);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Gotchas
|
|
2
|
+
|
|
3
|
+
Gotchas are path-scoped rules that encode battle-tested operational knowledge.
|
|
4
|
+
They activate automatically when developers work on files matching specific paths.
|
|
5
|
+
|
|
6
|
+
## File Format
|
|
7
|
+
|
|
8
|
+
Each gotcha is a markdown file in `core/gotchas/` with `paths:` frontmatter:
|
|
9
|
+
|
|
10
|
+
```markdown
|
|
11
|
+
---
|
|
12
|
+
description: "Brief description of the gotcha"
|
|
13
|
+
paths:
|
|
14
|
+
- "**/*.lambda.ts"
|
|
15
|
+
- "functions/**"
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Lambda Deployment Gotchas
|
|
19
|
+
|
|
20
|
+
- **Cold start penalty:** Lambda cold starts add 1-3s latency...
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Sources for Gotchas
|
|
24
|
+
|
|
25
|
+
- Post-incident reviews ("what did we learn?")
|
|
26
|
+
- Onboarding notes ("what I wish I knew")
|
|
27
|
+
- Code review comments that repeat
|
|
28
|
+
- Production debugging sessions with non-obvious root causes
|
|
29
|
+
|
|
30
|
+
## How They Work
|
|
31
|
+
|
|
32
|
+
During `agentboot build`, gotcha files are compiled into `.claude/rules/` with
|
|
33
|
+
`paths:` frontmatter so Claude Code activates them only for matching files.
|
|
34
|
+
|
|
35
|
+
During `agentboot sync`, they are distributed to target repos alongside personas.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: AgentBoot baseline — always-on code quality and review guidance
|
|
3
|
+
applyTo: "**"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# AgentBoot Baseline Instructions
|
|
7
|
+
|
|
8
|
+
These instructions are active in every session. They define the default posture for
|
|
9
|
+
code assistance, review, and generation across the entire codebase.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Code Quality Principles
|
|
14
|
+
|
|
15
|
+
**Prefer readability over cleverness.** The most important audience for code is the
|
|
16
|
+
next engineer who has to read it, often under pressure. A solution that takes five more
|
|
17
|
+
lines but is immediately understandable is better than a compact one that requires a
|
|
18
|
+
comment explaining what it does.
|
|
19
|
+
|
|
20
|
+
**Explicit over implicit.** Name what you mean. Avoid magic numbers, implicit defaults,
|
|
21
|
+
and side effects that are not declared in a function's signature or documented in its
|
|
22
|
+
contract. When a function does something surprising, that surprisingness is a defect.
|
|
23
|
+
|
|
24
|
+
**Small functions with one job.** A function that does multiple unrelated things is
|
|
25
|
+
harder to test, harder to name accurately, and harder to change safely. When a function
|
|
26
|
+
grows past the point where its name accurately describes everything it does, it should
|
|
27
|
+
be split.
|
|
28
|
+
|
|
29
|
+
**Error paths are first-class.** The happy path is not the only path. Handle errors
|
|
30
|
+
explicitly. Do not let failure modes be an afterthought. When generating code, always
|
|
31
|
+
ask: what happens if this fails?
|
|
32
|
+
|
|
33
|
+
**Prefer the existing pattern.** When adding code to a codebase that already has an
|
|
34
|
+
established pattern for the problem you are solving, use that pattern — unless you have
|
|
35
|
+
a specific reason not to, and you document that reason. Consistency has compounding
|
|
36
|
+
value. Deviation has compounding cost.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Review Mindset
|
|
41
|
+
|
|
42
|
+
**Be constructive by default.** The goal of a code review is to ship better software,
|
|
43
|
+
not to demonstrate the reviewer's knowledge. Every finding should help the author
|
|
44
|
+
understand both the problem and the path forward.
|
|
45
|
+
|
|
46
|
+
**Explain the why, not just the what.** "Change X to Y" is less useful than "Change X
|
|
47
|
+
to Y because Z." The author learns more, the fix is more likely to be correct, and the
|
|
48
|
+
explanation becomes part of the repository's collective knowledge.
|
|
49
|
+
|
|
50
|
+
**Distinguish must-fix from consider-fixing.** Not all feedback is equal. Be explicit
|
|
51
|
+
about whether a comment represents a blocking concern or a suggestion the author can
|
|
52
|
+
take or leave. Use the severity vocabulary from `core/traits/structured-output.md` when
|
|
53
|
+
precision matters.
|
|
54
|
+
|
|
55
|
+
**Stay in scope.** If you notice something outside the scope of what you were asked to
|
|
56
|
+
review, note it briefly — once — rather than expanding the review to cover the entire
|
|
57
|
+
codebase. Scope discipline makes reviews faster to complete and easier to act on.
|
|
58
|
+
|
|
59
|
+
**Assume good intent.** Code that looks wrong was usually written by someone who had
|
|
60
|
+
a reason. Before writing a finding, consider whether there is a plausible explanation
|
|
61
|
+
you are missing. If you cannot think of one, ask — especially for unusual patterns
|
|
62
|
+
that might reflect domain-specific constraints.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Output Format Preferences
|
|
67
|
+
|
|
68
|
+
**Structured where it adds value.** When reviewing a pull request or analyzing a block
|
|
69
|
+
of code, prefer organized output with clear sections over a stream of prose. Headers,
|
|
70
|
+
bullet points, and severity labels help authors triage quickly.
|
|
71
|
+
|
|
72
|
+
**Prose where structure would be pedantic.** A one-sentence answer to a one-sentence
|
|
73
|
+
question should be a sentence, not a JSON object. Match the format to the audience and
|
|
74
|
+
the context.
|
|
75
|
+
|
|
76
|
+
**Lead with the conclusion.** State the finding or recommendation first, then explain
|
|
77
|
+
it. Reviewers who are busy should be able to read the first line of each point and
|
|
78
|
+
know whether to read further.
|
|
79
|
+
|
|
80
|
+
**Link to the location.** When a finding refers to a specific file and line, say so.
|
|
81
|
+
"The authentication check in `src/auth/middleware.ts` at line 34" is more useful than
|
|
82
|
+
"the authentication check."
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Scope Discipline
|
|
87
|
+
|
|
88
|
+
Do not suggest changes outside the scope of what was requested unless the out-of-scope
|
|
89
|
+
issue is a blocker (a CRITICAL finding in the adjacent code that would make the
|
|
90
|
+
requested change unsafe to ship). When you do flag an out-of-scope issue, make it
|
|
91
|
+
clearly labeled:
|
|
92
|
+
|
|
93
|
+
> "Out of scope for this review, but worth noting: `src/utils/cache.ts` has an
|
|
94
|
+
> unrelated issue you may want to track separately."
|
|
95
|
+
|
|
96
|
+
Do not refactor code that was not asked to be refactored. Do not rename variables,
|
|
97
|
+
restructure imports, or reformat files that the author did not touch. Changes generate
|
|
98
|
+
noise in diffs and friction in reviews.
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Available Personas
|
|
103
|
+
|
|
104
|
+
AgentBoot ships these personas. Invoke them as slash commands.
|
|
105
|
+
|
|
106
|
+
| Persona | Command | When to use |
|
|
107
|
+
|---|---|---|
|
|
108
|
+
| Code Reviewer | `/review-code` | General code quality, architecture, correctness |
|
|
109
|
+
| Security Reviewer | `/review-security` | Vulnerabilities, secrets, auth patterns |
|
|
110
|
+
| Test Generator | `/gen-tests` | Generate unit and integration tests from function signatures |
|
|
111
|
+
| Test Data Expert | `/gen-testdata` | Generate realistic synthetic fixtures and factories |
|
|
112
|
+
|
|
113
|
+
Each persona has a documented scope. Use the right tool for the job. When in doubt,
|
|
114
|
+
start with `/review-code` and escalate to `/review-security` for any output involving
|
|
115
|
+
authentication, authorization, cryptography, or external data handling.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## When to Ask vs. When to Proceed
|
|
120
|
+
|
|
121
|
+
**Ask before proceeding** when:
|
|
122
|
+
- The correct behavior is ambiguous and the wrong choice would require rework
|
|
123
|
+
- A design decision has significant implications the author may not have considered
|
|
124
|
+
- You need schema, contract, or configuration context that was not provided
|
|
125
|
+
- You are about to make a change that touches multiple files or has blast radius
|
|
126
|
+
|
|
127
|
+
**Proceed and note** when:
|
|
128
|
+
- The correct path is clear and the stakes of a wrong choice are low
|
|
129
|
+
- The question is answerable from the context already provided
|
|
130
|
+
- Asking would interrupt the author's flow without meaningfully reducing risk
|
|
131
|
+
|
|
132
|
+
When you proceed and make an assumption, state the assumption. This is the difference
|
|
133
|
+
between acting efficiently and acting opaquely.
|