lee-spec-kit 0.8.8 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +2 -0
- package/README.md +3 -1
- package/dist/bootstrap-Q77MTW3Q.js +0 -0
- package/dist/chunk-3AFCPGGS.js +0 -0
- package/dist/chunk-7V7RMGEU.js +0 -0
- package/dist/chunk-GR7JQBWF.js +0 -0
- package/dist/hooks-373Z6JG2.js +0 -0
- package/dist/index.js +1477 -192
- package/dist/index.js.map +1 -1
- package/package.json +13 -15
- package/templates/en/common/README.md +55 -10
- package/templates/en/common/agents/agents.md +30 -5
- package/templates/en/common/agents/git-workflow.md +27 -8
- package/templates/en/common/agents/skills/create-pr.md +5 -1
- package/templates/en/common/agents/skills/split-feature.md +2 -1
- package/templates/en/common/agents/ui-ux-design.md +128 -0
- package/templates/en/common/designs/README.md +52 -2
- package/templates/en/common/features/README.md +5 -3
- package/templates/en/common/features/feature-base/decisions.md +3 -1
- package/templates/en/common/features/feature-base/spec.md +3 -0
- package/templates/en/common/features/feature-base/tasks.md +1 -0
- package/templates/en/common/ideas/idea.md +30 -0
- package/templates/ko/common/README.md +56 -11
- package/templates/ko/common/agents/agents.md +30 -5
- package/templates/ko/common/agents/git-workflow.md +27 -8
- package/templates/ko/common/agents/skills/create-pr.md +5 -1
- package/templates/ko/common/agents/skills/split-feature.md +4 -3
- package/templates/ko/common/agents/ui-ux-design.md +128 -0
- package/templates/ko/common/designs/README.md +52 -2
- package/templates/ko/common/features/README.md +5 -3
- package/templates/ko/common/features/feature-base/decisions.md +3 -1
- package/templates/ko/common/features/feature-base/spec.md +3 -0
- package/templates/ko/common/features/feature-base/tasks.md +1 -0
- package/templates/ko/common/ideas/idea.md +30 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lee-spec-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Document-centered harness engineering toolkit for AI agent development",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -13,18 +13,6 @@
|
|
|
13
13
|
"templates",
|
|
14
14
|
"assets"
|
|
15
15
|
],
|
|
16
|
-
"scripts": {
|
|
17
|
-
"build": "tsup",
|
|
18
|
-
"dev": "tsup --watch",
|
|
19
|
-
"lint": "eslint src",
|
|
20
|
-
"lint:test": "eslint tests",
|
|
21
|
-
"typecheck": "tsc --noEmit",
|
|
22
|
-
"typecheck:test": "tsc -p tsconfig.tests.json --noEmit",
|
|
23
|
-
"test": "pnpm build && vitest run",
|
|
24
|
-
"test:race": "pnpm build && vitest run tests/race.test.mjs",
|
|
25
|
-
"format": "prettier --write .",
|
|
26
|
-
"prepublishOnly": "pnpm build"
|
|
27
|
-
},
|
|
28
16
|
"keywords": [
|
|
29
17
|
"docs",
|
|
30
18
|
"template",
|
|
@@ -66,5 +54,15 @@
|
|
|
66
54
|
"typescript": "^5.9.3",
|
|
67
55
|
"vitest": "^4.0.18"
|
|
68
56
|
},
|
|
69
|
-
"
|
|
70
|
-
|
|
57
|
+
"scripts": {
|
|
58
|
+
"build": "tsup",
|
|
59
|
+
"dev": "tsup --watch",
|
|
60
|
+
"lint": "eslint src",
|
|
61
|
+
"lint:test": "eslint tests",
|
|
62
|
+
"typecheck": "tsc --noEmit",
|
|
63
|
+
"typecheck:test": "tsc -p tsconfig.tests.json --noEmit",
|
|
64
|
+
"test": "pnpm build && vitest run",
|
|
65
|
+
"test:race": "pnpm build && vitest run tests/race.test.mjs",
|
|
66
|
+
"format": "prettier --write ."
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -16,7 +16,7 @@ npx lee-spec-kit docs get agents --json
|
|
|
16
16
|
- Use workspace-scoped `AGENTS.md`, official Codex hooks, and the active feature docs as the default runtime path.
|
|
17
17
|
- Resolve the active feature, then treat `spec.md`, `plan.md`, `tasks.md`, and `decisions.md` as the working SSOT.
|
|
18
18
|
- Ask for approval only at documented workflow checkpoints and before remote or destructive actions.
|
|
19
|
-
- Use `npx lee-spec-kit commit-audit --json` before `git commit`
|
|
19
|
+
- Use `npx lee-spec-kit commit-audit --json` before `git commit` for staged docs-path checks and canonical Feature-scoped commit validation.
|
|
20
20
|
- Use `npx lee-spec-kit workflow-audit --json` before stopping when code or feature docs changed.
|
|
21
21
|
- If `isLeeSpecKitProject: false`, skip lee-spec-kit-specific flow and continue with normal workflow.
|
|
22
22
|
|
|
@@ -30,13 +30,29 @@ npx lee-spec-kit docs get agents --json
|
|
|
30
30
|
|
|
31
31
|
## Directory Structure
|
|
32
32
|
|
|
33
|
-
| Path | Purpose | Key Documents
|
|
34
|
-
| ----------------- | --------------------- |
|
|
33
|
+
| Path | Purpose | Key Documents |
|
|
34
|
+
| ----------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------ |
|
|
35
35
|
| `docs/agents/` | Agent operating rules | `custom.md`, `constitution.md` (engine-managed guides are fetched via `npx lee-spec-kit docs get <doc-id> --json`) |
|
|
36
|
-
| `docs/prd/` | Product requirements | Project-specific
|
|
37
|
-
| `docs/designs/` | Design references | `README.md` (links/guidelines/references)
|
|
38
|
-
| `docs/ideas/` | Ideas / to-dos | `README.md` (Idea → Feature promotion rules)
|
|
39
|
-
| `{{featurePath}}` | Feature documentation | `{feature-id}/spec.md`, `plan.md`, `tasks.md`, `decisions.md`
|
|
36
|
+
| `docs/prd/` | Product requirements | Project-specific |
|
|
37
|
+
| `docs/designs/` | Design references | `README.md` (links/guidelines/references) |
|
|
38
|
+
| `docs/ideas/` | Ideas / to-dos | `README.md` (Idea → Feature promotion rules) |
|
|
39
|
+
| `{{featurePath}}` | Feature documentation | `{feature-id}/spec.md`, `plan.md`, `tasks.md`, `decisions.md` |
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Document Routing
|
|
44
|
+
|
|
45
|
+
| Document content | Location |
|
|
46
|
+
| --------------------------------------------------------------------- | ----------------------------------- |
|
|
47
|
+
| Product requirements, user stories, and product roadmaps | `docs/prd/` |
|
|
48
|
+
| System architecture overviews shared by multiple Features | `docs/prd/*-overview.md` |
|
|
49
|
+
| Durable architecture principles | `docs/agents/constitution.md` |
|
|
50
|
+
| Technical research and candidate comparisons before Feature promotion | The relevant `docs/ideas/I###-*.md` |
|
|
51
|
+
| Implementation design for an active Feature | That Feature's `plan.md` |
|
|
52
|
+
| Technical choices, alternatives, and trade-offs | That Feature's `decisions.md` |
|
|
53
|
+
| Screens, Figma, design systems, and UI flows | `docs/designs/` |
|
|
54
|
+
|
|
55
|
+
Keep product roadmaps in `prd/`, but manage implementation sequencing and work plans in the active Feature's `plan.md` and `tasks.md`. The `designs/` directory is reserved for UX and visual design, not technical design.
|
|
40
56
|
|
|
41
57
|
---
|
|
42
58
|
|
|
@@ -114,13 +130,24 @@ When you run `lee-spec-kit init`, it creates `.lee-spec-kit.json` in the docs ro
|
|
|
114
130
|
- `docsRepo` ("embedded" | "standalone"): How docs are managed
|
|
115
131
|
- `pushDocs` (boolean, optional): Only written when `docsRepo: "standalone"` (whether to push to remote)
|
|
116
132
|
- `docsRemote` (string, optional): Only written when `pushDocs: true` (remote repo URL)
|
|
133
|
+
- `workflow.prePrReview.reviewer` (object): Pre-PR subagent execution settings
|
|
134
|
+
- `type`: currently only `"subagent"` is supported
|
|
135
|
+
- `model`: `"inherit"` or a model name supported by the runtime
|
|
136
|
+
- `reasoningEffort`: `low | medium | high | xhigh | max | ultra`
|
|
137
|
+
- `onUnavailable`: `inherit | error` when the requested model is unavailable
|
|
138
|
+
- `workflow.baseBranch` (string): branch that receives a completed local Feature
|
|
139
|
+
- `workflow.completionStrategy` (`"local-ff" | "local-squash" | "none"`): fast-forward, create one verified squash commit, or explicitly finish without integration
|
|
140
|
+
- `workflow.deleteFeatureBranchAfterMerge` (boolean): delete the integrated local Feature branch after cleanup; remote branches are never deleted
|
|
141
|
+
- `workflow.postMergeChecks` (array): structured commands run from the base branch after local integration, for example `{ "command": "pnpm", "args": ["test"] }`
|
|
117
142
|
- `approval` (object, optional): optional approval-checkpoint metadata for repo policy and custom validators
|
|
118
143
|
- The Codex-native default path still asks at documented checkpoints and before remote/destructive actions first.
|
|
119
144
|
- Legacy runtime consumed this field directly; keep it only when you intentionally want category-based checkpoint metadata.
|
|
120
145
|
- Current default:
|
|
121
146
|
- `mode: "category"`
|
|
122
147
|
- `default: "skip"`
|
|
123
|
-
- `requireCheckCategories: ["spec_approve", "implementation_approve"]`
|
|
148
|
+
- `requireCheckCategories: ["spec_approve", "implementation_approve", "local_merge"]`
|
|
149
|
+
- In a `local-ff` or `local-squash` workflow, `implementation_approve` approves the completed implementation and `local_merge` separately authorizes the configured integration, post-merge checks, managed-worktree removal, and configured local Feature-branch deletion.
|
|
150
|
+
- Remove `local_merge` from `requireCheckCategories` only when the implementation approval should authorize the remaining local completion flow without another checkpoint.
|
|
124
151
|
- Approval token: `A`
|
|
125
152
|
- Accepted replies: `A`, `A OK`
|
|
126
153
|
- `allowedDocsEntries` (object, optional): Allowlist non-standard top-level docs entries so they are not treated as unmanaged docs
|
|
@@ -136,17 +163,35 @@ When you run `lee-spec-kit init`, it creates `.lee-spec-kit.json` in the docs ro
|
|
|
136
163
|
"lang": "en",
|
|
137
164
|
"createdAt": "{{date}}",
|
|
138
165
|
"docsRepo": "embedded",
|
|
166
|
+
"workflow": {
|
|
167
|
+
"mode": "local",
|
|
168
|
+
"baseBranch": "main",
|
|
169
|
+
"completionStrategy": "local-ff",
|
|
170
|
+
"deleteFeatureBranchAfterMerge": true,
|
|
171
|
+
"postMergeChecks": [],
|
|
172
|
+
"prePrReview": {
|
|
173
|
+
"evidenceMode": "path_required",
|
|
174
|
+
"reviewer": {
|
|
175
|
+
"type": "subagent",
|
|
176
|
+
"model": "inherit",
|
|
177
|
+
"reasoningEffort": "high",
|
|
178
|
+
"onUnavailable": "inherit"
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
139
182
|
"allowedDocsEntries": {
|
|
140
183
|
"dirs": ["plans"]
|
|
141
184
|
},
|
|
142
185
|
"approval": {
|
|
143
186
|
"mode": "category",
|
|
144
187
|
"default": "skip",
|
|
145
|
-
"requireCheckCategories": ["spec_approve", "implementation_approve"]
|
|
188
|
+
"requireCheckCategories": ["spec_approve", "implementation_approve", "local_merge"]
|
|
146
189
|
}
|
|
147
190
|
}
|
|
148
191
|
```
|
|
149
192
|
|
|
193
|
+
New local projects use `local-ff`. Choose `local-squash` to create one base-branch commit while preserving the source Feature tip under an internal `refs/lee-spec-kit/integrations/*` ref for task-checkpoint evidence. During `update`, an existing local project with no explicit `completionStrategy` receives `none` so an upgrade does not unexpectedly merge its current branch. Set it to `local-ff` or `local-squash` deliberately when ready.
|
|
194
|
+
|
|
150
195
|
```json
|
|
151
196
|
{
|
|
152
197
|
"projectName": "{{projectName}}",
|
|
@@ -159,7 +204,7 @@ When you run `lee-spec-kit init`, it creates `.lee-spec-kit.json` in the docs ro
|
|
|
159
204
|
"approval": {
|
|
160
205
|
"mode": "category",
|
|
161
206
|
"default": "skip",
|
|
162
|
-
"requireCheckCategories": ["spec_approve", "implementation_approve"]
|
|
207
|
+
"requireCheckCategories": ["spec_approve", "implementation_approve", "local_merge"]
|
|
163
208
|
}
|
|
164
209
|
}
|
|
165
210
|
```
|
|
@@ -27,23 +27,48 @@ This document defines workflow policy, not a custom runtime loop.
|
|
|
27
27
|
- After reading the active feature docs, run `npx lee-spec-kit workflow-stage <featureRef> --json` and follow only that `nextAction`.
|
|
28
28
|
- If `workflow-stage --json` also returns `primaryActionLabel` and `actionOptions`, treat `primaryActionLabel` as the default option label and present the exact `actionOptions[*].reply` tokens to the user.
|
|
29
29
|
|
|
30
|
+
## Document Routing
|
|
31
|
+
|
|
32
|
+
| Content | SSOT location |
|
|
33
|
+
| --------------------------------------------------------- | ----------------------------------- |
|
|
34
|
+
| Product requirements, user stories, and product roadmaps | `docs/prd/` |
|
|
35
|
+
| System architecture overviews shared by multiple Features | `docs/prd/*-overview.md` |
|
|
36
|
+
| Durable architecture principles | `docs/agents/constitution.md` |
|
|
37
|
+
| Pre-Feature technical research and candidate comparison | The relevant `docs/ideas/I###-*.md` |
|
|
38
|
+
| Active Feature implementation design | That Feature's `plan.md` |
|
|
39
|
+
| Technical choices, alternatives, and trade-offs | That Feature's `decisions.md` |
|
|
40
|
+
| Screens, Figma, design systems, and UI flows | `docs/designs/` |
|
|
41
|
+
|
|
42
|
+
- Do not use `docs/designs/` for system architecture, data/API design, technical research, or implementation plans.
|
|
43
|
+
- Follow the detailed routing rules in `docs/README.md`.
|
|
44
|
+
|
|
45
|
+
## Optional UI/UX Design Policy
|
|
46
|
+
|
|
47
|
+
- Only when the user request explicitly mentions a design system, UI/visual redesign, design consistency, shared UI/component-library consolidation, branding/theme/token redesign, or implementation from Figma/design images, read and apply `npx lee-spec-kit docs get ui-ux-design --json`.
|
|
48
|
+
- Do not apply this policy merely because the target is web/frontend, to a non-UI/backend Feature, or to a simple bug fix unrelated to durable design rules.
|
|
49
|
+
- This is optional guidance, not a `requiredDocs` entry or workflow approval gate.
|
|
50
|
+
|
|
30
51
|
## Execution Rules
|
|
31
52
|
|
|
32
53
|
- lee-spec-kit owns docs structure, workflow stages, and validators.
|
|
33
54
|
- Codex owns the execution loop, tool usage, and hook lifecycle.
|
|
34
55
|
- Do not start implementation unless `workflow-stage --json` reports `stage === "implementation"` and `implementationAllowed === true`.
|
|
56
|
+
- When `workflow-stage --json` returns `nextAction.category: pre_pr_review` with `executor: subagent`, run a fresh, read-only subagent review using the returned `model`, `reasoningEffort`, and `onUnavailable` policy. Do not select or require a named review skill.
|
|
57
|
+
- The Pre-PR review subagent returns findings without modifying code. The main agent remediates findings and records reviewer metadata and the final decision as evidence.
|
|
35
58
|
- Treat spec/plan/tasks approval, issue creation, and branch creation as hard gates before implementation.
|
|
36
59
|
- In standalone mode, do not hand-write `git worktree add`; run the exact `nextAction.command` from `workflow-stage` so the managed workspace path, stale directory cleanup, and `.env`/`.env.*` copy step stay consistent.
|
|
60
|
+
- In local mode, do not stop after implementation approval. Follow the exact `local merge` and `local cleanup` commands returned by `workflow-stage` until verified integration and cleanup produce `done`.
|
|
61
|
+
- In a `local-ff` or `local-squash` workflow, keep implementation approval and local merge approval distinct when `local_merge` is required: the first accepts the implementation, and the second authorizes the configured integration strategy, post-merge checks, and local cleanup.
|
|
37
62
|
- Keep docs synced with code changes in the same turn whenever behavior or scope changes.
|
|
38
|
-
- Use `npx lee-spec-kit commit-audit --json` before `git commit` when
|
|
63
|
+
- Use `npx lee-spec-kit commit-audit --json` before `git commit`; Feature-scoped commits use `#123` when an Issue is linked and the stable Feature ID such as `F027` for issue-less local workflows.
|
|
39
64
|
- Use `npx lee-spec-kit workflow-audit --json` as the default end-of-turn docs sync check.
|
|
40
65
|
|
|
41
66
|
## Approval Rules
|
|
42
67
|
|
|
43
|
-
| Current action (examples) | What to share
|
|
44
|
-
|
|
|
45
|
-
| Issue creation
|
|
46
|
-
| PR creation
|
|
68
|
+
| Current action (examples) | What to share |
|
|
69
|
+
| ------------------------- | ------------------------------------------------------------ |
|
|
70
|
+
| Issue creation | Before `npx lee-spec-kit github issue <featureRef> --create` |
|
|
71
|
+
| PR creation | Before `npx lee-spec-kit github pr <featureRef> --create` |
|
|
47
72
|
|
|
48
73
|
- Ask the user for approval at documented workflow checkpoints and before remote or destructive actions.
|
|
49
74
|
- If `workflow-stage --json` says `approvalRequired === true`, stop and ask the user at that checkpoint.
|
|
@@ -6,11 +6,11 @@ Rules for AI agents to automate Git/GitHub operations.
|
|
|
6
6
|
|
|
7
7
|
## Core Concepts
|
|
8
8
|
|
|
9
|
-
| Concept | GitHub
|
|
10
|
-
| ---------------- | -------------- | ------------------------------- |
|
|
11
|
-
| Feature | GitHub Issue
|
|
12
|
-
| Task | Commit | Individual implementation unit |
|
|
13
|
-
| Feature Complete | Pull Request
|
|
9
|
+
| Concept | GitHub Workflow | Local Workflow | Description |
|
|
10
|
+
| ---------------- | --------------- | -------------- | ------------------------------- |
|
|
11
|
+
| Feature | GitHub Issue | Feature ID | Feature-level work unit |
|
|
12
|
+
| Task | Commit | Commit | Individual implementation unit |
|
|
13
|
+
| Feature Complete | Pull Request | Local merge | Feature completion integration |
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
@@ -50,10 +50,27 @@ main
|
|
|
50
50
|
|
|
51
51
|
### Format
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
Use exactly one canonical Feature scope. Do not invent alternate scope forms.
|
|
54
|
+
|
|
55
|
+
```text
|
|
56
|
+
# Feature linked to a GitHub Issue
|
|
54
57
|
{type}(#{issue}): {description}
|
|
58
|
+
|
|
59
|
+
# Issue-less local Feature
|
|
60
|
+
{type}({featureId}): {description}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Examples:
|
|
64
|
+
|
|
65
|
+
```text
|
|
66
|
+
feat(#123): implement user auth
|
|
67
|
+
docs(#123): clarify auth spec
|
|
68
|
+
feat(F027): implement notification settings
|
|
69
|
+
docs(F027): update notification docs
|
|
55
70
|
```
|
|
56
71
|
|
|
72
|
+
For local Features, the scope is the stable Feature ID (`F027`), not the full folder ref (`F027-notification-settings`). Feature-scoped commits without a scope, such as `docs: F027 ...`, are not canonical.
|
|
73
|
+
|
|
57
74
|
### Type List
|
|
58
75
|
|
|
59
76
|
| Type | Description | Example |
|
|
@@ -115,15 +132,17 @@ git worktree add .worktrees/feat-{issue-number}-{feature-name} feat/{issue-numbe
|
|
|
115
132
|
|
|
116
133
|
#### Standalone Mode Commit Guide
|
|
117
134
|
|
|
135
|
+
Use the scope selected by the workflow: `#123` when an Issue is linked, otherwise the local Feature ID such as `F027`.
|
|
136
|
+
|
|
118
137
|
1. **Project Commit** (If code changed)
|
|
119
138
|
|
|
120
139
|
```bash
|
|
121
|
-
git commit -m "feat(
|
|
140
|
+
git commit -m "feat(F027): implement feature"
|
|
122
141
|
```
|
|
123
142
|
|
|
124
143
|
2. **Docs Commit** (If docs changed - **Run in Docs Repo**)
|
|
125
144
|
```bash
|
|
126
|
-
git commit -m "docs(
|
|
145
|
+
git commit -m "docs(F027): update feature docs"
|
|
127
146
|
```
|
|
128
147
|
|
|
129
148
|
> 💡 **Core Rule**: At task completion, **all changed repositories** must be committed.
|
|
@@ -17,7 +17,9 @@ Execution-state SSOT is the feature-local `pr.md`.
|
|
|
17
17
|
|
|
18
18
|
## Pre-PR Baseline Checklist (`builtin-checklist`)
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
The Pre-PR subagent must always run this minimum baseline. Do not depend on a named review skill.
|
|
21
|
+
|
|
22
|
+
When `workflow-stage --json` returns `nextAction.executor: subagent`, delegate the review to a fresh, read-only subagent. `model: inherit` means inheriting the current model; any other value is used as the subagent model override. If that model is unavailable, follow `onUnavailable` (`inherit` or `error`).
|
|
21
23
|
|
|
22
24
|
1. Review alignment with `spec.md` / `plan.md` / `tasks.md` and confirm implementation still matches the original goal.
|
|
23
25
|
2. Inspect regression, exception handling, critical/security risks, side effects, user flow impact, and release readiness.
|
|
@@ -31,6 +33,8 @@ Always run this checklist in Pre-PR review. Treat it as the minimum baseline, th
|
|
|
31
33
|
10. `Pre-PR Decision` must use `decision: approve|changes_requested|blocked ...` (or `결정: ...`).
|
|
32
34
|
11. Ensure the final decision is `approve` before moving to PR creation.
|
|
33
35
|
|
|
36
|
+
The review artifact must record the actual `executor`, `model`, `reasoningEffort`, reviewed commit/diff scope, findings, and final decision. The review subagent must not modify code; the main agent owns finding remediation and documentation updates.
|
|
37
|
+
|
|
34
38
|
---
|
|
35
39
|
|
|
36
40
|
## Steps
|
|
@@ -16,7 +16,8 @@ Use this guide when one Feature/Issue becomes too large to review safely.
|
|
|
16
16
|
Notes:
|
|
17
17
|
|
|
18
18
|
- Keep one issue only for small, tightly coupled work.
|
|
19
|
-
-
|
|
19
|
+
- In GitHub workflow, create one linked child Issue for each child Feature.
|
|
20
|
+
- In local workflow, track each child Feature by its own Feature ID without requiring Issues.
|
|
20
21
|
|
|
21
22
|
---
|
|
22
23
|
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# UI/UX Design Documentation Policy
|
|
2
|
+
|
|
3
|
+
This optional policy separates durable design rules from Feature-specific visual material in UI/UX work.
|
|
4
|
+
It does not add a workflow stage or approval gate.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Activation Conditions
|
|
9
|
+
|
|
10
|
+
Apply this policy **only when the user request explicitly includes** one of these intents:
|
|
11
|
+
|
|
12
|
+
- a design system
|
|
13
|
+
- a UI redesign or visual redesign
|
|
14
|
+
- design consistency
|
|
15
|
+
- shared UI or component-library consolidation
|
|
16
|
+
- branding or theme/token redesign
|
|
17
|
+
- implementation from Figma or design images
|
|
18
|
+
|
|
19
|
+
Do not apply it merely because:
|
|
20
|
+
|
|
21
|
+
- the target component is web/frontend
|
|
22
|
+
- the Feature is backend or otherwise non-UI
|
|
23
|
+
- the request is a simple bug fix that does not change durable design rules
|
|
24
|
+
- the change is a local style adjustment to one existing component
|
|
25
|
+
|
|
26
|
+
If the signal is ambiguous, do not create design docs; use only the active Feature docs.
|
|
27
|
+
|
|
28
|
+
## Recommended Structure
|
|
29
|
+
|
|
30
|
+
When an activation condition is met and durable rules or visual references are actually needed, use only the necessary parts of this structure:
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
docs/designs/
|
|
34
|
+
├── README.md
|
|
35
|
+
├── design-system.md
|
|
36
|
+
├── <feature-visual-brief>.md
|
|
37
|
+
└── assets/
|
|
38
|
+
└── <feature-name>/
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
- Do not create every file preemptively.
|
|
42
|
+
- If `docs/designs/design-system.md` already exists, reference or update it instead of creating a replacement.
|
|
43
|
+
- Do not make one `design.md` per Feature the default.
|
|
44
|
+
- Do not migrate an existing project's document structure or make these documents a required gate.
|
|
45
|
+
|
|
46
|
+
## Document Responsibilities
|
|
47
|
+
|
|
48
|
+
### `docs/designs/design-system.md`
|
|
49
|
+
|
|
50
|
+
Record durable meaning and usage rules shared by multiple Features:
|
|
51
|
+
|
|
52
|
+
- semantic color tokens
|
|
53
|
+
- typography
|
|
54
|
+
- spacing and layout
|
|
55
|
+
- radius, border, and shadow
|
|
56
|
+
- shared components and variants
|
|
57
|
+
- states such as loading, empty, error, and processing
|
|
58
|
+
- responsive rules
|
|
59
|
+
- accessibility and motion rules
|
|
60
|
+
- content voice
|
|
61
|
+
- design-system change, deprecation, and synchronization policy
|
|
62
|
+
|
|
63
|
+
Use this frontmatter:
|
|
64
|
+
|
|
65
|
+
```yaml
|
|
66
|
+
---
|
|
67
|
+
lee-spec-kit:
|
|
68
|
+
kind: design-system
|
|
69
|
+
scope: project
|
|
70
|
+
---
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### `docs/designs/<feature-visual-brief>.md`
|
|
74
|
+
|
|
75
|
+
Record the UX direction and visual references for one Feature:
|
|
76
|
+
|
|
77
|
+
- original Figma URLs and any necessary repository snapshots
|
|
78
|
+
- design images and reference screens
|
|
79
|
+
- intent and key states for each screen or flow
|
|
80
|
+
- gaps between the current data/API contract and the design
|
|
81
|
+
- applicable `design-system.md` rules and Feature-specific interpretation
|
|
82
|
+
|
|
83
|
+
Use `kind: ux-design` or `kind: visual-reference` with `scope: project`, as appropriate. This document is the Feature's visual reference authority; it does not replace the authorities for requirements, implementation planning, or technical decisions.
|
|
84
|
+
|
|
85
|
+
### Feature `spec.md`
|
|
86
|
+
|
|
87
|
+
- Keep user requirements and acceptance criteria here.
|
|
88
|
+
- Link the design system and visual brief through optional `Design Refs` using project-root paths.
|
|
89
|
+
|
|
90
|
+
### Feature `plan.md`
|
|
91
|
+
|
|
92
|
+
- Record the change surface for token/theme files, shared components, routes/screens, and Storybook or an equivalent workbench.
|
|
93
|
+
- Explain how design rules map to executable code and tests.
|
|
94
|
+
|
|
95
|
+
### Feature `decisions.md`
|
|
96
|
+
|
|
97
|
+
- Record why the design system changed or why an exception exists.
|
|
98
|
+
- Include the exception scope, affected rule, and removal condition.
|
|
99
|
+
|
|
100
|
+
## Executable Authorities and Responsibility Split
|
|
101
|
+
|
|
102
|
+
Do not treat `design-system.md` as the only source of truth.
|
|
103
|
+
|
|
104
|
+
| Surface | Responsibility |
|
|
105
|
+
| --------------------------------- | ---------------------------------------------------- |
|
|
106
|
+
| `docs/designs/design-system.md` | Meaning, intent, and usage rules |
|
|
107
|
+
| CSS theme/globals or token files | Executed token values |
|
|
108
|
+
| Shared UI directory | Executed component APIs and variant contracts |
|
|
109
|
+
| Storybook or equivalent workbench | Executable examples of variants and states |
|
|
110
|
+
| Feature `decisions.md` | Exceptions, change rationale, and removal conditions |
|
|
111
|
+
|
|
112
|
+
The document explains meaning; code and the workbench prove the executable contract.
|
|
113
|
+
|
|
114
|
+
## Synchronization Rules
|
|
115
|
+
|
|
116
|
+
- When a Feature changes `design-system.md`, use the same `tasks.md` task to name the affected design docs, token/theme files, shared UI, Storybook/workbench examples, and relevant verification.
|
|
117
|
+
- Do not force edits to an unaffected surface, but confirm its impact explicitly in the task checklist.
|
|
118
|
+
- If docs and code diverge, synchronize the affected documents and executable authorities in the same Feature task.
|
|
119
|
+
- Record design-system exceptions and their removal conditions in `decisions.md`.
|
|
120
|
+
- Store visual-reference files under a repository path such as `docs/designs/assets/<feature-name>/`; never depend on an absolute path from one person's computer.
|
|
121
|
+
- Keep the external Figma or source URL for provenance, and also reference a repository asset when implementation depends on a fixed snapshot.
|
|
122
|
+
|
|
123
|
+
## Backward Compatibility
|
|
124
|
+
|
|
125
|
+
- `design-system.md`, visual briefs, and `Design Refs` are all optional.
|
|
126
|
+
- Existing Feature docs do not need the new section backfilled.
|
|
127
|
+
- This policy does not change spec/plan/tasks approvals or `workflow-stage` results.
|
|
128
|
+
- For requests that do not match an explicit UI/UX activation condition, use the existing Feature-doc workflow only.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Designs
|
|
1
|
+
# UX / Visual Designs
|
|
2
2
|
|
|
3
3
|
Store design references used by the project.
|
|
4
4
|
|
|
@@ -6,19 +6,69 @@ Store design references used by the project.
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
+
## Optional Use
|
|
10
|
+
|
|
11
|
+
`design-system.md` and Feature visual briefs are not required documents for every project.
|
|
12
|
+
|
|
13
|
+
- Consider them only for an explicit design-system, UI/visual-redesign, design-consistency, shared-UI/component-library, branding/theme/token, or Figma/design-image implementation request.
|
|
14
|
+
- Do not create them for an ordinary web/frontend Feature, a backend Feature, or a bug fix that does not change durable design rules.
|
|
15
|
+
- Detailed policy: `npx lee-spec-kit docs get ui-ux-design --json`
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
9
19
|
## What belongs here
|
|
10
20
|
|
|
11
21
|
- Screen/flow references (Figma, images, links)
|
|
12
22
|
- Component/pattern guidelines (buttons, forms, navigation, etc.)
|
|
13
23
|
- UI rules (brand, typography, colors/tokens)
|
|
14
24
|
|
|
25
|
+
## Recommended Structure and Responsibilities
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
docs/designs/
|
|
29
|
+
├── README.md
|
|
30
|
+
├── design-system.md
|
|
31
|
+
├── <feature-visual-brief>.md
|
|
32
|
+
└── assets/
|
|
33
|
+
└── <feature-name>/
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
- `design-system.md`: meaning and usage rules shared across Features
|
|
37
|
+
- `<feature-visual-brief>.md`: Feature-specific Figma/images, UX direction, and gaps between the data contract and design
|
|
38
|
+
- `assets/<feature-name>/`: repository-owned visual snapshots required by implementation
|
|
39
|
+
|
|
40
|
+
If `design-system.md` already exists, reference or update it instead of creating a replacement. Do not make one `design.md` per Feature the default.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## What does not belong here
|
|
45
|
+
|
|
46
|
+
- System/backend architecture (`docs/prd/*-overview.md` or the active Feature's `plan.md`)
|
|
47
|
+
- Data models and API design (an Idea before promotion, then the active Feature's `plan.md`)
|
|
48
|
+
- Open-source candidate research (an Idea or the active Feature's `decisions.md`)
|
|
49
|
+
- Technical decisions and alternative comparisons (an Idea before promotion, then the active Feature's `decisions.md`)
|
|
50
|
+
- Implementation roadmaps and work plans (the active Feature's `plan.md` and `tasks.md`)
|
|
51
|
+
|
|
52
|
+
In `designs/`, design means UX, screen, and visual design—not technical design.
|
|
53
|
+
|
|
15
54
|
---
|
|
16
55
|
|
|
17
56
|
## Conventions
|
|
18
57
|
|
|
19
58
|
- For external references, keep the **source URL + a short summary (or a snapshot)**.
|
|
20
59
|
- Use kebab-case filenames (e.g., `auth-flow.md`, `design-system.md`).
|
|
21
|
-
-
|
|
60
|
+
- Keep images/files in a repository path such as `assets/<feature-name>/`; never depend on an absolute path from one person's computer.
|
|
61
|
+
- Use `scope: project` and the appropriate `kind: ux-design`, `kind: design-system`, or `kind: visual-reference` frontmatter.
|
|
62
|
+
|
|
63
|
+
## Executable Authorities
|
|
64
|
+
|
|
65
|
+
- `design-system.md`: meaning and usage rules
|
|
66
|
+
- CSS theme/globals or token files: executed token values
|
|
67
|
+
- Shared UI directory: executed component and variant contracts
|
|
68
|
+
- Storybook or equivalent workbench: executable variant and state examples
|
|
69
|
+
- Feature `decisions.md`: exceptions, change rationale, and removal conditions
|
|
70
|
+
|
|
71
|
+
When `design-system.md` changes, use the same Feature task to review and synchronize affected docs, token/theme files, shared UI, Storybook/workbench examples, and verification.
|
|
22
72
|
|
|
23
73
|
---
|
|
24
74
|
|
|
@@ -45,7 +45,7 @@ By the time work reaches this folder, the requirement should already be defined
|
|
|
45
45
|
- Minimum **3-digit padding** for numbers (001, 002, ...)
|
|
46
46
|
- Expands to **4+ digits** beyond 999 (F1000, F1001, ...)
|
|
47
47
|
- Feature names in kebab-case
|
|
48
|
-
- **Feature
|
|
48
|
+
- **Feature identity is workflow-dependent**: In GitHub workflow, each Feature corresponds to one GitHub Issue. In local workflow, the canonical identity is the stable Feature ID such as `F027`; no Issue is required.
|
|
49
49
|
|
|
50
50
|
---
|
|
51
51
|
|
|
@@ -57,6 +57,8 @@ npx lee-spec-kit workflow-stage <feature-ref> --json
|
|
|
57
57
|
|
|
58
58
|
Use the returned `stage`, `nextAction`, and `implementationAllowed` values as the current workflow state.
|
|
59
59
|
|
|
60
|
+
In a local workflow with `completionStrategy: "local-ff"` or `"local-squash"`, completion is `implementation_approve → local_merge → local_verify → local_cleanup → done`. Use the exact helper command returned for each stage. `local-ff` proves ancestry; `local-squash` proves the squash commit tree matches the internally preserved source Feature tip. Both require cleanup before `done`.
|
|
61
|
+
|
|
60
62
|
---
|
|
61
63
|
|
|
62
64
|
## PRD Requirement Traceability (Recommended)
|
|
@@ -129,9 +131,9 @@ Keeping the shared artifact for history is fine, but when it conflicts with feat
|
|
|
129
131
|
|
|
130
132
|
---
|
|
131
133
|
|
|
132
|
-
## Pre-PR
|
|
134
|
+
## Pre-PR Subagent Checklist
|
|
133
135
|
|
|
134
|
-
|
|
136
|
+
Delegate every Pre-PR review to a fresh, read-only subagent using the model and reasoning effort returned by `workflow-stage --json`. The subagent follows `agents/skills/create-pr.md` (`Pre-PR Baseline Checklist`); the main agent owns finding remediation and evidence recording.
|
|
135
137
|
|
|
136
138
|
---
|
|
137
139
|
|
|
@@ -6,7 +6,8 @@ If unmanaged docs artifacts exist outside the canonical docs surface (for exampl
|
|
|
6
6
|
> ADR (Architecture Decision Record) captures important technical or architectural choices made during implementation.
|
|
7
7
|
> Write ADRs so the team can trace why a choice was made and revisit trade-offs later.
|
|
8
8
|
|
|
9
|
-
> Format: `
|
|
9
|
+
> Format: `DNNN: {Decision Title} ({YYYY-MM-DD})`
|
|
10
|
+
> Decision IDs are scoped to this Feature and start at `D001`, independently of the Feature ID.
|
|
10
11
|
|
|
11
12
|
Recording principles:
|
|
12
13
|
|
|
@@ -17,6 +18,7 @@ Recording principles:
|
|
|
17
18
|
- Right before task done (`[DOING] -> [DONE]`): finalize `Options/Decision/Rationale` and enrich `Trace`
|
|
18
19
|
- After PR merge: append 1-2 lines in `Trace (post-merge check)` with actual outcome/impact
|
|
19
20
|
- Every ADR must include at least one **Evidence link** (commit, PR, or test/log evidence).
|
|
21
|
+
- For a design-system change or exception, also record the affected rule and scope, rationale, removal condition, and synchronization impact on executable authorities.
|
|
20
22
|
|
|
21
23
|
---
|
|
22
24
|
|
|
@@ -60,3 +60,6 @@
|
|
|
60
60
|
- If this is a legacy requirements doc without PRD IDs yet, backfill IDs in the source first, then update this field and the `tasks.md` task tags together.
|
|
61
61
|
- When requirements/scope change, update PRD docs + this field + `tasks.md` task tags together.
|
|
62
62
|
- If implementation discovers a better user-facing behavior and the shipped requirement changes, treat that as a PRD update, not a permanent `[NON-PRD]` exception.
|
|
63
|
+
- Design Refs: - (optional; use project-root paths only for explicit UI/UX design work)
|
|
64
|
+
- Design System: - (e.g. `docs/designs/design-system.md`)
|
|
65
|
+
- Visual Brief: - (e.g. `docs/designs/<feature-visual-brief>.md`)
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
- Do not invent PRD IDs in `tasks.md`. Only reference IDs that already exist in `docs/prd` or the upstream requirements doc.
|
|
14
14
|
- If this is a legacy feature without PRD IDs yet, backfill IDs in the source requirements doc first, then align `spec.md` `PRD Refs` and task tags together.
|
|
15
15
|
- `[NON-PRD]` is for internal implementation work only. If the task changes user-facing behavior, acceptance criteria, or scope, backfill PRD first and tag it as `[PRD-...]`.
|
|
16
|
+
- **Design-system synchronization (conditional)**: when a task changes `docs/designs/design-system.md`, track the affected design docs, token/theme files, shared UI, Storybook/workbench examples, and verification in that same task's `Checklist`. Do not edit an unaffected surface; confirm its impact instead.
|
|
16
17
|
|
|
17
18
|
---
|
|
18
19
|
|
|
@@ -30,6 +30,36 @@
|
|
|
30
30
|
|
|
31
31
|
---
|
|
32
32
|
|
|
33
|
+
## Research and Candidate Comparison
|
|
34
|
+
|
|
35
|
+
- Candidates:
|
|
36
|
+
- Advantages:
|
|
37
|
+
- Disadvantages:
|
|
38
|
+
- License:
|
|
39
|
+
- Validation Needed:
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Design Draft
|
|
44
|
+
|
|
45
|
+
- Data Contracts:
|
|
46
|
+
- Expected Components:
|
|
47
|
+
- External Dependencies:
|
|
48
|
+
- Open Questions:
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Feature Promotion Mapping
|
|
53
|
+
|
|
54
|
+
- Content for `spec.md`:
|
|
55
|
+
- Content for `plan.md`:
|
|
56
|
+
- Content for `decisions.md`:
|
|
57
|
+
- Content for `tasks.md`:
|
|
58
|
+
|
|
59
|
+
> This is a pre-promotion draft. After Feature creation, move unresolved material as Candidate or Pending and keep the Idea for history only.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
33
63
|
## Promotion Notes
|
|
34
64
|
|
|
35
65
|
- What should stay true if this becomes a feature?
|