/ai-pipeline:architectfrom ai-pipeline
Collaboratively designs features with the user, producing a SPEC.md and a phased PLAN.md with dependency-ordered build steps, tests, and verification commands. Use when you need an implementation plan or technical design broken into phases.
Ships in ai-pipeline. 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.
Designs a feature with the user and produces a self-contained implementation plan from a SPEC.md. The skill has three goals, in this order:
So the user proposes before you do. Your job is to give them the full picture, review their design honestly, and turn the agreed design into a plan.
Read .claude/pipeline.md before you start. A name in double braces below, such as {{base}},
stands for that name's value in its table.
If a value this skill uses is missing there, stop and tell the user which; do not
guess it.
{{feature-docs}}/SPEC.md. If not given, use the
most recent SPEC.md and confirm.Work on the branch the product-owner stage created ({{feat-prefix}}{name} or {{fix-prefix}}{name}). If it
does not exist — the spec stage was skipped — create it from an up-to-date {{base}} with the
prefix matching the change type.
Diagrams carry the design in this skill. Render each one inline with a visualisation tool when the session has one; otherwise show it as a fenced Mermaid block. The diagrams that end up in PLAN.md are always Mermaid, so they render on the code host and in the PR.
Keep them at the level of modules, classes and data flow — no signatures — so they do not go stale while the detail changes.
Read in order: {{rules}}, the SPEC.md, the architecture docs in docs/, then the code the
feature touches (module structure, navigation, database, DI, and the closest existing
equivalent of what you are building).
Follow existing patterns, and introduce no new library or pattern without the user's approval. But reading the code is also the moment to judge it. "Follow the existing pattern" propagates whatever is already wrong: a defect copied from a neighbouring class is still a defect. Sort what you notice:
Fix nothing at this stage and do not widen scope to absorb cleanup.
Then write down your own design before the user shows theirs — in a scratch file outside the repository, never committed and not shown yet. Cover each design question in step 2. This is what makes the review in step 4 a comparison of two independent designs rather than adjustments to whichever one was seen first.
Size the session. If the change is small — one layer, a few files, no real design fork — recommend the short version (see the end of Stage B), and say why. Always ask; the user decides.
Present facts, not recommendations. The user is about to design against this, so it must be complete enough to design from and free of hints about the answer:
{{rules}} that it will run into,
so the user designs inside them rather than discovering them in review.Then invite questions and answer them until the user says they have the picture. Do not move on before that.
Ask for their design, in any form: prose, bullets, answers to the design questions, partial. Gaps are fine — they are filled together in step 4.
If they ask for help while designing, answer with a question or the principle that applies ("what happens to that collector when the screen is recreated?"), not with your answer. If they ask to see your design instead, show it — it is their choice — but say once that designing first is where most of the learning is.
Go through their design one decision at a time. For each:
{{rules}} or the established practice behind the
verdict. Never "I'd prefer…" without a reason.Then reveal your own design from step 1 and compare. Where they differ, argue both sides. Where theirs is better, say so plainly and use theirs. Do not soften a real problem and do not quietly substitute your own choice.
The user decides every fork. They may revise and ask for another review; repeat as long as they want.
Present, for approval:
Wait for approval. Changing the phasing after the detail is written discards everything downstream.
For a small change, when the user chose it: one message with a brief current-state summary (a diagram only if there is more than one moving part) and the one or two design questions; the user answers; you review as in step 4 and reveal your view; then a few lines of outline. The order does not change — the user still proposes before you do.
Use the structure in PLAN_TEMPLATE.md, in this skill's base directory. The diagrams and decision record
from step 5 go into it as agreed — the final design only, not how it was reached.
Phases are dependency-ordered slices, not fixed layers. Order them so each builds on the previous one (typically data → domain → presentation), and use only the layers the change actually touches. Every phase:
{{lint}} is not none and the phase touches a
composable or anything under res/, the command includes {{lint}}: lint is the only check
that sees Compose and resource misuse. When {{lint}} says warnings fail it, add each
resource in the phase that first uses it — an unused resource is then itself a lint error.{module},
{unit-test-task}, …), resolve each from the project — its build files, or
./gradlew :{module}:tasks --all — and write the exact command. Never guess a task name. If
one cannot be resolved, ask.@Previews to add, one per visual
state (loading, each error variant, empty, content). CI compiles previews but never
renders them, so a preview is often the only way to see a state that is hard to reach on a
device.Choose test cases from the code's branches, not only from the spec's list. When a
condition treats two states the same (null and empty), plan a test for each. When a new path
is reachable from more than one caller or flag value, plan a test for each entry point.
Plan a ViewModel's event tests as a matrix, not a list. For a ViewModel whose events start work (load, search, retry, refresh, save), write an event × state table in its phase: one row per event, one column per state it can arrive in (idle, pending, running, error, content). Each cell says what happens — ignore, cancel and restart, or queue — and names its test. Every cell where work is pending or running gets a test, including the ones whose answer is "ignored": those are where a second request starts, a flag sticks, or a result lands for the wrong input. A list of tests by feature covers the cases someone thought of; the table shows the ones nobody did.
Most layering rules are enforced by {{architecture-rules}} and run in verification and CI — don't restate them. Spend the effort on what the build can't check:
:architecture:mapper or :core:model is the signal.UiState
default describing what the ViewModel does on start.{{lint}} (unless none) if
it touches UI or resources, and list a preview per new screen state?{{rules}}? The developer implements plan code
verbatim, so a rule broken in the plan ships. Check each snippet as you would a diff: flows,
effects, buffers, flags.If an answer is uncomfortable, change the plan or raise it as an open question.
Walk through the plan phase by phase in plain words, then let them read the detail. Ask for what the codebase can't tell you: upcoming changes, team preferences, constraints. Iterate until they are satisfied.
Then ask the user to explain the plan back in their own words, as they would to a teammate. Point out anything that differs from what is written or that they left out — gaps are in the plan's clarity as often as in their understanding, so fix the plan where it is the cause. This is the default; the user may skip it.
Save to {{feature-docs}}/PLAN.md, then commit it on the feature branch:
git add {{feature-docs}}/PLAN.md
git commit -m "docs({feature-name}): add implementation plan"
Tell the user the path and that the developer skill executes it phase by phase.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub pantstamp/ai-dev-pipeline --plugin ai-pipeline6 skills in this plugin
/developerImplements a PLAN.md one phase at a time on the feature branch, running each phase's verification, committing it, and stopping for the user's approval before the next; then offers the pre-PR gate, and pushes and opens the pull request. Use when the user wants to implement, build or execute a plan, start or resume a phase, or create the PR.
/pre-pr-checklistRuns a pre-PR quality gate on a feature branch: checks that the PLAN.md was followed, that each SPEC.md acceptance criterion is covered, that no debug leftovers or TODOs are in the diff, and that the changed code follows the project's written judgement rules, then runs a local mirror of CI and reports GO, CONDITIONAL GO or NO GO. Use when the user asks whether a branch is ready for a PR, or for a pre-PR check, quality gate or final check.
/product-ownerInterviews the user one topic at a time to turn raw requirements or an issue into a SPEC.md with user stories, acceptance criteria, edge cases and out-of-scope items, on a new feature or fix branch. Use when the user wants to spec, scope or define a feature or bug fix, write user stories or acceptance criteria, or start work on an issue.
/retrospectiveRuns a post-merge retrospective for a feature's pull request: reads the review comments, the diff, the fix commits, SPEC.md and PLAN.md, writes a RETRO.md comparing against earlier retros, and routes each lesson to the project's rules, an architecture or lint rule, a skill, or the review prompt. Use after a PR is merged when the user asks for a retro, retrospective, lessons learned, or to turn review findings into project rules.
/review-triageWalks through a pull request's inline review comments one at a time, showing the code, the suggestion and an assessment, and waits for the user's decision on each; then applies the accepted fixes, verifies, commits, pushes, replies on each thread, and checks for comments newer than the last commit before merge. Use when the user wants to triage, go through or address PR review comments or findings.
Other plugins' skills for the same job