Execute Tasks
Execute tasks using grouped agentic loops.
Input
- Checklist mode:
/mp-execute CHECKLIST_MARTIN1.md
- MPX mode:
/mp-execute mpx, /mp-execute mpx phase 2, /mp-execute mpx task
- If param missing: ask user for mode/path. Use AskUserQuestion tool with mpx as one option and root level checklist
*.md in project root containing unchecked tasks (- [ ]) as others.
Scope
- Checklist mode: execute one checklist file
- MPX mode: execute from
.mpx/ROADMAP.md + phase CHECKLIST.md files
- In both modes: consume
HANDOFF.md from project root if present
Orchestration
Step 0: Consume HANDOFF.md (both modes)
- Check project root for
HANDOFF.md
- If not present, continue normally
- If present, read and store as session context input
- Pass this context to
mp-executor for all task groups
- Delete
HANDOFF.md after successful read (ephemeral lifecycle)
Step 1: Resolve execution source
If first argument is mpx:
- Read
.mpx/ROADMAP.md
- Find eligible phase(s) and unfinished tasks from
.mpx/phases/*/CHECKLIST.md
- Build task source from unfinished items
- Track status in phase checklists and roadmap (not a single standalone checklist)
Otherwise:
- Treat argument as checklist path
- Read that checklist as task source
Step 2: Read + group tasks
- Read checklist
- Collect unchecked tasks (
- [ ])
- Split into logical groups of 2-5 tasks (same section when possible)
In MPX mode, group per phase section/order; in checklist mode, group within the provided file.
Step 3: Detect available checks (lint, build, typecheck, format etc.)
Spawn mp-checks-detector to detect runnable check commands (build, typecheck, lint, format...) and package manager:
Step 4: Per-group execution loop
For each group:
- Spawn
mp-executor agent with:
- group tasks
- original task/spec text
- session handoff context (if consumed)
- checklist path
- After executor finishes, spawn in parallel:
mp-reviewer-code-quality
mp-reviewer-best-practices
mp-reviewer-spec-alignment with task spec
mp-checker agent with detected check commands
- If reviewer/checker reports issues, spawn
mp-executor in fix mode with explicit scoped tasks only:
- pass findings + failing commands
- include strict task list derived from findings (one item per issue in a checklist format)
- include execution scope summary, affected files etc. as a broader scope description for context
- Repeat the review/check + fix issues loop up to 3 times or until clean
- Detect changed surface (frontend/backend) from group diff after review/check fix loop:
- If backend/API/db changes exist, ask user if API, DB, and dependent services are ready for verification
- If frontend changes exist, run frontend verification loop (max 3 iterations): - determine run instructions in this order: 1) explicit guidance from
AGENTS.md or task context 2) direct detector call: bash $HOME/.claude/skills/mp-execute/scripts/detect-project-scripts.sh . -c frontend
- ensure frontend server is running on target URL/port, start it when needed
- run
mp-chrome-devtools-tester with instruction on what to visually test and where + auth context if available
- if tester finds failures, run
mp-executor in fix mode with explicit scoped tasks from tester failures, then re-run tester. Repeat up to 3 times or until clean
- Mark completed tasks as
[x]
- For unresolved blockers, keep unchecked and append reason in checklist
## Blockers (or inline unresolved note)
- Commit completed work — after marking tasks complete, stage and commit inline:
- Skip if no tasks were completed in this group
git status + git diff --stat to review changes
git log --oneline -5 to match repo commit style
git add <specific-files> — prefer specific files, avoid sensitive files (.env, credentials)
git commit -m "type(scope): description" — conventional commit, scoped to this group's tasks (e.g., feat(scope): implement auth flow)
- No AI attribution, no
--amend, imperative mood, subject under 72 chars
In MPX mode, update phase CHECKLIST.md and roadmap phase status where relevant.
ROADMAP Concision Rule (MPX mode)
When a phase becomes complete, keep ROADMAP records minimal:
- Completed phase gets one line only in
## Phases (mark complete)
- Remove completed phase details from other roadmap sections
- Keep extra mention only when needed to explain an unblock/dependency for an incomplete or blocked phase
- Keep
## Phase Details focused on incomplete/blocked phases only
Step 5: Group hard gate review
After all tasks are completed or unresolved, run full gate:
- Spawn 6 parallel subagents with resolved scope:
mp-reviewer-code-quality
mp-reviewer-best-practices
mp-reviewer-spec-alignment
mp-reviewer-security
mp-reviewer-performance
mp-reviewer-error-handling
- Spawn
mp-checker agent
- If issues remain, spawn
mp-executor in fix mode with explicit scoped tasks from findings and failed checks
- If frontend changes are in scope and gate reviews/checks pass, run
mp-chrome-devtools-tester as final frontend verification (same 3-iteration resolver loop)
- If still unresolved, mark affected tasks as unresolved with clear reason and continue
Step 6: Finalization
- Ensure tracked state reflects actual status:
- Checklist mode: target checklist (
[x], unresolved notes, blockers)
- MPX mode: phase checklists + roadmap phase progress
- In MPX mode, if a phase changed to complete during execution, collapse its roadmap record to one concise line and prune redundant references
- Final commit — stage and commit any remaining uncommitted changes (checklist updates, roadmap status, docs) inline:
git status + git diff --stat to review changes
git log --oneline -5 to match repo commit style
git add <specific-files> — prefer specific files, avoid sensitive files
git commit -m "type(scope): description" — conventional commit
- No AI attribution, no
--amend, imperative mood, subject under 72 chars
- Skip if nothing to commit
- Summarize completed/skipped/unresolved tasks
- Spawn
mp-docs-updater agent with list of changes to update docs
Failure Policy
If blocker persists (unresolved errors, repeated failures, context limits, long fix loops):
- Stop retrying that task group
- Mark affected tasks unresolved with reason
- Continue next group unless user asked to stop
Output
Mode: [checklist|mpx]
Source: [checklist path | phase(s)]
Groups: [N]
Completed:
- [task]
Unresolved:
- [task] — [reason]
Checks:
- typecheck: pass/fail
- lint: pass/fail
- build: pass/fail
Review:
- minimal: pass/fail
- full: pass/fail
1---2name: mp-execute3description: Execute checklist tasks in grouped loops with executor/reviewer/checker agents and conditional frontend verification. Use when: "execute checklist", "run this task list", "complete unchecked tasks"4---56# Execute Tasks78Execute tasks using grouped agentic loops.910## Input1112- Checklist mode: `/mp-execute CHECKLIST_MARTIN1.md`13- MPX mode: `/mp-execute mpx`, `/mp-execute mpx phase 2`, `/mp-execute mpx task`14- If param missing: ask user for mode/path. Use AskUserQuestion tool with mpx as one option and root level checklist `*.md` in project root containing unchecked tasks (`- [ ]`) as others.1516## Scope1718- Checklist mode: execute one checklist file19- MPX mode: execute from `.mpx/ROADMAP.md` + phase `CHECKLIST.md` files20- In both modes: consume `HANDOFF.md` from project root if present2122## Orchestration2324### Step 0: Consume HANDOFF.md (both modes)25261. Check project root for `HANDOFF.md`272. If not present, continue normally283. If present, read and store as session context input294. Pass this context to `mp-executor` for all task groups305. Delete `HANDOFF.md` after successful read (ephemeral lifecycle)3132### Step 1: Resolve execution source3334If first argument is `mpx`:35361. Read `.mpx/ROADMAP.md`372. Find eligible phase(s) and unfinished tasks from `.mpx/phases/*/CHECKLIST.md`383. Build task source from unfinished items394. Track status in phase checklists and roadmap (not a single standalone checklist)4041Otherwise:42431. Treat argument as checklist path442. Read that checklist as task source4546### Step 2: Read + group tasks47481. Read checklist492. Collect unchecked tasks (`- [ ]`)503. Split into logical groups of **2-5 tasks** (same section when possible)5152In MPX mode, group per phase section/order; in checklist mode, group within the provided file.5354### Step 3: Detect available checks (lint, build, typecheck, format etc.)5556Spawn `mp-checks-detector` to detect runnable check commands (build, typecheck, lint, format...) and package manager:5758### Step 4: Per-group execution loop5960For each group:61621. Spawn `mp-executor` agent with:63 - group tasks64 - original task/spec text65 - session handoff context (if consumed)66 - checklist path672. After executor finishes, spawn in parallel:68 - `mp-reviewer-code-quality`69 - `mp-reviewer-best-practices`70 - `mp-reviewer-spec-alignment` with task spec71 - `mp-checker` agent with detected check commands723. If reviewer/checker reports issues, spawn `mp-executor` in fix mode with explicit scoped tasks only:73 - pass findings + failing commands74 - include strict task list derived from findings (one item per issue in a checklist format)75 - include execution scope summary, affected files etc. as a broader scope description for context76 - Repeat the review/check + fix issues loop up to 3 times or until clean774. Detect changed surface (frontend/backend) from group diff after review/check fix loop:78 - If backend/API/db changes exist, ask user if API, DB, and dependent services are ready for verification79 - If frontend changes exist, run frontend verification loop (max 3 iterations): - determine run instructions in this order: 1) explicit guidance from `AGENTS.md` or task context 2) direct detector call: `bash $HOME/.claude/skills/mp-execute/scripts/detect-project-scripts.sh . -c frontend`80 - ensure frontend server is running on target URL/port, start it when needed81 - run `mp-chrome-devtools-tester` with instruction on what to visually test and where + auth context if available82 - if tester finds failures, run `mp-executor` in fix mode with explicit scoped tasks from tester failures, then re-run tester. Repeat up to 3 times or until clean835. Mark completed tasks as `[x]`846. For unresolved blockers, keep unchecked and append reason in checklist `## Blockers` (or inline unresolved note)857. Commit completed work — after marking tasks complete, stage and commit inline:86 - Skip if no tasks were completed in this group87 - `git status` + `git diff --stat` to review changes88 - `git log --oneline -5` to match repo commit style89 - `git add <specific-files>` — prefer specific files, avoid sensitive files (.env, credentials)90 - `git commit -m "type(scope): description"` — conventional commit, scoped to this group's tasks (e.g., `feat(scope): implement auth flow`)91 - No AI attribution, no `--amend`, imperative mood, subject under 72 chars9293In MPX mode, update phase `CHECKLIST.md` and roadmap phase status where relevant.9495### ROADMAP Concision Rule (MPX mode)9697When a phase becomes complete, keep ROADMAP records minimal:9899- Completed phase gets **one line only** in `## Phases` (mark complete)100- Remove completed phase details from other roadmap sections101- Keep extra mention only when needed to explain an unblock/dependency for an incomplete or blocked phase102- Keep `## Phase Details` focused on incomplete/blocked phases only103104### Step 5: Group hard gate review105106After all tasks are completed or unresolved, run full gate:1071081. Spawn 6 parallel subagents with resolved scope:109110- `mp-reviewer-code-quality`111- `mp-reviewer-best-practices`112- `mp-reviewer-spec-alignment`113- `mp-reviewer-security`114- `mp-reviewer-performance`115- `mp-reviewer-error-handling`1161172. Spawn `mp-checker` agent1183. If issues remain, spawn `mp-executor` in fix mode with explicit scoped tasks from findings and failed checks1194. If frontend changes are in scope and gate reviews/checks pass, run `mp-chrome-devtools-tester` as final frontend verification (same 3-iteration resolver loop)1205. If still unresolved, mark affected tasks as unresolved with clear reason and continue121122### Step 6: Finalization123124- Ensure tracked state reflects actual status:125 - Checklist mode: target checklist (`[x]`, unresolved notes, blockers)126 - MPX mode: phase checklists + roadmap phase progress127- In MPX mode, if a phase changed to complete during execution, collapse its roadmap record to one concise line and prune redundant references128- Final commit — stage and commit any remaining uncommitted changes (checklist updates, roadmap status, docs) inline:129 - `git status` + `git diff --stat` to review changes130 - `git log --oneline -5` to match repo commit style131 - `git add <specific-files>` — prefer specific files, avoid sensitive files132 - `git commit -m "type(scope): description"` — conventional commit133 - No AI attribution, no `--amend`, imperative mood, subject under 72 chars134 - Skip if nothing to commit135- Summarize completed/skipped/unresolved tasks136- Spawn `mp-docs-updater` agent with list of changes to update docs137138## Failure Policy139140If blocker persists (unresolved errors, repeated failures, context limits, long fix loops):141142- Stop retrying that task group143- Mark affected tasks unresolved with reason144- Continue next group unless user asked to stop145146## Output147148```markdown149Mode: [checklist|mpx]150Source: [checklist path | phase(s)]151Groups: [N]152153Completed:154155- [task]156157Unresolved:158159- [task] — [reason]160161Checks:162163- typecheck: pass/fail164- lint: pass/fail165- build: pass/fail166167Review:168169- minimal: pass/fail170- full: pass/fail171```