spec-lite 1.1.2 → 1.1.3

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/bin/cli.js CHANGED
@@ -20,6 +20,10 @@ if (command === 'install') {
20
20
  // Copy templates → .claude/templates/
21
21
  cpSync(join(pkgRoot, 'templates'), join(claudeDir, 'templates'), { recursive: true })
22
22
  console.log('✓ templates → .claude/templates/')
23
+
24
+ // Copy references → .claude/references/
25
+ cpSync(join(pkgRoot, 'references'), join(claudeDir, 'references'), { recursive: true })
26
+ console.log('✓ references → .claude/references/')
23
27
  } else {
24
28
  console.log('Usage: npx spec-lite install')
25
29
  process.exit(1)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spec-lite",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Spec-driven development kit for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {
@@ -38,6 +38,44 @@ Chọn số integration:
38
38
  - Nếu chỉ có 1 integration có task pending → chọn luôn, không hỏi
39
39
  - Nếu tất cả đều done → thông báo: "Tất cả integration đã hoàn thành."
40
40
 
41
+ ### Bước 0b: Chọn chế độ worktree (tùy chọn)
42
+
43
+ Hỏi user:
44
+
45
+ ```
46
+ Bạn muốn build trong worktree riêng cho integration này không? (y/n)
47
+ ```
48
+
49
+ **Nếu chọn "n":** Tiếp tục build trong working directory hiện tại.
50
+
51
+ **Nếu chọn "y":**
52
+
53
+ 1. **Tạo worktree mới**
54
+ - Tên branch: `build/{integration-slug}` (ví dụ: `build/002-implement-todo`)
55
+ - Đường dẫn worktree: `../{repo-name}-{integration-slug}` (ví dụ: `../myapp-002-implement-todo`)
56
+ - Lệnh:
57
+ ```bash
58
+ git worktree add -b build/{slug} ../{repo}-{slug}
59
+ ```
60
+ - Nếu branch đã tồn tại, dùng `--force` hoặc checkout branch cũ.
61
+
62
+ 2. **Detect package manager**
63
+ - Kiểm tra theo thứ tự: `pnpm-lock.yaml` → `yarn.lock` → `package-lock.json` → `package.json`
64
+ - Dùng package manager tương ứng: `pnpm install` / `yarn install` / `npm install`
65
+ - Nếu không có `package.json` → bỏ qua bước install.
66
+
67
+ 3. **Copy env files**
68
+ - Tìm tất cả file `.env*` ở root của working directory gốc (`.env`, `.env.local`, `.env.development`, v.v.)
69
+ - Copy từng file vào worktree mới:
70
+ ```bash
71
+ cp .env* ../{repo}-{slug}/
72
+ ```
73
+ - Bỏ qua nếu không có file `.env*` nào.
74
+
75
+ 4. **Chuyển working context sang worktree mới**
76
+ - Tất cả các bước build tiếp theo đều chạy trong đường dẫn worktree mới.
77
+ - Nhắc user biết đang build tại: `../{repo}-{slug}`
78
+
41
79
  ### Với mỗi task pending
42
80
 
43
81
  **1. Chọn task** (`incremental-implementation` — Increment Cycle)
@@ -22,7 +22,7 @@ SAD không chứa: feature-level design, business rules, entity details — nh
22
22
  ## When NOT to Use
23
23
 
24
24
  - `prd.md` chưa có nội dung → chạy `/spec-prd` trước
25
- - Đang muốn thiết kế một feature cụ thể → dùng `/spec-fdd`
25
+ - Đang muốn thiết kế một feature cụ thể → dùng `/spec-tech`
26
26
 
27
27
  ---
28
28
 
@@ -168,7 +168,7 @@ Thông báo kết quả:
168
168
  ✓ specs/main/sad.md đã được cập nhật (status: draft)
169
169
 
170
170
  Bước tiếp theo:
171
- - /spec-frd {feature-name} → định nghĩa requirements của từng feature
171
+ - /spec-new {feature-name} → định nghĩa requirements của từng feature
172
172
  ```
173
173
 
174
174
  ---