lee-spec-kit 0.4.9 → 0.4.11

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/dist/index.js CHANGED
@@ -188,10 +188,12 @@ var I18N = {
188
188
  planWrite: "plan.md \uC791\uC131",
189
189
  planApprove: "plan.md \uC2B9\uC778",
190
190
  tasksWrite: "tasks.md \uC791\uC131",
191
+ docsInitialCommit: "\uCD08\uAE30 \uBB38\uC11C \uCEE4\uBC0B",
191
192
  docsCommitPlanning: "\uBB38\uC11C \uCEE4\uBC0B(\uB3D9\uAE30\uD654)",
192
193
  issueCreate: "GitHub Issue \uC0DD\uC131",
193
194
  branchCreate: "\uBE0C\uB79C\uCE58 \uC0DD\uC131",
194
195
  tasksExecute: "\uD0DC\uC2A4\uD06C \uC2E4\uD589",
196
+ docsCommitSync: "\uBB38\uC11C \uCEE4\uBC0B(\uB3D9\uAE30\uD654)",
195
197
  prCreate: "PR \uC0DD\uC131",
196
198
  codeReview: "\uCF54\uB4DC \uB9AC\uBDF0",
197
199
  featureDone: "Feature \uC644\uB8CC"
@@ -208,6 +210,7 @@ var I18N = {
208
210
  docsCommitPlanning: 'cd "{docsGitCwd}" && git add "{featurePath}" && git commit -m "docs(planning): {folderName} \uAE30\uD68D \uBB38\uC11C"',
209
211
  issueCreateAndWrite: "GitHub Issue\uB97C \uC0DD\uC131\uD55C \uB4A4, spec.md/tasks.md\uC758 \uC774\uC288 \uBC88\uD638\uB97C \uCC44\uC6B0\uACE0 \uBB38\uC11C \uCEE4\uBC0B\uC744 \uC900\uBE44\uD558\uC138\uC694. (skills/create-issue.md \uCC38\uACE0)",
210
212
  docsCommitIssueUpdate: 'cd "{docsGitCwd}" && git add "{featurePath}" && git commit -m "docs(#{issueNumber}): {folderName} \uBB38\uC11C \uC5C5\uB370\uC774\uD2B8"',
213
+ docsCommitUpdate: 'cd "{docsGitCwd}" && git add "{featurePath}" && git commit -m "docs: {folderName} \uBB38\uC11C \uC5C5\uB370\uC774\uD2B8"',
211
214
  standaloneNeedsProjectRoot: "standalone \uBAA8\uB4DC\uC5D0\uC11C\uB294 projectRoot \uC124\uC815\uC774 \uD544\uC694\uD569\uB2C8\uB2E4. (npx lee-spec-kit config --project-root ...)",
212
215
  createBranch: 'cd "{projectGitCwd}" && git checkout -b feat/{issueNumber}-{slug}',
213
216
  tasksAllDoneButNoChecklist: '\uBAA8\uB4E0 \uD0DC\uC2A4\uD06C\uAC00 DONE\uC774\uC9C0\uB9CC \uC644\uB8CC \uC870\uAC74 \uCCB4\uD06C\uB9AC\uC2A4\uD2B8 \uC139\uC158\uC744 \uCC3E\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4. tasks.md\uC758 "\uC644\uB8CC \uC870\uAC74" \uC139\uC158\uC744 \uCD94\uAC00/\uD655\uC778\uD558\uC138\uC694.',
@@ -363,10 +366,12 @@ var I18N = {
363
366
  planWrite: "Write plan.md",
364
367
  planApprove: "Approve plan.md",
365
368
  tasksWrite: "Write tasks.md",
369
+ docsInitialCommit: "Initial docs commit",
366
370
  docsCommitPlanning: "Commit docs (sync)",
367
371
  issueCreate: "Create GitHub Issue",
368
372
  branchCreate: "Create branch",
369
373
  tasksExecute: "Execute tasks",
374
+ docsCommitSync: "Commit docs (sync)",
370
375
  prCreate: "Create PR",
371
376
  codeReview: "Code review",
372
377
  featureDone: "Feature done"
@@ -383,6 +388,7 @@ var I18N = {
383
388
  docsCommitPlanning: 'cd "{docsGitCwd}" && git add "{featurePath}" && git commit -m "docs(planning): {folderName} planning docs"',
384
389
  issueCreateAndWrite: "Create a GitHub Issue, fill the issue number in spec.md/tasks.md, then prepare a docs commit. (See skills/create-issue.md)",
385
390
  docsCommitIssueUpdate: 'cd "{docsGitCwd}" && git add "{featurePath}" && git commit -m "docs(#{issueNumber}): {folderName} docs update"',
391
+ docsCommitUpdate: 'cd "{docsGitCwd}" && git add "{featurePath}" && git commit -m "docs: {folderName} docs update"',
386
392
  standaloneNeedsProjectRoot: "Standalone mode requires projectRoot. (npx lee-spec-kit config --project-root ...)",
387
393
  createBranch: 'cd "{projectGitCwd}" && git checkout -b feat/{issueNumber}-{slug}',
388
394
  tasksAllDoneButNoChecklist: 'All tasks are DONE, but no completion checklist section was found. Add/verify the "Completion Criteria" section in tasks.md.',
@@ -1234,7 +1240,7 @@ function getStepDefinitions(lang) {
1234
1240
  },
1235
1241
  {
1236
1242
  step: 7,
1237
- name: tr(lang, "steps", "docsCommitPlanning"),
1243
+ name: tr(lang, "steps", "docsInitialCommit"),
1238
1244
  checklist: {
1239
1245
  done: (f) => f.docs.tasksExists && f.tasks.total > 0 && f.specStatus === "Approved" && f.planStatus === "Approved" && f.git.docsEverCommitted
1240
1246
  },
@@ -1366,6 +1372,26 @@ function getStepDefinitions(lang) {
1366
1372
  ];
1367
1373
  }
1368
1374
  if (f.nextTodoTask) {
1375
+ if (f.git.docsHasUncommittedChanges) {
1376
+ return [
1377
+ {
1378
+ type: "command",
1379
+ requiresUserOk: true,
1380
+ scope: "docs",
1381
+ cwd: f.git.docsGitCwd,
1382
+ cmd: f.issueNumber ? tr(lang, "messages", "docsCommitIssueUpdate", {
1383
+ docsGitCwd: f.git.docsGitCwd,
1384
+ featurePath: f.docs.featurePathFromDocs,
1385
+ issueNumber: f.issueNumber,
1386
+ folderName: f.folderName
1387
+ }) : tr(lang, "messages", "docsCommitUpdate", {
1388
+ docsGitCwd: f.git.docsGitCwd,
1389
+ featurePath: f.docs.featurePathFromDocs,
1390
+ folderName: f.folderName
1391
+ })
1392
+ }
1393
+ ];
1394
+ }
1369
1395
  return [
1370
1396
  {
1371
1397
  type: "instruction",
@@ -1393,6 +1419,34 @@ function getStepDefinitions(lang) {
1393
1419
  },
1394
1420
  {
1395
1421
  step: 11,
1422
+ name: tr(lang, "steps", "docsCommitSync"),
1423
+ checklist: {
1424
+ done: (f) => !f.git.docsHasUncommittedChanges
1425
+ },
1426
+ current: {
1427
+ when: (f) => isImplementationDone(f) && f.git.docsHasUncommittedChanges,
1428
+ actions: (f) => [
1429
+ {
1430
+ type: "command",
1431
+ requiresUserOk: true,
1432
+ scope: "docs",
1433
+ cwd: f.git.docsGitCwd,
1434
+ cmd: f.issueNumber ? tr(lang, "messages", "docsCommitIssueUpdate", {
1435
+ docsGitCwd: f.git.docsGitCwd,
1436
+ featurePath: f.docs.featurePathFromDocs,
1437
+ issueNumber: f.issueNumber,
1438
+ folderName: f.folderName
1439
+ }) : tr(lang, "messages", "docsCommitUpdate", {
1440
+ docsGitCwd: f.git.docsGitCwd,
1441
+ featurePath: f.docs.featurePathFromDocs,
1442
+ folderName: f.folderName
1443
+ })
1444
+ }
1445
+ ]
1446
+ }
1447
+ },
1448
+ {
1449
+ step: 12,
1396
1450
  name: tr(lang, "steps", "prCreate"),
1397
1451
  checklist: { done: (f) => isPrMetadataConfigured(f) && !!f.pr.link },
1398
1452
  current: {
@@ -1418,7 +1472,7 @@ function getStepDefinitions(lang) {
1418
1472
  }
1419
1473
  },
1420
1474
  {
1421
- step: 12,
1475
+ step: 13,
1422
1476
  name: tr(lang, "steps", "codeReview"),
1423
1477
  checklist: {
1424
1478
  done: (f) => isPrMetadataConfigured(f) && f.pr.status === "Approved"
@@ -1453,7 +1507,7 @@ function getStepDefinitions(lang) {
1453
1507
  }
1454
1508
  },
1455
1509
  {
1456
- step: 13,
1510
+ step: 14,
1457
1511
  name: tr(lang, "steps", "featureDone"),
1458
1512
  checklist: { done: (f) => isFeatureDone(f) },
1459
1513
  current: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lee-spec-kit",
3
- "version": "0.4.9",
3
+ "version": "0.4.11",
4
4
  "description": "Project documentation structure generator for AI-assisted development",
5
5
  "type": "module",
6
6
  "bin": {
@@ -52,14 +52,27 @@ For file links within the repo in PR body, **always use current branch name**:
52
52
  - Command: `{test command executed}`
53
53
  - Result: `{PASS/FAIL summary}`
54
54
 
55
- ## Screenshots (for UI changes)
55
+ > - If this includes UI changes, include **screenshots**.
56
+ > - If this includes logic/structure changes, include a **diagram**.
56
57
 
57
- {Attach if applicable}
58
+ ## Screenshots (Frontend / UI changes)
59
+
60
+ > 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.
61
+
62
+ {Screenshot markdown (e.g. ![](URL))}
63
+
64
+ ## Architecture Diagram (Backend / core structure changes)
65
+
66
+ ```mermaid
67
+ flowchart LR
68
+ A[Client] --> B[API]
69
+ B --> C[DB]
70
+ ```
58
71
 
59
72
  ## Related Documents
60
73
 
61
- - **Spec**: `docs/features/{be|fe}/F{number}-{feature-name}/spec.md`
62
- - **Tasks**: `docs/features/{be|fe}/F{number}-{feature-name}/tasks.md`
74
+ - **Spec**: `{{featurePath}}/F{number}-{feature-name}/spec.md`
75
+ - **Tasks**: `{{featurePath}}/F{number}-{feature-name}/tasks.md`
63
76
 
64
77
  Closes #{issue-number}
65
78
  ```
@@ -35,7 +35,61 @@ Guide for creating Pull Requests.
35
35
  3. Record **execution results** in the "Tests" section of PR body
36
36
  4. All checkboxes must be checked
37
37
 
38
- ### 3. Request User Approval
38
+ ### 3. Prepare Screenshots / Diagrams (Include in PR Body)
39
+
40
+ Include the artifacts in the PR body.
41
+
42
+ > - If this includes UI changes, include **screenshots**.
43
+ > - If this includes logic/structure changes, include a **diagram**.
44
+
45
+ #### UI changes (Frontend PR)
46
+
47
+ - Use `agent-browser` to generate screenshots.
48
+ - Save files under a local temp folder (`/tmp/lee-spec-kit/pr-assets/`).
49
+ - Upload them as Release assets, then put the image URLs into the "Screenshots" section of the PR body.
50
+
51
+ ```bash
52
+ # (one-time) install agent-browser
53
+ npm i -g agent-browser
54
+ agent-browser install # install Playwright browsers
55
+
56
+ # Start a dev server: ports are often already taken, so prefer a free port.
57
+ # - If you already have a running dev server, you can just set PREVIEW_URL to that URL.
58
+ PORT=$(node -e "const net=require('net');const s=net.createServer();s.listen(0,'127.0.0.1',()=>{console.log(s.address().port);s.close();});")
59
+ # (example) Vite
60
+ pnpm dev --host 127.0.0.1 --port \"$PORT\" >/tmp/lee-spec-kit-dev.log 2>&1 &
61
+ DEV_PID=$!
62
+ PREVIEW_URL=\"http://127.0.0.1:${PORT}\"
63
+
64
+ # (example) capture from a preview URL
65
+ mkdir -p /tmp/lee-spec-kit/pr-assets
66
+ agent-browser open "$PREVIEW_URL"
67
+ agent-browser screenshot /tmp/lee-spec-kit/pr-assets/ui-1.png --full
68
+ agent-browser close
69
+
70
+ # (recommended) stop the dev server you started for screenshots
71
+ kill \"$DEV_PID\" >/dev/null 2>&1 || true
72
+ ```
73
+
74
+ ```bash
75
+ # Upload to Release assets and generate the URL to paste into the PR body
76
+ REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
77
+ SAFE_BRANCH=$(git branch --show-current | tr '/' '-')
78
+ TAG="pr-assets/${SAFE_BRANCH}"
79
+
80
+ gh release view "$TAG" >/dev/null 2>&1 || \
81
+ gh release create "$TAG" --prerelease --title "pr-assets: ${SAFE_BRANCH}" --notes ""
82
+
83
+ gh release upload "$TAG" /tmp/lee-spec-kit/pr-assets/* --clobber
84
+
85
+ echo \"![](https://github.com/${REPO}/releases/download/${TAG}/ui-1.png)\"
86
+ ```
87
+
88
+ #### Logic/structure changes (Backend PR)
89
+
90
+ - Write a Mermaid diagram (flowchart/sequence/etc.) in the PR body (see the "Architecture Diagram" section in `pr-template.md`).
91
+
92
+ ### 4. Request User Approval
39
93
 
40
94
  > 🚨 **User Approval Required**
41
95
 
@@ -45,7 +99,7 @@ Before creating PR, share the following **in a code block** and wait for **expli
45
99
  - Full body (`pr-template.md` format)
46
100
  - Labels
47
101
 
48
- ### 4. Create PR
102
+ ### 5. Create PR
49
103
 
50
104
  ```bash
51
105
  gh pr create \
@@ -30,6 +30,12 @@ Keep `tasks.md` aligned with reality.
30
30
  - Do not mark `[DONE]` without actually completing the work and verifying criteria.
31
31
  - If you need to change a completed task, add a new task instead of rewriting history.
32
32
 
33
+ ### Step 3.25: Commit per task (important)
34
+
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).
38
+
33
39
  ### Step 3.5: Record decisions (strongly recommended, effectively required)
34
40
 
35
41
  To avoid “why did we implement it like this?” losing context, **record any non-obvious or tradeoff-heavy implementation choice** in `decisions.md`.
@@ -37,6 +37,7 @@
37
37
 
38
38
  - [ ] All tasks are `[DONE]`, and each task's `Acceptance` is verified and `Checklist` is checked
39
39
  - [ ] Tests executed and passing (record command/result below)
40
+ - [ ] User approval (OK) received
40
41
 
41
42
  ### Test Run Log
42
43
 
@@ -37,6 +37,7 @@
37
37
 
38
38
  - [ ] All tasks are `[DONE]`, and each task's `Acceptance` is verified and `Checklist` is checked
39
39
  - [ ] Tests executed and passing (record command/result below)
40
+ - [ ] User approval (OK) received
40
41
 
41
42
  ### Test Run Log
42
43
 
@@ -50,14 +50,27 @@ PR 본문에서 레포 내 파일 링크는 **반드시 현재 브랜치명을
50
50
  - 명령어: `{실행한 테스트 명령어}`
51
51
  - 결과: `{PASS/FAIL 요약}`
52
52
 
53
- ## 스크린샷 (UI 변경 시)
53
+ > - UI 변경에 해당된다면 **스크린샷을** 포함하세요.
54
+ > - 로직/구조 변경에 해당된다면 **다이어그램을** 포함하세요.
54
55
 
55
- {있으면 첨부}
56
+ ## 스크린샷 (프론트엔드 / UI 변경 시)
57
+
58
+ > `skills/create-pr.md`의 Release assets 업로드 절차를 사용하면 브랜치에 파일을 커밋하지 않고도 이미지를 본문에 포함할 수 있습니다.
59
+
60
+ {스크린샷 마크다운 (예: ![](URL))}
61
+
62
+ ## 아키텍처 다이어그램 (백엔드 / 핵심 구조 변경 시)
63
+
64
+ ```mermaid
65
+ flowchart LR
66
+ A[Client] --> B[API]
67
+ B --> C[DB]
68
+ ```
56
69
 
57
70
  ## 관련 문서
58
71
 
59
- - **Spec**: `docs/features/{be|fe}/F{번호}-{기능명}/spec.md`
60
- - **Tasks**: `docs/features/{be|fe}/F{번호}-{기능명}/tasks.md`
72
+ - **Spec**: `{{featurePath}}/F{번호}-{기능명}/spec.md`
73
+ - **Tasks**: `{{featurePath}}/F{번호}-{기능명}/tasks.md`
61
74
 
62
75
  Closes #{이슈번호}
63
76
  ```
@@ -35,7 +35,61 @@ Pull Request를 생성할 때 따르는 가이드입니다.
35
35
  3. PR 본문 "테스트" 섹션에 **실행 결과** 기록
36
36
  4. 모든 체크박스가 체크되어야 함
37
37
 
38
- ### 3. 사용자 확인 요청
38
+ ### 3. 스크린샷/다이어그램 작성 (PR 본문에 포함)
39
+
40
+ PR 본문에 결과물을 포함합니다.
41
+
42
+ > - UI 변경에 해당된다면 **스크린샷을** 포함하세요.
43
+ > - 로직/구조 변경에 해당된다면 **다이어그램을** 포함하세요.
44
+
45
+ #### UI 변경 (프론트엔드 PR)
46
+
47
+ - `agent-browser`로 스크린샷을 생성합니다.
48
+ - 스크린샷 파일은 로컬 임시 폴더(`/tmp/lee-spec-kit/pr-assets/`)에 저장합니다.
49
+ - 릴리스 자산(Release assets)으로 업로드한 뒤, 생성된 이미지 URL을 PR 본문 "스크린샷" 섹션에 넣습니다.
50
+
51
+ ```bash
52
+ # (최초 1회) agent-browser 설치
53
+ npm i -g agent-browser
54
+ agent-browser install # Playwright 브라우저 설치
55
+
56
+ # 개발 서버 실행: 이미 사용 중인 포트가 많으므로 "빈 포트"를 권장합니다.
57
+ # - 이미 떠있는 개발 서버가 있다면 그 URL을 PREVIEW_URL로 지정해도 됩니다.
58
+ PORT=$(node -e "const net=require('net');const s=net.createServer();s.listen(0,'127.0.0.1',()=>{console.log(s.address().port);s.close();});")
59
+ # (예시) Vite
60
+ pnpm dev --host 127.0.0.1 --port \"$PORT\" >/tmp/lee-spec-kit-dev.log 2>&1 &
61
+ DEV_PID=$!
62
+ PREVIEW_URL=\"http://127.0.0.1:${PORT}\"
63
+
64
+ # (예시) 미리보기 URL을 정해 스크린샷 생성
65
+ mkdir -p /tmp/lee-spec-kit/pr-assets
66
+ agent-browser open "$PREVIEW_URL"
67
+ agent-browser screenshot /tmp/lee-spec-kit/pr-assets/ui-1.png --full
68
+ agent-browser close
69
+
70
+ # (권장) 스크린샷을 위해 띄운 개발 서버는 작업이 끝나면 종료합니다.
71
+ kill \"$DEV_PID\" >/dev/null 2>&1 || true
72
+ ```
73
+
74
+ ```bash
75
+ # 스크린샷을 Release assets로 업로드하고, PR 본문에 넣을 URL 만들기
76
+ REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
77
+ SAFE_BRANCH=$(git branch --show-current | tr '/' '-')
78
+ TAG="pr-assets/${SAFE_BRANCH}"
79
+
80
+ gh release view "$TAG" >/dev/null 2>&1 || \
81
+ gh release create "$TAG" --prerelease --title "pr-assets: ${SAFE_BRANCH}" --notes ""
82
+
83
+ gh release upload "$TAG" /tmp/lee-spec-kit/pr-assets/* --clobber
84
+
85
+ echo \"![](https://github.com/${REPO}/releases/download/${TAG}/ui-1.png)\"
86
+ ```
87
+
88
+ #### 로직/구조 변경 (백엔드 PR)
89
+
90
+ - PR 본문에 Mermaid 다이어그램(예: flowchart/sequence)을 작성합니다. (`pr-template.md`의 "아키텍처 다이어그램" 섹션 참고)
91
+
92
+ ### 4. 사용자 확인 요청
39
93
 
40
94
  > 🚨 **사용자 확인 필수**
41
95
 
@@ -45,7 +99,7 @@ PR 생성 전 다음 내용을 **코드블록으로** 사용자에게 공유하
45
99
  - 본문 전체 (`pr-template.md` 형식)
46
100
  - 라벨
47
101
 
48
- ### 4. PR 생성
102
+ ### 5. PR 생성
49
103
 
50
104
  ```bash
51
105
  gh pr create \
@@ -47,8 +47,10 @@ CLI가 가리키는 **Active Task** 또는 **Next Action**을 수행합니다.
47
47
  #### 3-2) 태스크/체크리스트 업데이트 + 커밋
48
48
 
49
49
  1. 작업이 끝나면 해당 태스크의 상태를 `[DONE]`으로 변경하고, `Acceptance/Checklist` 항목을 `[x]`로 체크합니다.
50
- 2. 커밋을 생성합니다 (코드 커밋 + 문서 커밋).
51
- 3. **즉시 1단계로 돌아가** 다음 일을 CLI에게 물어봅니다.
50
+ 2. **한 번에 하나의 태스크만** `[DONE]` 처리합니다. (태스크 2개 이상을 번에 완료/커밋으로 묶지 않기)
51
+ 3. 커밋을 생성합니다 (코드 커밋 + 문서 커밋). 태스크 단위로 커밋이 남아야 합니다.
52
+ 4. 모든 태스크가 `[DONE]`가 되면, "완료 조건" 체크리스트를 사용자에게 공유하고 승인(OK)을 받은 뒤 체크합니다. (특히 **사용자 승인(OK) 완료** 항목)
53
+ 5. **즉시 1단계로 돌아가** 다음 할 일을 CLI에게 물어봅니다.
52
54
 
53
55
  ---
54
56
 
@@ -37,6 +37,7 @@
37
37
 
38
38
  - [ ] 모든 태스크가 `[DONE]`이며, 각 태스크의 `Acceptance` 검증 및 `Checklist` 체크 완료
39
39
  - [ ] 테스트 실행 및 통과 (아래에 명령어/결과 기록)
40
+ - [ ] 사용자 승인(OK) 완료
40
41
 
41
42
  ### 테스트 실행 기록
42
43
 
@@ -37,6 +37,7 @@
37
37
 
38
38
  - [ ] 모든 태스크가 `[DONE]`이며, 각 태스크의 `Acceptance` 검증 및 `Checklist` 체크 완료
39
39
  - [ ] 테스트 실행 및 통과 (아래에 명령어/결과 기록)
40
+ - [ ] 사용자 승인(OK) 완료
40
41
 
41
42
  ### 테스트 실행 기록
42
43