lee-spec-kit 0.9.0 → 0.9.2

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.
Files changed (30) hide show
  1. package/README.en.md +2 -1
  2. package/README.md +3 -2
  3. package/dist/bootstrap-Q77MTW3Q.js +0 -0
  4. package/dist/chunk-3AFCPGGS.js +0 -0
  5. package/dist/chunk-7V7RMGEU.js +0 -0
  6. package/dist/chunk-GR7JQBWF.js +0 -0
  7. package/dist/hooks-373Z6JG2.js +0 -0
  8. package/dist/index.js +600 -89
  9. package/dist/index.js.map +1 -1
  10. package/package.json +13 -15
  11. package/templates/en/common/README.md +11 -9
  12. package/templates/en/common/agents/agents.md +9 -3
  13. package/templates/en/common/agents/git-workflow.md +27 -8
  14. package/templates/en/common/agents/skills/split-feature.md +2 -1
  15. package/templates/en/common/agents/ui-ux-design.md +128 -0
  16. package/templates/en/common/designs/README.md +39 -1
  17. package/templates/en/common/features/README.md +6 -2
  18. package/templates/en/common/features/feature-base/decisions.md +3 -1
  19. package/templates/en/common/features/feature-base/spec.md +3 -0
  20. package/templates/en/common/features/feature-base/tasks.md +4 -3
  21. package/templates/ko/common/README.md +11 -9
  22. package/templates/ko/common/agents/agents.md +9 -3
  23. package/templates/ko/common/agents/git-workflow.md +27 -8
  24. package/templates/ko/common/agents/skills/split-feature.md +4 -3
  25. package/templates/ko/common/agents/ui-ux-design.md +128 -0
  26. package/templates/ko/common/designs/README.md +39 -1
  27. package/templates/ko/common/features/README.md +6 -2
  28. package/templates/ko/common/features/feature-base/decisions.md +3 -1
  29. package/templates/ko/common/features/feature-base/spec.md +3 -0
  30. package/templates/ko/common/features/feature-base/tasks.md +4 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lee-spec-kit",
3
- "version": "0.9.0",
3
+ "version": "0.9.2",
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
- "packageManager": "pnpm@10.7.0"
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` when staged docs paths need validation.
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
 
@@ -136,18 +136,19 @@ When you run `lee-spec-kit init`, it creates `.lee-spec-kit.json` in the docs ro
136
136
  - `reasoningEffort`: `low | medium | high | xhigh | max | ultra`
137
137
  - `onUnavailable`: `inherit | error` when the requested model is unavailable
138
138
  - `workflow.baseBranch` (string): branch that receives a completed local Feature
139
- - `workflow.completionStrategy` (`"local-ff" | "none"`): fast-forward and verify local Features before `done`, or explicitly finish without integration
139
+ - `workflow.completionStrategy` (`"local-ff" | "local-squash" | "none"`): fast-forward, create one verified squash commit, or explicitly finish without integration
140
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"] }`
141
+ - `workflow.featureChecks` (array): build/test/lint/typecheck commands run in the Feature worktree before integration
142
+ - `workflow.postMergeChecks` (array): optional commands that genuinely require the integrated base-branch environment
142
143
  - `approval` (object, optional): optional approval-checkpoint metadata for repo policy and custom validators
143
144
  - The Codex-native default path still asks at documented checkpoints and before remote/destructive actions first.
144
145
  - Legacy runtime consumed this field directly; keep it only when you intentionally want category-based checkpoint metadata.
145
146
  - Current default:
146
147
  - `mode: "category"`
147
148
  - `default: "skip"`
148
- - `requireCheckCategories: ["spec_approve", "implementation_approve"]`
149
- - In a `local-ff` workflow, `implementation_approve` explicitly authorizes the remaining fast-forward integration, post-merge checks, managed-worktree removal, and configured local Feature-branch deletion.
150
- - Add `local_merge` to `requireCheckCategories` when a separate approval immediately before integration is required.
149
+ - `requireCheckCategories: ["spec_approve", "implementation_approve", "local_merge"]`
150
+ - 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.
151
+ - Remove `local_merge` from `requireCheckCategories` only when the implementation approval should authorize the remaining local completion flow without another checkpoint.
151
152
  - Approval token: `A`
152
153
  - Accepted replies: `A`, `A OK`
153
154
  - `allowedDocsEntries` (object, optional): Allowlist non-standard top-level docs entries so they are not treated as unmanaged docs
@@ -168,6 +169,7 @@ When you run `lee-spec-kit init`, it creates `.lee-spec-kit.json` in the docs ro
168
169
  "baseBranch": "main",
169
170
  "completionStrategy": "local-ff",
170
171
  "deleteFeatureBranchAfterMerge": true,
172
+ "featureChecks": [],
171
173
  "postMergeChecks": [],
172
174
  "prePrReview": {
173
175
  "evidenceMode": "path_required",
@@ -185,12 +187,12 @@ When you run `lee-spec-kit init`, it creates `.lee-spec-kit.json` in the docs ro
185
187
  "approval": {
186
188
  "mode": "category",
187
189
  "default": "skip",
188
- "requireCheckCategories": ["spec_approve", "implementation_approve"]
190
+ "requireCheckCategories": ["spec_approve", "implementation_approve", "local_merge"]
189
191
  }
190
192
  }
191
193
  ```
192
194
 
193
- New local projects use `local-ff`. 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` deliberately when ready.
195
+ 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
196
 
195
197
  ```json
196
198
  {
@@ -204,7 +206,7 @@ New local projects use `local-ff`. During `update`, an existing local project wi
204
206
  "approval": {
205
207
  "mode": "category",
206
208
  "default": "skip",
207
- "requireCheckCategories": ["spec_approve", "implementation_approve"]
209
+ "requireCheckCategories": ["spec_approve", "implementation_approve", "local_merge"]
208
210
  }
209
211
  }
210
212
  ```
@@ -42,6 +42,12 @@ This document defines workflow policy, not a custom runtime loop.
42
42
  - Do not use `docs/designs/` for system architecture, data/API design, technical research, or implementation plans.
43
43
  - Follow the detailed routing rules in `docs/README.md`.
44
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
+
45
51
  ## Execution Rules
46
52
 
47
53
  - lee-spec-kit owns docs structure, workflow stages, and validators.
@@ -51,10 +57,10 @@ This document defines workflow policy, not a custom runtime loop.
51
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.
52
58
  - Treat spec/plan/tasks approval, issue creation, and branch creation as hard gates before implementation.
53
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.
54
- - 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`.
55
- - In a `local-ff` workflow, present the returned implementation-approval summary without weakening it: that checkpoint authorizes fast-forward integration, post-merge checks, and configured local cleanup. Ask again at `local_merge` only when that category is explicitly required.
60
+ - In local mode, do not stop after implementation approval. Follow the exact `local verify`, `local merge`, and `local cleanup` commands returned by `workflow-stage` until verified integration and cleanup produce `done`. A `feature_remediation` stage explicitly permits fixes in the Feature worktree.
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.
56
62
  - Keep docs synced with code changes in the same turn whenever behavior or scope changes.
57
- - Use `npx lee-spec-kit commit-audit --json` before `git commit` when staged docs paths need validation.
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.
58
64
  - Use `npx lee-spec-kit workflow-audit --json` as the default end-of-turn docs sync check.
59
65
 
60
66
  ## Approval Rules
@@ -6,11 +6,11 @@ Rules for AI agents to automate Git/GitHub operations.
6
6
 
7
7
  ## Core Concepts
8
8
 
9
- | Concept | GitHub Mapping | Description |
10
- | ---------------- | -------------- | ------------------------------- |
11
- | Feature | GitHub Issue | Feature-level work unit |
12
- | Task | Commit | Individual implementation unit |
13
- | Feature Complete | Pull Request | Create PR on feature completion |
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(#123): implement feature"
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(#123): update feature 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.
@@ -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
- - Preserve "Feature = Issue" by creating multiple linked child issues/features.
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.
@@ -6,12 +6,39 @@ 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
+
15
42
  ---
16
43
 
17
44
  ## What does not belong here
@@ -30,7 +57,18 @@ In `designs/`, design means UX, screen, and visual design—not technical design
30
57
 
31
58
  - For external references, keep the **source URL + a short summary (or a snapshot)**.
32
59
  - Use kebab-case filenames (e.g., `auth-flow.md`, `design-system.md`).
33
- - If you need images/files, create and use an `assets/` folder.
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.
34
72
 
35
73
  ---
36
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 = Issue**: Each Feature corresponds to one GitHub Issue.
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,7 +57,11 @@ 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"`, completion is `implementation_approve local_merge local_verify local_cleanup done`. Use the exact helper command returned for each stage; `done` means the base branch contains the Feature tip and cleanup is complete.
60
+ The three final completion checkboxes in `tasks.md` carry `lee-spec-kit:completion:*` HTML markers. You may customize their visible wording, but preserve the marker on each checkbox line; `workflow-stage` uses the marker as the machine-readable identity and falls back to the legacy canonical wording for older projects.
61
+
62
+ In a local workflow with `completionStrategy: "local-ff"` or `"local-squash"`, completion is `implementation_approve → feature_verify → local_merge → local_cleanup → done`. Failed checks enter `feature_remediation` with implementation enabled. `local-ff` moves only the verified Feature SHA; `local-squash` requires the integration tree to match the verified Feature tree. Both require cleanup before `done`.
63
+
64
+ A remediation commit invalidates verification and the prior local-merge confirmation. Refresh review evidence for the changed diff when Pre-PR review is enabled, verify the new tip, and obtain local-merge approval again.
61
65
 
62
66
  ---
63
67
 
@@ -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: `D{number}: {Decision Title} ({YYYY-MM-DD})`
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
 
@@ -80,9 +81,9 @@
80
81
 
81
82
  > ⚠️ This is a **final verification checklist**. Only check after you actually verified.
82
83
 
83
- - [ ] All tasks are `[DONE]`, and each task's `Acceptance` is verified and `Checklist` is checked
84
- - [ ] Tests executed and passing (record command/result below)
85
- - [ ] Final outcome shared and any required user confirmation recorded at the documented workflow checkpoint
84
+ - [ ] All tasks are `[DONE]`, and each task's `Acceptance` is verified and `Checklist` is checked <!-- lee-spec-kit:completion:all-tasks -->
85
+ - [ ] Tests executed and passing (record command/result below) <!-- lee-spec-kit:completion:tests -->
86
+ - [ ] Final outcome shared and any required user confirmation recorded at the documented workflow checkpoint <!-- lee-spec-kit:completion:final-outcome -->
86
87
 
87
88
  ### Test Run Log (Latest by Command)
88
89
 
@@ -16,7 +16,7 @@ npx lee-spec-kit docs get agents --json
16
16
  - 기본 실행 경로는 workspace-scoped `AGENTS.md`, Codex 공식 hooks, 그리고 활성 feature 문서입니다.
17
17
  - 활성 feature를 정한 뒤에는 `spec.md`, `plan.md`, `tasks.md`, `decisions.md`를 작업 SSOT로 사용합니다.
18
18
  - 사용자 승인 요청은 문서화된 workflow checkpoint와 원격/파괴적 작업 전에만 합니다.
19
- - staged된 docs 경로 검사가 필요하면 `git commit` 전에 `npx lee-spec-kit commit-audit --json`를 사용합니다.
19
+ - `git commit` 전에 `npx lee-spec-kit commit-audit --json`를 사용해 staged docs 경로와 canonical Feature-scoped commit 형식을 검증합니다.
20
20
  - 코드나 feature 문서를 바꿨다면 종료 전 `npx lee-spec-kit workflow-audit --json`로 동기화 상태를 확인합니다.
21
21
  - `isLeeSpecKitProject: false`면 lee-spec-kit 전용 절차를 건너뛰고 일반 워크플로우로 진행합니다.
22
22
 
@@ -136,18 +136,19 @@ npx lee-spec-kit docs get agents --json
136
136
  - `reasoningEffort`: `low | medium | high | xhigh | max | ultra`
137
137
  - `onUnavailable`: 지정 모델을 사용할 수 없을 때 `inherit | error`
138
138
  - `workflow.baseBranch` (string): 완료된 local Feature를 통합할 기준 브랜치
139
- - `workflow.completionStrategy` (`"local-ff" | "none"`): `done` 전에 local Feature를 fast-forward 병합·검증하거나, 명시적으로 통합 없이 종료
139
+ - `workflow.completionStrategy` (`"local-ff" | "local-squash" | "none"`): fast-forward, 검증된 단일 squash commit 생성, 또는 명시적으로 통합 없이 종료
140
140
  - `workflow.deleteFeatureBranchAfterMerge` (boolean): cleanup 후 통합된 local Feature 브랜치 삭제 여부. 원격 브랜치는 삭제하지 않음
141
- - `workflow.postMergeChecks` (array): local 통합 기준 브랜치에서 실행할 구조화 명령. 예: `{ "command": "pnpm", "args": ["test"] }`
141
+ - `workflow.featureChecks` (array): 통합 전에 Feature worktree에서 실행할 build/test/lint/typecheck 명령
142
+ - `workflow.postMergeChecks` (array): 통합된 기준 브랜치 환경이 실제로 필요한 선택적 검사
142
143
  - `approval` (object, optional): repo 정책/커스텀 validator용 승인 checkpoint 메타데이터
143
144
  - 기본 Codex-native 경로는 여전히 문서화된 checkpoint와 원격/파괴적 작업을 우선 기준으로 승인 요청합니다.
144
145
  - legacy runtime은 이 필드를 직접 소비했지만, 이제는 category 기반 checkpoint 메타데이터가 정말 필요할 때만 유지하세요.
145
146
  - 현재 기본값:
146
147
  - `mode: "category"`
147
148
  - `default: "skip"`
148
- - `requireCheckCategories: ["spec_approve", "implementation_approve"]`
149
- - `local-ff` workflow에서 `implementation_approve`는 이후의 fast-forward 통합, post-merge 검사, managed worktree 제거, 설정된 local Feature 브랜치 삭제까지 명시적으로 승인합니다.
150
- - 통합 직전 별도 승인이 필요하면 `requireCheckCategories`에 `local_merge`를 추가하세요.
149
+ - `requireCheckCategories: ["spec_approve", "implementation_approve", "local_merge"]`
150
+ - `local-ff` 또는 `local-squash` workflow에서 `implementation_approve`는 완료된 구현을 승인하고, `local_merge`는 설정된 통합, post-merge 검사, managed worktree 제거, 설정된 local Feature 브랜치 삭제를 별도로 승인합니다.
151
+ - 구현 승인 번으로 남은 local 완료 흐름까지 진행하려는 경우에만 `requireCheckCategories`에서 `local_merge`를 제거하세요.
151
152
  - 승인 토큰: `A`
152
153
  - 허용 응답: `A`, `A OK`
153
154
  - `allowedDocsEntries` (object, optional): 비표준 `docs/` top-level 엔트리를 unmanaged docs로 보지 않도록 허용 목록에 추가
@@ -168,6 +169,7 @@ npx lee-spec-kit docs get agents --json
168
169
  "baseBranch": "main",
169
170
  "completionStrategy": "local-ff",
170
171
  "deleteFeatureBranchAfterMerge": true,
172
+ "featureChecks": [],
171
173
  "postMergeChecks": [],
172
174
  "prePrReview": {
173
175
  "evidenceMode": "path_required",
@@ -185,12 +187,12 @@ npx lee-spec-kit docs get agents --json
185
187
  "approval": {
186
188
  "mode": "category",
187
189
  "default": "skip",
188
- "requireCheckCategories": ["spec_approve", "implementation_approve"]
190
+ "requireCheckCategories": ["spec_approve", "implementation_approve", "local_merge"]
189
191
  }
190
192
  }
191
193
  ```
192
194
 
193
- 새 local 프로젝트는 `local-ff`를 사용합니다. 기존 local 프로젝트에 명시적 `completionStrategy`가 없으면 `update`가 `none`을 넣어 업그레이드 도중 현재 브랜치를 갑자기 병합하지 않습니다. 준비가 끝난 뒤 `local-ff`로 명시적으로 전환하세요.
195
+ 새 local 프로젝트는 `local-ff`를 사용합니다. base branch에 하나의 commit만 남기려면 `local-squash`를 선택하세요. 이때 task checkpoint 증거를 위해 원본 Feature tip을 내부 `refs/lee-spec-kit/integrations/*` ref로 보존합니다. 기존 local 프로젝트에 명시적 `completionStrategy`가 없으면 `update`가 `none`을 넣어 업그레이드 도중 현재 브랜치를 갑자기 병합하지 않습니다. 준비가 끝난 뒤 `local-ff` 또는 `local-squash`로 명시적으로 전환하세요.
194
196
 
195
197
  ```json
196
198
  {
@@ -204,7 +206,7 @@ npx lee-spec-kit docs get agents --json
204
206
  "approval": {
205
207
  "mode": "category",
206
208
  "default": "skip",
207
- "requireCheckCategories": ["spec_approve", "implementation_approve"]
209
+ "requireCheckCategories": ["spec_approve", "implementation_approve", "local_merge"]
208
210
  }
209
211
  }
210
212
  ```
@@ -42,6 +42,12 @@
42
42
  - `docs/designs/`를 시스템 아키텍처, 데이터/API 설계, 기술 조사, 구현 계획의 목적지로 사용하지 않습니다.
43
43
  - 세부 설명은 `docs/README.md`의 문서 라우팅 규칙을 따릅니다.
44
44
 
45
+ ## 선택적 UI/UX 디자인 정책
46
+
47
+ - 사용자 요청에 design system, UI/visual redesign, 디자인 일관성, 공통 UI/component library 정리, branding/theme/token 재설계, Figma/디자인 이미지 기반 구현이 명시된 경우에만 `npx lee-spec-kit docs get ui-ux-design --json`을 읽고 적용합니다.
48
+ - 단순히 대상이 web/frontend인 경우, 비 UI/backend Feature, 장기 디자인 규칙과 무관한 단순 버그 수정에는 이 정책을 적용하지 않습니다.
49
+ - 이 문서는 선택적 권장 정책이며 `requiredDocs`나 workflow 승인 gate가 아닙니다.
50
+
45
51
  ## 실행 규칙
46
52
 
47
53
  - lee-spec-kit은 문서 구조, workflow 단계, validator를 담당합니다.
@@ -51,10 +57,10 @@
51
57
  - Pre-PR 리뷰 서브에이전트는 finding만 반환하며 코드를 수정하지 않습니다. 메인 에이전트가 finding을 반영하고 reviewer metadata와 최종 decision을 evidence에 기록합니다.
52
58
  - spec / plan / tasks 승인, issue 생성, branch 생성은 구현 전 하드 게이트로 취급합니다.
53
59
  - standalone 모드에서는 `git worktree add`를 직접 만들지 말고 `workflow-stage`의 정확한 `nextAction.command`를 실행해 managed workspace 경로, stale 디렉터리 정리, `.env`/`.env.*` 복사 단계가 일관되게 유지되도록 합니다.
54
- - local 모드에서는 구현 승인 직후 종료하지 않습니다. `workflow-stage`가 반환하는 정확한 `local merge`, `local cleanup` 명령을 따라 통합·검증·정리가 확인되어 `done`이 될 때까지 진행합니다.
55
- - `local-ff` workflow에서는 반환된 구현 승인 설명을 축소하지 않고 그대로 제시합니다. checkpoint는 fast-forward 통합, post-merge 검사, 설정된 local cleanup까지 승인하며, `local_merge` category가 명시적으로 승인 대상으로 설정된 경우에만 통합 직전 다시 요청합니다.
60
+ - local 모드에서는 구현 승인 직후 종료하지 않습니다. `workflow-stage`가 반환하는 정확한 `local verify`, `local merge`, `local cleanup` 명령을 따라 검증·통합·정리가 확인되어 `done`이 될 때까지 진행합니다. `feature_remediation` 단계에서는 Feature worktree 수정이 명시적으로 허용됩니다.
61
+ - `local-ff` 또는 `local-squash` workflow에서 `local_merge` 승인이 필요하면 구현 승인과 local merge 승인을 구분합니다. 번째 승인은 구현 결과를 수락하고, 번째 승인은 설정된 통합 전략, post-merge 검사, local cleanup을 허가합니다.
56
62
  - 동작이나 범위가 바뀌는 코드 변경이 있으면 같은 턴 안에서 feature 문서를 같이 동기화합니다.
57
- - staged된 docs 경로 검사가 필요하면 `git commit` 전에 `npx lee-spec-kit commit-audit --json`를 사용합니다.
63
+ - `git commit` 전에 `npx lee-spec-kit commit-audit --json`를 사용합니다. Feature-scoped commit은 Issue가 연결되어 있으면 `#123`, Issue 없는 local workflow에서는 `F027` 같은 안정적인 Feature ID를 scope로 사용합니다.
58
64
  - 기본 docs sync 검사는 `npx lee-spec-kit workflow-audit --json`를 사용합니다.
59
65
 
60
66
  ## 승인 규칙
@@ -6,11 +6,11 @@
6
6
 
7
7
  ## 핵심 개념
8
8
 
9
- | 개념 | GitHub 매핑 | 설명 |
10
- | --------- | ------------ | ----------------------- |
11
- | Feature | GitHub Issue | 기능 단위 작업 |
12
- | 태스크 | Commit | 개별 구현 단위 |
13
- | 기능 완료 | Pull Request | Feature 완료 시 PR 생성 |
9
+ | 개념 | GitHub workflow | Local workflow | 설명 |
10
+ | --------- | --------------- | -------------- | ----------------------- |
11
+ | Feature | GitHub Issue | Feature ID | 기능 단위 작업 |
12
+ | 태스크 | Commit | Commit | 개별 구현 단위 |
13
+ | 기능 완료 | Pull Request | Local merge | Feature 완료 통합 |
14
14
 
15
15
  ---
16
16
 
@@ -50,10 +50,27 @@ main
50
50
 
51
51
  ### 형식
52
52
 
53
- ```
53
+ Feature scope는 아래 canonical 형식 중 하나만 사용하며, 에이전트가 임의의 scope 형식을 만들지 않습니다.
54
+
55
+ ```text
56
+ # GitHub Issue가 연결된 Feature
54
57
  {type}(#{issue}): {description}
58
+
59
+ # Issue가 없는 local Feature
60
+ {type}({featureId}): {description}
61
+ ```
62
+
63
+ 예:
64
+
65
+ ```text
66
+ feat(#123): 사용자 인증 구현
67
+ docs(#123): 인증 스펙 명확화
68
+ feat(F027): 알림 설정 구현
69
+ docs(F027): 알림 문서 업데이트
55
70
  ```
56
71
 
72
+ local Feature의 scope는 안정적인 Feature ID(`F027`)입니다. 전체 폴더 ref인 `F027-notification-settings`를 scope로 사용하지 않으며, `docs: F027 ...`처럼 Feature scope를 생략한 커밋도 canonical 형식이 아닙니다.
73
+
57
74
  ### Type 목록
58
75
 
59
76
  | Type | 설명 | 예시 |
@@ -114,15 +131,17 @@ git worktree add .worktrees/feat-{issue-number}-{feature-name} feat/{issue-numbe
114
131
 
115
132
  #### Standalone 모드 커밋 가이드
116
133
 
134
+ workflow에 따라 scope를 선택합니다. Issue가 연결되어 있으면 `#123`, Issue 없는 local Feature라면 `F027` 같은 Feature ID를 사용합니다.
135
+
117
136
  1. **Project 커밋** (코드 변경사항이 있는 경우)
118
137
 
119
138
  ```bash
120
- git commit -m "feat(#123): 기능 구현"
139
+ git commit -m "feat(F027): 기능 구현"
121
140
  ```
122
141
 
123
142
  2. **Docs 커밋** (문서 변경사항이 있는 경우 - **Docs 레포에서 실행**)
124
143
  ```bash
125
- git commit -m "docs(#123): 기능 구현 문서 업데이트"
144
+ git commit -m "docs(F027): 기능 구현 문서 업데이트"
126
145
  ```
127
146
 
128
147
  > 💡 **Core Rule**: 태스크 완료 시점에는 **변경된 모든 레포지토리**가 커밋되어야 합니다.