@semacode/cli 2.3.1 → 3.0.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 (250) hide show
  1. package/README.md +265 -217
  2. package/dist/agentContextPack.js +14 -10
  3. package/dist/agentEntryPoints.d.ts +5 -0
  4. package/dist/agentEntryPoints.js +567 -557
  5. package/dist/angular-consumer-standalone.js +1 -1
  6. package/dist/bin.d.ts +6 -0
  7. package/dist/bin.js +130 -0
  8. package/dist/cliArgs.js +4 -4
  9. package/dist/cliControlError.d.ts +12 -0
  10. package/dist/cliControlError.js +47 -0
  11. package/dist/cliGrammar.d.ts +11 -0
  12. package/dist/cliGrammar.js +551 -0
  13. package/dist/cliHelp.d.ts +13 -0
  14. package/dist/cliHelp.js +19 -0
  15. package/dist/cliHelpTexto.d.ts +3 -0
  16. package/dist/cliHelpTexto.js +168 -0
  17. package/dist/cliRuntime.d.ts +2 -0
  18. package/dist/cliRuntime.js +31 -0
  19. package/dist/comandos.js +9 -22
  20. package/dist/contexto.js +5 -5
  21. package/dist/dev/index.d.ts +1 -0
  22. package/dist/dev/index.js +51 -9
  23. package/dist/discovery/catalog.js +3 -3
  24. package/dist/distribuicao/filesystemGlobal.d.ts +63 -0
  25. package/dist/distribuicao/filesystemGlobal.js +701 -0
  26. package/dist/distribuicao/index.d.ts +7 -0
  27. package/dist/distribuicao/index.js +227 -0
  28. package/dist/distribuicao/launcherGlobal.d.ts +53 -0
  29. package/dist/distribuicao/launcherGlobal.js +643 -0
  30. package/dist/distribuicao/launcherWindows.d.ts +28 -0
  31. package/dist/distribuicao/launcherWindows.js +326 -0
  32. package/dist/distribuicao/lockContextGlobal.d.ts +10 -0
  33. package/dist/distribuicao/lockContextGlobal.js +17 -0
  34. package/dist/distribuicao/lockGlobal.d.ts +6 -0
  35. package/dist/distribuicao/lockGlobal.js +520 -0
  36. package/dist/distribuicao/skillGlobal.d.ts +48 -0
  37. package/dist/distribuicao/skillGlobal.js +652 -0
  38. package/dist/distribuicao/skillIntentPolicy.d.ts +21 -0
  39. package/dist/distribuicao/skillIntentPolicy.js +115 -0
  40. package/dist/distribuicao/tipos.d.ts +50 -0
  41. package/dist/distribuicao/tipos.js +10 -0
  42. package/dist/distribuicao/versaoSemantica.d.ts +3 -0
  43. package/dist/distribuicao/versaoSemantica.js +62 -0
  44. package/dist/drift.part01.d.ts +26 -24
  45. package/dist/drift.part01.js +2 -1
  46. package/dist/drift.part04.d.ts +12 -3
  47. package/dist/drift.part04.js +88 -17
  48. package/dist/drift.part05.d.ts +2 -2
  49. package/dist/drift.part05.js +8 -6
  50. package/dist/drift.part06.d.ts +2 -2
  51. package/dist/drift.part06.js +113 -26
  52. package/dist/drift.part07.d.ts +11 -11
  53. package/dist/drift.part07.js +261 -265
  54. package/dist/drift.part08.d.ts +2 -2
  55. package/dist/drift.part08.js +35 -26
  56. package/dist/drift.part11.js +238 -56
  57. package/dist/drift.part12.d.ts +1 -1
  58. package/dist/drift.part12.js +193 -21
  59. package/dist/drift.part13.d.ts +20 -39
  60. package/dist/drift.part13.js +601 -647
  61. package/dist/drift.part14.js +21 -7
  62. package/dist/driftCacheCas.d.ts +43 -0
  63. package/dist/driftCacheCas.js +351 -0
  64. package/dist/driftCacheFilesystem.d.ts +64 -0
  65. package/dist/driftCacheFilesystem.js +313 -0
  66. package/dist/driftCacheModes.d.ts +38 -0
  67. package/dist/driftCacheModes.js +147 -0
  68. package/dist/driftCacheStore.d.ts +80 -0
  69. package/dist/driftCacheStore.js +603 -0
  70. package/dist/driftCatalogo.d.ts +2 -28
  71. package/dist/driftCatalogo.js +143 -284
  72. package/dist/driftEscopo.d.ts +1 -3
  73. package/dist/driftEscopo.js +235 -151
  74. package/dist/driftEscopoReferencias.d.ts +5 -1
  75. package/dist/driftEscopoReferencias.js +375 -28
  76. package/dist/driftOrcamento.d.ts +0 -6
  77. package/dist/driftOrcamento.js +2 -1
  78. package/dist/execucoesExternas.js +19 -5
  79. package/dist/geracaoCore.js +4 -6
  80. package/dist/iaPrompts.d.ts +3 -3
  81. package/dist/iaPrompts.js +312 -313
  82. package/dist/index.d.ts +4 -1
  83. package/dist/index.js +6 -25
  84. package/dist/index.part01.d.ts +20 -28
  85. package/dist/index.part01.js +16 -237
  86. package/dist/index.part02.js +36 -22
  87. package/dist/index.part03.d.ts +24 -2
  88. package/dist/index.part03.js +83 -19
  89. package/dist/index.part04.d.ts +10 -2
  90. package/dist/index.part04.js +142 -120
  91. package/dist/index.part05.js +80 -78
  92. package/dist/index.part06.js +34 -17
  93. package/dist/index.part07.js +7 -3
  94. package/dist/index.part08.d.ts +1 -1
  95. package/dist/index.part08.js +22 -27
  96. package/dist/initCommand.js +5 -1
  97. package/dist/initTemplatesBase.js +81 -79
  98. package/dist/pipelineConteudo/command.d.ts +1 -0
  99. package/dist/pipelineConteudo/command.js +9 -2
  100. package/dist/pipelineConteudo/help.d.ts +2 -0
  101. package/dist/pipelineConteudo/help.js +33 -0
  102. package/dist/profileAuthorCommand.js +3 -7
  103. package/dist/profileCommand.js +3 -7
  104. package/dist/projetoCarregar.js +35 -17
  105. package/dist/projetoCatalogo.d.ts +1 -0
  106. package/dist/projetoCatalogo.js +64 -25
  107. package/dist/projetoOrigens.d.ts +2 -0
  108. package/dist/projetoOrigens.js +65 -9
  109. package/dist/projetoTipos.d.ts +1 -0
  110. package/dist/resultadoCli.d.ts +20 -0
  111. package/dist/resultadoCli.js +57 -0
  112. package/dist/saidaCli.d.ts +35 -0
  113. package/dist/saidaCli.js +118 -0
  114. package/dist/sistemasInterativos/acceptanceEvidence.d.ts +22 -0
  115. package/dist/sistemasInterativos/acceptanceEvidence.js +345 -0
  116. package/dist/sistemasInterativos/engineObservation.d.ts +12 -0
  117. package/dist/sistemasInterativos/engineObservation.js +438 -0
  118. package/dist/sistemasInterativos/jobOrchestration.d.ts +2 -0
  119. package/dist/sistemasInterativos/jobOrchestration.js +204 -0
  120. package/dist/sistemasInterativos/operationPrimitives.d.ts +21 -0
  121. package/dist/sistemasInterativos/operationPrimitives.js +194 -0
  122. package/dist/sistemasInterativos/operations.d.ts +4 -39
  123. package/dist/sistemasInterativos/operations.js +5 -1164
  124. package/dist/skillCommand.d.ts +5 -0
  125. package/dist/skillCommand.js +88 -0
  126. package/docs/README.md +34 -30
  127. package/docs/ai-integration.md +25 -12
  128. package/docs/ai-onboarding.md +37 -18
  129. package/docs/ai-workflow.md +9 -7
  130. package/docs/cli.md +125 -7
  131. package/docs/commands.md +41 -20
  132. package/docs/deploy.md +21 -8
  133. package/docs/descoberta-capacidades.md +106 -106
  134. package/docs/documentation.md +49 -39
  135. package/docs/drift-cache.md +108 -0
  136. package/docs/getting-started.md +43 -18
  137. package/docs/pipeline-conteudo.md +246 -246
  138. package/docs/profiles.md +54 -54
  139. package/docs/repositories.md +19 -2
  140. package/docs/rollback.md +15 -8
  141. package/docs/security.md +25 -3
  142. package/docs/sistemas-interativos.md +379 -374
  143. package/docs/testing.md +139 -40
  144. package/exemplos/pipeline-conteudo/README.md +44 -44
  145. package/exemplos/pipeline-conteudo/alvos.json +23 -23
  146. package/exemplos/pipeline-conteudo/definicao.json +136 -136
  147. package/exemplos/profile_simulation.sema +211 -211
  148. package/exemplos/sistemas-interativos/README.md +100 -100
  149. package/exemplos/sistemas-interativos/advanced/acceptance-context-evaluate-valid.json +5 -5
  150. package/exemplos/sistemas-interativos/advanced/acceptance-lock-valid.json +16 -16
  151. package/exemplos/sistemas-interativos/advanced/asset-provenance-valid.json +32 -32
  152. package/exemplos/sistemas-interativos/advanced/autonomy-repair-valid.json +93 -93
  153. package/exemplos/sistemas-interativos/advanced/control-run-definition-valid.json +78 -78
  154. package/exemplos/sistemas-interativos/advanced/control-run-valid.json +27 -27
  155. package/exemplos/sistemas-interativos/advanced/distributed-workers-valid.json +79 -79
  156. package/exemplos/sistemas-interativos/advanced/editor-state-valid.json +42 -42
  157. package/exemplos/sistemas-interativos/advanced/engine-snapshot-after-valid.json +32 -32
  158. package/exemplos/sistemas-interativos/advanced/engine-snapshot-before-valid.json +23 -23
  159. package/exemplos/sistemas-interativos/advanced/job-orchestration-valid.json +39 -39
  160. package/exemplos/sistemas-interativos/advanced/multimodal-evidence-valid.json +46 -46
  161. package/exemplos/sistemas-interativos/advanced/multiplayer-authority-valid.json +39 -39
  162. package/exemplos/sistemas-interativos/advanced/playtest-fuzz-valid.json +37 -37
  163. package/exemplos/sistemas-interativos/advanced/portability-valid.json +104 -104
  164. package/exemplos/sistemas-interativos/advanced/temporal-evidence-valid.json +27 -27
  165. package/exemplos/sistemas-interativos/advanced/temporal-valid.json +118 -118
  166. package/exemplos/sistemas-interativos/experience-ir-valid.json +459 -459
  167. package/exemplos/sistemas-interativos/game-2d.json +83 -83
  168. package/exemplos/sistemas-interativos/game-3d-human.json +81 -81
  169. package/exemplos/sistemas-interativos/game-pixel-16-bit.json +97 -97
  170. package/exemplos/sistemas-interativos/game-pixel-8-bit.json +94 -94
  171. package/exemplos/sistemas-interativos/game-xr-human.json +80 -80
  172. package/exemplos/sistemas-interativos/hybrid-2-5d.json +108 -108
  173. package/exemplos/sistemas-interativos/protocol-mutating-rollback-valid.json +75 -75
  174. package/exemplos/sistemas-interativos/protocol-read-only-valid.json +58 -58
  175. package/exemplos/sistemas-interativos/simulation-2d-controlled.json +97 -97
  176. package/exemplos/sistemas-interativos/simulation-3d-calibrated-autonomous.json +141 -141
  177. package/exemplos/sistemas-interativos/simulation-headless-autonomous-batch.json +112 -112
  178. package/exemplos/sistemas-interativos/simulation-pixel-16-bit.json +103 -103
  179. package/exemplos/sistemas-interativos/simulation-text-controlled.json +95 -95
  180. package/node_modules/@sema/gerador-cpp/package.json +1 -1
  181. package/node_modules/@sema/gerador-dotnet/package.json +1 -1
  182. package/node_modules/@sema/gerador-lua/dist/index.js +51 -51
  183. package/node_modules/@sema/gerador-php/dist/index.js +113 -113
  184. package/node_modules/@sema/nucleo/dist/semantico/analisador.d.ts +1 -0
  185. package/node_modules/@sema/nucleo/dist/semantico/analisador.js +1 -0
  186. package/package.json +9 -4
  187. package/scripts/postinstall.mjs +148 -0
  188. package/skills/sema/SKILL.md +199 -0
  189. package/skills/sema/agents/openai.yaml +4 -0
  190. package/dist/driftCache.d.ts +0 -49
  191. package/dist/driftCache.js +0 -311
  192. package/dist/driftCacheIncremental.d.ts +0 -98
  193. package/dist/driftCacheIncremental.js +0 -596
  194. package/dist/driftCatalogoPersistente.d.ts +0 -8
  195. package/dist/driftCatalogoPersistente.js +0 -77
  196. package/node_modules/@sema/gerador-cpp/dist/index.js.map +0 -1
  197. package/node_modules/@sema/gerador-css/dist/index.js.map +0 -1
  198. package/node_modules/@sema/gerador-css/dist/index.part01.js.map +0 -1
  199. package/node_modules/@sema/gerador-css/dist/index.part02.js.map +0 -1
  200. package/node_modules/@sema/gerador-dart/dist/index.js.map +0 -1
  201. package/node_modules/@sema/gerador-dotnet/dist/index.js.map +0 -1
  202. package/node_modules/@sema/gerador-html/dist/index.js.map +0 -1
  203. package/node_modules/@sema/gerador-javascript/dist/index.js.map +0 -1
  204. package/node_modules/@sema/gerador-lua/dist/index.js.map +0 -1
  205. package/node_modules/@sema/gerador-php/dist/index.js.map +0 -1
  206. package/node_modules/@sema/gerador-python/dist/index.js.map +0 -1
  207. package/node_modules/@sema/gerador-python/dist/index.part01.js.map +0 -1
  208. package/node_modules/@sema/gerador-python/dist/index.part02.js.map +0 -1
  209. package/node_modules/@sema/gerador-typescript/dist/index.js.map +0 -1
  210. package/node_modules/@sema/gerador-typescript/dist/index.part01.js.map +0 -1
  211. package/node_modules/@sema/gerador-typescript/dist/index.part02.js.map +0 -1
  212. package/node_modules/@sema/gerador-typescript/dist/index.part03.js.map +0 -1
  213. package/node_modules/@sema/nucleo/dist/ast/tipos.js.map +0 -1
  214. package/node_modules/@sema/nucleo/dist/diagnosticos/index.js.map +0 -1
  215. package/node_modules/@sema/nucleo/dist/diagnosticos/melhorador.js.map +0 -1
  216. package/node_modules/@sema/nucleo/dist/diagnosticos/snippets.js.map +0 -1
  217. package/node_modules/@sema/nucleo/dist/formatador/index.js.map +0 -1
  218. package/node_modules/@sema/nucleo/dist/formatador/index.part01.js.map +0 -1
  219. package/node_modules/@sema/nucleo/dist/formatador/index.part02.js.map +0 -1
  220. package/node_modules/@sema/nucleo/dist/index.js.map +0 -1
  221. package/node_modules/@sema/nucleo/dist/ir/conversor.js.map +0 -1
  222. package/node_modules/@sema/nucleo/dist/ir/conversor.part01.js.map +0 -1
  223. package/node_modules/@sema/nucleo/dist/ir/conversor.part02.js.map +0 -1
  224. package/node_modules/@sema/nucleo/dist/ir/conversor.part03.js.map +0 -1
  225. package/node_modules/@sema/nucleo/dist/ir/modelos.js.map +0 -1
  226. package/node_modules/@sema/nucleo/dist/lexer/lexer.js.map +0 -1
  227. package/node_modules/@sema/nucleo/dist/lexer/tokens.js.map +0 -1
  228. package/node_modules/@sema/nucleo/dist/parser/parser.declaracoes.js.map +0 -1
  229. package/node_modules/@sema/nucleo/dist/parser/parser.js.map +0 -1
  230. package/node_modules/@sema/nucleo/dist/parser/parser.modulo.js.map +0 -1
  231. package/node_modules/@sema/nucleo/dist/parser/parser.part01.js.map +0 -1
  232. package/node_modules/@sema/nucleo/dist/parser/parser.part02.js.map +0 -1
  233. package/node_modules/@sema/nucleo/dist/parser/parser.part03.js.map +0 -1
  234. package/node_modules/@sema/nucleo/dist/persistencia/contratos.js.map +0 -1
  235. package/node_modules/@sema/nucleo/dist/semantico/analisador.js.map +0 -1
  236. package/node_modules/@sema/nucleo/dist/semantico/analisador.part01.js.map +0 -1
  237. package/node_modules/@sema/nucleo/dist/semantico/analisador.part02.js.map +0 -1
  238. package/node_modules/@sema/nucleo/dist/semantico/analisador.part03.js.map +0 -1
  239. package/node_modules/@sema/nucleo/dist/semantico/analisador.part04.js.map +0 -1
  240. package/node_modules/@sema/nucleo/dist/semantico/analisador.part05.js.map +0 -1
  241. package/node_modules/@sema/nucleo/dist/semantico/analisador.part06.js.map +0 -1
  242. package/node_modules/@sema/nucleo/dist/semantico/analisador.part07.js.map +0 -1
  243. package/node_modules/@sema/nucleo/dist/semantico/analisador.part08.js.map +0 -1
  244. package/node_modules/@sema/nucleo/dist/semantico/estruturas.js.map +0 -1
  245. package/node_modules/@sema/nucleo/dist/semantico/estruturas.part01.js.map +0 -1
  246. package/node_modules/@sema/nucleo/dist/semantico/estruturas.part02.js.map +0 -1
  247. package/node_modules/@sema/nucleo/dist/semantico/orcamentoSemantico.js.map +0 -1
  248. package/node_modules/@sema/nucleo/dist/semantico/seguranca.js.map +0 -1
  249. package/node_modules/@sema/nucleo/dist/util/arquivos.js.map +0 -1
  250. package/node_modules/@sema/padroes/dist/index.js.map +0 -1
@@ -4,53 +4,78 @@ Sema is installed and used as a local CLI.
4
4
 
5
5
  ```bash
6
6
  npm install -g @semacode/cli
7
- codex plugin marketplace add gerlanss/Sema
8
- codex plugin add sema@sema
7
+ sema skill status --json
9
8
  ```
10
9
 
11
- Open a new Codex task in the target repository so the newly installed `$sema`
12
- skill is loaded, then ask it to initialize Sema. Existing tasks do not refresh
13
- their skill catalog. After bootstrap, `AGENTS.md` becomes the automatic protocol
14
- for subsequent tasks.
10
+ The global package creates an absolute launcher under `~/.sema/bin`, installs
11
+ the bundled skill in `~/.agents/skills/sema`, and mirrors it to
12
+ `~/.claude/skills/sema` only when Claude is already present. Open a new task so
13
+ the updated skill catalog is loaded. Installing or updating the global CLI does
14
+ not authorize Sema adoption in the current workspace: informational requests
15
+ stay read-only, and implementation requires explicit adoption authorization.
16
+ After an authorized bootstrap, `AGENTS.md` becomes the automatic protocol for
17
+ subsequent tasks.
15
18
 
16
19
  Then verify the local engine:
17
20
 
18
21
  ```bash
19
22
  sema --version
20
- sema resumo
23
+ sema resumo --drift none
21
24
  ```
22
25
 
23
26
  The CLI is ready when `sema --version` succeeds. No Sema login, user
24
27
  authorization, activation key, product-license check, token, credits, billing
25
28
  service, or control panel is involved.
26
29
 
27
- The Codex skill is required for first contact with a project that does not yet
28
- have Sema. It only bootstraps the local CLI and generates the repository's
29
- `AGENTS.md`; that file becomes the automatic workspace protocol afterward.
30
- Plugin installation is explicit and does not happen from npm lifecycle scripts.
30
+ The skill handles first contact with a project that does not yet have Sema. It
31
+ only bootstraps the local CLI and generates the repository's `AGENTS.md`; that
32
+ file becomes the automatic workspace protocol afterward. The npm lifecycle does
33
+ not install plugins or touch plugin caches.
34
+
35
+ If the install used `--ignore-scripts`, run `sema skill sync --json`. If the
36
+ shell cannot resolve the npm shim, use `~/.sema/bin/sema` on macOS or Linux. On
37
+ Windows, PowerShell resolves `sema.ps1` from `PATH`, `cmd.exe` resolves
38
+ `sema.cmd`, and the robust PowerShell fallback is:
39
+
40
+ ```powershell
41
+ & "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Bypass -File "$HOME\.sema\bin\sema-managed.ps1" --version
42
+ ```
43
+
44
+ The managed fallback contains absolute Node.js and CLI paths and does not
45
+ depend on `PATH`.
31
46
 
32
47
  ## First Project
33
48
 
34
49
  ```bash
50
+ sema descobrir explicar flow.project-adoption --json
35
51
  sema iniciar --template base
52
+ sema sync-codex --json
36
53
  sema validar contratos/*.sema --json
37
- sema resumo
54
+ sema resumo --drift none
38
55
  ```
39
56
 
40
- `sema iniciar` preserves existing project files and refuses symlink or junction
41
- escapes. The bootstrap skill never uses `--force`; explicit overwrite remains a
42
- human decision.
57
+ Run this sequence only after explicit project-adoption authorization. The
58
+ `sema iniciar` command preserves existing project files and refuses symlink or
59
+ junction escapes. The bootstrap skill never uses `--force`; explicit overwrite
60
+ remains a human decision.
43
61
 
44
62
  ## Existing Project
45
63
 
46
64
  ```bash
47
- sema resumo
65
+ sema resumo --drift none
48
66
  sema docs-impacto --intencao "describe the change" --json
49
- sema inspecionar contratos/example.sema --json
50
- sema drift contratos/example.sema --escopo modulo --json
67
+ sema inspecionar contratos/example.sema --drift none --json
68
+ sema drift contratos/example.sema --escopo modulo --cache fresh --json
51
69
  sema impacto contratos/example.sema --alvo sema.example.target --mudanca "describe the change" --json
52
70
  ```
53
71
 
72
+ `sema resumo` and `sema inspecionar` default to `--drift none`: they skip drift
73
+ analysis and report drift-derived evidence as `null`, meaning not evaluated.
74
+ Direct `sema drift` defaults to `--cache fresh`; its `--cache none` mode still
75
+ runs the analysis, but without reading or writing persistent cache. See
76
+ [Drift Cache And Query Evidence](./drift-cache.md) for the complete mode table,
77
+ external cache locations, and recovery behavior.
78
+
54
79
  The public CLI does not require private service credentials or an external
55
80
  request before local commands run.
56
81
 
@@ -1,246 +1,246 @@
1
- # AI-native Content Pipeline
2
-
3
- Sema Content Pipeline is a contract-first control plane for creating content
4
- with AI agents across arbitrary destinations and formats. It plans work,
5
- verifies signed evidence, evaluates policy, derives canonical state, and tells
6
- an external runner what can happen next. It does not execute agents, call
7
- creative tools, publish content, or provide a native human-review path.
8
-
9
- Brands, channels, accounts, and formats are configuration. They are never
10
- closed enums in the pipeline core. A video channel, a site, a newsletter, an
11
- RSS feed, or a future destination all use the same target and adapter model.
12
-
13
- ## Architecture
14
-
15
- ```text
16
- .sema contracts, target set, and signed policy
17
- -> Sema creates a declarative plan
18
- -> external runner invokes producer agents and tools
19
- -> producers submit signed claims and immutable artifacts
20
- -> independent adapters/verifiers attest observable facts
21
- -> specialized AI evaluators submit signed semantic assessments
22
- -> Sema verifies identity, scope, independence, quorum, and deterministic rules
23
- -> state is replayed from the canonical ledger
24
- -> the external runner receives nextActions
25
- -> manifests and dashboards are regenerated projections
26
- ```
27
-
28
- Existing Author, research, writing, copy, image, video, creative-QA, and
29
- publication profiles are optional capabilities used by a pipeline definition.
30
- They are not the pipeline state machine and they do not become universal
31
- requirements for every kind of content.
32
-
33
- ## Trust boundary
34
-
35
- A hash proves the identity and integrity of bytes. It does not prove that a
36
- claim is true. A JSON receipt produced by the runner therefore remains a claim.
37
- It becomes accepted evidence only when an authorized, independent principal
38
- attests it with an Ed25519 signature and the attestation matches the exact run,
39
- artifact digest, target, evidence type, policy, and validity window.
40
-
41
- The trust configuration accepts only Ed25519 SPKI public material
42
- (`-----BEGIN PUBLIC KEY-----`). PKCS#8 private PEM is rejected even though the
43
- crypto runtime could derive a public key from it. Private keys must stay in the
44
- producer, evaluator, adapter, or independent verification service that owns
45
- them. If the executor controls every private key and the canonical store, the
46
- signatures provide no meaningful separation.
47
-
48
- For high assurance, keep trust anchors outside the runner workspace and store
49
- the ledger in an independently controlled append-only service, WORM store, or
50
- transparency log. Every trusted operation requires a canonical trust-root digest
51
- retained by that external boundary; reading `trust.json` and trusting a digest
52
- from the same file would merely let the executor nominate its own authority.
53
-
54
- The signed policy is bound to the exact execution, pipeline definition, trust
55
- root, ledger, and complete target set through `runId`, `definitionDigest`,
56
- `trustRootDigest`, `ledgerId`, and `targetSetDigest`. Its `issuedAt` and
57
- `expiresAt` define the complete authorization window: the trusted `recordedAt`
58
- of `RUN_STARTED` must satisfy the configured maximum envelope age, and every
59
- event must be recorded inclusively between those policy bounds. Once
60
- `expiresAt` passes, the policy cannot authorize another append. It cannot be
61
- replayed as authorization for another run, and a controller cannot silently
62
- remove a channel to make a run appear complete.
63
-
64
- The trust-root digest and revocation digest are separate external pins. The
65
- trust root identifies the immutable authority set and its verification rules;
66
- `revocationDigest` identifies the current revocation overlay. Rotating that
67
- overlay must not redefine historical signatures, while revoked credentials no
68
- longer count as active evidence, authorization, or quorum.
69
- An authority key in the current revocation overlay cannot authorize a policy;
70
- historical ledger verification remains a separate operation.
71
-
72
- Public-key fingerprints, principal IDs, and key IDs must be unique, so one key
73
- cannot masquerade as several independent voters.
74
-
75
- The local file backend is useful for development and portable replay, but it is
76
- not advertised as a strong append-only root. A trusted external checkpoint
77
- (`expectedHead`) is required on ledger reads and writes to detect a truncated
78
- or concurrently replaced local ledger. A trust file
79
- inside the current workspace is rejected unless
80
- `--development-local-trust` is explicit; that flag relaxes file placement only
81
- and never removes digest pinning.
82
-
83
- ## Evidence and semantic evaluation
84
-
85
- The pipeline separates three things:
86
-
87
- - a producer or runner claim (`EVIDENCE_CLAIMED`);
88
- - an independently signed observation (`EVIDENCE_ATTESTED`);
89
- - a specialized AI assessment (`AI_ASSESSMENT`).
90
-
91
- Sema evaluates deterministic constraints directly. Artifact metadata and
92
- producer claims never prove those constraints by themselves: observable facts
93
- must come from independently signed adapter/verifier observations bound to the
94
- artifact digest, run, target, policy, and trust context. This includes
95
- `observedMediaType`, obtained through independent sniffing; an artifact's
96
- producer-declared `mediaType` cannot satisfy adapter acceptance on its own.
97
- Semantic questions such as
98
- factual quality, narrative quality, channel fit, brand voice, accessibility,
99
- or audiovisual coherence require assessments from principals with the declared
100
- capability. Sema verifies those assessments against policy; it does not invent
101
- their semantic judgment.
102
-
103
- Critical gates can require multiple approvals, distinct principals, distinct
104
- control domains, and producer/evaluator separation. Deterministic attestations
105
- use `minAttestationsPerEvidence` and
106
- `minDistinctAttesterControlDomains` for every required evidence type; semantic
107
- AI opinions use `minApprovals` and `minDistinctControlDomains`. Multiple agent
108
- names under one credential or control domain do not create an independent
109
- quorum.
110
- Every gate that contributes to canonical completion must set
111
- `producerDisjoint: true`; self-approval cannot be configured as a completion
112
- shortcut.
113
-
114
- A generic `content.evidence.attest` capability never authorizes evidence. Base
115
- evidence requires `content.evidence.attest:<evidenceType>`. Adapter evidence is
116
- stricter: the externally pinned trust root must grant
117
- `content.adapter.attest:<adapterId>@<version>:<evidenceType>`, and the signed
118
- data must name the exact adapter and version. Delivery confirmation also carries
119
- an `observationDigest`; it is not a bare success receipt from the runner.
120
-
121
- ## Canonical state
122
-
123
- Ledger events are hash-chained and carry signed envelopes. The state engine
124
- replays the ledger deterministically. It never reads `concluido`, `approved`, or
125
- similar fields from a hand-edited manifest.
126
-
127
- Event and envelope wrappers are exact schemas: unsigned extra fields are
128
- rejected. Every append requires the signed policy envelope and a complete
129
- expected context derived from it. The genesis event is anchored to the
130
- externally pinned trust domain, trust root, ledger ID, policy, definition, and
131
- complete target set; none of those values are accepted merely because
132
- `RUN_STARTED` declared them. During append, envelope freshness is measured
133
- against the platform clock; caller-controlled `recordedAt` cannot backdate an
134
- expired signature.
135
-
136
- Gate verdicts are independent from operational conditions:
137
-
138
- - verdict: `NAO_AVALIADO`, `APROVADO`, `REPROVADO`, `INCONCLUSIVO`;
139
- - condition: `PENDENTE`, `PRONTA`, `EXECUTANDO`,
140
- `AGUARDANDO_EVIDENCIA`, `AGUARDANDO_EVENTO_EXTERNO`,
141
- `FERRAMENTA_INDISPONIVEL`, `CAPACIDADE_AUSENTE`,
142
- `AUTORIZACAO_AUSENTE`, `FALHA_TRANSITORIA`, `FALHA_TERMINAL`, or
143
- `EXECUCAO_ENCERRADA`.
144
-
145
- For example, a content-quality gate may be `APROVADO` while a publication gate
146
- is `NAO_AVALIADO` and its operational condition is
147
- `AGUARDANDO_EVENTO_EXTERNO`. Tool unavailability never approves or rejects a
148
- gate. Missing semantic capacity becomes `CAPACIDADE_AUSENTE`; the runner can
149
- route the task to another authorized AI evaluator.
150
-
151
- Changing an artifact creates a new digest. Evidence and assessments bound to
152
- the previous digest become superseded for gate calculation. Targets also evolve
153
- independently: failure for one destination does not invalidate another.
154
-
155
- Every generated manifest declares:
156
-
157
- ```json
158
- {
159
- "authoritative": false,
160
- "ledgerHead": "sha256:..."
161
- }
162
- ```
163
-
164
- It is a read model, not an input to canonical state.
165
-
166
- The isolated gate calculator is internal. The public authoritative surface is
167
- canonical state derivation after the ledger replay has independently derived
168
- the producer, authorization scope, target, and complete producer lineage.
169
- The npm package exposes only its root entrypoint; `dist/pipelineConteudo/*`
170
- deep imports are blocked by the package `exports` map, including in the
171
- generated public tarball.
172
-
173
- ## Open adapters and targets
174
-
175
- An adapter declares an opaque `adapterId`, immutable version, accepted media
176
- types, format profiles, deterministic constraints, required public metadata,
177
- optional public metadata, and externally verifiable confirmation predicates.
178
- `requiredMetadata + optionalMetadata` is the exact top-level allowlist signed
179
- through the definition digest. Target metadata accepts only declared keys and
180
- scalar public values. `accountScope` is a strict `account:<alias>` reference;
181
- credentials and tokens remain outside the ledger and are resolved by the
182
- external runner from that alias. Artifact metadata is prohibited in v1 until a
183
- separate signed schema exists. Recursive DLP checks additionally reject common
184
- secret key names, private-key material, JWTs, provider-token prefixes, and
185
- authorization headers without echoing the detected value.
186
- Deterministic-constraint configuration has an exact one-field numeric schema;
187
- extra, ambiguous, or sensitive fields block the adapter before its constraints
188
- can be copied into a public plan. Free-form operational `reason` text passes
189
- the same credential detector before it can enter the signed ledger.
190
-
191
- Public CLI failures expose static error codes and a sanitized command label;
192
- filesystem exceptions, unknown subcommands, rejected schema field names, and
193
- invalid trust identifiers are not echoed. Domain identifiers that belong to a
194
- valid definition or signed ledger (such as stage, target, evidence, and
195
- assessment IDs) remain public because they are required for planning,
196
- traceability, and remediation; they are never credential storage.
197
-
198
- Each stage declares an `adapterPolicy`:
199
-
200
- - `NONE`: no adapter gate is introduced by the stage;
201
- - `CONSTRAINTS`: require independently signed observations for the adapter's
202
- deterministic format constraints;
203
- - `CONFIRMATION`: require the target adapter's externally verifiable
204
- confirmation predicates.
205
-
206
- Pipeline definition v1 requires exactly one declared output per stage. A stage
207
- that needs several artifacts must split them into semantically distinct stages,
208
- preserving explicit lineage and dependency edges.
209
-
210
- No platform literal is required by the core. A project-specific experience is
211
- just a pipeline definition plus target configuration and can coexist with any
212
- number of other channels and formats.
213
-
214
- ## CLI
215
-
216
- The public surface is `sema conteudo`:
217
-
218
- ```bash
219
- sema conteudo capabilities --json
220
- sema conteudo validar <definition.json> --json
221
- sema conteudo planejar <definition.json> --alvos-arquivo <targets.json> --json
222
- sema conteudo validar-envelope --envelope-arquivo <envelope.json> --confianca-arquivo <trust.json> --trust-root-digest <sha256:...> --revocation-digest <sha256:...> --payload-type <type> --json
223
- sema conteudo registrar <ledger.ndjson> --envelope-arquivo <envelope.json> --politica-arquivo <policy-envelope.json> --confianca-arquivo <trust.json> --trust-root-digest <sha256:...> --revocation-digest <sha256:...> --ledger-id <id> --expected-head <sha256:...> --json
224
- sema conteudo status <definition.json> --politica-arquivo <policy-envelope.json> --confianca-arquivo <trust.json> --trust-root-digest <sha256:...> --revocation-digest <sha256:...> --ledger-arquivo <ledger.ndjson> --expected-head <sha256:...> --json
225
- sema conteudo projetar <definition.json> --politica-arquivo <policy-envelope.json> --confianca-arquivo <trust.json> --trust-root-digest <sha256:...> --revocation-digest <sha256:...> --ledger-arquivo <ledger.ndjson> --expected-head <sha256:...> --saida <manifest.json> --json
226
- ```
227
-
228
- `--trust-root-digest` and `--revocation-digest` may also come from the
229
- externally controlled `SEMA_CONTENT_TRUST_ROOT_DIGEST` and
230
- `SEMA_CONTENT_REVOCATION_DIGEST` environment variables. If a value is present
231
- in both sources, the values must match. `registrar`, `status`, and `projetar` also require the
232
- externally retained `expectedHead`, including the genesis head for a new
233
- ledger. This protects against stale concurrent append and detects truncation;
234
- it does not turn a runner-controlled file into protected storage.
235
-
236
- ## External runner protocol
237
-
238
- The runner may schedule, execute, retry, resume, and request more AI capacity.
239
- It may submit signed envelopes and report operational conditions. It may not
240
- write calculated verdicts, mark an execution complete, edit canonical history,
241
- or promote its own claim to accepted evidence.
242
-
243
- The runner advances only from `nextActions` derived by Sema. There is no native
244
- human-approval transition. Organizations may build an external policy adapter
245
- for human input if they need one, but that is outside this AI-native pipeline
246
- and never a hidden fallback.
1
+ # AI-native Content Pipeline
2
+
3
+ Sema Content Pipeline is a contract-first control plane for creating content
4
+ with AI agents across arbitrary destinations and formats. It plans work,
5
+ verifies signed evidence, evaluates policy, derives canonical state, and tells
6
+ an external runner what can happen next. It does not execute agents, call
7
+ creative tools, publish content, or provide a native human-review path.
8
+
9
+ Brands, channels, accounts, and formats are configuration. They are never
10
+ closed enums in the pipeline core. A video channel, a site, a newsletter, an
11
+ RSS feed, or a future destination all use the same target and adapter model.
12
+
13
+ ## Architecture
14
+
15
+ ```text
16
+ .sema contracts, target set, and signed policy
17
+ -> Sema creates a declarative plan
18
+ -> external runner invokes producer agents and tools
19
+ -> producers submit signed claims and immutable artifacts
20
+ -> independent adapters/verifiers attest observable facts
21
+ -> specialized AI evaluators submit signed semantic assessments
22
+ -> Sema verifies identity, scope, independence, quorum, and deterministic rules
23
+ -> state is replayed from the canonical ledger
24
+ -> the external runner receives nextActions
25
+ -> manifests and dashboards are regenerated projections
26
+ ```
27
+
28
+ Existing Author, research, writing, copy, image, video, creative-QA, and
29
+ publication profiles are optional capabilities used by a pipeline definition.
30
+ They are not the pipeline state machine and they do not become universal
31
+ requirements for every kind of content.
32
+
33
+ ## Trust boundary
34
+
35
+ A hash proves the identity and integrity of bytes. It does not prove that a
36
+ claim is true. A JSON receipt produced by the runner therefore remains a claim.
37
+ It becomes accepted evidence only when an authorized, independent principal
38
+ attests it with an Ed25519 signature and the attestation matches the exact run,
39
+ artifact digest, target, evidence type, policy, and validity window.
40
+
41
+ The trust configuration accepts only Ed25519 SPKI public material
42
+ (`-----BEGIN PUBLIC KEY-----`). PKCS#8 private PEM is rejected even though the
43
+ crypto runtime could derive a public key from it. Private keys must stay in the
44
+ producer, evaluator, adapter, or independent verification service that owns
45
+ them. If the executor controls every private key and the canonical store, the
46
+ signatures provide no meaningful separation.
47
+
48
+ For high assurance, keep trust anchors outside the runner workspace and store
49
+ the ledger in an independently controlled append-only service, WORM store, or
50
+ transparency log. Every trusted operation requires a canonical trust-root digest
51
+ retained by that external boundary; reading `trust.json` and trusting a digest
52
+ from the same file would merely let the executor nominate its own authority.
53
+
54
+ The signed policy is bound to the exact execution, pipeline definition, trust
55
+ root, ledger, and complete target set through `runId`, `definitionDigest`,
56
+ `trustRootDigest`, `ledgerId`, and `targetSetDigest`. Its `issuedAt` and
57
+ `expiresAt` define the complete authorization window: the trusted `recordedAt`
58
+ of `RUN_STARTED` must satisfy the configured maximum envelope age, and every
59
+ event must be recorded inclusively between those policy bounds. Once
60
+ `expiresAt` passes, the policy cannot authorize another append. It cannot be
61
+ replayed as authorization for another run, and a controller cannot silently
62
+ remove a channel to make a run appear complete.
63
+
64
+ The trust-root digest and revocation digest are separate external pins. The
65
+ trust root identifies the immutable authority set and its verification rules;
66
+ `revocationDigest` identifies the current revocation overlay. Rotating that
67
+ overlay must not redefine historical signatures, while revoked credentials no
68
+ longer count as active evidence, authorization, or quorum.
69
+ An authority key in the current revocation overlay cannot authorize a policy;
70
+ historical ledger verification remains a separate operation.
71
+
72
+ Public-key fingerprints, principal IDs, and key IDs must be unique, so one key
73
+ cannot masquerade as several independent voters.
74
+
75
+ The local file backend is useful for development and portable replay, but it is
76
+ not advertised as a strong append-only root. A trusted external checkpoint
77
+ (`expectedHead`) is required on ledger reads and writes to detect a truncated
78
+ or concurrently replaced local ledger. A trust file
79
+ inside the current workspace is rejected unless
80
+ `--development-local-trust` is explicit; that flag relaxes file placement only
81
+ and never removes digest pinning.
82
+
83
+ ## Evidence and semantic evaluation
84
+
85
+ The pipeline separates three things:
86
+
87
+ - a producer or runner claim (`EVIDENCE_CLAIMED`);
88
+ - an independently signed observation (`EVIDENCE_ATTESTED`);
89
+ - a specialized AI assessment (`AI_ASSESSMENT`).
90
+
91
+ Sema evaluates deterministic constraints directly. Artifact metadata and
92
+ producer claims never prove those constraints by themselves: observable facts
93
+ must come from independently signed adapter/verifier observations bound to the
94
+ artifact digest, run, target, policy, and trust context. This includes
95
+ `observedMediaType`, obtained through independent sniffing; an artifact's
96
+ producer-declared `mediaType` cannot satisfy adapter acceptance on its own.
97
+ Semantic questions such as
98
+ factual quality, narrative quality, channel fit, brand voice, accessibility,
99
+ or audiovisual coherence require assessments from principals with the declared
100
+ capability. Sema verifies those assessments against policy; it does not invent
101
+ their semantic judgment.
102
+
103
+ Critical gates can require multiple approvals, distinct principals, distinct
104
+ control domains, and producer/evaluator separation. Deterministic attestations
105
+ use `minAttestationsPerEvidence` and
106
+ `minDistinctAttesterControlDomains` for every required evidence type; semantic
107
+ AI opinions use `minApprovals` and `minDistinctControlDomains`. Multiple agent
108
+ names under one credential or control domain do not create an independent
109
+ quorum.
110
+ Every gate that contributes to canonical completion must set
111
+ `producerDisjoint: true`; self-approval cannot be configured as a completion
112
+ shortcut.
113
+
114
+ A generic `content.evidence.attest` capability never authorizes evidence. Base
115
+ evidence requires `content.evidence.attest:<evidenceType>`. Adapter evidence is
116
+ stricter: the externally pinned trust root must grant
117
+ `content.adapter.attest:<adapterId>@<version>:<evidenceType>`, and the signed
118
+ data must name the exact adapter and version. Delivery confirmation also carries
119
+ an `observationDigest`; it is not a bare success receipt from the runner.
120
+
121
+ ## Canonical state
122
+
123
+ Ledger events are hash-chained and carry signed envelopes. The state engine
124
+ replays the ledger deterministically. It never reads `concluido`, `approved`, or
125
+ similar fields from a hand-edited manifest.
126
+
127
+ Event and envelope wrappers are exact schemas: unsigned extra fields are
128
+ rejected. Every append requires the signed policy envelope and a complete
129
+ expected context derived from it. The genesis event is anchored to the
130
+ externally pinned trust domain, trust root, ledger ID, policy, definition, and
131
+ complete target set; none of those values are accepted merely because
132
+ `RUN_STARTED` declared them. During append, envelope freshness is measured
133
+ against the platform clock; caller-controlled `recordedAt` cannot backdate an
134
+ expired signature.
135
+
136
+ Gate verdicts are independent from operational conditions:
137
+
138
+ - verdict: `NAO_AVALIADO`, `APROVADO`, `REPROVADO`, `INCONCLUSIVO`;
139
+ - condition: `PENDENTE`, `PRONTA`, `EXECUTANDO`,
140
+ `AGUARDANDO_EVIDENCIA`, `AGUARDANDO_EVENTO_EXTERNO`,
141
+ `FERRAMENTA_INDISPONIVEL`, `CAPACIDADE_AUSENTE`,
142
+ `AUTORIZACAO_AUSENTE`, `FALHA_TRANSITORIA`, `FALHA_TERMINAL`, or
143
+ `EXECUCAO_ENCERRADA`.
144
+
145
+ For example, a content-quality gate may be `APROVADO` while a publication gate
146
+ is `NAO_AVALIADO` and its operational condition is
147
+ `AGUARDANDO_EVENTO_EXTERNO`. Tool unavailability never approves or rejects a
148
+ gate. Missing semantic capacity becomes `CAPACIDADE_AUSENTE`; the runner can
149
+ route the task to another authorized AI evaluator.
150
+
151
+ Changing an artifact creates a new digest. Evidence and assessments bound to
152
+ the previous digest become superseded for gate calculation. Targets also evolve
153
+ independently: failure for one destination does not invalidate another.
154
+
155
+ Every generated manifest declares:
156
+
157
+ ```json
158
+ {
159
+ "authoritative": false,
160
+ "ledgerHead": "sha256:..."
161
+ }
162
+ ```
163
+
164
+ It is a read model, not an input to canonical state.
165
+
166
+ The isolated gate calculator is internal. The public authoritative surface is
167
+ canonical state derivation after the ledger replay has independently derived
168
+ the producer, authorization scope, target, and complete producer lineage.
169
+ The npm package exposes only its root entrypoint; `dist/pipelineConteudo/*`
170
+ deep imports are blocked by the package `exports` map, including in the
171
+ generated public tarball.
172
+
173
+ ## Open adapters and targets
174
+
175
+ An adapter declares an opaque `adapterId`, immutable version, accepted media
176
+ types, format profiles, deterministic constraints, required public metadata,
177
+ optional public metadata, and externally verifiable confirmation predicates.
178
+ `requiredMetadata + optionalMetadata` is the exact top-level allowlist signed
179
+ through the definition digest. Target metadata accepts only declared keys and
180
+ scalar public values. `accountScope` is a strict `account:<alias>` reference;
181
+ credentials and tokens remain outside the ledger and are resolved by the
182
+ external runner from that alias. Artifact metadata is prohibited in v1 until a
183
+ separate signed schema exists. Recursive DLP checks additionally reject common
184
+ secret key names, private-key material, JWTs, provider-token prefixes, and
185
+ authorization headers without echoing the detected value.
186
+ Deterministic-constraint configuration has an exact one-field numeric schema;
187
+ extra, ambiguous, or sensitive fields block the adapter before its constraints
188
+ can be copied into a public plan. Free-form operational `reason` text passes
189
+ the same credential detector before it can enter the signed ledger.
190
+
191
+ Public CLI failures expose static error codes and a sanitized command label;
192
+ filesystem exceptions, unknown subcommands, rejected schema field names, and
193
+ invalid trust identifiers are not echoed. Domain identifiers that belong to a
194
+ valid definition or signed ledger (such as stage, target, evidence, and
195
+ assessment IDs) remain public because they are required for planning,
196
+ traceability, and remediation; they are never credential storage.
197
+
198
+ Each stage declares an `adapterPolicy`:
199
+
200
+ - `NONE`: no adapter gate is introduced by the stage;
201
+ - `CONSTRAINTS`: require independently signed observations for the adapter's
202
+ deterministic format constraints;
203
+ - `CONFIRMATION`: require the target adapter's externally verifiable
204
+ confirmation predicates.
205
+
206
+ Pipeline definition v1 requires exactly one declared output per stage. A stage
207
+ that needs several artifacts must split them into semantically distinct stages,
208
+ preserving explicit lineage and dependency edges.
209
+
210
+ No platform literal is required by the core. A project-specific experience is
211
+ just a pipeline definition plus target configuration and can coexist with any
212
+ number of other channels and formats.
213
+
214
+ ## CLI
215
+
216
+ The public surface is `sema conteudo`:
217
+
218
+ ```bash
219
+ sema conteudo capabilities --json
220
+ sema conteudo validar <definition.json> --json
221
+ sema conteudo planejar <definition.json> --alvos-arquivo <targets.json> --json
222
+ sema conteudo validar-envelope --envelope-arquivo <envelope.json> --confianca-arquivo <trust.json> --trust-root-digest <sha256:...> --revocation-digest <sha256:...> --payload-type <type> --json
223
+ sema conteudo registrar <ledger.ndjson> --envelope-arquivo <envelope.json> --politica-arquivo <policy-envelope.json> --confianca-arquivo <trust.json> --trust-root-digest <sha256:...> --revocation-digest <sha256:...> --ledger-id <id> --expected-head <sha256:...> --json
224
+ sema conteudo status <definition.json> --politica-arquivo <policy-envelope.json> --confianca-arquivo <trust.json> --trust-root-digest <sha256:...> --revocation-digest <sha256:...> --ledger-arquivo <ledger.ndjson> --expected-head <sha256:...> --json
225
+ sema conteudo projetar <definition.json> --politica-arquivo <policy-envelope.json> --confianca-arquivo <trust.json> --trust-root-digest <sha256:...> --revocation-digest <sha256:...> --ledger-arquivo <ledger.ndjson> --expected-head <sha256:...> --saida <manifest.json> --json
226
+ ```
227
+
228
+ `--trust-root-digest` and `--revocation-digest` may also come from the
229
+ externally controlled `SEMA_CONTENT_TRUST_ROOT_DIGEST` and
230
+ `SEMA_CONTENT_REVOCATION_DIGEST` environment variables. If a value is present
231
+ in both sources, the values must match. `registrar`, `status`, and `projetar` also require the
232
+ externally retained `expectedHead`, including the genesis head for a new
233
+ ledger. This protects against stale concurrent append and detects truncation;
234
+ it does not turn a runner-controlled file into protected storage.
235
+
236
+ ## External runner protocol
237
+
238
+ The runner may schedule, execute, retry, resume, and request more AI capacity.
239
+ It may submit signed envelopes and report operational conditions. It may not
240
+ write calculated verdicts, mark an execution complete, edit canonical history,
241
+ or promote its own claim to accepted evidence.
242
+
243
+ The runner advances only from `nextActions` derived by Sema. There is no native
244
+ human-approval transition. Organizations may build an external policy adapter
245
+ for human input if they need one, but that is outside this AI-native pipeline
246
+ and never a hidden fallback.