claude-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/.claude-plugin/plugin.json +26 -0
- package/LICENSE +21 -0
- package/README.md +387 -0
- package/agents/adr-architect-cartographer.md +179 -0
- package/agents/adr-bug-surface-mapper.md +154 -0
- package/agents/adr-compliance-auditor.md +146 -0
- package/agents/adr-consistency-auditor.md +131 -0
- package/agents/adr-conways-law-analyzer.md +170 -0
- package/agents/adr-devils-advocate.md +161 -0
- package/agents/adr-impact-analyzer.md +135 -0
- package/agents/adr-maintainability-assessor.md +162 -0
- package/agents/adr-researcher.md +134 -0
- package/agents/adr-retrospective.md +204 -0
- package/agents/adr-testing-strategy-evaluator.md +164 -0
- package/agents/persona.md +36 -0
- package/bin/cli.js +33 -0
- package/commands/architect.md +66 -0
- package/commands/audit.md +41 -0
- package/commands/blueprint.md +63 -0
- package/commands/debt.md +102 -0
- package/commands/digest.md +106 -0
- package/commands/drift.md +104 -0
- package/commands/eli5.md +149 -0
- package/commands/evaluate.md +61 -0
- package/commands/fitness.md +119 -0
- package/commands/guard.md +102 -0
- package/commands/health.md +139 -0
- package/commands/help.md +119 -0
- package/commands/hooks.md +131 -0
- package/commands/impact.md +38 -0
- package/commands/init.md +229 -0
- package/commands/list.md +51 -0
- package/commands/new.md +74 -0
- package/commands/rearchitect.md +45 -0
- package/commands/retro.md +50 -0
- package/commands/review.md +50 -0
- package/commands/search.md +28 -0
- package/commands/status.md +189 -0
- package/commands/timeline.md +113 -0
- package/commands/transition.md +83 -0
- package/config/lifecycle.toml +71 -0
- package/config/relationships.toml +22 -0
- package/config/state.toml +21 -0
- package/config/taxonomy.toml +118 -0
- package/package.json +27 -0
- package/src/claude-md.js +57 -0
- package/src/install.js +83 -0
- package/src/paths.js +25 -0
- package/src/verify.js +95 -0
package/commands/init.md
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: blueprint:init
|
|
3
|
+
description: >
|
|
4
|
+
Bootstrap blueprint onto an existing codebase. Scans for existing architecture context
|
|
5
|
+
(.planning/, .research/, CLAUDE.md, existing code, git history), creates the ADR directory
|
|
6
|
+
with template and lifecycle docs, infers ADRs from discovered decisions, and generates
|
|
7
|
+
ARCHITECTURE.md. Use when: starting blueprint on a new project, "init blueprint",
|
|
8
|
+
"bootstrap adrs", "set up architecture docs", "onboard blueprint", or first time using
|
|
9
|
+
blueprint in a project.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Initialize Blueprint
|
|
13
|
+
|
|
14
|
+
Bootstraps the full blueprint documentation system onto an existing codebase. Scans every
|
|
15
|
+
available source of architectural context and produces:
|
|
16
|
+
|
|
17
|
+
1. **ADR directory** with template, lifecycle README, and index
|
|
18
|
+
2. **Inferred ADRs** from existing decisions found in the codebase
|
|
19
|
+
3. **ARCHITECTURE.md** via the architect-cartographer agent
|
|
20
|
+
4. **Populated config** (state.toml with detected paths, relationships.toml seeded)
|
|
21
|
+
|
|
22
|
+
This is a one-time setup command. If `docs/adr/` already exists with ADRs, suggest
|
|
23
|
+
`/blueprint:help` instead.
|
|
24
|
+
|
|
25
|
+
## Process
|
|
26
|
+
|
|
27
|
+
### Step 1: Detect Existing Context
|
|
28
|
+
|
|
29
|
+
Scan the project root for every source of architectural decisions. Cast a wide net —
|
|
30
|
+
the goal is to find decisions that were made but never formally documented.
|
|
31
|
+
|
|
32
|
+
**Scan these locations (in order of richness):**
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
.planning/PROJECT.md — GSD project context, key decisions table
|
|
36
|
+
.planning/REQUIREMENTS.md — what was scoped in/out and why
|
|
37
|
+
.planning/ROADMAP.md — phase structure decisions
|
|
38
|
+
.planning/research/ — STACK.md, ARCHITECTURE.md, FEATURES.md, PITFALLS.md
|
|
39
|
+
.planning/STATE.md — current project state
|
|
40
|
+
.planning/config.json — workflow preferences (tech stack, parallelization)
|
|
41
|
+
CLAUDE.md — project conventions, constraints, stack
|
|
42
|
+
README.md — project description, sometimes tech choices
|
|
43
|
+
docs/ — any existing architecture docs
|
|
44
|
+
package.json / pyproject.toml / go.mod / Cargo.toml — tech stack, dependencies
|
|
45
|
+
docker-compose.yml / Dockerfile — deployment decisions
|
|
46
|
+
.env.example — configuration approach
|
|
47
|
+
tsconfig.json / .eslintrc — tooling decisions
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**From git history:**
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# Key decisions often in early commits
|
|
54
|
+
git log --oneline --reverse | head -30
|
|
55
|
+
|
|
56
|
+
# Commit messages mentioning "choose", "switch to", "use", "adopt", "replace"
|
|
57
|
+
git log --oneline --all --grep="choose\|switch to\|adopt\|replace\|migrate" | head -20
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
For each source found, extract:
|
|
61
|
+
- What decision was made (technology, pattern, boundary, constraint)
|
|
62
|
+
- Why (if documented — rationale, trade-offs)
|
|
63
|
+
- When (commit date or file date)
|
|
64
|
+
- What alternatives were considered (if documented)
|
|
65
|
+
|
|
66
|
+
### Step 2: Classify Discovered Decisions
|
|
67
|
+
|
|
68
|
+
Group discovered decisions into categories from `config/taxonomy.toml`:
|
|
69
|
+
|
|
70
|
+
- Technology Choice (stack, database, framework, libraries)
|
|
71
|
+
- Architecture Pattern (monolith/microservice, API style, data flow)
|
|
72
|
+
- Data Model (schema decisions, storage strategy)
|
|
73
|
+
- Deployment Strategy (containerization, hosting, CI/CD)
|
|
74
|
+
- Authentication / Authorization (auth approach, deferred or implemented)
|
|
75
|
+
- Testing Strategy (framework choice, coverage approach)
|
|
76
|
+
- Process / Workflow (coding conventions, branching strategy)
|
|
77
|
+
- Integration Strategy (external APIs, data sources)
|
|
78
|
+
- Out-of-scope decisions (explicit exclusions with reasoning)
|
|
79
|
+
|
|
80
|
+
**Prioritize by impact:** High-impact decisions that constrain future work get ADRs first.
|
|
81
|
+
Low-impact decisions (linter config, date formatting library) get skipped.
|
|
82
|
+
|
|
83
|
+
### Step 3: Present Discovery Report
|
|
84
|
+
|
|
85
|
+
Before creating anything, present what was found to the user:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
89
|
+
BLUEPRINT ► INITIALIZATION
|
|
90
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
91
|
+
|
|
92
|
+
## Context Discovered
|
|
93
|
+
|
|
94
|
+
| Source | Found | Decisions Extracted |
|
|
95
|
+
|--------|-------|-------------------|
|
|
96
|
+
| .planning/PROJECT.md | Yes/No | [N] |
|
|
97
|
+
| .planning/research/ | Yes/No | [N] |
|
|
98
|
+
| CLAUDE.md | Yes/No | [N] |
|
|
99
|
+
| package.json | Yes/No | [N] |
|
|
100
|
+
| git history | Yes/No | [N] |
|
|
101
|
+
| ... | ... | ... |
|
|
102
|
+
|
|
103
|
+
## Proposed ADRs ([N] total)
|
|
104
|
+
|
|
105
|
+
| # | Title | Source | Category |
|
|
106
|
+
|---|-------|--------|----------|
|
|
107
|
+
| 0001 | Use ADRs for architectural decisions | (meta) | Process |
|
|
108
|
+
| 0002 | [inferred decision] | [source file] | [category] |
|
|
109
|
+
| 0003 | [inferred decision] | [source file] | [category] |
|
|
110
|
+
| ... | ... | ... | ... |
|
|
111
|
+
|
|
112
|
+
## Will Also Create
|
|
113
|
+
|
|
114
|
+
- docs/adr/README.md — lifecycle documentation and index
|
|
115
|
+
- docs/adr/template.md — ADR template
|
|
116
|
+
- docs/ARCHITECTURE.md — bird's-eye codemap (via architect agent)
|
|
117
|
+
- config/state.toml — populated with detected paths
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Ask the user:
|
|
121
|
+
- "Create all proposed ADRs?" / "Let me pick" / "Adjust"
|
|
122
|
+
- If "Let me pick" — present list with checkboxes
|
|
123
|
+
- If "Adjust" — let user add, remove, or modify proposed ADRs
|
|
124
|
+
|
|
125
|
+
### Step 4: Create ADR Directory Structure
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
mkdir -p docs/adr
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Write `docs/adr/template.md` — the standard ADR template with Metadata table, Context,
|
|
132
|
+
Options Considered, Decision (Alexandrian prologue), Rationale, Consequences, References.
|
|
133
|
+
|
|
134
|
+
Write `docs/adr/README.md` — lifecycle documentation with:
|
|
135
|
+
- State machine diagram (Proposed → Accepted/Rejected/Deferred → Deprecated/Superseded)
|
|
136
|
+
- Status definitions and transition rules
|
|
137
|
+
- File naming convention (NNNN-kebab-case-title.md)
|
|
138
|
+
- Principles (one decision per ADR, immutable history, honest consequences)
|
|
139
|
+
- Index table (initially populated with the ADRs about to be created)
|
|
140
|
+
|
|
141
|
+
### Step 5: Generate ADRs
|
|
142
|
+
|
|
143
|
+
For each approved ADR:
|
|
144
|
+
|
|
145
|
+
1. Write the ADR file: `docs/adr/NNNN-title.md`
|
|
146
|
+
2. Status: `Accepted` (these are decisions already in effect, not proposals)
|
|
147
|
+
3. Context: extracted from the source where the decision was found
|
|
148
|
+
4. Options Considered: if the source documented alternatives, include them.
|
|
149
|
+
If not, include at minimum the chosen option and "Status quo / do nothing"
|
|
150
|
+
5. Decision: Alexandrian prologue format
|
|
151
|
+
6. Consequences: infer from what's observable in the codebase
|
|
152
|
+
7. References: link to the source file where the decision was found
|
|
153
|
+
|
|
154
|
+
**ADR-0001 is always "Use ADRs for architectural decisions"** — the meta-ADR that
|
|
155
|
+
establishes the process. Include it automatically.
|
|
156
|
+
|
|
157
|
+
**Quality bar:** Even inferred ADRs must have real context and consequences. Don't
|
|
158
|
+
generate vacuous ADRs like "Use JavaScript" with no context. If a decision is too
|
|
159
|
+
trivial to have meaningful context, skip it.
|
|
160
|
+
|
|
161
|
+
### Step 6: Generate ARCHITECTURE.md
|
|
162
|
+
|
|
163
|
+
After ADRs are written, spawn the architect-cartographer agent to generate
|
|
164
|
+
`docs/ARCHITECTURE.md`:
|
|
165
|
+
|
|
166
|
+
- Read `agents/adr-architect-cartographer.md` and `agents/persona.md`
|
|
167
|
+
- Spawn with: project root, ADR directory, list of newly created ADR filenames
|
|
168
|
+
- The agent produces the codemap, invariants (from the new ADRs), and cross-cutting concerns
|
|
169
|
+
|
|
170
|
+
### Step 7: Populate Config
|
|
171
|
+
|
|
172
|
+
Update `config/state.toml`:
|
|
173
|
+
- Set `adr_directory` to the detected/created path
|
|
174
|
+
- Set `project_root` to the current working directory
|
|
175
|
+
- Set `last_adr_created` to today
|
|
176
|
+
|
|
177
|
+
Seed `config/relationships.toml` with nodes for all created ADRs.
|
|
178
|
+
|
|
179
|
+
### Step 8: Commit
|
|
180
|
+
|
|
181
|
+
Commit all created files in a single atomic commit:
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
docs: initialize blueprint — [N] ADRs, ARCHITECTURE.md, lifecycle docs
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Include: all ADR files, README.md, template.md, ARCHITECTURE.md.
|
|
188
|
+
|
|
189
|
+
### Step 9: Present Summary
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
193
|
+
BLUEPRINT ► INITIALIZED ✓
|
|
194
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
195
|
+
|
|
196
|
+
| Artifact | Location |
|
|
197
|
+
|----------|----------|
|
|
198
|
+
| ADRs | docs/adr/ ([N] decisions) |
|
|
199
|
+
| Template | docs/adr/template.md |
|
|
200
|
+
| Lifecycle | docs/adr/README.md |
|
|
201
|
+
| Architecture | docs/ARCHITECTURE.md |
|
|
202
|
+
| Index | docs/adr/README.md |
|
|
203
|
+
|
|
204
|
+
Run /blueprint:help for the full command reference.
|
|
205
|
+
Run /blueprint:evaluate to assess architecture health.
|
|
206
|
+
Run /blueprint:list to see all decisions.
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## Edge Cases
|
|
210
|
+
|
|
211
|
+
**No existing decisions found:** Create just ADR-0001 (meta-ADR), the template, lifecycle
|
|
212
|
+
README, and ARCHITECTURE.md. Suggest `/blueprint:new --research` for the first real decision.
|
|
213
|
+
|
|
214
|
+
**ADR directory already exists:** Check if it has ADRs. If yes, abort with "Blueprint is
|
|
215
|
+
already initialized. Use `/blueprint:help` for commands." If the directory exists but is
|
|
216
|
+
empty, proceed with initialization.
|
|
217
|
+
|
|
218
|
+
**Conflicting documentation:** If .planning/PROJECT.md and CLAUDE.md disagree on tech stack,
|
|
219
|
+
flag the conflict and ask the user which is authoritative before creating the ADR.
|
|
220
|
+
|
|
221
|
+
**.planning/research/ is rich:** GSD research files (STACK.md, FEATURES.md, ARCHITECTURE.md,
|
|
222
|
+
PITFALLS.md) are goldmines. Extract:
|
|
223
|
+
- From STACK.md: technology choices with rationale
|
|
224
|
+
- From FEATURES.md: scope decisions (what's in v1, what's deferred, what's excluded)
|
|
225
|
+
- From ARCHITECTURE.md: structural decisions (components, boundaries, data flow)
|
|
226
|
+
- From PITFALLS.md: constraint decisions (what to avoid and why)
|
|
227
|
+
|
|
228
|
+
**Large existing codebase:** Don't try to create an ADR for every library import. Focus on
|
|
229
|
+
decisions that constrain future work — the things a new developer needs to know.
|
package/commands/list.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: blueprint:list
|
|
3
|
+
description: >
|
|
4
|
+
List all ADRs with status, date, and contextual next-action suggestions. Use when:
|
|
5
|
+
"list adrs", "show decisions", "what adrs do we have", "decision status", "show accepted
|
|
6
|
+
decisions", "any proposed adrs?", "list deferred". Supports filtering by status.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# List ADRs
|
|
10
|
+
|
|
11
|
+
Display all ADRs in a summary table with contextual suggestions for next actions.
|
|
12
|
+
|
|
13
|
+
## Process
|
|
14
|
+
|
|
15
|
+
### Step 1: Read ADR State
|
|
16
|
+
|
|
17
|
+
1. Read `config/state.toml` from the parent `adr/` directory for ADR directory location
|
|
18
|
+
2. If no directory cached, detect: `docs/adr/` → `docs/decisions/` → `adr/` → `decisions/`
|
|
19
|
+
3. Glob for all ADR files (`[0-9][0-9][0-9][0-9]-*.md`)
|
|
20
|
+
4. For each file, extract: number, title (from heading), status, date proposed, date decided
|
|
21
|
+
|
|
22
|
+
### Step 2: Apply Filters
|
|
23
|
+
|
|
24
|
+
If the user specified a filter ("list proposed", "show accepted", "any deferred?"), filter
|
|
25
|
+
the results to matching statuses only.
|
|
26
|
+
|
|
27
|
+
### Step 3: Display Table
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
| # | Title | Status | Date |
|
|
31
|
+
|------|------------------------------------------|-----------|------------|
|
|
32
|
+
| 0001 | Use ADRs for architectural decisions | Accepted | 2026-03-30 |
|
|
33
|
+
| 0002 | Use React and FastAPI stack | Accepted | 2026-03-30 |
|
|
34
|
+
| 0009 | Use Redis for session caching | Proposed | 2026-04-02 |
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
If filtering, show the filter: "Showing [N] [status] ADRs (of [total] total)"
|
|
38
|
+
|
|
39
|
+
### Step 4: Contextual Suggestions
|
|
40
|
+
|
|
41
|
+
Append a `▶ Suggested next actions` section using the same rules as `/blueprint:help` Step 3:
|
|
42
|
+
|
|
43
|
+
1. Proposed ADRs exist → suggest `/blueprint:review N`
|
|
44
|
+
2. Conversation has undocumented architectural topic → suggest `/blueprint:new`
|
|
45
|
+
3. Application code + no recent audit → suggest `/blueprint:audit`
|
|
46
|
+
4. Application code + no recent evaluation → suggest `/blueprint:evaluate`
|
|
47
|
+
5. Recent fix committed → suggest `/blueprint:retro`
|
|
48
|
+
6. No ADRs → suggest `/blueprint:new`
|
|
49
|
+
7. All Accepted, nothing pending → "No pending actions"
|
|
50
|
+
|
|
51
|
+
This ensures the user always sees what to do next after viewing the list.
|
package/commands/new.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: blueprint:new
|
|
3
|
+
description: >
|
|
4
|
+
Create a new Architecture Decision Record. Use when: the user says "new adr", "create adr",
|
|
5
|
+
"document this decision", "we should record this"; or when you notice a significant architectural
|
|
6
|
+
choice being made without an ADR. Add --research to spawn a researcher agent first.
|
|
7
|
+
Examples: "/blueprint:new use Redis for caching", "/blueprint:new --research session management strategy".
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Create a New ADR
|
|
11
|
+
|
|
12
|
+
Create a new Architecture Decision Record, optionally with research-backed evidence gathering.
|
|
13
|
+
|
|
14
|
+
## Shared Context
|
|
15
|
+
|
|
16
|
+
Before starting, read these files from the parent `adr/` skill directory:
|
|
17
|
+
- `config/lifecycle.toml` — valid statuses (new ADRs start as Proposed)
|
|
18
|
+
- `config/taxonomy.toml` — decision categories, severity levels
|
|
19
|
+
- `config/state.toml` — ADR directory location (if previously detected)
|
|
20
|
+
- `config/relationships.toml` — existing ADR relationships (for impact awareness)
|
|
21
|
+
- `agents/persona.md` — your personality
|
|
22
|
+
|
|
23
|
+
## Directory Detection
|
|
24
|
+
|
|
25
|
+
If `config/state.toml` has an `adr_directory`, use it. Otherwise detect:
|
|
26
|
+
1. `docs/adr/` (preferred)
|
|
27
|
+
2. `docs/decisions/`
|
|
28
|
+
3. `adr/`
|
|
29
|
+
4. `decisions/`
|
|
30
|
+
|
|
31
|
+
If found, update `config/state.toml` with the detected path.
|
|
32
|
+
Read `template.md` from the ADR directory if it exists.
|
|
33
|
+
|
|
34
|
+
## Process
|
|
35
|
+
|
|
36
|
+
1. **Determine next sequence number** — glob `[0-9][0-9][0-9][0-9]-*.md` in ADR directory
|
|
37
|
+
2. **Interview the user** if context is insufficient:
|
|
38
|
+
- What decision needs to be made?
|
|
39
|
+
- What alternatives were considered?
|
|
40
|
+
- What constraints or forces are at play?
|
|
41
|
+
- User can say "you fill it in" for parts you can infer
|
|
42
|
+
3. **Research (if `--research` flag or user requests):**
|
|
43
|
+
- Read `agents/adr-researcher.md` from the parent skill directory
|
|
44
|
+
- Spawn a `general-purpose` agent with the researcher instructions + `agents/persona.md`
|
|
45
|
+
- Provide: decision topic, constraints, ADR directory path, existing ADR filenames
|
|
46
|
+
- Present the research brief to the user
|
|
47
|
+
- Pre-populate Options Considered from research
|
|
48
|
+
4. **Draft the ADR** using the project's template, status = `Proposed`
|
|
49
|
+
5. **Write the file** — `NNNN-short-descriptive-title.md`
|
|
50
|
+
6. **Update the index** in README.md
|
|
51
|
+
7. **Update `config/relationships.toml`** — add the new ADR as a node
|
|
52
|
+
8. **Update `config/state.toml`** — set `last_adr_created` to today
|
|
53
|
+
9. **Present** to user for review before commit
|
|
54
|
+
10. **Commit** with message: `docs(adr): propose ADR-NNNN <title>`
|
|
55
|
+
|
|
56
|
+
## Quality Checks
|
|
57
|
+
|
|
58
|
+
Read `config/taxonomy.toml` for decision categories and severity levels. Verify:
|
|
59
|
+
- Title uses present-tense imperative verb phrase
|
|
60
|
+
- Context explains forces/constraints
|
|
61
|
+
- At least 2 options considered
|
|
62
|
+
- Consequences include positive AND negative
|
|
63
|
+
- Category assigned from taxonomy
|
|
64
|
+
|
|
65
|
+
If thin on alternatives or consequences, push back — a rubber-stamp ADR is worse than none.
|
|
66
|
+
|
|
67
|
+
## File Naming
|
|
68
|
+
|
|
69
|
+
`NNNN-short-descriptive-title.md` — zero-padded, kebab-case, imperative verb phrase.
|
|
70
|
+
|
|
71
|
+
## Commit Convention
|
|
72
|
+
|
|
73
|
+
`docs(adr): propose ADR-NNNN <title>`
|
|
74
|
+
Include both the ADR file and updated README.md.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: blueprint:rearchitect
|
|
3
|
+
description: >
|
|
4
|
+
Revisit and replace an existing architectural decision. Researches new approach, drafts
|
|
5
|
+
superseding ADR, runs impact analysis, and transitions old ADR(s) to Superseded. Use when:
|
|
6
|
+
"rearchitect X", "rethink our approach to X", "replace decision about X", "supersede the
|
|
7
|
+
auth decision with a new approach".
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Rearchitect
|
|
11
|
+
|
|
12
|
+
Compound workflow for revisiting and replacing an architectural decision. Combines research,
|
|
13
|
+
drafting, impact analysis, and lifecycle transitions into a single flow.
|
|
14
|
+
|
|
15
|
+
## Shared Context
|
|
16
|
+
|
|
17
|
+
Read from parent `adr/` skill directory:
|
|
18
|
+
- `config/lifecycle.toml` — transition rules for superseding
|
|
19
|
+
- `config/relationships.toml` — existing ADR relationships
|
|
20
|
+
- `config/state.toml` — ADR directory
|
|
21
|
+
- `agents/persona.md` — personality
|
|
22
|
+
- `agents/adr-researcher.md` — for researching the new approach
|
|
23
|
+
- `agents/adr-impact-analyzer.md` — for checking cascading effects
|
|
24
|
+
|
|
25
|
+
## Process
|
|
26
|
+
|
|
27
|
+
1. **Search existing ADRs** for the topic
|
|
28
|
+
2. **Present related ADRs** — ask user to confirm which to supersede
|
|
29
|
+
3. **Spawn researcher** — investigate the new approach
|
|
30
|
+
- Read `agents/adr-researcher.md` + `agents/persona.md`
|
|
31
|
+
- Spawn with topic, constraints, existing ADRs
|
|
32
|
+
4. **Present research** — conduct interview for the new ADR
|
|
33
|
+
5. **Draft the superseding ADR** with cross-references:
|
|
34
|
+
- "Supersedes ADR-NNNN" in metadata
|
|
35
|
+
6. **Spawn impact analyzer** on the new draft:
|
|
36
|
+
- Read `agents/adr-impact-analyzer.md` + `agents/persona.md`
|
|
37
|
+
- Check for cascading conflicts with other accepted ADRs
|
|
38
|
+
7. **Present impact analysis** to user
|
|
39
|
+
8. **If user approves:**
|
|
40
|
+
- Write the new ADR file
|
|
41
|
+
- Transition old ADR(s) to Superseded (per lifecycle.toml)
|
|
42
|
+
- Cross-link: old ADR gets "Superseded by ADR-NNNN"
|
|
43
|
+
- Update README.md index for both
|
|
44
|
+
- Update `config/relationships.toml` with SUPERSEDES edge
|
|
45
|
+
- Commit: `docs(adr): supersede ADR-NNNN with ADR-MMMM <title>`
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: blueprint:retro
|
|
3
|
+
description: >
|
|
4
|
+
Post-fix retrospective — evaluates whether recent changes are band-aids or systemic fixes,
|
|
5
|
+
classifies root causes, verifies proposed improvements against external sources, and proposes
|
|
6
|
+
ADRs for architectural improvements worth formalizing. Use after: /gsd:quick, /rapid:quick,
|
|
7
|
+
/rapid:bug-fix, manual fixes, or any commit that patches a symptom. Also triggered by:
|
|
8
|
+
"was that a band-aid?", "should we document that?", "review this fix", "retrospective".
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Post-Fix Retrospective
|
|
12
|
+
|
|
13
|
+
Evaluates recent changes for band-aid vs systemic quality. Answers two questions:
|
|
14
|
+
1. Was this fix a band-aid? Could the bug class be prevented by design, not just this instance?
|
|
15
|
+
2. Are the proposed improvements real? Verified against external sources, not confabulated.
|
|
16
|
+
|
|
17
|
+
## Shared Context
|
|
18
|
+
|
|
19
|
+
Read from parent `adr/` skill directory:
|
|
20
|
+
- `config/taxonomy.toml` — root cause categories (the classification system)
|
|
21
|
+
- `config/state.toml` — ADR directory, retro history
|
|
22
|
+
- `agents/persona.md` — personality
|
|
23
|
+
- `agents/adr-retrospective.md` — agent instructions
|
|
24
|
+
|
|
25
|
+
## Process
|
|
26
|
+
|
|
27
|
+
1. **Determine what was fixed:**
|
|
28
|
+
- If a commit range is provided, use that
|
|
29
|
+
- Otherwise, read last 3 commits: `git log --oneline -3` and `git diff HEAD~3..HEAD`
|
|
30
|
+
- Include conversation context about what was fixed
|
|
31
|
+
2. **Spawn retrospective agent:**
|
|
32
|
+
- Read `agents/adr-retrospective.md` and `agents/persona.md`
|
|
33
|
+
- Spawn `general-purpose` agent with:
|
|
34
|
+
- Diff / commit messages
|
|
35
|
+
- Root cause categories from `config/taxonomy.toml`
|
|
36
|
+
- ADR directory path and existing ADR filenames
|
|
37
|
+
- Full agent instructions + persona
|
|
38
|
+
3. **Present retrospective report** to the user
|
|
39
|
+
4. **If ADR recommended:**
|
|
40
|
+
- Ask user if they want to create it now
|
|
41
|
+
- If yes, invoke `/blueprint:new` with the proposed title and context pre-filled
|
|
42
|
+
5. **Update state:**
|
|
43
|
+
- Set `last_retro` in `config/state.toml` to today
|
|
44
|
+
- Append to `retro_history` with date, verdict, and ADR created (if any)
|
|
45
|
+
|
|
46
|
+
## Proactive Triggering
|
|
47
|
+
|
|
48
|
+
After observing a quick fix workflow (gsd:quick, rapid:quick, rapid:bug-fix, manual patch),
|
|
49
|
+
suggest: "That fix is in. Want to run `/blueprint:retro` to check if it warrants an ADR?"
|
|
50
|
+
Don't force it — just offer.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: blueprint:review
|
|
3
|
+
description: >
|
|
4
|
+
Review a Proposed ADR with devil's advocate challenge before acceptance. Use when:
|
|
5
|
+
"review adr N", "let's review the proposed adrs", "challenge adr N". Spawns a devil's
|
|
6
|
+
advocate agent to find blind spots before the decision becomes binding. For direct
|
|
7
|
+
acceptance without challenge, use the lifecycle transitions in the root /blueprint skill.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Review a Proposed ADR
|
|
11
|
+
|
|
12
|
+
Review a Proposed ADR through a devil's advocate challenge process. This is the gate
|
|
13
|
+
between "someone wrote a decision" and "the team committed to it."
|
|
14
|
+
|
|
15
|
+
## Shared Context
|
|
16
|
+
|
|
17
|
+
Read from parent `adr/` skill directory:
|
|
18
|
+
- `config/lifecycle.toml` — valid transitions (Proposed → Accepted/Rejected/Deferred)
|
|
19
|
+
- `config/state.toml` — ADR directory location
|
|
20
|
+
- `agents/persona.md` — personality
|
|
21
|
+
- `agents/adr-devils-advocate.md` — agent instructions
|
|
22
|
+
|
|
23
|
+
## Process
|
|
24
|
+
|
|
25
|
+
1. **Read the target ADR** — user specifies by number or title
|
|
26
|
+
2. **Validate status** — must be `Proposed` (read lifecycle.toml for valid transitions)
|
|
27
|
+
3. **Spawn devil's advocate:**
|
|
28
|
+
- Read `agents/adr-devils-advocate.md` and `agents/persona.md`
|
|
29
|
+
- Spawn `general-purpose` agent with:
|
|
30
|
+
- Full text of the Proposed ADR
|
|
31
|
+
- ADR file path and directory path
|
|
32
|
+
- List of all ADR filenames (for cross-reference)
|
|
33
|
+
- Full content of both agent files as instructions
|
|
34
|
+
4. **Present the challenge report** to the user
|
|
35
|
+
5. **Ask for verdict** using AskUserQuestion:
|
|
36
|
+
- **Accept** — Challenges noted, decision stands. Transition to Accepted.
|
|
37
|
+
- **Reject** — Fatal flaw found. Ask for rejection reason. Transition to Rejected.
|
|
38
|
+
- **Defer** — Need more information. Ask for trigger condition. Transition to Deferred.
|
|
39
|
+
- **Revise** — Address specific challenges, re-review later.
|
|
40
|
+
6. **Execute transition** per `config/lifecycle.toml`:
|
|
41
|
+
- Update ADR status and metadata
|
|
42
|
+
- Update README.md index
|
|
43
|
+
- Update `config/relationships.toml` if applicable
|
|
44
|
+
- Commit with: `docs(adr): [accept|reject|defer] ADR-NNNN <title>`
|
|
45
|
+
|
|
46
|
+
## Skip Challenge
|
|
47
|
+
|
|
48
|
+
If the user says "just accept ADR N" or "accept adr N" without "review", this skill
|
|
49
|
+
should NOT be invoked — that's a direct lifecycle transition handled by the root `/blueprint` skill.
|
|
50
|
+
The challenge step is part of *review*, not *accept*.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: blueprint:search
|
|
3
|
+
description: >
|
|
4
|
+
Search ADRs by topic, technology, or keyword. Use when: "why did we choose X?", "is there an
|
|
5
|
+
adr about X?", "what did we decide about X?", "search adrs for X", "find decision about auth".
|
|
6
|
+
Searches titles, context, decision sections, and the relationship graph.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Search ADRs
|
|
10
|
+
|
|
11
|
+
Find ADRs relevant to a topic by searching content and the relationship graph.
|
|
12
|
+
|
|
13
|
+
## Process
|
|
14
|
+
|
|
15
|
+
1. Read `config/state.toml` for ADR directory location
|
|
16
|
+
2. Read `config/relationships.toml` for the ADR dependency graph
|
|
17
|
+
3. Parse the search term from the user's query
|
|
18
|
+
4. **Search ADR files:**
|
|
19
|
+
- Grep for the term in ADR filenames (title match)
|
|
20
|
+
- Grep for the term within ADR file content (context, decision, consequences sections)
|
|
21
|
+
- Rank by relevance: title match > decision section > context > consequences
|
|
22
|
+
5. **Search relationship graph:**
|
|
23
|
+
- Check if the term matches any node labels or edge descriptions in `relationships.toml`
|
|
24
|
+
- Include related ADRs (DEPENDS_ON, CONFLICTS, SUPERSEDES) in results
|
|
25
|
+
6. **Present results:**
|
|
26
|
+
- Show matching ADRs with status, title, and the matching snippet (1-2 lines of context)
|
|
27
|
+
- If relationship graph has relevant edges, show them: "ADR-0003 DEPENDS ON ADR-0002"
|
|
28
|
+
- If no matches: "No ADRs found for '[term]'. Run `/blueprint:new \"[term]\"` to create one."
|