/setup-engineering-workflow:setup-engineering-workflowfrom setup-engineering-workflow
Sets up the engineering workflow's per-repo context — an `## Agent skills` block in AGENTS.md/CLAUDE.md plus `docs/agents/` — capturing this repo's issue tracker (GitHub, GitLab, Linear, ClickUp, or local markdown), triage label vocabulary, domain doc layout, and delivery mode (merge / pr / local), and recording the workflow skill map derived from the installed plugins. Interactive by default; has an unattended mode that writes detected defaults marked as unconfirmed. Run before first use of the engineering workflow or its skills (`to-issues`, `to-prd`, `triage`, `diagnose`, `tdd`, `improve-codebase-architecture`, `zoom-out`), when the engineering workflow's Delivery phase needs a delivery mode, or if those skills appear to be missing context about the issue tracker, triage labels, or domain docs.
Ships in setup-engineering-workflow. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Scaffold the per-repo configuration the engineering workflow's skills assume, and record the workflow's skill map:
CONTEXT.md and ADRs live, and the consumer rules for reading themmerge to the default branch, pr, or local onlyThis is a prompt-driven skill, not a deterministic script. Explore, present what you found, confirm with the user, then write. When no user is available, see Unattended mode at the end.
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 or GitLab 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 uselinear.app or app.clickup.com links in the README, PR/issue templates, commit trailers, or an existing docs/agents/issue-tracker.md. Do not treat a configured linear/clickup MCP server as evidence — the engineering workflow pins both on every run regardless of the target repo. Bare issue keys (ABC-123) are ambiguous between Linear, ClickUp custom IDs, and Jira; they count only alongside a matching URL host.gh api repos/{owner}/{repo}/branches/<default>/protection (HTTP 404 = none) and gh api repos/{owner}/{repo}/rules/branches/<default> ([] = no rulesets; merge queues and most newer protection live here), plus CODEOWNERS and required status checks. GitLab: glab api projects/:id/protected_branches. Any other host, or an API failure that is not a clean 404 / empty list, means protection is unknown.git shortlog -sn, ignoring bot authorsSummarise what's present and what's missing. Then walk the user through the four decisions one at a time — present a section, get the user's answer, then move to the next. Don't dump all four at once.
Assume the user does not know what these terms mean. Each section starts with a short explainer (what it is, why these skills need it, what changes if they pick differently). Then show the choices and the default.
Section A — Issue tracker.
Explainer: The "issue tracker" is where issues live for this repo. Skills like
to-issues,triage, andto-prdread from and write to it — they need to know whether to callgh issue create, call the Linear or ClickUp MCP, write a markdown file under.scratch/, or follow some other workflow you describe. Pick the place you actually track work for this repo.
Default posture: if the git remote points at GitHub, propose GitHub; at GitLab (gitlab.com or a self-hosted host), propose GitLab. Repo-local Linear or ClickUp evidence (see step 1) overrides the remote. Otherwise (or if the user prefers), offer:
gh CLI)glab CLI)linear skill owns pickup and status transitions (ask for the team key and default project)clickup skill owns pickup and status transitions (ask for the workspace, space, optional folder, and list).scratch/<feature>/ in this repo (good for solo projects or repos without a remote)Section B — Triage label vocabulary.
Explainer: When the
triageskill processes an incoming issue, it moves it through a state machine — needs evaluation, waiting on reporter, ready for an AFK agent to pick up, ready for a human, or won't fix. To do that, it needs to apply labels (or the equivalent in your issue tracker) that match strings you've actually configured. If your repo already uses different label names (e.g.bug:triageinstead ofneeds-triage), map them here so the skill applies the right ones instead of creating duplicates.
The five canonical roles:
needs-triage — maintainer needs to evaluateneeds-info — waiting on reporterready-for-agent — fully specified, AFK-ready (an agent can pick it up with no human context)ready-for-human — needs human implementationwontfix — will not be actionedDefault: each role's string equals its name. Ask the user if they want to override any. If their issue tracker has no existing labels, the defaults are fine.
Section C — Domain docs.
Explainer: Some skills (
improve-codebase-architecture,diagnose,tdd) read aCONTEXT.mdfile to learn the project's domain language, anddocs/adr/for past architectural decisions. They need to know whether the repo has one global context or multiple (e.g. a monorepo with separate frontend/backend contexts) so they look in the right place.
Confirm the layout:
CONTEXT.md + docs/adr/ at the repo root. Most repos are this.CONTEXT-MAP.md at the root pointing to per-context CONTEXT.md files (typically a monorepo).Section D — Delivery mode.
Explainer: When the engineering workflow finishes a change on a working branch, its Delivery phase has to resolve that branch. (Skip this section when setting up for a workflow that has no delivery phase, such as
product-discovery.) In a solo repo with no branch protection, merging straight to the default branch is fastest. In a team repo with required reviews or a merge queue, the agent must open a pull request and never self-merge. This choice decides which of those the workflow does without asking.
The three modes:
merge — merge locally to the default branch after the Verification and Review gates pass, push, remove the worktree once the run has closed; no PR, no promptpr — push the branch and open a pull request with the delivery summary; never self-merge; leave the tracker issue In Reviewlocal — commit locally only; no push or merge (read-only clones, forks without write access)Default: merge only when the exploration found no protection (no branch protection, no rulesets, no required checks, no CODEOWNERS, no merge queue) and a single human contributor; pr in every other case, including when protection is unknown. Present the evidence and let the user override.
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, docs/agents/triage-labels.md, docs/agents/domain.md, docs/agents/delivery.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`.
### Delivery mode
[`merge` | `pr` | `local`] — [one-line reason]. See `docs/agents/delivery.md`.
### Workflow skills
Engineering-workflow skills, loaded by trigger on the agent's own judgment (model-invocable). Availability depends on the plugins being installed, not on this block:
[grouped inventory — see below]
Derive the ### Workflow skills inventory from what is actually installed, not from memory. It is not one of the interactive decisions, but it must be true for this machine:
~/.config/athena/workflows/fullstack-engineering/workflow.json (Athena) or the installed plugin list (Claude Code / Codex).skills/*/SKILL.md under its installed package and read each name:. Athena unpacks packages under ~/.config/athena/plugin-packages/<owner>/<marketplace>/<plugin>/<version>/; on Claude Code and Codex use the runtime's loaded-skill list (the skills named in the system prompt or the skill listing tool) filtered to those plugins.## Plugins section names them.If neither source is resolvable, fall back to this reference inventory (kept in step with the ## Plugins table in the fullstack-engineering workflow) and say so in the block:
setup-engineering-workflowgrill-with-docs, prototype, to-prd, to-issueslinear, clickup, triagesentrytdd, diagnose, zoom-out, improve-codebase-architecturefrontend-design, shadcn-uiagent-web-interface-guidemap-feature-scope, capture-feature-evidenceplan-test-coverage, generate-test-cases, review-test-cases, exploratory-test-writeranalyze-test-codebase, add-playwright-tests, write-test-code, review-test-code, fix-flaky-testsdefine-smoke-scope, define-regression-scopeworkflow-handoff, handoffcaveman, git-guardrails-claude-code, setup-pre-commit, write-a-skillThen write the four docs files using the seed templates in this skill folder as a starting point:
For "other" issue trackers, write docs/agents/issue-tracker.md from scratch using the user's description.
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, change the delivery mode, or restart from scratch.
Use this only when an AFK workflow run needs the config and no user is present to answer. Never use it when an ## Agent skills block already exists — unattended mode creates, it does not overwrite. One exception: a block that predates delivery modes (no ### Delivery mode line) may have that single section and docs/agents/delivery.md added unattended, with the same unconfirmed header.
CONTEXT-MAP.md exists; the delivery mode per Section D's default (merge only with no protection of any kind and a single human contributor, else pr).<!-- Auto-detected in unattended mode on <YYYY-MM-DD>; not yet confirmed by a maintainer. Edit or re-run setup-engineering-workflow to confirm. -->chore: bootstrap engineering workflow config (unattended)) before any product code changes, and record the detected choices in the workflow's session note.agents/claude.yaml (opens in a new tab)agents/openai.yaml (opens in a new tab)delivery.md (opens in a new tab)domain.md (opens in a new tab)issue-tracker-clickup.md (opens in a new tab)issue-tracker-github.md (opens in a new tab)issue-tracker-gitlab.md (opens in a new tab)issue-tracker-linear.md (opens in a new tab)issue-tracker-local.md (opens in a new tab)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 lespaceman/athena-workflow-marketplace --plugin setup-engineering-workflow