@kontourai/flow-agents 2.4.0 → 3.1.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 (195) hide show
  1. package/.github/CODEOWNERS +8 -0
  2. package/.github/workflows/ci.yml +20 -0
  3. package/.github/workflows/trust-reconcile.yml +62 -4
  4. package/CHANGELOG.md +38 -0
  5. package/CONTEXT.md +88 -1
  6. package/README.md +4 -0
  7. package/build/src/cli/assignment-provider.d.ts +144 -0
  8. package/build/src/cli/assignment-provider.js +805 -0
  9. package/build/src/cli/effective-assignment-provider-settings.d.ts +1 -0
  10. package/build/src/cli/effective-assignment-provider-settings.js +125 -0
  11. package/build/src/cli/validate-workflow-artifacts.js +5 -1
  12. package/build/src/cli/workflow-sidecar.d.ts +2 -2
  13. package/build/src/cli/workflow-sidecar.js +549 -145
  14. package/build/src/cli.js +6 -0
  15. package/build/src/lib/flow-resolver.d.ts +12 -6
  16. package/build/src/lib/flow-resolver.js +30 -14
  17. package/build/src/tools/validate-source-tree.js +2 -0
  18. package/context/contracts/artifact-contract.md +2 -0
  19. package/context/contracts/assignment-provider-contract.md +248 -0
  20. package/context/contracts/builder-kit-workflow-state-contract.md +2 -0
  21. package/context/contracts/decision-registry-contract.md +2 -0
  22. package/context/contracts/delivery-contract.md +2 -0
  23. package/context/contracts/execution-contract.md +25 -0
  24. package/context/contracts/governance-adapter-contract.md +2 -0
  25. package/context/contracts/knowledge-store-contract.md +197 -0
  26. package/context/contracts/planning-contract.md +2 -0
  27. package/context/contracts/probe-docs-write-contract.md +187 -0
  28. package/context/contracts/review-contract.md +2 -0
  29. package/context/contracts/sandbox-policy.md +2 -0
  30. package/context/contracts/standing-directives.md +13 -0
  31. package/context/contracts/verification-contract.md +2 -0
  32. package/context/contracts/work-item-contract.md +2 -0
  33. package/context/scripts/hooks/config-protection.js +14 -1
  34. package/context/scripts/hooks/lib/config-protection-remedies.js +9 -0
  35. package/context/scripts/hooks/stop-goal-fit.js +4 -2
  36. package/context/scripts/hooks/workflow-steering.js +42 -0
  37. package/context/settings/assignment-provider-settings.json +33 -0
  38. package/docs/adr/0001-flow-agents-consumes-flow.md +2 -0
  39. package/docs/adr/0002-flow-kits-as-extension-unit.md +2 -0
  40. package/docs/adr/0003-flow-agents-coordinates-kits-and-adapters.md +2 -0
  41. package/docs/adr/0004-gates-expect-surface-claims.md +2 -0
  42. package/docs/adr/0005-kubernetes-inspired-resource-contracts.md +2 -0
  43. package/docs/adr/0006-typescript-first-source-policy.md +2 -0
  44. package/docs/adr/0007-flow-skill-kit-tool-boundary.md +2 -0
  45. package/docs/adr/0007-skill-audit.md +2 -0
  46. package/docs/adr/0008-kit-operation-boundary.md +2 -0
  47. package/docs/adr/0009-canonical-hook-core-kit-boundary.md +2 -0
  48. package/docs/adr/0010-workflow-trust-state-as-hachure-bundle.md +2 -0
  49. package/docs/adr/0011-mcp-posture.md +2 -0
  50. package/docs/adr/0012-agent-coordination-as-liveness-claims.md +2 -0
  51. package/docs/adr/0013-context-lifecycle.md +2 -0
  52. package/docs/adr/0014-core-vs-domain-kit-boundary.md +2 -0
  53. package/docs/adr/0015-flow-flow-agents-boundary-reconciliation.md +2 -0
  54. package/docs/adr/0016-three-hard-boundary-model.md +2 -0
  55. package/docs/adr/0017-anti-gaming-trust-security-model.md +2 -0
  56. package/docs/adr/0018-freeze-local-shell-heuristics.md +2 -0
  57. package/docs/adr/0019-kit-dependency-ownership.md +2 -0
  58. package/docs/adr/0020-trust-reconcile-manifest-and-claim-classification.md +2 -0
  59. package/docs/adr/0021-assignment-leases-and-stale-claim-takeover.md +3 -1
  60. package/docs/adr/0022-fail-closed-delivery-reconciliation-with-governed-exemptions.md +182 -0
  61. package/docs/adr/README.md +49 -0
  62. package/docs/adr/index.md +34 -0
  63. package/docs/context-map.md +1 -0
  64. package/docs/decisions/agent-coordination.md +20 -0
  65. package/docs/decisions/anti-gaming-trust-security.md +20 -0
  66. package/docs/decisions/context-lifecycle.md +18 -0
  67. package/docs/decisions/core-domain-kit-boundary.md +18 -0
  68. package/docs/decisions/flow-flow-agents-boundary.md +18 -0
  69. package/docs/decisions/flow-kit.md +20 -0
  70. package/docs/decisions/flow-skill-kit-tool-boundary.md +20 -0
  71. package/docs/decisions/graph-knowledge-provider.md +63 -0
  72. package/docs/decisions/hook-core-kit-boundary.md +18 -0
  73. package/docs/decisions/index.md +22 -0
  74. package/docs/decisions/kit-dependency-ownership.md +18 -0
  75. package/docs/decisions/kit-operation-boundary.md +18 -0
  76. package/docs/decisions/knowledge-promote-sub-flow.md +59 -0
  77. package/docs/decisions/knowledge-store-provider.md +51 -0
  78. package/docs/decisions/kontour-resource-contract.md +18 -0
  79. package/docs/decisions/mcp-posture.md +18 -0
  80. package/docs/decisions/model-routing.md +63 -0
  81. package/docs/decisions/standing-directives.md +66 -0
  82. package/docs/decisions/three-hard-boundary-model.md +18 -0
  83. package/docs/decisions/trust-reconcile.md +20 -0
  84. package/docs/decisions/typescript-source-policy.md +48 -0
  85. package/docs/decisions/workflow-enforcement.md +18 -0
  86. package/docs/decisions/workflow-trust-state.md +20 -0
  87. package/docs/fixture-ownership.md +1 -0
  88. package/docs/workflow-shared-contracts.md +2 -1
  89. package/docs/workflow-usage-guide.md +7 -1
  90. package/evals/ci/run-baseline.sh +10 -0
  91. package/evals/fixtures/assignment-provider/actor-a.json +6 -0
  92. package/evals/fixtures/assignment-provider/actor-b.json +6 -0
  93. package/evals/fixtures/assignment-provider/github-issue-claimed.json +27 -0
  94. package/evals/fixtures/assignment-provider/github-issue-unassigned.json +7 -0
  95. package/evals/fixtures/assignment-provider/hostile-effective-state.json +11 -0
  96. package/evals/fixtures/assignment-provider/liveness-fresh.json +9 -0
  97. package/evals/fixtures/assignment-provider/liveness-stale.json +9 -0
  98. package/evals/integration/test_assignment_provider_github.sh +318 -0
  99. package/evals/integration/test_assignment_provider_local_file.sh +222 -0
  100. package/evals/integration/test_critique_supersession_roundtrip.sh +182 -0
  101. package/evals/integration/test_current_json_per_actor.sh +516 -0
  102. package/evals/integration/test_ensure_session_ownership_guard.sh +435 -0
  103. package/evals/integration/test_fixture_retirement_audit.sh +2 -2
  104. package/evals/integration/test_gate_lockdown.sh +10 -0
  105. package/evals/integration/test_publish_delivery.sh +21 -4
  106. package/evals/integration/test_pull_work_assignment_join.sh +132 -0
  107. package/evals/integration/test_pull_work_liveness_preflight.sh +20 -7
  108. package/evals/integration/test_reconcile_soundness.sh +33 -9
  109. package/evals/integration/test_trust_reconcile.sh +9 -8
  110. package/evals/integration/test_trust_reconcile_negatives.sh +608 -0
  111. package/evals/integration/test_workflow_sidecar_writer.sh +91 -3
  112. package/evals/run.sh +14 -0
  113. package/evals/static/test_flowdef_codeowners_coverage.sh +6 -0
  114. package/evals/static/test_knowledge_providers.sh +32 -0
  115. package/evals/static/test_workflow_skills.sh +15 -2
  116. package/kits/builder/skills/deliver/SKILL.md +36 -0
  117. package/kits/builder/skills/design-probe/SKILL.md +37 -0
  118. package/kits/builder/skills/pickup-probe/SKILL.md +4 -4
  119. package/kits/builder/skills/pull-work/SKILL.md +78 -10
  120. package/kits/knowledge/adapters/default-store/index.js +92 -4
  121. package/kits/knowledge/adapters/obsidian-store/index.js +69 -4
  122. package/kits/knowledge/adapters/shared/codec.js +141 -0
  123. package/kits/knowledge/docs/README.md +121 -2
  124. package/kits/knowledge/docs/store-contract.md +112 -4
  125. package/kits/knowledge/evals/contract-suite/suite.test.js +176 -0
  126. package/kits/knowledge/flows/promote.flow.json +84 -0
  127. package/kits/knowledge/kit.json +50 -0
  128. package/kits/knowledge/promote/distill.js +96 -0
  129. package/kits/knowledge/promote/fixtures/contradiction-registry/CONTEXT.md +7 -0
  130. package/kits/knowledge/promote/fixtures/contradiction-registry/docs/decisions/cache-eviction-policy.md +12 -0
  131. package/kits/knowledge/promote/fixtures/contradiction-registry/docs/decisions/cache-eviction.md +12 -0
  132. package/kits/knowledge/promote/fixtures/repo/CONTEXT.md +11 -0
  133. package/kits/knowledge/promote/fixtures/repo/docs/decisions/index.md +9 -0
  134. package/kits/knowledge/promote/fixtures/repo/docs/decisions/liveness-claim.md +12 -0
  135. package/kits/knowledge/promote/fixtures/session/acceptance.json +9 -0
  136. package/kits/knowledge/promote/fixtures/session/agents/tool-planner/events.jsonl +1 -0
  137. package/kits/knowledge/promote/fixtures/session/agents/tool-verifier/events.jsonl +1 -0
  138. package/kits/knowledge/promote/fixtures/session/agents/tool-worker-1-1/events.jsonl +1 -0
  139. package/kits/knowledge/promote/fixtures/session/kontourai-flow-agents-287--deliver.md +47 -0
  140. package/kits/knowledge/promote/fixtures/session/learning.json +35 -0
  141. package/kits/knowledge/promote/fixtures/session/state.json +19 -0
  142. package/kits/knowledge/promote/health.js +137 -0
  143. package/kits/knowledge/promote/index.js +176 -0
  144. package/kits/knowledge/promote/ingest.js +103 -0
  145. package/kits/knowledge/promote/lib.js +132 -0
  146. package/kits/knowledge/promote/link.js +84 -0
  147. package/kits/knowledge/promote/promote.test.js +174 -0
  148. package/kits/knowledge/providers/conformance/fixtures/git-repo/CONTEXT.md +12 -0
  149. package/kits/knowledge/providers/conformance/fixtures/git-repo/docs/decisions/old-sprocket-shape.md +13 -0
  150. package/kits/knowledge/providers/conformance/fixtures/git-repo/docs/decisions/sprocket-shape.md +14 -0
  151. package/kits/knowledge/providers/conformance/fixtures/git-repo/docs/decisions/widget-format.md +14 -0
  152. package/kits/knowledge/providers/conformance/fixtures/git-repo/docs/learnings/fixture-learning.md +7 -0
  153. package/kits/knowledge/providers/conformance/fixtures/work-item/issues.json +30 -0
  154. package/kits/knowledge/providers/conformance/suite.test.js +143 -0
  155. package/kits/knowledge/providers/git-repo/index.js +236 -0
  156. package/kits/knowledge/providers/health/health-pass.test.js +99 -0
  157. package/kits/knowledge/providers/health/index.js +153 -0
  158. package/kits/knowledge/providers/index.js +25 -0
  159. package/kits/knowledge/providers/lib/model.js +91 -0
  160. package/kits/knowledge/providers/lib/schema-validate.js +119 -0
  161. package/kits/knowledge/providers/markdown-vault/index.js +169 -0
  162. package/kits/knowledge/providers/neo4j/connection.js +121 -0
  163. package/kits/knowledge/providers/neo4j/cypher.js +190 -0
  164. package/kits/knowledge/providers/neo4j/fake-driver.js +123 -0
  165. package/kits/knowledge/providers/neo4j/fixtures/spike-ground-truth.json +29 -0
  166. package/kits/knowledge/providers/neo4j/graph-queries.js +210 -0
  167. package/kits/knowledge/providers/neo4j/index.js +280 -0
  168. package/kits/knowledge/providers/neo4j/integration.test.js +122 -0
  169. package/kits/knowledge/providers/neo4j/neo4j.test.js +219 -0
  170. package/kits/knowledge/providers/neo4j/sync.js +235 -0
  171. package/kits/knowledge/providers/work-item/index.js +204 -0
  172. package/package.json +7 -3
  173. package/schemas/assignment-provider-settings.schema.json +125 -0
  174. package/schemas/knowledge/edge.schema.json +54 -0
  175. package/schemas/knowledge/health-report.schema.json +45 -0
  176. package/schemas/knowledge/node.schema.json +49 -0
  177. package/schemas/knowledge/proposal.schema.json +53 -0
  178. package/scripts/README.md +1 -0
  179. package/scripts/ci/trust-reconcile.js +521 -24
  180. package/scripts/freeze-adrs.mjs +364 -0
  181. package/scripts/hooks/config-protection.js +14 -1
  182. package/scripts/hooks/evidence-capture.js +4 -1
  183. package/scripts/hooks/lib/config-protection-remedies.js +9 -0
  184. package/scripts/hooks/lib/current-pointer.js +123 -0
  185. package/scripts/hooks/lib/liveness-heartbeat.js +75 -35
  186. package/scripts/hooks/stop-goal-fit.js +4 -2
  187. package/scripts/hooks/workflow-steering.js +42 -0
  188. package/scripts/statusline/flow-agents-statusline.js +3 -1
  189. package/src/cli/assignment-provider.ts +927 -0
  190. package/src/cli/effective-assignment-provider-settings.ts +112 -0
  191. package/src/cli/validate-workflow-artifacts.ts +5 -1
  192. package/src/cli/workflow-sidecar.ts +577 -139
  193. package/src/cli.ts +6 -0
  194. package/src/lib/flow-resolver.ts +35 -14
  195. package/src/tools/validate-source-tree.ts +2 -0
@@ -0,0 +1,20 @@
1
+ ---
2
+ status: needs-decision
3
+ subject: Flow / Skill / Kit / Tool boundary
4
+ decided: 2026-07-03
5
+ evidence:
6
+ - kind: adr
7
+ ref: docs/adr/0007-flow-skill-kit-tool-boundary.md
8
+ - kind: adr
9
+ ref: docs/adr/0007-skill-audit.md
10
+ ---
11
+ # Flow / Skill / Kit / Tool boundary
12
+
13
+ This subject has provenance in frozen ADR history ([0007-flow-skill-kit-tool-boundary.md](../adr/0007-flow-skill-kit-tool-boundary.md), [0007-skill-audit.md](../adr/0007-skill-audit.md)) but no living
14
+ decision has been ratified yet under the topic-keyed decision registry
15
+ (`context/contracts/decision-registry-contract.md`). This stub records that the
16
+ subject is open and links the frozen ADR(s) as provenance; it is not a decision.
17
+
18
+ When a living decision is ratified for flow / skill / kit / tool boundary, update this
19
+ file's `status` to `current`, add rationale, and keep the `adr` evidence
20
+ links as provenance for the history that led here.
@@ -0,0 +1,63 @@
1
+ ---
2
+ status: current
3
+ subject: Graph knowledge provider
4
+ decided: 2026-07-03
5
+ evidence:
6
+ - kind: issue
7
+ ref: https://github.com/kontourai/flow-agents/issues/327
8
+ - kind: doc
9
+ ref: docs/spikes/graph-provider-2026-07.md
10
+ - kind: doc
11
+ ref: context/contracts/knowledge-store-contract.md
12
+ - kind: adr
13
+ ref: docs/decisions/knowledge-store-provider.md
14
+ ---
15
+
16
+ # Graph knowledge provider
17
+
18
+ The Knowledge Kit ships a `neo4j` knowledge-store provider: a real, queryable
19
+ graph implementation of the #317 read interface, synced from the file/work-item
20
+ providers. It is the OWNER'S OPT-IN personal default — the file providers remain
21
+ the portfolio default. This decision explicitly overrides the #318 spike's
22
+ defer-as-default verdict at the owner's request ("I still want the graph
23
+ implementation even if it's not the default — it can be my default").
24
+
25
+ ## Decision
26
+
27
+ - **Engine: Neo4j Community 5 over Docker.** The #318 spike compared Neo4j and
28
+ Kuzu; Kuzu was abandoned upstream (Oct 2025, repo archived), so Neo4j — actively
29
+ maintained, with the Browser for human exploration and the portable Cypher
30
+ baseline — is the engine when a graph is used. Kuzu, Aura/hosted, and
31
+ graph-as-primary-storage are non-goals.
32
+ - **The graph is a materialized VIEW, never an authority.** File stores stay the
33
+ source of truth. A `sync` command reuses the #317 providers as READERS (no
34
+ forked extractors) and MERGEs their combined graph into Neo4j idempotently
35
+ (content-keyed hash guard: a re-sync of unchanged stores reports zero writes),
36
+ recording a snapshot digest + timestamp. The write side is proposals-only, like
37
+ every other provider — the graph never bypasses the human-curated stores.
38
+ - **Connection by reference, never hardcoded.** Credentials resolve from
39
+ `NEO4J_URI` / `NEO4J_USER` / `NEO4J_PASSWORD` (this repo does not consume
40
+ `@kontourai/datum` yet, so we follow the existing env-reference precedent; a
41
+ future datum adoption resolves the same three names without touching call
42
+ sites).
43
+ - **Cypher-backed query/health verbs when selected.** The five canonical spike
44
+ queries (transitive blocker closure, contradiction candidates, node-type-aware
45
+ orphans, duplicate candidates WITH 5-char stemming, shortest path) run as live
46
+ Cypher when a Neo4j is reachable and fall back to a portable JS spelling
47
+ (same answers) otherwise. The stemming lesson is preserved: exact title tokens
48
+ missed the traverse#14~#8 duplicate; stemming catches it.
49
+ - **Never a hard dependency.** `neo4j-driver` is an optionalDependency, lazily
50
+ imported. A missing driver OR an unreachable server degrades to the file
51
+ providers with a single clear message. CI has no Neo4j: unit tests + the
52
+ conformance suite run against an injected fake driver; the live integration
53
+ test is gated on `NEO4J_URI` (or a detected Docker Neo4j) and skips loudly.
54
+ - **Selection is config-driven, default file.** `KNOWLEDGE_PROVIDER=neo4j`
55
+ (repo/user-level) opts in; anything else stays on the file providers. See the
56
+ README "Graph provider (opt-in)" section for the owner path.
57
+
58
+ ## Consequences
59
+
60
+ The one-off spike wins (a missing blocker edge, ADR-0007 contradiction, the
61
+ near-duplicate canary trio) become a standing capability without forcing graph
62
+ ops on any repo or workflow that does not opt in. The provider passes the same
63
+ #317 conformance suite as the file providers on its read side.
@@ -0,0 +1,18 @@
1
+ ---
2
+ status: needs-decision
3
+ subject: Hook core/kit boundary
4
+ decided: 2026-07-03
5
+ evidence:
6
+ - kind: adr
7
+ ref: docs/adr/0009-canonical-hook-core-kit-boundary.md
8
+ ---
9
+ # Hook core/kit boundary
10
+
11
+ This subject has provenance in frozen ADR history ([0009-canonical-hook-core-kit-boundary.md](../adr/0009-canonical-hook-core-kit-boundary.md)) but no living
12
+ decision has been ratified yet under the topic-keyed decision registry
13
+ (`context/contracts/decision-registry-contract.md`). This stub records that the
14
+ subject is open and links the frozen ADR(s) as provenance; it is not a decision.
15
+
16
+ When a living decision is ratified for hook core/kit boundary, update this
17
+ file's `status` to `current`, add rationale, and keep the `adr` evidence
18
+ links as provenance for the history that led here.
@@ -10,5 +10,27 @@ Numbered ADRs under `docs/adr/` are frozen history and are not listed here.
10
10
 
11
11
  | Topic | Status | Decision |
12
12
  | --- | --- | --- |
13
+ | [agent-coordination](./agent-coordination.md) | needs-decision | Agent coordination |
14
+ | [anti-gaming-trust-security](./anti-gaming-trust-security.md) | needs-decision | Anti-gaming trust security |
15
+ | [context-lifecycle](./context-lifecycle.md) | needs-decision | Context lifecycle |
16
+ | [core-domain-kit-boundary](./core-domain-kit-boundary.md) | needs-decision | Core vs domain kit boundary |
13
17
  | [decision-records](./decision-records.md) | current | Decision records |
18
+ | [flow-flow-agents-boundary](./flow-flow-agents-boundary.md) | needs-decision | Flow / Flow Agents boundary |
19
+ | [flow-kit](./flow-kit.md) | needs-decision | Flow Kit |
20
+ | [flow-skill-kit-tool-boundary](./flow-skill-kit-tool-boundary.md) | needs-decision | Flow / Skill / Kit / Tool boundary |
21
+ | [graph-knowledge-provider](./graph-knowledge-provider.md) | current | Graph knowledge provider |
22
+ | [hook-core-kit-boundary](./hook-core-kit-boundary.md) | needs-decision | Hook core/kit boundary |
23
+ | [kit-dependency-ownership](./kit-dependency-ownership.md) | needs-decision | Kit dependency ownership |
24
+ | [kit-operation-boundary](./kit-operation-boundary.md) | needs-decision | Kit operation boundary |
25
+ | [knowledge-promote-sub-flow](./knowledge-promote-sub-flow.md) | current | Knowledge promote sub-flow |
26
+ | [knowledge-store-provider](./knowledge-store-provider.md) | current | Knowledge store provider |
27
+ | [kontour-resource-contract](./kontour-resource-contract.md) | needs-decision | Kontour Resource Contract |
28
+ | [mcp-posture](./mcp-posture.md) | needs-decision | MCP posture |
29
+ | [model-routing](./model-routing.md) | current | Model routing |
14
30
  | [promotion-gate](./promotion-gate.md) | current | Promotion gate |
31
+ | [standing-directives](./standing-directives.md) | current | Standing directives |
32
+ | [three-hard-boundary-model](./three-hard-boundary-model.md) | needs-decision | Three-hard-boundary model |
33
+ | [trust-reconcile](./trust-reconcile.md) | needs-decision | Trust-reconcile and delivery reconciliation |
34
+ | [typescript-source-policy](./typescript-source-policy.md) | current | TypeScript-first source policy |
35
+ | [workflow-enforcement](./workflow-enforcement.md) | needs-decision | Workflow Enforcement |
36
+ | [workflow-trust-state](./workflow-trust-state.md) | needs-decision | Workflow trust state |
@@ -0,0 +1,18 @@
1
+ ---
2
+ status: needs-decision
3
+ subject: Kit dependency ownership
4
+ decided: 2026-07-03
5
+ evidence:
6
+ - kind: adr
7
+ ref: docs/adr/0019-kit-dependency-ownership.md
8
+ ---
9
+ # Kit dependency ownership
10
+
11
+ This subject has provenance in frozen ADR history ([0019-kit-dependency-ownership.md](../adr/0019-kit-dependency-ownership.md)) but no living
12
+ decision has been ratified yet under the topic-keyed decision registry
13
+ (`context/contracts/decision-registry-contract.md`). This stub records that the
14
+ subject is open and links the frozen ADR(s) as provenance; it is not a decision.
15
+
16
+ When a living decision is ratified for kit dependency ownership, update this
17
+ file's `status` to `current`, add rationale, and keep the `adr` evidence
18
+ links as provenance for the history that led here.
@@ -0,0 +1,18 @@
1
+ ---
2
+ status: needs-decision
3
+ subject: Kit operation boundary
4
+ decided: 2026-07-03
5
+ evidence:
6
+ - kind: adr
7
+ ref: docs/adr/0008-kit-operation-boundary.md
8
+ ---
9
+ # Kit operation boundary
10
+
11
+ This subject has provenance in frozen ADR history ([0008-kit-operation-boundary.md](../adr/0008-kit-operation-boundary.md)) but no living
12
+ decision has been ratified yet under the topic-keyed decision registry
13
+ (`context/contracts/decision-registry-contract.md`). This stub records that the
14
+ subject is open and links the frozen ADR(s) as provenance; it is not a decision.
15
+
16
+ When a living decision is ratified for kit operation boundary, update this
17
+ file's `status` to `current`, add rationale, and keep the `adr` evidence
18
+ links as provenance for the history that led here.
@@ -0,0 +1,59 @@
1
+ ---
2
+ status: current
3
+ subject: Knowledge promote sub-flow
4
+ decided: 2026-07-03
5
+ evidence:
6
+ - kind: issue
7
+ ref: https://github.com/kontourai/flow-agents/issues/313
8
+ - kind: doc
9
+ ref: context/contracts/knowledge-store-contract.md
10
+ - kind: doc
11
+ ref: context/contracts/decision-registry-contract.md
12
+ - kind: session-archive
13
+ ref: .kontourai/flow-agents/decision-registry-shape/decision-registry-shape--idea-to-backlog.md
14
+ ---
15
+
16
+ # Knowledge promote sub-flow
17
+
18
+ Session promotion runs through a Knowledge Kit FlowDefinition
19
+ (`kits/knowledge/flows/promote.flow.json`, id `knowledge.promote`) with four
20
+ steps — **ingest → distill → link → health** — so promotion quality stops
21
+ depending on which agent did it. This is the first codebase-facing Knowledge Kit
22
+ flow and the first "flow within a flow".
23
+
24
+ ## Decision
25
+
26
+ - **Four steps.** *ingest* reads a completed session dir (read-only) for its
27
+ plan/evidence/critique/learnings/transcripts; *distill* produces DRAFT deltas —
28
+ decision-registry topic files (validated against
29
+ `schemas/decision-record.schema.json` before proposing), CONTEXT.md vocabulary
30
+ additions, and `docs/learnings` entries; *link* attaches provenance (PR, merge
31
+ SHA, session-archive path, touched topics) as `evidence[]` refs; *health* runs
32
+ contradiction detection over the topic files.
33
+ - **Built on the #317 provider interface, not a forked reader.** Health reads the
34
+ registry through the git-repo knowledge-store provider and reuses the
35
+ provider-agnostic `duplicate-detection` verb: two topics with overlapping
36
+ subject nouns and divergent content are a contradiction. The report names BOTH
37
+ topics; a **merge-repair PROPOSAL** (schema-valid, `status: "proposed"`) names a
38
+ merge target. Merge-repair is a proposal, never an auto-edit.
39
+ - **Proposals-only (R4).** The sub-flow NEVER writes docs directly. Every output
40
+ lands under `<session>/proposals/`; the promote step's human/agent applies the
41
+ drafts it accepts. A filesystem diff during a run shows zero writes outside the
42
+ session/proposal dir.
43
+ - **Composition.** `knowledge.promote` is a true composable FlowDefinition — a
44
+ parent step can `uses_flow: "knowledge.promote"` and the resolver resolves its
45
+ gates (it `exports` every gate claim). It is invoked standalone AND from the
46
+ Builder promote step. The builder edge is a **documented composition** (the
47
+ deliver skill's promote step names it as the assisted path) rather than a nested
48
+ builder gate, because #312's `promote` CLI — not a flow gate — is the recording
49
+ mechanism, and the sub-flow's outputs are proposals a human/agent applies.
50
+
51
+ ## Rationale
52
+
53
+ Knowledge Kit had the verbs (capture, compile, link, health) pointed at personal
54
+ knowledge; the codebase was the missing consumer. Promotion (once gated by #312)
55
+ still relied on ad-hoc judgement about WHAT to promote. Making the promote step
56
+ run a Knowledge Kit pipeline over the session artifacts gives the codebase its
57
+ knowledge use case as a composable sub-flow, while proposals-only discipline and
58
+ the shared #317 provider interface keep it from forking a second reader or writing
59
+ into a human-curated store.
@@ -0,0 +1,51 @@
1
+ ---
2
+ status: current
3
+ subject: Knowledge store provider
4
+ decided: 2026-07-02
5
+ evidence:
6
+ - kind: issue
7
+ ref: https://github.com/kontourai/flow-agents/issues/317
8
+ - kind: doc
9
+ ref: context/contracts/knowledge-store-contract.md
10
+ - kind: session-archive
11
+ ref: .kontourai/flow-agents/decision-registry-shape/decision-registry-shape--idea-to-backlog.md
12
+ ---
13
+
14
+ # Knowledge store provider
15
+
16
+ The Knowledge Kit owns a storage-independent **Knowledge Graph** model — typed
17
+ nodes (`note`, `decision`, `issue`, `session`, `person`; extensible), a closed
18
+ edge vocabulary (`supersedes`, `merged-into`, `blocks`, `evidence-of`,
19
+ `mentions`, `relates`), and provenance on both — with storage and sync as
20
+ pluggable **providers**. The same read and health verbs run over every provider.
21
+
22
+ ## Decision
23
+
24
+ - The normative model + provider interface live in
25
+ `context/contracts/knowledge-store-contract.md`, backed by JSON schemas at
26
+ `schemas/knowledge/{node,edge,proposal,health-report}.schema.json`.
27
+ - The write side is **proposals-only**, expressed structurally: a provider's
28
+ `proposeWrite` can only return a proposal whose `status` is the const
29
+ `"proposed"` and MUST NOT mutate the store. Enactment is downstream — the
30
+ git-repo provider renders a decision-registry topic file for the **promote
31
+ sub-flow**; work-item renders a draft `gh` comment/label; markdown-vault
32
+ renders a native frontmatter+wikilink note. This mirrors the store contract's
33
+ `propose → apply/reject` gate rather than forking a new write path.
34
+ - Three reference providers ship: **markdown-vault** (a thin read+propose wrapper
35
+ over the existing store adapter — existing skills unaffected), **git-repo**
36
+ (decision-registry tombstones/evidence, CONTEXT.md glossary, learnings), and
37
+ **work-item** (GitHub issues via an injectable `gh` runner, so backlog hygiene
38
+ becomes a knowledge-health pass).
39
+ - Health verbs (duplicate detection, dependency-link integrity) are
40
+ **provider-agnostic** functions over `{nodes, edges}` and emit schema-valid
41
+ health reports. A parameterized conformance suite gates every provider.
42
+
43
+ ## Rationale
44
+
45
+ The portfolio provider pattern (hachure format/adapters; Builder Kit
46
+ work-item contract/providers) had not been applied to knowledge, which was fused
47
+ to the markdown-vault shape. Rule-of-three passes on stores operated today: a
48
+ duplicate backlog issue (traverse#14) caught manually is now caught mechanically
49
+ by a graph pass over the work-item adapter. A graph-database provider stays a
50
+ gated spike (#318) — adoption waits on a real query failing over file providers,
51
+ not speculation.
@@ -0,0 +1,18 @@
1
+ ---
2
+ status: needs-decision
3
+ subject: Kontour Resource Contract
4
+ decided: 2026-07-03
5
+ evidence:
6
+ - kind: adr
7
+ ref: docs/adr/0005-kubernetes-inspired-resource-contracts.md
8
+ ---
9
+ # Kontour Resource Contract
10
+
11
+ This subject has provenance in frozen ADR history ([0005-kubernetes-inspired-resource-contracts.md](../adr/0005-kubernetes-inspired-resource-contracts.md)) but no living
12
+ decision has been ratified yet under the topic-keyed decision registry
13
+ (`context/contracts/decision-registry-contract.md`). This stub records that the
14
+ subject is open and links the frozen ADR(s) as provenance; it is not a decision.
15
+
16
+ When a living decision is ratified for kontour resource contract, update this
17
+ file's `status` to `current`, add rationale, and keep the `adr` evidence
18
+ links as provenance for the history that led here.
@@ -0,0 +1,18 @@
1
+ ---
2
+ status: needs-decision
3
+ subject: MCP posture
4
+ decided: 2026-07-03
5
+ evidence:
6
+ - kind: adr
7
+ ref: docs/adr/0011-mcp-posture.md
8
+ ---
9
+ # MCP posture
10
+
11
+ This subject has provenance in frozen ADR history ([0011-mcp-posture.md](../adr/0011-mcp-posture.md)) but no living
12
+ decision has been ratified yet under the topic-keyed decision registry
13
+ (`context/contracts/decision-registry-contract.md`). This stub records that the
14
+ subject is open and links the frozen ADR(s) as provenance; it is not a decision.
15
+
16
+ When a living decision is ratified for MCP posture, update this
17
+ file's `status` to `current`, add rationale, and keep the `adr` evidence
18
+ links as provenance for the history that led here.
@@ -0,0 +1,63 @@
1
+ ---
2
+ status: current
3
+ subject: Model routing
4
+ decided: 2026-07-03
5
+ evidence:
6
+ - kind: issue
7
+ ref: https://github.com/kontourai/flow-agents/issues/364
8
+ - kind: url
9
+ ref: https://claude.ai/code/session_01CEPxsn2GuWdysEMACRHsFQ
10
+ ---
11
+
12
+ # Model routing
13
+
14
+ Which model backs which delegate role is **data resolved by the orchestrator
15
+ at delegation time**, not code baked into generated files or per-agent
16
+ frontmatter.
17
+
18
+ ## Decision
19
+
20
+ - Model-routing policy is committed data in `.datum/config.json` (read by the
21
+ `@kontourai/datum` registry, `datum.schema.json`): a `providers` map
22
+ (`anthropic`, `zai`) and a `roles` map keyed by delegate role name
23
+ (`delegate-mechanical`, `delegate-implementation`, `delegate-design`,
24
+ `orchestrator`, `extraction-default`) to a `model@provider` ref.
25
+ - **The orchestrator resolves the role via datum at delegation time** —
26
+ `datum resolve <role> --json` or the library `resolve()` — and passes the
27
+ resolved model **explicitly** when spawning each delegate. The consumption
28
+ instruction lives in `context/contracts/execution-contract.md` § Delegation:
29
+ Model Routing (where orchestrators actually read it), with a matching
30
+ summary table in `kits/builder/skills/deliver/SKILL.md` § Model Routing.
31
+ `.datum/config.json` is the single source of truth for the mapping; the
32
+ contracts/skills only say where to read it.
33
+ - No generated files and no per-agent frontmatter changes. Roles are the
34
+ stable reference; which model a role resolves to can change without
35
+ touching any delegation call site, skill, or agent definition.
36
+ - When datum or the config is absent, delegation falls back to the runtime's
37
+ inherited model and the fallback is noted in the session/task artifact
38
+ rather than blocking delegation.
39
+
40
+ ## Rejected alternatives
41
+
42
+ - **Generated per-agent frontmatter** (a build step stamping a model into
43
+ each agent definition file) — rejected because it reintroduces a generated
44
+ artifact that drifts from the data it was generated from and requires a
45
+ regeneration step on every routing-policy change, which this program has
46
+ standing directives against (no generated files as the routing surface).
47
+ - **Environment-variable-only selection** (e.g. one global
48
+ `ANTHROPIC_MODEL`-style override with no role granularity) — rejected
49
+ because it collapses distinct delegate shapes (mechanical vs.
50
+ precisely-planned implementation vs. design-latitude vs. orchestrator) onto
51
+ a single model choice, losing the per-role routing this design exists to
52
+ express, and because it is not resolvable per-delegate-spawn within a
53
+ single process the way an explicit per-call model override is.
54
+
55
+ ## Rationale
56
+
57
+ Routing policy changes independently of, and more often than, the skills and
58
+ contracts that consume it (new models, new providers, retuned role-to-model
59
+ mappings). Keeping it as data in `.datum/config.json` — the same registry
60
+ shape the `extraction-default` role already establishes as portfolio
61
+ precedent — means a routing change is a config edit reviewed like any other
62
+ data change, not a source/doc change scattered across every delegating
63
+ skill.
@@ -0,0 +1,66 @@
1
+ ---
2
+ status: current
3
+ subject: Standing directives
4
+ decided: 2026-07-03
5
+ evidence:
6
+ - kind: issue
7
+ ref: https://github.com/kontourai/flow-agents/issues/348
8
+ - kind: pr
9
+ ref: https://github.com/kontourai/datum/pull/3
10
+ - kind: pr
11
+ ref: https://github.com/kontourai/flow-agents/pull/344
12
+ - kind: issue
13
+ ref: https://github.com/kontourai/flow-agents/issues/347
14
+ - kind: issue
15
+ ref: https://github.com/kontourai/surface/issues/110
16
+ - kind: pr
17
+ ref: https://github.com/kontourai/surface/pull/113
18
+ - kind: doc
19
+ ref: docs/repository-structure.md
20
+ ---
21
+
22
+ # Standing directives
23
+
24
+ Ratified owner directives get a durable, quotable home at
25
+ `context/contracts/standing-directives.md` instead of living only in the
26
+ ephemeral context of whichever orchestrator session ratified them.
27
+
28
+ ## Decision
29
+
30
+ - `context/contracts/standing-directives.md` holds a short, numbered list of
31
+ owner-ratified directives, each with a one-line rationale and the date it
32
+ was ratified.
33
+ - Every other file under `context/contracts/` carries a one-line pointer in
34
+ its header area to `standing-directives.md`, so any agent that loads a
35
+ phase contract also receives the standing directives regardless of which
36
+ task in a plan it was delegated.
37
+ - A standing directive overrides default engineering conservatism (e.g.
38
+ keeping a compatibility path reachable "just in case") wherever it applies.
39
+ An agent that believes a directive does not fit a situation stops and
40
+ reports the conflict rather than silently choosing a side.
41
+ - The seeded July 2026 directives: no legacy fallbacks (migrate hard, loud
42
+ typed error naming the regeneration command); durable-vs-runtime path
43
+ convention (`.kontourai/` is gitignored runtime state, `.<product>/` is a
44
+ product's durable committed directory); evidence must be executable;
45
+ standalone-first then integrate; and the regression rule for cutovers
46
+ (large regressions are surfaced as an explicit owner decision with data,
47
+ never papered over, but do not block the cutover by default).
48
+
49
+ ## Rationale
50
+
51
+ A delegated agent working one slice of a plan only sees the task prompt it
52
+ was given. If a ratified correction — such as "no legacy fallbacks" — lives
53
+ only in the orchestrator's context from the session that ratified it, the
54
+ delegate never receives it and can reintroduce the exact behavior the owner
55
+ already corrected. Wiring a pointer into every contract header makes receipt
56
+ structural rather than dependent on the orchestrator remembering to restate
57
+ the correction in every task prompt.
58
+
59
+ The individual directives are evidenced by hard-cutover precedent
60
+ ([datum#3](https://github.com/kontourai/datum/pull/3)), the fallback-removal
61
+ follow-up to [flow-agents#344](https://github.com/kontourai/flow-agents/pull/344)
62
+ tracked as [flow-agents#347](https://github.com/kontourai/flow-agents/issues/347),
63
+ and the durable-vs-runtime path convention already documented in
64
+ [docs/repository-structure.md](../repository-structure.md) and applied in
65
+ [surface#110](https://github.com/kontourai/surface/issues/110) /
66
+ [surface#113](https://github.com/kontourai/surface/pull/113).
@@ -0,0 +1,18 @@
1
+ ---
2
+ status: needs-decision
3
+ subject: Three-hard-boundary model
4
+ decided: 2026-07-03
5
+ evidence:
6
+ - kind: adr
7
+ ref: docs/adr/0016-three-hard-boundary-model.md
8
+ ---
9
+ # Three-hard-boundary model
10
+
11
+ This subject has provenance in frozen ADR history ([0016-three-hard-boundary-model.md](../adr/0016-three-hard-boundary-model.md)) but no living
12
+ decision has been ratified yet under the topic-keyed decision registry
13
+ (`context/contracts/decision-registry-contract.md`). This stub records that the
14
+ subject is open and links the frozen ADR(s) as provenance; it is not a decision.
15
+
16
+ When a living decision is ratified for Three-hard-boundary model, update this
17
+ file's `status` to `current`, add rationale, and keep the `adr` evidence
18
+ links as provenance for the history that led here.
@@ -0,0 +1,20 @@
1
+ ---
2
+ status: needs-decision
3
+ subject: Trust-reconcile and delivery reconciliation
4
+ decided: 2026-07-03
5
+ evidence:
6
+ - kind: adr
7
+ ref: docs/adr/0020-trust-reconcile-manifest-and-claim-classification.md
8
+ - kind: adr
9
+ ref: docs/adr/0022-fail-closed-delivery-reconciliation-with-governed-exemptions.md
10
+ ---
11
+ # Trust-reconcile and delivery reconciliation
12
+
13
+ This subject has provenance in frozen ADR history ([0020-trust-reconcile-manifest-and-claim-classification.md](../adr/0020-trust-reconcile-manifest-and-claim-classification.md), [0022-fail-closed-delivery-reconciliation-with-governed-exemptions.md](../adr/0022-fail-closed-delivery-reconciliation-with-governed-exemptions.md)) but no living
14
+ decision has been ratified yet under the topic-keyed decision registry
15
+ (`context/contracts/decision-registry-contract.md`). This stub records that the
16
+ subject is open and links the frozen ADR(s) as provenance; it is not a decision.
17
+
18
+ When a living decision is ratified for Trust-reconcile and delivery reconciliation, update this
19
+ file's `status` to `current`, add rationale, and keep the `adr` evidence
20
+ links as provenance for the history that led here.
@@ -0,0 +1,48 @@
1
+ ---
2
+ status: current
3
+ subject: TypeScript-first source policy
4
+ decided: 2026-07-04
5
+ evidence:
6
+ - kind: adr
7
+ ref: docs/adr/0006-typescript-first-source-policy.md
8
+ - kind: session-archive
9
+ ref: .kontourai/flow-agents/kontourai-flow-agents-311/kontourai-flow-agents-311--deliver.md
10
+ - kind: issue
11
+ ref: https://github.com/kontourai/flow-agents/issues/311
12
+ ---
13
+
14
+ # TypeScript-first source policy
15
+
16
+ Kontour product and runtime source defaults to TypeScript across Flow, Flow
17
+ Agents, Surface, Veritas, and `kontourai.io`. New durable product code, runtime
18
+ adapters, package APIs, CLI behavior, workflow orchestration, hooks, provider
19
+ bridges, and shared contracts are authored in TypeScript by default in
20
+ repositories that are TypeScript-enabled or migrating toward TypeScript.
21
+
22
+ ## Decision
23
+
24
+ - TypeScript-enabled repositories expose a typecheck or build validation that
25
+ proves the authored TypeScript surface compiles, and CI runs that validation
26
+ before code is treated as releasable.
27
+ - Narrow JavaScript/MJS/CJS exceptions remain acceptable: package/tool
28
+ configuration that expects JS/MJS, generated docs/site assets, thin
29
+ shell-adjacent launchers, fixtures/examples/tests following existing local
30
+ convention, and historical archived/vendored/generated artifacts that are not
31
+ edited as active source. Exceptions stay narrow — expanding product/runtime
32
+ behavior in JS/MJS is a deliberate exception or routed into a migration plan.
33
+ - Repositories with nontrivial non-TypeScript runtime source track staged
34
+ migration through repo-specific issues rather than being grandfathered as
35
+ permanent direction (see the original inventory and linked migration issues
36
+ in the frozen ADR below).
37
+
38
+ ## Rationale
39
+
40
+ Cross-repo shared source, contracts, adapters, and workflow tooling need a
41
+ consistent default language, or new work deepens fragmentation and turns every
42
+ existing non-TypeScript file into an implicit permanent exception. This is a
43
+ purely technical, already-settled call: the frozen ADR below made the decision
44
+ on 2026-05-31 and it has not changed. This entry upgrades the ADR-freeze
45
+ cutover's `needs-decision` stub for this subject (issue #314) to a living
46
+ decision — nothing new is decided here beyond recording that the frozen ADR's
47
+ call still stands, per the Probe docs-write contract's worked example
48
+ (`context/contracts/probe-docs-write-contract.md`).
@@ -0,0 +1,18 @@
1
+ ---
2
+ status: needs-decision
3
+ subject: Workflow Enforcement
4
+ decided: 2026-07-03
5
+ evidence:
6
+ - kind: adr
7
+ ref: docs/adr/0001-flow-agents-consumes-flow.md
8
+ ---
9
+ # Workflow Enforcement
10
+
11
+ This subject has provenance in frozen ADR history ([0001-flow-agents-consumes-flow.md](../adr/0001-flow-agents-consumes-flow.md)) but no living
12
+ decision has been ratified yet under the topic-keyed decision registry
13
+ (`context/contracts/decision-registry-contract.md`). This stub records that the
14
+ subject is open and links the frozen ADR(s) as provenance; it is not a decision.
15
+
16
+ When a living decision is ratified for workflow enforcement, update this
17
+ file's `status` to `current`, add rationale, and keep the `adr` evidence
18
+ links as provenance for the history that led here.
@@ -0,0 +1,20 @@
1
+ ---
2
+ status: needs-decision
3
+ subject: Workflow trust state
4
+ decided: 2026-07-03
5
+ evidence:
6
+ - kind: adr
7
+ ref: docs/adr/0004-gates-expect-surface-claims.md
8
+ - kind: adr
9
+ ref: docs/adr/0010-workflow-trust-state-as-hachure-bundle.md
10
+ ---
11
+ # Workflow trust state
12
+
13
+ This subject has provenance in frozen ADR history ([0004-gates-expect-surface-claims.md](../adr/0004-gates-expect-surface-claims.md), [0010-workflow-trust-state-as-hachure-bundle.md](../adr/0010-workflow-trust-state-as-hachure-bundle.md)) but no living
14
+ decision has been ratified yet under the topic-keyed decision registry
15
+ (`context/contracts/decision-registry-contract.md`). This stub records that the
16
+ subject is open and links the frozen ADR(s) as provenance; it is not a decision.
17
+
18
+ When a living decision is ratified for workflow trust state, update this
19
+ file's `status` to `current`, add rationale, and keep the `adr` evidence
20
+ links as provenance for the history that led here.
@@ -13,6 +13,7 @@ run `npm run validate:source --` and `npm run fixture:retirement-audit --`.
13
13
 
14
14
  | Fixture directory | Classification | Owners | Cleanup rule |
15
15
  | --- | --- | --- | --- |
16
+ | `evals/fixtures/assignment-provider` | AssignmentProvider local-file and GitHub render/status fixtures (#290); hostile-effective-state.json is the #291 ensure-session ownership guard's AC9 sanitization fixture | `evals/integration/test_assignment_provider_local_file.sh`, `evals/integration/test_assignment_provider_github.sh`, `evals/integration/test_pull_work_assignment_join.sh`, `evals/integration/test_ensure_session_ownership_guard.sh` | Keep while the assignment provider contract's claim/release/supersede/status/list operations and the assignment ⋈ liveness join are tested against local-file and GitHub fixture inputs. |
16
17
  | `evals/fixtures/backlog-provider-settings` | settings precedence fixtures | `evals/integration/test_effective_backlog_settings.sh` | Keep while backlog provider settings resolution supports global defaults and project overrides. |
17
18
  | `evals/fixtures/builder-kit-workflow-state` | Builder Kit workflow-state fixtures | `evals/static/test_workflow_skills.sh` | Keep while Builder Kit state contract and resume behavior are documented in workflow skill contracts. |
18
19
  | `evals/fixtures/console-learning-projection` | console learning projection fixtures | `evals/integration/test_console_learning_projection.sh` | Keep while learning projection supports correction and open-route examples. |
@@ -10,6 +10,7 @@ The workflow system now separates durable process contracts from role-specific i
10
10
 
11
11
  Shared contracts live in `context/contracts/`:
12
12
 
13
+ - `standing-directives.md`
13
14
  - `artifact-contract.md`
14
15
  - `planning-contract.md`
15
16
  - `execution-contract.md`
@@ -17,7 +18,7 @@ Shared contracts live in `context/contracts/`:
17
18
  - `verification-contract.md`
18
19
  - `delivery-contract.md`
19
20
 
20
- These files define the stable rules for artifacts, planning, execution, review, verification, delivery loops, Goal Fit, and final acceptance.
21
+ These files define the stable rules for artifacts, planning, execution, review, verification, delivery loops, Goal Fit, and final acceptance. `standing-directives.md` is cross-cutting: it holds ratified owner directives that override default engineering conservatism, pointed to from the header of every other contract file so delegated agents receive it regardless of which phase contract they load.
21
22
 
22
23
  The durable resource shape for selected scope, workflow runs, run plans, status conditions, provider-backed Work Items, and sidecar compatibility direction is documented in the Kontour Resource Contract:
23
24
  https://github.com/kontourai/flow-agents/blob/main/docs/kontour-resource-contract.md
@@ -114,6 +114,12 @@ Expected artifact:
114
114
 
115
115
  When a repository has backlog provider settings, `pull-work` should use those settings without requiring the user to name the board. In Flow Agents, `npm run effective-backlog-settings -- --repo-path . --json` resolves `kontourai/flow-agents` to GitHub Project `kontourai/1`, so a prompt like `use pull-work` is enough for the configured provider path.
116
116
 
117
+ ### Assignment ownership: the third provider leg
118
+
119
+ Beside the `WorkItemProvider` (what work exists) and `BoardProvider` (how it is grouped/ranked) settings above, `pull-work` also reads `AssignmentProvider` settings to decide who currently owns a candidate work item before offering it. This is durable, human-visible ownership — a GitHub issue assignee, an `agent:claimed` label, and a versioned machine-readable claim comment (or, for tracker-less repos and evals, an equivalent local JSON record) — joined against the ephemeral liveness presence layer so a crashed session's stale claim never blocks a second session from picking up the same work.
120
+
121
+ Settings live at `context/settings/assignment-provider-settings.json` (validated by `schemas/assignment-provider-settings.schema.json`), mirroring the same `defaults`/`projects[]` shape as the backlog provider settings above; resolve them with `npm run effective-assignment-provider-settings -- --repo-path . --json`. See `context/contracts/assignment-provider-contract.md` for the full `claim`/`release`/`supersede`/`status`/`list` vocabulary, the assignment ⋈ liveness join table, and the human-assignee ask-first policy.
122
+
117
123
  Direct `pull-work` remains a normal workflow primitive. The Builder Kit build path adds the pickup Probe/design-probe handoff before planning; it does not require Surface/Veritas trust-backed gates and does not replace direct primitive use.
118
124
 
119
125
  Builder Kit build is the product-level entry point for implementation pickup. In that mode, `pull-work` may guide the next step automatically as `pull-work -> design-probe / pickup-probe`; direct `pull-work` still stops with a `plan-work` handoff unless you ask to continue.
@@ -249,7 +255,7 @@ When verification or evidence gates route work backward, the handoff must name b
249
255
 
250
256
  For pickup or planning alignment gaps, `decision_gap -> design-probe` means returning to the pickup Probe record, resolving the missing decision or recording an accepted gap, and only then retrying `plan-work`.
251
257
 
252
- Pickup Probe may update durable docs only when the decision is no longer a transient planning note. Use `CONTEXT.md` for glossary-style terminology decisions, create context files lazily only when a resolved term has no existing home, and create ADRs only for hard-to-reverse, surprising decisions that came from a real trade-off. Keep selected-work details, provider snapshots, unresolved questions, and accepted gaps in workflow artifacts until the work is accepted.
258
+ Pickup Probe may update durable docs only when the decision is no longer a transient planning note. Use `CONTEXT.md` for glossary-style terminology decisions, create context files lazily only when a resolved term has no existing home, and record decision subjects as decision-registry deltas (`docs/decisions/<slug>.md`, revise-vs-create against `docs/decisions/index.md`) rather than numbered ADRs see `context/contracts/probe-docs-write-contract.md`. Keep selected-work details, provider snapshots, unresolved questions, and accepted gaps in workflow artifacts until the work is accepted.
253
259
 
254
260
  ## 7. Check Goal Fit Before Stopping
255
261