lee-spec-kit 0.6.7 → 0.6.8

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 (48) hide show
  1. package/README.en.md +84 -51
  2. package/README.md +84 -57
  3. package/dist/index.js +1096 -305
  4. package/package.json +1 -1
  5. package/templates/en/{single → common}/README.md +10 -10
  6. package/templates/en/common/agents/agents.md +77 -0
  7. package/templates/en/common/agents/skills/create-feature.md +1 -0
  8. package/templates/en/common/agents/skills/create-pr.md +9 -9
  9. package/templates/en/common/agents/skills/execute-task.md +1 -0
  10. package/templates/en/{fullstack → common}/features/README.md +8 -16
  11. package/templates/en/{fullstack → common}/features/feature-base/decisions.md +3 -0
  12. package/templates/ko/{single → common}/README.md +9 -9
  13. package/templates/ko/common/agents/agents.md +78 -0
  14. package/templates/ko/common/agents/skills/create-feature.md +1 -0
  15. package/templates/ko/common/agents/skills/create-pr.md +9 -9
  16. package/templates/ko/common/agents/skills/execute-task.md +1 -0
  17. package/templates/ko/{fullstack → common}/features/README.md +7 -37
  18. package/templates/ko/{fullstack → common}/features/feature-base/decisions.md +3 -0
  19. package/templates/en/fullstack/README.md +0 -60
  20. package/templates/en/fullstack/agents/agents.md +0 -116
  21. package/templates/en/fullstack/features/be/README.md +0 -5
  22. package/templates/en/fullstack/features/fe/README.md +0 -5
  23. package/templates/en/fullstack/prd/README.md +0 -20
  24. package/templates/en/single/agents/agents.md +0 -103
  25. package/templates/en/single/features/README.md +0 -56
  26. package/templates/en/single/features/feature-base/decisions.md +0 -15
  27. package/templates/en/single/features/feature-base/plan.md +0 -48
  28. package/templates/en/single/features/feature-base/spec.md +0 -57
  29. package/templates/en/single/features/feature-base/tasks.md +0 -60
  30. package/templates/ko/fullstack/README.md +0 -60
  31. package/templates/ko/fullstack/agents/agents.md +0 -146
  32. package/templates/ko/fullstack/features/be/README.md +0 -5
  33. package/templates/ko/fullstack/features/fe/README.md +0 -5
  34. package/templates/ko/single/agents/agents.md +0 -116
  35. package/templates/ko/single/features/README.md +0 -56
  36. package/templates/ko/single/features/feature-base/decisions.md +0 -15
  37. package/templates/ko/single/features/feature-base/plan.md +0 -48
  38. package/templates/ko/single/features/feature-base/spec.md +0 -57
  39. package/templates/ko/single/features/feature-base/tasks.md +0 -60
  40. package/templates/ko/single/prd/README.md +0 -20
  41. /package/templates/en/{fullstack → common}/features/feature-base/plan.md +0 -0
  42. /package/templates/en/{fullstack → common}/features/feature-base/spec.md +0 -0
  43. /package/templates/en/{fullstack → common}/features/feature-base/tasks.md +0 -0
  44. /package/templates/en/{single → common}/prd/README.md +0 -0
  45. /package/templates/ko/{fullstack → common}/features/feature-base/plan.md +0 -0
  46. /package/templates/ko/{fullstack → common}/features/feature-base/spec.md +0 -0
  47. /package/templates/ko/{fullstack → common}/features/feature-base/tasks.md +0 -0
  48. /package/templates/ko/{fullstack → common}/prd/README.md +0 -0
package/README.en.md CHANGED
@@ -115,9 +115,10 @@ npx lee-spec-kit init --name my-project --type fullstack # alias
115
115
  | `--workflow <mode>` | Workflow mode: `github` (issue/PR/review) or `local` (local-first) | `github` |
116
116
  | `-d, --dir <dir>` | Install directory | `./docs` |
117
117
  | `--docs-repo <mode>` | docs repo mode (`embedded` or `standalone`) | `embedded` |
118
- | `--project-root <path>` | standalone(single) project repo path | - |
118
+ | `--project-root <path>` | standalone(single) project repo path or standalone(multi) JSON map (`{"fe":"/path/fe"}`) | - |
119
119
  | `--fe-project-root <path>` | standalone(multi) frontend repo path | - |
120
120
  | `--be-project-root <path>` | standalone(multi) backend repo path | - |
121
+ | `--component-project-roots <pairs>` | standalone(multi) component roots (`fe=/path/fe,be=/path/be,worker=/path/worker`) | - |
121
122
  | `--push-docs` | enable standalone docs push (use with `--docs-remote`) | `false` |
122
123
  | `--docs-remote <url>` | standalone docs remote URL (used with `--push-docs`) | - |
123
124
  | `-y, --yes` | Skip most interactive inputs (overwrite confirmation still appears if target dir is not empty) | - |
@@ -126,6 +127,21 @@ npx lee-spec-kit init --name my-project --type fullstack # alias
126
127
 
127
128
  > After generating docs, `init` automatically attempts Git setup/commit (`git init`, `git add`, `git commit`). Auto-commit may be skipped depending on environment/state.
128
129
 
130
+ ### Project detection (agent entrypoint)
131
+
132
+ ```bash
133
+ # detect from current directory
134
+ npx lee-spec-kit detect
135
+
136
+ # JSON output for agents/automation
137
+ npx lee-spec-kit detect --json
138
+
139
+ # detect against a specific path
140
+ npx lee-spec-kit detect --dir /path/to/workspace
141
+ ```
142
+
143
+ The `--json` payload includes `isLeeSpecKitProject`, `reasonCode` (`PROJECT_DETECTED` | `PROJECT_NOT_DETECTED`), `docsDir`, `configPath`, and `detectionSource` (`config` | `heuristic`).
144
+
129
145
  ### Create a feature
130
146
 
131
147
  ```bash
@@ -133,8 +149,8 @@ npx lee-spec-kit init --name my-project --type fullstack # alias
133
149
  npx lee-spec-kit feature user-auth
134
150
 
135
151
  # Multi
136
- npx lee-spec-kit feature --repo be user-auth
137
- npx lee-spec-kit feature --repo fe user-profile
152
+ npx lee-spec-kit feature --component be user-auth
153
+ npx lee-spec-kit feature --component fe user-profile
138
154
  npx lee-spec-kit feature --component worker queue-jobs
139
155
 
140
156
  # Specify Feature ID/description
@@ -145,7 +161,6 @@ npx lee-spec-kit feature payment --id F123 --desc "Improve payment flow"
145
161
 
146
162
  | Option | Description | Default |
147
163
  | ------------------- | ------------------------------------------- | ------------ |
148
- | `-r, --repo <repo>` | Multi target component (backward-compatible alias) | interactive |
149
164
  | `--component <id>` | Multi target component | interactive |
150
165
  | `--id <id>` | Feature ID (`F001` format) | auto-generate |
151
166
  | `-d, --desc <desc>` | Default purpose/description text for `spec.md` | empty string |
@@ -157,60 +172,64 @@ npx lee-spec-kit feature payment --id F123 --desc "Improve payment flow"
157
172
  For a single matched feature, next steps are always shown as `A/B/C` options.
158
173
 
159
174
  ```bash
160
- # Auto-detect (based on git branch)
175
+ # basic check (auto-detect from branch)
161
176
  npx lee-spec-kit context
162
177
 
163
- # Specify a feature
164
- npx lee-spec-kit context user-auth
165
-
166
- # Selector: Feature ID / folder name
178
+ # recommended: one feature + labels
167
179
  npx lee-spec-kit context F001
168
- npx lee-spec-kit context F001-user-auth
169
-
170
- # multi component selector
171
- npx lee-spec-kit context --repo fe
172
- npx lee-spec-kit context --repo worker
173
-
174
- # include all / done features
175
- npx lee-spec-kit context --all
176
- npx lee-spec-kit context --done
177
-
178
- # JSON output (for agents)
179
- npx lee-spec-kit context --json
180
+ npx lee-spec-kit context F001 --json
180
181
 
181
- # approve a labeled option (validation only)
182
- npx lee-spec-kit context F001 --approve A
182
+ # approve + execute (common path)
183
+ npx lee-spec-kit context F001 --approve A --execute
183
184
 
184
- # approve + execute exactly one command option
185
- npx lee-spec-kit context F001 --approve "A OK" --execute
185
+ # include ticket only when selected action has `requiresUserCheck=true`
186
+ npx lee-spec-kit context F001 --approve A --execute --ticket <TICKET>
186
187
 
187
- # fail when the approved label is instruction-only
188
- npx lee-spec-kit context F001 --approve A --execute --execute-strict
188
+ # strict mode: fail if approved label is instruction-only
189
+ npx lee-spec-kit context F001 --approve A --execute --ticket <TICKET> --execute-strict
189
190
  ```
190
191
 
192
+ Use advanced selectors (`--component`, `--all`, `--done`) only when you need multi-scope filtering or exceptional fallback behavior.
193
+
191
194
  **Options:**
192
195
 
193
196
  | Option | Description |
194
197
  | -------------- | ----------------------------------------------- |
195
198
  | `--json` | JSON output for agents |
196
- | `--repo <repo>`| Select target component in multi mode (e.g. `fe`, `be`, `worker`) |
199
+ | `--component <id>` | Select target component in multi mode (e.g. `fe`, `be`, `worker`) |
197
200
  | `--all` | Include completed features when auto-detecting |
198
201
  | `--done` | Show completed (workflow-done) features only |
199
- | `--approve <reply>` | Approve one labeled option (`A` or `A OK`) |
200
- | `--execute` | Execute only the approved option when it is a command |
202
+ | `--approve <reply>` | Approve one labeled option using any reply that includes a label token (e.g. `A`, `A OK`, `A proceed`) |
203
+ | `--ticket <token>` | One-time execution ticket from `--approve` (required when selected option has `requiresUserCheck=true`) |
204
+ | `--execute` | Execute only the approved option when it is a command (`--ticket` required only for check-required options) |
201
205
  | `--execute-strict` | With `--execute`, fail if the approved option is instruction-only |
202
206
 
203
- `--json` output includes:
207
+ **What is a ticket (approval ticket)?**
208
+
209
+ - A one-time execution token issued by the CLI when you approve a label via `--approve`.
210
+ - `--ticket` is required for `--execute` only when the selected action has `requiresUserCheck=true`.
211
+ - It is short-lived (5 minutes by default) and cannot be reused after one execution.
212
+
213
+ `context --json` is organized into `actions` (atomic actions), `actionOptions` (label mapping), and top-level metadata.
214
+
215
+ **Core fields (recommended for normal agent flows)**
216
+
217
+ - `status` / `reasonCode`: current state and reason code
218
+ - `actions[]`: atomic action list
219
+ - `type: "command"`: `scope` (project|docs), `cwd`, `cmd`, `category`, `operationType`, `requiresUserCheck`
220
+ - `type: "instruction"`: `message`, `category`, `operationType`, `requiresUserCheck`
221
+ - `actionOptions[]`: `label` (`A`, `B`, `C`...) + target `action` + user-facing `summary` / `detail` / `approvalPrompt`
222
+ - `approvalRequest`: ready-to-use approval/execute guidance (`labels`, `approveCommand`, `executeCommand`, `options[]`)
223
+ - `requiredDocs`: built-in docs to read before the current action (`id`, `command`)
224
+ - `checkPolicy`: approval validation policy (`token`, `acceptedTokens`, `tokenPattern`, `validLabels`, `contextVersion`, ...)
225
+
226
+ **Advanced/reference fields (automation edge cases or debugging)**
204
227
 
205
- - `reasonCode`: status reason code (`SINGLE_MATCHED`, `MULTIPLE_ACTIVE_FEATURES`, etc.)
206
- - `operationType`: action nature (`local` | `remote` | `manual`)
207
- - `actionOptions`: maps labels to atomic actions plus `summary`/`approvalPrompt` for user-facing label explanation
208
- - `primaryActionLabel` / `primaryActionType` / `primaryActionCategory` / `primaryActionOperationType`: metadata for the first atomic action
209
228
  - `selectionFallback`: fallback used when branch auto-detection does not match (`none` | `open_features` | `all_features` | `done_features`)
229
+ - `primaryActionLabel` / `primaryActionType` / `primaryActionCategory` / `primaryActionOperationType`: summary metadata for the first atomic action
210
230
  - `workflowPolicy`: current completion policy (`mode`, `requireIssue`, `requireBranch`, `requirePr`, `requireReview`)
231
+ - `taskCommitGatePolicy`: task commit gate policy (`off` | `warn` | `strict`)
211
232
  - `prePrReviewPolicy`: pre-PR review policy (`enabled`, `skills`, `fallback`, `blockOnFindings`)
212
- - `requiredDocs`: CLI built-in docs to read before the current action (`id`, `command`)
213
- - `checkPolicy`: approval validation policy (`hint`, `policyOnly`, `token: "<LABEL>"`, `acceptedTokens`, `tokenPattern`, `validLabels`, `requireExplanationBeforeApproval`, `requiredExplanationFields`, `contextVersion`, ...)
214
233
 
215
234
  Error payloads (`status: "error"`) include `reasonCode` and labeled `suggestions` (`A/B/C`) (e.g. `INVALID_APPROVAL`, `CONTEXT_STALE`, `EXECUTION_FAILED`, `EXECUTION_NOT_COMMAND`).
216
235
 
@@ -247,18 +266,24 @@ npx lee-spec-kit view --json
247
266
  | Option | Description |
248
267
  | -------------- | ----------------------------------------------- |
249
268
  | `--json` | JSON output for agents |
250
- | `--repo <repo>`| Select target component in multi mode (e.g. `fe`, `be`, `worker`) |
269
+ | `--component <id>` | Select target component in multi mode (e.g. `fe`, `be`, `worker`) |
251
270
  | `--all` | Include completed features when auto-detecting |
252
271
  | `--done` | Show completed (workflow-done) features only |
253
272
 
254
273
  ### Flow
255
274
 
256
275
  ```bash
276
+ # workflow summary (context + status + doctor)
257
277
  npx lee-spec-kit flow
258
- npx lee-spec-kit flow F001 --approve A
259
- npx lee-spec-kit flow F001 --approve "A OK" --execute
260
- npx lee-spec-kit flow --strict
278
+
279
+ # approve + execute (recommended agent path)
280
+ npx lee-spec-kit flow F001 --approve A --execute
281
+
282
+ # JSON output for automation
261
283
  npx lee-spec-kit flow --json
284
+
285
+ # strict checks (optional)
286
+ npx lee-spec-kit flow --strict
262
287
  ```
263
288
 
264
289
  **Options:**
@@ -266,11 +291,11 @@ npx lee-spec-kit flow --json
266
291
  | Option | Description |
267
292
  | ----------------- | ----------- |
268
293
  | `--json` | JSON output for agents |
269
- | `--repo <repo>` | Select target component in multi mode (e.g. `fe`, `be`, `worker`) |
294
+ | `--component <id>`| Select target component in multi mode (e.g. `fe`, `be`, `worker`) |
270
295
  | `--all` | Include completed features when auto-detecting |
271
296
  | `--done` | Show completed (workflow-done) features only |
272
- | `--approve <reply>` | Pass through context label approval (`A` or `A OK`) |
273
- | `--execute` | Execute approved option when it is a command |
297
+ | `--approve <reply>` | Pass through context label approval (e.g. `A`, `A OK`, `A proceed`) |
298
+ | `--execute` | Execute approved option when it is a command (ticket is required only when `requiresUserCheck=true`) |
274
299
  | `--execute-strict`| With `--execute`, fail if approved option is instruction-only |
275
300
  | `--strict` | Also run `status --strict` and `doctor --strict` |
276
301
 
@@ -353,6 +378,7 @@ npx lee-spec-kit doctor --decisions-placeholders warn
353
378
 
354
379
  By default, `update` runs only when the `docs/` working tree is clean; in that case it overwrites changed files without prompting.
355
380
  If you want to update while you have uncommitted changes, use `--force`.
381
+ `update` also backfills missing `.lee-spec-kit.json` keys using current defaults (e.g. `workflow.taskCommitGate: "strict"`).
356
382
 
357
383
  ```bash
358
384
  npx lee-spec-kit update
@@ -381,6 +407,7 @@ Running `init` creates `.lee-spec-kit.json` in your docs root (default: `docs/`)
381
407
  "workflow": {
382
408
  "mode": "github",
383
409
  "codeDirtyScope": "auto",
410
+ "taskCommitGate": "strict",
384
411
  "prePrReview": { "skills": ["code-review-excellence"] }
385
412
  },
386
413
  "pr": { "screenshots": { "upload": false } },
@@ -399,7 +426,7 @@ Running `init` creates `.lee-spec-kit.json` in your docs root (default: `docs/`)
399
426
  | `pushDocs` | (standalone only) whether to manage/push docs repo as a separate git repo |
400
427
  | `docsRemote` | (standalone + pushDocs) docs repo remote URL |
401
428
  | `projectRoot` | (standalone only) project repo path (single: string, multi: `{ [component]: path }`) |
402
- | `workflow` | (optional) workflow completion policy (`github`/`local`, `codeDirtyScope`, `prePrReview`) |
429
+ | `workflow` | (optional) workflow completion policy (`github`/`local`, `codeDirtyScope`, `taskCommitGate`, `prePrReview`) |
403
430
  | `pr` | (optional) PR artifacts policy (e.g. screenshot upload) |
404
431
  | `approval` | (optional) Override CHECK-required policy in `context` output (for automation/semi-auto) |
405
432
 
@@ -413,14 +440,15 @@ Running `init` creates `.lee-spec-kit.json` in your docs root (default: `docs/`)
413
440
  - the `[CHECK required]` tag in text output
414
441
  - `actions[].requiresUserCheck` in `context --json`
415
442
  - `checkPolicy.token` (`context --json`): approval token format (`<LABEL>`)
416
- - `checkPolicy.acceptedTokens`: accepted reply templates (e.g. `["<LABEL>", "<LABEL> OK"]`)
443
+ - `checkPolicy.acceptedTokens`: accepted reply templates (e.g. `["<LABEL>", "<LABEL> OK", "<LABEL> ...", "... <LABEL> ..."]`)
417
444
  - `checkPolicy.tokenPattern`: input validation regex for approval replies
418
445
  - `checkPolicy.validLabels`: currently selectable labels (`A`, `B`, `C`...)
419
446
  - `checkPolicy.requireExplanationBeforeApproval`: require label-by-label explanation before asking approval
420
- - `checkPolicy.requiredExplanationFields`: fields to use for explanation (e.g. `actionOptions[].summary`)
447
+ - `checkPolicy.requiredExplanationFields`: fields to use for explanation (e.g. `actionOptions[].detail`)
421
448
  - `checkPolicy.contextVersion`: snapshot hash for stale-context validation
422
449
  - `actionOptions`: maps `label` (`A`, `B`, `C`...) to each atomic `action`
423
450
  - `workflowPolicy`: current completion policy (`mode`, `requireIssue`, `requireBranch`, `requirePr`, `requireReview`)
451
+ - `taskCommitGatePolicy`: task commit gate policy (`off` | `warn` | `strict`)
424
452
 
425
453
  > This does not enforce/deny execution by itself; it’s a signal for agents.
426
454
  > If `approval` is omitted, it behaves as `builtin`. (No migration required)
@@ -437,6 +465,11 @@ Running `init` creates `.lee-spec-kit.json` in your docs root (default: `docs/`)
437
465
  - `auto`: `single => repo`, `multi => component`
438
466
  - `workflow.componentPaths` (optional): explicit per-component paths for component-scoped checks (e.g. `"web": ["apps/web", "packages/web-ui"]`)
439
467
  - backward compatibility: if omitted, runtime defaults to `repo`
468
+ - `workflow.taskCommitGate`:
469
+ - `strict`: block moving to next TODO when the `1 task = 1 commit` check fails
470
+ - `warn`: show warning but allow progress
471
+ - `off`: disable the check
472
+ - backward compatibility: if omitted, runtime defaults to `warn`
440
473
  - `workflow.prePrReview`:
441
474
  - `enabled` (optional): enforce pre-PR review stage (default: same as `requirePr`)
442
475
  - `skills` (optional): preferred skill names in priority order (default: `["code-review-excellence"]`)
@@ -450,6 +483,7 @@ Example:
450
483
  "workflow": {
451
484
  "mode": "github",
452
485
  "codeDirtyScope": "auto",
486
+ "taskCommitGate": "strict",
453
487
  "prePrReview": {
454
488
  "skills": ["code-review-excellence"],
455
489
  "fallback": "builtin-checklist",
@@ -510,12 +544,12 @@ npx lee-spec-kit config --project-root /new/path
510
544
  npx lee-spec-kit config --dir ./docs2 --project-root /new/path
511
545
 
512
546
  # update projectRoot (multi)
513
- npx lee-spec-kit config --project-root /new/fe/path --repo fe
514
- npx lee-spec-kit config --project-root /new/be/path --repo be
547
+ npx lee-spec-kit config --project-root /new/fe/path --component fe
548
+ npx lee-spec-kit config --project-root /new/be/path --component be
515
549
  npx lee-spec-kit config --project-root /new/worker/path --component worker
516
550
 
517
551
  # non-interactive mode (fails immediately if required input is missing)
518
- npx lee-spec-kit config --project-root /new/fe/path --repo fe --non-interactive
552
+ npx lee-spec-kit config --project-root /new/fe/path --component fe --non-interactive
519
553
  ```
520
554
 
521
555
  **Options:**
@@ -524,7 +558,6 @@ npx lee-spec-kit config --project-root /new/fe/path --repo fe --non-interactive
524
558
  | --- | --- |
525
559
  | `--dir <dir>` | Target docs directory or project path |
526
560
  | `--project-root <path>` | Set projectRoot path |
527
- | `--repo <repo>` | Target component in multi mode (backward-compatible alias) |
528
561
  | `--component <id>` | Target component in multi mode |
529
562
  | `--non-interactive` | Fail immediately instead of prompting for user input |
530
563
 
package/README.md CHANGED
@@ -131,9 +131,10 @@ npx lee-spec-kit init --name my-project --type fullstack # alias
131
131
  | `--workflow <mode>` | 워크플로우 모드: `github`(issue/PR/review 포함) 또는 `local`(로컬 중심) | `github` |
132
132
  | `-d, --dir <dir>` | 설치 디렉토리 | `./docs` |
133
133
  | `--docs-repo <mode>` | docs 레포 모드 (`embedded` 또는 `standalone`) | `embedded` |
134
- | `--project-root <path>` | standalone(single) 프로젝트 레포 경로 | - |
134
+ | `--project-root <path>` | standalone(single) 프로젝트 레포 경로 또는 standalone(multi) JSON 매핑 (`{"fe":"/path/fe"}`) | - |
135
135
  | `--fe-project-root <path>` | standalone(multi) FE 레포 경로 | - |
136
136
  | `--be-project-root <path>` | standalone(multi) BE 레포 경로 | - |
137
+ | `--component-project-roots <pairs>` | standalone(multi) 컴포넌트별 레포 경로 (`fe=/path/fe,be=/path/be,worker=/path/worker`) | - |
137
138
  | `--push-docs` | standalone docs 원격 push 사용 (`--docs-remote`와 함께 사용) | `false` |
138
139
  | `--docs-remote <url>` | standalone docs 원격 URL (`--push-docs`와 함께 사용) | - |
139
140
  | `-y, --yes` | 대화형 입력을 대부분 스킵 (단, 대상 디렉토리가 비어있지 않으면 덮어쓰기 확인은 표시) | - |
@@ -142,6 +143,21 @@ npx lee-spec-kit init --name my-project --type fullstack # alias
142
143
 
143
144
  > `init`은 docs 생성 후 Git 초기화/커밋(`git init`, `git add`, `git commit`)을 자동 시도합니다. 환경에 따라 자동 커밋이 생략될 수 있습니다.
144
145
 
146
+ ### 프로젝트 감지 (에이전트 시작점)
147
+
148
+ ```bash
149
+ # 현재 경로 기준 감지
150
+ npx lee-spec-kit detect
151
+
152
+ # 에이전트/자동화용 JSON
153
+ npx lee-spec-kit detect --json
154
+
155
+ # 특정 경로 기준 감지
156
+ npx lee-spec-kit detect --dir /path/to/workspace
157
+ ```
158
+
159
+ `--json` 출력은 `isLeeSpecKitProject`, `reasonCode`(`PROJECT_DETECTED` | `PROJECT_NOT_DETECTED`), `docsDir`, `configPath`, `detectionSource`(`config` | `heuristic`)를 포함합니다.
160
+
145
161
  ### 새 기능 생성
146
162
 
147
163
  ```bash
@@ -149,8 +165,8 @@ npx lee-spec-kit init --name my-project --type fullstack # alias
149
165
  npx lee-spec-kit feature user-auth
150
166
 
151
167
  # Multi 프로젝트
152
- npx lee-spec-kit feature --repo be user-auth
153
- npx lee-spec-kit feature --repo fe user-profile
168
+ npx lee-spec-kit feature --component be user-auth
169
+ npx lee-spec-kit feature --component fe user-profile
154
170
  npx lee-spec-kit feature --component worker queue-jobs
155
171
 
156
172
  # Feature ID/설명 지정
@@ -161,7 +177,6 @@ npx lee-spec-kit feature payment --id F123 --desc "결제 플로우 개선"
161
177
 
162
178
  | 옵션 | 설명 | 기본값 |
163
179
  | ------------------- | -------------------------------------------- | ----------- |
164
- | `-r, --repo <repo>` | multi 대상 컴포넌트 (하위호환 alias) | 대화형 선택 |
165
180
  | `--component <id>` | multi 대상 컴포넌트 | 대화형 선택 |
166
181
  | `--id <id>` | Feature ID (`F001` 형식) | 자동 생성 |
167
182
  | `-d, --desc <desc>` | `spec.md`의 목적(설명) 기본 문구 | 빈 문자열 |
@@ -174,65 +189,64 @@ npx lee-spec-kit feature payment --id F123 --desc "결제 플로우 개선"
174
189
  단일 Feature 상세에서는 다음 작업을 항상 `A/B/C` 옵션으로 표시합니다.
175
190
 
176
191
  ```bash
177
- # 자동 감지 (Git 브랜치 기준)
192
+ # 기본 조회 (브랜치 기준 자동 감지)
178
193
  npx lee-spec-kit context
179
194
 
180
- # 특정 Feature 지정
181
- npx lee-spec-kit context user-auth
182
-
183
- # selector 지원: Feature ID / 폴더명
195
+ # 특정 Feature 상태 + 라벨 확인 (에이전트 권장)
184
196
  npx lee-spec-kit context F001
185
- npx lee-spec-kit context F001-user-auth
186
-
187
- # multi에서 컴포넌트 지정
188
- npx lee-spec-kit context --repo fe
189
- npx lee-spec-kit context --repo worker
190
-
191
- # 전체/완료 Feature 포함
192
- npx lee-spec-kit context --all
193
- npx lee-spec-kit context --done
197
+ npx lee-spec-kit context F001 --json
194
198
 
195
- # 에이전트용 JSON 출력
196
- npx lee-spec-kit context --json
197
-
198
- # 라벨 승인 선택 (검증만)
199
- npx lee-spec-kit context F001 --approve A
199
+ # 승인 + 실행 (일반 케이스)
200
+ npx lee-spec-kit context F001 --approve A --execute
200
201
 
201
- # 라벨 승인 + 단일 명령 실행
202
- npx lee-spec-kit context F001 --approve "A OK" --execute
202
+ # 선택된 액션이 `requiresUserCheck=true`일 때만 티켓 포함
203
+ npx lee-spec-kit context F001 --approve A --execute --ticket <TICKET>
203
204
 
204
- # 승인 라벨이 instruction-only 실패 처리
205
- npx lee-spec-kit context F001 --approve A --execute --execute-strict
205
+ # 엄격 실행 모드 (instruction-only 라벨이면 실패)
206
+ npx lee-spec-kit context F001 --approve A --execute --ticket <TICKET> --execute-strict
206
207
  ```
207
208
 
209
+ 고급 선택자(`--component`, `--all`, `--done`)는 multi 범위 제어나 예외 상황에서만 사용하세요.
210
+
208
211
  **옵션:**
209
212
 
210
213
  | 옵션 | 설명 |
211
214
  | --------------- | ----------------------------------------------- |
212
215
  | `--json` | 에이전트용 JSON 출력 |
213
- | `--repo <repo>` | multi에서 대상 컴포넌트 지정 (예: `fe`, `be`, `worker`) |
216
+ | `--component <id>` | multi에서 대상 컴포넌트 지정 (예: `fe`, `be`, `worker`) |
214
217
  | `--all` | 자동 감지 실패 시 완료된 Feature까지 포함해서 표시 |
215
218
  | `--done` | 완료(workflow-done) Feature만 표시 |
216
- | `--approve <reply>` | 라벨 승인 응답 (`A` 또는 `A OK`)으로 단일 옵션 선택 |
217
- | `--execute` | `--approve`로 선택한 옵션이 command일 때 1개만 실행 |
219
+ | `--approve <reply>` | 라벨 포함 승인 응답으로 단일 옵션 선택 (예: `A`, `A OK`, `A 진행해`) |
220
+ | `--ticket <token>` | `--approve` 결과에서 받은 1회용 실행 티켓 (`requiresUserCheck=true` 옵션에서 필요) |
221
+ | `--execute` | 승인된 command 옵션 1개만 실행 (`requiresUserCheck=true`면 `--ticket` 필요) |
218
222
  | `--execute-strict` | `--execute`와 함께 사용 시 instruction-only 옵션이면 실패 |
219
223
 
220
- `--json` 출력에는 다음 액션이 `actions` 배열로 포함됩니다.
224
+ **티켓(approval ticket)이란?**
225
+
226
+ - `--approve`로 라벨을 승인할 때 CLI가 발급하는 1회용 실행 토큰입니다.
227
+ - 선택한 액션이 `requiresUserCheck=true`인 경우에만 `--execute`에서 `--ticket`이 필요합니다.
228
+ - 발급 후 짧은 시간(기본 5분)만 유효하며, 한 번 사용하면 재사용할 수 없습니다.
229
+
230
+ `context --json` 출력은 크게 `actions`(원자 액션), `actionOptions`(라벨 매핑), 상위 메타데이터로 구성됩니다.
231
+
232
+ **핵심 필드 (실사용 권장)**
233
+
234
+ - `status`/`reasonCode`: 현재 상태와 이유 코드
235
+ - `actions[]`: 원자 액션 목록
236
+ - `type: "command"`: `scope`(project|docs), `cwd`, `cmd`, `category`, `operationType`, `requiresUserCheck`
237
+ - `type: "instruction"`: `message`, `category`, `operationType`, `requiresUserCheck`
238
+ - `actionOptions[]`: `label`(`A`, `B`, `C`...) + 실행 대상 `action` + 사용자 안내용 `summary`/`detail`/`approvalPrompt`
239
+ - `approvalRequest`: 승인 요청/실행에 바로 사용하는 안내 데이터 (`labels`, `approveCommand`, `executeCommand`, `options[]`)
240
+ - `requiredDocs`: 현재 액션 전에 읽어야 할 CLI 내장 문서 목록 (`id`, `command`)
241
+ - `checkPolicy`: 승인 검증 정책 (`token`, `acceptedTokens`, `tokenPattern`, `validLabels`, `contextVersion` 등)
242
+
243
+ **고급/참고 필드 (자동화 고급 시나리오 또는 디버깅용)**
221
244
 
222
- - `reasonCode`: 상태 이유 코드 (`SINGLE_MATCHED`, `MULTIPLE_ACTIVE_FEATURES` 등)
223
- - `type: "command"`: `scope`(project|docs), `cwd`, `cmd` 제공 (복사하여 붙여넣기 가능한 형태로 `cd ... && git ...` 형태로 출력)
224
- - `type: "instruction"`: 사람이 수행해야 하는 안내 메시지
225
- - `operationType`: 액션 성격 (`local` | `remote` | `manual`)
226
- - `actionOptions`: `label`(`A`, `B`, `C`...)과 해당 `action` 매핑 + `summary`/`approvalPrompt`(라벨 설명 템플릿)
227
- - `primaryActionLabel`/`primaryActionType`/`primaryActionCategory`/`primaryActionOperationType`: 첫 번째 원자 액션의 요약 메타데이터
228
245
  - `selectionFallback`: 자동 감지 실패 시 사용된 폴백 (`none` | `open_features` | `all_features` | `done_features`)
229
- - `category`: 액션 분류 (자동화/반자동용 `approval.mode: "category"`에서 사용)
230
- - `requiresUserCheck`: 사용자 확인 필요 여부 (에이전트는 **사용자 응답을 `<라벨>` 또는 `<라벨> OK` 형식(예: `A`, `A OK`)으로 제한**하는 것을 권장 / 설정의 `approval`로 오버라이드 가능)
246
+ - `primaryActionLabel`/`primaryActionType`/`primaryActionCategory`/`primaryActionOperationType`: 번째 원자 액션 요약 메타데이터
231
247
  - `workflowPolicy`: 현재 완료 조건 정책 (`mode`, `requireIssue`, `requireBranch`, `requirePr`, `requireReview`)
248
+ - `taskCommitGatePolicy`: 태스크 커밋 게이트 정책 (`off` | `warn` | `strict`)
232
249
  - `prePrReviewPolicy`: pre-PR 리뷰 정책 (`enabled`, `skills`, `fallback`, `blockOnFindings`)
233
- - `requiredDocs`: 현재 액션 전에 읽어야 할 CLI 내장 문서 목록 (`id`, `command`)
234
-
235
- 또한 `checkPolicy`가 포함되어, 에이전트가 사용자 확인 정책을 적용할 때 참고할 수 있습니다. (`docPath`, `hint`, `policyOnly`, `token: "<LABEL>"`, `acceptedTokens`, `tokenPattern`, `validLabels`, `requireExplanationBeforeApproval`, `requiredExplanationFields`, `contextVersion`, `config`)
236
250
 
237
251
  오류 응답(`status: "error"`)에는 `reasonCode`와 `suggestions`(라벨형 다음 동작: `A/B/C`)가 포함됩니다. (예: `INVALID_APPROVAL`, `CONTEXT_STALE`, `EXECUTION_FAILED`, `EXECUTION_NOT_COMMAND`)
238
252
 
@@ -269,18 +283,24 @@ npx lee-spec-kit view --json
269
283
  | 옵션 | 설명 |
270
284
  | --------------- | ----------------------------------------------- |
271
285
  | `--json` | 에이전트용 JSON 출력 |
272
- | `--repo <repo>` | multi에서 대상 컴포넌트 지정 (예: `fe`, `be`, `worker`) |
286
+ | `--component <id>` | multi에서 대상 컴포넌트 지정 (예: `fe`, `be`, `worker`) |
273
287
  | `--all` | 자동 감지 실패 시 완료된 Feature까지 포함해서 표시 |
274
288
  | `--done` | 완료(workflow-done) Feature만 표시 |
275
289
 
276
290
  ### Flow 오케스트레이션
277
291
 
278
292
  ```bash
293
+ # 워크플로우 요약 (context + status + doctor)
279
294
  npx lee-spec-kit flow
280
- npx lee-spec-kit flow F001 --approve A
281
- npx lee-spec-kit flow F001 --approve "A OK" --execute
282
- npx lee-spec-kit flow --strict
295
+
296
+ # 승인 + 실행 (에이전트 기본 실행 경로)
297
+ npx lee-spec-kit flow F001 --approve A --execute
298
+
299
+ # 에이전트 파이프라인용 JSON
283
300
  npx lee-spec-kit flow --json
301
+
302
+ # 엄격 검사(선택)
303
+ npx lee-spec-kit flow --strict
284
304
  ```
285
305
 
286
306
  **옵션:**
@@ -288,11 +308,11 @@ npx lee-spec-kit flow --json
288
308
  | 옵션 | 설명 |
289
309
  | ------------------ | ---- |
290
310
  | `--json` | 에이전트용 JSON 출력 |
291
- | `--repo <repo>` | multi에서 대상 컴포넌트 지정 (예: `fe`, `be`, `worker`) |
311
+ | `--component <id>` | multi에서 대상 컴포넌트 지정 (예: `fe`, `be`, `worker`) |
292
312
  | `--all` | 자동 감지 실패 시 완료된 Feature까지 포함해서 표시 |
293
313
  | `--done` | 완료(workflow-done) Feature만 표시 |
294
- | `--approve <reply>`| context 라벨 승인 응답 전달 (`A` 또는 `A OK`) |
295
- | `--execute` | 승인한 옵션이 command일 때 실행 |
314
+ | `--approve <reply>`| context 라벨 승인 응답 전달 (예: `A`, `A OK`, `A 진행해`) |
315
+ | `--execute` | 승인한 옵션이 command일 때 실행 (`requiresUserCheck=true`면 티켓 연동, 아니면 티켓 없이 실행) |
296
316
  | `--execute-strict` | `--execute`와 함께 사용 시 instruction-only 옵션이면 실패 |
297
317
  | `--strict` | `status --strict`, `doctor --strict`까지 함께 검사 |
298
318
 
@@ -396,6 +416,7 @@ npx lee-spec-kit doctor --decisions-placeholders warn
396
416
 
397
417
  기본 동작은 `docs/` 작업트리에 변경사항이 없을 때만 업데이트를 진행하며, 이 경우 변경된 파일은 확인 없이 덮어씁니다.
398
418
  변경사항이 있는 상태에서 업데이트하려면 `--force`를 사용하세요.
419
+ 또한 `update`는 `.lee-spec-kit.json`의 누락 필드를 현재 기본 정책으로 보강합니다. (예: `workflow.taskCommitGate: "strict"`)
399
420
 
400
421
  ```bash
401
422
  # 전체 업데이트
@@ -433,6 +454,7 @@ npx lee-spec-kit update --force
433
454
  "workflow": {
434
455
  "mode": "github",
435
456
  "codeDirtyScope": "auto",
457
+ "taskCommitGate": "strict",
436
458
  "prePrReview": { "skills": ["code-review-excellence"] }
437
459
  },
438
460
  "pr": { "screenshots": { "upload": false } },
@@ -451,7 +473,7 @@ npx lee-spec-kit update --force
451
473
  | `pushDocs` | (standalone만) docs 레포를 별도 Git으로 관리/푸시할지 여부 |
452
474
  | `docsRemote` | (standalone+pushDocs) docs 레포 remote URL |
453
475
  | `projectRoot` | (standalone만) 프로젝트 레포지토리 경로 (single: string, multi: `{ [component]: path }`) |
454
- | `workflow` | (선택) 워크플로우 요구사항 정책 (`github`/`local`, `codeDirtyScope`, `prePrReview`) |
476
+ | `workflow` | (선택) 워크플로우 요구사항 정책 (`github`/`local`, `codeDirtyScope`, `taskCommitGate`, `prePrReview`) |
455
477
  | `pr` | (선택) PR 결과물 정책 (예: 스크린샷 업로드 여부) |
456
478
  | `approval` | (선택) `context` 출력의 `[확인 필요]`/`requiresUserCheck` 정책 오버라이드 (자동화/반자동용) |
457
479
 
@@ -467,11 +489,11 @@ npx lee-spec-kit update --force
467
489
  - 텍스트 출력의 `[확인 필요]` 표시
468
490
  - `context --json`의 `actions[].requiresUserCheck`
469
491
  - `checkPolicy.token` (`context --json`): 승인 토큰 형식 (`<LABEL>`)
470
- - `checkPolicy.acceptedTokens`: 허용되는 승인 응답 템플릿 (예: `["<LABEL>", "<LABEL> OK"]`)
492
+ - `checkPolicy.acceptedTokens`: 허용되는 승인 응답 템플릿 (예: `["<LABEL>", "<LABEL> OK", "<LABEL> ...", "... <LABEL> ..."]`)
471
493
  - `checkPolicy.tokenPattern`: 승인 응답 검증용 정규식
472
494
  - `checkPolicy.validLabels`: 현재 선택 가능한 라벨 목록 (`A`, `B`, `C`...)
473
495
  - `checkPolicy.requireExplanationBeforeApproval`: 승인 요청 전에 라벨별 설명을 포함해야 함
474
- - `checkPolicy.requiredExplanationFields`: 라벨 설명에 사용할 필드 목록 (예: `actionOptions[].summary`)
496
+ - `checkPolicy.requiredExplanationFields`: 라벨 설명에 사용할 필드 목록 (예: `actionOptions[].detail`)
475
497
  - `checkPolicy.contextVersion`: stale context 검증용 스냅샷 해시
476
498
 
477
499
  > 실제 명령 실행을 강제/차단하는 기능은 아닙니다. (에이전트가 참고하도록 신호를 제공)
@@ -489,6 +511,11 @@ npx lee-spec-kit update --force
489
511
  - `auto`: `single => repo`, `multi => component`
490
512
  - `workflow.componentPaths`(선택): component 판정 경로를 컴포넌트별로 명시 (예: `"web": ["apps/web", "packages/web-ui"]`)
491
513
  - 하위 호환: 값이 없으면 기존 동작인 `repo`로 처리
514
+ - `workflow.taskCommitGate`:
515
+ - `strict`: 다음 TODO로 넘어가기 전에 `1 태스크 = 1 커밋` 점검 실패 시 차단
516
+ - `warn`: 점검 실패 시 경고만 표시하고 진행 허용
517
+ - `off`: 점검 비활성화
518
+ - 하위 호환: 값이 없으면 `warn`으로 처리
492
519
  - `workflow.prePrReview`:
493
520
  - `enabled` (선택): pre-PR 리뷰 단계를 강제할지 여부 (기본: `requirePr`와 동일)
494
521
  - `skills` (선택): 우선순위 스킬 목록 (기본: `["code-review-excellence"]`)
@@ -502,6 +529,7 @@ npx lee-spec-kit update --force
502
529
  "workflow": {
503
530
  "mode": "github",
504
531
  "codeDirtyScope": "auto",
532
+ "taskCommitGate": "strict",
505
533
  "prePrReview": {
506
534
  "skills": ["code-review-excellence"],
507
535
  "fallback": "builtin-checklist",
@@ -595,12 +623,12 @@ npx lee-spec-kit config --project-root /new/path
595
623
  npx lee-spec-kit config --dir ./docs2 --project-root /new/path
596
624
 
597
625
  # projectRoot 수정 (Multi)
598
- npx lee-spec-kit config --project-root /new/fe/path --repo fe
599
- npx lee-spec-kit config --project-root /new/be/path --repo be
626
+ npx lee-spec-kit config --project-root /new/fe/path --component fe
627
+ npx lee-spec-kit config --project-root /new/be/path --component be
600
628
  npx lee-spec-kit config --project-root /new/worker/path --component worker
601
629
 
602
630
  # 비대화형 모드 (필수 옵션 누락 시 즉시 실패)
603
- npx lee-spec-kit config --project-root /new/fe/path --repo fe --non-interactive
631
+ npx lee-spec-kit config --project-root /new/fe/path --component fe --non-interactive
604
632
  ```
605
633
 
606
634
  **옵션:**
@@ -609,7 +637,6 @@ npx lee-spec-kit config --project-root /new/fe/path --repo fe --non-interactive
609
637
  | -------------------- | ---- |
610
638
  | `--dir <dir>` | 대상 docs 디렉터리 또는 프로젝트 경로 지정 |
611
639
  | `--project-root <path>` | projectRoot 경로 설정 |
612
- | `--repo <repo>` | multi 대상 컴포넌트(하위호환 alias) |
613
640
  | `--component <id>` | multi 대상 컴포넌트 |
614
641
  | `--non-interactive` | 사용자 입력이 필요하면 프롬프트 대신 즉시 실패 |
615
642
 
@@ -712,7 +739,7 @@ flowchart LR
712
739
  </details>
713
740
 
714
741
  <details>
715
- <summary><strong>Multi 프로젝트에서 --repo/--component 옵션이 동작하지 않습니다</strong></summary>
742
+ <summary><strong>Multi 프로젝트에서 --component 옵션이 동작하지 않습니다</strong></summary>
716
743
 
717
744
  - `.lee-spec-kit.json`의 `projectType`이 `multi`(또는 구버전 `fullstack`)인지 확인하세요
718
745
  - `.lee-spec-kit.json`의 `components` 목록에 해당 값이 포함되어 있는지 확인하세요