plan-to-github-issues
Plan to GitHub Issues
Turn a local plans/*.md file into GitHub issues (one per phase), a CI workflow, and a PR template — so every PR proves its acceptance criteria through tests.
Process
1. Locate the plan file
If the user hasn't specified a file, look for plan files matching **/plans/plan-*.md or ask the user to point you to it.
Read the plan file and identify:
- The GitHub repo (run
gh repo view --json nameWithOwner) - All phases — each
## Phase N: Titlesection - The acceptance criteria checklist under each phase (
- [ ] ...lines)
2. Create labels
Create two labels if they don't exist:
gh label create "phase" --color "#0052CC" --description "Implementation phase" --repo OWNER/REPO
gh label create "acceptance-criteria" --color "#5319E7" --description "Has acceptance criteria" --repo OWNER/REPO
3. Create one issue per phase
For each phase, create a GitHub issue with:
- Title:
Phase N: <Title>(matching the plan heading exactly) - Labels:
phase,enhancement,acceptance-criteria - Body: use the template below
Run all gh issue create calls in parallel for speed.
<"What to build" content from the plan phase>
Related user stories:
Acceptance Criteria
<acceptance criteria checklist copied verbatim from the plan, as - [ ] items>
Test Coverage Requirements
All acceptance criteria above must have corresponding automated tests. A PR for this phase will not be merged unless:
- All tests pass in CI
- Each acceptance criteria checkbox has a test that directly validates it
- Test file names or descriptions reference the criterion they cover
4. Create the CI workflow
Create .github/workflows/ci.yml in the repo via the GitHub API. The workflow must:
- Trigger on
pull_request(opened, synchronize, reopened) andpushtomain - Spin up real service containers (Postgres + Redis) — no mocks
- Run: install deps → type check → db migrations → tests with coverage → upload coverage artifact
- Include an
acceptance-criteria-checkjob (PR only) that reads the linked issue viaCloses #Nin the PR body, counts checked vs unchecked- [ ]/- [x]lines, and posts a warning for any still-unchecked criteria - Include a lint job
Adapt the stack/commands to the project (Bun/Node, test runner, lint command). Inspect package.json or bunfig.toml to infer the right commands.
Use the GitHub Contents API to create the file (base64-encode content):
gh api --method PUT /repos/OWNER/REPO/contents/.github/workflows/ci.yml \
-f message="chore: add CI workflow with acceptance criteria tracking" \
-f content="<base64>"
5. Create the PR template
Create .github/PULL_REQUEST_TEMPLATE.md with:
- Linked issue field (
Closes #N) - Acceptance criteria checklist (to be filled by the author)
- A table mapping each criterion to the test file + test name that proves it
- A merge checklist (tests pass, type check passes, criteria proven, issue checkboxes updated)
Create via the GitHub Contents API same as above.
6. Report back
List all created issue URLs, confirm the workflow and PR template paths, and explain the workflow:
When you open a PR for a phase, add
Closes #Nin the body. Check off each acceptance criterion in the issue as you prove it with a test. CI will report how many remain unchecked.
Notes
- Create issues in parallel — don't wait for each one sequentially
- If the repo has no local checkout, use the GitHub Contents API for all file creation
- If the plan has no "What to build" section, use the phase title + acceptance criteria as the overview
- Don't hardcode env vars (JWT secrets, encryption keys) — use obviously-fake test values in the workflow
- The
acceptance-criteria-checkjob should warn, not fail — unchecked criteria are a signal to the author, not a hard gate
More from rockclaver/systemcraft
code-graph
Builds and maintains a `.claude/codegraph.md` index of a codebase — a structured map of every module with purpose, key exports, and dependencies — so the agent can navigate any repo by reading one file instead of scanning dozens. Use when starting work on an unfamiliar codebase, when asked to index a repo, when context costs are high from repeated scans, or at the start of any task that will touch multiple files.
14find-code
Locate files and code using grep and shell scripts — never by AI scanning. Returns exact file paths and line numbers so the agent can jump directly to the location. Use whenever the agent needs to find a function, class, variable, import, file, or any pattern in the codebase. Code and file discovery must always be a tool call, never an AI guess.
14grill-me
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
13prd-to-plan
Turn a PRD into a multi-phase implementation plan using tracer-bullet vertical slices, saved as a local Markdown file in ./plans/. Use when user wants to break down a PRD, create an implementation plan, plan phases from a PRD, or mentions "tracer bullets".
13write-a-prd
Create a PRD through user interview, codebase exploration, and module design, then submit as a GitHub issue. Use when user wants to write a PRD, create a product requirements document, or plan a new feature.
13design-api
Design and implement consistent, DRY REST API endpoints for database models — handlers, routing, validation, error responses, and shared utilities — then generate test coverage for every endpoint. Use when the user asks to write an API, add endpoints for a model, build a REST layer, or create CRUD routes.
13