@grainulation/wheat 1.0.3 → 1.0.4

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 (42) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +32 -31
  3. package/bin/wheat.js +47 -36
  4. package/compiler/detect-sprints.js +108 -66
  5. package/compiler/generate-manifest.js +116 -69
  6. package/compiler/wheat-compiler.js +763 -471
  7. package/lib/compiler.js +11 -6
  8. package/lib/connect.js +273 -134
  9. package/lib/disconnect.js +61 -40
  10. package/lib/guard.js +20 -17
  11. package/lib/index.js +8 -8
  12. package/lib/init.js +217 -142
  13. package/lib/install-prompt.js +26 -26
  14. package/lib/load-claims.js +88 -0
  15. package/lib/quickstart.js +225 -111
  16. package/lib/serve-mcp.js +495 -180
  17. package/lib/server.js +198 -111
  18. package/lib/stats.js +65 -39
  19. package/lib/status.js +65 -34
  20. package/lib/update.js +13 -11
  21. package/package.json +8 -4
  22. package/templates/claude.md +31 -17
  23. package/templates/commands/blind-spot.md +9 -2
  24. package/templates/commands/brief.md +11 -1
  25. package/templates/commands/calibrate.md +3 -1
  26. package/templates/commands/challenge.md +4 -1
  27. package/templates/commands/connect.md +12 -1
  28. package/templates/commands/evaluate.md +4 -0
  29. package/templates/commands/feedback.md +3 -1
  30. package/templates/commands/handoff.md +11 -7
  31. package/templates/commands/init.md +4 -1
  32. package/templates/commands/merge.md +4 -1
  33. package/templates/commands/next.md +1 -0
  34. package/templates/commands/present.md +3 -0
  35. package/templates/commands/prototype.md +2 -0
  36. package/templates/commands/pull.md +103 -0
  37. package/templates/commands/replay.md +8 -0
  38. package/templates/commands/research.md +1 -0
  39. package/templates/commands/resolve.md +4 -1
  40. package/templates/commands/status.md +4 -0
  41. package/templates/commands/sync.md +94 -0
  42. package/templates/commands/witness.md +6 -2
package/lib/quickstart.js CHANGED
@@ -11,10 +11,10 @@
11
11
  * Zero npm dependencies.
12
12
  */
13
13
 
14
- import fs from 'fs';
15
- import path from 'path';
16
- import { execFileSync, execFile } from 'child_process';
17
- import { fileURLToPath } from 'url';
14
+ import fs from "fs";
15
+ import path from "path";
16
+ import { execFileSync, execFile } from "child_process";
17
+ import { fileURLToPath } from "url";
18
18
 
19
19
  const __filename = fileURLToPath(import.meta.url);
20
20
  const __dirname = path.dirname(__filename);
@@ -24,7 +24,7 @@ function target(dir, ...segments) {
24
24
  }
25
25
 
26
26
  function packageRoot() {
27
- return path.resolve(__dirname, '..');
27
+ return path.resolve(__dirname, "..");
28
28
  }
29
29
 
30
30
  function now() {
@@ -33,93 +33,173 @@ function now() {
33
33
 
34
34
  // ── Demo sprint data ────────────────────────────────────────────────────────
35
35
 
36
- const DEMO_QUESTION = 'Should we migrate our REST API to GraphQL?';
37
- const DEMO_AUDIENCE = ['backend team', 'frontend team', 'CTO'];
36
+ const DEMO_QUESTION = "Should we migrate our REST API to GraphQL?";
37
+ const DEMO_AUDIENCE = ["backend team", "frontend team", "CTO"];
38
38
  const DEMO_CONSTRAINTS = [
39
- 'Must maintain backward compatibility with existing REST clients for 6 months',
40
- 'Team has 3 backend engineers, none with production GraphQL experience',
41
- 'Current API serves 200 req/s peak, 50ms p95 latency — cannot regress',
39
+ "Must maintain backward compatibility with existing REST clients for 6 months",
40
+ "Team has 3 backend engineers, none with production GraphQL experience",
41
+ "Current API serves 200 req/s peak, 50ms p95 latency — cannot regress",
42
42
  ];
43
- const DEMO_DONE = 'A recommendation with evidence: migrate, don\'t migrate, or hybrid approach, with risk assessment and migration timeline.';
43
+ const DEMO_DONE =
44
+ "A recommendation with evidence: migrate, don't migrate, or hybrid approach, with risk assessment and migration timeline.";
44
45
 
45
46
  const DEMO_CLAIMS = [
46
47
  {
47
- id: 'd001', type: 'constraint', topic: 'backward-compatibility',
48
- content: 'Must maintain backward compatibility with existing REST clients for 6 months.',
49
- source: { origin: 'stakeholder', artifact: null, connector: null },
50
- evidence: 'stated', status: 'active', phase_added: 'define',
51
- tags: ['api', 'constraint'],
48
+ id: "d001",
49
+ type: "constraint",
50
+ topic: "backward-compatibility",
51
+ content:
52
+ "Must maintain backward compatibility with existing REST clients for 6 months.",
53
+ source: { origin: "stakeholder", artifact: null, connector: null },
54
+ evidence: "stated",
55
+ status: "active",
56
+ phase_added: "define",
57
+ tags: ["api", "constraint"],
52
58
  },
53
59
  {
54
- id: 'd002', type: 'constraint', topic: 'team-experience',
55
- content: 'Team has 3 backend engineers, none with production GraphQL experience.',
56
- source: { origin: 'stakeholder', artifact: null, connector: null },
57
- evidence: 'stated', status: 'active', phase_added: 'define',
58
- tags: ['team', 'constraint'],
60
+ id: "d002",
61
+ type: "constraint",
62
+ topic: "team-experience",
63
+ content:
64
+ "Team has 3 backend engineers, none with production GraphQL experience.",
65
+ source: { origin: "stakeholder", artifact: null, connector: null },
66
+ evidence: "stated",
67
+ status: "active",
68
+ phase_added: "define",
69
+ tags: ["team", "constraint"],
59
70
  },
60
71
  {
61
- id: 'd003', type: 'constraint', topic: 'performance-baseline',
62
- content: 'Current API serves 200 req/s peak, 50ms p95 latency — cannot regress.',
63
- source: { origin: 'stakeholder', artifact: null, connector: null },
64
- evidence: 'stated', status: 'active', phase_added: 'define',
65
- tags: ['performance', 'constraint'],
72
+ id: "d003",
73
+ type: "constraint",
74
+ topic: "performance-baseline",
75
+ content:
76
+ "Current API serves 200 req/s peak, 50ms p95 latency — cannot regress.",
77
+ source: { origin: "stakeholder", artifact: null, connector: null },
78
+ evidence: "stated",
79
+ status: "active",
80
+ phase_added: "define",
81
+ tags: ["performance", "constraint"],
66
82
  },
67
83
  {
68
- id: 'd004', type: 'constraint', topic: 'done-criteria',
69
- content: 'Done looks like: A recommendation with evidence — migrate, don\'t migrate, or hybrid approach, with risk assessment and migration timeline.',
70
- source: { origin: 'stakeholder', artifact: null, connector: null },
71
- evidence: 'stated', status: 'active', phase_added: 'define',
72
- tags: ['done-criteria'],
84
+ id: "d004",
85
+ type: "constraint",
86
+ topic: "done-criteria",
87
+ content:
88
+ "Done looks like: A recommendation with evidence — migrate, don't migrate, or hybrid approach, with risk assessment and migration timeline.",
89
+ source: { origin: "stakeholder", artifact: null, connector: null },
90
+ evidence: "stated",
91
+ status: "active",
92
+ phase_added: "define",
93
+ tags: ["done-criteria"],
73
94
  },
74
95
  {
75
- id: 'r001', type: 'factual', topic: 'graphql-adoption-2026',
76
- content: 'GraphQL adoption in production backends reached 29% in 2025 (Postman State of APIs). However, 67% of teams that adopted GraphQL still maintain parallel REST endpoints for backward compatibility.',
77
- source: { origin: 'research', artifact: 'research/graphql-landscape.md', connector: null },
78
- evidence: 'web', status: 'active', phase_added: 'research',
79
- tags: ['graphql', 'adoption', 'industry'],
96
+ id: "r001",
97
+ type: "factual",
98
+ topic: "graphql-adoption-2026",
99
+ content:
100
+ "GraphQL adoption in production backends reached 29% in 2025 (Postman State of APIs). However, 67% of teams that adopted GraphQL still maintain parallel REST endpoints for backward compatibility.",
101
+ source: {
102
+ origin: "research",
103
+ artifact: "research/graphql-landscape.md",
104
+ connector: null,
105
+ },
106
+ evidence: "web",
107
+ status: "active",
108
+ phase_added: "research",
109
+ tags: ["graphql", "adoption", "industry"],
80
110
  },
81
111
  {
82
- id: 'r002', type: 'factual', topic: 'graphql-performance',
83
- content: 'GraphQL resolvers add 2-8ms overhead per request compared to direct REST handlers in Node.js benchmarks. For nested queries with N+1 patterns, latency can spike to 200-500ms without DataLoader batching. With DataLoader, overhead drops to 5-15ms for complex queries.',
84
- source: { origin: 'research', artifact: 'research/graphql-landscape.md', connector: null },
85
- evidence: 'web', status: 'active', phase_added: 'research',
86
- tags: ['graphql', 'performance', 'latency'],
112
+ id: "r002",
113
+ type: "factual",
114
+ topic: "graphql-performance",
115
+ content:
116
+ "GraphQL resolvers add 2-8ms overhead per request compared to direct REST handlers in Node.js benchmarks. For nested queries with N+1 patterns, latency can spike to 200-500ms without DataLoader batching. With DataLoader, overhead drops to 5-15ms for complex queries.",
117
+ source: {
118
+ origin: "research",
119
+ artifact: "research/graphql-landscape.md",
120
+ connector: null,
121
+ },
122
+ evidence: "web",
123
+ status: "active",
124
+ phase_added: "research",
125
+ tags: ["graphql", "performance", "latency"],
87
126
  },
88
127
  {
89
- id: 'r003', type: 'risk', topic: 'learning-curve',
90
- content: 'Teams without GraphQL experience report 3-6 month ramp-up period before achieving parity with REST productivity. Schema design mistakes in the first 2 months often require breaking changes later.',
91
- source: { origin: 'research', artifact: 'research/graphql-landscape.md', connector: null },
92
- evidence: 'web', status: 'active', phase_added: 'research',
93
- tags: ['graphql', 'risk', 'team'],
128
+ id: "r003",
129
+ type: "risk",
130
+ topic: "learning-curve",
131
+ content:
132
+ "Teams without GraphQL experience report 3-6 month ramp-up period before achieving parity with REST productivity. Schema design mistakes in the first 2 months often require breaking changes later.",
133
+ source: {
134
+ origin: "research",
135
+ artifact: "research/graphql-landscape.md",
136
+ connector: null,
137
+ },
138
+ evidence: "web",
139
+ status: "active",
140
+ phase_added: "research",
141
+ tags: ["graphql", "risk", "team"],
94
142
  },
95
143
  {
96
- id: 'r004', type: 'recommendation', topic: 'hybrid-approach',
97
- content: 'A hybrid approach (GraphQL gateway over existing REST services) provides incremental adoption without rewriting the backend. Apollo Federation and GraphQL Mesh both support this pattern. The frontend gets GraphQL benefits while the backend stays REST until individual services are ready to migrate.',
98
- source: { origin: 'research', artifact: 'research/graphql-landscape.md', connector: null },
99
- evidence: 'web', status: 'active', phase_added: 'research',
100
- tags: ['graphql', 'recommendation', 'architecture'],
144
+ id: "r004",
145
+ type: "recommendation",
146
+ topic: "hybrid-approach",
147
+ content:
148
+ "A hybrid approach (GraphQL gateway over existing REST services) provides incremental adoption without rewriting the backend. Apollo Federation and GraphQL Mesh both support this pattern. The frontend gets GraphQL benefits while the backend stays REST until individual services are ready to migrate.",
149
+ source: {
150
+ origin: "research",
151
+ artifact: "research/graphql-landscape.md",
152
+ connector: null,
153
+ },
154
+ evidence: "web",
155
+ status: "active",
156
+ phase_added: "research",
157
+ tags: ["graphql", "recommendation", "architecture"],
101
158
  },
102
159
  {
103
- id: 'r005', type: 'estimate', topic: 'migration-timeline',
104
- content: 'Estimated timeline for full GraphQL migration with 3 engineers: 2-3 months for schema design + gateway setup, 4-6 months for service-by-service migration, 2 months for REST deprecation. Total: 8-11 months. Hybrid approach can start delivering value in month 2.',
105
- source: { origin: 'research', artifact: 'research/graphql-landscape.md', connector: null },
106
- evidence: 'web', status: 'active', phase_added: 'research',
107
- tags: ['graphql', 'estimate', 'timeline'],
160
+ id: "r005",
161
+ type: "estimate",
162
+ topic: "migration-timeline",
163
+ content:
164
+ "Estimated timeline for full GraphQL migration with 3 engineers: 2-3 months for schema design + gateway setup, 4-6 months for service-by-service migration, 2 months for REST deprecation. Total: 8-11 months. Hybrid approach can start delivering value in month 2.",
165
+ source: {
166
+ origin: "research",
167
+ artifact: "research/graphql-landscape.md",
168
+ connector: null,
169
+ },
170
+ evidence: "web",
171
+ status: "active",
172
+ phase_added: "research",
173
+ tags: ["graphql", "estimate", "timeline"],
108
174
  },
109
175
  {
110
- id: 'r006', type: 'factual', topic: 'graphql-tooling',
111
- content: 'Apollo Server v4 is the most adopted GraphQL server (62% market share among Node.js GraphQL users). Alternatives: Mercurius (Fastify-native, 30% faster in benchmarks), GraphQL Yoga (from The Guild, best DX), Pothos (code-first schema builder).',
112
- source: { origin: 'research', artifact: 'research/graphql-landscape.md', connector: null },
113
- evidence: 'web', status: 'active', phase_added: 'research',
114
- tags: ['graphql', 'tooling', 'ecosystem'],
176
+ id: "r006",
177
+ type: "factual",
178
+ topic: "graphql-tooling",
179
+ content:
180
+ "Apollo Server v4 is the most adopted GraphQL server (62% market share among Node.js GraphQL users). Alternatives: Mercurius (Fastify-native, 30% faster in benchmarks), GraphQL Yoga (from The Guild, best DX), Pothos (code-first schema builder).",
181
+ source: {
182
+ origin: "research",
183
+ artifact: "research/graphql-landscape.md",
184
+ connector: null,
185
+ },
186
+ evidence: "web",
187
+ status: "active",
188
+ phase_added: "research",
189
+ tags: ["graphql", "tooling", "ecosystem"],
115
190
  },
116
191
  {
117
- id: 'x001', type: 'factual', topic: 'graphql-performance',
118
- content: 'The 2-8ms overhead claim (r002) understates the real-world impact. In production, GraphQL query parsing, validation, and execution planning add consistent 10-20ms overhead for medium-complexity queries. This matters when the p95 budget is 50ms.',
119
- source: { origin: 'challenge', artifact: null, connector: null },
120
- evidence: 'web', status: 'active', phase_added: 'research',
121
- conflicts_with: ['r002'],
122
- tags: ['graphql', 'performance', 'challenge'],
192
+ id: "x001",
193
+ type: "factual",
194
+ topic: "graphql-performance",
195
+ content:
196
+ "The 2-8ms overhead claim (r002) understates the real-world impact. In production, GraphQL query parsing, validation, and execution planning add consistent 10-20ms overhead for medium-complexity queries. This matters when the p95 budget is 50ms.",
197
+ source: { origin: "challenge", artifact: null, connector: null },
198
+ evidence: "web",
199
+ status: "active",
200
+ phase_added: "research",
201
+ conflicts_with: ["r002"],
202
+ tags: ["graphql", "performance", "challenge"],
123
203
  },
124
204
  ];
125
205
 
@@ -129,21 +209,23 @@ export async function run(dir, args) {
129
209
  const startTime = Date.now();
130
210
  const flags = {};
131
211
  for (let i = 0; i < args.length; i++) {
132
- if (args[i] === '--no-open') flags.noOpen = true;
133
- else if (args[i] === '--port' && args[i + 1]) { flags.port = args[++i]; }
212
+ if (args[i] === "--no-open") flags.noOpen = true;
213
+ else if (args[i] === "--port" && args[i + 1]) {
214
+ flags.port = args[++i];
215
+ }
134
216
  }
135
217
 
136
- const claimsPath = target(dir, 'claims.json');
137
- if (fs.existsSync(claimsPath) && !args.includes('--force')) {
218
+ const claimsPath = target(dir, "claims.json");
219
+ if (fs.existsSync(claimsPath) && !args.includes("--force")) {
138
220
  console.log();
139
- console.log(' A sprint already exists here. Use --force to overwrite.');
221
+ console.log(" A sprint already exists here. Use --force to overwrite.");
140
222
  console.log();
141
223
  process.exit(1);
142
224
  }
143
225
 
144
226
  console.log();
145
- console.log(' \x1b[1m\x1b[33mwheat quickstart\x1b[0m — zero to dashboard');
146
- console.log(' ─────────────────────────────────────────');
227
+ console.log(" \x1b[1m\x1b[33mwheat quickstart\x1b[0m — zero to dashboard");
228
+ console.log(" ─────────────────────────────────────────");
147
229
  console.log();
148
230
 
149
231
  // Step 1: Create claims.json with demo data
@@ -151,14 +233,14 @@ export async function run(dir, args) {
151
233
  const claimsData = {
152
234
  meta: {
153
235
  question: DEMO_QUESTION,
154
- initiated: new Date().toISOString().split('T')[0],
236
+ initiated: new Date().toISOString().split("T")[0],
155
237
  audience: DEMO_AUDIENCE,
156
- phase: 'research',
238
+ phase: "research",
157
239
  connectors: [],
158
240
  dismissed_blind_spots: [],
159
241
  merged_from: [],
160
242
  },
161
- claims: DEMO_CLAIMS.map(c => ({
243
+ claims: DEMO_CLAIMS.map((c) => ({
162
244
  ...c,
163
245
  timestamp,
164
246
  conflicts_with: c.conflicts_with || [],
@@ -166,66 +248,82 @@ export async function run(dir, args) {
166
248
  })),
167
249
  };
168
250
 
169
- fs.writeFileSync(claimsPath, JSON.stringify(claimsData, null, 2) + '\n');
251
+ fs.writeFileSync(claimsPath, JSON.stringify(claimsData, null, 2) + "\n");
170
252
  const elapsed1 = Date.now() - startTime;
171
- console.log(` \x1b[32m+\x1b[0m claims.json (${claimsData.claims.length} claims seeded) \x1b[2m${elapsed1}ms\x1b[0m`);
253
+ console.log(
254
+ ` \x1b[32m+\x1b[0m claims.json (${claimsData.claims.length} claims seeded) \x1b[2m${elapsed1}ms\x1b[0m`
255
+ );
172
256
 
173
257
  // Step 2: Create CLAUDE.md
174
- const templatePath = path.join(packageRoot(), 'templates', 'claude.md');
258
+ const templatePath = path.join(packageRoot(), "templates", "claude.md");
175
259
  let claudeMd;
176
260
  try {
177
- claudeMd = fs.readFileSync(templatePath, 'utf8')
261
+ claudeMd = fs
262
+ .readFileSync(templatePath, "utf8")
178
263
  .replace(/\{\{QUESTION\}\}/g, DEMO_QUESTION)
179
- .replace(/\{\{AUDIENCE\}\}/g, DEMO_AUDIENCE.join(', '))
180
- .replace(/\{\{CONSTRAINTS\}\}/g, DEMO_CONSTRAINTS.map(c => `- ${c}`).join('\n'))
264
+ .replace(/\{\{AUDIENCE\}\}/g, DEMO_AUDIENCE.join(", "))
265
+ .replace(
266
+ /\{\{CONSTRAINTS\}\}/g,
267
+ DEMO_CONSTRAINTS.map((c) => `- ${c}`).join("\n")
268
+ )
181
269
  .replace(/\{\{DONE_CRITERIA\}\}/g, DEMO_DONE);
182
270
  } catch {
183
271
  claudeMd = `# Wheat Sprint\n\n**Question:** ${DEMO_QUESTION}\n`;
184
272
  }
185
- fs.writeFileSync(target(dir, 'CLAUDE.md'), claudeMd);
273
+ fs.writeFileSync(target(dir, "CLAUDE.md"), claudeMd);
186
274
  console.log(` \x1b[32m+\x1b[0m CLAUDE.md`);
187
275
 
188
276
  // Step 3: Copy slash commands
189
- const srcDir = path.join(packageRoot(), 'templates', 'commands');
190
- const destDir = target(dir, '.claude', 'commands');
277
+ const srcDir = path.join(packageRoot(), "templates", "commands");
278
+ const destDir = target(dir, ".claude", "commands");
191
279
  fs.mkdirSync(destDir, { recursive: true });
192
280
  let copied = 0;
193
281
  try {
194
282
  for (const file of fs.readdirSync(srcDir)) {
195
- if (!file.endsWith('.md')) continue;
283
+ if (!file.endsWith(".md")) continue;
196
284
  fs.copyFileSync(path.join(srcDir, file), path.join(destDir, file));
197
285
  copied++;
198
286
  }
199
- } catch { /* commands dir may not exist in dev */ }
287
+ } catch {
288
+ /* commands dir may not exist in dev */
289
+ }
200
290
  console.log(` \x1b[32m+\x1b[0m .claude/commands/ (${copied} commands)`);
201
291
 
202
292
  // Step 4: Create directories
203
- for (const d of ['output', 'research', 'prototypes', 'evidence']) {
293
+ for (const d of ["output", "research", "prototypes", "evidence"]) {
204
294
  const dirPath = target(dir, d);
205
295
  if (!fs.existsSync(dirPath)) {
206
296
  fs.mkdirSync(dirPath, { recursive: true });
207
- fs.writeFileSync(path.join(dirPath, '.gitkeep'), '');
297
+ fs.writeFileSync(path.join(dirPath, ".gitkeep"), "");
208
298
  }
209
299
  }
210
- console.log(' \x1b[32m+\x1b[0m output/, research/, prototypes/, evidence/');
300
+ console.log(" \x1b[32m+\x1b[0m output/, research/, prototypes/, evidence/");
211
301
 
212
302
  // Step 5: Run the compiler
213
303
  console.log();
214
- console.log(' \x1b[1mCompiling...\x1b[0m');
304
+ console.log(" \x1b[1mCompiling...\x1b[0m");
215
305
  try {
216
- const compilerPath = path.join(packageRoot(), 'lib', 'compiler.js');
306
+ const compilerPath = path.join(packageRoot(), "lib", "compiler.js");
217
307
  const compilerModule = await import(compilerPath);
218
- if (typeof compilerModule.compile === 'function') {
219
- await compilerModule.compile(dir, ['--summary']);
220
- } else if (typeof compilerModule.run === 'function') {
221
- await compilerModule.run(dir, ['--summary']);
308
+ if (typeof compilerModule.compile === "function") {
309
+ await compilerModule.compile(dir, ["--summary"]);
310
+ } else if (typeof compilerModule.run === "function") {
311
+ await compilerModule.run(dir, ["--summary"]);
222
312
  }
223
313
  } catch (err) {
224
314
  // Fallback: try running as subprocess
225
315
  try {
226
- const output = execFileSync('node', [
227
- path.join(packageRoot(), 'bin', 'wheat.js'), 'compile', '--summary', '--dir', dir
228
- ], { timeout: 15000, stdio: ['ignore', 'pipe', 'pipe'] }).toString();
316
+ const output = execFileSync(
317
+ "node",
318
+ [
319
+ path.join(packageRoot(), "bin", "wheat.js"),
320
+ "compile",
321
+ "--summary",
322
+ "--dir",
323
+ dir,
324
+ ],
325
+ { timeout: 15000, stdio: ["ignore", "pipe", "pipe"] }
326
+ ).toString();
229
327
  process.stdout.write(output);
230
328
  } catch (e) {
231
329
  console.log(` \x1b[33m!\x1b[0m Compilation skipped: ${e.message}`);
@@ -237,32 +335,48 @@ export async function run(dir, args) {
237
335
  console.log(` \x1b[32mCompiled in ${elapsed5}ms.\x1b[0m`);
238
336
 
239
337
  // Step 6: Start the dashboard
240
- const port = flags.port || '9092';
338
+ const port = flags.port || "9092";
241
339
  console.log();
242
340
  console.log(` \x1b[1mStarting dashboard on port ${port}...\x1b[0m`);
243
341
 
244
342
  // Import and start the server
245
343
  try {
246
- const serverModule = await import(path.join(packageRoot(), 'lib', 'server.js'));
344
+ const serverModule = await import(
345
+ path.join(packageRoot(), "lib", "server.js")
346
+ );
247
347
  // The server module's run() starts listening — we call it and let it run
248
348
  // It will keep the process alive
249
- const serverArgs = ['--port', port, '--dir', dir];
250
- if (flags.noOpen) serverArgs.push('--no-open');
349
+ const serverArgs = ["--port", port, "--dir", dir];
350
+ if (flags.noOpen) serverArgs.push("--no-open");
251
351
 
252
352
  console.log();
253
- console.log(' ─────────────────────────────────────────');
353
+ console.log(" ─────────────────────────────────────────");
254
354
  const totalTime = ((Date.now() - startTime) / 1000).toFixed(1);
255
- console.log(` \x1b[1m\x1b[33mQuickstart complete.\x1b[0m ${totalTime}s total`);
355
+ console.log(
356
+ ` \x1b[1m\x1b[33mQuickstart complete.\x1b[0m ${totalTime}s total`
357
+ );
256
358
  console.log();
257
359
  console.log(` Sprint: ${DEMO_QUESTION}`);
258
- console.log(` Claims: ${claimsData.claims.length} (${DEMO_CLAIMS.filter(c => c.id.startsWith('d')).length} constraints + ${DEMO_CLAIMS.filter(c => c.id.startsWith('r')).length} research + ${DEMO_CLAIMS.filter(c => c.id.startsWith('x')).length} challenge)`);
360
+ console.log(
361
+ ` Claims: ${claimsData.claims.length} (${
362
+ DEMO_CLAIMS.filter((c) => c.id.startsWith("d")).length
363
+ } constraints + ${
364
+ DEMO_CLAIMS.filter((c) => c.id.startsWith("r")).length
365
+ } research + ${
366
+ DEMO_CLAIMS.filter((c) => c.id.startsWith("x")).length
367
+ } challenge)`
368
+ );
259
369
  console.log(` Conflicts: 1 (r002 vs x001 — performance overhead)`);
260
370
  console.log(` Dashboard: http://localhost:${port}`);
261
371
  console.log();
262
- console.log(' What to do now:');
263
- console.log(' 1. Explore the dashboard — click topics, claims, see the conflict');
264
- console.log(' 2. Open Claude Code here and try: /research "GraphQL security"');
265
- console.log(' 3. Or start YOUR sprint: wheat init');
372
+ console.log(" What to do now:");
373
+ console.log(
374
+ " 1. Explore the dashboard click topics, claims, see the conflict"
375
+ );
376
+ console.log(
377
+ ' 2. Open Claude Code here and try: /research "GraphQL security"'
378
+ );
379
+ console.log(" 3. Or start YOUR sprint: wheat init");
266
380
  console.log();
267
381
 
268
382
  // Start server (this blocks — keeps process alive)