You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When user requests UI/UX work (design, build, create, implement, review, fix, improve), follow this workflow:
124
124
125
+
### Step 0: Load Existing Project Design System (if present)
126
+
127
+
Before doing any design work, check whether this project already has a design system:
128
+
129
+
1.**Read `design/system/MASTER.md`** (if it exists) — this is the authoritative style spec: color tokens, typography, spacing, components, and anti-patterns. Always follow it instead of generating a new design system from scratch.
130
+
131
+
2.**Read `design/wireframes/design-system.pen`** (if it exists) via Pencil MCP tools — this contains the **visual component library** that is the source of truth for implemented component specs:
Extract: reusable component IDs, their fills/strokes/cornerRadius/padding/font values, and variable names (e.g. `$color-surface`, `$color-ink`). Use these exact values when implementing prototype components — **do not invent new values**.
138
+
139
+
3.**Page-specific overrides**: also check `design/system/pages/[page-name].md` if building a specific page. Its rules override MASTER.md.
140
+
141
+
If neither file exists, proceed with Step 1–4 as normal to generate a new design system.
Copy file name to clipboardExpand all lines: .specify/memory/constitution.md
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,11 +34,10 @@ Evaluation results must be fair and reproducible.
34
34
35
35
- Test-set answers must never be exposed to annotators
36
36
- Scoring logic must be transparent and covered by tests
37
-
- Leaderboard update mechanism must prevent duplicate submission abuse
38
37
39
38
### IV. Test-First (RECOMMENDED)
40
39
- Backend: pytest coverage target ≥ 80%
41
-
- E2E: Playwright covers core user flows (labeling, submission, leaderboard)
40
+
- E2E: Playwright covers core user flows (labeling, submission, review)
42
41
- Tests must be written and confirmed to fail before implementation begins
43
42
44
43
### V. Simplicity
@@ -48,7 +47,7 @@ Evaluation results must be fair and reproducible.
48
47
49
48
### VI. English-First
50
49
- Code, comments, docstrings, commit messages, and variable/function names are always written in English
51
-
- Traditional Chinese is permitted in `docs/`and `specs/` directories to accelerate research documentation
50
+
- Traditional Chinese is permitted in `docs/`, `specs/`, `design/prototype/`, and `design/wireframes/` directories to accelerate research documentation and UI iteration
52
51
- The only fully Chinese file outside those directories is `README.zh-TW.md`
53
52
54
53
## Governance
@@ -68,4 +67,4 @@ Constitution principles take precedence over all other conventions.
68
67
69
68
**Compliance Review**: All PRs must verify compliance with all six principles before merging. Use `/speckit.analyze` to check cross-artifact consistency and Constitution alignment.
Copy file name to clipboardExpand all lines: .specify/templates/agent-file-template.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ Auto-generated from feature plans. Last updated: [DATE]
25
25
-**KISS & YAGNI**: Pursue extreme simplicity. Reject over-engineering; write code only for current, clearly defined needs.
26
26
-**Config-Driven**: Task types and evaluation metrics are defined in YAML/JSON config — never hardcoded.
27
27
-**Security First (NON-NEGOTIABLE)**: Test-set answers must never be exposed to annotators or included in any annotator-facing API response.
28
-
-**English-First**: Code, comments, and commit messages are written in English. Traditional Chinese is permitted in `docs/`and `specs/`.
28
+
-**English-First**: Code, comments, and commit messages are written in English. Traditional Chinese is permitted in `docs/`, `specs/`, `design/prototype/`, and `design/wireframes/`.
Copy file name to clipboardExpand all lines: .specify/templates/plan-template.md
+37-1Lines changed: 37 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@
24
24
-[ ] III. Data Fairness: Does this involve test sets? If so, leakage prevention is planned
25
25
-[ ] IV. Test-First: Test plan is listed
26
26
-[ ] V. Simplicity: Any signs of over-engineering?
27
-
-[ ] VI. English-First: Code, comments, and commit messages in English; Traditional Chinese allowed in `docs/`and `specs/`
27
+
-[ ] VI. English-First: Code, comments, and commit messages in English; Traditional Chinese allowed in `docs/`, `specs/`, `design/prototype/`, and `design/wireframes/`
28
28
29
29
## Project Structure
30
30
@@ -60,6 +60,42 @@ backend/
60
60
└── integration/test_[feature].py
61
61
```
62
62
63
+
## System Flow & Data Flow *(include if feature involves API calls, async tasks, or multi-layer data processing)*
64
+
65
+
<!--
66
+
Show how data moves through the system layers: Frontend → API → Service → DB.
67
+
Include error paths and async flows (Celery tasks, WebSocket, etc.) where relevant.
68
+
Renders natively on GitHub — no extra tooling needed.
69
+
-->
70
+
71
+
```mermaid
72
+
sequenceDiagram
73
+
participant Frontend
74
+
participant API
75
+
participant Service
76
+
participant DB
77
+
78
+
Frontend->>API: POST /api/[resource] {payload}
79
+
API->>Service: [function_name](dto)
80
+
Service->>DB: INSERT / UPDATE [table]
81
+
DB-->>Service: return [entity]
82
+
Service-->>API: [ResponseSchema]
83
+
API-->>Frontend: 200 [ResponseDTO]
84
+
85
+
Note over Service,API: Error path
86
+
Service-->>API: raise [Exception] {detail: "..."}
87
+
API-->>Frontend: 4xx / 5xx {detail: "..."}
88
+
```
89
+
90
+
| Layer | Component | Responsibility |
91
+
|-------|-----------|---------------|
92
+
| Frontend |`pages/[feature]`| Form state, API call, display result |
93
+
| API |`api/routes/[feature].py`| Request validation, auth check, delegate to service |
94
+
| Service |`services/[feature].py`| Business logic, DB interaction |
95
+
| DB |`models/[feature].py`| Persistence |
96
+
97
+
---
98
+
63
99
## Complexity Tracking
64
100
65
101
> Only fill in when a Constitution principle is violated and justification is required
0 commit comments