@nolrm/contextkit 1.0.3 → 1.1.1
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 +29 -24
- package/lib/commands/install.js +4 -16
- package/lib/commands/update.js +2 -14
- package/lib/integrations/claude-integration.js +21 -1
- package/lib/integrations/codex-integration.js +387 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -72,7 +72,7 @@ contextkit install claude # or: contextkit install (interactive picker)
|
|
|
72
72
|
ck claude # creates CLAUDE.md + .claude/rules/ — skips if already up to date
|
|
73
73
|
ck cursor # creates .cursor/rules/ (scoped .mdc files) — skips if already up to date
|
|
74
74
|
ck copilot # creates .github/copilot-instructions.md
|
|
75
|
-
ck codex # creates AGENTS.md
|
|
75
|
+
ck codex # creates AGENTS.md + .codex/skills/ (24 skills)
|
|
76
76
|
ck opencode # creates AGENTS.md
|
|
77
77
|
ck gemini # creates GEMINI.md + .gemini/settings.json
|
|
78
78
|
ck aider # creates CONVENTIONS.md + .aider/rules.md
|
|
@@ -134,10 +134,11 @@ claude "create checkout flow for customer"
|
|
|
134
134
|
@.contextkit Create checkout flow for customer
|
|
135
135
|
```
|
|
136
136
|
|
|
137
|
-
**Codex CLI** — reads `AGENTS.md` automatically
|
|
137
|
+
**Codex CLI** — reads `AGENTS.md` automatically + skills in `.codex/skills/`
|
|
138
138
|
|
|
139
139
|
```bash
|
|
140
140
|
codex "create checkout flow for customer"
|
|
141
|
+
# Skills available: $spec, $squad, $squad-auto, $squad-spec, $analyze, $ck, and more
|
|
141
142
|
```
|
|
142
143
|
|
|
143
144
|
**OpenCode** — reads `AGENTS.md` automatically
|
|
@@ -162,7 +163,7 @@ ContextKit installs reusable slash commands for supported platforms:
|
|
|
162
163
|
| `/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. |
|
|
163
164
|
| `/doc-feature` | Generate feature-level docs (`docs/features/<name>.md`) — stack-aware (Level 2) |
|
|
164
165
|
| `/doc-component` | Generate component-level docs colocated with the target file — stack-aware (Level 3) |
|
|
165
|
-
| `/spec` | Turn a product overview into
|
|
166
|
+
| `/spec` | Turn a product overview into a reference spec — data model, API contracts, UX flows, and squad-ready stories. Single CTO pass per scope. |
|
|
166
167
|
| `/spec-component` | Write a component spec (MD-first) before any code is created |
|
|
167
168
|
| `/squad` | Kick off a squad task — one task or many (auto-detects batch mode). Pushes back with clarifying questions if the task is vague. |
|
|
168
169
|
| `/squad-architect` | Design the technical plan from the PO spec |
|
|
@@ -170,6 +171,7 @@ ContextKit installs reusable slash commands for supported platforms:
|
|
|
170
171
|
| `/squad-test` | Classify test levels, write and run tests against acceptance criteria |
|
|
171
172
|
| `/squad-review` | Review the full pipeline and give a verdict |
|
|
172
173
|
| `/squad-doc` | Create companion `.md` files for new/modified code after review passes |
|
|
174
|
+
| `/squad-spec [scope]` | Load a spec scope and run the full pipeline for every story. Use with `/loop /clear /squad-spec [scope]` for context-safe continuous execution. |
|
|
173
175
|
| `/squad-go` | Extract tasks from the current conversation and run the full pipeline immediately — no second command needed |
|
|
174
176
|
| `/squad-auto` | Auto-run the full pipeline after `/squad` kickoff (sequential) |
|
|
175
177
|
| `/squad-auto-parallel` | Auto-run the pipeline in parallel using Claude Code agents (Claude Code only) |
|
|
@@ -277,46 +279,36 @@ If you have a screenshot, mockup, or design image relevant to the task, paste or
|
|
|
277
279
|
|
|
278
280
|
## Spec Pipeline
|
|
279
281
|
|
|
280
|
-
The spec pipeline turns a high-level product overview into
|
|
282
|
+
The spec pipeline turns a high-level product overview into a full reference spec — data model, API contracts, UX flows, and squad-ready stories. It runs before the squad, one scope at a time.
|
|
281
283
|
|
|
282
284
|
```bash
|
|
283
285
|
/spec # Start or continue — picks up the next unchecked scope automatically
|
|
284
286
|
/spec 02-jobs # Run a specific scope by name
|
|
285
287
|
/spec --redo 01-identity-auth # Re-run a completed scope from scratch
|
|
288
|
+
/spec --reset # Delete the entire spec/ folder and start over
|
|
286
289
|
```
|
|
287
290
|
|
|
288
291
|
### How It Works
|
|
289
292
|
|
|
290
|
-
`/spec`
|
|
293
|
+
Each `/spec` run is a single inline CTO pass — no sub-agents, no revision rounds. The CTO reads the overview and any prior scope specs (for consistency), then writes the full `SPEC.md` for that scope.
|
|
291
294
|
|
|
292
|
-
|
|
293
|
-
|-------|----------|-------------|
|
|
294
|
-
| 0 — Brief | CTO | Reads the overview, defines scope boundaries, writes a brief all agents share |
|
|
295
|
-
| 1 — Domain experts | UX, Data, Systems, Planner (parallel) | Each produces their section independently from the brief |
|
|
296
|
-
| 2 — Challenges | CTO | Reads all four sections, writes challenges — gaps, contradictions, missing decisions |
|
|
297
|
-
| 3 — Revisions | UX, Data, Systems, Planner (parallel) | Each addresses the CTO's challenges, flags unresolvable items as OPEN DECISIONs |
|
|
298
|
-
| Final — Author | CTO | Resolves open decisions, writes the unified `SPEC.md` |
|
|
295
|
+
Each `SPEC.md` contains: data model (full schema + ERD), API contracts (all endpoints with request/response), UX flows (key journeys and edge cases), a story table with sizes and dependencies, and copy-paste `/squad` commands for every story.
|
|
299
296
|
|
|
300
297
|
### Output Structure
|
|
301
298
|
|
|
302
|
-
Each scope produces
|
|
299
|
+
Each scope produces one `SPEC.md`. Progress and index files track the full project:
|
|
303
300
|
|
|
304
301
|
```
|
|
305
302
|
spec/
|
|
306
303
|
PROGRESS.md ← scope checklist, updated after each run
|
|
307
|
-
INDEX.md ←
|
|
304
|
+
INDEX.md ← links to every completed SPEC.md
|
|
308
305
|
|
|
309
306
|
01-identity-auth/
|
|
310
|
-
|
|
311
|
-
01-ux.md ← UX flows and screens
|
|
312
|
-
02-data.md ← DB schema and relationships
|
|
313
|
-
03-systems.md ← API contracts and services
|
|
314
|
-
04-plan.md ← build phases and stories
|
|
315
|
-
05-challenges.md ← CTO's Round 2 challenges
|
|
316
|
-
SPEC.md ← final unified spec for this scope
|
|
317
|
-
```
|
|
307
|
+
SPEC.md ← full spec for this scope
|
|
318
308
|
|
|
319
|
-
|
|
309
|
+
02-jobs-scheduling/
|
|
310
|
+
SPEC.md
|
|
311
|
+
```
|
|
320
312
|
|
|
321
313
|
### First Run
|
|
322
314
|
|
|
@@ -324,6 +316,19 @@ On the first run, the CTO reads the entire overview and identifies all logical s
|
|
|
324
316
|
|
|
325
317
|
If no standard overview file is found, `/spec` lists all `.md` files in the directory and asks you to pick.
|
|
326
318
|
|
|
319
|
+
### From Spec to Squad
|
|
320
|
+
|
|
321
|
+
Each `SPEC.md` ends with a `### Squad Commands` section — copy-paste `/squad` commands for every story. Run them one at a time, or use `/squad-spec` to implement an entire scope automatically:
|
|
322
|
+
|
|
323
|
+
```bash
|
|
324
|
+
# Option 1 — one story at a time
|
|
325
|
+
/squad "S1 — Workspace schema: create workspaces table with RLS policies"
|
|
326
|
+
/squad-auto
|
|
327
|
+
|
|
328
|
+
# Option 2 — entire scope, context-safe
|
|
329
|
+
/loop /clear /squad-spec 01-identity-auth
|
|
330
|
+
```
|
|
331
|
+
|
|
327
332
|
---
|
|
328
333
|
|
|
329
334
|
## Hooks & Quality Gates
|
|
@@ -446,7 +451,7 @@ ck install --force # regenerate all files, including user-customized standard
|
|
|
446
451
|
ck claude # add or refresh Claude integration — skips if already up to date
|
|
447
452
|
ck cursor # add or refresh Cursor integration — skips if already up to date
|
|
448
453
|
ck copilot # add GitHub Copilot integration
|
|
449
|
-
ck codex # add Codex CLI integration (AGENTS.md)
|
|
454
|
+
ck codex # add Codex CLI integration (AGENTS.md + .codex/skills/)
|
|
450
455
|
ck opencode # add OpenCode integration (AGENTS.md)
|
|
451
456
|
ck gemini # add Gemini CLI integration (GEMINI.md)
|
|
452
457
|
ck aider # add Aider integration (CONVENTIONS.md)
|
package/lib/commands/install.js
CHANGED
|
@@ -985,6 +985,10 @@ Any design decisions, trade-offs, or open questions to resolve before coding.
|
|
|
985
985
|
`${this.repoUrl}/commands/squad/squad-go.md`,
|
|
986
986
|
'.contextkit/commands/squad/squad-go.md'
|
|
987
987
|
);
|
|
988
|
+
await this.downloadManager.downloadFile(
|
|
989
|
+
`${this.repoUrl}/commands/squad/squad-spec.md`,
|
|
990
|
+
'.contextkit/commands/squad/squad-spec.md'
|
|
991
|
+
);
|
|
988
992
|
await this.downloadManager.downloadFile(
|
|
989
993
|
`${this.repoUrl}/commands/dev/health-check.md`,
|
|
990
994
|
'.contextkit/commands/dev/health-check.md'
|
|
@@ -995,22 +999,6 @@ Any design decisions, trade-offs, or open questions to resolve before coding.
|
|
|
995
999
|
`${this.repoUrl}/commands/spec/spec.md`,
|
|
996
1000
|
'.contextkit/commands/spec/spec.md'
|
|
997
1001
|
);
|
|
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
1002
|
|
|
1015
1003
|
// Download doc family commands
|
|
1016
1004
|
await this.downloadManager.downloadFile(
|
package/lib/commands/update.js
CHANGED
|
@@ -348,20 +348,8 @@ class UpdateCommand {
|
|
|
348
348
|
'.contextkit/commands/spec/spec.md'
|
|
349
349
|
);
|
|
350
350
|
await this.downloadManager.downloadFile(
|
|
351
|
-
`${this.repoUrl}/commands/
|
|
352
|
-
'.contextkit/commands/
|
|
353
|
-
);
|
|
354
|
-
await this.downloadManager.downloadFile(
|
|
355
|
-
`${this.repoUrl}/commands/spec/spec-data.md`,
|
|
356
|
-
'.contextkit/commands/spec/spec-data.md'
|
|
357
|
-
);
|
|
358
|
-
await this.downloadManager.downloadFile(
|
|
359
|
-
`${this.repoUrl}/commands/spec/spec-systems.md`,
|
|
360
|
-
'.contextkit/commands/spec/spec-systems.md'
|
|
361
|
-
);
|
|
362
|
-
await this.downloadManager.downloadFile(
|
|
363
|
-
`${this.repoUrl}/commands/spec/spec-planner.md`,
|
|
364
|
-
'.contextkit/commands/spec/spec-planner.md'
|
|
351
|
+
`${this.repoUrl}/commands/squad/squad-spec.md`,
|
|
352
|
+
'.contextkit/commands/squad/squad-spec.md'
|
|
365
353
|
);
|
|
366
354
|
|
|
367
355
|
// Download doc family commands
|
|
@@ -26,6 +26,7 @@ class ClaudeIntegration extends BaseIntegration {
|
|
|
26
26
|
'.claude/skills/squad-reset/SKILL.md',
|
|
27
27
|
'.claude/skills/squad-doc/SKILL.md',
|
|
28
28
|
'.claude/skills/squad-go/SKILL.md',
|
|
29
|
+
'.claude/skills/squad-spec/SKILL.md',
|
|
29
30
|
'.claude/skills/spec/SKILL.md',
|
|
30
31
|
'.claude/skills/spec-component/SKILL.md',
|
|
31
32
|
'.claude/skills/ck/SKILL.md',
|
|
@@ -490,6 +491,24 @@ Use \`/squad\` instead when you want to review specs before execution starts.
|
|
|
490
491
|
`
|
|
491
492
|
);
|
|
492
493
|
|
|
494
|
+
await this.writeGeneratedFile(
|
|
495
|
+
'.claude/skills/squad-spec/SKILL.md',
|
|
496
|
+
`---
|
|
497
|
+
description: Implement every story in a spec scope — loops continuously with context cleared between stories. Run /spec first to generate the scope.
|
|
498
|
+
argument-hint: '[scope-slug]'
|
|
499
|
+
allowed-tools: Read, Edit, Write, Glob, Grep, Bash
|
|
500
|
+
effort: high
|
|
501
|
+
context: fork
|
|
502
|
+
---
|
|
503
|
+
|
|
504
|
+
Read \`.contextkit/commands/squad/squad-spec.md\` and execute it.
|
|
505
|
+
|
|
506
|
+
Processes one story per invocation. Run with \`/loop /clear /squad-spec [scope]\` to implement all stories continuously with a clean context between each one.
|
|
507
|
+
|
|
508
|
+
Run \`/spec\` first to generate the scope, then \`/squad-spec [scope-slug]\` to implement it.
|
|
509
|
+
`
|
|
510
|
+
);
|
|
511
|
+
|
|
493
512
|
// Doc family skills
|
|
494
513
|
await this.writeGeneratedFile(
|
|
495
514
|
'.claude/skills/doc-arch/SKILL.md',
|
|
@@ -610,7 +629,8 @@ Load and apply the project's ContextKit standards before taking action in an age
|
|
|
610
629
|
console.log(chalk.dim(' /squad-review — Review and write verdict'));
|
|
611
630
|
console.log(
|
|
612
631
|
chalk.dim(
|
|
613
|
-
' /squad-go — Extract tasks from conversation and run full pipeline'
|
|
632
|
+
' /squad-go — Extract tasks from conversation and run full pipeline',
|
|
633
|
+
' /squad-spec [scope] — Load a spec scope and run the full pipeline for every story'
|
|
614
634
|
)
|
|
615
635
|
);
|
|
616
636
|
console.log(chalk.dim(' /squad-auto — Auto-run full pipeline (recommended)'));
|
|
@@ -7,17 +7,57 @@ class CodexIntegration extends BaseIntegration {
|
|
|
7
7
|
this.name = 'codex';
|
|
8
8
|
this.displayName = 'OpenAI Codex CLI';
|
|
9
9
|
this.bridgeFiles = ['AGENTS.md'];
|
|
10
|
-
this.generatedFiles = [
|
|
11
|
-
|
|
10
|
+
this.generatedFiles = [
|
|
11
|
+
'.codex/skills/analyze/SKILL.md',
|
|
12
|
+
'.codex/skills/review/SKILL.md',
|
|
13
|
+
'.codex/skills/refactor/SKILL.md',
|
|
14
|
+
'.codex/skills/test/SKILL.md',
|
|
15
|
+
'.codex/skills/doc/SKILL.md',
|
|
16
|
+
'.codex/skills/spec/SKILL.md',
|
|
17
|
+
'.codex/skills/spec-component/SKILL.md',
|
|
18
|
+
'.codex/skills/ck/SKILL.md',
|
|
19
|
+
'.codex/skills/squad/SKILL.md',
|
|
20
|
+
'.codex/skills/squad-architect/SKILL.md',
|
|
21
|
+
'.codex/skills/squad-dev/SKILL.md',
|
|
22
|
+
'.codex/skills/squad-test/SKILL.md',
|
|
23
|
+
'.codex/skills/squad-review/SKILL.md',
|
|
24
|
+
'.codex/skills/squad-auto/SKILL.md',
|
|
25
|
+
'.codex/skills/squad-reset/SKILL.md',
|
|
26
|
+
'.codex/skills/squad-doc/SKILL.md',
|
|
27
|
+
'.codex/skills/squad-go/SKILL.md',
|
|
28
|
+
'.codex/skills/squad-spec/SKILL.md',
|
|
29
|
+
'.codex/skills/doc-arch/SKILL.md',
|
|
30
|
+
'.codex/skills/doc-feature/SKILL.md',
|
|
31
|
+
'.codex/skills/doc-component/SKILL.md',
|
|
32
|
+
'.codex/skills/agent-push-checklist/SKILL.md',
|
|
33
|
+
'.codex/skills/context-budget/SKILL.md',
|
|
34
|
+
'.codex/skills/standards-aware/SKILL.md',
|
|
35
|
+
];
|
|
36
|
+
this.platformDir = '.codex';
|
|
12
37
|
}
|
|
13
38
|
|
|
14
39
|
async generateFiles() {
|
|
15
|
-
// Bridge file: AGENTS.md (auto-loaded by Codex
|
|
40
|
+
// Bridge file: AGENTS.md (auto-loaded by Codex)
|
|
16
41
|
const bridgeContent = `# Project Standards (ContextKit)
|
|
17
42
|
|
|
18
43
|
This project uses [ContextKit](https://github.com/nolrm/contextkit) for AI development standards.
|
|
19
44
|
|
|
20
|
-
|
|
45
|
+
## Project Standards
|
|
46
|
+
|
|
47
|
+
Read these files before writing code:
|
|
48
|
+
|
|
49
|
+
- \`.contextkit/standards/code-style.md\` — Coding conventions and style rules
|
|
50
|
+
- \`.contextkit/standards/testing.md\` — Testing patterns and requirements
|
|
51
|
+
- \`.contextkit/standards/architecture.md\` — Architecture decisions and patterns
|
|
52
|
+
- \`.contextkit/standards/ai-guidelines.md\` — AI behavior and usage guidelines
|
|
53
|
+
- \`.contextkit/standards/workflows.md\` — Development workflows and processes
|
|
54
|
+
- \`.contextkit/standards/glossary.md\` — Project terminology and shortcuts
|
|
55
|
+
|
|
56
|
+
## Product Context
|
|
57
|
+
|
|
58
|
+
- \`.contextkit/product/mission-lite.md\` — Product mission (condensed)
|
|
59
|
+
- \`.contextkit/product/decisions.md\` — Architecture Decision Records
|
|
60
|
+
- \`.contextkit/product/roadmap.md\` — Development roadmap
|
|
21
61
|
|
|
22
62
|
## Corrections Log
|
|
23
63
|
|
|
@@ -25,20 +65,357 @@ ${this.getStandardsBlock()}
|
|
|
25
65
|
|
|
26
66
|
## Quick Reference
|
|
27
67
|
|
|
28
|
-
Before writing code,
|
|
68
|
+
Before writing code, always read the relevant standards files above. ContextKit skills are available in \`.codex/skills/\` — use them to run the spec and squad pipelines.`;
|
|
29
69
|
|
|
30
70
|
await this.writeBridgeFile('AGENTS.md', bridgeContent);
|
|
71
|
+
|
|
72
|
+
// Skills
|
|
73
|
+
await this.writeGeneratedFile(
|
|
74
|
+
'.codex/skills/analyze/SKILL.md',
|
|
75
|
+
`---
|
|
76
|
+
name: analyze
|
|
77
|
+
description: Analyze project and generate customized standards
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
Read \`.contextkit/commands/dev/analyze.md\` and execute the analysis workflow for this project.
|
|
81
|
+
|
|
82
|
+
Scan the codebase structure, detect frameworks and patterns, then generate customized standards files in \`.contextkit/standards/\`.
|
|
83
|
+
`
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
await this.writeGeneratedFile(
|
|
87
|
+
'.codex/skills/review/SKILL.md',
|
|
88
|
+
`---
|
|
89
|
+
name: review
|
|
90
|
+
description: Review current changes for correctness and standards compliance
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
Read \`.contextkit/commands/dev/review.md\` and execute the review workflow.
|
|
94
|
+
|
|
95
|
+
Review current changes for correctness, standards compliance, and potential issues.
|
|
96
|
+
`
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
await this.writeGeneratedFile(
|
|
100
|
+
'.codex/skills/refactor/SKILL.md',
|
|
101
|
+
`---
|
|
102
|
+
name: refactor
|
|
103
|
+
description: Improve code structure without changing behavior
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
Read \`.contextkit/commands/dev/refactor.md\` and execute the refactoring workflow.
|
|
107
|
+
|
|
108
|
+
Improve code structure without changing behavior, keeping tests green at every step.
|
|
109
|
+
`
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
await this.writeGeneratedFile(
|
|
113
|
+
'.codex/skills/test/SKILL.md',
|
|
114
|
+
`---
|
|
115
|
+
name: test
|
|
116
|
+
description: Generate or run tests covering happy paths, edge cases, and errors
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
Read \`.contextkit/commands/dev/run-tests.md\` and execute the testing workflow.
|
|
120
|
+
|
|
121
|
+
Generate or run tests for the specified code, covering happy paths, edge cases, and errors.
|
|
122
|
+
`
|
|
123
|
+
);
|
|
124
|
+
|
|
125
|
+
await this.writeGeneratedFile(
|
|
126
|
+
'.codex/skills/doc/SKILL.md',
|
|
127
|
+
`---
|
|
128
|
+
name: doc
|
|
129
|
+
description: Add inline docs, README sections, and usage examples
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
Read \`.contextkit/commands/docs/add-documentation.md\` and execute the documentation workflow.
|
|
133
|
+
|
|
134
|
+
Add inline docs, README sections, and usage examples for the specified code.
|
|
135
|
+
`
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
await this.writeGeneratedFile(
|
|
139
|
+
'.codex/skills/spec-component/SKILL.md',
|
|
140
|
+
`---
|
|
141
|
+
name: spec-component
|
|
142
|
+
description: Write a component spec (MD-first) before coding begins
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
Read \`.contextkit/commands/dev/spec-component.md\` and execute the component spec workflow.
|
|
146
|
+
|
|
147
|
+
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.
|
|
148
|
+
`
|
|
149
|
+
);
|
|
150
|
+
|
|
151
|
+
await this.writeGeneratedFile(
|
|
152
|
+
'.codex/skills/spec/SKILL.md',
|
|
153
|
+
`---
|
|
154
|
+
name: spec
|
|
155
|
+
description: Turn a product overview into a reference spec — data model, API contracts, UX flows, and squad-ready stories
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
Read \`.contextkit/commands/spec/spec.md\` and execute the spec pipeline workflow.
|
|
159
|
+
|
|
160
|
+
Single inline CTO pass per scope. Reads a product overview, identifies logical scopes, and writes a full SPEC.md per scope covering data model, API contracts, UX flows, stories, and copy-paste squad commands. Run once per scope — picks up where it left off automatically.
|
|
161
|
+
`
|
|
162
|
+
);
|
|
163
|
+
|
|
164
|
+
await this.writeGeneratedFile(
|
|
165
|
+
'.codex/skills/ck/SKILL.md',
|
|
166
|
+
`---
|
|
167
|
+
name: ck
|
|
168
|
+
description: Check project setup, standards status, and integrations
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
Read \`.contextkit/commands/dev/health-check.md\` and execute the health check workflow.
|
|
172
|
+
|
|
173
|
+
Check project setup, standards status, and integrations. Report what needs attention.
|
|
174
|
+
`
|
|
175
|
+
);
|
|
176
|
+
|
|
177
|
+
// Squad skills
|
|
178
|
+
await this.writeGeneratedFile(
|
|
179
|
+
'.codex/skills/squad/SKILL.md',
|
|
180
|
+
`---
|
|
181
|
+
name: squad
|
|
182
|
+
description: Squad pipeline kickoff — create handoff file and write PO spec
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
Read \`.contextkit/commands/squad/squad.md\` and execute the squad kickoff workflow.
|
|
186
|
+
|
|
187
|
+
Create the handoff file and write the PO spec for the given task. Pass the task description as input.
|
|
188
|
+
|
|
189
|
+
After kickoff, run \`$squad-auto\` to run the full pipeline hands-free, or step through manually with \`$squad-architect\` → \`$squad-dev\` → \`$squad-test\` → \`$squad-review\` → \`$squad-doc\`.
|
|
190
|
+
`
|
|
191
|
+
);
|
|
192
|
+
|
|
193
|
+
await this.writeGeneratedFile(
|
|
194
|
+
'.codex/skills/squad-architect/SKILL.md',
|
|
195
|
+
`---
|
|
196
|
+
name: squad-architect
|
|
197
|
+
description: Write technical implementation plan from PO spec (manual step 1/4)
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
Read \`.contextkit/commands/squad/squad-architect.md\` and execute the architect workflow.
|
|
201
|
+
|
|
202
|
+
Read the PO spec from the handoff file and design the technical approach. Use \`$squad-auto\` to run all steps automatically.
|
|
203
|
+
`
|
|
204
|
+
);
|
|
205
|
+
|
|
206
|
+
await this.writeGeneratedFile(
|
|
207
|
+
'.codex/skills/squad-dev/SKILL.md',
|
|
208
|
+
`---
|
|
209
|
+
name: squad-dev
|
|
210
|
+
description: Implement code changes following architect plan (manual step 2/4)
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
Read \`.contextkit/commands/squad/squad-dev.md\` and execute the dev workflow.
|
|
214
|
+
|
|
215
|
+
Follow the architect's plan to implement the code changes. Use \`$squad-auto\` to run all steps automatically.
|
|
216
|
+
`
|
|
217
|
+
);
|
|
218
|
+
|
|
219
|
+
await this.writeGeneratedFile(
|
|
220
|
+
'.codex/skills/squad-test/SKILL.md',
|
|
221
|
+
`---
|
|
222
|
+
name: squad-test
|
|
223
|
+
description: Write and run tests against acceptance criteria (manual step 3/4)
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
Read \`.contextkit/commands/squad/squad-test.md\` and execute the test workflow.
|
|
227
|
+
|
|
228
|
+
Write and run tests against the PO's acceptance criteria. Use \`$squad-auto\` to run all steps automatically.
|
|
229
|
+
`
|
|
230
|
+
);
|
|
231
|
+
|
|
232
|
+
await this.writeGeneratedFile(
|
|
233
|
+
'.codex/skills/squad-review/SKILL.md',
|
|
234
|
+
`---
|
|
235
|
+
name: squad-review
|
|
236
|
+
description: Review full handoff and write pass/needs-work verdict (manual step 4/4)
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
Read \`.contextkit/commands/squad/squad-review.md\` and execute the review workflow.
|
|
240
|
+
|
|
241
|
+
Review the full handoff (spec, plan, implementation, tests) and write the final verdict. Use \`$squad-auto\` to run all steps automatically.
|
|
242
|
+
`
|
|
243
|
+
);
|
|
244
|
+
|
|
245
|
+
await this.writeGeneratedFile(
|
|
246
|
+
'.codex/skills/squad-auto/SKILL.md',
|
|
247
|
+
`---
|
|
248
|
+
name: squad-auto
|
|
249
|
+
description: Auto-run full squad pipeline hands-free (architect → dev → test → review → doc)
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
Read \`.contextkit/commands/squad/squad-auto.md\` and execute the pipeline runner workflow.
|
|
253
|
+
|
|
254
|
+
Run after \`$squad\` kickoff. Automatically runs architect → dev → test → review → doc for all tasks sequentially, hands-free.
|
|
255
|
+
`
|
|
256
|
+
);
|
|
257
|
+
|
|
258
|
+
await this.writeGeneratedFile(
|
|
259
|
+
'.codex/skills/squad-reset/SKILL.md',
|
|
260
|
+
`---
|
|
261
|
+
name: squad-reset
|
|
262
|
+
description: Delete squad state to start fresh
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
Read \`.contextkit/commands/squad/squad-reset.md\` and execute the reset workflow.
|
|
266
|
+
|
|
267
|
+
Delete the current squad state (\`.contextkit/squad/\`) so you can start fresh.
|
|
268
|
+
`
|
|
269
|
+
);
|
|
270
|
+
|
|
271
|
+
await this.writeGeneratedFile(
|
|
272
|
+
'.codex/skills/squad-doc/SKILL.md',
|
|
273
|
+
`---
|
|
274
|
+
name: squad-doc
|
|
275
|
+
description: Document changes after review passes (manual step 5/5)
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
Read \`.contextkit/commands/squad/squad-doc.md\` and execute the doc workflow.
|
|
279
|
+
|
|
280
|
+
After review passes, create or update companion .md files for every new/modified code file in this task.
|
|
281
|
+
`
|
|
282
|
+
);
|
|
283
|
+
|
|
284
|
+
await this.writeGeneratedFile(
|
|
285
|
+
'.codex/skills/squad-go/SKILL.md',
|
|
286
|
+
`---
|
|
287
|
+
name: squad-go
|
|
288
|
+
description: Extract tasks from conversation and run the full pipeline immediately — no checkpoint pause
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
Read \`.contextkit/commands/squad/squad-go.md\` and execute the express pipeline workflow.
|
|
292
|
+
|
|
293
|
+
Reads tasks from the current conversation, writes PO specs, and immediately runs architect → dev → test → review → doc. No checkpoint pause — single invocation, hands-free.
|
|
294
|
+
`
|
|
295
|
+
);
|
|
296
|
+
|
|
297
|
+
await this.writeGeneratedFile(
|
|
298
|
+
'.codex/skills/squad-spec/SKILL.md',
|
|
299
|
+
`---
|
|
300
|
+
name: squad-spec
|
|
301
|
+
description: Implement every story in a spec scope — run /spec first to generate the scope
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
Read \`.contextkit/commands/squad/squad-spec.md\` and execute it.
|
|
305
|
+
|
|
306
|
+
Processes one story per invocation. Pass the scope slug (e.g. \`01-identity-auth\`). Run \`$spec\` first to generate the scope, then \`$squad-spec [scope-slug]\` to implement it story by story.
|
|
307
|
+
`
|
|
308
|
+
);
|
|
309
|
+
|
|
310
|
+
// Doc skills
|
|
311
|
+
await this.writeGeneratedFile(
|
|
312
|
+
'.codex/skills/doc-arch/SKILL.md',
|
|
313
|
+
`---
|
|
314
|
+
name: doc-arch
|
|
315
|
+
description: Generate or update architecture documentation (Level 1)
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
Read \`.contextkit/commands/docs/doc-arch.md\` and execute the architecture documentation workflow.
|
|
319
|
+
|
|
320
|
+
Detect the project stack, then generate or update \`docs/architecture.md\` with system boundaries, key flows, and stack-appropriate artifacts.
|
|
321
|
+
`
|
|
322
|
+
);
|
|
323
|
+
|
|
324
|
+
await this.writeGeneratedFile(
|
|
325
|
+
'.codex/skills/doc-feature/SKILL.md',
|
|
326
|
+
`---
|
|
327
|
+
name: doc-feature
|
|
328
|
+
description: Generate or update feature documentation (Level 2)
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
Read \`.contextkit/commands/docs/doc-feature.md\` and execute the feature documentation workflow.
|
|
332
|
+
|
|
333
|
+
Detect the project stack, identify the target feature, then generate or update \`docs/features/<name>.md\`.
|
|
334
|
+
`
|
|
335
|
+
);
|
|
336
|
+
|
|
337
|
+
await this.writeGeneratedFile(
|
|
338
|
+
'.codex/skills/doc-component/SKILL.md',
|
|
339
|
+
`---
|
|
340
|
+
name: doc-component
|
|
341
|
+
description: Generate or update component documentation (Level 3)
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
Read \`.contextkit/commands/docs/doc-component.md\` and execute the component documentation workflow.
|
|
345
|
+
|
|
346
|
+
Detect the project stack, read the target file, then create or update a colocated \`<name>.md\`.
|
|
347
|
+
`
|
|
348
|
+
);
|
|
349
|
+
|
|
350
|
+
// Agent skills
|
|
351
|
+
await this.writeGeneratedFile(
|
|
352
|
+
'.codex/skills/agent-push-checklist/SKILL.md',
|
|
353
|
+
`---
|
|
354
|
+
name: agent-push-checklist
|
|
355
|
+
description: Pre-push quality checklist for agents before git push
|
|
356
|
+
---
|
|
357
|
+
|
|
358
|
+
Read \`.contextkit/commands/agents/agent-push-checklist.md\` and execute the agent push checklist workflow.
|
|
359
|
+
|
|
360
|
+
Run before pushing from an AI agent. Validates that changes are safe, tests pass, and the push is ready.
|
|
361
|
+
`
|
|
362
|
+
);
|
|
363
|
+
|
|
364
|
+
await this.writeGeneratedFile(
|
|
365
|
+
'.codex/skills/context-budget/SKILL.md',
|
|
366
|
+
`---
|
|
367
|
+
name: context-budget
|
|
368
|
+
description: Check context consumption and advise on compact, summarise, or continue
|
|
369
|
+
---
|
|
370
|
+
|
|
371
|
+
Read \`.contextkit/commands/agents/context-budget.md\` and execute the context budget workflow.
|
|
372
|
+
|
|
373
|
+
Check how much context has been consumed and advise on whether to compact, summarise, or continue.
|
|
374
|
+
`
|
|
375
|
+
);
|
|
376
|
+
|
|
377
|
+
await this.writeGeneratedFile(
|
|
378
|
+
'.codex/skills/standards-aware/SKILL.md',
|
|
379
|
+
`---
|
|
380
|
+
name: standards-aware
|
|
381
|
+
description: Load and apply project standards before acting in an agentic context
|
|
382
|
+
---
|
|
383
|
+
|
|
384
|
+
Read \`.contextkit/commands/agents/standards-aware.md\` and execute the standards-aware workflow.
|
|
385
|
+
|
|
386
|
+
Load and apply the project's ContextKit standards before taking action in an agentic context.
|
|
387
|
+
`
|
|
388
|
+
);
|
|
31
389
|
}
|
|
32
390
|
|
|
33
391
|
showUsage() {
|
|
34
392
|
console.log('');
|
|
35
393
|
console.log(chalk.bold(' Codex CLI Usage:'));
|
|
36
|
-
console.log(' AGENTS.md is auto-loaded
|
|
37
|
-
console.log('
|
|
38
|
-
console.log(' Standards are automatically included via AGENTS.md');
|
|
394
|
+
console.log(' AGENTS.md is auto-loaded every session');
|
|
395
|
+
console.log(' Skills are installed in .codex/skills/');
|
|
39
396
|
console.log('');
|
|
40
|
-
console.log(chalk.dim('
|
|
41
|
-
console.log(chalk.dim('
|
|
397
|
+
console.log(chalk.dim(' Skills (use $skill-name in Codex):'));
|
|
398
|
+
console.log(chalk.dim(' $analyze — Analyze project and generate standards'));
|
|
399
|
+
console.log(chalk.dim(' $review — Review current changes'));
|
|
400
|
+
console.log(chalk.dim(' $refactor — Refactor code structure'));
|
|
401
|
+
console.log(chalk.dim(' $test — Generate or run tests'));
|
|
402
|
+
console.log(chalk.dim(' $doc — Add documentation'));
|
|
403
|
+
console.log(chalk.dim(' $doc-arch — Architecture docs (Level 1)'));
|
|
404
|
+
console.log(chalk.dim(' $doc-feature — Feature docs (Level 2)'));
|
|
405
|
+
console.log(chalk.dim(' $doc-component — Component docs (Level 3)'));
|
|
406
|
+
console.log(chalk.dim(''));
|
|
407
|
+
console.log(chalk.dim(' Squad pipeline:'));
|
|
408
|
+
console.log(chalk.dim(' $squad "task" — Kickoff: create handoff + PO spec'));
|
|
409
|
+
console.log(chalk.dim(' $squad-auto — Auto-run full pipeline (recommended)'));
|
|
410
|
+
console.log(chalk.dim(' $squad-go — Extract tasks from conversation and run'));
|
|
411
|
+
console.log(chalk.dim(' $squad-spec [scope] — Implement all stories in a spec scope'));
|
|
412
|
+
console.log(chalk.dim(' $squad-architect / $squad-dev / $squad-test / $squad-review'));
|
|
413
|
+
console.log(chalk.dim(''));
|
|
414
|
+
console.log(chalk.dim(' Spec pipeline:'));
|
|
415
|
+
console.log(chalk.dim(' $spec [scope] — Run spec pipeline for next or named scope'));
|
|
416
|
+
console.log(chalk.dim(''));
|
|
417
|
+
console.log(chalk.dim(' Health check:'));
|
|
418
|
+
console.log(chalk.dim(' $ck — Check project setup and standards status'));
|
|
42
419
|
}
|
|
43
420
|
}
|
|
44
421
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nolrm/contextkit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "ContextKit - Context Engineering + Agentic AI Pipelines. Scaffold structured standards for AI assistants and run autonomous multi-role pipelines (PO → Architect → Dev → Test → Review → Doc) grounded by that same context layer. Works with Cursor, Claude Code, Copilot, Codex, Gemini, Aider, and more.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"bin": {
|