fde-framework 0.1.0__py3-none-any.whl

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 (286) hide show
  1. fde/__init__.py +3 -0
  2. fde/architect.py +152 -0
  3. fde/cli.py +2107 -0
  4. fde/costing.py +292 -0
  5. fde/decide.py +297 -0
  6. fde/decompose.py +54 -0
  7. fde/deploy.py +371 -0
  8. fde/emit.py +1309 -0
  9. fde/evolution.py +265 -0
  10. fde/factlog.py +369 -0
  11. fde/framework/approaches/ansible-playbook.md +22 -0
  12. fde/framework/approaches/assisted-deterministic.md +37 -0
  13. fde/framework/approaches/audit-only.md +23 -0
  14. fde/framework/approaches/boundary-and-audit.md +18 -0
  15. fde/framework/approaches/cascade.md +32 -0
  16. fde/framework/approaches/classical-ml.md +21 -0
  17. fde/framework/approaches/compose.md +18 -0
  18. fde/framework/approaches/decision-log.md +21 -0
  19. fde/framework/approaches/deterministic-masking.md +18 -0
  20. fde/framework/approaches/deterministic.md +25 -0
  21. fde/framework/approaches/direct-call.md +10 -0
  22. fde/framework/approaches/episodic-store.md +17 -0
  23. fde/framework/approaches/explainability-record.md +14 -0
  24. fde/framework/approaches/field-match.md +15 -0
  25. fde/framework/approaches/finetune.md +29 -0
  26. fde/framework/approaches/fixed-sequence.md +19 -0
  27. fde/framework/approaches/gitops.md +18 -0
  28. fde/framework/approaches/governed-tools.md +18 -0
  29. fde/framework/approaches/graph-retrieval.md +22 -0
  30. fde/framework/approaches/judged.md +15 -0
  31. fde/framework/approaches/keyword-search.md +11 -0
  32. fde/framework/approaches/kubernetes-manifests.md +19 -0
  33. fde/framework/approaches/labelled-metrics.md +14 -0
  34. fde/framework/approaches/llm-extraction.md +26 -0
  35. fde/framework/approaches/llm-scrubbing.md +20 -0
  36. fde/framework/approaches/llm.md +23 -0
  37. fde/framework/approaches/local-embedding.md +28 -0
  38. fde/framework/approaches/managed-api.md +49 -0
  39. fde/framework/approaches/managed-embedding.md +22 -0
  40. fde/framework/approaches/manual-runbook.md +32 -0
  41. fde/framework/approaches/model-planner.md +19 -0
  42. fde/framework/approaches/ocr-pipeline.md +13 -0
  43. fde/framework/approaches/optimisation-reasoning.md +30 -0
  44. fde/framework/approaches/optimisation.md +19 -0
  45. fde/framework/approaches/passthrough.md +11 -0
  46. fde/framework/approaches/role-scoped-authority.md +19 -0
  47. fde/framework/approaches/segmentation.md +29 -0
  48. fde/framework/approaches/self-hosted.md +38 -0
  49. fde/framework/approaches/serverless-gpu.md +27 -0
  50. fde/framework/approaches/speech-transcription.md +21 -0
  51. fde/framework/approaches/structured-logs.md +11 -0
  52. fde/framework/approaches/systemd-unit.md +30 -0
  53. fde/framework/approaches/terraform-module.md +22 -0
  54. fde/framework/approaches/text-extraction.md +14 -0
  55. fde/framework/approaches/traced.md +24 -0
  56. fde/framework/approaches/vector-search.md +17 -0
  57. fde/framework/approaches/video-ingestion.md +16 -0
  58. fde/framework/approaches/windowed-ingestion.md +25 -0
  59. fde/framework/approaches/working-state.md +13 -0
  60. fde/framework/cases/churn-scoring.md +45 -0
  61. fde/framework/cases/route-planning.md +44 -0
  62. fde/framework/cases/structured-extraction.md +48 -0
  63. fde/framework/cases/studio-style.md +46 -0
  64. fde/framework/components/accountability.md +20 -0
  65. fde/framework/components/deployment.md +19 -0
  66. fde/framework/components/embedding.md +23 -0
  67. fde/framework/components/evaluation.md +13 -0
  68. fde/framework/components/governance.md +19 -0
  69. fde/framework/components/integration.md +13 -0
  70. fde/framework/components/memory.md +21 -0
  71. fde/framework/components/observability.md +13 -0
  72. fde/framework/components/perception.md +15 -0
  73. fde/framework/components/planning.md +15 -0
  74. fde/framework/components/provisioning.md +17 -0
  75. fde/framework/components/reasoning.md +20 -0
  76. fde/framework/components/redaction.md +18 -0
  77. fde/framework/components/representation.md +13 -0
  78. fde/framework/components/retrieval.md +13 -0
  79. fde/framework/components/serving.md +20 -0
  80. fde/framework/dimensions/accelerator.md +29 -0
  81. fde/framework/dimensions/access_model.md +25 -0
  82. fde/framework/dimensions/arrival_rate.md +19 -0
  83. fde/framework/dimensions/availability_target.md +23 -0
  84. fde/framework/dimensions/cheap_path_coverage.md +21 -0
  85. fde/framework/dimensions/confidence_calibrated.md +30 -0
  86. fde/framework/dimensions/container_competence.md +22 -0
  87. fde/framework/dimensions/corpus_size.md +13 -0
  88. fde/framework/dimensions/data_residency.md +36 -0
  89. fde/framework/dimensions/environment_lifetime.md +19 -0
  90. fde/framework/dimensions/existing_cluster.md +22 -0
  91. fde/framework/dimensions/existing_iac_tool.md +25 -0
  92. fde/framework/dimensions/external_systems.md +15 -0
  93. fde/framework/dimensions/hosting.md +45 -0
  94. fde/framework/dimensions/human_waiting.md +41 -0
  95. fde/framework/dimensions/input_format.md +29 -0
  96. fde/framework/dimensions/interpretability_required.md +24 -0
  97. fde/framework/dimensions/labelled_count.md +15 -0
  98. fde/framework/dimensions/latency_budget_ms.md +16 -0
  99. fde/framework/dimensions/licence_posture.md +28 -0
  100. fde/framework/dimensions/operates_after_handover.md +25 -0
  101. fde/framework/dimensions/output_shape.md +29 -0
  102. fde/framework/dimensions/provisioning_api.md +18 -0
  103. fde/framework/dimensions/query_pattern.md +25 -0
  104. fde/framework/dimensions/recall_span.md +22 -0
  105. fde/framework/dimensions/sensitivity_present.md +22 -0
  106. fde/framework/interfaces/Generator.md +5 -0
  107. fde/framework/interfaces/Guard.md +5 -0
  108. fde/framework/interfaces/Mapper.md +5 -0
  109. fde/framework/interfaces/ModelServer.md +5 -0
  110. fde/framework/interfaces/Parser.md +5 -0
  111. fde/framework/interfaces/Planner.md +5 -0
  112. fde/framework/interfaces/Retriever.md +5 -0
  113. fde/framework/interfaces/Scorer.md +5 -0
  114. fde/framework/interfaces/Store.md +5 -0
  115. fde/framework/interfaces/ToolBoundary.md +5 -0
  116. fde/framework/interfaces/Tracer.md +5 -0
  117. fde/framework/locales/eu-gdpr.md +51 -0
  118. fde/framework/locales/in-dpdp.md +46 -0
  119. fde/framework/patterns/ansible-playbook.md +9 -0
  120. fde/framework/patterns/assisted-deterministic.md +11 -0
  121. fde/framework/patterns/audit-only.md +9 -0
  122. fde/framework/patterns/boundary-and-audit.md +12 -0
  123. fde/framework/patterns/cascade-reasoning.md +10 -0
  124. fde/framework/patterns/cascade-representation.md +10 -0
  125. fde/framework/patterns/cascade-retrieval.md +10 -0
  126. fde/framework/patterns/classical-ml-reasoning.md +15 -0
  127. fde/framework/patterns/classical-ml.md +13 -0
  128. fde/framework/patterns/compose.md +9 -0
  129. fde/framework/patterns/decision-log.md +9 -0
  130. fde/framework/patterns/deterministic-masking.md +9 -0
  131. fde/framework/patterns/deterministic.md +12 -0
  132. fde/framework/patterns/direct-call.md +12 -0
  133. fde/framework/patterns/episodic-store.md +13 -0
  134. fde/framework/patterns/explainability-record.md +9 -0
  135. fde/framework/patterns/field-match.md +12 -0
  136. fde/framework/patterns/finetune-representation.md +14 -0
  137. fde/framework/patterns/finetune.md +12 -0
  138. fde/framework/patterns/fixed-sequence.md +12 -0
  139. fde/framework/patterns/gitops.md +9 -0
  140. fde/framework/patterns/governed-tools.md +13 -0
  141. fde/framework/patterns/graph-retrieval.md +14 -0
  142. fde/framework/patterns/judged.md +14 -0
  143. fde/framework/patterns/keyword-search.md +12 -0
  144. fde/framework/patterns/kubernetes-manifests.md +9 -0
  145. fde/framework/patterns/labelled-metrics.md +13 -0
  146. fde/framework/patterns/llm-representation.md +17 -0
  147. fde/framework/patterns/llm-scrubbing.md +9 -0
  148. fde/framework/patterns/llm.md +12 -0
  149. fde/framework/patterns/local-embedding.md +9 -0
  150. fde/framework/patterns/managed-api.md +12 -0
  151. fde/framework/patterns/managed-embedding.md +9 -0
  152. fde/framework/patterns/manual-runbook.md +9 -0
  153. fde/framework/patterns/model-planner.md +13 -0
  154. fde/framework/patterns/ocr-pipeline.md +13 -0
  155. fde/framework/patterns/optimisation-reasoning.md +15 -0
  156. fde/framework/patterns/optimisation.md +13 -0
  157. fde/framework/patterns/passthrough.md +12 -0
  158. fde/framework/patterns/role-scoped-authority.md +9 -0
  159. fde/framework/patterns/segmentation.md +12 -0
  160. fde/framework/patterns/self-hosted.md +14 -0
  161. fde/framework/patterns/serverless-gpu.md +12 -0
  162. fde/framework/patterns/speech-transcription.md +10 -0
  163. fde/framework/patterns/structured-logs.md +12 -0
  164. fde/framework/patterns/systemd-unit.md +9 -0
  165. fde/framework/patterns/terraform-module.md +9 -0
  166. fde/framework/patterns/text-extraction.md +12 -0
  167. fde/framework/patterns/traced.md +13 -0
  168. fde/framework/patterns/vector-search.md +14 -0
  169. fde/framework/patterns/video-ingestion.md +9 -0
  170. fde/framework/patterns/windowed-ingestion.md +12 -0
  171. fde/framework/patterns/working-state.md +12 -0
  172. fde/framework/stacks/langgraph.md +9 -0
  173. fde/framework/stacks/local-judge.md +9 -0
  174. fde/framework/stacks/mcp.md +9 -0
  175. fde/framework/stacks/ollama.md +19 -0
  176. fde/framework/stacks/openai-judge.md +9 -0
  177. fde/framework/stacks/opentelemetry.md +9 -0
  178. fde/framework/stacks/ortools.md +9 -0
  179. fde/framework/stacks/pgvector.md +9 -0
  180. fde/framework/stacks/plain-python.md +9 -0
  181. fde/framework/stacks/qdrant.md +9 -0
  182. fde/framework/stacks/tesseract.md +9 -0
  183. fde/framework/stacks/vllm.md +9 -0
  184. fde/framework/stacks/whisper.md +15 -0
  185. fde/framework/stacks/xgboost.md +9 -0
  186. fde/framework/templates/accountability/decision-log.plain.py.j2 +64 -0
  187. fde/framework/templates/accountability/explainability-record.plain.py.j2 +90 -0
  188. fde/framework/templates/deployment/compose.plain.py.j2 +36 -0
  189. fde/framework/templates/deployment/kubernetes-manifests.plain.py.j2 +36 -0
  190. fde/framework/templates/deployment/systemd-unit.plain.py.j2 +36 -0
  191. fde/framework/templates/embedding/local-embedding.plain.py.j2 +71 -0
  192. fde/framework/templates/embedding/managed-embedding.plain.py.j2 +76 -0
  193. fde/framework/templates/evaluation/field-match.plain.py.j2 +146 -0
  194. fde/framework/templates/evaluation/judged.local-judge.py.j2 +100 -0
  195. fde/framework/templates/evaluation/judged.openai-judge.py.j2 +70 -0
  196. fde/framework/templates/evaluation/judged.plain.py.j2 +89 -0
  197. fde/framework/templates/evaluation/labelled-metrics.plain.py.j2 +64 -0
  198. fde/framework/templates/evaluation/labelled-metrics.xgboost.py.j2 +72 -0
  199. fde/framework/templates/governance/audit-only.plain.py.j2 +98 -0
  200. fde/framework/templates/governance/boundary-and-audit.plain.py.j2 +142 -0
  201. fde/framework/templates/governance/role-scoped-authority.plain.py.j2 +63 -0
  202. fde/framework/templates/integration/direct-call.plain.py.j2 +63 -0
  203. fde/framework/templates/integration/governed-tools.mcp.py.j2 +124 -0
  204. fde/framework/templates/integration/governed-tools.plain.py.j2 +153 -0
  205. fde/framework/templates/memory/episodic-store.pgvector.py.j2 +118 -0
  206. fde/framework/templates/memory/episodic-store.plain.py.j2 +147 -0
  207. fde/framework/templates/memory/working-state.plain.py.j2 +48 -0
  208. fde/framework/templates/observability/structured-logs.plain.py.j2 +61 -0
  209. fde/framework/templates/observability/traced.opentelemetry.py.j2 +65 -0
  210. fde/framework/templates/observability/traced.plain.py.j2 +132 -0
  211. fde/framework/templates/perception/ocr-pipeline.plain.py.j2 +71 -0
  212. fde/framework/templates/perception/ocr-pipeline.tesseract.py.j2 +80 -0
  213. fde/framework/templates/perception/passthrough.plain.py.j2 +41 -0
  214. fde/framework/templates/perception/speech-transcription.plain.py.j2 +37 -0
  215. fde/framework/templates/perception/speech-transcription.whisper.py.j2 +39 -0
  216. fde/framework/templates/perception/text-extraction.plain.py.j2 +88 -0
  217. fde/framework/templates/perception/video-ingestion.plain.py.j2 +35 -0
  218. fde/framework/templates/perception/windowed-ingestion.plain.py.j2 +69 -0
  219. fde/framework/templates/planning/fixed-sequence.plain.py.j2 +46 -0
  220. fde/framework/templates/planning/model-planner.langgraph.py.j2 +89 -0
  221. fde/framework/templates/planning/model-planner.plain.py.j2 +82 -0
  222. fde/framework/templates/planning/optimisation.ortools.py.j2 +90 -0
  223. fde/framework/templates/planning/optimisation.plain.py.j2 +71 -0
  224. fde/framework/templates/provisioning/ansible-playbook.plain.py.j2 +29 -0
  225. fde/framework/templates/provisioning/gitops.plain.py.j2 +29 -0
  226. fde/framework/templates/provisioning/manual-runbook.plain.py.j2 +29 -0
  227. fde/framework/templates/provisioning/terraform-module.plain.py.j2 +29 -0
  228. fde/framework/templates/reasoning/cascade.plain.py.j2 +86 -0
  229. fde/framework/templates/reasoning/classical-ml.plain.py.j2 +74 -0
  230. fde/framework/templates/reasoning/classical-ml.xgboost.py.j2 +104 -0
  231. fde/framework/templates/reasoning/finetune.plain.py.j2 +73 -0
  232. fde/framework/templates/reasoning/llm.plain.py.j2 +114 -0
  233. fde/framework/templates/reasoning/optimisation.ortools.py.j2 +90 -0
  234. fde/framework/templates/reasoning/optimisation.plain.py.j2 +58 -0
  235. fde/framework/templates/redaction/deterministic-masking.plain.py.j2 +44 -0
  236. fde/framework/templates/redaction/llm-scrubbing.plain.py.j2 +40 -0
  237. fde/framework/templates/representation/assisted.plain.py.j2 +86 -0
  238. fde/framework/templates/representation/cascade.plain.py.j2 +119 -0
  239. fde/framework/templates/representation/classical-ml.plain.py.j2 +74 -0
  240. fde/framework/templates/representation/classical-ml.xgboost.py.j2 +104 -0
  241. fde/framework/templates/representation/deterministic.plain.py.j2 +101 -0
  242. fde/framework/templates/representation/finetune.plain.py.j2 +68 -0
  243. fde/framework/templates/representation/llm.plain.py.j2 +94 -0
  244. fde/framework/templates/representation/segmentation.plain.py.j2 +68 -0
  245. fde/framework/templates/retrieval/cascade.plain.py.j2 +86 -0
  246. fde/framework/templates/retrieval/graph-retrieval.pgvector.py.j2 +88 -0
  247. fde/framework/templates/retrieval/graph-retrieval.plain.py.j2 +74 -0
  248. fde/framework/templates/retrieval/graph-retrieval.qdrant.py.j2 +71 -0
  249. fde/framework/templates/retrieval/keyword-search.plain.py.j2 +104 -0
  250. fde/framework/templates/retrieval/vector-search.pgvector.py.j2 +100 -0
  251. fde/framework/templates/retrieval/vector-search.plain.py.j2 +84 -0
  252. fde/framework/templates/retrieval/vector-search.qdrant.py.j2 +60 -0
  253. fde/framework/templates/serving/managed-api.plain.py.j2 +74 -0
  254. fde/framework/templates/serving/self-hosted.ollama.py.j2 +47 -0
  255. fde/framework/templates/serving/self-hosted.plain.py.j2 +117 -0
  256. fde/framework/templates/serving/self-hosted.vllm.py.j2 +77 -0
  257. fde/framework/templates/serving/serverless-gpu.plain.py.j2 +62 -0
  258. fde/gates.py +480 -0
  259. fde/graph.py +435 -0
  260. fde/implement.py +250 -0
  261. fde/intake/__init__.py +0 -0
  262. fde/intake/answers.py +154 -0
  263. fde/intake/documents.py +121 -0
  264. fde/intake/interview.py +218 -0
  265. fde/intake/llm_reader.py +336 -0
  266. fde/intake/prose.py +387 -0
  267. fde/intake/samples.py +369 -0
  268. fde/models/__init__.py +0 -0
  269. fde/models/base.py +86 -0
  270. fde/models/fact.py +37 -0
  271. fde/models/profile.py +159 -0
  272. fde/models/respondent.py +34 -0
  273. fde/models/schema.py +430 -0
  274. fde/moves.py +136 -0
  275. fde/ops.py +349 -0
  276. fde/predicate.py +106 -0
  277. fde/realization.py +109 -0
  278. fde/registry.py +162 -0
  279. fde/scan.py +479 -0
  280. fde/space.py +172 -0
  281. fde/workflow.py +233 -0
  282. fde_framework-0.1.0.dist-info/METADATA +449 -0
  283. fde_framework-0.1.0.dist-info/RECORD +286 -0
  284. fde_framework-0.1.0.dist-info/WHEEL +4 -0
  285. fde_framework-0.1.0.dist-info/entry_points.txt +2 -0
  286. fde_framework-0.1.0.dist-info/licenses/LICENSE +202 -0
@@ -0,0 +1,13 @@
1
+ ---
2
+ id: ocr-pipeline
3
+ name: OCR pipeline
4
+ complexity: 2
5
+ components: [perception]
6
+ applies_when: [input_format == scanned_documents, input_format == images]
7
+ avoid_when: [input_format == structured_data, input_format == text]
8
+ evidence: {case_ids: [structured-extraction], confidence: medium, last_verified: 2026-08-21}
9
+ ---
10
+ Pixels to text, with everything that implies: confidence per character, layout
11
+ inference, and a per-page error rate that becomes the system's ceiling.
12
+
13
+ Measure that rate before promising anything downstream of it.
@@ -0,0 +1,30 @@
1
+ ---
2
+ id: optimisation-reasoning
3
+ name: Constraint optimisation as the decision-maker
4
+ complexity: 1
5
+ components: [reasoning]
6
+ applies_when: [output_shape == decision]
7
+ avoid_when:
8
+ - output_shape == freeform
9
+ - output_shape == structured
10
+ - output_shape == classification
11
+ - output_shape == decision and labelled_count >= 1000
12
+ evidence: {case_ids: [route-planning], confidence: high, last_verified: 2026-08-31}
13
+ ---
14
+ A solver as the reasoner, for decisions that are genuinely assignments under
15
+ constraints: crew to flights, loads to routes, stock to stores. Declared
16
+ constraints, an objective, and an answer that is optimal against what was
17
+ declared -- with the standing caveat that it is exactly as good as the
18
+ declarations.
19
+
20
+ The avoid rule is the finding from a factory-floor engagement: a per-item
21
+ decision that history has already labelled thousands of times is a
22
+ classification wearing a decision's name. Twelve thousand pass-or-repair
23
+ labels are not constraints to satisfy, they are a function to learn, and a
24
+ solver given that job has nothing to optimise. Where the labels exist, the
25
+ learned model wins; where the decision is an allocation nobody has ever
26
+ labelled, the solver does.
27
+
28
+ Split from the planning-side optimisation on purpose: an airline recovery
29
+ plan and a per-unit disposition share an algorithm family and nothing else,
30
+ and one avoid rule serving both components punished the wrong one.
@@ -0,0 +1,19 @@
1
+ ---
2
+ id: optimisation
3
+ name: Optimisation
4
+ complexity: 1
5
+ components: [planning]
6
+ applies_when: [output_shape == decision]
7
+ avoid_when: [output_shape == freeform, output_shape == structured, output_shape == classification]
8
+ evidence: {case_ids: [route-planning], confidence: high, last_verified: 2026-08-21}
9
+ ---
10
+ Constraint solvers and mathematical programming.
11
+
12
+ **Optimisation makes decisions; machine learning makes predictions.** Where the
13
+ problem is to allocate, schedule, route or select subject to hard constraints, a
14
+ solver answers it exactly and proves the answer feasible. A model trained to
15
+ imitate past decisions will produce something plausible that violates a
16
+ constraint, and will not tell you it did.
17
+
18
+ The two combine well -- predict demand, then optimise against it -- but the
19
+ prediction is not the decision.
@@ -0,0 +1,11 @@
1
+ ---
2
+ id: passthrough
3
+ name: Pass through
4
+ complexity: 0
5
+ components: [perception]
6
+ applies_when: [input_format == structured_data]
7
+ avoid_when: [input_format == scanned_documents, input_format == documents, input_format == images]
8
+ evidence: {case_ids: [churn-scoring], confidence: high, last_verified: 2026-08-21}
9
+ ---
10
+ Data that already has a schema needs validating, not parsing. The cheapest
11
+ perception is none.
@@ -0,0 +1,19 @@
1
+ ---
2
+ id: role-scoped-authority
3
+ name: Role-scoped authority
4
+ complexity: 2
5
+ components: [governance]
6
+ applies_when: [access_model == role_based]
7
+ avoid_when: [access_model == single_operator, access_model == open_internal]
8
+ evidence: {case_ids: [structured-extraction], confidence: medium, last_verified: 2026-08-30}
9
+ ---
10
+ Approval and audit that know which role is speaking.
11
+
12
+ The approval gate refuses an approval that does not carry an approver role,
13
+ and the audit records the role beside the person. Entitlements remain an
14
+ intersection -- what the delegating person may do, what the agent is scoped
15
+ to, what the tool requires -- with the role as a ceiling on the first term,
16
+ never an extension of it.
17
+
18
+ The roles themselves are client content: this approach fixes the contract
19
+ that a role must be named, and refuses to invent the names.
@@ -0,0 +1,29 @@
1
+ ---
2
+ id: segmentation
3
+ name: Segmentation
4
+ complexity: 1
5
+ components: [representation]
6
+ applies_when: [output_shape == freeform]
7
+ avoid_when: [output_shape == structured]
8
+ evidence: {case_ids: [studio-style], confidence: medium, last_verified: 2026-08-28}
9
+ ---
10
+ Documents into retrievable chunks, with their origins attached.
11
+
12
+ The representation a freeform system actually needs: not fields onto a
13
+ contract but a corpus cut into pieces a retriever can rank -- windows sized
14
+ for the questions people ask, overlapping so answers that straddle a cut are
15
+ not lost, each chunk carrying its source and offsets so every generated
16
+ sentence can point back at where it came from.
17
+
18
+ Traceability is the non-negotiable half. A chunk that cannot say where it
19
+ came from produces answers that cannot be checked, and an unverifiable
20
+ answer from a system inside a client's environment is a liability wearing a
21
+ feature's clothes.
22
+
23
+ Boring on purpose. Semantic and layout-aware splitting are graduations to
24
+ earn with measured retrieval quality, not defaults -- fixed windows with
25
+ overlap are the rung that ships this week and measures honestly.
26
+
27
+ Avoided for structured output: chunking an extraction corpus buries
28
+ the fields the contract needs under retrieval units nobody asked for --
29
+ that shape wants a mapper.
@@ -0,0 +1,38 @@
1
+ ---
2
+ id: self-hosted
3
+ name: Self-hosted
4
+ complexity: 2
5
+ components: [serving]
6
+ applies_when:
7
+ - data_residency == cannot_leave
8
+ - hosting == air-gapped
9
+ - hosting == on-prem
10
+ - hosting == hybrid
11
+ - latency_budget_ms < 100
12
+ avoid_when:
13
+ - operates_after_handover == nobody_yet
14
+ - accelerator == none and human_waiting == yes
15
+ evidence: {case_ids: [structured-extraction], confidence: high, last_verified: 2026-08-21}
16
+ ---
17
+ Open weights on hardware you control.
18
+
19
+ Chosen because something forbids the alternative, not because it is cheaper --
20
+ at sustained interactive load it usually is not, once redundancy, peak headroom
21
+ and prefill overhead are counted. Naive sizing understates the fleet
22
+ substantially: a replica is however many devices the weights and cache need
23
+ together, and pricing each replica as one device quotes a large model's fleet
24
+ at a fraction of its cost.
25
+
26
+ When the hardware will not hold the model, three levers in order:
27
+ quantisation, then parameter-efficient adaptation, then distillation. Each costs
28
+ more effort and more quality risk than the one before, so stop at the first that
29
+ fits.
30
+
31
+ Serving stacks cache at four layers that share one word and nothing else: the
32
+ KV cache lives for one request, prefix caching keeps those tensors across
33
+ requests on the server, provider prompt caching is the same idea on somebody
34
+ else's hardware, and a semantic cache stores whole responses by similarity.
35
+ The first three hit only on exact token identity, which is why sticky routing
36
+ matters on a self-hosted fleet -- a request that lands on a replica holding
37
+ its prefix skips the prefill that dominates time-to-first-token -- and why a
38
+ model switch is a cache reset: entries are keyed to the model that made them.
@@ -0,0 +1,27 @@
1
+ ---
2
+ id: serverless-gpu
3
+ name: Serverless GPU
4
+ complexity: 1
5
+ components: [serving]
6
+ applies_when:
7
+ - human_waiting == no
8
+ - availability_target == best_effort and human_waiting != yes
9
+ avoid_when:
10
+ - human_waiting == yes
11
+ - data_residency == cannot_leave
12
+ - hosting == air-gapped
13
+ - latency_budget_ms < 100
14
+ evidence: {case_ids: [studio-style], confidence: medium, last_verified: 2026-08-21}
15
+ ---
16
+ Rented GPUs that scale to zero between jobs.
17
+
18
+ A stated best-effort availability target is the same permission granted in
19
+ different words: downtime and cold starts are acceptable, so paying for a
20
+ warm fleet is paying for a promise nobody asked for.
21
+
22
+ The right answer when nobody is waiting: a multi-minute cold start is an
23
+ infrastructure detail rather than a user-experience failure, and paying nothing
24
+ between runs beats per-token pricing at volume by a wide margin.
25
+
26
+ The trap is idle time. A fleet left running overnight costs more than the work
27
+ it did, so scale-to-zero has to be real rather than nominal.
@@ -0,0 +1,21 @@
1
+ ---
2
+ id: speech-transcription
3
+ name: Speech transcription
4
+ complexity: 1
5
+ components: [perception]
6
+ applies_when: [input_format == audio]
7
+ avoid_when: [input_format == documents, input_format == structured_data, input_format == text]
8
+ evidence: {case_ids: [structured-extraction], confidence: medium, last_verified: 2026-09-01}
9
+ ---
10
+ Voice to text, before anything downstream reasons about it.
11
+
12
+ **The word error rate is this modality's version of the OCR ceiling**: no
13
+ later component recovers a word that was never heard, and a system quoting
14
+ end-to-end accuracy above its transcription accuracy is quoting a number
15
+ that cannot exist. Measure it on the client's own audio -- accents, lines,
16
+ handsets -- never on a benchmark's studio recordings.
17
+
18
+ Where the callers speak several languages, the transcription model is the
19
+ first place that requirement lands, and per-language error rates belong in
20
+ the acceptance protocol -- an average across languages hides exactly the
21
+ population the service was built to reach.
@@ -0,0 +1,11 @@
1
+ ---
2
+ id: structured-logs
3
+ name: Structured logs
4
+ complexity: 0
5
+ components: [observability]
6
+ applies_when: [always]
7
+ avoid_when: [external_systems > 1]
8
+ evidence: {case_ids: [churn-scoring], confidence: high, last_verified: 2026-08-21}
9
+ ---
10
+ Machine-readable events with correlation identifiers. Enough for a pipeline
11
+ whose path you can enumerate.
@@ -0,0 +1,30 @@
1
+ ---
2
+ id: systemd-unit
3
+ name: Service unit
4
+ complexity: 0
5
+ components: [deployment]
6
+ applies_when: [always]
7
+ avoid_when:
8
+ - existing_cluster == true
9
+ - container_competence == true
10
+ evidence: {case_ids: [structured-extraction], confidence: high, last_verified: 2026-08-25}
11
+ ---
12
+ A virtual environment and a service unit. No container, no orchestrator, no
13
+ registry.
14
+
15
+ The floor of the ladder, so this is what nothing-known resolves to: it is the
16
+ rung that costs least if it turns out to be wrong, and every rung above it has
17
+ to be earned by something in the profile.
18
+
19
+ Being the floor means never being ruled out by workload shape. Many external
20
+ integrations strain a single service unit -- worth saying in the design -- but
21
+ a team with no cluster and no container practice still needs to deploy, and a
22
+ floor that can be knocked out leaves that team with nothing at all.
23
+
24
+ Rung zero, and frequently the correct answer rather than the lesser one. For a
25
+ single-node deployment serving one thing, this is understood by everyone who has
26
+ ever administered a Linux box, restarts on failure, starts on boot, and adds
27
+ nothing anybody has to learn.
28
+
29
+ Reaching past it costs a competency the team may not have and a platform
30
+ somebody has to keep patched. That cost is real and is paid every month.
@@ -0,0 +1,22 @@
1
+ ---
2
+ id: terraform-module
3
+ name: Declarative provisioning
4
+ complexity: 1
5
+ components: [provisioning]
6
+ applies_when: [provisioning_api == true, environment_lifetime == ephemeral]
7
+ avoid_when:
8
+ - provisioning_api == false
9
+ - existing_cluster == true
10
+ - existing_iac_tool == ansible
11
+ evidence: {case_ids: [studio-style], confidence: high, last_verified: 2026-08-25}
12
+ ---
13
+ Resources declared, with state tracked so they can be destroyed again.
14
+
15
+ The one capability a convergence tool does not have: it knows what it created,
16
+ so it can show drift and take it all away. That matters for environments that
17
+ must vanish -- per-branch, per-pilot, per-demo -- and is bookkeeping for a cluster
18
+ that lives five years.
19
+
20
+ Ruled out where the team runs something else, because the tool they cannot
21
+ maintain is the one that rots. And ruled out on bare metal, where there is no
22
+ API to call and the state file would track nothing.
@@ -0,0 +1,14 @@
1
+ ---
2
+ id: text-extraction
3
+ name: Text extraction
4
+ complexity: 1
5
+ components: [perception]
6
+ applies_when: [input_format == documents, input_format == text]
7
+ avoid_when: [input_format == scanned_documents, input_format == structured_data]
8
+ evidence: {case_ids: [structured-extraction], confidence: high, last_verified: 2026-08-21}
9
+ ---
10
+ Pulling text and layout out of documents that already carry a text layer.
11
+
12
+ Where the ceiling gets set. Tables are the usual casualty: a table flattened
13
+ into a line of numbers has lost the relationship between them, and nothing
14
+ downstream puts it back.
@@ -0,0 +1,24 @@
1
+ ---
2
+ id: traced
3
+ name: Distributed tracing
4
+ complexity: 1
5
+ components: [observability]
6
+ applies_when: [always]
7
+ avoid_when: [external_systems < 2]
8
+ evidence: {case_ids: [studio-style], confidence: high, last_verified: 2026-08-21}
9
+ ---
10
+ One system with an enumerable path does not need spans across it; structured
11
+ logs answer the same questions for less. Past that, spans across the whole path, with cost and latency attributed per tenant.
12
+
13
+ A loop cannot be debugged one node at a time. You need the trajectory: what it
14
+ decided, in what order, and why it stopped -- which is precisely what a log line
15
+ per step cannot tell you.
16
+
17
+ Per-tenant cost attribution is an architectural decision rather than a reporting
18
+ one. Retrofitting it means touching every call site.
19
+
20
+ The GenAI semantic conventions are **not stable**: every attribute still carries
21
+ development status, and they moved to their own repository on their own release
22
+ cadence in mid-2026 -- a separate cadence, not a graduation. Chat and embedding
23
+ attributes are settled enough to build on; agent and tool-orchestration ones are
24
+ still moving. Use them, pin the version, and expect a rename to arrive as work.
@@ -0,0 +1,17 @@
1
+ ---
2
+ id: vector-search
3
+ name: Vector search
4
+ complexity: 1
5
+ components: [retrieval]
6
+ applies_when: [query_pattern == lookup, query_pattern == comparative]
7
+ avoid_when: [query_pattern == multi_hop]
8
+ evidence: {case_ids: [studio-style], confidence: high, last_verified: 2026-08-21}
9
+ ---
10
+ Similarity over embeddings, usually with a reranker in front of the results.
11
+
12
+ Reranking is the cheapest quality gain available in most pipelines and the one
13
+ most often skipped: single-digit point lifts for a couple of hundred
14
+ milliseconds, without touching the index.
15
+
16
+ The embedding model is the least reversible choice in the system, since changing
17
+ it means reindexing everything. Decide it late.
@@ -0,0 +1,16 @@
1
+ ---
2
+ id: video-ingestion
3
+ name: Video ingestion
4
+ complexity: 2
5
+ components: [perception]
6
+ applies_when: [input_format == video]
7
+ avoid_when: [input_format == documents, input_format == structured_data, input_format == text]
8
+ evidence: {case_ids: [structured-extraction], confidence: low, last_verified: 2026-09-01}
9
+ ---
10
+ Frames sampled from footage, timestamped, and handed on as images -- video
11
+ perception is image perception plus the decision of which moments to look at.
12
+
13
+ Complexity 2 because the sampling policy is a real design surface: too
14
+ sparse misses the event, too dense drowns the pipeline, and the honest
15
+ starting point is event-triggered sampling around whatever the stream layer
16
+ flags rather than a fixed frame rate nobody can justify.
@@ -0,0 +1,25 @@
1
+ ---
2
+ id: windowed-ingestion
3
+ name: Windowed ingestion
4
+ complexity: 1
5
+ components: [perception]
6
+ applies_when: [input_format == streams]
7
+ avoid_when: [input_format == documents, input_format == scanned_documents]
8
+ evidence: {case_ids: [route-planning], confidence: medium, last_verified: 2026-08-28}
9
+ ---
10
+ A stream into bounded batches, because nothing downstream reasons over an
11
+ infinity.
12
+
13
+ Perception for input that never ends: consume, window by count or by time
14
+ (whichever closes first), stamp each window with what it saw and when, and
15
+ hand finite batches to the pipeline. The window is the unit of everything
16
+ downstream -- of retry, of idempotency, of evaluation -- so its identity is
17
+ stable and its boundaries are recorded.
18
+
19
+ Late data is the design decision, not an edge case: a watermark says how
20
+ long a window waits, and what arrives later lands in a correction window
21
+ rather than mutating a closed one. Reprocessing a closed window is how the
22
+ same event gets acted on twice.
23
+
24
+ Avoided for finite corpora: documents want batch ingestion with a
25
+ known end, and watermarks on a corpus that does not move are ceremony.
@@ -0,0 +1,13 @@
1
+ ---
2
+ id: working-state
3
+ name: Working state
4
+ complexity: 0
5
+ components: [memory]
6
+ applies_when: [recall_span == within_session, recall_span == within_turn]
7
+ avoid_when: [recall_span == across_sessions]
8
+ evidence: {case_ids: [studio-style], confidence: high, last_verified: 2026-08-21}
9
+ ---
10
+ Context held for the length of a session and then discarded.
11
+
12
+ Cheap, and it fails safely: a mistake in working state disappears when the
13
+ session ends. Nothing here is a decision anyone has to live with.
@@ -0,0 +1,45 @@
1
+ ---
2
+ id: churn-scoring
3
+ profile:
4
+ output_shape: classification
5
+ corpus_size: 2000000
6
+ labelled_count: 50000
7
+ interpretability_required: true
8
+ latency_budget_ms: 10
9
+ data_residency: cannot_leave
10
+ hosting: customer-vpc
11
+ human_waiting: "yes"
12
+ decisions:
13
+ representation: classical-ml
14
+ evaluation: labelled-metrics
15
+ serving: self-hosted
16
+ accountability: explainability-record
17
+ governance: boundary-and-audit
18
+ observability: structured-logs
19
+ deployment: systemd-unit
20
+ provisioning: manual-runbook
21
+ outcome: >-
22
+ The shape holds in public production reports: gradient-boosted
23
+ classification beating LLM approaches on cost and accuracy for narrow
24
+ tabular tasks (Arelion/DeLaval: 97% accuracy, 80% manual-workload
25
+ reduction, publicly reported; Airtrain: 47% to 94% accuracy with 94%
26
+ cost reduction after moving to fine-tuned small/classical models,
27
+ publicly reported).
28
+ sanitization: reviewed
29
+ ---
30
+ An engagement shape assembled from publicly documented production
31
+ case studies. No client of ours is identifiable from it, and none
32
+ contributed to it.
33
+
34
+ Tabular classification with an interpretability obligation and a
35
+ millisecond budget. Assembled from publicly documented deployments where
36
+ classical machine learning beat generative approaches in-domain --
37
+ Arelion/DeLaval's XGBoost classification and Airtrain's published
38
+ accuracy/cost results. The shape that keeps classical ML a first-class
39
+ citizen. No private engagement contributed to this record.
40
+
41
+ The decisions above are what the engine derives from this profile
42
+ today -- reproducible by running it. The published figures cited in
43
+ the outcome belong to the public record and carry their own dates;
44
+ measured outcomes for engagements run through this framework enter
45
+ only via `fde retro`.
@@ -0,0 +1,44 @@
1
+ ---
2
+ id: route-planning
3
+ profile:
4
+ output_shape: decision
5
+ latency_budget_ms: 200
6
+ external_systems: 4
7
+ existing_cluster: true
8
+ container_competence: true
9
+ data_residency: may_leave
10
+ hosting: customer-vpc
11
+ human_waiting: "yes"
12
+ decisions:
13
+ planning: optimisation
14
+ reasoning: optimisation
15
+ evaluation: labelled-metrics
16
+ integration: governed-tools
17
+ governance: audit-only
18
+ observability: traced
19
+ deployment: kubernetes-manifests
20
+ provisioning: gitops
21
+ outcome: >-
22
+ The shape holds in decades of published operations-research practice:
23
+ constraint solvers producing auditable dispatch decisions at fleet
24
+ scale (the publicly documented route-optimisation programmes of large
25
+ logistics operators), with generative models absent from the decision
26
+ path because a solver's output is provable and a model's is not.
27
+ sanitization: reviewed
28
+ ---
29
+ An engagement shape assembled from publicly documented production
30
+ case studies. No client of ours is identifiable from it, and none
31
+ contributed to it.
32
+
33
+ Constrained dispatch decisions against live operational systems.
34
+ Anchored in the public operations-research record -- large-scale fleet
35
+ route optimisation is among the most documented solver deployments in
36
+ industry -- rather than any private engagement. Optimisation makes
37
+ decisions; machine learning makes predictions; this shape is why the
38
+ solver rung exists and why mutative integrations get gates and keys.
39
+
40
+ The decisions above are what the engine derives from this profile
41
+ today -- reproducible by running it. The published figures cited in
42
+ the outcome belong to the public record and carry their own dates;
43
+ measured outcomes for engagements run through this framework enter
44
+ only via `fde retro`.
@@ -0,0 +1,48 @@
1
+ ---
2
+ id: structured-extraction
3
+ profile:
4
+ output_shape: structured
5
+ input_format: scanned_documents
6
+ corpus_size: 500000
7
+ labelled_count: 10000
8
+ data_residency: cannot_leave
9
+ hosting: on-prem
10
+ external_systems: 3
11
+ human_waiting: "yes"
12
+ operates_after_handover: platform_team
13
+ container_competence: false
14
+ existing_cluster: false
15
+ decisions:
16
+ perception: ocr-pipeline
17
+ representation: deterministic
18
+ evaluation: field-match
19
+ governance: boundary-and-audit
20
+ integration: governed-tools
21
+ observability: traced
22
+ deployment: systemd-unit
23
+ provisioning: manual-runbook
24
+ outcome: >-
25
+ The shape holds in public production reports: structured metadata
26
+ extraction at hundreds of thousands of documents per week with
27
+ ~99% field accuracy and order-of-magnitude manual-effort reduction
28
+ (AArete's Doxy AI, publicly reported), and document processing under
29
+ compliance boundaries on self-managed infrastructure (Deutsche Bank,
30
+ Anthem Blue Cross, publicly reported).
31
+ sanitization: reviewed
32
+ ---
33
+ An engagement shape assembled from publicly documented production
34
+ case studies. No client of ours is identifiable from it, and none
35
+ contributed to it.
36
+
37
+ High-volume field extraction from scanned documents inside a boundary
38
+ nothing may leave. Assembled from publicly documented production
39
+ deployments -- AArete's structured-extraction platform (500k documents a
40
+ week, 99% accuracy, 97% manual-effort reduction, as published), and the
41
+ compliance-bounded on-premise document systems reported by Deutsche Bank
42
+ and Anthem Blue Cross. No private engagement contributed to this record.
43
+
44
+ The decisions above are what the engine derives from this profile
45
+ today -- reproducible by running it. The published figures cited in
46
+ the outcome belong to the public record and carry their own dates;
47
+ measured outcomes for engagements run through this framework enter
48
+ only via `fde retro`.
@@ -0,0 +1,46 @@
1
+ ---
2
+ id: studio-style
3
+ profile:
4
+ output_shape: freeform
5
+ human_waiting: "no"
6
+ data_residency: may_leave
7
+ hosting: customer-vpc
8
+ corpus_size: 5000
9
+ container_competence: true
10
+ existing_cluster: false
11
+ environment_lifetime: ephemeral
12
+ provisioning_api: true
13
+ decisions:
14
+ reasoning: llm
15
+ serving: managed-api
16
+ evaluation: judged
17
+ governance: audit-only
18
+ observability: structured-logs
19
+ deployment: compose
20
+ provisioning: terraform-module
21
+ outcome: >-
22
+ The shape holds in public production reports: batch generation against
23
+ managed endpoints where nobody waits on a single answer, with batch
24
+ processing and prompt engineering cutting cost per unit dramatically
25
+ (Etsy's buyer-profile generation: 94% cost reduction per million
26
+ users, publicly reported), and judge-based evaluation calibrated
27
+ before scores are trusted (DoorDash's guardrail-plus-judge design,
28
+ publicly reported).
29
+ sanitization: reviewed
30
+ ---
31
+ An engagement shape assembled from publicly documented production
32
+ case studies. No client of ours is identifiable from it, and none
33
+ contributed to it.
34
+
35
+ Open-ended generation in batch, where nobody waits on any single
36
+ answer. Assembled from publicly documented deployments -- Etsy's batch
37
+ profile generation economics and DoorDash's published judge-based
38
+ evaluation design. The shape that exercises the generative path honestly:
39
+ prompted model first, calibrated judge, per-token economics over a held
40
+ fleet. No private engagement contributed to this record.
41
+
42
+ The decisions above are what the engine derives from this profile
43
+ today -- reproducible by running it. The published figures cited in
44
+ the outcome belong to the public record and carry their own dates;
45
+ measured outcomes for engagements run through this framework enter
46
+ only via `fde retro`.
@@ -0,0 +1,20 @@
1
+ ---
2
+ id: accountability
3
+ name: Accountability
4
+ caps: []
5
+ pipeline: false
6
+ required_when:
7
+ - interpretability_required == true
8
+ ---
9
+ Being able to say why a particular decision came out the way it did, to somebody
10
+ outside the team, months later.
11
+
12
+ Separate from governance on purpose. A boundary answers *where data may go*;
13
+ this answers *why this outcome*. They are triggered by different things and a
14
+ system frequently needs both -- a regulated lender has a residency constraint
15
+ and an obligation to explain a refusal, and folding them into one component
16
+ means whichever fires first hides the other.
17
+
18
+ Built in from the start or not at all. Reconstructing why a model decided
19
+ something after the fact is guesswork wearing a report's formatting, and the
20
+ question always arrives when the original context is gone.
@@ -0,0 +1,19 @@
1
+ ---
2
+ id: deployment
3
+ name: Deployment
4
+ caps: []
5
+ pipeline: false
6
+ required_when:
7
+ - always
8
+ ---
9
+ How the thing actually runs on a machine.
10
+
11
+ A ladder rather than a default, from a service unit through to a cluster. Every
12
+ rung is the right answer somewhere, and the failure this exists to prevent is
13
+ reaching past rung zero out of habit: the container runtime is cheap, and the
14
+ platform around it is not -- most of that cost being a team that now has to
15
+ operate something it did not before.
16
+
17
+ Earn the way rightward. More than one long-lived process earns a container;
18
+ multi-node scheduling or zero-downtime rolling deploys earn an orchestrator; and
19
+ one model on two GPUs earns neither.
@@ -0,0 +1,23 @@
1
+ ---
2
+ id: embedding
3
+ name: Embedding
4
+ caps: [retrieval, memory]
5
+ required_when:
6
+ - query_pattern == comparative
7
+ - query_pattern == multi_hop
8
+ ---
9
+ Turning text into vectors, and deciding where that happens.
10
+
11
+ Caps retrieval and memory alike: a poor embedding sets a ceiling neither a
12
+ reranker nor a better model gets past, because the thing that was not
13
+ represented cannot be retrieved.
14
+
15
+ **The least reversible decision in a retrieval system.** Changing the model
16
+ means reindexing the entire corpus, so it is made late, with evidence, and after
17
+ the cheaper choices have been settled.
18
+
19
+ Placement is not a separate question from residency. An embedding is
20
+ recoverable to its source, so computing one through a vendor is sending the
21
+ text -- and a store holding embeddings of regulated data is in scope for the
22
+ boundary. "We only send vectors" is the version of this that sounds safe and
23
+ is not.