一键导入
design-template
Template for architecture design artifacts — diagrams.md and architecture.md. Used by Design Architect agent during /design phase.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Template for architecture design artifacts — diagrams.md and architecture.md. Used by Design Architect agent during /design phase.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | design-template |
| description | Template for architecture design artifacts — diagrams.md and architecture.md. Used by Design Architect agent during /design phase. |
| version | 1.0.0 |
Defines the format for architecture design artifacts produced during /design phase. Design Architect uses these templates to structure output.
diagrams.md and architecture.md/design flowAll Mermaid diagrams in a single file. Each diagram has a title and 1-2 sentence explanation.
# Diagrams: {Feature Name}
## Component Diagram (C4 Level 2)
{What this diagram shows — which components are new/changed and how they relate}
```mermaid
C4Component
title Component Diagram: {Feature}
Container_Boundary(layer, "Layer Name") {
Component(id, "Name", "Technology", "Description")
Component(new_id, "NewComponent", "Technology", "NEW: Description")
}
Rel(source, target, "relationship")
{What this diagram shows — how data moves through the system after changes}
flowchart LR
A[Input] --> B[Component]
B --> C{Decision}
C -->|path1| D[Output]
C -->|path2| E[Error]
sequenceDiagram
actor User
participant API as Controller
participant Svc as Service
participant DB as Database
User->>API: request
API->>Svc: action
Svc->>DB: query
DB-->>Svc: result
Svc-->>API: response
API-->>User: 200 OK
sequenceDiagram
actor User
participant API as Controller
participant Svc as Service
User->>API: invalid request
API->>Svc: action
Svc-->>API: ValidationError
API-->>User: 422 Unprocessable
### architecture.md
Textual architecture description — NO inline diagrams (they live in diagrams.md).
```markdown
# Architecture Design: {Feature Name}
## Overview
{1-2 sentences — what changes in the architecture}
Diagrams: see [diagrams.md](diagrams.md)
## New / Changed Components
| Component | Type | Action | Responsibility |
|-----------|------|--------|---------------|
| {Name} | Service / Controller / Entity / Handler / ... | NEW / MODIFY / DELETE | {what it does} |
## Caller Analysis
| Component | Caller | Caller Expects | After Call |
|-----------|--------|---------------|------------|
| {Name} | Controller / MessageHandler / EventListener / CLI / ... | exception → retry? void → success? DTO → transform? | HTTP response / event dispatch / log / next message |
*For `light` depth — merge into Components table as extra columns.*
## Key Design Decisions
{Brief list of decisions — details in adr/ directory}
1. **{Decision title}** — {chosen option and why in 1 sentence}
2. **{Decision title}** — {chosen option and why in 1 sentence}
## Non-Functional Requirements
| Requirement | Target | Basis |
|------------|--------|-------|
| Expected throughput | {N requests/sec or messages/sec} | {source of estimate} |
| Latency (p95) | {N ms} | {acceptable for UX/SLA} |
| Data volume (1 year) | {estimate} | {growth rate} |
| Availability | {N% or "same as current"} | {business requirement} |
*Omit rows that are not relevant. For `light` depth — omit entire section.*
## Async Flows
| Event/Message | Producer | Consumer | Purpose |
|--------------|----------|----------|---------|
| {Name} | {Component} | {Handler} | {what it does} |
*Omit this section if no async flows.*
## Operations (detailed depth only)
| Aspect | Plan |
|--------|------|
| Deployment | {how to deploy — feature flag, rolling, blue-green} |
| Monitoring | {what metrics/logs to watch} |
| Alerting | {what triggers alerts} |
| Rollback | {how to rollback if something goes wrong} |
*Only for `detailed` depth. Omit for `light` and `standard`.*
## Open Questions (from Research)
| Question | Status | Resolution |
|----------|--------|------------|
| {question} | resolved / open | {answer or "needs discussion"} |
| Level | diagrams.md | architecture.md |
|---|---|---|
| light | C4 Context + 1 Sequence | Components table + Key Decisions |
| standard | C4 Component + DataFlow + Sequence (happy + error) | All sections including NFR |
| detailed | All standard + deployment diagram | All standard + NFR + Operations (deployment, monitoring, alerting, rollback) + Data Migration Plan |
```mermaid code block. ASCII art, box-drawing characters (─│┌┐└┘├┤), and text-art layouts are FORBIDDENC4Component for component diagrams (not graph or flowchart)"NEW: description" in the description fieldflowchart LR (left-to-right) for data flow, flowchart TD for hierarchiesactor for users, participant for system componentsTest design techniques reference — Equivalence Partitioning (EP), Boundary Value Analysis (BVA), Decision Table Testing, State Transition Testing, Pairwise Testing, Error Guessing, Checklist-based Testing. Used by QA Engineer agent to generate structured, coverage-driven checklists from feature descriptions.
PM frameworks for task refinement — story formats (User Story, Job Story, WWA), INVEST criteria, T-shirt sizing, clarifying question patterns, risk flags. Used by Task Refiner agent during /refine.
Template for Architecture Decision Records (ADR). Used by Design Architect during /design phase. Always one file per decision in adr/ directory.
Write API documentation compatible with Stoplight platform. Use when the user asks to "write API docs", "create Stoplight documentation", "document API endpoints", "write OpenAPI description", mentions "Stoplight", "SMD", "Stoplight Flavored Markdown", or needs API reference docs, guides, tutorials, or articles for a Stoplight-hosted documentation project.
Template for API contract documentation — REST endpoints and async message contracts. Used by Design Architect during /design phase.
OWASP Top 10 (2021) vulnerability reference with code patterns per tech profile. Used by Security Reviewer during /implement and /design phases. Supplemented with API Security Top 10 (2023) and modern threats.