lee-spec-kit 0.9.3 → 0.9.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lee-spec-kit",
3
- "version": "0.9.3",
3
+ "version": "0.9.4",
4
4
  "description": "Document-centered harness engineering toolkit for AI agent development",
5
5
  "type": "module",
6
6
  "bin": {
@@ -117,6 +117,10 @@ When requirements/scope change, the “what to update” must be explicit in doc
117
117
  ## CLI Config (`.lee-spec-kit.json`)
118
118
 
119
119
  When you run `lee-spec-kit init`, it creates `.lee-spec-kit.json` in the docs root (default: `docs/`).
120
+ Interactive init lets you keep the recommended defaults or customize task
121
+ implementation delegation, Plan/Task/Feature reviews, and Local integration.
122
+ Non-interactive setup exposes the same choices through `--task-agent`,
123
+ `--reviews`, and `--completion-strategy`.
120
124
 
121
125
  - Used by `lee-spec-kit feature`, `config`, `update`, `detect`, and workflow validators to resolve docs location / project type / language.
122
126
  - `docsRepo`, `pushDocs`, `docsRemote` are metadata for the CLI-managed **Docs Push policy** (the CLI does not auto-push).
@@ -130,11 +134,23 @@ When you run `lee-spec-kit init`, it creates `.lee-spec-kit.json` in the docs ro
130
134
  - `docsRepo` ("embedded" | "standalone"): How docs are managed
131
135
  - `pushDocs` (boolean, optional): Only written when `docsRepo: "standalone"` (whether to push to remote)
132
136
  - `docsRemote` (string, optional): Only written when `pushDocs: true` (remote repo URL)
133
- - `workflow.prePrReview.reviewer` (object): Pre-PR subagent execution settings
137
+ - `workflow.agentExecution.task` (object): task implementation delegation settings
138
+ - `enabled`: delegates each `task_execute` action to a subagent; new and updated projects default to `true`
134
139
  - `type`: currently only `"subagent"` is supported
135
140
  - `model`: `"inherit"` or a model name supported by the runtime
136
141
  - `reasoningEffort`: `low | medium | high | xhigh | max | ultra`
137
142
  - `onUnavailable`: `inherit | error` when the requested model is unavailable
143
+ - `workflow-stage` returns a stable task ID, working/docs directories, and a machine-readable `workerContract`. The worker executes directly without rerunning `workflow-stage` or delegating again.
144
+ - The implementation subagent can edit project code and run task-scoped checks. The main agent retains docs, task state, commits, approvals, and remote actions; official hooks reject commits while `task_execute` is active.
145
+ - `workflow.agentReview.plan` / `workflow.agentReview.task` / `workflow.agentReview.feature` (object): Plan/task/Feature independent review settings
146
+ - `enabled`: enables that review gate; new projects default Plan and Feature to `true`, and task to `false`
147
+ - `evidenceMode`: `path_required | any`
148
+ - `reviewer`: fresh read-only subagent execution settings
149
+ - `type`: currently only `"subagent"` is supported
150
+ - `model`: `"inherit"` or a model name supported by the runtime
151
+ - `reasoningEffort`: `low | medium | high | xhigh | max | ultra`
152
+ - `onUnavailable`: `inherit | error` when the requested model is unavailable
153
+ - Plan review runs before Plan approval and binds its evidence to the exact `specHash` and `planHash` returned by `workflow-stage`; later spec/plan content changes require a fresh review
138
154
  - `workflow.baseBranch` (string): branch that receives a completed local Feature
139
155
  - `workflow.completionStrategy` (`"local-ff" | "local-squash" | "none"`): fast-forward, create one verified squash commit, or explicitly finish without integration
140
156
  - `workflow.deleteFeatureBranchAfterMerge` (boolean): delete the integrated local Feature branch after cleanup; remote branches are never deleted
@@ -171,14 +187,46 @@ When you run `lee-spec-kit init`, it creates `.lee-spec-kit.json` in the docs ro
171
187
  "deleteFeatureBranchAfterMerge": true,
172
188
  "featureChecks": [],
173
189
  "postMergeChecks": [],
174
- "prePrReview": {
175
- "evidenceMode": "path_required",
176
- "reviewer": {
190
+ "agentExecution": {
191
+ "task": {
192
+ "enabled": true,
177
193
  "type": "subagent",
178
194
  "model": "inherit",
179
195
  "reasoningEffort": "high",
180
196
  "onUnavailable": "inherit"
181
197
  }
198
+ },
199
+ "agentReview": {
200
+ "plan": {
201
+ "enabled": true,
202
+ "evidenceMode": "path_required",
203
+ "reviewer": {
204
+ "type": "subagent",
205
+ "model": "inherit",
206
+ "reasoningEffort": "high",
207
+ "onUnavailable": "inherit"
208
+ }
209
+ },
210
+ "task": {
211
+ "enabled": false,
212
+ "evidenceMode": "path_required",
213
+ "reviewer": {
214
+ "type": "subagent",
215
+ "model": "inherit",
216
+ "reasoningEffort": "high",
217
+ "onUnavailable": "inherit"
218
+ }
219
+ },
220
+ "feature": {
221
+ "enabled": true,
222
+ "evidenceMode": "path_required",
223
+ "reviewer": {
224
+ "type": "subagent",
225
+ "model": "inherit",
226
+ "reasoningEffort": "high",
227
+ "onUnavailable": "inherit"
228
+ }
229
+ }
182
230
  }
183
231
  },
184
232
  "allowedDocsEntries": {
@@ -192,7 +240,7 @@ When you run `lee-spec-kit init`, it creates `.lee-spec-kit.json` in the docs ro
192
240
  }
193
241
  ```
194
242
 
195
- New local projects use `local-ff`. Choose `local-squash` to create one base-branch commit while preserving the source Feature tip under an internal `refs/lee-spec-kit/integrations/*` ref for task-checkpoint evidence. During `update`, an existing local project with no explicit `completionStrategy` receives `none` so an upgrade does not unexpectedly merge its current branch. Set it to `local-ff` or `local-squash` deliberately when ready.
243
+ New and updated projects delegate task implementation and enable Plan review by default; set `workflow.agentExecution.task.enabled` or `workflow.agentReview.plan.enabled` to `false` to opt out. New local projects use `local-ff` with Feature agent review enabled. Set `workflow.agentReview.task.enabled` to `true` when every task also needs independent review. Choose `local-squash` to create one base-branch commit while preserving the source Feature tip under an internal `refs/lee-spec-kit/integrations/*` ref for task-checkpoint evidence. During `update`, an existing local project with no explicit `completionStrategy` receives `none` so an upgrade does not unexpectedly merge its current branch. Set it to `local-ff` or `local-squash` deliberately when ready.
196
244
 
197
245
  ```json
198
246
  {
@@ -52,9 +52,13 @@ This document defines workflow policy, not a custom runtime loop.
52
52
 
53
53
  - lee-spec-kit owns docs structure, workflow stages, and validators.
54
54
  - Codex owns the execution loop, tool usage, and hook lifecycle.
55
- - Do not start implementation unless `workflow-stage --json` reports `stage === "implementation"` and `implementationAllowed === true`.
56
- - When `workflow-stage --json` returns `nextAction.category: pre_pr_review` with `executor: subagent`, run a fresh, read-only subagent review using the returned `model`, `reasoningEffort`, and `onUnavailable` policy. Do not select or require a named review skill.
57
- - The Pre-PR review subagent returns findings without modifying code. The main agent remediates findings and records reviewer metadata and the final decision as evidence.
55
+ - Modify implementation code only when `implementationAllowed === true`. Normal task work uses `stage === "implementation"`; review fixes use `task_review_fix` or `feature_review_fix`, and verification fixes use `feature_remediation`.
56
+ - When `nextAction.category` is `plan_review` with `executor: subagent`, delegate a fresh read-only review of `spec.md` and `plan.md` for the returned `specHash` and `planHash`. The main agent records Plan Review evidence, decision, reviewer metadata, and both hashes. Any later spec/plan content change invalidates that review.
57
+ - When `nextAction.category` is `task_execute` with `executor: subagent`, mark that one task active, then delegate its implementation and task-scoped checks to a fresh subagent in the returned `workingDirectory` with the returned model, reasoning effort, unavailability policy, and exact `workerContract`. No named execution skill is required.
58
+ - The implementation worker executes directly, follows the approved Verification Contract, and does not add unplanned durable tests. It must not run `workflow-stage` or spawn another subagent. It may edit project code and run scoped checks, but it must not edit lee-spec-kit docs, change task state, commit, request approvals, or perform remote/destructive actions. The main agent inspects the result and owns docs synchronization, task transitions, commits, and workflow continuation; official hooks block commits while `task_execute` remains active.
59
+ - When `nextAction.category` is `task_review` with `executor: subagent`, delegate a fresh read-only review for the returned task ID and SHA/tree range.
60
+ - When `nextAction.category` is `pre_pr_review` with `executor: subagent`, run a fresh read-only Feature review using the returned model, reasoning effort, and SHA/tree range. Do not select or require a named review skill.
61
+ - Review subagents return findings without modifying code. The main agent remediates findings and records reviewer metadata, reviewed scope, evidence, decision, and exact hash/SHA/tree target metadata.
58
62
  - Treat spec/plan/tasks approval, issue creation, and branch creation as hard gates before implementation.
59
63
  - In standalone mode, do not hand-write `git worktree add`; run the exact `nextAction.command` from `workflow-stage` so the managed workspace path, stale directory cleanup, and `.env`/`.env.*` copy step stay consistent.
60
64
  - In local mode, do not stop after implementation approval. Follow the exact `local verify`, `local merge`, and `local cleanup` commands returned by `workflow-stage` until verified integration and cleanup produce `done`. A `feature_remediation` stage explicitly permits fixes in the Feature worktree.
@@ -20,10 +20,11 @@ This guide defines how to start or continue a feature in the Codex-native lee-sp
20
20
  - Docs are the SSOT. Follow the active feature docs directly.
21
21
  - Progress through the documented stages directly:
22
22
  - `spec.md` defines scope and review state
23
- - `plan.md` defines the implementation approach
23
+ - `plan.md` defines the implementation approach and Verification Contract
24
24
  - `tasks.md` drives execution order
25
25
  - `issue.md` / `pr.md` are part of the stage gate once the feature reaches GitHub workflow stages
26
26
  - Do not begin implementation just because `tasks.md` exists. Implementation starts only when `workflow-stage --json` allows it.
27
+ - When Plan review is enabled, move `plan.md` to Review, delegate the returned fresh read-only `plan_review`, and record its evidence, decision, reviewer metadata, `specHash`, and `planHash`. Only an approved review of the current hashes can reach Plan approval. The reviewer challenges NONE/UPDATE/ADD decisions, requirement coverage, independent oracles, stable observation boundaries, realistic failure/rollback cases, exclusions, and focused/full verification scope without editing docs.
27
28
  - When scope or behavior changes, update the active feature docs in the same turn before continuing.
28
29
  - Ask for approval at documented review checkpoints and before remote or destructive actions.
29
30
  - Use `npx lee-spec-kit commit-audit --json` before `git commit` when docs-path validation matters.
@@ -25,15 +25,16 @@ When `workflow-stage --json` returns `nextAction.executor: subagent`, delegate t
25
25
  2. Inspect regression, exception handling, critical/security risks, side effects, user flow impact, and release readiness.
26
26
  3. Check maintainability: split oversized functions/files when needed, reuse/integrate existing code where appropriate, and remove obsolete code.
27
27
  4. Judge whether the implementation actually fits the feature intent and scope documented in `spec.md` / `plan.md` / `tasks.md`.
28
- 5. When `workflow.prePrReview.evidenceMode=path_required` (default), generate a real review artifact such as `review-trace.json` before approval. In `evidenceMode=any`, direct record mode without a separate artifact is also allowed unless execution evidence is explicitly enforced.
28
+ 5. When `workflow.agentReview.feature.evidenceMode=path_required` (default), generate a real review artifact such as `review-trace.json` before approval. In `evidenceMode=any`, direct record mode without a separate artifact is also allowed unless execution evidence is explicitly enforced.
29
29
  6. `Pre-PR Evidence` should follow the configured evidence policy. In `path_required`, it must point to a real existing path.
30
30
  7. Record `Summary`, `Feature Intent Summary`, `Implementation Fit`, `Missing Cases`, `Spec Alignment Checked`, `Finding Count`, `Blocking Findings`, `Findings`, and `Residual Risks` with non-placeholder content.
31
31
  8. Use `commandsExecuted` only for optional audit/targeted verification that you actually chose to run during review.
32
32
  9. In code-review stage, keep `PR Review Evidence/Decision` aligned with `decisions.md` by adding a `PR Review Log` section with `Summary` and `Decision`.
33
33
  10. `Pre-PR Decision` must use `decision: approve|changes_requested|blocked ...` (or `결정: ...`).
34
- 11. Ensure the final decision is `approve` before moving to PR creation.
34
+ 11. Confirm `Pre-PR Reviewed Head` and `Pre-PR Reviewed Tree` match the `targetSha` and `targetTree` returned by `workflow-stage`.
35
+ 12. Ensure the final decision is `approve` before moving to PR creation.
35
36
 
36
- The review artifact must record the actual `executor`, `model`, `reasoningEffort`, reviewed commit/diff scope, findings, and final decision. The review subagent must not modify code; the main agent owns finding remediation and documentation updates.
37
+ The review artifact must record the actual `executor`, `model`, `reasoningEffort`, reviewed commit/diff scope, target SHA/tree, findings, and final decision. The review subagent must not modify code; the main agent owns finding remediation and documentation updates.
37
38
 
38
39
  ---
39
40
 
@@ -13,11 +13,17 @@ Use the active feature folder as the execution SSOT.
13
13
  - continue the single `[DOING]` task, or
14
14
  - move the next highest-priority `[TODO]` task to `[DOING]`
15
15
  - Work one task at a time. Do not batch-complete multiple tasks in one pass.
16
+ - When `nextAction.executor === "subagent"`, delegate that task's implementation and task-scoped verification to a fresh subagent in `nextAction.workingDirectory` using the returned `model`, `reasoningEffort`, `onUnavailable`, and exact `workerContract`. If a requested model is unavailable, `inherit` means retry with the current model inherited and `error` means stop and report the failure.
17
+ - The implementation worker executes the assigned task directly. It must not run `workflow-stage`, delegate again, edit lee-spec-kit docs, change task state, commit, request approval, or perform remote/destructive actions. It may edit project code and run task-scoped checks only.
18
+ - The implementation worker follows the approved `plan.md` Verification Contract: `NONE` adds no durable test, `UPDATE` minimally changes the owning existing test, and `ADD` adds only contract-linked tests. If the approved decision is insufficient, report the gap to the main agent instead of expanding test scope.
19
+ - Legacy task lines without an explicit ID receive a stable synthetic `taskId` from `workflow-stage`; use that returned ID without rewriting the legacy task solely to add an ID.
16
20
 
17
21
  ## 2. Execute and record
18
22
 
19
23
  - Keep `tasks.md` aligned with reality:
20
24
  - do not mark `[DONE]` without real completion and verification
25
+ - when `workflow.agentReview.task.enabled=true`, move completed implementation to `[REVIEW]` instead of `[DONE]`, create the checkpoint commit, and run the independent review
26
+ - move `[REVIEW]` to `[DONE]` only after the task reviewer approves the current SHA/tree
21
27
  - update `Acceptance` and `Checklist` in the same edit when closing a task
22
28
  - if a completed task needs follow-up, add a new task instead of rewriting history
23
29
  - If you need to add a new task, append a complete task block in `tasks.md` with a concrete title, `Acceptance`, `Checklist`, and `NON-PRD` or existing `PRD-*` tag.
@@ -33,6 +39,7 @@ Use the active feature folder as the execution SSOT.
33
39
  ## 4. Commit and stop guardrails
34
40
 
35
41
  - Before `git commit`, use `npx lee-spec-kit commit-audit --json` when docs-path validation matters.
42
+ - The main agent, never the implementation subagent, owns docs/project commits and the task checkpoint.
36
43
  - Before stopping, use `npx lee-spec-kit workflow-audit --json` if code or feature docs changed.
37
44
  - Keep one row per test command in the `tasks.md` test log and update that row on reruns instead of appending duplicates.
38
45
 
@@ -40,7 +47,7 @@ Use the active feature folder as the execution SSOT.
40
47
 
41
48
  - Ask for approval only at documented review checkpoints and before remote or destructive actions.
42
49
  - Before issue creation, PR creation, push, merge, or similar remote actions, share the exact artifact or plan first.
43
- - Codex may delegate implementation work, but docs updates, approval handling, and remote actions stay with the main session.
50
+ - Delegate Plan/task/Feature review to the fresh read-only subagent and exact hash/SHA/tree target returned by `workflow-stage`; keep docs updates, finding remediation, approval handling, and remote actions in the main session.
44
51
 
45
52
  ## Strict Rules
46
53
 
@@ -57,9 +57,13 @@ npx lee-spec-kit workflow-stage <feature-ref> --json
57
57
 
58
58
  Use the returned `stage`, `nextAction`, and `implementationAllowed` values as the current workflow state.
59
59
 
60
+ With Plan review enabled, planning follows `plan Review → fresh read-only Plan review → plan approval`. The review is bound to the returned `specHash` and `planHash`; changing either document's content invalidates the prior evidence. The reviewer checks the Verification Contract and test decisions without editing docs.
61
+
60
62
  The three final completion checkboxes in `tasks.md` carry `lee-spec-kit:completion:*` HTML markers. You may customize their visible wording, but preserve the marker on each checkbox line; `workflow-stage` uses the marker as the machine-readable identity and falls back to the legacy canonical wording for older projects.
61
63
 
62
- In a local workflow with `completionStrategy: "local-ff"` or `"local-squash"`, completion is `implementation_approve → feature_verify → local_merge → local_cleanup → done`. Failed checks enter `feature_remediation` with implementation enabled. `local-ff` moves only the verified Feature SHA; `local-squash` requires the integration tree to match the verified Feature tree. Both require cleanup before `done`. After cleanup, a Feature remains `done` while its recorded integration commit is still an ancestor of the current base, even when later Features advance that base.
64
+ With Feature agent review enabled, local completion is `feature review implementation_approve → feature_verify → local_merge → local_cleanup → done`. With task review enabled, every task follows `DOING → REVIEW → task review → DONE`. Failed checks enter `feature_remediation` with implementation enabled. `local-ff` moves only the verified Feature SHA; `local-squash` requires the integration tree to match the verified Feature tree. Both require cleanup before `done`. After cleanup, a Feature remains `done` while its recorded integration commit is still an ancestor of the current base, even when later Features advance that base.
65
+
66
+ When `workflow.agentExecution.task.enabled=true`, each `task_execute` action carries the configured subagent model, reasoning effort, stable task ID, implementation working directory, and a machine-readable `workerContract`. The worker executes directly without calling `workflow-stage` or delegating again. It follows the approved Verification Contract, does not add unplanned durable tests, edits project code, and runs task-scoped checks only; the main agent owns docs synchronization, task transitions, commits, approvals, and remote actions. Official hooks block commits until the main agent advances the workflow to `task_commit`.
63
67
 
64
68
  A remediation commit invalidates verification and the prior local-merge confirmation. Refresh review evidence for the changed diff when Pre-PR review is enabled, verify the new tip, and obtain local-merge approval again.
65
69
 
@@ -124,20 +128,24 @@ Keeping the shared artifact for history is fine, but when it conflicts with feat
124
128
  | Scope | Field | Values |
125
129
  | --- | --- | --- |
126
130
  | Document status | `Status` in `spec.md`/`plan.md`, `Doc Status` in `tasks.md` | `Draft` \| `Review` \| `Approved` |
131
+ | Plan review status | `Plan Review` in `plan.md` | `Pending` \| `Running` \| `Done` |
132
+ | Plan review evidence/decision | `Plan Review Evidence` / `Plan Review Decision` | evidence path and `decision: approve\|changes_requested\|blocked ...` |
133
+ | Plan review target | `Plan Reviewed Spec Hash` / `Plan Reviewed Plan Hash` | current content hashes returned by `workflow-stage` |
127
134
  | Issue doc status | `Status` in `issue.md` | `Draft` \| `Ready` |
128
135
  | PR doc status | `Status` in `pr.md` | `Draft` \| `Ready` |
129
136
  | PR review status | `PR Status` in `tasks.md` | `Review` \| `Approved` |
130
137
  | Pre-PR review status | `Pre-PR Review` in `tasks.md` | `Pending` \| `Done` |
131
138
  | Pre-PR review evidence | `Pre-PR Evidence` in `tasks.md` | evidence link/log/doc path |
132
139
  | Pre-PR review decision | `Pre-PR Decision` in `tasks.md` | `decision: approve\|changes_requested\|blocked ...` |
140
+ | Pre-PR review target | `Pre-PR Reviewed Head` / `Pre-PR Reviewed Tree` | current SHA/tree returned by `workflow-stage` |
133
141
  | PR review evidence | `PR Review Evidence` in `tasks.md` | evidence link/log/doc path |
134
142
  | PR review decision | `PR Review Decision` in `tasks.md` | `decision: ...` (or `결정: ...`) |
135
143
 
136
144
  ---
137
145
 
138
- ## Pre-PR Subagent Checklist
146
+ ## Agent Review Checklist
139
147
 
140
- Delegate every Pre-PR review to a fresh, read-only subagent using the model and reasoning effort returned by `workflow-stage --json`. The subagent follows `agents/skills/create-pr.md` (`Pre-PR Baseline Checklist`); the main agent owns finding remediation and evidence recording.
148
+ Delegate Plan, task, and Feature reviews to fresh, read-only subagents using the model, reasoning effort, and exact target returned by `workflow-stage --json`. Plan review covers current spec/plan content hashes, task review covers its checkpoint range, and Feature review covers the base-to-Feature-tip diff. The subagent returns defect-focused findings without modifying code or docs; the main agent owns remediation and evidence recording. No named review skill is required.
141
149
 
142
150
  ---
143
151
 
@@ -146,7 +154,7 @@ Delegate every Pre-PR review to a fresh, read-only subagent using the model and
146
154
  | File | Role | When to Write |
147
155
  | -------------- | ------------------------- | ------------------- |
148
156
  | `spec.md` | **What and Why** | Feature definition |
149
- | `plan.md` | **How** (technical) | After spec approval |
157
+ | `plan.md` | **How** + Verification Contract | After spec approval |
150
158
  | `tasks.md` | Specific work items | After plan approval |
151
159
  | `issue.md` | Issue draft + issue state (`Draft/Ready`) | Before/when creating issue |
152
160
  | `pr.md` | PR draft + PR state (`Draft/Ready`) | Before/when creating PR |
@@ -12,6 +12,16 @@
12
12
  - **Created**: {YYYY-MM-DD}
13
13
  - **Status**: -
14
14
  - Values: Draft | Review | Approved
15
+ - **Plan Review**: Pending
16
+ - Values: Pending | Running | Done
17
+ - **Plan Review Evidence**: -
18
+ - Example: `docs/features/F001-foo/decisions.md` or another existing review artifact under the docs root
19
+ - **Plan Review Decision**: -
20
+ - Format: `decision: approve|changes_requested|blocked ...`
21
+ - **Plan Reviewed Spec Hash**: -
22
+ - Exact `specHash` returned by `workflow-stage --json`
23
+ - **Plan Reviewed Plan Hash**: -
24
+ - Exact `planHash` returned by `workflow-stage --json`
15
25
 
16
26
  ---
17
27
 
@@ -37,11 +47,38 @@ src/
37
47
 
38
48
  ---
39
49
 
40
- ## Test Strategy
50
+ ## Verification Contract
41
51
 
42
- - **Unit Tests**:
43
- - **Integration Tests**:
44
- - **E2E Tests**:
52
+ ### Change Classification
53
+
54
+ - **Type**: COPY | REFACTOR | BUG_FIX | NEW_BEHAVIOR | HIGH_RISK
55
+ - **Risk**: LOW | MEDIUM | HIGH
56
+
57
+ ### Observable Contract
58
+
59
+ - **Supported behavior**:
60
+ - **Preconditions**:
61
+ - **Success guarantees**:
62
+ - **Important failure guarantees**:
63
+ - **Intentionally unsupported cases**:
64
+
65
+ ### Test Decisions
66
+
67
+ | Contract / Requirement | Decision | Test Level | Realistic Regression Protected | Independent Oracle |
68
+ | ---------------------- | -------- | ---------- | ------------------------------ | ------------------ |
69
+ | (AC/FR reference) | NONE \| UPDATE \| ADD | Unit \| Integration \| E2E \| Non-test | (failure this prevents) | (spec/released behavior/external reference) |
70
+
71
+ ### Excluded Tests
72
+
73
+ - (duplicates, implementation details, unsupported synthetic inputs, or framework behavior intentionally not tested)
74
+
75
+ ### Verification Execution
76
+
77
+ - **During implementation**:
78
+ - **Before task completion**:
79
+ - **Before Feature completion**:
80
+ - **Manual/UI verification**:
81
+ - **Full suite required**: Yes | No — (reason)
45
82
 
46
83
  ---
47
84
 
@@ -2,10 +2,12 @@
2
2
 
3
3
  ## Task Rules
4
4
 
5
- - **Status**: `[TODO]` → `[DOING]` → `[DONE]`
5
+ - **Status**: normally `[TODO]` → `[DOING]` → `[DONE]`; when `workflow.agentReview.task.enabled=true`, use `[DOING]` → `[REVIEW]` → `[DONE]`
6
+ - **Implementation delegation**: when `workflow.agentExecution.task.enabled=true`, the configured worker follows the returned `workerContract`, executes directly without running `workflow-stage` or delegating again, and may edit project code plus run task-scoped checks only; the main agent retains this document, task state, commits, approvals, and remote actions.
6
7
  - **Task communication / confirmation**:
7
8
  - `[TODO] → [DOING]`: share the task title first, then update the task state in `tasks.md`
8
- - `[DOING] → [DONE]`: share the result and verification first, then update `Acceptance` and `Checklist` in the same edit
9
+ - `[DOING] → [REVIEW]/[DONE]`: share the result and verification first, then update `Acceptance` and `Checklist` in the same edit
10
+ - `[REVIEW] → [DONE]`: record the fresh task review evidence, decision, reviewed head, and reviewed tree before completion
9
11
  - Ask for approval before changing task state only when the task crosses a documented review checkpoint or before remote/destructive actions.
10
12
  - Do not invent a standalone `OK` approval step when the workflow does not require one.
11
13
  - Do not mark `[DONE]` while any item in that task's `Checklist` remains unchecked.
@@ -39,7 +41,10 @@
39
41
  - **Pre-PR Decision**: -
40
42
  - Format: `decision: approve|changes_requested|blocked ...` (or `결정: ...`)
41
43
  - PR creation requires final decision `approve`
42
- - Follow `agents/skills/create-pr.md` (`Pre-PR Baseline Checklist`) as the default baseline
44
+ - **Pre-PR Reviewed Head**: -
45
+ - Project code commit SHA reviewed by the Feature reviewer
46
+ - **Pre-PR Reviewed Tree**: -
47
+ - Project code tree SHA reviewed by the Feature reviewer
43
48
  - **PR Review**: -
44
49
  - Values: Pending | Running | Done
45
50
  - Mark `Running` when PR review handoff starts; use `Done` only if your team explicitly tracks review completion here
@@ -59,6 +64,10 @@
59
64
  - (verification condition)
60
65
  - Checklist:
61
66
  - [ ] (subtask)
67
+ - Review Evidence: -
68
+ - Review Decision: -
69
+ - Reviewed Head: -
70
+ - Reviewed Tree: -
62
71
  ```
63
72
 
64
73
  > `PRD-FR-001` in the example is just one valid `PRD-*` key. If the key is not defined in the PRD source yet, do not add it to tasks first.
@@ -117,6 +117,9 @@ npx lee-spec-kit docs get agents --json
117
117
  ## CLI 설정 파일 (`.lee-spec-kit.json`)
118
118
 
119
119
  `lee-spec-kit init`을 실행하면 문서 루트(기본: `docs/`)에 `.lee-spec-kit.json`이 생성됩니다.
120
+ 대화형 init에서는 권장 설정을 그대로 쓰거나 Task 구현 위임, Plan/Task/Feature 검수,
121
+ Local 통합 방식을 직접 선택할 수 있습니다. 비대화형 실행에서는 `--task-agent`,
122
+ `--reviews`, `--completion-strategy`로 같은 값을 지정합니다.
120
123
 
121
124
  - `lee-spec-kit feature`, `config`, `update`, `detect`, workflow validator에서 문서 위치/프로젝트 타입/언어를 해석하는 용도로 사용됩니다.
122
125
  - `docsRepo`, `pushDocs`, `docsRemote`는 CLI 관리 **Docs Push 정책**을 위한 메타데이터입니다. (자동 push는 하지 않습니다)
@@ -130,11 +133,23 @@ npx lee-spec-kit docs get agents --json
130
133
  - `docsRepo` ("embedded" | "standalone"): Docs 관리 방식
131
134
  - `pushDocs` (boolean, optional): `docsRepo: "standalone"`일 때만 생성 (원격 push 여부)
132
135
  - `docsRemote` (string, optional): `pushDocs: true`일 때만 생성 (원격 레포 URL)
133
- - `workflow.prePrReview.reviewer` (object): Pre-PR 서브에이전트 실행 설정
136
+ - `workflow.agentExecution.task` (object): 태스크 구현 위임 설정
137
+ - `enabled`: 각 `task_execute`를 서브에이전트에게 위임할지 여부. 새 프로젝트와 업데이트된 프로젝트의 기본값은 `true`
134
138
  - `type`: 현재 `"subagent"`만 지원
135
139
  - `model`: `"inherit"` 또는 런타임이 지원하는 모델명
136
140
  - `reasoningEffort`: `low | medium | high | xhigh | max | ultra`
137
141
  - `onUnavailable`: 지정 모델을 사용할 수 없을 때 `inherit | error`
142
+ - `workflow-stage`는 안정적인 태스크 ID, 작업/docs 경로, machine-readable `workerContract`를 반환합니다. worker는 `workflow-stage` 재호출이나 재위임 없이 직접 실행합니다.
143
+ - 구현 서브에이전트는 프로젝트 코드와 태스크 범위 검사를 담당하고, 메인 에이전트는 문서, 태스크 상태, 커밋, 승인, 원격 작업을 유지합니다. 공식 hook은 `task_execute` 중 커밋을 거부합니다.
144
+ - `workflow.agentReview.plan` / `workflow.agentReview.task` / `workflow.agentReview.feature` (object): Plan/태스크/Feature 독립 리뷰 설정
145
+ - `enabled`: 해당 리뷰 게이트 활성화 여부. 새 프로젝트는 Plan과 Feature `true`, task `false`
146
+ - `evidenceMode`: `path_required | any`
147
+ - `reviewer`: fresh 읽기 전용 서브에이전트 실행 설정
148
+ - `type`: 현재 `"subagent"`만 지원
149
+ - `model`: `"inherit"` 또는 런타임이 지원하는 모델명
150
+ - `reasoningEffort`: `low | medium | high | xhigh | max | ultra`
151
+ - `onUnavailable`: 지정 모델을 사용할 수 없을 때 `inherit | error`
152
+ - Plan 검수는 Plan 승인 전에 실행되며 `workflow-stage`가 반환한 정확한 `specHash`와 `planHash`에 evidence를 묶습니다. 이후 spec/plan 내용이 바뀌면 fresh 검수가 필요합니다.
138
153
  - `workflow.baseBranch` (string): 완료된 local Feature를 통합할 기준 브랜치
139
154
  - `workflow.completionStrategy` (`"local-ff" | "local-squash" | "none"`): fast-forward, 검증된 단일 squash commit 생성, 또는 명시적으로 통합 없이 종료
140
155
  - `workflow.deleteFeatureBranchAfterMerge` (boolean): cleanup 후 통합된 local Feature 브랜치 삭제 여부. 원격 브랜치는 삭제하지 않음
@@ -171,14 +186,46 @@ npx lee-spec-kit docs get agents --json
171
186
  "deleteFeatureBranchAfterMerge": true,
172
187
  "featureChecks": [],
173
188
  "postMergeChecks": [],
174
- "prePrReview": {
175
- "evidenceMode": "path_required",
176
- "reviewer": {
189
+ "agentExecution": {
190
+ "task": {
191
+ "enabled": true,
177
192
  "type": "subagent",
178
193
  "model": "inherit",
179
194
  "reasoningEffort": "high",
180
195
  "onUnavailable": "inherit"
181
196
  }
197
+ },
198
+ "agentReview": {
199
+ "plan": {
200
+ "enabled": true,
201
+ "evidenceMode": "path_required",
202
+ "reviewer": {
203
+ "type": "subagent",
204
+ "model": "inherit",
205
+ "reasoningEffort": "high",
206
+ "onUnavailable": "inherit"
207
+ }
208
+ },
209
+ "task": {
210
+ "enabled": false,
211
+ "evidenceMode": "path_required",
212
+ "reviewer": {
213
+ "type": "subagent",
214
+ "model": "inherit",
215
+ "reasoningEffort": "high",
216
+ "onUnavailable": "inherit"
217
+ }
218
+ },
219
+ "feature": {
220
+ "enabled": true,
221
+ "evidenceMode": "path_required",
222
+ "reviewer": {
223
+ "type": "subagent",
224
+ "model": "inherit",
225
+ "reasoningEffort": "high",
226
+ "onUnavailable": "inherit"
227
+ }
228
+ }
182
229
  }
183
230
  },
184
231
  "allowedDocsEntries": {
@@ -192,7 +239,7 @@ npx lee-spec-kit docs get agents --json
192
239
  }
193
240
  ```
194
241
 
195
- 새 local 프로젝트는 `local-ff`를 사용합니다. base branch에 하나의 commit만 남기려면 `local-squash`를 선택하세요. 이때 task checkpoint 증거를 위해 원본 Feature tip을 내부 `refs/lee-spec-kit/integrations/*` ref로 보존합니다. 기존 local 프로젝트에 명시적 `completionStrategy`가 없으면 `update`가 `none`을 넣어 업그레이드 도중 현재 브랜치를 갑자기 병합하지 않습니다. 준비가 끝난 뒤 `local-ff` 또는 `local-squash`로 명시적으로 전환하세요.
242
+ 프로젝트와 업데이트된 프로젝트는 기본적으로 태스크 구현을 위임하고 Plan 검수를 활성화합니다. 직접 구현하거나 Plan 검수를 끄려면 각각 `workflow.agentExecution.task.enabled` 또는 `workflow.agentReview.plan.enabled`를 `false`로 설정하세요. 새 local 프로젝트는 `local-ff`와 Feature agent review를 사용합니다. 태스크마다 리뷰하려면 `workflow.agentReview.task.enabled`를 `true`로 켜세요. base branch에 하나의 commit만 남기려면 `local-squash`를 선택하세요. 이때 task checkpoint 증거를 위해 원본 Feature tip을 내부 `refs/lee-spec-kit/integrations/*` ref로 보존합니다. 기존 local 프로젝트에 명시적 `completionStrategy`가 없으면 `update`가 `none`을 넣어 업그레이드 도중 현재 브랜치를 갑자기 병합하지 않습니다. 준비가 끝난 뒤 `local-ff` 또는 `local-squash`로 명시적으로 전환하세요.
196
243
 
197
244
  ```json
198
245
  {
@@ -52,9 +52,13 @@
52
52
 
53
53
  - lee-spec-kit은 문서 구조, workflow 단계, validator를 담당합니다.
54
54
  - Codex는 실행 루프, 도구 사용, hook lifecycle을 담당합니다.
55
- - `workflow-stage --json`가 `stage === "implementation"`이고 `implementationAllowed === true`를 반환하기 전에는 구현을 시작하지 않습니다.
56
- - `workflow-stage --json`의 `nextAction.category`가 `pre_pr_review`이고 `executor`가 `subagent`이면, 반환된 `model`, `reasoningEffort`, `onUnavailable` 정책으로 fresh context의 읽기 전용 서브에이전트 리뷰를 실행합니다. 리뷰 스킬 이름을 선택하거나 요구하지 않습니다.
57
- - Pre-PR 리뷰 서브에이전트는 finding만 반환하며 코드를 수정하지 않습니다. 메인 에이전트가 finding을 반영하고 reviewer metadata와 최종 decision을 evidence에 기록합니다.
55
+ - `implementationAllowed === true`일 때만 구현 코드를 수정합니다. 일반 태스크 구현은 `stage === "implementation"`에서, 리뷰 수정은 `task_review_fix` 또는 `feature_review_fix`에서, 검증 수정은 `feature_remediation`에서만 수행합니다.
56
+ - `nextAction.category`가 `plan_review`이고 `executor`가 `subagent`이면 반환된 `specHash`와 `planHash`를 대상으로 fresh 읽기 전용 서브에이전트가 `spec.md`와 `plan.md`를 검수합니다. 메인 에이전트가 Plan 검수 evidence, decision, reviewer metadata와 hash를 기록하며 이후 spec/plan 내용 변경은 기존 검수를 무효화합니다.
57
+ - `nextAction.category`가 `task_execute`이고 `executor`가 `subagent`이면 해당 태스크 하나를 활성화한 뒤, 반환된 `workingDirectory`에서 fresh 서브에이전트에게 반환된 모델·추론도·unavailability 정책과 정확한 `workerContract`로 구현과 태스크 범위 검증을 위임합니다. 특정 이름의 실행 스킬은 요구하지 않습니다.
58
+ - 구현 worker는 승인된 Verification Contract를 따르고 계획되지 않은 영구 테스트를 추가하지 않으며 직접 실행합니다. `workflow-stage`를 호출하거나 다른 서브에이전트를 생성하지 않습니다. 프로젝트 코드 수정과 범위 내 검사는 수행할 수 있지만 lee-spec-kit 문서 수정, 태스크 상태 변경, 커밋, 승인 요청, 원격/파괴적 작업은 하지 않습니다. 메인 에이전트가 결과를 확인하고 문서 동기화, 태스크 전환, 커밋, 후속 workflow를 소유하며, 공식 hook은 `task_execute`가 활성화된 동안 커밋을 차단합니다.
59
+ - `nextAction.category`가 `task_review`이고 `executor`가 `subagent`이면 반환된 task ID와 SHA/tree 범위를 fresh context의 읽기 전용 서브에이전트가 리뷰합니다.
60
+ - `nextAction.category`가 `pre_pr_review`이고 `executor`가 `subagent`이면 반환된 모델·추론도·SHA/tree 범위로 fresh context의 읽기 전용 Feature 리뷰를 실행합니다. 리뷰 스킬 이름을 선택하거나 요구하지 않습니다.
61
+ - 리뷰 서브에이전트는 finding만 반환하고 코드를 수정하지 않습니다. 메인 에이전트가 finding을 반영하고 reviewer metadata, reviewed scope, evidence, decision, 정확한 hash/SHA/tree target metadata를 기록합니다.
58
62
  - spec / plan / tasks 승인, issue 생성, branch 생성은 구현 전 하드 게이트로 취급합니다.
59
63
  - standalone 모드에서는 `git worktree add`를 직접 만들지 말고 `workflow-stage`의 정확한 `nextAction.command`를 실행해 managed workspace 경로, stale 디렉터리 정리, `.env`/`.env.*` 복사 단계가 일관되게 유지되도록 합니다.
60
64
  - local 모드에서는 구현 승인 직후 종료하지 않습니다. `workflow-stage`가 반환하는 정확한 `local verify`, `local merge`, `local cleanup` 명령을 따라 검증·통합·정리가 확인되어 `done`이 될 때까지 진행합니다. `feature_remediation` 단계에서는 Feature worktree 수정이 명시적으로 허용됩니다.
@@ -20,10 +20,11 @@
20
20
  - 문서가 SSOT입니다. 활성 feature 문서를 직접 따라갑니다.
21
21
  - 문서 단계는 직접 따라갑니다:
22
22
  - `spec.md`는 범위와 리뷰 상태를 정의합니다
23
- - `plan.md`는 구현 접근을 정의합니다
23
+ - `plan.md`는 구현 접근과 Verification Contract를 정의합니다
24
24
  - `tasks.md`는 실제 실행 순서를 정의합니다
25
25
  - `issue.md`, `pr.md`는 GitHub 단계에 들어가면 stage gate의 일부로 사용합니다
26
26
  - `tasks.md`가 있다고 바로 구현하지 않습니다. 구현은 `workflow-stage --json`가 허용할 때만 시작합니다.
27
+ - Plan 검수가 활성화되어 있으면 `plan.md`를 Review로 바꾸고 반환된 fresh 읽기 전용 `plan_review`를 위임한 뒤 evidence, decision, reviewer metadata, `specHash`, `planHash`를 기록합니다. 현재 hash에 대한 approve 검수만 Plan 승인으로 이어질 수 있습니다. reviewer는 문서를 수정하지 않고 NONE/UPDATE/ADD 결정, 요구사항 커버리지, 독립적인 Oracle, 안정적인 관찰 경계, 현실적인 실패/롤백, 제외 범위, focused/full 검증 범위를 점검합니다.
27
28
  - 범위나 동작이 바뀌면 같은 턴 안에서 활성 feature 문서를 같이 업데이트합니다.
28
29
  - 사용자 승인은 문서화된 review checkpoint와 원격/파괴적 작업 전에만 요청합니다.
29
30
  - docs 경로 검사가 중요하면 `git commit` 전에 `npx lee-spec-kit commit-audit --json`를 사용합니다.
@@ -25,15 +25,16 @@ Pre-PR 리뷰에서 서브에이전트가 항상 수행하는 최소 기준입
25
25
  2. 회귀/예외 처리, 크리티컬·보안 리스크, 사이드 이펙트, 사용자 흐름 영향, 배포 준비도를 점검합니다.
26
26
  3. 유지보수성을 점검합니다: 큰 함수/파일은 필요 시 분리하고, 기존 코드 재사용·통합 가능성을 확인하며, 불필요해진 코드를 정리합니다.
27
27
  4. 현재 구현이 `spec.md` / `plan.md` / `tasks.md`에 기록된 feature 의도와 범위에 실제로 맞는지 평가합니다.
28
- 5. `workflow.prePrReview.evidenceMode=path_required`(기본)일 때는 승인 전에 `review-trace.json` 같은 실제 리뷰 산출물을 남깁니다. `evidenceMode=any`에서는 실행 증거 강제가 없는 한 별도 산출물 없이 직접 기록하는 경로도 허용됩니다.
28
+ 5. `workflow.agentReview.feature.evidenceMode=path_required`(기본)일 때는 승인 전에 `review-trace.json` 같은 실제 리뷰 산출물을 남깁니다. `evidenceMode=any`에서는 실행 증거 강제가 없는 한 별도 산출물 없이 직접 기록하는 경로도 허용됩니다.
29
29
  6. `PR 전 리뷰 Evidence`는 설정된 evidence 정책을 따라야 합니다. `path_required`일 때는 실제 존재하는 문서 경로를 사용합니다.
30
30
  7. `Summary`, `Feature Intent Summary`, `Implementation Fit`, `Missing Cases`, `Spec Alignment Checked`, `Finding Count`, `Blocking Findings`, `Findings`, `Residual Risks`를 placeholder 없이 기록합니다.
31
31
  8. 리뷰 중에 audit/타깃 검증 명령을 실제로 실행했다면 그때만 `commandsExecuted`에 기록합니다.
32
32
  9. 코드리뷰 단계에서도 `PR 리뷰 Evidence/Decision`과 `decisions.md`를 동기화하고 `PR Review Log`(또는 `PR 리뷰 로그`)의 `Summary`/`Decision`을 기록합니다.
33
33
  10. `PR 전 리뷰 Decision`은 `결정: approve|changes_requested|blocked ...` (또는 `decision: ...`) 형식을 사용합니다.
34
- 11. PR 생성 단계로 이동하기최종 Decision이 `approve`인지 확인합니다.
34
+ 11. `PR 리뷰 Head`와 `PR 리뷰 Tree`가 `workflow-stage`의 `targetSha`와 `targetTree`와 일치하는지 확인합니다.
35
+ 12. PR 생성 단계로 이동하기 전 최종 Decision이 `approve`인지 확인합니다.
35
36
 
36
- 리뷰 산출물에는 실제 사용한 `executor`, `model`, `reasoningEffort`, 검토한 commit/diff 범위, finding과 최종 decision을 기록합니다. 리뷰 서브에이전트는 코드를 수정하지 않으며, finding 반영과 문서 갱신은 메인 에이전트가 담당합니다.
37
+ 리뷰 산출물에는 실제 사용한 `executor`, `model`, `reasoningEffort`, 검토한 commit/diff 범위, target SHA/tree, finding과 최종 decision을 기록합니다. 리뷰 서브에이전트는 코드를 수정하지 않으며, finding 반영과 문서 갱신은 메인 에이전트가 담당합니다.
37
38
 
38
39
  ---
39
40
 
@@ -13,11 +13,17 @@
13
13
  - 이미 `[DOING]`인 태스크가 하나 있으면 그것을 이어서 수행하고
14
14
  - 없으면 가장 우선순위가 높은 `[TODO]` 태스크를 `[DOING]`으로 바꿉니다
15
15
  - 한 번에 하나의 태스크만 진행합니다.
16
+ - `nextAction.executor === "subagent"`이면 반환된 `workingDirectory`에서 해당 태스크의 구현과 태스크 범위 검증을 fresh 서브에이전트에게 반환된 `model`, `reasoningEffort`, `onUnavailable` 설정과 정확한 `workerContract`로 위임합니다. 지정 모델을 사용할 수 없을 때 `inherit`은 현재 모델을 상속해 다시 위임하고, `error`는 중단 후 실패를 보고한다는 뜻입니다.
17
+ - 구현 worker는 할당된 태스크를 직접 실행합니다. `workflow-stage` 재호출, 재위임, lee-spec-kit 문서 수정, 태스크 상태 변경, 커밋, 승인 요청, 원격/파괴적 작업은 하지 않습니다. 프로젝트 코드 수정과 태스크 범위 검사만 수행합니다.
18
+ - 구현 worker는 승인된 `plan.md` Verification Contract를 따릅니다. `NONE`이면 영구 테스트를 추가하지 않고, `UPDATE`이면 계약을 소유한 기존 테스트만 최소 수정하며, `ADD`이면 계약에 연결된 테스트만 추가합니다. 승인된 결정이 충분하지 않다면 테스트 범위를 임의로 넓히지 말고 메인 에이전트에 보고합니다.
19
+ - 명시적 ID가 없는 레거시 태스크는 `workflow-stage`가 안정적인 synthetic `taskId`를 반환합니다. ID 추가만을 위해 레거시 태스크 문서를 다시 쓰지 말고 반환된 ID를 사용합니다.
16
20
 
17
21
  ## 2. 실행과 기록
18
22
 
19
23
  - `tasks.md`를 현실과 맞게 유지합니다:
20
24
  - 실제 완료/검증 없이 `[DONE]`로 바꾸지 않습니다
25
+ - `workflow.agentReview.task.enabled=true`이면 구현/검증 완료 후 `[DONE]` 대신 `[REVIEW]`로 바꾸고 checkpoint commit을 만든 뒤 독립 리뷰를 진행합니다
26
+ - task review가 현재 SHA/tree를 `approve`한 뒤에만 `[REVIEW]`를 `[DONE]`으로 바꿉니다
21
27
  - 태스크를 닫을 때는 같은 수정에서 `Acceptance`와 `Checklist`도 함께 갱신합니다
22
28
  - 완료된 태스크에 후속 작업이 생기면 히스토리를 고치지 말고 새 태스크를 추가합니다
23
29
  - 새 태스크를 추가해야 한다면 `tasks.md`에 구체적인 제목, `Acceptance`, `Checklist`, 그리고 `NON-PRD` 또는 기존 `PRD-*` 태그가 있는 완전한 태스크 블록을 추가하세요.
@@ -33,6 +39,7 @@
33
39
  ## 4. 커밋과 종료 가드레일
34
40
 
35
41
  - docs 경로 검사가 중요하면 `git commit` 전에 `npx lee-spec-kit commit-audit --json`를 사용합니다.
42
+ - 문서/프로젝트 커밋과 태스크 checkpoint는 구현 서브에이전트가 아니라 메인 에이전트가 소유합니다.
36
43
  - 코드나 feature 문서를 바꿨다면 종료 전에 `npx lee-spec-kit workflow-audit --json`로 동기화 상태를 확인합니다.
37
44
  - `tasks.md` 테스트 로그는 명령어당 1개 행만 유지하고, 재실행 시 기존 행을 갱신합니다.
38
45
 
@@ -40,7 +47,7 @@
40
47
 
41
48
  - 사용자 승인은 문서화된 review checkpoint와 원격/파괴적 작업 전에만 요청합니다.
42
49
  - issue 생성, PR 생성, push, merge 같은 원격 작업 전에는 올릴 artifact나 계획을 먼저 공유합니다.
43
- - 구현 자체는 Codex가 필요하면 위임할 있지만, 문서 갱신, 승인 처리, 원격 작업은 메인 세션에서 유지합니다.
50
+ - Plan/task/Feature review는 `workflow-stage`가 반환한 모델·추론도와 정확한 hash/SHA/tree target 설정의 fresh 읽기 전용 서브에이전트에게 맡기고, 문서 갱신, finding 반영, 승인 처리, 원격 작업은 메인 세션에서 유지합니다.
44
51
 
45
52
  ## 절대 규칙
46
53
 
@@ -57,9 +57,13 @@ npx lee-spec-kit workflow-stage <feature-ref> --json
57
57
 
58
58
  반환되는 `stage`, `nextAction`, `implementationAllowed` 값을 현재 워크플로우 상태로 사용하세요.
59
59
 
60
+ Plan 검수가 활성화되면 계획 단계는 `plan Review → fresh 읽기 전용 Plan 검수 → plan 승인` 순서로 진행됩니다. 검수는 반환된 `specHash`와 `planHash`에 묶이며 두 문서 중 하나의 내용이 바뀌면 기존 evidence가 무효입니다. reviewer는 문서를 수정하지 않고 Verification Contract와 테스트 결정을 점검합니다.
61
+
60
62
  `tasks.md`의 최종 완료 체크박스 3개에는 `lee-spec-kit:completion:*` HTML marker가 있습니다. 사용자에게 보이는 문구는 바꿔도 되지만 각 체크박스 라인의 marker는 유지하세요. `workflow-stage`는 marker를 machine-readable identity로 우선 사용하고, 기존 프로젝트 호환을 위해 marker가 없으면 이전 canonical 문구를 fallback으로 인식합니다.
61
63
 
62
- `completionStrategy`가 `"local-ff"` 또는 `"local-squash"`인 local workflow의 완료 흐름은 `implementation_approve → feature_verify → local_merge → local_cleanup → done`입니다. 검사 실패 시 구현이 허용된 `feature_remediation`으로 이동합니다. `local-ff`는 검증된 Feature SHA만 옮기고, `local-squash`는 통합 tree가 검증된 Feature tree와 같아야 합니다. 둘 다 cleanup 후에만 `done`입니다. cleanup이 끝난 Feature는 기록된 통합 커밋이 현재 base의 조상으로 남아 있는 한 후속 Feature가 base를 전진시켜도 `done`을 유지합니다.
64
+ Feature agent review가 활성화된 local workflow의 완료 흐름은 `feature review → implementation_approve → feature_verify → local_merge → local_cleanup → done`입니다. 태스크 리뷰가 활성화되면 각 태스크는 `DOING → REVIEW → task review → DONE`을 거칩니다. 검사 실패 시 구현이 허용된 `feature_remediation`으로 이동합니다. `local-ff`는 검증된 Feature SHA만 옮기고, `local-squash`는 통합 tree가 검증된 Feature tree와 같아야 합니다. 둘 다 cleanup 후에만 `done`입니다. cleanup이 끝난 Feature는 기록된 통합 커밋이 현재 base의 조상으로 남아 있는 한 후속 Feature가 base를 전진시켜도 `done`을 유지합니다.
65
+
66
+ `workflow.agentExecution.task.enabled=true`이면 각 `task_execute`가 설정된 서브에이전트 모델·추론도·안정적인 태스크 ID·구현 작업 경로·machine-readable `workerContract`를 반환합니다. worker는 `workflow-stage`를 재호출하거나 다시 위임하지 않고 직접 실행합니다. 승인된 Verification Contract를 따르고 계획되지 않은 영구 테스트를 추가하지 않으며 프로젝트 코드와 태스크 범위 검사만 담당합니다. 메인 에이전트가 문서 동기화, 태스크 전환, 커밋, 승인, 원격 작업을 소유하고 공식 hook은 메인 에이전트가 workflow를 `task_commit`으로 전진시키기 전까지 커밋을 차단합니다.
63
67
 
64
68
  remediation 커밋이 추가되면 기존 검증과 local merge 승인은 무효입니다. Pre-PR review가 활성화되어 있다면 변경된 diff의 review evidence를 갱신하고 새 tip을 검증한 뒤 local merge 승인을 다시 받습니다.
65
69
 
@@ -124,20 +128,24 @@ Feature가 이미 진행 중이라면, 이 파일들은 활성 워크플로우 S
124
128
  | 구분 | 필드 | 값 |
125
129
  | --- | --- | --- |
126
130
  | 문서 상태 | `spec.md`/`plan.md`의 `상태`, `tasks.md`의 `문서 상태` | `Draft` \| `Review` \| `Approved` |
131
+ | Plan 검수 상태 | `plan.md`의 `Plan 검수` | `Pending` \| `Running` \| `Done` |
132
+ | Plan 검수 Evidence/Decision | `Plan 검수 Evidence` / `Plan 검수 Decision` | evidence 경로와 `결정: approve\|changes_requested\|blocked ...` |
133
+ | Plan 검수 target | `Plan 검수 Spec Hash` / `Plan 검수 Plan Hash` | `workflow-stage`가 반환한 현재 내용 hash |
127
134
  | 이슈 문서 상태 | `issue.md`의 `상태` | `Draft` \| `Ready` |
128
135
  | PR 문서 상태 | `pr.md`의 `상태` | `Draft` \| `Ready` |
129
136
  | PR 리뷰 상태 | `tasks.md`의 `PR 상태` | `Review` \| `Approved` |
130
137
  | Pre-PR 리뷰 상태 | `tasks.md`의 `PR 전 리뷰` | `Pending` \| `Done` |
131
138
  | Pre-PR 리뷰 Evidence | `tasks.md`의 `PR 전 리뷰 Evidence` | 근거 링크/로그/문서 경로 |
132
139
  | Pre-PR 리뷰 Decision | `tasks.md`의 `PR 전 리뷰 Decision` | `결정: approve|changes_requested|blocked ...` |
140
+ | Pre-PR 리뷰 target | `PR 전 리뷰 Head` / `PR 전 리뷰 Tree` | `workflow-stage`가 반환한 현재 SHA/tree |
133
141
  | PR 리뷰 Evidence | `tasks.md`의 `PR 리뷰 Evidence` | 근거 링크/로그/문서 경로 |
134
142
  | PR 리뷰 Decision | `tasks.md`의 `PR 리뷰 Decision` | `결정: ...` (또는 `decision: ...`) |
135
143
 
136
144
  ---
137
145
 
138
- ## Pre-PR 서브에이전트 체크리스트
146
+ ## Agent review 체크리스트
139
147
 
140
- 모든 Pre-PR 리뷰는 `workflow-stage --json`이 반환한 모델·추론도 설정으로 fresh context의 읽기 전용 서브에이전트에게 맡깁니다. 서브에이전트는 `agents/skills/create-pr.md`의 `Pre-PR 기본 체크리스트`를 기준으로 리뷰하고, 메인 에이전트가 finding 반영과 evidence 기록을 담당합니다.
148
+ Plan/task/Feature 리뷰는 `workflow-stage --json`이 반환한 모델·추론도·정확한 target 설정으로 fresh context의 읽기 전용 서브에이전트에게 맡깁니다. Plan은 현재 spec/plan 내용 hash를, 태스크는 해당 checkpoint 범위를, Feature는 base부터 Feature tip까지를 검토합니다. 서브에이전트는 코드나 문서를 수정하지 않고 결함 중심 finding만 반환하며, 메인 에이전트가 finding 반영과 evidence 기록을 담당합니다. 특정 이름의 리뷰 스킬은 요구하지 않습니다.
141
149
 
142
150
  ---
143
151
 
@@ -146,7 +154,7 @@ Feature가 이미 진행 중이라면, 이 파일들은 활성 워크플로우 S
146
154
  | 파일 | 역할 | 작성 시점 |
147
155
  | -------------- | -------------------------- | -------------- |
148
156
  | `spec.md` | **무엇을, 왜** 만드는지 | 기능 정의 시 |
149
- | `plan.md` | **어떻게** 만드는지 (기술) | 스펙 승인 후 |
157
+ | `plan.md` | **어떻게** + Verification Contract | 스펙 승인 후 |
150
158
  | `tasks.md` | 구체적인 작업 목록 | 계획 승인 후 |
151
159
  | `issue.md` | 이슈 초안 + 이슈 상태(`Draft/Ready`) | 이슈 생성 전/생성 시 |
152
160
  | `pr.md` | PR 초안 + PR 상태(`Draft/Ready`) | PR 생성 전/생성 시 |