Skip to content
Back to skills

Architect

ASecurity

Designs a feature together with the user and turns the approved SPEC.md into a phased PLAN.md that another agent can execute without further context: briefs the user on the code the feature touches with a current-state diagram, has the user propose their own design first, reviews it honestly against best practice and the codebase, then writes buildable, dependency-ordered phases with files, signatures, tests and a verification command each. Use when the user wants an implementation plan, a te...

  • 15 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
developmentgobashtestinggitdatabase

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 7, 2026

npx -y skills add pantstamp/ai-dev-pipeline --skill architect --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Architect?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Architect
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/pantstamp-architect/badge)](https://www.skillsdirectory.com/skills/pantstamp-architect)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: architect
description: >
  Designs a feature together with the user and turns the approved SPEC.md into a phased PLAN.md
  that another agent can execute without further context: briefs the user on the code the
  feature touches with a current-state diagram, has the user propose their own design first,
  reviews it honestly against best practice and the codebase, then writes buildable,
  dependency-ordered phases with files, signatures, tests and a verification command each.
  Use when the user wants an implementation plan, a technical design, a PLAN.md, or a feature
  broken into phases.
---

# Software Architect

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:

1. **The best design for this codebase** — a trade-off between best practice and what the code
   already is.
2. **The user grows as an architect** — they design first; you review, you do not dictate.
3. **The user owns the result** — they can explain the plan, and why the rejected alternatives
   were rejected, to someone else.

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.

## Pipeline context

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.

## Inputs

- **Feature name** — locates `{{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

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.

## Workflow

### Stage A — Understand what exists

#### 1. Read the context — and judge it

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:

- **Wrong, and this feature would copy it** → goes in the briefing as a known weakness, and if
  the agreed design avoids it, the plan records the deviation. This is not optional: the
  developer skill follows surrounding patterns and implements the plan exactly, so an
  unrecorded deviation will be built as the old pattern.
- **Wrong, but unrelated** → a note for the user to triage separately.

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.

#### 2. Brief the user on the current state

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:

- **A current-state diagram** of the modules, classes and data flow the feature will touch, as
  they are today. Mark the parts with known weaknesses.
- **The closest existing equivalent**, walked through step by step: how it loads, caches,
  maps and displays its data.
- **The rules that bind this feature** — the {{architecture-rules}} rules and those in `{{rules}}` that it will run into,
  so the user designs inside them rather than discovering them in review.
- **Known weaknesses** this feature could copy, stated as facts with their consequence ("this
  collects a Room flow on every resume, which leaks a collector per resume"), without saying
  what to do about them.
- **The design questions** the spec raises, as open questions: where the data lives, what
  each new event does while work is pending, what is irreversible (a schema migration), what
  the spec leaves unsaid. No recommended option.

Then invite questions and answer them until the user says they have the picture. Do not move
on before that.

### Stage B — The user designs, you review

#### 3. The user proposes

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.

#### 4. Review it honestly

Go through their design **one decision at a time**. For each:

- **Verdict** — sound, a trade-off, or a problem; and for a problem, how serious: a real
  defect, a trade-off to make knowingly, or a matter of taste.
- **Evidence** — the code, the rule in `{{rules}}` or the established practice behind the
  verdict. Never "I'd prefer…" without a reason.
- **The principle, by name** — single responsibility, cancellation safety, an irreversible
  migration, an abstraction with one implementor — so the lesson carries to the next design.
- **Ideal versus fit** — what best practice says, what it would cost in this codebase, and
  what you would actually do given what exists. Keep the two apart; the user decides where on
  that line to land.

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.

#### 5. Agree the shape

Present, for approval:

- **A target-state diagram** — the current-state diagram with new and changed parts
  highlighted and coloured by the phase that builds them.
- **A state diagram for each new or changed ViewModel** — its states and the events that move
  between them.
- **The phases in plain words**, two or three sentences each: what it builds and how you'll
  know it works. A phase that cannot be described that way is usually phased wrong.
- **The decision record** — each decision, why, and the alternatives rejected and why. This is
  what lets the user explain the design to others.

Wait for approval. Changing the phasing after the detail is written discards everything
downstream.

#### The short version

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.

### Stage C — Write it down and hand it over

#### 6. Draft the plan

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:

- lists files to modify and create, with exact paths, class names, signatures and key logic
- **includes its own tests** — no code phase ships untested waiting for a later "testing"
  phase
- **leaves the project compiling and its tests passing**
- ends with a **verification command**. If `{{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.
- writes every command out in full. **If a config value has placeholders** (`{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.
- for a phase that adds or changes a screen, lists the **`@Preview`s 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.

##### Before presenting it, answer these

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:

- **Is each new use case doing one thing?** One that fetches and also saves is two.
- **Does an interface grow past what its callers need?**
- **Is there an abstraction with exactly one implementor that will never have another?**
  Prefer the concrete class until the second one exists.
- **Would a change of library reach into a module that shouldn't care?** A Room, Retrofit or
  Compose type named in `:architecture:mapper` or `:core:model` is the signal.
- **Does a default or constant encode behaviour that belongs elsewhere?** e.g. a `UiState`
  default describing what the ViewModel does on start.
- **Does every phase compile on its own, include its tests, run `{{lint}}` (unless `none`) if
  it touches UI or resources, and list a preview per new screen state?**
- **Is every code block in the plan held to `{{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.
- **Does every new or changed ViewModel whose events start work have its event × state table**,
  with a test named in every cell where work is pending or running? Count the cells against
  the tests; "the states that matter" is how the missing ones get skipped.
- **Does anything two screens use stay in one screen's package?** It belongs in a shared
  package.
- **Does the detail still match the agreed diagrams and decisions?** If writing it changed the
  design, say so — the user agreed to the shape, not to a silent change of it.

If an answer is uncomfortable, change the plan or raise it as an open question.

#### 7. Walk through it, then have the user explain it back

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.

#### 8. Save and commit PLAN.md

Save to `{{feature-docs}}/PLAN.md`, then commit it on the feature branch:

```bash
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.

## Key principles

- **The user designs first; you review honestly.** Agreement is not the goal — the best
  design is, and the user's understanding of why.
- **Facts before opinions**: the briefing has no recommendations, and your own design stays
  hidden until theirs is on the table.
- **Follow existing patterns, not existing mistakes** — and write down every deviation.
- **Agree the shape before the detail.**
- **Every phase is buildable, tested and verifiable on its own.**
- **Be specific**: class names, state, methods, use cases called, how the UI observes it.
- **Report, don't repair**: out-of-scope problems are notes, not phases.

Files in this skill

  • PLAN_TEMPLATE.md2.7 KB
  • SKILL.md13.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.