lee-spec-kit 0.4.12 → 0.4.14

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.
Files changed (32) hide show
  1. package/README.en.md +54 -1
  2. package/README.md +58 -1
  3. package/dist/index.js +314 -124
  4. package/package.json +1 -1
  5. package/templates/en/common/agents/pr-template.md +21 -3
  6. package/templates/en/common/agents/skills/create-feature.md +2 -16
  7. package/templates/en/common/agents/skills/create-pr.md +24 -4
  8. package/templates/en/common/agents/skills/execute-task.md +5 -3
  9. package/templates/en/fullstack/README.md +5 -2
  10. package/templates/en/fullstack/agents/agents.md +2 -1
  11. package/templates/en/fullstack/features/feature-base/plan.md +1 -1
  12. package/templates/en/fullstack/features/feature-base/spec.md +1 -1
  13. package/templates/en/fullstack/features/feature-base/tasks.md +10 -1
  14. package/templates/en/single/README.md +5 -2
  15. package/templates/en/single/agents/agents.md +2 -1
  16. package/templates/en/single/features/feature-base/plan.md +1 -1
  17. package/templates/en/single/features/feature-base/spec.md +1 -1
  18. package/templates/en/single/features/feature-base/tasks.md +10 -1
  19. package/templates/ko/common/agents/pr-template.md +21 -3
  20. package/templates/ko/common/agents/skills/create-feature.md +2 -16
  21. package/templates/ko/common/agents/skills/create-pr.md +24 -4
  22. package/templates/ko/common/agents/skills/execute-task.md +7 -13
  23. package/templates/ko/fullstack/README.md +5 -2
  24. package/templates/ko/fullstack/agents/agents.md +2 -1
  25. package/templates/ko/fullstack/features/feature-base/plan.md +1 -1
  26. package/templates/ko/fullstack/features/feature-base/spec.md +1 -1
  27. package/templates/ko/fullstack/features/feature-base/tasks.md +11 -2
  28. package/templates/ko/single/README.md +5 -2
  29. package/templates/ko/single/agents/agents.md +2 -1
  30. package/templates/ko/single/features/feature-base/plan.md +1 -1
  31. package/templates/ko/single/features/feature-base/spec.md +1 -1
  32. package/templates/ko/single/features/feature-base/tasks.md +11 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lee-spec-kit",
3
- "version": "0.4.12",
3
+ "version": "0.4.14",
4
4
  "description": "Project documentation structure generator for AI-assisted development",
5
5
  "type": "module",
6
6
  "bin": {
@@ -25,6 +25,11 @@ For file links within the repo in PR body, **always use current branch name**:
25
25
  > ⚠️ `main` branch links will return 404 until merged!
26
26
  > Always use the **current feature branch name** (e.g., `feat/5-feature-name`).
27
27
 
28
+ ### Labels (Required)
29
+
30
+ - PRs must have **at least 1 label**. (cannot be empty)
31
+ - If you're unsure which label to use, confirm with the user before creating the PR.
32
+
28
33
  ---
29
34
 
30
35
  ## PR Body Template
@@ -59,6 +64,7 @@ For file links within the repo in PR body, **always use current branch name**:
59
64
 
60
65
  ## Screenshots (Frontend / UI changes)
61
66
 
67
+ <!-- If there are no UI changes, or if screenshot upload is disabled (e.g. `.lee-spec-kit.json` has `pr.screenshots.upload: false`), remove this section. -->
62
68
  > If you follow the Release assets upload flow in `skills/create-pr.md`, you can include images in the PR body without committing files to your branch.
63
69
 
64
70
  {Screenshot markdown (e.g. ![](URL))}
@@ -66,9 +72,18 @@ For file links within the repo in PR body, **always use current branch name**:
66
72
  ## Architecture Diagram (Backend / core structure changes)
67
73
 
68
74
  ```mermaid
69
- flowchart LR
70
- A[Client] --> B[API]
71
- B --> C[DB]
75
+ sequenceDiagram
76
+ %% Guidelines:
77
+ %% - Express the key "request → processing → storage/response" flow in time order
78
+ %% - Keep participants ≤ 6
79
+ %% - Keep messages ≤ 12; summarize/split if needed
80
+ participant Client as Client
81
+ participant API as API
82
+ participant DB as DB
83
+ Client->>API: Request
84
+ API->>DB: Query/Command
85
+ DB-->>API: Result
86
+ API-->>Client: Response
72
87
  ```
73
88
 
74
89
  ## Related Documents
@@ -107,6 +122,9 @@ gh pr create \
107
122
 
108
123
  After all reviews are resolved:
109
124
 
125
+ > ⚠️ Merging (`git merge`/`gh pr merge`) and creating merge commits are considered **remote git operations**.
126
+ > Before running these commands, share the changes with the user and proceed only after the user replies with exactly `OK`.
127
+
110
128
  ```bash
111
129
  # Update main before merge
112
130
  git checkout main
@@ -37,22 +37,8 @@ After completing the action, go back to Step 1 and run `context` again.
37
37
  2. **Do not skip**: Do not fake issue numbers/statuses to advance steps.
38
38
  3. **No self-judgment**: If unsure, run `context` again.
39
39
 
40
- ---
41
-
42
- ## Reference: the 10-step workflow (reference only)
43
-
44
- > ⚠️ Do NOT execute these from memory. Always follow the CLI.
45
-
46
- 1. Feature folder created
47
- 2. Write `spec.md`
48
- 3. Get `spec.md` approved
49
- 4. Create GitHub Issue and record `#`
50
- 5. Create feature branch
51
- 6. Write `plan.md`
52
- 7. Get `plan.md` approved
53
- 8. Write/execute `tasks.md`
54
- 9. Pre-commit verification
55
- 10. Commit docs
40
+ > Note: the workflow steps may change over time. Do not memorize step numbers.
41
+ > Treat `context` output as the SSOT.
56
42
 
57
43
  ---
58
44
 
@@ -23,16 +23,18 @@ Guide for creating Pull Requests.
23
23
  | -------- | ---------------------------------- |
24
24
  | Title | `feat(#{issue-number}): {feature} ({short description})` |
25
25
  | Body | Overview, Changes, Tests, Docs |
26
- | Labels | Appropriate labels |
26
+ | Labels | **At least 1 required** (cannot be empty) |
27
27
  | Assignee | `@me` (default) |
28
28
 
29
+ > ⚠️ Labels cannot be empty. If you’re unsure which label to use, ask/confirm with the user before creating the PR.
30
+
29
31
  ### 2. Test Verification
30
32
 
31
33
  > 🚨 **PR cannot be created if tests fail**
32
34
 
33
35
  1. Run relevant test commands (e.g., `npm test`, `pnpm test`); if no tests exist, request them from the user
34
36
  2. Check results (PASS/FAIL)
35
- 3. In the PR body "Tests" section, add **only the tests you actually ran** as checklist items and ensure they are **all checked ([x])** (do not include unexecuted tests)
37
+ 3. In the PR body "Tests" section, follow `pr-template.md` rules as-is. (add/check only what you actually ran)
36
38
  4. If you didn’t run any tests, request/confirm with the user before creating the PR
37
39
 
38
40
  ### 3. Prepare Screenshots / Diagrams (Include in PR Body)
@@ -44,9 +46,20 @@ Include the artifacts in the PR body.
44
46
 
45
47
  #### UI changes (Frontend PR)
46
48
 
49
+ - Default is `pr.screenshots.upload: false`. If you need upload/URL inclusion, enable it in `.lee-spec-kit.json`.
50
+ - If `.lee-spec-kit.json` has `pr.screenshots.upload: false`, **do not upload/include URLs**, and **do not include a "Screenshots" section** in the PR body.
47
51
  - Use `agent-browser` to generate screenshots.
48
52
  - Save files under a local temp folder (`/tmp/lee-spec-kit/pr-assets/`).
49
53
  - Upload them as Release assets, then put the image URLs into the "Screenshots" section of the PR body.
54
+ - Before uploading, **open the image file** and verify, then ask the user to validate before PR creation:
55
+ - It is not a login/permission/error/blank page
56
+ - The PR-relevant change is actually visible
57
+ - No sensitive info is exposed (prod tokens/PII/internal URLs)
58
+
59
+ > If the page requires auth, request one of the following from the user before taking screenshots:
60
+ > - A preview URL that is accessible **without login** (dev-only bypass is OK)
61
+ > - A **test account** (no real accounts / no production tokens) + login instructions
62
+ > - A reproducible route with seeded/dummy data
50
63
 
51
64
  ```bash
52
65
  # (one-time) install agent-browser
@@ -67,12 +80,18 @@ agent-browser open "$PREVIEW_URL"
67
80
  agent-browser screenshot /tmp/lee-spec-kit/pr-assets/ui-1.png --full
68
81
  agent-browser close
69
82
 
83
+ # (required) open and validate the screenshot (re-capture if login/error/blank)
84
+ ls -lh /tmp/lee-spec-kit/pr-assets/ui-1.png
85
+ # macOS: open /tmp/lee-spec-kit/pr-assets/ui-1.png
86
+ # Linux: xdg-open /tmp/lee-spec-kit/pr-assets/ui-1.png
87
+
70
88
  # (recommended) stop the dev server you started for screenshots
71
89
  kill \"$DEV_PID\" >/dev/null 2>&1 || true
72
90
  ```
73
91
 
74
92
  ```bash
75
93
  # Upload to Release assets and generate the URL to paste into the PR body
94
+ # - If `.lee-spec-kit.json` has `pr.screenshots.upload: false`, skip this section.
76
95
  REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
77
96
  SAFE_BRANCH=$(git branch --show-current | tr '/' '-')
78
97
  TAG="pr-assets/${SAFE_BRANCH}"
@@ -87,7 +106,7 @@ echo \"![](https://github.com/${REPO}/releases/download/${TAG}/ui-1.png)\"
87
106
 
88
107
  #### Logic/structure changes (Backend PR)
89
108
 
90
- - Write a Mermaid diagram (flowchart/sequence/etc.) in the PR body (see the "Architecture Diagram" section in `pr-template.md`).
109
+ - Write a Mermaid **`sequenceDiagram`** in the PR body (follow the "Architecture Diagram" rules in `pr-template.md` as-is).
91
110
 
92
111
  ### 4. Request User Approval
93
112
 
@@ -97,7 +116,7 @@ Before creating PR, share the following **in a code block** and wait for **expli
97
116
 
98
117
  - Title
99
118
  - Full body (`pr-template.md` format)
100
- - Labels
119
+ - Labels (at least 1; cannot be empty)
101
120
 
102
121
  ### 5. Create PR
103
122
 
@@ -105,6 +124,7 @@ Before creating PR, share the following **in a code block** and wait for **expli
105
124
  gh pr create \
106
125
  --title "feat(#{issue-number}): {feature} ({short description})" \
107
126
  --body-file /tmp/pr-body.md \
127
+ --label "{label1,label2}" \
108
128
  --assignee @me \
109
129
  --base main
110
130
  ```
@@ -20,7 +20,7 @@ npx lee-spec-kit context
20
20
  Execute the `👉 Next Action` exactly as printed by the CLI.
21
21
 
22
22
  - If the CLI points to an active task, focus on that task only.
23
- - If there is no active task, **share the task title and get user approval (OK)**, then switch the next `[TODO]` task to `[DOING]` and start.
23
+ - Treat the task state/approval rules in `tasks.md` **"Task Rules"** as SSOT (e.g. when OK is required for `[TODO]→[DOING]`, `[DOING]→[DONE]`).
24
24
  - If the CLI prints commands, copy/paste them. (In standalone setups commands may include `git -C ...` and scopes like `project`/`docs`.)
25
25
 
26
26
  ### Step 3: Update tasks.md (only what you did)
@@ -33,8 +33,10 @@ Keep `tasks.md` aligned with reality.
33
33
  ### Step 3.25: Commit per task (important)
34
34
 
35
35
  - Complete **only one task at a time** (do not batch-finish multiple tasks in one commit).
36
- - After marking a task `[DONE]` (and updating any checklist items), create commits (code commit + docs commit) so each task has its own history.
37
- - Once all tasks are `[DONE]`, share the "Completion Criteria" checklist with the user and get approval (OK), then check it (especially the **User approval (OK) received** item).
36
+ - After you share the outcome/verification and get approval (OK), mark the task `[DONE]` (and update any checklist items), then create commits (code commit + docs commit) so each task has its own history.
37
+ - If `context` shows `[CHECK required]`, for commits/push/merge, **share the commit message + included files and wait for explicit OK** before running the commands.
38
+ - Once all tasks are `[DONE]`, share the "Completion Criteria" checklist with the user and get **final approval (OK)**, then check it (especially the **Final user approval (OK) received** item).
39
+ - Note: `Doc Status (Review→Approved)` is **progress approval (OK)**, while the completion checklist approval is **final approval (OK)**.
38
40
 
39
41
  ### Step 3.5: Record decisions (strongly recommended, effectively required)
40
42
 
@@ -31,6 +31,7 @@ When you run `lee-spec-kit init`, it creates `.lee-spec-kit.json` in the docs ro
31
31
  - `docsRepo` ("embedded" | "standalone"): How docs are managed
32
32
  - `pushDocs` (boolean, optional): Only written when `docsRepo: "standalone"` (whether to push to remote)
33
33
  - `docsRemote` (string, optional): Only written when `pushDocs: true` (remote repo URL)
34
+ - `approval` (object, optional): Override `[CHECK required]` / `requiresUserCheck` policy in `context` output (approval token: `OK`)
34
35
 
35
36
  ### Examples
36
37
 
@@ -40,7 +41,8 @@ When you run `lee-spec-kit init`, it creates `.lee-spec-kit.json` in the docs ro
40
41
  "projectType": "fullstack",
41
42
  "lang": "en",
42
43
  "createdAt": "{{date}}",
43
- "docsRepo": "embedded"
44
+ "docsRepo": "embedded",
45
+ "approval": { "mode": "builtin" }
44
46
  }
45
47
  ```
46
48
 
@@ -52,6 +54,7 @@ When you run `lee-spec-kit init`, it creates `.lee-spec-kit.json` in the docs ro
52
54
  "createdAt": "{{date}}",
53
55
  "docsRepo": "standalone",
54
56
  "pushDocs": true,
55
- "docsRemote": "git@github.com:org/{{projectName}}-docs.git"
57
+ "docsRemote": "git@github.com:org/{{projectName}}-docs.git",
58
+ "approval": { "mode": "builtin" }
56
59
  }
57
60
  ```
@@ -8,6 +8,7 @@ Operating rules for AI code assistants to perform consistent code generation and
8
8
 
9
9
  > ⚠️ **The following actions require explicit user approval (OK) before proceeding.**
10
10
  > **If approval is not given, stop immediately and request confirmation.**
11
+ > ✅ “OK” means the user replies with exactly `OK`.
11
12
 
12
13
  | Action | When to Confirm | What to Share |
13
14
  | --------------------- | ------------------------ | ------------------------- |
@@ -17,7 +18,7 @@ Operating rules for AI code assistants to perform consistent code generation and
17
18
  | Issue Creation | Before `gh issue create` | Title, body, labels |
18
19
  | PR Creation | Before `gh pr create` | Title, body, labels |
19
20
  | Assignee Change | When assigning others | Target username |
20
- | Remote Git Operations | Before `push`, `merge` | Branch, changes |
21
+ | Remote Git Operations | Before `push`, `merge` (including merge commits) | Branch, changes |
21
22
 
22
23
  ### Approval Process
23
24
 
@@ -9,7 +9,7 @@
9
9
  - **Feature ID**: F{number}
10
10
  - **Target Repo**: {{projectName}}-{be|fe}
11
11
  - **Created**: YYYY-MM-DD
12
- - **Status**: Draft | Review | Approved
12
+ - **Status**: Review | Approved
13
13
 
14
14
  ---
15
15
 
@@ -11,7 +11,7 @@
11
11
  - **Target Repo**: {{projectName}}-{be|fe}
12
12
  - **Issue Number**: #{issue-number}
13
13
  - **Created**: YYYY-MM-DD
14
- - **Status**: Draft | Review | Approved
14
+ - **Status**: Review | Approved
15
15
 
16
16
  ---
17
17
 
@@ -3,12 +3,16 @@
3
3
  ## Task Rules
4
4
 
5
5
  - **Status**: `[TODO]` → `[DOING]` → `[DONE]`
6
+ - **Approvals**:
7
+ - `[TODO] → [DOING]`: share task title first + user approval (OK)
8
+ - `[DOING] → [DONE]`: share result/verification first + user approval (OK)
6
9
  - **Priority**: P0(urgent) > P1(high) > P2(medium) > P3(low)
7
10
 
8
11
  ---
9
12
 
10
13
  ## GitHub Issue
11
14
 
15
+ - **Doc Status**: Review | Approved
12
16
  - **Repo**: {{projectName}}-{be|fe}
13
17
  - **Issue**: #{issue-number}
14
18
  - **Branch**: `feat/{issue-number}-{feature-name}`
@@ -23,11 +27,16 @@
23
27
 
24
28
  ### Phase 1: {Phase Name}
25
29
 
30
+ > Add tasks below. **At least 1 task is required.**
31
+ > Copy and use the format below.
32
+
33
+ ```markdown
26
34
  - [TODO][P1] T-F{number}-01 {Task Title}
27
35
  - Acceptance:
28
36
  - (verification condition)
29
37
  - Checklist:
30
38
  - [ ] (subtask)
39
+ ```
31
40
 
32
41
  ---
33
42
 
@@ -37,7 +46,7 @@
37
46
 
38
47
  - [ ] All tasks are `[DONE]`, and each task's `Acceptance` is verified and `Checklist` is checked
39
48
  - [ ] Tests executed and passing (record command/result below)
40
- - [ ] User approval (OK) received
49
+ - [ ] Final user approval (OK) received (review the outcome)
41
50
 
42
51
  ### Test Run Log
43
52
 
@@ -30,6 +30,7 @@ When you run `lee-spec-kit init`, it creates `.lee-spec-kit.json` in the docs ro
30
30
  - `docsRepo` ("embedded" | "standalone"): How docs are managed
31
31
  - `pushDocs` (boolean, optional): Only written when `docsRepo: "standalone"` (whether to push to remote)
32
32
  - `docsRemote` (string, optional): Only written when `pushDocs: true` (remote repo URL)
33
+ - `approval` (object, optional): Override `[CHECK required]` / `requiresUserCheck` policy in `context` output (approval token: `OK`)
33
34
 
34
35
  ### Examples
35
36
 
@@ -39,7 +40,8 @@ When you run `lee-spec-kit init`, it creates `.lee-spec-kit.json` in the docs ro
39
40
  "projectType": "single",
40
41
  "lang": "en",
41
42
  "createdAt": "{{date}}",
42
- "docsRepo": "embedded"
43
+ "docsRepo": "embedded",
44
+ "approval": { "mode": "builtin" }
43
45
  }
44
46
  ```
45
47
 
@@ -51,6 +53,7 @@ When you run `lee-spec-kit init`, it creates `.lee-spec-kit.json` in the docs ro
51
53
  "createdAt": "{{date}}",
52
54
  "docsRepo": "standalone",
53
55
  "pushDocs": true,
54
- "docsRemote": "git@github.com:org/{{projectName}}-docs.git"
56
+ "docsRemote": "git@github.com:org/{{projectName}}-docs.git",
57
+ "approval": { "mode": "builtin" }
55
58
  }
56
59
  ```
@@ -8,6 +8,7 @@ Operating rules for AI code assistants to perform consistent code generation and
8
8
 
9
9
  > ⚠️ **The following actions require explicit user approval (OK) before proceeding.**
10
10
  > **If approval is not given, stop immediately and request confirmation.**
11
+ > ✅ “OK” means the user replies with exactly `OK`.
11
12
 
12
13
  | Action | When to Confirm | What to Share |
13
14
  | --------------------- | ------------------------ | ------------------------- |
@@ -17,7 +18,7 @@ Operating rules for AI code assistants to perform consistent code generation and
17
18
  | Issue Creation | Before `gh issue create` | Title, body, labels |
18
19
  | PR Creation | Before `gh pr create` | Title, body, labels |
19
20
  | Assignee Change | When assigning others | Target username |
20
- | Remote Git Operations | Before `push`, `merge` | Branch, changes |
21
+ | Remote Git Operations | Before `push`, `merge` (including merge commits) | Branch, changes |
21
22
 
22
23
  ### Approval Process
23
24
 
@@ -9,7 +9,7 @@
9
9
  - **Feature ID**: F{number}
10
10
  - **Target Repo**: {{projectName}}
11
11
  - **Created**: YYYY-MM-DD
12
- - **Status**: Draft | Review | Approved
12
+ - **Status**: Review | Approved
13
13
 
14
14
  ---
15
15
 
@@ -11,7 +11,7 @@
11
11
  - **Target Repo**: {{projectName}}
12
12
  - **Issue Number**: #{issue-number}
13
13
  - **Created**: YYYY-MM-DD
14
- - **Status**: Draft | Review | Approved
14
+ - **Status**: Review | Approved
15
15
 
16
16
  ---
17
17
 
@@ -3,12 +3,16 @@
3
3
  ## Task Rules
4
4
 
5
5
  - **Status**: `[TODO]` → `[DOING]` → `[DONE]`
6
+ - **Approvals**:
7
+ - `[TODO] → [DOING]`: share task title first + user approval (OK)
8
+ - `[DOING] → [DONE]`: share result/verification first + user approval (OK)
6
9
  - **Priority**: P0(urgent) > P1(high) > P2(medium) > P3(low)
7
10
 
8
11
  ---
9
12
 
10
13
  ## GitHub Issue
11
14
 
15
+ - **Doc Status**: Review | Approved
12
16
  - **Repo**: {{projectName}}
13
17
  - **Issue**: #{issue-number}
14
18
  - **Branch**: `feat/{issue-number}-{feature-name}`
@@ -23,11 +27,16 @@
23
27
 
24
28
  ### Phase 1: {Phase Name}
25
29
 
30
+ > Add tasks below. **At least 1 task is required.**
31
+ > Copy and use the format below.
32
+
33
+ ```markdown
26
34
  - [TODO][P1] T-F{number}-01 {Task Title}
27
35
  - Acceptance:
28
36
  - (verification condition)
29
37
  - Checklist:
30
38
  - [ ] (subtask)
39
+ ```
31
40
 
32
41
  ---
33
42
 
@@ -37,7 +46,7 @@
37
46
 
38
47
  - [ ] All tasks are `[DONE]`, and each task's `Acceptance` is verified and `Checklist` is checked
39
48
  - [ ] Tests executed and passing (record command/result below)
40
- - [ ] User approval (OK) received
49
+ - [ ] Final user approval (OK) received (review the outcome)
41
50
 
42
51
  ### Test Run Log
43
52
 
@@ -25,6 +25,11 @@ PR 본문에서 레포 내 파일 링크는 **반드시 현재 브랜치명을
25
25
  > ⚠️ `main` 브랜치 링크는 머지 전까지 404가 발생합니다!
26
26
  > 반드시 **현재 피처 브랜치명** (예: `feat/5-feature-name`)을 사용하세요.
27
27
 
28
+ ### 라벨 (필수)
29
+
30
+ - PR에는 **최소 1개 라벨이 반드시 필요**합니다. (비워둘 수 없음)
31
+ - 어떤 라벨을 써야 할지 확신이 없으면 PR 생성 전에 사용자에게 확인하세요.
32
+
28
33
  ## PR 본문 템플릿
29
34
 
30
35
  ```markdown
@@ -57,6 +62,7 @@ PR 본문에서 레포 내 파일 링크는 **반드시 현재 브랜치명을
57
62
 
58
63
  ## 스크린샷 (프론트엔드 / UI 변경 시)
59
64
 
65
+ <!-- UI 변경이 아니거나, 스크린샷을 업로드하지 않았다면(예: `.lee-spec-kit.json`의 `pr.screenshots.upload: false`) 이 섹션은 제거하세요. -->
60
66
  > `skills/create-pr.md`의 Release assets 업로드 절차를 사용하면 브랜치에 파일을 커밋하지 않고도 이미지를 본문에 포함할 수 있습니다.
61
67
 
62
68
  {스크린샷 마크다운 (예: ![](URL))}
@@ -64,9 +70,18 @@ PR 본문에서 레포 내 파일 링크는 **반드시 현재 브랜치명을
64
70
  ## 아키텍처 다이어그램 (백엔드 / 핵심 구조 변경 시)
65
71
 
66
72
  ```mermaid
67
- flowchart LR
68
- A[Client] --> B[API]
69
- B --> C[DB]
73
+ sequenceDiagram
74
+ %% 가이드:
75
+ %% - 핵심 "요청→처리→저장/응답" 흐름을 시간 순서로 표현
76
+ %% - 참여자(participant)는 6개 이내 권장
77
+ %% - 메시지는 12개 이내 권장 (너무 길면 핵심만 남기고 요약/분리)
78
+ participant Client as Client
79
+ participant API as API
80
+ participant DB as DB
81
+ Client->>API: Request
82
+ API->>DB: Query/Command
83
+ DB-->>API: Result
84
+ API-->>Client: Response
70
85
  ```
71
86
 
72
87
  ## 관련 문서
@@ -105,6 +120,9 @@ gh pr create \
105
120
 
106
121
  모든 리뷰 해결 시:
107
122
 
123
+ > ⚠️ 머지(`git merge`/`gh pr merge`) 및 머지 커밋 생성은 **Git 원격 작업**에 해당합니다.
124
+ > 실행 전 변경 사항을 사용자에게 공유하고, 사용자가 **정확히 `OK`**라고 답한 뒤에만 진행하세요.
125
+
108
126
  ```bash
109
127
  # 머지 전 main 최신화
110
128
  git checkout main
@@ -38,22 +38,8 @@ CLI가 출력하는 **`👉 Next Action` 메시지를 읽고, 그 지시만 정
38
38
  2. **건너뛰지 않기**: "이슈 생성" 단계를 귀찮아서 생략하거나 가짜 번호를 넣지 마세요.
39
39
  3. **스스로 판단 금지**: "이 정도면 됐겠지?"라고 생각하지 말고 CLI에게 물어보세요.
40
40
 
41
- ---
42
-
43
- ## 참조: CLI가 안내하는 10단계 (참조용)
44
-
45
- > ⚠️ 이 단계를 외워서 실행하지 마세요. **참조용**일 뿐입니다. 항상 CLI를 믿으세요.
46
-
47
- 1. **Feature 폴더 생성**: `npx lee-spec-kit feature ...`
48
- 2. **spec.md 작성**: 기능 정의 (Status: Draft)
49
- 3. **spec.md 승인**: 사용자 검토 및 승인 (Status: Approved)
50
- 4. **GitHub Issue 생성**: 이슈 번호 발급
51
- 5. **브랜치 생성**: `git checkout -b feat/...`
52
- 6. **plan.md 작성**: 구현 계획 (Status: Draft)
53
- 7. **plan.md 승인**: 사용자 검토 및 승인 (Status: Approved)
54
- 8. **tasks.md 작성/실행**: 태스크 분해 및 진행
55
- 9. **문서 커밋 전 확인**: 최종 점검
56
- 10. **문서 커밋**: Docs Sync
41
+ > 참고: 워크플로우 단계는 변경될 수 있으므로, “단계 번호”를 외우지 마세요.
42
+ > **항상 `context` 출력만**을 SSOT로 따르세요.
57
43
 
58
44
  ---
59
45
 
@@ -23,16 +23,18 @@ Pull Request를 생성할 때 따르는 가이드입니다.
23
23
  | ------ | ---------------------------------- |
24
24
  | 제목 | `feat(#{이슈번호}): {기능명} ({짧은 설명})` |
25
25
  | 본문 | 개요, 변경 사항, 테스트, 관련 문서 |
26
- | 라벨 | 적절한 라벨 지정 |
26
+ | 라벨 | **최소 1개 필수** (비워둘 수 없음) |
27
27
  | 담당자 | `@me` (기본값) |
28
28
 
29
+ > ⚠️ 라벨을 비워둘 수 없습니다. 적절한 라벨이 없거나 확신이 없다면, PR 생성 전에 사용자에게 라벨을 요청/확인하세요.
30
+
29
31
  ### 2. 테스트 검증
30
32
 
31
33
  > 🚨 **테스트 미통과 시 PR 생성 불가**
32
34
 
33
35
  1. 작업과 관련된 테스트 명령어 실행 (예: `npm test`, `pnpm test`), 테스트가 없는 경우 사용자에게 요청
34
36
  2. 결과 확인 (PASS/FAIL)
35
- 3. PR 본문 "테스트" 섹션에 **실행한 테스트만** 체크리스트로 추가하고, **모두 체크([x])** 합니다. (미실행 항목은 작성하지 않기)
37
+ 3. PR 본문 "테스트" 섹션은 `pr-template.md`의 규칙을 그대로 따릅니다. (실행한 테스트만 추가/체크)
36
38
  4. 테스트를 실행하지 않았다면, PR 생성 전에 사용자에게 요청/확인합니다.
37
39
 
38
40
  ### 3. 스크린샷/다이어그램 작성 (PR 본문에 포함)
@@ -44,9 +46,20 @@ PR 본문에 결과물을 포함합니다.
44
46
 
45
47
  #### UI 변경 (프론트엔드 PR)
46
48
 
49
+ - 기본값은 `pr.screenshots.upload: false`입니다. 업로드/URL 포함이 필요하다면 `.lee-spec-kit.json`에서 `true`로 켜세요.
50
+ - `.lee-spec-kit.json`에서 `pr.screenshots.upload: false`라면 **업로드/URL 포함을 하지 않으며**, PR 본문에서도 **"스크린샷" 섹션을 만들지 않습니다.**
47
51
  - `agent-browser`로 스크린샷을 생성합니다.
48
52
  - 스크린샷 파일은 로컬 임시 폴더(`/tmp/lee-spec-kit/pr-assets/`)에 저장합니다.
49
53
  - 릴리스 자산(Release assets)으로 업로드한 뒤, 생성된 이미지 URL을 PR 본문 "스크린샷" 섹션에 넣습니다.
54
+ - 스크린샷을 업로드하기 전에 **이미지 파일을 직접 열어** 다음을 확인하고, PR 생성 전 사용자에게도 검증받습니다.
55
+ - 로그인 화면/권한 오류/에러 화면/빈 화면이 아닌지
56
+ - 이번 PR의 변경 사항이 실제로 보이는지
57
+ - 민감 정보(실서비스 토큰/개인정보/내부 URL)가 노출되지 않았는지
58
+
59
+ > 로그인/권한이 필요한 화면이라면, 스크린샷을 찍기 전에 사용자에게 아래 중 하나를 요청하세요.
60
+ > - 개발 서버에서 **로그인 없이** 접근 가능한 미리보기 URL 제공 (dev-only bypass 포함)
61
+ > - **테스트 계정** 제공(실계정/실서비스 토큰 금지) + 로그인 절차 안내
62
+ > - 시드 데이터/더미 데이터로 재현 가능한 경로 제공
50
63
 
51
64
  ```bash
52
65
  # (최초 1회) agent-browser 설치
@@ -67,12 +80,18 @@ agent-browser open "$PREVIEW_URL"
67
80
  agent-browser screenshot /tmp/lee-spec-kit/pr-assets/ui-1.png --full
68
81
  agent-browser close
69
82
 
83
+ # (필수) 스크린샷 파일을 열어 검증 (로그인/에러/빈 화면이면 재촬영)
84
+ ls -lh /tmp/lee-spec-kit/pr-assets/ui-1.png
85
+ # macOS: open /tmp/lee-spec-kit/pr-assets/ui-1.png
86
+ # Linux: xdg-open /tmp/lee-spec-kit/pr-assets/ui-1.png
87
+
70
88
  # (권장) 스크린샷을 위해 띄운 개발 서버는 작업이 끝나면 종료합니다.
71
89
  kill \"$DEV_PID\" >/dev/null 2>&1 || true
72
90
  ```
73
91
 
74
92
  ```bash
75
93
  # 스크린샷을 Release assets로 업로드하고, PR 본문에 넣을 URL 만들기
94
+ # - `.lee-spec-kit.json`에서 `pr.screenshots.upload: false`라면 이 단계는 생략합니다.
76
95
  REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
77
96
  SAFE_BRANCH=$(git branch --show-current | tr '/' '-')
78
97
  TAG="pr-assets/${SAFE_BRANCH}"
@@ -87,7 +106,7 @@ echo \"![](https://github.com/${REPO}/releases/download/${TAG}/ui-1.png)\"
87
106
 
88
107
  #### 로직/구조 변경 (백엔드 PR)
89
108
 
90
- - PR 본문에 Mermaid 다이어그램(예: flowchart/sequence)을 작성합니다. (`pr-template.md`의 "아키텍처 다이어그램" 섹션 참고)
109
+ - PR 본문에 Mermaid **`sequenceDiagram`**을 작성합니다. (`pr-template.md`의 "아키텍처 다이어그램" 섹션 규칙을 그대로 따르세요)
91
110
 
92
111
  ### 4. 사용자 확인 요청
93
112
 
@@ -97,7 +116,7 @@ PR 생성 전 다음 내용을 **코드블록으로** 사용자에게 공유하
97
116
 
98
117
  - 제목
99
118
  - 본문 전체 (`pr-template.md` 형식)
100
- - 라벨
119
+ - 라벨(최소 1개, 비워둘 수 없음)
101
120
 
102
121
  ### 5. PR 생성
103
122
 
@@ -105,6 +124,7 @@ PR 생성 전 다음 내용을 **코드블록으로** 사용자에게 공유하
105
124
  gh pr create \
106
125
  --title "feat(#{이슈번호}): {기능명} ({짧은 설명})" \
107
126
  --body-file /tmp/pr-body.md \
127
+ --label "{라벨1,라벨2}" \
108
128
  --assignee @me \
109
129
  --base main
110
130
  ```
@@ -9,7 +9,7 @@
9
9
 
10
10
  모든 태스크가 완료될 때까지(`[DONE]`) 다음 과정을 **계속 반복**하세요.
11
11
 
12
- ### 1단계: 할 일 확인 (Check)
12
+ ### 1단계: 할 일 확인
13
13
 
14
14
  작업을 시작하거나 하나를 마칠 때마다 **반드시** 아래 명령어를 실행합니다.
15
15
 
@@ -22,8 +22,7 @@ npx lee-spec-kit context
22
22
  CLI가 가리키는 **Active Task** 또는 **Next Action**을 수행합니다.
23
23
 
24
24
  - **[DOING] 상태인 태스크가 있다면**: 해당 태스크를 최우선으로 완료하세요.
25
- - **[DOING]이 없다면**: CLI가 추천하는 다음 태스크(`[TODO]`)를 시작하기 전에, **태스크 제목을 공유하고 사용자 승인(OK)을 받은 뒤** `[DOING]`으로 변경하세요.
26
- - **완료 조건(Acceptance)을 검증**하고, 테스트를 통과해야만 완료(`[DONE]`) 처리합니다.
25
+ - 태스크 상태 전환/승인 규칙은 `tasks.md`의 **"태스크 규칙"** 섹션을 SSOT로 따릅니다. (예: `[TODO]→[DOING]`, `[DOING]→[DONE]` 시점의 OK)
27
26
  - CLI가 명령어를 출력하면 **그대로 복사해 실행**합니다. (standalone 환경에서도 레포 경로가 포함될 수 있습니다)
28
27
 
29
28
  ### 3단계: 기록 및 반복 (Record & Loop)
@@ -46,10 +45,12 @@ CLI가 가리키는 **Active Task** 또는 **Next Action**을 수행합니다.
46
45
 
47
46
  #### 3-2) 태스크/체크리스트 업데이트 + 커밋
48
47
 
49
- 1. 작업이 끝나면 해당 태스크의 상태를 `[DONE]`으로 변경하고, `Acceptance/Checklist` 항목을 `[x]`로 체크합니다.
48
+ 1. 작업이 끝나면 결과/검증을 사용자에게 공유해 승인(OK)을 받은 뒤, 해당 태스크의 상태를 `[DONE]`으로 변경하고 `Acceptance/Checklist` 항목을 `[x]`로 체크합니다.
50
49
  2. **한 번에 하나의 태스크만** `[DONE]` 처리합니다. (태스크 2개 이상을 한 번에 완료/커밋으로 묶지 않기)
51
50
  3. 커밋을 생성합니다 (코드 커밋 + 문서 커밋). 태스크 단위로 커밋이 남아야 합니다.
52
- 4. 모든 태스크가 `[DONE]`가 되면, "완료 조건" 체크리스트를 사용자에게 공유하고 승인(OK)을 받은 체크합니다. (특히 **사용자 승인(OK) 완료** 항목)
51
+ - `context`에 `[확인 필요]`가 보이면, **커밋/푸시 같은 원격 작업은 사용자에게 커밋 메시지/포함 파일을 공유하고 OK 받은 뒤** 실행합니다.
52
+ 4. 모든 태스크가 `[DONE]`가 되면, "완료 조건" 체크리스트를 사용자에게 공유하고 **최종 승인(OK)** 을 받은 뒤 체크합니다. (특히 **최종 사용자 승인(OK) 완료** 항목)
53
+ - 참고: `문서 상태(Review→Approved)`는 **진행 승인(OK)** 이고, 완료 조건의 승인은 **최종 승인(OK)** 입니다.
53
54
  5. **즉시 1단계로 돌아가** 다음 할 일을 CLI에게 물어봅니다.
54
55
 
55
56
  ---
@@ -66,14 +67,7 @@ CLI가 가리키는 **Active Task** 또는 **Next Action**을 수행합니다.
66
67
 
67
68
  > ⚠️ 직접 판단하지 말고 CLI가 시키는 대로 하세요.
68
69
 
69
- 1. **[TODO] [DOING]**: 작업 시작 표시
70
- 2. **[DOING] → [DONE]**: 테스트 통과 및 사용자 승인 후 표시
71
-
72
- ```markdown
73
- - [DONE] T-01: 로그인 UI (완료됨)
74
- - [DOING] T-02: API 연동 (현재 작업 중)
75
- - [TODO] T-03: 에러 처리 (대기 중)
76
- ```
70
+ 태스크 상태 전환/승인 규칙은 `tasks.md`의 **"태스크 규칙"** 섹션을 따르세요.
77
71
 
78
72
  ## 비상시 대처 (Emergency)
79
73
 
@@ -31,6 +31,7 @@
31
31
  - `docsRepo` ("embedded" | "standalone"): Docs 관리 방식
32
32
  - `pushDocs` (boolean, optional): `docsRepo: "standalone"`일 때만 생성 (원격 push 여부)
33
33
  - `docsRemote` (string, optional): `pushDocs: true`일 때만 생성 (원격 레포 URL)
34
+ - `approval` (object, optional): `context` 출력의 `[확인 필요]` / `requiresUserCheck` 정책 오버라이드 (승인 토큰: `OK`)
34
35
 
35
36
  ### 예시
36
37
 
@@ -40,7 +41,8 @@
40
41
  "projectType": "fullstack",
41
42
  "lang": "ko",
42
43
  "createdAt": "{{date}}",
43
- "docsRepo": "embedded"
44
+ "docsRepo": "embedded",
45
+ "approval": { "mode": "builtin" }
44
46
  }
45
47
  ```
46
48
 
@@ -52,6 +54,7 @@
52
54
  "createdAt": "{{date}}",
53
55
  "docsRepo": "standalone",
54
56
  "pushDocs": true,
55
- "docsRemote": "git@github.com:org/{{projectName}}-docs.git"
57
+ "docsRemote": "git@github.com:org/{{projectName}}-docs.git",
58
+ "approval": { "mode": "builtin" }
56
59
  }
57
60
  ```