بنقرة واحدة
write-design
expert: "Design document authoring producing a structured 4-section document
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
expert: "Design document authoring producing a structured 4-section document
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use at the start of every agent session, even if the task seems obvious and you think you already know what to do. Activates when the agent has just opened a repository, does not know what to do, needs to orient itself, or is beginning any new session. Also activates for "where do I start?", "what should I work on?", "what is the current state?". Skipping orientation leads to wasted effort and missed context.
expert: "Structured task execution procedure for individual implementation
expert: "Multi-agent development orchestration with conflict-aware parallel
expert: "Review orchestration with adaptive specialist dispatch,
Use at the start of every agent session, even if the task seems obvious and you think you already know what to do. Activates when the agent has just opened a repository, does not know what to do, needs to orient itself, or is beginning any new session. Also activates for "where do I start?", "what should I work on?", "what is the current state?". Skipping orientation leads to wasted effort and missed context.
expert: "Structured task execution procedure for individual implementation
| name | write-design |
| description | {"expert":"Design document authoring producing a structured 4-section document with problem motivation, proposed approach, evaluated alternatives, and recorded architectural decisions during the designing stage","natural":"Write a design document that explains the problem, proposes a design, lists alternatives you considered, and records the decisions made"} |
| triggers | ["write a design document","draft a design for a feature","create a design document","author the design","produce a design for this feature"] |
| roles | ["architect"] |
| stage | designing |
| constraint_level | high |
Design with ambition. Always present the ambitious version of a design first. If there are genuine reasons to simplify — scope constraints, timeline pressure, missing infrastructure — enumerate them explicitly and let the human decide. Difficulty alone is not a reason to choose the weaker design alternative. The expedient version is a fallback, not a default.
Human/agent role contract. The human is the Design Manager — they own design decisions, make the final call, and approve. The agent is the Senior Designer — proposes designs, drafts documents, conducts research, presents design alternatives, and makes recommendations. The agent cannot make final design decisions or approve its own work. When the agent disagrees with a decision, it states its design rationale clearly, once. If the human decides otherwise, the agent documents the decision and moves on.
Design is iterative. There is no single right path. Stages can be revisited. A design that seemed complete can turn out to need revision after new design constraints surface or trade-off analysis reveals a better approach. That is normal and not a failure.
Design document ownership. Design documents can be owned by either a plan (strategic design — cross-batch architecture, long-term direction) or a batch (operational design — feature-level implementation). The owning entity determines which stage gates apply. When starting a design, identify whether it belongs to a plan or a batch and register the document against the appropriate owner.
Three tiers for surfacing technical risk during design:
If the human acknowledges a risk and decides to proceed anyway, accept the decision. Document the risk, the decision, and the design rationale in the Decisions section so the trade-off is visible to future readers.
This phase is non-optional. Before writing any design content, consult the document corpus to understand prior decisions, related designs, and constraints that will shape this design.
BECAUSE: Designing in isolation from prior work creates design debt, contradictions, and redundant decisions. Corpus consultation before design begins ensures that the design builds on — or deliberately diverges from — what already exists, with the divergence documented. An undiscovered prior decision is a decision that gets made twice.
Before any corpus discovery calls, ensure the corpus is classified:
doc_intel(action: "pending") to list any documents awaiting classification.doc_intel(action: "classify", ...) to classify it.For each primary concept in the feature scope:
doc_intel(action: "search", query: "<concept>") — FTS search across the classified corpus.doc_intel(action: "find", concept: "<concept>") — graph-based concept lookup.doc_intel(action: "search")) with broader terms and to grep across the repository. The corpus may be unclassified or the concept may be expressed differently in prior documents.For each known related feature or entity:
doc_intel(action: "find", entity_id: "<FEAT-xxx>") to find all documents that reference the related feature.For each related document found in Steps 0.1 and 0.2:
doc_intel(action: "find", role: "decision", scope: "<DOC-xxx>") to extract recorded decisions from that document.Produce the following before writing any design section:
From the synthesis in Step 0.4, write the Related Work section of the design document BEFORE writing any other design section (Problem and Motivation, Design, Alternatives Considered, Decisions).
The Related Work section must take one of two forms:
now to get the current date. Record the returned value — you will use it in the document header's Date field. Do not guess or invent a date..kbz/skills/write-design/scripts/validate-design-structure.sh <path>doc(action: register, type: "design"). Design documents can be owned by either a plan (P{n}-slug ID, for cross-batch architectural decisions) or a batch (B{n}-slug ID, for feature-level design within a batch).Begin every design document with a header table:
| Field | Value |
|--------|--------------------------------|
| Date | {value returned by `now`} |
| Status | Draft |
| Author | {who is writing} |
The document then has exactly 4 required sections. Use these headings verbatim:
## Problem and Motivation
State the problem this design addresses. What is broken, missing, or inadequate?
Who is affected? What happens if nothing changes?
Do not describe the solution here — this section must stand on its own as a
problem statement.
## Design
Describe the proposed approach at the level of components, boundaries, and
interactions. Include:
- How components are organised and what responsibilities each has
- Key interfaces and data flows between components
- How the design addresses the constraints identified in the problem
- Failure modes and their handling strategies
Do not include implementation-level detail (function signatures, database
schemas) — that belongs in the specification.
## Alternatives Considered
For each design alternative evaluated:
- Brief description of the approach
- Trade-offs (what it makes easier, what it makes harder)
- Why it was chosen or rejected
Include at least two alternatives. "Do nothing / status quo" is a valid alternative.
## Decisions
Each decision entry:
- **Decision:** what was decided
- **Context:** what circumstances led to this decision
- **Rationale:** why this choice was made over the alternatives
- **Consequences:** what follows from this decision (positive and negative)
See examples-write-design.md for worked design document examples: design without alternatives, and structured design with trade-off analysis.
Draft lifecycle. During design, documents are in draft status. Drafts may contain design alternatives and open questions. Keep the document as an honest, up-to-date reflection of where the design has reached — do not present a draft as more settled than it is.
Design splitting. If scope is larger than a single feature, flag it and step back to planning. Signs that splitting is needed: different sections feel like separate products, parts could be implemented independently with no interface contract between them, or the resulting specification would be unmanageably large.
Gotchas.
doc(action: "register") immediately. An unregistered design document is invisible to the workflow.doc(action: "supersede") instead. Approved documents are immutable records.doc(action: "approve") fails due to content hash drift, call doc(action: "refresh") first to re-sync.Next steps after design. Use work/templates/specification-prompt-template.md for the specification. See the kanbanzai-documents skill for the full registration and approval procedure.