@kontourai/flow-agents 3.3.0 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/add-to-project.yml +15 -0
- package/.github/workflows/ci.yml +161 -0
- package/CHANGELOG.md +48 -0
- package/CONTEXT.md +5 -1
- package/README.md +19 -8
- package/build/src/builder-flow-run-adapter.d.ts +80 -0
- package/build/src/builder-flow-run-adapter.js +241 -0
- package/build/src/builder-flow-runtime.d.ts +16 -0
- package/build/src/builder-flow-runtime.js +290 -0
- package/build/src/cli/builder-run.d.ts +1 -0
- package/build/src/cli/builder-run.js +27 -0
- package/build/src/cli/effective-backlog-settings.js +70 -2
- package/build/src/cli/init.d.ts +34 -0
- package/build/src/cli/init.js +341 -61
- package/build/src/cli/kit.js +55 -12
- package/build/src/cli/pull-work-provider.js +346 -5
- package/build/src/cli/skill-drift-check.d.ts +1 -0
- package/build/src/cli/skill-drift-check.js +165 -0
- package/build/src/cli/telemetry-doctor.d.ts +37 -0
- package/build/src/cli/telemetry-doctor.js +53 -6
- package/build/src/cli/validate-hook-influence.js +37 -7
- package/build/src/cli/workflow-sidecar.d.ts +93 -8
- package/build/src/cli/workflow-sidecar.js +1175 -158
- package/build/src/cli.js +5 -0
- package/build/src/flow-kit/validate.d.ts +54 -34
- package/build/src/flow-kit/validate.js +237 -26
- package/build/src/index.d.ts +2 -0
- package/build/src/index.js +1 -0
- package/build/src/lib/console-connect-options.d.ts +97 -0
- package/build/src/lib/console-connect-options.js +199 -0
- package/build/src/lib/console-telemetry-validate.d.ts +49 -0
- package/build/src/lib/console-telemetry-validate.js +91 -0
- package/build/src/lib/flow-resolver.d.ts +56 -3
- package/build/src/lib/flow-resolver.js +151 -11
- package/build/src/lib/fs.d.ts +17 -0
- package/build/src/lib/fs.js +172 -0
- package/build/src/lib/local-artifact-root.d.ts +44 -1
- package/build/src/lib/local-artifact-root.js +131 -3
- package/build/src/runtime-adapters.d.ts +39 -3
- package/build/src/runtime-adapters.js +77 -31
- package/build/src/tools/build-universal-bundles.js +40 -2
- package/build/src/tools/codex-agent-routing.d.ts +2 -0
- package/build/src/tools/codex-agent-routing.js +49 -0
- package/build/src/tools/generate-context-map.js +1 -0
- package/build/src/tools/validate-source-tree.js +27 -1
- package/context/scripts/hooks/lib/kit-catalog.js +235 -0
- package/context/scripts/hooks/lib/runnable-command.js +177 -0
- package/context/scripts/hooks/stop-goal-fit.js +278 -48
- package/context/scripts/hooks/workflow-steering.js +121 -21
- package/context/scripts/package.json +3 -0
- package/context/scripts/telemetry/install-console-config.sh +25 -4
- package/context/scripts/telemetry/lib/config.sh +102 -12
- package/context/scripts/telemetry/lib/pricing.sh +50 -0
- package/context/scripts/telemetry/lib/session.sh +3 -0
- package/context/scripts/telemetry/lib/transport.sh +87 -0
- package/context/scripts/telemetry/lib/usage.sh +205 -4
- package/context/scripts/telemetry/telemetry.conf +6 -0
- package/context/scripts/telemetry/telemetry.sh +48 -0
- package/context/settings/workspace-backlog-provider-settings.example.json +48 -0
- package/docs/agent-usage-feedback-loop.md +35 -0
- package/docs/architecture-engine-and-kits.md +110 -0
- package/docs/context-map.md +2 -0
- package/docs/decisions/embeddable-engine.md +152 -0
- package/docs/decisions/index.md +3 -1
- package/docs/decisions/trust-ledger-retention.md +88 -0
- package/docs/decisions/workflow-enforcement.md +31 -9
- package/docs/fixture-ownership.md +3 -0
- package/docs/implementing-trust-reconciliation.md +129 -0
- package/docs/index.md +19 -9
- package/docs/integrations/flow-agents-console.md +167 -0
- package/docs/kit-authoring-guide.md +52 -21
- package/docs/spec/builder-flow-runtime.md +80 -0
- package/docs/spec/runtime-hook-surface.md +45 -1
- package/docs/specs/economics-record-contract.md +270 -0
- package/docs/specs/harness-capability-matrix.md +74 -0
- package/docs/specs/learning-review-proposals-contract.md +340 -0
- package/docs/specs/routing-efficiency-review.md +59 -0
- package/docs/verifiable-trust.md +74 -25
- package/docs/workflow-usage-guide.md +10 -0
- package/evals/acceptance/prove-capture-teeth.sh +132 -0
- package/evals/ci/antigaming-suite.sh +1 -0
- package/evals/ci/run-baseline.sh +72 -4
- package/evals/fixtures/economics/acceptance.json +12 -0
- package/evals/fixtures/economics/agents/tool-worker-1/events.jsonl +2 -0
- package/evals/fixtures/economics/agents/tool-worker-2/events.jsonl +2 -0
- package/evals/fixtures/economics/agents/tool-worker-3/events.jsonl +2 -0
- package/evals/fixtures/economics/agents/tool-worker-4/events.jsonl +1 -0
- package/evals/fixtures/economics/agents/tool-worker-5/events.jsonl +2 -0
- package/evals/fixtures/economics/critique.json +22 -0
- package/evals/fixtures/economics/expected-record.json +71 -0
- package/evals/fixtures/economics/session-usage-event.json +1 -0
- package/evals/fixtures/economics/state.json +11 -0
- package/evals/fixtures/economics/transcript.jsonl +3 -0
- package/evals/fixtures/hook-influence/cases.json +7 -7
- package/evals/fixtures/learning-review-proposals/balanced/economics.jsonl +6 -0
- package/evals/fixtures/learning-review-proposals/effect-follow-up/economics.jsonl +5 -0
- package/evals/fixtures/learning-review-proposals/effect-follow-up/sessions/task-lr-ef-1/trust.bundle +21 -0
- package/evals/fixtures/learning-review-proposals/effect-follow-up/sessions/task-lr-ef-2/trust.bundle +21 -0
- package/evals/fixtures/learning-review-proposals/effect-follow-up/sessions/task-lr-ef-3/trust.bundle +21 -0
- package/evals/fixtures/learning-review-proposals/effect-follow-up/sessions/task-lr-ef-4/trust.bundle +21 -0
- package/evals/fixtures/learning-review-proposals/effect-follow-up/sessions/task-lr-ef-5/trust.bundle +21 -0
- package/evals/fixtures/learning-review-proposals/pattern-present/economics.jsonl +6 -0
- package/evals/fixtures/learning-review-proposals/pattern-present/expected-aggregates.json +30 -0
- package/evals/fixtures/learning-review-proposals/pattern-present/expected-aggregates.md +66 -0
- package/evals/fixtures/learning-review-proposals/pattern-present/sessions/task-lr-pp-1/gate-review.inquiries.json +26 -0
- package/evals/fixtures/learning-review-proposals/pattern-present/sessions/task-lr-pp-1/trust.bundle +21 -0
- package/evals/fixtures/learning-review-proposals/pattern-present/sessions/task-lr-pp-2/gate-review.inquiries.json +26 -0
- package/evals/fixtures/learning-review-proposals/pattern-present/sessions/task-lr-pp-2/trust.bundle +21 -0
- package/evals/fixtures/learning-review-proposals/pattern-present/sessions/task-lr-pp-3/gate-review.inquiries.json +26 -0
- package/evals/fixtures/learning-review-proposals/pattern-present/sessions/task-lr-pp-3/trust.bundle +21 -0
- package/evals/fixtures/learning-review-proposals/pattern-present/sessions/task-lr-pp-4/gate-review.inquiries.json +26 -0
- package/evals/fixtures/learning-review-proposals/pattern-present/sessions/task-lr-pp-4/trust.bundle +21 -0
- package/evals/fixtures/learning-review-proposals/pattern-present/sessions/task-lr-pp-5/trust.bundle +21 -0
- package/evals/fixtures/learning-review-proposals/pattern-present/sessions/task-lr-pp-6/trust.bundle +21 -0
- package/evals/fixtures/learning-review-proposals/repeat-window/economics.jsonl +6 -0
- package/evals/fixtures/learning-review-proposals/under-threshold/economics.jsonl +3 -0
- package/evals/fixtures/telemetry/usage-transcript-sample.jsonl +4 -0
- package/evals/fixtures/trust-reconcile-exploits/mcp-degrade.json +42 -0
- package/evals/integration/test_builder_entry_enforcement.sh +241 -0
- package/evals/integration/test_builder_step_producers.sh +18 -10
- package/evals/integration/test_bundle_install.sh +172 -0
- package/evals/integration/test_console_tenant_isolation.sh +167 -0
- package/evals/integration/test_critique_supersession_roundtrip.sh +4 -1
- package/evals/integration/test_dual_emit_flow_step.sh +10 -4
- package/evals/integration/test_economics_record.sh +674 -0
- package/evals/integration/test_effective_backlog_settings.sh +1 -1
- package/evals/integration/test_evidence_capture_hook.sh +17 -2
- package/evals/integration/test_exemption_usage_review.sh +198 -0
- package/evals/integration/test_fixture_retirement_audit.sh +2 -2
- package/evals/integration/test_flow_kit_install_git.sh +83 -0
- package/evals/integration/test_flowdef_session_activation.sh +0 -1
- package/evals/integration/test_flowdef_session_history_preservation.sh +13 -3
- package/evals/integration/test_gate_lockdown.sh +7 -0
- package/evals/integration/test_gate_review_inquiry_records.sh +9 -1
- package/evals/integration/test_goal_fit_hook.sh +2031 -0
- package/evals/integration/test_hook_category_behaviors.sh +8 -1
- package/evals/integration/test_hook_influence_cases.sh +25 -1
- package/evals/integration/test_install_merge.sh +227 -2
- package/evals/integration/test_kit_conformance_levels.sh +6 -6
- package/evals/integration/test_learning_review_proposals.sh +329 -0
- package/evals/integration/test_liveness_conflict_injection.sh +26 -22
- package/evals/integration/test_liveness_console_relay.sh +166 -0
- package/evals/integration/test_liveness_heartbeat.sh +17 -17
- package/evals/integration/test_liveness_worktree_root.sh +575 -0
- package/evals/integration/test_phase_map_and_gate_claim.sh +6 -1
- package/evals/integration/test_publish_delivery.sh +331 -1
- package/evals/integration/test_pull_work_board.sh +200 -0
- package/evals/integration/test_pull_work_provider.sh +1 -1
- package/evals/integration/test_record_check.sh +378 -0
- package/evals/integration/test_routing_efficiency.sh +71 -0
- package/evals/integration/test_runtime_adapter_activation.sh +28 -0
- package/evals/integration/test_session_resume_roundtrip.sh +16 -19
- package/evals/integration/test_skill_drift_check.sh +870 -0
- package/evals/integration/test_telemetry.sh +445 -0
- package/evals/integration/test_telemetry_doctor.sh +66 -0
- package/evals/integration/test_telemetry_usage_pipeline.sh +228 -0
- package/evals/integration/test_trust_reconcile_negatives.sh +30 -13
- package/evals/integration/test_trust_reconcile_trailer_diagnostic.sh +247 -0
- package/evals/integration/test_usage_cost.sh +61 -0
- package/evals/integration/test_workflow_sidecar_writer.sh +1395 -0
- package/evals/integration/test_workflow_steering_hook.sh +157 -16
- package/evals/integration/test_workspace_settings.sh +176 -0
- package/evals/lib/env.sh +26 -0
- package/evals/lib/node.sh +8 -0
- package/evals/run.sh +29 -0
- package/evals/static/test_ci_integration_coverage.sh +115 -0
- package/evals/static/test_declared_scope_forms_documented.sh +114 -0
- package/evals/static/test_universal_bundles.sh +34 -0
- package/evals/static/test_validate_source_kit_asset_scope.sh +259 -0
- package/evals/static/test_workflow_skills.sh +1 -1
- package/kits/builder/flows/build.flow.json +9 -18
- package/kits/builder/flows/publish-learn.flow.json +5 -1
- package/kits/builder/kit.json +120 -0
- package/kits/builder/skills/deliver/SKILL.md +42 -0
- package/kits/builder/skills/evidence-gate/SKILL.md +12 -0
- package/kits/builder/skills/execute-plan/SKILL.md +9 -0
- package/kits/builder/skills/learning-review/SKILL.md +51 -0
- package/kits/builder/skills/plan-work/SKILL.md +17 -20
- package/kits/builder/skills/pull-work/SKILL.md +21 -0
- package/kits/builder/skills/release-readiness/SKILL.md +12 -0
- package/kits/knowledge/kit.json +9 -0
- package/kits/veritas-governance/docs/README.md +35 -7
- package/kits/veritas-governance/fixtures/exemption-review/mixed-fresh-stale.DECLARED.json +14 -0
- package/kits/veritas-governance/kit.json +14 -0
- package/kits/veritas-governance/skills/exemption-usage-review/SKILL.md +128 -0
- package/kits/veritas-governance/skills/exemption-usage-review/review-exemptions.mjs +231 -0
- package/package.json +2 -2
- package/packaging/manifest.json +29 -0
- package/schemas/backlog-provider-settings.schema.json +13 -0
- package/schemas/workflow-state.schema.json +44 -0
- package/scripts/README.md +4 -0
- package/scripts/check-content-boundary.cjs +8 -1
- package/scripts/ci/trust-reconcile.js +136 -0
- package/scripts/hooks/codex-hook-adapter.js +77 -2
- package/scripts/hooks/evidence-capture.js +38 -5
- package/scripts/hooks/lib/codex-exit-code.js +316 -0
- package/scripts/hooks/lib/kit-catalog.js +235 -0
- package/scripts/hooks/lib/liveness-write.js +28 -1
- package/scripts/hooks/lib/local-artifact-paths.js +97 -1
- package/scripts/hooks/lib/runnable-command.js +177 -0
- package/scripts/hooks/lib/skill-drift.js +350 -0
- package/scripts/hooks/stop-goal-fit.js +278 -48
- package/scripts/hooks/workflow-steering.js +121 -21
- package/scripts/install-codex-home.sh +97 -47
- package/scripts/install-merge.js +72 -14
- package/scripts/install-owned-files.js +178 -0
- package/scripts/liveness/relay.sh +84 -0
- package/scripts/telemetry/economics-record.schema.json +145 -0
- package/scripts/telemetry/economics-record.sh +331 -0
- package/scripts/telemetry/install-console-config.sh +25 -4
- package/scripts/telemetry/learning-review-decide.sh +124 -0
- package/scripts/telemetry/learning-review-proposals.schema.json +161 -0
- package/scripts/telemetry/learning-review-proposals.sh +484 -0
- package/scripts/telemetry/lib/config.sh +102 -12
- package/scripts/telemetry/lib/pricing.sh +14 -6
- package/scripts/telemetry/lib/session.sh +3 -0
- package/scripts/telemetry/lib/transport.sh +133 -15
- package/scripts/telemetry/lib/usage.sh +121 -28
- package/scripts/telemetry/routing-efficiency.sh +0 -0
- package/scripts/telemetry/telemetry.conf +6 -0
- package/scripts/telemetry/telemetry.sh +48 -0
- package/src/builder-flow-run-adapter.ts +357 -0
- package/src/builder-flow-runtime.ts +348 -0
- package/src/cli/builder-flow-run-adapter.test.mjs +495 -0
- package/src/cli/builder-flow-runtime.test.mjs +213 -0
- package/src/cli/builder-run.ts +28 -0
- package/src/cli/codex-agent-routing.test.mjs +44 -0
- package/src/cli/codex-exit-code.test.mjs +207 -0
- package/src/cli/console-connect-options.test.mjs +329 -0
- package/src/cli/console-telemetry-validate.test.mjs +157 -0
- package/src/cli/effective-backlog-settings.ts +68 -2
- package/src/cli/flow-resolver-composition.test.mjs +101 -0
- package/src/cli/init.test.mjs +161 -0
- package/src/cli/init.ts +407 -62
- package/src/cli/kit-metadata-security.test.mjs +443 -0
- package/src/cli/kit.ts +50 -12
- package/src/cli/pull-work-provider.ts +377 -3
- package/src/cli/sidecar-pure-helpers.test.mjs +64 -0
- package/src/cli/skill-drift-check.ts +196 -0
- package/src/cli/telemetry-doctor.test.mjs +53 -0
- package/src/cli/telemetry-doctor.ts +50 -7
- package/src/cli/validate-hook-influence.ts +37 -6
- package/src/cli/workflow-sidecar.ts +1150 -151
- package/src/cli.ts +5 -0
- package/src/flow-kit/validate.ts +277 -38
- package/src/index.ts +19 -0
- package/src/lib/console-connect-options.ts +261 -0
- package/src/lib/console-telemetry-validate.ts +88 -0
- package/src/lib/flow-resolver.ts +153 -10
- package/src/lib/fs.ts +160 -0
- package/src/lib/local-artifact-root.ts +129 -3
- package/src/runtime-adapters.ts +113 -33
- package/src/tools/build-universal-bundles.ts +36 -2
- package/src/tools/codex-agent-routing.ts +48 -0
- package/src/tools/generate-context-map.ts +1 -0
- package/src/tools/validate-source-tree.ts +26 -1
package/kits/builder/kit.json
CHANGED
|
@@ -27,6 +27,126 @@
|
|
|
27
27
|
"reason": "learning-review invokes knowledge-capture (kits/knowledge/skills/knowledge-capture/SKILL.md) for durable knowledge storage"
|
|
28
28
|
}
|
|
29
29
|
],
|
|
30
|
+
"first_party": true,
|
|
31
|
+
"workflow_triggers": [
|
|
32
|
+
{
|
|
33
|
+
"id": "builder-build-work",
|
|
34
|
+
"when": "implementation-work-detected",
|
|
35
|
+
"target_flow_id": "builder.build",
|
|
36
|
+
"default_skill": "deliver",
|
|
37
|
+
"conditional_skills": [
|
|
38
|
+
{
|
|
39
|
+
"when": "user-requested-tdd",
|
|
40
|
+
"skill": "tdd-workflow"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"required_sequence": ["plan-work", "execute-plan", "review-work", "verify-work"],
|
|
44
|
+
"post_verify_targets": ["release-readiness", "learning-review"]
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"flow_step_actions": [
|
|
48
|
+
{
|
|
49
|
+
"flow_id": "builder.build",
|
|
50
|
+
"step_id": "pull-work",
|
|
51
|
+
"skills": ["pull-work"]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"flow_id": "builder.build",
|
|
55
|
+
"step_id": "design-probe",
|
|
56
|
+
"skills": ["pickup-probe"]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"flow_id": "builder.build",
|
|
60
|
+
"step_id": "plan",
|
|
61
|
+
"skills": ["plan-work"]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"flow_id": "builder.build",
|
|
65
|
+
"step_id": "execute",
|
|
66
|
+
"skills": ["execute-plan"]
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"flow_id": "builder.build",
|
|
70
|
+
"step_id": "verify",
|
|
71
|
+
"skills": ["review-work", "verify-work"]
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"flow_id": "builder.build",
|
|
75
|
+
"step_id": "merge-ready",
|
|
76
|
+
"skills": ["evidence-gate"]
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"flow_id": "builder.build",
|
|
80
|
+
"step_id": "pr-open",
|
|
81
|
+
"skills": [],
|
|
82
|
+
"operations": ["publish-change"]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"flow_id": "builder.build",
|
|
86
|
+
"step_id": "merge-ready-ci",
|
|
87
|
+
"skills": ["release-readiness"]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"flow_id": "builder.build",
|
|
91
|
+
"step_id": "learn",
|
|
92
|
+
"skills": ["learning-review"]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"flow_id": "builder.build",
|
|
96
|
+
"step_id": "done",
|
|
97
|
+
"skills": []
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"hook_influence_expectations": [
|
|
101
|
+
{
|
|
102
|
+
"id": "dev-builder-build-requires-pickup-probe-before-plan",
|
|
103
|
+
"description": "missing pickup Probe before plan",
|
|
104
|
+
"tier": "design-target",
|
|
105
|
+
"must_include_guidance": [
|
|
106
|
+
"design-probe",
|
|
107
|
+
"accepted gaps",
|
|
108
|
+
"provider_state",
|
|
109
|
+
"conflict_risks"
|
|
110
|
+
],
|
|
111
|
+
"must_include_actions": [
|
|
112
|
+
"route decision_gap back to design-probe/pickup Probe"
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"id": "dev-builder-review-before-verify-after-execute",
|
|
117
|
+
"description": "review-before-verify after execute",
|
|
118
|
+
"tier": "adapter",
|
|
119
|
+
"event": "PostToolUse",
|
|
120
|
+
"must_include_guidance": [
|
|
121
|
+
"Next: review",
|
|
122
|
+
"then verify",
|
|
123
|
+
"report only"
|
|
124
|
+
],
|
|
125
|
+
"must_include_actions": [
|
|
126
|
+
"review-work for report-only critique before verify-work",
|
|
127
|
+
"not count critique.json as verification evidence"
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"id": "dev-builder-route-fresh-coding-prompt",
|
|
132
|
+
"description": "fresh coding prompt routes into Builder workflow",
|
|
133
|
+
"tier": "adapter",
|
|
134
|
+
"event": "UserPromptSubmit",
|
|
135
|
+
"must_include_guidance": [
|
|
136
|
+
"KIT WORKFLOW ROUTE",
|
|
137
|
+
"activate `deliver`",
|
|
138
|
+
"--flow-id builder.build",
|
|
139
|
+
"plan-work -> execute-plan -> review-work -> verify-work",
|
|
140
|
+
"release-readiness and learning-review"
|
|
141
|
+
],
|
|
142
|
+
"must_include_actions": [
|
|
143
|
+
"use the `builder` kit's `builder.build` workflow before source edits",
|
|
144
|
+
"use deliver by default for coding/build work",
|
|
145
|
+
"do not bypass plan-work -> execute-plan -> review-work -> verify-work",
|
|
146
|
+
"publish, release readiness, and learning feedback"
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
],
|
|
30
150
|
"skills": [
|
|
31
151
|
{
|
|
32
152
|
"id": "builder.builder-shape",
|
|
@@ -266,6 +266,48 @@ After review, verification, evidence, and Goal Fit are clean for the same diff:
|
|
|
266
266
|
npm run workflow:sidecar -- reconcile-preflight .kontourai/flow-agents/<slug>
|
|
267
267
|
```
|
|
268
268
|
|
|
269
|
+
**#381 — manifest-lane constraint: which commands may be `kind:"command"` checks.** A check/claim
|
|
270
|
+
is only CI-reconcilable as `kind:"command"` (Surface's `test_output` evidence type) if its
|
|
271
|
+
command is a registered entry in the **trust-reconcile manifest** — the same
|
|
272
|
+
`{"id":..,"command":..,"lanes":[..]}` list `evals/ci/run-baseline.sh --manifest-json` emits
|
|
273
|
+
from its `CHECKS` array (source of truth: `evals/ci/run-baseline.sh` lines 12-67 for the
|
|
274
|
+
array, 166-182 for `emit_manifest_json`). `scripts/ci/trust-reconcile.js` resolves this same
|
|
275
|
+
manifest (`resolveManifest`/`manifestByCmd`, lines 292-370, 1101-1104) and reconciles a
|
|
276
|
+
`kind:"command"` claim's `execution.label` ONLY against it — a command not in the manifest
|
|
277
|
+
can never reconcile, and CI's reconciler names it exactly this way: `trust divergence: agent
|
|
278
|
+
claimed '<cmd>' passed; command is not in the reconcile manifest — a test_output claim must
|
|
279
|
+
name a manifest/required-lane command (CI cannot self-declare an arbitrary command)`. An
|
|
280
|
+
honest capture-backed check recorded against a real, passing, non-manifest command still
|
|
281
|
+
becomes this `not-run` divergence at CI reconcile time — it is not a shape bug to route
|
|
282
|
+
around, it is the manifest boundary working as designed. Anything that is not a registered
|
|
283
|
+
manifest command records as `kind:"external"` (a session-local attestation — e.g. a manual
|
|
284
|
+
code-review judgment) or `kind:"policy"` (a policy/compliance attestation — e.g. `promote`'s
|
|
285
|
+
claim, which carries no `command`/`execution.label` and therefore can never require a
|
|
286
|
+
manifest entry). This matters at every writer call that can produce a `kind:"command"`
|
|
287
|
+
check — `record-evidence`, `record-gate-claim --command`, and `record-check` — and again at
|
|
288
|
+
the `publish-delivery`/`reconcile-preflight` step above, which is where a non-manifest
|
|
289
|
+
command surfaces as a refusal before CI ever sees it. Gate claims recorded earlier in a
|
|
290
|
+
session are not special-cased here: the compose-safe writer path keeps every prior gate
|
|
291
|
+
claim's declared claim type intact across later `record-evidence`/`record-critique`/
|
|
292
|
+
`record-learning` calls, so a gate claim never needs to be the last write of a session to
|
|
293
|
+
survive.
|
|
294
|
+
|
|
295
|
+
- `kind:"command"` (manifest-backed) example — a real, currently-registered manifest entry
|
|
296
|
+
("Source tree validation" → `npm run validate:source --`):
|
|
297
|
+
|
|
298
|
+
```bash
|
|
299
|
+
npm run workflow:sidecar -- record-check .kontourai/flow-agents/<slug> -- npm run validate:source --
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
- `kind:"external"` (non-manifest attestation) example — no `--command`, so nothing is
|
|
303
|
+
ever executed; the prose lives in `--summary`:
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
npm run workflow:sidecar -- record-gate-claim .kontourai/flow-agents/<slug> \
|
|
307
|
+
--status pass \
|
|
308
|
+
--summary "Manual code review confirmed no regressions in the affected module."
|
|
309
|
+
```
|
|
310
|
+
|
|
269
311
|
**#379 — per-session delivery paths.** `publishDelivery()` writes to a PER-SESSION path
|
|
270
312
|
`delivery/<slug>/trust.bundle` (+ `trust.checkpoint.json` companions), where `<slug>` is
|
|
271
313
|
your session artifact dir's basename — NOT the old shared flat `delivery/trust.bundle`.
|
|
@@ -208,4 +208,16 @@ explicitly accepts them as unrelated residual risk.
|
|
|
208
208
|
|
|
209
209
|
Evidence passes only when acceptance criteria, scope integrity, CI/runtime evidence, and residual risk are sufficient for the risk class.
|
|
210
210
|
|
|
211
|
+
For an active Builder Flow run, record merge readiness only after this skill reaches `PASS`:
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
npm run workflow:sidecar -- record-gate-claim .kontourai/flow-agents/<slug> \
|
|
215
|
+
--expectation merge-readiness \
|
|
216
|
+
--status pass \
|
|
217
|
+
--summary "Evidence gate passed: verified scope, acceptance evidence, review findings, and unresolved risks support provider review." \
|
|
218
|
+
--evidence-ref-json '{"kind":"artifact","file":".kontourai/flow-agents/<slug>/evidence.json","summary":"Structured evidence verdict and acceptance coverage."}'
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Record `fail` or `not_verified` when the verdict is not `PASS`. The resulting trust bundle is evaluated by Flow and may route back to verification, execution, planning, or Probe according to the canonical definition.
|
|
222
|
+
|
|
211
223
|
After `PASS`, hand off to `publish-change` when the work is still local, or to `release-readiness` when the verified commit, pushed branch, provider change record or no-provider-change reason, provider checks, closing refs, structured evidence refs, and `Acceptance Evidence` table are available. After `FAIL` or `NOT_VERIFIED`, stop and name the missing work or evidence.
|
|
@@ -79,6 +79,15 @@ This skill owns orchestration between waves. The contracts own artifact continui
|
|
|
79
79
|
- **Checkpoint**: update session file with completed tasks and next wave
|
|
80
80
|
- Record worker progress with `npm run workflow:sidecar -- record-agent-event --artifact-dir <artifact-dir> --agent-id <worker-id> --kind evidence --status active|done --summary ...`
|
|
81
81
|
9. After all waves: set session file `status: executed` and update `state.json` / `handoff.json` with `advance-state`
|
|
82
|
+
10. For an active Builder Flow run, record the `implementation-scope` gate claim only after the changed-file scope and acceptance mapping are complete:
|
|
83
|
+
```bash
|
|
84
|
+
npm run workflow:sidecar -- record-gate-claim .kontourai/flow-agents/<slug> \
|
|
85
|
+
--expectation implementation-scope \
|
|
86
|
+
--status pass \
|
|
87
|
+
--summary "Implementation completed within the planned scope; changed files and supported acceptance criteria are recorded." \
|
|
88
|
+
--evidence-ref-json '{"kind":"artifact","file":".kontourai/flow-agents/<slug>/<slug>--execute-plan.md","summary":"Execution record with changed files, acceptance mapping, and worker evidence."}'
|
|
89
|
+
```
|
|
90
|
+
Use `fail` or `not_verified` when scope integrity is unresolved. The sidecar writer synchronizes Flow; it does not declare the execute gate passed itself.
|
|
82
91
|
|
|
83
92
|
The orchestrator is responsible for keeping root `state.json` current, and performs that update **exclusively** through `npm run workflow:sidecar -- advance-state` — never through a direct Write/Edit tool call against the sidecar path. `config-protection.js` blocks direct tool-mediated writes to `state.json` by design; that block is expected and correct, not a bug to route around. Workers should receive the workflow artifact root explicitly and append agent events under that root instead of inferring the slug or rewriting shared sidecars.
|
|
84
93
|
|
|
@@ -20,6 +20,8 @@ Turn delivery outcomes into durable learning and follow-up work.
|
|
|
20
20
|
## Inputs
|
|
21
21
|
|
|
22
22
|
- Release-readiness artifact, evidence-gate artifact, PR/issue links, deploy notes, incidents, telemetry, user feedback, and reviewer/verifier notes.
|
|
23
|
+
- **Delegation routing telemetry** — the per-run economics records (`.kontourai/telemetry/economics.jsonl`) carry `delegations[]` with each sub-agent's `(role, resolved_model, outcome)`. Feed them to the routing-efficiency review (step 2a) to judge whether the model each role routes to is actually efficient.
|
|
24
|
+
- **Kit/gate economics proposal ledger** — the same economics records, turned into a durable, idempotent per-kit/per-gate proposal ledger (`.kontourai/telemetry/learning-review-proposals.jsonl`) by `scripts/telemetry/learning-review-proposals.sh`. Feed it to the kit/gate economics review (step 2b).
|
|
23
25
|
|
|
24
26
|
## Artifact Contract
|
|
25
27
|
|
|
@@ -89,6 +91,55 @@ Before identifying durable learnings, write down the intended behavior, observed
|
|
|
89
91
|
|
|
90
92
|
Classify learnings as product, technical, operational, workflow, test, documentation, eval, or agent-behavior learning.
|
|
91
93
|
|
|
94
|
+
### 2a. Review Delegation Routing Efficiency
|
|
95
|
+
|
|
96
|
+
Run the routing-efficiency analyzer over the run's economics records and review its proposals — the
|
|
97
|
+
internal mirror of the #409 small-model value proof, applied to our own agent fan-out:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
bash scripts/telemetry/routing-efficiency.sh .kontourai/telemetry/economics.jsonl
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
It emits ADVISORY per-`(role, model)` proposals (`escalate-minimum-tier`, `keep-tier`, `monitor`,
|
|
104
|
+
`insufficient-signal`) with rationales, computed only from **measurable** outcomes — `unavailable`
|
|
105
|
+
outcomes are excluded (a missing verdict is neither success nor failure; see
|
|
106
|
+
`docs/specs/harness-capability-matrix.md`). Fold any actionable proposal into `learning.json`:
|
|
107
|
+
|
|
108
|
+
- an `escalate-minimum-tier` / demote proposal → a `routing` entry (`target: "rule"`, naming the
|
|
109
|
+
`.datum/config.json` role→model change to consider) or `correction` with `type: "agent"`.
|
|
110
|
+
- **These are proposals, never auto-applied.** A human ratifies the `.datum/config.json` change, which
|
|
111
|
+
then travels the normal deliver loop (ADR 0003 call 5). `insufficient-signal` proposals are recorded
|
|
112
|
+
as coverage notes, not routing changes.
|
|
113
|
+
|
|
114
|
+
### 2b. Review Kit/Gate Economics Proposals
|
|
115
|
+
|
|
116
|
+
Run the kit/gate economics analyzer over a window of economics records whenever enough new
|
|
117
|
+
records have piled up since the last ledger entry — cadenced during a learning-review pass, not
|
|
118
|
+
on a scheduler (see `--help` for the full flag set):
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
bash scripts/telemetry/learning-review-proposals.sh --since <last-run-until> --until <now>
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
It emits ADVISORY per-kit (`kit-review-cost-inflation`) and per-gate (`gate-false-block-review`,
|
|
125
|
+
`gate-well-calibrated`) proposals, each citing paired `evidence.cost` + `evidence.defect` — never
|
|
126
|
+
cost alone. `insufficient-data` is a valid, reportable outcome, not a bar to lower; never propose
|
|
127
|
+
from noise. Surface every new (non-`already_proposed`) proposal to the human with its evidence,
|
|
128
|
+
then record the ratify/reject/defer decision BEFORE any follow-on work exists:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
bash scripts/telemetry/learning-review-decide.sh <ledger> <proposal-id> \
|
|
132
|
+
--ratify|--reject|--defer --decided-by <name> --rationale "<why>"
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
- **These are proposals, never auto-applied.** Nothing here writes to `kits/**`,
|
|
136
|
+
`.datum/config.json`, or any gate/flow config file.
|
|
137
|
+
- Only on `--ratify`, create the ordinary follow-on backlog item and record it back onto the
|
|
138
|
+
proposal with `--follow-on-ref <ref>` — a follow-on may never cite an unratified proposal. A
|
|
139
|
+
later pass's effect-fill shows whether the ratified change actually moved the numbers.
|
|
140
|
+
|
|
141
|
+
See `docs/specs/learning-review-proposals-contract.md` for the full contract.
|
|
142
|
+
|
|
92
143
|
### 3. Route Follow-Up
|
|
93
144
|
|
|
94
145
|
Route raw ideas or ambiguous improvements to `idea-to-backlog`. Create GitHub issues only for executable follow-up. Use `evidence-gate` again when unresolved trust questions remain.
|
|
@@ -137,8 +137,17 @@ The `tool-planner` prompt context must include the latest-base confirmation and
|
|
|
137
137
|
4. Read the plan artifact
|
|
138
138
|
5. Update session file: paste plan summary into `## Plan`, set `status: planned`
|
|
139
139
|
6. Update `state.json` (`status: planned`, phase `planning`, next action) via `npm run workflow:sidecar -- advance-state` — never through a direct Write/Edit tool call (`config-protection.js` blocks that by design)
|
|
140
|
-
7.
|
|
141
|
-
|
|
140
|
+
7. For an active Builder Flow run, record the `implementation-plan` gate claim after the plan and structured sidecars are complete:
|
|
141
|
+
```bash
|
|
142
|
+
npm run workflow:sidecar -- record-gate-claim .kontourai/flow-agents/<slug> \
|
|
143
|
+
--expectation implementation-plan \
|
|
144
|
+
--status pass \
|
|
145
|
+
--summary "Implementation plan records files, sequencing, acceptance criteria, and required evidence." \
|
|
146
|
+
--evidence-ref-json '{"kind":"artifact","file":".kontourai/flow-agents/<slug>/<session-basename>-plan.md","summary":"Structured implementation plan with acceptance and evidence traceability."}'
|
|
147
|
+
```
|
|
148
|
+
Use `fail` or `not_verified` instead of `pass` when the plan contract is not satisfied. The sidecar writer synchronizes Flow; Flow, not this skill, decides whether execution is now active.
|
|
149
|
+
8. Present the plan to the user
|
|
150
|
+
9. If the user wants changes, re-delegate to tool-planner with feedback
|
|
142
151
|
|
|
143
152
|
Never rely on conversational memory for the slug. Resolve the active artifact with `npm run workflow:sidecar -- current --format path` and pass that path to delegated agents.
|
|
144
153
|
|
|
@@ -198,22 +207,10 @@ Copied from the plan artifact. This is the stop condition for delivery.
|
|
|
198
207
|
|
|
199
208
|
{context?}
|
|
200
209
|
|
|
201
|
-
##
|
|
202
|
-
|
|
203
|
-
`ensure-session --flow-id <id>` without `--step-id` defaults `active_step_id` to the
|
|
204
|
-
flow's FIRST step (`pull-work` for `builder.build`). For a session that legitimately
|
|
205
|
-
enters mid-flow — e.g. planning directly from a portfolio work item without a
|
|
206
|
-
`pull-work`/pickup artifact — pass the sanctioned override:
|
|
207
|
-
|
|
208
|
-
```
|
|
209
|
-
npm run workflow:sidecar -- ensure-session \
|
|
210
|
-
--flow-id builder.build --task-slug <slug> --step-id plan \
|
|
211
|
-
[--ad-hoc-reason "planning a directly-issued work item; no pull-work artifact"]
|
|
212
|
-
```
|
|
210
|
+
## Workflow Entry
|
|
213
211
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
start.
|
|
212
|
+
Do not create or restamp a `builder.build` run from this planning primitive. A Builder
|
|
213
|
+
run enters through `pull-work`, then `design-probe`; Flow advances it to `plan` only after
|
|
214
|
+
the declared upstream gates pass. When `plan-work` is invoked directly outside that
|
|
215
|
+
product workflow, run it as a standalone primitive without `--flow-id builder.build` and
|
|
216
|
+
do not report the omitted Builder prefix as complete.
|
|
@@ -96,6 +96,8 @@ Use `github-cli` / `gh` when available to inspect issues, labels, milestones, pr
|
|
|
96
96
|
|
|
97
97
|
Treat GitHub Issues as a `WorkItemProvider` and GitHub Projects as a `BoardProvider`, mapped through `context/contracts/work-item-contract.md`. Preserve provider-specific values in the artifact when useful, but use the contract's neutral fields for selection, grouping, and handoff.
|
|
98
98
|
|
|
99
|
+
When a `BoardProvider` is configured, read the board Ready queue as the primary cross-repo selection input, ordered by configured priority and board position. Per-repo `WorkItemProvider` issue listing is the intake-gap detector: use it to surface open issues missing from the board, not as a silent fallback when the board has no ready items. If the configured board returns zero ready items, record and surface that warning as a dead readiness source before selecting or asking for alignment.
|
|
100
|
+
|
|
99
101
|
Classify issues:
|
|
100
102
|
|
|
101
103
|
- ready
|
|
@@ -115,6 +117,15 @@ npm run pull-work-provider -- \
|
|
|
115
117
|
|
|
116
118
|
The helper preserves provider refs, project fields, blockers, PR links, and source artifact refs, then emits the work item contract fields plus readiness evidence. Use live provider state for final decisions; fixture output is only test evidence.
|
|
117
119
|
|
|
120
|
+
When board state is available, read the Ready queue and intake gaps through the same helper:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
npm run pull-work-provider -- \
|
|
124
|
+
--settings-json context/settings/backlog-provider-settings.json
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
For fixture-backed evaluation or cached provider JSON, pass `--items-json /path/to/project-items-and-open-issues.json`. The board output includes `ready_queue`, `intake_gaps`, and `warnings`; select from `ready_queue` first when it is populated.
|
|
128
|
+
|
|
118
129
|
Before classifying provider-backed work as ready for pickup, fetch the latest target ref when network access and provider credentials are available, then compare the current target SHA to the work item's `planned_base_sha`. Record the current target ref/SHA, planned base ref/SHA, `commits-since`, planned age, changed files since the planned base, and changed-file intersections with `planning_scope_refs` in the pull-work artifact or helper output.
|
|
119
130
|
|
|
120
131
|
Classify revision freshness as:
|
|
@@ -458,6 +469,14 @@ After a merge, automatic continuation may inspect the queue and write a new pull
|
|
|
458
469
|
|
|
459
470
|
When the Pickup Gate passes and work is selected (not just a shepherding scan or WIP-only audit), record the gate claim for the Builder Kit `pull-work` step before handing off to `design-probe` or `plan-work`. This satisfies the `builder.pull-work.selected` gate expectation.
|
|
460
471
|
|
|
472
|
+
Start the canonical Flow run before recording the first gate claim. This is idempotent for an existing run and projects Flow's current step and gate requirements into the sidecar:
|
|
473
|
+
|
|
474
|
+
```bash
|
|
475
|
+
flow-agents builder-run start --session-dir .kontourai/flow-agents/<slug>
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
Do not start at a later step. Flow owns advancement from `pull-work` after it evaluates the recorded evidence.
|
|
479
|
+
|
|
461
480
|
Use the `selected_item_ids` as the evidence artifact ref and confirm that scope and acceptance criteria are present in the pull-work artifact:
|
|
462
481
|
|
|
463
482
|
```bash
|
|
@@ -468,6 +487,8 @@ npm run workflow:sidecar -- record-gate-claim .kontourai/flow-agents/<slug> \
|
|
|
468
487
|
--evidence-ref-json '{"kind":"artifact","file":".kontourai/flow-agents/<slug>/<slug>--pull-work.md","summary":"Pull-work artifact with selected_item_ids, scope, and acceptance criteria."}'
|
|
469
488
|
```
|
|
470
489
|
|
|
490
|
+
The sidecar writer synchronizes an existing canonical Flow run after writing the trust bundle. If synchronization was interrupted, recover with the exact `next_action.command` from `state.json`; do not edit Flow state or restamp the active step.
|
|
491
|
+
|
|
471
492
|
Use `--status fail` when the gate fails (blocker recorded but no selection made). Use `--status not_verified` only when the session has no active flow step (non-Builder-Kit usage).
|
|
472
493
|
|
|
473
494
|
Record `--status fail` with a summary naming the blocker when stopping before selection. Do not record `pass` until `selected_item_ids` are confirmed and the pickup gate criteria above are met.
|
|
@@ -58,6 +58,18 @@ Use additional `--gate-json` and `--post-deploy-json` values for release, deploy
|
|
|
58
58
|
|
|
59
59
|
After writing `release.json`, run artifact validation when available. If `record-release` is unavailable or blocked, keep the release decision as `HOLD` in the Markdown artifact and record the sidecar-write or validation blocker as a `NOT_VERIFIED` evidence gap until the structured release record can be written or the gap is explicitly accepted.
|
|
60
60
|
|
|
61
|
+
For an active Builder Flow run, record the CI merge-readiness claim only for a `MERGE`, `RELEASE`, or `DEPLOY` decision backed by current provider checks:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npm run workflow:sidecar -- record-gate-claim .kontourai/flow-agents/<slug> \
|
|
65
|
+
--expectation ci-merge-readiness \
|
|
66
|
+
--status pass \
|
|
67
|
+
--summary "Provider checks are current and passing; release-readiness decision and residual risks are recorded." \
|
|
68
|
+
--evidence-ref-json '{"kind":"artifact","file":".kontourai/flow-agents/<slug>/release.json","summary":"Release-readiness decision with provider checks, rollback, and observability evidence."}'
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Use `fail` or `not_verified` for `HOLD` and unresolved provider evidence. Flow owns the transition to learning after it verifies this claim.
|
|
72
|
+
|
|
61
73
|
## Workflow
|
|
62
74
|
|
|
63
75
|
### 1. Confirm Evidence
|
package/kits/knowledge/kit.json
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
"name": "Knowledge Kit",
|
|
5
5
|
"product_name": "Knowledge Kit",
|
|
6
6
|
"description": "A Flow Kit for durable, gated knowledge storage. Provides a store contract with defined record types, mutation operations, and provenance rules — plus a default adapter backed by markdown files, YAML frontmatter, wikilinks, and a graph index.",
|
|
7
|
+
"first_party": true,
|
|
7
8
|
"flows": [
|
|
8
9
|
{
|
|
9
10
|
"id": "knowledge.store-contract",
|
|
@@ -66,6 +67,14 @@
|
|
|
66
67
|
"description": "Knowledge promote sub-flow (issue #313, the codebase-facing 'flow within a flow'): ingest a delivered session's artifacts -> distill schema-valid DRAFT decision/vocabulary/learning deltas per the decision-registry contract -> link provenance (PR, merge SHA, session archive, touched topics) -> health-check the registry for contradictions (overlapping subject nouns + divergent content) and propose merge-repair. Invokable standalone AND composable from the Builder promote step via uses_flow. PROPOSALS-ONLY: outputs land under <session>/proposals/ for the promote step to apply; the sub-flow never writes docs directly. Executable logic: promote/index.js."
|
|
67
68
|
}
|
|
68
69
|
],
|
|
70
|
+
"workflow_triggers": [
|
|
71
|
+
{
|
|
72
|
+
"id": "knowledge-capture-work",
|
|
73
|
+
"when": "knowledge-capture-detected",
|
|
74
|
+
"target_flow_id": "knowledge.ingest",
|
|
75
|
+
"default_skill": "knowledge.knowledge-capture"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
69
78
|
"docs": [
|
|
70
79
|
{
|
|
71
80
|
"id": "knowledge.readme",
|
|
@@ -19,6 +19,7 @@ only projects Veritas's own recorded verdict into the Flow trust.bundle vocabula
|
|
|
19
19
|
| Adapter | `adapter/readiness-to-trust-bundle.mjs` | Projects a `veritas readiness --check evidence --working-tree` evidence report into a Hachure `trust.bundle` (via `@kontourai/surface`), deriving the claim status from Veritas's own blocking-failure signal. |
|
|
20
20
|
| Fixtures | `fixtures/readiness/*.readiness-report.json` | Captured **real** Veritas readiness reports (a ready clean tree, and a not-ready tree with a required CLI artifact deleted) used by the eval. |
|
|
21
21
|
| Flow | `flows/exemption-issuance.flow.json` | Single-gate agentless flow `request -> human-approval-gate -> issue`. The gate requires a **verified** `no-agent-delivery-exemption-approval` trust.bundle claim (`subjectType: "delivery-scope"`) before the `issue` step's write is flow-sanctioned. Issues a `delivery/DECLARED` exemption entry per ADR 0022 §2/§3. |
|
|
22
|
+
| Skill | `skills/exemption-usage-review/SKILL.md` | Periodic audit skill (ADR 0022 §3): walks `delivery/DECLARED` + its `git log --follow` history and reports every standing exemption (scope, reason, approver, age since `declared_at`), flagging entries overdue for owner re-confirmation against a configurable staleness threshold. Process visibility, not enforcement — read-only, never mutates `delivery/DECLARED` or the reconciler. |
|
|
22
23
|
|
|
23
24
|
The gate uses provider-neutral Flow vocabulary (`kind: "trust.bundle"`, `bundle_claim`) — the
|
|
24
25
|
same vocabulary `kits/builder/flows/build.flow.json` uses. Veritas is simply the producer that
|
|
@@ -91,6 +92,31 @@ replacement of it):
|
|
|
91
92
|
}
|
|
92
93
|
```
|
|
93
94
|
|
|
95
|
+
## How to run the review
|
|
96
|
+
|
|
97
|
+
`skills/exemption-usage-review/SKILL.md` (ADR 0022 §3, "the kit issues, the anchor
|
|
98
|
+
enforces... and the kit audits") gives an operator a periodic, read-only way to see every
|
|
99
|
+
`delivery/DECLARED` exemption currently standing, how old each one is, and which are overdue
|
|
100
|
+
for owner re-confirmation. This is **process visibility, not enforcement** — it never
|
|
101
|
+
modifies `delivery/DECLARED` and never changes `scripts/ci/trust-reconcile.js`'s
|
|
102
|
+
reconciliation decision or exit code.
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# Human-readable report against this repo's real delivery/DECLARED, default 90-day threshold.
|
|
106
|
+
node kits/veritas-governance/skills/exemption-usage-review/review-exemptions.mjs
|
|
107
|
+
|
|
108
|
+
# Machine-readable, with a deterministic "now" and a tighter threshold.
|
|
109
|
+
node kits/veritas-governance/skills/exemption-usage-review/review-exemptions.mjs \
|
|
110
|
+
--as-of 2026-07-05T00:00:00Z --stale-days 30 --json
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Each standing exemption is reported as `{scope, reason, approved_by, declared_at, age_days,
|
|
114
|
+
stale}`; a `git log --follow -- delivery/DECLARED` history walk is reported alongside it as a
|
|
115
|
+
supplementary commit-level trail. See the skill's own SKILL.md for the full "what this review
|
|
116
|
+
does and does not verify" statement (it does not authenticate `approved_by`, does not
|
|
117
|
+
re-evaluate whether any scope currently matches a given change — that remains
|
|
118
|
+
`trust-reconcile.js`'s job — and does not schedule itself; an operator runs it periodically).
|
|
119
|
+
|
|
94
120
|
## Human-approval evidence: what is and is not enforced
|
|
95
121
|
|
|
96
122
|
The `human-approval-gate`'s `expects[]` entry only requires a **verified** trust.bundle claim
|
|
@@ -140,14 +166,16 @@ derivation is correct today and will agree with Veritas's own exported functions
|
|
|
140
166
|
|
|
141
167
|
## Trust status
|
|
142
168
|
|
|
143
|
-
Slice 1 ships **unverified** (like
|
|
144
|
-
|
|
145
|
-
|
|
169
|
+
Slice 1 ships **unverified** (like all current kits). Official catalog placement is marketplace
|
|
170
|
+
metadata only and grants no runtime privilege. Verified promotion is an owner decision deferred
|
|
171
|
+
to a later slice (see the WS5 shaping's open decisions).
|
|
146
172
|
|
|
147
173
|
## Not in slice 1
|
|
148
174
|
|
|
149
|
-
Skills
|
|
175
|
+
Skills `consult-standards` and `governance-evidence`, the fuller `merge-readiness` flow, the
|
|
150
176
|
`standards-authoring` flow, and the `knowledge` dependency are later slices — see the WS5
|
|
151
|
-
backlog.
|
|
152
|
-
`delivery/DECLARED` history and
|
|
153
|
-
process visibility, not enforcement)
|
|
177
|
+
backlog. `exemption-usage-review` (ADR 0022 §3's periodic audit skill, walking
|
|
178
|
+
`delivery/DECLARED` history and surfacing standing exemptions for owner re-confirmation —
|
|
179
|
+
process visibility, not enforcement) **has now shipped** — see "What it contains" above and
|
|
180
|
+
"How to run the review". Nothing schedules it automatically; an operator runs it periodically
|
|
181
|
+
(see the skill's own "Accepted gap" note) — that scheduling surface remains out of scope.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"scope": "author:dependabot[bot]",
|
|
4
|
+
"reason": "dependabot dependency-update PRs; no agent delivery involved",
|
|
5
|
+
"approved_by": "example-approver (fixture-only)",
|
|
6
|
+
"declared_at": "2026-06-20T00:00:00Z"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"scope": "author:example-legacy-bot[bot]",
|
|
10
|
+
"reason": "example fixture: a legacy exemption overdue for owner re-confirmation",
|
|
11
|
+
"approved_by": "example-approver (fixture-only)",
|
|
12
|
+
"declared_at": "2026-01-01T00:00:00Z"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
@@ -15,6 +15,20 @@
|
|
|
15
15
|
"description": "Agentless K0 flow issuing a delivery/DECLARED no-agent-delivery exemption (ADR 0022 §2/§3): step request -> gate human-approval-gate (requires a verified no-agent-delivery-exemption-approval trust.bundle claim, satisfiable only by a human-authored approval bundle by convention -- see docs/README.md) -> step issue, which appends the approved entry to delivery/DECLARED. CI-callable."
|
|
16
16
|
}
|
|
17
17
|
],
|
|
18
|
+
"skills": [
|
|
19
|
+
{
|
|
20
|
+
"id": "veritas-governance.exemption-usage-review",
|
|
21
|
+
"path": "skills/exemption-usage-review/SKILL.md",
|
|
22
|
+
"description": "Periodic audit skill (ADR 0022 §3): walks delivery/DECLARED + its git log --follow history and reports every standing no-agent-delivery exemption (scope, reason, approver, age since declared_at), flagging entries overdue for owner re-confirmation against a configurable staleness threshold. Process visibility, not enforcement -- read-only, never mutates delivery/DECLARED or scripts/ci/trust-reconcile.js's behavior."
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"assets": [
|
|
26
|
+
{
|
|
27
|
+
"id": "veritas-governance.exemption-usage-review-helper",
|
|
28
|
+
"path": "skills/exemption-usage-review/review-exemptions.mjs",
|
|
29
|
+
"description": "Dependency-free ESM helper script the exemption-usage-review skill documents/invokes: reads delivery/DECLARED, computes age/staleness per entry, walks git log --follow -- delivery/DECLARED for a supplementary history trail. Read-only; never mutates delivery/DECLARED or scripts/ci/trust-reconcile.js's behavior."
|
|
30
|
+
}
|
|
31
|
+
],
|
|
18
32
|
"docs": [
|
|
19
33
|
{ "id": "veritas-governance.readme", "path": "docs/README.md" }
|
|
20
34
|
]
|