一键导入
tp-design
Interactive high-level design conversation that produces a design.md artifact in three-pillars-docs/tp-designs/{name}/. First step in the TDD pipeline.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Interactive high-level design conversation that produces a design.md artifact in three-pillars-docs/tp-designs/{name}/. First step in the TDD pipeline.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Convene the Council of High Intelligence — multi-persona deliberation with historical thinkers for deeper analysis of complex problems.
Design Audit — multi-angle review of a detailed design against the actual codebase before implementation.
Mark a TDD design as complete — stamp completion, archive handoff.md, archive to three-pillars-docs/completed-tp-designs/, and optionally commit + open a PR merging the design branch back to the base branch.
Scaffold architecture.md, product_roadmap.md, and known_issues.md in three-pillars-docs/ from codebase analysis. Creates the three project docs that the TDD pipeline reads for context. Assumes three-pillars-docs/vision.md already exists — if missing, recommends /tp-setup first.
Read project docs and propose what to do next. Surfaces highest-impact work from roadmap, known issues, and in-flight designs.
Final audit of a completed plan — verify the full implementation against both design.md and detailed-design.md.
| name | tp-design |
| description | Interactive high-level design conversation that produces a design.md artifact in three-pillars-docs/tp-designs/{name}/. First step in the TDD pipeline. |
| argument-hint | {design-name} [--auto] [--force-takeover] |
Create or revise the high-level design for a TDD project through conversation with the user.
Argument: {design-name} (required) — kebab-case name, becomes the directory under three-pillars-docs/tp-designs/.
Run first-run preflight per skills/_shared/first-run.md.
Resolve the design directory: three-pillars-docs/tp-designs/{design-name}/. Create it if it doesn't exist.
Run collaboration preflight per skills/_shared/collaboration.md with phase: "design". This verifies the branch and acquires or refreshes the lock for this design. Honor --force-takeover if passed.
Seat-context note: if the collaboration preflight notes that you are on the base branch ({base} / master), treat that as an affirmation — being on {base} in the resolved seat (the base checkout / worktree host) is the correct coordination point for spinning up a new design worktree. It is not a reason to pause or seek an alternative checkout. See skills/_shared/topology.md for the canonical seat and worktree layout; the collaboration preflight's branch check is seat-aware — in the seat it offers worktree provisioning (provision-and-instruct), never an in-place checkout.
2b. Update .claude/last-design MRU — now that the lock/branch are claimed, run the MRU snippet at the bottom of skills/_shared/validate-name.md (the bash that prepends the design name, dedupes, caps at 10). This is the moment a subsequent /clear + /tp-session-restore (no argument) needs to resolve to this design, not whatever was active before. The snippet handles the .gitignore append; do not git add the file.
2c. Repo-map preamble (optional) per skills/_shared/repo-map-preamble.md. If aider is on PATH, generate a structural map of the codebase to inform the design conversation; if absent, skip silently and proceed.
3. Read project context per skills/_shared/read-project-docs.md. Read three-pillars-docs/vision.md first — every question you ask in the design conversation should be framed against the vision's Problem, Users, Principles, and Non-goals. If three-pillars-docs/vision.md is missing, tell the user and recommend /tp-setup but don't block. If the roadmap has a ## Current Focus table, note where this new design fits relative to current priorities — mention this during the design conversation so the user can decide its priority.
4. Check for existing design.md. If it exists, read it and ask the user whether they want to revise it or start fresh. If starting fresh, warn that downstream artifacts (detailed-design.md, plan.md) will become stale.
5. Vision alignment check. Before the main design conversation, explicitly ask: "How does this design advance the problem or principles stated in three-pillars-docs/vision.md?" Write the user's answer as the seed for the Problem section of design.md. If the answer is weak or the design obviously touches a stated non-goal, surface that tension now — it is much cheaper to reject or reshape a design at this stage than to fight it through detailed-design and audit later. If three-pillars-docs/vision.md doesn't exist, skip this step but note it.
5b. Declare the weight class. Read weight-class from the frontmatter of three-pillars-docs/tp-designs/{design-name}/seed.md if the seed exists and carries one. If absent, ask the user once, rubric-assisted: score the four axes (risk, blast radius, reversibility, novelty — each low/medium/high) and run python3 "$TP_ROOT"/skills/_shared/weight_class.py recommend --risk … --blast-radius … --reversibility … --novelty … for the recommendation, then let the user confirm or override. Protocol reference: skills/_shared/weight-class.md. The declared class is stamped onto design.md in step 7 and propagates to every artifact generated downstream.
three-pillars-docs/tp-designs/{design-name}/design.md with this structure. Stamp the step-5b class as the file's leading frontmatter block (weight-class: {class} — via python3 "$TP_ROOT"/skills/_shared/weight_class.py write_class or written directly):---
weight-class: <class from step 5b>
---
# <Design Name>
## Problem
Why this exists. 1-3 sentences. Connect to the problem stated in `three-pillars-docs/vision.md`.
## Vision alignment
One sentence on which vision principle(s) or problem statement this design advances. If the design touches anything in the vision's non-goals, explain why that tension is acceptable or how the design stays on the right side of it.
## Scope
### In scope
- ...
### Out of scope
- ...
## Dependencies
Other TDD designs this depends on (by name), with what it needs from each.
## Entities
Describe the key data structures, classes, or concepts and how they relate.
## Behaviors
What the system does — the key operations, flows, or pipelines.
## Constraints
Non-functional requirements, dependencies, compatibility needs.
## Open Questions
Unresolved items to address during detailed design.
7b. Light mode. When the declared class is light, the same sitting also produces a thin plan.md (single phase, a handful of tasks) in the design directory — and the downstream /tp-design-detail and /tp-plan invocations are skipped entirely. The collapsed design.md (design + detail merged, ~60 lines) must keep all floor-required ## sections — it still has to pass validate_design_floor.py unchanged. Stamp the thin plan.md with the same weight-class: light frontmatter. The audit step for a light design is /tp-plan-audit {design-name} --light.
three-pillars-docs/product_roadmap.md exists and contains a Design Inventory table, check whether {design-name} already has a row. If not, propose appending a row with status "Designed", the dependencies from the design conversation, and any parent/spike linkage. Show the proposed row and get user confirmation before writing. If the roadmap doesn't exist or has no Design Inventory table, skip this step silently.## Current Focus table and the user indicated this design is a near-term priority during the conversation, propose adding it to the Current Focus table with an appropriate priority, next action (/tp-design-detail), and any blockers. Show the proposed row and get user confirmation. If the user didn't indicate priority, ask whether it belongs in Current Focus.skills/_shared/commit-after-work.md. Artifact paths to stage:
three-pillars-docs/tp-designs/{design-name}/design.mdthree-pillars-docs/tp-designs/{design-name}/lock.json (rolled into the same commit)three-pillars-docs/product_roadmap.md (only if step 8 or 9 modified it)
Commit message: Design: {design-name} high-level./tp-design-detail {design-name}.{design-name} per skills/_shared/validate-name.md.skills/_shared/collaboration.md — the preflight step can refuse to proceed if another developer holds this design./tp-docs-update). Never quietly write a design that contradicts the vision.--auto is Shape A per skills/_shared/auto-mode.md — a validator gate: this skill never generates design.md content in --auto. The upstream pickup owns the content; --auto only certifies that whatever already exists meets the floor schema.
In --auto:
python3 "$TP_ROOT"/skills/_shared/validate_design_floor.py three-pillars-docs/tp-designs/{design-name} and read its exit code + stderr.three-pillars-docs/tp-designs/{design-name}/decisions.md with title design.md accepted at floor schema v1, Confidence: High, Decided: accepted, Reasoning: validate_design_floor.py exited 0. Use [tp-design] as the bare skill-name prefix per the auto-mode convention. Exit 0.skills/_shared/auto-mode.md to write decisions.md (create with schema-v1 header if missing, otherwise append).decisions.md entry. Do not re-document here.--auto. Step 10's commit still runs; stage decisions.md alongside any lock.json change.Contract: in --auto, this skill is a gate, not a generator — it certifies the floor or blocks, and never writes design.md.