lee-spec-kit 0.6.26 → 0.6.28
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 +6 -4
- package/README.md +6 -4
- package/dist/index.js +272 -26
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/en/common/agents/agents.md +6 -3
- package/templates/en/common/agents/skills/create-pr.md +4 -2
- package/templates/en/common/agents/skills/execute-task.md +7 -6
- package/templates/en/common/features/feature-base/tasks.md +1 -1
- package/templates/ko/common/agents/agents.md +6 -3
- package/templates/ko/common/agents/skills/create-pr.md +4 -2
- package/templates/ko/common/agents/skills/execute-task.md +7 -6
- package/templates/ko/common/features/feature-base/tasks.md +1 -1
package/README.en.md
CHANGED
|
@@ -365,11 +365,12 @@ npx lee-spec-kit flow F004 --request "promote issue 004 to F004 and proceed" --a
|
|
|
365
365
|
npx lee-spec-kit flow F004 --request "promote issue 004 to F004 and proceed"
|
|
366
366
|
|
|
367
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
|
|
368
|
+
npx lee-spec-kit flow F004 --auto-until-category pr_create,code_review,pr_status_update --start-auto --json-compact
|
|
369
|
+
npx lee-spec-kit flow --resume <RUN_ID> --json-compact
|
|
370
370
|
|
|
371
371
|
# JSON output for automation
|
|
372
372
|
npx lee-spec-kit flow --json
|
|
373
|
+
npx lee-spec-kit flow --json-compact
|
|
373
374
|
|
|
374
375
|
# strict checks (optional)
|
|
375
376
|
npx lee-spec-kit flow --strict
|
|
@@ -380,6 +381,7 @@ npx lee-spec-kit flow --strict
|
|
|
380
381
|
| Option | Description |
|
|
381
382
|
| ----------------- | ----------- |
|
|
382
383
|
| `--json` | JSON output for agents |
|
|
384
|
+
| `--json-compact` | Compact JSON output for agents (implies `--json`, reduced duplication) |
|
|
383
385
|
| `--component <id>`| Select target component in multi mode (e.g. `app`, `api`, `worker`) |
|
|
384
386
|
| `--all` | Include completed features when auto-detecting |
|
|
385
387
|
| `--done` | Show completed (workflow-done) features only |
|
|
@@ -408,9 +410,9 @@ Auto gate mode rules:
|
|
|
408
410
|
- With `--start-auto`, JSON also includes `autoRun.run` (`runId`, `status`, `resumeCommand`).
|
|
409
411
|
|
|
410
412
|
Agent resume rules (recommended):
|
|
411
|
-
- When `flow --json` returns `autoRun.enabled=true`, resume with `autoRun.resume.flowCommand` after interruption/compression.
|
|
413
|
+
- When `flow --json-compact` (or `flow --json`) returns `autoRun.enabled=true`, resume with `autoRun.resume.flowCommand` after interruption/compression.
|
|
412
414
|
- 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.
|
|
415
|
+
- If `context --json-compact` (or `context --json`) returns `approvalRequest.required=true`, stop immediately and report to the user.
|
|
414
416
|
- When `--start-auto` is used, prefer `autoRun.run.resumeCommand` (`flow --resume <runId>`) as the first resume path.
|
|
415
417
|
|
|
416
418
|
### GitHub helpers
|
package/README.md
CHANGED
|
@@ -384,11 +384,12 @@ npx lee-spec-kit flow F004 --request "issue 004를 F004로 승격시켜서 진
|
|
|
384
384
|
npx lee-spec-kit flow F004 --request "issue 004를 F004로 승격시켜서 진행해"
|
|
385
385
|
|
|
386
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
|
|
387
|
+
npx lee-spec-kit flow F004 --auto-until-category pr_create,code_review,pr_status_update --start-auto --json-compact
|
|
388
|
+
npx lee-spec-kit flow --resume <RUN_ID> --json-compact
|
|
389
389
|
|
|
390
390
|
# 에이전트 파이프라인용 JSON
|
|
391
391
|
npx lee-spec-kit flow --json
|
|
392
|
+
npx lee-spec-kit flow --json-compact
|
|
392
393
|
|
|
393
394
|
# 엄격 검사(선택)
|
|
394
395
|
npx lee-spec-kit flow --strict
|
|
@@ -399,6 +400,7 @@ npx lee-spec-kit flow --strict
|
|
|
399
400
|
| 옵션 | 설명 |
|
|
400
401
|
| ------------------ | ---- |
|
|
401
402
|
| `--json` | 에이전트용 JSON 출력 |
|
|
403
|
+
| `--json-compact` | 에이전트용 압축 JSON 출력 (`--json` 포함, 중복 필드 최소화) |
|
|
402
404
|
| `--component <id>` | multi에서 대상 컴포넌트 지정 (예: `app`, `api`, `worker`) |
|
|
403
405
|
| `--all` | 자동 감지 실패 시 완료된 Feature까지 포함해서 표시 |
|
|
404
406
|
| `--done` | 완료(workflow-done) Feature만 표시 |
|
|
@@ -427,9 +429,9 @@ npx lee-spec-kit flow --strict
|
|
|
427
429
|
- `--start-auto`를 사용하면 JSON `autoRun.run`에 `runId`, `status`, `resumeCommand`가 포함됩니다.
|
|
428
430
|
|
|
429
431
|
에이전트 재개 규칙(권장):
|
|
430
|
-
- `flow --json` 결과에 `autoRun.enabled=true`가 있으면, 중단/압축 후에도 `autoRun.resume.flowCommand`를 그대로 재실행해 이어갑니다.
|
|
432
|
+
- `flow --json-compact`(또는 `flow --json`) 결과에 `autoRun.enabled=true`가 있으면, 중단/압축 후에도 `autoRun.resume.flowCommand`를 그대로 재실행해 이어갑니다.
|
|
431
433
|
- 재개 전 현재 지점 확인이 필요하면 `autoRun.resume.contextCommand`를 먼저 실행합니다.
|
|
432
|
-
- `context --json` 확인 결과 `approvalRequest.required=true`면 즉시 멈추고 사용자에게 보고합니다.
|
|
434
|
+
- `context --json-compact`(또는 `context --json`) 확인 결과 `approvalRequest.required=true`면 즉시 멈추고 사용자에게 보고합니다.
|
|
433
435
|
- `--start-auto`를 사용하는 경우에는 `autoRun.run.resumeCommand`(`flow --resume <runId>`)를 우선 재개 경로로 사용합니다.
|
|
434
436
|
|
|
435
437
|
### GitHub helper
|
package/dist/index.js
CHANGED
|
@@ -201,7 +201,7 @@ var ko = {
|
|
|
201
201
|
"context.actionDetail.prStatusUpdateSyncApproved": "\uC6D0\uACA9 \uBA38\uC9C0 \uC0C1\uD0DC\uB97C \uBC18\uC601\uD574 PR \uC0C1\uD0DC\uB97C Approved\uB85C \uB3D9\uAE30\uD654\uD558\uC138\uC694",
|
|
202
202
|
"context.actionDetail.codeReview": "\uCF54\uB4DC \uB9AC\uBDF0 \uC9C0\uC801\uC0AC\uD56D\uC744 \uBC18\uC601\uD558\uACE0 PR \uB9AC\uBDF0 \uC815\uBCF4\uB97C \uC5C5\uB370\uC774\uD2B8\uD558\uC138\uC694",
|
|
203
203
|
"context.actionDetail.codeReviewNeedEvidenceField": "tasks.md\uC5D0 PR \uB9AC\uBDF0 Evidence \uD544\uB4DC\uB97C \uCD94\uAC00\uD558\uC138\uC694",
|
|
204
|
-
"context.actionDetail.codeReviewNeedEvidence": "PR \uB9AC\uBDF0
|
|
204
|
+
"context.actionDetail.codeReviewNeedEvidence": "`summary: ...` \uD615\uC2DD \uB610\uB294 decisions.md\uC758 PR \uB9AC\uBDF0 \uB85C\uADF8 \uACBD\uB85C\uB85C PR \uB9AC\uBDF0 Evidence\uB97C \uAE30\uB85D\uD558\uC138\uC694",
|
|
205
205
|
"context.actionDetail.codeReviewNeedDecisionField": "tasks.md\uC5D0 PR \uB9AC\uBDF0 Decision \uD544\uB4DC\uB97C \uCD94\uAC00\uD558\uC138\uC694",
|
|
206
206
|
"context.actionDetail.codeReviewNeedDecision": "PR \uB9AC\uBDF0 Decision\uC744 \uAE30\uB85D\uD558\uC138\uC694",
|
|
207
207
|
"context.actionDetail.codeReviewResolve": "\uB9AC\uBDF0 \uCF54\uBA58\uD2B8\uB97C \uBC18\uC601\uD558\uACE0 PR \uB9AC\uBDF0 \uBB38\uC11C\uB97C \uCD5C\uC2E0\uD654\uD558\uC138\uC694",
|
|
@@ -529,11 +529,11 @@ var ko = {
|
|
|
529
529
|
taskCommitGateReasonMismatchLastDone: "\uCD5C\uADFC \uD504\uB85C\uC81D\uD2B8 \uCF54\uB4DC \uCEE4\uBC0B\uC774 \uC9C1\uC804 \uC644\uB8CC \uD0DC\uC2A4\uD06C\uC640 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4",
|
|
530
530
|
prLegacyAsk: "tasks.md\uC5D0 PR/PR \uC0C1\uD0DC \uD544\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uD15C\uD50C\uB9BF\uC744 \uCD5C\uC2E0 \uD3EC\uB9F7\uC73C\uB85C \uC5C5\uB370\uC774\uD2B8\uD560\uAE4C\uC694? (\uD655\uC778 \uD544\uC694)",
|
|
531
531
|
prePrReviewFieldMissing: "tasks.md\uC5D0 `PR \uC804 \uB9AC\uBDF0` \uD544\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. `- **PR \uC804 \uB9AC\uBDF0**: Pending | Done` \uD56D\uBAA9\uC744 \uCD94\uAC00\uD558\uACE0 \uB2E4\uC2DC context\uB97C \uC2E4\uD589\uD558\uC138\uC694. (\uD655\uC778 \uD544\uC694)",
|
|
532
|
-
prePrReviewEvidenceMissing: "tasks.md\uC758 `PR \uC804 \uB9AC\uBDF0 Evidence`\uAC00 \uBE44\uC5B4\uC788\uAC70\uB098
|
|
532
|
+
prePrReviewEvidenceMissing: "tasks.md\uC758 `PR \uC804 \uB9AC\uBDF0 Evidence`\uAC00 \uBE44\uC5B4\uC788\uAC70\uB098 \uC720\uD6A8\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC2E4\uC81C \uD30C\uC77C \uACBD\uB85C\uC640 `Pre-PR Review Log`(\uB610\uB294 `PR \uC804 \uB9AC\uBDF0 \uB85C\uADF8`)\uC758 `Summary`/`Decision`\uC744 \uAE30\uB85D\uD558\uC138\uC694. (\uD655\uC778 \uD544\uC694)",
|
|
533
533
|
prePrReviewDecisionMissing: "tasks.md\uC758 `PR \uC804 \uB9AC\uBDF0 Decision`\uC774 \uBE44\uC5B4\uC788\uAC70\uB098 \uACB0\uC815 \uD615\uC2DD\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. `\uACB0\uC815: ...`(\uB610\uB294 `decision: ...`) \uD615\uC2DD\uC73C\uB85C \uAE30\uB85D\uD558\uC138\uC694. (\uD655\uC778 \uD544\uC694)",
|
|
534
534
|
prePrReviewRun: "PR \uC0DD\uC131 \uC804 \uC0AC\uC804 \uCF54\uB4DC\uB9AC\uBDF0\uB97C \uC9C4\uD589\uD558\uC138\uC694. \uAE30\uBCF8 \uBCA0\uC774\uC2A4\uB77C\uC778\uC740 `{fallback}`\uC774\uBA70, `create-pr` \uBB38\uC11C\uC758 `Pre-PR \uAE30\uBCF8 \uCCB4\uD06C\uB9AC\uC2A4\uD2B8` \uC139\uC158\uC744 \uD56D\uC0C1 \uC218\uD589\uD558\uC138\uC694. \uC6B0\uC120\uC21C\uC704 \uC2A4\uD0AC: {skills} (\uC124\uCE58\uB41C \uB354 \uC801\uD569\uD55C \uC2A4\uD0AC\uC774 \uC788\uB2E4\uBA74 \uBA3C\uC800 \uC81C\uC548 \uD6C4 \uC0AC\uC6A9)\uB85C \uCD94\uAC00 \uC2EC\uD654 \uAC80\uD1A0\uB97C \uC9C4\uD589\uD558\uC138\uC694. \uC644\uB8CC \uD6C4 `PR \uC804 \uB9AC\uBDF0`\uB97C Done\uC73C\uB85C \uC5C5\uB370\uC774\uD2B8\uD558\uC138\uC694.",
|
|
535
535
|
prReviewEvidenceFieldMissing: "tasks.md\uC5D0 `PR \uB9AC\uBDF0 Evidence` \uD544\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. `- **PR \uB9AC\uBDF0 Evidence**: -` \uD56D\uBAA9\uC744 \uCD94\uAC00\uD558\uACE0 \uB2E4\uC2DC \uC9C4\uD589\uD558\uC138\uC694. (\uD655\uC778 \uD544\uC694)",
|
|
536
|
-
prReviewEvidenceMissing: "tasks.md\uC758 `PR \uB9AC\uBDF0 Evidence`\uAC00 \uBE44\uC5B4\uC788\uAC70\uB098
|
|
536
|
+
prReviewEvidenceMissing: "tasks.md\uC758 `PR \uB9AC\uBDF0 Evidence`\uAC00 \uBE44\uC5B4\uC788\uAC70\uB098 \uC720\uD6A8\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. `\uC694\uC57D: ...`(\uB610\uB294 `summary: ...`) \uD615\uC2DD\uC73C\uB85C \uAE30\uB85D\uD558\uAC70\uB098 `PR Review Log`(\uB610\uB294 `PR \uB9AC\uBDF0 \uB85C\uADF8`)\uC758 `Summary`/`Decision`\uC774 \uC788\uB294 \uD30C\uC77C \uACBD\uB85C\uB97C \uC9C0\uC815\uD558\uC138\uC694. (\uD655\uC778 \uD544\uC694)",
|
|
537
537
|
prReviewDecisionFieldMissing: "tasks.md\uC5D0 `PR \uB9AC\uBDF0 Decision` \uD544\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. `- **PR \uB9AC\uBDF0 Decision**: -` \uD56D\uBAA9\uC744 \uCD94\uAC00\uD558\uACE0 \uB2E4\uC2DC \uC9C4\uD589\uD558\uC138\uC694. (\uD655\uC778 \uD544\uC694)",
|
|
538
538
|
prReviewDecisionMissing: "tasks.md\uC758 `PR \uB9AC\uBDF0 Decision`\uC774 \uBE44\uC5B4\uC788\uAC70\uB098 \uACB0\uC815 \uD615\uC2DD\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. `\uACB0\uC815: ...`(\uB610\uB294 `decision: ...`) \uD615\uC2DD\uC73C\uB85C \uAE30\uB85D\uD558\uC138\uC694. (\uD655\uC778 \uD544\uC694)",
|
|
539
539
|
prCreate: "PR \uBCF8\uBB38 \uD15C\uD50C\uB9BF\uC744 \uC0DD\uC131\uD574 \uBCC0\uACBD \uC0AC\uD56D/\uD14C\uC2A4\uD2B8 \uC139\uC158\uC744 \uAC80\uD1A0\xB7\uBCF4\uC644\uD558\uACE0, \uC0AC\uC6A9\uC790 \uC2B9\uC778(OK) \uD6C4 PR\uC744 \uC0DD\uC131\uD558\uC138\uC694. \uC774\uD6C4 tasks.md\uC5D0 PR \uB9C1\uD06C\uB97C \uAE30\uB85D\uD558\uC138\uC694.",
|
|
@@ -581,14 +581,14 @@ var ko = {
|
|
|
581
581
|
workflowPrLinkMissing: "\uC644\uB8CC \uC0C1\uD0DC\uC774\uC9C0\uB9CC PR \uB9C1\uD06C\uAC00 \uBE44\uC5B4\uC788\uC2B5\uB2C8\uB2E4. (tasks.md\uC758 PR \uD544\uB4DC\uB97C \uCC44\uC6B0\uC138\uC694.)",
|
|
582
582
|
workflowPrStatusMissing: "\uC644\uB8CC \uC0C1\uD0DC\uC774\uC9C0\uB9CC PR \uC0C1\uD0DC\uAC00 \uBE44\uC5B4\uC788\uC2B5\uB2C8\uB2E4. (PR \uC0DD\uC131/\uB9AC\uBDF0 \uB2E8\uACC4\uC5D0\uC11C\uB294 PR \uC0C1\uD0DC\uB97C Review\uB85C \uC124\uC815\uD558\uC138\uC694.)",
|
|
583
583
|
workflowPrStatusNotApproved: "\uC644\uB8CC \uC0C1\uD0DC\uC774\uC9C0\uB9CC PR \uC0C1\uD0DC\uAC00 Approved\uAC00 \uC544\uB2D9\uB2C8\uB2E4. (PR \uC0DD\uC131/\uB9AC\uBDF0 \uB2E8\uACC4\uB294 Review\uB97C \uC720\uC9C0\uD558\uACE0, merge \uC131\uACF5 \uC2DC\uC5D0\uB9CC Approved\uB85C \uB3D9\uAE30\uD654\uD558\uC138\uC694.)",
|
|
584
|
-
workflowPrReviewEvidenceMissing: "\uB9AC\uBDF0 \uB2E8\uACC4\uC5D0\uC11C `PR \uB9AC\uBDF0 Evidence`\uAC00 \uBE44\uC5B4\uC788\uAC70\uB098
|
|
584
|
+
workflowPrReviewEvidenceMissing: "\uB9AC\uBDF0 \uB2E8\uACC4\uC5D0\uC11C `PR \uB9AC\uBDF0 Evidence`\uAC00 \uBE44\uC5B4\uC788\uAC70\uB098 \uC720\uD6A8\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. (`\uC694\uC57D: ...`/`summary: ...` \uB610\uB294 `PR Review Log`\uC758 `Summary`/`Decision`\uC774 \uC788\uB294 \uACBD\uB85C\uB97C \uAE30\uB85D)",
|
|
585
585
|
workflowPrReviewDecisionMissing: "\uB9AC\uBDF0 \uB2E8\uACC4\uC5D0\uC11C `PR \uB9AC\uBDF0 Decision`\uC774 \uBE44\uC5B4\uC788\uAC70\uB098 \uACB0\uC815 \uD615\uC2DD\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. (`\uACB0\uC815: ...` \uB610\uB294 `decision: ...` \uD615\uC2DD\uC73C\uB85C \uAE30\uB85D)",
|
|
586
586
|
workflowPrRemoteChangesRequested: "\uC6D0\uACA9 PR\uC5D0\uC11C \uBCC0\uACBD \uC694\uCCAD \uB610\uB294 \uCD94\uAC00 \uB9AC\uBDF0\uAC00 \uAC10\uC9C0\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uCF54\uBA58\uD2B8 \uBC18\uC601 \uD6C4 push\uD558\uACE0 \uB2E4\uC2DC \uD655\uC778\uD558\uC138\uC694.",
|
|
587
587
|
workflowPrRemoteChecksFailing: "\uC6D0\uACA9 PR \uCCB4\uD06C \uC2E4\uD328\uAC00 {count}\uAC74 \uAC10\uC9C0\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uC2E4\uD328 \uC6D0\uC778\uC744 \uD574\uACB0 \uD6C4 \uB2E4\uC2DC \uD655\uC778\uD558\uC138\uC694.",
|
|
588
588
|
workflowPrRemoteChecksPending: "\uC6D0\uACA9 PR \uCCB4\uD06C \uB300\uAE30\uAC00 {count}\uAC74 \uAC10\uC9C0\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uCCB4\uD06C \uC644\uB8CC \uD6C4 \uB2E4\uC2DC \uD655\uC778\uD558\uC138\uC694.",
|
|
589
589
|
workflowPrePrReviewMissing: "\uC644\uB8CC \uC0C1\uD0DC\uC774\uC9C0\uB9CC `PR \uC804 \uB9AC\uBDF0` \uD544\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. (tasks.md\uC5D0 `- **PR \uC804 \uB9AC\uBDF0**: Pending | Done`\uC744 \uCD94\uAC00\uD558\uC138\uC694.)",
|
|
590
590
|
workflowPrePrReviewNotDone: "\uC644\uB8CC \uC0C1\uD0DC\uC774\uC9C0\uB9CC `PR \uC804 \uB9AC\uBDF0`\uAC00 Done\uC774 \uC544\uB2D9\uB2C8\uB2E4. (\uC0AC\uC804 \uCF54\uB4DC\uB9AC\uBDF0 \uD6C4 Done\uC73C\uB85C \uC5C5\uB370\uC774\uD2B8\uD558\uC138\uC694.)",
|
|
591
|
-
workflowPrePrEvidenceMissing: "\uC644\uB8CC \uC0C1\uD0DC\uC774\uC9C0\uB9CC `PR \uC804 \uB9AC\uBDF0 Evidence`\uAC00 \uBE44\uC5B4\uC788\uAC70\uB098 \uC720\uD6A8\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. (
|
|
591
|
+
workflowPrePrEvidenceMissing: "\uC644\uB8CC \uC0C1\uD0DC\uC774\uC9C0\uB9CC `PR \uC804 \uB9AC\uBDF0 Evidence`\uAC00 \uBE44\uC5B4\uC788\uAC70\uB098 \uC720\uD6A8\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. (`Pre-PR Review Log`/`PR \uC804 \uB9AC\uBDF0 \uB85C\uADF8`\uC758 `Summary`/`Decision`\uC774 \uC788\uB294 \uC2E4\uC81C \uACBD\uB85C\uB97C \uAE30\uB85D\uD558\uC138\uC694.)",
|
|
592
592
|
workflowPrePrDecisionMissing: "\uC644\uB8CC \uC0C1\uD0DC\uC774\uC9C0\uB9CC `PR \uC804 \uB9AC\uBDF0 Decision`\uC774 \uBE44\uC5B4\uC788\uAC70\uB098 \uD615\uC2DD\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. (`decision: approve|changes_requested|blocked ...` \uD615\uC2DD)",
|
|
593
593
|
workflowPrePrDecisionNotApproved: "\uC644\uB8CC \uC0C1\uD0DC\uC774\uC9C0\uB9CC `PR \uC804 \uB9AC\uBDF0 Decision`\uC774 `{outcome}`\uC785\uB2C8\uB2E4. \uB9AC\uBDF0 \uB9AC\uC2A4\uD06C\uB97C \uD574\uC18C\uD55C \uB4A4 pre-pr-review\uB97C \uC7AC\uC2E4\uD589\uD574 `approve`\uB85C \uB9DE\uCD94\uC138\uC694."
|
|
594
594
|
}
|
|
@@ -712,7 +712,7 @@ var en = {
|
|
|
712
712
|
"context.actionDetail.prStatusUpdateSyncApproved": "PR merged remotely; sync PR Status to Approved",
|
|
713
713
|
"context.actionDetail.codeReview": "Address review feedback and update PR review fields",
|
|
714
714
|
"context.actionDetail.codeReviewNeedEvidenceField": "Add PR Review Evidence field in tasks.md",
|
|
715
|
-
"context.actionDetail.codeReviewNeedEvidence": "Record PR Review Evidence summary",
|
|
715
|
+
"context.actionDetail.codeReviewNeedEvidence": "Record PR Review Evidence (`summary: ...`) or PR Review Log path in decisions.md",
|
|
716
716
|
"context.actionDetail.codeReviewNeedDecisionField": "Add PR Review Decision field in tasks.md",
|
|
717
717
|
"context.actionDetail.codeReviewNeedDecision": "Record PR Review Decision",
|
|
718
718
|
"context.actionDetail.codeReviewResolve": "Address review feedback and keep PR review docs updated",
|
|
@@ -1040,11 +1040,11 @@ var en = {
|
|
|
1040
1040
|
taskCommitGateReasonMismatchLastDone: "The latest project code commit does not match the last completed task",
|
|
1041
1041
|
prLegacyAsk: "tasks.md is missing PR/PR Status fields. Update to the latest template format? (CHECK required)",
|
|
1042
1042
|
prePrReviewFieldMissing: "tasks.md is missing the `Pre-PR Review` field. Add `- **Pre-PR Review**: Pending | Done` and run context again. (CHECK required)",
|
|
1043
|
-
prePrReviewEvidenceMissing: "tasks.md `Pre-PR Evidence` is empty
|
|
1043
|
+
prePrReviewEvidenceMissing: "tasks.md `Pre-PR Evidence` is empty/invalid. Point to a real file and include a `Pre-PR Review Log` section with non-placeholder `Summary` and `Decision`. (CHECK required)",
|
|
1044
1044
|
prePrReviewDecisionMissing: "tasks.md `Pre-PR Decision` is empty/placeholder or missing decision format. Record it as `decision: ...` (or `\uACB0\uC815: ...`). (CHECK required)",
|
|
1045
1045
|
prePrReviewRun: "Run a pre-PR code review before creating the PR. Always execute the `{fallback}` baseline by following the `Pre-PR Baseline Checklist` section in the `create-pr` doc. Then use preferred skills ({skills}) for deeper review (if a better installed skill fits this change, propose it first). After completing it, set `Pre-PR Review` to Done in tasks.md.",
|
|
1046
1046
|
prReviewEvidenceFieldMissing: "tasks.md is missing the `PR Review Evidence` field. Add `- **PR Review Evidence**: -` and continue. (CHECK required)",
|
|
1047
|
-
prReviewEvidenceMissing: "tasks.md `PR Review Evidence` is empty/
|
|
1047
|
+
prReviewEvidenceMissing: "tasks.md `PR Review Evidence` is empty/invalid. Use `summary: ...` (or `\uC694\uC57D: ...`), or point to a file containing `PR Review Log` with non-placeholder `Summary` and `Decision`. (CHECK required)",
|
|
1048
1048
|
prReviewDecisionFieldMissing: "tasks.md is missing the `PR Review Decision` field. Add `- **PR Review Decision**: -` and continue. (CHECK required)",
|
|
1049
1049
|
prReviewDecisionMissing: "tasks.md `PR Review Decision` is empty/placeholder or missing decision format. Record it as `decision: ...` (or `\uACB0\uC815: ...`). (CHECK required)",
|
|
1050
1050
|
prCreate: "Generate the PR body template, refine changes/tests sections, get explicit user OK, create the PR, then record the PR link in tasks.md.",
|
|
@@ -1092,14 +1092,14 @@ var en = {
|
|
|
1092
1092
|
workflowPrLinkMissing: "Implementation is done but PR link is missing. (Fill the PR field in tasks.md.)",
|
|
1093
1093
|
workflowPrStatusMissing: "Implementation is done but PR Status is missing. (Set PR Status to Review during PR creation/review stages.)",
|
|
1094
1094
|
workflowPrStatusNotApproved: "Implementation is done but PR Status is not Approved. (Keep PR Status as Review before merge and sync to Approved only after successful merge.)",
|
|
1095
|
-
workflowPrReviewEvidenceMissing: "In review stage, `PR Review Evidence` is empty/
|
|
1095
|
+
workflowPrReviewEvidenceMissing: "In review stage, `PR Review Evidence` is empty/invalid. (Use `summary: ...`/`\uC694\uC57D: ...`, or point to a `PR Review Log` section with `Summary` and `Decision`.)",
|
|
1096
1096
|
workflowPrReviewDecisionMissing: "In review stage, `PR Review Decision` is empty/placeholder or missing decision format. (Use `decision: ...` or `\uACB0\uC815: ...`.)",
|
|
1097
1097
|
workflowPrRemoteChangesRequested: "Remote PR shows changes requested or additional review required. Address comments, push, then re-check.",
|
|
1098
1098
|
workflowPrRemoteChecksFailing: "Remote PR has {count} failing check(s). Fix failures, then re-check.",
|
|
1099
1099
|
workflowPrRemoteChecksPending: "Remote PR has {count} pending check(s). Wait for checks to complete, then re-check.",
|
|
1100
1100
|
workflowPrePrReviewMissing: "Implementation is done but `Pre-PR Review` is missing. (Add `- **Pre-PR Review**: Pending | Done` in tasks.md.)",
|
|
1101
1101
|
workflowPrePrReviewNotDone: "Implementation is done but `Pre-PR Review` is not Done. (Run pre-PR review, then update it to Done.)",
|
|
1102
|
-
workflowPrePrEvidenceMissing: "Implementation is done but `Pre-PR Evidence` is empty/invalid. (
|
|
1102
|
+
workflowPrePrEvidenceMissing: "Implementation is done but `Pre-PR Evidence` is empty/invalid. (Point to an existing file and include `Pre-PR Review Log` with non-placeholder `Summary` and `Decision`.)",
|
|
1103
1103
|
workflowPrePrDecisionMissing: "Implementation is done but `Pre-PR Decision` is empty/invalid. (Use `decision: approve|changes_requested|blocked ...`.)",
|
|
1104
1104
|
workflowPrePrDecisionNotApproved: "Implementation is done but `Pre-PR Decision` is `{outcome}`. Resolve review risks and re-run pre-PR review until decision becomes `approve`."
|
|
1105
1105
|
}
|
|
@@ -4636,13 +4636,102 @@ function resolveEvidencePathValue(value) {
|
|
|
4636
4636
|
if (mdLink && mdLink[1]) return mdLink[1].trim();
|
|
4637
4637
|
return trimmed.split(/\s+/)[0] || "";
|
|
4638
4638
|
}
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
if (
|
|
4639
|
+
function splitReviewLogSections(content, headerRegex) {
|
|
4640
|
+
const normalizedHeaderRegex = new RegExp(headerRegex.source, headerRegex.flags);
|
|
4641
|
+
const matches = [...content.matchAll(normalizedHeaderRegex)];
|
|
4642
|
+
if (matches.length === 0) return [];
|
|
4643
|
+
const sections = [];
|
|
4644
|
+
for (let i = 0; i < matches.length; i += 1) {
|
|
4645
|
+
const start = matches[i].index ?? 0;
|
|
4646
|
+
const end = i + 1 < matches.length ? matches[i + 1].index ?? content.length : content.length;
|
|
4647
|
+
sections.push(content.slice(start, end));
|
|
4648
|
+
}
|
|
4649
|
+
return sections;
|
|
4650
|
+
}
|
|
4651
|
+
function collectStructuredReviewEntries(section, keys) {
|
|
4652
|
+
const lines = section.split("\n");
|
|
4653
|
+
const escaped = keys.map((key) => escapeRegExp(key));
|
|
4654
|
+
const fieldRegex = new RegExp(
|
|
4655
|
+
`^\\s*-\\s*\\*\\*(?:${escaped.join("|")})\\*\\*\\s*:\\s*(.*)$`,
|
|
4656
|
+
"i"
|
|
4657
|
+
);
|
|
4658
|
+
const entries = [];
|
|
4659
|
+
for (let i = 0; i < lines.length; i += 1) {
|
|
4660
|
+
const match = lines[i].match(fieldRegex);
|
|
4661
|
+
if (!match) continue;
|
|
4662
|
+
const inlineValue = (match[1] || "").trim();
|
|
4663
|
+
if (inlineValue) entries.push(inlineValue);
|
|
4664
|
+
let cursor = i + 1;
|
|
4665
|
+
while (cursor < lines.length) {
|
|
4666
|
+
const line = lines[cursor];
|
|
4667
|
+
if (/^\s*-\s*\*\*.+\*\*\s*:/.test(line)) break;
|
|
4668
|
+
if (/^\s*##\s+/.test(line)) break;
|
|
4669
|
+
const nestedBullet = line.match(/^\s{2,}-\s+(.+)\s*$/);
|
|
4670
|
+
if (nestedBullet && nestedBullet[1]) {
|
|
4671
|
+
entries.push(nestedBullet[1].trim());
|
|
4672
|
+
}
|
|
4673
|
+
cursor += 1;
|
|
4674
|
+
}
|
|
4675
|
+
break;
|
|
4676
|
+
}
|
|
4677
|
+
return entries.filter((entry) => entry.length > 0);
|
|
4678
|
+
}
|
|
4679
|
+
function isReviewDraftPlaceholder(value) {
|
|
4680
|
+
const trimmed = value.trim();
|
|
4681
|
+
if (!trimmed) return true;
|
|
4682
|
+
return /^(?:-|#)?\s*(?:tbd|todo|pending|fill(?:\s+in)?|template|example|미정|작성|기입|n\/a|na)\b/i.test(
|
|
4683
|
+
trimmed
|
|
4684
|
+
);
|
|
4685
|
+
}
|
|
4686
|
+
function hasValidReviewLogEntries(entries) {
|
|
4687
|
+
return entries.map((entry) => entry.trim()).some(
|
|
4688
|
+
(entry) => entry.length > 0 && !isReviewDraftPlaceholder(entry) && !isPlaceholderReviewEvidence(entry)
|
|
4689
|
+
);
|
|
4690
|
+
}
|
|
4691
|
+
function hasReviewLogQuality(content, headerRegex, summaryKeys, decisionKeys) {
|
|
4692
|
+
const sections = splitReviewLogSections(content, headerRegex);
|
|
4693
|
+
for (const section of sections) {
|
|
4694
|
+
const summaryEntries = collectStructuredReviewEntries(section, summaryKeys);
|
|
4695
|
+
if (!hasValidReviewLogEntries(summaryEntries)) continue;
|
|
4696
|
+
const decisionEntries = collectStructuredReviewEntries(section, decisionKeys);
|
|
4697
|
+
if (!hasValidReviewLogEntries(decisionEntries)) continue;
|
|
4698
|
+
return true;
|
|
4699
|
+
}
|
|
4700
|
+
return false;
|
|
4701
|
+
}
|
|
4702
|
+
var PRE_PR_REVIEW_LOG_HEADER = /^##\s+(?:Pre-PR Review Log|PR 전 리뷰 로그)\b.*$/gim;
|
|
4703
|
+
var PR_REVIEW_LOG_HEADER = /^##\s+(?:PR Review Log|PR 리뷰 로그)\b.*$/gim;
|
|
4704
|
+
async function hasPrePrReviewLogEvidence(candidatePath) {
|
|
4705
|
+
try {
|
|
4706
|
+
const content = await fs17.readFile(candidatePath, "utf-8");
|
|
4707
|
+
return hasReviewLogQuality(
|
|
4708
|
+
content,
|
|
4709
|
+
PRE_PR_REVIEW_LOG_HEADER,
|
|
4710
|
+
["Summary", "\uC694\uC57D", "Note", "\uB178\uD2B8"],
|
|
4711
|
+
["Decision", "\uACB0\uC815"]
|
|
4712
|
+
);
|
|
4713
|
+
} catch {
|
|
4714
|
+
return false;
|
|
4715
|
+
}
|
|
4716
|
+
}
|
|
4717
|
+
async function hasPrReviewLogEvidence(candidatePath) {
|
|
4718
|
+
try {
|
|
4719
|
+
const content = await fs17.readFile(candidatePath, "utf-8");
|
|
4720
|
+
return hasReviewLogQuality(
|
|
4721
|
+
content,
|
|
4722
|
+
PR_REVIEW_LOG_HEADER,
|
|
4723
|
+
["Summary", "\uC694\uC57D", "Note", "\uB178\uD2B8"],
|
|
4724
|
+
["Decision", "\uACB0\uC815"]
|
|
4725
|
+
);
|
|
4726
|
+
} catch {
|
|
4727
|
+
return false;
|
|
4728
|
+
}
|
|
4729
|
+
}
|
|
4730
|
+
function resolveLocalEvidencePathCandidates(rawValue, context) {
|
|
4731
|
+
if (!rawValue) return [];
|
|
4643
4732
|
const evidencePath = resolveEvidencePathValue(rawValue);
|
|
4644
|
-
if (!evidencePath) return
|
|
4645
|
-
if (/^https?:\/\//i.test(evidencePath)) return
|
|
4733
|
+
if (!evidencePath) return [];
|
|
4734
|
+
if (/^https?:\/\//i.test(evidencePath)) return [];
|
|
4646
4735
|
const candidates = /* @__PURE__ */ new Set();
|
|
4647
4736
|
if (path23.isAbsolute(evidencePath)) {
|
|
4648
4737
|
candidates.add(path23.resolve(evidencePath));
|
|
@@ -4651,10 +4740,31 @@ async function isPrePrEvidenceProvided(rawValue, policy, context) {
|
|
|
4651
4740
|
candidates.add(path23.resolve(context.docsDir, evidencePath));
|
|
4652
4741
|
candidates.add(path23.resolve(path23.dirname(context.docsDir), evidencePath));
|
|
4653
4742
|
}
|
|
4743
|
+
return [...candidates];
|
|
4744
|
+
}
|
|
4745
|
+
async function resolveExistingEvidencePath(rawValue, context) {
|
|
4746
|
+
const candidates = resolveLocalEvidencePathCandidates(rawValue, context);
|
|
4654
4747
|
for (const candidate of candidates) {
|
|
4655
|
-
if (await fs17.pathExists(candidate)) return
|
|
4748
|
+
if (await fs17.pathExists(candidate)) return candidate;
|
|
4656
4749
|
}
|
|
4657
|
-
return
|
|
4750
|
+
return void 0;
|
|
4751
|
+
}
|
|
4752
|
+
async function isPrePrEvidenceProvided(rawValue, policy, context) {
|
|
4753
|
+
if (isPlaceholderReviewEvidence(rawValue)) return false;
|
|
4754
|
+
const existingEvidencePath = await resolveExistingEvidencePath(rawValue, context);
|
|
4755
|
+
if (policy.evidenceMode !== "path_required") {
|
|
4756
|
+
if (!existingEvidencePath) return true;
|
|
4757
|
+
return hasPrePrReviewLogEvidence(existingEvidencePath);
|
|
4758
|
+
}
|
|
4759
|
+
if (!existingEvidencePath) return false;
|
|
4760
|
+
return hasPrePrReviewLogEvidence(existingEvidencePath);
|
|
4761
|
+
}
|
|
4762
|
+
async function isPrReviewEvidenceProvided(rawValue, context) {
|
|
4763
|
+
if (isPlaceholderReviewEvidence(rawValue)) return false;
|
|
4764
|
+
if (hasStructuredReviewSummary(rawValue)) return true;
|
|
4765
|
+
const existingEvidencePath = await resolveExistingEvidencePath(rawValue, context);
|
|
4766
|
+
if (!existingEvidencePath) return false;
|
|
4767
|
+
return hasPrReviewLogEvidence(existingEvidencePath);
|
|
4658
4768
|
}
|
|
4659
4769
|
function parseIssueNumber(value) {
|
|
4660
4770
|
if (!value) return void 0;
|
|
@@ -5119,7 +5229,10 @@ async function parseFeature(featurePath, type, context, options) {
|
|
|
5119
5229
|
"PR Review Evidence"
|
|
5120
5230
|
]);
|
|
5121
5231
|
prReviewEvidence = prReviewEvidenceValue?.trim();
|
|
5122
|
-
prReviewEvidenceProvided =
|
|
5232
|
+
prReviewEvidenceProvided = await isPrReviewEvidenceProvided(
|
|
5233
|
+
prReviewEvidenceValue,
|
|
5234
|
+
{ featurePath, docsDir: context.docsDir }
|
|
5235
|
+
);
|
|
5123
5236
|
const prReviewDecisionValue = extractFirstSpecValue(content, [
|
|
5124
5237
|
"PR \uB9AC\uBDF0 Decision",
|
|
5125
5238
|
"PR Review Decision"
|
|
@@ -7125,7 +7238,7 @@ function buildAgentOrchestrationPolicy(actionOptions, autoRunAvailable) {
|
|
|
7125
7238
|
resumePriority: [
|
|
7126
7239
|
"flow --resume <RUN_ID>",
|
|
7127
7240
|
"autoRun.resume.flowCommand",
|
|
7128
|
-
"context --json"
|
|
7241
|
+
"context --json-compact"
|
|
7129
7242
|
]
|
|
7130
7243
|
};
|
|
7131
7244
|
}
|
|
@@ -9530,6 +9643,108 @@ function buildAgentOrchestrationPolicy2(autoRun) {
|
|
|
9530
9643
|
preferredResumeCommand
|
|
9531
9644
|
};
|
|
9532
9645
|
}
|
|
9646
|
+
function getFeatureRef2(feature) {
|
|
9647
|
+
return feature.folderName;
|
|
9648
|
+
}
|
|
9649
|
+
function toCompactFlowFeature(feature) {
|
|
9650
|
+
if (!feature) return null;
|
|
9651
|
+
return {
|
|
9652
|
+
ref: getFeatureRef2(feature),
|
|
9653
|
+
id: feature.id,
|
|
9654
|
+
slug: feature.slug,
|
|
9655
|
+
type: feature.type,
|
|
9656
|
+
issueNumber: feature.issueNumber,
|
|
9657
|
+
specStatus: feature.specStatus,
|
|
9658
|
+
planStatus: feature.planStatus,
|
|
9659
|
+
tasksDocStatus: feature.tasksDocStatus,
|
|
9660
|
+
currentStep: feature.currentStep,
|
|
9661
|
+
completion: {
|
|
9662
|
+
implementationDone: feature.completion.implementationDone,
|
|
9663
|
+
workflowDone: feature.completion.workflowDone
|
|
9664
|
+
},
|
|
9665
|
+
tasks: feature.tasks,
|
|
9666
|
+
completionChecklist: feature.completionChecklist,
|
|
9667
|
+
warnings: feature.warnings
|
|
9668
|
+
};
|
|
9669
|
+
}
|
|
9670
|
+
function toCompactFlowActionOption(option) {
|
|
9671
|
+
const base = {
|
|
9672
|
+
label: option.label,
|
|
9673
|
+
summary: option.summary,
|
|
9674
|
+
detail: option.detail,
|
|
9675
|
+
approvalPrompt: option.approvalPrompt,
|
|
9676
|
+
requiresRequestText: option.requiresRequestText,
|
|
9677
|
+
replyExample: option.replyExample,
|
|
9678
|
+
actionType: option.action.type,
|
|
9679
|
+
category: option.action.category,
|
|
9680
|
+
operationType: option.action.operationType,
|
|
9681
|
+
requiresUserCheck: !!option.action.requiresUserCheck
|
|
9682
|
+
};
|
|
9683
|
+
if (option.action.type === "command") {
|
|
9684
|
+
base.scope = option.action.scope;
|
|
9685
|
+
base.cwd = option.action.cwd;
|
|
9686
|
+
base.cmd = option.action.cmd;
|
|
9687
|
+
return base;
|
|
9688
|
+
}
|
|
9689
|
+
base.message = option.action.message;
|
|
9690
|
+
return base;
|
|
9691
|
+
}
|
|
9692
|
+
function toCompactFlowContextSnapshot(state) {
|
|
9693
|
+
const primaryAction = state.actionOptions[0] ?? null;
|
|
9694
|
+
return {
|
|
9695
|
+
status: state.status,
|
|
9696
|
+
reasonCode: toReasonCode(state.status),
|
|
9697
|
+
selectionMode: state.selectionMode,
|
|
9698
|
+
selectionFallback: state.selectionFallback,
|
|
9699
|
+
branches: state.branches,
|
|
9700
|
+
warnings: state.warnings,
|
|
9701
|
+
contextVersion: state.contextVersion,
|
|
9702
|
+
matchedFeature: toCompactFlowFeature(state.matchedFeature),
|
|
9703
|
+
candidateRefs: state.targetFeatures.length > 1 ? state.targetFeatures.map((feature) => getFeatureRef2(feature)) : [],
|
|
9704
|
+
completedCandidateRefs: state.selectionMode === "open" ? state.doneFeatures.map((feature) => getFeatureRef2(feature)) : [],
|
|
9705
|
+
openCandidateRefs: state.selectionMode === "open" ? state.openFeatures.map((feature) => getFeatureRef2(feature)) : [],
|
|
9706
|
+
inProgressCandidateRefs: state.selectionMode === "open" ? state.inProgressFeatures.map((feature) => getFeatureRef2(feature)) : [],
|
|
9707
|
+
readyToCloseCandidateRefs: state.selectionMode === "open" ? state.readyToCloseFeatures.map((feature) => getFeatureRef2(feature)) : [],
|
|
9708
|
+
actionOptions: state.actionOptions.map(
|
|
9709
|
+
(option) => toCompactFlowActionOption(option)
|
|
9710
|
+
),
|
|
9711
|
+
primaryActionLabel: primaryAction?.label ?? null,
|
|
9712
|
+
primaryActionType: primaryAction?.action.type ?? null,
|
|
9713
|
+
primaryActionCategory: primaryAction?.action.category ?? null,
|
|
9714
|
+
primaryActionOperationType: primaryAction?.action.operationType ?? null
|
|
9715
|
+
};
|
|
9716
|
+
}
|
|
9717
|
+
function toCompactAutoRun(autoRun) {
|
|
9718
|
+
if (!autoRun) return null;
|
|
9719
|
+
const lastExecution = autoRun.executions.length > 0 ? autoRun.executions[autoRun.executions.length - 1] : null;
|
|
9720
|
+
return {
|
|
9721
|
+
enabled: autoRun.enabled,
|
|
9722
|
+
status: autoRun.status,
|
|
9723
|
+
reasonCode: autoRun.reasonCode,
|
|
9724
|
+
untilCategories: autoRun.untilCategories,
|
|
9725
|
+
request: autoRun.request,
|
|
9726
|
+
preset: autoRun.preset ?? null,
|
|
9727
|
+
source: autoRun.source ?? null,
|
|
9728
|
+
iterations: autoRun.iterations,
|
|
9729
|
+
executionCount: autoRun.executions.length,
|
|
9730
|
+
lastExecution,
|
|
9731
|
+
gate: autoRun.gate ?? null,
|
|
9732
|
+
manual: autoRun.manual ?? null,
|
|
9733
|
+
resume: autoRun.resume,
|
|
9734
|
+
run: autoRun.run ?? null,
|
|
9735
|
+
error: autoRun.error ?? null
|
|
9736
|
+
};
|
|
9737
|
+
}
|
|
9738
|
+
function toCompactStatusReport(report) {
|
|
9739
|
+
if (!report || typeof report !== "object") return null;
|
|
9740
|
+
const payload = report;
|
|
9741
|
+
return {
|
|
9742
|
+
status: payload.status ?? null,
|
|
9743
|
+
reasonCode: payload.reasonCode ?? null,
|
|
9744
|
+
counts: payload.counts ?? null,
|
|
9745
|
+
recommendation: payload.recommendation ?? null
|
|
9746
|
+
};
|
|
9747
|
+
}
|
|
9533
9748
|
async function runAutoUntilCategory(config, featureName, selectionOptions, untilCategories, requestText, metadata) {
|
|
9534
9749
|
const contextArgs = ["context", ...buildSelectionArgs(featureName, selectionOptions)];
|
|
9535
9750
|
const gateSet = new Set(untilCategories);
|
|
@@ -9794,7 +10009,10 @@ async function runAutoUntilCategory(config, featureName, selectionOptions, until
|
|
|
9794
10009
|
}
|
|
9795
10010
|
}
|
|
9796
10011
|
function flowCommand(program2) {
|
|
9797
|
-
program2.command("flow [feature-name]").description("Run combined workflow checks (context + status + doctor)").option("--json", "Output in JSON format for agents").option(
|
|
10012
|
+
program2.command("flow [feature-name]").description("Run combined workflow checks (context + status + doctor)").option("--json", "Output in JSON format for agents").option(
|
|
10013
|
+
"--json-compact",
|
|
10014
|
+
"Output compact JSON for agents (implies --json, reduced duplication)"
|
|
10015
|
+
).option("--component <component>", "Component name for multi projects").option("--all", "Include completed features when auto-detecting").option("--done", "Show completed (workflow-done) features only").option(
|
|
9798
10016
|
"--request <text>",
|
|
9799
10017
|
"Apply a new user request first via user_request_replan when auto mode is enabled"
|
|
9800
10018
|
).option(
|
|
@@ -9823,7 +10041,7 @@ function flowCommand(program2) {
|
|
|
9823
10041
|
const lang = config?.lang ?? DEFAULT_LANG;
|
|
9824
10042
|
const cliError = toCliError(error);
|
|
9825
10043
|
const suggestions = getCliErrorSuggestions(cliError.code, lang);
|
|
9826
|
-
if (options.json) {
|
|
10044
|
+
if (options.json || options.jsonCompact) {
|
|
9827
10045
|
console.log(
|
|
9828
10046
|
JSON.stringify({
|
|
9829
10047
|
status: "error",
|
|
@@ -10070,12 +10288,38 @@ async function runFlow(featureName, options) {
|
|
|
10070
10288
|
);
|
|
10071
10289
|
}
|
|
10072
10290
|
}
|
|
10073
|
-
|
|
10291
|
+
const jsonMode = !!options.json || !!options.jsonCompact;
|
|
10292
|
+
if (jsonMode) {
|
|
10074
10293
|
const autoRunFailed = !!(autoRun && isAutoRunFailureStatus(autoRun.status));
|
|
10075
10294
|
const agentOrchestration2 = buildAgentOrchestrationPolicy2(autoRun);
|
|
10295
|
+
const status = autoRunFailed ? "error" : "ok";
|
|
10296
|
+
const reasonCode = autoRunFailed ? autoRun?.reasonCode || "AUTO_EXECUTION_FAILED" : "FLOW_SUMMARY";
|
|
10297
|
+
if (options.jsonCompact) {
|
|
10298
|
+
const compactPayload = {
|
|
10299
|
+
schema: "flow.v2.compact",
|
|
10300
|
+
status,
|
|
10301
|
+
reasonCode,
|
|
10302
|
+
context: {
|
|
10303
|
+
before: toCompactFlowContextSnapshot(before),
|
|
10304
|
+
after: toCompactFlowContextSnapshot(after)
|
|
10305
|
+
},
|
|
10306
|
+
approval: approvalResult,
|
|
10307
|
+
autoRun: toCompactAutoRun(autoRun),
|
|
10308
|
+
agentOrchestration: agentOrchestration2,
|
|
10309
|
+
statusReport: toCompactStatusReport(statusReport),
|
|
10310
|
+
doctorReport: toCompactStatusReport(doctorReport),
|
|
10311
|
+
strictChecks,
|
|
10312
|
+
suggestion: after.matchedFeature ? `npx lee-spec-kit context ${after.matchedFeature.folderName}${componentHint}` : `npx lee-spec-kit context${componentHint}`
|
|
10313
|
+
};
|
|
10314
|
+
console.log(JSON.stringify(compactPayload, null, 2));
|
|
10315
|
+
if (autoRunFailed) {
|
|
10316
|
+
process.exitCode = 1;
|
|
10317
|
+
}
|
|
10318
|
+
return;
|
|
10319
|
+
}
|
|
10076
10320
|
const payload = {
|
|
10077
|
-
status
|
|
10078
|
-
reasonCode
|
|
10321
|
+
status,
|
|
10322
|
+
reasonCode,
|
|
10079
10323
|
context: {
|
|
10080
10324
|
before: {
|
|
10081
10325
|
status: before.status,
|
|
@@ -12738,7 +12982,9 @@ function buildReportContent(input) {
|
|
|
12738
12982
|
- **Baseline**: ${input.fallback}
|
|
12739
12983
|
- **Skills**: ${skills}
|
|
12740
12984
|
- **Decision**: ${input.decision}
|
|
12741
|
-
- **
|
|
12985
|
+
- **Summary**: ${input.note}
|
|
12986
|
+
- **Evidence**:
|
|
12987
|
+
- TODO: review comments/paths/tests verified during pre-PR review
|
|
12742
12988
|
- **Trace**: pre-pr-review command executed and synced with tasks.md
|
|
12743
12989
|
`;
|
|
12744
12990
|
}
|