@crewx/cli 0.8.7-rc.12 → 0.8.7-rc.13

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/builtin.js CHANGED
@@ -52,6 +52,7 @@ const BUILTIN_MAP = {
52
52
  cron: () => Promise.resolve().then(() => __importStar(require('@crewx/cron/cli'))),
53
53
  workflow: () => Promise.resolve().then(() => __importStar(require('@crewx/workflow/cli'))),
54
54
  skill: () => Promise.resolve().then(() => __importStar(require('@crewx/skill/cli'))),
55
+ wi: () => Promise.resolve().then(() => __importStar(require('@crewx/wi/cli'))),
55
56
  };
56
57
  exports.BUILTIN_COMMANDS = new Set(Object.keys(BUILTIN_MAP));
57
58
  // Load skill-tracer for observability (graceful degradation if unavailable)
@@ -83,6 +83,202 @@ const DEFAULT_AGENTS = [
83
83
  },
84
84
  },
85
85
  ];
86
+ const GOAL_TEMPLATE = `---
87
+ type: goal
88
+ description: CrewX Goal — OKR
89
+ notation:
90
+ weight: "(w:N) — KR weight, default 1 if omitted"
91
+ auto: "N% auto — L1 progress auto-calculated as weighted average of children"
92
+ ---
93
+
94
+ # 목표 제목
95
+
96
+ ## Period
97
+ - Start: YYYY-MM-DD
98
+ - End: YYYY-MM-DD
99
+ - Status: active
100
+
101
+ ## Objective
102
+ 이 목표는...
103
+
104
+ ## Key Results
105
+ - [ ] KR1:
106
+ - [ ] KR2:
107
+ - [ ] KR3:
108
+
109
+ ## Notes
110
+
111
+ ## Reflection
112
+ `;
113
+ const DAILY_TEMPLATE = `# YYYY-MM-DD (Day)
114
+
115
+ ## Top 3
116
+ 1.
117
+ 2.
118
+ 3.
119
+
120
+ ## Brain Dump
121
+
122
+ ## Schedule
123
+
124
+ ## Notes
125
+
126
+ ## Reflection
127
+ `;
128
+ const WI_TEMPLATE = `---
129
+ wi_id: WI-{YYYYMMDD}-{SEQ}
130
+ title: ""
131
+ date: ""
132
+ author: ""
133
+ status: draft # draft | approved | in-progress | done | cancelled
134
+ priority: normal # critical | high | normal | low
135
+
136
+ # Assignment
137
+ assignee: "" # Agent assigned to this work
138
+ reviewer: "" # Agent to review
139
+
140
+ # Git
141
+ base_branch: main
142
+ target_branch: develop
143
+ worktree: false # true = work in isolated worktree
144
+
145
+ # Design doc cross-link
146
+ spec_id: "" # Design doc API ID (e.g. MSG.LIST)
147
+ design_doc: ""
148
+ design_section: ""
149
+ screens: [] # Affected screen IDs (e.g. THDUI002)
150
+
151
+ # Dependencies
152
+ depends_on: [] # WI IDs that must complete before this starts
153
+ blocks: [] # WI IDs blocked by this WI
154
+
155
+ # Impact
156
+ risk_level: low # low | medium | high | critical
157
+ api_changed: false # if true, contract_type + consumers required
158
+ contract_type: none # none | additive | breaking | deprecation
159
+ schema_changed: false # if true, check migration needs
160
+
161
+ # Consumers (required when api_changed: true)
162
+ consumers:
163
+ # - screen: THDUI002
164
+ # file: src/ui/pages/threads/ThreadDetailPage.tsx
165
+ # store: useThreadDetailStore
166
+ # component: MessageBubble
167
+
168
+ # Estimated scope (atomicity: ≤ $0.30, 1-3 files)
169
+ estimated_files: 0
170
+ estimated_cost: "$0.00"
171
+ ---
172
+
173
+ # {title}
174
+
175
+ ## Background (Why)
176
+
177
+ > Why this work is needed. 1-3 sentences.
178
+
179
+ ## Goal (What)
180
+
181
+ > What changes when this is complete. Feature perspective.
182
+
183
+ ## Scope
184
+
185
+ ### Files to modify
186
+
187
+ | File | Description |
188
+ |------|-------------|
189
+ | \`path/to/file.ts\` | description |
190
+
191
+ **Out of scope (do not touch)**
192
+
193
+ - list items
194
+
195
+ ## Impact Analysis
196
+
197
+ ### Design doc cross-link
198
+
199
+ > Summary of the relevant design doc section.
200
+
201
+ \`\`\`bash
202
+ npx doc section {design_doc} "{spec_id}"
203
+ \`\`\`
204
+
205
+ | Item | Value |
206
+ |------|-------|
207
+ | API ID | \`{spec_id}\` |
208
+ | Screen ID | \`{screens}\` |
209
+ | Section | \`{design_section}\` |
210
+
211
+ ### API / Type changes
212
+
213
+ > Skip this section if \`api_changed: false\`.
214
+
215
+ | Changed item | contract_type | Consumers (screen / file / store) |
216
+ |-------------|--------------|-----------------------------------|
217
+ | (none) | - | - |
218
+
219
+ ### Consumer impact checklist
220
+
221
+ > Required when \`api_changed: true\`. Empty = cannot approve.
222
+
223
+ - [ ] Affected screen IDs identified (\`screens\` field)
224
+ - [ ] Affected frontend components identified (\`consumers.component\`)
225
+ - [ ] Affected stores identified (\`consumers.store\`)
226
+ - [ ] If \`contract_type: breaking\`, issue separate consumer WI (add to \`blocks\`)
227
+ - [ ] DB schema change migration: (none / Phase N needed)
228
+
229
+ ### Side-effect risk areas
230
+
231
+ > Areas that broke in similar past work. "None" if none.
232
+
233
+ ### risk_level criteria
234
+
235
+ | Level | Condition |
236
+ |-------|-----------|
237
+ | \`low\` | Single file, no API change, existing tests sufficient |
238
+ | \`medium\` | 2-3 files, API change with ≤ 1 consumer |
239
+ | \`high\` | API change + 2+ consumers, or store refactoring |
240
+ | \`critical\` | DB schema change, or core SDK interface change |
241
+
242
+ > \`high\` or above: consult lead before implementation.
243
+
244
+ ---
245
+
246
+ ## Implementation Guide (How)
247
+
248
+ > Concrete instructions an agent can follow without judgment calls.
249
+ > Include code examples, type definitions, caveats.
250
+
251
+ \`\`\`typescript
252
+ // Example code (if applicable)
253
+ \`\`\`
254
+
255
+ ## Acceptance Criteria (AC)
256
+
257
+ > All must pass to mark "done". If any fails, STOP and report.
258
+
259
+ - [ ] \`npx tsc --noEmit\` passes
260
+ - [ ] \`npx vitest run src/server/\` passes (backend work)
261
+ - [ ] \`npx vitest run src/ui/\` passes (frontend work)
262
+ - [ ] (add feature-specific AC)
263
+
264
+ ## Completion Report Format
265
+
266
+ \`\`\`
267
+ ## Completion Report
268
+
269
+ ### Modified files
270
+ - path/to/file.ts (+N/-M)
271
+
272
+ ### tsc result
273
+ Pass / Fail
274
+
275
+ ### Test result
276
+ N tests passed
277
+
278
+ ### Remaining items
279
+ None / (list if any)
280
+ \`\`\`
281
+ `;
86
282
  function indentBlock(text, spaces) {
87
283
  const prefix = ' '.repeat(spaces);
88
284
  return text
@@ -155,7 +351,7 @@ async function handleInit(opts) {
155
351
  catch (e) {
156
352
  throw new Error(`YAML_CREATE_FAILED: ${e.message}`);
157
353
  }
158
- for (const dir of ['.crewx/logs', '.claude/commands']) {
354
+ for (const dir of ['.crewx/logs', '.claude/commands', 'docs/goal', 'docs/daily', 'docs/wi']) {
159
355
  try {
160
356
  (0, fs_1.mkdirSync)((0, path_1.join)(target, dir), { recursive: true });
161
357
  }
@@ -163,6 +359,18 @@ async function handleInit(opts) {
163
359
  errors.push(`MKDIR_FAILED:${dir}:${e.message}`);
164
360
  }
165
361
  }
362
+ const docTemplates = [
363
+ { dir: 'docs/goal', file: 'GOAL-TEMPLATE.md', content: GOAL_TEMPLATE },
364
+ { dir: 'docs/daily', file: 'DAILY-TEMPLATE.md', content: DAILY_TEMPLATE },
365
+ { dir: 'docs/wi', file: 'WI-TEMPLATE.md', content: WI_TEMPLATE },
366
+ ];
367
+ for (const t of docTemplates) {
368
+ const fullPath = (0, path_1.join)(target, t.dir, t.file);
369
+ if (!(0, fs_1.existsSync)(fullPath)) {
370
+ (0, fs_1.writeFileSync)(fullPath, t.content, 'utf-8');
371
+ console.log(`✅ ${t.dir}/ created (${t.file})`);
372
+ }
373
+ }
166
374
  if (!skipHook) {
167
375
  try {
168
376
  await (0, install_1.handleHookInstall)({ projectRoot: target, yes: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crewx/cli",
3
- "version": "0.8.7-rc.12",
3
+ "version": "0.8.7-rc.13",
4
4
  "license": "UNLICENSED",
5
5
  "engines": {
6
6
  "node": ">=20.19.0"
@@ -23,15 +23,16 @@
23
23
  "dependencies": {
24
24
  "@crewx/adapter-slack": "0.1.4",
25
25
  "better-sqlite3": "*",
26
- "@crewx/sdk": "0.8.7-rc.12",
27
- "@crewx/doc": "0.1.8",
26
+ "@crewx/sdk": "0.8.7-rc.13",
27
+ "@crewx/memory": "0.1.12",
28
28
  "@crewx/search": "0.1.9",
29
- "@crewx/memory": "0.1.13",
30
- "@crewx/skill": "0.1.11",
29
+ "@crewx/cron": "0.1.8",
30
+ "@crewx/wbs": "0.1.9",
31
31
  "@crewx/workflow": "0.3.18",
32
+ "@crewx/doc": "0.1.8",
32
33
  "@crewx/shared": "0.0.5",
33
- "@crewx/wbs": "0.1.9",
34
- "@crewx/cron": "0.1.8"
34
+ "@crewx/wi": "0.1.0",
35
+ "@crewx/skill": "0.1.10"
35
36
  },
36
37
  "devDependencies": {
37
38
  "@types/better-sqlite3": "*",