design
Use BEFORE any creative or feature work — turning an idea, request, or epic into a validated, owner-approved design/spec. The kit's own design+brainstorm skill (replaces, does not depend on, superpowers brainstorming). Establishes intent, requirements, approaches, and an approved design before any implementation.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-15
- Stars
- ★ 3
- Forks
- 0
01 前言 Front Matter
- name
- design
- description
- Use BEFORE any creative or feature work — turning an idea, request, or epic into a validated, owner-approved design/spec. The kit's own design+brainstorm skill (replaces, does not depend on, superpowers brainstorming). Establishes intent, requirements, approaches, and an approved design before any implementation.
03 SKILL.md 正文
Design — turn an idea into a validated, honestly-scoped design
The kit's own design skill: take an idea → a design the owner has approved, through collaborative dialogue plus the kit's design disciplines. Replaces (does not depend on) superpowers brainstorming.
<HARD-GATE> Do NOT write code, scaffold a project, or take any implementation action until you have presented a design and the owner has approved it. Every slice, however simple. A "simple" change gets a short design — but it is still presented and approved. For XS/S the design is the note and its lens line, shown in the GO ask before any code (conduct, not enforced). </HARD-GATE>
Inception exception (Phase 0 is not a loop feature)
The HARD-GATE above governs loop work — features, components, behaviour changes. It does not
govern Phase-0 Inception: running incept is the one-time bootstrap that creates the repo and its
control plane, not a loop feature. Inception has its own design gate (the charter + ADR-000, fit/maturity-
disclosed and conformance-enforced; see DEVELOPMENT-PROCESS.md §3), satisfied within Inception — so
architecture-first still holds at Phase 0, it is simply gated there. Do not commit a spec before
incept — there is no repo yet, and a pre-incept commit breaks inception-done's fixture build.
incept's ownership/guard refusals stay in force.
<!-- The frontmatter and the discipline headings below are conformance-load-bearing: conformance/orchestrator-loop-wired.sh greps this file for kit-distinctive markers. Edits that drop or rename them can turn the skill-spine lock RED. -->
When to use
Before any feature, component, behaviour change, or new project — the moment implementation would otherwise begin. XS/S ordinary work does not owe a design doc, a plan file or a review record: the design note and task brief ride the PR body, one reviewer, security once on the built diff, nits accepted in the PR rather than a new round (on a tracker backend review-lane cannot read the size, so every non-docs ordinary PR owes a plan and a record until a later change reads it from the tracker); M, Sensitive and Control-plane owe them as before, except the small control-plane lane: a control-plane slice under about 50 non-test lines that adds no mechanism may commit its own new short design file (the design note and the twelve-row lens table) as its design GO's only basis, and skip the long-form design and the independent lens seat; the plan file, the review record and the security pass are still owed. Say in the PR that the slice uses this lane.
The flow (the proven spine)
- Explore context first — read the codebase, the kit's principles (
CLAUDE.md/DEVELOPMENT-STANDARDS.md), recent commits, the relevant design docs. Never design from assumptions. Search the project's decision record —docs/governance/DECISIONS.md, if the project keeps one — for a prior ruling on the surface you are about to change, and cite it by row identifier before proposing a mechanism on it. A conclusion re-derived from scratch is the disease that record exists to cure; the ruling may already answer you, or already have vetoed you. - Clarify — one question at a time (multiple-choice where possible): purpose, constraints, success criteria. Do not batch questions.
- Propose 2-3 approaches with trade-offs; lead with a recommendation and why.
- Present the design in sections scaled to complexity; get approval per section.
- HARD GATE — owner approval before any implementation.
- Write the spec to
docs/architecture/<date>-<topic>-design.md(tracked, cold-resumable) ordocs/superpowers/specs/(local); commit it. An M, Sensitive or Control-plane design carries a## Design-promised controlssection (each control the design promises and the test that will discharge it); the review record's table is carried from it. - Self-review the spec — placeholders, internal consistency, scope, ambiguity, and the lens review below; fix inline. For an M, Sensitive or Control-plane design, an independent seat (chosen by role, never by model) reads the twelve lenses on the committed design before the design GO is asked (conduct, not enforced).
- Owner reviews the written spec, then hand to the plan skill. Do NOT start implementation from this skill.
- An amendment made after a GO that adds a mechanism, a variable, a record value, a gate leg or an exemption is a design revision with its own GO, never a slip. The amendment's heading names every class of item it contains.
Design provenance — four sources, two artifact shapes
A design does not have to be authored by the slice that is governed by it. Provenance and artifact are different things:
| # | Provenance of the design | The slice's design act |
|---|---|---|
| P1 | Authored in this slice | originate it (steps 1-8 above) |
| P2 | Provided by the owner | review + confirm it |
| P3 | A previous slice, or an initiative design of record | review + confirm it |
| P4 | A backlog story carrying a reviewable design link (tracker-hosted — Jira et al.) | review + confirm it |
The invariant: whatever the provenance, the slice commits an in-repo design artifact, and that artifact is what the design GO binds to. For P1 that artifact is an originating design; for P2-P4 it is a confirming design. Both are full design artifacts of equal standing — they differ in content, never in status. A slice under an already-ratified design therefore never has to choose between churning that document and skipping the design stage: it writes a confirming design instead. The one exception (the owner's standing-GO ruling): a slice whose branch carries a design the owner already GO'd byte for byte (same blob, same mode) need not commit a design of its own. It records --basis <the GO'd commit>:<path> on a non-head branch commit (its plan commit), quoting the parent's go-by and token exactly (inherits <P>: <the parent's token>); conformance/ceremony-binding.sh enforces the quote and the identity. A slice that changes the design, or whose build departs from it, still writes its own design or an amendment and gets a GO.
A confirming design records a judgment, and must carry:
- What it confirms — a stable reference to the source: repo path + section for P2/P3; for a tracker-hosted or otherwise out-of-repo source, the URL plus the story key plus the page/revision id — never a bare link.
- Captured substance — for an out-of-repo source, enough of the design's substance that the confirmation still means something if the source is changed, restricted, or deleted. An out-of-repo design is mutable and this repository cannot see it change.
- Scope coverage — does that design actually govern this slice's scope, or is there a gap?
- Sizing — does the inherited estimate still hold for this slice? This is the cheapest place to catch a mis-sized slice, and the place it has been missed.
- Deltas — what differs from the inherited design, or explicitly none, and why.
- Obligations inherited — the contracts this slice must carry forward.
Ceiling — a confirming design can degrade into a rubber stamp, and that is NOT enforceable. Judging whether a confirmation embodies real judgment is semantic, and a prose scanner over design documents is a standing veto in this kit. What a green design gate establishes is narrower than it looks: a substantive artifact exists, and a GO scoped to this change names it, with an approver identity matching that artifact commit's git committer field. The artifact's coverage of this scope is NOT checked — no predicate relates the artifact's content to the change — and the identity is git-attested, not authenticated (a note binds; it does not authenticate). Never read a green as "the design was reviewed well", never as "this design governs this change", and never as "a human approved this design" — an identity matching the commit's committer field can be an agent running under the owner's configured git identity, or the forge itself (a squash-merge commit's committer is the forge, and naming it satisfies the derivation; measured). In the inherited form (<P>:<path>) the approver binds to the parent commit P, not to the branch: the gate requires a design-only GO at P with a [committer]-or-stronger approver label, a commit P not committed by a forge identity (whatever the approver), an approver that is not a forge identity (whatever the committer), and a named human GO-giver, and it compares the blob and mode at P with the branch head; it still does not check that the build matches the design, and the parent note is still bound, not authenticated.
<!-- The bold lead-in above deliberately reads "Ceiling" and NOT the two-word phrase used by the discipline bullet further down: conformance/orchestrator-loop-wired.sh anchors this file on that phrase, and a SECOND occurrence anywhere in this file silently disarms the lock — measured, the lock returned rc 0 with the discipline bullet deleted. Keep that phrase to exactly ONE occurrence here. ⚠️ A comment quoting the phrase to explain this rule ALSO counts: that mistake was made and caught. -->
The kit's design disciplines (what makes this MORE than generic brainstorming — apply to EVERY design)
- Architecture-first. Design and trade-offs before code; hand the owner the 5-10 lines of meaningful business logic, not boilerplate.
- Add only what lasts; cut what doesn't. (Design-intent lens.) Every addition must be meaningful in the long term. If adopters use it, it ships. If only kit development uses it, it stays behind the export boundary. If it serves neither, it is not built. Whatever we keep, we document and commit to maintaining. Anything already in the kit that fails this test is cut, stopped, or excluded from what ships. A thing passes the test with a measured catch or use, or a ratified reason. "We might need it" and "it's already there" are not reasons. The retire trigger: zero real catches or uses in your project's gate census window and no ratified reason make an item a cut candidate for the owner's cut sitting; no item is a candidate on absent data. For a security control (the guard, secret-scan, authN/Z, fail-closed boundaries, credential handling, input validation, PII redaction, AI runtime guards, ratification and promotion gates; when unsure, it is one, and the security seat decides), a low catch count is not evidence: a census cannot tell a prevented harm from an unused control. It is cut, stopped, or excluded only with the security seat's written read of what it protects. An agent proposes; the owner decides each of these. (conduct, not enforced: whether a thing lasts is a judgment no check reads; designers, reviewers and the owner's cut sitting apply it.)
- Is the provable thing the MEANINGFUL thing? Before committing a slice, ask whether the proof you can build establishes the thing that matters or an easier adjacent thing. If the only harness-neutral proof is a tautology, or it re-proves an existing slice, or the value is mostly future/declarative → RE-SELECT the slice. (Proven-not-prescribed applies to slice selection, not just execution.)
- Agents-vs-skills rule. A standing agent (seat) is earned only by a distinct skill AND (distinct tools OR must-run-parallel/independent); otherwise it is a skill a seat invokes. Few agents, many skills.
- Honest ceiling. Name what is behaviourally provable versus attestation. Never let a green check imply more than it proves; state the ceiling in the design.
- Non-vacuity. Every proof needs a positive liveness anchor AND a load-bearing negative — a dead or always-pass mechanism must fail the test.
- First-live-run dogfood. A slice shipping a new mechanism records that mechanism's first live run on its own slice in the design's §10 amendment log — the mechanism's first real subject is the change that ships it (adopted from an earlier review, where four consecutive first-runs each caught or honestly disclosed something: the scope leg caught its own brief's omission; the marker sweep redded its own CHANGELOG).
- Control-plane completeness. When a slice makes a path control-plane (the guard must protect it), lock it in all three guard matchers (
is_control_plane_pathfor the Write/Edit path AND the two shell-redirect regexes) AND add an agent-autonomy fixture per mutation form (Write/Edit,>redirect,sed -i). This completeness gap has recurred 3 times and is caught only by security review — design it in up front. - Enumeration boards its detection sibling. A check whose domain is an enumerated idiom (a verb lexicon, a skip-idiom list, a citation grammar) boards its detection-shaped sibling row at ship time, or states in the design why the enumeration is complete — three residuals of this class shipped in one phase.
- Right-weight / anti-ceremony. Prefer extending an existing gate to adding one; defer build-ahead (no infrastructure for needs that do not exist yet). A design that adds a new
conformance/*.shmust NAME the existing check it considered extending and why extension fails — a surfaceable answer, the same shape as the enumeration bullet above, not a preference. Measured: as a bare preference this sentence did not bind — the 35 days after it shipped added 30,981 conformance lines and 39 new checks.conformance/conformance-mass-budget.sh(kit-only: it is not in an adopter's export) now prints the growth (this change, since the last tag, the last cut) and the owner reads it per release, so the answer is named in the design and the review rather than priced per file; that read is conduct, not enforced. The gate measures growth and never judges it; whether the answer is honest is the reviewer's job. - Progressive disclosure. Make the rigorous path the default, surfaced progressively — a novice is not crushed, an expert is not constrained.
Lens review — twelve questions, scaled to the change
Every design answers the twelve lenses below, plus any lens your project's principles name. A lens is answered by its evidence, or by N/A — <reason>; N/A with a reason is a complete answer. How much you write follows the ceremony rule above:
- XS/S ordinary — one line in the PR's design note:
lenses: no findings except <lens>: <finding>(orlenses: no findings). - M, Sensitive or Control-plane — the full table in the design doc, under a
## Lens reviewheading (a section prefix in front is fine:## 9. Lens review,## 9a. Lens reviewor## §9 Lens review), one row per lens, with the lens name alone in a cell exactly as written below. Put your project's own lenses after the twelve.conformance/review-lane.shchecks that a design doc the change adds has the heading and all twelve names; it never reads what you wrote in them.
| # | Lens | The question | What discharges it |
|---|---|---|---|
| 1 | Project principles | Does it hold to the principles this project's CLAUDE.md declares? |
The principle at stake and how the design keeps it, or the ruling that lets it bend. |
| 2 | Friction | Who does this remove friction for, and who pays for it? | Who gains, who pays, and what they pay. A default-on control whose design names an adopter cost as real ships opt-in first. |
| 3 | Software practice | Would a strong engineer build it this way? | The more standard alternative you considered, and why this one. |
| 4 | Agentic practice | Does it suit how agents work: context, hand-offs, what the agent can and cannot verify? | What an agent must read, what it hands on, and which claims it can check versus must trust. |
| 5 | CI | What does it do to CI time, reliability and coverage? | Minutes added or saved, any new flake surface, coverage gained or lost. |
| 6 | DevOps and operations | Can it be deployed, rolled back and observed? | The deploy and rollback path, and the signal that shows it working or failing. |
| 7 | Security, privacy and guardrails | Does any agent gain a capability it lacks today? What data does it touch, and what happens to it? Any regulatory obligation? | Yes or no on capability, with the code that shows it; the data and where it goes; the obligation, or none. This row sets the Definition of Ready's conditional flags: threat model / privacy review, eval criteria, compliance. |
| 8 | Cost and efficiency | What does it cost in money and in time, to build, to run and to maintain, and is the size honest? Who uses it in the long term, and does it ship to adopters or stay kit-only? | Who uses it long-term: adopters (it ships), kit development only (it stays behind the export boundary), or neither (it is not built). Money: tokens, CI runner-minutes, infrastructure. Time: wall-clock for the person waiting (CI, review, hand-offs) and throughput (work landed per day). The size with its basis. Every figure labelled measured or estimate; an estimate gives a range and the assumption it hangs on (conduct, not enforced). |
| 9 | Product | Does it serve a real need, with a success metric? | The need, who has it, and the metric that will say it worked. |
| 10 | Design | Is it the simplest shape that solves the problem? | The smaller shape you considered and why it falls short. |
| 11 | Architecture | Does it respect the seams, contracts and neutrality already frozen? | The seam or contract touched and how it is kept, or the ruling that changes it. |
| 12 | UX and accessibility | What does the person at the keyboard see and do? | The message, prompt or screen they meet; WCAG 2.1 AA for a user-facing surface. |
Decompose if too large
If the request spans multiple independent subsystems, decompose into sub-projects first and design the first through this flow. Each sub-project gets its own design → plan → build cycle.
Terminal state
A committed, owner-approved spec, handed to the plan skill. This skill never starts implementation. The committed spec names the backlog item it satisfies — the requirements → backlog trace link — and, when it is a confirming design, also names the design it confirms.
04 同仓库更多 Skills
inception-from-code
Use when adopting the kit into an EXISTING repository (brownfield), to draft the Inception artifacts from the code instead of from blank templates. The agent reads the repository and writes five drafts, only under docs/inception-draft/, each tagged by how each fact is known; a person reviews them and moves what is right into place. Agents propose, humans ratify.
worktrees
Use BEFORE fanning out parallel Engineers or starting isolated feature work — the kit's own isolation skill (replaces, does not depend on, superpowers using-git-worktrees). The isolation craft, wired to the Orchestrator seat — detect-existing-first, native tools first, the kit's disjoint-set parallel-safety rule, and conflict-safe integration.
verification
暂无简介
using-skills
Use at the START of any task, before any response or action — the kit's own discovery keystone (replaces, does not depend on, superpowers using-superpowers). How the kit's skills are found and invoked (invoke by reading), the discipline of checking for a relevant skill before acting, instruction priority, and the index of the kit's own spine skills.
tdd
Use when implementing any feature, bug fix, refactor, or behaviour change — BEFORE writing production code. The kit's own test-driven-development skill (replaces, does not depend on, superpowers test-driven-development). Red-green-refactor framed as the kit's non-vacuity law, plus coverage, testing-pyramid, and AI-eval disciplines.
review
暂无简介