@nolrm/contextkit 0.12.11 → 0.12.14
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
|
|
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
|
|
|
@@ -148,14 +148,13 @@ ContextKit installs reusable slash commands for supported platforms:
|
|
|
148
148
|
| `/test` | Generate comprehensive tests |
|
|
149
149
|
| `/doc` | Add documentation |
|
|
150
150
|
| `/spec` | Write a component spec (MD-first) before any code is created |
|
|
151
|
-
| `/squad` | Kick off a squad task —
|
|
151
|
+
| `/squad` | Kick off a squad task — one task or many (auto-detects batch mode) |
|
|
152
152
|
| `/squad-architect` | Design the technical plan from the PO spec |
|
|
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-
|
|
157
|
-
| `/squad-
|
|
158
|
-
| `/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) |
|
|
159
158
|
| `/ck` | Health check — verify setup, standards, and integrations |
|
|
160
159
|
|
|
161
160
|
**Claude Code** — available as `/analyze`, `/review`, etc. in `.claude/commands/`
|
|
@@ -182,31 +181,34 @@ The squad workflow turns a single AI session into a structured multi-role pipeli
|
|
|
182
181
|
### Single-Task Flow
|
|
183
182
|
|
|
184
183
|
```bash
|
|
185
|
-
/squad "add dark mode support"
|
|
186
|
-
|
|
187
|
-
/squad-
|
|
188
|
-
|
|
189
|
-
/squad-
|
|
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
|
|
190
192
|
```
|
|
191
193
|
|
|
192
194
|
### Batch Flow
|
|
193
195
|
|
|
194
|
-
|
|
196
|
+
Pass multiple tasks to `/squad` and it automatically runs in batch mode:
|
|
195
197
|
|
|
196
198
|
```bash
|
|
197
|
-
/squad
|
|
199
|
+
/squad "add dark mode" "fix login bug" "refactor checkout"
|
|
198
200
|
# PO writes specs for all three tasks
|
|
199
201
|
|
|
200
|
-
/squad-
|
|
202
|
+
/squad-auto
|
|
201
203
|
# Runs Architect → Dev → Test → Review for each task sequentially
|
|
202
204
|
```
|
|
203
205
|
|
|
204
|
-
**
|
|
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.
|
|
205
207
|
|
|
206
208
|
```bash
|
|
207
|
-
/squad
|
|
209
|
+
/squad "add dark mode" "fix login bug" "refactor checkout"
|
|
208
210
|
|
|
209
|
-
/squad-
|
|
211
|
+
/squad-auto-parallel
|
|
210
212
|
# Phase 1: architect agents for all 3 tasks run in parallel
|
|
211
213
|
# Phase 2: dev→test→review pipeline runs in parallel per task
|
|
212
214
|
```
|
package/lib/commands/install.js
CHANGED
|
@@ -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,16 +721,12 @@ 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-
|
|
722
|
-
'.contextkit/commands/squad-
|
|
723
|
-
);
|
|
724
|
-
await this.downloadManager.downloadFile(
|
|
725
|
-
`${this.repoUrl}/commands/squad-run.md`,
|
|
726
|
-
'.contextkit/commands/squad-run.md'
|
|
724
|
+
`${this.repoUrl}/commands/squad-auto.md`,
|
|
725
|
+
'.contextkit/commands/squad-auto.md'
|
|
727
726
|
);
|
|
728
727
|
await this.downloadManager.downloadFile(
|
|
729
|
-
`${this.repoUrl}/commands/squad-
|
|
730
|
-
'.contextkit/commands/squad-
|
|
728
|
+
`${this.repoUrl}/commands/squad-auto-parallel.md`,
|
|
729
|
+
'.contextkit/commands/squad-auto-parallel.md'
|
|
731
730
|
);
|
|
732
731
|
|
|
733
732
|
// Download hooks (pre-push and commit-msg only, no pre-commit)
|
|
@@ -976,8 +975,12 @@ esac
|
|
|
976
975
|
(await fs.pathExists('package.json') &&
|
|
977
976
|
(await fs.readJson('package.json').catch(() => ({}))).workspaces);
|
|
978
977
|
|
|
979
|
-
await fs.writeFile('.contextkit/config.yml',
|
|
978
|
+
await fs.writeFile('.contextkit/config.yml',
|
|
980
979
|
`# ContextKit Configuration
|
|
980
|
+
_source:
|
|
981
|
+
tool: "@nolrm/contextkit"
|
|
982
|
+
version: "${require('../../package.json').version}"
|
|
983
|
+
npm: "https://www.npmjs.com/package/@nolrm/contextkit"
|
|
981
984
|
ck: 1
|
|
982
985
|
version: "${config.version}"
|
|
983
986
|
updated: "${now.split('T')[0]}"
|
|
@@ -1047,6 +1050,20 @@ metadata:
|
|
|
1047
1050
|
);
|
|
1048
1051
|
}
|
|
1049
1052
|
|
|
1053
|
+
async createReadme() {
|
|
1054
|
+
const content = `# .contextkit
|
|
1055
|
+
|
|
1056
|
+
This directory is managed by ContextKit — a CLI tool that provides AI assistants with structured project standards.
|
|
1057
|
+
|
|
1058
|
+
\`\`\`
|
|
1059
|
+
npm install -g @nolrm/contextkit
|
|
1060
|
+
\`\`\`
|
|
1061
|
+
|
|
1062
|
+
https://www.npmjs.com/package/@nolrm/contextkit
|
|
1063
|
+
`;
|
|
1064
|
+
await fs.writeFile('.contextkit/README.md', content);
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1050
1067
|
async createStatusFile(projectType, packageManager, hookChoices) {
|
|
1051
1068
|
try {
|
|
1052
1069
|
const status = this.statusManager.getDefaultStatus();
|
package/lib/commands/update.js
CHANGED
|
@@ -275,16 +275,12 @@ class UpdateCommand {
|
|
|
275
275
|
'.contextkit/commands/squad-review.md'
|
|
276
276
|
);
|
|
277
277
|
await this.downloadManager.downloadFile(
|
|
278
|
-
`${this.repoUrl}/commands/squad-
|
|
279
|
-
'.contextkit/commands/squad-
|
|
278
|
+
`${this.repoUrl}/commands/squad-auto.md`,
|
|
279
|
+
'.contextkit/commands/squad-auto.md'
|
|
280
280
|
);
|
|
281
281
|
await this.downloadManager.downloadFile(
|
|
282
|
-
`${this.repoUrl}/commands/squad-
|
|
283
|
-
'.contextkit/commands/squad-
|
|
284
|
-
);
|
|
285
|
-
await this.downloadManager.downloadFile(
|
|
286
|
-
`${this.repoUrl}/commands/squad-run-agents.md`,
|
|
287
|
-
'.contextkit/commands/squad-run-agents.md'
|
|
282
|
+
`${this.repoUrl}/commands/squad-auto-parallel.md`,
|
|
283
|
+
'.contextkit/commands/squad-auto-parallel.md'
|
|
288
284
|
);
|
|
289
285
|
|
|
290
286
|
// Download hooks (pre-push and commit-msg only, no pre-commit)
|
|
@@ -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 ?
|
|
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,9 +22,8 @@ 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-
|
|
26
|
-
'.claude/commands/squad-
|
|
27
|
-
'.claude/commands/squad-run-agents.md',
|
|
25
|
+
'.claude/commands/squad-auto.md',
|
|
26
|
+
'.claude/commands/squad-auto-parallel.md',
|
|
28
27
|
'.claude/commands/spec.md',
|
|
29
28
|
'.claude/commands/ck.md',
|
|
30
29
|
];
|
|
@@ -44,6 +43,7 @@ class ClaudeIntegration extends BaseIntegration {
|
|
|
44
43
|
'.claude/rules/vibe-kit-standards.md',
|
|
45
44
|
'.claude/rules/vibe-kit-testing.md',
|
|
46
45
|
'.claude/rules/vibe-kit-code-style.md',
|
|
46
|
+
'.claude/commands/squad-batch.md',
|
|
47
47
|
];
|
|
48
48
|
for (const file of legacyFiles) {
|
|
49
49
|
if (await fs.pathExists(file)) {
|
|
@@ -203,60 +203,55 @@ Write a component spec (MD-first) before any code is created. Scaffold the spec
|
|
|
203
203
|
`);
|
|
204
204
|
|
|
205
205
|
// Squad slash commands
|
|
206
|
-
await this.writeGeneratedFile('.claude/commands/squad.md', `# Squad — Kickoff
|
|
206
|
+
await this.writeGeneratedFile('.claude/commands/squad.md', `# Squad — Kickoff (start here)
|
|
207
207
|
|
|
208
208
|
Read \`.contextkit/commands/squad.md\` and execute the squad kickoff workflow.
|
|
209
209
|
|
|
210
210
|
Create the handoff file and write the PO spec for the given task. Pass the user's task description as the input.
|
|
211
|
+
|
|
212
|
+
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
213
|
`);
|
|
212
214
|
|
|
213
|
-
await this.writeGeneratedFile('.claude/commands/squad-architect.md', `# Squad — Architect
|
|
215
|
+
await this.writeGeneratedFile('.claude/commands/squad-architect.md', `# Squad — Architect (manual step 1/4)
|
|
214
216
|
|
|
215
217
|
Read \`.contextkit/commands/squad-architect.md\` and execute the architect workflow.
|
|
216
218
|
|
|
217
|
-
Read the PO spec from the handoff file, design the technical approach, and write the implementation plan.
|
|
219
|
+
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
220
|
`);
|
|
219
221
|
|
|
220
|
-
await this.writeGeneratedFile('.claude/commands/squad-dev.md', `# Squad — Dev
|
|
222
|
+
await this.writeGeneratedFile('.claude/commands/squad-dev.md', `# Squad — Dev (manual step 2/4)
|
|
221
223
|
|
|
222
224
|
Read \`.contextkit/commands/squad-dev.md\` and execute the dev workflow.
|
|
223
225
|
|
|
224
|
-
Follow the architect's plan to implement the code changes.
|
|
226
|
+
Follow the architect's plan to implement the code changes. Use \`/squad-auto\` instead to run all steps automatically.
|
|
225
227
|
`);
|
|
226
228
|
|
|
227
|
-
await this.writeGeneratedFile('.claude/commands/squad-test.md', `# Squad — Test
|
|
229
|
+
await this.writeGeneratedFile('.claude/commands/squad-test.md', `# Squad — Test (manual step 3/4)
|
|
228
230
|
|
|
229
231
|
Read \`.contextkit/commands/squad-test.md\` and execute the test workflow.
|
|
230
232
|
|
|
231
|
-
Write and run tests against the PO's acceptance criteria.
|
|
233
|
+
Write and run tests against the PO's acceptance criteria. Use \`/squad-auto\` instead to run all steps automatically.
|
|
232
234
|
`);
|
|
233
235
|
|
|
234
|
-
await this.writeGeneratedFile('.claude/commands/squad-review.md', `# Squad — Review
|
|
236
|
+
await this.writeGeneratedFile('.claude/commands/squad-review.md', `# Squad — Review (manual step 4/4)
|
|
235
237
|
|
|
236
238
|
Read \`.contextkit/commands/squad-review.md\` and execute the review workflow.
|
|
237
239
|
|
|
238
|
-
Review the full handoff (spec, plan, implementation, tests) and write the final verdict.
|
|
239
|
-
`);
|
|
240
|
-
|
|
241
|
-
await this.writeGeneratedFile('.claude/commands/squad-batch.md', `# Squad Batch — Multi-Task Kickoff
|
|
242
|
-
|
|
243
|
-
Read \`.contextkit/commands/squad-batch.md\` and execute the batch kickoff workflow.
|
|
244
|
-
|
|
245
|
-
Create handoff files for multiple tasks and write PO specs for each one. Pass all task descriptions as the input.
|
|
240
|
+
Review the full handoff (spec, plan, implementation, tests) and write the final verdict. Use \`/squad-auto\` instead to run all steps automatically.
|
|
246
241
|
`);
|
|
247
242
|
|
|
248
|
-
await this.writeGeneratedFile('.claude/commands/squad-
|
|
243
|
+
await this.writeGeneratedFile('.claude/commands/squad-auto.md', `# Squad Auto — Full Pipeline (recommended)
|
|
249
244
|
|
|
250
|
-
Read \`.contextkit/commands/squad-
|
|
245
|
+
Read \`.contextkit/commands/squad-auto.md\` and execute the pipeline runner workflow.
|
|
251
246
|
|
|
252
|
-
|
|
247
|
+
Run after \`/squad\` kickoff. Automatically runs architect → dev → test → review for all tasks sequentially, hands-free.
|
|
253
248
|
`);
|
|
254
249
|
|
|
255
|
-
await this.writeGeneratedFile('.claude/commands/squad-
|
|
250
|
+
await this.writeGeneratedFile('.claude/commands/squad-auto-parallel.md', `# Squad Auto — Parallel Agents (batch, fastest)
|
|
256
251
|
|
|
257
|
-
Read \`.contextkit/commands/squad-
|
|
252
|
+
Read \`.contextkit/commands/squad-auto-parallel.md\` and execute the parallel pipeline workflow.
|
|
258
253
|
|
|
259
|
-
Spawn one subagent per task per phase using the Task tool, so all tasks progress simultaneously instead of sequentially. Use this after \`/squad
|
|
254
|
+
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.
|
|
260
255
|
`);
|
|
261
256
|
|
|
262
257
|
await this.writeGeneratedFile('.claude/commands/ck.md', `# ContextKit Health Check
|
|
@@ -287,9 +282,8 @@ Check project setup, standards status, and integrations. Report what needs atten
|
|
|
287
282
|
console.log(chalk.dim(' /squad-dev — Implement the code'));
|
|
288
283
|
console.log(chalk.dim(' /squad-test — Write and run tests'));
|
|
289
284
|
console.log(chalk.dim(' /squad-review — Review and write verdict'));
|
|
290
|
-
console.log(chalk.dim(' /squad-
|
|
291
|
-
console.log(chalk.dim(' /squad-
|
|
292
|
-
console.log(chalk.dim(' /squad-run-agents — Auto-run pipeline in parallel (agent mode)'));
|
|
285
|
+
console.log(chalk.dim(' /squad-auto — Auto-run full pipeline (recommended)'));
|
|
286
|
+
console.log(chalk.dim(' /squad-auto-parallel — Auto-run pipeline in parallel (batch, fastest)'));
|
|
293
287
|
console.log(chalk.dim(''));
|
|
294
288
|
console.log(chalk.dim(' Health check:'));
|
|
295
289
|
console.log(chalk.dim(' /ck — Check project setup and standards status'));
|
|
@@ -23,8 +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-
|
|
27
|
-
'.cursor/prompts/squad-run.md',
|
|
26
|
+
'.cursor/prompts/squad-auto.md',
|
|
28
27
|
'.cursor/prompts/ck.md',
|
|
29
28
|
];
|
|
30
29
|
this.bridgeFiles = [];
|
|
@@ -238,18 +237,11 @@ Read \`.contextkit/commands/squad-review.md\` and execute the review workflow.
|
|
|
238
237
|
Review the full handoff (spec, plan, implementation, tests) and write the final verdict.
|
|
239
238
|
`);
|
|
240
239
|
|
|
241
|
-
await this.writeGeneratedFile('.cursor/prompts/squad-
|
|
240
|
+
await this.writeGeneratedFile('.cursor/prompts/squad-auto.md', `# Squad Auto — Full Pipeline (recommended)
|
|
242
241
|
|
|
243
|
-
Read \`.contextkit/commands/squad-
|
|
242
|
+
Read \`.contextkit/commands/squad-auto.md\` and execute the pipeline runner workflow.
|
|
244
243
|
|
|
245
|
-
|
|
246
|
-
`);
|
|
247
|
-
|
|
248
|
-
await this.writeGeneratedFile('.cursor/prompts/squad-run.md', `# Squad Run — Auto-Run Pipeline
|
|
249
|
-
|
|
250
|
-
Read \`.contextkit/commands/squad-run.md\` and execute the pipeline runner workflow.
|
|
251
|
-
|
|
252
|
-
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.
|
|
253
245
|
`);
|
|
254
246
|
|
|
255
247
|
await this.writeGeneratedFile('.cursor/prompts/spec.md', `# Spec
|
|
@@ -287,8 +279,7 @@ Check project setup, standards status, and integrations. Report what needs atten
|
|
|
287
279
|
console.log(chalk.dim(' /squad-dev — Implement the code'));
|
|
288
280
|
console.log(chalk.dim(' /squad-test — Write and run tests'));
|
|
289
281
|
console.log(chalk.dim(' /squad-review — Review and write verdict'));
|
|
290
|
-
console.log(chalk.dim(' /squad-
|
|
291
|
-
console.log(chalk.dim(' /squad-run — Auto-run pipeline for batch tasks'));
|
|
282
|
+
console.log(chalk.dim(' /squad-auto — Auto-run full pipeline (recommended)'));
|
|
292
283
|
console.log(chalk.dim(''));
|
|
293
284
|
console.log(chalk.dim(' Health check:'));
|
|
294
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.
|
|
3
|
+
"version": "0.12.14",
|
|
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",
|