lee-spec-kit 0.6.15 → 0.6.17

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 CHANGED
@@ -40,28 +40,84 @@
40
40
  # 1) Initialize docs structure
41
41
  npx lee-spec-kit init
42
42
 
43
- # 2) Create a feature
43
+ # 2) Run initial onboarding checks
44
+ npx lee-spec-kit onboard --strict
45
+
46
+ # 3) Create a feature
44
47
  npx lee-spec-kit feature user-auth
45
48
 
46
- # 3) Show next steps (for agents)
49
+ # 4) Show next steps (for agents)
47
50
  npx lee-spec-kit context
48
51
 
49
- # 4) Show workflow dashboard
52
+ # 5) Show workflow dashboard
50
53
  npx lee-spec-kit view
51
54
 
52
- # 5) Show overall status
55
+ # 6) Show overall status
53
56
  npx lee-spec-kit status
54
57
 
55
- # 6) Validate docs / feature metadata
58
+ # 7) Validate docs / feature metadata
56
59
  npx lee-spec-kit doctor
57
60
  ```
58
61
 
62
+ ## New Project Start Order
63
+
64
+ For a brand-new project, scaffold the **codebase first**, then initialize docs.
65
+ For most users (default: embedded), running `npx lee-spec-kit init` in project root is enough.
66
+
67
+ ```bash
68
+ # 0) Create/init the code project first (example: Next.js)
69
+ npx create-next-app@latest my-app
70
+ cd my-app
71
+
72
+ # 1) Initialize docs structure
73
+ npx lee-spec-kit init
74
+
75
+ # 2) Run initial onboarding checks
76
+ npx lee-spec-kit onboard --strict
77
+
78
+ # 3) Detect project (agent entrypoint)
79
+ npx lee-spec-kit detect --json
80
+
81
+ # 4) Create feature and start workflow
82
+ npx lee-spec-kit feature user-auth
83
+ npx lee-spec-kit context --json-compact
84
+ ```
85
+
86
+ - Apply lee-spec-kit workflow only when `detect --json` returns `isLeeSpecKitProject: true`.
87
+ - If `isLeeSpecKitProject: false`, continue with normal non-lee-spec-kit workflow.
88
+
89
+ For teams that keep docs separate from the code repo (standalone), the recommended start point is the **parent workspace folder**.
90
+
91
+ ```bash
92
+ # Recommended layout:
93
+ # workspace/
94
+ # ├─ docs/ (lee-spec-kit docs)
95
+ # └─ project/ (actual code repo)
96
+ #
97
+ # Run from workspace root
98
+ npx lee-spec-kit init --docs-repo standalone --dir ./docs --project-root ./project
99
+ npx lee-spec-kit detect --json
100
+ ```
101
+
102
+ ## Agent Kickoff Prompt
103
+
104
+ You can paste the following as an agent session-start instruction.
105
+
106
+ ```text
107
+ Start procedure:
108
+ 1) Run npx lee-spec-kit detect --json
109
+ 2) If isLeeSpecKitProject === true, run npx lee-spec-kit context --json-compact (use --json only when full detail is needed)
110
+ 3) If actionOptions exist, show approvalPrompt and finalPrompt exactly as provided, then wait for user approval (<LABEL> or <LABEL> OK)
111
+ 4) Do not execute before approval; execute requiresUserCheck=true actions only after approval
112
+ 5) If isLeeSpecKitProject === false, skip lee-spec-kit-specific flow and continue with normal workflow
113
+ ```
114
+
59
115
  ## Features
60
116
 
61
117
  ### 📁 Project initialization
62
118
 
63
119
  - Interactive init or CLI options
64
- - Supports `single` and `multi` (`fullstack` remains as a backward-compatible alias)
120
+ - Default is `multi`; `single` remains supported for simple single-repo and backward-compatibility scenarios (`fullstack` is a backward-compatible alias of `multi`)
65
121
  - Korean/English templates
66
122
 
67
123
  ### 🚀 Feature creation
@@ -140,6 +196,21 @@ npx lee-spec-kit detect --dir /path/to/workspace
140
196
 
141
197
  The `--json` payload includes `isLeeSpecKitProject`, `reasonCode` (`PROJECT_DETECTED` | `PROJECT_NOT_DETECTED`), `docsDir`, `configPath`, and `detectionSource` (`config` | `heuristic`).
142
198
 
199
+ ### Onboarding checks
200
+
201
+ Validate initial setup readiness (Constitution/PRD/git remotes, etc.).
202
+
203
+ ```bash
204
+ # human-readable output
205
+ npx lee-spec-kit onboard
206
+
207
+ # JSON output for agents/automation
208
+ npx lee-spec-kit onboard --json
209
+
210
+ # exit code 1 when WARN/BLOCK exists
211
+ npx lee-spec-kit onboard --strict
212
+ ```
213
+
143
214
  ### Create a feature
144
215
 
145
216
  ```bash
@@ -176,6 +247,7 @@ npx lee-spec-kit context
176
247
  # recommended: one feature + labels
177
248
  npx lee-spec-kit context F001
178
249
  npx lee-spec-kit context F001 --json
250
+ npx lee-spec-kit context F001 --json-compact
179
251
 
180
252
  # approve + execute (common path)
181
253
  npx lee-spec-kit context F001 --approve A --execute
@@ -194,6 +266,7 @@ Use advanced selectors (`--component`, `--all`, `--done`) only when you need mul
194
266
  | Option | Description |
195
267
  | -------------- | ----------------------------------------------- |
196
268
  | `--json` | JSON output for agents |
269
+ | `--json-compact` | Compact JSON for agents (implies `--json`, minimizes duplicated fields) |
197
270
  | `--component <id>` | Select target component in multi mode (e.g. `app`, `api`, `worker`) |
198
271
  | `--all` | Include completed features when auto-detecting |
199
272
  | `--done` | Show completed (workflow-done) features only |
@@ -208,7 +281,8 @@ Use advanced selectors (`--component`, `--all`, `--done`) only when you need mul
208
281
  - `--ticket` is required for `--execute` only when the selected action has `requiresUserCheck=true`.
209
282
  - It is short-lived (5 minutes by default) and cannot be reused after one execution.
210
283
 
211
- `context --json` is organized into `actions` (atomic actions), `actionOptions` (label mapping), and top-level metadata.
284
+ `context --json-compact` is the default recommended format, providing a reduced and deduplicated decision state.
285
+ Use `context --json` only when full-detail debugging fields are required.
212
286
 
213
287
  **Core fields (recommended for normal agent flows)**
214
288
 
@@ -437,8 +511,8 @@ Running `init` creates `.lee-spec-kit.json` in your docs root (default: `docs/`)
437
511
  `approval` only affects the following values produced by `context`:
438
512
 
439
513
  - the `[CHECK required]` tag in text output
440
- - `actions[].requiresUserCheck` in `context --json`
441
- - `checkPolicy.token` (`context --json`): approval token format (`<LABEL>`)
514
+ - `actionOptions[].requiresUserCheck` in `context --json-compact` (`actions[].requiresUserCheck` in `--json`)
515
+ - `checkPolicy.token` (`context --json-compact`/`--json`): approval token format (`<LABEL>`)
442
516
  - `checkPolicy.acceptedTokens`: accepted reply templates (e.g. `["<LABEL>", "<LABEL> OK", "<LABEL> ...", "... <LABEL> ..."]`)
443
517
  - `checkPolicy.tokenPattern`: input validation regex for approval replies
444
518
  - `checkPolicy.validLabels`: currently selectable labels (`A`, `B`, `C`...)
@@ -498,7 +572,7 @@ Example:
498
572
  #### Modes
499
573
 
500
574
  - `builtin` (default): keep built-in `requiresUserCheck` in steps/actions
501
- - `category` (recommended): control CHECK policy by `actions[].category`
575
+ - `category` (recommended): control CHECK policy by `actionOptions[].category` (`actions[].category` in `--json`)
502
576
  - `steps`: control by step numbers (not recommended; fragile)
503
577
 
504
578
  #### Fields
@@ -526,7 +600,7 @@ Example:
526
600
  }
527
601
  ```
528
602
 
529
- > To discover available `category` values, check `actions[].category` in `context --json`.
603
+ > To discover available `category` values, check `actionOptions[].category` in `context --json-compact` first, and use `actions[].category` in `context --json` when needed.
530
604
 
531
605
  ### pr (PR artifacts policy)
532
606
 
package/README.md CHANGED
@@ -37,6 +37,8 @@
37
37
  ## 목차
38
38
 
39
39
  - [Quick Start](#quick-start)
40
+ - [신규 프로젝트 시작 순서](#신규-프로젝트-시작-순서)
41
+ - [에이전트 킥오프 프롬프트](#에이전트-킥오프-프롬프트)
40
42
  - [주요 기능](#주요-기능)
41
43
  - [사용법](#사용법)
42
44
  - [설정 파일](#설정-파일)
@@ -53,28 +55,84 @@
53
55
  # 1. 프로젝트 문서 구조 생성
54
56
  npx lee-spec-kit init
55
57
 
56
- # 2. 기능 생성
58
+ # 2. 초기 온보딩 점검
59
+ npx lee-spec-kit onboard --strict
60
+
61
+ # 3. 새 기능 생성
57
62
  npx lee-spec-kit feature user-auth
58
63
 
59
- # 3. 진행 상황 및 다음 단계 확인 (AI 에이전트용)
64
+ # 4. 진행 상황 및 다음 단계 확인 (AI 에이전트용)
60
65
  npx lee-spec-kit context
61
66
 
62
- # 4. 워크플로우 대시보드 확인
67
+ # 5. 워크플로우 대시보드 확인
63
68
  npx lee-spec-kit view
64
69
 
65
- # 5. 전체 상태 확인
70
+ # 6. 전체 상태 확인
66
71
  npx lee-spec-kit status
67
72
 
68
- # 6. 문서/Feature 진단
73
+ # 7. 문서/Feature 진단
69
74
  npx lee-spec-kit doctor
70
75
  ```
71
76
 
77
+ ## 신규 프로젝트 시작 순서
78
+
79
+ 신규 프로젝트에서는 **코드 스캐폴딩을 먼저** 하고, 그 다음 docs를 초기화하세요.
80
+ 대부분의 사용자(기본값: embedded)는 프로젝트 루트에서 `npx lee-spec-kit init`만 실행하면 됩니다.
81
+
82
+ ```bash
83
+ # 0. 코드 프로젝트 생성/초기화 (예: Next.js)
84
+ npx create-next-app@latest my-app
85
+ cd my-app
86
+
87
+ # 1. docs 구조 초기화
88
+ npx lee-spec-kit init
89
+
90
+ # 2. 초기 온보딩 점검
91
+ npx lee-spec-kit onboard --strict
92
+
93
+ # 3. 감지 확인 (에이전트 시작점)
94
+ npx lee-spec-kit detect --json
95
+
96
+ # 4. Feature 생성 후 작업 시작
97
+ npx lee-spec-kit feature user-auth
98
+ npx lee-spec-kit context --json-compact
99
+ ```
100
+
101
+ - `detect --json` 결과가 `isLeeSpecKitProject: true`일 때 lee-spec-kit 워크플로우를 적용하세요.
102
+ - `isLeeSpecKitProject: false`면 일반 프로젝트 워크플로우로 진행하세요.
103
+
104
+ docs를 코드 저장소와 분리해 운영하는 팀(standalone)은 **상위 워크스페이스 폴더**를 기준으로 시작하는 것을 권장합니다.
105
+
106
+ ```bash
107
+ # 권장 레이아웃:
108
+ # workspace/
109
+ # ├─ docs/ (lee-spec-kit 문서)
110
+ # └─ project/ (실제 코드 저장소)
111
+ #
112
+ # workspace 루트에서 실행
113
+ npx lee-spec-kit init --docs-repo standalone --dir ./docs --project-root ./project
114
+ npx lee-spec-kit detect --json
115
+ ```
116
+
117
+ ## 에이전트 킥오프 프롬프트
118
+
119
+ 아래 프롬프트를 에이전트 시작 메시지로 그대로 사용할 수 있습니다.
120
+
121
+ ```text
122
+ 작업 시작 절차:
123
+ 1) npx lee-spec-kit detect --json
124
+ 2) isLeeSpecKitProject === true 이면 npx lee-spec-kit context --json-compact 실행 (필요 시 --json으로 상세 조회)
125
+ 3) actionOptions가 있으면 approvalPrompt와 finalPrompt를 그대로 사용자에게 제시하고 승인(<LABEL> 또는 <LABEL> OK) 대기
126
+ 4) 승인 전에는 실행하지 말고, requiresUserCheck=true 액션은 승인 후에만 실행
127
+ 5) isLeeSpecKitProject === false 이면 lee-spec-kit 전용 절차를 건너뛰고 일반 워크플로우로 진행
128
+ ```
129
+
72
130
  ## 주요 기능
73
131
 
74
132
  ### 📁 프로젝트 초기화
75
133
 
76
134
  - 대화형 모드 또는 CLI 옵션으로 프로젝트 설정
77
- - Single(단일 레포) / Multi(멀티 컴포넌트) 프로젝트 타입 지원 (`fullstack`는 하위호환 alias)
135
+ - 기본값은 Multi이며, Single 단순 단일 레포/기존 호환 시나리오를 위해 지원합니다. (`fullstack`는 `multi` 하위호환 alias)
78
136
  - 한국어/영어 템플릿 선택
79
137
 
80
138
  ### 🚀 Feature 생성
@@ -156,6 +214,21 @@ npx lee-spec-kit detect --dir /path/to/workspace
156
214
 
157
215
  `--json` 출력은 `isLeeSpecKitProject`, `reasonCode`(`PROJECT_DETECTED` | `PROJECT_NOT_DETECTED`), `docsDir`, `configPath`, `detectionSource`(`config` | `heuristic`)를 포함합니다.
158
216
 
217
+ ### 온보딩 점검
218
+
219
+ 초기 설정(Constitution/PRD/Git remote 등) 준비 상태를 점검합니다.
220
+
221
+ ```bash
222
+ # 사람 읽기 쉬운 출력
223
+ npx lee-spec-kit onboard
224
+
225
+ # 에이전트/자동화용 JSON
226
+ npx lee-spec-kit onboard --json
227
+
228
+ # WARN/BLOCK이 있으면 종료 코드 1
229
+ npx lee-spec-kit onboard --strict
230
+ ```
231
+
159
232
  ### 새 기능 생성
160
233
 
161
234
  ```bash
@@ -193,6 +266,7 @@ npx lee-spec-kit context
193
266
  # 특정 Feature 상태 + 라벨 확인 (에이전트 권장)
194
267
  npx lee-spec-kit context F001
195
268
  npx lee-spec-kit context F001 --json
269
+ npx lee-spec-kit context F001 --json-compact
196
270
 
197
271
  # 승인 + 실행 (일반 케이스)
198
272
  npx lee-spec-kit context F001 --approve A --execute
@@ -211,6 +285,7 @@ npx lee-spec-kit context F001 --approve A --execute --ticket <TICKET> --execute-
211
285
  | 옵션 | 설명 |
212
286
  | --------------- | ----------------------------------------------- |
213
287
  | `--json` | 에이전트용 JSON 출력 |
288
+ | `--json-compact` | 에이전트용 압축 JSON 출력 (`--json` 포함, 중복 필드 최소화) |
214
289
  | `--component <id>` | multi에서 대상 컴포넌트 지정 (예: `app`, `api`, `worker`) |
215
290
  | `--all` | 자동 감지 실패 시 완료된 Feature까지 포함해서 표시 |
216
291
  | `--done` | 완료(workflow-done) Feature만 표시 |
@@ -225,7 +300,8 @@ npx lee-spec-kit context F001 --approve A --execute --ticket <TICKET> --execute-
225
300
  - 선택한 액션이 `requiresUserCheck=true`인 경우에만 `--execute`에서 `--ticket`이 필요합니다.
226
301
  - 발급 후 짧은 시간(기본 5분)만 유효하며, 한 번 사용하면 재사용할 수 없습니다.
227
302
 
228
- `context --json` 출력은 크게 `actions`(원자 액션), `actionOptions`(라벨 매핑), 상위 메타데이터로 구성됩니다.
303
+ 기본 권장 포맷은 `context --json-compact`이며, 같은 판단 정보를 중복 없이 축약해 전달합니다.
304
+ `context --json`은 디버깅/세부 필드 확인이 필요할 때만 사용하세요.
229
305
 
230
306
  **핵심 필드 (실사용 권장)**
231
307
 
@@ -486,8 +562,8 @@ npx lee-spec-kit update --force
486
562
  `approval`은 `context`가 출력하는 다음 값에만 영향을 줍니다:
487
563
 
488
564
  - 텍스트 출력의 `[확인 필요]` 표시
489
- - `context --json`의 `actions[].requiresUserCheck`
490
- - `checkPolicy.token` (`context --json`): 승인 토큰 형식 (`<LABEL>`)
565
+ - `context --json-compact`의 `actionOptions[].requiresUserCheck` (`--json`에서는 `actions[].requiresUserCheck`)
566
+ - `checkPolicy.token` (`context --json-compact`/`--json`): 승인 토큰 형식 (`<LABEL>`)
491
567
  - `checkPolicy.acceptedTokens`: 허용되는 승인 응답 템플릿 (예: `["<LABEL>", "<LABEL> OK", "<LABEL> ...", "... <LABEL> ..."]`)
492
568
  - `checkPolicy.tokenPattern`: 승인 응답 검증용 정규식
493
569
  - `checkPolicy.validLabels`: 현재 선택 가능한 라벨 목록 (`A`, `B`, `C`...)
@@ -544,7 +620,7 @@ npx lee-spec-kit update --force
544
620
  #### 모드
545
621
 
546
622
  - `builtin` (기본): 코드에 내장된 `requiresUserCheck`를 그대로 사용
547
- - `category` (권장): `actions[].category` 기준으로 확인 정책을 제어
623
+ - `category` (권장): `actionOptions[].category` 기준으로 확인 정책을 제어 (`--json`에서는 `actions[].category`)
548
624
  - `steps`: step 번호 기준(변경에 취약하므로 권장하지 않음)
549
625
 
550
626
  #### 설정 필드
@@ -572,7 +648,7 @@ npx lee-spec-kit update --force
572
648
  }
573
649
  ```
574
650
 
575
- > 사용 가능한 `category` 값은 `context --json`의 `actions[].category`로 확인하는 것을 권장합니다.
651
+ > 사용 가능한 `category` 값은 `context --json-compact`의 `actionOptions[].category`에서 우선 확인하고, 필요 시 `context --json`의 `actions[].category`를 참고하세요.
576
652
 
577
653
  ### pr (PR 결과물 정책)
578
654