cfa-kernel 0.1.7__tar.gz → 0.1.8__tar.gz

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 (234) hide show
  1. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/.gitignore +5 -0
  2. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/CFA_LLM_Demo.ipynb +5 -0
  3. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/PKG-INFO +2 -2
  4. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/README.md +287 -287
  5. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/pyproject.toml +1 -1
  6. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/__init__.py +1 -1
  7. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/core/kernel.py +1 -1
  8. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/normalizer/llm.py +4 -2
  9. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/observability/promotion.py +2 -2
  10. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/reporting/engine.py +1 -1
  11. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/docs/api.md +1 -1
  12. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/docs/faq.md +2 -2
  13. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/docs/intro.md +1 -1
  14. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/docs/whitepaper.md +2 -2
  15. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/docusaurus.config.ts +1 -1
  16. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/api.md +1 -1
  17. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/intro.md +1 -1
  18. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/whitepaper.md +1 -1
  19. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/src/pages/index.tsx +1 -1
  20. cfa_kernel-0.1.7/CFA_LLM_Demo.ipynb.py +0 -620
  21. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/.gitattributes +0 -0
  22. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  23. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  24. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  25. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/.github/workflows/ci.yml +0 -0
  26. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/.github/workflows/deploy-docs.yml +0 -0
  27. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/.github/workflows/deploy-pypi.yml +0 -0
  28. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/.github/workflows/governance.yml +0 -0
  29. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/.uv-cache/.gitignore +0 -0
  30. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/.uv-cache/.lock +0 -0
  31. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/.uv-cache/CACHEDIR.TAG +0 -0
  32. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/.uv-cache/sdists-v9/.gitignore +0 -0
  33. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/CODE_OF_CONDUCT.md +0 -0
  34. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/CONTRIBUTING.md +0 -0
  35. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/LICENSE +0 -0
  36. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/MANUAL_TESTING_GUIDE.md +0 -0
  37. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/SECURITY.md +0 -0
  38. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/cfa_demo_complete.ipynb +0 -0
  39. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/examples/cfa_demo.py +0 -0
  40. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/examples/fiscal_governance.yaml +0 -0
  41. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/examples/full_pipeline.py +0 -0
  42. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/examples/llm_systematizer.py +0 -0
  43. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/examples/runtime_gate.py +0 -0
  44. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/examples/standalone_governance.py +0 -0
  45. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/examples/standalone_lifecycle.py +0 -0
  46. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/examples/standalone_resolution.py +0 -0
  47. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/integrations/airflow-governance-gate/README.md +0 -0
  48. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/integrations/airflow-governance-gate/dags/cfa_governance_gate_demo.py +0 -0
  49. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/integrations/airflow-governance-gate/requirements.txt +0 -0
  50. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/integrations/airflow-governance-gate/src/governance_gate.py +0 -0
  51. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/mcp.json +0 -0
  52. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/policies/compliance-strict-v1.yaml +0 -0
  53. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/policies/finops-strict-v1.yaml +0 -0
  54. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/policies/prod-v1.yaml +0 -0
  55. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/_lazy.py +0 -0
  56. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/adapters/__init__.py +0 -0
  57. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/adapters/autogen.py +0 -0
  58. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/adapters/crewai.py +0 -0
  59. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/adapters/dspy.py +0 -0
  60. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/adapters/langgraph.py +0 -0
  61. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/adapters/openai_agents.py +0 -0
  62. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/audit/__init__.py +0 -0
  63. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/audit/context.py +0 -0
  64. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/audit/hashing.py +0 -0
  65. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/audit/trail.py +0 -0
  66. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/backends/__init__.py +0 -0
  67. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/backends/dbt.py +0 -0
  68. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/backends/pyspark.py +0 -0
  69. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/backends/sql.py +0 -0
  70. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/behavior/__init__.py +0 -0
  71. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/behavior/llm.py +0 -0
  72. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/behavior/spec.py +0 -0
  73. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/behavior/systematizer.py +0 -0
  74. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/cli/__init__.py +0 -0
  75. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/cli/__main__.py +0 -0
  76. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/cli/_helpers.py +0 -0
  77. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/cli/core/__init__.py +0 -0
  78. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/cli/core/evaluate.py +0 -0
  79. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/cli/core/validate.py +0 -0
  80. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/cli/formatters.py +0 -0
  81. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/cli/governance/__init__.py +0 -0
  82. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/cli/governance/audit.py +0 -0
  83. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/cli/governance/catalog.py +0 -0
  84. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/cli/governance/policy.py +0 -0
  85. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/cli/governance/rules.py +0 -0
  86. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/cli/governance/signature.py +0 -0
  87. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/cli/infrastructure/__init__.py +0 -0
  88. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/cli/infrastructure/backend_list.py +0 -0
  89. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/cli/infrastructure/storage.py +0 -0
  90. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/cli/project/__init__.py +0 -0
  91. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/cli/project/init.py +0 -0
  92. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/cli/project/lifecycle.py +0 -0
  93. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/cli/project/status.py +0 -0
  94. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/cli/project/taxonomy.py +0 -0
  95. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/cli/reporting/__init__.py +0 -0
  96. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/cli/reporting/report.py +0 -0
  97. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/cli/reporting/serve.py +0 -0
  98. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/config.py +0 -0
  99. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/core/__init__.py +0 -0
  100. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/core/codegen.py +0 -0
  101. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/core/conditions.py +0 -0
  102. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/core/phases/__init__.py +0 -0
  103. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/core/phases/runner.py +0 -0
  104. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/core/planner.py +0 -0
  105. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/execution/__init__.py +0 -0
  106. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/execution/partial.py +0 -0
  107. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/execution/state_projection.py +0 -0
  108. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/governance/__init__.py +0 -0
  109. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/lifecycle/__init__.py +0 -0
  110. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/mcp/__init__.py +0 -0
  111. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/mcp/__main__.py +0 -0
  112. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/normalizer/__init__.py +0 -0
  113. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/normalizer/base.py +0 -0
  114. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/observability/__init__.py +0 -0
  115. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/observability/indices.py +0 -0
  116. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/observability/metrics.py +0 -0
  117. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/observability/notify.py +0 -0
  118. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/observability/otel.py +0 -0
  119. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/policy/__init__.py +0 -0
  120. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/policy/bundle.py +0 -0
  121. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/policy/catalog.py +0 -0
  122. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/policy/engine.py +0 -0
  123. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/reporting/__init__.py +0 -0
  124. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/reporting/charts.py +0 -0
  125. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/resolution/__init__.py +0 -0
  126. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/runtime/__init__.py +0 -0
  127. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/runtime/gate.py +0 -0
  128. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/sandbox/__init__.py +0 -0
  129. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/sandbox/executor.py +0 -0
  130. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/sandbox/mock.py +0 -0
  131. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/sandbox/panic.py +0 -0
  132. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/storage/__init__.py +0 -0
  133. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/testing/__init__.py +0 -0
  134. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/testing/asserts.py +0 -0
  135. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/testing/evaluate.py +0 -0
  136. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/testing/fixtures.py +0 -0
  137. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/testing/markers.py +0 -0
  138. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/types.py +0 -0
  139. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/validation/__init__.py +0 -0
  140. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/validation/runtime.py +0 -0
  141. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/validation/signature.py +0 -0
  142. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/src/cfa/validation/static.py +0 -0
  143. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/conftest.py +0 -0
  144. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_adapters.py +0 -0
  145. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_airflow_governance_gate.py +0 -0
  146. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_audit_persistent.py +0 -0
  147. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_behavior.py +0 -0
  148. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_behavior_llm.py +0 -0
  149. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_catalog.py +0 -0
  150. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_cli_validation.py +0 -0
  151. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_codegen.py +0 -0
  152. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_config.py +0 -0
  153. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_context.py +0 -0
  154. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_context_persistent.py +0 -0
  155. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_dbt_backend.py +0 -0
  156. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_hashing.py +0 -0
  157. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_indices.py +0 -0
  158. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_integration.py +0 -0
  159. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_intensive.py +0 -0
  160. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_kernel.py +0 -0
  161. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_mcp.py +0 -0
  162. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_metrics.py +0 -0
  163. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_normalizer.py +0 -0
  164. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_normalizer_llm.py +0 -0
  165. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_notify.py +0 -0
  166. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_otel.py +0 -0
  167. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_partial_execution.py +0 -0
  168. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_planner.py +0 -0
  169. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_policy.py +0 -0
  170. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_policy_bundle.py +0 -0
  171. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_promotion.py +0 -0
  172. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_reporting.py +0 -0
  173. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_runtime.py +0 -0
  174. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_runtime_validation.py +0 -0
  175. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_sandbox.py +0 -0
  176. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_serialization.py +0 -0
  177. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_signature.py +0 -0
  178. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_sql_backend.py +0 -0
  179. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_state_projection.py +0 -0
  180. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_static_validation.py +0 -0
  181. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_storage.py +0 -0
  182. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_testing.py +0 -0
  183. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_types.py +0 -0
  184. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/tests/test_user_journeys.py +0 -0
  185. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/.gitignore +0 -0
  186. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/README.md +0 -0
  187. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/blog/2019-05-28-first-blog-post.mdx +0 -0
  188. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/blog/2019-05-29-long-blog-post.mdx +0 -0
  189. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/blog/2021-08-01-mdx-blog-post.mdx +0 -0
  190. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg +0 -0
  191. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/blog/2021-08-26-welcome/index.mdx +0 -0
  192. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/blog/authors.yml +0 -0
  193. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/blog/tags.yml +0 -0
  194. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/docs/architecture-notes.md +0 -0
  195. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/docs/backends.md +0 -0
  196. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/docs/behavior-spec.md +0 -0
  197. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/docs/cli.md +0 -0
  198. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/docs/getting-started.md +0 -0
  199. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/docs/guide.md +0 -0
  200. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/docs/integrations/airflow.md +0 -0
  201. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/docs/integrations/langgraph.md +0 -0
  202. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/docs/integrations/openai-agents.md +0 -0
  203. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/docs/mcp-server.md +0 -0
  204. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/docs/policy-bundles.md +0 -0
  205. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/docs/reporting.md +0 -0
  206. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/i18n/pt-BR/code.json +0 -0
  207. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/architecture-notes.md +0 -0
  208. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/backends.md +0 -0
  209. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/behavior-spec.md +0 -0
  210. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/cli.md +0 -0
  211. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/faq.md +0 -0
  212. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/getting-started.md +0 -0
  213. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/guide.md +0 -0
  214. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/integrations/airflow.md +0 -0
  215. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/integrations/langgraph.md +0 -0
  216. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/integrations/openai-agents.md +0 -0
  217. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/mcp-server.md +0 -0
  218. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/policy-bundles.md +0 -0
  219. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/i18n/pt-BR/docusaurus-plugin-content-docs/current/reporting.md +0 -0
  220. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/package-lock.json +0 -0
  221. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/package.json +0 -0
  222. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/sidebars.ts +0 -0
  223. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/src/components/HomepageFeatures/index.tsx +0 -0
  224. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/src/components/HomepageFeatures/styles.module.css +0 -0
  225. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/src/css/custom.css +0 -0
  226. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/src/pages/index.module.css +0 -0
  227. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/src/pages/markdown-page.mdx +0 -0
  228. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/static/.nojekyll +0 -0
  229. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/static/img/favicon.ico +0 -0
  230. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/static/img/logo.svg +0 -0
  231. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/static/img/undraw_docusaurus_mountain.svg +0 -0
  232. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/static/img/undraw_docusaurus_react.svg +0 -0
  233. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/static/img/undraw_docusaurus_tree.svg +0 -0
  234. {cfa_kernel-0.1.7 → cfa_kernel-0.1.8}/website/tsconfig.json +0 -0
@@ -70,3 +70,8 @@ website/.docusaurus/
70
70
  cfa_test_results_*/
71
71
  test_battery.py
72
72
  uv.lock
73
+
74
+ CFA_LLM_Demo.dbc
75
+ CFA_LLM_Demo.html
76
+ CFA_LLM_Demo.py
77
+ CFA_LLM_Demo.ipynb.py
@@ -145,27 +145,32 @@
145
145
  "source": [
146
146
  "CATALOG = {\n",
147
147
  " 'nfe_bronze': {\n",
148
+ " 'classification': 'internal',\n",
148
149
  " 'type': 'delta', 'layer': 'bronze', 'size_gb': 50,\n",
149
150
  " 'partition_by': ['processing_date'], 'pii': False,\n",
150
151
  " 'description': 'Notas Fiscais Eletronicas brutas',\n",
151
152
  " },\n",
152
153
  " 'clientes_bronze': {\n",
154
+ " 'classification': 'sensitive',\n",
153
155
  " 'type': 'delta', 'layer': 'bronze', 'size_gb': 10,\n",
154
156
  " 'partition_by': ['processing_date'], 'pii': True,\n",
155
157
  " 'pii_columns': ['cpf', 'nome', 'endereco'],\n",
156
158
  " 'description': 'Dados cadastrais com CPF e endereco',\n",
157
159
  " },\n",
158
160
  " 'vendas_bronze': {\n",
161
+ " 'classification': 'high_volume',\n",
159
162
  " 'type': 'delta', 'layer': 'bronze', 'size_gb': 2000,\n",
160
163
  " 'pii': False,\n",
161
164
  " 'description': 'Registros de transacoes de venda',\n",
162
165
  " },\n",
163
166
  " 'fornecedores_bronze': {\n",
167
+ " 'classification': 'internal',\n",
164
168
  " 'type': 'delta', 'layer': 'bronze', 'size_gb': 10,\n",
165
169
  " 'pii': False,\n",
166
170
  " 'description': 'Cadastro de fornecedores',\n",
167
171
  " },\n",
168
172
  " 'vendas_gold_agregado': {\n",
173
+ " 'classification': 'high_volume',\n",
169
174
  " 'type': 'delta', 'layer': 'gold', 'size_gb': 500,\n",
170
175
  " 'pii': False,\n",
171
176
  " 'description': 'Agregados de vendas para BI',\n",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cfa-kernel
3
- Version: 0.1.7
3
+ Version: 0.1.8
4
4
  Summary: CFA — Governed execution for AI agents and data systems
5
5
  Project-URL: Homepage, https://marquesantero.github.io/cfa/
6
6
  Project-URL: Repository, https://github.com/marquesantero/cfa
@@ -38,7 +38,7 @@ Provides-Extra: yaml
38
38
  Requires-Dist: pyyaml>=6.0; extra == 'yaml'
39
39
  Description-Content-Type: text/markdown
40
40
 
41
- # CFA v0.1.7
41
+ # CFA v0.1.8
42
42
 
43
43
  [![CI](https://github.com/marquesantero/cfa/actions/workflows/ci.yml/badge.svg)](https://github.com/marquesantero/cfa/actions/workflows/ci.yml)
44
44
  [![codecov](https://codecov.io/github/marquesantero/cfa/graph/badge.svg?token=P5NFQBZGYT)](https://codecov.io/github/marquesantero/cfa)
@@ -1,287 +1,287 @@
1
- # CFA v0.1.7
2
-
3
- [![CI](https://github.com/marquesantero/cfa/actions/workflows/ci.yml/badge.svg)](https://github.com/marquesantero/cfa/actions/workflows/ci.yml)
4
- [![codecov](https://codecov.io/github/marquesantero/cfa/graph/badge.svg?token=P5NFQBZGYT)](https://codecov.io/github/marquesantero/cfa)
5
- [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
6
- [![Tests](https://img.shields.io/badge/tests-536%20passed-brightgreen)](https://github.com/marquesantero/cfa/actions/workflows/ci.yml)
7
- [![PyPI](https://img.shields.io/pypi/v/cfa-kernel)](https://pypi.org/project/cfa-kernel/)
8
- [![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/)
9
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)
10
- [![Docs](https://img.shields.io/badge/docs-docusaurus-blue.svg)](https://marquesantero.github.io/cfa/)
11
-
12
- **Governed execution for AI agents and data systems.**
13
-
14
- Instead of asking _"which agent or skill should act?"_, CFA asks _"which state transition is being requested, under which constraints, and can it be executed safely?"_ and produces a cryptographically verifiable decision.
15
-
16
- ## Quick Start
17
-
18
- ```bash
19
- pip install cfa-kernel
20
- # or: pip install git+https://github.com/marquesantero/cfa.git
21
- cfa init
22
- cfa evaluate "Join NFe with Clientes and persist to Silver" --catalog .cfa/catalog.json
23
- ```
24
-
25
- ## What CFA does
26
-
27
- | Step | What happens |
28
- |------|-------------|
29
- | **Formalize** | Natural language or JSON → typed `StateSignature` contract |
30
- | **Govern** | Policy Engine evaluates PII, cost, schema, partition constraints |
31
- | **Generate** | Execution planner + deterministic code generation (PySpark, SQL, dbt) |
32
- | **Execute** | Pluggable sandbox with metrics collection + runtime validation |
33
- | **Validate** | State projection, SHA-256 audit trail, lifecycle indices |
34
-
35
- ## Surfaces
36
-
37
- All interfaces are backend-agnostic. CFA evaluates a `StateSignature` contract — however it was produced.
38
-
39
- | Surface | For | Example |
40
- |---------|-----|---------|
41
- | `cfa` CLI | Everyone | `cfa policy check --signature sig.json` |
42
- | `cfa catalog` CLI | Data platform teams | `cfa catalog validate catalog.json` |
43
- | `cfa policy` CLI | Security/compliance | `cfa policy validate policies/prod.yaml` |
44
- | `cfa storage` CLI | Operations | `cfa storage stats --db cfa.db` |
45
- | `cfa lifecycle` CLI | Platform teams | `cfa lifecycle evaluate --db cfa.db` |
46
- | `cfa signature` CLI | External systems | `cfa signature validate request.json` |
47
- | `cfa.testing` | CI/CD | `evaluate("intent", catalog=catalog)` with pytest |
48
- | `cfa.runtime` | Production | `RuntimeGate` as decorator/context-manager |
49
- | `cfa.mcp` | AI agents | MCP server for any MCP-compatible client |
50
- | `cfa.adapters` | AI frameworks | LangGraph, OpenAI Agents, CrewAI, AutoGen, DSPy |
51
-
52
- ## Architecture
53
-
54
- ```text
55
- CLI / MCP / Adapter / API
56
-
57
-
58
- ┌─ Formalize ──┐ NL / JSON / Tool call → typed StateSignature contract
59
- ├─ Govern ──────┤ Policy check + REPLAN cycle (approve / replan / block)
60
- ├─ Generate ────┤ Plan + code (PySpark / SQL / dbt) + static validation
61
- ├─ Execute ─────┤ Pluggable sandbox + runtime validation
62
- └─ Validate ────┘ State projection + SHA-256 audit + lifecycle indices
63
-
64
-
65
- Decision JSON / Audit Trail / OTel / Prometheus
66
- ```
67
-
68
- ## Key Differentiators
69
-
70
- | Feature | CFA | Others |
71
- |---------|-----|--------|
72
- | SHA-256 audit trail (tamper-evident) | ✅ | ❌ |
73
- | State projection between executions | ✅ | ❌ |
74
- | Lifecycle indices (IFo/IFs/IFg/IDI) | ✅ | ❌ |
75
- | REPLAN with auto-interventions | ✅ | ❌ |
76
- | Backend-agnostic (PySpark, SQL, dbt) | ✅ | ❌ |
77
- | Artifact hashing (catalog + policy + signature) | ✅ | ❌ |
78
- | MCP protocol for AI agents | ✅ | ❌ |
79
- | SQLite storage with retention management | ✅ | ❌ |
80
- | Config file with auto-discovery | ✅ | ❌ |
81
- | Zero runtime dependencies (core) | ✅ | ❌ |
82
-
83
- ## CLI
84
-
85
- ```bash
86
- # Governance & evaluation
87
- cfa evaluate "intent" --catalog catalog.json --strict
88
- cfa policy check --signature signature.json --policy-bundle policies/prod.yaml
89
- cfa policy check --signature sig.json --catalog cat.json --strict --audit-log audit.jsonl
90
-
91
- # Validation (CI-ready with JSON output and exit codes)
92
- cfa catalog validate catalog.json --require-datasets --format json
93
- cfa signature validate signature.json --format json
94
- cfa policy validate policies/prod.yaml --format json
95
-
96
- # Audit & verification
97
- cfa audit show --id INTENT_ID --file audit.jsonl --format json
98
- cfa audit verify --file audit.jsonl
99
-
100
- # Policy rules
101
- cfa rules list
102
- cfa rules explain FAULT_CODE
103
-
104
- # Storage management
105
- cfa storage stats --db cfa.db --format json
106
- cfa storage cleanup --db cfa.db --retention 90
107
- cfa storage vacuum --db cfa.db
108
-
109
- # Lifecycle management
110
- cfa lifecycle evaluate --db cfa.db --window 30
111
- cfa lifecycle list --db cfa.db
112
-
113
- # Project health
114
- cfa status --format json
115
-
116
- # Bootstrap
117
- cfa init
118
-
119
- # Backends
120
- cfa backend list
121
- ```
122
-
123
- ## From Python
124
-
125
- ```python
126
- from cfa.testing import evaluate, assert_passed
127
-
128
- result = evaluate(
129
- "Join NFe with Clientes and persist to Silver",
130
- catalog=MY_CATALOG,
131
- policy_rules=my_rules,
132
- backend="pyspark",
133
- )
134
- assert_passed(result)
135
- ```
136
-
137
- ### Policy check with audit
138
-
139
- ```python
140
- from cfa.policy.engine import PolicyEngine
141
- from cfa.types import StateSignature
142
-
143
- signature = StateSignature.from_dict(signature_dict)
144
- engine = PolicyEngine(policy_bundle_version="prod-v1.0")
145
- result = engine.evaluate(signature)
146
- # result.action → approve / replan / block
147
- ```
148
-
149
- ### Runtime gate
150
-
151
- ```python
152
- from cfa.runtime import RuntimeGate, GateConfig
153
-
154
- gate = RuntimeGate(
155
- config=GateConfig(policy_bundle="prod_v1.0", sandbox="mock"),
156
- catalog=PROD_CATALOG,
157
- )
158
-
159
- @gate.guard("aggregate sales with PII protected")
160
- def my_pipeline():
161
- ...
162
- ```
163
-
164
- ### SQLite storage
165
-
166
- ```python
167
- from cfa.storage import SqliteStorage
168
-
169
- store = SqliteStorage("cfa.db")
170
- store.ensure_schema()
171
-
172
- # Audit
173
- store.audit_append(event)
174
-
175
- # Execution records (lifecycle)
176
- store.execution_append(record_dict)
177
-
178
- # Lifecycle skills
179
- store.skill_upsert("hash_a", skill_data)
180
- ```
181
-
182
- ## Policy Bundles
183
-
184
- Declarative YAML policy rules — separate governance from code:
185
-
186
- ```yaml
187
- # policies/prod-v1.yaml
188
- policy_bundle:
189
- version: "prod-v1.0"
190
- rules:
191
- - name: forbid_raw_pii
192
- condition: pii_in_protected_layer
193
- action: block
194
- fault_code: GOVERNANCE_RAW_PII
195
- severity: critical
196
- message: "PII in protected layer without anonymization."
197
- remediation:
198
- - "Apply sha256 on PII columns before the operation"
199
- ```
200
-
201
- Validated at load time — unknown conditions, duplicate fault codes, and invalid enums are caught immediately.
202
-
203
- ## Config File
204
-
205
- ```yaml
206
- # cfa.yaml (auto-discovered by all commands)
207
- version: "1.0"
208
- storage:
209
- backend: sqlite
210
- path: cfa.db
211
- retention_days: 90
212
- defaults:
213
- catalog: .cfa/catalog.json
214
- policy_bundle: .cfa/policies/prod-v1.yaml
215
- backend: pyspark
216
- ```
217
-
218
- ## Backends
219
-
220
- Three governed code generation backends, all pluggable via `BackendRegistry`:
221
-
222
- | Backend | Language | Features |
223
- |---------|----------|----------|
224
- | `pyspark` | PySpark + Delta Lake | Merge, partition overwrite, PII anonymization |
225
- | `sql` | ANSI SQL | MERGE INTO, INSERT OVERWRITE, partition clauses |
226
- | `dbt` | dbt models + schema.yml | Config blocks, refs, not_null/unique tests, PII annotations |
227
-
228
- Each backend declares its own forbidden tokens for static validation.
229
-
230
- ## MCP Server
231
-
232
- Expose CFA governance to any AI agent via Model Context Protocol:
233
-
234
- ```json
235
- {
236
- "mcpServers": {
237
- "cfa": {
238
- "command": "python",
239
- "args": ["-m", "cfa.mcp"]
240
- }
241
- }
242
- }
243
- ```
244
-
245
- 5 tools: `cfa_evaluate_signature`, `cfa_describe_rules`, `cfa_explain_fault`, `cfa_audit_check`, `cfa_list_backends`.
246
-
247
- ## Repository
248
-
249
- ```text
250
- src/cfa/
251
- ├── core/ Kernel, Planner, CodeGen, Conditions, Phases
252
- ├── policy/ PolicyEngine, PolicyBundle, Catalog validation
253
- ├── validation/ Static, Runtime, Signature validation
254
- ├── audit/ AuditTrail, Context, Hashing
255
- ├── observability/ Metrics, OTel, Notify, Indices, Promotion
256
- ├── normalizer/ Rule-based normalizer, LLM normalizer
257
- ├── execution/ Partial execution, State projection
258
- ├── adapters/ LangGraph, OpenAI, CrewAI, AutoGen, DSPy
259
- ├── backends/ PySpark, SQL, dbt (pluggable)
260
- ├── sandbox/ Pluggable sandbox backend + registry + executor
261
- ├── cli/ CLI commands by family (core/, governance/, reporting/, project/, infrastructure/)
262
- ├── storage/ SQLite + JSONL backends (stats, cleanup, vacuum)
263
- ├── mcp/ MCP server (JSON-RPC over stdio)
264
- ├── reporting/ HTML reports
265
- ├── runtime/ Production governance gate
266
- ├── testing/ pytest-native evaluate() + fixtures
267
- ├── config.py CFA config (discovery, defaults)
268
- ├── types.py StateSignature, Fault, KernelResult
269
- └── _lazy.py Reusable lazy loader for package __init__
270
- ```
271
-
272
- ## Docs
273
-
274
- All documentation at **[marquesantero.github.io/cfa](https://marquesantero.github.io/cfa/)**:
275
-
276
- - [Getting Started](https://marquesantero.github.io/cfa/docs/getting-started)
277
- - [CLI Reference](https://marquesantero.github.io/cfa/docs/cli)
278
- - [Policy Bundles](https://marquesantero.github.io/cfa/docs/policy-bundles)
279
- - [Backends](https://marquesantero.github.io/cfa/docs/backends)
280
- - [MCP Server](https://marquesantero.github.io/cfa/docs/mcp-server)
281
- - [Reporting](https://marquesantero.github.io/cfa/docs/reporting)
282
- - [Architecture Notes](https://marquesantero.github.io/cfa/docs/architecture-notes)
283
- - [FAQ](https://marquesantero.github.io/cfa/docs/faq)
284
-
285
- ## License
286
-
287
- [MIT](./LICENSE) · [Antero Marques](https://github.com/marquesantero)
1
+ # CFA v0.1.8
2
+
3
+ [![CI](https://github.com/marquesantero/cfa/actions/workflows/ci.yml/badge.svg)](https://github.com/marquesantero/cfa/actions/workflows/ci.yml)
4
+ [![codecov](https://codecov.io/github/marquesantero/cfa/graph/badge.svg?token=P5NFQBZGYT)](https://codecov.io/github/marquesantero/cfa)
5
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
6
+ [![Tests](https://img.shields.io/badge/tests-536%20passed-brightgreen)](https://github.com/marquesantero/cfa/actions/workflows/ci.yml)
7
+ [![PyPI](https://img.shields.io/pypi/v/cfa-kernel)](https://pypi.org/project/cfa-kernel/)
8
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/)
9
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)
10
+ [![Docs](https://img.shields.io/badge/docs-docusaurus-blue.svg)](https://marquesantero.github.io/cfa/)
11
+
12
+ **Governed execution for AI agents and data systems.**
13
+
14
+ Instead of asking _"which agent or skill should act?"_, CFA asks _"which state transition is being requested, under which constraints, and can it be executed safely?"_ and produces a cryptographically verifiable decision.
15
+
16
+ ## Quick Start
17
+
18
+ ```bash
19
+ pip install cfa-kernel
20
+ # or: pip install git+https://github.com/marquesantero/cfa.git
21
+ cfa init
22
+ cfa evaluate "Join NFe with Clientes and persist to Silver" --catalog .cfa/catalog.json
23
+ ```
24
+
25
+ ## What CFA does
26
+
27
+ | Step | What happens |
28
+ |------|-------------|
29
+ | **Formalize** | Natural language or JSON → typed `StateSignature` contract |
30
+ | **Govern** | Policy Engine evaluates PII, cost, schema, partition constraints |
31
+ | **Generate** | Execution planner + deterministic code generation (PySpark, SQL, dbt) |
32
+ | **Execute** | Pluggable sandbox with metrics collection + runtime validation |
33
+ | **Validate** | State projection, SHA-256 audit trail, lifecycle indices |
34
+
35
+ ## Surfaces
36
+
37
+ All interfaces are backend-agnostic. CFA evaluates a `StateSignature` contract — however it was produced.
38
+
39
+ | Surface | For | Example |
40
+ |---------|-----|---------|
41
+ | `cfa` CLI | Everyone | `cfa policy check --signature sig.json` |
42
+ | `cfa catalog` CLI | Data platform teams | `cfa catalog validate catalog.json` |
43
+ | `cfa policy` CLI | Security/compliance | `cfa policy validate policies/prod.yaml` |
44
+ | `cfa storage` CLI | Operations | `cfa storage stats --db cfa.db` |
45
+ | `cfa lifecycle` CLI | Platform teams | `cfa lifecycle evaluate --db cfa.db` |
46
+ | `cfa signature` CLI | External systems | `cfa signature validate request.json` |
47
+ | `cfa.testing` | CI/CD | `evaluate("intent", catalog=catalog)` with pytest |
48
+ | `cfa.runtime` | Production | `RuntimeGate` as decorator/context-manager |
49
+ | `cfa.mcp` | AI agents | MCP server for any MCP-compatible client |
50
+ | `cfa.adapters` | AI frameworks | LangGraph, OpenAI Agents, CrewAI, AutoGen, DSPy |
51
+
52
+ ## Architecture
53
+
54
+ ```text
55
+ CLI / MCP / Adapter / API
56
+
57
+
58
+ ┌─ Formalize ──┐ NL / JSON / Tool call → typed StateSignature contract
59
+ ├─ Govern ──────┤ Policy check + REPLAN cycle (approve / replan / block)
60
+ ├─ Generate ────┤ Plan + code (PySpark / SQL / dbt) + static validation
61
+ ├─ Execute ─────┤ Pluggable sandbox + runtime validation
62
+ └─ Validate ────┘ State projection + SHA-256 audit + lifecycle indices
63
+
64
+
65
+ Decision JSON / Audit Trail / OTel / Prometheus
66
+ ```
67
+
68
+ ## Key Differentiators
69
+
70
+ | Feature | CFA | Others |
71
+ |---------|-----|--------|
72
+ | SHA-256 audit trail (tamper-evident) | ✅ | ❌ |
73
+ | State projection between executions | ✅ | ❌ |
74
+ | Lifecycle indices (IFo/IFs/IFg/IDI) | ✅ | ❌ |
75
+ | REPLAN with auto-interventions | ✅ | ❌ |
76
+ | Backend-agnostic (PySpark, SQL, dbt) | ✅ | ❌ |
77
+ | Artifact hashing (catalog + policy + signature) | ✅ | ❌ |
78
+ | MCP protocol for AI agents | ✅ | ❌ |
79
+ | SQLite storage with retention management | ✅ | ❌ |
80
+ | Config file with auto-discovery | ✅ | ❌ |
81
+ | Zero runtime dependencies (core) | ✅ | ❌ |
82
+
83
+ ## CLI
84
+
85
+ ```bash
86
+ # Governance & evaluation
87
+ cfa evaluate "intent" --catalog catalog.json --strict
88
+ cfa policy check --signature signature.json --policy-bundle policies/prod.yaml
89
+ cfa policy check --signature sig.json --catalog cat.json --strict --audit-log audit.jsonl
90
+
91
+ # Validation (CI-ready with JSON output and exit codes)
92
+ cfa catalog validate catalog.json --require-datasets --format json
93
+ cfa signature validate signature.json --format json
94
+ cfa policy validate policies/prod.yaml --format json
95
+
96
+ # Audit & verification
97
+ cfa audit show --id INTENT_ID --file audit.jsonl --format json
98
+ cfa audit verify --file audit.jsonl
99
+
100
+ # Policy rules
101
+ cfa rules list
102
+ cfa rules explain FAULT_CODE
103
+
104
+ # Storage management
105
+ cfa storage stats --db cfa.db --format json
106
+ cfa storage cleanup --db cfa.db --retention 90
107
+ cfa storage vacuum --db cfa.db
108
+
109
+ # Lifecycle management
110
+ cfa lifecycle evaluate --db cfa.db --window 30
111
+ cfa lifecycle list --db cfa.db
112
+
113
+ # Project health
114
+ cfa status --format json
115
+
116
+ # Bootstrap
117
+ cfa init
118
+
119
+ # Backends
120
+ cfa backend list
121
+ ```
122
+
123
+ ## From Python
124
+
125
+ ```python
126
+ from cfa.testing import evaluate, assert_passed
127
+
128
+ result = evaluate(
129
+ "Join NFe with Clientes and persist to Silver",
130
+ catalog=MY_CATALOG,
131
+ policy_rules=my_rules,
132
+ backend="pyspark",
133
+ )
134
+ assert_passed(result)
135
+ ```
136
+
137
+ ### Policy check with audit
138
+
139
+ ```python
140
+ from cfa.policy.engine import PolicyEngine
141
+ from cfa.types import StateSignature
142
+
143
+ signature = StateSignature.from_dict(signature_dict)
144
+ engine = PolicyEngine(policy_bundle_version="prod-v1.0")
145
+ result = engine.evaluate(signature)
146
+ # result.action → approve / replan / block
147
+ ```
148
+
149
+ ### Runtime gate
150
+
151
+ ```python
152
+ from cfa.runtime import RuntimeGate, GateConfig
153
+
154
+ gate = RuntimeGate(
155
+ config=GateConfig(policy_bundle="prod_v1.0", sandbox="mock"),
156
+ catalog=PROD_CATALOG,
157
+ )
158
+
159
+ @gate.guard("aggregate sales with PII protected")
160
+ def my_pipeline():
161
+ ...
162
+ ```
163
+
164
+ ### SQLite storage
165
+
166
+ ```python
167
+ from cfa.storage import SqliteStorage
168
+
169
+ store = SqliteStorage("cfa.db")
170
+ store.ensure_schema()
171
+
172
+ # Audit
173
+ store.audit_append(event)
174
+
175
+ # Execution records (lifecycle)
176
+ store.execution_append(record_dict)
177
+
178
+ # Lifecycle skills
179
+ store.skill_upsert("hash_a", skill_data)
180
+ ```
181
+
182
+ ## Policy Bundles
183
+
184
+ Declarative YAML policy rules — separate governance from code:
185
+
186
+ ```yaml
187
+ # policies/prod-v1.yaml
188
+ policy_bundle:
189
+ version: "prod-v1.0"
190
+ rules:
191
+ - name: forbid_raw_pii
192
+ condition: pii_in_protected_layer
193
+ action: block
194
+ fault_code: GOVERNANCE_RAW_PII
195
+ severity: critical
196
+ message: "PII in protected layer without anonymization."
197
+ remediation:
198
+ - "Apply sha256 on PII columns before the operation"
199
+ ```
200
+
201
+ Validated at load time — unknown conditions, duplicate fault codes, and invalid enums are caught immediately.
202
+
203
+ ## Config File
204
+
205
+ ```yaml
206
+ # cfa.yaml (auto-discovered by all commands)
207
+ version: "1.0"
208
+ storage:
209
+ backend: sqlite
210
+ path: cfa.db
211
+ retention_days: 90
212
+ defaults:
213
+ catalog: .cfa/catalog.json
214
+ policy_bundle: .cfa/policies/prod-v1.yaml
215
+ backend: pyspark
216
+ ```
217
+
218
+ ## Backends
219
+
220
+ Three governed code generation backends, all pluggable via `BackendRegistry`:
221
+
222
+ | Backend | Language | Features |
223
+ |---------|----------|----------|
224
+ | `pyspark` | PySpark + Delta Lake | Merge, partition overwrite, PII anonymization |
225
+ | `sql` | ANSI SQL | MERGE INTO, INSERT OVERWRITE, partition clauses |
226
+ | `dbt` | dbt models + schema.yml | Config blocks, refs, not_null/unique tests, PII annotations |
227
+
228
+ Each backend declares its own forbidden tokens for static validation.
229
+
230
+ ## MCP Server
231
+
232
+ Expose CFA governance to any AI agent via Model Context Protocol:
233
+
234
+ ```json
235
+ {
236
+ "mcpServers": {
237
+ "cfa": {
238
+ "command": "python",
239
+ "args": ["-m", "cfa.mcp"]
240
+ }
241
+ }
242
+ }
243
+ ```
244
+
245
+ 5 tools: `cfa_evaluate_signature`, `cfa_describe_rules`, `cfa_explain_fault`, `cfa_audit_check`, `cfa_list_backends`.
246
+
247
+ ## Repository
248
+
249
+ ```text
250
+ src/cfa/
251
+ ├── core/ Kernel, Planner, CodeGen, Conditions, Phases
252
+ ├── policy/ PolicyEngine, PolicyBundle, Catalog validation
253
+ ├── validation/ Static, Runtime, Signature validation
254
+ ├── audit/ AuditTrail, Context, Hashing
255
+ ├── observability/ Metrics, OTel, Notify, Indices, Promotion
256
+ ├── normalizer/ Rule-based normalizer, LLM normalizer
257
+ ├── execution/ Partial execution, State projection
258
+ ├── adapters/ LangGraph, OpenAI, CrewAI, AutoGen, DSPy
259
+ ├── backends/ PySpark, SQL, dbt (pluggable)
260
+ ├── sandbox/ Pluggable sandbox backend + registry + executor
261
+ ├── cli/ CLI commands by family (core/, governance/, reporting/, project/, infrastructure/)
262
+ ├── storage/ SQLite + JSONL backends (stats, cleanup, vacuum)
263
+ ├── mcp/ MCP server (JSON-RPC over stdio)
264
+ ├── reporting/ HTML reports
265
+ ├── runtime/ Production governance gate
266
+ ├── testing/ pytest-native evaluate() + fixtures
267
+ ├── config.py CFA config (discovery, defaults)
268
+ ├── types.py StateSignature, Fault, KernelResult
269
+ └── _lazy.py Reusable lazy loader for package __init__
270
+ ```
271
+
272
+ ## Docs
273
+
274
+ All documentation at **[marquesantero.github.io/cfa](https://marquesantero.github.io/cfa/)**:
275
+
276
+ - [Getting Started](https://marquesantero.github.io/cfa/docs/getting-started)
277
+ - [CLI Reference](https://marquesantero.github.io/cfa/docs/cli)
278
+ - [Policy Bundles](https://marquesantero.github.io/cfa/docs/policy-bundles)
279
+ - [Backends](https://marquesantero.github.io/cfa/docs/backends)
280
+ - [MCP Server](https://marquesantero.github.io/cfa/docs/mcp-server)
281
+ - [Reporting](https://marquesantero.github.io/cfa/docs/reporting)
282
+ - [Architecture Notes](https://marquesantero.github.io/cfa/docs/architecture-notes)
283
+ - [FAQ](https://marquesantero.github.io/cfa/docs/faq)
284
+
285
+ ## License
286
+
287
+ [MIT](./LICENSE) · [Antero Marques](https://github.com/marquesantero)
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "cfa-kernel"
7
- version = "0.1.7"
7
+ version = "0.1.8"
8
8
  description = "CFA — Governed execution for AI agents and data systems"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -6,7 +6,7 @@ Governed execution for AI agents and data systems.
6
6
 
7
7
  from cfa._lazy import LazyLoader
8
8
 
9
- __version__ = "0.1.7"
9
+ __version__ = "0.1.8"
10
10
 
11
11
  __getattr__ = LazyLoader({
12
12
  "KernelOrchestrator": ("cfa.core.kernel", "KernelOrchestrator"),