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 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"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;IACxB,iBAAiB,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAA;CACjE;AAED,MAAM,WAAW,IAAI;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAA;IAChD,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,WAAW,CAAA;IACxB,KAAK,CAAC,EAAE,IAAI,EAAE,CAAA;IACd,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;IACzB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE;QACT,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,CAAA;CACF;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAOvD;AAID,yCAAyC;AACzC,eAAO,MAAM,qBAAqB,iBAAW,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.validateAgainstSchema = exports.schemas = void 0;
7
+ exports.validate = validate;
8
+ exports.getSchema = getSchema;
9
+ exports.getSchemaNames = getSchemaNames;
10
+ exports.loadFeatureSpec = loadFeatureSpec;
11
+ exports.createHandoff = createHandoff;
12
+ /**
13
+ * ZenKit — Programmatic API
14
+ *
15
+ * Usage:
16
+ * import { validate, schemas, loadFeatureSpec } from 'zenkit'
17
+ *
18
+ * const result = validate('handoff', myData)
19
+ * if (!result.valid) console.error(result.errors)
20
+ */
21
+ const fs_1 = __importDefault(require("fs"));
22
+ const path_1 = __importDefault(require("path"));
23
+ const ajv_1 = __importDefault(require("ajv"));
24
+ const ajv_formats_1 = __importDefault(require("ajv-formats"));
25
+ // --- Schema Loading ---
26
+ const handoff_schema_json_1 = __importDefault(require("../schemas/handoff.schema.json"));
27
+ const task_schema_json_1 = __importDefault(require("../schemas/task.schema.json"));
28
+ const audit_schema_json_1 = __importDefault(require("../schemas/audit.schema.json"));
29
+ const checkpoint_schema_json_1 = __importDefault(require("../schemas/checkpoint.schema.json"));
30
+ const benchmark_schema_json_1 = __importDefault(require("../schemas/benchmark.schema.json"));
31
+ const feature_spec_schema_json_1 = __importDefault(require("../schemas/feature-spec.schema.json"));
32
+ const ajv = new ajv_1.default({ allErrors: true, strict: false });
33
+ (0, ajv_formats_1.default)(ajv);
34
+ exports.schemas = {
35
+ handoff: handoff_schema_json_1.default,
36
+ task: task_schema_json_1.default,
37
+ audit: audit_schema_json_1.default,
38
+ checkpoint: checkpoint_schema_json_1.default,
39
+ benchmark: benchmark_schema_json_1.default,
40
+ 'feature-spec': feature_spec_schema_json_1.default,
41
+ };
42
+ const validators = {
43
+ handoff: ajv.compile(handoff_schema_json_1.default),
44
+ task: ajv.compile(task_schema_json_1.default),
45
+ audit: ajv.compile(audit_schema_json_1.default),
46
+ checkpoint: ajv.compile(checkpoint_schema_json_1.default),
47
+ benchmark: ajv.compile(benchmark_schema_json_1.default),
48
+ 'feature-spec': ajv.compile(feature_spec_schema_json_1.default),
49
+ };
50
+ /**
51
+ * Validate data against a named ZenKit schema.
52
+ *
53
+ * @example
54
+ * const result = validate('handoff', { context: '...', ... })
55
+ * if (!result.valid) console.error(result.errors)
56
+ */
57
+ function validate(schemaName, data) {
58
+ const validator = validators[schemaName];
59
+ if (!validator) {
60
+ return {
61
+ valid: false,
62
+ errors: [{ path: '/', message: `Unknown schema: ${schemaName}`, keyword: 'schema' }],
63
+ schemaName,
64
+ };
65
+ }
66
+ const valid = validator(data);
67
+ return {
68
+ valid,
69
+ errors: valid
70
+ ? []
71
+ : (validator.errors || []).map((err) => ({
72
+ path: err.instancePath || '/',
73
+ message: err.message || 'Unknown validation error',
74
+ keyword: err.keyword,
75
+ })),
76
+ schemaName,
77
+ };
78
+ }
79
+ /**
80
+ * Get the raw JSON Schema object for a named schema.
81
+ */
82
+ function getSchema(name) {
83
+ return exports.schemas[name];
84
+ }
85
+ /**
86
+ * List all available schema names.
87
+ */
88
+ function getSchemaNames() {
89
+ return Object.keys(exports.schemas);
90
+ }
91
+ /**
92
+ * Load and validate a feature spec from a JSON file.
93
+ * Returns the parsed spec if valid, throws if invalid.
94
+ */
95
+ function loadFeatureSpec(specPath) {
96
+ const resolved = path_1.default.resolve(specPath);
97
+ const raw = fs_1.default.readFileSync(resolved, 'utf-8');
98
+ const data = JSON.parse(raw);
99
+ const result = validate('feature-spec', data);
100
+ if (!result.valid) {
101
+ const errorMsg = result.errors.map(e => `${e.path}: ${e.message}`).join(', ');
102
+ throw new Error(`Invalid feature spec: ${errorMsg}`);
103
+ }
104
+ return data;
105
+ }
106
+ /**
107
+ * Create and validate a handoff object.
108
+ * Returns the handoff if valid, throws if invalid.
109
+ */
110
+ function createHandoff(handoff) {
111
+ const result = validate('handoff', handoff);
112
+ if (!result.valid) {
113
+ const errorMsg = result.errors.map(e => `${e.path}: ${e.message}`).join(', ');
114
+ throw new Error(`Invalid handoff: ${errorMsg}`);
115
+ }
116
+ return handoff;
117
+ }
118
+ // --- Re-exports for backwards compatibility ---
119
+ /** @deprecated Use `validate` instead */
120
+ exports.validateAgainstSchema = validate;
121
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAmEA,4BAsBC;AAKD,8BAEC;A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,CAAC,CAAA;QAC7E,MAAM,IAAI,KAAK,CAAC,yBAAyB,QAAQ,EAAE,CAAC,CAAA;IACtD,CAAC;IAED,OAAO,IAAmB,CAAA;AAC5B,CAAC;AAkCD;;;GAGG;AACH,SAAgB,aAAa,CAAC,OAAgB;IAC5C,MAAM,MAAM,GAAG,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;IAC3C,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QAClB,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC7E,MAAM,IAAI,KAAK,CAAC,oBAAoB,QAAQ,EAAE,CAAC,CAAA;IACjD,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC;AAED,iDAAiD;AAEjD,yCAAyC;AAC5B,QAAA,qBAAqB,GAAG,QAAQ,CAAA"}
@@ -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
+ }
@@ -0,0 +1,64 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://zenkit.dev/schemas/checkpoint.schema.json",
4
+ "title": "ZenKit Checkpoint",
5
+ "description": "A snapshot of workflow state at a specific point in execution.",
6
+ "type": "object",
7
+ "required": ["checkpoint_id", "task_id", "status", "timestamp"],
8
+ "properties": {
9
+ "checkpoint_id": {
10
+ "type": "string",
11
+ "pattern": "^chk-[a-z0-9-]+$"
12
+ },
13
+ "task_id": {
14
+ "type": "string"
15
+ },
16
+ "timestamp": {
17
+ "type": "string",
18
+ "format": "date-time"
19
+ },
20
+ "status": {
21
+ "type": "string",
22
+ "enum": ["snapshot", "gate", "rollback_point"]
23
+ },
24
+ "stage": {
25
+ "type": "string",
26
+ "enum": ["plan", "build", "audit", "ship"]
27
+ },
28
+ "state": {
29
+ "type": "object",
30
+ "properties": {
31
+ "files_changed": {
32
+ "type": "array",
33
+ "items": { "type": "string" }
34
+ },
35
+ "tests_passing": { "type": "boolean" },
36
+ "lint_passing": { "type": "boolean" },
37
+ "git_ref": { "type": "string" },
38
+ "notes": { "type": "string" }
39
+ }
40
+ },
41
+ "gate_conditions": {
42
+ "type": "array",
43
+ "items": {
44
+ "type": "object",
45
+ "properties": {
46
+ "condition": { "type": "string" },
47
+ "met": { "type": "boolean" }
48
+ },
49
+ "required": ["condition", "met"]
50
+ }
51
+ },
52
+ "metadata": {
53
+ "type": "object",
54
+ "properties": {
55
+ "agent": { "type": "string" },
56
+ "command": { "type": "string" },
57
+ "iteration": { "type": "integer" },
58
+ "tokens_used": { "type": "integer" },
59
+ "cost_estimate_usd": { "type": "number" }
60
+ }
61
+ }
62
+ },
63
+ "additionalProperties": false
64
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://zenkit.dev/schemas/feature-spec.schema.json",
4
+ "title": "ZenKit Feature Spec",
5
+ "description": "Machine-readable feature specification for ZenKit benchmarks.",
6
+ "type": "object",
7
+ "required": ["feature_id", "name", "description", "mode", "acceptance_criteria", "constraints", "expected_files", "limitations"],
8
+ "properties": {
9
+ "feature_id": {
10
+ "type": "string",
11
+ "pattern": "^[a-z0-9-]+$"
12
+ },
13
+ "name": {
14
+ "type": "string",
15
+ "minLength": 1
16
+ },
17
+ "description": {
18
+ "type": "string"
19
+ },
20
+ "mode": {
21
+ "type": "string",
22
+ "enum": ["zenkit", "baseline"]
23
+ },
24
+ "acceptance_criteria": {
25
+ "type": "array",
26
+ "minItems": 1,
27
+ "items": {
28
+ "type": "object",
29
+ "required": ["id", "description", "verification"],
30
+ "properties": {
31
+ "id": { "type": "string" },
32
+ "description": { "type": "string" },
33
+ "verification": {
34
+ "type": "object",
35
+ "required": ["type"],
36
+ "properties": {
37
+ "type": {
38
+ "type": "string",
39
+ "enum": ["file_exists", "file_contains", "schema_count", "examples_valid", "schemas_consistent", "test_passes", "json_path_equals"]
40
+ },
41
+ "path": { "type": "string" },
42
+ "pattern": { "type": "string" },
43
+ "command": { "type": "string", "description": "Shell command to run for test_passes verification." },
44
+ "json_path": { "type": "string", "description": "Dot-separated path into JSON for json_path_equals." },
45
+ "equals": { "description": "Expected value for json_path_equals." },
46
+ "expected": { "type": "integer" }
47
+ }
48
+ }
49
+ }
50
+ }
51
+ },
52
+ "constraints": {
53
+ "type": "array",
54
+ "items": { "type": "string" }
55
+ },
56
+ "expected_files": {
57
+ "type": "array",
58
+ "items": { "type": "string" }
59
+ },
60
+ "assigned_commands": {
61
+ "type": "array",
62
+ "items": { "type": "string" }
63
+ },
64
+ "estimated_complexity": {
65
+ "type": "string",
66
+ "enum": ["low", "medium", "high"]
67
+ },
68
+ "limitations": {
69
+ "type": "array",
70
+ "minItems": 1,
71
+ "items": { "type": "string" },
72
+ "description": "What this spec does NOT verify. Required — specs must be honest about scope."
73
+ }
74
+ },
75
+ "additionalProperties": false
76
+ }
@@ -0,0 +1,78 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://zenkit.dev/schemas/handoff.schema.json",
4
+ "title": "ZenKit Handoff Contract",
5
+ "description": "Structured handoff between agents or workflow stages in ZenKit.",
6
+ "type": "object",
7
+ "required": ["context", "assumptions", "decision", "deliverable", "next_agent"],
8
+ "properties": {
9
+ "context": {
10
+ "type": "string",
11
+ "description": "What is the current situation? What has happened so far?"
12
+ },
13
+ "assumptions": {
14
+ "type": "array",
15
+ "items": { "type": "string" },
16
+ "description": "Explicit assumptions made during this stage."
17
+ },
18
+ "constraints": {
19
+ "type": "array",
20
+ "items": { "type": "string" },
21
+ "description": "Hard constraints that bound this work."
22
+ },
23
+ "decision": {
24
+ "type": "string",
25
+ "description": "What was decided and why."
26
+ },
27
+ "deliverable": {
28
+ "type": "object",
29
+ "properties": {
30
+ "type": {
31
+ "type": "string",
32
+ "enum": ["code", "document", "schema", "plan", "review", "test", "artifact"]
33
+ },
34
+ "description": { "type": "string" },
35
+ "files_changed": {
36
+ "type": "array",
37
+ "items": { "type": "string" }
38
+ },
39
+ "validation_status": {
40
+ "type": "string",
41
+ "enum": ["passed", "failed", "partial", "untested"]
42
+ }
43
+ },
44
+ "required": ["type", "description"]
45
+ },
46
+ "risks": {
47
+ "type": "array",
48
+ "items": {
49
+ "type": "object",
50
+ "properties": {
51
+ "description": { "type": "string" },
52
+ "severity": { "type": "string", "enum": ["low", "medium", "high", "critical"] },
53
+ "mitigation": { "type": "string" }
54
+ },
55
+ "required": ["description", "severity"]
56
+ }
57
+ },
58
+ "open_questions": {
59
+ "type": "array",
60
+ "items": { "type": "string" },
61
+ "description": "Unresolved questions that the next agent should address."
62
+ },
63
+ "next_agent": {
64
+ "type": "string",
65
+ "description": "The agent or role that should receive this handoff."
66
+ },
67
+ "metadata": {
68
+ "type": "object",
69
+ "properties": {
70
+ "timestamp": { "type": "string", "format": "date-time" },
71
+ "source_agent": { "type": "string" },
72
+ "command": { "type": "string" },
73
+ "iteration": { "type": "integer", "minimum": 0 }
74
+ }
75
+ }
76
+ },
77
+ "additionalProperties": false
78
+ }
@@ -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
+ }