agentleFS
Luis85Luis85/agentic-workflow/.claude/skills/issue-draft/SKILL.md

issue-draft

Skill0 starsChanged 6 months agoMITView on GitHub

Conductor for the issue-draft track. Post-/spec:idea opt-in track that opens a draft PR seeded from idea.md and applies a living PRD sentinel block to the parent issue. Evolves both automatically via issue-pr-sync as stages complete. Triggers: "/issue:draft <n>", "open early draft PR for this issue", "start tracking this issue with a draft PR".

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Do not re-open. If the user wants a fresh draft PR, they must close the existing one and clear draft_pr from workflow-state.md manually.

    line 60
  2. Very specific:

    If outcome is aborted or pre-flight-failed, surface the failure to the user.

    line 80
  3. Very specific:

    Never invoke issue-pr-sync — that skill is invoked by subsequent stage conductors, not by this conductor.

    line 92
  4. Very specific:

    Never modify spec artifacts other than workflow-state.md.

    line 93

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Issue-draft conductor

You conduct the issue-draft track defined in docs/issue-draft-track.md. Your job: gate between phases, dispatch the issue-draft specialist agent, never do the agent's work yourself.

Shared conductor rules: .claude/skills/_shared/conductor-pattern.md.

Read first

  • docs/superpowers/specs/2026-05-04-issue-draft-track-design.md — source-of-truth design.
  • docs/issue-draft-track.md — methodology.
  • docs/adr/0035-add-issue-draft-track.md — rationale.
  • memory/constitution.md — Articles I, II, VI, IX.

Inputs

  • <issue-number> — required GitHub issue number passed as $ARGUMENTS.

What you do, step by step

Step 1 — Pre-flight

Confirm gh auth status succeeds. If not, surface to the user and exit.

Read the issue:

gh issue view <issue-number> --json number,title,body,labels,state,url

If state != "OPEN", hard-stop.

Step 2 — Resolve spec slug

Dispatch the issue-draft agent with the issue payload. The agent resolves the slug via its three-strategy fallback. If multiple candidates are returned, batch one AskUserQuestion:

  • One option per candidate specs/<slug>/ (recommended-first by idea.md last-updated).
  • "Other" → free-text override.

Step 3 — Verify gate

Agent reads specs/<slug>/workflow-state.md. If idea.md is not complete, hard-stop: "run /spec:idea first."

Step 4 — Idempotency check

Agent reads workflow-state.md. If draft_pr is already set, batch one AskUserQuestion:

  • View existing draft PR #<n> (Recommended).
  • Abort.

Do not re-open. If the user wants a fresh draft PR, they must close the existing one and clear draft_pr from workflow-state.md manually.

Step 5 — Confirm

Batch one AskUserQuestion:

Open a draft PR for specs/<slug>/ against issue #<issue-number>? Branch: feat/<slug>-draft PR title: feat(<area>): <feature title> [draft]

The issue body will receive a PRD sentinel block. Both will be kept in sync by issue-pr-sync as stages complete.

Options:

  • Open draft PR (Recommended).
  • Abort.

Step 6 — Dispatch agent

Hand off control to the issue-draft agent. Wait for its structured outcome.

If outcome is aborted or pre-flight-failed, surface the failure to the user.

Step 7 — Report

Print a 3-line summary:

  • Draft PR number and URL.
  • Issue PRD block applied (#<issue-number>).
  • Path to workflow-state.md where draft_pr was recorded.

Constraints

  • Never invoke issue-pr-sync — that skill is invoked by subsequent stage conductors, not by this conductor.
  • Never modify spec artifacts other than workflow-state.md.
  • Phase 2 (operational bot) is a separate PR; do not reference Phase-2-only files.

References

  • Methodology: docs/issue-draft-track.md.
  • Agent: .claude/agents/issue-draft.md.
  • Shared sync skill: .claude/skills/issue-pr-sync/SKILL.md.
  • ADR: docs/adr/0035-add-issue-draft-track.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.