zenkit 0.5.0 → 0.6.0

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
@@ -1,241 +1,144 @@
1
1
  # ZenKit
2
2
 
3
- **Disciplined workflows for coding agents.**
3
+ [![CI](https://github.com/carl0zen/zenkit/actions/workflows/ci.yml/badge.svg)](https://github.com/carl0zen/zenkit/actions/workflows/ci.yml)
4
+ [![npm](https://img.shields.io/npm/v/zenkit)](https://www.npmjs.com/package/zenkit)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
4
6
 
5
- ZenKit is a lightweight open-source protocol layer for AI-assisted software building. Commands, schemas, hooks, checkpoints, and handoffs — without framework bloat.
7
+ **Disciplined workflows for Claude Code.**
6
8
 
7
- ## Install
9
+ Add structured specs, plans, audits, checkpoints, and handoffs to any project. Native slash commands and skills. No daemon, no framework, no lock-in.
8
10
 
9
- ```bash
10
- npm install zenkit
11
- ```
12
-
13
- ### As a library
14
-
15
- ```typescript
16
- import { validate, getSchemaNames, createHandoff, loadFeatureSpec } from 'zenkit'
17
-
18
- // Validate data against any ZenKit schema
19
- const result = validate('handoff', myHandoffData)
20
- if (!result.valid) {
21
- console.error(result.errors) // [{ path: '/deliverable', message: '...', keyword: '...' }]
22
- }
23
-
24
- // Create a validated handoff
25
- const handoff = createHandoff({
26
- context: 'Completed auth module',
27
- assumptions: ['Redis available'],
28
- decision: 'JWT with refresh tokens',
29
- deliverable: { type: 'code', description: 'Auth module' },
30
- next_agent: 'frontend-architect',
31
- })
11
+ **[Landing Page](https://carl0zen.github.io/zenkit)** | **[Playground](https://carl0zen.github.io/zenkit/playground)** | **[npm](https://www.npmjs.com/package/zenkit)**
32
12
 
33
- // Load and validate a feature spec
34
- const spec = loadFeatureSpec('benchmark/feature-specs/my-feature.json')
35
- ```
36
-
37
- ### As a CLI
13
+ ## Quick start
38
14
 
39
15
  ```bash
40
- npx zenkit validate handoff data.json # Validate JSON against schema
41
- npx zenkit benchmark:all # Run all benchmark specs
42
- npx zenkit audit # Full audit with report
43
- npx zenkit status # Project health check
44
- npx zenkit init # Scaffold ZenKit into a project
16
+ npx zenkit init claude
45
17
  ```
46
18
 
47
- ## Problem
48
-
49
- Most AI-assisted development workflows share structural failures unrelated to model capability:
50
-
51
- - **Drift** — Agents wander from the plan. Each step compounds divergence.
52
- - **Verbosity** — Workflows burn tokens on narration instead of producing artifacts.
53
- - **Hidden uncertainty** — Agents report success without distinguishing validated from assumed.
54
- - **Lost context** — Handoffs between agents lose assumptions, constraints, and decisions.
55
-
56
- ZenKit adds structure around your agent runtime. It does not replace it.
57
-
58
- ## Architecture
59
-
60
- Six categories of plain-file artifacts:
61
-
62
- | Primitive | Purpose | Format |
63
- |-----------|---------|--------|
64
- | **Commands** | 8 workflow verbs: spec, plan, build, audit, refactor, handoff, checkpoint, ship | Markdown |
65
- | **Schemas** | Machine-validatable contracts for handoffs, tasks, audits, checkpoints, benchmarks | JSON Schema |
66
- | **Skills** | Reusable capabilities: architecture review, security audit, bug triage, prompt pruning | Markdown |
67
- | **Hooks** | Automatic validation at workflow boundaries | Markdown |
68
- | **Checkpoints** | State snapshots with gate conditions — validated facts vs. assumptions | JSON Schema |
69
- | **Rubrics** | Evaluation criteria scored 0-10 | Markdown |
70
-
71
- ### Standard output contract
72
-
73
- Every command produces output aligned to:
19
+ That's it. This creates:
74
20
 
75
21
  ```
76
- context, assumptions, constraints, decision,
77
- deliverable, risks, open_questions, next_agent
22
+ .claude/commands/zenkit-spec.md
23
+ .claude/commands/zenkit-plan.md
24
+ .claude/commands/zenkit-build.md
25
+ .claude/commands/zenkit-audit.md
26
+ .claude/commands/zenkit-checkpoint.md
27
+ .claude/commands/zenkit-handoff.md
28
+ .claude/skills/zenkit-audit/SKILL.md
29
+ .claude/skills/zenkit-handoff/SKILL.md
30
+ .claude/skills/zenkit-checkpoint/SKILL.md
31
+ CLAUDE.md
78
32
  ```
79
33
 
80
- ## Quickstart
34
+ Then in Claude Code, use the slash commands:
81
35
 
82
- ```bash
83
- npm install
84
-
85
- # CLI
86
- npm run zenkit status # Project health check
87
- npm run zenkit validate handoff data.json # Validate against schema
88
- npm run zenkit benchmark:all # Run all 5 benchmark specs
89
-
90
- # Development
91
- npm run dev # Landing page at localhost:3000, playground at /playground
92
- npm test # 54 unit tests
93
- npm run test:e2e # 13 Playwright E2E browser tests
94
- npm run lint # ESLint
95
- npm run build # Production build
96
-
97
- # Benchmarking
98
- npm run benchmark # Single spec (schema validator playground)
99
- npm run benchmark:all # All 5 specs (131 checks, 44 criteria)
100
- npm run benchmark:report # Markdown report from latest result
101
- npm run benchmark:compare # ZenKit vs baseline comparison
102
- npm run benchmark:visualize -- --summary # Mermaid workflow diagram
103
36
  ```
104
-
105
- ## Workflow
106
-
107
- ```
108
- /spec → /plan → /build → /audit → /checkpoint → /ship
109
- ↑ |
110
- └─────────┘ (audit loop)
37
+ /zenkit-spec "add user profile page"
38
+ /zenkit-plan
39
+ /zenkit-build
40
+ /zenkit-audit
41
+ /zenkit-checkpoint
111
42
  ```
112
43
 
113
- Lateral: `/refactor` (behavior-preserving improvement), `/handoff` (agent-to-agent context transfer).
114
-
115
- ## Benchmarking
44
+ ## What it does
116
45
 
117
- ZenKit benchmarks verify acceptance criteria against the actual implementation — not file existence, not narrative claims.
46
+ | Command | Purpose |
47
+ |---------|---------|
48
+ | `/zenkit-spec` | Define what to build — acceptance criteria, constraints, scope |
49
+ | `/zenkit-plan` | Break a spec into tasks with explicit assumptions and risks |
50
+ | `/zenkit-build` | Implement from a plan with documented decisions |
51
+ | `/zenkit-audit` | Review for correctness, security, and architectural alignment |
52
+ | `/zenkit-checkpoint` | Capture state — distinguish validated facts from assumptions |
53
+ | `/zenkit-handoff` | Transfer context without losing decisions or open questions |
118
54
 
119
- ### Current coverage
55
+ Every command produces structured output with: **context, assumptions, constraints, decision, deliverable, risks, open questions, next handoff.**
120
56
 
121
- 5 feature specs with 44 acceptance criteria and 131 total checks:
57
+ ## Why
122
58
 
123
- | Spec | Criteria | Checks |
124
- |------|----------|--------|
125
- | Schema Validator Playground | 8 | 25 |
126
- | Handoff Contract System | 9 | 24 |
127
- | Protocol Completeness | 10 | 37 |
128
- | Self-Audit | 10 | 25 |
129
- | CLI Tool | 7 | 20 |
59
+ Most AI-assisted development drifts. Agents wander from the plan, burn tokens on narration, hide uncertainty behind confident prose, and lose context between sessions. ZenKit adds discipline through file-based conventions that Claude Code already supports — slash commands, skills, and project memory.
130
60
 
131
- ### Verification types
61
+ ## Three layers
132
62
 
133
- - `file_exists` File is present
134
- - `file_contains` — File contains a specific string pattern
135
- - `schema_count` Expected number of schemas compile
136
- - `examples_valid` Fixture data validates against schemas
137
- - `schemas_consistent` All schemas use the same JSON Schema draft
63
+ | Layer | What | How |
64
+ |-------|------|-----|
65
+ | **Claude Code pack** | Slash commands + skills + CLAUDE.md | `npx zenkit init claude` |
66
+ | **Protocol + CLI** | Schemas, benchmarks, validation engine | `npm install zenkit` |
67
+ | **MCP server** | Dynamic tool calls for validate, benchmark, checkpoint | Planned |
138
68
 
139
- ### Telemetry honesty
69
+ Start with layer 1. Add layer 2 when you want machine-verifiable workflows.
140
70
 
141
- - **Estimated** data includes a `basis` field explaining the heuristic.
142
- - **Actual** telemetry is `null` when no API instrumentation is available. Never fabricated.
143
- - Every result includes `uncertainty` and `limitations` arrays.
144
-
145
- ### Baseline comparison
146
-
147
- ZenKit supports `zenkit` and `baseline` modes. Current comparison data is **illustrative** — both modes verify the same codebase. A meaningful comparison requires A/B workflow execution.
148
-
149
- ### Self-audit
150
-
151
- ZenKit uses its own benchmark system to audit itself. This is structured introspection, not self-certification. See [docs/self-audit.md](docs/self-audit.md).
152
-
153
- ### Workflow visualization
71
+ ## Programmatic API
154
72
 
155
73
  ```bash
156
- npm run benchmark:visualize -- --summary # Mermaid diagram of all specs
157
- npm run benchmark:visualize # Mermaid diagram of single result
74
+ npm install zenkit
158
75
  ```
159
76
 
160
- ## API Reference
161
-
162
- ### `validate(schemaName, data)`
163
-
164
- Validate data against a ZenKit schema. Returns `{ valid, errors, schemaName }`.
165
-
166
- ### `getSchemaNames()`
167
-
168
- Returns array of all schema names: `handoff`, `task`, `audit`, `checkpoint`, `benchmark`, `feature-spec`.
169
-
170
- ### `getSchema(name)`
171
-
172
- Returns the raw JSON Schema object for a named schema.
173
-
174
- ### `createHandoff(data)`
175
-
176
- Create and validate a handoff object. Returns the handoff if valid, throws if invalid.
177
-
178
- ### `loadFeatureSpec(path)`
179
-
180
- Load a feature spec from a JSON file. Validates against `feature-spec.schema.json`. Returns the spec if valid, throws if invalid.
77
+ ```typescript
78
+ import { validate, createHandoff, loadFeatureSpec } from 'zenkit'
181
79
 
182
- ## Schema Validator Playground
80
+ const result = validate('handoff', myData)
81
+ if (!result.valid) console.error(result.errors)
183
82
 
184
- Interactive tool at `/playground` for validating JSON against ZenKit schemas. Client-side validation with Ajv, pre-loaded examples, detailed error paths.
83
+ const handoff = createHandoff({
84
+ context: 'Completed auth module',
85
+ assumptions: ['Redis available'],
86
+ decision: 'JWT with refresh tokens',
87
+ deliverable: { type: 'code', description: 'Auth module' },
88
+ next_agent: 'frontend-architect',
89
+ })
90
+ ```
185
91
 
186
92
  ## CLI
187
93
 
188
94
  ```bash
189
- npm run zenkit help # All commands
190
- npm run zenkit status # Project health
191
- npm run zenkit validate <schema> <file> # Validate JSON
192
- npm run zenkit validate:all # Check all schemas compile
193
- npm run zenkit benchmark [spec] # Run single benchmark
194
- npm run zenkit benchmark:all # Run all benchmarks
195
- npm run zenkit audit # Run all benchmarks + produce audit report
196
- npm run zenkit init [dir] # Scaffold ZenKit into a project
95
+ npx zenkit init claude # Install Claude Code commands + skills
96
+ npx zenkit init # Scaffold full protocol structure
97
+ npx zenkit validate handoff data.json # Validate JSON against schema
98
+ npx zenkit benchmark:all # Run all benchmark specs
99
+ npx zenkit audit # Full audit with structured report
100
+ npx zenkit status # Project health check
197
101
  ```
198
102
 
199
- ## Test coverage
103
+ ## Benchmark system
200
104
 
201
- | Layer | Tests | What it covers |
202
- |-------|-------|----------------|
203
- | Unit (Vitest) | 54 | Schema validation, example data, edge cases, benchmark results, CLI commands, public API, handoff creation, feature spec loading |
204
- | E2E (Playwright) | 13 | Playground UI, schema selection, validation flows, format button, landing page sections, navigation |
205
- | Benchmarks | 131 checks | Code structure, schema compilation, test execution, JSON values, documentation, self-audit, CLI |
105
+ ZenKit includes a benchmark harness that verifies acceptance criteria against the actual implementation.
206
106
 
207
- ## Extending
107
+ - **5 feature specs**, 44 acceptance criteria, 131+ checks
108
+ - 7 verification types: `file_exists`, `file_contains`, `schema_count`, `examples_valid`, `schemas_consistent`, `test_passes`, `json_path_equals`
109
+ - Telemetry is always labeled as estimated or actual — never fabricated
110
+ - Every result includes `uncertainty` and `limitations` arrays
208
111
 
112
+ ```bash
113
+ npx zenkit benchmark:all # Run all specs
114
+ npx zenkit audit # Run benchmarks + produce audit report
209
115
  ```
210
- templates/command.template.md → commands/
211
- templates/skill.template.md → skills/
212
- templates/agent.template.md → agents/
213
- ```
214
116
 
215
- Custom schemas: add to `schemas/`, register in `src/lib/schemas.ts`, add example data in `src/lib/playground-examples.ts`.
117
+ ## Test coverage
118
+
119
+ | Layer | Count | What |
120
+ |-------|-------|------|
121
+ | Unit (Vitest) | 54 | Schemas, API, CLI, benchmarks, handoffs, feature specs |
122
+ | E2E (Playwright) | 13 | Playground UI, validation flows, landing page |
123
+ | Benchmarks | 131+ | Code structure, schema compilation, test execution, self-audit |
216
124
 
217
- ## Design Principles
125
+ ## Design principles
218
126
 
219
- 1. **Thin over grand** — Smallest architecture that works.
220
- 2. **Protocol over persona** — Schemas and contracts, not theatrical agent identities.
221
- 3. **Bounded autonomy** — Assumptions explicit. Uncertainty recorded. Claims bounded.
222
- 4. **Validation over narration** — Tests, schemas, and artifacts over prose.
223
- 5. **Low drift** — Commands and handoffs force consistency.
224
- 6. **Benchmarkable** — Acceptance criteria, not file existence.
127
+ 1. **Thin over grand** — Files, not frameworks.
128
+ 2. **Protocol over persona** — Contracts, not theatrical agent identities.
129
+ 3. **Bounded autonomy** — Assumptions explicit, uncertainty recorded.
130
+ 4. **Validation over narration** — Artifacts over prose.
131
+ 5. **Claude-native** — Slash commands and skills, not a parallel universe.
225
132
 
226
- ## CI
133
+ ## Contributing
227
134
 
228
- GitHub Actions runs on push/PR to main: lint, unit tests, schema validation, all benchmarks, build, E2E tests. Benchmark results uploaded as artifacts.
135
+ See [CONTRIBUTING.md](CONTRIBUTING.md).
229
136
 
230
137
  ## Documentation
231
138
 
232
- - [Philosophy](docs/philosophy.md) Design principles.
233
- - [Architecture](docs/architecture.md) Primitives and workflow composition.
234
- - [Command Model](docs/command-model.md) — The 8 commands and output contract.
235
- - [Agent Contract](docs/agent-contract.md) — Agent definitions and handoff chains.
236
- - [Benchmarking](docs/benchmarking.md) — The benchmark system.
237
- - [Self-Audit](docs/self-audit.md) — Self-verification and its limits.
238
- - [Roadmap](docs/roadmap.md) — What's done and what's next.
139
+ - [Philosophy](docs/philosophy.md) | [Architecture](docs/architecture.md) | [Commands](docs/command-model.md)
140
+ - [Agents](docs/agent-contract.md) | [Benchmarking](docs/benchmarking.md) | [Self-Audit](docs/self-audit.md)
141
+ - [Roadmap](docs/roadmap.md)
239
142
 
240
143
  ## License
241
144
 
@@ -0,0 +1,91 @@
1
+ {
2
+ "feature_id": "ccp-001",
3
+ "name": "Claude Code Integration Pack",
4
+ "description": "Slash commands, skills, and CLAUDE.md template for native Claude Code integration.",
5
+ "mode": "zenkit",
6
+ "acceptance_criteria": [
7
+ {
8
+ "id": "ccp-1",
9
+ "description": "CLAUDE.md template exists with workflow instructions",
10
+ "verification": { "type": "file_contains", "path": "templates/claude/CLAUDE.md", "pattern": "ZenKit Workflow Discipline" }
11
+ },
12
+ {
13
+ "id": "ccp-2",
14
+ "description": "zenkit-spec command file exists with structured output contract",
15
+ "verification": { "type": "file_contains", "path": "templates/claude/.claude/commands/zenkit-spec.md", "pattern": "Acceptance criteria" }
16
+ },
17
+ {
18
+ "id": "ccp-3",
19
+ "description": "zenkit-plan command file exists",
20
+ "verification": { "type": "file_exists", "path": "templates/claude/.claude/commands/zenkit-plan.md" }
21
+ },
22
+ {
23
+ "id": "ccp-4",
24
+ "description": "zenkit-build command references the output contract",
25
+ "verification": { "type": "file_contains", "path": "templates/claude/.claude/commands/zenkit-build.md", "pattern": "Next handoff" }
26
+ },
27
+ {
28
+ "id": "ccp-5",
29
+ "description": "zenkit-audit command includes rubric scoring",
30
+ "verification": { "type": "file_contains", "path": "templates/claude/.claude/commands/zenkit-audit.md", "pattern": "Execution quality" }
31
+ },
32
+ {
33
+ "id": "ccp-6",
34
+ "description": "zenkit-checkpoint command enforces validated vs assumed distinction",
35
+ "verification": { "type": "file_contains", "path": "templates/claude/.claude/commands/zenkit-checkpoint.md", "pattern": "validated" }
36
+ },
37
+ {
38
+ "id": "ccp-7",
39
+ "description": "zenkit-handoff command requires next_agent",
40
+ "verification": { "type": "file_contains", "path": "templates/claude/.claude/commands/zenkit-handoff.md", "pattern": "Next agent" }
41
+ },
42
+ {
43
+ "id": "ccp-8",
44
+ "description": "Audit skill has SKILL.md with description frontmatter",
45
+ "verification": { "type": "file_contains", "path": "templates/claude/.claude/skills/zenkit-audit/SKILL.md", "pattern": "description:" }
46
+ },
47
+ {
48
+ "id": "ccp-9",
49
+ "description": "Handoff skill has SKILL.md",
50
+ "verification": { "type": "file_exists", "path": "templates/claude/.claude/skills/zenkit-handoff/SKILL.md" }
51
+ },
52
+ {
53
+ "id": "ccp-10",
54
+ "description": "Checkpoint skill enforces gate conditions",
55
+ "verification": { "type": "file_contains", "path": "templates/claude/.claude/skills/zenkit-checkpoint/SKILL.md", "pattern": "Gate conditions" }
56
+ },
57
+ {
58
+ "id": "ccp-11",
59
+ "description": "CLI init claude command exists in source",
60
+ "verification": { "type": "file_contains", "path": "src/cli.ts", "pattern": "initClaude" }
61
+ },
62
+ {
63
+ "id": "ccp-12",
64
+ "description": "zenkit init claude runs successfully",
65
+ "verification": { "type": "test_passes", "command": "tmpdir=$(mktemp -d) && npx tsx bin/zenkit.ts init claude \"$tmpdir\" && test -f \"$tmpdir/CLAUDE.md\" && test -f \"$tmpdir/.claude/commands/zenkit-spec.md\" && rm -rf \"$tmpdir\"" }
66
+ }
67
+ ],
68
+ "constraints": [
69
+ "Must work without npm install — npx zenkit init claude is the entry point",
70
+ "Must create files compatible with Claude Code's command and skill format",
71
+ "No runtime dependencies — pure file copy"
72
+ ],
73
+ "expected_files": [
74
+ "templates/claude/CLAUDE.md",
75
+ "templates/claude/.claude/commands/zenkit-spec.md",
76
+ "templates/claude/.claude/commands/zenkit-plan.md",
77
+ "templates/claude/.claude/commands/zenkit-build.md",
78
+ "templates/claude/.claude/commands/zenkit-audit.md",
79
+ "templates/claude/.claude/commands/zenkit-checkpoint.md",
80
+ "templates/claude/.claude/commands/zenkit-handoff.md",
81
+ "templates/claude/.claude/skills/zenkit-audit/SKILL.md",
82
+ "templates/claude/.claude/skills/zenkit-handoff/SKILL.md",
83
+ "templates/claude/.claude/skills/zenkit-checkpoint/SKILL.md"
84
+ ],
85
+ "assigned_commands": ["build", "audit"],
86
+ "estimated_complexity": "medium",
87
+ "limitations": [
88
+ "Verifies files exist and contain expected content — does not test that Claude Code actually loads and executes them",
89
+ "The init command test creates a temp dir and checks file presence, not Claude Code runtime behavior"
90
+ ]
91
+ }
package/dist/cli.js CHANGED
@@ -96,7 +96,98 @@ function status() {
96
96
  console.log(`\nLast benchmark: ${s.passed}/${s.total} specs passed`);
97
97
  }
98
98
  }
99
+ function findPackageTemplates() {
100
+ // Find the zenkit package's template directory
101
+ const candidates = [
102
+ path_1.default.join(__dirname, '..', 'templates', 'claude'), // compiled (dist/)
103
+ path_1.default.join(__dirname, '..', '..', 'templates', 'claude'), // development
104
+ path_1.default.join(ROOT, 'templates', 'claude'), // local repo
105
+ path_1.default.join(ROOT, 'node_modules', 'zenkit', 'templates', 'claude'), // npm installed
106
+ ];
107
+ for (const c of candidates) {
108
+ if (fs_1.default.existsSync(c))
109
+ return c;
110
+ }
111
+ return '';
112
+ }
113
+ function copyDirRecursive(src, dest) {
114
+ if (!fs_1.default.existsSync(dest))
115
+ fs_1.default.mkdirSync(dest, { recursive: true });
116
+ for (const entry of fs_1.default.readdirSync(src, { withFileTypes: true })) {
117
+ const srcPath = path_1.default.join(src, entry.name);
118
+ const destPath = path_1.default.join(dest, entry.name);
119
+ if (entry.isDirectory()) {
120
+ copyDirRecursive(srcPath, destPath);
121
+ }
122
+ else {
123
+ if (!fs_1.default.existsSync(destPath)) {
124
+ fs_1.default.copyFileSync(srcPath, destPath);
125
+ console.log(` created ${path_1.default.relative(args[1] === 'claude' ? (args[2] || process.cwd()) : (args[1] || process.cwd()), destPath)}`);
126
+ }
127
+ else {
128
+ console.log(` exists ${path_1.default.relative(args[1] === 'claude' ? (args[2] || process.cwd()) : (args[1] || process.cwd()), destPath)}`);
129
+ }
130
+ }
131
+ }
132
+ }
133
+ function initClaude() {
134
+ const targetDir = args[2] ? path_1.default.resolve(args[2]) : process.cwd();
135
+ const templateDir = findPackageTemplates();
136
+ console.log('ZenKit for Claude Code');
137
+ console.log('======================\n');
138
+ if (!templateDir) {
139
+ console.error('Could not find Claude Code templates. Make sure zenkit is installed.');
140
+ process.exit(1);
141
+ }
142
+ // Copy .claude directory
143
+ const claudeSrc = path_1.default.join(templateDir, '.claude');
144
+ const claudeDest = path_1.default.join(targetDir, '.claude');
145
+ if (fs_1.default.existsSync(claudeSrc)) {
146
+ copyDirRecursive(claudeSrc, claudeDest);
147
+ }
148
+ // Generate CLAUDE.md (append if exists, create if not)
149
+ const claudeMdSrc = path_1.default.join(templateDir, 'CLAUDE.md');
150
+ const claudeMdDest = path_1.default.join(targetDir, 'CLAUDE.md');
151
+ if (fs_1.default.existsSync(claudeMdSrc)) {
152
+ const content = fs_1.default.readFileSync(claudeMdSrc, 'utf-8');
153
+ if (fs_1.default.existsSync(claudeMdDest)) {
154
+ const existing = fs_1.default.readFileSync(claudeMdDest, 'utf-8');
155
+ if (!existing.includes('ZenKit Workflow Discipline')) {
156
+ fs_1.default.appendFileSync(claudeMdDest, '\n\n' + content);
157
+ console.log(' appended ZenKit section to CLAUDE.md');
158
+ }
159
+ else {
160
+ console.log(' exists CLAUDE.md (already has ZenKit section)');
161
+ }
162
+ }
163
+ else {
164
+ fs_1.default.copyFileSync(claudeMdSrc, claudeMdDest);
165
+ console.log(' created CLAUDE.md');
166
+ }
167
+ }
168
+ console.log(`
169
+ Done. ZenKit is now available in Claude Code.
170
+
171
+ Commands (use as /slash-commands):
172
+ /zenkit-spec Write a feature specification
173
+ /zenkit-plan Create an implementation plan
174
+ /zenkit-build Implement from a plan
175
+ /zenkit-audit Review changes for quality
176
+ /zenkit-checkpoint Capture current state
177
+ /zenkit-handoff Produce a context transfer
178
+
179
+ Skills (activated automatically):
180
+ zenkit-audit Structured code review with rubrics
181
+ zenkit-handoff Context-preserving handoff documents
182
+ zenkit-checkpoint State snapshots with validated/assumed distinction
183
+
184
+ Start with: /zenkit-spec "your feature description"`);
185
+ }
99
186
  function init() {
187
+ if (args[1] === 'claude') {
188
+ initClaude();
189
+ return;
190
+ }
100
191
  const targetDir = args[1] ? path_1.default.resolve(args[1]) : process.cwd();
101
192
  const dirs = ['commands', 'schemas', 'skills', 'hooks', 'agents', 'rubrics', 'templates', 'benchmark/feature-specs', 'benchmark/results'];
102
193
  console.log(`Initializing ZenKit in ${targetDir}\n`);
@@ -112,6 +203,7 @@ function init() {
112
203
  }
113
204
  console.log('\nZenKit structure initialized.');
114
205
  console.log('Next: add schemas, commands, and feature specs.');
206
+ console.log('\nFor Claude Code integration instead, run: zenkit init claude');
115
207
  }
116
208
  // Dispatch
117
209
  switch (command) {
@@ -161,7 +253,8 @@ Commands:
161
253
  benchmark:report [result] Generate markdown report
162
254
  benchmark:compare [z] [b] Compare zenkit vs baseline
163
255
  audit Run all benchmarks and produce audit report
164
- init [dir] Scaffold ZenKit structure
256
+ init claude [dir] Install Claude Code commands + skills + CLAUDE.md
257
+ init [dir] Scaffold full ZenKit protocol structure
165
258
  status Show project ZenKit status
166
259
 
167
260
  Schemas: ${(0, index_1.getSchemaNames)().join(', ')}`);
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;;;AAAA;;;;;GAKG;AACH,mCAAoF;AACpF,4CAAmB;AACnB,gDAAuB;AACvB,iDAAwC;AAExC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AAClC,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;AAEvB,SAAS,QAAQ;IACf,IAAI,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAA;IACvB,OAAO,GAAG,KAAK,GAAG,EAAE,CAAC;QACnB,IAAI,YAAE,CAAC,UAAU,CAAC,cAAI,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC,IAAI,YAAE,CAAC,UAAU,CAAC,cAAI,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC;YAC1F,OAAO,GAAG,CAAA;QACZ,CAAC;QACD,GAAG,GAAG,cAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;IACzB,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,EAAE,CAAA;AACtB,CAAC;AAED,MAAM,IAAI,GAAG,QAAQ,EAAE,CAAA;AAEvB,SAAS,GAAG,CAAC,GAAW;IACtB,IAAI,CAAC;QACH,IAAA,wBAAQ,EAAC,GAAG,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAA;IAChE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC;AACH,CAAC;AAED,SAAS,UAAU;IACjB,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AI,EAAE,CAAA;QACN,MAAK;IACP,KAAK,QAAQ;QACX,MAAM,EAAE,CAAA;QACR,MAAK;IACP,KAAK,MAAM,CAAC;IACZ,KAAK,QAAQ,CAAC;IACd,KAAK,IAAI,CAAC;IACV,KAAK,SAAS;QACZ,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;WAcL,IAAA,sBAAc,GAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QACrC,MAAK;IACP;QACE,OAAO,CAAC,KAAK,CAAC,oBAAoB,OAAO,EAAE,CAAC,CAAA;QAC5C,OAAO,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAA;QAC7C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACnB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zenkit",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "private": false,
5
5
  "description": "Disciplined workflows for coding agents — a lightweight open-source protocol layer for AI-assisted software building.",
6
6
  "license": "MIT",
@@ -0,0 +1,20 @@
1
+ Audit the recent changes for: $ARGUMENTS
2
+
3
+ Review the implementation against its spec/plan. Produce a structured audit report:
4
+
5
+ 1. **Context** — What was built and what spec/plan does it implement?
6
+ 2. **Findings** — List each finding with:
7
+ - Category: correctness, security, performance, style, architecture, testing, documentation
8
+ - Severity: info, warning, error, critical
9
+ - Description: what's wrong
10
+ - File and line if applicable
11
+ - Suggestion: how to fix it
12
+ 3. **Rubric scores** (0-10):
13
+ - Execution quality: correctness, completeness, production-readiness
14
+ - Verbosity score: signal-to-noise ratio (higher = more concise)
15
+ - Architectural alignment: follows project conventions and planned architecture
16
+ 4. **Verdict**: pass, fail, conditional, needs_review
17
+ 5. **Open questions** — Unresolved issues that need attention.
18
+ 6. **Recommendations** — Prioritized list of what to fix.
19
+
20
+ Be adversarial. Do not rubber-stamp. If something is wrong, say so clearly. If you can't verify a claim, say that too.
@@ -0,0 +1,16 @@
1
+ Implement the following based on an existing plan: $ARGUMENTS
2
+
3
+ Follow the ZenKit output contract. During and after building:
4
+
5
+ 1. **Context** — Reference the plan you're executing. Note any deviations.
6
+ 2. **Assumptions** — List any new assumptions made during implementation.
7
+ 3. **Constraints** — Note any constraints discovered during building.
8
+ 4. **Decision** — Document every non-obvious decision with rationale.
9
+ 5. **Deliverable** — The actual code/files produced. Include:
10
+ - Files changed (list each)
11
+ - Validation status: did you run tests? Do they pass?
12
+ 6. **Risks** — What risks remain in the delivered code?
13
+ 7. **Open questions** — What couldn't you resolve?
14
+ 8. **Next handoff** — Typically /zenkit-audit.
15
+
16
+ After implementation, run available tests. Report results honestly — do not claim tests pass without running them.
@@ -0,0 +1,16 @@
1
+ Create a checkpoint for the current work: $ARGUMENTS
2
+
3
+ Capture the current state as a structured snapshot:
4
+
5
+ 1. **What has been completed** — List files changed, tests passing, features implemented.
6
+ 2. **What is validated** — Only include facts you have actually verified (tests run, schemas compiled, files exist). Do not list assumed validations.
7
+ 3. **What is assumed** — Explicitly list anything you believe to be true but have not verified.
8
+ 4. **Gate conditions** — For each condition, state whether it is met:
9
+ - Tests pass: yes/no/not run
10
+ - Lint clean: yes/no/not run
11
+ - Schema valid: yes/no/not checked
12
+ - Audit findings addressed: yes/no/not audited
13
+ 5. **Open questions** — What remains unresolved.
14
+ 6. **Recommendation** — Is this checkpoint a safe rollback point? Should work continue or pause for review?
15
+
16
+ Be honest about the distinction between "validated" and "assumed." The value of a checkpoint is knowing exactly what is confirmed.
@@ -0,0 +1,20 @@
1
+ Produce a structured handoff for: $ARGUMENTS
2
+
3
+ You are transferring work to another agent or a future session. The handoff must contain everything the recipient needs to continue without re-asking questions that were already answered.
4
+
5
+ Produce this structure:
6
+
7
+ 1. **Context** — What was done, why, and what state things are in now.
8
+ 2. **Assumptions** — Every assumption you made. The recipient will inherit these unless they explicitly revisit them.
9
+ 3. **Constraints** — Hard limits that still apply.
10
+ 4. **Decision** — Key decisions made and their rationale. Include rejected alternatives.
11
+ 5. **Deliverable** — What you produced:
12
+ - Type: code, document, schema, plan, review, test, or artifact
13
+ - Description
14
+ - Files changed
15
+ - Validation status: passed, failed, partial, or untested
16
+ 6. **Risks** — Known risks in the deliverable. Be specific.
17
+ 7. **Open questions** — What you could not resolve. The recipient must address these.
18
+ 8. **Next agent** — Who should receive this handoff.
19
+
20
+ Do not summarize vaguely. A handoff that says "everything looks good" without specifics is a failed handoff.
@@ -0,0 +1,18 @@
1
+ Define an implementation plan for $ARGUMENTS.
2
+
3
+ Follow the ZenKit output contract. Your plan must include:
4
+
5
+ 1. **Context** — What is the current situation? What exists already?
6
+ 2. **Assumptions** — What are you assuming? List each explicitly. Do not hide assumptions in prose.
7
+ 3. **Constraints** — What hard limits apply (time, tech, scope)?
8
+ 4. **Decision** — What approach will you take and why? What alternatives did you reject?
9
+ 5. **Deliverable** — An ordered task list. Each task must have:
10
+ - A clear name
11
+ - Acceptance criteria (binary pass/fail, not vague)
12
+ - Files affected
13
+ - Assigned agent or role
14
+ 6. **Risks** — What could go wrong? Be specific to this plan, not generic.
15
+ 7. **Open questions** — What can't you resolve now? These must be answered before or during build.
16
+ 8. **Next handoff** — Who receives this plan? Typically /zenkit-build.
17
+
18
+ Do not start building. This is planning only. Produce the structured plan, then stop.
@@ -0,0 +1,14 @@
1
+ Write a feature specification for: $ARGUMENTS
2
+
3
+ Produce a structured spec that defines what to build before any implementation begins:
4
+
5
+ 1. **Name** — Clear, concise feature name.
6
+ 2. **Description** — What this feature does in 2-3 sentences.
7
+ 3. **Acceptance criteria** — List of concrete, binary (pass/fail) conditions. Each criterion should be testable. "The API should be fast" is not testable. "The API responds in under 200ms at p95" is testable.
8
+ 4. **Constraints** — Technical, time, or scope limits.
9
+ 5. **Scope boundaries** — What is in scope and what is explicitly out of scope.
10
+ 6. **Risks** — What could go wrong.
11
+ 7. **Open questions** — What needs to be answered before planning.
12
+ 8. **Next handoff** — Typically /zenkit-plan.
13
+
14
+ Do not start planning or building. This is specification only.
@@ -0,0 +1,42 @@
1
+ ---
2
+ description: Audit code changes for correctness, security, and architectural alignment using ZenKit's structured rubrics.
3
+ ---
4
+
5
+ # ZenKit Audit
6
+
7
+ When the user asks you to audit, review, or check code quality, use this skill.
8
+
9
+ ## Process
10
+
11
+ 1. Identify the files changed and the spec/plan they implement.
12
+ 2. Review each file for: correctness, security (OWASP top 10), performance, style, architecture, testing, and documentation.
13
+ 3. Score on three rubrics (0-10):
14
+ - **Execution quality** — correctness, completeness, production-readiness
15
+ - **Verbosity score** — signal-to-noise ratio (higher = more concise code and comments)
16
+ - **Architectural alignment** — follows project conventions and planned architecture
17
+ 4. Produce findings. Each finding has: category, severity (info/warning/error/critical), description, file, suggestion.
18
+ 5. Deliver a verdict: pass, fail, conditional, or needs_review.
19
+
20
+ ## Output format
21
+
22
+ ```
23
+ ## Audit Report
24
+
25
+ **Verdict:** [pass/fail/conditional/needs_review]
26
+ **Scores:** execution [X/10], verbosity [X/10], alignment [X/10]
27
+
28
+ ### Findings
29
+ - [SEVERITY] category: description (file:line) — suggestion
30
+
31
+ ### Open Questions
32
+ - ...
33
+
34
+ ### Recommendations
35
+ 1. ...
36
+ ```
37
+
38
+ ## Rules
39
+
40
+ - Do not rubber-stamp. If something is wrong, say so.
41
+ - If you cannot verify a claim (e.g., "tests pass"), say you cannot verify it rather than assuming.
42
+ - Distinguish validated observations from inferences.
@@ -0,0 +1,50 @@
1
+ ---
2
+ description: Capture workflow state as structured checkpoints that distinguish validated facts from assumptions.
3
+ ---
4
+
5
+ # ZenKit Checkpoint
6
+
7
+ When you need to record the current state of work — before a risky change, at a milestone, or before handing off — use this skill.
8
+
9
+ ## What a checkpoint captures
10
+
11
+ 1. **Completed work** — Files changed, features implemented.
12
+ 2. **Validated facts** — Only things you have actually verified: tests you ran, schemas you compiled, files you confirmed exist. Do not list things you assume are true.
13
+ 3. **Assumptions** — Things you believe are true but have not verified.
14
+ 4. **Gate conditions** — Each with a clear met/not-met status:
15
+ - Tests pass: yes / no / not run
16
+ - Lint clean: yes / no / not run
17
+ - Schema valid: yes / no / not checked
18
+ - Audit findings addressed: yes / no / not audited
19
+ 5. **Open questions** — What remains unresolved.
20
+ 6. **Recommendation** — Is this a safe rollback point? Should work continue or pause?
21
+
22
+ ## Output format
23
+
24
+ ```
25
+ ## Checkpoint: [name]
26
+
27
+ **Stage:** [plan/build/audit/ship]
28
+ **Recommendation:** [continue/pause for review/rollback]
29
+
30
+ ### Validated
31
+ - [item]: [evidence]
32
+
33
+ ### Assumed (not verified)
34
+ - [item]
35
+
36
+ ### Gates
37
+ - Tests pass: [yes/no/not run]
38
+ - Lint clean: [yes/no/not run]
39
+ - Schema valid: [yes/no/not checked]
40
+ - Audit addressed: [yes/no/not audited]
41
+
42
+ ### Open Questions
43
+ - ...
44
+ ```
45
+
46
+ ## Rules
47
+
48
+ - The value of a checkpoint is knowing exactly what is confirmed vs assumed.
49
+ - Never mark a gate as "yes" unless you actually ran the check.
50
+ - "Not run" is always better than a false "yes."
@@ -0,0 +1,39 @@
1
+ ---
2
+ description: Produce structured handoff documents that preserve context, assumptions, decisions, and open questions between sessions or agents.
3
+ ---
4
+
5
+ # ZenKit Handoff
6
+
7
+ When work needs to be transferred — to another session, another agent, or a future you — use this skill to produce a complete handoff.
8
+
9
+ ## What a handoff must contain
10
+
11
+ 1. **Context** — What was done, why, and current state.
12
+ 2. **Assumptions** — Every assumption made. The recipient inherits these.
13
+ 3. **Constraints** — Hard limits still in effect.
14
+ 4. **Decision** — Key decisions and rationale, including rejected alternatives.
15
+ 5. **Deliverable** — What was produced: type, description, files changed, validation status (passed/failed/partial/untested).
16
+ 6. **Risks** — Known risks in the deliverable. Be specific.
17
+ 7. **Open questions** — What could not be resolved. The recipient must address these.
18
+ 8. **Next agent** — Who should receive this.
19
+
20
+ ## Output format
21
+
22
+ ```json
23
+ {
24
+ "context": "...",
25
+ "assumptions": ["..."],
26
+ "constraints": ["..."],
27
+ "decision": "...",
28
+ "deliverable": { "type": "code", "description": "...", "files_changed": ["..."], "validation_status": "passed" },
29
+ "risks": [{ "description": "...", "severity": "medium", "mitigation": "..." }],
30
+ "open_questions": ["..."],
31
+ "next_agent": "..."
32
+ }
33
+ ```
34
+
35
+ ## Rules
36
+
37
+ - A handoff that says "everything looks good" without specifics is a failed handoff.
38
+ - Every assumption must be listed. Silence is not confidence.
39
+ - If validation_status is "untested", say so. Do not claim "passed" without evidence.
@@ -0,0 +1,40 @@
1
+ # ZenKit Workflow Discipline
2
+
3
+ This project uses ZenKit for structured AI-assisted development.
4
+
5
+ ## Commands
6
+
7
+ Use these slash commands during development:
8
+
9
+ - `/zenkit-spec` — Write a feature specification before building
10
+ - `/zenkit-plan` — Create a structured implementation plan
11
+ - `/zenkit-build` — Implement from a plan with documented decisions
12
+ - `/zenkit-audit` — Review changes for correctness, security, and alignment
13
+ - `/zenkit-checkpoint` — Capture current state (what's validated vs assumed)
14
+ - `/zenkit-handoff` — Produce a structured context transfer document
15
+
16
+ ## Workflow
17
+
18
+ ```
19
+ /zenkit-spec → /zenkit-plan → /zenkit-build → /zenkit-audit → /zenkit-checkpoint
20
+ ```
21
+
22
+ ## Output contract
23
+
24
+ Every command output should include:
25
+ - **Context** — current situation
26
+ - **Assumptions** — explicit, not hidden
27
+ - **Constraints** — hard limits
28
+ - **Decision** — what and why
29
+ - **Deliverable** — what was produced
30
+ - **Risks** — specific to this output
31
+ - **Open questions** — unresolved items
32
+ - **Next handoff** — who continues
33
+
34
+ ## Rules
35
+
36
+ 1. Do not claim tests pass without running them.
37
+ 2. Do not hide assumptions in prose — list them explicitly.
38
+ 3. Distinguish validated facts from inferences in every checkpoint.
39
+ 4. When uncertain, say so. "I don't know" beats a false claim.
40
+ 5. Keep output concise. Artifacts over narration.