@kontourai/flow-agents 1.2.0 → 1.3.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 (55) hide show
  1. package/.github/workflows/ci.yml +6 -1
  2. package/.github/workflows/kit-gates-demo.yml +6 -2
  3. package/CHANGELOG.md +25 -0
  4. package/CONTRIBUTING.md +30 -0
  5. package/agents/dev.json +1 -1
  6. package/agents/tool-planner.json +1 -1
  7. package/build/src/cli/workflow-sidecar.js +70 -5
  8. package/build/src/flow-kit/validate.js +32 -1
  9. package/build/src/tools/build-universal-bundles.js +14 -0
  10. package/console.telemetry.json +1 -1
  11. package/docs/adr/0004-gates-expect-surface-claims.md +7 -7
  12. package/docs/kit-authoring-guide.md +99 -6
  13. package/docs/operating-layers.md +2 -2
  14. package/docs/veritas-integration.md +4 -4
  15. package/docs/workflow-eval-strategy.md +2 -2
  16. package/docs/workflow-usage-guide.md +1 -1
  17. package/evals/acceptance/test_opencode_harness.sh +18 -10
  18. package/evals/acceptance/test_pi_harness.sh +10 -6
  19. package/evals/ci/run-baseline.sh +1 -1
  20. package/evals/fixtures/flow-kit-repository/mixed-runtime-kit/flows/runtime.flow.json +4 -4
  21. package/evals/fixtures/flow-kit-repository/valid-local-kit/flows/review.flow.json +4 -4
  22. package/evals/fixtures/kit-conformance-levels/k0-flows-only/flows/review.flow.json +4 -4
  23. package/evals/fixtures/kit-conformance-levels/k1-agent-extension/flows/build.flow.json +4 -4
  24. package/evals/fixtures/kit-conformance-levels/k2-with-evals/flows/synthesize.flow.json +4 -4
  25. package/evals/fixtures/kit-conformance-levels/third-party-extension/flows/review.flow.json +4 -4
  26. package/evals/fixtures/surface-trust/accepted-claim-trust-report.json +2 -2
  27. package/evals/fixtures/surface-trust/artifact-absent.json +2 -2
  28. package/evals/fixtures/surface-trust/integrity-mismatch-trust-report.json +2 -2
  29. package/evals/fixtures/surface-trust/missing-authority-trust-report.json +2 -2
  30. package/evals/fixtures/surface-trust/provider-absent.json +2 -2
  31. package/evals/fixtures/surface-trust/rejected-claim-trust-report.json +2 -2
  32. package/evals/fixtures/surface-trust/stale-claim-trust-snapshot.json +2 -2
  33. package/evals/integration/test_console_learning_projection.sh +1 -1
  34. package/evals/integration/test_goal_fit_hook.sh +144 -0
  35. package/evals/integration/test_kit_conformance_levels.sh +55 -1
  36. package/evals/integration/test_workflow_sidecar_writer.sh +9 -9
  37. package/evals/static/test_package.sh +3 -3
  38. package/evals/static/test_workflow_skills.sh +4 -4
  39. package/kits/builder/flows/build.flow.json +48 -48
  40. package/kits/builder/flows/shape.flow.json +36 -36
  41. package/kits/knowledge/adapters/obsidian-store/index.js +137 -26
  42. package/kits/knowledge/evals/contract-suite/suite.test.js +90 -0
  43. package/kits/knowledge/flows/compile.flow.json +12 -12
  44. package/kits/knowledge/flows/consolidate.flow.json +16 -16
  45. package/kits/knowledge/flows/ingest.flow.json +12 -12
  46. package/kits/knowledge/flows/retire.flow.json +16 -16
  47. package/kits/knowledge/flows/store-contract.flow.json +12 -12
  48. package/kits/knowledge/flows/synthesize.flow.json +16 -16
  49. package/kits/release-evidence/flows/release-evidence.flow.json +3 -3
  50. package/package.json +5 -2
  51. package/schemas/workflow-evidence.schema.json +2 -1
  52. package/scripts/hooks/stop-goal-fit.js +66 -18
  53. package/src/cli/workflow-sidecar.ts +62 -4
  54. package/src/flow-kit/validate.ts +55 -1
  55. package/src/tools/build-universal-bundles.ts +14 -0
@@ -544,22 +544,22 @@ else
544
544
  _fail "existing invalid acceptance ref rejection was not fail-closed: $(cat "$TMPDIR_EVAL/invalid-acceptance-ref.out" "$TMPDIR_EVAL/invalid-acceptance-ref.err")"
545
545
  fi
546
546
 
547
- SURFACE_CHECK='{"id":"surface-trust-fixture","kind":"policy","status":"pass","summary":"Surface trust evidence passed.","surface_trust_refs":[{"artifact_kind":"TrustReport","artifact_ref":"trust/report.json","gate_id":"builder.surface.claim","claim_type":"surface.claim","claim_status":"accepted","subject":"builder-kit","freshness":{"status":"fresh","summary":"Issued during this workflow."},"authority":{"producer":"surface-local","summary":"Local Surface trust producer."},"integrity":{"status":"matched","summary":"Artifact digest matched expected subject and gate.","digest":"sha256:abc123"},"status":"pass","summary":"Accepted Surface claim."}]}'
547
+ SURFACE_CHECK='{"id":"surface-trust-fixture","kind":"policy","status":"pass","summary":"Hachure trust.bundle evidence passed.","surface_trust_refs":[{"artifact_kind":"trust.bundle","artifact_ref":"trust/report.json","gate_id":"builder.trust.bundle","claim_type":"builder.trust.bundle","claim_status":"accepted","subject":"builder-kit","freshness":{"status":"fresh","summary":"Issued during this workflow."},"authority":{"producer":"surface-local","summary":"Local Surface trust producer."},"integrity":{"status":"matched","summary":"Artifact digest matched expected subject and gate.","digest":"sha256:abc123"},"status":"pass","summary":"Accepted trust.bundle claim."}]}'
548
548
  if flow_agents_node "$WRITER" record-evidence "$ARTIFACT_DIR" \
549
549
  --verdict pass \
550
550
  --check-json "$SURFACE_CHECK" \
551
551
  --timestamp "2026-05-09T00:01:05Z" >"$TMPDIR_EVAL/surface-evidence.out" 2>"$TMPDIR_EVAL/surface-evidence.err" \
552
552
  && rg -q '"surface_trust_refs"' "$ARTIFACT_DIR/evidence.json" \
553
- && rg -q '"artifact_kind": "TrustReport"' "$ARTIFACT_DIR/evidence.json" \
553
+ && rg -q '"artifact_kind": "trust.bundle"' "$ARTIFACT_DIR/evidence.json" \
554
554
  && ! rg -q 'veritas' "$ARTIFACT_DIR/evidence.json"; then
555
- _pass "sidecar writer records provider-neutral Surface trust refs"
555
+ _pass "sidecar writer records Hachure-aligned trust.bundle refs"
556
556
  else
557
- _fail "sidecar writer did not record Surface trust refs: $(cat "$TMPDIR_EVAL/surface-evidence.out" "$TMPDIR_EVAL/surface-evidence.err")"
557
+ _fail "sidecar writer did not record Hachure-aligned trust.bundle refs: $(cat "$TMPDIR_EVAL/surface-evidence.out" "$TMPDIR_EVAL/surface-evidence.err")"
558
558
  fi
559
559
 
560
560
  if flow_agents_node "$WRITER" record-evidence "$ARTIFACT_DIR" \
561
561
  --verdict pass \
562
- --check-json '{"id":"surface-trust-native-field","kind":"policy","status":"pass","summary":"Should fail.","surface_trust_refs":[{"artifact_kind":"Trust Snapshot","artifact_ref":"trust/snapshot.json","gate_id":"builder.surface.claim","claim_type":"surface.claim","claim_status":"accepted","subject":"builder-kit","freshness":{"status":"fresh","summary":"Fresh."},"authority":{"producer":"surface-local","summary":"Producer exists.","veritas_policy":"native-field"},"integrity":{"status":"matched","summary":"Matched."},"status":"pass"}]}' >"$TMPDIR_EVAL/surface-invalid.out" 2>&1; then
562
+ --check-json '{"id":"surface-trust-native-field","kind":"policy","status":"pass","summary":"Should fail.","surface_trust_refs":[{"artifact_kind":"trust.bundle","artifact_ref":"trust/snapshot.json","gate_id":"builder.trust.bundle","claim_type":"builder.trust.bundle","claim_status":"accepted","subject":"builder-kit","freshness":{"status":"fresh","summary":"Fresh."},"authority":{"producer":"surface-local","summary":"Producer exists.","veritas_policy":"native-field"},"integrity":{"status":"matched","summary":"Matched."},"status":"pass"}]}' >"$TMPDIR_EVAL/surface-invalid.out" 2>&1; then
563
563
  _fail "sidecar writer should reject provider-specific Surface trust fields"
564
564
  elif rg -q 'unsupported field' "$TMPDIR_EVAL/surface-invalid.out"; then
565
565
  _pass "sidecar writer rejects provider-specific Surface trust fields"
@@ -581,10 +581,10 @@ check_contradictory_surface_ref() {
581
581
  fi
582
582
  }
583
583
 
584
- check_contradictory_surface_ref "rejected-pass" '{"artifact_kind":"TrustReport","artifact_ref":"trust/report.json","gate_id":"builder.surface.claim","claim_type":"surface.claim","claim_status":"rejected","subject":"builder-kit","freshness":{"status":"fresh","summary":"Fresh."},"authority":{"producer":"surface-local","summary":"Producer exists."},"integrity":{"status":"matched","summary":"Matched."},"status":"pass"}'
585
- check_contradictory_surface_ref "stale-pass" '{"artifact_kind":"TrustReport","artifact_ref":"trust/report.json","gate_id":"builder.surface.claim","claim_type":"surface.claim","claim_status":"accepted","subject":"builder-kit","freshness":{"status":"stale","summary":"Stale."},"authority":{"producer":"surface-local","summary":"Producer exists."},"integrity":{"status":"matched","summary":"Matched."},"status":"pass"}'
586
- check_contradictory_surface_ref "missing-authority-pass" '{"artifact_kind":"TrustReport","artifact_ref":"trust/report.json","gate_id":"builder.surface.claim","claim_type":"surface.claim","claim_status":"accepted","subject":"builder-kit","freshness":{"status":"fresh","summary":"Fresh."},"authority":{"producer":"unknown","summary":"Producer missing."},"integrity":{"status":"matched","summary":"Matched."},"status":"pass"}'
587
- check_contradictory_surface_ref "integrity-mismatch-pass" '{"artifact_kind":"TrustReport","artifact_ref":"trust/report.json","gate_id":"builder.surface.claim","claim_type":"surface.claim","claim_status":"accepted","subject":"builder-kit","freshness":{"status":"fresh","summary":"Fresh."},"authority":{"producer":"surface-local","summary":"Producer exists."},"integrity":{"status":"mismatch","summary":"Mismatch."},"status":"pass"}'
584
+ check_contradictory_surface_ref "rejected-pass" '{"artifact_kind":"trust.bundle","artifact_ref":"trust/report.json","gate_id":"builder.trust.bundle","claim_type":"builder.trust.bundle","claim_status":"rejected","subject":"builder-kit","freshness":{"status":"fresh","summary":"Fresh."},"authority":{"producer":"surface-local","summary":"Producer exists."},"integrity":{"status":"matched","summary":"Matched."},"status":"pass"}'
585
+ check_contradictory_surface_ref "stale-pass" '{"artifact_kind":"trust.bundle","artifact_ref":"trust/report.json","gate_id":"builder.trust.bundle","claim_type":"builder.trust.bundle","claim_status":"accepted","subject":"builder-kit","freshness":{"status":"stale","summary":"Stale."},"authority":{"producer":"surface-local","summary":"Producer exists."},"integrity":{"status":"matched","summary":"Matched."},"status":"pass"}'
586
+ check_contradictory_surface_ref "missing-authority-pass" '{"artifact_kind":"trust.bundle","artifact_ref":"trust/report.json","gate_id":"builder.trust.bundle","claim_type":"builder.trust.bundle","claim_status":"accepted","subject":"builder-kit","freshness":{"status":"fresh","summary":"Fresh."},"authority":{"producer":"unknown","summary":"Producer missing."},"integrity":{"status":"matched","summary":"Matched."},"status":"pass"}'
587
+ check_contradictory_surface_ref "integrity-mismatch-pass" '{"artifact_kind":"trust.bundle","artifact_ref":"trust/report.json","gate_id":"builder.trust.bundle","claim_type":"builder.trust.bundle","claim_status":"accepted","subject":"builder-kit","freshness":{"status":"fresh","summary":"Fresh."},"authority":{"producer":"surface-local","summary":"Producer exists."},"integrity":{"status":"mismatch","summary":"Mismatch."},"status":"pass"}'
588
588
 
589
589
  SURFACE_FIXTURE_DIR="$ROOT/evals/fixtures/surface-trust"
590
590
  check_surface_fixture() {
@@ -211,8 +211,8 @@ for (const gateId of ["verify-gate", "merge-ready-gate"]) {
211
211
  const expectations = Object.values(flow.gates || {}).flatMap((gate) => gate.expects || []);
212
212
  if (!expectations.length) throw new Error("Builder build flow should declare gate expectations");
213
213
  for (const expectation of expectations) {
214
- if (expectation.kind !== "surface.claim") throw new Error(`${expectation.id || "<unknown>"} should remain a surface.claim expectation`);
215
- if (!expectation.claim?.type || !expectation.claim?.accepted_statuses) throw new Error(`${expectation.id || "<unknown>"} should declare claim type and accepted statuses`);
214
+ if (expectation.kind !== "trust.bundle") throw new Error(`${expectation.id || "<unknown>"} should remain a trust.bundle expectation`);
215
+ if (!expectation.bundle_claim?.claimType || !expectation.bundle_claim?.accepted_statuses) throw new Error(`${expectation.id || "<unknown>"} should declare bundle_claim claimType and accepted statuses`);
216
216
  }
217
217
  const flowText = JSON.stringify(flow).toLowerCase();
218
218
  for (const term of ["veritas", "trust_provider", "trust-provider", "provider_name", "provider_ref", "veritas_policy", "veritas_readiness"]) {
@@ -221,7 +221,7 @@ for (const term of ["veritas", "trust_provider", "trust-provider", "provider_nam
221
221
  console.log("ok");
222
222
  NODE
223
223
  then
224
- _pass "installed Builder Kit build flow keeps provider-neutral surface.claim gates"
224
+ _pass "installed Builder Kit build flow keeps provider-neutral trust.bundle gates"
225
225
  else
226
226
  _fail "installed Builder Kit build flow route-back or provider-neutral gate policy missing or wrong"
227
227
  fi
@@ -1075,17 +1075,17 @@ const flow = JSON.parse(fs.readFileSync(process.argv[2], "utf8"));
1075
1075
  const expectations = Object.values(flow.gates || {}).flatMap((gate) => gate.expects || []);
1076
1076
  if (!expectations.length) throw new Error("no Builder Kit gate expectations found");
1077
1077
  for (const expectation of expectations) {
1078
- if (expectation.kind !== "surface.claim") throw new Error(`${expectation.id || "<unknown>"} is not a surface.claim expectation`);
1079
- if (!expectation.claim?.type || !expectation.claim?.accepted_statuses) throw new Error(`${expectation.id || "<unknown>"} is missing claim type or accepted statuses`);
1078
+ if (expectation.kind !== "trust.bundle") throw new Error(`${expectation.id || "<unknown>"} is not a trust.bundle expectation`);
1079
+ if (!expectation.bundle_claim?.claimType || !expectation.bundle_claim?.accepted_statuses) throw new Error(`${expectation.id || "<unknown>"} is missing bundle_claim claimType or accepted statuses`);
1080
1080
  }
1081
1081
  const flowText = JSON.stringify(flow).toLowerCase();
1082
1082
  for (const term of ["veritas", "trust_provider", "trust-provider", "provider_name", "provider_ref", "veritas_policy", "veritas_readiness"]) {
1083
1083
  if (flowText.includes(term)) throw new Error(`provider-specific trust field leaked into Builder Kit build flow: ${term}`);
1084
1084
  }
1085
1085
  NODE
1086
- pass "Builder build flow keeps provider-neutral surface.claim expectations"
1086
+ pass "Builder build flow keeps provider-neutral trust.bundle expectations"
1087
1087
  else
1088
- fail "Builder build flow keeps provider-neutral surface.claim expectations"
1088
+ fail "Builder build flow keeps provider-neutral trust.bundle expectations"
1089
1089
  fi
1090
1090
  require_text "$MAP" 'pull-work' "map includes pull-work"
1091
1091
  require_text "$MAP" 'pickup Probe before planning' "map documents pickup Probe before planning"
@@ -19,12 +19,12 @@
19
19
  "expects": [
20
20
  {
21
21
  "id": "selected-work",
22
- "kind": "surface.claim",
22
+ "kind": "trust.bundle",
23
23
  "required": true,
24
24
  "description": "A ready work item is selected with scope and acceptance context.",
25
- "claim": {
26
- "type": "builder.pull-work.selected",
27
- "subject": "work-item",
25
+ "bundle_claim": {
26
+ "claimType": "builder.pull-work.selected",
27
+ "subjectType": "work-item",
28
28
  "accepted_statuses": ["trusted", "accepted"]
29
29
  }
30
30
  }
@@ -35,23 +35,23 @@
35
35
  "expects": [
36
36
  {
37
37
  "id": "pickup-probe-readiness",
38
- "kind": "surface.claim",
38
+ "kind": "trust.bundle",
39
39
  "required": true,
40
40
  "description": "Pickup Probe evidence is recorded before planning: goal fit and scope, blockers and dependencies, dependency freshness, acceptance criteria quality, provider state, risk, stop-short risks, planning readiness, decisions, unresolved questions, accepted gaps, probe_status, probe_artifact_ref, grouping decision, expected modified files, and conflict risks.",
41
- "claim": {
42
- "type": "builder.design-probe.pickup-readiness",
43
- "subject": "work-item",
41
+ "bundle_claim": {
42
+ "claimType": "builder.design-probe.pickup-readiness",
43
+ "subjectType": "work-item",
44
44
  "accepted_statuses": ["trusted", "accepted"]
45
45
  }
46
46
  },
47
47
  {
48
48
  "id": "probe-decisions-or-accepted-gaps",
49
- "kind": "surface.claim",
49
+ "kind": "trust.bundle",
50
50
  "required": true,
51
51
  "description": "Planning is blocked until pickup Probe decisions are captured in the pull-work or plan handoff artifact, or unresolved questions are explicitly recorded as accepted gaps. Stale broad continuation language after a merge is not sufficient for planning newly selected work.",
52
- "claim": {
53
- "type": "builder.design-probe.decisions",
54
- "subject": "decision",
52
+ "bundle_claim": {
53
+ "claimType": "builder.design-probe.decisions",
54
+ "subjectType": "decision",
55
55
  "accepted_statuses": ["trusted", "accepted"]
56
56
  }
57
57
  }
@@ -62,12 +62,12 @@
62
62
  "expects": [
63
63
  {
64
64
  "id": "implementation-plan",
65
- "kind": "surface.claim",
65
+ "kind": "trust.bundle",
66
66
  "required": true,
67
67
  "description": "The implementation plan names files, changes, acceptance evidence, and sequencing.",
68
- "claim": {
69
- "type": "builder.plan.implementation",
70
- "subject": "artifact",
68
+ "bundle_claim": {
69
+ "claimType": "builder.plan.implementation",
70
+ "subjectType": "artifact",
71
71
  "accepted_statuses": ["trusted", "accepted"]
72
72
  }
73
73
  }
@@ -78,12 +78,12 @@
78
78
  "expects": [
79
79
  {
80
80
  "id": "implementation-scope",
81
- "kind": "surface.claim",
81
+ "kind": "trust.bundle",
82
82
  "required": true,
83
83
  "description": "The implementation scope records changed files and excludes unrelated work.",
84
- "claim": {
85
- "type": "builder.execute.scope",
86
- "subject": "change",
84
+ "bundle_claim": {
85
+ "claimType": "builder.execute.scope",
86
+ "subjectType": "change",
87
87
  "accepted_statuses": ["trusted", "accepted"]
88
88
  }
89
89
  }
@@ -105,24 +105,24 @@
105
105
  "expects": [
106
106
  {
107
107
  "id": "tests-evidence",
108
- "kind": "surface.claim",
108
+ "kind": "trust.bundle",
109
109
  "required": true,
110
110
  "description": "Relevant tests or checks have evidence tied to the implemented change.",
111
- "claim": {
112
- "type": "builder.verify.tests",
113
- "subject": "flow-step",
111
+ "bundle_claim": {
112
+ "claimType": "builder.verify.tests",
113
+ "subjectType": "flow-step",
114
114
  "accepted_statuses": ["trusted", "accepted"]
115
115
  }
116
116
  },
117
117
  {
118
118
  "id": "policy-compliance",
119
- "kind": "surface.claim",
119
+ "kind": "trust.bundle",
120
120
  "required": false,
121
121
  "description": "Policy compliance evidence is attached when policy gates apply.",
122
122
  "explore_hint": "Use as advisory evidence for scope, security, privacy, release, or repository policy checks.",
123
- "claim": {
124
- "type": "builder.verify.policy-compliance",
125
- "subject": "artifact",
123
+ "bundle_claim": {
124
+ "claimType": "builder.verify.policy-compliance",
125
+ "subjectType": "artifact",
126
126
  "accepted_statuses": ["trusted", "accepted", "advisory"]
127
127
  }
128
128
  }
@@ -144,12 +144,12 @@
144
144
  "expects": [
145
145
  {
146
146
  "id": "merge-readiness",
147
- "kind": "surface.claim",
147
+ "kind": "trust.bundle",
148
148
  "required": true,
149
149
  "description": "The change is ready for merge review based on scope, evidence, and unresolved risks.",
150
- "claim": {
151
- "type": "builder.merge-ready.readiness",
152
- "subject": "change",
150
+ "bundle_claim": {
151
+ "claimType": "builder.merge-ready.readiness",
152
+ "subjectType": "change",
153
153
  "accepted_statuses": ["trusted", "accepted"]
154
154
  }
155
155
  }
@@ -160,12 +160,12 @@
160
160
  "expects": [
161
161
  {
162
162
  "id": "pull-request-opened",
163
- "kind": "surface.claim",
163
+ "kind": "trust.bundle",
164
164
  "required": true,
165
165
  "description": "A pull request exists with linked work, implementation summary, and verification evidence.",
166
- "claim": {
167
- "type": "builder.pr-open.pull-request",
168
- "subject": "pull-request",
166
+ "bundle_claim": {
167
+ "claimType": "builder.pr-open.pull-request",
168
+ "subjectType": "pull-request",
169
169
  "accepted_statuses": ["trusted", "accepted"]
170
170
  }
171
171
  }
@@ -176,12 +176,12 @@
176
176
  "expects": [
177
177
  {
178
178
  "id": "ci-merge-readiness",
179
- "kind": "surface.claim",
179
+ "kind": "trust.bundle",
180
180
  "required": true,
181
181
  "description": "CI and review status support a merge-ready decision.",
182
- "claim": {
183
- "type": "builder.merge-ready-ci.readiness",
184
- "subject": "pull-request",
182
+ "bundle_claim": {
183
+ "claimType": "builder.merge-ready-ci.readiness",
184
+ "subjectType": "pull-request",
185
185
  "accepted_statuses": ["trusted", "accepted"]
186
186
  }
187
187
  }
@@ -192,23 +192,23 @@
192
192
  "expects": [
193
193
  {
194
194
  "id": "decision-evidence",
195
- "kind": "surface.claim",
195
+ "kind": "trust.bundle",
196
196
  "required": true,
197
197
  "description": "Durable decision evidence from the build is recorded.",
198
- "claim": {
199
- "type": "builder.learn.decisions",
200
- "subject": "decision",
198
+ "bundle_claim": {
199
+ "claimType": "builder.learn.decisions",
200
+ "subjectType": "decision",
201
201
  "accepted_statuses": ["trusted", "accepted"]
202
202
  }
203
203
  },
204
204
  {
205
205
  "id": "learning-evidence",
206
- "kind": "surface.claim",
206
+ "kind": "trust.bundle",
207
207
  "required": true,
208
208
  "description": "Learning evidence from delivery is recorded for future work.",
209
- "claim": {
210
- "type": "builder.learn.evidence",
211
- "subject": "release",
209
+ "bundle_claim": {
210
+ "claimType": "builder.learn.evidence",
211
+ "subjectType": "release",
212
212
  "accepted_statuses": ["trusted", "accepted"]
213
213
  }
214
214
  }
@@ -13,79 +13,79 @@
13
13
  "expects": [
14
14
  {
15
15
  "id": "shaped-problem",
16
- "kind": "surface.claim",
16
+ "kind": "trust.bundle",
17
17
  "required": true,
18
18
  "description": "The problem is stated in terms a builder can act on.",
19
- "claim": {
20
- "type": "builder.shape.problem",
21
- "subject": "decision",
19
+ "bundle_claim": {
20
+ "claimType": "builder.shape.problem",
21
+ "subjectType": "decision",
22
22
  "accepted_statuses": ["trusted", "accepted"]
23
23
  }
24
24
  },
25
25
  {
26
26
  "id": "shaped-outcome",
27
- "kind": "surface.claim",
27
+ "kind": "trust.bundle",
28
28
  "required": true,
29
29
  "description": "The intended outcome is explicit enough to evaluate later.",
30
- "claim": {
31
- "type": "builder.shape.outcome",
32
- "subject": "flow-run",
30
+ "bundle_claim": {
31
+ "claimType": "builder.shape.outcome",
32
+ "subjectType": "flow-run",
33
33
  "accepted_statuses": ["trusted", "accepted"]
34
34
  }
35
35
  },
36
36
  {
37
37
  "id": "shaped-constraints",
38
- "kind": "surface.claim",
38
+ "kind": "trust.bundle",
39
39
  "required": true,
40
40
  "description": "Constraints that affect implementation are captured.",
41
- "claim": {
42
- "type": "builder.shape.constraints",
43
- "subject": "decision",
41
+ "bundle_claim": {
42
+ "claimType": "builder.shape.constraints",
43
+ "subjectType": "decision",
44
44
  "accepted_statuses": ["trusted", "accepted"]
45
45
  }
46
46
  },
47
47
  {
48
48
  "id": "shaped-non-goals",
49
- "kind": "surface.claim",
49
+ "kind": "trust.bundle",
50
50
  "required": true,
51
51
  "description": "Non-goals are named so the build stays scoped.",
52
- "claim": {
53
- "type": "builder.shape.non-goals",
54
- "subject": "decision",
52
+ "bundle_claim": {
53
+ "claimType": "builder.shape.non-goals",
54
+ "subjectType": "decision",
55
55
  "accepted_statuses": ["trusted", "accepted"]
56
56
  }
57
57
  },
58
58
  {
59
59
  "id": "shaped-success",
60
- "kind": "surface.claim",
60
+ "kind": "trust.bundle",
61
61
  "required": true,
62
62
  "description": "Success criteria are concrete enough for verification.",
63
- "claim": {
64
- "type": "builder.shape.success",
65
- "subject": "artifact",
63
+ "bundle_claim": {
64
+ "claimType": "builder.shape.success",
65
+ "subjectType": "artifact",
66
66
  "accepted_statuses": ["trusted", "accepted"]
67
67
  }
68
68
  },
69
69
  {
70
70
  "id": "shaped-risk",
71
- "kind": "surface.claim",
71
+ "kind": "trust.bundle",
72
72
  "required": true,
73
73
  "description": "Material delivery risks are recorded before breakdown.",
74
- "claim": {
75
- "type": "builder.shape.risk",
76
- "subject": "decision",
74
+ "bundle_claim": {
75
+ "claimType": "builder.shape.risk",
76
+ "subjectType": "decision",
77
77
  "accepted_statuses": ["trusted", "accepted"]
78
78
  }
79
79
  },
80
80
  {
81
81
  "id": "open-decisions",
82
- "kind": "surface.claim",
82
+ "kind": "trust.bundle",
83
83
  "required": false,
84
84
  "description": "Open decisions are recorded when the shape is not fully settled.",
85
85
  "explore_hint": "Attach when unresolved choices could affect slices or issue boundaries.",
86
- "claim": {
87
- "type": "builder.shape.open-decisions",
88
- "subject": "decision",
86
+ "bundle_claim": {
87
+ "claimType": "builder.shape.open-decisions",
88
+ "subjectType": "decision",
89
89
  "accepted_statuses": ["trusted", "accepted", "advisory"]
90
90
  }
91
91
  }
@@ -96,12 +96,12 @@
96
96
  "expects": [
97
97
  {
98
98
  "id": "slices-defined",
99
- "kind": "surface.claim",
99
+ "kind": "trust.bundle",
100
100
  "required": true,
101
101
  "description": "The shaped work is split into independently useful slices.",
102
- "claim": {
103
- "type": "builder.breakdown.slices",
104
- "subject": "work-item",
102
+ "bundle_claim": {
103
+ "claimType": "builder.breakdown.slices",
104
+ "subjectType": "work-item",
105
105
  "accepted_statuses": ["trusted", "accepted"]
106
106
  }
107
107
  }
@@ -112,12 +112,12 @@
112
112
  "expects": [
113
113
  {
114
114
  "id": "work-items-filed",
115
- "kind": "surface.claim",
115
+ "kind": "trust.bundle",
116
116
  "required": true,
117
117
  "description": "Work items are filed or otherwise recorded with enough context to pull later.",
118
- "claim": {
119
- "type": "builder.file-issues.work-items",
120
- "subject": "work-item",
118
+ "bundle_claim": {
119
+ "claimType": "builder.file-issues.work-items",
120
+ "subjectType": "work-item",
121
121
  "accepted_statuses": ["trusted", "accepted"]
122
122
  }
123
123
  }