pi subagents and workflow skill plus HA

This commit is contained in:
2026-03-28 22:00:48 +01:00
parent 6514c8a319
commit b15689b73c
20 changed files with 1243 additions and 25 deletions

View File

@@ -0,0 +1,39 @@
---
description: "Maximum quality pipeline — deep scout, Max planning, Opus plan review, approval gate, Sonnet coding, Opus code review"
---
Use the subagent tool to implement with maximum quality. This is for high-risk or architecturally significant changes.
## Step 1: Deep scout + Plan + Plan review
```
{ chain: [
{ agent: "deep-scout", task: "Thoroughly investigate all code relevant to: $@" },
{ agent: "planner", task: "Create a detailed implementation plan for: $@\n\nDeep context:\n\n{previous}" },
{ agent: "plan-reviewer", task: "Review this plan critically. Verify all file paths, line numbers, and assumptions against the codebase. Check for missing steps, edge cases, and risks.\n\n{previous}" }
]}
```
## Step 2: APPROVAL GATE
**STOP. Present the plan and the Opus review to the user.**
Show clearly:
- The implementation plan (steps, files, risks)
- Opus's verdict and any issues found
- Ask: "Approve this plan, or want changes?"
Do NOT proceed until the user explicitly approves.
If the user requests changes, revise the plan and present again.
## Step 3: Implement (only after approval)
- Use "coder-claude" (Sonnet 4.6) for the implementation steps
- For multiple independent steps, run them in parallel using separate coder-claude tasks
## Step 4: Opus review
Run the "reviewer" agent on all changes.
## Step 5: Fix
If the reviewer says NEEDS_FIXES, run the "fixer" agent with the review output.
## Step 6: Report
Summarize everything: what was planned, what was implemented, what was reviewed, what was fixed, and any remaining concerns.

View File

@@ -0,0 +1,54 @@
---
description: "Adaptive implementation workflow — routes, plans, waits for approval, then implements"
---
Use the subagent tool to implement the following task. The workflow is ADAPTIVE — first evaluate, then plan, get user approval, then execute.
## Step 1: Route
Run the "router" agent with this task: $@
The router will return a classification (SMALL, MEDIUM, LARGE, or HUGE).
## Step 2: Execute based on classification
### If SMALL:
Run a single "coder" agent. No planning or review needed.
After implementation, present what was done. Done.
### If MEDIUM:
Run the "scout" agent, then the "planner" agent as a chain.
**STOP. Present the plan to the user and ask for approval before continuing.**
Once approved (user says ok, go, approved, looks good, etc):
- Run the "coder" agent to implement the plan
- Run "reviewer-quick" on the result
- If NEEDS_FIXES, run the "fixer" agent
### If LARGE:
Run a chain: "scout" → "planner" → "plan-reviewer"
**STOP. Present the plan AND the Opus review to the user. Ask for approval before continuing.**
Once approved:
- Execute the plan steps using "coder" for sequential steps, or "coder-parallel" with parallel tasks if the plan identified parallelizable steps
- Run the "reviewer" agent on all changes
- If NEEDS_FIXES, run the "fixer" agent
If the user requests changes to the plan, revise and present again before implementing.
### If HUGE:
Same as LARGE but use "deep-scout" instead of "scout", and prefer parallel execution with "coder-parallel" for independent steps.
**STOP after planning. Same approval gate as LARGE.**
## Important
- **NEVER skip the approval gate** for MEDIUM, LARGE, or HUGE tasks. Always present the plan and wait.
- When presenting the plan, format it clearly. Highlight: what will change, which files, risks, and the Opus review verdict (if applicable).
- If the user says "with changes" or gives feedback, revise the plan and present again.
- Always pass scout/planner context forward using {previous} in chain mode.
- For parallel coder tasks, clearly assign each coder to specific files to avoid conflicts.
- If any step fails, report what happened and stop.
- After the final step, summarize: what was done, what files changed, what was reviewed, and any remaining concerns.

View File

@@ -0,0 +1,15 @@
---
description: "Scout + plan + Opus plan review — no implementation"
---
Use the subagent tool with a chain to plan (but NOT implement) the following:
```
{ chain: [
{ agent: "scout", task: "Find all code relevant to: $@" },
{ agent: "planner", task: "Create a detailed implementation plan for: $@\n\nContext from scout:\n\n{previous}" },
{ agent: "plan-reviewer", task: "Review this implementation plan. Verify file paths and line numbers against the actual codebase.\n\n{previous}" }
]}
```
Present the plan and the review to me. Do NOT proceed to implementation.

View File

@@ -0,0 +1,10 @@
---
description: "Opus code review on recent changes or specified files"
---
Use the subagent tool to run the "reviewer" agent with this task:
Review the following: $@
If no specific files are mentioned, review recent git changes (`git diff` and `git diff --staged`).
Report the review results. If the verdict is NEEDS_FIXES, ask if I want you to run the "fixer" agent to apply them.