lee-spec-kit 0.6.7 → 0.6.9

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 (52) hide show
  1. package/README.en.md +88 -57
  2. package/README.md +94 -69
  3. package/dist/index.js +1255 -391
  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/issue-template.md +3 -3
  8. package/templates/en/common/agents/skills/create-feature.md +1 -0
  9. package/templates/en/common/agents/skills/create-pr.md +9 -9
  10. package/templates/en/common/agents/skills/execute-task.md +1 -0
  11. package/templates/en/{fullstack → common}/features/README.md +8 -16
  12. package/templates/en/{fullstack → common}/features/feature-base/decisions.md +3 -0
  13. package/templates/en/{fullstack → common}/features/feature-base/plan.md +1 -1
  14. package/templates/en/{fullstack → common}/features/feature-base/spec.md +1 -1
  15. package/templates/en/{fullstack → common}/features/feature-base/tasks.md +1 -1
  16. package/templates/en/common/ideas/README.md +1 -1
  17. package/templates/ko/{single → common}/README.md +9 -9
  18. package/templates/ko/common/agents/agents.md +78 -0
  19. package/templates/ko/common/agents/issue-template.md +3 -3
  20. package/templates/ko/common/agents/skills/create-feature.md +1 -0
  21. package/templates/ko/common/agents/skills/create-pr.md +9 -9
  22. package/templates/ko/common/agents/skills/execute-task.md +1 -0
  23. package/templates/ko/{fullstack → common}/features/README.md +7 -37
  24. package/templates/ko/{fullstack → common}/features/feature-base/decisions.md +3 -0
  25. package/templates/ko/{fullstack → common}/features/feature-base/plan.md +1 -1
  26. package/templates/ko/{fullstack → common}/features/feature-base/spec.md +1 -1
  27. package/templates/ko/{fullstack → common}/features/feature-base/tasks.md +1 -1
  28. package/templates/ko/common/ideas/README.md +1 -1
  29. package/templates/en/fullstack/README.md +0 -60
  30. package/templates/en/fullstack/agents/agents.md +0 -116
  31. package/templates/en/fullstack/features/be/README.md +0 -5
  32. package/templates/en/fullstack/features/fe/README.md +0 -5
  33. package/templates/en/fullstack/prd/README.md +0 -20
  34. package/templates/en/single/agents/agents.md +0 -103
  35. package/templates/en/single/features/README.md +0 -56
  36. package/templates/en/single/features/feature-base/decisions.md +0 -15
  37. package/templates/en/single/features/feature-base/plan.md +0 -48
  38. package/templates/en/single/features/feature-base/spec.md +0 -57
  39. package/templates/en/single/features/feature-base/tasks.md +0 -60
  40. package/templates/ko/fullstack/README.md +0 -60
  41. package/templates/ko/fullstack/agents/agents.md +0 -146
  42. package/templates/ko/fullstack/features/be/README.md +0 -5
  43. package/templates/ko/fullstack/features/fe/README.md +0 -5
  44. package/templates/ko/single/agents/agents.md +0 -116
  45. package/templates/ko/single/features/README.md +0 -56
  46. package/templates/ko/single/features/feature-base/decisions.md +0 -15
  47. package/templates/ko/single/features/feature-base/plan.md +0 -48
  48. package/templates/ko/single/features/feature-base/spec.md +0 -57
  49. package/templates/ko/single/features/feature-base/tasks.md +0 -60
  50. package/templates/ko/single/prd/README.md +0 -20
  51. /package/templates/en/{single → common}/prd/README.md +0 -0
  52. /package/templates/ko/{fullstack → common}/prd/README.md +0 -0
package/README.en.md CHANGED
@@ -67,7 +67,7 @@ npx lee-spec-kit doctor
67
67
  ### 🚀 Feature creation
68
68
 
69
69
  - Generates `spec.md`, `plan.md`, `tasks.md`, `decisions.md`
70
- - Multi mode supports flexible component separation (e.g. FE/BE/worker)
70
+ - Multi mode supports flexible component separation (e.g. app/api/worker)
71
71
  - Integrates Issue/PR templates (docs side)
72
72
 
73
73
  ### 📊 Status management
@@ -109,15 +109,14 @@ npx lee-spec-kit init --name my-project --type fullstack # alias
109
109
  | Option | Description | Default |
110
110
  | ------------------- | ------------------------------------------------------------------------------------------- | ------------------------------- |
111
111
  | `-n, --name <name>` | Project name | current folder |
112
- | `-t, --type <type>` | `single` or `multi` (`fullstack` alias supported) | interactive (`single` with `--yes`/`--non-interactive`) |
113
- | `--components <list>` | multi component list (comma-separated, e.g. `fe,be,worker`) | `fe,be` |
112
+ | `-t, --type <type>` | `single` or `multi` (`fullstack` alias supported) | interactive (`multi` with `--yes`/`--non-interactive`) |
113
+ | `--components <list>` | multi component list (comma-separated, e.g. `app,api,worker`) | `app` |
114
114
  | `-l, --lang <lang>` | `ko` or `en` | `en` |
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 | - |
119
- | `--fe-project-root <path>` | standalone(multi) frontend repo path | - |
120
- | `--be-project-root <path>` | standalone(multi) backend repo path | - |
118
+ | `--project-root <path>` | standalone(single) project repo path or standalone(multi) JSON map (`{"app":"/path/app","api":"/path/api"}`) | - |
119
+ | `--component-project-roots <pairs>` | standalone(multi) component roots (`app=/path/app,api=/path/api,worker=/path/worker`) | - |
121
120
  | `--push-docs` | enable standalone docs push (use with `--docs-remote`) | `false` |
122
121
  | `--docs-remote <url>` | standalone docs remote URL (used with `--push-docs`) | - |
123
122
  | `-y, --yes` | Skip most interactive inputs (overwrite confirmation still appears if target dir is not empty) | - |
@@ -126,6 +125,21 @@ npx lee-spec-kit init --name my-project --type fullstack # alias
126
125
 
127
126
  > 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
127
 
128
+ ### Project detection (agent entrypoint)
129
+
130
+ ```bash
131
+ # detect from current directory
132
+ npx lee-spec-kit detect
133
+
134
+ # JSON output for agents/automation
135
+ npx lee-spec-kit detect --json
136
+
137
+ # detect against a specific path
138
+ npx lee-spec-kit detect --dir /path/to/workspace
139
+ ```
140
+
141
+ The `--json` payload includes `isLeeSpecKitProject`, `reasonCode` (`PROJECT_DETECTED` | `PROJECT_NOT_DETECTED`), `docsDir`, `configPath`, and `detectionSource` (`config` | `heuristic`).
142
+
129
143
  ### Create a feature
130
144
 
131
145
  ```bash
@@ -133,8 +147,8 @@ npx lee-spec-kit init --name my-project --type fullstack # alias
133
147
  npx lee-spec-kit feature user-auth
134
148
 
135
149
  # Multi
136
- npx lee-spec-kit feature --repo be user-auth
137
- npx lee-spec-kit feature --repo fe user-profile
150
+ npx lee-spec-kit feature --component api user-auth
151
+ npx lee-spec-kit feature --component app user-profile
138
152
  npx lee-spec-kit feature --component worker queue-jobs
139
153
 
140
154
  # Specify Feature ID/description
@@ -145,7 +159,6 @@ npx lee-spec-kit feature payment --id F123 --desc "Improve payment flow"
145
159
 
146
160
  | Option | Description | Default |
147
161
  | ------------------- | ------------------------------------------- | ------------ |
148
- | `-r, --repo <repo>` | Multi target component (backward-compatible alias) | interactive |
149
162
  | `--component <id>` | Multi target component | interactive |
150
163
  | `--id <id>` | Feature ID (`F001` format) | auto-generate |
151
164
  | `-d, --desc <desc>` | Default purpose/description text for `spec.md` | empty string |
@@ -157,60 +170,64 @@ npx lee-spec-kit feature payment --id F123 --desc "Improve payment flow"
157
170
  For a single matched feature, next steps are always shown as `A/B/C` options.
158
171
 
159
172
  ```bash
160
- # Auto-detect (based on git branch)
173
+ # basic check (auto-detect from branch)
161
174
  npx lee-spec-kit context
162
175
 
163
- # Specify a feature
164
- npx lee-spec-kit context user-auth
165
-
166
- # Selector: Feature ID / folder name
176
+ # recommended: one feature + labels
167
177
  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
178
+ npx lee-spec-kit context F001 --json
180
179
 
181
- # approve a labeled option (validation only)
182
- npx lee-spec-kit context F001 --approve A
180
+ # approve + execute (common path)
181
+ npx lee-spec-kit context F001 --approve A --execute
183
182
 
184
- # approve + execute exactly one command option
185
- npx lee-spec-kit context F001 --approve "A OK" --execute
183
+ # include ticket only when selected action has `requiresUserCheck=true`
184
+ npx lee-spec-kit context F001 --approve A --execute --ticket <TICKET>
186
185
 
187
- # fail when the approved label is instruction-only
188
- npx lee-spec-kit context F001 --approve A --execute --execute-strict
186
+ # strict mode: fail if approved label is instruction-only
187
+ npx lee-spec-kit context F001 --approve A --execute --ticket <TICKET> --execute-strict
189
188
  ```
190
189
 
190
+ Use advanced selectors (`--component`, `--all`, `--done`) only when you need multi-scope filtering or exceptional fallback behavior.
191
+
191
192
  **Options:**
192
193
 
193
194
  | Option | Description |
194
195
  | -------------- | ----------------------------------------------- |
195
196
  | `--json` | JSON output for agents |
196
- | `--repo <repo>`| Select target component in multi mode (e.g. `fe`, `be`, `worker`) |
197
+ | `--component <id>` | Select target component in multi mode (e.g. `app`, `api`, `worker`) |
197
198
  | `--all` | Include completed features when auto-detecting |
198
199
  | `--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 |
200
+ | `--approve <reply>` | Approve one labeled option using any reply that includes a label token (e.g. `A`, `A OK`, `A proceed`) |
201
+ | `--ticket <token>` | One-time execution ticket from `--approve` (required when selected option has `requiresUserCheck=true`) |
202
+ | `--execute` | Execute only the approved option when it is a command (`--ticket` required only for check-required options) |
201
203
  | `--execute-strict` | With `--execute`, fail if the approved option is instruction-only |
202
204
 
203
- `--json` output includes:
205
+ **What is a ticket (approval ticket)?**
206
+
207
+ - A one-time execution token issued by the CLI when you approve a label via `--approve`.
208
+ - `--ticket` is required for `--execute` only when the selected action has `requiresUserCheck=true`.
209
+ - It is short-lived (5 minutes by default) and cannot be reused after one execution.
210
+
211
+ `context --json` is organized into `actions` (atomic actions), `actionOptions` (label mapping), and top-level metadata.
212
+
213
+ **Core fields (recommended for normal agent flows)**
214
+
215
+ - `status` / `reasonCode`: current state and reason code
216
+ - `actions[]`: atomic action list
217
+ - `type: "command"`: `scope` (project|docs), `cwd`, `cmd`, `category`, `operationType`, `requiresUserCheck`
218
+ - `type: "instruction"`: `message`, `category`, `operationType`, `requiresUserCheck`
219
+ - `actionOptions[]`: `label` (`A`, `B`, `C`...) + target `action` + user-facing `summary` / `detail` / `approvalPrompt`
220
+ - `approvalRequest`: ready-to-use approval/execute guidance (`labels`, `approveCommand`, `executeCommand`, `options[]`)
221
+ - `requiredDocs`: built-in docs to read before the current action (`id`, `command`)
222
+ - `checkPolicy`: approval validation policy (`token`, `acceptedTokens`, `tokenPattern`, `validLabels`, `contextVersion`, ...)
223
+
224
+ **Advanced/reference fields (automation edge cases or debugging)**
204
225
 
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
226
  - `selectionFallback`: fallback used when branch auto-detection does not match (`none` | `open_features` | `all_features` | `done_features`)
227
+ - `primaryActionLabel` / `primaryActionType` / `primaryActionCategory` / `primaryActionOperationType`: summary metadata for the first atomic action
210
228
  - `workflowPolicy`: current completion policy (`mode`, `requireIssue`, `requireBranch`, `requirePr`, `requireReview`)
229
+ - `taskCommitGatePolicy`: task commit gate policy (`off` | `warn` | `strict`)
211
230
  - `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
231
 
215
232
  Error payloads (`status: "error"`) include `reasonCode` and labeled `suggestions` (`A/B/C`) (e.g. `INVALID_APPROVAL`, `CONTEXT_STALE`, `EXECUTION_FAILED`, `EXECUTION_NOT_COMMAND`).
216
233
 
@@ -247,18 +264,24 @@ npx lee-spec-kit view --json
247
264
  | Option | Description |
248
265
  | -------------- | ----------------------------------------------- |
249
266
  | `--json` | JSON output for agents |
250
- | `--repo <repo>`| Select target component in multi mode (e.g. `fe`, `be`, `worker`) |
267
+ | `--component <id>` | Select target component in multi mode (e.g. `app`, `api`, `worker`) |
251
268
  | `--all` | Include completed features when auto-detecting |
252
269
  | `--done` | Show completed (workflow-done) features only |
253
270
 
254
271
  ### Flow
255
272
 
256
273
  ```bash
274
+ # workflow summary (context + status + doctor)
257
275
  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
276
+
277
+ # approve + execute (recommended agent path)
278
+ npx lee-spec-kit flow F001 --approve A --execute
279
+
280
+ # JSON output for automation
261
281
  npx lee-spec-kit flow --json
282
+
283
+ # strict checks (optional)
284
+ npx lee-spec-kit flow --strict
262
285
  ```
263
286
 
264
287
  **Options:**
@@ -266,11 +289,11 @@ npx lee-spec-kit flow --json
266
289
  | Option | Description |
267
290
  | ----------------- | ----------- |
268
291
  | `--json` | JSON output for agents |
269
- | `--repo <repo>` | Select target component in multi mode (e.g. `fe`, `be`, `worker`) |
292
+ | `--component <id>`| Select target component in multi mode (e.g. `app`, `api`, `worker`) |
270
293
  | `--all` | Include completed features when auto-detecting |
271
294
  | `--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 |
295
+ | `--approve <reply>` | Pass through context label approval (e.g. `A`, `A OK`, `A proceed`) |
296
+ | `--execute` | Execute approved option when it is a command (ticket is required only when `requiresUserCheck=true`) |
274
297
  | `--execute-strict`| With `--execute`, fail if approved option is instruction-only |
275
298
  | `--strict` | Also run `status --strict` and `doctor --strict` |
276
299
 
@@ -353,6 +376,7 @@ npx lee-spec-kit doctor --decisions-placeholders warn
353
376
 
354
377
  By default, `update` runs only when the `docs/` working tree is clean; in that case it overwrites changed files without prompting.
355
378
  If you want to update while you have uncommitted changes, use `--force`.
379
+ `update` also backfills missing `.lee-spec-kit.json` keys using current defaults (e.g. `workflow.taskCommitGate: "strict"`).
356
380
 
357
381
  ```bash
358
382
  npx lee-spec-kit update
@@ -381,6 +405,7 @@ Running `init` creates `.lee-spec-kit.json` in your docs root (default: `docs/`)
381
405
  "workflow": {
382
406
  "mode": "github",
383
407
  "codeDirtyScope": "auto",
408
+ "taskCommitGate": "strict",
384
409
  "prePrReview": { "skills": ["code-review-excellence"] }
385
410
  },
386
411
  "pr": { "screenshots": { "upload": false } },
@@ -392,14 +417,14 @@ Running `init` creates `.lee-spec-kit.json` in your docs root (default: `docs/`)
392
417
  | ------------- | ------------------------------------------------ |
393
418
  | `projectName` | Project name |
394
419
  | `projectType` | `single` or `multi` (`fullstack` alias supported) |
395
- | `components` | (multi only) component list (e.g. `["fe","be","worker"]`) |
420
+ | `components` | (multi only) component list (e.g. `["app","api","worker"]`) |
396
421
  | `lang` | `ko` or `en` |
397
422
  | `createdAt` | Creation date |
398
423
  | `docsRepo` | `embedded` or `standalone` |
399
424
  | `pushDocs` | (standalone only) whether to manage/push docs repo as a separate git repo |
400
425
  | `docsRemote` | (standalone + pushDocs) docs repo remote URL |
401
426
  | `projectRoot` | (standalone only) project repo path (single: string, multi: `{ [component]: path }`) |
402
- | `workflow` | (optional) workflow completion policy (`github`/`local`, `codeDirtyScope`, `prePrReview`) |
427
+ | `workflow` | (optional) workflow completion policy (`github`/`local`, `codeDirtyScope`, `taskCommitGate`, `prePrReview`) |
403
428
  | `pr` | (optional) PR artifacts policy (e.g. screenshot upload) |
404
429
  | `approval` | (optional) Override CHECK-required policy in `context` output (for automation/semi-auto) |
405
430
 
@@ -413,14 +438,15 @@ Running `init` creates `.lee-spec-kit.json` in your docs root (default: `docs/`)
413
438
  - the `[CHECK required]` tag in text output
414
439
  - `actions[].requiresUserCheck` in `context --json`
415
440
  - `checkPolicy.token` (`context --json`): approval token format (`<LABEL>`)
416
- - `checkPolicy.acceptedTokens`: accepted reply templates (e.g. `["<LABEL>", "<LABEL> OK"]`)
441
+ - `checkPolicy.acceptedTokens`: accepted reply templates (e.g. `["<LABEL>", "<LABEL> OK", "<LABEL> ...", "... <LABEL> ..."]`)
417
442
  - `checkPolicy.tokenPattern`: input validation regex for approval replies
418
443
  - `checkPolicy.validLabels`: currently selectable labels (`A`, `B`, `C`...)
419
444
  - `checkPolicy.requireExplanationBeforeApproval`: require label-by-label explanation before asking approval
420
- - `checkPolicy.requiredExplanationFields`: fields to use for explanation (e.g. `actionOptions[].summary`)
445
+ - `checkPolicy.requiredExplanationFields`: fields to use for explanation (e.g. `actionOptions[].detail`)
421
446
  - `checkPolicy.contextVersion`: snapshot hash for stale-context validation
422
447
  - `actionOptions`: maps `label` (`A`, `B`, `C`...) to each atomic `action`
423
448
  - `workflowPolicy`: current completion policy (`mode`, `requireIssue`, `requireBranch`, `requirePr`, `requireReview`)
449
+ - `taskCommitGatePolicy`: task commit gate policy (`off` | `warn` | `strict`)
424
450
 
425
451
  > This does not enforce/deny execution by itself; it’s a signal for agents.
426
452
  > If `approval` is omitted, it behaves as `builtin`. (No migration required)
@@ -437,6 +463,11 @@ Running `init` creates `.lee-spec-kit.json` in your docs root (default: `docs/`)
437
463
  - `auto`: `single => repo`, `multi => component`
438
464
  - `workflow.componentPaths` (optional): explicit per-component paths for component-scoped checks (e.g. `"web": ["apps/web", "packages/web-ui"]`)
439
465
  - backward compatibility: if omitted, runtime defaults to `repo`
466
+ - `workflow.taskCommitGate`:
467
+ - `strict`: block moving to next TODO when the `1 task = 1 commit` check fails
468
+ - `warn`: show warning but allow progress
469
+ - `off`: disable the check
470
+ - backward compatibility: if omitted, runtime defaults to `warn`
440
471
  - `workflow.prePrReview`:
441
472
  - `enabled` (optional): enforce pre-PR review stage (default: same as `requirePr`)
442
473
  - `skills` (optional): preferred skill names in priority order (default: `["code-review-excellence"]`)
@@ -450,6 +481,7 @@ Example:
450
481
  "workflow": {
451
482
  "mode": "github",
452
483
  "codeDirtyScope": "auto",
484
+ "taskCommitGate": "strict",
453
485
  "prePrReview": {
454
486
  "skills": ["code-review-excellence"],
455
487
  "fallback": "builtin-checklist",
@@ -510,12 +542,12 @@ npx lee-spec-kit config --project-root /new/path
510
542
  npx lee-spec-kit config --dir ./docs2 --project-root /new/path
511
543
 
512
544
  # 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
545
+ npx lee-spec-kit config --project-root /new/app/path --component app
546
+ npx lee-spec-kit config --project-root /new/api/path --component api
515
547
  npx lee-spec-kit config --project-root /new/worker/path --component worker
516
548
 
517
549
  # 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
550
+ npx lee-spec-kit config --project-root /new/app/path --component app --non-interactive
519
551
  ```
520
552
 
521
553
  **Options:**
@@ -524,7 +556,6 @@ npx lee-spec-kit config --project-root /new/fe/path --repo fe --non-interactive
524
556
  | --- | --- |
525
557
  | `--dir <dir>` | Target docs directory or project path |
526
558
  | `--project-root <path>` | Set projectRoot path |
527
- | `--repo <repo>` | Target component in multi mode (backward-compatible alias) |
528
559
  | `--component <id>` | Target component in multi mode |
529
560
  | `--non-interactive` | Fail immediately instead of prompting for user input |
530
561