@botdigit/agent-blueprint 1.0.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/AGENTS.md +204 -0
- package/LICENSE +21 -0
- package/PROMPT.md +22 -0
- package/README.md +248 -0
- package/bin/cli.js +160 -0
- package/frameworks/axum/SKILL.md +73 -0
- package/frameworks/django/SKILL.md +71 -0
- package/frameworks/fastapi/SKILL.md +73 -0
- package/frameworks/laravel/SKILL.md +67 -0
- package/frameworks/nextjs/SKILL.md +60 -0
- package/frameworks/rails/SKILL.md +78 -0
- package/frameworks/react/SKILL.md +58 -0
- package/frameworks/spring/SKILL.md +79 -0
- package/install.sh +83 -0
- package/llms.txt +26 -0
- package/package.json +47 -0
- package/skills/00-orchestrator/.gitkeep +26 -0
- package/skills/00-orchestrator/SKILL.md +368 -0
- package/skills/00-orchestrator/decision-tree.md +93 -0
- package/skills/00-orchestrator/project-detection.md +81 -0
- package/skills/00-orchestrator/skill-selection.md +87 -0
- package/skills/00-orchestrator/workflow.md +25 -0
- package/skills/01-discovery/SKILL.md +66 -0
- package/skills/02-project-context/SKILL.md +89 -0
- package/skills/03-business-architecture/SKILL.md +231 -0
- package/skills/04-architecture/SKILL.md +131 -0
- package/skills/05-documentation/SKILL.md +133 -0
- package/skills/06-codebase-audit/SKILL.md +127 -0
- package/skills/07-security/SKILL.md +159 -0
- package/skills/08-testing/SKILL.md +120 -0
- package/skills/09-performance/SKILL.md +96 -0
- package/skills/10-audit/SKILL.md +112 -0
- package/stacks/dotnet/SKILL.md +56 -0
- package/stacks/go/SKILL.md +61 -0
- package/stacks/java/SKILL.md +58 -0
- package/stacks/javascript/SKILL.md +47 -0
- package/stacks/php/SKILL.md +51 -0
- package/stacks/python/SKILL.md +52 -0
- package/stacks/ruby/SKILL.md +51 -0
- package/stacks/rust/SKILL.md +55 -0
- package/stacks/typescript/SKILL.md +55 -0
- package/templates/adr/ADR-TEMPLATE.md +64 -0
- package/templates/api-spec/API_SPEC_TEMPLATE.md +137 -0
- package/templates/architecture/ARCHITECTURE_TEMPLATE.md +81 -0
- package/templates/business-requirements/BUSINESS_REQUIREMENTS_TEMPLATE.md +77 -0
- package/templates/changelog/CHANGELOG_TEMPLATE.md +37 -0
- package/templates/database/DATABASE_TEMPLATE.md +77 -0
- package/templates/deployment/DEPLOYMENT_TEMPLATE.md +80 -0
- package/templates/project-brief/PROJECT_BRIEF_TEMPLATE.md +72 -0
- package/templates/runbook/RUNBOOK_TEMPLATE.md +54 -0
- package/templates/security/SECURITY_TEMPLATE.md +93 -0
- package/templates/testing/TESTING_TEMPLATE.md +87 -0
package/AGENTS.md
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# AGENTS.md — Entry Point for Coding Agents
|
|
2
|
+
|
|
3
|
+
You are entering a project that uses **Agent Blueprint**.
|
|
4
|
+
|
|
5
|
+
Before implementing any significant change:
|
|
6
|
+
|
|
7
|
+
1. **Discover** the repository structure.
|
|
8
|
+
2. **Identify** the technology stack.
|
|
9
|
+
3. **Identify** the project type.
|
|
10
|
+
4. **Identify** the business domain.
|
|
11
|
+
5. **Read** existing project documentation.
|
|
12
|
+
6. **Detect** existing architecture.
|
|
13
|
+
7. **Detect** existing conventions.
|
|
14
|
+
8. **Identify** current problems.
|
|
15
|
+
9. **Determine** which skills apply.
|
|
16
|
+
10. **Never** introduce unnecessary technologies.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## The Core Rule
|
|
21
|
+
|
|
22
|
+
> **The agent must adapt to the project. The project must not be forced to adapt to the skill.**
|
|
23
|
+
|
|
24
|
+
Do not assume:
|
|
25
|
+
- Framework
|
|
26
|
+
- Database
|
|
27
|
+
- Architecture
|
|
28
|
+
- Deployment target
|
|
29
|
+
- Business model
|
|
30
|
+
- Authentication mechanism
|
|
31
|
+
- Payment model
|
|
32
|
+
- Scaling requirements
|
|
33
|
+
- Programming language
|
|
34
|
+
|
|
35
|
+
**Inspect first. Always.**
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## How to Use This Repository
|
|
40
|
+
|
|
41
|
+
### Step 1 — Read the Orchestrator
|
|
42
|
+
|
|
43
|
+
Start with `skills/00-orchestrator/SKILL.md`. It contains:
|
|
44
|
+
|
|
45
|
+
- The workflow classification (greenfield / existing / broken)
|
|
46
|
+
- Project detection logic
|
|
47
|
+
- Skill selection rules
|
|
48
|
+
- Decision trees for common scenarios
|
|
49
|
+
|
|
50
|
+
### Step 2 — Run Discovery
|
|
51
|
+
|
|
52
|
+
Follow `skills/01-discovery/SKILL.md` to locate the actual project within the repository (if it is nested, monorepo, or partially present).
|
|
53
|
+
|
|
54
|
+
### Step 3 — Build Project Context
|
|
55
|
+
|
|
56
|
+
Follow `skills/02-project-context/SKILL.md` to detect and record:
|
|
57
|
+
|
|
58
|
+
- Programming language(s)
|
|
59
|
+
- Framework(s)
|
|
60
|
+
- Database(s)
|
|
61
|
+
- Cache / queue / search
|
|
62
|
+
- Infrastructure / deployment
|
|
63
|
+
- CI/CD
|
|
64
|
+
- Third-party services
|
|
65
|
+
|
|
66
|
+
### Step 4 — Understand the Business
|
|
67
|
+
|
|
68
|
+
Follow `skills/03-business-architecture/SKILL.md` to understand:
|
|
69
|
+
|
|
70
|
+
- Who the actors are
|
|
71
|
+
- What the business does
|
|
72
|
+
- What the rules are
|
|
73
|
+
- What the workflows are
|
|
74
|
+
- What state machines exist
|
|
75
|
+
- What must never change
|
|
76
|
+
|
|
77
|
+
### Step 5 — Audit Before Modifying
|
|
78
|
+
|
|
79
|
+
If the project already has code:
|
|
80
|
+
|
|
81
|
+
- Run `skills/06-codebase-audit/SKILL.md`
|
|
82
|
+
- Run `skills/07-security/SKILL.md` if the project handles user data, payments, auth, or external integrations
|
|
83
|
+
- Run `skills/04-architecture/SKILL.md` to understand current architecture and gaps
|
|
84
|
+
|
|
85
|
+
### Step 6 — Select the Minimum Skill Set
|
|
86
|
+
|
|
87
|
+
Use the orchestrator's skill-selection logic. Activate only what is needed:
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
core
|
|
91
|
+
+ business-architecture (if business logic exists or is being added)
|
|
92
|
+
+ architecture (if architecture decisions are needed)
|
|
93
|
+
+ documentation (always — every agent leaves docs better)
|
|
94
|
+
+ [detected stack skill] (e.g., rust, typescript, python)
|
|
95
|
+
+ [detected framework skill] (e.g., nextjs, laravel, django)
|
|
96
|
+
+ [detected infrastructure skill] (e.g., postgres, redis, docker)
|
|
97
|
+
+ security (if applicable)
|
|
98
|
+
+ testing (if code changes are planned)
|
|
99
|
+
+ performance (if performance is a concern)
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Step 7 — Implement
|
|
103
|
+
|
|
104
|
+
After understanding and auditing:
|
|
105
|
+
|
|
106
|
+
- Read the relevant stack skill for implementation conventions
|
|
107
|
+
- Read the relevant framework skill for framework-specific patterns
|
|
108
|
+
- Implement following the project's existing conventions
|
|
109
|
+
- Write tests for every major change
|
|
110
|
+
- Update documentation when architecture or business logic changes
|
|
111
|
+
|
|
112
|
+
### Step 8 — Verify
|
|
113
|
+
|
|
114
|
+
- Run `skills/08-testing/SKILL.md` to verify test coverage
|
|
115
|
+
- Run `skills/07-security/SKILL.md` again if security-relevant changes were made
|
|
116
|
+
- Update `CHANGELOG.md` and relevant docs
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Project State Classification
|
|
121
|
+
|
|
122
|
+
The orchestrator classifies the project into one of these states:
|
|
123
|
+
|
|
124
|
+
| State | Meaning | Approach |
|
|
125
|
+
|---|---|---|
|
|
126
|
+
| **Greenfield** | No code yet | Establish foundations; choose architecture deliberately |
|
|
127
|
+
| **Healthy** | Code exists, well-structured | Improve incrementally; preserve what works |
|
|
128
|
+
| **Partial** | Code exists, incomplete or inconsistent | Reconcile existing implementation before redesign |
|
|
129
|
+
| **Broken** | Code exists, fundamental problems | Stabilize first; fix highest-risk issues; document as you go |
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Minimum Sufficient Documentation
|
|
134
|
+
|
|
135
|
+
Do not create every document in `templates/`. Create only what the project needs:
|
|
136
|
+
|
|
137
|
+
| Project Type | Minimum Docs |
|
|
138
|
+
|---|---|
|
|
139
|
+
| Script / small tool | `README.md` |
|
|
140
|
+
| Small web app | `PROJECT.md`, `ARCHITECTURE.md`, `DATABASE.md`, `API.md`, `SECURITY.md` |
|
|
141
|
+
| SaaS / marketplace | + `BUSINESS.md`, `BUSINESS-MODEL.md`, `ACTORS.md`, `TESTING.md`, `DEPLOYMENT.md`, `OPERATIONS.md` |
|
|
142
|
+
| Regulated system | + `COMPLIANCE.md`, `AUDITS/`, data governance, disaster recovery |
|
|
143
|
+
|
|
144
|
+
The orchestrator decides. Use judgment. When in doubt, err toward more documentation for complex or risky projects, and less for simple ones.
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## What Every Agent Must Leave Behind
|
|
149
|
+
|
|
150
|
+
Before finishing work on a project, verify:
|
|
151
|
+
|
|
152
|
+
- [ ] `README.md` is accurate
|
|
153
|
+
- [ ] Any changed architecture is documented in `ARCHITECTURE.md` and/or `docs/architecture/decisions/`
|
|
154
|
+
- [ ] Any changed business logic is documented in `BUSINESS.md` or `docs/business/`
|
|
155
|
+
- [ ] Any new API endpoints are documented in `API.md` or `docs/engineering/api.md`
|
|
156
|
+
- [ ] Any changed database schema is documented in `DATABASE.md` or `docs/engineering/database.md`
|
|
157
|
+
- [ ] Security-relevant changes are flagged in `SECURITY.md`
|
|
158
|
+
- [ ] `CHANGELOG.md` or `docs/changelog/` reflects the change
|
|
159
|
+
- [ ] New dependencies are justified in an ADR or comment
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Skill Metadata
|
|
164
|
+
|
|
165
|
+
Every skill in `skills/` includes a metadata header:
|
|
166
|
+
|
|
167
|
+
```yaml
|
|
168
|
+
skill:
|
|
169
|
+
name: skill-name
|
|
170
|
+
version: 1.0.0
|
|
171
|
+
compatible:
|
|
172
|
+
project_skills: ">=1.0"
|
|
173
|
+
requires:
|
|
174
|
+
- discovery
|
|
175
|
+
outputs:
|
|
176
|
+
- some-document.md
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
The orchestrator uses this metadata for skill selection and compatibility checking.
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## Discovery
|
|
184
|
+
|
|
185
|
+
The repository is discoverable from GitHub. An agent that finds this repository can:
|
|
186
|
+
|
|
187
|
+
1. Clone or inspect it
|
|
188
|
+
2. Read `AGENTS.md` (this file)
|
|
189
|
+
3. Read `skills/00-orchestrator/SKILL.md`
|
|
190
|
+
4. Use the skills to work on any project
|
|
191
|
+
|
|
192
|
+
No installation, no setup, no configuration required. Just clone and read.
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## Contributing
|
|
197
|
+
|
|
198
|
+
See `CONTRIBUTING.md` for how to add skills, stack adapters, framework adapters, templates, and examples.
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## License
|
|
203
|
+
|
|
204
|
+
MIT — see `LICENSE`.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Agent Blueprint Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/PROMPT.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Agent Blueprint — Universal System Prompt
|
|
2
|
+
|
|
3
|
+
*Copy and paste this prompt into your AI agent's system prompt (Cursor Settings, Claude Project Instructions, ChatGPT Custom Instructions, or GitHub Copilot rules):*
|
|
4
|
+
|
|
5
|
+
```markdown
|
|
6
|
+
You are an expert software architect and engineering pair programmer operating under the **Agent Blueprint** standard (https://github.com/botdigit-official/agent-blueprint).
|
|
7
|
+
|
|
8
|
+
YOUR CORE OPERATING DIRECTIVES:
|
|
9
|
+
1. ADAPT TO THE PROJECT: Never force a project to adapt to your preferences. Inspect existing technology, frameworks, conventions, and style before proposing or writing code.
|
|
10
|
+
2. INSPECT BEFORE MODIFYING: Always read existing files, dependencies (e.g., Cargo.toml, package.json, go.mod), and documentation (docs/) before making changes.
|
|
11
|
+
3. PREFER SIMPLE ARCHITECTURE: Do not introduce microservices, new libraries, or complex abstractions without a measurable justification.
|
|
12
|
+
4. BUSINESS LOGIC FIRST: Understand the business domain, actors, and state machines before touching code.
|
|
13
|
+
5. PRESERVE WORKING SYSTEMS: Never rewrite working systems without explicit instruction. Maintain backwards compatibility and regression safety.
|
|
14
|
+
6. LIVING DOCUMENTATION: Whenever you modify system behavior, architecture, or APIs, you MUST update the corresponding documentation in `docs/` and record an ADR if an architectural decision was made.
|
|
15
|
+
7. TEST EVERYTHING: Every feature, fix, or refactor must include automated unit/integration tests that verify functionality.
|
|
16
|
+
8. DETERMINISTIC TOOLS OVER AI: Use deterministic logic, SQL queries, and regex where possible; only use LLM reasoning where dynamic human-like comprehension adds unique value.
|
|
17
|
+
|
|
18
|
+
When starting in any codebase:
|
|
19
|
+
Step 1: Check if `AGENTS.md` or `docs/` exists.
|
|
20
|
+
Step 2: Detect the tech stack and understand the business domain.
|
|
21
|
+
Step 3: State your findings and plan before modifying code.
|
|
22
|
+
```
|
package/README.md
ADDED
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# 📐 Agent Blueprint
|
|
4
|
+
|
|
5
|
+
**The universal blueprint and skill standard for AI coding agents — teaching agents how to think, audit, architect, and properly document any software project.**
|
|
6
|
+
|
|
7
|
+
[](https://github.com/botdigit-official/agent-blueprint/actions)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
[](CONTRIBUTING.md)
|
|
10
|
+
[](#)
|
|
11
|
+
[](https://github.com/botdigit-official/agent-blueprint)
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
> *"The agent must adapt to the project. The project must not be forced to adapt to the skill."*
|
|
16
|
+
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## ⚡ 1-Minute Quickstart
|
|
22
|
+
|
|
23
|
+
Install **Agent Blueprint** into any project with your preferred method:
|
|
24
|
+
|
|
25
|
+
### Option A: One-Liner (Recommended)
|
|
26
|
+
```bash
|
|
27
|
+
curl -fsSL https://raw.githubusercontent.com/botdigit-official/agent-blueprint/main/install.sh | bash
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Option B: Via npx / Node
|
|
31
|
+
```bash
|
|
32
|
+
npx agent-blueprint init
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Option C: Git Clone
|
|
36
|
+
```bash
|
|
37
|
+
git clone --depth 1 https://github.com/botdigit-official/agent-blueprint.git ~/.agent-blueprint
|
|
38
|
+
~/.agent-blueprint/install.sh .
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### 🤖 Multi-Agent Compatibility Out of the Box
|
|
42
|
+
| AI Tool | Configuration File Generated | Workflow Activated |
|
|
43
|
+
|---|---|---|
|
|
44
|
+
| **Google Antigravity** | `AGENTS.md` + `.agents/skills/` | Full modular skill hierarchy |
|
|
45
|
+
| **Claude Code** | `CLAUDE.md` | Context & architecture guardrails |
|
|
46
|
+
| **Cursor AI** | `.cursorrules` | Architectural & testing rules |
|
|
47
|
+
| **Windsurf / Cline / Aider** | `AGENTS.md` | Autonomous discovery & audit |
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## What is Agent Blueprint?
|
|
52
|
+
|
|
53
|
+
Most AI coding agents jump straight to generating code or rewriting working systems without understanding the domain, architecture, dependencies, or conventions.
|
|
54
|
+
|
|
55
|
+
**Agent Blueprint** is a composable, technology-agnostic skill and documentation standard. It provides structured guidance so any AI agent can:
|
|
56
|
+
|
|
57
|
+
1. **Discover** the project layout and entry points across the repo
|
|
58
|
+
2. **Understand** its stack, framework, database, and maturity
|
|
59
|
+
3. **Audit** what exists before modifying or breaking anything
|
|
60
|
+
4. **Document** findings into living, structured architectural documentation
|
|
61
|
+
5. **Architect** changes grounded in real business needs, not guesswork
|
|
62
|
+
6. **Plan** features with Architectural Decision Records (ADRs)
|
|
63
|
+
7. **Implement** following existing patterns and conventions
|
|
64
|
+
8. **Test & Verify** to preserve regression safety and data integrity
|
|
65
|
+
9. **Review & Audit** against security and performance baselines
|
|
66
|
+
|
|
67
|
+
> 🤖 **Direct LLM Ingestion**: Feed [**`llms.txt`**](llms.txt) to web crawlers/agents or copy the 1-click system prompt in [**`PROMPT.md`**](PROMPT.md).
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## ⚖️ Why You Need This: Raw AI vs. Agent Blueprint
|
|
72
|
+
|
|
73
|
+
| Scenario | Raw AI / Default Copilot | With Agent Blueprint |
|
|
74
|
+
|---|---|---|
|
|
75
|
+
| **Entering a project** | Guesses architecture, invents new dependencies | Runs discovery, detects existing stack, checks `docs/` |
|
|
76
|
+
| **Refactoring code** | Often rewrites working systems and breaks logic | Obeys established ADRs, respects existing state machines |
|
|
77
|
+
| **Documentation** | Leaves zero comments and zero docs | Automatically updates `docs/` living documentation |
|
|
78
|
+
| **New Features** | Injects unverified patterns | Writes automated tests, updates API specs |
|
|
79
|
+
| **Multi-Agent Teams** | Claude Code, Cursor, and Antigravity fight | All agents share a single source of truth |
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Core Philosophy
|
|
84
|
+
|
|
85
|
+
These rules live at the top of every skill and guide every agent decision:
|
|
86
|
+
|
|
87
|
+
1. **Understand before changing.**
|
|
88
|
+
2. **Inspect before assuming.**
|
|
89
|
+
3. **Document before redesigning.**
|
|
90
|
+
4. **Prefer simple architecture.**
|
|
91
|
+
5. **Use the project's existing technology when practical.**
|
|
92
|
+
6. **Do not introduce technology without a measurable reason.**
|
|
93
|
+
7. **Business logic comes before code structure.**
|
|
94
|
+
8. **Security and data integrity come before features.**
|
|
95
|
+
9. **Deterministic tools before AI.**
|
|
96
|
+
10. **AI only where reasoning adds value.**
|
|
97
|
+
11. **APIs only where they provide unique value.**
|
|
98
|
+
12. **Never rewrite working systems unnecessarily.**
|
|
99
|
+
13. **Preserve existing functionality unless explicitly deprecated.**
|
|
100
|
+
14. **Every architectural decision needs a reason (ADR).**
|
|
101
|
+
15. **Every major change needs automated tests.**
|
|
102
|
+
16. **Every project needs a source of truth.**
|
|
103
|
+
17. **Every agent must leave the project better documented than it found it.**
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## How It Works
|
|
108
|
+
|
|
109
|
+
### Composable Skills, Not a Giant System Prompt
|
|
110
|
+
|
|
111
|
+
Agent Blueprint is **not** a single unwieldy prompt. It is a directory of modular, composable skills. The autonomous orchestrator selects only what applies to the current project:
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
skills/
|
|
115
|
+
├── 00-orchestrator/ # Triage, detect, activate
|
|
116
|
+
├── 01-discovery/ # Find project roots in monorepos or nested dirs
|
|
117
|
+
├── 02-project-context/ # Stack, framework, database, infrastructure
|
|
118
|
+
├── 03-business-architecture/ # Domain, actors, business rules, workflows
|
|
119
|
+
├── 04-architecture/ # Architectural review, ADRs, gaps
|
|
120
|
+
├── 05-documentation/ # Living documentation standard
|
|
121
|
+
├── 06-codebase-audit/ # Code-level inspection and hygiene
|
|
122
|
+
├── 07-security/ # Security review, secrets, CSRF, auth audit
|
|
123
|
+
├── 08-testing/ # Test strategy, coverage, regression suite
|
|
124
|
+
├── 09-performance/ # Latency, queries, throughput, bottlenecks
|
|
125
|
+
└── 10-audit/ # Combined forensic audit workflow
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Stack & framework adapters activate automatically based on detected project manifests (`Cargo.toml`, `package.json`, `pyproject.toml`, `go.mod`, `pom.xml`, etc.):
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
stacks/ frameworks/
|
|
132
|
+
├── rust/ ├── axum/
|
|
133
|
+
├── typescript/ ├── nextjs/
|
|
134
|
+
├── python/ ├── react/
|
|
135
|
+
├── go/ ├── fastapi/
|
|
136
|
+
├── php/ ├── django/
|
|
137
|
+
├── java/ ├── laravel/
|
|
138
|
+
├── ruby/ ├── spring/
|
|
139
|
+
└── dotnet/ └── rails/
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Minimum Sufficient Documentation
|
|
143
|
+
|
|
144
|
+
Not every project needs 50 documents. Agent Blueprint selects the minimum documentation set appropriate to the project's size and risk:
|
|
145
|
+
|
|
146
|
+
| Project Scope | Required Documentation Baseline |
|
|
147
|
+
|---|---|
|
|
148
|
+
| **Script / CLI Tool** | `README.md` only |
|
|
149
|
+
| **Web App / API** | Project Brief, Architecture, Database, API Spec, Security |
|
|
150
|
+
| **SaaS / Marketplace** | + Business Architecture, Testing, Deployment, Runbook |
|
|
151
|
+
| **Regulated / Enterprise** | + Compliance, Audit Trail, Data Governance, Disaster Recovery |
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Repository Structure
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
agent-blueprint/
|
|
159
|
+
├── README.md # Project overview & quickstart
|
|
160
|
+
├── AGENTS.md # Primary instruction manual for coding agents
|
|
161
|
+
├── CONTRIBUTING.md # Guidelines for community skill additions
|
|
162
|
+
├── LICENSE # MIT License
|
|
163
|
+
├── install.sh # 1-click project linker & installer
|
|
164
|
+
│
|
|
165
|
+
├── skills/ # Core, technology-independent skills
|
|
166
|
+
│ ├── 00-orchestrator/
|
|
167
|
+
│ ├── 01-discovery/
|
|
168
|
+
│ ├── 02-project-context/
|
|
169
|
+
│ ├── 03-business-architecture/
|
|
170
|
+
│ ├── 04-architecture/
|
|
171
|
+
│ ├── 05-documentation/
|
|
172
|
+
│ ├── 06-codebase-audit/
|
|
173
|
+
│ ├── 07-security/
|
|
174
|
+
│ ├── 08-testing/
|
|
175
|
+
│ ├── 09-performance/
|
|
176
|
+
│ └── 10-audit/
|
|
177
|
+
│
|
|
178
|
+
├── stacks/ # Technology adapters (Rust, TS, Python, Go, etc.)
|
|
179
|
+
├── frameworks/ # Framework adapters (Next.js, Axum, FastAPI, etc.)
|
|
180
|
+
│
|
|
181
|
+
├── templates/ # Production-grade documentation templates
|
|
182
|
+
│ ├── project-brief/ # Initial scoping & objectives
|
|
183
|
+
│ ├── business-requirements/ # Domain entities & actor rules
|
|
184
|
+
│ ├── architecture/ # System design & component diagrams
|
|
185
|
+
│ ├── adr/ # Architecture Decision Records
|
|
186
|
+
│ ├── api-spec/ # REST / GraphQL API contracts
|
|
187
|
+
│ ├── database/ # Schema, migrations & relationships
|
|
188
|
+
│ ├── security/ # Threat models & access controls
|
|
189
|
+
│ ├── testing/ # Quality gates & verification plans
|
|
190
|
+
│ ├── deployment/ # CI/CD pipelines & hosting
|
|
191
|
+
│ ├── runbook/ # Incident response & operational SOPs
|
|
192
|
+
│ └── changelog/ # Semantic version releases
|
|
193
|
+
│
|
|
194
|
+
└── examples/ # Real-world audits & walkthroughs
|
|
195
|
+
├── botdigit-site/ # Multi-tenant directory & site builder
|
|
196
|
+
├── saas/ # Multi-tier subscription platform
|
|
197
|
+
├── marketplace/ # Two-sided buyer/seller marketplace
|
|
198
|
+
├── fintech/ # High-security payment processing
|
|
199
|
+
├── ecommerce/ # Catalog, cart, and order fulfillment
|
|
200
|
+
├── directory/ # Geo-spatial search & discovery
|
|
201
|
+
├── mobile-app/ # Cross-platform iOS/Android app
|
|
202
|
+
├── ai-product/ # LLM agents & deterministic pipelines
|
|
203
|
+
└── internal-tool/ # Backoffice admin control panels
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## Quick Start
|
|
209
|
+
|
|
210
|
+
### For AI Coding Agents
|
|
211
|
+
Read [`AGENTS.md`](AGENTS.md) first. It specifies the step-by-step discovery, inspection, and execution lifecycle.
|
|
212
|
+
|
|
213
|
+
### For Developers & Tech Leads
|
|
214
|
+
1. Browse [`skills/`](skills/) to understand the reasoning frameworks.
|
|
215
|
+
2. Check [`templates/`](templates/) for ready-to-use architecture and documentation templates.
|
|
216
|
+
3. Review [`examples/botdigit-site/`](examples/botdigit-site/) to see a real forensic audit and remediation.
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## Contributing
|
|
221
|
+
|
|
222
|
+
We welcome contributions! You can add new technology stacks, framework adapters, or domain patterns:
|
|
223
|
+
1. Review [`CONTRIBUTING.md`](CONTRIBUTING.md).
|
|
224
|
+
2. Follow the metadata schema in `skills/00-orchestrator/SKILL.md`.
|
|
225
|
+
3. Submit a Pull Request.
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## Frequently Asked Questions (FAQ)
|
|
230
|
+
|
|
231
|
+
### How does Agent Blueprint prevent AI from breaking existing code?
|
|
232
|
+
Agent Blueprint enforces a strict rule: **"The agent must adapt to the project; the project must not adapt to the skill."** Before an agent is allowed to write or edit code, it must execute Discovery, inspect existing frameworks, review active state machines, and check existing unit tests.
|
|
233
|
+
|
|
234
|
+
### Does this work with Cursor, Claude Code, and Antigravity?
|
|
235
|
+
**Yes.** When you run `./install.sh` or `npx agent-blueprint init`, it automatically creates `.cursorrules` (for Cursor), `CLAUDE.md` (for Claude Code), and `AGENTS.md` + `.agents/skills/` (for Antigravity, Cline, Windsurf). All agents follow the exact same architectural guidelines.
|
|
236
|
+
|
|
237
|
+
### What is "Living Documentation"?
|
|
238
|
+
Instead of outdated wikis or empty READMEs, Agent Blueprint establishes a structured `docs/` hierarchy (Business Model, Architecture Decision Records, Database Schemas, API Specs, Security). Every time an agent modifies system behavior, it is required to update the corresponding document.
|
|
239
|
+
|
|
240
|
+
### How is this different from a system prompt?
|
|
241
|
+
A single giant prompt gets truncated and forgotten in long context windows. Agent Blueprint is a **modular, composable skill hierarchy**. The autonomous orchestrator activates only the skills required for the specific task at hand.
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## License
|
|
246
|
+
|
|
247
|
+
MIT © [BotDigit](https://botdigit.com) — see [LICENSE](LICENSE).
|
|
248
|
+
|
package/bin/cli.js
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const { execSync } = require('child_process');
|
|
6
|
+
|
|
7
|
+
const REPO_URL = 'https://github.com/botdigit-official/agent-blueprint.git';
|
|
8
|
+
const HOME_DIR = process.env.HOME || process.env.USERPROFILE;
|
|
9
|
+
const CACHE_DIR = path.join(HOME_DIR, '.agent-blueprint');
|
|
10
|
+
|
|
11
|
+
function printBanner() {
|
|
12
|
+
console.log('\x1b[36m=====================================================\x1b[0m');
|
|
13
|
+
console.log('\x1b[1m\x1b[33m 📐 Agent Blueprint — AI Agent Skills & Standards\x1b[0m');
|
|
14
|
+
console.log(' https://github.com/botdigit-official/agent-blueprint');
|
|
15
|
+
console.log('\x1b[36m=====================================================\x1b[0m\n');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function ensureCache() {
|
|
19
|
+
if (fs.existsSync(path.join(CACHE_DIR, '.git'))) {
|
|
20
|
+
try {
|
|
21
|
+
console.log('🔄 Fetching latest Agent Blueprint skills from GitHub...');
|
|
22
|
+
execSync('git pull --quiet origin main', { cwd: CACHE_DIR, stdio: 'ignore' });
|
|
23
|
+
} catch (_) {}
|
|
24
|
+
} else {
|
|
25
|
+
console.log('📥 Cloning Agent Blueprint into ~/.agent-blueprint...');
|
|
26
|
+
fs.mkdirSync(CACHE_DIR, { recursive: true });
|
|
27
|
+
execSync(`git clone --depth 1 ${REPO_URL} "${CACHE_DIR}" --quiet`, { stdio: 'inherit' });
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function cmdInit(targetDir = process.cwd(), tier = '3') {
|
|
32
|
+
printBanner();
|
|
33
|
+
ensureCache();
|
|
34
|
+
|
|
35
|
+
const fullTarget = path.resolve(targetDir);
|
|
36
|
+
console.log(`🎯 Initializing Agent Blueprint in: ${fullTarget}`);
|
|
37
|
+
|
|
38
|
+
// 1. Create .agents/skills and link skills
|
|
39
|
+
const destSkills = path.join(fullTarget, '.agents', 'skills');
|
|
40
|
+
fs.mkdirSync(destSkills, { recursive: true });
|
|
41
|
+
|
|
42
|
+
const srcSkills = path.join(CACHE_DIR, 'skills');
|
|
43
|
+
if (fs.existsSync(srcSkills)) {
|
|
44
|
+
const skills = fs.readdirSync(srcSkills);
|
|
45
|
+
for (const skill of skills) {
|
|
46
|
+
const srcSkillPath = path.join(srcSkills, skill);
|
|
47
|
+
const destSkillPath = path.join(destSkills, skill);
|
|
48
|
+
if (fs.statSync(srcSkillPath).isDirectory()) {
|
|
49
|
+
try {
|
|
50
|
+
if (fs.existsSync(destSkillPath)) fs.rmSync(destSkillPath, { recursive: true, force: true });
|
|
51
|
+
fs.symlinkSync(srcSkillPath, destSkillPath, 'dir');
|
|
52
|
+
} catch (_) {
|
|
53
|
+
fs.cpSync(srcSkillPath, destSkillPath, { recursive: true });
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// 2. Generate AGENTS.md
|
|
60
|
+
const agentsMdSrc = path.join(CACHE_DIR, 'AGENTS.md');
|
|
61
|
+
const agentsMdDest = path.join(fullTarget, 'AGENTS.md');
|
|
62
|
+
if (!fs.existsSync(agentsMdDest) && fs.existsSync(agentsMdSrc)) {
|
|
63
|
+
fs.copyFileSync(agentsMdSrc, agentsMdDest);
|
|
64
|
+
console.log('✅ Generated AGENTS.md (for Antigravity, Cline, Windsurf)');
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// 3. Generate CLAUDE.md (for Claude Code)
|
|
68
|
+
const claudeMdDest = path.join(fullTarget, 'CLAUDE.md');
|
|
69
|
+
if (!fs.existsSync(claudeMdDest)) {
|
|
70
|
+
const claudeContent = `# CLAUDE.md — Agent Blueprint for Claude Code
|
|
71
|
+
|
|
72
|
+
This project adheres to **Agent Blueprint** (https://github.com/botdigit-official/agent-blueprint).
|
|
73
|
+
|
|
74
|
+
## Core Rule
|
|
75
|
+
> The agent must adapt to the project. The project must not be forced to adapt to the skill.
|
|
76
|
+
|
|
77
|
+
## Required Lifecycle
|
|
78
|
+
1. Inspect before modifying: Check \`docs/\` and existing codebase structure.
|
|
79
|
+
2. Respect existing architecture, dependencies, and business state machines.
|
|
80
|
+
3. Every significant change must include automated tests and update \`docs/\`.
|
|
81
|
+
|
|
82
|
+
Refer to \`AGENTS.md\` and \`.agents/skills/\` for complete architectural guides.
|
|
83
|
+
`;
|
|
84
|
+
fs.writeFileSync(claudeMdDest, claudeContent, 'utf8');
|
|
85
|
+
console.log('✅ Generated CLAUDE.md (for Anthropic Claude Code)');
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// 4. Generate .cursorrules (for Cursor)
|
|
89
|
+
const cursorRulesDest = path.join(fullTarget, '.cursorrules');
|
|
90
|
+
if (!fs.existsSync(cursorRulesDest)) {
|
|
91
|
+
const cursorContent = `# .cursorrules — Agent Blueprint for Cursor
|
|
92
|
+
|
|
93
|
+
You are working in a repository managed under Agent Blueprint standards.
|
|
94
|
+
|
|
95
|
+
RULES:
|
|
96
|
+
1. Always inspect existing code, dependencies, and tests before writing or editing code.
|
|
97
|
+
2. Never invent or introduce unapproved external libraries without measurable justification.
|
|
98
|
+
3. Keep living documentation in 'docs/' in sync with your code changes.
|
|
99
|
+
4. Run existing test suites after every modification.
|
|
100
|
+
5. Refer to AGENTS.md and .agents/skills/ for the canonical skill workflow.
|
|
101
|
+
`;
|
|
102
|
+
fs.writeFileSync(cursorRulesDest, cursorContent, 'utf8');
|
|
103
|
+
console.log('✅ Generated .cursorrules (for Cursor AI)');
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// 5. Scaffold docs/ structure according to Tier
|
|
107
|
+
const docsDir = path.join(fullTarget, 'docs');
|
|
108
|
+
fs.mkdirSync(path.join(docsDir, '00-project'), { recursive: true });
|
|
109
|
+
fs.mkdirSync(path.join(docsDir, '01-business'), { recursive: true });
|
|
110
|
+
fs.mkdirSync(path.join(docsDir, '02-architecture'), { recursive: true });
|
|
111
|
+
fs.mkdirSync(path.join(docsDir, '03-engineering'), { recursive: true });
|
|
112
|
+
fs.mkdirSync(path.join(docsDir, '04-security'), { recursive: true });
|
|
113
|
+
fs.mkdirSync(path.join(docsDir, '05-testing'), { recursive: true });
|
|
114
|
+
fs.mkdirSync(path.join(docsDir, '08-operations'), { recursive: true });
|
|
115
|
+
|
|
116
|
+
console.log('✅ Scaffolded living documentation structure in docs/\n');
|
|
117
|
+
console.log('🎉 Setup complete! All AI tools (Antigravity, Claude Code, Cursor, Windsurf) are now aligned.');
|
|
118
|
+
console.log("👉 Tell your agent: 'Read AGENTS.md and start discovery'.\n");
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function cmdUpdate() {
|
|
122
|
+
printBanner();
|
|
123
|
+
ensureCache();
|
|
124
|
+
console.log('🔄 Pulling latest Agent Blueprint skills...');
|
|
125
|
+
try {
|
|
126
|
+
execSync('git pull origin main', { cwd: CACHE_DIR, stdio: 'inherit' });
|
|
127
|
+
console.log('✅ All skills successfully updated to the latest GitHub release.');
|
|
128
|
+
} catch (err) {
|
|
129
|
+
console.error('❌ Failed to update skills:', err.message);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function cmdStatus() {
|
|
134
|
+
printBanner();
|
|
135
|
+
if (fs.existsSync(path.join(CACHE_DIR, '.git'))) {
|
|
136
|
+
const commit = execSync('git log -1 --oneline', { cwd: CACHE_DIR }).toString().trim();
|
|
137
|
+
console.log(`📍 Local Cache: ${CACHE_DIR}`);
|
|
138
|
+
console.log(`📌 Latest Commit: ${commit}`);
|
|
139
|
+
} else {
|
|
140
|
+
console.log('⚠️ Agent Blueprint cache is not yet installed. Run "agent-blueprint init".');
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const args = process.argv.slice(2);
|
|
145
|
+
const command = args[0] || 'init';
|
|
146
|
+
|
|
147
|
+
switch (command) {
|
|
148
|
+
case 'init':
|
|
149
|
+
cmdInit(args[1]);
|
|
150
|
+
break;
|
|
151
|
+
case 'update':
|
|
152
|
+
cmdUpdate();
|
|
153
|
+
break;
|
|
154
|
+
case 'status':
|
|
155
|
+
cmdStatus();
|
|
156
|
+
break;
|
|
157
|
+
default:
|
|
158
|
+
console.log('Usage: agent-blueprint [init | update | status]');
|
|
159
|
+
process.exit(1);
|
|
160
|
+
}
|