-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
feat: add make-plan-v2 and do-v2 skills with 5 competitive enhancements #2070
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,67 @@ | ||||||||||||||||||||||
| --- | ||||||||||||||||||||||
| name: do-v2 | ||||||||||||||||||||||
| description: Execute a phased implementation plan using subagents. Use when asked to execute, run, or carry out a plan — especially one created by make-plan-v2. | ||||||||||||||||||||||
| --- | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # Do Plan | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| You are an ORCHESTRATOR. Deploy subagents to execute *all* work. Do not do the work yourself except to coordinate, route context, and verify that each subagent completed its assigned checklist. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Plan File | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - Read the plan from `plan.md` in the project root at start. | ||||||||||||||||||||||
| - If the plan file cannot be read or is missing, tell the user to run make-plan-v2 first and stop. | ||||||||||||||||||||||
| - Check staleness: compare the plan's `branch` and `commit_sha` frontmatter against the current git branch and HEAD. If they differ, warn the user before proceeding. | ||||||||||||||||||||||
|
Comment on lines
+12
to
+14
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Specify handling for missing staleness fields. Line 14 instructs checking staleness by comparing Additionally, no guidance is provided for handling git command failures (e.g., when executed in a non-git directory). 🔍 Suggested addition after line 13 - If the plan file cannot be read or is missing, tell the user to run make-plan-v2 first and stop.
-- Check staleness: compare the plan's `branch` and `commit_sha` frontmatter against the current git branch and HEAD. If they differ, warn the user before proceeding.
+- Check staleness (if git is available and frontmatter includes `branch` and `commit_sha`):
+ - Run `git branch --show-current` and `git rev-parse HEAD`
+ - If these differ from the frontmatter values, warn the user that the plan may be stale before proceeding
+ - If `branch` or `commit_sha` fields are missing from frontmatter, warn the user that staleness cannot be verified
+ - If git commands fail (e.g., not a git repository), skip staleness check and log a warning📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
| - After each phase, update the plan file: | ||||||||||||||||||||||
| - Set `current_phase` to the next phase number | ||||||||||||||||||||||
| - Set `overall_status` to `in-progress` (or `complete` when all phases are done) | ||||||||||||||||||||||
| - Check off completed tasks (`- [ ]` to `- [x]`) | ||||||||||||||||||||||
|
Comment on lines
+15
to
+18
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Specify error handling for plan file updates. This section instructs updating 📝 Suggested addition - After each phase, update the plan file:
- Set `current_phase` to the next phase number
- Set `overall_status` to `in-progress` (or `complete` when all phases are done)
- Check off completed tasks (`- [ ]` to `- [x]`)
+ - If the plan file cannot be written, warn the user but continue execution (plan state will be stale)📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Execution Protocol | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ### Rules | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - Each phase uses fresh subagents where noted (or when context is large/unclear) | ||||||||||||||||||||||
| - Assign one clear objective per subagent and require evidence (commands run, outputs, files changed) | ||||||||||||||||||||||
| - Do not advance to the next step until the assigned subagent reports completion and the orchestrator confirms it matches the plan | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ### During Each Phase | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Deploy an "Implementation" subagent to: | ||||||||||||||||||||||
| 1. Execute the implementation as specified | ||||||||||||||||||||||
| 2. COPY patterns from documentation, don't invent | ||||||||||||||||||||||
| 3. Cite documentation sources in code comments when using unfamiliar APIs | ||||||||||||||||||||||
| 4. If an API seems missing, STOP and verify — don't assume it exists | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ### After Each Phase | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Deploy subagents for each post-phase responsibility: | ||||||||||||||||||||||
| 1. **Verify must-be-true conditions** — Deploy a "Verification" subagent to check each must-be-true condition using the executable verification commands from the plan | ||||||||||||||||||||||
| 2. **Anti-pattern check** — Deploy an "Anti-pattern" subagent to grep for known bad patterns from the plan | ||||||||||||||||||||||
| 3. **Code quality review** — Deploy a "Code Quality" subagent to review changes | ||||||||||||||||||||||
| 4. **Human gate** — Before deploying the Commit subagent, briefly show the user what changed in this phase (files modified, key changes) and confirm they want to commit | ||||||||||||||||||||||
| 5. **Commit only if verified** — Deploy a "Commit" subagent *only after* verification passes and user confirms; otherwise, do not commit | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ### Between Phases | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Deploy a "Branch/Sync" subagent to: | ||||||||||||||||||||||
| - Push to working branch after each verified phase | ||||||||||||||||||||||
|
Comment on lines
+47
to
+48
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Specify error handling for git push failures. Line 48 instructs pushing to the working branch but doesn't specify what to do if the push fails (e.g., network errors, permission issues, or merge conflicts). Should execution stop, continue with a warning, or retry? 🔄 Suggested addition Deploy a "Branch/Sync" subagent to:
-- Push to working branch after each verified phase
+- Push to working branch after each verified phase:
+ - If push fails, report DONE_WITH_CONCERNS and show the error to the user
+ - User decides whether to retry, continue without pushing, or stop
- Prepare the next phase handoff so the next phase's subagents start fresh but have plan context📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
| - Prepare the next phase handoff so the next phase's subagents start fresh but have plan context | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Subagent Status Protocol | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Each subagent must report one of these statuses: | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - **DONE** — Advance to the next step | ||||||||||||||||||||||
| - **DONE_WITH_CONCERNS** — Show concerns to the user. User decides whether to advance or fix. | ||||||||||||||||||||||
| - **NEEDS_CONTEXT** — Provide additional context and retry once. If still NEEDS_CONTEXT after retry, treat as BLOCKED. | ||||||||||||||||||||||
| - **BLOCKED** — Stop execution and ask the user for guidance. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Failure Modes to Prevent | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - Don't invent APIs that "should" exist — verify against docs | ||||||||||||||||||||||
| - Don't add undocumented parameters — copy exact signatures | ||||||||||||||||||||||
| - Don't skip verification — deploy a verification subagent and run the checklist | ||||||||||||||||||||||
| - Don't commit before verification passes (or without explicit orchestrator approval) | ||||||||||||||||||||||
| - Don't ignore DONE_WITH_CONCERNS — surface every concern to the user before advancing | ||||||||||||||||||||||
| - Don't check task completion — check whether the must-be-true conditions actually hold | ||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,90 @@ | ||||||
| --- | ||||||
| name: make-plan-v2 | ||||||
| description: Create a detailed, phased implementation plan with documentation discovery. Use when asked to plan a feature, task, or multi-step implementation — especially before executing with do-v2. | ||||||
| --- | ||||||
|
|
||||||
| # Make Plan v2 | ||||||
|
|
||||||
| You are an ORCHESTRATOR. Create an LLM-friendly plan in phases that can be executed consecutively in new chat contexts. | ||||||
|
|
||||||
| ## Delegation Model | ||||||
|
|
||||||
| Use subagents for *fact gathering and extraction* (docs, examples, signatures, grep results). Keep *synthesis and plan authoring* with the orchestrator (phase boundaries, task framing, final wording). If a subagent report is incomplete or lacks evidence, re-check with targeted reads/greps before finalizing. | ||||||
|
|
||||||
| ### Subagent Reporting Contract (MANDATORY) | ||||||
|
|
||||||
| Each subagent response must include: | ||||||
| 1. Sources consulted (files/URLs) and what was read | ||||||
| 2. Concrete findings (exact API names/signatures; exact file paths/locations) | ||||||
| 3. Copy-ready snippet locations (example files/sections to copy) | ||||||
| 4. "Confidence" note + known gaps (what might still be missing) | ||||||
| 5. **Status** — one of: | ||||||
| - **DONE** — Task completed successfully with evidence | ||||||
| - **DONE_WITH_CONCERNS** — Completed, but with concerns the orchestrator should surface to the user. User decides whether to advance or fix. | ||||||
| - **NEEDS_CONTEXT** — Cannot complete without additional context. Orchestrator provides context and retries once. If still NEEDS_CONTEXT after retry, escalate to BLOCKED. | ||||||
| - **BLOCKED** — Cannot proceed. Orchestrator stops and asks the user for help. | ||||||
|
|
||||||
| Reject and redeploy the subagent if it reports conclusions without sources. | ||||||
|
|
||||||
| ## Plan Structure | ||||||
|
|
||||||
| ### Phase 0: Documentation Discovery (ALWAYS FIRST) | ||||||
|
|
||||||
| Before planning implementation, deploy "Documentation Discovery" subagents to: | ||||||
| 1. Search for and read relevant documentation, examples, and existing patterns | ||||||
| 2. Identify the actual APIs, methods, and signatures available (not assumed) | ||||||
| 3. Create a brief "Allowed APIs" list citing specific documentation sources | ||||||
| 4. Note any anti-patterns to avoid (methods that DON'T exist, deprecated parameters) | ||||||
|
|
||||||
| The orchestrator consolidates findings into a single Phase 0 output. | ||||||
|
|
||||||
| Each phase must be self-contained enough that a fresh subagent with only the plan file and the codebase can execute it without needing context from prior phases. | ||||||
|
|
||||||
| ### Each Implementation Phase Must Include | ||||||
|
|
||||||
| 1. **What to implement** — Frame tasks to COPY from docs, not transform existing code | ||||||
| - Good: "Copy the V2 session pattern from docs/examples.ts:45-60" | ||||||
| - Bad: "Migrate the existing code to V2" | ||||||
| 2. **Documentation references** — Cite specific files/lines for patterns to follow | ||||||
| 3. **Must-be-true conditions** — What observable conditions must be true for this phase to be considered complete? Frame as outcomes ("the API returns 200 on POST /foo"), not tasks ("the route file was created"). | ||||||
| 4. **Executable verification commands** — Specific commands to run that prove the must-be-true conditions hold (tests, curl commands, grep checks). | ||||||
| 5. **Anti-pattern guards** — What NOT to do (invented APIs, undocumented params) | ||||||
|
Comment on lines
+43
to
+51
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The PR description lists "task sizing constraints" as one of the five headline enhancements, but neither |
||||||
|
|
||||||
| ### Final Phase: Verification | ||||||
|
|
||||||
| 1. Verify all implementations match documentation | ||||||
| 2. Check for anti-patterns (grep for known bad patterns) | ||||||
| 3. Run tests to confirm functionality | ||||||
|
|
||||||
| ## Plan Output Format | ||||||
|
|
||||||
| Write the plan to `plan.md` in the project root. Add `plan.md` to `.gitignore` if not already present. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Both
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Clarify the .gitignore update procedure. The instruction "Add
This could lead to duplicate entries, failed file operations, or inconsistent behavior. 📋 Suggested clarification-Write the plan to `plan.md` in the project root. Add `plan.md` to `.gitignore` if not already present.
+Write the plan to `plan.md` in the project root. After writing the plan, check if `.gitignore` exists in the project root. If it exists, check whether it contains a line matching `plan.md` (exact match or pattern like `/plan.md` or `*.md`). If no such entry exists, append a new line `plan.md` to `.gitignore`. If `.gitignore` doesn't exist, create it with the single entry `plan.md`.📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
|
|
||||||
| The plan file must start with YAML frontmatter: | ||||||
|
|
||||||
| --- | ||||||
| name: add-user-auth | ||||||
| date: 2026-03-28 | ||||||
| branch: feature/user-auth | ||||||
| commit_sha: abc1234 | ||||||
| current_phase: 1 | ||||||
| overall_status: in-progress | ||||||
| --- | ||||||
|
Comment on lines
+63
to
+72
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add instructions for populating git-dependent frontmatter fields. The frontmatter example includes Additionally, 📝 Suggested addition after line 62 Write the plan to `plan.md` in the project root. Add `plan.md` to `.gitignore` if not already present.
+Populate the frontmatter fields as follows:
+- `name`: A short kebab-case identifier for the plan (e.g., `add-user-auth`)
+- `date`: Current date in YYYY-MM-DD format
+- `branch`: Current git branch name (run `git branch --show-current`)
+- `commit_sha`: Current git HEAD commit (run `git rev-parse HEAD`)
+- `current_phase`: Set to `0` initially (Phase 0: Documentation Discovery)
+- `overall_status`: Set to `not-started` initially
+
The plan file must start with YAML frontmatter:🤖 Prompt for AI Agents |
||||||
|
|
||||||
| Each phase is a markdown section with checkbox tasks (`- [ ]` for pending, `- [x]` for complete). | ||||||
|
|
||||||
| If the plan file cannot be written, tell the user and stop. | ||||||
|
|
||||||
| ## Key Principles | ||||||
|
|
||||||
| - Documentation Availability ≠ Usage: Explicitly require reading docs | ||||||
| - Task Framing Matters: Direct agents to docs, not just outcomes | ||||||
| - Verify > Assume: Require proof, not assumptions about APIs | ||||||
| - Session Boundaries: Each phase should be self-contained with its own doc references | ||||||
|
|
||||||
| ## Anti-Patterns to Prevent | ||||||
|
|
||||||
| - Inventing API methods that "should" exist | ||||||
| - Adding parameters not in documentation | ||||||
| - Skipping verification steps | ||||||
| - Assuming structure without checking examples | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When
do-v2is invoked against a plan file produced by the originalmake-plan(which has no YAML frontmatter), thebranchandcommit_shafields will be absent. The instruction only says "warn the user before proceeding" when the values differ, but it does not specify what to do when the fields are missing entirely. In practice the staleness check will be skipped silently, giving the user no indication that the plan is a v1 format. Consider adding an explicit check: if frontmatter fields are absent, surface a warning that this plan may not be amake-plan-v2plan and prompt the user to confirm.