lee-spec-kit 0.6.36 → 0.6.38
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 +41 -10
- package/README.md +42 -10
- package/dist/index.js +2251 -800
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/en/common/README.md +29 -0
- package/templates/en/common/agents/agents.md +6 -13
- package/templates/en/common/agents/skills/create-pr.md +5 -5
- package/templates/en/common/agents/skills/execute-task.md +6 -2
- package/templates/en/common/features/README.md +22 -0
- package/templates/en/common/features/feature-base/spec.md +2 -0
- package/templates/en/common/features/feature-base/tasks.md +15 -1
- package/templates/en/common/ideas/README.md +13 -2
- package/templates/en/common/prd/README.md +28 -0
- package/templates/ko/common/README.md +29 -0
- package/templates/ko/common/agents/agents.md +6 -13
- package/templates/ko/common/agents/skills/create-pr.md +5 -5
- package/templates/ko/common/agents/skills/execute-task.md +6 -2
- package/templates/ko/common/features/README.md +22 -0
- package/templates/ko/common/features/feature-base/spec.md +2 -0
- package/templates/ko/common/features/feature-base/tasks.md +15 -1
- package/templates/ko/common/ideas/README.md +15 -2
- package/templates/ko/common/prd/README.md +28 -0
package/package.json
CHANGED
|
@@ -38,6 +38,35 @@ npx lee-spec-kit context --json-compact
|
|
|
38
38
|
|
|
39
39
|
---
|
|
40
40
|
|
|
41
|
+
## SSOT Relationship (PRD / Ideas / Features)
|
|
42
|
+
|
|
43
|
+
To avoid ambiguity, treat the following as the single source of truth (SSOT).
|
|
44
|
+
|
|
45
|
+
- **PRD (`docs/prd/`)**: requirements SSOT
|
|
46
|
+
- Assign stable IDs per requirement: `PRD-FR-001`, `PRD-US-002`, `PRD-NFR-003`
|
|
47
|
+
- Keep IDs stable (prefer marking as Deprecated over deleting; do not renumber).
|
|
48
|
+
- **Ideas (`docs/ideas/`)**: pre-Feature SSOT (hypotheses/experiments/candidates)
|
|
49
|
+
- Put `PRD Refs:` at the top (example: `PRD-FR-001, PRD-US-002`).
|
|
50
|
+
- Once promoted, the SSOT moves to `docs/features/` and the idea should be archived.
|
|
51
|
+
- **Features (`docs/features/`)**: implementation scope/progress SSOT
|
|
52
|
+
- `spec.md`: scope + `PRD Refs` (the PRD IDs this feature covers)
|
|
53
|
+
- `tasks.md`: map each task line to PRD IDs via bracket tags like `[PRD-FR-001]`, or tag non-PRD tasks as `[NON-PRD]`
|
|
54
|
+
- `decisions.md`: record changes/trade-offs/requirement changes (why it changed) with evidence links
|
|
55
|
+
|
|
56
|
+
## Change Protocol (When Requirements/Scope Change Mid-Work)
|
|
57
|
+
|
|
58
|
+
When requirements/scope change, the “what to update” must be explicit in docs. Minimum checklist:
|
|
59
|
+
|
|
60
|
+
1. **PRD changes** (add/change/deprecate requirements):
|
|
61
|
+
- `docs/prd/*.md`: add/update/deprecate the affected IDs
|
|
62
|
+
2. **If still in Idea stage**:
|
|
63
|
+
- `docs/ideas/*.md`: update `PRD Refs` and in/out scope
|
|
64
|
+
3. **If already a Feature**:
|
|
65
|
+
- `docs/features/.../spec.md`: update `PRD Refs` + reflect scope change summary
|
|
66
|
+
- `docs/features/.../tasks.md`: add tasks for the change + tag each task as `[PRD-...]` or `[NON-PRD]`
|
|
67
|
+
- `docs/features/.../plan.md`: update if architecture/testing strategy changed
|
|
68
|
+
- `docs/features/.../decisions.md`: record why/what changed + evidence (commit/PR/test)
|
|
69
|
+
|
|
41
70
|
## CLI Config (`.lee-spec-kit.json`)
|
|
42
71
|
|
|
43
72
|
When you run `lee-spec-kit init`, it creates `.lee-spec-kit.json` in the docs root (default: `docs/`).
|
|
@@ -32,13 +32,14 @@ Prohibited:
|
|
|
32
32
|
|
|
33
33
|
## 🧾 Label Response Contract (SSOT)
|
|
34
34
|
|
|
35
|
-
-
|
|
35
|
+
- Treat approval-waiting as a separate state. Approval-waiting means `context --json-compact` (or `context --json`) exposes executable `actionOptions[]` and you are explicitly waiting for user approval.
|
|
36
36
|
- Use the latest `npx lee-spec-kit context --json-compact` as the default source (fallback: `context --json` or `flow --json` when full detail is required; prefer `flow --json-compact` for default flow output).
|
|
37
37
|
- When using auto results from `flow --json-compact` (or `flow --json`), treat `autoRun.resume.flowCommand` as SSOT for resume (including after context compression/reset).
|
|
38
38
|
- Treat `AUTO_MANUAL_REQUIRED` as an automation boundary, not an immediate failure. Re-check `context --json-compact`, then decide stop/report by `approvalRequest.required` (`context --json` only for full-detail debugging fields).
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
39
|
+
- In approval-waiting state, show `actionOptions[*].approvalPrompt` lines exactly as provided and end with `approvalRequest.finalPrompt` exactly as provided. Prefer `approvalRequest.userFacingLines` when available. Do not add your own rewritten label summary before or between those lines.
|
|
40
|
+
- Prefer `matchedFeature.currentSubstateOwner` plus `agentOrchestration.subAgentHandoff` as the delegation SSOT. Treat `currentActionShouldDelegate` as a compatibility mirror for older consumers.
|
|
41
|
+
- In non-approval state, do not append labels or `approvalRequest.finalPrompt` unless the user explicitly asked for current options.
|
|
42
|
+
- If approval is still pending after answering an unrelated question, answer first, then re-open approval with both the matching `actionOptions[*].approvalPrompt` lines and `approvalRequest.finalPrompt`.
|
|
42
43
|
- If user input does not contain a valid label, do not execute; request label selection again.
|
|
43
44
|
- For approved command options, prefer one-shot `flow --approve <LABEL> --execute`; do not split `context --approve` and `context --execute --ticket` across turns/sessions.
|
|
44
45
|
- If `agentOrchestration.currentActionShouldDelegate=true` and the selected option is `actionType="command"`, delegation is mandatory: call `spawn_agent` first. Do not execute that command directly from the main agent.
|
|
@@ -48,15 +49,7 @@ Prohibited:
|
|
|
48
49
|
- Main-agent fallback is allowed only when sub-agent execution is unavailable (for example: tool not available, spawn failed, or sub-agent failed before command execution).
|
|
49
50
|
- When fallback is used, report a one-line fallback reason to the user before running the command in the main agent.
|
|
50
51
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
```text
|
|
54
|
-
Current status: <reasonCode or brief state>
|
|
55
|
-
Available labels:
|
|
56
|
-
A: <detail>
|
|
57
|
-
B: <detail>
|
|
58
|
-
Reply format: "<LABEL>" or "<LABEL> OK"
|
|
59
|
-
```
|
|
52
|
+
Approval-waiting output must reuse the exact CLI-provided prompt lines. Do not invent a custom wrapper such as `Current status:` / `Available labels:` if the CLI did not provide those lines.
|
|
60
53
|
|
|
61
54
|
---
|
|
62
55
|
|
|
@@ -21,11 +21,11 @@ Always run this checklist in Pre-PR review. Treat it as the minimum baseline, th
|
|
|
21
21
|
1. Review alignment with `spec.md` / `plan.md` / `tasks.md` and confirm implementation still matches the original goal.
|
|
22
22
|
2. Inspect regression, exception handling, critical/security risks, side effects, user flow impact, and release readiness.
|
|
23
23
|
3. Check maintainability: split oversized functions/files when needed, reuse/integrate existing code where appropriate, and remove obsolete code.
|
|
24
|
-
4.
|
|
25
|
-
5.
|
|
26
|
-
6. `Pre-PR Evidence` should point to a real existing path.
|
|
27
|
-
7.
|
|
28
|
-
8.
|
|
24
|
+
4. Judge whether the implementation actually fits the feature intent and scope documented in `spec.md` / `plan.md` / `tasks.md`.
|
|
25
|
+
5. When `workflow.prePrReview.evidenceMode=path_required` (default), run the review agent first, generate `review-trace.json`, then run `npx lee-spec-kit pre-pr-review <feature-ref> --evidence review-trace.json`. In `evidenceMode=any`, direct record mode without `--evidence` is also allowed unless execution evidence is explicitly enforced.
|
|
26
|
+
6. `Pre-PR Evidence` should follow the configured evidence policy. In `path_required`, it must point to a real existing path.
|
|
27
|
+
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.
|
|
28
|
+
8. Use `commandsExecuted` only for optional audit/targeted verification that you actually chose to run during review.
|
|
29
29
|
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`.
|
|
30
30
|
10. `Pre-PR Decision` must use `decision: approve|changes_requested|blocked ...` (or `결정: ...`).
|
|
31
31
|
11. Ensure the final decision is `approve` before moving to PR creation.
|
|
@@ -24,7 +24,11 @@ Execute exactly one option from `👉 Next Options (Atomic)` as printed by the C
|
|
|
24
24
|
- Treat `approvalRequest.required` from `context --json-compact` as SSOT for approval waiting (`--json` only when full-detail debugging fields are required).
|
|
25
25
|
- `false`: continue without label approval.
|
|
26
26
|
- `true`: wait for label-token approval (`A`, `A OK`) before execution.
|
|
27
|
-
- Default execution model is **main-agent orchestration +
|
|
27
|
+
- Default execution model is **main-agent orchestration + sub-agent-first execution for sub-agent-owned run states**. Use `matchedFeature.currentSubstateId/currentSubstateOwner/currentSubstatePhase` from `context --json-compact` as the execution-state SSOT when present.
|
|
28
|
+
- Main agent owns approval boundaries, state transitions, record/commit steps, and remote operations. Sub-agent execution is the default for command substates owned by `subagent` (for example `task_run`, `pre_pr_review_run`, `code_review_run`, and auto-run handoff commands).
|
|
29
|
+
- `pre_pr_review` is split into `pre_pr_review_run` (sub-agent review execution) and `pre_pr_review_record` (main-agent recording of evidence/results).
|
|
30
|
+
- PR review follows the same pattern: `code_review_run` is the sub-agent review/fix execution state, and the merge/push/final decision stays in the main-agent finalize state.
|
|
31
|
+
- Prefer `matchedFeature.currentSubstateOwner` plus `agentOrchestration.subAgentHandoff` as the delegation SSOT. `currentActionShouldDelegate` remains a compatibility mirror.
|
|
28
32
|
- When `agentOrchestration.currentActionShouldDelegate=true` and the selected option is `actionType="command"`, delegation is mandatory: call `spawn_agent` first and do not execute the command directly from the main agent.
|
|
29
33
|
- Do not delegate auto loops from `autoRun.available` alone. Delegate auto loops only when `agentOrchestration.subAgentHandoff.required=true` and `agentOrchestration.subAgentHandoff.mode="auto_run"`.
|
|
30
34
|
- Use `agentOrchestration.subAgentHandoff` as the minimal handoff contract (`featureRef`, `category`, `cwd`, `cmd`).
|
|
@@ -35,7 +39,7 @@ Execute exactly one option from `👉 Next Options (Atomic)` as printed by the C
|
|
|
35
39
|
- If auto execution stops, treat `autoRun.resume` from `flow --json-compact` (or `flow --json`) as SSOT. After interruption/compression, resume with `autoRun.resume.flowCommand`; if needed, check current state first with `autoRun.resume.contextCommand`.
|
|
36
40
|
- Treat `AUTO_MANUAL_REQUIRED` as an automation boundary (instruction-only segment), not an immediate crash. Re-check `context --json-compact` and report whether `approvalRequest.required` is now true.
|
|
37
41
|
- If the CLI prints commands, copy/paste them. (In standalone setups commands may include `git -C ...` and scopes like `project`/`docs`.)
|
|
38
|
-
- Follow
|
|
42
|
+
- Follow `agents.md` **"Label Response Contract (SSOT)"**. Show label prompts only in approval-waiting state, and reuse the exact CLI-provided approval lines instead of paraphrasing them.
|
|
39
43
|
- For approved command options, default to `npx lee-spec-kit flow <slug|F001|F001-slug> --approve <LABEL> --execute` and avoid split `context --approve` / `context --execute --ticket` runs across turns.
|
|
40
44
|
|
|
41
45
|
### Step 3: Update tasks.md (only what you did)
|
|
@@ -60,6 +60,28 @@ npx lee-spec-kit status --write
|
|
|
60
60
|
|
|
61
61
|
---
|
|
62
62
|
|
|
63
|
+
## PRD Requirement Traceability (Recommended)
|
|
64
|
+
|
|
65
|
+
- Assign stable requirement IDs in PRD docs (`docs/prd/*.md`) like `PRD-FR-001`.
|
|
66
|
+
- Link each task line in `tasks.md` with a tag like `[PRD-FR-001]`. For non-PRD tasks, use `[NON-PRD]`.
|
|
67
|
+
- Coverage report: `npx lee-spec-kit requirements` (alias: `npx lee-spec-kit prd`)
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Change Protocol (When Requirements/Scope Change Mid-Feature)
|
|
72
|
+
|
|
73
|
+
When things change mid-work, it must be explicit what was updated.
|
|
74
|
+
|
|
75
|
+
- Record changes as **new tasks** (do not edit `[DONE]` tasks; create a new task instead).
|
|
76
|
+
- Every change task must be tagged as `[PRD-...]` or `[NON-PRD]`. (Recommended: also add `[CHANGE]`.)
|
|
77
|
+
- If the change impacts PRD/spec/plan, update these too:
|
|
78
|
+
- `docs/prd/*.md` (add/update/deprecate requirement IDs)
|
|
79
|
+
- `spec.md` (`PRD Refs`, scope/AC)
|
|
80
|
+
- `plan.md` (architecture/testing strategy)
|
|
81
|
+
- `decisions.md` (why it changed + evidence)
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
63
85
|
## Status Glossary
|
|
64
86
|
|
|
65
87
|
| Scope | Field | Values |
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
- `[TODO] → [DOING]`: share task title first + user approval (OK)
|
|
8
8
|
- `[DOING] → [DONE]`: share result/verification first + user approval (OK)
|
|
9
9
|
- **Priority**: P0(urgent) > P1(high) > P2(medium) > P3(low)
|
|
10
|
+
- **PRD mapping (recommended)**: add a PRD requirement ID tag like `[PRD-FR-001]` to each task line, or tag non-PRD tasks as `[NON-PRD]`.
|
|
10
11
|
|
|
11
12
|
---
|
|
12
13
|
|
|
@@ -45,7 +46,7 @@
|
|
|
45
46
|
> Copy and use the format below.
|
|
46
47
|
|
|
47
48
|
```markdown
|
|
48
|
-
- [TODO][P1] T-F{number}-01 {Task Title}
|
|
49
|
+
- [TODO][P1][PRD-FR-001] T-F{number}-01 {Task Title}
|
|
49
50
|
- Date: YYYY-MM-DD
|
|
50
51
|
- Acceptance:
|
|
51
52
|
- (verification condition)
|
|
@@ -53,6 +54,19 @@
|
|
|
53
54
|
- [ ] (subtask)
|
|
54
55
|
```
|
|
55
56
|
|
|
57
|
+
(Recommended) Requirement/scope change task:
|
|
58
|
+
|
|
59
|
+
Record mid-work changes as **new tasks**, and explicitly list which docs need updating via `Impact Docs`.
|
|
60
|
+
|
|
61
|
+
```markdown
|
|
62
|
+
- [TODO][P1][PRD-FR-001][CHANGE] T-F{number}-02 {Task Title} (requirement/scope change)
|
|
63
|
+
- Impact Docs:
|
|
64
|
+
- docs/prd/... (when requirements change)
|
|
65
|
+
- spec.md (PRD Refs/AC/scope)
|
|
66
|
+
- plan.md (architecture/testing strategy)
|
|
67
|
+
- decisions.md (why it changed + evidence)
|
|
68
|
+
```
|
|
69
|
+
|
|
56
70
|
---
|
|
57
71
|
|
|
58
72
|
## Completion Criteria
|
|
@@ -14,17 +14,28 @@ Core rule: once an idea becomes a Feature, the SSOT moves to `docs/features/`.
|
|
|
14
14
|
- Put at least these at the top:
|
|
15
15
|
- Goal / context
|
|
16
16
|
- Rough scope (what’s in/out)
|
|
17
|
+
- PRD Refs (recommended): `PRD-FR-001, PRD-US-002` (use `NON-PRD` when not tied to PRD)
|
|
17
18
|
- Target component (optional): `api` / `app` / `worker` / `all`
|
|
19
|
+
- Status (recommended): `Active | Converted | Dropped`
|
|
18
20
|
|
|
19
21
|
---
|
|
20
22
|
|
|
21
23
|
## Promotion / Cleanup (Idea → Feature)
|
|
22
24
|
|
|
23
25
|
1. Create a Feature folder with `npx lee-spec-kit feature <name>`
|
|
24
|
-
2.
|
|
25
|
-
-
|
|
26
|
+
2. In the new Feature, record all of the following:
|
|
27
|
+
- Idea doc path in `spec.md` or `tasks.md` (example: `docs/ideas/login-rate-limit.md`)
|
|
28
|
+
- `PRD Refs` in `spec.md` (example: `PRD-FR-001, PRD-US-002`)
|
|
29
|
+
- PRD mapping tags in `tasks.md` task lines like `[PRD-FR-001]` (use `[NON-PRD]` for non-PRD tasks)
|
|
26
30
|
3. Remove the idea from the active list (choose one):
|
|
27
31
|
- **Recommended**: move to `docs/ideas/archive/` and add `Status: Converted`, `Feature: F00X-...` on top
|
|
28
32
|
- Or: delete it (only if you don’t need history)
|
|
29
33
|
|
|
30
34
|
> Tip: archiving is usually better than deleting for traceability (“why this feature exists”).
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Change Protocol (When Ideas Change Mid-Work)
|
|
39
|
+
|
|
40
|
+
- If PRD requirements change: update the idea’s `PRD Refs` first, and update PRD docs (`docs/prd/*.md`) when needed (add/update IDs).
|
|
41
|
+
- If the idea is already promoted: update the Feature SSOT instead (`spec.md`/`tasks.md`/`plan.md`/`decisions.md`), not the idea.
|
|
@@ -13,6 +13,34 @@ This folder contains product requirements documents.
|
|
|
13
13
|
2. Write main features and user stories
|
|
14
14
|
3. Include technical architecture overview
|
|
15
15
|
|
|
16
|
+
## Requirement ID Conventions (Recommended)
|
|
17
|
+
|
|
18
|
+
To let the CLI report “which PRD items are implemented”, assign **stable IDs** to PRD requirements.
|
|
19
|
+
|
|
20
|
+
- Format: `PRD-FR-001`, `PRD-US-002`, `PRD-NFR-003`
|
|
21
|
+
- The ID only needs to appear on the same line (heading/bullet).
|
|
22
|
+
- Reference it from a Feature `tasks.md` task line as a **bracket tag** like `[PRD-FR-001]`.
|
|
23
|
+
- For non-PRD tasks, tag them as `[NON-PRD]`.
|
|
24
|
+
|
|
25
|
+
Example:
|
|
26
|
+
|
|
27
|
+
```md
|
|
28
|
+
- PRD-FR-001: Login rate limit
|
|
29
|
+
### PRD-US-002: Admin can view metrics
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Change Rules (Add/Change/Deprecate Requirements)
|
|
33
|
+
|
|
34
|
+
When requirements change, it must be obvious what needs updating.
|
|
35
|
+
|
|
36
|
+
- **Stable IDs**:
|
|
37
|
+
- Do not renumber or reuse IDs.
|
|
38
|
+
- Prefer marking a requirement as `Deprecated` (with reason / replacement IDs) over deleting it.
|
|
39
|
+
- If requirements split/merge, keep the original ID and add new IDs, then document the relationship in PRD.
|
|
40
|
+
- **Cascade updates (required)**:
|
|
41
|
+
- If the PRD change affects an in-flight Feature, update the Feature SSOT too: `spec.md` (`PRD Refs`), `tasks.md` (task tags), and `plan.md`/`decisions.md` when applicable.
|
|
42
|
+
- If no Feature exists yet, keep an Idea doc (`docs/ideas/*.md`) with `PRD Refs` so it remains traceable before promotion.
|
|
43
|
+
|
|
16
44
|
## Example Files
|
|
17
45
|
|
|
18
46
|
- `{project-name}-prd.md` - Main PRD document
|
|
@@ -38,6 +38,35 @@ npx lee-spec-kit context --json-compact
|
|
|
38
38
|
|
|
39
39
|
---
|
|
40
40
|
|
|
41
|
+
## SSOT 관계 (PRD / Ideas / Features)
|
|
42
|
+
|
|
43
|
+
문서 간 관계가 모호해지지 않도록, 아래를 “SSOT(단일 기준)”로 사용합니다.
|
|
44
|
+
|
|
45
|
+
- **PRD (`docs/prd/`)**: 요구사항 SSOT
|
|
46
|
+
- 요구사항마다 ID를 부여합니다: `PRD-FR-001`, `PRD-US-002`, `PRD-NFR-003`
|
|
47
|
+
- ID는 안정적으로 유지합니다. (삭제 대신 `Deprecated` 표기 권장, 재번호 부여 금지)
|
|
48
|
+
- **Ideas (`docs/ideas/`)**: Feature 전 단계 SSOT (가설/실험/후보)
|
|
49
|
+
- Idea 문서 상단에 `PRD Refs:`를 기록합니다. (예: `PRD-FR-001, PRD-US-002`)
|
|
50
|
+
- Feature로 승격되면 SSOT는 `docs/features/`로 이동하고, Idea는 archive로 정리합니다.
|
|
51
|
+
- **Features (`docs/features/`)**: 구현 범위/진행 SSOT
|
|
52
|
+
- `spec.md`: 범위 정의 + `PRD Refs`(기능이 커버하는 PRD ID 목록)
|
|
53
|
+
- `tasks.md`: 태스크 단위로 PRD ID를 태그(`[PRD-FR-001]`)로 매핑하거나, PRD 무관 태스크는 `[NON-PRD]`로 표시
|
|
54
|
+
- `decisions.md`: 변경/트레이드오프/요구사항 변경(왜 바뀌었는지) 기록 + Evidence 링크
|
|
55
|
+
|
|
56
|
+
## 변경 프로토콜 (중간에 요구사항/기능이 추가·변경될 때)
|
|
57
|
+
|
|
58
|
+
요구사항/범위가 변하면, “무엇을 고쳐야 하는지”가 문서로 남아야 합니다. 최소 아래를 지킵니다.
|
|
59
|
+
|
|
60
|
+
1. **PRD 변경** (요구사항 추가/수정/폐기):
|
|
61
|
+
- `docs/prd/*.md`: 해당 ID 추가/수정/Deprecated 표기
|
|
62
|
+
2. **Idea 단계라면**:
|
|
63
|
+
- `docs/ideas/*.md`: `PRD Refs` 및 범위(포함/제외) 갱신
|
|
64
|
+
3. **Feature 단계라면**:
|
|
65
|
+
- `docs/features/.../spec.md`: `PRD Refs` 갱신 + 스코프 변경 요약 반영
|
|
66
|
+
- `docs/features/.../tasks.md`: 변경을 반영하는 새 태스크 추가 + 각 태스크에 `[PRD-...]` 또는 `[NON-PRD]` 태그 부여
|
|
67
|
+
- `docs/features/.../plan.md`: 아키텍처/테스트 전략이 바뀌면 함께 갱신
|
|
68
|
+
- `docs/features/.../decisions.md`: 변경 사유/결정/영향 범위 + Evidence(커밋/PR/테스트) 기록
|
|
69
|
+
|
|
41
70
|
## CLI 설정 파일 (`.lee-spec-kit.json`)
|
|
42
71
|
|
|
43
72
|
`lee-spec-kit init`을 실행하면 문서 루트(기본: `docs/`)에 `.lee-spec-kit.json`이 생성됩니다.
|
|
@@ -32,13 +32,14 @@
|
|
|
32
32
|
|
|
33
33
|
## 🧾 라벨 응답 계약 (SSOT)
|
|
34
34
|
|
|
35
|
-
-
|
|
35
|
+
- 승인 대기 상태를 별도 상태로 취급합니다. 승인 대기란 `context --json-compact`(또는 `context --json`)에 실행 가능한 `actionOptions[]`가 있고, 현재 사용자의 승인을 기다리는 경우를 의미합니다.
|
|
36
36
|
- 기준 데이터는 최신 `npx lee-spec-kit context --json-compact`를 기본으로 사용하고, 상세 필드가 필요할 때만 `context --json` 또는 `flow --json`을 사용합니다. (`flow`는 기본적으로 `--json-compact` 우선)
|
|
37
37
|
- `flow --json-compact`(또는 `flow --json`)의 auto 결과를 사용할 때는 `autoRun.resume.flowCommand`를 재개 SSOT로 사용합니다. (컨텍스트 압축/리셋 후 동일 규칙 적용)
|
|
38
38
|
- `AUTO_MANUAL_REQUIRED`는 자동화 경계 상태이며 실패 단정 신호가 아닙니다. `context --json-compact` 재확인 후 `approvalRequest.required` 기준으로 멈춤/보고를 판단합니다. (상세 디버깅 필드가 필요할 때만 `context --json`)
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
39
|
+
- 승인 대기 상태에서는 `actionOptions[*].approvalPrompt`를 원문 그대로 보여주고, 마지막에는 `approvalRequest.finalPrompt`를 원문 그대로 붙입니다. 가능하면 `approvalRequest.userFacingLines`를 우선 사용합니다. 이 사이에 에이전트가 임의로 다시 쓴 라벨 요약을 끼워 넣지 않습니다.
|
|
40
|
+
- 위임 판단 SSOT는 `matchedFeature.currentSubstateOwner`와 `agentOrchestration.subAgentHandoff`를 우선 사용하세요. `currentActionShouldDelegate`는 구형 소비자를 위한 compatibility mirror입니다.
|
|
41
|
+
- 비승인 상태의 진행 보고/분석/일반 답변에서는 라벨 블록이나 `approvalRequest.finalPrompt`를 덧붙이지 않습니다. 현재 옵션을 사용자가 직접 물었을 때만 예외입니다.
|
|
42
|
+
- 관련 없는 질문에 먼저 답한 뒤에도 승인이 여전히 필요하면, 답변 후 `actionOptions[*].approvalPrompt`와 `approvalRequest.finalPrompt`를 함께 다시 제시합니다.
|
|
42
43
|
- 사용자 입력에 유효 라벨이 없으면 실행하지 말고 라벨 선택을 다시 요청합니다.
|
|
43
44
|
- 승인된 command 옵션 실행은 `flow --approve <LABEL> --execute` 1회 호출을 기본으로 하며, `context --approve`와 `context --execute --ticket`를 턴/세션 사이로 분리하지 않습니다.
|
|
44
45
|
- `agentOrchestration.currentActionShouldDelegate=true`이고 선택한 옵션이 `actionType="command"`면 위임이 필수입니다. 먼저 `spawn_agent`를 호출하고, 해당 명령을 메인 에이전트에서 직접 실행하지 않습니다.
|
|
@@ -48,15 +49,7 @@
|
|
|
48
49
|
- 메인 에이전트 fallback은 서브 에이전트 실행이 불가능한 경우(예: 도구 미지원, spawn 실패, 명령 실행 전 서브 에이전트 실패)에만 허용합니다.
|
|
49
50
|
- fallback을 사용할 때는 메인 실행 전에 fallback 사유를 사용자에게 한 줄로 먼저 알립니다.
|
|
50
51
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
```text
|
|
54
|
-
현재 상태: <reasonCode 또는 상태 요약>
|
|
55
|
-
선택 가능:
|
|
56
|
-
A: <detail>
|
|
57
|
-
B: <detail>
|
|
58
|
-
응답 형식: "<LABEL>" 또는 "<LABEL> OK"
|
|
59
|
-
```
|
|
52
|
+
승인 대기 상태 출력은 CLI가 제공한 승인 문구를 그대로 재사용해야 합니다. CLI가 주지 않은 `현재 상태:` / `선택 가능:` 같은 래퍼 문구를 에이전트가 임의로 만들어 붙이지 마세요.
|
|
60
53
|
|
|
61
54
|
---
|
|
62
55
|
|
|
@@ -21,11 +21,11 @@ Pre-PR 리뷰에서 항상 수행하는 최소 기준입니다. 가능한 경우
|
|
|
21
21
|
1. `spec.md` / `plan.md` / `tasks.md` 기준으로 변경 범위 정합성을 확인하고, 구현이 원래 목적에 맞는지 점검합니다.
|
|
22
22
|
2. 회귀/예외 처리, 크리티컬·보안 리스크, 사이드 이펙트, 사용자 흐름 영향, 배포 준비도를 점검합니다.
|
|
23
23
|
3. 유지보수성을 점검합니다: 큰 함수/파일은 필요 시 분리하고, 기존 코드 재사용·통합 가능성을 확인하며, 불필요해진 코드를 정리합니다.
|
|
24
|
-
4.
|
|
25
|
-
5. 리뷰 에이전트를 먼저 실행해
|
|
26
|
-
6. `PR 전 리뷰 Evidence`는 실제 존재하는 문서 경로를 사용합니다.
|
|
27
|
-
7. `
|
|
28
|
-
8.
|
|
24
|
+
4. 현재 구현이 `spec.md` / `plan.md` / `tasks.md`에 기록된 feature 의도와 범위에 실제로 맞는지 평가합니다.
|
|
25
|
+
5. `workflow.prePrReview.evidenceMode=path_required`(기본)일 때는 리뷰 에이전트를 먼저 실행해 `review-trace.json`을 만든 뒤 `npx lee-spec-kit pre-pr-review <feature-ref> --evidence review-trace.json`을 실행합니다. `evidenceMode=any`에서는 실행 증거 강제가 없는 한 `--evidence` 없이 직접 기록하는 경로도 허용됩니다.
|
|
26
|
+
6. `PR 전 리뷰 Evidence`는 설정된 evidence 정책을 따라야 합니다. `path_required`일 때는 실제 존재하는 문서 경로를 사용합니다.
|
|
27
|
+
7. `Summary`, `Feature Intent Summary`, `Implementation Fit`, `Missing Cases`, `Spec Alignment Checked`, `Finding Count`, `Blocking Findings`, `Findings`, `Residual Risks`를 placeholder 없이 기록합니다.
|
|
28
|
+
8. 리뷰 중에 audit/타깃 검증 명령을 실제로 실행했다면 그때만 `commandsExecuted`에 기록합니다.
|
|
29
29
|
9. 코드리뷰 단계에서도 `PR 리뷰 Evidence/Decision`과 `decisions.md`를 동기화하고 `PR Review Log`(또는 `PR 리뷰 로그`)의 `Summary`/`Decision`을 기록합니다.
|
|
30
30
|
10. `PR 전 리뷰 Decision`은 `결정: approve|changes_requested|blocked ...` (또는 `decision: ...`) 형식을 사용합니다.
|
|
31
31
|
11. PR 생성 단계로 이동하기 전 최종 Decision이 `approve`인지 확인합니다.
|
|
@@ -24,7 +24,11 @@ CLI가 가리키는 **Active Task** 또는 **`👉 Next Options (Atomic)`의 단
|
|
|
24
24
|
- **[DOING] 상태인 태스크가 있다면**: 해당 태스크를 최우선으로 완료하세요.
|
|
25
25
|
- 태스크 상태 전환 규칙은 `tasks.md`의 **"태스크 규칙"** 섹션을 SSOT로 따릅니다.
|
|
26
26
|
- 승인 대기 여부는 `context --json-compact`의 `approvalRequest.required`를 SSOT로 따릅니다. (`--json`은 상세 디버깅이 필요할 때만 사용) `false`면 라벨 승인 없이 진행하고, `true`면 라벨 규칙(`A`, `A OK`)으로 승인 후 진행합니다.
|
|
27
|
-
- 기본 실행 모델은 **메인 에이전트 오케스트레이션 +
|
|
27
|
+
- 기본 실행 모델은 **메인 에이전트 오케스트레이션 + 서브에이전트 소유 run 상태의 우선 위임 실행**입니다. `context --json-compact`에 `matchedFeature.currentSubstateId/currentSubstateOwner/currentSubstatePhase`가 있으면 그것을 실행 상태 SSOT로 사용합니다.
|
|
28
|
+
- 메인 에이전트는 승인 경계, 상태 전이, record/commit 단계, 원격 작업을 담당합니다. `subagent` 소유 command substate(예: `task_run`, `pre_pr_review_run`, `code_review_run`, auto-run handoff command)는 서브 에이전트 실행이 기본입니다.
|
|
29
|
+
- `pre_pr_review`는 `pre_pr_review_run`(서브 에이전트 리뷰 실행)과 `pre_pr_review_record`(메인 에이전트의 결과 기록)로 분리됩니다.
|
|
30
|
+
- PR 리뷰도 같은 패턴입니다. `code_review_run`은 서브 에이전트 리뷰/수정 실행 상태이고, push/merge/최종 결정은 메인 에이전트 finalize 상태에 남깁니다.
|
|
31
|
+
- 위임 판단은 `matchedFeature.currentSubstateOwner`와 `agentOrchestration.subAgentHandoff`를 SSOT로 우선 사용하세요. `currentActionShouldDelegate`는 compatibility mirror로 남아 있습니다.
|
|
28
32
|
- `agentOrchestration.currentActionShouldDelegate=true`이고 선택한 옵션이 `actionType="command"`면 위임이 필수입니다. 먼저 `spawn_agent`를 호출하고, 해당 명령을 메인 에이전트에서 직접 실행하지 않습니다.
|
|
29
33
|
- `autoRun.available`만으로 auto 루프 위임을 결정하지 않습니다. `agentOrchestration.subAgentHandoff.required=true`이고 `agentOrchestration.subAgentHandoff.mode="auto_run"`일 때만 auto 루프를 서브 에이전트에 위임합니다.
|
|
30
34
|
- `agentOrchestration.subAgentHandoff`를 최소 handoff 계약(`featureRef`, `category`, `cwd`, `cmd`)으로 사용합니다.
|
|
@@ -35,7 +39,7 @@ CLI가 가리키는 **Active Task** 또는 **`👉 Next Options (Atomic)`의 단
|
|
|
35
39
|
- auto 실행이 중단되면 `flow --json-compact`(또는 `flow --json`)의 `autoRun.resume`를 SSOT로 따릅니다. 컨텍스트 압축/리셋 후에는 `autoRun.resume.flowCommand`로 재개하고, 필요 시 `autoRun.resume.contextCommand`로 상태를 먼저 확인합니다.
|
|
36
40
|
- `AUTO_MANUAL_REQUIRED`는 실패가 아니라 자동화 경계(현재 instruction-only 구간)입니다. 즉시 오류로 단정하지 말고 현재 `context --json-compact`를 다시 확인한 뒤 승인 필요 여부(`approvalRequest.required`)를 보고합니다.
|
|
37
41
|
- CLI가 명령어를 출력하면 **그대로 복사해 실행**합니다. (standalone 환경에서도 레포 경로가 포함될 수 있습니다)
|
|
38
|
-
- 사용자 응답
|
|
42
|
+
- 사용자 응답 포맷은 `agents.md`의 **"라벨 응답 계약 (SSOT)"** 을 따릅니다. 라벨 문구는 승인 대기 상태에서만 보여주고, CLI가 준 승인 문구를 임의로 바꾸지 않습니다.
|
|
39
43
|
- 승인된 command 옵션 실행은 `npx lee-spec-kit flow <slug|F001|F001-slug> --approve <LABEL> --execute`를 기본으로 사용하고, `context --approve`와 `context --execute --ticket` 분리 실행은 지양합니다.
|
|
40
44
|
|
|
41
45
|
### 3단계: 기록 및 반복 (Record & Loop)
|
|
@@ -60,6 +60,28 @@ npx lee-spec-kit status --write
|
|
|
60
60
|
|
|
61
61
|
---
|
|
62
62
|
|
|
63
|
+
## PRD 요구사항 추적 (권장)
|
|
64
|
+
|
|
65
|
+
- PRD 문서(`docs/prd/*.md`)에 `PRD-FR-001` 같은 요구사항 ID를 부여하세요.
|
|
66
|
+
- `tasks.md`의 각 태스크 라인에 `[PRD-FR-001]` 태그로 연결하세요. PRD와 무관한 태스크는 `[NON-PRD]`를 사용하세요.
|
|
67
|
+
- 커버리지 리포트: `npx lee-spec-kit requirements` (alias: `npx lee-spec-kit prd`)
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 변경 프로토콜 (기능 진행 중 요구사항/범위 변경)
|
|
72
|
+
|
|
73
|
+
중간 변경이 생기면, “어디를 고쳤는지”와 “무엇을 업데이트했는지”가 문서로 남아야 합니다.
|
|
74
|
+
|
|
75
|
+
- 변경은 **새 태스크로 추가**합니다. (`[DONE]` 태스크를 고치지 말고 새 태스크를 만드세요)
|
|
76
|
+
- 변경 태스크에는 `[PRD-...]` 또는 `[NON-PRD]` 태그를 반드시 붙입니다. (권장: `[CHANGE]` 태그 추가)
|
|
77
|
+
- 변경이 PRD/스펙/설계에 영향을 주면 아래도 함께 갱신합니다:
|
|
78
|
+
- `docs/prd/*.md` (요구사항 ID 추가/수정/Deprecated)
|
|
79
|
+
- `spec.md` (`PRD Refs`, 스코프/AC)
|
|
80
|
+
- `plan.md` (아키텍처/테스트 전략)
|
|
81
|
+
- `decisions.md` (왜 바뀌었는지 + Evidence)
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
63
85
|
## 상태 용어 정리
|
|
64
86
|
|
|
65
87
|
| 구분 | 필드 | 값 |
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
- `[TODO] → [DOING]`: 시작 전 태스크 제목 공유 + 사용자 승인(OK)
|
|
8
8
|
- `[DOING] → [DONE]`: 완료 전 결과/검증 공유 + 사용자 승인(OK)
|
|
9
9
|
- **우선순위**: P0(긴급) > P1(높음) > P2(보통) > P3(낮음)
|
|
10
|
+
- **PRD 매핑(권장)**: 각 태스크 라인에 `[PRD-FR-001]` 같은 PRD 요구사항 ID 태그를 추가하거나, PRD와 무관한 태스크는 `[NON-PRD]`로 표시하세요.
|
|
10
11
|
|
|
11
12
|
---
|
|
12
13
|
|
|
@@ -45,7 +46,7 @@
|
|
|
45
46
|
> 아래 포맷을 복사해 사용하세요.
|
|
46
47
|
|
|
47
48
|
```markdown
|
|
48
|
-
- [TODO][P1] T-F{번호}-01 {태스크 제목}
|
|
49
|
+
- [TODO][P1][PRD-FR-001] T-F{번호}-01 {태스크 제목}
|
|
49
50
|
- Date: YYYY-MM-DD
|
|
50
51
|
- Acceptance:
|
|
51
52
|
- (검증 조건)
|
|
@@ -53,6 +54,19 @@
|
|
|
53
54
|
- [ ] (서브 태스크)
|
|
54
55
|
```
|
|
55
56
|
|
|
57
|
+
(권장) 요구사항/범위 변경 태스크:
|
|
58
|
+
|
|
59
|
+
중간 변경은 **새 태스크로 추가**하고, 어떤 문서를 함께 업데이트해야 하는지 `Impact Docs`로 명시합니다.
|
|
60
|
+
|
|
61
|
+
```markdown
|
|
62
|
+
- [TODO][P1][PRD-FR-001][CHANGE] T-F{번호}-02 {태스크 제목} (요구사항/범위 변경)
|
|
63
|
+
- Impact Docs:
|
|
64
|
+
- docs/prd/... (요구사항 변경이 있으면)
|
|
65
|
+
- spec.md (PRD Refs/AC/스코프)
|
|
66
|
+
- plan.md (아키텍처/테스트 전략)
|
|
67
|
+
- decisions.md (변경 사유 + Evidence)
|
|
68
|
+
```
|
|
69
|
+
|
|
56
70
|
---
|
|
57
71
|
|
|
58
72
|
## 완료 조건
|
|
@@ -14,17 +14,30 @@ Feature로 발전하기 전의 아이디어 / To-do / 실험 기록을 모아두
|
|
|
14
14
|
- 상단에 최소한 아래 메타 정보를 둡니다:
|
|
15
15
|
- 목적/배경
|
|
16
16
|
- 대략 범위(뭘 할지/안 할지)
|
|
17
|
+
- PRD Refs(권장): `PRD-FR-001, PRD-US-002` (PRD와 무관하면 `NON-PRD` 명시)
|
|
17
18
|
- 대상 컴포넌트(필요 시): `api` / `app` / `worker` / `all`
|
|
19
|
+
- 상태(권장): `Active | Converted | Dropped`
|
|
18
20
|
|
|
19
21
|
---
|
|
20
22
|
|
|
21
23
|
## 승격/정리 규칙 (Idea → Feature)
|
|
22
24
|
|
|
23
25
|
1. `npx lee-spec-kit feature <name>`로 Feature 폴더 생성
|
|
24
|
-
2. 새 Feature
|
|
25
|
-
- 예: `docs/ideas/login-rate-limit.md`
|
|
26
|
+
2. 새 Feature에 아래를 모두 남깁니다
|
|
27
|
+
- `spec.md` 또는 `tasks.md`에 아이디어 문서 경로 (예: `docs/ideas/login-rate-limit.md`)
|
|
28
|
+
- `spec.md`의 `PRD Refs`(예: `PRD-FR-001, PRD-US-002`)
|
|
29
|
+
- `tasks.md` 태스크 라인에 `[PRD-FR-001]` 같은 PRD ID 태그 (PRD와 무관한 태스크는 `[NON-PRD]`)
|
|
26
30
|
3. 아이디어 문서는 **목록에서 제거**합니다 (둘 중 하나 선택):
|
|
27
31
|
- **권장**: `docs/ideas/archive/`로 이동 후 상단에 `Status: Converted`, `Feature: F00X-...` 기록
|
|
28
32
|
- 또는: 완전히 삭제 (히스토리가 필요 없을 때만)
|
|
29
33
|
|
|
30
34
|
> 💡 완전 삭제 대신 archive를 권장합니다: “왜 이 Feature가 생겼는지” 추적에 도움이 됩니다.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 변경 프로토콜 (Idea 단계에서 내용이 바뀔 때)
|
|
39
|
+
|
|
40
|
+
Idea 단계에서도 변경은 “어디를 고쳤는지”가 남아야 합니다.
|
|
41
|
+
|
|
42
|
+
- PRD 요구사항이 추가/변경되면: Idea 문서의 `PRD Refs`를 먼저 갱신하고, 필요하면 PRD 문서(`docs/prd/*.md`)에도 ID를 추가/수정합니다.
|
|
43
|
+
- 아이디어가 Feature로 승격된 뒤에 변경이 생기면: Idea가 아니라 Feature(`spec.md`/`tasks.md`/`plan.md`/`decisions.md`)를 SSOT로 갱신합니다.
|
|
@@ -13,6 +13,34 @@
|
|
|
13
13
|
2. 주요 기능과 사용자 스토리를 작성하세요
|
|
14
14
|
3. 기술 아키텍처 개요를 포함하세요
|
|
15
15
|
|
|
16
|
+
## 요구사항 ID 규칙 (권장)
|
|
17
|
+
|
|
18
|
+
PRD의 “어느 요구사항이 구현됐는지”를 CLI가 집계할 수 있도록, 요구사항에 **안정적인 ID**를 부여하세요.
|
|
19
|
+
|
|
20
|
+
- 형식: `PRD-FR-001`, `PRD-US-002`, `PRD-NFR-003`
|
|
21
|
+
- 같은 줄(헤더/불릿) 안에 ID만 포함되어 있으면 됩니다.
|
|
22
|
+
- Feature의 `tasks.md` 태스크 라인에 `[PRD-FR-001]`처럼 **대괄호 태그**로 참조하세요.
|
|
23
|
+
- PRD와 무관한 태스크는 `[NON-PRD]` 태그로 표시하세요.
|
|
24
|
+
|
|
25
|
+
예시:
|
|
26
|
+
|
|
27
|
+
```md
|
|
28
|
+
- PRD-FR-001: 로그인 rate limit
|
|
29
|
+
### PRD-US-002: 관리자는 지표를 볼 수 있다
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## 변경 규칙 (요구사항 추가/변경/폐기)
|
|
33
|
+
|
|
34
|
+
요구사항이 바뀌면 “어디를 고쳐야 하는지”가 명확해야 합니다.
|
|
35
|
+
|
|
36
|
+
- **ID 안정성**:
|
|
37
|
+
- ID는 재번호 부여/재사용하지 않습니다.
|
|
38
|
+
- 요구사항이 폐기되면 삭제 대신 `Deprecated` 표기 + 이유/대체 ID를 기록합니다.
|
|
39
|
+
- 요구사항이 분리/병합되면, 기존 ID는 유지하고 새 ID를 추가한 뒤 관계를 PRD에 명시합니다.
|
|
40
|
+
- **연쇄 업데이트(필수)**:
|
|
41
|
+
- PRD 변경이 이미 진행 중인 Feature에 영향을 주면, 해당 Feature의 `spec.md`(`PRD Refs`), `tasks.md`(태스크 태그), 필요 시 `plan.md`와 `decisions.md`까지 함께 갱신합니다.
|
|
42
|
+
- 아직 Feature가 없다면, `docs/ideas/*.md`에 `PRD Refs`를 남겨 “승격 전 상태”에서도 추적 가능하게 유지합니다.
|
|
43
|
+
|
|
16
44
|
## 예시 파일
|
|
17
45
|
|
|
18
46
|
- `{project-name}-prd.md` - 메인 PRD 문서
|