@nolrm/contextkit 0.12.12 → 0.12.15

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
@@ -39,7 +39,7 @@ npm i -g @nolrm/contextkit
39
39
  cd your-project
40
40
  contextkit install
41
41
  ```
42
- Creates `.contextkit/` with skeleton standards files in your project.
42
+ Creates `.contextkit/` with skeleton standards files, a self-describing `README.md`, and an attribution block in `config.yml` so any developer who encounters the folder knows what manages it.
43
43
 
44
44
  **3. Generate your standards**
45
45
 
@@ -153,8 +153,8 @@ ContextKit installs reusable slash commands for supported platforms:
153
153
  | `/squad-dev` | Implement code following the architect plan |
154
154
  | `/squad-test` | Write and run tests against acceptance criteria |
155
155
  | `/squad-review` | Review the full pipeline and give a verdict |
156
- | `/squad-run` | Auto-run the remaining pipeline for batch tasks (sequential) |
157
- | `/squad-run-agents` | Auto-run the pipeline in parallel using Claude Code agents (Claude Code only) |
156
+ | `/squad-auto` | Auto-run the full pipeline after kickoff (recommended, sequential) |
157
+ | `/squad-auto-parallel` | Auto-run the pipeline in parallel using Claude Code agents (Claude Code only) |
158
158
  | `/ck` | Health check — verify setup, standards, and integrations |
159
159
 
160
160
  **Claude Code** — available as `/analyze`, `/review`, etc. in `.claude/commands/`
@@ -181,11 +181,14 @@ The squad workflow turns a single AI session into a structured multi-role pipeli
181
181
  ### Single-Task Flow
182
182
 
183
183
  ```bash
184
- /squad "add dark mode support" # PO writes the spec
185
- /squad-architect # Architect designs the plan
186
- /squad-dev # Dev implements the code
187
- /squad-test # Tester writes and runs tests
188
- /squad-review # Reviewer gives the verdict
184
+ /squad "add dark mode support" # PO writes the spec
185
+
186
+ /squad-auto # Auto-runs architect dev → test → review (recommended)
187
+ # or step through manually —
188
+ /squad-architect # Architect designs the plan
189
+ /squad-dev # Dev implements the code
190
+ /squad-test # Tester writes and runs tests
191
+ /squad-review # Reviewer gives the verdict
189
192
  ```
190
193
 
191
194
  ### Batch Flow
@@ -196,16 +199,16 @@ Pass multiple tasks to `/squad` and it automatically runs in batch mode:
196
199
  /squad "add dark mode" "fix login bug" "refactor checkout"
197
200
  # PO writes specs for all three tasks
198
201
 
199
- /squad-run
202
+ /squad-auto
200
203
  # Runs Architect → Dev → Test → Review for each task sequentially
201
204
  ```
202
205
 
203
- **Agent mode (Claude Code only):** Use `/squad-run-agents` instead of `/squad-run` to spawn parallel subagents — one per task per phase — so all tasks progress simultaneously rather than one at a time.
206
+ **Parallel mode (Claude Code only):** Use `/squad-auto-parallel` instead of `/squad-auto` to spawn parallel subagents — one per task per phase — so all tasks progress simultaneously rather than one at a time.
204
207
 
205
208
  ```bash
206
209
  /squad "add dark mode" "fix login bug" "refactor checkout"
207
210
 
208
- /squad-run-agents
211
+ /squad-auto-parallel
209
212
  # Phase 1: architect agents for all 3 tasks run in parallel
210
213
  # Phase 2: dev→test→review pipeline runs in parallel per task
211
214
  ```
@@ -285,8 +288,6 @@ Hooks are optional and can be skipped with `ck install --no-hooks`.
285
288
  - ⚡ **Zero Config** - Auto-detects project type and package manager
286
289
  - ✅ **Policy Enforcement** - Configurable validation with `ck check`
287
290
  - 📝 **Corrections Tracking** - Track AI performance issues with corrections log
288
- - 🔄 **Workflow Orchestration** - Structured workflows with `ck run`
289
- - 📦 **Registry System** - Share standards across teams with `ck publish/pull`
290
291
  - 📊 **Observability Dashboard** - Visual metrics and compliance tracking
291
292
 
292
293
  ## Commands
@@ -319,23 +320,14 @@ ck check --strict # treat warnings as errors
319
320
  ck note "message" # add note to corrections log
320
321
  ck note "AI issue" --category "AI Behavior" --priority HIGH
321
322
 
322
- # Workflow Orchestration
323
- ck run <workflow> # run structured workflow
324
- ck run create-component # example workflow
325
- ck run create-component --interactive # interactive mode
326
-
327
- # Registry & Versioning
328
- ck publish --name @company/react-standards --version 1.0.0
329
- ck pull @company/react-standards@1.0.0
330
- ck pull @company/react-standards@latest --backup
323
+ # Squad — multi-role AI pipeline (slash commands in your AI tool)
324
+ /squad "add dark mode" # PO writes spec
325
+ /squad-auto # runs architect → dev → test → review hands-free
326
+ /squad-reset # clear stuck or mixed squad state
331
327
 
332
328
  # Observability
333
329
  ck dashboard # start web dashboard
334
330
  ck dashboard --no-server # CLI metrics only
335
-
336
- # AI Usage (loads .contextkit context automatically)
337
- ck "create a button" # quick AI chat with context
338
- ck ai "create a button" # explicit AI command
339
331
  ```
340
332
 
341
333
  ## Links
@@ -93,6 +93,9 @@ class InstallCommand {
93
93
  // Create directory structure
94
94
  await this.createDirectoryStructure();
95
95
 
96
+ // Write attribution README
97
+ await this.createReadme();
98
+
96
99
  // Download files
97
100
  await this.downloadFiles(projectType, options);
98
101
 
@@ -718,12 +721,16 @@ Any design decisions, trade-offs, or open questions to resolve before coding.
718
721
  '.contextkit/commands/squad-review.md'
719
722
  );
720
723
  await this.downloadManager.downloadFile(
721
- `${this.repoUrl}/commands/squad-run.md`,
722
- '.contextkit/commands/squad-run.md'
724
+ `${this.repoUrl}/commands/squad-auto.md`,
725
+ '.contextkit/commands/squad-auto.md'
726
+ );
727
+ await this.downloadManager.downloadFile(
728
+ `${this.repoUrl}/commands/squad-auto-parallel.md`,
729
+ '.contextkit/commands/squad-auto-parallel.md'
723
730
  );
724
731
  await this.downloadManager.downloadFile(
725
- `${this.repoUrl}/commands/squad-run-agents.md`,
726
- '.contextkit/commands/squad-run-agents.md'
732
+ `${this.repoUrl}/commands/squad-reset.md`,
733
+ '.contextkit/commands/squad-reset.md'
727
734
  );
728
735
 
729
736
  // Download hooks (pre-push and commit-msg only, no pre-commit)
@@ -972,8 +979,12 @@ esac
972
979
  (await fs.pathExists('package.json') &&
973
980
  (await fs.readJson('package.json').catch(() => ({}))).workspaces);
974
981
 
975
- await fs.writeFile('.contextkit/config.yml',
982
+ await fs.writeFile('.contextkit/config.yml',
976
983
  `# ContextKit Configuration
984
+ _source:
985
+ tool: "@nolrm/contextkit"
986
+ version: "${require('../../package.json').version}"
987
+ npm: "https://www.npmjs.com/package/@nolrm/contextkit"
977
988
  ck: 1
978
989
  version: "${config.version}"
979
990
  updated: "${now.split('T')[0]}"
@@ -1043,6 +1054,20 @@ metadata:
1043
1054
  );
1044
1055
  }
1045
1056
 
1057
+ async createReadme() {
1058
+ const content = `# .contextkit
1059
+
1060
+ This directory is managed by ContextKit — a CLI tool that provides AI assistants with structured project standards.
1061
+
1062
+ \`\`\`
1063
+ npm install -g @nolrm/contextkit
1064
+ \`\`\`
1065
+
1066
+ https://www.npmjs.com/package/@nolrm/contextkit
1067
+ `;
1068
+ await fs.writeFile('.contextkit/README.md', content);
1069
+ }
1070
+
1046
1071
  async createStatusFile(projectType, packageManager, hookChoices) {
1047
1072
  try {
1048
1073
  const status = this.statusManager.getDefaultStatus();
@@ -55,6 +55,9 @@ class UpdateCommand {
55
55
  // Download latest files
56
56
  await this.downloadFiles(projectType);
57
57
 
58
+ // Remove files that were removed from CK
59
+ await this.removeLegacyFiles();
60
+
58
61
  // Restore user configuration
59
62
  await this.restoreUserConfig(config);
60
63
 
@@ -275,12 +278,16 @@ class UpdateCommand {
275
278
  '.contextkit/commands/squad-review.md'
276
279
  );
277
280
  await this.downloadManager.downloadFile(
278
- `${this.repoUrl}/commands/squad-run.md`,
279
- '.contextkit/commands/squad-run.md'
281
+ `${this.repoUrl}/commands/squad-auto.md`,
282
+ '.contextkit/commands/squad-auto.md'
283
+ );
284
+ await this.downloadManager.downloadFile(
285
+ `${this.repoUrl}/commands/squad-auto-parallel.md`,
286
+ '.contextkit/commands/squad-auto-parallel.md'
280
287
  );
281
288
  await this.downloadManager.downloadFile(
282
- `${this.repoUrl}/commands/squad-run-agents.md`,
283
- '.contextkit/commands/squad-run-agents.md'
289
+ `${this.repoUrl}/commands/squad-reset.md`,
290
+ '.contextkit/commands/squad-reset.md'
284
291
  );
285
292
 
286
293
  // Download hooks (pre-push and commit-msg only, no pre-commit)
@@ -401,6 +408,17 @@ commands:
401
408
  }
402
409
  }
403
410
 
411
+ async removeLegacyFiles() {
412
+ const legacyFiles = [
413
+ '.contextkit/commands/squad-peer-review.md',
414
+ ];
415
+ for (const file of legacyFiles) {
416
+ if (await fs.pathExists(file)) {
417
+ await fs.remove(file);
418
+ }
419
+ }
420
+ }
421
+
404
422
  async updateConfigVersion(version) {
405
423
  const configContent = await fs.readFile('.contextkit/config.yml', 'utf8');
406
424
  const updatedContent = configContent.replace(
@@ -2,8 +2,9 @@ const chalk = require('chalk');
2
2
  const fs = require('fs-extra');
3
3
  const path = require('path');
4
4
 
5
- const MARKER = '<!-- Generated by ContextKit -->';
5
+ const MARKER = '<!-- Generated by ContextKit (@nolrm/contextkit) https://www.npmjs.com/package/@nolrm/contextkit -->';
6
6
  const MARKER_END = '<!-- End ContextKit -->';
7
+ const LEGACY_MARKER_V1 = '<!-- Generated by ContextKit -->';
7
8
  const LEGACY_MARKER = '<!-- Generated by Vibe Kit -->';
8
9
  const LEGACY_MARKER_END = '<!-- End Vibe Kit -->';
9
10
 
@@ -59,11 +60,12 @@ class BaseIntegration {
59
60
 
60
61
  // Check for current or legacy markers
61
62
  const hasCurrentMarker = existing.includes(MARKER);
63
+ const hasLegacyMarkerV1 = existing.includes(LEGACY_MARKER_V1);
62
64
  const hasLegacyMarker = existing.includes(LEGACY_MARKER);
63
65
 
64
- if (hasCurrentMarker || hasLegacyMarker) {
65
- const activeMarker = hasCurrentMarker ? MARKER : LEGACY_MARKER;
66
- const activeMarkerEnd = hasCurrentMarker ? MARKER_END : LEGACY_MARKER_END;
66
+ if (hasCurrentMarker || hasLegacyMarkerV1 || hasLegacyMarker) {
67
+ const activeMarker = hasCurrentMarker ? MARKER : (hasLegacyMarkerV1 ? LEGACY_MARKER_V1 : LEGACY_MARKER);
68
+ const activeMarkerEnd = hasLegacyMarker && !hasCurrentMarker && !hasLegacyMarkerV1 ? LEGACY_MARKER_END : MARKER_END;
67
69
  const before = existing.substring(0, existing.indexOf(activeMarker));
68
70
  const afterMarkerEnd = existing.indexOf(activeMarkerEnd);
69
71
  const after = afterMarkerEnd !== -1
@@ -22,8 +22,9 @@ class ClaudeIntegration extends BaseIntegration {
22
22
  '.claude/commands/squad-dev.md',
23
23
  '.claude/commands/squad-test.md',
24
24
  '.claude/commands/squad-review.md',
25
- '.claude/commands/squad-run.md',
26
- '.claude/commands/squad-run-agents.md',
25
+ '.claude/commands/squad-auto.md',
26
+ '.claude/commands/squad-auto-parallel.md',
27
+ '.claude/commands/squad-reset.md',
27
28
  '.claude/commands/spec.md',
28
29
  '.claude/commands/ck.md',
29
30
  ];
@@ -44,6 +45,7 @@ class ClaudeIntegration extends BaseIntegration {
44
45
  '.claude/rules/vibe-kit-testing.md',
45
46
  '.claude/rules/vibe-kit-code-style.md',
46
47
  '.claude/commands/squad-batch.md',
48
+ '.claude/commands/squad-peer-review.md',
47
49
  ];
48
50
  for (const file of legacyFiles) {
49
51
  if (await fs.pathExists(file)) {
@@ -203,53 +205,62 @@ Write a component spec (MD-first) before any code is created. Scaffold the spec
203
205
  `);
204
206
 
205
207
  // Squad slash commands
206
- await this.writeGeneratedFile('.claude/commands/squad.md', `# Squad — Kickoff
208
+ await this.writeGeneratedFile('.claude/commands/squad.md', `# Squad — Kickoff (start here)
207
209
 
208
210
  Read \`.contextkit/commands/squad.md\` and execute the squad kickoff workflow.
209
211
 
210
212
  Create the handoff file and write the PO spec for the given task. Pass the user's task description as the input.
213
+
214
+ After kickoff, run \`/squad-auto\` to auto-run the full pipeline hands-free, or step through manually with \`/squad-architect\` → \`/squad-dev\` → \`/squad-test\` → \`/squad-review\`.
211
215
  `);
212
216
 
213
- await this.writeGeneratedFile('.claude/commands/squad-architect.md', `# Squad — Architect
217
+ await this.writeGeneratedFile('.claude/commands/squad-architect.md', `# Squad — Architect (manual step 1/4)
214
218
 
215
219
  Read \`.contextkit/commands/squad-architect.md\` and execute the architect workflow.
216
220
 
217
- Read the PO spec from the handoff file, design the technical approach, and write the implementation plan.
221
+ Read the PO spec from the handoff file, design the technical approach, and write the implementation plan. Use \`/squad-auto\` instead to run all steps automatically.
218
222
  `);
219
223
 
220
- await this.writeGeneratedFile('.claude/commands/squad-dev.md', `# Squad — Dev
224
+ await this.writeGeneratedFile('.claude/commands/squad-dev.md', `# Squad — Dev (manual step 2/4)
221
225
 
222
226
  Read \`.contextkit/commands/squad-dev.md\` and execute the dev workflow.
223
227
 
224
- Follow the architect's plan to implement the code changes.
228
+ Follow the architect's plan to implement the code changes. Use \`/squad-auto\` instead to run all steps automatically.
225
229
  `);
226
230
 
227
- await this.writeGeneratedFile('.claude/commands/squad-test.md', `# Squad — Test
231
+ await this.writeGeneratedFile('.claude/commands/squad-test.md', `# Squad — Test (manual step 3/4)
228
232
 
229
233
  Read \`.contextkit/commands/squad-test.md\` and execute the test workflow.
230
234
 
231
- Write and run tests against the PO's acceptance criteria.
235
+ Write and run tests against the PO's acceptance criteria. Use \`/squad-auto\` instead to run all steps automatically.
232
236
  `);
233
237
 
234
- await this.writeGeneratedFile('.claude/commands/squad-review.md', `# Squad — Review
238
+ await this.writeGeneratedFile('.claude/commands/squad-review.md', `# Squad — Review (manual step 4/4)
235
239
 
236
240
  Read \`.contextkit/commands/squad-review.md\` and execute the review workflow.
237
241
 
238
- Review the full handoff (spec, plan, implementation, tests) and write the final verdict.
242
+ Review the full handoff (spec, plan, implementation, tests) and write the final verdict. Use \`/squad-auto\` instead to run all steps automatically.
239
243
  `);
240
244
 
241
- await this.writeGeneratedFile('.claude/commands/squad-run.md', `# Squad RunAuto-Run Pipeline
245
+ await this.writeGeneratedFile('.claude/commands/squad-auto.md', `# Squad AutoFull Pipeline (recommended)
242
246
 
243
- Read \`.contextkit/commands/squad-run.md\` and execute the pipeline runner workflow.
247
+ Read \`.contextkit/commands/squad-auto.md\` and execute the pipeline runner workflow.
244
248
 
245
- Process all batch tasks through the remaining pipeline steps (Architect, Dev, Test, Review) sequentially.
249
+ Run after \`/squad\` kickoff. Automatically runs architect dev test review for all tasks sequentially, hands-free.
246
250
  `);
247
251
 
248
- await this.writeGeneratedFile('.claude/commands/squad-run-agents.md', `# Squad RunAgent Mode (Parallel)
252
+ await this.writeGeneratedFile('.claude/commands/squad-auto-parallel.md', `# Squad AutoParallel Agents (batch, fastest)
249
253
 
250
- Read \`.contextkit/commands/squad-run-agents.md\` and execute the parallel pipeline workflow.
254
+ Read \`.contextkit/commands/squad-auto-parallel.md\` and execute the parallel pipeline workflow.
251
255
 
252
256
  Spawn one subagent per task per phase using the Task tool, so all tasks progress simultaneously instead of sequentially. Use this after \`/squad\` batch kickoff for faster execution on multi-task batches.
257
+ `);
258
+
259
+ await this.writeGeneratedFile('.claude/commands/squad-reset.md', `# Squad — Reset
260
+
261
+ Read \`.contextkit/commands/squad-reset.md\` and execute the reset workflow.
262
+
263
+ Delete the current squad state (.contextkit/squad/) so you can start fresh. Use when the squad folder is in a mixed or stuck state.
253
264
  `);
254
265
 
255
266
  await this.writeGeneratedFile('.claude/commands/ck.md', `# ContextKit Health Check
@@ -280,8 +291,8 @@ Check project setup, standards status, and integrations. Report what needs atten
280
291
  console.log(chalk.dim(' /squad-dev — Implement the code'));
281
292
  console.log(chalk.dim(' /squad-test — Write and run tests'));
282
293
  console.log(chalk.dim(' /squad-review — Review and write verdict'));
283
- console.log(chalk.dim(' /squad-run — Auto-run pipeline sequentially'));
284
- console.log(chalk.dim(' /squad-run-agents — Auto-run pipeline in parallel (agent mode)'));
294
+ console.log(chalk.dim(' /squad-auto — Auto-run full pipeline (recommended)'));
295
+ console.log(chalk.dim(' /squad-auto-parallel — Auto-run pipeline in parallel (batch, fastest)'));
285
296
  console.log(chalk.dim(''));
286
297
  console.log(chalk.dim(' Health check:'));
287
298
  console.log(chalk.dim(' /ck — Check project setup and standards status'));
@@ -23,7 +23,7 @@ class CursorIntegration extends BaseIntegration {
23
23
  '.cursor/prompts/squad-dev.md',
24
24
  '.cursor/prompts/squad-test.md',
25
25
  '.cursor/prompts/squad-review.md',
26
- '.cursor/prompts/squad-run.md',
26
+ '.cursor/prompts/squad-auto.md',
27
27
  '.cursor/prompts/ck.md',
28
28
  ];
29
29
  this.bridgeFiles = [];
@@ -237,11 +237,11 @@ Read \`.contextkit/commands/squad-review.md\` and execute the review workflow.
237
237
  Review the full handoff (spec, plan, implementation, tests) and write the final verdict.
238
238
  `);
239
239
 
240
- await this.writeGeneratedFile('.cursor/prompts/squad-run.md', `# Squad RunAuto-Run Pipeline
240
+ await this.writeGeneratedFile('.cursor/prompts/squad-auto.md', `# Squad AutoFull Pipeline (recommended)
241
241
 
242
- Read \`.contextkit/commands/squad-run.md\` and execute the pipeline runner workflow.
242
+ Read \`.contextkit/commands/squad-auto.md\` and execute the pipeline runner workflow.
243
243
 
244
- Process all batch tasks through the remaining pipeline steps (Architect, Dev, Test, Review) sequentially.
244
+ Run after kickoff. Automatically runs architect dev test review for all tasks sequentially, hands-free.
245
245
  `);
246
246
 
247
247
  await this.writeGeneratedFile('.cursor/prompts/spec.md', `# Spec
@@ -279,7 +279,7 @@ Check project setup, standards status, and integrations. Report what needs atten
279
279
  console.log(chalk.dim(' /squad-dev — Implement the code'));
280
280
  console.log(chalk.dim(' /squad-test — Write and run tests'));
281
281
  console.log(chalk.dim(' /squad-review — Review and write verdict'));
282
- console.log(chalk.dim(' /squad-run — Auto-run pipeline for batch tasks'));
282
+ console.log(chalk.dim(' /squad-auto — Auto-run full pipeline (recommended)'));
283
283
  console.log(chalk.dim(''));
284
284
  console.log(chalk.dim(' Health check:'));
285
285
  console.log(chalk.dim(' /ck — Check project setup and standards status'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nolrm/contextkit",
3
- "version": "0.12.12",
3
+ "version": "0.12.15",
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": {
@@ -12,7 +12,8 @@
12
12
  "scripts": {
13
13
  "test": "jest",
14
14
  "test:watch": "jest --watch",
15
- "test:coverage": "jest --coverage"
15
+ "test:coverage": "jest --coverage",
16
+ "prepare": "git config core.hooksPath .contextkit/hooks"
16
17
  },
17
18
  "keywords": [
18
19
  "contextkit",