Skill: Plan Issue
Convert an open GitHub type:Idea, type:Concern, or type:Epic issue into
an implementation plan: interview → explore → create impl issues →
optionally update docs → archive/close (Ideas and Concerns) or annotate
(Epics).
Type-specific interview questions, docs output, and completion steps are in
the companion files alongside this one:
idea.md— Idea-specific interview and archive/close stepsconcern.md— Concern-specific interview and archive/close stepsepic.md— Epic validation (Phase A) and decomposition (Phase B) steps
Load only the file matching the detected issue type.
Constants
See .agents/skills/shared/README.md for project IDs and issue type IDs.
Workflow
Phase 0 — Select the Issue
If the user provided a GitHub issue number, skip to Phase 1. **Several numbers
is a bundle**: plan all of them in one PR that closes every member, per
.agents/skills/shared/bundling.md § "Executing a bundle". Every member must be
an Idea, Concern, or Epic (name the right skill for any that is not), one
grill-me interview covers the whole bundle, and each member still gets its own
implementation issues and its own disposition in Phase 9.
Otherwise, query open issues of all three types and present as a combined
multiple-choice list via ask_user:
# Ideas and Concerns
gh issue list --repo CERTCC/Vultron --state open --limit 1000 \
--json number,title,issueType \
--jq '.[] | select(.issueType.name == "Idea" or .issueType.name == "Concern")
| "#\(.number) [\(.issueType.name)]: \(.title)"'
# Epics with the needs-planning label (set by the epic-needs-planning workflow)
gh issue list --repo CERTCC/Vultron --state open --limit 1000 \
--label "needs-planning" \
--json number,title,issueType \
--jq '.[] | select(.issueType.name == "Epic")
| "#\(.number) [Epic/needs-planning]: \(.title)"'
The workflow also labels an Epic that has children but an open, unblocked
Concern or Idea among them. That child is already in the first list: plan it
there, and offer the Epic itself only when it has no sub-issues.
Include a "Create a new Idea" option at the end. Wait for the user's
selection before continuing.
Creating a new Idea (if selected)
Invoke create-issue with type Idea, reason planned, and the user
present. It asks for the description, picks the theme, and routes the Idea to
a same-theme Epic. Continue with the issue number it returns.
Phase 0b — Sync
Move the worktree HEAD to origin/main before loading any context, so all
planning (orient, deepen-context, grill-me) is based on the current state of
specs and notes. Do not use git checkout main — that branch may be
checked out in another worktree.
git fetch origin main && git checkout --detach origin/main
Detach rather than git reset --hard: a reset moves whatever branch is
checked out, which may be another session's, and discards uncommitted work.
A detached checkout moves no branch and refuses to overwrite local changes.
If this fails, stop and investigate before proceeding.
Phase 1 — Read and Validate
ISSUE_JSON=$(gh issue view "${ISSUE_NUMBER}" --repo CERTCC/Vultron \
--json number,title,body,labels,state,issueType)
ISSUE_STATE=$(echo "${ISSUE_JSON}" | jq -r '.state')
ISSUE_TYPE=$(echo "${ISSUE_JSON}" | jq -r '.issueType.name // ""')
if [ "${ISSUE_STATE}" != "OPEN" ]; then
echo "❌ #${ISSUE_NUMBER} is not open (state=${ISSUE_STATE}). Stopping." >&2
exit 1
fi
if [ "${ISSUE_TYPE}" != "Idea" ] && \
[ "${ISSUE_TYPE}" != "Concern" ] && \
[ "${ISSUE_TYPE}" != "Epic" ]; then
echo "❌ #${ISSUE_NUMBER} is type '${ISSUE_TYPE}', expected Idea, Concern, or Epic." >&2
exit 1
fi
Load the type-specific companion file matching ${ISSUE_TYPE}:
idea.md, concern.md, or epic.md. All type-specific steps below
reference that file.
For all types, also query the parent epic (if any):
EPIC_NUMBER=$(gh api graphql -f query='{
repository(owner:"CERTCC", name:"Vultron") {
issue(number: '"${ISSUE_NUMBER}"') { parent { number } }
}
}' --jq '.data.repository.issue.parent.number // ""')
Use the title and body from ISSUE_JSON as source material throughout.
Phase 1b — Claim the Issue and Create Task Branch
Claim the issue now — as soon as it is validated — so others can see work
has started. Derive <slug> from the issue title (lowercase, hyphenated).
Delegate to claim-issue.sh for idempotency guard, branch creation,
assignee, and claim comment — exactly as build and bugfix do:
bash .agents/skills/shared/claim-issue.sh "${ISSUE_NUMBER}" plan "<slug>" \
${OTHER_MEMBERS[@]+"${OTHER_MEMBERS[@]}"}
Phase 2 — Orient (invoke `orient-agent`)
Invoke the orient-agent skill to load required baseline context.
Phase 3 — Deepen Context (invoke `deepen-context`)
Invoke the deepen-context skill, using focus hints derived from the issue
title and body (e.g., "wire layer", "BT integration", "embargo lifecycle").
This ensures the grill-me interview in Phase 4 starts from an informed
baseline rather than blank-slate context.
Phase 4 — Grill-Me Interview (invoke `grill-me`)
Invoke the grill-me skill. The interview is conversation-driven and
bottom-up — conclusions (scope, ACs, ADR, options, recommendation) emerge
from the discussion rather than being asked as structured questions.
General pattern (all types):
- Prior-art search (before the short brief): Load
.agents/skills/shared/compose-before-create.md and search for existing
helpers, use cases, or base classes that match the domain nouns in the
issue title and body. This surfaces reuse opportunities before acceptance
criteria are drafted. Record any findings — they become the ## Prior Art
section of the implementation issues created in Phase 8; omit the section
if nothing is found.
- Open with a short brief — Before asking anything, give a few bullets
on what the research from Phase 3 reveals: what the issue says, what the
current codebase/specs show, any prior-art findings from step 1, and 2–3
plausible directions, each described in a line. End with **one specific
question** — never "is this accurate?" about the whole block.
- Conversation — Walk through the problem bottom-up. Ask clarifying
questions as understanding builds. Do not impose a predetermined question
structure. Scope, ACs, and ADR applicability are conclusions to confirm,
not questions to ask.
- Signal the transition — When understanding is forming, say so:
"I think we're almost there — here's what I have so far. Got more?"
Do not declare done unilaterally.
- Confirm conclusions — After the user closes the conversation, list the
plan as a short numbered list, one plain-language line per decision: what
to implement, what docs to update, whether an ADR is warranted. Write every
item out in full — never refer back by number or bare ID. The user says
which lines are wrong; this is not a new round of questions.
Every question follows .agents/skills/shared/asking-the-user.md (one at a
time, problem before decision, behavior not wording, plain language, no bare
IDs), and passes the guide's pre-ask check before it is sent.
Type-specific opening and conversation guidance: see the loaded
companion file.
Do not write anything until grill-me is complete.
If the interview surfaces focus areas not covered in Phase 3, invoke
deepen-context again with those additional hints before proceeding.
Phase 5 — Update Docs (conditional)
Only if Phase 4 identified a concrete gap. See the loaded companion file for
which files to update per type.
specs/<topic>.yaml— Add or amend requirements. Follow
specs/meta-specifications.yaml conventions (ID scheme PREFIX-NN-NNN,
RFC 2119 keywords). Update specs/README.md if adding a new file.
notes/<topic>.md— Add design decisions, pitfalls, or implementation
guidance. Every notes/*.md must have valid YAML frontmatter (title,
status). Update notes/README.md if adding a new file.
AGENTS.md— If Phase 4 identified a recurring agent gap (Concern type
only), route the pitfall per