zenkit 0.5.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.
Files changed (84) hide show
  1. package/CONTRIBUTING.md +63 -0
  2. package/LICENSE +21 -0
  3. package/README.md +242 -0
  4. package/agents/backend-architect.md +19 -0
  5. package/agents/frontend-architect.md +19 -0
  6. package/agents/implementation-auditor.md +19 -0
  7. package/agents/product-manager.md +19 -0
  8. package/agents/qa-test-engineer.md +19 -0
  9. package/agents/security-specialist.md +19 -0
  10. package/agents/system-architect.md +19 -0
  11. package/agents/technical-writer.md +19 -0
  12. package/agents/ux-engineer.md +19 -0
  13. package/benchmark/feature-specs/cli-tool.json +58 -0
  14. package/benchmark/feature-specs/handoff-system.json +69 -0
  15. package/benchmark/feature-specs/protocol-completeness.json +85 -0
  16. package/benchmark/feature-specs/schema-validator-baseline.json +93 -0
  17. package/benchmark/feature-specs/schema-validator-playground.json +92 -0
  18. package/benchmark/feature-specs/self-audit.json +76 -0
  19. package/benchmark/fixtures/valid-handoff.json +13 -0
  20. package/benchmark/scripts/compare.ts +172 -0
  21. package/benchmark/scripts/report.ts +102 -0
  22. package/benchmark/scripts/run-all.ts +125 -0
  23. package/benchmark/scripts/run.ts +595 -0
  24. package/benchmark/scripts/visualize.ts +120 -0
  25. package/bin/zenkit.js +24 -0
  26. package/commands/audit.md +28 -0
  27. package/commands/build.md +26 -0
  28. package/commands/checkpoint.md +28 -0
  29. package/commands/handoff.md +28 -0
  30. package/commands/plan.md +27 -0
  31. package/commands/refactor.md +27 -0
  32. package/commands/ship.md +28 -0
  33. package/commands/spec.md +26 -0
  34. package/dist/cli.d.ts +2 -0
  35. package/dist/cli.d.ts.map +1 -0
  36. package/dist/cli.js +174 -0
  37. package/dist/cli.js.map +1 -0
  38. package/dist/index.d.ts +765 -0
  39. package/dist/index.d.ts.map +1 -0
  40. package/dist/index.js +121 -0
  41. package/dist/index.js.map +1 -0
  42. package/dist/schemas/audit.schema.json +63 -0
  43. package/dist/schemas/benchmark.schema.json +118 -0
  44. package/dist/schemas/checkpoint.schema.json +64 -0
  45. package/dist/schemas/feature-spec.schema.json +76 -0
  46. package/dist/schemas/handoff.schema.json +78 -0
  47. package/dist/schemas/schemas/audit.schema.json +63 -0
  48. package/dist/schemas/schemas/benchmark.schema.json +118 -0
  49. package/dist/schemas/schemas/checkpoint.schema.json +64 -0
  50. package/dist/schemas/schemas/feature-spec.schema.json +76 -0
  51. package/dist/schemas/schemas/handoff.schema.json +78 -0
  52. package/dist/schemas/schemas/task.schema.json +69 -0
  53. package/dist/schemas/task.schema.json +69 -0
  54. package/docs/agent-contract.md +36 -0
  55. package/docs/architecture.md +88 -0
  56. package/docs/benchmarking.md +51 -0
  57. package/docs/command-model.md +43 -0
  58. package/docs/philosophy.md +35 -0
  59. package/docs/roadmap.md +43 -0
  60. package/docs/self-audit.md +29 -0
  61. package/hooks/post-change.md +30 -0
  62. package/hooks/pre-change.md +27 -0
  63. package/hooks/pre-ship.md +30 -0
  64. package/package.json +92 -0
  65. package/rubrics/architectural-alignment.md +26 -0
  66. package/rubrics/execution-quality.md +26 -0
  67. package/rubrics/verbosity-score.md +26 -0
  68. package/schemas/audit.schema.json +63 -0
  69. package/schemas/benchmark.schema.json +118 -0
  70. package/schemas/checkpoint.schema.json +64 -0
  71. package/schemas/feature-spec.schema.json +76 -0
  72. package/schemas/handoff.schema.json +78 -0
  73. package/schemas/task.schema.json +69 -0
  74. package/skills/architecture-review.md +17 -0
  75. package/skills/backend-change.md +17 -0
  76. package/skills/bug-triage.md +17 -0
  77. package/skills/frontend-change.md +17 -0
  78. package/skills/prompt-pruning.md +17 -0
  79. package/skills/release-check.md +17 -0
  80. package/skills/security-review.md +17 -0
  81. package/templates/agent.template.md +18 -0
  82. package/templates/command.template.md +21 -0
  83. package/templates/skill.template.md +15 -0
  84. package/templates/task.template.md +19 -0
@@ -0,0 +1,63 @@
1
+ # Contributing to ZenKit
2
+
3
+ ## Setup
4
+
5
+ ```bash
6
+ git clone https://github.com/carl0zen/zenkit.git
7
+ cd zenkit
8
+ npm install
9
+ npx playwright install chromium # for E2E tests
10
+ ```
11
+
12
+ ## Verify everything works
13
+
14
+ ```bash
15
+ npm test # 42 unit tests
16
+ npm run lint # ESLint
17
+ npm run validate:schemas # 6 JSON schemas
18
+ npm run benchmark:all # 5 feature specs, 109+ checks
19
+ npm run build # Next.js production build
20
+ npm run test:e2e # 12 Playwright browser tests
21
+ ```
22
+
23
+ ## Adding protocol artifacts
24
+
25
+ **New command:** Copy `templates/command.template.md` to `commands/`. Follow the compressed format used by existing commands.
26
+
27
+ **New skill:** Copy `templates/skill.template.md` to `skills/`.
28
+
29
+ **New agent:** Copy `templates/agent.template.md` to `agents/`.
30
+
31
+ **New schema:** Add `schemas/your-name.schema.json`, register in `src/lib/schemas.ts`, add example data in `src/lib/playground-examples.ts`. Run `npm run validate:schemas` to verify.
32
+
33
+ ## Adding benchmark specs
34
+
35
+ 1. Create `benchmark/feature-specs/your-feature.json` following the `feature-spec.schema.json` format.
36
+ 2. Include at least one `limitations` entry — specs must be honest about what they don't verify.
37
+ 3. Run `npm run benchmark your-spec.json` to test it.
38
+ 4. Commit the spec. Live results are gitignored — they regenerate on each run.
39
+
40
+ ### Verification types available
41
+
42
+ | Type | What it checks |
43
+ |------|---------------|
44
+ | `file_exists` | File is present |
45
+ | `file_contains` | File contains a string pattern |
46
+ | `schema_count` | Expected number of schemas compile |
47
+ | `examples_valid` | Fixture data validates against schemas |
48
+ | `schemas_consistent` | All schemas use the same draft |
49
+ | `test_passes` | Shell command exits with code 0 |
50
+ | `json_path_equals` | JSON file path equals expected value |
51
+
52
+ ## PR expectations
53
+
54
+ - Tests pass (`npm test`)
55
+ - Lint clean (`npm run lint`)
56
+ - Benchmarks pass (`npm run benchmark:all`)
57
+ - Build succeeds (`npm run build`)
58
+ - No fabricated telemetry or claims — estimated data must be labeled
59
+ - Uncertainty and limitations declared where applicable
60
+
61
+ ## Design principles
62
+
63
+ Keep it thin. If your change adds a major subsystem, a runtime dependency, or theatrical agent language, reconsider. See [docs/philosophy.md](docs/philosophy.md).
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ZenKit Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,242 @@
1
+ # ZenKit
2
+
3
+ **Disciplined workflows for coding agents.**
4
+
5
+ ZenKit is a lightweight open-source protocol layer for AI-assisted software building. Commands, schemas, hooks, checkpoints, and handoffs — without framework bloat.
6
+
7
+ ## Install
8
+
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
+ })
32
+
33
+ // Load and validate a feature spec
34
+ const spec = loadFeatureSpec('benchmark/feature-specs/my-feature.json')
35
+ ```
36
+
37
+ ### As a CLI
38
+
39
+ ```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
45
+ ```
46
+
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:
74
+
75
+ ```
76
+ context, assumptions, constraints, decision,
77
+ deliverable, risks, open_questions, next_agent
78
+ ```
79
+
80
+ ## Quickstart
81
+
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
+ ```
104
+
105
+ ## Workflow
106
+
107
+ ```
108
+ /spec → /plan → /build → /audit → /checkpoint → /ship
109
+ ↑ |
110
+ └─────────┘ (audit loop)
111
+ ```
112
+
113
+ Lateral: `/refactor` (behavior-preserving improvement), `/handoff` (agent-to-agent context transfer).
114
+
115
+ ## Benchmarking
116
+
117
+ ZenKit benchmarks verify acceptance criteria against the actual implementation — not file existence, not narrative claims.
118
+
119
+ ### Current coverage
120
+
121
+ 5 feature specs with 44 acceptance criteria and 131 total checks:
122
+
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 |
130
+
131
+ ### Verification types
132
+
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
138
+
139
+ ### Telemetry honesty
140
+
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
154
+
155
+ ```bash
156
+ npm run benchmark:visualize -- --summary # Mermaid diagram of all specs
157
+ npm run benchmark:visualize # Mermaid diagram of single result
158
+ ```
159
+
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.
181
+
182
+ ## Schema Validator Playground
183
+
184
+ Interactive tool at `/playground` for validating JSON against ZenKit schemas. Client-side validation with Ajv, pre-loaded examples, detailed error paths.
185
+
186
+ ## CLI
187
+
188
+ ```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
197
+ ```
198
+
199
+ ## Test coverage
200
+
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 |
206
+
207
+ ## Extending
208
+
209
+ ```
210
+ templates/command.template.md → commands/
211
+ templates/skill.template.md → skills/
212
+ templates/agent.template.md → agents/
213
+ ```
214
+
215
+ Custom schemas: add to `schemas/`, register in `src/lib/schemas.ts`, add example data in `src/lib/playground-examples.ts`.
216
+
217
+ ## Design Principles
218
+
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.
225
+
226
+ ## CI
227
+
228
+ GitHub Actions runs on push/PR to main: lint, unit tests, schema validation, all benchmarks, build, E2E tests. Benchmark results uploaded as artifacts.
229
+
230
+ ## Documentation
231
+
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.
239
+
240
+ ## License
241
+
242
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,19 @@
1
+ # Backend Architect
2
+
3
+ > Designs and implements backend systems, APIs, and data models.
4
+
5
+ **Owns:** Backend implementation. Translates system architecture into working backend code including APIs, data models, business logic, and infrastructure configuration. Ensures the backend is performant, secure by default, and well-tested.
6
+ **Receives from:** `system-architect` (backend component specs, API contracts, data flow requirements)
7
+ **Hands off to:** `qa-test-engineer`
8
+
9
+ **Must produce:** context, assumptions, constraints, decision, deliverable, risks, open_questions, next_agent
10
+
11
+ **Must NOT:**
12
+ - Modify frontend code or UI components
13
+ - Change API contracts without coordinating with system-architect
14
+ - Skip writing tests for new endpoints or business logic
15
+
16
+ **Quality bar:**
17
+ - All API endpoints have request/response validation with consistent error format
18
+ - Data models include migrations and rollback paths
19
+ - Unit tests cover core business logic; no raw SQL or unparameterized queries
@@ -0,0 +1,19 @@
1
+ # Frontend Architect
2
+
3
+ > Designs and implements frontend components, pages, and interactions.
4
+
5
+ **Owns:** Frontend implementation. Translates system architecture and UX requirements into working frontend code including components, pages, state management, and API integrations. Ensures the frontend is responsive, accessible, and follows the design system.
6
+ **Receives from:** `system-architect` (frontend component specs, API contracts)
7
+ **Hands off to:** `ux-engineer`
8
+
9
+ **Must produce:** context, assumptions, constraints, decision, deliverable, risks, open_questions, next_agent
10
+
11
+ **Must NOT:**
12
+ - Modify backend code or API implementations
13
+ - Invent new design patterns that conflict with the existing design system
14
+ - Skip accessibility attributes on interactive elements
15
+
16
+ **Quality bar:**
17
+ - Components are reusable and follow project conventions; all interactive elements have ARIA attributes
18
+ - State management is predictable with no unnecessary global state
19
+ - Component tests cover rendering, interactions, and edge cases; no hardcoded user-facing strings
@@ -0,0 +1,19 @@
1
+ # Implementation Auditor
2
+
3
+ > Final quality review across all dimensions before shipping.
4
+
5
+ **Owns:** The final quality gate. Performs comprehensive review of the complete implementation against requirements, architecture, code quality, test coverage, and security findings. Decides ship or return for corrections.
6
+ **Receives from:** Build agents, `qa-test-engineer` (test results/coverage), `security-specialist` (audit report), `product-manager` (acceptance criteria)
7
+ **Hands off to:** `technical-writer` (if shipping) or back to the relevant build agent (if corrections needed)
8
+
9
+ **Must produce:** context, assumptions, constraints, decision, deliverable, risks, open_questions, next_agent
10
+
11
+ **Must NOT:**
12
+ - Implement fixes directly (return work to the responsible agent)
13
+ - Relax quality standards without explicit stakeholder approval
14
+ - Block shipment for cosmetic issues when quality thresholds are met
15
+
16
+ **Quality bar:**
17
+ - Every acceptance criterion is verified as met or explicitly flagged
18
+ - Rubric score meets project minimum (default 7/10); all critical/high security findings resolved
19
+ - Test coverage meets thresholds; audit report is complete with no dimensions left unreviewed
@@ -0,0 +1,19 @@
1
+ # Product Manager
2
+
3
+ > Defines requirements, priorities, and acceptance criteria for every task.
4
+
5
+ **Owns:** The "what" and "why" of every piece of work. Translates user needs and business goals into clear, prioritized requirements with measurable acceptance criteria and a definition of done.
6
+ **Receives from:** User requests, feature ideas, bug reports, business context.
7
+ **Hands off to:** `system-architect`
8
+
9
+ **Must produce:** context, assumptions, constraints, decision, deliverable, risks, open_questions, next_agent
10
+
11
+ **Must NOT:**
12
+ - Make architectural or implementation decisions
13
+ - Write code or design system internals
14
+ - Approve its own requirements without external review
15
+
16
+ **Quality bar:**
17
+ - Every requirement has at least one measurable acceptance criterion
18
+ - Priorities are explicitly ranked; scope is bounded with out-of-scope items deferred
19
+ - No implementation language or technology prescribed unless it is a hard constraint
@@ -0,0 +1,19 @@
1
+ # QA Test Engineer
2
+
3
+ > Creates test strategies and writes automated tests across all layers.
4
+
5
+ **Owns:** Test coverage and quality assurance. Designs test strategies, writes automated tests (unit, integration, e2e), and validates implementations against acceptance criteria. Ensures the test suite is reliable, fast, and provides meaningful coverage.
6
+ **Receives from:** `backend-architect`, `frontend-architect`, or `ux-engineer` (implemented code, acceptance criteria, API contracts)
7
+ **Hands off to:** `security-specialist` or `implementation-auditor`
8
+
9
+ **Must produce:** context, assumptions, constraints, decision, deliverable, risks, open_questions, next_agent
10
+
11
+ **Must NOT:**
12
+ - Modify production code to make tests pass (report the issue instead)
13
+ - Reduce coverage to speed up the test suite
14
+ - Write tests that depend on execution order or shared mutable state
15
+
16
+ **Quality bar:**
17
+ - Every acceptance criterion has at least one corresponding test
18
+ - Tests are deterministic; names clearly describe the scenario and expected outcome
19
+ - Coverage meets project thresholds; tests run under the configured CI time budget
@@ -0,0 +1,19 @@
1
+ # Security Specialist
2
+
3
+ > Audits for security vulnerabilities and compliance across all layers.
4
+
5
+ **Owns:** Security posture. Performs security audits on code, configurations, and dependencies. Identifies vulnerabilities, recommends mitigations, and validates that security best practices and compliance requirements are met.
6
+ **Receives from:** `qa-test-engineer` (tested code, architecture design, compliance requirements)
7
+ **Hands off to:** `implementation-auditor`
8
+
9
+ **Must produce:** context, assumptions, constraints, decision, deliverable, risks, open_questions, next_agent
10
+
11
+ **Must NOT:**
12
+ - Implement fixes directly (report findings for build agents to fix)
13
+ - Approve security exceptions without documenting the accepted risk
14
+ - Perform destructive testing against production systems
15
+
16
+ **Quality bar:**
17
+ - All findings include a severity rating (critical/high/medium/low/informational)
18
+ - Critical and high findings include specific remediation steps
19
+ - Dependency audit covers known CVEs; auth flows validated; secrets verified absent from code
@@ -0,0 +1,19 @@
1
+ # System Architect
2
+
3
+ > Designs overall system architecture and defines component boundaries.
4
+
5
+ **Owns:** High-level technical design. Decomposes requirements into system components, defines boundaries and interfaces, selects key technologies, and produces an architecture plan that backend and frontend architects can independently execute against.
6
+ **Receives from:** `product-manager` (approved requirements with acceptance criteria)
7
+ **Hands off to:** `backend-architect` and/or `frontend-architect`
8
+
9
+ **Must produce:** context, assumptions, constraints, decision, deliverable, risks, open_questions, next_agent
10
+
11
+ **Must NOT:**
12
+ - Implement code directly
13
+ - Define UI layouts or visual design
14
+ - Override product requirements without escalating to product-manager
15
+
16
+ **Quality bar:**
17
+ - Every component has a defined responsibility and clear interface
18
+ - Data flow between components is explicitly documented
19
+ - Technology choices include rationale and at least one considered alternative
@@ -0,0 +1,19 @@
1
+ # Technical Writer
2
+
3
+ > Creates documentation, guides, and API references for shipped work.
4
+
5
+ **Owns:** All user-facing and developer-facing documentation. Produces clear, accurate, maintainable docs including API references, usage guides, changelogs, and inline code documentation. Ensures documentation stays in sync with the implementation.
6
+ **Receives from:** `implementation-auditor` (approved implementation, API contracts, architecture context)
7
+ **Hands off to:** Terminal (documentation complete) or ship process.
8
+
9
+ **Must produce:** context, assumptions, constraints, decision, deliverable, risks, open_questions, next_agent
10
+
11
+ **Must NOT:**
12
+ - Modify production code beyond documentation comments
13
+ - Invent behavior that is not implemented; document only what exists
14
+ - Use jargon without defining it on first use
15
+
16
+ **Quality bar:**
17
+ - Every public API has documented signature, description, parameters, return value, and at least one example
18
+ - Guides include prerequisites and step-by-step instructions; verbosity score 7/10 or higher
19
+ - All code examples are verified against current implementation; changelog entries follow project format
@@ -0,0 +1,19 @@
1
+ # UX Engineer
2
+
3
+ > Implements UX specifications with accessibility and design system compliance.
4
+
5
+ **Owns:** The user experience layer. Reviews and refines frontend components to meet UX specifications, accessibility standards (WCAG 2.1 AA), and design system compliance. Bridges the gap between design intent and implementation reality.
6
+ **Receives from:** `frontend-architect` (implemented components, design system tokens/guidelines)
7
+ **Hands off to:** `qa-test-engineer`
8
+
9
+ **Must produce:** context, assumptions, constraints, decision, deliverable, risks, open_questions, next_agent
10
+
11
+ **Must NOT:**
12
+ - Alter business logic or data handling
13
+ - Introduce new design tokens without design system approval
14
+ - Remove functionality to achieve design compliance
15
+
16
+ **Quality bar:**
17
+ - All interactive elements are keyboard navigable; color contrast meets WCAG 2.1 AA minimums
18
+ - Components use design system tokens exclusively; no magic numbers or hardcoded colors
19
+ - Focus management is correct for modals/drawers/dynamic content; reduced-motion preferences respected
@@ -0,0 +1,58 @@
1
+ {
2
+ "feature_id": "cli-001",
3
+ "name": "ZenKit CLI Tool",
4
+ "description": "The zenkit CLI provides validate, benchmark, audit, init, and status commands.",
5
+ "mode": "zenkit",
6
+ "acceptance_criteria": [
7
+ {
8
+ "id": "cli-1",
9
+ "description": "CLI entry point exists and is executable",
10
+ "verification": { "type": "file_exists", "path": "bin/zenkit.ts" }
11
+ },
12
+ {
13
+ "id": "cli-2",
14
+ "description": "CLI exports a bin field in package.json",
15
+ "verification": { "type": "file_contains", "path": "package.json", "pattern": "\"zenkit\":" }
16
+ },
17
+ {
18
+ "id": "cli-3",
19
+ "description": "CLI help command works",
20
+ "verification": { "type": "test_passes", "command": "npx tsx bin/zenkit.ts help" }
21
+ },
22
+ {
23
+ "id": "cli-4",
24
+ "description": "CLI status command works",
25
+ "verification": { "type": "test_passes", "command": "npx tsx bin/zenkit.ts status" }
26
+ },
27
+ {
28
+ "id": "cli-5",
29
+ "description": "CLI validate:all command works",
30
+ "verification": { "type": "test_passes", "command": "npx tsx bin/zenkit.ts validate:all" }
31
+ },
32
+ {
33
+ "id": "cli-6",
34
+ "description": "CLI validates a valid fixture",
35
+ "verification": { "type": "test_passes", "command": "npx tsx bin/zenkit.ts validate handoff benchmark/fixtures/valid-handoff.json" }
36
+ },
37
+ {
38
+ "id": "cli-7",
39
+ "description": "Package has repository field for npm",
40
+ "verification": { "type": "json_path_equals", "path": "package.json", "json_path": "repository.type", "equals": "git" }
41
+ }
42
+ ],
43
+ "constraints": [
44
+ "CLI must work via npx tsx without compilation step",
45
+ "All commands must exit 0 on success, non-zero on failure"
46
+ ],
47
+ "expected_files": [
48
+ "bin/zenkit.ts",
49
+ "package.json"
50
+ ],
51
+ "assigned_commands": ["build", "audit"],
52
+ "estimated_complexity": "low",
53
+ "limitations": [
54
+ "Verifies commands exit successfully, not that their output is semantically correct",
55
+ "Does not test zenkit init in isolation (tested in unit tests)",
56
+ "Does not test zenkit audit (slow — runs all benchmarks recursively)"
57
+ ]
58
+ }
@@ -0,0 +1,69 @@
1
+ {
2
+ "feature_id": "hs-001",
3
+ "name": "Handoff Contract System",
4
+ "description": "The structured handoff system that enables agent-to-agent context transfer with schema validation.",
5
+ "mode": "zenkit",
6
+ "acceptance_criteria": [
7
+ {
8
+ "id": "hs-1",
9
+ "description": "Handoff schema defines required fields: context, assumptions, decision, deliverable, next_agent",
10
+ "verification": { "type": "file_contains", "path": "schemas/handoff.schema.json", "pattern": "\"required\"" }
11
+ },
12
+ {
13
+ "id": "hs-2",
14
+ "description": "Handoff schema enforces deliverable type enum",
15
+ "verification": { "type": "file_contains", "path": "schemas/handoff.schema.json", "pattern": "\"enum\"" }
16
+ },
17
+ {
18
+ "id": "hs-3",
19
+ "description": "Handoff schema disallows additional properties",
20
+ "verification": { "type": "file_contains", "path": "schemas/handoff.schema.json", "pattern": "additionalProperties" }
21
+ },
22
+ {
23
+ "id": "hs-4",
24
+ "description": "Validation engine can validate handoff data",
25
+ "verification": { "type": "file_contains", "path": "src/lib/schemas.ts", "pattern": "handoff:" }
26
+ },
27
+ {
28
+ "id": "hs-5",
29
+ "description": "Example handoff data exists in playground examples",
30
+ "verification": { "type": "file_contains", "path": "src/lib/playground-examples.ts", "pattern": "handoff:" }
31
+ },
32
+ {
33
+ "id": "hs-6",
34
+ "description": "Handoff fixture validates against schema",
35
+ "verification": { "type": "examples_valid" }
36
+ },
37
+ {
38
+ "id": "hs-7",
39
+ "description": "Handoff command documentation exists",
40
+ "verification": { "type": "file_exists", "path": "commands/handoff.md" }
41
+ },
42
+ {
43
+ "id": "hs-8",
44
+ "description": "Agent contract docs explain handoff chain",
45
+ "verification": { "type": "file_contains", "path": "docs/agent-contract.md", "pattern": "handoff chain" }
46
+ },
47
+ {
48
+ "id": "hs-9",
49
+ "description": "Landing page shows handoff example",
50
+ "verification": { "type": "file_contains", "path": "src/components/HandoffExample.tsx", "pattern": "next_agent" }
51
+ }
52
+ ],
53
+ "constraints": [
54
+ "Handoff validation must be client-side compatible",
55
+ "Schema must be strict (additionalProperties: false)"
56
+ ],
57
+ "expected_files": [
58
+ "schemas/handoff.schema.json",
59
+ "src/lib/schemas.ts",
60
+ "commands/handoff.md",
61
+ "benchmark/fixtures/valid-handoff.json"
62
+ ],
63
+ "assigned_commands": ["spec", "build", "audit"],
64
+ "estimated_complexity": "low",
65
+ "limitations": [
66
+ "Verifies schema structure and content presence, not runtime handoff behavior",
67
+ "Does not test actual agent-to-agent transfers (requires multi-agent execution)"
68
+ ]
69
+ }