@nolrm/contextkit 0.12.12 → 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
|
|
|
@@ -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-
|
|
157
|
-
| `/squad-
|
|
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"
|
|
185
|
-
|
|
186
|
-
/squad-
|
|
187
|
-
|
|
188
|
-
/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
|
|
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-
|
|
202
|
+
/squad-auto
|
|
200
203
|
# Runs Architect → Dev → Test → Review for each task sequentially
|
|
201
204
|
```
|
|
202
205
|
|
|
203
|
-
**
|
|
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-
|
|
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
|
```
|
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,12 +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-
|
|
724
|
+
`${this.repoUrl}/commands/squad-auto.md`,
|
|
725
|
+
'.contextkit/commands/squad-auto.md'
|
|
723
726
|
);
|
|
724
727
|
await this.downloadManager.downloadFile(
|
|
725
|
-
`${this.repoUrl}/commands/squad-
|
|
726
|
-
'.contextkit/commands/squad-
|
|
728
|
+
`${this.repoUrl}/commands/squad-auto-parallel.md`,
|
|
729
|
+
'.contextkit/commands/squad-auto-parallel.md'
|
|
727
730
|
);
|
|
728
731
|
|
|
729
732
|
// Download hooks (pre-push and commit-msg only, no pre-commit)
|
|
@@ -972,8 +975,12 @@ esac
|
|
|
972
975
|
(await fs.pathExists('package.json') &&
|
|
973
976
|
(await fs.readJson('package.json').catch(() => ({}))).workspaces);
|
|
974
977
|
|
|
975
|
-
await fs.writeFile('.contextkit/config.yml',
|
|
978
|
+
await fs.writeFile('.contextkit/config.yml',
|
|
976
979
|
`# ContextKit Configuration
|
|
980
|
+
_source:
|
|
981
|
+
tool: "@nolrm/contextkit"
|
|
982
|
+
version: "${require('../../package.json').version}"
|
|
983
|
+
npm: "https://www.npmjs.com/package/@nolrm/contextkit"
|
|
977
984
|
ck: 1
|
|
978
985
|
version: "${config.version}"
|
|
979
986
|
updated: "${now.split('T')[0]}"
|
|
@@ -1043,6 +1050,20 @@ metadata:
|
|
|
1043
1050
|
);
|
|
1044
1051
|
}
|
|
1045
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
|
+
|
|
1046
1067
|
async createStatusFile(projectType, packageManager, hookChoices) {
|
|
1047
1068
|
try {
|
|
1048
1069
|
const status = this.statusManager.getDefaultStatus();
|
package/lib/commands/update.js
CHANGED
|
@@ -275,12 +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-
|
|
282
|
+
`${this.repoUrl}/commands/squad-auto-parallel.md`,
|
|
283
|
+
'.contextkit/commands/squad-auto-parallel.md'
|
|
284
284
|
);
|
|
285
285
|
|
|
286
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,8 +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-
|
|
25
|
+
'.claude/commands/squad-auto.md',
|
|
26
|
+
'.claude/commands/squad-auto-parallel.md',
|
|
27
27
|
'.claude/commands/spec.md',
|
|
28
28
|
'.claude/commands/ck.md',
|
|
29
29
|
];
|
|
@@ -203,51 +203,53 @@ 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.
|
|
240
|
+
Review the full handoff (spec, plan, implementation, tests) and write the final verdict. Use \`/squad-auto\` instead to run all steps automatically.
|
|
239
241
|
`);
|
|
240
242
|
|
|
241
|
-
await this.writeGeneratedFile('.claude/commands/squad-
|
|
243
|
+
await this.writeGeneratedFile('.claude/commands/squad-auto.md', `# Squad Auto — Full Pipeline (recommended)
|
|
242
244
|
|
|
243
|
-
Read \`.contextkit/commands/squad-
|
|
245
|
+
Read \`.contextkit/commands/squad-auto.md\` and execute the pipeline runner workflow.
|
|
244
246
|
|
|
245
|
-
|
|
247
|
+
Run after \`/squad\` kickoff. Automatically runs architect → dev → test → review for all tasks sequentially, hands-free.
|
|
246
248
|
`);
|
|
247
249
|
|
|
248
|
-
await this.writeGeneratedFile('.claude/commands/squad-
|
|
250
|
+
await this.writeGeneratedFile('.claude/commands/squad-auto-parallel.md', `# Squad Auto — Parallel Agents (batch, fastest)
|
|
249
251
|
|
|
250
|
-
Read \`.contextkit/commands/squad-
|
|
252
|
+
Read \`.contextkit/commands/squad-auto-parallel.md\` and execute the parallel pipeline workflow.
|
|
251
253
|
|
|
252
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.
|
|
253
255
|
`);
|
|
@@ -280,8 +282,8 @@ Check project setup, standards status, and integrations. Report what needs atten
|
|
|
280
282
|
console.log(chalk.dim(' /squad-dev — Implement the code'));
|
|
281
283
|
console.log(chalk.dim(' /squad-test — Write and run tests'));
|
|
282
284
|
console.log(chalk.dim(' /squad-review — Review and write verdict'));
|
|
283
|
-
console.log(chalk.dim(' /squad-
|
|
284
|
-
console.log(chalk.dim(' /squad-
|
|
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)'));
|
|
285
287
|
console.log(chalk.dim(''));
|
|
286
288
|
console.log(chalk.dim(' Health check:'));
|
|
287
289
|
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-
|
|
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-
|
|
240
|
+
await this.writeGeneratedFile('.cursor/prompts/squad-auto.md', `# Squad Auto — Full Pipeline (recommended)
|
|
241
241
|
|
|
242
|
-
Read \`.contextkit/commands/squad-
|
|
242
|
+
Read \`.contextkit/commands/squad-auto.md\` and execute the pipeline runner workflow.
|
|
243
243
|
|
|
244
|
-
|
|
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-
|
|
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.
|
|
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",
|