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.
- package/CONTRIBUTING.md +63 -0
- package/LICENSE +21 -0
- package/README.md +242 -0
- package/agents/backend-architect.md +19 -0
- package/agents/frontend-architect.md +19 -0
- package/agents/implementation-auditor.md +19 -0
- package/agents/product-manager.md +19 -0
- package/agents/qa-test-engineer.md +19 -0
- package/agents/security-specialist.md +19 -0
- package/agents/system-architect.md +19 -0
- package/agents/technical-writer.md +19 -0
- package/agents/ux-engineer.md +19 -0
- package/benchmark/feature-specs/cli-tool.json +58 -0
- package/benchmark/feature-specs/handoff-system.json +69 -0
- package/benchmark/feature-specs/protocol-completeness.json +85 -0
- package/benchmark/feature-specs/schema-validator-baseline.json +93 -0
- package/benchmark/feature-specs/schema-validator-playground.json +92 -0
- package/benchmark/feature-specs/self-audit.json +76 -0
- package/benchmark/fixtures/valid-handoff.json +13 -0
- package/benchmark/scripts/compare.ts +172 -0
- package/benchmark/scripts/report.ts +102 -0
- package/benchmark/scripts/run-all.ts +125 -0
- package/benchmark/scripts/run.ts +595 -0
- package/benchmark/scripts/visualize.ts +120 -0
- package/bin/zenkit.js +24 -0
- package/commands/audit.md +28 -0
- package/commands/build.md +26 -0
- package/commands/checkpoint.md +28 -0
- package/commands/handoff.md +28 -0
- package/commands/plan.md +27 -0
- package/commands/refactor.md +27 -0
- package/commands/ship.md +28 -0
- package/commands/spec.md +26 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +174 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +765 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +121 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas/audit.schema.json +63 -0
- package/dist/schemas/benchmark.schema.json +118 -0
- package/dist/schemas/checkpoint.schema.json +64 -0
- package/dist/schemas/feature-spec.schema.json +76 -0
- package/dist/schemas/handoff.schema.json +78 -0
- package/dist/schemas/schemas/audit.schema.json +63 -0
- package/dist/schemas/schemas/benchmark.schema.json +118 -0
- package/dist/schemas/schemas/checkpoint.schema.json +64 -0
- package/dist/schemas/schemas/feature-spec.schema.json +76 -0
- package/dist/schemas/schemas/handoff.schema.json +78 -0
- package/dist/schemas/schemas/task.schema.json +69 -0
- package/dist/schemas/task.schema.json +69 -0
- package/docs/agent-contract.md +36 -0
- package/docs/architecture.md +88 -0
- package/docs/benchmarking.md +51 -0
- package/docs/command-model.md +43 -0
- package/docs/philosophy.md +35 -0
- package/docs/roadmap.md +43 -0
- package/docs/self-audit.md +29 -0
- package/hooks/post-change.md +30 -0
- package/hooks/pre-change.md +27 -0
- package/hooks/pre-ship.md +30 -0
- package/package.json +92 -0
- package/rubrics/architectural-alignment.md +26 -0
- package/rubrics/execution-quality.md +26 -0
- package/rubrics/verbosity-score.md +26 -0
- package/schemas/audit.schema.json +63 -0
- package/schemas/benchmark.schema.json +118 -0
- package/schemas/checkpoint.schema.json +64 -0
- package/schemas/feature-spec.schema.json +76 -0
- package/schemas/handoff.schema.json +78 -0
- package/schemas/task.schema.json +69 -0
- package/skills/architecture-review.md +17 -0
- package/skills/backend-change.md +17 -0
- package/skills/bug-triage.md +17 -0
- package/skills/frontend-change.md +17 -0
- package/skills/prompt-pruning.md +17 -0
- package/skills/release-check.md +17 -0
- package/skills/security-review.md +17 -0
- package/templates/agent.template.md +18 -0
- package/templates/command.template.md +21 -0
- package/templates/skill.template.md +15 -0
- package/templates/task.template.md +19 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Command Model
|
|
2
|
+
|
|
3
|
+
ZenKit defines eight commands. Each takes structured input and produces structured output per the standard contract.
|
|
4
|
+
|
|
5
|
+
## The eight commands
|
|
6
|
+
|
|
7
|
+
| Command | Purpose | Position |
|
|
8
|
+
|---------|---------|----------|
|
|
9
|
+
| `/spec` | Convert requirement into structured specification | Entry point |
|
|
10
|
+
| `/plan` | Break spec into tasks, dependencies, risks | After spec |
|
|
11
|
+
| `/build` | Execute plan, produce deliverables | After plan |
|
|
12
|
+
| `/audit` | Validate build against spec and rubrics | After build |
|
|
13
|
+
| `/refactor` | Improve code without behavior change | Any stage (requires green tests) |
|
|
14
|
+
| `/handoff` | Transfer context between agents | Any stage |
|
|
15
|
+
| `/checkpoint` | Snapshot workflow state for resumption | Any stage |
|
|
16
|
+
| `/ship` | Package and release validated output | Terminal (after audit passes) |
|
|
17
|
+
|
|
18
|
+
See `commands/*.md` for per-command details and examples.
|
|
19
|
+
|
|
20
|
+
## Chaining
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
spec --> plan --> build --> audit --+--> ship
|
|
24
|
+
^ |
|
|
25
|
+
+-- refactor <--+ (on failure)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
At any point: `checkpoint` snapshots state, `handoff` transfers between agents.
|
|
29
|
+
|
|
30
|
+
## Standard output contract
|
|
31
|
+
|
|
32
|
+
Every command output includes:
|
|
33
|
+
|
|
34
|
+
- **context** — What the agent knew when deciding.
|
|
35
|
+
- **assumptions** — What was assumed but not verified. Each is an explicit risk.
|
|
36
|
+
- **constraints** — Hard limits the agent operated within.
|
|
37
|
+
- **decision** — What was decided and why, including rejected alternatives.
|
|
38
|
+
- **deliverable** — The actual output: code, plan, report, or artifact.
|
|
39
|
+
- **risks** — Specific risks in this output, not general concerns.
|
|
40
|
+
- **open_questions** — What could not be resolved. Must be answered before downstream work proceeds.
|
|
41
|
+
- **next_agent** — Who receives this output next.
|
|
42
|
+
|
|
43
|
+
This contract makes agents interchangeable at the interface level. Swap the implementation, keep the contract.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# ZenKit Design Philosophy
|
|
2
|
+
|
|
3
|
+
ZenKit is a lightweight protocol layer for AI-assisted software building. It is not a framework, not a platform, and not an orchestration engine. It is a set of contracts that keep AI agents useful and honest.
|
|
4
|
+
|
|
5
|
+
## Thin Over Grand
|
|
6
|
+
|
|
7
|
+
ZenKit does the minimum required to make AI-assisted workflows repeatable and auditable. There is no runtime, no daemon, no server. The protocol is a set of JSON schemas, shell commands, and conventions. If you can run a shell script and read JSON, you can use ZenKit.
|
|
8
|
+
|
|
9
|
+
Grand architectures create grand maintenance burdens. ZenKit stays thin so teams can adopt it incrementally without rewriting their toolchain.
|
|
10
|
+
|
|
11
|
+
## Protocol Over Persona
|
|
12
|
+
|
|
13
|
+
AI agents do not need personalities. They need input contracts, output contracts, and clear boundaries. ZenKit defines what an agent receives, what it must produce, and what it must not do. The rest is implementation detail.
|
|
14
|
+
|
|
15
|
+
Persona-driven agents drift into unpredictable behavior. Protocol-driven agents produce artifacts you can diff, review, and version.
|
|
16
|
+
|
|
17
|
+
## Bounded Autonomy Over Fake Certainty
|
|
18
|
+
|
|
19
|
+
An agent that says "I'm 95% confident" without evidence is worse than one that says "I don't know." ZenKit requires agents to declare their assumptions, constraints, and open questions explicitly. Autonomy is bounded by schema validation, not by trust.
|
|
20
|
+
|
|
21
|
+
Every command output includes an `open_questions` field. Silence is not confidence -- it is a schema violation.
|
|
22
|
+
|
|
23
|
+
## Validation Over Narration
|
|
24
|
+
|
|
25
|
+
ZenKit does not care what an agent says it did. It cares what artifacts exist, whether they parse, and whether they satisfy the spec. The audit system checks deliverables against schemas, not against prose descriptions.
|
|
26
|
+
|
|
27
|
+
## Low Drift
|
|
28
|
+
|
|
29
|
+
Each command produces a structured output that feeds into the next command. The chain is explicit. There is no hidden state, no ambient context that accumulates silently, no memory that decays. If context is needed, it is passed as input.
|
|
30
|
+
|
|
31
|
+
## Real Benchmarkability
|
|
32
|
+
|
|
33
|
+
If you cannot measure it, you cannot improve it. ZenKit's benchmark system validates actual artifacts -- not claims about artifacts. Telemetry distinguishes between measured values and estimated values. Results are reproducible because inputs and outputs are versioned.
|
|
34
|
+
|
|
35
|
+
ZenKit is intentionally small because the problem it solves -- keeping AI agents accountable in a build workflow -- does not require a large solution. It requires a precise one.
|
package/docs/roadmap.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Roadmap
|
|
2
|
+
|
|
3
|
+
## Done in v0.2
|
|
4
|
+
|
|
5
|
+
- Acceptance-criteria-driven benchmark runner (23 checks, 8 criteria)
|
|
6
|
+
- Baseline vs zenkit comparison architecture (illustrative data)
|
|
7
|
+
- Self-audit documentation with circular-validation safeguards
|
|
8
|
+
- 72% reduction in protocol artifact size
|
|
9
|
+
- Telemetry honesty: estimated/actual separation with basis field
|
|
10
|
+
- Uncertainty and limitations as first-class result fields
|
|
11
|
+
|
|
12
|
+
## Done in v0.3
|
|
13
|
+
|
|
14
|
+
- 12 Playwright E2E browser tests
|
|
15
|
+
- 4 benchmark feature specs (35 criteria, 101 checks)
|
|
16
|
+
- ESLint integration (clean)
|
|
17
|
+
- GitHub Actions CI pipeline (lint, test, benchmark, build, E2E)
|
|
18
|
+
- Multi-spec benchmark runner with aggregate summary
|
|
19
|
+
- Landing page: benchmark summary, comparison section, self-audit section
|
|
20
|
+
- `zenkit` CLI tool (validate, benchmark, init, status)
|
|
21
|
+
- CLAUDE.md for Claude Code integration
|
|
22
|
+
- Mermaid workflow visualization
|
|
23
|
+
- README with accurate test counts and full command reference
|
|
24
|
+
|
|
25
|
+
## Next priorities
|
|
26
|
+
|
|
27
|
+
### Real telemetry adapters
|
|
28
|
+
Provider-specific adapters that capture actual token usage and cost from API responses. Initial targets: Anthropic, OpenAI.
|
|
29
|
+
|
|
30
|
+
### A/B workflow comparison
|
|
31
|
+
Execute the same feature spec twice — once with ZenKit structure, once without — and measure drift, retries, and rework. Prerequisite for meaningful (non-illustrative) comparison data.
|
|
32
|
+
|
|
33
|
+
### Custom schema extensions
|
|
34
|
+
Allow teams to extend the standard output contract with domain-specific fields without breaking compatibility.
|
|
35
|
+
|
|
36
|
+
### npm package publishing
|
|
37
|
+
Publish `zenkit` as an npm package so `zenkit init` and `zenkit validate` work globally without cloning the repo.
|
|
38
|
+
|
|
39
|
+
### Interactive workflow visualization
|
|
40
|
+
Render Mermaid diagrams directly in the landing page, with clickable stages showing check details.
|
|
41
|
+
|
|
42
|
+
### More verification types
|
|
43
|
+
Add `test_passes` (run a specific test and check exit code), `url_responds` (HTTP health check), and `json_path_equals` (check specific values in JSON files).
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Self-Audit
|
|
2
|
+
|
|
3
|
+
ZenKit can structure audits of its own repository. This is useful but requires explicit safeguards against circular self-certification.
|
|
4
|
+
|
|
5
|
+
## What self-audit does
|
|
6
|
+
|
|
7
|
+
Using ZenKit commands and schemas to audit ZenKit produces structured artifacts: findings, rubric scores, and uncertainty notes. This is valuable because it:
|
|
8
|
+
|
|
9
|
+
- Tests whether ZenKit's own primitives are expressive enough to describe real work
|
|
10
|
+
- Produces concrete evidence of what passes and what does not
|
|
11
|
+
- Forces the same honesty requirements (explicit uncertainty, bounded claims) on ZenKit itself
|
|
12
|
+
|
|
13
|
+
## What self-audit does NOT do
|
|
14
|
+
|
|
15
|
+
- It does not prove ZenKit is correct. A system auditing itself can only check what it knows to check.
|
|
16
|
+
- It does not replace independent inspection. External review finds the blind spots self-audit cannot.
|
|
17
|
+
- It does not validate the rubrics themselves. If a rubric is poorly designed, self-audit scores are meaningless.
|
|
18
|
+
|
|
19
|
+
## Safeguards
|
|
20
|
+
|
|
21
|
+
1. **Benchmark checks are verifiable.** The runner checks file existence, pattern matching, schema compilation, and example validation. These are inspectable — run the benchmark yourself and verify.
|
|
22
|
+
2. **Uncertainty is required, not optional.** Every benchmark result must include an `uncertainty` array. Empty uncertainty is a red flag, not a sign of perfection.
|
|
23
|
+
3. **Limitations are inherited from specs.** The feature spec declares what verification cannot cover. These propagate to results.
|
|
24
|
+
4. **Illustrative data is labeled.** Comparison artifacts and example data are explicitly marked as `illustrative` where applicable.
|
|
25
|
+
5. **Telemetry is never fabricated.** Estimated figures state their estimation basis. Actual telemetry is null when not instrumented.
|
|
26
|
+
|
|
27
|
+
## The honest framing
|
|
28
|
+
|
|
29
|
+
ZenKit structures its own audits, but its claims are only as strong as the checks behind them. The v0.2 benchmark verifies 23 specific checks across 8 acceptance criteria. It does not verify runtime UI behavior, performance under load, or multi-agent workflow fidelity. Those remain unvalidated until specific checks are added.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Post-Change Hook
|
|
2
|
+
|
|
3
|
+
> When: After code changes are made
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
Validates that the codebase remains healthy after modifications and that changes stay within the planned scope.
|
|
7
|
+
|
|
8
|
+
## Trigger
|
|
9
|
+
Fires automatically after any code modification is applied to the working tree. This runs once all file edits for a given step are complete, before the agent reports success.
|
|
10
|
+
|
|
11
|
+
## Checks
|
|
12
|
+
- All tests pass (no regressions introduced by the change).
|
|
13
|
+
- No lint errors exist in modified files.
|
|
14
|
+
- Schema validation passes for any modified configuration or data files.
|
|
15
|
+
- Changes match the approved plan scope (no unplanned files modified, no scope creep).
|
|
16
|
+
- No new security warnings introduced (basic static analysis).
|
|
17
|
+
|
|
18
|
+
## On Failure
|
|
19
|
+
- The change is flagged as incomplete or non-conforming.
|
|
20
|
+
- The agent receives a detailed report of which checks failed and why.
|
|
21
|
+
- The agent must fix the issues before the change is considered done.
|
|
22
|
+
- If scope drift is detected, the agent must either revert out-of-scope changes or request a plan amendment.
|
|
23
|
+
|
|
24
|
+
## Configuration
|
|
25
|
+
- `require_tests_pass`: (boolean, default `true`) Whether all tests must remain green.
|
|
26
|
+
- `require_lint_clean`: (boolean, default `true`) Whether lint must pass on changed files.
|
|
27
|
+
- `require_schema_valid`: (boolean, default `true`) Whether schema validation is enforced.
|
|
28
|
+
- `require_scope_match`: (boolean, default `true`) Whether changes must stay within plan scope.
|
|
29
|
+
- `lint_command`: (string, default `"npm run lint"`) Command used for linting.
|
|
30
|
+
- `test_command`: (string, default `"npm test"`) Command used for running tests.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Pre-Change Hook
|
|
2
|
+
|
|
3
|
+
> When: Before any code change begins
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
Validates that all preconditions are met before modifying code, ensuring changes are planned, the environment is stable, and no work is lost.
|
|
7
|
+
|
|
8
|
+
## Trigger
|
|
9
|
+
Fires automatically before any code modification is applied to the working tree. This includes new feature work, bug fixes, refactors, and any file edits initiated by an agent.
|
|
10
|
+
|
|
11
|
+
## Checks
|
|
12
|
+
- A plan exists and has been approved for the current task.
|
|
13
|
+
- All existing tests pass (green test suite).
|
|
14
|
+
- The working tree is clean (no uncommitted or unstaged changes that could be overwritten).
|
|
15
|
+
- The current branch is up to date with its upstream tracking branch.
|
|
16
|
+
- No conflicting changes are in progress from another agent or task.
|
|
17
|
+
|
|
18
|
+
## On Failure
|
|
19
|
+
- The code change is blocked and does not proceed.
|
|
20
|
+
- The failing check is reported with a clear reason and remediation hint.
|
|
21
|
+
- The agent is prompted to resolve the issue (e.g., commit or stash uncommitted work, fix failing tests, create a plan) before retrying.
|
|
22
|
+
|
|
23
|
+
## Configuration
|
|
24
|
+
- `require_plan`: (boolean, default `true`) Whether an approved plan must exist.
|
|
25
|
+
- `require_green_tests`: (boolean, default `true`) Whether the full test suite must pass.
|
|
26
|
+
- `require_clean_tree`: (boolean, default `true`) Whether the working tree must have no uncommitted changes.
|
|
27
|
+
- `allowed_dirty_paths`: (list, default `[]`) Paths excluded from the clean-tree check.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Pre-Ship Hook
|
|
2
|
+
|
|
3
|
+
> When: Before shipping or deploying
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
Validates that all quality, security, and documentation gates are satisfied before code leaves the development environment.
|
|
7
|
+
|
|
8
|
+
## Trigger
|
|
9
|
+
Fires automatically before any ship or deploy action, including creating a release PR, tagging a release, or triggering a deployment pipeline.
|
|
10
|
+
|
|
11
|
+
## Checks
|
|
12
|
+
- All audit findings from the implementation-auditor are addressed or explicitly accepted.
|
|
13
|
+
- All quality gates pass (execution-quality rubric score meets threshold).
|
|
14
|
+
- The changelog is updated with an entry describing the shipped changes.
|
|
15
|
+
- A checkpoint (commit or snapshot) exists that captures the exact state being shipped.
|
|
16
|
+
- No open blocking issues remain on the task.
|
|
17
|
+
- All agent handoffs in the chain have been completed.
|
|
18
|
+
|
|
19
|
+
## On Failure
|
|
20
|
+
- The ship action is blocked and does not proceed.
|
|
21
|
+
- A summary of unmet conditions is presented with links to the relevant findings.
|
|
22
|
+
- The responsible agent is directed to resolve each blocker before retrying.
|
|
23
|
+
- If audit findings are intentionally deferred, they must be marked as accepted with a rationale.
|
|
24
|
+
|
|
25
|
+
## Configuration
|
|
26
|
+
- `require_audit_clear`: (boolean, default `true`) Whether all audit findings must be resolved.
|
|
27
|
+
- `require_changelog`: (boolean, default `true`) Whether the changelog must have a new entry.
|
|
28
|
+
- `require_checkpoint`: (boolean, default `true`) Whether a checkpoint commit must exist.
|
|
29
|
+
- `min_quality_score`: (number, default `7`) Minimum execution-quality rubric score to ship.
|
|
30
|
+
- `allow_deferred_findings`: (boolean, default `false`) Whether accepted-but-unresolved findings are permitted.
|
package/package.json
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "zenkit",
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Disciplined workflows for coding agents — a lightweight open-source protocol layer for AI-assisted software building.",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/carl0zen/zenkit.git"
|
|
10
|
+
},
|
|
11
|
+
"keywords": ["ai", "agents", "workflow", "protocol", "benchmark", "schema", "handoff", "cli"],
|
|
12
|
+
"main": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"require": "./dist/index.js",
|
|
17
|
+
"types": "./dist/index.d.ts"
|
|
18
|
+
},
|
|
19
|
+
"./schemas/*": "./schemas/*"
|
|
20
|
+
},
|
|
21
|
+
"bin": {
|
|
22
|
+
"zenkit": "./bin/zenkit.js"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist/",
|
|
26
|
+
"bin/zenkit.js",
|
|
27
|
+
"schemas/",
|
|
28
|
+
"commands/",
|
|
29
|
+
"skills/",
|
|
30
|
+
"hooks/",
|
|
31
|
+
"agents/",
|
|
32
|
+
"rubrics/",
|
|
33
|
+
"templates/",
|
|
34
|
+
"benchmark/feature-specs/",
|
|
35
|
+
"benchmark/scripts/",
|
|
36
|
+
"benchmark/fixtures/",
|
|
37
|
+
"docs/",
|
|
38
|
+
"README.md",
|
|
39
|
+
"LICENSE",
|
|
40
|
+
"CONTRIBUTING.md"
|
|
41
|
+
],
|
|
42
|
+
"scripts": {
|
|
43
|
+
"zenkit": "tsx bin/zenkit.ts",
|
|
44
|
+
"dev": "next dev",
|
|
45
|
+
"build": "next build",
|
|
46
|
+
"build:lib": "tsc -p tsconfig.lib.json && cp -r schemas dist/schemas",
|
|
47
|
+
"start": "next start",
|
|
48
|
+
"lint": "next lint",
|
|
49
|
+
"test": "vitest run",
|
|
50
|
+
"test:watch": "vitest",
|
|
51
|
+
"test:e2e": "playwright test",
|
|
52
|
+
"benchmark": "tsx benchmark/scripts/run.ts",
|
|
53
|
+
"benchmark:report": "tsx benchmark/scripts/report.ts",
|
|
54
|
+
"benchmark:compare": "tsx benchmark/scripts/compare.ts",
|
|
55
|
+
"benchmark:baseline": "tsx benchmark/scripts/run.ts benchmark/feature-specs/schema-validator-baseline.json",
|
|
56
|
+
"benchmark:all": "tsx benchmark/scripts/run-all.ts",
|
|
57
|
+
"benchmark:visualize": "tsx benchmark/scripts/visualize.ts",
|
|
58
|
+
"validate:schemas": "tsx src/lib/validate-schemas.ts",
|
|
59
|
+
"prepublishOnly": "npm run build:lib"
|
|
60
|
+
},
|
|
61
|
+
"dependencies": {
|
|
62
|
+
"ajv": "^8.17.1",
|
|
63
|
+
"ajv-formats": "^3.0.1"
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"@playwright/test": "^1.59.1",
|
|
67
|
+
"@types/node": "^22.10.0",
|
|
68
|
+
"@types/react": "^18.3.12",
|
|
69
|
+
"@types/react-dom": "^18.3.1",
|
|
70
|
+
"autoprefixer": "^10.4.20",
|
|
71
|
+
"eslint": "^8.57.1",
|
|
72
|
+
"eslint-config-next": "^14.2.35",
|
|
73
|
+
"next": "^14.2.18",
|
|
74
|
+
"postcss": "^8.4.49",
|
|
75
|
+
"react": "^18.3.1",
|
|
76
|
+
"react-dom": "^18.3.1",
|
|
77
|
+
"tailwindcss": "^3.4.16",
|
|
78
|
+
"tsx": "^4.19.2",
|
|
79
|
+
"typescript": "^5.7.2",
|
|
80
|
+
"vitest": "^2.1.8"
|
|
81
|
+
},
|
|
82
|
+
"peerDependencies": {
|
|
83
|
+
"next": ">=14",
|
|
84
|
+
"react": ">=18",
|
|
85
|
+
"react-dom": ">=18"
|
|
86
|
+
},
|
|
87
|
+
"peerDependenciesMeta": {
|
|
88
|
+
"next": { "optional": true },
|
|
89
|
+
"react": { "optional": true },
|
|
90
|
+
"react-dom": { "optional": true }
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Architectural Alignment
|
|
2
|
+
|
|
3
|
+
> Measures how well the implementation follows the planned architecture and project conventions.
|
|
4
|
+
|
|
5
|
+
## Scale
|
|
6
|
+
0-10, where 0 is a complete departure from the architecture and 10 is perfect alignment.
|
|
7
|
+
|
|
8
|
+
## Criteria
|
|
9
|
+
|
|
10
|
+
### Score 0-2: Divergent
|
|
11
|
+
The implementation ignores the architecture plan. Components are in the wrong layers, interfaces do not match contracts, and conventions are not followed. A redesign or major refactor is required to bring the work into alignment.
|
|
12
|
+
|
|
13
|
+
### Score 3-4: Misaligned
|
|
14
|
+
The implementation loosely follows the architecture but deviates in significant ways. Some component boundaries are violated, naming conventions are inconsistent, or data flows through unplanned paths. Multiple corrections are needed.
|
|
15
|
+
|
|
16
|
+
### Score 5-6: Partially Aligned
|
|
17
|
+
The implementation follows the architecture for major components but drifts on details. Most conventions are followed, but some shortcuts bypass the planned structure. Minor refactoring would bring it into full alignment.
|
|
18
|
+
|
|
19
|
+
### Score 7-8: Aligned
|
|
20
|
+
The implementation faithfully follows the architecture plan. Component boundaries are respected, interfaces match contracts, and project conventions are consistently applied. Minor deviations exist but are justified and documented.
|
|
21
|
+
|
|
22
|
+
### Score 9-10: Exemplary Alignment
|
|
23
|
+
The implementation is a textbook execution of the architecture plan. Every component, interface, and convention is followed precisely. Deviations, where they exist, improve on the original plan and are documented with rationale.
|
|
24
|
+
|
|
25
|
+
## How to Apply
|
|
26
|
+
Use this rubric during implementation-auditor review to assess structural compliance. Compare the implementation against the system-architect's design document, checking component boundaries, interface contracts, data flow paths, and naming conventions. Score each dimension separately and average for the final score. Minimum score to ship is configurable (default: 7).
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Execution Quality
|
|
2
|
+
|
|
3
|
+
> Measures correctness, completeness, and production-readiness of delivered work.
|
|
4
|
+
|
|
5
|
+
## Scale
|
|
6
|
+
0-10, where 0 is entirely broken and 10 is flawless production-ready work.
|
|
7
|
+
|
|
8
|
+
## Criteria
|
|
9
|
+
|
|
10
|
+
### Score 0-2: Failing
|
|
11
|
+
The deliverable does not function. Core requirements are unmet, tests fail or are absent, and the output cannot be used without a full rewrite. Fundamental misunderstandings of the requirements are evident.
|
|
12
|
+
|
|
13
|
+
### Score 3-4: Incomplete
|
|
14
|
+
The deliverable partially works but has significant gaps. Some requirements are met, but critical paths are broken or untested. Error handling is missing or incorrect. The work needs substantial rework before it can be reviewed.
|
|
15
|
+
|
|
16
|
+
### Score 5-6: Functional
|
|
17
|
+
The deliverable meets most requirements and works for the happy path. Tests exist but coverage is thin. Error handling covers common cases but misses edge cases. The work is reviewable but needs fixes before shipping.
|
|
18
|
+
|
|
19
|
+
### Score 7-8: Solid
|
|
20
|
+
The deliverable meets all requirements and handles edge cases well. Test coverage is thorough, error handling is robust, and the code follows project conventions. Minor improvements may be suggested but nothing blocks shipping.
|
|
21
|
+
|
|
22
|
+
### Score 9-10: Exemplary
|
|
23
|
+
The deliverable exceeds expectations. All requirements are met with comprehensive test coverage, excellent error handling, clear documentation, and thoughtful handling of edge cases. The work is a reference example for future implementations.
|
|
24
|
+
|
|
25
|
+
## How to Apply
|
|
26
|
+
Use this rubric during implementation-auditor review to score the overall quality of a deliverable. The minimum score to pass the pre-ship gate is configurable (default: 7). Score each dimension (correctness, completeness, test coverage, error handling, conventions) individually, then average for the final score.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Verbosity Score
|
|
2
|
+
|
|
3
|
+
> Measures conciseness and signal-to-noise ratio of output (lower verbosity = higher score).
|
|
4
|
+
|
|
5
|
+
## Scale
|
|
6
|
+
0-10, where 0 is impenetrably dense or excessively verbose and 10 is perfectly concise with maximum signal.
|
|
7
|
+
|
|
8
|
+
## Criteria
|
|
9
|
+
|
|
10
|
+
### Score 0-2: Noise-Dominant
|
|
11
|
+
Output is overwhelmed by filler, repetition, or unnecessary detail. Key information is buried. Alternatively, output is so terse that critical context is missing entirely. The reader cannot extract the needed information efficiently.
|
|
12
|
+
|
|
13
|
+
### Score 3-4: Verbose
|
|
14
|
+
Output contains the needed information but padded with redundant explanations, obvious statements, or excessive caveats. Could be reduced by 40-60% without losing meaning. Reader must skim aggressively to find value.
|
|
15
|
+
|
|
16
|
+
### Score 5-6: Adequate
|
|
17
|
+
Output is reasonably concise but has room for tightening. Some redundancy exists, and a few sections could be compressed. Reader gets the information but spends more time than necessary.
|
|
18
|
+
|
|
19
|
+
### Score 7-8: Concise
|
|
20
|
+
Output is tight and well-structured. Every paragraph earns its place. Minimal redundancy. Technical detail is present where needed and absent where it is not. Reader extracts information quickly.
|
|
21
|
+
|
|
22
|
+
### Score 9-10: Optimal
|
|
23
|
+
Output achieves maximum information density without sacrificing clarity. Every sentence carries meaning. Structure aids rapid comprehension. Nothing can be removed without losing value, and nothing is missing that would add value.
|
|
24
|
+
|
|
25
|
+
## How to Apply
|
|
26
|
+
Use this rubric when reviewing agent output, documentation, and reports. Apply it to the technical-writer's deliverables as a shipping gate (minimum: 7). Also use it for self-assessment by any agent producing written output. Score by estimating what percentage of content could be removed without information loss, then mapping to the scale.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://zenkit.dev/schemas/audit.schema.json",
|
|
4
|
+
"title": "ZenKit Audit Report",
|
|
5
|
+
"description": "Structured audit output from a ZenKit audit command.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["task_id", "auditor", "verdict", "findings"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"task_id": {
|
|
10
|
+
"type": "string"
|
|
11
|
+
},
|
|
12
|
+
"auditor": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "Agent or role that performed the audit."
|
|
15
|
+
},
|
|
16
|
+
"timestamp": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"format": "date-time"
|
|
19
|
+
},
|
|
20
|
+
"verdict": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"enum": ["pass", "fail", "conditional", "needs_review"]
|
|
23
|
+
},
|
|
24
|
+
"findings": {
|
|
25
|
+
"type": "array",
|
|
26
|
+
"items": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"required": ["category", "severity", "description"],
|
|
29
|
+
"properties": {
|
|
30
|
+
"category": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"enum": ["correctness", "security", "performance", "style", "architecture", "testing", "documentation"]
|
|
33
|
+
},
|
|
34
|
+
"severity": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"enum": ["info", "warning", "error", "critical"]
|
|
37
|
+
},
|
|
38
|
+
"description": { "type": "string" },
|
|
39
|
+
"file": { "type": "string" },
|
|
40
|
+
"line": { "type": "integer" },
|
|
41
|
+
"suggestion": { "type": "string" }
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"rubric_scores": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"properties": {
|
|
48
|
+
"execution_quality": { "type": "number", "minimum": 0, "maximum": 10 },
|
|
49
|
+
"verbosity_score": { "type": "number", "minimum": 0, "maximum": 10 },
|
|
50
|
+
"architectural_alignment": { "type": "number", "minimum": 0, "maximum": 10 }
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"open_questions": {
|
|
54
|
+
"type": "array",
|
|
55
|
+
"items": { "type": "string" }
|
|
56
|
+
},
|
|
57
|
+
"recommendations": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"items": { "type": "string" }
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"additionalProperties": false
|
|
63
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://zenkit.dev/schemas/benchmark.schema.json",
|
|
4
|
+
"title": "ZenKit Benchmark Result",
|
|
5
|
+
"description": "Structured output from a ZenKit benchmark run with acceptance criteria verification.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["benchmark_id", "version", "mode", "task_name", "started_at", "completed_at", "status", "validation_summary", "acceptance_criteria_results"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"benchmark_id": { "type": "string" },
|
|
10
|
+
"version": { "type": "string" },
|
|
11
|
+
"mode": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"enum": ["zenkit", "baseline"],
|
|
14
|
+
"description": "Whether this run used ZenKit workflow structure or an unstructured baseline."
|
|
15
|
+
},
|
|
16
|
+
"task_name": { "type": "string" },
|
|
17
|
+
"feature_spec": { "type": "string" },
|
|
18
|
+
"started_at": { "type": "string", "format": "date-time" },
|
|
19
|
+
"completed_at": { "type": "string", "format": "date-time" },
|
|
20
|
+
"duration_ms": { "type": "integer", "minimum": 0 },
|
|
21
|
+
"status": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"enum": ["pass", "fail", "partial"]
|
|
24
|
+
},
|
|
25
|
+
"expected_files": {
|
|
26
|
+
"type": "array",
|
|
27
|
+
"items": { "type": "string" }
|
|
28
|
+
},
|
|
29
|
+
"files_found": {
|
|
30
|
+
"type": "array",
|
|
31
|
+
"items": { "type": "string" }
|
|
32
|
+
},
|
|
33
|
+
"files_missing": {
|
|
34
|
+
"type": "array",
|
|
35
|
+
"items": { "type": "string" }
|
|
36
|
+
},
|
|
37
|
+
"acceptance_criteria_results": {
|
|
38
|
+
"type": "array",
|
|
39
|
+
"items": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"required": ["id", "description", "status", "evidence", "verification_type"],
|
|
42
|
+
"properties": {
|
|
43
|
+
"id": { "type": "string" },
|
|
44
|
+
"description": { "type": "string" },
|
|
45
|
+
"status": { "type": "string", "enum": ["pass", "fail"] },
|
|
46
|
+
"evidence": { "type": "string", "description": "What was actually checked and found." },
|
|
47
|
+
"verification_type": { "type": "string" }
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"stages": {
|
|
52
|
+
"type": "array",
|
|
53
|
+
"items": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"required": ["name", "status", "checks_run", "checks_passed"],
|
|
56
|
+
"properties": {
|
|
57
|
+
"name": { "type": "string" },
|
|
58
|
+
"status": { "type": "string", "enum": ["pass", "fail", "skipped"] },
|
|
59
|
+
"duration_ms": { "type": "integer" },
|
|
60
|
+
"checks_run": { "type": "integer", "minimum": 0 },
|
|
61
|
+
"checks_passed": { "type": "integer", "minimum": 0 },
|
|
62
|
+
"details": { "type": "array", "items": { "type": "string" } }
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"validation_summary": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"required": ["total_criteria", "criteria_passed", "criteria_failed"],
|
|
69
|
+
"properties": {
|
|
70
|
+
"total_criteria": { "type": "integer" },
|
|
71
|
+
"criteria_passed": { "type": "integer" },
|
|
72
|
+
"criteria_failed": { "type": "integer" },
|
|
73
|
+
"schemas_valid": { "type": "boolean" },
|
|
74
|
+
"examples_valid": { "type": "boolean" }
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"telemetry": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"required": ["estimated"],
|
|
80
|
+
"properties": {
|
|
81
|
+
"estimated": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"required": ["tokens", "cost_usd", "basis"],
|
|
84
|
+
"properties": {
|
|
85
|
+
"tokens": { "type": "integer" },
|
|
86
|
+
"cost_usd": { "type": "number" },
|
|
87
|
+
"basis": { "type": "string", "description": "How the estimate was calculated." }
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"actual": {
|
|
91
|
+
"oneOf": [
|
|
92
|
+
{ "type": "null" },
|
|
93
|
+
{
|
|
94
|
+
"type": "object",
|
|
95
|
+
"required": ["tokens", "cost_usd"],
|
|
96
|
+
"properties": {
|
|
97
|
+
"tokens": { "type": "integer" },
|
|
98
|
+
"cost_usd": { "type": "number" }
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"description": "Null when no real telemetry is available. Never fabricated."
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"uncertainty": {
|
|
107
|
+
"type": "array",
|
|
108
|
+
"items": { "type": "string" },
|
|
109
|
+
"description": "What this benchmark does NOT prove."
|
|
110
|
+
},
|
|
111
|
+
"limitations": {
|
|
112
|
+
"type": "array",
|
|
113
|
+
"items": { "type": "string" },
|
|
114
|
+
"description": "Inherited from the feature spec — scope boundaries of the verification."
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"additionalProperties": false
|
|
118
|
+
}
|