@semacode/cli 2.3.0 → 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 (267) hide show
  1. package/LICENSE +39 -39
  2. package/README.md +112 -41
  3. package/dist/agentContextPack.js +14 -10
  4. package/dist/agentEntryPoints.d.ts +5 -0
  5. package/dist/agentEntryPoints.js +102 -91
  6. package/dist/angular-consumer-standalone.d.ts +3 -1
  7. package/dist/angular-consumer-standalone.js +12 -8
  8. package/dist/bin.d.ts +6 -0
  9. package/dist/bin.js +130 -0
  10. package/dist/cliArgs.js +4 -4
  11. package/dist/cliControlError.d.ts +12 -0
  12. package/dist/cliControlError.js +47 -0
  13. package/dist/cliGrammar.d.ts +11 -0
  14. package/dist/cliGrammar.js +551 -0
  15. package/dist/cliHelp.d.ts +13 -0
  16. package/dist/cliHelp.js +19 -0
  17. package/dist/cliHelpTexto.d.ts +3 -0
  18. package/dist/cliHelpTexto.js +168 -0
  19. package/dist/cliRuntime.d.ts +2 -0
  20. package/dist/cliRuntime.js +31 -0
  21. package/dist/comandos.js +9 -22
  22. package/dist/contexto.js +5 -5
  23. package/dist/dev/index.d.ts +1 -0
  24. package/dist/dev/index.js +51 -9
  25. package/dist/discovery/catalog.js +3 -3
  26. package/dist/distribuicao/filesystemGlobal.d.ts +63 -0
  27. package/dist/distribuicao/filesystemGlobal.js +701 -0
  28. package/dist/distribuicao/index.d.ts +7 -0
  29. package/dist/distribuicao/index.js +227 -0
  30. package/dist/distribuicao/launcherGlobal.d.ts +53 -0
  31. package/dist/distribuicao/launcherGlobal.js +643 -0
  32. package/dist/distribuicao/launcherWindows.d.ts +28 -0
  33. package/dist/distribuicao/launcherWindows.js +326 -0
  34. package/dist/distribuicao/lockContextGlobal.d.ts +10 -0
  35. package/dist/distribuicao/lockContextGlobal.js +17 -0
  36. package/dist/distribuicao/lockGlobal.d.ts +6 -0
  37. package/dist/distribuicao/lockGlobal.js +520 -0
  38. package/dist/distribuicao/skillGlobal.d.ts +48 -0
  39. package/dist/distribuicao/skillGlobal.js +652 -0
  40. package/dist/distribuicao/skillIntentPolicy.d.ts +21 -0
  41. package/dist/distribuicao/skillIntentPolicy.js +115 -0
  42. package/dist/distribuicao/tipos.d.ts +50 -0
  43. package/dist/distribuicao/tipos.js +10 -0
  44. package/dist/distribuicao/versaoSemantica.d.ts +3 -0
  45. package/dist/distribuicao/versaoSemantica.js +62 -0
  46. package/dist/drift.part01.d.ts +34 -2
  47. package/dist/drift.part01.js +3 -0
  48. package/dist/drift.part04.d.ts +12 -2
  49. package/dist/drift.part04.js +89 -15
  50. package/dist/drift.part05.d.ts +2 -1
  51. package/dist/drift.part05.js +9 -6
  52. package/dist/drift.part06.d.ts +2 -1
  53. package/dist/drift.part06.js +115 -24
  54. package/dist/drift.part07.d.ts +11 -10
  55. package/dist/drift.part07.js +261 -255
  56. package/dist/drift.part08.d.ts +2 -1
  57. package/dist/drift.part08.js +35 -25
  58. package/dist/drift.part11.js +279 -32
  59. package/dist/drift.part12.d.ts +1 -1
  60. package/dist/drift.part12.js +196 -11
  61. package/dist/drift.part13.d.ts +18 -2
  62. package/dist/drift.part13.js +654 -76
  63. package/dist/drift.part14.js +21 -7
  64. package/dist/driftCacheCas.d.ts +43 -0
  65. package/dist/driftCacheCas.js +351 -0
  66. package/dist/driftCacheFilesystem.d.ts +64 -0
  67. package/dist/driftCacheFilesystem.js +313 -0
  68. package/dist/driftCacheModes.d.ts +38 -0
  69. package/dist/driftCacheModes.js +147 -0
  70. package/dist/driftCacheStore.d.ts +80 -0
  71. package/dist/driftCacheStore.js +603 -0
  72. package/dist/driftCatalogo.d.ts +65 -0
  73. package/dist/driftCatalogo.js +516 -0
  74. package/dist/driftEscopo.d.ts +21 -0
  75. package/dist/driftEscopo.js +647 -0
  76. package/dist/driftEscopoReferencias.d.ts +8 -0
  77. package/dist/driftEscopoReferencias.js +612 -0
  78. package/dist/driftOrcamento.d.ts +6 -0
  79. package/dist/driftOrcamento.js +20 -3
  80. package/dist/geracaoCore.js +4 -6
  81. package/dist/iaPrompts.d.ts +3 -3
  82. package/dist/iaPrompts.js +13 -14
  83. package/dist/index.d.ts +4 -1
  84. package/dist/index.js +6 -25
  85. package/dist/index.part01.d.ts +21 -14
  86. package/dist/index.part01.js +20 -165
  87. package/dist/index.part02.js +57 -43
  88. package/dist/index.part03.d.ts +23 -1
  89. package/dist/index.part03.js +83 -8
  90. package/dist/index.part04.d.ts +10 -2
  91. package/dist/index.part04.js +48 -14
  92. package/dist/index.part05.d.ts +1 -1
  93. package/dist/index.part05.js +109 -30
  94. package/dist/index.part06.js +34 -16
  95. package/dist/index.part07.js +31 -27
  96. package/dist/index.part08.d.ts +1 -1
  97. package/dist/index.part08.js +23 -28
  98. package/dist/init/templates.part01.js +393 -393
  99. package/dist/init/templates.part02.js +189 -189
  100. package/dist/initCommand.js +5 -1
  101. package/dist/initTemplatesBackend.js +73 -73
  102. package/dist/initTemplatesBase.js +7 -5
  103. package/dist/initTemplatesFlutter.js +137 -137
  104. package/dist/initTemplatesRuntime.js +350 -350
  105. package/dist/initTemplatesWeb.js +309 -309
  106. package/dist/pipelineConteudo/command.d.ts +1 -0
  107. package/dist/pipelineConteudo/command.js +4 -32
  108. package/dist/pipelineConteudo/help.d.ts +2 -0
  109. package/dist/pipelineConteudo/help.js +33 -0
  110. package/dist/profileAuthorCommand.js +3 -7
  111. package/dist/profileCommand.js +3 -7
  112. package/dist/projeto.d.ts +1 -1
  113. package/dist/projetoCarregar.d.ts +2 -2
  114. package/dist/projetoCarregar.js +69 -28
  115. package/dist/projetoCatalogo.d.ts +8 -0
  116. package/dist/projetoCatalogo.js +164 -0
  117. package/dist/projetoOrigens.d.ts +2 -0
  118. package/dist/projetoOrigens.js +65 -9
  119. package/dist/projetoTipos.d.ts +15 -5
  120. package/dist/resultadoCli.d.ts +20 -0
  121. package/dist/resultadoCli.js +57 -0
  122. package/dist/saidaCli.d.ts +35 -0
  123. package/dist/saidaCli.js +118 -0
  124. package/dist/sistemasInterativos/acceptanceEvidence.d.ts +22 -0
  125. package/dist/sistemasInterativos/acceptanceEvidence.js +345 -0
  126. package/dist/sistemasInterativos/engineObservation.d.ts +12 -0
  127. package/dist/sistemasInterativos/engineObservation.js +438 -0
  128. package/dist/sistemasInterativos/jobOrchestration.d.ts +2 -0
  129. package/dist/sistemasInterativos/jobOrchestration.js +204 -0
  130. package/dist/sistemasInterativos/operationPrimitives.d.ts +21 -0
  131. package/dist/sistemasInterativos/operationPrimitives.js +194 -0
  132. package/dist/sistemasInterativos/operations.d.ts +4 -39
  133. package/dist/sistemasInterativos/operations.js +5 -1164
  134. package/dist/skillCommand.d.ts +5 -0
  135. package/dist/skillCommand.js +88 -0
  136. package/dist/sync/index.js +35 -35
  137. package/docs/README.md +11 -7
  138. package/docs/ai-integration.md +18 -11
  139. package/docs/ai-onboarding.md +81 -62
  140. package/docs/ai-workflow.md +10 -4
  141. package/docs/auth.md +26 -26
  142. package/docs/cli.md +197 -79
  143. package/docs/commands.md +30 -6
  144. package/docs/database.md +15 -15
  145. package/docs/deploy.md +54 -41
  146. package/docs/documentation.md +11 -10
  147. package/docs/drift-cache.md +108 -0
  148. package/docs/env.md +16 -16
  149. package/docs/frontend.md +41 -41
  150. package/docs/getting-started.md +82 -57
  151. package/docs/i18n.md +15 -15
  152. package/docs/repositories.md +60 -43
  153. package/docs/rollback.md +38 -31
  154. package/docs/security.md +54 -32
  155. package/docs/sistemas-interativos.md +27 -27
  156. package/docs/support.md +8 -8
  157. package/docs/testing.md +123 -17
  158. package/docs/vocabulary.md +29 -29
  159. package/exemplos/agendamento.sema +1 -1
  160. package/exemplos/assinatura.sema +1 -1
  161. package/exemplos/auditoria.sema +1 -1
  162. package/exemplos/autenticacao.sema +1 -1
  163. package/exemplos/author_obra_comum.sema +1 -1
  164. package/exemplos/author_tema_sensivel.sema +1 -1
  165. package/exemplos/automacao.sema +1 -1
  166. package/exemplos/cadastro_usuario.sema +1 -1
  167. package/exemplos/calculadora.sema +1 -1
  168. package/exemplos/crud_simples.sema +1 -1
  169. package/exemplos/estoque.sema +1 -1
  170. package/exemplos/exportacao.sema +1 -1
  171. package/exemplos/fila.sema +1 -1
  172. package/exemplos/integracao_externa.sema +1 -1
  173. package/exemplos/multi_tenant.sema +1 -1
  174. package/exemplos/notificacao.sema +1 -1
  175. package/exemplos/operacao_estrategia.sema +132 -132
  176. package/exemplos/operacao_estrategia_discovery.sema +220 -220
  177. package/exemplos/operacao_estrategia_fluxo.sema +114 -114
  178. package/exemplos/operacao_estrategia_gates.sema +106 -106
  179. package/exemplos/operacao_estrategia_quarentena.sema +133 -133
  180. package/exemplos/operacao_estrategia_rollout.sema +124 -124
  181. package/exemplos/pagamento.sema +1 -1
  182. package/exemplos/pagamento_dominio.sema +1 -1
  183. package/exemplos/pedido.sema +1 -1
  184. package/exemplos/permissao.sema +1 -1
  185. package/exemplos/persistencia_vendor_first.sema +1 -1
  186. package/exemplos/profile_conversas.sema +165 -165
  187. package/exemplos/profile_game.sema +1 -1
  188. package/exemplos/profile_legal.sema +1 -1
  189. package/exemplos/profile_ops.sema +1 -1
  190. package/exemplos/profile_research.sema +1 -1
  191. package/exemplos/profile_software.sema +1 -1
  192. package/exemplos/profile_workflow_n8n.sema +1 -1
  193. package/exemplos/relatorio.sema +1 -1
  194. package/exemplos/replica_analitica_erp.sema +1 -1
  195. package/exemplos/testes_embutidos.sema +1 -1
  196. package/exemplos/tratamento_erro.sema +1 -1
  197. package/exemplos/upload_arquivo.sema +1 -1
  198. package/exemplos/webhook.sema +1 -1
  199. package/node_modules/@sema/gerador-cpp/dist/index.js +176 -176
  200. package/node_modules/@sema/gerador-css/dist/index.part01.js +10 -10
  201. package/node_modules/@sema/gerador-css/dist/index.part02.js +460 -460
  202. package/node_modules/@sema/gerador-dotnet/dist/index.js +169 -169
  203. package/node_modules/@sema/gerador-html/dist/index.js +17 -17
  204. package/node_modules/@sema/gerador-python/dist/index.part02.js +3 -3
  205. package/node_modules/@sema/gerador-typescript/dist/index.part02.js +11 -11
  206. package/node_modules/@sema/nucleo/dist/diagnosticos/melhorador.js +42 -42
  207. package/node_modules/@sema/nucleo/dist/semantico/analisador.d.ts +1 -0
  208. package/node_modules/@sema/nucleo/dist/semantico/analisador.js +1 -0
  209. package/package.json +7 -2
  210. package/scripts/postinstall.mjs +148 -0
  211. package/skills/sema/SKILL.md +199 -0
  212. package/skills/sema/agents/openai.yaml +4 -0
  213. package/node_modules/@sema/gerador-cpp/dist/index.js.map +0 -1
  214. package/node_modules/@sema/gerador-css/dist/index.js.map +0 -1
  215. package/node_modules/@sema/gerador-css/dist/index.part01.js.map +0 -1
  216. package/node_modules/@sema/gerador-css/dist/index.part02.js.map +0 -1
  217. package/node_modules/@sema/gerador-dart/dist/index.js.map +0 -1
  218. package/node_modules/@sema/gerador-dotnet/dist/index.js.map +0 -1
  219. package/node_modules/@sema/gerador-html/dist/index.js.map +0 -1
  220. package/node_modules/@sema/gerador-javascript/dist/index.js.map +0 -1
  221. package/node_modules/@sema/gerador-lua/dist/index.js.map +0 -1
  222. package/node_modules/@sema/gerador-php/dist/index.js.map +0 -1
  223. package/node_modules/@sema/gerador-python/dist/index.js.map +0 -1
  224. package/node_modules/@sema/gerador-python/dist/index.part01.js.map +0 -1
  225. package/node_modules/@sema/gerador-python/dist/index.part02.js.map +0 -1
  226. package/node_modules/@sema/gerador-typescript/dist/index.js.map +0 -1
  227. package/node_modules/@sema/gerador-typescript/dist/index.part01.js.map +0 -1
  228. package/node_modules/@sema/gerador-typescript/dist/index.part02.js.map +0 -1
  229. package/node_modules/@sema/gerador-typescript/dist/index.part03.js.map +0 -1
  230. package/node_modules/@sema/nucleo/dist/ast/tipos.js.map +0 -1
  231. package/node_modules/@sema/nucleo/dist/diagnosticos/index.js.map +0 -1
  232. package/node_modules/@sema/nucleo/dist/diagnosticos/melhorador.js.map +0 -1
  233. package/node_modules/@sema/nucleo/dist/diagnosticos/snippets.js.map +0 -1
  234. package/node_modules/@sema/nucleo/dist/formatador/index.js.map +0 -1
  235. package/node_modules/@sema/nucleo/dist/formatador/index.part01.js.map +0 -1
  236. package/node_modules/@sema/nucleo/dist/formatador/index.part02.js.map +0 -1
  237. package/node_modules/@sema/nucleo/dist/index.js.map +0 -1
  238. package/node_modules/@sema/nucleo/dist/ir/conversor.js.map +0 -1
  239. package/node_modules/@sema/nucleo/dist/ir/conversor.part01.js.map +0 -1
  240. package/node_modules/@sema/nucleo/dist/ir/conversor.part02.js.map +0 -1
  241. package/node_modules/@sema/nucleo/dist/ir/conversor.part03.js.map +0 -1
  242. package/node_modules/@sema/nucleo/dist/ir/modelos.js.map +0 -1
  243. package/node_modules/@sema/nucleo/dist/lexer/lexer.js.map +0 -1
  244. package/node_modules/@sema/nucleo/dist/lexer/tokens.js.map +0 -1
  245. package/node_modules/@sema/nucleo/dist/parser/parser.declaracoes.js.map +0 -1
  246. package/node_modules/@sema/nucleo/dist/parser/parser.js.map +0 -1
  247. package/node_modules/@sema/nucleo/dist/parser/parser.modulo.js.map +0 -1
  248. package/node_modules/@sema/nucleo/dist/parser/parser.part01.js.map +0 -1
  249. package/node_modules/@sema/nucleo/dist/parser/parser.part02.js.map +0 -1
  250. package/node_modules/@sema/nucleo/dist/parser/parser.part03.js.map +0 -1
  251. package/node_modules/@sema/nucleo/dist/persistencia/contratos.js.map +0 -1
  252. package/node_modules/@sema/nucleo/dist/semantico/analisador.js.map +0 -1
  253. package/node_modules/@sema/nucleo/dist/semantico/analisador.part01.js.map +0 -1
  254. package/node_modules/@sema/nucleo/dist/semantico/analisador.part02.js.map +0 -1
  255. package/node_modules/@sema/nucleo/dist/semantico/analisador.part03.js.map +0 -1
  256. package/node_modules/@sema/nucleo/dist/semantico/analisador.part04.js.map +0 -1
  257. package/node_modules/@sema/nucleo/dist/semantico/analisador.part05.js.map +0 -1
  258. package/node_modules/@sema/nucleo/dist/semantico/analisador.part06.js.map +0 -1
  259. package/node_modules/@sema/nucleo/dist/semantico/analisador.part07.js.map +0 -1
  260. package/node_modules/@sema/nucleo/dist/semantico/analisador.part08.js.map +0 -1
  261. package/node_modules/@sema/nucleo/dist/semantico/estruturas.js.map +0 -1
  262. package/node_modules/@sema/nucleo/dist/semantico/estruturas.part01.js.map +0 -1
  263. package/node_modules/@sema/nucleo/dist/semantico/estruturas.part02.js.map +0 -1
  264. package/node_modules/@sema/nucleo/dist/semantico/orcamentoSemantico.js.map +0 -1
  265. package/node_modules/@sema/nucleo/dist/semantico/seguranca.js.map +0 -1
  266. package/node_modules/@sema/nucleo/dist/util/arquivos.js.map +0 -1
  267. package/node_modules/@sema/padroes/dist/index.js.map +0 -1
package/docs/env.md CHANGED
@@ -1,16 +1,16 @@
1
- # Environment
2
-
3
- The public Sema CLI works without private service credentials. No environment
4
- variable unlocks local execution: there is no login, activation, product
5
- authorization, license-key, billing, credit, token, or panel gate.
6
-
7
- Allowed public examples may use placeholders:
8
-
9
- ```bash
10
- EXAMPLE_API_KEY=replace-me
11
- ```
12
-
13
- Do not publish private or sensitive operational material in public Sema docs.
14
-
15
- If an application governed by Sema needs environment variables, document them in
16
- that application repository.
1
+ # Environment
2
+
3
+ The public Sema CLI works without private service credentials. No environment
4
+ variable unlocks local execution: there is no login, activation, product
5
+ authorization, license-key, billing, credit, token, or panel gate.
6
+
7
+ Allowed public examples may use placeholders:
8
+
9
+ ```bash
10
+ EXAMPLE_API_KEY=replace-me
11
+ ```
12
+
13
+ Do not publish private or sensitive operational material in public Sema docs.
14
+
15
+ If an application governed by Sema needs environment variables, document them in
16
+ that application repository.
package/docs/frontend.md CHANGED
@@ -1,41 +1,41 @@
1
- # User Experience Quality
2
-
3
- When Sema governs a UI, dashboard, app, site, game, or terminal tool, the
4
- experience must be modern, contextual, and verified. This is a quality gate, not
5
- decoration.
6
-
7
- ## Before Building
8
-
9
- Define:
10
-
11
- - audience and domain
12
- - primary workflow
13
- - density and information hierarchy
14
- - interaction states
15
- - responsive behavior
16
- - accessibility basics
17
- - evidence needed before closing
18
-
19
- ## Browser Evidence
20
-
21
- For web UI, check desktop and mobile. On a narrow viewport such as 390px, this
22
- must be true:
23
-
24
- ```js
25
- document.documentElement.scrollWidth <= document.documentElement.clientWidth
26
- ```
27
-
28
- Fix overlapping text, broken wrapping, hidden controls, and incoherent layout
29
- before closing the change.
30
-
31
- ## Terminal Evidence
32
-
33
- For CLI/TUI work, smoke-check:
34
-
35
- - `--help`
36
- - success output
37
- - error output
38
- - JSON output when supported
39
-
40
- The public Sema CLI itself must stay local-only and must not depend on private
41
- or sensitive operational material for these checks.
1
+ # User Experience Quality
2
+
3
+ When Sema governs a UI, dashboard, app, site, game, or terminal tool, the
4
+ experience must be modern, contextual, and verified. This is a quality gate, not
5
+ decoration.
6
+
7
+ ## Before Building
8
+
9
+ Define:
10
+
11
+ - audience and domain
12
+ - primary workflow
13
+ - density and information hierarchy
14
+ - interaction states
15
+ - responsive behavior
16
+ - accessibility basics
17
+ - evidence needed before closing
18
+
19
+ ## Browser Evidence
20
+
21
+ For web UI, check desktop and mobile. On a narrow viewport such as 390px, this
22
+ must be true:
23
+
24
+ ```js
25
+ document.documentElement.scrollWidth <= document.documentElement.clientWidth
26
+ ```
27
+
28
+ Fix overlapping text, broken wrapping, hidden controls, and incoherent layout
29
+ before closing the change.
30
+
31
+ ## Terminal Evidence
32
+
33
+ For CLI/TUI work, smoke-check:
34
+
35
+ - `--help`
36
+ - success output
37
+ - error output
38
+ - JSON output when supported
39
+
40
+ The public Sema CLI itself must stay local-only and must not depend on private
41
+ or sensitive operational material for these checks.
@@ -1,57 +1,82 @@
1
- # Installation And First Use
2
-
3
- Sema is installed and used as a local CLI.
4
-
5
- ```bash
6
- npm install -g @semacode/cli
7
- codex plugin marketplace add gerlanss/Sema
8
- codex plugin add sema@sema
9
- ```
10
-
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.
15
-
16
- Then verify the local engine:
17
-
18
- ```bash
19
- sema --version
20
- sema resumo
21
- ```
22
-
23
- The CLI is ready when `sema --version` succeeds. No Sema login, user
24
- authorization, activation key, product-license check, token, credits, billing
25
- service, or control panel is involved.
26
-
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.
31
-
32
- ## First Project
33
-
34
- ```bash
35
- sema iniciar --template base
36
- sema validar contratos/*.sema --json
37
- sema resumo
38
- ```
39
-
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.
43
-
44
- ## Existing Project
45
-
46
- ```bash
47
- sema resumo
48
- sema docs-impacto --intencao "describe the change" --json
49
- sema inspecionar contratos/example.sema --json
50
- sema drift contratos/example.sema --escopo modulo --json
51
- sema impacto contratos/example.sema --alvo sema.example.target --mudanca "describe the change" --json
52
- ```
53
-
54
- The public CLI does not require private service credentials or an external
55
- request before local commands run.
56
-
57
- Support: suporte@otimitare.online
1
+ # Installation And First Use
2
+
3
+ Sema is installed and used as a local CLI.
4
+
5
+ ```bash
6
+ npm install -g @semacode/cli
7
+ sema skill status --json
8
+ ```
9
+
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.
18
+
19
+ Then verify the local engine:
20
+
21
+ ```bash
22
+ sema --version
23
+ sema resumo --drift none
24
+ ```
25
+
26
+ The CLI is ready when `sema --version` succeeds. No Sema login, user
27
+ authorization, activation key, product-license check, token, credits, billing
28
+ service, or control panel is involved.
29
+
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`.
46
+
47
+ ## First Project
48
+
49
+ ```bash
50
+ sema descobrir explicar flow.project-adoption --json
51
+ sema iniciar --template base
52
+ sema sync-codex --json
53
+ sema validar contratos/*.sema --json
54
+ sema resumo --drift none
55
+ ```
56
+
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.
61
+
62
+ ## Existing Project
63
+
64
+ ```bash
65
+ sema resumo --drift none
66
+ sema docs-impacto --intencao "describe the change" --json
67
+ sema inspecionar contratos/example.sema --drift none --json
68
+ sema drift contratos/example.sema --escopo modulo --cache fresh --json
69
+ sema impacto contratos/example.sema --alvo sema.example.target --mudanca "describe the change" --json
70
+ ```
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
+
79
+ The public CLI does not require private service credentials or an external
80
+ request before local commands run.
81
+
82
+ Support: suporte@otimitare.online
package/docs/i18n.md CHANGED
@@ -1,15 +1,15 @@
1
- # Language And Identifiers
2
-
3
- Public Sema documentation is English.
4
-
5
- Do not translate commands, file paths, package names, endpoint paths, environment
6
- variable names, code symbols, DSL keywords, or brand names.
7
-
8
- Examples:
9
-
10
- - Keep `sema validar`, not an English paraphrase.
11
- - Keep `.sema`, `task`, `input`, `output`, `rules`, `effects`, and `guarantees`.
12
- - Keep package names such as `@semacode/cli`.
13
-
14
- Human-facing prose should be clear English. Contract DSL can keep its own
15
- keywords and domain identifiers.
1
+ # Language And Identifiers
2
+
3
+ Public Sema documentation is English.
4
+
5
+ Do not translate commands, file paths, package names, endpoint paths, environment
6
+ variable names, code symbols, DSL keywords, or brand names.
7
+
8
+ Examples:
9
+
10
+ - Keep `sema validar`, not an English paraphrase.
11
+ - Keep `.sema`, `task`, `input`, `output`, `rules`, `effects`, and `guarantees`.
12
+ - Keep package names such as `@semacode/cli`.
13
+
14
+ Human-facing prose should be clear English. Contract DSL can keep its own
15
+ keywords and domain identifiers.
@@ -1,43 +1,60 @@
1
- # Repository Boundary
2
-
3
- The public Sema repository should contain only the Codex-native local CLI, the
4
- first-contact Codex skill, runtime packages, examples, tests that run locally,
5
- and English documentation.
6
-
7
- ## Public
8
-
9
- - local CLI source
10
- - contract parser and validators
11
- - local drift and impact tooling
12
- - local code generators
13
- - examples
14
- - English docs
15
- - local package scripts
16
- - `AGENTS.md` as the official Codex entrypoint
17
- - the official Sema skill as a thin bootstrap before `AGENTS.md` exists
18
- - the repo marketplace that installs that skill explicitly
19
-
20
- ## Not Public
21
-
22
- - private or sensitive operational material
23
- - real credentials, environment files, or secret inventories
24
- - private project data or generated private artifacts
25
- - runtime authorization, activation, billing, credit, token, or panel gates
26
- - product-specific entrypoint files for AI clients other than Codex
27
- - MCP servers, remote workspace bridges, or duplicated governance inside the
28
- bootstrap skill
29
-
30
- The CLI must run directly against the local workspace without login, user
31
- authorization, a product-license check, activation key, credits, token, billing
32
- service, or control panel.
33
-
34
- Sema is an independent product and is not affiliated with or endorsed by
35
- OpenAI. Codex-native is Sema's official product direction, not an official
36
- OpenAI program or submission.
37
-
38
- ## Commercial Use
39
-
40
- The public Sema source may not be copied, rebranded, bundled, or replicated for
41
- commercial resale without written permission from OtimiTare.
42
-
43
- Support: suporte@otimitare.online
1
+ # Repository Boundary
2
+
3
+ The public Sema repository should contain only the Codex-native local CLI, the
4
+ first-contact Codex skill, runtime packages, examples, tests that run locally,
5
+ and English documentation.
6
+
7
+ ## Public
8
+
9
+ - local CLI source
10
+ - contract parser and validators
11
+ - local drift and impact tooling
12
+ - local code generators
13
+ - examples
14
+ - English docs
15
+ - local package scripts
16
+ - `AGENTS.md` as the official Codex entrypoint
17
+ - the official Sema skill as a thin bootstrap before `AGENTS.md` exists
18
+ - the managed absolute launcher and portable global skill bundled in npm
19
+ - the optional repo marketplace that exposes the same skill namespaced
20
+
21
+ ## Not Public
22
+
23
+ - private or sensitive operational material
24
+ - real credentials, environment files, or secret inventories
25
+ - private project data or generated private artifacts
26
+ - runtime authorization, activation, billing, credit, token, or panel gates
27
+ - product-specific repository entrypoint files for AI clients other than Codex
28
+ - MCP servers, remote workspace bridges, or duplicated governance inside the
29
+ bootstrap skill
30
+
31
+ The portable skill may be synchronized to the canonical user-level
32
+ `.agents/skills` directory and a detected Claude mirror. That does not change
33
+ the workspace boundary: Sema still generates only `AGENTS.md` as the official
34
+ repository protocol and never writes into plugin caches.
35
+
36
+ The repository has one npm package factory: `npm run cli:empacotar-publica`.
37
+ It assembles a private stage per execution and never materializes examples,
38
+ runtime dependencies, or skills inside `pacotes/cli`. Direct workspace packing
39
+ is intentionally blocked so a second, mutable packaging path cannot drift from
40
+ the public artifact.
41
+
42
+ The Windows distribution uses `sema.ps1` for PowerShell `PATH` resolution,
43
+ `sema.cmd` for `cmd.exe`, and `sema-managed.ps1` for the PATH-independent
44
+ fallback invoked through the absolute system `powershell.exe`; all remain
45
+ inside the managed `~/.sema/bin` boundary.
46
+
47
+ The CLI must run directly against the local workspace without login, user
48
+ authorization, a product-license check, activation key, credits, token, billing
49
+ service, or control panel.
50
+
51
+ Sema is an independent product and is not affiliated with or endorsed by
52
+ OpenAI. Codex-native is Sema's official product direction, not an official
53
+ OpenAI program or submission.
54
+
55
+ ## Commercial Use
56
+
57
+ The public Sema source may not be copied, rebranded, bundled, or replicated for
58
+ commercial resale without written permission from OtimiTare.
59
+
60
+ Support: suporte@otimitare.online
package/docs/rollback.md CHANGED
@@ -1,31 +1,38 @@
1
- # Rollback Boundary
2
-
3
- Public rollback covers both the npm CLI and the separately installed Codex
4
- bootstrap skill.
5
-
6
- For a failed pre-publication candidate:
7
-
8
- 1. Keep the previous tarball until the new one passes smoke tests.
9
- 2. Revert the plugin source, marketplace manifest, CLI source, and versions to
10
- the last known-good commit.
11
- 3. Re-run `npm run release:preparar-publica`.
12
-
13
- If a bad commit was already pushed, revert it with a normal Git revert and push
14
- the corrective commit. Refresh the marketplace and reinstall the skill:
15
-
16
- ```bash
17
- codex plugin marketplace upgrade sema
18
- codex plugin remove sema@sema
19
- codex plugin add sema@sema
20
- ```
21
-
22
- Open a new Codex task before validating the reinstalled skill. Already-open
23
- tasks keep the plugin/skill catalog they started with.
24
-
25
- If a bad npm version was published, do not overwrite it. Publish a corrected
26
- version and direct users to that version. Verify the final registry/GitHub state
27
- with `npm run release:verificar-distribuicao`. Do not create a GitHub Release or
28
- asset as a rollback shortcut while the release contract blocks that surface.
29
-
30
- Do not publish private or sensitive operational rollback material in this
31
- repository.
1
+ # Rollback Boundary
2
+
3
+ Public rollback covers the npm CLI, managed launcher, bundled global skill, and
4
+ the optional Codex plugin channel.
5
+
6
+ For a failed pre-publication candidate:
7
+
8
+ 1. Keep the previous tarball until the new one passes smoke tests.
9
+ 2. Revert the plugin source, marketplace manifest, CLI source, and versions to
10
+ the last known-good commit.
11
+ 3. Re-run `npm run release:preparar-publica`.
12
+
13
+ If a bad commit was already pushed, revert it with a normal Git revert and push
14
+ the corrective commit. Install the corrected npm version and resynchronize its
15
+ managed distribution:
16
+
17
+ ```bash
18
+ npm install -g @semacode/cli@<corrected-version>
19
+ sema skill sync --json
20
+ ```
21
+
22
+ The same sequence may install an explicitly selected previous version. The
23
+ installed npm version is authoritative: `sema skill sync --json` aligns the
24
+ runtime, managed launcher, and bundled skill to the version that is actually
25
+ installed. This is synchronization, not a promise to block an intentional
26
+ downgrade.
27
+
28
+ If the optional plugin channel was also affected, upgrade or reinstall it after
29
+ the corrected commit is public. Open a new task before validating the repaired
30
+ skill; already-open tasks keep the catalog they started with.
31
+
32
+ If a bad npm version was published, do not overwrite it. Publish a corrected
33
+ version and direct users to that version. Verify the final registry/GitHub state
34
+ with `npm run release:verificar-distribuicao`. Do not create a GitHub Release or
35
+ asset as a rollback shortcut while the release contract blocks that surface.
36
+
37
+ Do not publish private or sensitive operational rollback material in this
38
+ repository.
package/docs/security.md CHANGED
@@ -1,32 +1,54 @@
1
- # Security
2
-
3
- The public Sema repository must not contain private or sensitive operational
4
- material.
5
-
6
- Local Sema execution does not need a credential, login, activation key, license
7
- token, billing token, or control-panel session. Do not introduce one as a
8
- condition for reading or governing a local workspace.
9
-
10
- The official Codex bootstrap skill contains instructions only. It must not
11
- bundle an MCP server, app connector, remote workspace bridge, credential flow,
12
- or a second copy of the repository governance that belongs in `AGENTS.md`.
13
-
14
- Do not publish:
15
-
16
- - real credentials or secret material;
17
- - private data or internal operational artifacts.
18
-
19
- Placeholder examples are allowed:
20
-
21
- ```bash
22
- EXAMPLE_KEY=replace-me
23
- ```
24
-
25
- If a real credential is exposed in code, docs, logs, screenshots, packages, or
26
- Git history:
27
-
28
- 1. Rotate it immediately.
29
- 2. Remove it from the affected artifact.
30
- 3. Rebuild and rescan before publishing.
31
-
32
- Official support: suporte@otimitare.online
1
+ # Security
2
+
3
+ The public Sema repository must not contain private or sensitive operational
4
+ material.
5
+
6
+ Local Sema execution does not need a credential, login, activation key, license
7
+ token, billing token, or control-panel session. Do not introduce one as a
8
+ condition for reading or governing a local workspace.
9
+
10
+ The official bootstrap skill contains instructions only. The global npm
11
+ postinstall may atomically update the managed launcher under `~/.sema/bin`, the
12
+ canonical copy under `~/.agents/skills/sema`, and a Claude mirror under
13
+ `~/.claude/skills/sema` when Claude is already detected. It must not scan the
14
+ home recursively, overwrite an unowned destination, follow symlinks or
15
+ junctions, write into a plugin cache, bundle an MCP server, add a credential
16
+ flow, or duplicate the repository governance that belongs in `AGENTS.md`.
17
+
18
+ Status output exposes symbolic paths such as `$HOME/.sema/bin/sema`,
19
+ `$HOME/.sema/bin/sema.ps1`, `$HOME/.sema/bin/sema.cmd`, and
20
+ `$HOME/.sema/bin/sema-managed.ps1`, never the real home, Node.js executable, or
21
+ package path. On Windows, PowerShell resolves `sema.ps1` from `PATH`, `cmd.exe`
22
+ resolves `sema.cmd`, and the fallback runs `sema-managed.ps1` through
23
+ `%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe`. A managed receipt
24
+ detects isolated corruption of the launchers and companion; it is integrity
25
+ recovery, not authentication against a hostile process running as the same
26
+ user. Private absolute paths are not published in JSON or logs.
27
+
28
+ The public-package factory rejects pre-existing symlinks, junctions, and
29
+ reparse points in source, stage, and output chains and revalidates filesystem
30
+ identity around each path-based operation. This is fail-closed hardening, not a
31
+ native sandbox: Node.js does not expose cross-platform `openat`/`linkat`-style
32
+ operations anchored to directory handles, so a hostile process running as the
33
+ same operating-system user can still race a parent-path swap. Do not present
34
+ the private package stage as a security boundary against that attacker.
35
+
36
+ Do not publish:
37
+
38
+ - real credentials or secret material;
39
+ - private data or internal operational artifacts.
40
+
41
+ Placeholder examples are allowed:
42
+
43
+ ```bash
44
+ EXAMPLE_KEY=replace-me
45
+ ```
46
+
47
+ If a real credential is exposed in code, docs, logs, screenshots, packages, or
48
+ Git history:
49
+
50
+ 1. Rotate it immediately.
51
+ 2. Remove it from the affected artifact.
52
+ 3. Rebuild and rescan before publishing.
53
+
54
+ Official support: suporte@otimitare.online
@@ -330,33 +330,33 @@ only that local structural coverage is complete; it deliberately keeps
330
330
  editor was inspected, a plug-in existed, a worker accepted a job, a package
331
331
  launched, or an external observer attested the result.
332
332
 
333
- ## Semantic budget split plan
334
-
335
- The current operational facade remains compatible, but three governed artifacts
336
- have crossed the planning threshold: `operations.ts` has 1,112 lines,
337
- `sistemas_interativos_operacao.sema` has 304 lines, and the installed-package
338
- smoke `scripts/testar-pacote-cli-publico.mjs` has 1,009 lines. Before any of
339
- them reaches its blocking limit, split by responsibility as follows:
340
-
341
- - move engine snapshots, semantic diffs, asset provenance, and editor-state
342
- observation into `engineObservation.ts`;
343
- - move queues, locks, budgets, leases, checkpoints, and recovery planning into
344
- `jobOrchestration.ts`;
345
- - move acceptance locks, invalidation, and multimodal claim evidence into
346
- `acceptanceEvidence.ts`;
347
- - keep `operations.ts` as the stable re-export facade while callers migrate;
348
- - split the contract into `sistemas_interativos_observacao_engine.sema`,
349
- `sistemas_interativos_orquestracao_jobs.sema`, and
350
- `sistemas_interativos_acceptance_evidencias.sema`, with all three contracts
351
- linked to the shared facade and their actual implementation files;
352
- - split the installed-package smoke into helpers for public-boundary security,
353
- Codex bootstrap, content-pipeline compatibility, interactive systems, and
354
- generated toolchains, while retaining the current script as the stable
355
- orchestrator and preserving one end-to-end isolated installation.
356
-
357
- This is a responsibility split, not a numbered-file workaround. Existing
358
- exports, schema versions, fixtures, digests, and fail-closed behavior must remain
359
- backward compatible through the migration.
333
+ ## Semantic responsibility split
334
+
335
+ The operational surface is divided by responsibility while preserving
336
+ `operations.ts` as the stable explicit export facade:
337
+
338
+ - `operationPrimitives.ts` contains shared validation, canonicalization, digest,
339
+ and evidence primitives;
340
+ - `engineObservation.ts` owns engine snapshots, semantic diffs, asset
341
+ provenance, and editor-state observation;
342
+ - `jobOrchestration.ts` owns queues, locks, budgets, leases, checkpoints, and
343
+ recovery planning;
344
+ - `acceptanceEvidence.ts` owns acceptance locks, invalidation, and multimodal
345
+ claim evidence.
346
+
347
+ The contracts follow the same boundaries through
348
+ `sistemas_interativos_operacao.sema`,
349
+ `sistemas_interativos_observacao_engine.sema`,
350
+ `sistemas_interativos_orquestracao_jobs.sema`, and
351
+ `sistemas_interativos_acceptance_evidencias.sema`. The installed-package smoke
352
+ also keeps one stable orchestrator and one isolated installation, delegating
353
+ public-boundary security, Codex bootstrap, content-pipeline compatibility,
354
+ interactive systems, and generated toolchains to named helpers under
355
+ `scripts/cli-publico/`.
356
+
357
+ This is a responsibility split, not a numbered-file workaround. Existing
358
+ exports, schema versions, fixtures, digests, and fail-closed behavior remain
359
+ backward compatible across the facades.
360
360
 
361
361
  ## Fidelity rules
362
362
 
package/docs/support.md CHANGED
@@ -1,8 +1,8 @@
1
- # Support
2
-
3
- Official Sema support email: suporte@otimitare.online
4
-
5
- OtimiTare website: https://otimitare.online
6
-
7
- Do not publish private or sensitive support routing material in the public Sema
8
- repository.
1
+ # Support
2
+
3
+ Official Sema support email: suporte@otimitare.online
4
+
5
+ OtimiTare website: https://otimitare.online
6
+
7
+ Do not publish private or sensitive support routing material in the public Sema
8
+ repository.