lee-spec-kit 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +44 -5
- package/README.md +46 -5
- package/dist/index.js +1034 -63
- 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,9 @@ 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
|
-
- `actionOptions`: maps labels to atomic actions
|
|
206
|
+
- `actionOptions`: maps labels to atomic actions plus `summary`/`approvalPrompt` for user-facing label explanation
|
|
206
207
|
- `workflowPolicy`: current completion policy (`mode`, `requireIssue`, `requireBranch`, `requirePr`, `requireReview`)
|
|
207
|
-
- `checkPolicy`: approval validation policy (`token: "<LABEL>"`, `acceptedTokens`, `tokenPattern`, `validLabels`, `contextVersion`, ...)
|
|
208
|
+
- `checkPolicy`: approval validation policy (`token: "<LABEL>"`, `acceptedTokens`, `tokenPattern`, `validLabels`, `requireExplanationBeforeApproval`, `requiredExplanationFields`, `contextVersion`, ...)
|
|
208
209
|
|
|
209
210
|
Error payloads (`status: "error"`) include `reasonCode` and labeled `suggestions` (`A/B/C`) (e.g. `INVALID_APPROVAL`, `CONTEXT_STALE`, `EXECUTION_FAILED`, `EXECUTION_NOT_COMMAND`).
|
|
210
211
|
|
|
@@ -249,6 +250,28 @@ npx lee-spec-kit flow --json
|
|
|
249
250
|
| `--execute-strict`| With `--execute`, fail if approved option is instruction-only |
|
|
250
251
|
| `--strict` | Also run `status --strict` and `doctor --strict` |
|
|
251
252
|
|
|
253
|
+
### GitHub helpers
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
# Generate issue body from selected feature
|
|
257
|
+
npx lee-spec-kit github issue F001
|
|
258
|
+
|
|
259
|
+
# Generate + create issue
|
|
260
|
+
npx lee-spec-kit github issue F001 --create --labels enhancement,frontend
|
|
261
|
+
|
|
262
|
+
# Generate PR body
|
|
263
|
+
npx lee-spec-kit github pr F001
|
|
264
|
+
|
|
265
|
+
# Generate + create PR + sync tasks.md metadata + merge with retry
|
|
266
|
+
npx lee-spec-kit github pr F001 --create --merge --labels enhancement,frontend
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
Key points:
|
|
270
|
+
- Issue/PR helpers validate required body sections and related docs paths.
|
|
271
|
+
- Labels are validated (at least one required).
|
|
272
|
+
- PR helper can sync `tasks.md` PR URL/PR Status automatically (`--no-sync-tasks` to skip).
|
|
273
|
+
- Merge includes retry and automatic head-branch refresh (fetch/rebase/force-push) on out-of-date failures.
|
|
274
|
+
|
|
252
275
|
### Status
|
|
253
276
|
|
|
254
277
|
```bash
|
|
@@ -286,8 +309,16 @@ npx lee-spec-kit doctor --strict
|
|
|
286
309
|
npx lee-spec-kit doctor --json
|
|
287
310
|
npx lee-spec-kit doctor --fix
|
|
288
311
|
npx lee-spec-kit doctor --fix --dry-run
|
|
312
|
+
npx lee-spec-kit doctor --decisions-placeholders off
|
|
313
|
+
npx lee-spec-kit doctor --decisions-placeholders info
|
|
314
|
+
npx lee-spec-kit doctor --decisions-placeholders warn
|
|
289
315
|
```
|
|
290
316
|
|
|
317
|
+
- `--decisions-placeholders <mode>`:
|
|
318
|
+
- `off`: ignore `decisions.md` placeholders
|
|
319
|
+
- `info` (default): include as informational findings (non-blocking)
|
|
320
|
+
- `warn`: treat as warnings
|
|
321
|
+
|
|
291
322
|
### Update templates
|
|
292
323
|
|
|
293
324
|
By default, `update` runs only when the `docs/` working tree is clean; in that case it overwrites changed files without prompting.
|
|
@@ -314,7 +345,7 @@ Running `init` creates `.lee-spec-kit.json` in your docs root (default: `docs/`)
|
|
|
314
345
|
"lang": "en",
|
|
315
346
|
"createdAt": "YYYY-MM-DD",
|
|
316
347
|
"docsRepo": "embedded",
|
|
317
|
-
"workflow": { "mode": "github" },
|
|
348
|
+
"workflow": { "mode": "github", "codeDirtyScope": "auto" },
|
|
318
349
|
"pr": { "screenshots": { "upload": false } },
|
|
319
350
|
"approval": { "mode": "builtin" }
|
|
320
351
|
}
|
|
@@ -331,7 +362,7 @@ Running `init` creates `.lee-spec-kit.json` in your docs root (default: `docs/`)
|
|
|
331
362
|
| `pushDocs` | (standalone only) whether to manage/push docs repo as a separate git repo |
|
|
332
363
|
| `docsRemote` | (standalone + pushDocs) docs repo remote URL |
|
|
333
364
|
| `projectRoot` | (standalone only) project repo path (single: string, multi: `{ [component]: path }`) |
|
|
334
|
-
| `workflow` | (optional) workflow completion policy (`github`/`local`) |
|
|
365
|
+
| `workflow` | (optional) workflow completion policy (`github`/`local`, `codeDirtyScope`) |
|
|
335
366
|
| `pr` | (optional) PR artifacts policy (e.g. screenshot upload) |
|
|
336
367
|
| `approval` | (optional) Override CHECK-required policy in `context` output (for automation/semi-auto) |
|
|
337
368
|
|
|
@@ -348,6 +379,8 @@ Running `init` creates `.lee-spec-kit.json` in your docs root (default: `docs/`)
|
|
|
348
379
|
- `checkPolicy.acceptedTokens`: accepted reply templates (e.g. `["<LABEL>", "<LABEL> OK"]`)
|
|
349
380
|
- `checkPolicy.tokenPattern`: input validation regex for approval replies
|
|
350
381
|
- `checkPolicy.validLabels`: currently selectable labels (`A`, `B`, `C`...)
|
|
382
|
+
- `checkPolicy.requireExplanationBeforeApproval`: require label-by-label explanation before asking approval
|
|
383
|
+
- `checkPolicy.requiredExplanationFields`: fields to use for explanation (e.g. `actionOptions[].summary`)
|
|
351
384
|
- `checkPolicy.contextVersion`: snapshot hash for stale-context validation
|
|
352
385
|
- `actionOptions`: maps `label` (`A`, `B`, `C`...) to each atomic `action`
|
|
353
386
|
- `workflowPolicy`: current completion policy (`mode`, `requireIssue`, `requireBranch`, `requirePr`, `requireReview`)
|
|
@@ -361,12 +394,18 @@ Running `init` creates `.lee-spec-kit.json` in your docs root (default: `docs/`)
|
|
|
361
394
|
- `workflow.mode: "github"` (default): issue/branch/PR/review are required in workflow completion
|
|
362
395
|
- `workflow.mode: "local"`: local-first workflow; issue/branch/PR/review are not required
|
|
363
396
|
- Feature templates generated in local mode minimize Issue/PR-focused sections by default.
|
|
397
|
+
- `workflow.codeDirtyScope`:
|
|
398
|
+
- `repo`: evaluate uncommitted code changes across the whole project repo
|
|
399
|
+
- `component`: evaluate only paths mapped to the current feature component (recommended for multi)
|
|
400
|
+
- `auto`: `single => repo`, `multi => component`
|
|
401
|
+
- `workflow.componentPaths` (optional): explicit per-component paths for component-scoped checks (e.g. `"web": ["apps/web", "packages/web-ui"]`)
|
|
402
|
+
- backward compatibility: if omitted, runtime defaults to `repo`
|
|
364
403
|
|
|
365
404
|
Example:
|
|
366
405
|
|
|
367
406
|
```json
|
|
368
407
|
{
|
|
369
|
-
"workflow": { "mode": "local" }
|
|
408
|
+
"workflow": { "mode": "local", "codeDirtyScope": "auto" }
|
|
370
409
|
}
|
|
371
410
|
```
|
|
372
411
|
|
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,12 @@ 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
|
-
- `actionOptions`: `label`(`A`, `B`, `C`...)과 해당 `action` 매핑
|
|
225
|
+
- `actionOptions`: `label`(`A`, `B`, `C`...)과 해당 `action` 매핑 + `summary`/`approvalPrompt`(라벨 설명 템플릿)
|
|
225
226
|
- `category`: 액션 분류 (자동화/반자동용 `approval.mode: "category"`에서 사용)
|
|
226
227
|
- `requiresUserCheck`: 사용자 확인 필요 여부 (에이전트는 **사용자 응답을 `<라벨>` 또는 `<라벨> OK` 형식(예: `A`, `A OK`)으로 제한**하는 것을 권장 / 설정의 `approval`로 오버라이드 가능)
|
|
227
228
|
- `workflowPolicy`: 현재 완료 조건 정책 (`mode`, `requireIssue`, `requireBranch`, `requirePr`, `requireReview`)
|
|
228
229
|
|
|
229
|
-
또한 `checkPolicy`가 포함되어, 에이전트가 사용자 확인 정책을 적용할 때 참고할 수 있습니다. (`docPath`, `hint`, `token: "<LABEL>"`, `acceptedTokens`, `tokenPattern`, `validLabels`, `contextVersion`, `config`)
|
|
230
|
+
또한 `checkPolicy`가 포함되어, 에이전트가 사용자 확인 정책을 적용할 때 참고할 수 있습니다. (`docPath`, `hint`, `token: "<LABEL>"`, `acceptedTokens`, `tokenPattern`, `validLabels`, `requireExplanationBeforeApproval`, `requiredExplanationFields`, `contextVersion`, `config`)
|
|
230
231
|
|
|
231
232
|
오류 응답(`status: "error"`)에는 `reasonCode`와 `suggestions`(라벨형 다음 동작: `A/B/C`)가 포함됩니다. (예: `INVALID_APPROVAL`, `CONTEXT_STALE`, `EXECUTION_FAILED`, `EXECUTION_NOT_COMMAND`)
|
|
232
233
|
|
|
@@ -271,6 +272,28 @@ npx lee-spec-kit flow --json
|
|
|
271
272
|
| `--execute-strict` | `--execute`와 함께 사용 시 instruction-only 옵션이면 실패 |
|
|
272
273
|
| `--strict` | `status --strict`, `doctor --strict`까지 함께 검사 |
|
|
273
274
|
|
|
275
|
+
### GitHub helper
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
# 선택된 Feature 기준 Issue 본문 생성
|
|
279
|
+
npx lee-spec-kit github issue F001
|
|
280
|
+
|
|
281
|
+
# Issue 본문 생성 + 실제 Issue 생성
|
|
282
|
+
npx lee-spec-kit github issue F001 --create --labels enhancement,frontend
|
|
283
|
+
|
|
284
|
+
# PR 본문 생성
|
|
285
|
+
npx lee-spec-kit github pr F001
|
|
286
|
+
|
|
287
|
+
# PR 본문 생성 + PR 생성 + tasks.md 메타데이터 동기화 + merge 재시도
|
|
288
|
+
npx lee-spec-kit github pr F001 --create --merge --labels enhancement,frontend
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
핵심 동작:
|
|
292
|
+
- Issue/PR helper는 필수 섹션과 관련 문서 경로를 검증합니다.
|
|
293
|
+
- 라벨은 최소 1개 이상 필수입니다.
|
|
294
|
+
- PR helper는 기본적으로 `tasks.md`의 `PR`/`PR Status`를 동기화합니다. (`--no-sync-tasks`로 비활성화)
|
|
295
|
+
- merge 시 head 브랜치가 뒤쳐진 경우 fetch/rebase/force-push 후 재시도합니다.
|
|
296
|
+
|
|
274
297
|
### 상태 확인
|
|
275
298
|
|
|
276
299
|
```bash
|
|
@@ -327,8 +350,18 @@ npx lee-spec-kit doctor --fix
|
|
|
327
350
|
|
|
328
351
|
# 수정 예정 항목만 미리 확인 (파일 미변경)
|
|
329
352
|
npx lee-spec-kit doctor --fix --dry-run
|
|
353
|
+
|
|
354
|
+
# decisions.md 플레이스홀더 진단 레벨 조정
|
|
355
|
+
npx lee-spec-kit doctor --decisions-placeholders off
|
|
356
|
+
npx lee-spec-kit doctor --decisions-placeholders info
|
|
357
|
+
npx lee-spec-kit doctor --decisions-placeholders warn
|
|
330
358
|
```
|
|
331
359
|
|
|
360
|
+
- `--decisions-placeholders <mode>`
|
|
361
|
+
- `off`: `decisions.md` 플레이스홀더를 진단에서 제외
|
|
362
|
+
- `info` (기본): 정보 레벨로만 보고 (strict 실패 대상 아님)
|
|
363
|
+
- `warn`: 경고로 보고
|
|
364
|
+
|
|
332
365
|
### 템플릿 업데이트
|
|
333
366
|
|
|
334
367
|
기본 동작은 `docs/` 작업트리에 변경사항이 없을 때만 업데이트를 진행하며, 이 경우 변경된 파일은 확인 없이 덮어씁니다.
|
|
@@ -364,7 +397,7 @@ npx lee-spec-kit update --force
|
|
|
364
397
|
"lang": "ko",
|
|
365
398
|
"createdAt": "YYYY-MM-DD",
|
|
366
399
|
"docsRepo": "embedded",
|
|
367
|
-
"workflow": { "mode": "github" },
|
|
400
|
+
"workflow": { "mode": "github", "codeDirtyScope": "auto" },
|
|
368
401
|
"pr": { "screenshots": { "upload": false } },
|
|
369
402
|
"approval": { "mode": "builtin" }
|
|
370
403
|
}
|
|
@@ -381,7 +414,7 @@ npx lee-spec-kit update --force
|
|
|
381
414
|
| `pushDocs` | (standalone만) docs 레포를 별도 Git으로 관리/푸시할지 여부 |
|
|
382
415
|
| `docsRemote` | (standalone+pushDocs) docs 레포 remote URL |
|
|
383
416
|
| `projectRoot` | (standalone만) 프로젝트 레포지토리 경로 (single: string, multi: `{ [component]: path }`) |
|
|
384
|
-
| `workflow` | (선택) 워크플로우 요구사항 정책 (`github`/`local`) |
|
|
417
|
+
| `workflow` | (선택) 워크플로우 요구사항 정책 (`github`/`local`, `codeDirtyScope`) |
|
|
385
418
|
| `pr` | (선택) PR 결과물 정책 (예: 스크린샷 업로드 여부) |
|
|
386
419
|
| `approval` | (선택) `context` 출력의 `[확인 필요]`/`requiresUserCheck` 정책 오버라이드 (자동화/반자동용) |
|
|
387
420
|
|
|
@@ -400,6 +433,8 @@ npx lee-spec-kit update --force
|
|
|
400
433
|
- `checkPolicy.acceptedTokens`: 허용되는 승인 응답 템플릿 (예: `["<LABEL>", "<LABEL> OK"]`)
|
|
401
434
|
- `checkPolicy.tokenPattern`: 승인 응답 검증용 정규식
|
|
402
435
|
- `checkPolicy.validLabels`: 현재 선택 가능한 라벨 목록 (`A`, `B`, `C`...)
|
|
436
|
+
- `checkPolicy.requireExplanationBeforeApproval`: 승인 요청 전에 라벨별 설명을 포함해야 함
|
|
437
|
+
- `checkPolicy.requiredExplanationFields`: 라벨 설명에 사용할 필드 목록 (예: `actionOptions[].summary`)
|
|
403
438
|
- `checkPolicy.contextVersion`: stale context 검증용 스냅샷 해시
|
|
404
439
|
|
|
405
440
|
> 실제 명령 실행을 강제/차단하는 기능은 아닙니다. (에이전트가 참고하도록 신호를 제공)
|
|
@@ -411,12 +446,18 @@ npx lee-spec-kit update --force
|
|
|
411
446
|
- `workflow.mode: "github"` (기본): Issue/브랜치/PR/리뷰 단계를 포함한 전체 워크플로우를 완료 조건으로 사용
|
|
412
447
|
- `workflow.mode: "local"`: 로컬 중심 워크플로우로 동작하며 Issue/브랜치/PR/리뷰 단계를 필수로 요구하지 않음
|
|
413
448
|
- local 모드로 생성한 Feature 템플릿은 기본적으로 Issue/PR 중심 섹션을 축소합니다.
|
|
449
|
+
- `workflow.codeDirtyScope`:
|
|
450
|
+
- `repo`: 프로젝트 레포 전체 변경으로 코드 미커밋 여부를 판정
|
|
451
|
+
- `component`: 현재 Feature 컴포넌트 경로 변경만 판정 (multi 권장)
|
|
452
|
+
- `auto`: `single => repo`, `multi => component`
|
|
453
|
+
- `workflow.componentPaths`(선택): component 판정 경로를 컴포넌트별로 명시 (예: `"web": ["apps/web", "packages/web-ui"]`)
|
|
454
|
+
- 하위 호환: 값이 없으면 기존 동작인 `repo`로 처리
|
|
414
455
|
|
|
415
456
|
예시:
|
|
416
457
|
|
|
417
458
|
```json
|
|
418
459
|
{
|
|
419
|
-
"workflow": { "mode": "local" }
|
|
460
|
+
"workflow": { "mode": "local", "codeDirtyScope": "auto" }
|
|
420
461
|
}
|
|
421
462
|
```
|
|
422
463
|
|