@nolrm/contextkit 0.12.15 → 0.12.19

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
@@ -213,6 +213,14 @@ Pass multiple tasks to `/squad` and it automatically runs in batch mode:
213
213
  # Phase 2: dev→test→review pipeline runs in parallel per task
214
214
  ```
215
215
 
216
+ **Model routing (Claude Code only):** Set `model_routing: true` in `.contextkit/squad/config.md` to have `/squad-auto` automatically use Claude Haiku for Dev and Test phases. Architect and Review always run on your primary model. Saves ~35% tokens with no quality loss — the standards files and Review gate maintain quality.
217
+
218
+ ```markdown
219
+ # .contextkit/squad/config.md
220
+ checkpoint: po
221
+ model_routing: true # dev + test → Haiku, architect + review → primary model
222
+ ```
223
+
216
224
  ### Feedback Loop
217
225
 
218
226
  Any downstream role can raise questions for an upstream role. When this happens, the pipeline pauses and directs you to the right command:
@@ -295,7 +303,7 @@ Hooks are optional and can be skipped with `ck install --no-hooks`.
295
303
  ```bash
296
304
  # Installation & Setup
297
305
  ck install # set up .contextkit + pick AI tool interactively
298
- ck install claude # set up .contextkit + Claude (no prompt)
306
+ ck install claude # set up .contextkit + Claude, or add Claude to an existing install
299
307
  ck claude # add Claude Code integration (CLAUDE.md + rules)
300
308
  ck cursor # add Cursor integration (scoped .mdc rules)
301
309
  ck copilot # add GitHub Copilot integration
@@ -310,6 +318,7 @@ ck vscode # alias for copilot
310
318
  # Analysis & Updates
311
319
  /analyze # customize standards to your project (slash command in your AI tool)
312
320
  ck update # pull latest commands/hooks — preserves your analyzed standards
321
+ # updates are also flagged automatically after each ck command (24h cache)
313
322
  ck status # check install & integrations
314
323
 
315
324
  # Validation & Compliance
package/bin/contextkit.js CHANGED
@@ -12,6 +12,9 @@ const publish = require('../lib/commands/publish');
12
12
  const pull = require('../lib/commands/pull');
13
13
  const dashboard = require('../lib/commands/dashboard');
14
14
  const packageJson = require('../package.json');
15
+ const { checkForUpdates } = require('../lib/utils/notifier');
16
+
17
+ checkForUpdates();
15
18
 
16
19
  // Set up the CLI
17
20
  program
@@ -27,7 +30,7 @@ program
27
30
  .option('--non-interactive', 'Skip interactive prompts')
28
31
  .action(async (platform, options) => {
29
32
  try {
30
- await install({ ...options, ...(platform ? { platform, fullInstall: true } : { fullInstall: true }) });
33
+ await install({ ...options, ...(platform ? { platform } : { fullInstall: true }) });
31
34
  } catch (error) {
32
35
  console.error(chalk.red('Installation failed:'), error.message);
33
36
  process.exit(1);
@@ -9,6 +9,7 @@ const DownloadManager = require('../utils/download');
9
9
  const ProjectDetector = require('../utils/project-detector');
10
10
  const GitHooksManager = require('../utils/git-hooks');
11
11
  const StatusManager = require('../utils/status-manager');
12
+ const { printBanner } = require('../utils/banner');
12
13
 
13
14
  class InstallCommand {
14
15
  constructor() {
@@ -69,6 +70,7 @@ class InstallCommand {
69
70
  }
70
71
 
71
72
  // Full installation
73
+ printBanner();
72
74
  console.log(chalk.magenta('🎵 Installing ContextKit...'));
73
75
  console.log('');
74
76
 
@@ -732,6 +734,10 @@ Any design decisions, trade-offs, or open questions to resolve before coding.
732
734
  `${this.repoUrl}/commands/squad-reset.md`,
733
735
  '.contextkit/commands/squad-reset.md'
734
736
  );
737
+ await this.downloadManager.downloadFile(
738
+ `${this.repoUrl}/commands/health-check.md`,
739
+ '.contextkit/commands/health-check.md'
740
+ );
735
741
 
736
742
  // Download hooks (pre-push and commit-msg only, no pre-commit)
737
743
  await this.downloadManager.downloadFile(
@@ -790,7 +796,6 @@ Any design decisions, trade-offs, or open questions to resolve before coding.
790
796
  await this.createCorrectionsLog();
791
797
  await this.createMetaInstructions();
792
798
  await this.createPolicyFile();
793
- await this.createHealthCheckCommand();
794
799
 
795
800
  // Install CLI helpers
796
801
  await this.installCLIHelpers();
@@ -1590,58 +1595,6 @@ enforcement:
1590
1595
  console.log(chalk.green('✅ Policy file created'));
1591
1596
  }
1592
1597
 
1593
- async createHealthCheckCommand() {
1594
- const healthCheckContent = `# ContextKit Health Check
1595
-
1596
- Check this project's ContextKit setup and report status.
1597
-
1598
- ## Steps
1599
-
1600
- 1. Check if \`.contextkit/\` directory exists. If not → STOP and tell user: "Run \`ck install\` to set up ContextKit."
1601
-
1602
- 2. Read \`.contextkit/config.yml\` and check the \`last_analyzed\` field.
1603
-
1604
- 3. Check each standards file for skeleton markers. Read these files and check if they contain \`<!-- Content will be generated by running: /analyze -->\`:
1605
- - \`.contextkit/standards/code-style.md\`
1606
- - \`.contextkit/standards/testing.md\`
1607
- - \`.contextkit/standards/architecture.md\`
1608
- - \`.contextkit/standards/ai-guidelines.md\`
1609
- - \`.contextkit/standards/workflows.md\`
1610
- - \`.contextkit/standards/glossary.md\`
1611
-
1612
- 4. Check product files for placeholder content (e.g., \`[ELEVATOR_PITCH_FROM_MISSION_MD]\`):
1613
- - \`.contextkit/product/mission-lite.md\`
1614
- - \`.contextkit/product/decisions.md\`
1615
- - \`.contextkit/product/roadmap.md\`
1616
-
1617
- 5. Check which platform integrations exist:
1618
- - \`CLAUDE.md\` → Claude Code
1619
- - \`.cursor/rules/\` → Cursor
1620
- - \`AGENTS.md\` → Codex
1621
- - \`GEMINI.md\` → Gemini
1622
- - \`CONVENTIONS.md\` → Aider
1623
- - \`.windsurfrules\` → Windsurf
1624
- - \`.github/copilot-instructions.md\` → Copilot
1625
-
1626
- 6. Report findings as a status summary table and list recommended next steps.
1627
-
1628
- ## Output Format
1629
-
1630
- | Area | Status | Action |
1631
- |------|--------|--------|
1632
- | Installation | OK/Missing | \`ck install\` |
1633
- | Standards | Populated/Skeleton | \`ck analyze\` or \`/analyze\` |
1634
- | Product context | Populated/Placeholder | Edit \`.contextkit/product/\` files |
1635
- | Integrations | List active | \`ck <platform>\` to add more |
1636
-
1637
- ## Token Note
1638
-
1639
- If standards are still skeletons, warn that @imports in CLAUDE.md are loading empty files — wasting context tokens. Run \`/analyze\` to populate them.
1640
- `;
1641
-
1642
- await fs.writeFile('.contextkit/commands/health-check.md', healthCheckContent);
1643
- }
1644
-
1645
1598
  showSuccessMessage(hookChoices, platform = null, projectType = '', packageManager = '') {
1646
1599
  console.log('');
1647
1600
  console.log(chalk.green('🎉 ContextKit v1.0.0 successfully installed!'));
@@ -6,6 +6,7 @@ const path = require('path');
6
6
  const DownloadManager = require('../utils/download');
7
7
  const ProjectDetector = require('../utils/project-detector');
8
8
  const GitHooksManager = require('../utils/git-hooks');
9
+ const { printBanner } = require('../utils/banner');
9
10
 
10
11
  class UpdateCommand {
11
12
  constructor() {
@@ -16,6 +17,7 @@ class UpdateCommand {
16
17
  }
17
18
 
18
19
  async update(options = {}) {
20
+ printBanner();
19
21
  console.log(chalk.magenta('🔄 Updating ContextKit...'));
20
22
 
21
23
  // Check if ContextKit is installed
@@ -289,6 +291,10 @@ class UpdateCommand {
289
291
  `${this.repoUrl}/commands/squad-reset.md`,
290
292
  '.contextkit/commands/squad-reset.md'
291
293
  );
294
+ await this.downloadManager.downloadFile(
295
+ `${this.repoUrl}/commands/health-check.md`,
296
+ '.contextkit/commands/health-check.md'
297
+ );
292
298
 
293
299
  // Download hooks (pre-push and commit-msg only, no pre-commit)
294
300
  await this.downloadManager.downloadFile(
@@ -82,11 +82,16 @@ The following standards are auto-loaded into context via @imports:
82
82
  }
83
83
 
84
84
  async generateFiles() {
85
+ const { version } = require('../../package.json');
86
+
85
87
  // Bridge file: CLAUDE.md (auto-loaded every session)
86
88
  const bridgeContent = `# Project Standards (ContextKit)
87
89
 
88
90
  This project uses [ContextKit](https://github.com/nolrm/contextkit) for AI development standards.
89
91
 
92
+ ## ContextKit
93
+ Version: ${version}
94
+
90
95
  ${this.getStandardsBlock()}
91
96
 
92
97
  ## Corrections Log
@@ -0,0 +1,47 @@
1
+ const chalk = require('chalk');
2
+
3
+ // ── ASCII art ──────────────────────────────────────────────────────────────
4
+
5
+ const LINES = [
6
+ ' ______ __ __ __ __ _ __ ',
7
+ ' / ____/ ____ ____ / /_ ___ _ __ / /_ / //_/ (_) / /_ ',
8
+ ' / / / __ \\ / __ \\ / __/ / _ \\ | |/_/ / __/ / ,< / / / __/ ',
9
+ '/ /___ / /_/ / / / / / / /_ / __/ _> < / /_ / /| | / / / /_ ',
10
+ '\\____/ \\____/ /_/ /_/ \\__/ \\___/ /_/|_| \\__/ /_/ |_| /_/ \\__/ ',
11
+ ];
12
+
13
+ // ── Color helpers ──────────────────────────────────────────────────────────
14
+
15
+ /**
16
+ * Convert HSL (h: 0–360, s: 0–100, l: 0–100) to [r, g, b] (0–255).
17
+ * Standard algorithm — no dependencies.
18
+ */
19
+ function hslToRgb(h, s, l) {
20
+ s /= 100;
21
+ l /= 100;
22
+ const k = n => (n + h / 30) % 12;
23
+ const a = s * Math.min(l, 1 - l);
24
+ const f = n => l - a * Math.max(-1, Math.min(k(n) - 3, Math.min(9 - k(n), 1)));
25
+ return [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];
26
+ }
27
+
28
+ // ── Banner ─────────────────────────────────────────────────────────────────
29
+
30
+ function printBanner() {
31
+ const maxLen = Math.max(...LINES.map(l => l.length));
32
+
33
+ console.log('');
34
+ LINES.forEach(line => {
35
+ const colored = line.split('').map((char, i) => {
36
+ if (char === ' ') return ' ';
37
+ // Cycle hues 20–290°: warm red → yellow → green → cyan → blue
38
+ const hue = (i / maxLen) * 270 + 20;
39
+ const [r, g, b] = hslToRgb(hue, 100, 65);
40
+ return chalk.rgb(r, g, b)(char);
41
+ }).join('');
42
+ console.log(colored);
43
+ });
44
+ console.log('');
45
+ }
46
+
47
+ module.exports = { printBanner, hslToRgb };
@@ -0,0 +1,17 @@
1
+ const updateNotifier = require('update-notifier');
2
+ const pkg = require('../../package.json');
3
+
4
+ /**
5
+ * Check for available updates to @nolrm/contextkit on npm.
6
+ * Results are cached for 24 hours. Notification prints after the command
7
+ * completes. Suppressed automatically in CI environments.
8
+ */
9
+ function checkForUpdates() {
10
+ try {
11
+ updateNotifier({ pkg }).notify();
12
+ } catch (err) {
13
+ // Never crash the CLI due to a notifier failure
14
+ }
15
+ }
16
+
17
+ module.exports = { checkForUpdates };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nolrm/contextkit",
3
- "version": "0.12.15",
3
+ "version": "0.12.19",
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": {
@@ -69,7 +69,8 @@
69
69
  "fs-extra": "^11.1.1",
70
70
  "inquirer": "^8.2.6",
71
71
  "js-yaml": "^4.1.0",
72
- "ora": "^5.4.1"
72
+ "ora": "^5.4.1",
73
+ "update-notifier": "^5.1.0"
73
74
  },
74
75
  "files": [
75
76
  "bin/",