/ceh-build-plan:write-technical-designfrom ceh-build-plan
Load this skill when settling the technical design several features share, before any is planned, even if a README line seems enough: ARCHITECTURE.yaml. Trigger on "write the technical design", "pick the stack". Not for what is already built (use ceh-codebase-explanation:document-architecture).
Ships in ceh-build-plan. 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; scripts run unread.
Settle the technical decisions that several features share, before the first of them is planned,
and write them into ARCHITECTURE.yaml, per Output: each decision as one entry of
its technical_design section, found by its topic, and each diagram of what is not built yet
marked planned: true. A build plan then follows these entries and never decides them again for
one feature. Done means the file passes its check and the tests below, and the reply lists every
entry, diagram and answer assumed.
ARCHITECTURE.yaml, PRD.yaml, VISION.yaml and
STRATEGY.yaml that exists, in .agents_workspace/product/ or at the path the repo's
CLAUDE.md names for it, run
uv run --script ${CLAUDE_SKILL_DIR}/scripts/artifact.py check <file>.yaml before reading it
(formats in ${CLAUDE_SKILL_DIR}/references/architecture-schema.md, prd-schema.md,
vision-schema.md and strategy-schema.md). On exit 1, stop and report its errors, because
a design built on a broken source carries the error into every plan. On a stale .md alone,
read the YAML instead. On exit 2 or 3, or
without uv, say in the reply that the file went unchecked, and go on. A vision or strategy
kept as .md in docs/, the root, or where the repo's CLAUDE.md says is read as it is.
Then read the design of each plan in .agents_workspace/product/plan/, the README, and the
code. Read no business plan. With no PRD, take the features from the request and the vision,
and say so. With no ARCHITECTURE.yaml, start one per Output.technical_design already holds is
kept unless the request changes it, and a change follows step 5.technical_design entry. topic is its name from What belongs
here, and reason is one short paragraph on why: the features that need it, and one option
rejected and why. choice holds the contract for the topic as Markdown (lists, tables, code
blocks), exact enough that a plan cites it and a builder does not ask again: for Stack the
versions, the folders and the commands that run, for Persistence each model with its
fields and limits, for Interfaces the routes with body, status codes and error shape. A
sub-section that stands on its own, such as the style fields of one model, is a part, with
a title and a body. Keep a part small: one over 30 lines fails the check and becomes a
topic of its own. Write no heading in any of these texts, because the renderer numbers them.
Refer to another entry by its topic, and to a part by its topic and title, never by a
section number, because the rendered numbers move when a topic is added. A first write adds
nothing to key_decisions, because the entry holds its own reason, so a new file holds
key_decisions: [].key_decisions
entry dated today with status: Accepted, titled <topic>: <the new choice in a few words>,
whose context holds the old choice and why it no longer holds. Then mark every earlier
Accepted entry of key_decisions that decides the same topic, whoever wrote it,
Superseded by <date> <title> naming the new one. A first write whose choice an Accepted
entry contradicts is a change too.planned: true: Components, and Data
model and Key flows when the product has them. A new file also gets its Overview, which
takes no mark. Leave a diagram that shows built code as it is. When the design changes what
such a diagram shows, add a second entry of the same name right after it, marked
planned: true and showing the whole target. It replaces the built entry once the code
matches it.artifact.py render on the file and fix the YAML for each error it lists.
When the Mermaid CLI can run, render each new Mermaid block with
npx -p @mermaid-js/mermaid-cli mmdc -i <file>.md -o <out>.md and look at the images.
Otherwise say in the reply that the diagrams were not rendered.A decision belongs in the technical design when two or more features depend on it, or when reversing it would cost a migration or a refactor. Each gets one entry, under the topic name given here, so every plan cites one spelling:
Stack: the stack and runtimePersistence: persistence and the core data modelComponents: the components and their boundariesInterfaces: the interface between componentsOwnership and auth: who owns each resource, and how a caller is authenticatedDeployment: the deployment targetConfiguration and errors: how both are handled across componentsAdd a topic of your own when the product needs one these do not cover. A decision one feature alone needs stays for that feature's build plan. The PRD says what a feature must do and how to tell it is done. The technical design fixes the exact data, routes and states the features share.
| Test | Ask | Fails when |
|---|---|---|
| Shared | Which two features need each entry, or what would reversing it cost? | One feature, cheap to reverse: it belongs in a plan |
| Options | Does each reason name an option rejected and why? | Only the chosen option appears |
| Exact | Could a builder implement the topic from the entry alone? | A field, route or status the plans need is left to the builder |
| Covers | Which component serves each feature in the PRD? | A feature has none |
| Qualities | Which entry answers each non_functional item in the PRD? | An item has none and the reply does not list it as open |
| Consistent | Does every diagram show only what the entries say, and does no Accepted entry of key_decisions contradict one? | A node or entity has no entry behind it, or such a decision does |
With no PRD, run Covers against the features taken in step 1 and mark Qualities
not run: no PRD.
technical_design entry states what holds now: edit it in place, and never write a second
entry for its topic. key_decisions is its history: never delete an entry there, and edit no
field of one but its status, so the trail stays whole and no Accepted entry disagrees
with the section.planned: true, and never mark one that shows built
code. The Overview is not a diagram entry and takes no mark.
ceh-build-plan:implement-from-plan and ceh-codebase-explanation:document-architecture
remove the mark once the code matches the diagram.ARCHITECTURE.md is rendered from it..agents_workspace/product/ARCHITECTURE.yaml, or the file step 1 found at the path the repo's
CLAUDE.md names, in the shape of ${CLAUDE_SKILL_DIR}/assets/architecture.template.yaml, per the
architecture/v3 section of ${CLAUDE_SKILL_DIR}/references/architecture-schema.md. A missing
file starts as a copy of the template, and an ARCHITECTURE.md with no YAML is moved first, as
that section says. ARCHITECTURE.md is rendered beside it and never edited by hand.
Close the reply with the path, each entry by its topic, each entry changed with its history
entry, each diagram drawn, the result of each test, every non_functional item left open, and
every answer assumed.
ceh-build-plan:write-build-plan.assets/architecture.template.md (opens in a new tab)assets/architecture.template.yaml (opens in a new tab)assets/prd.template.yaml (opens in a new tab)assets/strategy.template.md (opens in a new tab)assets/strategy.template.yaml (opens in a new tab)assets/vision.template.md (opens in a new tab)assets/vision.template.yaml (opens in a new tab)references/architecture-model.py (opens in a new tab)references/architecture-schema.md (opens in a new tab)references/prd-model.py (opens in a new tab)references/prd-schema.md (opens in a new tab)references/strategy-model.py (opens in a new tab)references/strategy-schema.md (opens in a new tab)references/vision-model.py (opens in a new tab)references/vision-schema.md (opens in a new tab)scripts/artifact.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
4 skills in this plugin
/implement-from-planLoad this skill when building from a written plan: phase by phase, failing check first, only what the phase names, with each phase's check run and its evidence recorded. Trigger on "implement the plan", "build phase 2", "start building the mvp plan"./review-build-planLoad this skill when a build plan or spec exists and nobody has built from it yet, even for a quick look before building: review it on scope, engineering, content, design, and developer experience, and end with a verdict. Trigger on "review this plan", "just check the phases", "review the spec"./write-build-planOther plugins' skills for the same job
npx claudepluginhub cheneeheng/ceh-claude-code-library --plugin ceh-build-plan