@lipter7/blueprint 2.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/LICENSE +21 -0
- package/README.md +626 -0
- package/agents/bp-codebase-mapper.md +761 -0
- package/agents/bp-debugger.md +1198 -0
- package/agents/bp-executor.md +403 -0
- package/agents/bp-integration-checker.md +423 -0
- package/agents/bp-phase-researcher.md +469 -0
- package/agents/bp-plan-checker.md +622 -0
- package/agents/bp-planner.md +1157 -0
- package/agents/bp-project-researcher.md +618 -0
- package/agents/bp-research-synthesizer.md +236 -0
- package/agents/bp-roadmapper.md +605 -0
- package/agents/bp-verifier.md +523 -0
- package/bin/install.js +1754 -0
- package/blueprint/bin/blueprint-tools.js +4597 -0
- package/blueprint/bin/blueprint-tools.test.js +2033 -0
- package/blueprint/references/checkpoints.md +775 -0
- package/blueprint/references/continuation-format.md +249 -0
- package/blueprint/references/decimal-phase-calculation.md +65 -0
- package/blueprint/references/git-integration.md +248 -0
- package/blueprint/references/git-planning-commit.md +38 -0
- package/blueprint/references/model-profile-resolution.md +32 -0
- package/blueprint/references/model-profiles.md +73 -0
- package/blueprint/references/phase-argument-parsing.md +61 -0
- package/blueprint/references/planning-config.md +194 -0
- package/blueprint/references/questioning.md +141 -0
- package/blueprint/references/tdd.md +263 -0
- package/blueprint/references/ui-brand.md +160 -0
- package/blueprint/references/verification-patterns.md +612 -0
- package/blueprint/templates/DEBUG.md +159 -0
- package/blueprint/templates/UAT.md +247 -0
- package/blueprint/templates/codebase/architecture.md +255 -0
- package/blueprint/templates/codebase/concerns.md +310 -0
- package/blueprint/templates/codebase/conventions.md +307 -0
- package/blueprint/templates/codebase/integrations.md +280 -0
- package/blueprint/templates/codebase/stack.md +186 -0
- package/blueprint/templates/codebase/structure.md +285 -0
- package/blueprint/templates/codebase/testing.md +480 -0
- package/blueprint/templates/config.json +35 -0
- package/blueprint/templates/context.md +283 -0
- package/blueprint/templates/continue-here.md +78 -0
- package/blueprint/templates/debug-subagent-prompt.md +91 -0
- package/blueprint/templates/discovery.md +146 -0
- package/blueprint/templates/milestone-archive.md +123 -0
- package/blueprint/templates/milestone.md +115 -0
- package/blueprint/templates/phase-prompt.md +567 -0
- package/blueprint/templates/planner-subagent-prompt.md +117 -0
- package/blueprint/templates/project.md +184 -0
- package/blueprint/templates/requirements.md +231 -0
- package/blueprint/templates/research-project/ARCHITECTURE.md +204 -0
- package/blueprint/templates/research-project/FEATURES.md +147 -0
- package/blueprint/templates/research-project/PITFALLS.md +200 -0
- package/blueprint/templates/research-project/STACK.md +120 -0
- package/blueprint/templates/research-project/SUMMARY.md +170 -0
- package/blueprint/templates/research.md +552 -0
- package/blueprint/templates/roadmap.md +202 -0
- package/blueprint/templates/state.md +176 -0
- package/blueprint/templates/summary-complex.md +59 -0
- package/blueprint/templates/summary-minimal.md +41 -0
- package/blueprint/templates/summary-standard.md +48 -0
- package/blueprint/templates/summary.md +246 -0
- package/blueprint/templates/user-setup.md +311 -0
- package/blueprint/templates/verification-report.md +322 -0
- package/blueprint/workflows/add-phase.md +111 -0
- package/blueprint/workflows/add-todo.md +157 -0
- package/blueprint/workflows/audit-milestone.md +241 -0
- package/blueprint/workflows/check-todos.md +176 -0
- package/blueprint/workflows/complete-milestone.md +644 -0
- package/blueprint/workflows/diagnose-issues.md +219 -0
- package/blueprint/workflows/discovery-phase.md +289 -0
- package/blueprint/workflows/discuss-phase.md +408 -0
- package/blueprint/workflows/execute-phase.md +338 -0
- package/blueprint/workflows/execute-plan.md +437 -0
- package/blueprint/workflows/help.md +470 -0
- package/blueprint/workflows/insert-phase.md +129 -0
- package/blueprint/workflows/list-phase-assumptions.md +178 -0
- package/blueprint/workflows/map-codebase.md +327 -0
- package/blueprint/workflows/new-milestone.md +373 -0
- package/blueprint/workflows/new-project.md +958 -0
- package/blueprint/workflows/pause-work.md +122 -0
- package/blueprint/workflows/plan-milestone-gaps.md +256 -0
- package/blueprint/workflows/plan-phase.md +376 -0
- package/blueprint/workflows/progress.md +385 -0
- package/blueprint/workflows/quick.md +230 -0
- package/blueprint/workflows/remove-phase.md +154 -0
- package/blueprint/workflows/research-phase.md +74 -0
- package/blueprint/workflows/resume-project.md +306 -0
- package/blueprint/workflows/set-profile.md +80 -0
- package/blueprint/workflows/settings.md +145 -0
- package/blueprint/workflows/transition.md +493 -0
- package/blueprint/workflows/update.md +212 -0
- package/blueprint/workflows/verify-phase.md +226 -0
- package/blueprint/workflows/verify-work.md +570 -0
- package/commands/bp/add-phase.md +39 -0
- package/commands/bp/add-todo.md +42 -0
- package/commands/bp/audit-milestone.md +42 -0
- package/commands/bp/check-todos.md +41 -0
- package/commands/bp/complete-milestone.md +136 -0
- package/commands/bp/debug.md +162 -0
- package/commands/bp/discuss-phase.md +86 -0
- package/commands/bp/execute-phase.md +42 -0
- package/commands/bp/help.md +22 -0
- package/commands/bp/insert-phase.md +33 -0
- package/commands/bp/join-discord.md +18 -0
- package/commands/bp/list-phase-assumptions.md +50 -0
- package/commands/bp/map-codebase.md +71 -0
- package/commands/bp/new-milestone.md +51 -0
- package/commands/bp/new-project.md +42 -0
- package/commands/bp/pause-work.md +35 -0
- package/commands/bp/plan-milestone-gaps.md +40 -0
- package/commands/bp/plan-phase.md +44 -0
- package/commands/bp/progress.md +24 -0
- package/commands/bp/quick.md +38 -0
- package/commands/bp/reapply-patches.md +110 -0
- package/commands/bp/remove-phase.md +32 -0
- package/commands/bp/research-phase.md +187 -0
- package/commands/bp/resume-work.md +40 -0
- package/commands/bp/set-profile.md +34 -0
- package/commands/bp/settings.md +36 -0
- package/commands/bp/update.md +37 -0
- package/commands/bp/verify-work.md +39 -0
- package/hooks/dist/bp-check-update.js +62 -0
- package/hooks/dist/bp-statusline.js +91 -0
- package/package.json +48 -0
- package/scripts/build-hooks.js +42 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Remove an unstarted future phase from the project roadmap, delete its directory, renumber all subsequent phases to maintain a clean linear sequence, and commit the change. The git commit serves as the historical record of removal.
|
|
3
|
+
</purpose>
|
|
4
|
+
|
|
5
|
+
<required_reading>
|
|
6
|
+
Read all files referenced by the invoking prompt's execution_context before starting.
|
|
7
|
+
</required_reading>
|
|
8
|
+
|
|
9
|
+
<process>
|
|
10
|
+
|
|
11
|
+
<step name="parse_arguments">
|
|
12
|
+
Parse the command arguments:
|
|
13
|
+
- Argument is the phase number to remove (integer or decimal)
|
|
14
|
+
- Example: `/bp:remove-phase 17` → phase = 17
|
|
15
|
+
- Example: `/bp:remove-phase 16.1` → phase = 16.1
|
|
16
|
+
|
|
17
|
+
If no argument provided:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
ERROR: Phase number required
|
|
21
|
+
Usage: /bp:remove-phase <phase-number>
|
|
22
|
+
Example: /bp:remove-phase 17
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Exit.
|
|
26
|
+
</step>
|
|
27
|
+
|
|
28
|
+
<step name="init_context">
|
|
29
|
+
Load phase operation context:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
INIT=$(node ~/.claude/blueprint/bin/blueprint-tools.js init phase-op "${target}")
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Extract: `phase_found`, `phase_dir`, `phase_number`, `commit_docs`, `roadmap_exists`.
|
|
36
|
+
|
|
37
|
+
Also read STATE.md and ROADMAP.md content for parsing current position.
|
|
38
|
+
</step>
|
|
39
|
+
|
|
40
|
+
<step name="validate_future_phase">
|
|
41
|
+
Verify the phase is a future phase (not started):
|
|
42
|
+
|
|
43
|
+
1. Compare target phase to current phase from STATE.md
|
|
44
|
+
2. Target must be > current phase number
|
|
45
|
+
|
|
46
|
+
If target <= current phase:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
ERROR: Cannot remove Phase {target}
|
|
50
|
+
|
|
51
|
+
Only future phases can be removed:
|
|
52
|
+
- Current phase: {current}
|
|
53
|
+
- Phase {target} is current or completed
|
|
54
|
+
|
|
55
|
+
To abandon current work, use /bp:pause-work instead.
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Exit.
|
|
59
|
+
</step>
|
|
60
|
+
|
|
61
|
+
<step name="confirm_removal">
|
|
62
|
+
Present removal summary and confirm:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
Removing Phase {target}: {Name}
|
|
66
|
+
|
|
67
|
+
This will:
|
|
68
|
+
- Delete: .blueprint/phases/{target}-{slug}/
|
|
69
|
+
- Renumber all subsequent phases
|
|
70
|
+
- Update: ROADMAP.md, STATE.md
|
|
71
|
+
|
|
72
|
+
Proceed? (y/n)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Wait for confirmation.
|
|
76
|
+
</step>
|
|
77
|
+
|
|
78
|
+
<step name="execute_removal">
|
|
79
|
+
**Delegate the entire removal operation to blueprint-tools:**
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
RESULT=$(node ~/.claude/blueprint/bin/blueprint-tools.js phase remove "${target}")
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
If the phase has executed plans (SUMMARY.md files), blueprint-tools will error. Use `--force` only if the user confirms:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
RESULT=$(node ~/.claude/blueprint/bin/blueprint-tools.js phase remove "${target}" --force)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
The CLI handles:
|
|
92
|
+
- Deleting the phase directory
|
|
93
|
+
- Renumbering all subsequent directories (in reverse order to avoid conflicts)
|
|
94
|
+
- Renaming all files inside renumbered directories (PLAN.md, SUMMARY.md, etc.)
|
|
95
|
+
- Updating ROADMAP.md (removing section, renumbering all phase references, updating dependencies)
|
|
96
|
+
- Updating STATE.md (decrementing phase count)
|
|
97
|
+
|
|
98
|
+
Extract from result: `removed`, `directory_deleted`, `renamed_directories`, `renamed_files`, `roadmap_updated`, `state_updated`.
|
|
99
|
+
</step>
|
|
100
|
+
|
|
101
|
+
<step name="commit">
|
|
102
|
+
Stage and commit the removal:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
node ~/.claude/blueprint/bin/blueprint-tools.js commit "chore: remove phase {target} ({original-phase-name})" --files .blueprint/
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
The commit message preserves the historical record of what was removed.
|
|
109
|
+
</step>
|
|
110
|
+
|
|
111
|
+
<step name="completion">
|
|
112
|
+
Present completion summary:
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
Phase {target} ({original-name}) removed.
|
|
116
|
+
|
|
117
|
+
Changes:
|
|
118
|
+
- Deleted: .blueprint/phases/{target}-{slug}/
|
|
119
|
+
- Renumbered: {N} directories and {M} files
|
|
120
|
+
- Updated: ROADMAP.md, STATE.md
|
|
121
|
+
- Committed: chore: remove phase {target} ({original-name})
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## What's Next
|
|
126
|
+
|
|
127
|
+
Would you like to:
|
|
128
|
+
- `/bp:progress` — see updated roadmap status
|
|
129
|
+
- Continue with current phase
|
|
130
|
+
- Review roadmap
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
```
|
|
134
|
+
</step>
|
|
135
|
+
|
|
136
|
+
</process>
|
|
137
|
+
|
|
138
|
+
<anti_patterns>
|
|
139
|
+
|
|
140
|
+
- Don't remove completed phases (have SUMMARY.md files) without --force
|
|
141
|
+
- Don't remove current or past phases
|
|
142
|
+
- Don't manually renumber — use `blueprint-tools phase remove` which handles all renumbering
|
|
143
|
+
- Don't add "removed phase" notes to STATE.md — git commit is the record
|
|
144
|
+
- Don't modify completed phase directories
|
|
145
|
+
</anti_patterns>
|
|
146
|
+
|
|
147
|
+
<success_criteria>
|
|
148
|
+
Phase removal is complete when:
|
|
149
|
+
|
|
150
|
+
- [ ] Target phase validated as future/unstarted
|
|
151
|
+
- [ ] `blueprint-tools phase remove` executed successfully
|
|
152
|
+
- [ ] Changes committed with descriptive message
|
|
153
|
+
- [ ] User informed of changes
|
|
154
|
+
</success_criteria>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Research how to implement a phase. Spawns bp-phase-researcher with phase context.
|
|
3
|
+
|
|
4
|
+
Standalone research command. For most workflows, use `/bp:plan-phase` which integrates research automatically.
|
|
5
|
+
</purpose>
|
|
6
|
+
|
|
7
|
+
<process>
|
|
8
|
+
|
|
9
|
+
## Step 0: Resolve Model Profile
|
|
10
|
+
|
|
11
|
+
@~/.claude/blueprint/references/model-profile-resolution.md
|
|
12
|
+
|
|
13
|
+
Resolve model for:
|
|
14
|
+
- `bp-phase-researcher`
|
|
15
|
+
|
|
16
|
+
## Step 1: Normalize and Validate Phase
|
|
17
|
+
|
|
18
|
+
@~/.claude/blueprint/references/phase-argument-parsing.md
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
PHASE_INFO=$(node ~/.claude/blueprint/bin/blueprint-tools.js roadmap get-phase "${PHASE}")
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
If `found` is false: Error and exit.
|
|
25
|
+
|
|
26
|
+
## Step 2: Check Existing Research
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
ls .blueprint/phases/${PHASE}-*/RESEARCH.md 2>/dev/null
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
If exists: Offer update/view/skip options.
|
|
33
|
+
|
|
34
|
+
## Step 3: Gather Phase Context
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# Phase section from roadmap (already loaded in PHASE_INFO)
|
|
38
|
+
echo "$PHASE_INFO" | jq -r '.section'
|
|
39
|
+
cat .blueprint/REQUIREMENTS.md 2>/dev/null
|
|
40
|
+
cat .blueprint/phases/${PHASE}-*/*-CONTEXT.md 2>/dev/null
|
|
41
|
+
# Decisions from state-snapshot (structured JSON)
|
|
42
|
+
node ~/.claude/blueprint/bin/blueprint-tools.js state-snapshot | jq '.decisions'
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Step 4: Spawn Researcher
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
Task(
|
|
49
|
+
prompt="<objective>
|
|
50
|
+
Research implementation approach for Phase {phase}: {name}
|
|
51
|
+
</objective>
|
|
52
|
+
|
|
53
|
+
<context>
|
|
54
|
+
Phase description: {description}
|
|
55
|
+
Requirements: {requirements}
|
|
56
|
+
Prior decisions: {decisions}
|
|
57
|
+
Phase context: {context_md}
|
|
58
|
+
</context>
|
|
59
|
+
|
|
60
|
+
<output>
|
|
61
|
+
Write to: .blueprint/phases/${PHASE}-{slug}/${PHASE}-RESEARCH.md
|
|
62
|
+
</output>",
|
|
63
|
+
subagent_type="bp-phase-researcher",
|
|
64
|
+
model="{researcher_model}"
|
|
65
|
+
)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Step 5: Handle Return
|
|
69
|
+
|
|
70
|
+
- `## RESEARCH COMPLETE` — Display summary, offer: Plan/Dig deeper/Review/Done
|
|
71
|
+
- `## CHECKPOINT REACHED` — Present to user, spawn continuation
|
|
72
|
+
- `## RESEARCH INCONCLUSIVE` — Show attempts, offer: Add context/Try different mode/Manual
|
|
73
|
+
|
|
74
|
+
</process>
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
<trigger>
|
|
2
|
+
Use this workflow when:
|
|
3
|
+
- Starting a new session on an existing project
|
|
4
|
+
- User says "continue", "what's next", "where were we", "resume"
|
|
5
|
+
- Any planning operation when .blueprint/ already exists
|
|
6
|
+
- User returns after time away from project
|
|
7
|
+
</trigger>
|
|
8
|
+
|
|
9
|
+
<purpose>
|
|
10
|
+
Instantly restore full project context so "Where were we?" has an immediate, complete answer.
|
|
11
|
+
</purpose>
|
|
12
|
+
|
|
13
|
+
<required_reading>
|
|
14
|
+
@~/.claude/blueprint/references/continuation-format.md
|
|
15
|
+
</required_reading>
|
|
16
|
+
|
|
17
|
+
<process>
|
|
18
|
+
|
|
19
|
+
<step name="initialize">
|
|
20
|
+
Load all context in one call:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
INIT=$(node ~/.claude/blueprint/bin/blueprint-tools.js init resume)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Parse JSON for: `state_exists`, `roadmap_exists`, `project_exists`, `planning_exists`, `has_interrupted_agent`, `interrupted_agent_id`, `commit_docs`.
|
|
27
|
+
|
|
28
|
+
**If `state_exists` is true:** Proceed to load_state
|
|
29
|
+
**If `state_exists` is false but `roadmap_exists` or `project_exists` is true:** Offer to reconstruct STATE.md
|
|
30
|
+
**If `planning_exists` is false:** This is a new project - route to /bp:new-project
|
|
31
|
+
</step>
|
|
32
|
+
|
|
33
|
+
<step name="load_state">
|
|
34
|
+
|
|
35
|
+
Read and parse STATE.md, then PROJECT.md:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
cat .blueprint/STATE.md
|
|
39
|
+
cat .blueprint/PROJECT.md
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**From STATE.md extract:**
|
|
43
|
+
|
|
44
|
+
- **Project Reference**: Core value and current focus
|
|
45
|
+
- **Current Position**: Phase X of Y, Plan A of B, Status
|
|
46
|
+
- **Progress**: Visual progress bar
|
|
47
|
+
- **Recent Decisions**: Key decisions affecting current work
|
|
48
|
+
- **Pending Todos**: Ideas captured during sessions
|
|
49
|
+
- **Blockers/Concerns**: Issues carried forward
|
|
50
|
+
- **Session Continuity**: Where we left off, any resume files
|
|
51
|
+
|
|
52
|
+
**From PROJECT.md extract:**
|
|
53
|
+
|
|
54
|
+
- **What This Is**: Current accurate description
|
|
55
|
+
- **Requirements**: Validated, Active, Out of Scope
|
|
56
|
+
- **Key Decisions**: Full decision log with outcomes
|
|
57
|
+
- **Constraints**: Hard limits on implementation
|
|
58
|
+
|
|
59
|
+
</step>
|
|
60
|
+
|
|
61
|
+
<step name="check_incomplete_work">
|
|
62
|
+
Look for incomplete work that needs attention:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# Check for continue-here files (mid-plan resumption)
|
|
66
|
+
ls .blueprint/phases/*/.continue-here*.md 2>/dev/null
|
|
67
|
+
|
|
68
|
+
# Check for plans without summaries (incomplete execution)
|
|
69
|
+
for plan in .blueprint/phases/*/*-PLAN.md; do
|
|
70
|
+
summary="${plan/PLAN/SUMMARY}"
|
|
71
|
+
[ ! -f "$summary" ] && echo "Incomplete: $plan"
|
|
72
|
+
done 2>/dev/null
|
|
73
|
+
|
|
74
|
+
# Check for interrupted agents (use has_interrupted_agent and interrupted_agent_id from init)
|
|
75
|
+
if [ "$has_interrupted_agent" = "true" ]; then
|
|
76
|
+
echo "Interrupted agent: $interrupted_agent_id"
|
|
77
|
+
fi
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**If .continue-here file exists:**
|
|
81
|
+
|
|
82
|
+
- This is a mid-plan resumption point
|
|
83
|
+
- Read the file for specific resumption context
|
|
84
|
+
- Flag: "Found mid-plan checkpoint"
|
|
85
|
+
|
|
86
|
+
**If PLAN without SUMMARY exists:**
|
|
87
|
+
|
|
88
|
+
- Execution was started but not completed
|
|
89
|
+
- Flag: "Found incomplete plan execution"
|
|
90
|
+
|
|
91
|
+
**If interrupted agent found:**
|
|
92
|
+
|
|
93
|
+
- Subagent was spawned but session ended before completion
|
|
94
|
+
- Read agent-history.json for task details
|
|
95
|
+
- Flag: "Found interrupted agent"
|
|
96
|
+
</step>
|
|
97
|
+
|
|
98
|
+
<step name="present_status">
|
|
99
|
+
Present complete project status to user:
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
103
|
+
║ PROJECT STATUS ║
|
|
104
|
+
╠══════════════════════════════════════════════════════════════╣
|
|
105
|
+
║ Building: [one-liner from PROJECT.md "What This Is"] ║
|
|
106
|
+
║ ║
|
|
107
|
+
║ Phase: [X] of [Y] - [Phase name] ║
|
|
108
|
+
║ Plan: [A] of [B] - [Status] ║
|
|
109
|
+
║ Progress: [██████░░░░] XX% ║
|
|
110
|
+
║ ║
|
|
111
|
+
║ Last activity: [date] - [what happened] ║
|
|
112
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
113
|
+
|
|
114
|
+
[If incomplete work found:]
|
|
115
|
+
⚠️ Incomplete work detected:
|
|
116
|
+
- [.continue-here file or incomplete plan]
|
|
117
|
+
|
|
118
|
+
[If interrupted agent found:]
|
|
119
|
+
⚠️ Interrupted agent detected:
|
|
120
|
+
Agent ID: [id]
|
|
121
|
+
Task: [task description from agent-history.json]
|
|
122
|
+
Interrupted: [timestamp]
|
|
123
|
+
|
|
124
|
+
Resume with: Task tool (resume parameter with agent ID)
|
|
125
|
+
|
|
126
|
+
[If pending todos exist:]
|
|
127
|
+
📋 [N] pending todos — /bp:check-todos to review
|
|
128
|
+
|
|
129
|
+
[If blockers exist:]
|
|
130
|
+
⚠️ Carried concerns:
|
|
131
|
+
- [blocker 1]
|
|
132
|
+
- [blocker 2]
|
|
133
|
+
|
|
134
|
+
[If alignment is not ✓:]
|
|
135
|
+
⚠️ Brief alignment: [status] - [assessment]
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
</step>
|
|
139
|
+
|
|
140
|
+
<step name="determine_next_action">
|
|
141
|
+
Based on project state, determine the most logical next action:
|
|
142
|
+
|
|
143
|
+
**If interrupted agent exists:**
|
|
144
|
+
→ Primary: Resume interrupted agent (Task tool with resume parameter)
|
|
145
|
+
→ Option: Start fresh (abandon agent work)
|
|
146
|
+
|
|
147
|
+
**If .continue-here file exists:**
|
|
148
|
+
→ Primary: Resume from checkpoint
|
|
149
|
+
→ Option: Start fresh on current plan
|
|
150
|
+
|
|
151
|
+
**If incomplete plan (PLAN without SUMMARY):**
|
|
152
|
+
→ Primary: Complete the incomplete plan
|
|
153
|
+
→ Option: Abandon and move on
|
|
154
|
+
|
|
155
|
+
**If phase in progress, all plans complete:**
|
|
156
|
+
→ Primary: Transition to next phase
|
|
157
|
+
→ Option: Review completed work
|
|
158
|
+
|
|
159
|
+
**If phase ready to plan:**
|
|
160
|
+
→ Check if CONTEXT.md exists for this phase:
|
|
161
|
+
|
|
162
|
+
- If CONTEXT.md missing:
|
|
163
|
+
→ Primary: Discuss phase vision (how user imagines it working)
|
|
164
|
+
→ Secondary: Plan directly (skip context gathering)
|
|
165
|
+
- If CONTEXT.md exists:
|
|
166
|
+
→ Primary: Plan the phase
|
|
167
|
+
→ Option: Review roadmap
|
|
168
|
+
|
|
169
|
+
**If phase ready to execute:**
|
|
170
|
+
→ Primary: Execute next plan
|
|
171
|
+
→ Option: Review the plan first
|
|
172
|
+
</step>
|
|
173
|
+
|
|
174
|
+
<step name="offer_options">
|
|
175
|
+
Present contextual options based on project state:
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
What would you like to do?
|
|
179
|
+
|
|
180
|
+
[Primary action based on state - e.g.:]
|
|
181
|
+
1. Resume interrupted agent [if interrupted agent found]
|
|
182
|
+
OR
|
|
183
|
+
1. Execute phase (/bp:execute-phase {phase})
|
|
184
|
+
OR
|
|
185
|
+
1. Discuss Phase 3 context (/bp:discuss-phase 3) [if CONTEXT.md missing]
|
|
186
|
+
OR
|
|
187
|
+
1. Plan Phase 3 (/bp:plan-phase 3) [if CONTEXT.md exists or discuss option declined]
|
|
188
|
+
|
|
189
|
+
[Secondary options:]
|
|
190
|
+
2. Review current phase status
|
|
191
|
+
3. Check pending todos ([N] pending)
|
|
192
|
+
4. Review brief alignment
|
|
193
|
+
5. Something else
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
**Note:** When offering phase planning, check for CONTEXT.md existence first:
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
ls .blueprint/phases/XX-name/*-CONTEXT.md 2>/dev/null
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
If missing, suggest discuss-phase before plan. If exists, offer plan directly.
|
|
203
|
+
|
|
204
|
+
Wait for user selection.
|
|
205
|
+
</step>
|
|
206
|
+
|
|
207
|
+
<step name="route_to_workflow">
|
|
208
|
+
Based on user selection, route to appropriate workflow:
|
|
209
|
+
|
|
210
|
+
- **Execute plan** → Show command for user to run after clearing:
|
|
211
|
+
```
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## ▶ Next Up
|
|
215
|
+
|
|
216
|
+
**{phase}-{plan}: [Plan Name]** — [objective from PLAN.md]
|
|
217
|
+
|
|
218
|
+
`/bp:execute-phase {phase}`
|
|
219
|
+
|
|
220
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
```
|
|
224
|
+
- **Plan phase** → Show command for user to run after clearing:
|
|
225
|
+
```
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## ▶ Next Up
|
|
229
|
+
|
|
230
|
+
**Phase [N]: [Name]** — [Goal from ROADMAP.md]
|
|
231
|
+
|
|
232
|
+
`/bp:plan-phase [phase-number]`
|
|
233
|
+
|
|
234
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
**Also available:**
|
|
239
|
+
- `/bp:discuss-phase [N]` — gather context first
|
|
240
|
+
- `/bp:research-phase [N]` — investigate unknowns
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
```
|
|
244
|
+
- **Transition** → ./transition.md
|
|
245
|
+
- **Check todos** → Read .blueprint/todos/pending/, present summary
|
|
246
|
+
- **Review alignment** → Read PROJECT.md, compare to current state
|
|
247
|
+
- **Something else** → Ask what they need
|
|
248
|
+
</step>
|
|
249
|
+
|
|
250
|
+
<step name="update_session">
|
|
251
|
+
Before proceeding to routed workflow, update session continuity:
|
|
252
|
+
|
|
253
|
+
Update STATE.md:
|
|
254
|
+
|
|
255
|
+
```markdown
|
|
256
|
+
## Session Continuity
|
|
257
|
+
|
|
258
|
+
Last session: [now]
|
|
259
|
+
Stopped at: Session resumed, proceeding to [action]
|
|
260
|
+
Resume file: [updated if applicable]
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
This ensures if session ends unexpectedly, next resume knows the state.
|
|
264
|
+
</step>
|
|
265
|
+
|
|
266
|
+
</process>
|
|
267
|
+
|
|
268
|
+
<reconstruction>
|
|
269
|
+
If STATE.md is missing but other artifacts exist:
|
|
270
|
+
|
|
271
|
+
"STATE.md missing. Reconstructing from artifacts..."
|
|
272
|
+
|
|
273
|
+
1. Read PROJECT.md → Extract "What This Is" and Core Value
|
|
274
|
+
2. Read ROADMAP.md → Determine phases, find current position
|
|
275
|
+
3. Scan \*-SUMMARY.md files → Extract decisions, concerns
|
|
276
|
+
4. Count pending todos in .blueprint/todos/pending/
|
|
277
|
+
5. Check for .continue-here files → Session continuity
|
|
278
|
+
|
|
279
|
+
Reconstruct and write STATE.md, then proceed normally.
|
|
280
|
+
|
|
281
|
+
This handles cases where:
|
|
282
|
+
|
|
283
|
+
- Project predates STATE.md introduction
|
|
284
|
+
- File was accidentally deleted
|
|
285
|
+
- Cloning repo without full .blueprint/ state
|
|
286
|
+
</reconstruction>
|
|
287
|
+
|
|
288
|
+
<quick_resume>
|
|
289
|
+
If user says "continue" or "go":
|
|
290
|
+
- Load state silently
|
|
291
|
+
- Determine primary action
|
|
292
|
+
- Execute immediately without presenting options
|
|
293
|
+
|
|
294
|
+
"Continuing from [state]... [action]"
|
|
295
|
+
</quick_resume>
|
|
296
|
+
|
|
297
|
+
<success_criteria>
|
|
298
|
+
Resume is complete when:
|
|
299
|
+
|
|
300
|
+
- [ ] STATE.md loaded (or reconstructed)
|
|
301
|
+
- [ ] Incomplete work detected and flagged
|
|
302
|
+
- [ ] Clear status presented to user
|
|
303
|
+
- [ ] Contextual next actions offered
|
|
304
|
+
- [ ] User knows exactly where project stands
|
|
305
|
+
- [ ] Session continuity updated
|
|
306
|
+
</success_criteria>
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Switch the model profile used by Blueprint agents. Controls which Claude model each agent uses, balancing quality vs token spend.
|
|
3
|
+
</purpose>
|
|
4
|
+
|
|
5
|
+
<required_reading>
|
|
6
|
+
Read all files referenced by the invoking prompt's execution_context before starting.
|
|
7
|
+
</required_reading>
|
|
8
|
+
|
|
9
|
+
<process>
|
|
10
|
+
|
|
11
|
+
<step name="validate">
|
|
12
|
+
Validate argument:
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
if $ARGUMENTS.profile not in ["quality", "balanced", "budget"]:
|
|
16
|
+
Error: Invalid profile "$ARGUMENTS.profile"
|
|
17
|
+
Valid profiles: quality, balanced, budget
|
|
18
|
+
EXIT
|
|
19
|
+
```
|
|
20
|
+
</step>
|
|
21
|
+
|
|
22
|
+
<step name="ensure_and_load_config">
|
|
23
|
+
Ensure config exists and load current state:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
node ~/.claude/blueprint/bin/blueprint-tools.js config-ensure-section
|
|
27
|
+
INIT=$(node ~/.claude/blueprint/bin/blueprint-tools.js state load)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
This creates `.blueprint/config.json` with defaults if missing and loads current config.
|
|
31
|
+
</step>
|
|
32
|
+
|
|
33
|
+
<step name="update_config">
|
|
34
|
+
Read current config from state load or directly:
|
|
35
|
+
|
|
36
|
+
Update `model_profile` field:
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"model_profile": "$ARGUMENTS.profile"
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Write updated config back to `.blueprint/config.json`.
|
|
44
|
+
</step>
|
|
45
|
+
|
|
46
|
+
<step name="confirm">
|
|
47
|
+
Display confirmation with model table for selected profile:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
✓ Model profile set to: $ARGUMENTS.profile
|
|
51
|
+
|
|
52
|
+
Agents will now use:
|
|
53
|
+
|
|
54
|
+
[Show table from MODEL_PROFILES in blueprint-tools.js for selected profile]
|
|
55
|
+
|
|
56
|
+
Example:
|
|
57
|
+
| Agent | Model |
|
|
58
|
+
|-------|-------|
|
|
59
|
+
| bp-planner | opus |
|
|
60
|
+
| bp-executor | sonnet |
|
|
61
|
+
| bp-verifier | haiku |
|
|
62
|
+
| ... | ... |
|
|
63
|
+
|
|
64
|
+
Next spawned agents will use the new profile.
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Map profile names:
|
|
68
|
+
- quality: use "quality" column from MODEL_PROFILES
|
|
69
|
+
- balanced: use "balanced" column from MODEL_PROFILES
|
|
70
|
+
- budget: use "budget" column from MODEL_PROFILES
|
|
71
|
+
</step>
|
|
72
|
+
|
|
73
|
+
</process>
|
|
74
|
+
|
|
75
|
+
<success_criteria>
|
|
76
|
+
- [ ] Argument validated
|
|
77
|
+
- [ ] Config file ensured
|
|
78
|
+
- [ ] Config updated with new model_profile
|
|
79
|
+
- [ ] Confirmation displayed with model table
|
|
80
|
+
</success_criteria>
|