/ph-plan:setup-ph-planfrom ph-plan
Configure this repo for the engineering skills — set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
Ships in ph-plan. 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.
Scaffold the per-repo configuration that the engineering skills assume:
CONTEXT.md and ADRs live, and the consumer rules for reading themThis is a prompt-driven skill, not a deterministic script. Explore, present what you found, confirm with the user, then write.
Look at the current repo to understand its starting state. Read whatever exists; don't assume:
git remote -v and .git/config — is this a GitHub repo? Which one?AGENTS.md and CLAUDE.md at the repo root — does either exist? Is there already an ## Agent skills section in either?CONTEXT.md and CONTEXT-MAP.md at the repo rootdocs/adr/ and any src/*/docs/adr/ directoriesdocs/agents/ — does this skill's prior output already exist?.scratch/ — sign that a local-markdown issue tracker convention is already in use.gitignore — does it already ignore *.local.* or *.local.md? This matters only for the Linear route.triage skill installed? (a triage skill folder alongside this one, or triage in your available skills.) This decides whether Section B runs at all.pnpm-workspace.yaml, a workspaces field in package.json, or a populated packages/* with its own src/. Present only in a genuinely large multi-package repo; their absence means single-context, which is almost every repo.Summarize what's present and what's missing. Then take the sections in order — one section, one answer, then the next.
Lead each section with the recommended answer so the user can accept it in a word. Give a one-line explainer only when the choice genuinely branches, and drop a section's question when exploration already settled it: Section B disappears entirely when triage isn't installed, and Section C's choice disappears when there's no monorepo — though its single-context default is still drafted in step 3 and written in step 4.
Section A — Issue tracker.
Explainer: The "issue tracker" is where issues live for this repo. Skills like
to-tickets,triage, andto-specread from and write to it — they need to know whether to callgh issue create, write a markdown file under.scratch/, create a Jira or Linear issue, or follow some other workflow you describe. Pick the place you actually track work for this repo.
Default posture: these skills were designed for GitHub. If a git remote points at GitHub, propose that. If a git remote points at GitLab (gitlab.com or a self-hosted host), propose GitLab. Otherwise (or if the user prefers), offer:
gh CLI.glab CLI..scratch/<feature>/ in this repo. This suits solo projects and repos without a remote.Record the choice in docs/agents/issue-tracker.md. The GitHub and GitLab templates carry a "PRs as a request surface" flag, defaulted off — leave it off and don't raise it; a user who wants external PRs in the triage queue can flip the flag in the file later.
Jira follow-ups. Ask where specs, maps, and research live: in a wiki such as Confluence (recommended when the team has one), or as Jira issues. In the template's Specs, maps, and research section, keep the subsection that matches, delete the other, and drop the kept subsection's ### heading. Then collect the template's coordinates and substitute them throughout: the site, project key, ticket issue type, and effort issue type, plus the space key and the page that holds effort pages when specs live in a wiki. Use only standard issue types. Leave out anything that depends on a custom issue type or a custom field.
Linear follow-ups. Collect the team key and the project name. Then ask one question:
Keep the team and project out of the committed file, in a gitignored
docs/agents/linear-ids.local.md? (recommended: yes for a public repo)
On yes, keep the <TEAM> and <PROJECT> placeholders in issue-tracker.md and write the local file from references/linear-ids-local.md with the values filled in. Its connection-preference section is where a person records which CLI or MCP server their machine uses. Check that .gitignore covers the file, and add *.local.* if it doesn't. On no, replace each placeholder with its value throughout issue-tracker.md, rename the Coordinates table's Placeholder column to Value, and delete the paragraph that points at the local file.
Neither the Jira nor the Linear template names a connection method. Don't add one. The agent uses whatever tracker access the runner has.
Section B — Triage label vocabulary. Skip this section entirely if the triage skill isn't installed (exploration told you) — an uninstalled skill needs no labels.
If it is installed, ask exactly one question:
Do you want to keep the default triage labels? (recommended: yes)
The defaults are the five canonical roles, each label string equal to its name: needs-triage, needs-info, ready-for-agent, ready-for-human, wontfix. On yes, write them as-is. Only if the user says no — usually because their tracker already uses other names (e.g. bug:triage for needs-triage) — collect the overrides so triage applies existing labels instead of creating duplicates.
Either way, seed the "Claim roles" section from the template with its defaults. Don't ask about it: /ph-build:foreman reads it, and a user who wants a custom field instead of labels can edit the file later.
Section C — Domain docs. Default to single-context — one CONTEXT.md + docs/adr/ at the repo root. This fits almost every repo; write it without asking.
Offer multi-context — a root CONTEXT-MAP.md pointing to per-context CONTEXT.md files — only when exploration found monorepo signals. Then confirm which layout they want.
Section D — Work item lifecycle. This builds on the Section A answer. The ## Work item lifecycle table in issue-tracker.md has one row for each event of an unattended ticket run: start, review requested, PR merged, and halt. Each row's actor is agent (the run makes the move), automation (the tracker makes it), or none (nothing moves). Ticket runs and /ph-build:foreman read the table. Keep its columns, its four events, and its three actors exactly as named.
Read the statuses. Through the runner's tracker access, read the names the table needs. On Linear, read the team's statuses. On Jira, read the project workflow's transitions with their ids and target statuses; listing the transitions on a ticket in each status shows them. GitHub, GitLab, and local markdown have no statuses to read.
Draft from the route's defaults. Start from the table in the route's seed and replace each status name with the one discovery returned:
| Route | start | review requested | PR merged | halt |
|---|---|---|---|---|
| Linear | agent → In Progress | agent → In Review | automation → Done | agent → Todo |
| Jira | agent → In Progress (transition id) | agent → the review status (transition id) | none | agent → To Do (transition id) |
| GitHub, GitLab | none | none | automation (the closing keyword) | none |
| Local markdown | none | none | none | none |
For "other", draft the table from the user's description.
Ask one question, listing the draft's agent rows:
Which of these does your tracker already do on its own?
Flip each row the user names to automation. Skip the question when the draft has no agent row, as on GitHub, GitLab, and local markdown.
Jira: every agent row requires a transition id. Write it into the action, as in → Review (transition 31). When discovery can't reach Jira, or a status has no transition into it, ask the user for the id. Never write an agent row without one, and never guess one.
Leave every row's assignee as is unless the user asks for a change; the assignee belongs to the human. Write the finished table into the seed's ## Work item lifecycle section, keeping the prose after it.
Show the user a draft of:
## Agent skills block to add to whichever of CLAUDE.md / AGENTS.md is being edited (see step 4 for selection rules)docs/agents/issue-tracker.md (with its Work item lifecycle table from Section D), docs/agents/domain.md, and docs/agents/triage-labels.md (the last only when triage is installed)docs/agents/linear-ids.local.mdLet them edit before writing.
Pick the file to edit:
CLAUDE.md exists, edit it.AGENTS.md exists, edit it.Never create AGENTS.md when CLAUDE.md already exists (or vice versa) — always edit the one that's already there.
If an ## Agent skills block already exists in the chosen file, update its contents in-place rather than appending a duplicate. Don't overwrite user edits to the surrounding sections.
The block:
## Agent skills
### Issue tracker
[one-line summary of where issues are tracked]. See `docs/agents/issue-tracker.md`.
### Triage labels
[one-line summary of the label vocabulary]. See `docs/agents/triage-labels.md`.
### Domain docs
[one-line summary of layout — "single-context" or "multi-context"]. See `docs/agents/domain.md`.
Include the ### Triage labels sub-block, and write docs/agents/triage-labels.md, only when triage is installed and Section B ran. When it isn't, both are omitted.
When Section B ran on GitHub, GitLab, or Linear, create each configured label the tracker lacks with gh label create or glab label create. On Linear, create it as a workspace-level label through whatever Linear access the runner has. Skip label creation for Jira, which creates a label the first time an issue uses it, and for local markdown, which has no labels.
Then write the docs files using the seed templates in this skill folder as a starting point:
triage is installed)For "other" issue trackers, write docs/agents/issue-tracker.md from scratch using the user's description, and give it the ## Work item lifecycle section from Section D.
Tell the user the setup is complete and which engineering skills will now read from these files. Mention they can edit docs/agents/*.md directly later — re-running this skill is only necessary if they want to switch issue trackers or restart from scratch.
agents/openai.yaml (opens in a new tab)references/domain.md (opens in a new tab)references/issue-tracker-github.md (opens in a new tab)references/issue-tracker-gitlab.md (opens in a new tab)references/issue-tracker-jira.md (opens in a new tab)references/issue-tracker-linear.md (opens in a new tab)references/issue-tracker-local.md (opens in a new tab)references/linear-ids-local.md (opens in a new tab)references/triage-labels.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub mattlindell/photon-plugins --plugin ph-plan19 skills in this plugin
/define-doneClose the verification dimension by deciding one shared way a body of work will be proven done, and attach it to whatever carries the work — a live planning session, a spec, or a ticket set. Use when grilling has settled problem, shape, and approach, when a spec or tickets still have verification open, or when the user asks how the work will be proven done or what counts as done./domain-modelingBuild and sharpen a project's domain model. Use when the user wants to pin down domain terminology or a ubiquitous language, record an architectural decision, or when another skill needs to maintain the domain model./grillingGrill the user relentlessly about a plan, decision, or idea until the frontier is empty, maintaining the domain model as you go and ending in a spec or tickets. Use when the user wants to stress-test their thinking, sharpen a design, or work out what to build, or uses any 'grill' trigger phrases.