Do issue guided

From thermiteau/maverick · View interactive version

Do issue guided is an AI agent skill from the GitHub repository thermiteau/maverick. Work on a GitHub issue interactively with the user. Proceeds autonomously through routine work but pauses for confirmation at key decision points and when uncertain.

How to use this skill

Skill file

Work on GitHub Issue (Guided)

Work on GitHub issue $ARGUMENTS interactively. Follow every phase in order. Do not skip phases. Proceed autonomously through routine work, but pause for user confirmation at key decision points marked with 🔲 Checkpoint.

Preflight (mandatory)

Run this first. If it exits non-zero, halt and report the stderr output to the user verbatim. Do not proceed.

uv run maverick preflight do-issue-guided

The check verifies the project is initialised and required tools (gh, git, uv) are on PATH. PR code review runs locally as the agent-code-reviewer subagent (see Phase 8); the optional CI-side re-run described in mav-bp-remote-code-review is not required.

Before You Begin

If $ARGUMENTS is empty or not a valid issue number, ask the user for the issue number before proceeding. Do not attempt any phase without it.

Entry check: run uv run maverick coord read <repo> $ARGUMENTS.

If another instance holds a live claim, or the issue carries a

blocked-by:#N label, stop and report to the user — guided mode does not

take a claim of its own, but it must not silently work an issue an

autonomous instance already owns.

State for this workflow lives in the maverick-task-progress marker on

the issue (see mav-github-issue-workflow); there is no local

state file.

Phase 1-2: Understand the Issue and Solution Design (subagent)

Run Phases 1 and 2 as a subagent to keep the main context window clean for implementation.

  1. Dispatch the agent-issue-analyst agent with:
  1. When the agent returns, verify the design landed durably —

uv run maverick task-progress read <repo> $ARGUMENTS shows

comments.design set to a comment ID.

  1. If the agent flagged ambiguities, present them to the user and wait for answers before continuing.

🔲 Checkpoint — Design review: Present a brief summary of the solution design to the user. Include the key approach, main components affected, and any trade-offs. Ask the user to confirm or suggest changes before proceeding. Do not continue until the user approves.

Phase 3: Create Tasks (subagent)

Run Phase 3 as a subagent to keep the main context window clean for implementation.

  1. Dispatch the agent-github-issue-planner agent with:
  1. When the agent returns, verify the tasks landed durably —

uv run maverick task-progress read <repo> $ARGUMENTS shows:

  1. If the agent flagged scope concerns, present them to the user.

🔲 Checkpoint — Tasks review: Present the task list to the user — each task title and description, their order, and any dependencies. Ask the user to confirm, reorder, add, or remove tasks. Do not continue until the user approves.

Phase 4: Create Branch

  1. Derive the branch name per the mav-github-issue-workflow skill (branching conventions).
  2. Resolve the base branch from config:

```bash

STORY_BASE=$(uv run maverick git-workflow story-base)

```

Create the branch from $STORY_BASE.

  1. Record it: uv run maverick task-progress set <repo> $ARGUMENTS branch --branch <branch>.

Phase 5: Execute Tasks

  1. Check for project-level skills in docs/maverick/skills/. For each topic directory that contains a SKILL.md, read it. These project skills provide codebase-specific guidance (libraries, patterns, configuration) that supplements the best-practice skills. If none exist, continue without them.

If the tasks were created as sub-issues (>= 5 tasks):

  1. Read the tasks summary comment on the parent issue for the execution order
  2. For each sub-issue in execution order:

1. Read the sub-issue description

2. Implement the change described

3. Run verification (lint, typecheck, tests) per the mav-local-verification skill

4. Commit with a conventional commit referencing the parent issue

5. Update the tasks summary comment: mark the sub-issue as complete

6. Close the sub-issue

  1. After all sub-issues are complete, run the full verification suite

Otherwise (checklist tasks):

  1. Read the tasks comment on the issue
  2. For each task in order:

1. Implement the change described

2. Run verification (lint, typecheck, tests) per the mav-local-verification skill

3. Commit with a conventional commit referencing the issue number

4. Check the task off durably: uv run maverick tasks check <repo> $ARGUMENTS <n>

  1. After all tasks are complete, run the full verification suite

Follow the mav-plan-execution skill for the execution loop, verification discipline (including the canonical retry budget), failure handling, and crash recovery. In guided mode, it will:

Phase 6: Documentation Review (mandatory)

This phase always runs before push. The agent decides whether any

docs work is needed; the workflow does not skip the analysis based on

its own heuristic.

  1. Build the diff and candidate-doc shortlist in one deterministic step:

```bash

uv run maverick docs shortlist \

--base "$(uv run maverick git-workflow story-base)" --issue $ARGUMENTS

```

The JSON output names the files it wrote (diff, shortlist,

detail) in a per-worktree directory — use those paths, not a fixed

/tmp path. Candidates come from words in the diff, docs/ paths the

issue cites, and the repo's docs.shortlist_commands; owned lists

shortlisted docs that belong to a docs.owners entry. An empty

shortlist is valid — the agent is dispatched with a pre-filtered

shortlist rather than an open-ended "audit every doc" brief.

  1. Dispatch the agent-tech-docs-writer agent with:

empty, pass the literal string

<empty — scan only for gaps requiring new coverage>.

the diff; do not refactor unrelated content.

editable: true. Report what is stale in it instead.

change with no coverage anywhere in docs/, create the new

document.

believe is impacted, **list its path in your return payload —

do not edit it.** One-pass dispatch: no widen-and-retry.

what is stale), other impacted docs not edited. Returning "no doc

changes required" is a valid outcome and must be reported

explicitly.

  1. 🔲 Checkpoint — Review docs outcome with the user: show what was

updated or created (or the explicit no-op decision), and the drift

the agent reported but did not fix, with each path's owner from

uv run maverick docs owners <path> .... Agree with the user how to

route it: dispatch the owner's agent if one is configured, or open

a follow-up issue labelled with the owner's label (default

docs-drift). If updates are inaccurate or out of scope, push back

and ask the agent to revise.

  1. Commit any doc changes with a docs: conventional commit.

Phase 7: Pre-push Security Review (mandatory, independent)

This phase always runs before push. The review is done by

agent-security-reviewer, a read-only agent with a fresh

context — not by you, because you wrote the code. It applies the

project's security checklist from docs/maverick/skills/, runs the

project's invariant checks (maverick checks run), and reviews the

changed code plus its impact set.

  1. Refresh the diff: re-run the docs shortlist command from Phase 6

and use the diff path it prints.

  1. Dispatch agent-security-reviewer with:

Do not explain your design choices to it; it must reach its own

conclusions from the code.

  1. The verdict is the reply's final MAVERICK_SECURITY_VERDICT: PASS|FINDINGS|BLOCKING

line. Missing or ambiguous → treat as BLOCKING.

  1. 🔲 Checkpoint — Review security outcome with the user: show the verdict and any findings. If BLOCKING, route back to Phase 5 (implement) to resolve the issues, then re-run this phase. If FINDINGS or PASS, confirm with the user before proceeding.
  2. If FINDINGS, fold the security findings into the PR description draft so they are visible to the human reviewer.

Phase 8: Code Review

The review runs after docs and security so the diff the reviewer

approves is the diff that ships — reviewing before those phases meant

their commits landed unreviewed.

  1. Dispatch the agent-code-reviewer agent with the issue requirements and the diff (git diff $(uv run maverick git-workflow story-base)...HEAD).
  2. The reviewer performs two-stage review: spec compliance first, then code quality. Its reply ends with a MAVERICK_VERDICT: PASS|FAIL marker line — that line is the verdict. If the marker is missing or ambiguous, treat the review as FAIL; do not infer a verdict from the prose.
  3. If spec compliance fails, stop — fix the gaps before requesting re-review.
  4. Process code quality feedback per the do-pullrequest-review skill:
  1. If fixes changed the implementation approach, update the tasks comment on the issue.
  2. Request re-review if there were critical or spec compliance issues — and re-run this phase whenever review fixes produced new commits, so the approved diff stays the shipped diff. Repeat until approved.
  3. Checkpoint: uv run maverick task-progress set <repo> $ARGUMENTS review.

🔲 Checkpoint — Review results: Present a summary of the review outcome to the user — what was flagged, what was fixed, and what was pushed back on. If there were significant changes during review, highlight them.

Phase 9: Push and Verify CI

  1. Run pre-push verification per the mav-local-verification skill (lint, typecheck, tests). Fix any failures before pushing.
  2. Push the branch to remote.
  3. Monitor CI per the mav-bp-cicd skill. If CI fails, read the failure logs, fix locally, and push again. Do not proceed until CI passes. (After the PR exists, uv run maverick pr wait <repo> <pr-num> --checks --timeout 30m gives a bounded wait.)

Phase 10: Update Issue and Create PR

  1. Post a completion comment: uv run maverick issue comment post <repo> $ARGUMENTS --kind completion --body-file <file>.
  2. Create a pull request per the mav-github-issue-workflow skill (PR pattern — the body must carry Closes #$ARGUMENTS).
  3. Checkpoint: uv run maverick task-progress set <repo> $ARGUMENTS completed

(recorded as the complete phase; worktree-isolated agents have the

bare word refused, #160).

🔲 Checkpoint — Done: Present the PR URL to the user and summarise what was delivered.

Rules

<!-- maverick-plugin-version: 5.3.1 -->

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.