/ai-native-toolkit:issues [scope-label | issue-number] (optional - a label narrows which open issues are considered; a number works that one issue; default: all open issues)from ai-native-toolkit
Triages open GitHub issues, then runs agent-ready issues through Agent Teams for automated resolution. Supports single-issue or marathon mode.
Ships in ai-native-toolkit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Thin orchestrator. Triages open issues, then delegates execution of
agent-readyissues to the marathon skill.
Windows: run the bash blocks below in Git Bash, which ships with Git for Windows. Installs, PATH notes and the make-free commands are in the Windows setup guide.
Read the repo's CLAUDE.md ## Marathon Configuration (GitHub Issues subsection) for label
names, with defaults:
agent-readyneeds-triagein-progressAlso read base branch, required approvals, and bot-reviewer rules.
echo $CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS # set $TEAMS_AVAILABLE (true if "1")
A bare issue number in $ARGUMENTS (/issues 1234) is Single-item mode: skip the rest of Routing and follow references/single-item.md (relative to this skill dir), whose mode script is ${CLAUDE_SKILL_DIR}/scripts/single_item.py.
ORG=$(gh repo view --json owner --jq '.owner.login')
REPO=$(gh repo view --json name --jq '.name')
# Optional scope filter from $ARGUMENTS — narrows the issue universe; routing still applies within it.
SCOPE_LABEL="$ARGUMENTS" # empty = all open issues
FILTER=(); [ -n "$SCOPE_LABEL" ] && FILTER=(--label "$SCOPE_LABEL")
READY=$(gh issue list --label "agent-ready" "${FILTER[@]}" --state open --json number --jq 'length')
READY > 0 → Marathon mode. Work ONLY the agent-ready issues. Do NOT assess or
modify untagged issues — the human has curated the queue by tagging.READY == 0 → Triage mode (below).Enumerate open issues minus the exclude labels:
gh issue list "${FILTER[@]}" --state open --json number,title,body,labels | \
jq '[.[] | select((.labels[].name) as $l | ($l | IN("<exclude-labels>")) | not)]'
If $ARGUMENTS (a scope label) was given, only issues carrying it are considered; routing still applies within that subset.
Triage is a planning pass, not a labeling pass. It runs once over the whole issue set, in this order, and every write it makes shows up in the report the human approves:
blocked_by edges.An issue is agent-ready only when it survives all of steps 2 to 4 and passes the Readiness
Check: clear after research, no unresolved overlap, sized to one PR (or approved as a
decomposed parent), and no definition-of-ready item failed. Everything else stays or becomes
needs-triage. Research and sizing read widely, so fan them out with
subagents (the Agent tool); never teammates.
Steps 1 to 4 and the Readiness Check decide the label of each issue that exists at the start
of the pass but do not write it: the verdict needs all five inputs, so every agent-ready / needs-triage label change
on those issues happens in one write at the Triage Report step. Creating an approved
decomposition is a separate phase after approval that labels its own children and parent (see
Size by Judgment). An interrupted pass therefore never leaves an issue agent-ready while it overlaps an open
PR. Comments, body edits and dependency edges are written where they are decided.
Start with issues already labeled needs-triage that carry a triage comment with a
recommended reading, or a decomposition proposal comment (marker
<!-- triage:decomposition-proposal -->, see Size by Judgment). A human reply approving that
proposal on the issue counts as approval of the decomposition and triggers its creation phase. If a human reply after that comment confirms or corrects it ("yes,
reading A" is enough), fold the confirmed answers into the issue body (append a
Clarified scope section with the confirmed scope and acceptance criteria) or, when the body
is the author's to keep, into a marker-tagged issue comment: a new comment whose first line is the
HTML-comment marker <!-- triage:clarified-scope -->. The marker, not any UI pinning, is what
makes it durable: the implementing teammate and every later
run find the clarified contract by grepping for it, never by re-interpreting the thread. The
issue's verdict becomes agent-ready (label swapped from needs-triage at the Triage Report
step) unless the same pass's Overlap Sweep or Size by Judgment holds it back:
gh issue edit <N> --body-file <body-plus-clarified-scope.md> # issue body route
gh issue comment <N> --body-file <clarified-scope.md> # marker comment route; first line is the marker
A correction that opens a new question is not a confirmation: run the Research Pass on the
new question and keep needs-triage. No reply means no change.
Before any question reaches a human, research it. For each issue whose scope, acceptance
criteria, or intent is unclear, run an understand-style pass over what the ambiguity
touches: the code and tests, open and merged PRs (gh pr list --state all --search "<terms>"), and the issue history (linked, referenced, and closed issues). The primitive is
the /understand skill (skills/understand/SKILL.md, relative to the plugin root): define the
terms, separate the explicit need from the implicit one, and bound the scope, grounded in
what the repository shows. Spawn one research subagent per ambiguous issue (or per subsystem
for a wide one) so the pass runs in parallel.
Any question the repository answers is answered, not asked. What the code does now, whether a
constraint is real, which reading matches existing behaviour: these are findings with a
path:line reference. Only questions of intent, priority, or product direction survive.
Post a comment that proposes rather than interrogates, findings first:
gh issue comment <N> --body "$(cat <<'EOF'
Triage research before this can be picked up by an agent.
Findings:
- The code currently does X (`path/to/file.py:42`); PR #M changed it to Y.
- Reading A implies change P; reading B implies change Q.
Recommended reading: A, because <evidence with file references>. Confirm or correct.
Resolved by research:
- <question the repository answered> - <answer> (`path:line`)
Needs your call:
- <question only the author can answer: intent, priority, direction>
EOF
)"
Fail closed: an issue whose ambiguity survives research gets the needs-triage verdict. Research is never
a license to guess; a recommended reading is a proposal until a human confirms it. When research
resolves every question and nothing is left under Needs your call, the issue is clear and
continues to the Overlap Sweep without a comment round-trip.
List open PRs with their changed files once per triage run:
gh pr list --state open --limit 100 --json number,title,headRefName,files | \
jq '[.[] | {number, title, headRefName, files: [.files[].path]}]'
For each candidate issue, take the files it targets (paths named in the body, those the Research Pass located, or, for an issue that skipped research, those located by a quick read of the code it describes) and flag any intersection:
An issue that overlaps an open PR gets the needs-triage verdict, not agent-ready, and a comment
naming the PR and stating what remains of the issue after that PR merges (or that nothing
does). A PR cannot be a native blocked_by blocker (see PR-as-blocker in the adapter), so this
label plus comment is the record; the next triage run after the PR merges re-assesses the issue.
Issue-to-issue overlap is not a hold: resolve it as a hot-file note or a dependency edge
(Dependency Authoring) and list it in the report.
Sizing runs after clarification: an issue that is not yet clear cannot be sized.
Size by judgment, record the reasoning. Decide whether an issue is one PR or several by asking two questions: could a reviewer verify the whole change against its acceptance criteria in one sitting, and must any part land before another? Story points (1, 2, 3, 5, 8, 13) are the vocabulary for stating that judgment, not a trigger for it. Decompose when splitting makes the deliverable more reviewable or gives the marathon an ordering it would otherwise discover by collision. Leave the issue whole when splitting would only add ceremony. The judgment sits with triage because it holds the codebase context; the report makes it legible so the human can veto.
Every split and every deliberate non-split carries a one-line reason in the triage report, a reason a reader can disagree with ("one file, one reviewer sitting" or "schema change must land before the two consumers"). No hierarchy is created without a reason.
Record the size of each issue left whole as a comment whose first line is the definition of
ready's size marker, then the same one-line reason, so the Readiness Check and the refiner read
one size. Skip the comment when the newest marker, or a body Size: line with no marker after it,
already records the same points. The newest marker wins, so a resize is a new comment:
gh issue comment <N> --body "$(printf '<!-- refine:size %s -->\n%s' <P> '<one-line reason>')"
When decomposition is warranted:
<!-- triage:decomposition-proposal -->,
so the proposal survives the session. The parent's verdict is needs-triage until approval.
Nothing is created until the human approves, either by replying to proceed in the session or
by replying on the parent after the proposal comment (picked up by Promote on Confirmation on
the next triage run, which runs once the agent-ready queue drains).CHILD=$(gh issue create --title "<child title>" --body "<scope + acceptance criteria; Part of #<parent>>" | sed 's#.*/##')
CHILD_ID=$(gh api repos/$ORG/$REPO/issues/$CHILD | jq '.id') # numeric REST id
gh api repos/$ORG/$REPO/issues/<parent>/sub_issues --method POST -F sub_issue_id="$CHILD_ID"
gh issue edit "$CHILD" --add-label "agent-ready"
gh issue edit <parent> --remove-label "needs-triage" --add-label "agent-ready" # once, after all children exist
blocked_by edge
between them (Dependency Authoring). Sub-issue position is display order only.agent-ready so the marathon sees it as a verification unit, and is never assigned as
implementation work. No child PR says Closes #<parent>. The parent closes only after every
child has merged and the lead-run verification pass confirms the assembled result meets the
parent's criteria. Its sub_issues_summary (total, completed, percent_completed on
gh api repos/$ORG/$REPO/issues/<parent>) gives the human the rollup.needs-triage (a marathon skip or a failed parent check) is
re-assessed as a parent, not re-decomposed: resolve the named gap (missing children back to
agent-ready, or a new child for a failed criterion, proposed for approval like any
decomposition), and its verdict returns to agent-ready only when every open child is
agent-ready.When triage finds an ordering (one issue's change is a prerequisite for another's: schema before consumer, contract before enforcement, or a decomposed parent's child sequence), record it as a native edge so the marathon DAG inherits it instead of discovering it by merge conflict:
BLOCKER_ID=$(gh api repos/$ORG/$REPO/issues/<M> | jq '.id') # numeric REST id, NOT the node id
gh api repos/$ORG/$REPO/issues/<N>/dependencies/blocked_by \
--method POST -F issue_id="$BLOCKER_ID" # issue N is blocked by issue M
Check existing edges first (gh api repos/$ORG/$REPO/issues/<N>/dependencies/blocked_by) so the
pass does not duplicate one, and give each new edge a one-line reason in the report. Sequencing
behind an open PR is not an edge (PR-as-blocker is unsupported); that is the Overlap Sweep's
needs-triage hold. If the human vetoes an edge, remove it with the adapter's --method DELETE
call. Render the resulting order in the report as waves, so the human approves the sequence and
not just the membership.
The definition of ready (docs/contributing/definition-of-ready.md in the target repository,
or the toolkit's copy when it has none) is the one checklist /issues and the refiner apply.
Run the refiner's deterministic checks once, after the size markers and edges above are
written, rather than reading the checklist by eye:
: "${CLAUDE_PLUGIN_ROOT:=.}" # unset outside an installed plugin: fall back to the current checkout
VERDICT=$(mktemp); echo "VERDICT=$VERDICT" # shell variables do not survive between Bash calls
python3 "${CLAUDE_PLUGIN_ROOT}/skills/refine/scripts/refine.py" --repo "$ORG/$REPO" --dry-run --out "$VERDICT"
The script is read-only. Exit 2 is a usage or definition error and exit 3 a failed gh read:
report it and stop before any label write. Each issue's entry in $VERDICT carries a
verdict, its reasons and a checklist of items with a status:
not_ready - an item the script settles failed (missing sections, oversize with no
sub-issues, an unrecorded blocker, an open-PR overlap, an exact duplicate). The verdict is
needs-triage, whatever steps 2 to 4 decided; name the reasons in the report.needs_judgement or ready - each needs_judgement item is decided by the step
that owns it: no-open-question and criteria-checkable by the Research Pass (a criterion
that names no command or test is a question), sized by Size by Judgment, and
blockers-recorded by Dependency Authoring. The issue is agent-ready only when every one
holds.Script results are final: triage never overrides a fail, and an item it cannot settle keeps
the issue needs-triage.
Apply the label verdicts from steps 1 to 4 and the Readiness Check in one sequential write per issue (never parallel background writes), then report and STOP:
gh issue edit <N> --remove-label "needs-triage" --add-label "agent-ready" # clear, no overlap, one PR, checklist holds
gh issue edit <N> --add-label "needs-triage" # research left a call, overlap, or a failed item
An issue proposed for decomposition gets needs-triage (its proposal comment is the record) until the
decomposition is approved and created.
Render the report in the layout of references/triage-report.md (relative to this skill dir), which also gives the closing line for a pass that proposes no decomposition.
Do NOT spawn teammates in triage mode.
Before starting the marathon run, before the first issue is decomposed, invoke
the acceptance-contract start gate. Enforcement is source-agnostic: a gate
reachable from only one work source would make every other source the pressure valve
that routes work around the contract, so /issues carries the obligation itself. The run identifier
is the issue-queue identifier - the label/milestone slug for this queue, e.g.
issues-<label> (issues-agent-ready when no scope filter narrows it).
The contract scripts live in the plugin package (${CLAUDE_PLUGIN_ROOT}/scripts/contract/), while the contract artifacts (contract, kill test, completion record) live in the target repository's .claude/contracts/ by default. Every contract script resolves the folder the same way: its --contract-dir flag, then the ACCEPTANCE_CONTRACT_DIR environment variable, then the default, so setting the variable once moves the folder for the whole run. A repo that already keeps its contracts in .taskmaster/contract/ and has no .claude/contracts/ keeps using .taskmaster/contract/. When the agent cannot write under .claude/ without a permission prompt, set ACCEPTANCE_CONTRACT_DIR to a folder it can write to. When CLAUDE_PLUGIN_ROOT is unset (a hand-placed checkout rather than an installed plugin) the guard line before each invocation falls back to the current checkout.
: "${CLAUDE_PLUGIN_ROOT:=.}" # unset outside an installed plugin: fall back to the current checkout
python "${CLAUDE_PLUGIN_ROOT}/scripts/contract/start_gate.py" "issues-<label>"
The gate fails closed. Exactly two doors open a run; there is no silent third - including for a heterogeneous issue queue:
operator_signoff is
recorded before the run starts: exit 0 with a loud UNVERIFIED warning. The skip
is capped, not free - the run is permanently capped at UNVERIFIED and can
NEVER certify PASS.${CLAUDE_PLUGIN_ROOT}/scripts/contract/freeze.py), or record a
signed skip first.When the refiner drafts the contract (docs/refine.md, "Contract draft"),
merging its pull request approves it; the gate refuses a drafted contract that
is not on the default branch, or that was frozen at a different hash.
The exit-side gates are owned by the marathon skill, not this command. Marathon
routes every verifier spawn through ${CLAUDE_PLUGIN_ROOT}/scripts/contract/spawn_verifier.py (the
custody chokepoint) and blocks run-complete on ${CLAUDE_PLUGIN_ROOT}/scripts/contract/complete_gate.py <run-id>. Start gate here, exit gates there - each fails closed. The
<!-- floor:cold-verify-completion --> marker in this file's header makes this
invocation un-removable: floor.yml reds any PR that drops the marker or any of
the three gate invocation strings from a file that carried them.
Supply the marathon skill's adapter as:
gh issue list --label "agent-ready" "${FILTER[@]}" --state open --json number,title,body,labels
(scoped by the optional $ARGUMENTS label filter);
dependencies from gh api repos/$ORG/$REPO/issues/<N>/dependencies/blocked_by
(each blocker issue number is a dependency edge). Complexity: infer from issue body/labels.
A pull request cannot be a blocked_by blocker (see PR-as-blocker below), so an
open-PR blocker never arrives as a native edge: when an issue must wait for an open PR,
record that sequencing in the run plan (the wave table) and hold the issue out of any
wave until the PR merges.
Read the edges and the rollup in the same call rather than one request per issue:
gh issue list ... --json number,title,body,labels,blockedBy,subIssues,subIssuesSummary,parent
returns the edges, the parent/child graph, and the rollup, so leaf and parent membership is a
local lookup. The GraphQL-backed shapes differ from REST: blockedBy and subIssues arrive as
{nodes: [...], totalCount}, not the flat array dependencies/blocked_by returns, so read
.blockedBy.nodes[].number (reading the REST shape silently yields zero edges). The per-issue
REST paths below stay the reference and the write side.
Decomposed parents: an enumerated issue whose sub_issues_summary.total is above 0 (the
subIssuesSummary field) is decomposed, never a work unit, and never handed to an
implementing teammate. The work units are the enumerated leaf issues: children from
.../sub_issues count only when they are also in the enumerated set (open, agent-ready,
matching the scope filter), plus every undecomposed enumerated issue. An untagged or
out-of-scope child is never pulled in by its parent, and a child the Staleness Check dropped
stays dropped for this run. A child counts as done only when verified CLOSED by a merged PR:
gh issue view <child> --json state,closedByPullRequestsReferences shows state CLOSED, and
at least one referenced PR number resolves to MERGED via gh pr view <pr> --json state.
The reference list alone is not enough: it includes open PRs and carries no merge state. sub_issues_summary counts closures of any
kind, so it is the human rollup, not the trigger.
At plan time, compare each decomposed parent's children against the enumerated set. Exactly
one of two outcomes applies, and the second is a catch-all:
agent-ready to needs-triage with a comment naming the children at fault, so a parked
parent never keeps READY above 0 and pins /issues in Marathon mode. The next triage run
re-assesses it (see Size by Judgment); its in-run children still run.
Parent closure is gated on the lead-run QA pass over the merged children, not on Closes #N
in any single PR. That check runs outside spawn_verifier.py and adds no per-parent freeze:
the run-level contract, its freeze, the custody chokepoint, and the completion gate are
unchanged. "Lead-run" means the lead owns it, not that the lead executes it inline: the lead
spawns one read-only subagent (the Agent tool, never a teammate) with the parent's
acceptance criteria and the merged $BASE_BRANCH, carries on with the merge loop, and acts on
the returned per-criterion result. It posts that result as a comment on the parent and runs
gh issue close <parent> only when every criterion holds; otherwise the parent stays open, its
label swaps from agent-ready to needs-triage (the comment is the record), and the gap is
reported to the user.gh issue edit <N> --add-label "in-progress".Closes #<N> (and Closes #<M> for
every combined issue); GitHub auto-closes on merge. After merge, verify with
gh issue view <N> --json state --jq '.state' == CLOSED.issue-<N>--<slug>; worktree worktree/issues/<N>--<slug>.
For a combined group, use the lowest issue number: issue-<N>--<slug>.The REST calls for dependency edges and sub-issues, with the numeric-id rule and the API limits, are in references/github-issue-api.md (relative to this skill dir); read it before you list, write or delete an edge or a sub-issue.
sub-issues roll up progress; only blocked_by edges order the marathon DAG.
PR-as-blocker: unsupported (HTTP 422, "Target issue may only be an issue", observed POSTing a merged PR's numeric REST id as a blocked_by blocker)
Consequence: an open-PR blocker cannot be a native edge. Record "issue N waits for PR M" as sequencing in the run plan and keep N out of every wave until M merges.
Labels were curated at triage time; open PRs may have appeared since. At run start, after the Entry Gate and before the marathon skill spawns anyone, list open PRs with their changed files:
gh pr list --state open --limit 100 --json number,title,headRefName,files | \
jq '[.[] | {number, title, headRefName, files: [.files[].path]}]'
For each queued agent-ready issue, compare the files it targets (paths named in the body, or
located by a quick read of the code it describes) against those lists. Ignore PRs on this run's
own issue-* branches. For any issue an open PR touches, surface it in the plan with exactly one
of three outcomes instead of spawning blind:
needs-triage - the PR changes the issue's scope materially (partial fix,
obsoletes it, or reverses what it asks): remove agent-ready, add needs-triage with a comment
naming the PR, and drop the issue from this run.The outcomes appear in the Dependency Analysis plan the marathon skill reports before Wave 1.
Use the marathon skill with the GitHub Work-Source Adapter above and the Marathon
Configuration values. The skill builds the DAG from native blocked_by deps plus hot-file
combining, spawns one teammate per issue or combined group, drives each PR via
pr-review-merge, and smart-merges in waves. Combined-issue teammates put Closes #N for
every issue they resolve in the PR body. Parents of decomposed issues are verification units:
no teammate, no Closes #<parent>, closed by the lead-run QA pass once the last child merges.
/issues [label-filter] → detect teams → check agent-ready count → route:
├─ agent-ready exist → MARATHON (entry gate → staleness check → marathon skill, GitHub adapter)
└─ none exist → TRIAGE (promote → research → overlap → size → dependencies) → report → STOP
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub bjcoombs/ai-native-toolkit --plugin ai-native-toolkit21 skills in this plugin
/6hatsSix Thinking Hats Analysis/ab-equivalenceCompare two versions of an LLM-directed document - an original (teacher) and a candidate (student) - across a transfer set and return a per-case behavioural-equivalence verdict plus an efficiency signal. A transform-agnostic library capability other skills compose to gate a transform on behavioural sameness. TRIGGER when asked to A/B test two versions of a prompt / instruction / skill, to check whether a rewritten or compressed document still behaves the same as the original, to validate behavioural equivalence between two document versions, to gate a transform on no-regression, or when a skill needs the run-the-runner-on-both-versions-and-judge-equivalence capability./assessAssess a codebase's readiness for AI agent contributors against its maturity model of practices and autonomy Steps, and generate a complexity hotspot SVG treemap (size = LOC, hue = cyclomatic complexity, saturation = recent git churn). TRIGGER when the user types /assess, asks for an AI-readiness review, wants a complexity heatmap or hotspot map, asks 'how complex is this code?', wants migration risk triage, or asks for a codebase snapshot/report. Produces an MD report + SVG that can be opened as a PR in the target repo./assess-findingsRenders the /assess report from the deterministic run-context.json and the practice scorecard - the scorecard, the verbatim cross-practice findings, the findings where the repository says one thing and does another, and the mandatory Top 3 Actions. TRIGGER when the /assess orchestrator reaches the report-writing step; not a standalone user command./assess-followupThe /assess end-of-run offers - open a PR with the report, track the Top 3 Actions in the user's issue tracker, freeze the assessment into a CI gate, and file tool feedback. TRIGGER when the /assess orchestrator reaches the end-of-run offers; not a standalone user command./deslopDetect and remove the telltale signs of AI-generated 'slop' from any written text - articles, reports, emails, essays, bios, marketing copy, documentation, encyclopedia entries, or anything meant to read as if a thoughtful human wrote it. Apply silently as a quality gate before finalizing substantial prose, and explicitly when asked to clean a draft. TRIGGER when the user says 'make this sound less like AI', 'remove the AI tells', 'de-slop this', 'check if this reads as AI-written', 'make it sound human', 'edit out the ChatGPT voice', or critiques a draft as generic, puffy, or robotic, or asks for plain-language English for second-language readers or machine translation ('/deslop --plain'). Based on Wikipedia's 'Signs of AI writing' field guide.Other plugins' skills for the same job