| name | cursorqb-implementer |
| description | Use for gated CursorQB Step 4 implementation when an audited plan has READY or READY_WITH_WARNINGS slices and the user approved code changes. |
| disable-model-invocation | true |
CursorQB Implementer
Implement bounded, reversible slices from an audited CursorQB plan. This is the only CursorQB step that changes source code.
Gate
Run:
python3 -I -S -B <plugin-root>/scripts/cursorqb_launcher.py --controller planner-validator -- --root . --mode step4 --strict
Stop if the audit is BLOCKED or any P0/P1 finding exists. READY or READY_WITH_WARNINGS with only P2/P3 may proceed while keeping warnings visible; NO_ACTION_REQUIRED dispatches no writer.
Plan-Run Contract
Bind the selected slice to the bundled deterministic Plan-Run controller and use this execution contract:
- Outcome: complete one READY/READY_WITH_WARNINGS slice by default. Continue through the queue only when the invocation contains
--continuous; select an exact contract only with --slice <contract-id>.
- Files allowed to modify: only files required by the active implementation slice, plus
Planner-docs/Planing-Ledger.md for concise verified-slice or stop-event summaries.
- Files forbidden to modify: unrelated files, secrets, local credentials, and planning artifacts outside the active ledger update unless the slice requires a targeted plan repair.
- Required sources to read: audit, index, active sub-plan, relevant ontology/ledger sections, AGENTS.md/repo instructions, and target source/test files.
- Validation checkpoints: targeted validation first, then repo-level gate when targeted validation passes.
- Stop gates: P0/P1 or safety finding, failing test without clear fix, missing source, unclear contradiction, credential/live approval, destructive external mutation, unrelated dirty worktree, unavailable validation without fallback, scope overflow, token/context pressure, or user stop.
- Subagent policy: use subagents only when they separate exploration, implementation, and review; one writer per implementation slice.
Procedure
For the selected implementation slice:
- Name the active phase/sub-plan and acceptance criterion.
- Read repo instructions, audit, index, active sub-plan, and relevant ontology/ledger sections.
- Run
git status and stop on unrelated dirty changes.
- Inspect files before editing.
- Prefer a focused failing test first when practical.
- Implement the smallest change that can satisfy the acceptance criterion.
- Run targeted validation.
- Run the repo-level gate when targeted validation passes.
- Run independent specification and quality reviews, followed by security review when the controller requires it. A writer cannot supply reviewer evidence.
- Use the Apply controller's CAS-protected
record-ledger operation to move the current contract to implemented or verified with validation and ordered-review evidence.
- Run final review against the post-Ledger repository digest, then finalize the slice.
- Stop after the slice unless
--continuous was explicitly supplied; continuous mode selects the next READY / READY_WITH_WARNINGS slice until a stop gate or empty queue.
Optional Skills
If installed/available, use Superpowers executing-plans, subagent-driven-development, test-driven-development, verification-before-completion, review-security, or local security review skills by scope. If they are absent, continue using the audit, active sub-plan, repo instructions, and validation commands.
Completion Report
Report files changed, acceptance criterion addressed, tests/commands run, evidence produced, ledger update, remaining risks, and next READY slice or exact blocker.