lee-spec-kit 0.5.0 → 0.5.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.
- package/README.en.md +47 -5
- package/README.md +49 -5
- package/dist/index.js +1120 -282
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -150,6 +150,7 @@ npx lee-spec-kit feature payment --id F123 --desc "Improve payment flow"
|
|
|
150
150
|
| `--id <id>` | Feature ID (`F001` format) | auto-generate |
|
|
151
151
|
| `-d, --desc <desc>` | Default purpose/description text for `spec.md` | empty string |
|
|
152
152
|
| `--non-interactive` | Fail immediately instead of prompting for user input | `false` |
|
|
153
|
+
| `--json` | JSON output (`featureId`, `featurePath`, `component`) | `false` |
|
|
153
154
|
|
|
154
155
|
### Context (agent guide)
|
|
155
156
|
|
|
@@ -202,9 +203,12 @@ npx lee-spec-kit context F001 --approve A --execute --execute-strict
|
|
|
202
203
|
`--json` output includes:
|
|
203
204
|
|
|
204
205
|
- `reasonCode`: status reason code (`SINGLE_MATCHED`, `MULTIPLE_ACTIVE_FEATURES`, etc.)
|
|
205
|
-
- `
|
|
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
|
+
- `selectionFallback`: fallback used when branch auto-detection does not match (`none` | `open_features` | `all_features` | `done_features`)
|
|
206
210
|
- `workflowPolicy`: current completion policy (`mode`, `requireIssue`, `requireBranch`, `requirePr`, `requireReview`)
|
|
207
|
-
- `checkPolicy`: approval validation policy (`token: "<LABEL>"`, `acceptedTokens`, `tokenPattern`, `validLabels`, `contextVersion`, ...)
|
|
211
|
+
- `checkPolicy`: approval validation policy (`hint`, `policyOnly`, `token: "<LABEL>"`, `acceptedTokens`, `tokenPattern`, `validLabels`, `requireExplanationBeforeApproval`, `requiredExplanationFields`, `contextVersion`, ...)
|
|
208
212
|
|
|
209
213
|
Error payloads (`status: "error"`) include `reasonCode` and labeled `suggestions` (`A/B/C`) (e.g. `INVALID_APPROVAL`, `CONTEXT_STALE`, `EXECUTION_FAILED`, `EXECUTION_NOT_COMMAND`).
|
|
210
214
|
|
|
@@ -249,6 +253,28 @@ npx lee-spec-kit flow --json
|
|
|
249
253
|
| `--execute-strict`| With `--execute`, fail if approved option is instruction-only |
|
|
250
254
|
| `--strict` | Also run `status --strict` and `doctor --strict` |
|
|
251
255
|
|
|
256
|
+
### GitHub helpers
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
# Generate issue body from selected feature
|
|
260
|
+
npx lee-spec-kit github issue F001
|
|
261
|
+
|
|
262
|
+
# Generate + create issue
|
|
263
|
+
npx lee-spec-kit github issue F001 --create --labels enhancement,frontend
|
|
264
|
+
|
|
265
|
+
# Generate PR body
|
|
266
|
+
npx lee-spec-kit github pr F001
|
|
267
|
+
|
|
268
|
+
# Generate + create PR + sync tasks.md metadata + merge with retry
|
|
269
|
+
npx lee-spec-kit github pr F001 --create --merge --labels enhancement,frontend
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
Key points:
|
|
273
|
+
- Issue/PR helpers validate required body sections and related docs paths.
|
|
274
|
+
- Labels are validated (at least one required).
|
|
275
|
+
- PR helper can sync `tasks.md` PR URL/PR Status automatically (`--no-sync-tasks` to skip).
|
|
276
|
+
- Merge includes retry and automatic head-branch refresh (fetch/rebase/force-push) on out-of-date failures.
|
|
277
|
+
|
|
252
278
|
### Status
|
|
253
279
|
|
|
254
280
|
```bash
|
|
@@ -286,8 +312,16 @@ npx lee-spec-kit doctor --strict
|
|
|
286
312
|
npx lee-spec-kit doctor --json
|
|
287
313
|
npx lee-spec-kit doctor --fix
|
|
288
314
|
npx lee-spec-kit doctor --fix --dry-run
|
|
315
|
+
npx lee-spec-kit doctor --decisions-placeholders off
|
|
316
|
+
npx lee-spec-kit doctor --decisions-placeholders info
|
|
317
|
+
npx lee-spec-kit doctor --decisions-placeholders warn
|
|
289
318
|
```
|
|
290
319
|
|
|
320
|
+
- `--decisions-placeholders <mode>`:
|
|
321
|
+
- `off`: ignore `decisions.md` placeholders
|
|
322
|
+
- `info` (default): include as informational findings (non-blocking)
|
|
323
|
+
- `warn`: treat as warnings
|
|
324
|
+
|
|
291
325
|
### Update templates
|
|
292
326
|
|
|
293
327
|
By default, `update` runs only when the `docs/` working tree is clean; in that case it overwrites changed files without prompting.
|
|
@@ -314,7 +348,7 @@ Running `init` creates `.lee-spec-kit.json` in your docs root (default: `docs/`)
|
|
|
314
348
|
"lang": "en",
|
|
315
349
|
"createdAt": "YYYY-MM-DD",
|
|
316
350
|
"docsRepo": "embedded",
|
|
317
|
-
"workflow": { "mode": "github" },
|
|
351
|
+
"workflow": { "mode": "github", "codeDirtyScope": "auto" },
|
|
318
352
|
"pr": { "screenshots": { "upload": false } },
|
|
319
353
|
"approval": { "mode": "builtin" }
|
|
320
354
|
}
|
|
@@ -331,7 +365,7 @@ Running `init` creates `.lee-spec-kit.json` in your docs root (default: `docs/`)
|
|
|
331
365
|
| `pushDocs` | (standalone only) whether to manage/push docs repo as a separate git repo |
|
|
332
366
|
| `docsRemote` | (standalone + pushDocs) docs repo remote URL |
|
|
333
367
|
| `projectRoot` | (standalone only) project repo path (single: string, multi: `{ [component]: path }`) |
|
|
334
|
-
| `workflow` | (optional) workflow completion policy (`github`/`local`) |
|
|
368
|
+
| `workflow` | (optional) workflow completion policy (`github`/`local`, `codeDirtyScope`) |
|
|
335
369
|
| `pr` | (optional) PR artifacts policy (e.g. screenshot upload) |
|
|
336
370
|
| `approval` | (optional) Override CHECK-required policy in `context` output (for automation/semi-auto) |
|
|
337
371
|
|
|
@@ -348,6 +382,8 @@ Running `init` creates `.lee-spec-kit.json` in your docs root (default: `docs/`)
|
|
|
348
382
|
- `checkPolicy.acceptedTokens`: accepted reply templates (e.g. `["<LABEL>", "<LABEL> OK"]`)
|
|
349
383
|
- `checkPolicy.tokenPattern`: input validation regex for approval replies
|
|
350
384
|
- `checkPolicy.validLabels`: currently selectable labels (`A`, `B`, `C`...)
|
|
385
|
+
- `checkPolicy.requireExplanationBeforeApproval`: require label-by-label explanation before asking approval
|
|
386
|
+
- `checkPolicy.requiredExplanationFields`: fields to use for explanation (e.g. `actionOptions[].summary`)
|
|
351
387
|
- `checkPolicy.contextVersion`: snapshot hash for stale-context validation
|
|
352
388
|
- `actionOptions`: maps `label` (`A`, `B`, `C`...) to each atomic `action`
|
|
353
389
|
- `workflowPolicy`: current completion policy (`mode`, `requireIssue`, `requireBranch`, `requirePr`, `requireReview`)
|
|
@@ -361,12 +397,18 @@ Running `init` creates `.lee-spec-kit.json` in your docs root (default: `docs/`)
|
|
|
361
397
|
- `workflow.mode: "github"` (default): issue/branch/PR/review are required in workflow completion
|
|
362
398
|
- `workflow.mode: "local"`: local-first workflow; issue/branch/PR/review are not required
|
|
363
399
|
- Feature templates generated in local mode minimize Issue/PR-focused sections by default.
|
|
400
|
+
- `workflow.codeDirtyScope`:
|
|
401
|
+
- `repo`: evaluate uncommitted code changes across the whole project repo
|
|
402
|
+
- `component`: evaluate only paths mapped to the current feature component (recommended for multi)
|
|
403
|
+
- `auto`: `single => repo`, `multi => component`
|
|
404
|
+
- `workflow.componentPaths` (optional): explicit per-component paths for component-scoped checks (e.g. `"web": ["apps/web", "packages/web-ui"]`)
|
|
405
|
+
- backward compatibility: if omitted, runtime defaults to `repo`
|
|
364
406
|
|
|
365
407
|
Example:
|
|
366
408
|
|
|
367
409
|
```json
|
|
368
410
|
{
|
|
369
|
-
"workflow": { "mode": "local" }
|
|
411
|
+
"workflow": { "mode": "local", "codeDirtyScope": "auto" }
|
|
370
412
|
}
|
|
371
413
|
```
|
|
372
414
|
|
package/README.md
CHANGED
|
@@ -166,6 +166,7 @@ npx lee-spec-kit feature payment --id F123 --desc "결제 플로우 개선"
|
|
|
166
166
|
| `--id <id>` | Feature ID (`F001` 형식) | 자동 생성 |
|
|
167
167
|
| `-d, --desc <desc>` | `spec.md`의 목적(설명) 기본 문구 | 빈 문자열 |
|
|
168
168
|
| `--non-interactive` | 사용자 입력이 필요하면 프롬프트 대신 즉시 실패 | `false` |
|
|
169
|
+
| `--json` | JSON 출력 (`featureId`, `featurePath`, `component`) | `false` |
|
|
169
170
|
|
|
170
171
|
### Context 확인 (AI 에이전트 가이드)
|
|
171
172
|
|
|
@@ -221,12 +222,15 @@ npx lee-spec-kit context F001 --approve A --execute --execute-strict
|
|
|
221
222
|
- `reasonCode`: 상태 이유 코드 (`SINGLE_MATCHED`, `MULTIPLE_ACTIVE_FEATURES` 등)
|
|
222
223
|
- `type: "command"`: `scope`(project|docs), `cwd`, `cmd` 제공 (복사하여 붙여넣기 가능한 형태로 `cd ... && git ...` 형태로 출력)
|
|
223
224
|
- `type: "instruction"`: 사람이 수행해야 하는 안내 메시지
|
|
224
|
-
- `
|
|
225
|
+
- `operationType`: 액션 성격 (`local` | `remote` | `manual`)
|
|
226
|
+
- `actionOptions`: `label`(`A`, `B`, `C`...)과 해당 `action` 매핑 + `summary`/`approvalPrompt`(라벨 설명 템플릿)
|
|
227
|
+
- `primaryActionLabel`/`primaryActionType`/`primaryActionCategory`/`primaryActionOperationType`: 첫 번째 원자 액션의 요약 메타데이터
|
|
228
|
+
- `selectionFallback`: 자동 감지 실패 시 사용된 폴백 (`none` | `open_features` | `all_features` | `done_features`)
|
|
225
229
|
- `category`: 액션 분류 (자동화/반자동용 `approval.mode: "category"`에서 사용)
|
|
226
230
|
- `requiresUserCheck`: 사용자 확인 필요 여부 (에이전트는 **사용자 응답을 `<라벨>` 또는 `<라벨> OK` 형식(예: `A`, `A OK`)으로 제한**하는 것을 권장 / 설정의 `approval`로 오버라이드 가능)
|
|
227
231
|
- `workflowPolicy`: 현재 완료 조건 정책 (`mode`, `requireIssue`, `requireBranch`, `requirePr`, `requireReview`)
|
|
228
232
|
|
|
229
|
-
또한 `checkPolicy`가 포함되어, 에이전트가 사용자 확인 정책을 적용할 때 참고할 수 있습니다. (`docPath`, `hint`, `token: "<LABEL>"`, `acceptedTokens`, `tokenPattern`, `validLabels`, `contextVersion`, `config`)
|
|
233
|
+
또한 `checkPolicy`가 포함되어, 에이전트가 사용자 확인 정책을 적용할 때 참고할 수 있습니다. (`docPath`, `hint`, `policyOnly`, `token: "<LABEL>"`, `acceptedTokens`, `tokenPattern`, `validLabels`, `requireExplanationBeforeApproval`, `requiredExplanationFields`, `contextVersion`, `config`)
|
|
230
234
|
|
|
231
235
|
오류 응답(`status: "error"`)에는 `reasonCode`와 `suggestions`(라벨형 다음 동작: `A/B/C`)가 포함됩니다. (예: `INVALID_APPROVAL`, `CONTEXT_STALE`, `EXECUTION_FAILED`, `EXECUTION_NOT_COMMAND`)
|
|
232
236
|
|
|
@@ -271,6 +275,28 @@ npx lee-spec-kit flow --json
|
|
|
271
275
|
| `--execute-strict` | `--execute`와 함께 사용 시 instruction-only 옵션이면 실패 |
|
|
272
276
|
| `--strict` | `status --strict`, `doctor --strict`까지 함께 검사 |
|
|
273
277
|
|
|
278
|
+
### GitHub helper
|
|
279
|
+
|
|
280
|
+
```bash
|
|
281
|
+
# 선택된 Feature 기준 Issue 본문 생성
|
|
282
|
+
npx lee-spec-kit github issue F001
|
|
283
|
+
|
|
284
|
+
# Issue 본문 생성 + 실제 Issue 생성
|
|
285
|
+
npx lee-spec-kit github issue F001 --create --labels enhancement,frontend
|
|
286
|
+
|
|
287
|
+
# PR 본문 생성
|
|
288
|
+
npx lee-spec-kit github pr F001
|
|
289
|
+
|
|
290
|
+
# PR 본문 생성 + PR 생성 + tasks.md 메타데이터 동기화 + merge 재시도
|
|
291
|
+
npx lee-spec-kit github pr F001 --create --merge --labels enhancement,frontend
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
핵심 동작:
|
|
295
|
+
- Issue/PR helper는 필수 섹션과 관련 문서 경로를 검증합니다.
|
|
296
|
+
- 라벨은 최소 1개 이상 필수입니다.
|
|
297
|
+
- PR helper는 기본적으로 `tasks.md`의 `PR`/`PR Status`를 동기화합니다. (`--no-sync-tasks`로 비활성화)
|
|
298
|
+
- merge 시 head 브랜치가 뒤쳐진 경우 fetch/rebase/force-push 후 재시도합니다.
|
|
299
|
+
|
|
274
300
|
### 상태 확인
|
|
275
301
|
|
|
276
302
|
```bash
|
|
@@ -327,8 +353,18 @@ npx lee-spec-kit doctor --fix
|
|
|
327
353
|
|
|
328
354
|
# 수정 예정 항목만 미리 확인 (파일 미변경)
|
|
329
355
|
npx lee-spec-kit doctor --fix --dry-run
|
|
356
|
+
|
|
357
|
+
# decisions.md 플레이스홀더 진단 레벨 조정
|
|
358
|
+
npx lee-spec-kit doctor --decisions-placeholders off
|
|
359
|
+
npx lee-spec-kit doctor --decisions-placeholders info
|
|
360
|
+
npx lee-spec-kit doctor --decisions-placeholders warn
|
|
330
361
|
```
|
|
331
362
|
|
|
363
|
+
- `--decisions-placeholders <mode>`
|
|
364
|
+
- `off`: `decisions.md` 플레이스홀더를 진단에서 제외
|
|
365
|
+
- `info` (기본): 정보 레벨로만 보고 (strict 실패 대상 아님)
|
|
366
|
+
- `warn`: 경고로 보고
|
|
367
|
+
|
|
332
368
|
### 템플릿 업데이트
|
|
333
369
|
|
|
334
370
|
기본 동작은 `docs/` 작업트리에 변경사항이 없을 때만 업데이트를 진행하며, 이 경우 변경된 파일은 확인 없이 덮어씁니다.
|
|
@@ -364,7 +400,7 @@ npx lee-spec-kit update --force
|
|
|
364
400
|
"lang": "ko",
|
|
365
401
|
"createdAt": "YYYY-MM-DD",
|
|
366
402
|
"docsRepo": "embedded",
|
|
367
|
-
"workflow": { "mode": "github" },
|
|
403
|
+
"workflow": { "mode": "github", "codeDirtyScope": "auto" },
|
|
368
404
|
"pr": { "screenshots": { "upload": false } },
|
|
369
405
|
"approval": { "mode": "builtin" }
|
|
370
406
|
}
|
|
@@ -381,7 +417,7 @@ npx lee-spec-kit update --force
|
|
|
381
417
|
| `pushDocs` | (standalone만) docs 레포를 별도 Git으로 관리/푸시할지 여부 |
|
|
382
418
|
| `docsRemote` | (standalone+pushDocs) docs 레포 remote URL |
|
|
383
419
|
| `projectRoot` | (standalone만) 프로젝트 레포지토리 경로 (single: string, multi: `{ [component]: path }`) |
|
|
384
|
-
| `workflow` | (선택) 워크플로우 요구사항 정책 (`github`/`local`) |
|
|
420
|
+
| `workflow` | (선택) 워크플로우 요구사항 정책 (`github`/`local`, `codeDirtyScope`) |
|
|
385
421
|
| `pr` | (선택) PR 결과물 정책 (예: 스크린샷 업로드 여부) |
|
|
386
422
|
| `approval` | (선택) `context` 출력의 `[확인 필요]`/`requiresUserCheck` 정책 오버라이드 (자동화/반자동용) |
|
|
387
423
|
|
|
@@ -400,6 +436,8 @@ npx lee-spec-kit update --force
|
|
|
400
436
|
- `checkPolicy.acceptedTokens`: 허용되는 승인 응답 템플릿 (예: `["<LABEL>", "<LABEL> OK"]`)
|
|
401
437
|
- `checkPolicy.tokenPattern`: 승인 응답 검증용 정규식
|
|
402
438
|
- `checkPolicy.validLabels`: 현재 선택 가능한 라벨 목록 (`A`, `B`, `C`...)
|
|
439
|
+
- `checkPolicy.requireExplanationBeforeApproval`: 승인 요청 전에 라벨별 설명을 포함해야 함
|
|
440
|
+
- `checkPolicy.requiredExplanationFields`: 라벨 설명에 사용할 필드 목록 (예: `actionOptions[].summary`)
|
|
403
441
|
- `checkPolicy.contextVersion`: stale context 검증용 스냅샷 해시
|
|
404
442
|
|
|
405
443
|
> 실제 명령 실행을 강제/차단하는 기능은 아닙니다. (에이전트가 참고하도록 신호를 제공)
|
|
@@ -411,12 +449,18 @@ npx lee-spec-kit update --force
|
|
|
411
449
|
- `workflow.mode: "github"` (기본): Issue/브랜치/PR/리뷰 단계를 포함한 전체 워크플로우를 완료 조건으로 사용
|
|
412
450
|
- `workflow.mode: "local"`: 로컬 중심 워크플로우로 동작하며 Issue/브랜치/PR/리뷰 단계를 필수로 요구하지 않음
|
|
413
451
|
- local 모드로 생성한 Feature 템플릿은 기본적으로 Issue/PR 중심 섹션을 축소합니다.
|
|
452
|
+
- `workflow.codeDirtyScope`:
|
|
453
|
+
- `repo`: 프로젝트 레포 전체 변경으로 코드 미커밋 여부를 판정
|
|
454
|
+
- `component`: 현재 Feature 컴포넌트 경로 변경만 판정 (multi 권장)
|
|
455
|
+
- `auto`: `single => repo`, `multi => component`
|
|
456
|
+
- `workflow.componentPaths`(선택): component 판정 경로를 컴포넌트별로 명시 (예: `"web": ["apps/web", "packages/web-ui"]`)
|
|
457
|
+
- 하위 호환: 값이 없으면 기존 동작인 `repo`로 처리
|
|
414
458
|
|
|
415
459
|
예시:
|
|
416
460
|
|
|
417
461
|
```json
|
|
418
462
|
{
|
|
419
|
-
"workflow": { "mode": "local" }
|
|
463
|
+
"workflow": { "mode": "local", "codeDirtyScope": "auto" }
|
|
420
464
|
}
|
|
421
465
|
```
|
|
422
466
|
|