@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
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Greenfield Workflow
|
|
2
|
+
|
|
3
|
+
## When to use
|
|
4
|
+
|
|
5
|
+
No existing code. Starting a project from scratch.
|
|
6
|
+
|
|
7
|
+
## Sequence
|
|
8
|
+
|
|
9
|
+
1. **Discover** — understand the domain, the actors, the business
|
|
10
|
+
2. **Architect** — choose architecture deliberately (not by default)
|
|
11
|
+
3. **Document foundations** — write PROJECT.md, ARCHITECTURE.md, the docs you will need
|
|
12
|
+
4. **Plan first increment** — what is the smallest useful version?
|
|
13
|
+
5. **Implement** — follow the architecture
|
|
14
|
+
6. **Test** — verify each increment
|
|
15
|
+
7. **Document** — update docs with what you built
|
|
16
|
+
|
|
17
|
+
## Rules
|
|
18
|
+
|
|
19
|
+
- Choose the simplest architecture that can work.
|
|
20
|
+
- Do not choose microservices by default.
|
|
21
|
+
- Do not choose a database by trend. Choose by fit.
|
|
22
|
+
- Do not add a framework you do not need.
|
|
23
|
+
- Every architectural decision gets an ADR.
|
|
24
|
+
- Set up documentation structure before writing code.
|
|
25
|
+
- Write tests alongside code, not after.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# 01-Discovery Skill
|
|
2
|
+
|
|
3
|
+
**Version:** 1.0.0
|
|
4
|
+
**Compatible:** project_skills >= 1.0
|
|
5
|
+
**Requires:** (none — this is the first skill)
|
|
6
|
+
**Outputs:** project-location.md, repository-map.md
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Purpose
|
|
11
|
+
|
|
12
|
+
Find the project within the repository. A repository may contain a single project at root, a monorepo, a partial project, or no code at all. Discovery locates what actually exists before anything else happens.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Process
|
|
17
|
+
|
|
18
|
+
### Step 1: Map the repository
|
|
19
|
+
|
|
20
|
+
List the top-level structure. Look for:
|
|
21
|
+
|
|
22
|
+
- Single project at root (most common)
|
|
23
|
+
- `apps/`, `services/`, `packages/`, `modules/` → monorepo
|
|
24
|
+
- `src/`, `app/`, `backend/`, `frontend/`, `api/` → separated concerns
|
|
25
|
+
- `docs/` only → documentation project, no code yet
|
|
26
|
+
- Nothing recognizable → may be a design or planning repo
|
|
27
|
+
|
|
28
|
+
### Step 2: Identify project boundaries
|
|
29
|
+
|
|
30
|
+
For monorepos, identify which sub-projects exist and which one the current task relates to.
|
|
31
|
+
|
|
32
|
+
For separated structures, identify frontend vs backend vs shared.
|
|
33
|
+
|
|
34
|
+
### Step 3: Record what is found
|
|
35
|
+
|
|
36
|
+
For each project or sub-project, record:
|
|
37
|
+
|
|
38
|
+
- Path
|
|
39
|
+
- What it appears to be (frontend, backend, worker, library, etc.)
|
|
40
|
+
- Any detection signals present (package.json, Cargo.toml, etc.)
|
|
41
|
+
- Whether code exists or only design/docs
|
|
42
|
+
|
|
43
|
+
### Step 4: Identify the target
|
|
44
|
+
|
|
45
|
+
Determine which project the current task applies to. If ambiguous, report the ambiguity rather than guessing.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Outputs
|
|
50
|
+
|
|
51
|
+
### project-location.md
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
Discovery Results
|
|
55
|
+
=================
|
|
56
|
+
Repository: [url or path]
|
|
57
|
+
Structure: [single | monorepo | separated | design-only | unknown]
|
|
58
|
+
Projects found:
|
|
59
|
+
- [path]: [type], [code: yes/no], [signals: ...]
|
|
60
|
+
Target project: [path or "not yet determined"]
|
|
61
|
+
Rationale: [why this target]
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### repository-map.md
|
|
65
|
+
|
|
66
|
+
A tree or list of the repository structure with annotations about what each directory appears to contain.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# 02-Project-Context Skill
|
|
2
|
+
|
|
3
|
+
**Version:** 1.0.0
|
|
4
|
+
**Compatible:** project_skills >= 1.0
|
|
5
|
+
**Requires:** discovery
|
|
6
|
+
**Outputs:** project-context.md
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Purpose
|
|
11
|
+
|
|
12
|
+
Build a structured understanding of the project's technology context: languages, frameworks, databases, infrastructure, and tooling. This is the input to stack skill selection.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Process
|
|
17
|
+
|
|
18
|
+
### 1. Detect programming language(s)
|
|
19
|
+
|
|
20
|
+
Inspect the signals listed in `00-orchestrator/SKILL.md` (Phase 2, Programming Language table). Record version if detectable:
|
|
21
|
+
- `package.json` → engine/node versions
|
|
22
|
+
- `Cargo.toml` → rust version in `[package]` orrust-toolchain file
|
|
23
|
+
- `go.mod` → go version directive
|
|
24
|
+
- `pom.xml` / `build.gradle` → java version
|
|
25
|
+
- `Gemfile` → ruby version
|
|
26
|
+
- `*.csproj` → target framework
|
|
27
|
+
- `pyproject.toml` / `requirements.txt` → python version
|
|
28
|
+
|
|
29
|
+
### 2. Detect framework(s) and version
|
|
30
|
+
|
|
31
|
+
Inspect signals from the Framework table. Record major version if detectable.
|
|
32
|
+
|
|
33
|
+
### 3. Detect database and data stores
|
|
34
|
+
|
|
35
|
+
- Primary database (from config, env, connection strings, migrations)
|
|
36
|
+
- Secondary stores (cache, queue, search, blob storage)
|
|
37
|
+
- ORM or query builder in use
|
|
38
|
+
- Migration system
|
|
39
|
+
|
|
40
|
+
### 4. Detect infrastructure and deployment
|
|
41
|
+
|
|
42
|
+
- Containerization (Docker, none)
|
|
43
|
+
- Orchestration (Kubernetes, none, platform-managed)
|
|
44
|
+
- Hosting platform (Vercel, Netlify, AWS, GCP, Azure, bare metal, unknown)
|
|
45
|
+
- CI/CD system and outline
|
|
46
|
+
- Environment configuration pattern (.env, config files, secrets manager)
|
|
47
|
+
|
|
48
|
+
### 5. Detect third-party services
|
|
49
|
+
|
|
50
|
+
- Auth provider
|
|
51
|
+
- Payment provider
|
|
52
|
+
- Email / notification
|
|
53
|
+
- Storage (S3, Cloudflare R2, etc.)
|
|
54
|
+
- Monitoring / observability
|
|
55
|
+
- CDN
|
|
56
|
+
- Any API integrations mentioned in code or docs
|
|
57
|
+
|
|
58
|
+
### 6. Record what is NOT detectable
|
|
59
|
+
|
|
60
|
+
If something cannot be detected from available signals, record "not detectable from current evidence" rather than guessing.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Output
|
|
65
|
+
|
|
66
|
+
### project-context.md
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
Project Context
|
|
70
|
+
===============
|
|
71
|
+
Language: [language] [version if known]
|
|
72
|
+
Framework: [framework] [version if known]
|
|
73
|
+
Frontend: [framework or "none"]
|
|
74
|
+
Backend: [framework or "none"]
|
|
75
|
+
Database: [database] [version if known]
|
|
76
|
+
ORM: [orm or "none"]
|
|
77
|
+
Cache: [redis/none/unknown]
|
|
78
|
+
Queue: [system or "none"]
|
|
79
|
+
Search: [engine or "none"]
|
|
80
|
+
Storage: [system or "none"]
|
|
81
|
+
Infrastructure: [docker/k8s/platform/unknown]
|
|
82
|
+
Deployment: [platform or "unknown"]
|
|
83
|
+
CI/CD: [system or "none"]
|
|
84
|
+
Environment: [dotenv/config/secrets-manager/unknown]
|
|
85
|
+
Third-party services:
|
|
86
|
+
- [service]: [purpose]
|
|
87
|
+
- ...
|
|
88
|
+
Not detectable: [list of things that could not be determined]
|
|
89
|
+
```
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
# 03-Business-Architecture Skill
|
|
2
|
+
|
|
3
|
+
**Version:** 1.0.0
|
|
4
|
+
**Compatible:** project_skills >= 1.0
|
|
5
|
+
**Requires:** discovery, project-context
|
|
6
|
+
**Outputs:** business-model.md, actors.md, business-rules.md, workflows.md, state-machines.md (as applicable)
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Purpose
|
|
11
|
+
|
|
12
|
+
Understand the business before touching code. This skill directs the agent to discover and document what the project does, who it is for, what rules govern it, and how it works — as a business system, not as code.
|
|
13
|
+
|
|
14
|
+
Business logic comes before code structure.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Process
|
|
19
|
+
|
|
20
|
+
### 1. Identify the actors
|
|
21
|
+
|
|
22
|
+
Who interacts with this system?
|
|
23
|
+
|
|
24
|
+
- End users (what kind?)
|
|
25
|
+
- Administrators
|
|
26
|
+
- Customers
|
|
27
|
+
- Sellers / providers
|
|
28
|
+
- Visitors (unauthenticated)
|
|
29
|
+
- System actors (cron, webhooks, integrations)
|
|
30
|
+
- Third-party systems
|
|
31
|
+
|
|
32
|
+
For each actor, record:
|
|
33
|
+
- Who they are
|
|
34
|
+
- What they can do
|
|
35
|
+
- What they can see
|
|
36
|
+
- What they cannot do
|
|
37
|
+
|
|
38
|
+
### 2. Identify the business model
|
|
39
|
+
|
|
40
|
+
How does this project create or capture value?
|
|
41
|
+
|
|
42
|
+
- What is being sold, provided, or tracked?
|
|
43
|
+
- Is it a product, service, marketplace, platform, tool?
|
|
44
|
+
- What is the unit of transaction?
|
|
45
|
+
- Is there pricing? How does it work?
|
|
46
|
+
- Is there revenue? From what?
|
|
47
|
+
- Is there a free tier, trial, or alternative access model?
|
|
48
|
+
|
|
49
|
+
If pricing exists, find the single source of truth for it. If pricing is scattered across code, flags, spreadsheets, and hardcoded values — record that as a finding, not a normal state.
|
|
50
|
+
|
|
51
|
+
### 3. Identify business entities
|
|
52
|
+
|
|
53
|
+
What are the core things the business tracks?
|
|
54
|
+
|
|
55
|
+
Examples: User, Account, Product, Listing, Order, Payment, Subscription, Scan, Report, Document, Invoice, Credential.
|
|
56
|
+
|
|
57
|
+
For each entity, record:
|
|
58
|
+
- What it represents
|
|
59
|
+
- What data it holds
|
|
60
|
+
- Who owns it
|
|
61
|
+
- What creates it
|
|
62
|
+
- What modifies it
|
|
63
|
+
- What deletes it (if anything)
|
|
64
|
+
- What its lifecycle is
|
|
65
|
+
|
|
66
|
+
### 4. Identify business processes
|
|
67
|
+
|
|
68
|
+
What does the business actually do, step by step?
|
|
69
|
+
|
|
70
|
+
For each process:
|
|
71
|
+
- Who initiates it
|
|
72
|
+
- What happens at each step
|
|
73
|
+
- What data changes
|
|
74
|
+
- What can go wrong
|
|
75
|
+
- What happens when it fails
|
|
76
|
+
- Who is notified
|
|
77
|
+
- What the end state is
|
|
78
|
+
|
|
79
|
+
### 5. Identify business rules
|
|
80
|
+
|
|
81
|
+
What are the constraints the business operates under?
|
|
82
|
+
|
|
83
|
+
Record rules in this form:
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
RULE: [description]
|
|
87
|
+
IF [condition]
|
|
88
|
+
THEN [outcome]
|
|
89
|
+
EXCEPT [exceptions]
|
|
90
|
+
NEVER [what must not happen]
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Examples of rule categories:
|
|
94
|
+
- Authorization (who can do what)
|
|
95
|
+
- Validation (what data is acceptable)
|
|
96
|
+
- State transitions (what can change to what)
|
|
97
|
+
- Pricing rules (how prices are calculated)
|
|
98
|
+
- Access rules (who can see what)
|
|
99
|
+
- Compliance rules (what must be preserved, retained, or restricted)
|
|
100
|
+
- Integrity rules (what must never be inconsistent)
|
|
101
|
+
|
|
102
|
+
### 6. Identify state machines
|
|
103
|
+
|
|
104
|
+
What entities have a lifecycle with distinct states?
|
|
105
|
+
|
|
106
|
+
For each state machine:
|
|
107
|
+
- What entity
|
|
108
|
+
- What states
|
|
109
|
+
- What transitions are allowed
|
|
110
|
+
- What triggers each transition
|
|
111
|
+
- What is validated before each transition
|
|
112
|
+
- What happens after each transition
|
|
113
|
+
- What states are terminal
|
|
114
|
+
|
|
115
|
+
### 7. Identify edge cases and exceptional flows
|
|
116
|
+
|
|
117
|
+
What happens when:
|
|
118
|
+
- A payment fails?
|
|
119
|
+
- A user is banned?
|
|
120
|
+
- Data is missing?
|
|
121
|
+
- A third-party service is down?
|
|
122
|
+
- A race condition occurs?
|
|
123
|
+
- A user tries to do something they should not?
|
|
124
|
+
- The same action is performed twice?
|
|
125
|
+
|
|
126
|
+
### 8. Identify domain boundaries
|
|
127
|
+
|
|
128
|
+
Where does one domain end and another begin?
|
|
129
|
+
|
|
130
|
+
- What data belongs to what subsystem?
|
|
131
|
+
- What cross-domain interactions exist?
|
|
132
|
+
- What integrations cross boundaries?
|
|
133
|
+
- What should NOT cross boundaries?
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Reasoning Questions
|
|
138
|
+
|
|
139
|
+
The agent must be able to answer these before implementing business logic changes:
|
|
140
|
+
|
|
141
|
+
- WHO performs this action?
|
|
142
|
+
- WHAT does the action do?
|
|
143
|
+
- WHY does it exist?
|
|
144
|
+
- WHEN does it run?
|
|
145
|
+
- UNDER WHAT CONDITIONS?
|
|
146
|
+
- WHAT CAN CHANGE?
|
|
147
|
+
- WHAT MUST NEVER CHANGE?
|
|
148
|
+
- WHO OWNS THE DATA?
|
|
149
|
+
- WHO CAN PERFORM THE ACTION?
|
|
150
|
+
- WHAT HAPPENS WHEN IT FAILS?
|
|
151
|
+
- WHAT IS THE WORST CASE?
|
|
152
|
+
- WHAT IS THE COST OF BEING WRONG?
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Output
|
|
157
|
+
|
|
158
|
+
### business-model.md
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
Business Model
|
|
162
|
+
==============
|
|
163
|
+
What this project does: [description]
|
|
164
|
+
Value proposition: [what value is created]
|
|
165
|
+
Revenue model: [how money flows, or "not applicable"]
|
|
166
|
+
Pricing: [how pricing works, or "not applicable"]
|
|
167
|
+
Single source of truth for pricing: [location or "MISSING"]
|
|
168
|
+
Core entities: [list]
|
|
169
|
+
Actors: [list with brief description]
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### actors.md
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
Actors
|
|
176
|
+
======
|
|
177
|
+
[For each actor:]
|
|
178
|
+
- Name: [actor name]
|
|
179
|
+
- Type: [user | admin | system | third-party | ...]
|
|
180
|
+
- Can do: [actions]
|
|
181
|
+
- Can see: [data]
|
|
182
|
+
- Cannot do: [restricted actions]
|
|
183
|
+
- Authentication: [how this actor is authenticated]
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### business-rules.md
|
|
187
|
+
|
|
188
|
+
```
|
|
189
|
+
Business Rules
|
|
190
|
+
==============
|
|
191
|
+
[For each rule:]
|
|
192
|
+
ID: [BR-001]
|
|
193
|
+
Category: [authorization | validation | pricing | state | access | compliance | integrity]
|
|
194
|
+
Rule: [description]
|
|
195
|
+
Condition: [when it applies]
|
|
196
|
+
Outcome: [what happens]
|
|
197
|
+
Exception: [exceptions]
|
|
198
|
+
Invariant: [what must never happen]
|
|
199
|
+
Source: [where this rule is implemented or documented]
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### workflows.md
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
Workflows
|
|
206
|
+
=========
|
|
207
|
+
[For each workflow:]
|
|
208
|
+
Name: [workflow name]
|
|
209
|
+
Actor: [who initiates]
|
|
210
|
+
Steps:
|
|
211
|
+
1. [step description]
|
|
212
|
+
- Data changes: [what changes]
|
|
213
|
+
- Failures: [what happens on failure]
|
|
214
|
+
2. ...
|
|
215
|
+
End state: [final state]
|
|
216
|
+
Error handling: [how errors are handled]
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### state-machines.md
|
|
220
|
+
|
|
221
|
+
```
|
|
222
|
+
State Machines
|
|
223
|
+
==============
|
|
224
|
+
[For each state machine:]
|
|
225
|
+
Entity: [entity name]
|
|
226
|
+
States: [list]
|
|
227
|
+
Transitions:
|
|
228
|
+
[state A] → [state B]: [trigger], [validation], [side effects]
|
|
229
|
+
...
|
|
230
|
+
Terminal states: [list]
|
|
231
|
+
```
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# 04-Architecture Skill
|
|
2
|
+
|
|
3
|
+
**Version:** 1.0.0
|
|
4
|
+
**Compatible:** project_skills >= 1.0
|
|
5
|
+
**Requires:** discovery, project-context, business-architecture
|
|
6
|
+
**Outputs:** architecture.md, architecture-gaps.md, decisions/ADR-XXX.md
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Purpose
|
|
11
|
+
|
|
12
|
+
Understand, review, and document the project's architecture. This skill directs the agent to assess the existing architecture (if any), identify gaps, and make or record architectural decisions with reasoning.
|
|
13
|
+
|
|
14
|
+
Every architectural decision needs a reason.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Process
|
|
19
|
+
|
|
20
|
+
### 1. Map the current architecture
|
|
21
|
+
|
|
22
|
+
Identify:
|
|
23
|
+
- High-level components and their responsibilities
|
|
24
|
+
- How components communicate (HTTP, queues, shared DB, events, in-process)
|
|
25
|
+
- Data flow between components
|
|
26
|
+
- Boundaries between subsystems
|
|
27
|
+
- Deployment topology (processes, services, instances)
|
|
28
|
+
- External dependencies
|
|
29
|
+
|
|
30
|
+
### 2. Assess architectural style
|
|
31
|
+
|
|
32
|
+
Determine what style the project uses or should use:
|
|
33
|
+
|
|
34
|
+
- Modular monolith
|
|
35
|
+
- Microservices
|
|
36
|
+
- Serverless functions
|
|
37
|
+
- Single process
|
|
38
|
+
- Client-server
|
|
39
|
+
- Event-driven
|
|
40
|
+
- Layered
|
|
41
|
+
- Hexagonal / ports and adapters
|
|
42
|
+
- Other
|
|
43
|
+
|
|
44
|
+
Record why this style was chosen (or note "not documented" if unknown).
|
|
45
|
+
|
|
46
|
+
### 3. Evaluate against principles
|
|
47
|
+
|
|
48
|
+
For each component and interaction, ask:
|
|
49
|
+
- Is this the simplest thing that can work?
|
|
50
|
+
- Is this component's responsibility clear and focused?
|
|
51
|
+
- Are boundaries well-defined?
|
|
52
|
+
- Is the data flow understandable?
|
|
53
|
+
- Are dependencies justified?
|
|
54
|
+
- Is this architecture appropriate for the project's scale and team?
|
|
55
|
+
- Does it match the business domain?
|
|
56
|
+
|
|
57
|
+
### 4. Identify gaps
|
|
58
|
+
|
|
59
|
+
Record gaps in these categories:
|
|
60
|
+
- Missing documentation
|
|
61
|
+
- Unclear boundaries
|
|
62
|
+
- Hidden coupling
|
|
63
|
+
- Missing error handling strategy
|
|
64
|
+
- Missing observability
|
|
65
|
+
- Missing security boundaries
|
|
66
|
+
- Scaling bottlenecks
|
|
67
|
+
- Technology choices that no longer fit
|
|
68
|
+
- Missing backward compatibility strategy
|
|
69
|
+
- Missing migration strategy for data or schema
|
|
70
|
+
|
|
71
|
+
### 5. Make or record decisions
|
|
72
|
+
|
|
73
|
+
Every architectural decision that is not already documented must be recorded as an ADR. See `templates/adr/`.
|
|
74
|
+
|
|
75
|
+
An ADR must contain:
|
|
76
|
+
- Title
|
|
77
|
+
- Status (proposed, accepted, deprecated, superseded)
|
|
78
|
+
- Context: what problem this decision addresses
|
|
79
|
+
- Decision: what was decided
|
|
80
|
+
- Consequences: what this decision implies (positive and negative)
|
|
81
|
+
- Alternatives considered: what else was considered and why it was not chosen
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Architecture Assessment Questions
|
|
86
|
+
|
|
87
|
+
- What is the simplest architecture that satisfies the business requirements?
|
|
88
|
+
- Are we over-engineering? Under-engineering?
|
|
89
|
+
- Does the architecture match the team's ability to maintain it?
|
|
90
|
+
- Can we deploy independently where it matters?
|
|
91
|
+
- Are there single points of failure?
|
|
92
|
+
- Is data integrity protected across component boundaries?
|
|
93
|
+
- Can we reason about the system? If not, why?
|
|
94
|
+
- Are there components that do too much? Too little?
|
|
95
|
+
- Are there circular dependencies?
|
|
96
|
+
- Is the dependency direction correct (dependencies point toward stability)?
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Output
|
|
101
|
+
|
|
102
|
+
### architecture.md
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
Architecture
|
|
106
|
+
============
|
|
107
|
+
Style: [architectural style]
|
|
108
|
+
Rationale: [why this style, or "not documented"]
|
|
109
|
+
Components:
|
|
110
|
+
- [name]: [responsibility], [communicates with: ...]
|
|
111
|
+
Data flow: [description or diagram]
|
|
112
|
+
Deployment: [how it runs]
|
|
113
|
+
External dependencies: [list]
|
|
114
|
+
Boundaries:
|
|
115
|
+
- [boundary description]
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### architecture-gaps.md
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
Architecture Gaps
|
|
122
|
+
=================
|
|
123
|
+
[Gap ID]: [description]
|
|
124
|
+
Severity: [low | medium | high | critical]
|
|
125
|
+
Impact: [what this gap causes]
|
|
126
|
+
Recommendation: [what to do]
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### decisions/
|
|
130
|
+
|
|
131
|
+
Each ADR as a separate file. Use `templates/adr/` as the template.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# 05-Documentation Skill
|
|
2
|
+
|
|
3
|
+
**Version:** 1.0.0
|
|
4
|
+
**Compatible:** project_skills >= 1.0
|
|
5
|
+
**Requires:** discovery
|
|
6
|
+
**Outputs:** documentation-map.md, and any documents from templates/ as appropriate
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Purpose
|
|
11
|
+
|
|
12
|
+
Establish and maintain living documentation for the project. Every agent must leave the project better documented than it found it.
|
|
13
|
+
|
|
14
|
+
Documentation is not a one-time task. It is a continuous obligation.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Principle: Minimum Sufficient Documentation
|
|
19
|
+
|
|
20
|
+
Do not create every document. Create the minimum set that allows a person (or agent) to understand, operate, maintain, and safely change the project.
|
|
21
|
+
|
|
22
|
+
### Documentation Tiers
|
|
23
|
+
|
|
24
|
+
| Tier | Project Type | Documents |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| 1 — Minimal | Script, small tool, simple service | README.md |
|
|
27
|
+
| 2 — Standard | Small web app, API, internal tool | README + PROJECT + ARCHITECTURE + DATABASE + API + SECURITY |
|
|
28
|
+
| 3 — Full | SaaS, marketplace, commercial product | Tier 2 + BUSINESS + BUSINESS-MODEL + ACTORS + TESTING + DEPLOYMENT + OPERATIONS |
|
|
29
|
+
| 4 — Regulated | System with compliance, audit, or data governance requirements | Tier 3 + COMPLIANCE + AUDIT + DATA-GOVERNANCE + DISASTER-RECOVERY |
|
|
30
|
+
|
|
31
|
+
The orchestrator selects the tier. Within a tier, use judgment — a simple SaaS may not need all of Tier 3 immediately.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Documentation Standard
|
|
36
|
+
|
|
37
|
+
Every project using Agent Blueprint should follow this documentation structure:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
docs/
|
|
41
|
+
├── 00-project/
|
|
42
|
+
│ ├── overview.md # What this project is
|
|
43
|
+
│ ├── goals.md # Why it exists, what it aims to achieve
|
|
44
|
+
│ ├── scope.md # What is in scope and out of scope
|
|
45
|
+
│ └── glossary.md # Domain terms
|
|
46
|
+
│
|
|
47
|
+
├── 01-business/
|
|
48
|
+
│ ├── business-model.md
|
|
49
|
+
│ ├── actors.md
|
|
50
|
+
│ ├── processes.md
|
|
51
|
+
│ ├── business-rules.md
|
|
52
|
+
│ └── state-machines.md
|
|
53
|
+
│
|
|
54
|
+
├── 02-architecture/
|
|
55
|
+
│ ├── architecture.md
|
|
56
|
+
│ ├── domains.md
|
|
57
|
+
│ ├── data-flow.md
|
|
58
|
+
│ ├── integrations.md
|
|
59
|
+
│ └── decisions/ # ADRs
|
|
60
|
+
│
|
|
61
|
+
├── 03-engineering/
|
|
62
|
+
│ ├── code-structure.md
|
|
63
|
+
│ ├── database.md
|
|
64
|
+
│ ├── api.md
|
|
65
|
+
│ └── frontend.md
|
|
66
|
+
│
|
|
67
|
+
├── 04-security/
|
|
68
|
+
│ └── security.md
|
|
69
|
+
│
|
|
70
|
+
├── 05-testing/
|
|
71
|
+
│ └── testing.md
|
|
72
|
+
│
|
|
73
|
+
├── 06-performance/
|
|
74
|
+
│ └── performance.md
|
|
75
|
+
│
|
|
76
|
+
├── 07-deployment/
|
|
77
|
+
│ └── deployment.md
|
|
78
|
+
│
|
|
79
|
+
├── 08-operations/
|
|
80
|
+
│ └── operations.md
|
|
81
|
+
│
|
|
82
|
+
├── 09-audits/
|
|
83
|
+
│ └── [audit reports]
|
|
84
|
+
│
|
|
85
|
+
└── 10-roadmap/
|
|
86
|
+
└── roadmap.md
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Not every project needs every directory. Create only what applies.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Documentation Rules
|
|
94
|
+
|
|
95
|
+
1. Documentation lives in `docs/` or at the project root for top-level files (README, PROJECT.md, etc.).
|
|
96
|
+
2. Every document has a last-reviewed date and reviewer.
|
|
97
|
+
3. Every document that describes behavior must be updateable by the agent that changes the behavior.
|
|
98
|
+
4. If code and documentation disagree, the agent must resolve the disagreement — not assume the documentation is wrong.
|
|
99
|
+
5. Outdated documentation is worse than no documentation. When in doubt, update or remove.
|
|
100
|
+
6. Do not duplicate information across documents. Reference instead.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## What Every Agent Must Update
|
|
105
|
+
|
|
106
|
+
After making changes, the agent must verify:
|
|
107
|
+
|
|
108
|
+
- [ ] README.md reflects the current state
|
|
109
|
+
- [ ] Any architecture change is reflected in architecture docs
|
|
110
|
+
- [ ] Any business logic change is reflected in business docs
|
|
111
|
+
- [ ] Any new API is documented
|
|
112
|
+
- [ ] Any new database schema is documented
|
|
113
|
+
- [ ] Security-relevant changes are flagged
|
|
114
|
+
- [ ] Changelog is updated
|
|
115
|
+
- [ ] New dependencies are justified
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Output
|
|
120
|
+
|
|
121
|
+
### documentation-map.md
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
Documentation Map
|
|
125
|
+
=================
|
|
126
|
+
Tier: [1 | 2 | 3 | 4]
|
|
127
|
+
Documents:
|
|
128
|
+
- [path]: [status: present | missing | outdated], [last reviewed]
|
|
129
|
+
Gaps:
|
|
130
|
+
- [document that should exist but does not]
|
|
131
|
+
Outdated:
|
|
132
|
+
- [document that exists but is outdated]
|
|
133
|
+
```
|