lee-spec-kit 0.6.24 → 0.6.26

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
@@ -294,6 +294,7 @@ Use `context --json` only when full-detail debugging fields are required.
294
294
  - `approvalRequest`: ready-to-use approval/execute guidance (`labels`, `approveCommand`, `executeCommand`, `options[]`)
295
295
  - `requiredDocs`: built-in docs to read before the current action (`id`, `command`)
296
296
  - `checkPolicy`: approval validation policy (`token`, `acceptedTokens`, `tokenPattern`, `validLabels`, `contextVersion`, ...)
297
+ - `agentOrchestration`: main-agent (conversation/approval) + sub-agent (execution) contract (`mode`, `delegationPolicy`, `delegateCommandExecution`, `longRunningCategories`, `fallbackToMainAgentWhenSubAgentUnavailable`, `pauseAndReportWhen`, `resumePriority`)
297
298
 
298
299
  **Advanced/reference fields (automation edge cases or debugging)**
299
300
 
@@ -363,6 +364,10 @@ npx lee-spec-kit flow F004 --request "promote issue 004 to F004 and proceed" --a
363
364
  # with default preset configured, request-only auto mode is available
364
365
  npx lee-spec-kit flow F004 --request "promote issue 004 to F004 and proceed"
365
366
 
367
+ # long-running auto: create checkpoint + resume
368
+ npx lee-spec-kit flow F004 --auto-until-category pr_create,code_review,pr_status_update --start-auto --json
369
+ npx lee-spec-kit flow --resume <RUN_ID> --json
370
+
366
371
  # JSON output for automation
367
372
  npx lee-spec-kit flow --json
368
373
 
@@ -381,6 +386,8 @@ npx lee-spec-kit flow --strict
381
386
  | `--request <text>` | In auto mode, apply a new user request first (auto-selects `user_request_replan`) |
382
387
  | `--auto-preset <name>` | Use a named auto preset (builtin: `pr-handoff`) |
383
388
  | `--auto-until-category <categories>` | Auto-execute command actions until one of target categories appears (comma-separated) |
389
+ | `--start-auto` | Persist auto checkpoint (run id) and include resume metadata (`autoRun.run`) in JSON |
390
+ | `--resume <run-id>`| Resume stored auto checkpoint by run id |
384
391
  | `--approve <reply>` | Pass through context label approval (e.g. `A`, `A OK`, `A proceed`) |
385
392
  | `--execute` | Execute approved option when it is a command (ticket is required only when `requiresUserCheck=true`) |
386
393
  | `--execute-strict`| With `--execute`, fail if approved option is instruction-only |
@@ -391,9 +398,20 @@ Auto gate mode rules:
391
398
  - Auto mode (`--auto-until-category` / `--auto-preset`) cannot be combined with `--approve` or `--execute`.
392
399
  - `--request` requires auto mode.
393
400
  - Exception: if `workflow.auto.defaultPreset` is configured, `--request` alone enables auto mode.
401
+ - `--resume <run-id>` cannot be combined with `<feature-name>`, `--component`, `--all`, `--done`, `--auto-*`, or `--request`. (It uses settings from the stored checkpoint.)
394
402
  - Auto-run stops as `gate_reached` when a target category appears, then prints that step's approval text (`approvalRequest.userFacingLines`).
403
+ - If the current action set is instruction-only (no executable command), auto-run may stop with `AUTO_MANUAL_REQUIRED`. This is an automation boundary, not a CLI crash.
395
404
  - 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`.
405
+ - In JSON mode, inspect `autoRun.status`, `autoRun.reasonCode`, `autoRun.gate`, `autoRun.executions`, and `autoRun.resume`.
406
+ - Inspect JSON `agentOrchestration` for main/sub-agent responsibilities and pause/report boundaries.
407
+ - When `delegateCommandExecution: "long_running_only"`, keep short steps in the main agent and delegate only categories listed in `longRunningCategories`.
408
+ - With `--start-auto`, JSON also includes `autoRun.run` (`runId`, `status`, `resumeCommand`).
409
+
410
+ Agent resume rules (recommended):
411
+ - When `flow --json` returns `autoRun.enabled=true`, resume with `autoRun.resume.flowCommand` after interruption/compression.
412
+ - If you need a fresh checkpoint before resuming, run `autoRun.resume.contextCommand` first.
413
+ - If `context --json` returns `approvalRequest.required=true`, stop immediately and report to the user.
414
+ - When `--start-auto` is used, prefer `autoRun.run.resumeCommand` (`flow --resume <runId>`) as the first resume path.
397
415
 
398
416
  ### GitHub helpers
399
417
 
@@ -578,7 +596,6 @@ Running `init` creates `.lee-spec-kit.json` in your docs root (default: `docs/`)
578
596
  - Use the `Pre-PR Baseline Checklist` section in `docs get create-pr --json` as the single source of truth
579
597
  - `evidenceMode` (optional): evidence validation mode (`"path_required"` | `"any"`, default: `"path_required"`)
580
598
  - `path_required`: evidence must be a real existing local path
581
- - `findings` (optional): findings requirement (`"required"` | `"optional"`, default: `"required"`)
582
599
  - `decisionEnum` (optional): allowed decision outcomes (default: `["approve","changes_requested","blocked"]`)
583
600
  - Moving to PR step requires final decision `approve`
584
601
  - `workflow.auto`:
@@ -605,7 +622,6 @@ Example:
605
622
  "skills": ["code-review-excellence"],
606
623
  "fallback": "builtin-checklist",
607
624
  "evidenceMode": "path_required",
608
- "findings": "required",
609
625
  "decisionEnum": ["approve", "changes_requested", "blocked"]
610
626
  }
611
627
  }
package/README.md CHANGED
@@ -313,6 +313,7 @@ npx lee-spec-kit context F001 --approve A --execute --ticket <TICKET> --execute-
313
313
  - `approvalRequest`: 승인 요청/실행에 바로 사용하는 안내 데이터 (`labels`, `approveCommand`, `executeCommand`, `options[]`)
314
314
  - `requiredDocs`: 현재 액션 전에 읽어야 할 CLI 내장 문서 목록 (`id`, `command`)
315
315
  - `checkPolicy`: 승인 검증 정책 (`token`, `acceptedTokens`, `tokenPattern`, `validLabels`, `contextVersion` 등)
316
+ - `agentOrchestration`: 메인(대화/승인) + 서브(명령 실행) 역할 분리 계약 (`mode`, `delegationPolicy`, `delegateCommandExecution`, `longRunningCategories`, `fallbackToMainAgentWhenSubAgentUnavailable`, `pauseAndReportWhen`, `resumePriority`)
316
317
 
317
318
  **고급/참고 필드 (자동화 고급 시나리오 또는 디버깅용)**
318
319
 
@@ -382,6 +383,10 @@ npx lee-spec-kit flow F004 --request "issue 004를 F004로 승격시켜서 진
382
383
  # 기본 preset 설정 시 더 짧게 실행 가능
383
384
  npx lee-spec-kit flow F004 --request "issue 004를 F004로 승격시켜서 진행해"
384
385
 
386
+ # 장시간 자동 진행: run 체크포인트 생성 + 재개
387
+ npx lee-spec-kit flow F004 --auto-until-category pr_create,code_review,pr_status_update --start-auto --json
388
+ npx lee-spec-kit flow --resume <RUN_ID> --json
389
+
385
390
  # 에이전트 파이프라인용 JSON
386
391
  npx lee-spec-kit flow --json
387
392
 
@@ -400,6 +405,8 @@ npx lee-spec-kit flow --strict
400
405
  | `--request <text>` | auto 모드에서 새 사용자 요청을 먼저 반영 (`user_request_replan` 라벨 자동 선택) |
401
406
  | `--auto-preset <name>` | 이름 기반 auto preset 사용 (기본 제공: `pr-handoff`) |
402
407
  | `--auto-until-category <categories>` | command 액션을 자동 실행하다가 지정 category 중 하나가 나오면 중지 (쉼표 구분) |
408
+ | `--start-auto` | auto 실행 체크포인트(run id) 저장 후 JSON에 재개 정보(`autoRun.run`)를 함께 출력 |
409
+ | `--resume <run-id>` | 저장된 auto 실행 체크포인트를 run id로 재개 |
403
410
  | `--approve <reply>`| context 라벨 승인 응답 전달 (예: `A`, `A OK`, `A 진행해`) |
404
411
  | `--execute` | 승인한 옵션이 command일 때 실행 (`requiresUserCheck=true`면 티켓 연동, 아니면 티켓 없이 실행) |
405
412
  | `--execute-strict` | `--execute`와 함께 사용 시 instruction-only 옵션이면 실패 |
@@ -410,9 +417,20 @@ npx lee-spec-kit flow --strict
410
417
  - auto 모드(`--auto-until-category`/`--auto-preset`)는 `--approve`, `--execute`와 함께 사용할 수 없습니다.
411
418
  - `--request`는 auto 모드와 함께 사용해야 합니다.
412
419
  - 예외적으로 `workflow.auto.defaultPreset`이 설정되어 있으면 `--request`만으로도 auto 모드가 활성화됩니다.
420
+ - `--resume <run-id>`는 `<feature-name>`, `--component`, `--all`, `--done`, `--auto-*`, `--request`와 함께 사용할 수 없습니다. (체크포인트에 저장된 설정을 사용)
413
421
  - 자동 진행은 지정한 category가 등장하면 `gate_reached`로 멈추고, 해당 단계의 승인 문구(`approvalRequest.userFacingLines`)를 그대로 출력합니다.
422
+ - 현재 액션이 instruction-only라 command 자동 실행이 불가능하면 `AUTO_MANUAL_REQUIRED`로 멈출 수 있습니다. (CLI 오류가 아니라 자동화 경계 도달 상태)
414
423
  - 진행 정체(동일 context/action 반복)가 감지되면 `AUTO_NO_PROGRESS`로 중단됩니다.
415
- - JSON 모드에서는 `autoRun.status`, `autoRun.reasonCode`, `autoRun.gate`, `autoRun.executions`로 상세 상태를 확인할 수 있습니다.
424
+ - JSON 모드에서는 `autoRun.status`, `autoRun.reasonCode`, `autoRun.gate`, `autoRun.executions`, `autoRun.resume`로 상세 상태를 확인할 수 있습니다.
425
+ - JSON `agentOrchestration`으로 메인/서브 에이전트 역할 및 중단/보고 조건을 확인할 수 있습니다.
426
+ - `delegateCommandExecution: "long_running_only"`면 짧은 단계는 메인이 처리하고, `longRunningCategories`에 해당하는 장시간 루프만 서브 에이전트 위임을 권장합니다.
427
+ - `--start-auto`를 사용하면 JSON `autoRun.run`에 `runId`, `status`, `resumeCommand`가 포함됩니다.
428
+
429
+ 에이전트 재개 규칙(권장):
430
+ - `flow --json` 결과에 `autoRun.enabled=true`가 있으면, 중단/압축 후에도 `autoRun.resume.flowCommand`를 그대로 재실행해 이어갑니다.
431
+ - 재개 전 현재 지점 확인이 필요하면 `autoRun.resume.contextCommand`를 먼저 실행합니다.
432
+ - `context --json` 확인 결과 `approvalRequest.required=true`면 즉시 멈추고 사용자에게 보고합니다.
433
+ - `--start-auto`를 사용하는 경우에는 `autoRun.run.resumeCommand`(`flow --resume <runId>`)를 우선 재개 경로로 사용합니다.
416
434
 
417
435
  ### GitHub helper
418
436
 
@@ -626,7 +644,6 @@ npx lee-spec-kit update --force
626
644
  - 상세 기준은 `docs get create-pr --json`의 `Pre-PR 기본 체크리스트` 섹션을 단일 기준으로 사용
627
645
  - `evidenceMode` (선택): Evidence 검증 방식 (`"path_required"` | `"any"`, 기본: `"path_required"`)
628
646
  - `path_required`: 실제 존재하는 로컬 경로만 인정
629
- - `findings` (선택): Findings 필수 여부 (`"required"` | `"optional"`, 기본: `"required"`)
630
647
  - `decisionEnum` (선택): 허용 Decision 값 목록 (기본: `["approve","changes_requested","blocked"]`)
631
648
  - PR 단계로 진행하려면 최종 Decision이 `approve`여야 함
632
649
  - `workflow.auto`:
@@ -653,7 +670,6 @@ npx lee-spec-kit update --force
653
670
  "skills": ["code-review-excellence"],
654
671
  "fallback": "builtin-checklist",
655
672
  "evidenceMode": "path_required",
656
- "findings": "required",
657
673
  "decisionEnum": ["approve", "changes_requested", "blocked"]
658
674
  }
659
675
  }