@nolrm/contextkit 0.18.0 → 0.19.0

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.md CHANGED
@@ -157,7 +157,8 @@ ContextKit installs reusable slash commands for supported platforms:
157
157
  | `/doc-arch` | Generate architecture docs — stack-aware (Level 1). Output: `docs/<topic>.md`, or `docs/architecture.md` if no topic given. Pass a topic name, PR number, or leave blank to infer from branch. |
158
158
  | `/doc-feature` | Generate feature-level docs (`docs/features/<name>.md`) — stack-aware (Level 2) |
159
159
  | `/doc-component` | Generate component-level docs colocated with the target file — stack-aware (Level 3) |
160
- | `/spec` | Write a component spec (MD-first) before any code is created |
160
+ | `/spec` | Turn a product overview into an implementation-ready spec UX flows, DB schema, API contracts, and phased build plan |
161
+ | `/spec-component` | Write a component spec (MD-first) before any code is created |
161
162
  | `/squad` | Kick off a squad task — one task or many (auto-detects batch mode). Pushes back with clarifying questions if the task is vague. |
162
163
  | `/squad-architect` | Design the technical plan from the PO spec |
163
164
  | `/squad-dev` | Implement code following the architect plan |
@@ -269,6 +270,57 @@ If you have a screenshot, mockup, or design image relevant to the task, paste or
269
270
 
270
271
  ---
271
272
 
273
+ ## Spec Pipeline
274
+
275
+ The spec pipeline turns a high-level product overview into an implementation-ready spec. It runs before the squad — producing the UX flows, DB schema, API contracts, and phased build plan that make stories possible.
276
+
277
+ ```bash
278
+ /spec # Start or continue — picks up the next unchecked scope automatically
279
+ /spec 02-jobs # Run a specific scope by name
280
+ /spec --redo 01-identity-auth # Re-run a completed scope from scratch
281
+ ```
282
+
283
+ ### How It Works
284
+
285
+ `/spec` reads a product overview file (`PROJECT_OVERVIEW.md`, `OVERVIEW.md`, `BRIEF.md`, or any `.md` file you point it to) and runs a multi-round pipeline for each scope:
286
+
287
+ | Round | Who runs | What happens |
288
+ |-------|----------|-------------|
289
+ | 0 — Brief | CTO | Reads the overview, defines scope boundaries, writes a brief all agents share |
290
+ | 1 — Domain experts | UX, Data, Systems, Planner (parallel) | Each produces their section independently from the brief |
291
+ | 2 — Challenges | CTO | Reads all four sections, writes challenges — gaps, contradictions, missing decisions |
292
+ | 3 — Revisions | UX, Data, Systems, Planner (parallel) | Each addresses the CTO's challenges, flags unresolvable items as OPEN DECISIONs |
293
+ | Final — Author | CTO | Resolves open decisions, writes the unified `SPEC.md` |
294
+
295
+ ### Output Structure
296
+
297
+ Each scope produces a folder with all working artifacts and a final `SPEC.md`:
298
+
299
+ ```
300
+ spec/
301
+ PROGRESS.md ← scope checklist, updated after each run
302
+ INDEX.md ← master TOC linking all SPEC.md files
303
+
304
+ 01-identity-auth/
305
+ 00-brief.md ← CTO's scoping brief
306
+ 01-ux.md ← UX flows and screens
307
+ 02-data.md ← DB schema and relationships
308
+ 03-systems.md ← API contracts and services
309
+ 04-plan.md ← build phases and stories
310
+ 05-challenges.md ← CTO's Round 2 challenges
311
+ SPEC.md ← final unified spec for this scope
312
+ ```
313
+
314
+ Run `/spec` once per scope. Each run appends to `spec/INDEX.md`. When all scopes are done, feed individual `SPEC.md` files into `/squad` as implementation tasks.
315
+
316
+ ### First Run
317
+
318
+ On the first run, the CTO reads the entire overview and identifies all logical scopes — ordering them by dependency (identity before marketplace, invoicing before tax). This produces `spec/PROGRESS.md` which acts as the checklist for all subsequent runs.
319
+
320
+ If no standard overview file is found, `/spec` lists all `.md` files in the directory and asks you to pick.
321
+
322
+ ---
323
+
272
324
  ## Hooks & Quality Gates
273
325
 
274
326
  ContextKit installs two kinds of hooks. **Git hooks** (pre-push, commit-msg) enforce quality at push time for the whole team. For **Claude Code** installs, a **PostToolUse hook** is also written to `.claude/settings.json` — it runs format+lint after every file edit in a Claude Code session, catching failures immediately rather than at push time.
@@ -928,8 +928,8 @@ Any design decisions, trade-offs, or open questions to resolve before coding.
928
928
  '.contextkit/commands/dev/create-component.md'
929
929
  );
930
930
  await this.downloadManager.downloadFile(
931
- `${this.repoUrl}/commands/dev/spec.md`,
932
- '.contextkit/commands/dev/spec.md'
931
+ `${this.repoUrl}/commands/dev/spec-component.md`,
932
+ '.contextkit/commands/dev/spec-component.md'
933
933
  );
934
934
 
935
935
  // Download squad commands
@@ -982,6 +982,44 @@ Any design decisions, trade-offs, or open questions to resolve before coding.
982
982
  '.contextkit/commands/dev/health-check.md'
983
983
  );
984
984
 
985
+ // Download spec pipeline commands
986
+ await this.downloadManager.downloadFile(
987
+ `${this.repoUrl}/commands/spec/spec.md`,
988
+ '.contextkit/commands/spec/spec.md'
989
+ );
990
+ await this.downloadManager.downloadFile(
991
+ `${this.repoUrl}/commands/spec/spec-init.md`,
992
+ '.contextkit/commands/spec/spec-init.md'
993
+ );
994
+ await this.downloadManager.downloadFile(
995
+ `${this.repoUrl}/commands/spec/spec-brief.md`,
996
+ '.contextkit/commands/spec/spec-brief.md'
997
+ );
998
+ await this.downloadManager.downloadFile(
999
+ `${this.repoUrl}/commands/spec/spec-ux.md`,
1000
+ '.contextkit/commands/spec/spec-ux.md'
1001
+ );
1002
+ await this.downloadManager.downloadFile(
1003
+ `${this.repoUrl}/commands/spec/spec-data.md`,
1004
+ '.contextkit/commands/spec/spec-data.md'
1005
+ );
1006
+ await this.downloadManager.downloadFile(
1007
+ `${this.repoUrl}/commands/spec/spec-systems.md`,
1008
+ '.contextkit/commands/spec/spec-systems.md'
1009
+ );
1010
+ await this.downloadManager.downloadFile(
1011
+ `${this.repoUrl}/commands/spec/spec-planner.md`,
1012
+ '.contextkit/commands/spec/spec-planner.md'
1013
+ );
1014
+ await this.downloadManager.downloadFile(
1015
+ `${this.repoUrl}/commands/spec/spec-challenge.md`,
1016
+ '.contextkit/commands/spec/spec-challenge.md'
1017
+ );
1018
+ await this.downloadManager.downloadFile(
1019
+ `${this.repoUrl}/commands/spec/spec-author.md`,
1020
+ '.contextkit/commands/spec/spec-author.md'
1021
+ );
1022
+
985
1023
  // Download doc family commands
986
1024
  await this.downloadManager.downloadFile(
987
1025
  `${this.repoUrl}/commands/docs/doc-arch.md`,
@@ -292,8 +292,8 @@ class UpdateCommand {
292
292
  '.contextkit/commands/dev/create-component.md'
293
293
  );
294
294
  await this.downloadManager.downloadFile(
295
- `${this.repoUrl}/commands/dev/spec.md`,
296
- '.contextkit/commands/dev/spec.md'
295
+ `${this.repoUrl}/commands/dev/spec-component.md`,
296
+ '.contextkit/commands/dev/spec-component.md'
297
297
  );
298
298
 
299
299
  // Download squad commands
@@ -346,6 +346,44 @@ class UpdateCommand {
346
346
  '.contextkit/commands/dev/health-check.md'
347
347
  );
348
348
 
349
+ // Download spec pipeline commands
350
+ await this.downloadManager.downloadFile(
351
+ `${this.repoUrl}/commands/spec/spec.md`,
352
+ '.contextkit/commands/spec/spec.md'
353
+ );
354
+ await this.downloadManager.downloadFile(
355
+ `${this.repoUrl}/commands/spec/spec-init.md`,
356
+ '.contextkit/commands/spec/spec-init.md'
357
+ );
358
+ await this.downloadManager.downloadFile(
359
+ `${this.repoUrl}/commands/spec/spec-brief.md`,
360
+ '.contextkit/commands/spec/spec-brief.md'
361
+ );
362
+ await this.downloadManager.downloadFile(
363
+ `${this.repoUrl}/commands/spec/spec-ux.md`,
364
+ '.contextkit/commands/spec/spec-ux.md'
365
+ );
366
+ await this.downloadManager.downloadFile(
367
+ `${this.repoUrl}/commands/spec/spec-data.md`,
368
+ '.contextkit/commands/spec/spec-data.md'
369
+ );
370
+ await this.downloadManager.downloadFile(
371
+ `${this.repoUrl}/commands/spec/spec-systems.md`,
372
+ '.contextkit/commands/spec/spec-systems.md'
373
+ );
374
+ await this.downloadManager.downloadFile(
375
+ `${this.repoUrl}/commands/spec/spec-planner.md`,
376
+ '.contextkit/commands/spec/spec-planner.md'
377
+ );
378
+ await this.downloadManager.downloadFile(
379
+ `${this.repoUrl}/commands/spec/spec-challenge.md`,
380
+ '.contextkit/commands/spec/spec-challenge.md'
381
+ );
382
+ await this.downloadManager.downloadFile(
383
+ `${this.repoUrl}/commands/spec/spec-author.md`,
384
+ '.contextkit/commands/spec/spec-author.md'
385
+ );
386
+
349
387
  // Download doc family commands
350
388
  await this.downloadManager.downloadFile(
351
389
  `${this.repoUrl}/commands/docs/doc-arch.md`,
@@ -28,6 +28,7 @@ class ClaudeIntegration extends BaseIntegration {
28
28
  '.claude/skills/squad-doc/SKILL.md',
29
29
  '.claude/skills/squad-go/SKILL.md',
30
30
  '.claude/skills/spec/SKILL.md',
31
+ '.claude/skills/spec-component/SKILL.md',
31
32
  '.claude/skills/ck/SKILL.md',
32
33
  '.claude/skills/doc-arch/SKILL.md',
33
34
  '.claude/skills/doc-feature/SKILL.md',
@@ -312,7 +313,7 @@ Add inline docs, README sections, and usage examples for the specified code.
312
313
  );
313
314
 
314
315
  await this.writeGeneratedFile(
315
- '.claude/skills/spec/SKILL.md',
316
+ '.claude/skills/spec-component/SKILL.md',
316
317
  `---
317
318
  description: Write a component spec (MD-first) before coding begins
318
319
  argument-hint: "<component or feature name>"
@@ -320,12 +321,28 @@ allowed-tools: Read, Write, Glob, Grep
320
321
  effort: normal
321
322
  ---
322
323
 
323
- Read \`.contextkit/commands/dev/spec.md\` and execute the spec workflow.
324
+ Read \`.contextkit/commands/dev/spec-component.md\` and execute the component spec workflow.
324
325
 
325
326
  Write a component spec (MD-first) before any code is created. Scaffold the spec file colocated with the component and wait for review before coding begins.
326
327
  `
327
328
  );
328
329
 
330
+ await this.writeGeneratedFile(
331
+ '.claude/skills/spec/SKILL.md',
332
+ `---
333
+ description: Turn a product overview into an implementation-ready spec — UX flows, DB schema, API contracts, and build plan
334
+ argument-hint: "[scope-name] | --redo <scope> | --reset"
335
+ allowed-tools: Read, Write, Glob, Grep, Task
336
+ effort: high
337
+ context: fork
338
+ ---
339
+
340
+ Read \`.contextkit/commands/spec/spec.md\` and execute the spec pipeline workflow.
341
+
342
+ Reads a product overview file, breaks it into logical scopes, and runs a multi-round pipeline for each scope: CTO briefs → 4 domain experts in parallel → CTO challenges → domain revisions → CTO authors final SPEC.md. Produces a structured \`spec/\` folder. Run once per scope — \`/spec\` picks up where you left off.
343
+ `
344
+ );
345
+
329
346
  await this.writeGeneratedFile(
330
347
  '.claude/skills/ck/SKILL.md',
331
348
  `---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nolrm/contextkit",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "description": "ContextKit - Context Engineering for AI Development. Provide rich context to AI through structured MD files with standards, code guides, and documentation. Works with Cursor, Claude, Aider, VS Code Copilot, and more.",
5
5
  "main": "lib/index.js",
6
6
  "bin": {