lee-spec-kit 0.6.21 → 0.6.23

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 CHANGED
@@ -301,7 +301,7 @@ Use `context --json` only when full-detail debugging fields are required.
301
301
  - `primaryActionLabel` / `primaryActionType` / `primaryActionCategory` / `primaryActionOperationType`: summary metadata for the first atomic action
302
302
  - `workflowPolicy`: current completion policy (`mode`, `requireIssue`, `requireBranch`, `requirePr`, `requireReview`)
303
303
  - `taskCommitGatePolicy`: task commit gate policy (`off` | `warn` | `strict`)
304
- - `prePrReviewPolicy`: pre-PR review policy (`enabled`, `skills`, `fallback`, `blockOnFindings`, `minorPolicy`)
304
+ - `prePrReviewPolicy`: pre-PR review policy (`enabled`, `skills`, `fallback`)
305
305
 
306
306
  Error payloads (`status: "error"`) include `reasonCode` and labeled `suggestions` (`A/B/C`) (e.g. `INVALID_APPROVAL`, `CONTEXT_STALE`, `EXECUTION_FAILED`, `EXECUTION_NOT_COMMAND`).
307
307
 
@@ -351,6 +351,18 @@ npx lee-spec-kit flow
351
351
  # approve + execute (recommended agent path)
352
352
  npx lee-spec-kit flow F001 --approve A --execute
353
353
 
354
+ # auto-run: stop and wait for approval when one of target categories appears
355
+ npx lee-spec-kit flow F004 --auto-until-category pr_create,code_review,pr_status_update
356
+
357
+ # auto-run using preset
358
+ npx lee-spec-kit flow F004 --auto-preset pr-handoff
359
+
360
+ # auto-run + apply new request first (runs user_request_replan first)
361
+ npx lee-spec-kit flow F004 --request "promote issue 004 to F004 and proceed" --auto-until-category pr_create,code_review,pr_status_update
362
+
363
+ # with default preset configured, request-only auto mode is available
364
+ npx lee-spec-kit flow F004 --request "promote issue 004 to F004 and proceed"
365
+
354
366
  # JSON output for automation
355
367
  npx lee-spec-kit flow --json
356
368
 
@@ -366,11 +378,23 @@ npx lee-spec-kit flow --strict
366
378
  | `--component <id>`| Select target component in multi mode (e.g. `app`, `api`, `worker`) |
367
379
  | `--all` | Include completed features when auto-detecting |
368
380
  | `--done` | Show completed (workflow-done) features only |
381
+ | `--request <text>` | In auto mode, apply a new user request first (auto-selects `user_request_replan`) |
382
+ | `--auto-preset <name>` | Use a named auto preset (builtin: `pr-handoff`) |
383
+ | `--auto-until-category <categories>` | Auto-execute command actions until one of target categories appears (comma-separated) |
369
384
  | `--approve <reply>` | Pass through context label approval (e.g. `A`, `A OK`, `A proceed`) |
370
385
  | `--execute` | Execute approved option when it is a command (ticket is required only when `requiresUserCheck=true`) |
371
386
  | `--execute-strict`| With `--execute`, fail if approved option is instruction-only |
372
387
  | `--strict` | Also run `status --strict` and `doctor --strict` |
373
388
 
389
+ Auto gate mode rules:
390
+ - `<feature-name>` is required with auto mode (`--auto-until-category` / `--auto-preset`) (for example `F004`).
391
+ - Auto mode (`--auto-until-category` / `--auto-preset`) cannot be combined with `--approve` or `--execute`.
392
+ - `--request` requires auto mode.
393
+ - Exception: if `workflow.auto.defaultPreset` is configured, `--request` alone enables auto mode.
394
+ - Auto-run stops as `gate_reached` when a target category appears, then prints that step's approval text (`approvalRequest.userFacingLines`).
395
+ - If progress stalls (same context/action repeating), it stops with `AUTO_NO_PROGRESS`.
396
+ - In JSON mode, inspect `autoRun.status`, `autoRun.reasonCode`, `autoRun.gate`, and `autoRun.executions`.
397
+
374
398
  ### GitHub helpers
375
399
 
376
400
  ```bash
@@ -516,6 +540,10 @@ Running `init` creates `.lee-spec-kit.json` in your docs root (default: `docs/`)
516
540
  - `checkPolicy.acceptedTokens`: accepted reply templates (e.g. `["<LABEL>", "<LABEL> OK", "<LABEL> ...", "... <LABEL> ..."]`)
517
541
  - `checkPolicy.tokenPattern`: input validation regex for approval replies
518
542
  - `checkPolicy.validLabels`: currently selectable labels (`A`, `B`, `C`...)
543
+ - `checkPolicy.activeCategories`: categories currently present in actions (from `actionOptions[].category`)
544
+ - `checkPolicy.knownCategories`: full category list recognized by the CLI
545
+ - `checkPolicy.uncategorizedLabels`: labels with missing category (should normally be empty)
546
+ - `checkPolicy.categoryPolicyGuidance`: guidance for matching categories in `approval.mode="category"`
519
547
  - `checkPolicy.requireExplanationBeforeApproval`: require label-by-label explanation before asking approval
520
548
  - `checkPolicy.requiredExplanationFields`: fields to use for explanation (e.g. `actionOptions[].detail`)
521
549
  - `checkPolicy.contextVersion`: snapshot hash for stale-context validation
@@ -548,8 +576,11 @@ Running `init` creates `.lee-spec-kit.json` in your docs root (default: `docs/`)
548
576
  - `skills` (optional): preferred skill names in priority order (default: `["code-review-excellence"]`)
549
577
  - `fallback` (optional): baseline review policy (default: `"builtin-checklist"`)
550
578
  - Use the `Pre-PR Baseline Checklist` section in `docs get create-pr --json` as the single source of truth
551
- - `blockOnFindings` (optional): require major findings to be resolved/aligned before PR creation (default: `true`)
552
- - `minorPolicy` (optional): minor findings policy (`warn` | `block`, default: `warn`)
579
+ - `workflow.auto`:
580
+ - `defaultPreset` (optional): default auto preset used by `flow --request "<text>"` (default: `"pr-handoff"`)
581
+ - `defaultUntilCategories` (optional): default gate categories (takes precedence over `defaultPreset`)
582
+ - `presets` (optional): custom preset map
583
+ - Example: `"my-handoff": ["pr_create", "code_review"]`
553
584
 
554
585
  Example:
555
586
 
@@ -559,11 +590,15 @@ Example:
559
590
  "mode": "github",
560
591
  "codeDirtyScope": "auto",
561
592
  "taskCommitGate": "warn",
593
+ "auto": {
594
+ "defaultPreset": "pr-handoff",
595
+ "presets": {
596
+ "my-handoff": ["pr_create", "code_review", "pr_status_update"]
597
+ }
598
+ },
562
599
  "prePrReview": {
563
600
  "skills": ["code-review-excellence"],
564
- "fallback": "builtin-checklist",
565
- "blockOnFindings": true,
566
- "minorPolicy": "warn"
601
+ "fallback": "builtin-checklist"
567
602
  }
568
603
  }
569
604
  }
@@ -581,6 +616,9 @@ Example:
581
616
  - `requireCheckCategories` (`category` only): categories that **always** require CHECK (e.g. `["pr_create"]`, `["*"]`)
582
617
  - `skipCheckCategories` (`category` only): categories that **never** require CHECK (e.g. `["docs_commit"]`, `["*"]`)
583
618
  - `requireCheckSteps` (`steps` only): step numbers that require CHECK (e.g. `[3, 5, 12]`)
619
+ - `taskExecuteCheck` (optional): `task_execute` approval policy (`both` | `start_only`, default: `both`)
620
+ - `both`: require approval for both TODO→DOING and DOING→DONE transitions
621
+ - `start_only`: require approval only for TODO→DOING, skip default approval for DOING→DONE
584
622
 
585
623
  #### category examples
586
624
 
@@ -600,7 +638,7 @@ Example:
600
638
  }
601
639
  ```
602
640
 
603
- > To discover available `category` values, check `actionOptions[].category` in `context --json-compact` first, and use `actions[].category` in `context --json` when needed.
641
+ > Discover category values from `context --json`/`--json-compact` using `checkPolicy.activeCategories` (current), `checkPolicy.knownCategories` (full), and `actionOptions[].category` (per-label).
604
642
 
605
643
  ### pr (PR artifacts policy)
606
644
 
package/README.md CHANGED
@@ -320,7 +320,7 @@ npx lee-spec-kit context F001 --approve A --execute --ticket <TICKET> --execute-
320
320
  - `primaryActionLabel`/`primaryActionType`/`primaryActionCategory`/`primaryActionOperationType`: 첫 번째 원자 액션 요약 메타데이터
321
321
  - `workflowPolicy`: 현재 완료 조건 정책 (`mode`, `requireIssue`, `requireBranch`, `requirePr`, `requireReview`)
322
322
  - `taskCommitGatePolicy`: 태스크 커밋 게이트 정책 (`off` | `warn` | `strict`)
323
- - `prePrReviewPolicy`: pre-PR 리뷰 정책 (`enabled`, `skills`, `fallback`, `blockOnFindings`, `minorPolicy`)
323
+ - `prePrReviewPolicy`: pre-PR 리뷰 정책 (`enabled`, `skills`, `fallback`)
324
324
 
325
325
  오류 응답(`status: "error"`)에는 `reasonCode`와 `suggestions`(라벨형 다음 동작: `A/B/C`)가 포함됩니다. (예: `INVALID_APPROVAL`, `CONTEXT_STALE`, `EXECUTION_FAILED`, `EXECUTION_NOT_COMMAND`)
326
326
 
@@ -370,6 +370,18 @@ npx lee-spec-kit flow
370
370
  # 승인 + 실행 (에이전트 기본 실행 경로)
371
371
  npx lee-spec-kit flow F001 --approve A --execute
372
372
 
373
+ # 자동 진행: 특정 category가 나오면 멈추고 사용자 승인 대기
374
+ npx lee-spec-kit flow F004 --auto-until-category pr_create,code_review,pr_status_update
375
+
376
+ # 자동 진행: preset 사용
377
+ npx lee-spec-kit flow F004 --auto-preset pr-handoff
378
+
379
+ # 자동 진행 + 새 요청 선반영(user_request_replan 우선 실행)
380
+ npx lee-spec-kit flow F004 --request "issue 004를 F004로 승격시켜서 진행해" --auto-until-category pr_create,code_review,pr_status_update
381
+
382
+ # 기본 preset 설정 시 더 짧게 실행 가능
383
+ npx lee-spec-kit flow F004 --request "issue 004를 F004로 승격시켜서 진행해"
384
+
373
385
  # 에이전트 파이프라인용 JSON
374
386
  npx lee-spec-kit flow --json
375
387
 
@@ -385,11 +397,23 @@ npx lee-spec-kit flow --strict
385
397
  | `--component <id>` | multi에서 대상 컴포넌트 지정 (예: `app`, `api`, `worker`) |
386
398
  | `--all` | 자동 감지 실패 시 완료된 Feature까지 포함해서 표시 |
387
399
  | `--done` | 완료(workflow-done) Feature만 표시 |
400
+ | `--request <text>` | auto 모드에서 새 사용자 요청을 먼저 반영 (`user_request_replan` 라벨 자동 선택) |
401
+ | `--auto-preset <name>` | 이름 기반 auto preset 사용 (기본 제공: `pr-handoff`) |
402
+ | `--auto-until-category <categories>` | command 액션을 자동 실행하다가 지정 category 중 하나가 나오면 중지 (쉼표 구분) |
388
403
  | `--approve <reply>`| context 라벨 승인 응답 전달 (예: `A`, `A OK`, `A 진행해`) |
389
404
  | `--execute` | 승인한 옵션이 command일 때 실행 (`requiresUserCheck=true`면 티켓 연동, 아니면 티켓 없이 실행) |
390
405
  | `--execute-strict` | `--execute`와 함께 사용 시 instruction-only 옵션이면 실패 |
391
406
  | `--strict` | `status --strict`, `doctor --strict`까지 함께 검사 |
392
407
 
408
+ 자동 게이트 모드 규칙:
409
+ - auto 모드(`--auto-until-category`/`--auto-preset`) 사용 시 `<feature-name>`은 필수입니다. (예: `F004`)
410
+ - auto 모드(`--auto-until-category`/`--auto-preset`)는 `--approve`, `--execute`와 함께 사용할 수 없습니다.
411
+ - `--request`는 auto 모드와 함께 사용해야 합니다.
412
+ - 예외적으로 `workflow.auto.defaultPreset`이 설정되어 있으면 `--request`만으로도 auto 모드가 활성화됩니다.
413
+ - 자동 진행은 지정한 category가 등장하면 `gate_reached`로 멈추고, 해당 단계의 승인 문구(`approvalRequest.userFacingLines`)를 그대로 출력합니다.
414
+ - 진행 정체(동일 context/action 반복)가 감지되면 `AUTO_NO_PROGRESS`로 중단됩니다.
415
+ - JSON 모드에서는 `autoRun.status`, `autoRun.reasonCode`, `autoRun.gate`, `autoRun.executions`로 상세 상태를 확인할 수 있습니다.
416
+
393
417
  ### GitHub helper
394
418
 
395
419
  ```bash
@@ -567,6 +591,10 @@ npx lee-spec-kit update --force
567
591
  - `checkPolicy.acceptedTokens`: 허용되는 승인 응답 템플릿 (예: `["<LABEL>", "<LABEL> OK", "<LABEL> ...", "... <LABEL> ..."]`)
568
592
  - `checkPolicy.tokenPattern`: 승인 응답 검증용 정규식
569
593
  - `checkPolicy.validLabels`: 현재 선택 가능한 라벨 목록 (`A`, `B`, `C`...)
594
+ - `checkPolicy.activeCategories`: 현재 액션에 실제 등장한 category 목록 (`actionOptions[].category` 기준)
595
+ - `checkPolicy.knownCategories`: CLI가 인식하는 전체 category 목록
596
+ - `checkPolicy.uncategorizedLabels`: category가 비어 있는 라벨 목록 (정상이라면 빈 배열)
597
+ - `checkPolicy.categoryPolicyGuidance`: `approval.mode="category"` 사용 시 category 매칭 기준 안내
570
598
  - `checkPolicy.requireExplanationBeforeApproval`: 승인 요청 전에 라벨별 설명을 포함해야 함
571
599
  - `checkPolicy.requiredExplanationFields`: 라벨 설명에 사용할 필드 목록 (예: `actionOptions[].detail`)
572
600
  - `checkPolicy.contextVersion`: stale context 검증용 스냅샷 해시
@@ -596,8 +624,11 @@ npx lee-spec-kit update --force
596
624
  - `skills` (선택): 우선순위 스킬 목록 (기본: `["code-review-excellence"]`)
597
625
  - `fallback` (선택): 기본 베이스라인 정책 (기본: `"builtin-checklist"`)
598
626
  - 상세 기준은 `docs get create-pr --json`의 `Pre-PR 기본 체크리스트` 섹션을 단일 기준으로 사용
599
- - `blockOnFindings` (선택): 주요 이슈 발견 시 PR 생성 전 해결/합의를 요구할지 여부 (기본: `true`)
600
- - `minorPolicy` (선택): minor 이슈 정책 (`warn` | `block`, 기본: `warn`)
627
+ - `workflow.auto`:
628
+ - `defaultPreset` (선택): `flow --request "<요청>"` 실행 기본으로 사용할 auto preset 이름 (기본: `"pr-handoff"`)
629
+ - `defaultUntilCategories` (선택): 기본 gate category 목록 (설정 시 `defaultPreset`보다 우선)
630
+ - `presets` (선택): 사용자 정의 preset 맵
631
+ - 예: `"my-handoff": ["pr_create", "code_review"]`
601
632
 
602
633
  예시:
603
634
 
@@ -607,11 +638,15 @@ npx lee-spec-kit update --force
607
638
  "mode": "github",
608
639
  "codeDirtyScope": "auto",
609
640
  "taskCommitGate": "warn",
641
+ "auto": {
642
+ "defaultPreset": "pr-handoff",
643
+ "presets": {
644
+ "my-handoff": ["pr_create", "code_review", "pr_status_update"]
645
+ }
646
+ },
610
647
  "prePrReview": {
611
648
  "skills": ["code-review-excellence"],
612
- "fallback": "builtin-checklist",
613
- "blockOnFindings": true,
614
- "minorPolicy": "warn"
649
+ "fallback": "builtin-checklist"
615
650
  }
616
651
  }
617
652
  }
@@ -629,6 +664,9 @@ npx lee-spec-kit update --force
629
664
  - `requireCheckCategories` (`category`만): 확인을 **항상** 요구할 category 목록 (예: `["pr_create"]`, `["*"]`)
630
665
  - `skipCheckCategories` (`category`만): 확인을 **절대** 요구하지 않을 category 목록 (예: `["docs_commit"]`, `["*"]`)
631
666
  - `requireCheckSteps` (`steps`만): 확인이 필요한 step 번호 목록 (예: `[3, 5, 12]`)
667
+ - `taskExecuteCheck` (선택): `task_execute` 확인 정책 (`both` | `start_only`, 기본: `both`)
668
+ - `both`: TODO→DOING, DOING→DONE 모두 승인 필요
669
+ - `start_only`: TODO→DOING만 승인 필요, DOING→DONE은 기본 승인 생략
632
670
 
633
671
  #### category 예시
634
672
 
@@ -648,7 +686,7 @@ npx lee-spec-kit update --force
648
686
  }
649
687
  ```
650
688
 
651
- > 사용 가능한 `category` 값은 `context --json-compact`의 `actionOptions[].category`에서 우선 확인하고, 필요 시 `context --json`의 `actions[].category`를 참고하세요.
689
+ > 사용 가능한 `category` 값은 `context --json`/`--json-compact`의 `checkPolicy.activeCategories`(현재), `checkPolicy.knownCategories`(전체), `actionOptions[].category`(라벨별)에서 확인하세요.
652
690
 
653
691
  ### pr (PR 결과물 정책)
654
692