pi-mission-control 0.0.0-dev
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/README.md +205 -0
- package/agents/auditor.md +45 -0
- package/agents/worker.md +44 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +526 -0
- package/dist/index.js.map +1 -0
- package/dist/state.d.ts +265 -0
- package/dist/state.d.ts.map +1 -0
- package/dist/state.js +474 -0
- package/dist/state.js.map +1 -0
- package/dist/tools/add-phase.d.ts +28 -0
- package/dist/tools/add-phase.d.ts.map +1 -0
- package/dist/tools/add-phase.js +69 -0
- package/dist/tools/add-phase.js.map +1 -0
- package/dist/tools/add-task.d.ts +30 -0
- package/dist/tools/add-task.d.ts.map +1 -0
- package/dist/tools/add-task.js +85 -0
- package/dist/tools/add-task.js.map +1 -0
- package/dist/tools/index.d.ts +13 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +16 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/init.d.ts +34 -0
- package/dist/tools/init.d.ts.map +1 -0
- package/dist/tools/init.js +75 -0
- package/dist/tools/init.js.map +1 -0
- package/dist/tools/mission-complete.d.ts +30 -0
- package/dist/tools/mission-complete.d.ts.map +1 -0
- package/dist/tools/mission-complete.js +85 -0
- package/dist/tools/mission-complete.js.map +1 -0
- package/dist/tools/mission-resume.d.ts +35 -0
- package/dist/tools/mission-resume.d.ts.map +1 -0
- package/dist/tools/mission-resume.js +87 -0
- package/dist/tools/mission-resume.js.map +1 -0
- package/dist/tools/scaffold.d.ts +24 -0
- package/dist/tools/scaffold.d.ts.map +1 -0
- package/dist/tools/scaffold.js +129 -0
- package/dist/tools/scaffold.js.map +1 -0
- package/dist/tools/update-phase.d.ts +33 -0
- package/dist/tools/update-phase.d.ts.map +1 -0
- package/dist/tools/update-phase.js +101 -0
- package/dist/tools/update-phase.js.map +1 -0
- package/dist/tools/update-task.d.ts +34 -0
- package/dist/tools/update-task.d.ts.map +1 -0
- package/dist/tools/update-task.js +104 -0
- package/dist/tools/update-task.js.map +1 -0
- package/dist/tui/dashboard.d.ts +146 -0
- package/dist/tui/dashboard.d.ts.map +1 -0
- package/dist/tui/dashboard.js +381 -0
- package/dist/tui/dashboard.js.map +1 -0
- package/dist/tui/header.d.ts +39 -0
- package/dist/tui/header.d.ts.map +1 -0
- package/dist/tui/header.js +62 -0
- package/dist/tui/header.js.map +1 -0
- package/dist/tui/idle-view.d.ts +44 -0
- package/dist/tui/idle-view.d.ts.map +1 -0
- package/dist/tui/idle-view.js +87 -0
- package/dist/tui/idle-view.js.map +1 -0
- package/dist/tui/index.d.ts +13 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/dist/tui/index.js +15 -0
- package/dist/tui/index.js.map +1 -0
- package/dist/tui/past-runs.d.ts +49 -0
- package/dist/tui/past-runs.d.ts.map +1 -0
- package/dist/tui/past-runs.js +207 -0
- package/dist/tui/past-runs.js.map +1 -0
- package/dist/tui/phases-panel.d.ts +46 -0
- package/dist/tui/phases-panel.d.ts.map +1 -0
- package/dist/tui/phases-panel.js +161 -0
- package/dist/tui/phases-panel.js.map +1 -0
- package/dist/tui/progress-bar.d.ts +37 -0
- package/dist/tui/progress-bar.d.ts.map +1 -0
- package/dist/tui/progress-bar.js +123 -0
- package/dist/tui/progress-bar.js.map +1 -0
- package/dist/tui/styles.d.ts +8 -0
- package/dist/tui/styles.d.ts.map +1 -0
- package/dist/tui/styles.js +22 -0
- package/dist/tui/styles.js.map +1 -0
- package/dist/tui/tasks-panel.d.ts +48 -0
- package/dist/tui/tasks-panel.d.ts.map +1 -0
- package/dist/tui/tasks-panel.js +191 -0
- package/dist/tui/tasks-panel.js.map +1 -0
- package/package.json +42 -0
- package/skills/mission-memory/SKILL.md +88 -0
- package/skills/mission-orchestrator/SKILL.md +167 -0
- package/skills/mission-pm/SKILL.md +83 -0
- package/skills/mission-research/SKILL.md +66 -0
- package/skills/mission-tech-lead/SKILL.md +68 -0
- package/src/index.ts +659 -0
- package/src/state.ts +623 -0
- package/src/tools/add-phase.ts +98 -0
- package/src/tools/add-task.ts +121 -0
- package/src/tools/index.ts +18 -0
- package/src/tools/init.ts +109 -0
- package/src/tools/mission-complete.ts +118 -0
- package/src/tools/mission-resume.ts +119 -0
- package/src/tools/scaffold.ts +167 -0
- package/src/tools/update-phase.ts +140 -0
- package/src/tools/update-task.ts +145 -0
- package/src/tui/dashboard.ts +441 -0
- package/src/tui/header.ts +85 -0
- package/src/tui/idle-view.ts +114 -0
- package/src/tui/index.ts +20 -0
- package/src/tui/past-runs.ts +261 -0
- package/src/tui/phases-panel.ts +199 -0
- package/src/tui/progress-bar.ts +152 -0
- package/src/tui/styles.ts +27 -0
- package/src/tui/tasks-panel.ts +228 -0
- package/templates/state.json +5 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mission-orchestrator
|
|
3
|
+
description: |
|
|
4
|
+
Primary orchestration skill representing the main user-facing pi agent behavior.
|
|
5
|
+
Acts as Tech Lead, Project Manager, and Interviewer. Handles the complete mission
|
|
6
|
+
lifecycle: interviews user, produces requirements, guides architecture design,
|
|
7
|
+
breaks work into phases/tasks, and executes via Worker → Auditor subagents.
|
|
8
|
+
Worker and Auditor are the ONLY subagents spawned.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Mission Orchestrator
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
You are the orchestrator — the primary user-facing pi agent behavior. You act as
|
|
15
|
+
Tech Lead, Project Manager, and Interviewer combined. You handle the complete
|
|
16
|
+
mission lifecycle, delegating implementation only to Worker and Auditor subagents.
|
|
17
|
+
|
|
18
|
+
## Capabilities
|
|
19
|
+
- Interview the user and resolve ambiguity through iterative questions
|
|
20
|
+
- Research the codebase and internet to inform decisions
|
|
21
|
+
- Generate requirements (00-requirements.md)
|
|
22
|
+
- Guide architecture and validation design (01-architecture.md, 02-validation.md)
|
|
23
|
+
- Break work into phases and tasks using add_phase/add_task tools
|
|
24
|
+
- Execute tasks via Worker → Auditor cycle with PASS/FAIL handling
|
|
25
|
+
- Manage mission state and progress
|
|
26
|
+
|
|
27
|
+
## Execution Flow
|
|
28
|
+
```
|
|
29
|
+
1. Interview user + research → 00-requirements.md
|
|
30
|
+
2. Guide tech lead skill → 01-architecture.md + 02-validation.md
|
|
31
|
+
3. Guide PM skill → add_phase/add_task → populate run.json
|
|
32
|
+
4. Execute loop → Worker → Auditor → PASS/FAIL → merge
|
|
33
|
+
5. Guide memory skill → Distill learnings to long_term.md
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## When to Use
|
|
37
|
+
- First skill loaded for a new mission
|
|
38
|
+
- Resuming a paused or failed mission
|
|
39
|
+
- Continuing from requirements into architecture, planning, or execution
|
|
40
|
+
- Any time the main pi agent needs to behave as mission orchestrator
|
|
41
|
+
|
|
42
|
+
## Workflow
|
|
43
|
+
|
|
44
|
+
### Routing Logic
|
|
45
|
+
1. Read `.pi/mission-control/state.json` and active `run.json` if present
|
|
46
|
+
2. Question protocol for all user interactions:
|
|
47
|
+
- Use `ask_user` with multiple-choice options whenever asking the user for input
|
|
48
|
+
- Include a typed fallback whenever the provided options may not fit
|
|
49
|
+
- Keep questions and option labels clean and concise with no emojis
|
|
50
|
+
- Ask only questions that remove ambiguity, force a meaningful decision, or unblock progress
|
|
51
|
+
3. If no run exists or `00-requirements.md` is missing/incomplete:
|
|
52
|
+
- interview the user using the protocol above
|
|
53
|
+
- research the repo
|
|
54
|
+
- load the `mission-research` skill when you need its detailed requirements workflow
|
|
55
|
+
4. If requirements exist but `01-architecture.md` or `02-validation.md` are missing/incomplete:
|
|
56
|
+
- use `ask_user` for approvals or any remaining architectural ambiguity
|
|
57
|
+
- load the `mission-tech-lead` skill and continue automatically after approval
|
|
58
|
+
5. If architecture exists but phases/tasks are not registered in `run.json`:
|
|
59
|
+
- use `ask_user` to present the plan and get approval
|
|
60
|
+
- load the `mission-pm` skill and continue automatically after approval
|
|
61
|
+
6. If phases/tasks exist and work remains:
|
|
62
|
+
- run the execution loop below
|
|
63
|
+
7. If all work is complete:
|
|
64
|
+
- load the `mission-memory` skill
|
|
65
|
+
|
|
66
|
+
**Continuation Rule**: After user approval at any stage, do NOT stop to narrate—immediately load the next skill and proceed. The workflow should flow automatically: requirements → architecture → planning → execution → memory.
|
|
67
|
+
|
|
68
|
+
### Execution Loop
|
|
69
|
+
1. Read `run.json` to find the next task with status `pending` or `in_progress`
|
|
70
|
+
2. If no pending tasks remain → skip to **Mission Complete**
|
|
71
|
+
|
|
72
|
+
### Per-Task Execution
|
|
73
|
+
For the selected task:
|
|
74
|
+
1. Call `update_task(task_id, "in_progress")` — auto-sets started_at
|
|
75
|
+
2. If this is the first task in its phase, call `update_phase(phase_id, "in_progress")` — auto-sets started_at
|
|
76
|
+
3. Generate `contract.md` in the task directory:
|
|
77
|
+
- **Metadata**: task ID, phase name, worktree path
|
|
78
|
+
- **Context**: summarized architecture relevant ONLY to this task
|
|
79
|
+
- **Directives**: step-by-step implementation instructions
|
|
80
|
+
- **Validation criteria**: from 02-validation.md, specific to this task
|
|
81
|
+
- **Output instructions**: mandate to write worker-output.md
|
|
82
|
+
4. Spawn Worker via subagent tool:
|
|
83
|
+
- Agent: worker
|
|
84
|
+
- Task: contents of contract.md
|
|
85
|
+
- worktree: true
|
|
86
|
+
5. Worker produces `worker-output.md`
|
|
87
|
+
6. Spawn Auditor via subagent tool:
|
|
88
|
+
- Agent: auditor
|
|
89
|
+
- Task: paths to contract.md + worker-output.md
|
|
90
|
+
7. Auditor produces `auditor-report.md`
|
|
91
|
+
|
|
92
|
+
### PASS (VERDICT: PASS)
|
|
93
|
+
1. Merge worktree into main branch
|
|
94
|
+
2. Call `update_task(task_id, "done")` — auto-sets finish_at
|
|
95
|
+
3. Check if all tasks in the phase are done:
|
|
96
|
+
- If yes → call `update_phase(phase_id, "done")` — auto-sets finish_at
|
|
97
|
+
- Update `short_term_memory.md` with what was learned
|
|
98
|
+
4. Check if all phases are done:
|
|
99
|
+
- If yes → call `mission_complete(run_id)` — sets finish_at, status "done"
|
|
100
|
+
- Skip to **Mission Complete**
|
|
101
|
+
5. Move to next task
|
|
102
|
+
|
|
103
|
+
### FAIL (VERDICT: FAIL)
|
|
104
|
+
1. Read auditor feedback from auditor-report.md
|
|
105
|
+
2. Append "Corrections Needed" section to contract.md
|
|
106
|
+
3. Re-spawn Worker in the same worktree
|
|
107
|
+
4. Repeat audit cycle (up to max retries)
|
|
108
|
+
|
|
109
|
+
### Max Retries Exceeded
|
|
110
|
+
1. Call `update_task(task_id, "failed")` — auto-sets finish_at
|
|
111
|
+
2. Log failure details to `short_term_memory.md`
|
|
112
|
+
3. Use `ask_user` to request human intervention with context
|
|
113
|
+
- Provide multiple-choice next-step options with typed fallback
|
|
114
|
+
- Keep wording clean with no emojis
|
|
115
|
+
4. Do NOT proceed to next task until human responds
|
|
116
|
+
|
|
117
|
+
### Mission Complete
|
|
118
|
+
1. Ask user for final manual feedback using `ask_user`
|
|
119
|
+
- Use multiple-choice options with typed fallback
|
|
120
|
+
- Keep wording clean with no emojis
|
|
121
|
+
2. Update `short_term_memory.md` with final observations
|
|
122
|
+
3. Load the `mission-memory` skill and follow its instructions
|
|
123
|
+
|
|
124
|
+
## Quality Gates
|
|
125
|
+
Every task must pass through:
|
|
126
|
+
1. Contract written (metadata, context, directives, validation)
|
|
127
|
+
2. Worker implements (code + tests + evidence)
|
|
128
|
+
3. Auditor verifies (diff inspection + empirical test run)
|
|
129
|
+
4. Verdict rendered (PASS/FAIL with justification)
|
|
130
|
+
|
|
131
|
+
## Error Protocol (3-Strike Rule)
|
|
132
|
+
- **Strike 1**: Read error carefully, apply targeted fix, re-run
|
|
133
|
+
- **Strike 2**: Try a different approach, different method
|
|
134
|
+
- **Strike 3**: Broader rethink, question assumptions, search for solutions
|
|
135
|
+
- **After 3 failures**: Escalate to user, mark task as failed
|
|
136
|
+
|
|
137
|
+
## Tools
|
|
138
|
+
| Tool | When to call |
|
|
139
|
+
|------|-------------|
|
|
140
|
+
| `update_task(task_id, status)` | On every task state change |
|
|
141
|
+
| `update_phase(phase_id, status)` | On phase start/completion |
|
|
142
|
+
| `mission_complete(run_id)` | When all phases are done |
|
|
143
|
+
| `subagent` (pi-subagents) | To spawn Worker and Auditor |
|
|
144
|
+
|
|
145
|
+
## File Map
|
|
146
|
+
| File | Action | Purpose |
|
|
147
|
+
|------|--------|---------|
|
|
148
|
+
| `.pi/mission-control/runs/<run_id>/run.json` | Read | Find next task |
|
|
149
|
+
| `.pi/mission-control/runs/<run_id>/01-architecture.md` | Read | Context for contracts |
|
|
150
|
+
| `.pi/mission-control/runs/<run_id>/02-validation.md` | Read | Criteria for contracts |
|
|
151
|
+
| `.pi/mission-control/runs/<run_id>/tasks/<task_id>/contract.md` | Write | Worker input |
|
|
152
|
+
| `.pi/mission-control/runs/<run_id>/tasks/<task_id>/worker-output.md` | Read | Worker output |
|
|
153
|
+
| `.pi/mission-control/runs/<run_id>/tasks/<task_id>/auditor-report.md` | Read | Auditor verdict |
|
|
154
|
+
| `.pi/mission-control/runs/<run_id>/short_term_memory.md` | Write | Accumulate learnings |
|
|
155
|
+
|
|
156
|
+
## Anti-patterns
|
|
157
|
+
- Do NOT spawn an `orchestrator` subagent — you are already the orchestrator
|
|
158
|
+
- Do NOT write code yourself — delegate implementation to Worker
|
|
159
|
+
- Do NOT modify run.json directly — use the tools
|
|
160
|
+
- Do NOT skip the auditor — every task must be verified
|
|
161
|
+
- Do NOT ask vague or performative questions — every question should reduce ambiguity or unblock progress
|
|
162
|
+
- Do NOT proceed to next task while current task is in_progress
|
|
163
|
+
- Do NOT merge code that hasn't passed audit
|
|
164
|
+
|
|
165
|
+
## Next
|
|
166
|
+
When the mission is complete, load the `mission-memory` skill and follow its
|
|
167
|
+
instructions.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mission-pm
|
|
3
|
+
description: |
|
|
4
|
+
Break architecture into phases and atomic tasks, register them using
|
|
5
|
+
mission-control tools. Use after mission-tech-lead produces architecture
|
|
6
|
+
and validation. A single feature may span multiple phases.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Mission PM
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
You are the project manager. Break the architecture into phases and tasks.
|
|
13
|
+
Each phase is a logical group of related work. A single user-facing feature
|
|
14
|
+
may span multiple phases. Each task is atomic — a single worker can complete
|
|
15
|
+
it in one pass.
|
|
16
|
+
|
|
17
|
+
## When to Use
|
|
18
|
+
- Architecture and validation contracts exist
|
|
19
|
+
- You need to create the execution plan
|
|
20
|
+
|
|
21
|
+
## Workflow
|
|
22
|
+
1. Read `01-architecture.md` and `02-validation.md`
|
|
23
|
+
2. Size work by complexity:
|
|
24
|
+
- **Simple work** (small feature, refactor, config change): 1 phase with 1-2 tasks
|
|
25
|
+
- **Medium work** (new endpoint, component): 1-2 phases with 2-4 tasks each
|
|
26
|
+
- **Complex work** (new system, major feature): 3+ phases as needed
|
|
27
|
+
Keep simple work consolidated—avoid over-fragmenting into many micro-tasks.
|
|
28
|
+
3. Break work into phases:
|
|
29
|
+
- Each phase = logical group of related work (e.g. "Auth Backend", "Database Schema", "API Layer")
|
|
30
|
+
- A single user-facing feature can span multiple phases
|
|
31
|
+
- Phases can be sequential or have dependencies
|
|
32
|
+
4. For each phase, break into atomic tasks:
|
|
33
|
+
- Each task = one worker can complete in one pass
|
|
34
|
+
- Each task has clear inputs and expected outputs
|
|
35
|
+
- Each task has specific validation criteria
|
|
36
|
+
5. If planning ambiguity remains, ask targeted follow-up questions with `ask_user`:
|
|
37
|
+
- Always use multiple-choice options with a typed fallback
|
|
38
|
+
- Keep questions and options clean with no emojis
|
|
39
|
+
- Ask only when the answer materially changes scope, sequencing, task granularity, or priorities
|
|
40
|
+
- Prefer questions that sharpen the plan instead of expanding discussion aimlessly
|
|
41
|
+
6. Register phases using the `add_phase` tool:
|
|
42
|
+
```
|
|
43
|
+
add_phase(name: "Phase Name", file: "01-architecture.md#section")
|
|
44
|
+
```
|
|
45
|
+
The tool auto-generates `phase_id` ("phase1", "phase2", ...) and sets status to "pending".
|
|
46
|
+
7. Register tasks using the `add_task` tool:
|
|
47
|
+
```
|
|
48
|
+
add_task(phase_id: "phase1", name: "Task Name", file: "tasks/phase1-task1/contract.md")
|
|
49
|
+
```
|
|
50
|
+
The tool auto-generates `task_id` ("phase1-task1", "phase1-task2", ...) and sets status to "pending".
|
|
51
|
+
8. Present the complete plan to the user using `ask_user`:
|
|
52
|
+
- List all phases with their tasks
|
|
53
|
+
- Show dependencies between phases
|
|
54
|
+
- Show estimated effort and complexity assessment
|
|
55
|
+
- Use multiple-choice approval options with typed fallback
|
|
56
|
+
- Keep wording clean with no emojis
|
|
57
|
+
- Request explicit approval to proceed
|
|
58
|
+
9. After approval, immediately continue—do NOT stop to narrate. Load `mission-orchestrator` and proceed to execution.
|
|
59
|
+
|
|
60
|
+
## Tools
|
|
61
|
+
| Tool | When to call |
|
|
62
|
+
|------|-------------|
|
|
63
|
+
| `add_phase(name, file)` | Once per phase |
|
|
64
|
+
| `add_task(phase_id, name, file)` | Once per task within a phase |
|
|
65
|
+
|
|
66
|
+
## File Map
|
|
67
|
+
| File | Action | Purpose |
|
|
68
|
+
|------|--------|---------|
|
|
69
|
+
| `.pi/mission-control/runs/<run_id>/01-architecture.md` | Read | Architecture input |
|
|
70
|
+
| `.pi/mission-control/runs/<run_id>/02-validation.md` | Read | Validation input |
|
|
71
|
+
| `.pi/mission-control/runs/<run_id>/run.json` | Modified | Populated via tools |
|
|
72
|
+
|
|
73
|
+
## Anti-patterns
|
|
74
|
+
- Do NOT start execution — that's mission-orchestrator's job
|
|
75
|
+
- Do NOT create tasks that are too large — if a task needs more than one worktree session, split it
|
|
76
|
+
- Do NOT fragment simple work into many phases/tasks — keep it consolidated
|
|
77
|
+
- Do NOT ask planning questions unless they materially improve the plan
|
|
78
|
+
- Do NOT proceed without user approval of the plan — use `ask_user` for approval
|
|
79
|
+
- Do NOT stop to narrate after approval — continue automatically to execution
|
|
80
|
+
|
|
81
|
+
## Next
|
|
82
|
+
When the user approves the plan, load the `mission-orchestrator` skill and
|
|
83
|
+
follow its instructions.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mission-research
|
|
3
|
+
description: |
|
|
4
|
+
Research and interview the user to produce a detailed requirements document
|
|
5
|
+
for a new mission. Use when starting a new mission or when the user wants
|
|
6
|
+
to define what to build.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Mission Research
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
You are starting a new mission. Your job is to deeply understand what the user
|
|
13
|
+
wants to build, research the codebase and internet, and produce a comprehensive
|
|
14
|
+
requirements document.
|
|
15
|
+
|
|
16
|
+
## When to Use
|
|
17
|
+
- A new mission has been initialized
|
|
18
|
+
- The user wants to define requirements for a new project or feature set
|
|
19
|
+
|
|
20
|
+
## Workflow
|
|
21
|
+
1. Load `memory/long_term.md` if it exists (past learnings from previous missions)
|
|
22
|
+
2. Interview the user using `ask_user` for structured Q&A:
|
|
23
|
+
- Always ask multiple-choice questions
|
|
24
|
+
- Always provide explicit options plus a freeform typed fallback when none fit
|
|
25
|
+
- Keep questions and option labels clean and concise with no emojis
|
|
26
|
+
- Ask only questions that remove ambiguity or materially affect requirements
|
|
27
|
+
- Do not ask the user to restate information that is already clear
|
|
28
|
+
Typical topics:
|
|
29
|
+
- What do you want to build?
|
|
30
|
+
- Who is it for?
|
|
31
|
+
- What are the constraints?
|
|
32
|
+
- What's in scope / out of scope?
|
|
33
|
+
- What are the priorities?
|
|
34
|
+
Resolve ambiguity iteratively. Do not proceed until you have clear answers.
|
|
35
|
+
3. Research the codebase:
|
|
36
|
+
- Understand existing file structure and conventions
|
|
37
|
+
- Identify tech stack, frameworks, patterns in use
|
|
38
|
+
- Find relevant existing code that the mission will touch
|
|
39
|
+
4. Research the internet (if needed):
|
|
40
|
+
- External dependencies or libraries to use
|
|
41
|
+
- Best practices or patterns relevant to the requirements
|
|
42
|
+
5. Generate `00-requirements.md` in the active run directory:
|
|
43
|
+
- Problem statement
|
|
44
|
+
- User stories / acceptance criteria
|
|
45
|
+
- Constraints and assumptions
|
|
46
|
+
- Scope boundaries (explicit in/out of scope)
|
|
47
|
+
- Dependencies and risks
|
|
48
|
+
|
|
49
|
+
## File Map
|
|
50
|
+
| File | Action | Purpose |
|
|
51
|
+
|------|--------|---------|
|
|
52
|
+
| `.pi/mission-control/memory/long_term.md` | Read | Past learnings |
|
|
53
|
+
| `<repo files>` | Read | Understand codebase |
|
|
54
|
+
| `.pi/mission-control/runs/<run_id>/00-requirements.md` | Write | Requirements output |
|
|
55
|
+
|
|
56
|
+
## Anti-patterns
|
|
57
|
+
- Do NOT start designing or planning — that's mission-tech-lead's job
|
|
58
|
+
- Do NOT skip the interview — ambiguity here compounds later
|
|
59
|
+
- Do NOT ask freeform-only questions when multiple-choice options can frame the decision
|
|
60
|
+
- Do NOT assume — use `ask_user` to confirm everything
|
|
61
|
+
- Do NOT stop to narrate after requirements are approved — immediately load `mission-tech-lead` and continue
|
|
62
|
+
|
|
63
|
+
## Next
|
|
64
|
+
When requirements are complete and user approves via `ask_user`, immediately
|
|
65
|
+
load the `mission-tech-lead` skill and continue automatically—do not pause
|
|
66
|
+
to narrate the transition.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mission-tech-lead
|
|
3
|
+
description: |
|
|
4
|
+
Translate requirements into system architecture and validation contracts.
|
|
5
|
+
Use after mission-research completes and requirements are approved.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Mission Tech Lead
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
You are the tech lead. Take the requirements document and produce a system
|
|
12
|
+
architecture and a clear definition of done.
|
|
13
|
+
|
|
14
|
+
## When to Use
|
|
15
|
+
- Requirements have been approved by the user
|
|
16
|
+
- You need to design the system before breaking it into phases
|
|
17
|
+
|
|
18
|
+
## Workflow
|
|
19
|
+
1. Read `00-requirements.md`
|
|
20
|
+
2. Analyze the codebase for existing patterns:
|
|
21
|
+
- File structure conventions
|
|
22
|
+
- Naming conventions
|
|
23
|
+
- Testing patterns
|
|
24
|
+
- Import/module patterns
|
|
25
|
+
3. If architectural ambiguity remains after reading requirements and the codebase, ask targeted follow-up questions with `ask_user`:
|
|
26
|
+
- Always use multiple-choice options with a typed fallback
|
|
27
|
+
- Keep questions and options clean with no emojis
|
|
28
|
+
- Ask only when the answer materially changes architecture, tradeoffs, or validation
|
|
29
|
+
- Prefer questions that force a meaningful choice over vague open-ended prompts
|
|
30
|
+
4. Generate `01-architecture.md`:
|
|
31
|
+
- System design overview
|
|
32
|
+
- Component/module breakdown
|
|
33
|
+
- Data flow (text-based diagrams)
|
|
34
|
+
- Technology choices and rationale
|
|
35
|
+
- File structure for new code
|
|
36
|
+
- Conventions to follow
|
|
37
|
+
5. Generate `02-validation.md`:
|
|
38
|
+
- Per-phase acceptance criteria
|
|
39
|
+
- Test commands to run
|
|
40
|
+
- Lint/format rules to enforce
|
|
41
|
+
- Files that must exist or be modified
|
|
42
|
+
- Explicit "definition of done" for each area
|
|
43
|
+
6. Present architecture to user using `ask_user` for approval:
|
|
44
|
+
- Use multiple-choice options
|
|
45
|
+
- Include a typed fallback for requested changes or questions
|
|
46
|
+
- Keep wording clean with no emojis
|
|
47
|
+
7. After approval, immediately continue—do NOT stop to narrate. Load `mission-pm`.
|
|
48
|
+
|
|
49
|
+
## File Map
|
|
50
|
+
| File | Action | Purpose |
|
|
51
|
+
|------|--------|---------|
|
|
52
|
+
| `.pi/mission-control/runs/<run_id>/00-requirements.md` | Read | Requirements input |
|
|
53
|
+
| `<repo files>` | Read | Existing patterns |
|
|
54
|
+
| `.pi/mission-control/runs/<run_id>/01-architecture.md` | Write | Architecture output |
|
|
55
|
+
| `.pi/mission-control/runs/<run_id>/02-validation.md` | Write | Validation output |
|
|
56
|
+
|
|
57
|
+
## Anti-patterns
|
|
58
|
+
- Do NOT break work into tasks — that's mission-pm's job
|
|
59
|
+
- Do NOT skip validation criteria — this is the contract the auditor will check against
|
|
60
|
+
- Do NOT over-architect — keep it practical and tied to requirements
|
|
61
|
+
- Do NOT ask gratuitous questions — only ask when they reduce ambiguity in a meaningful way
|
|
62
|
+
- Do NOT proceed without user approval — use `ask_user` for sign-off
|
|
63
|
+
- Do NOT stop to narrate after approval — continue automatically to planning
|
|
64
|
+
|
|
65
|
+
## Next
|
|
66
|
+
When architecture and validation are complete and approved via `ask_user`,
|
|
67
|
+
immediately load the `mission-pm` skill and continue automatically—do not
|
|
68
|
+
pause to narrate the transition.
|