@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.
- package/README.md +265 -217
- package/dist/agentContextPack.js +14 -10
- package/dist/agentEntryPoints.d.ts +5 -0
- package/dist/agentEntryPoints.js +567 -557
- package/dist/angular-consumer-standalone.js +1 -1
- package/dist/bin.d.ts +6 -0
- package/dist/bin.js +130 -0
- package/dist/cliArgs.js +4 -4
- package/dist/cliControlError.d.ts +12 -0
- package/dist/cliControlError.js +47 -0
- package/dist/cliGrammar.d.ts +11 -0
- package/dist/cliGrammar.js +551 -0
- package/dist/cliHelp.d.ts +13 -0
- package/dist/cliHelp.js +19 -0
- package/dist/cliHelpTexto.d.ts +3 -0
- package/dist/cliHelpTexto.js +168 -0
- package/dist/cliRuntime.d.ts +2 -0
- package/dist/cliRuntime.js +31 -0
- package/dist/comandos.js +9 -22
- package/dist/contexto.js +5 -5
- package/dist/dev/index.d.ts +1 -0
- package/dist/dev/index.js +51 -9
- package/dist/discovery/catalog.js +3 -3
- package/dist/distribuicao/filesystemGlobal.d.ts +63 -0
- package/dist/distribuicao/filesystemGlobal.js +701 -0
- package/dist/distribuicao/index.d.ts +7 -0
- package/dist/distribuicao/index.js +227 -0
- package/dist/distribuicao/launcherGlobal.d.ts +53 -0
- package/dist/distribuicao/launcherGlobal.js +643 -0
- package/dist/distribuicao/launcherWindows.d.ts +28 -0
- package/dist/distribuicao/launcherWindows.js +326 -0
- package/dist/distribuicao/lockContextGlobal.d.ts +10 -0
- package/dist/distribuicao/lockContextGlobal.js +17 -0
- package/dist/distribuicao/lockGlobal.d.ts +6 -0
- package/dist/distribuicao/lockGlobal.js +520 -0
- package/dist/distribuicao/skillGlobal.d.ts +48 -0
- package/dist/distribuicao/skillGlobal.js +652 -0
- package/dist/distribuicao/skillIntentPolicy.d.ts +21 -0
- package/dist/distribuicao/skillIntentPolicy.js +115 -0
- package/dist/distribuicao/tipos.d.ts +50 -0
- package/dist/distribuicao/tipos.js +10 -0
- package/dist/distribuicao/versaoSemantica.d.ts +3 -0
- package/dist/distribuicao/versaoSemantica.js +62 -0
- package/dist/drift.part01.d.ts +26 -24
- package/dist/drift.part01.js +2 -1
- package/dist/drift.part04.d.ts +12 -3
- package/dist/drift.part04.js +88 -17
- package/dist/drift.part05.d.ts +2 -2
- package/dist/drift.part05.js +8 -6
- package/dist/drift.part06.d.ts +2 -2
- package/dist/drift.part06.js +113 -26
- package/dist/drift.part07.d.ts +11 -11
- package/dist/drift.part07.js +261 -265
- package/dist/drift.part08.d.ts +2 -2
- package/dist/drift.part08.js +35 -26
- package/dist/drift.part11.js +238 -56
- package/dist/drift.part12.d.ts +1 -1
- package/dist/drift.part12.js +193 -21
- package/dist/drift.part13.d.ts +20 -39
- package/dist/drift.part13.js +601 -647
- package/dist/drift.part14.js +21 -7
- package/dist/driftCacheCas.d.ts +43 -0
- package/dist/driftCacheCas.js +351 -0
- package/dist/driftCacheFilesystem.d.ts +64 -0
- package/dist/driftCacheFilesystem.js +313 -0
- package/dist/driftCacheModes.d.ts +38 -0
- package/dist/driftCacheModes.js +147 -0
- package/dist/driftCacheStore.d.ts +80 -0
- package/dist/driftCacheStore.js +603 -0
- package/dist/driftCatalogo.d.ts +2 -28
- package/dist/driftCatalogo.js +143 -284
- package/dist/driftEscopo.d.ts +1 -3
- package/dist/driftEscopo.js +235 -151
- package/dist/driftEscopoReferencias.d.ts +5 -1
- package/dist/driftEscopoReferencias.js +375 -28
- package/dist/driftOrcamento.d.ts +0 -6
- package/dist/driftOrcamento.js +2 -1
- package/dist/execucoesExternas.js +19 -5
- package/dist/geracaoCore.js +4 -6
- package/dist/iaPrompts.d.ts +3 -3
- package/dist/iaPrompts.js +312 -313
- package/dist/index.d.ts +4 -1
- package/dist/index.js +6 -25
- package/dist/index.part01.d.ts +20 -28
- package/dist/index.part01.js +16 -237
- package/dist/index.part02.js +36 -22
- package/dist/index.part03.d.ts +24 -2
- package/dist/index.part03.js +83 -19
- package/dist/index.part04.d.ts +10 -2
- package/dist/index.part04.js +142 -120
- package/dist/index.part05.js +80 -78
- package/dist/index.part06.js +34 -17
- package/dist/index.part07.js +7 -3
- package/dist/index.part08.d.ts +1 -1
- package/dist/index.part08.js +22 -27
- package/dist/initCommand.js +5 -1
- package/dist/initTemplatesBase.js +81 -79
- package/dist/pipelineConteudo/command.d.ts +1 -0
- package/dist/pipelineConteudo/command.js +9 -2
- package/dist/pipelineConteudo/help.d.ts +2 -0
- package/dist/pipelineConteudo/help.js +33 -0
- package/dist/profileAuthorCommand.js +3 -7
- package/dist/profileCommand.js +3 -7
- package/dist/projetoCarregar.js +35 -17
- package/dist/projetoCatalogo.d.ts +1 -0
- package/dist/projetoCatalogo.js +64 -25
- package/dist/projetoOrigens.d.ts +2 -0
- package/dist/projetoOrigens.js +65 -9
- package/dist/projetoTipos.d.ts +1 -0
- package/dist/resultadoCli.d.ts +20 -0
- package/dist/resultadoCli.js +57 -0
- package/dist/saidaCli.d.ts +35 -0
- package/dist/saidaCli.js +118 -0
- package/dist/sistemasInterativos/acceptanceEvidence.d.ts +22 -0
- package/dist/sistemasInterativos/acceptanceEvidence.js +345 -0
- package/dist/sistemasInterativos/engineObservation.d.ts +12 -0
- package/dist/sistemasInterativos/engineObservation.js +438 -0
- package/dist/sistemasInterativos/jobOrchestration.d.ts +2 -0
- package/dist/sistemasInterativos/jobOrchestration.js +204 -0
- package/dist/sistemasInterativos/operationPrimitives.d.ts +21 -0
- package/dist/sistemasInterativos/operationPrimitives.js +194 -0
- package/dist/sistemasInterativos/operations.d.ts +4 -39
- package/dist/sistemasInterativos/operations.js +5 -1164
- package/dist/skillCommand.d.ts +5 -0
- package/dist/skillCommand.js +88 -0
- package/docs/README.md +34 -30
- package/docs/ai-integration.md +25 -12
- package/docs/ai-onboarding.md +37 -18
- package/docs/ai-workflow.md +9 -7
- package/docs/cli.md +125 -7
- package/docs/commands.md +41 -20
- package/docs/deploy.md +21 -8
- package/docs/descoberta-capacidades.md +106 -106
- package/docs/documentation.md +49 -39
- package/docs/drift-cache.md +108 -0
- package/docs/getting-started.md +43 -18
- package/docs/pipeline-conteudo.md +246 -246
- package/docs/profiles.md +54 -54
- package/docs/repositories.md +19 -2
- package/docs/rollback.md +15 -8
- package/docs/security.md +25 -3
- package/docs/sistemas-interativos.md +379 -374
- package/docs/testing.md +139 -40
- package/exemplos/pipeline-conteudo/README.md +44 -44
- package/exemplos/pipeline-conteudo/alvos.json +23 -23
- package/exemplos/pipeline-conteudo/definicao.json +136 -136
- package/exemplos/profile_simulation.sema +211 -211
- package/exemplos/sistemas-interativos/README.md +100 -100
- package/exemplos/sistemas-interativos/advanced/acceptance-context-evaluate-valid.json +5 -5
- package/exemplos/sistemas-interativos/advanced/acceptance-lock-valid.json +16 -16
- package/exemplos/sistemas-interativos/advanced/asset-provenance-valid.json +32 -32
- package/exemplos/sistemas-interativos/advanced/autonomy-repair-valid.json +93 -93
- package/exemplos/sistemas-interativos/advanced/control-run-definition-valid.json +78 -78
- package/exemplos/sistemas-interativos/advanced/control-run-valid.json +27 -27
- package/exemplos/sistemas-interativos/advanced/distributed-workers-valid.json +79 -79
- package/exemplos/sistemas-interativos/advanced/editor-state-valid.json +42 -42
- package/exemplos/sistemas-interativos/advanced/engine-snapshot-after-valid.json +32 -32
- package/exemplos/sistemas-interativos/advanced/engine-snapshot-before-valid.json +23 -23
- package/exemplos/sistemas-interativos/advanced/job-orchestration-valid.json +39 -39
- package/exemplos/sistemas-interativos/advanced/multimodal-evidence-valid.json +46 -46
- package/exemplos/sistemas-interativos/advanced/multiplayer-authority-valid.json +39 -39
- package/exemplos/sistemas-interativos/advanced/playtest-fuzz-valid.json +37 -37
- package/exemplos/sistemas-interativos/advanced/portability-valid.json +104 -104
- package/exemplos/sistemas-interativos/advanced/temporal-evidence-valid.json +27 -27
- package/exemplos/sistemas-interativos/advanced/temporal-valid.json +118 -118
- package/exemplos/sistemas-interativos/experience-ir-valid.json +459 -459
- package/exemplos/sistemas-interativos/game-2d.json +83 -83
- package/exemplos/sistemas-interativos/game-3d-human.json +81 -81
- package/exemplos/sistemas-interativos/game-pixel-16-bit.json +97 -97
- package/exemplos/sistemas-interativos/game-pixel-8-bit.json +94 -94
- package/exemplos/sistemas-interativos/game-xr-human.json +80 -80
- package/exemplos/sistemas-interativos/hybrid-2-5d.json +108 -108
- package/exemplos/sistemas-interativos/protocol-mutating-rollback-valid.json +75 -75
- package/exemplos/sistemas-interativos/protocol-read-only-valid.json +58 -58
- package/exemplos/sistemas-interativos/simulation-2d-controlled.json +97 -97
- package/exemplos/sistemas-interativos/simulation-3d-calibrated-autonomous.json +141 -141
- package/exemplos/sistemas-interativos/simulation-headless-autonomous-batch.json +112 -112
- package/exemplos/sistemas-interativos/simulation-pixel-16-bit.json +103 -103
- package/exemplos/sistemas-interativos/simulation-text-controlled.json +95 -95
- package/node_modules/@sema/gerador-cpp/package.json +1 -1
- package/node_modules/@sema/gerador-dotnet/package.json +1 -1
- package/node_modules/@sema/gerador-lua/dist/index.js +51 -51
- package/node_modules/@sema/gerador-php/dist/index.js +113 -113
- package/node_modules/@sema/nucleo/dist/semantico/analisador.d.ts +1 -0
- package/node_modules/@sema/nucleo/dist/semantico/analisador.js +1 -0
- package/package.json +9 -4
- package/scripts/postinstall.mjs +148 -0
- package/skills/sema/SKILL.md +199 -0
- package/skills/sema/agents/openai.yaml +4 -0
- package/dist/driftCache.d.ts +0 -49
- package/dist/driftCache.js +0 -311
- package/dist/driftCacheIncremental.d.ts +0 -98
- package/dist/driftCacheIncremental.js +0 -596
- package/dist/driftCatalogoPersistente.d.ts +0 -8
- package/dist/driftCatalogoPersistente.js +0 -77
- package/node_modules/@sema/gerador-cpp/dist/index.js.map +0 -1
- package/node_modules/@sema/gerador-css/dist/index.js.map +0 -1
- package/node_modules/@sema/gerador-css/dist/index.part01.js.map +0 -1
- package/node_modules/@sema/gerador-css/dist/index.part02.js.map +0 -1
- package/node_modules/@sema/gerador-dart/dist/index.js.map +0 -1
- package/node_modules/@sema/gerador-dotnet/dist/index.js.map +0 -1
- package/node_modules/@sema/gerador-html/dist/index.js.map +0 -1
- package/node_modules/@sema/gerador-javascript/dist/index.js.map +0 -1
- package/node_modules/@sema/gerador-lua/dist/index.js.map +0 -1
- package/node_modules/@sema/gerador-php/dist/index.js.map +0 -1
- package/node_modules/@sema/gerador-python/dist/index.js.map +0 -1
- package/node_modules/@sema/gerador-python/dist/index.part01.js.map +0 -1
- package/node_modules/@sema/gerador-python/dist/index.part02.js.map +0 -1
- package/node_modules/@sema/gerador-typescript/dist/index.js.map +0 -1
- package/node_modules/@sema/gerador-typescript/dist/index.part01.js.map +0 -1
- package/node_modules/@sema/gerador-typescript/dist/index.part02.js.map +0 -1
- package/node_modules/@sema/gerador-typescript/dist/index.part03.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/ast/tipos.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/diagnosticos/index.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/diagnosticos/melhorador.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/diagnosticos/snippets.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/formatador/index.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/formatador/index.part01.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/formatador/index.part02.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/index.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/ir/conversor.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/ir/conversor.part01.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/ir/conversor.part02.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/ir/conversor.part03.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/ir/modelos.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/lexer/lexer.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/lexer/tokens.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/parser/parser.declaracoes.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/parser/parser.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/parser/parser.modulo.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/parser/parser.part01.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/parser/parser.part02.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/parser/parser.part03.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/persistencia/contratos.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/semantico/analisador.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/semantico/analisador.part01.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/semantico/analisador.part02.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/semantico/analisador.part03.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/semantico/analisador.part04.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/semantico/analisador.part05.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/semantico/analisador.part06.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/semantico/analisador.part07.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/semantico/analisador.part08.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/semantico/estruturas.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/semantico/estruturas.part01.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/semantico/estruturas.part02.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/semantico/orcamentoSemantico.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/semantico/seguranca.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/util/arquivos.js.map +0 -1
- package/node_modules/@sema/padroes/dist/index.js.map +0 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type ResultadoDistribuicaoGlobal } from "./distribuicao/index.js";
|
|
2
|
+
type OperacaoSkill = "status" | "sync";
|
|
3
|
+
export declare function renderizarResultadoSkill(operacao: OperacaoSkill, resultado: ResultadoDistribuicaoGlobal): string;
|
|
4
|
+
export declare function comandoSkill(posicionais: string[], args: string[], emJson: boolean): Promise<number>;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// SEMA-GOVERNED: sema.produto.distribuicao_global, sema.produto.distribuicao_global.skill
|
|
2
|
+
// Descrição: expõe diagnóstico read-only e reparo explícito da distribuição global gerenciada.
|
|
3
|
+
import { sincronizarDistribuicaoGlobal, statusDistribuicaoGlobal, } from "./distribuicao/index.js";
|
|
4
|
+
export function renderizarResultadoSkill(operacao, resultado) {
|
|
5
|
+
const linhas = [
|
|
6
|
+
`Distribuição global Sema (${operacao}): ${resultado.estado}`,
|
|
7
|
+
` Alterada: ${resultado.alterado ? "sim" : "não"}`,
|
|
8
|
+
` Launcher: ${resultado.launcher.estado} (${resultado.launcher.destino_simbolico})`,
|
|
9
|
+
...(resultado.launcher.fallback_simbolico
|
|
10
|
+
? [` Fallback PowerShell: ${resultado.launcher.fallback_simbolico}`]
|
|
11
|
+
: []),
|
|
12
|
+
` Diagnóstico launcher: ${resultado.launcher.codigo}`,
|
|
13
|
+
` Skill: ${resultado.skill.estado} (${resultado.skill.origem_simbolica})`,
|
|
14
|
+
` Destino .agents: ${resultado.skill.destino_agents}`,
|
|
15
|
+
` Destino Claude: ${resultado.skill.destino_claude}`,
|
|
16
|
+
` Diagnósticos skill: ${resultado.skill.destinos
|
|
17
|
+
.map((destino) => `${destino.id}=${destino.codigo}`)
|
|
18
|
+
.join(", ") || "nenhum"}`,
|
|
19
|
+
];
|
|
20
|
+
return linhas.join("\n");
|
|
21
|
+
}
|
|
22
|
+
function imprimirSubcomandoInvalido(emJson) {
|
|
23
|
+
const mensagem = "Use `sema skill status` ou `sema skill sync`.";
|
|
24
|
+
if (emJson) {
|
|
25
|
+
console.log(JSON.stringify({
|
|
26
|
+
schema: "sema.skill-distribution/v1",
|
|
27
|
+
comando: "skill",
|
|
28
|
+
sucesso: false,
|
|
29
|
+
erro: {
|
|
30
|
+
codigo: "SUBCOMANDO_SKILL_INVALIDO",
|
|
31
|
+
mensagem,
|
|
32
|
+
},
|
|
33
|
+
}, null, 2));
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
console.error(mensagem);
|
|
37
|
+
}
|
|
38
|
+
export async function comandoSkill(posicionais, args, emJson) {
|
|
39
|
+
const operacao = (posicionais[0] ?? "status").toLocaleLowerCase("en-US");
|
|
40
|
+
const possuiArgumentoExtra = posicionais.length > 1;
|
|
41
|
+
const possuiFlagDesconhecida = args.some((arg) => arg.startsWith("-") && arg !== "--json");
|
|
42
|
+
if ((operacao !== "status" && operacao !== "sync")
|
|
43
|
+
|| possuiArgumentoExtra
|
|
44
|
+
|| possuiFlagDesconhecida) {
|
|
45
|
+
imprimirSubcomandoInvalido(emJson);
|
|
46
|
+
return 1;
|
|
47
|
+
}
|
|
48
|
+
try {
|
|
49
|
+
const resultado = operacao === "sync"
|
|
50
|
+
? await sincronizarDistribuicaoGlobal()
|
|
51
|
+
: await statusDistribuicaoGlobal();
|
|
52
|
+
const sucesso = resultado.estado === "READY";
|
|
53
|
+
if (emJson) {
|
|
54
|
+
const payload = {
|
|
55
|
+
schema: "sema.skill-distribution/v1",
|
|
56
|
+
comando: "skill",
|
|
57
|
+
operacao,
|
|
58
|
+
sucesso,
|
|
59
|
+
resultado,
|
|
60
|
+
};
|
|
61
|
+
console.log(JSON.stringify(payload, null, 2));
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
console.log(renderizarResultadoSkill(operacao, resultado));
|
|
65
|
+
}
|
|
66
|
+
return sucesso ? 0 : 1;
|
|
67
|
+
}
|
|
68
|
+
catch {
|
|
69
|
+
const mensagem = "Falha ao consultar ou sincronizar a distribuição global Sema.";
|
|
70
|
+
if (emJson) {
|
|
71
|
+
console.log(JSON.stringify({
|
|
72
|
+
schema: "sema.skill-distribution/v1",
|
|
73
|
+
comando: "skill",
|
|
74
|
+
operacao,
|
|
75
|
+
sucesso: false,
|
|
76
|
+
erro: {
|
|
77
|
+
codigo: "FALHA_DISTRIBUICAO_GLOBAL",
|
|
78
|
+
mensagem,
|
|
79
|
+
},
|
|
80
|
+
}, null, 2));
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
console.error(mensagem);
|
|
84
|
+
}
|
|
85
|
+
return 1;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=skillCommand.js.map
|
package/docs/README.md
CHANGED
|
@@ -1,34 +1,38 @@
|
|
|
1
|
-
# Sema Documentation
|
|
2
|
-
|
|
3
|
-
These docs describe the public Codex-native local CLI distribution of Sema.
|
|
4
|
-
|
|
1
|
+
# Sema Documentation
|
|
2
|
+
|
|
3
|
+
These docs describe the public Codex-native local CLI distribution of Sema.
|
|
4
|
+
|
|
5
5
|
Sema is local-first: Codex runs the CLI inside a project folder, reads `.sema`
|
|
6
6
|
contracts, checks drift, maps impact, and closes changes with documentation
|
|
7
|
-
evidence.
|
|
7
|
+
evidence. In 3.0.0, valid commands using `--json` return the exact
|
|
8
|
+
`sema.cli.result/v1` envelope with command data nested under `payload`, while
|
|
9
|
+
help and command-control failures keep the separate `sema.cli.control/v1`
|
|
10
|
+
envelope. `AGENTS.md` is the official Codex entrypoint. Public docs are written
|
|
8
11
|
in English.
|
|
9
|
-
|
|
10
|
-
Sema is an independent product and is not affiliated with or endorsed by
|
|
11
|
-
OpenAI. Codex-native describes Sema's product direction, not an official OpenAI
|
|
12
|
-
program or submission.
|
|
13
|
-
|
|
14
|
-
Start here:
|
|
15
|
-
|
|
16
|
-
- [CLI](./cli.md)
|
|
17
|
-
- [Commands](./commands.md)
|
|
12
|
+
|
|
13
|
+
Sema is an independent product and is not affiliated with or endorsed by
|
|
14
|
+
OpenAI. Codex-native describes Sema's product direction, not an official OpenAI
|
|
15
|
+
program or submission.
|
|
16
|
+
|
|
17
|
+
Start here:
|
|
18
|
+
|
|
19
|
+
- [CLI](./cli.md) — installation and the public JSON output contract
|
|
20
|
+
- [Commands](./commands.md) — command catalog and envelope-consumption rules
|
|
21
|
+
- [Drift Cache And Query Evidence](./drift-cache.md)
|
|
18
22
|
- [Syntax](./syntax.md)
|
|
19
|
-
- [Profiles](./profiles.md)
|
|
20
|
-
- [Capability Discovery](./descoberta-capacidades.md) — one explainable catalog
|
|
21
|
-
for governance flows, profiles, specialized workflows, pipelines, generators,
|
|
22
|
-
capability tokens, and adapters.
|
|
23
|
-
- [AI-native Interactive Systems](./sistemas-interativos.md) — declarative
|
|
24
|
-
control plane for games, simulations, and hybrids across 3D, 2D, retro,
|
|
25
|
-
text, XR, and headless execution.
|
|
26
|
-
- [AI-native Content Pipeline](./pipeline-conteudo.md) — signed-policy,
|
|
27
|
-
multi-channel and multi-format orchestration for external AI runners, with
|
|
28
|
-
canonical ledger replay and no native human-review path.
|
|
29
|
-
- [Documentation Governance](./documentation.md)
|
|
30
|
-
- [Repository Boundary](./repositories.md)
|
|
31
|
-
- [Security](./security.md)
|
|
32
|
-
- [Codex Integration](./ai-integration.md)
|
|
33
|
-
|
|
34
|
-
Official support: [suporte@otimitare.online](mailto:suporte@otimitare.online)
|
|
23
|
+
- [Profiles](./profiles.md)
|
|
24
|
+
- [Capability Discovery](./descoberta-capacidades.md) — one explainable catalog
|
|
25
|
+
for governance flows, profiles, specialized workflows, pipelines, generators,
|
|
26
|
+
capability tokens, and adapters.
|
|
27
|
+
- [AI-native Interactive Systems](./sistemas-interativos.md) — declarative
|
|
28
|
+
control plane for games, simulations, and hybrids across 3D, 2D, retro,
|
|
29
|
+
text, XR, and headless execution.
|
|
30
|
+
- [AI-native Content Pipeline](./pipeline-conteudo.md) — signed-policy,
|
|
31
|
+
multi-channel and multi-format orchestration for external AI runners, with
|
|
32
|
+
canonical ledger replay and no native human-review path.
|
|
33
|
+
- [Documentation Governance](./documentation.md)
|
|
34
|
+
- [Repository Boundary](./repositories.md)
|
|
35
|
+
- [Security](./security.md)
|
|
36
|
+
- [Codex Integration](./ai-integration.md)
|
|
37
|
+
|
|
38
|
+
Official support: [suporte@otimitare.online](mailto:suporte@otimitare.online)
|
package/docs/ai-integration.md
CHANGED
|
@@ -11,18 +11,22 @@ https://learn.chatgpt.com/docs/agent-configuration/agents-md.
|
|
|
11
11
|
|
|
12
12
|
## Before AGENTS.md Exists
|
|
13
13
|
|
|
14
|
-
The official Sema skill is the
|
|
15
|
-
|
|
14
|
+
The official Sema skill is the first-contact bootstrap for a project that does
|
|
15
|
+
not have Sema yet. A global CLI install bundles and synchronizes it:
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
npm install -g @semacode/cli
|
|
19
|
+
sema skill status --json
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
The
|
|
23
|
-
|
|
22
|
+
The package creates an absolute launcher under `~/.sema/bin`, synchronizes the
|
|
23
|
+
canonical skill under `~/.agents/skills/sema`, and mirrors Claude only when
|
|
24
|
+
detected. Informational requests stay read-only; before implementation the skill asks
|
|
25
|
+
for explicit project-adoption authorization, then generates `AGENTS.md` and delegates
|
|
26
|
+
ongoing governance. Installing or updating the global CLI authorizes distribution only.
|
|
27
|
+
Already-open tasks may need a reload. The distribution contains no
|
|
24
28
|
MCP server, remote workspace bridge, login, license, billing, token, credit,
|
|
25
|
-
panel, or authorization gate.
|
|
29
|
+
panel, or runtime authorization gate.
|
|
26
30
|
|
|
27
31
|
Supported capacity labels: fraca, pequena, media, forte, grande.
|
|
28
32
|
|
|
@@ -32,10 +36,11 @@ For a local workspace, use the local CLI:
|
|
|
32
36
|
|
|
33
37
|
```bash
|
|
34
38
|
sema --version
|
|
35
|
-
sema resumo
|
|
39
|
+
sema resumo --drift none
|
|
36
40
|
```
|
|
37
41
|
|
|
38
|
-
|
|
42
|
+
If the shell cannot resolve `sema`, use `~/.sema/bin/sema` on macOS/Linux. On Windows, PowerShell uses `sema.ps1` from PATH and cmd.exe uses `sema.cmd`; use `& "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Bypass -File "$HOME\.sema\bin\sema-managed.ps1" --version` as the absolute fallback
|
|
43
|
+
before declaring the CLI unavailable. A successful version check is enough. Local
|
|
39
44
|
commands require no login, activation key, license check, token, credits, billing
|
|
40
45
|
service, control panel, or external authorization request.
|
|
41
46
|
|
|
@@ -43,13 +48,15 @@ service, control panel, or external authorization request.
|
|
|
43
48
|
|
|
44
49
|
```bash
|
|
45
50
|
sema docs-impacto --intencao "describe the change" --json
|
|
46
|
-
sema inspecionar contratos/example.sema --json
|
|
47
|
-
sema drift contratos/example.sema --escopo modulo --json
|
|
51
|
+
sema inspecionar contratos/example.sema --drift none --json
|
|
52
|
+
sema drift contratos/example.sema --escopo modulo --cache fresh --json
|
|
48
53
|
sema impacto contratos/example.sema --alvo app.example --mudanca "describe the change" --json
|
|
49
54
|
```
|
|
50
55
|
|
|
51
56
|
Read every document listed by `docs-impacto` before changing code, contracts,
|
|
52
57
|
operational docs, generated artifacts, workflows, profiles, or release material.
|
|
58
|
+
A cache hit is acceleration, not evidence: closing requires `--cache fresh`,
|
|
59
|
+
while contract-only queries keep unobserved implementation fields null inside the command payload.
|
|
53
60
|
|
|
54
61
|
## Codex Context Tiers
|
|
55
62
|
|
|
@@ -73,6 +80,12 @@ Generated or governed code should keep a short `SEMA-GOVERNED` marker that
|
|
|
73
80
|
points back to the applicable contract. The marker is not a substitute for
|
|
74
81
|
validation, drift, impact, or finalization gates.
|
|
75
82
|
|
|
83
|
+
Generated Lua tests preserve the contract's failure shape. A case whose only
|
|
84
|
+
expectation is `sucesso: falso` may terminate without an output, while a case
|
|
85
|
+
that also declares observable output fields must return a structured failure
|
|
86
|
+
result. The generator keeps these paths distinct instead of forcing every
|
|
87
|
+
failure into one representation.
|
|
88
|
+
|
|
76
89
|
Governed code above 1000 lines requires a
|
|
77
90
|
split plan. Governed code above 2000
|
|
78
91
|
lines blocks closure. Markdown documentation is not counted as governed code
|
|
@@ -106,4 +119,4 @@ user-facing experience, closure requires evidence:
|
|
|
106
119
|
## Platform Policy
|
|
107
120
|
|
|
108
121
|
Sema governs contract, scope, drift, evidence, and quality. It does not bypass
|
|
109
|
-
platform policies, terms of use, permissions, security controls, or laws.
|
|
122
|
+
platform policies, terms of use, permissions, security controls, or laws.
|
package/docs/ai-onboarding.md
CHANGED
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
# Codex Onboarding
|
|
2
2
|
|
|
3
|
-
The official Sema skill
|
|
4
|
-
before a project has its own protocol:
|
|
3
|
+
The official Sema skill lets Codex and compatible agents recognize and
|
|
4
|
+
initialize Sema before a project has its own protocol:
|
|
5
5
|
|
|
6
6
|
```bash
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
npm install -g @semacode/cli
|
|
8
|
+
sema skill status --json
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
The install maintains the canonical copy in `~/.agents/skills/sema` and a Claude
|
|
12
|
+
mirror in `~/.claude/skills/sema` only when Claude is detected. Open a new task
|
|
13
|
+
after installation or update because an already-open task does not reload its
|
|
14
|
+
skill catalog. Invoking `$sema` for information does not initialize the
|
|
15
|
+
workspace. Before implementation, the skill asks for explicit adoption
|
|
16
|
+
authorization; installing or updating the global CLI authorizes distribution
|
|
17
|
+
changes only. After authorized adoption, it reads the generated `AGENTS.md`,
|
|
18
|
+
and later tasks load that protocol automatically.
|
|
19
|
+
|
|
20
|
+
The optional Codex plugin remains available as a separate namespaced channel;
|
|
21
|
+
the npm lifecycle never writes into its cache.
|
|
16
22
|
|
|
17
23
|
`AGENTS.md` is the official Sema entrypoint for Codex. It gives Codex the durable
|
|
18
24
|
repository rule that contracts come first and the local CLI is the source of
|
|
@@ -32,18 +38,31 @@ This workspace is governed by Sema. Before editing code, contracts, docs,
|
|
|
32
38
|
workflows, profiles, or release scripts, run:
|
|
33
39
|
|
|
34
40
|
1. sema --version
|
|
35
|
-
2. sema resumo
|
|
41
|
+
2. sema resumo --drift none
|
|
36
42
|
3. sema docs-impacto --intencao "<change>" --json
|
|
37
|
-
4. sema inspecionar
|
|
38
|
-
5. sema drift
|
|
43
|
+
4. sema inspecionar <contract.sema> --drift none --json
|
|
44
|
+
5. sema drift <contract.sema> --escopo modulo --cache fresh --json before
|
|
45
|
+
editing existing code
|
|
39
46
|
6. sema impacto before changing behavior
|
|
40
47
|
7. sema finalizar-mudanca before closing
|
|
41
48
|
|
|
42
|
-
If
|
|
43
|
-
|
|
44
|
-
|
|
49
|
+
If `sema --version` is unavailable, try the managed absolute launcher at
|
|
50
|
+
`~/.sema/bin/sema` on macOS/Linux. On Windows, PowerShell uses `sema.ps1` from
|
|
51
|
+
`PATH`, `cmd.exe` uses `sema.cmd`, and the absolute PowerShell fallback is:
|
|
52
|
+
& "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Bypass -File "$HOME\.sema\bin\sema-managed.ps1" --version
|
|
53
|
+
If that also fails, stop and install or repair @semacode/cli. There is no
|
|
54
|
+
separate Sema login or license-activation gate. Distribution installation does
|
|
55
|
+
not authorize workspace adoption. Do not replace Sema with manual search or
|
|
56
|
+
guessed contracts.
|
|
45
57
|
```
|
|
46
58
|
|
|
59
|
+
Query commands default to `--drift none`, so their `analiseDrift` envelope marks
|
|
60
|
+
the analysis as not executed and keeps drift-derived evidence `null`. Direct
|
|
61
|
+
`sema drift` defaults to `--cache fresh`; `--cache none` still executes drift
|
|
62
|
+
without persistent cache access. The cache is non-authoritative, lives outside
|
|
63
|
+
the workspace, and safely falls back to recalculation when unavailable or
|
|
64
|
+
corrupt. See [Drift Cache And Query Evidence](./drift-cache.md).
|
|
65
|
+
|
|
47
66
|
## What Codex Should Not Do
|
|
48
67
|
|
|
49
68
|
- Do not invent `.sema` contracts.
|
|
@@ -52,9 +71,9 @@ replace Sema with manual search or guessed contracts.
|
|
|
52
71
|
- Do not publish private or sensitive operational material.
|
|
53
72
|
- Do not replace the local CLI when the local workspace is available.
|
|
54
73
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
74
|
+
Compatible AI clients can discover the same portable skill through the
|
|
75
|
+
canonical global `.agents/skills` root. Sema does not create client-specific
|
|
76
|
+
repository rules: `AGENTS.md` remains the only official workspace entrypoint.
|
|
58
77
|
|
|
59
78
|
Sema is an independent product and is not affiliated with or endorsed by
|
|
60
79
|
OpenAI.
|
package/docs/ai-workflow.md
CHANGED
|
@@ -4,26 +4,28 @@
|
|
|
4
4
|
This is the minimum workflow for Codex in a local workspace.
|
|
5
5
|
|
|
6
6
|
1. Read `SEMA_BOOT.md`.
|
|
7
|
-
2. Run `sema --version`.
|
|
8
|
-
3. Run `sema resumo
|
|
7
|
+
2. Run `sema --version`. If the shell cannot find it, use `$HOME/.sema/bin/sema` on macOS/Linux. On Windows, PowerShell resolves `sema.ps1` from PATH and cmd.exe resolves `sema.cmd`; use `& "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Bypass -File "$HOME\.sema\bin\sema-managed.ps1" --version` as the absolute fallback. Only then declare the CLI unavailable.
|
|
8
|
+
3. Run `sema resumo --drift none` for contract-only orientation; request `--drift cache` or `--drift fresh` only when code evidence is needed.
|
|
9
9
|
4. Run `sema docs-impacto --intencao "<change>" --json`.
|
|
10
10
|
5. Read every required document returned by the command.
|
|
11
11
|
6. Read `docs/commands.md` before selecting a command or interpreting `--saida`.
|
|
12
12
|
7. If the right capability is unclear, run `sema descobrir recomendar --intencao "<goal>" --json`; do not auto-run ambiguous recommendations.
|
|
13
13
|
8. Use `exemplos/` and `docs/syntax.md` before creating or editing a contract.
|
|
14
|
-
9. Run `sema drift` and `sema impacto` before editing existing code.
|
|
14
|
+
9. Run `sema drift --cache fresh` and `sema impacto` before editing existing code.
|
|
15
15
|
10. Run `sema formatar` and `sema validar` after changing a `.sema` contract.
|
|
16
16
|
11. Run `sema finalizar-mudanca` with the documents read before closure.
|
|
17
17
|
|
|
18
18
|
Contract edit rule: `.sema` has its own size budget. Above 300 lines, plan a split by domain/capability; above 500, do not create or edit before splitting. Do not use parte_1/parte_2 and do not force a 1:1 contract-to-file relationship; several contracts can govern the same file through `vinculos`.
|
|
19
19
|
|
|
20
|
-
Closing rule: `sema drift --json` must return `sucesso:true`. If it reports `sucesso:false`, `vinculos_quebrados`, `rotas_divergentes`, or
|
|
20
|
+
Closing rule: the `payload` of `sema drift --cache fresh --json` must return `sucesso:true`. If it reports `sucesso:false`, `vinculos_quebrados`, `rotas_divergentes`, or `impls_quebrados`, the task is still blocked. Passing unit tests or a cache hit do not replace fresh green drift. In 3.0.0, `ok` describes the CLI result path and never replaces a command-specific domain verdict.
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Focused drift rule: file and module scopes plan their physical file set before cataloging. They never fall back to a whole-project walk when no safe anchor exists. All indexers and semantic-budget checks reuse the same in-memory source read; a global walk is reserved for explicit `--escopo projeto`. Code discovery is deferred until that plan exists, homonymous candidates fail as ambiguous, and configured contract origins or code roots resolving outside the workspace are rejected before enumeration. `inspecionar`, `impacto`, and `renomear-semantico` preserve the same directed boundary. Missing local dependencies make coverage partial and block success.
|
|
23
|
+
|
|
24
|
+
Cache rule: a closure gate should use `sema drift <contrato> --escopo modulo --cache fresh --json`. `--cache none` executes the same analysis without persistent-cache I/O, while `--cache cache` may reuse only extraction data whose schema, workspace identity, Git HEAD, plan, configuration, contracts, member paths, and strong content digests all match. Cache objects are stored in the operating system's user-cache directory, never below the workspace. A hit is acceleration, not evidence: final links, diagnostics, score, and success are always recalculated. Corruption or an unavailable cache degrades to an in-memory calculation.
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
Query honesty rule: `resumo` and `inspecionar` default to `--drift none`. When analysis is skipped, score, confidence, implementation, routes, and other unobserved code claims inside the command payload must be `null` or explicitly marked not evaluated; zero is not a substitute for absent evidence.
|
|
25
27
|
|
|
26
|
-
|
|
28
|
+
UI rule: if the task involves an interface, minimum evidence includes desktop and mobile. On a narrow viewport such as 390px, `document.documentElement.scrollWidth <= document.documentElement.clientWidth` must pass; horizontal scroll blocks closure.
|
|
27
29
|
|
|
28
30
|
## Codex Context Capacity
|
|
29
31
|
|
package/docs/cli.md
CHANGED
|
@@ -13,16 +13,122 @@ Support: suporte@otimitare.online
|
|
|
13
13
|
```bash
|
|
14
14
|
npm install -g @semacode/cli
|
|
15
15
|
sema --version
|
|
16
|
+
sema skill status --json
|
|
16
17
|
```
|
|
17
18
|
|
|
19
|
+
The global install bundles the portable Sema skill and creates a launcher under
|
|
20
|
+
`~/.sema/bin` with absolute Node.js and CLI paths. If the npm shim is absent
|
|
21
|
+
from `PATH`, run `~/.sema/bin/sema` on macOS/Linux. On Windows, PowerShell
|
|
22
|
+
resolves `sema.ps1` from `PATH`, while `cmd.exe` resolves `sema.cmd`; invoke the
|
|
23
|
+
managed fallback through the absolute system executable:
|
|
24
|
+
|
|
25
|
+
```powershell
|
|
26
|
+
& "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Bypass -File "$HOME\.sema\bin\sema-managed.ps1" --version
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Use `sema skill sync --json` to repair an installation performed with lifecycle
|
|
30
|
+
scripts disabled.
|
|
31
|
+
|
|
18
32
|
For development inside this repository:
|
|
19
33
|
|
|
20
34
|
```bash
|
|
21
35
|
npm install
|
|
22
36
|
npm run build
|
|
23
|
-
node pacotes/cli/dist/
|
|
37
|
+
node pacotes/cli/dist/bin.js --help
|
|
24
38
|
```
|
|
25
39
|
|
|
40
|
+
## Side-Effect-Free Help
|
|
41
|
+
|
|
42
|
+
`--help` and `-h` take precedence wherever they appear in argv, including after
|
|
43
|
+
an unknown command or option. The CLI exits with status `0` before command
|
|
44
|
+
runtime import, command dispatch, or handler resolution. Help does not inspect or mutate the workspace,
|
|
45
|
+
home, user cache, or plugin cache, start a subprocess, or make a network call.
|
|
46
|
+
|
|
47
|
+
`dist/bin.js` is the executable bootstrap and imports the operational runtime
|
|
48
|
+
only after these control paths finish. `dist/index.js` remains the package API
|
|
49
|
+
entrypoint and is not an executable alias.
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
sema iniciar --help
|
|
53
|
+
sema formatar --help
|
|
54
|
+
sema sync-codex --help
|
|
55
|
+
sema skill sync --help
|
|
56
|
+
sema unknown --option value --help
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Public JSON Output
|
|
60
|
+
|
|
61
|
+
`sema --version` (and its version aliases) prints one plain exact SemVer string.
|
|
62
|
+
It is intentionally not wrapped in JSON.
|
|
63
|
+
|
|
64
|
+
### Help and command control
|
|
65
|
+
|
|
66
|
+
Adding `--json` to help or a command-control failure emits exactly one JSON
|
|
67
|
+
document on stdout and keeps stderr empty:
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"schemaVersion": "sema.cli.control/v1",
|
|
72
|
+
"ok": true,
|
|
73
|
+
"kind": "HELP",
|
|
74
|
+
"code": "CLI_HELP",
|
|
75
|
+
"message": "Sema CLI help",
|
|
76
|
+
"exitCode": 0
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
The envelope contains exactly `schemaVersion`, `ok`, `kind`, `code`, `message`,
|
|
81
|
+
and `exitCode`. Supported control kinds are `HELP`, `UNKNOWN_COMMAND`,
|
|
82
|
+
`ARGUMENT_ERROR`, and `FATAL_ERROR`. Help uses exit code `0`; failures preserve
|
|
83
|
+
a non-zero process status equal to `exitCode`. Failure messages are public and
|
|
84
|
+
redacted: they do not include stacks, absolute paths, raw argv, or internal
|
|
85
|
+
causes.
|
|
86
|
+
|
|
87
|
+
Command-control failures are unknown top-level commands or subcommands, missing
|
|
88
|
+
or invalid required CLI arguments/options rejected before valid dispatch, and
|
|
89
|
+
uncaught runtime exceptions. An uncaught exception uses the redacted
|
|
90
|
+
`FATAL_ERROR` control envelope. `sema.cli.control/v1` is never nested inside a
|
|
91
|
+
command result.
|
|
92
|
+
|
|
93
|
+
### Valid command results
|
|
94
|
+
|
|
95
|
+
In 3.0.0, every syntactically valid command invoked with `--json` emits exactly
|
|
96
|
+
one `sema.cli.result/v1` document on stdout with empty stderr:
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{
|
|
100
|
+
"schemaVersion": "sema.cli.result/v1",
|
|
101
|
+
"ok": true,
|
|
102
|
+
"kind": "SUCCESS",
|
|
103
|
+
"command": "resumo",
|
|
104
|
+
"code": "CLI_SUCCESS",
|
|
105
|
+
"message": null,
|
|
106
|
+
"exitCode": 0,
|
|
107
|
+
"payload": {
|
|
108
|
+
"comando": "resumo",
|
|
109
|
+
"sucesso": true
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
The result envelope contains exactly `schemaVersion`, `ok`, `kind`, `command`,
|
|
115
|
+
`code`, `message`, `exitCode`, and `payload`; extra or missing fields are
|
|
116
|
+
invalid, and `data` is not an alias for `payload`. `command` is the canonical
|
|
117
|
+
top-level command name. `payload` is always present and may be any JSON value,
|
|
118
|
+
including an object, array, scalar, or `null`.
|
|
119
|
+
|
|
120
|
+
- `SUCCESS` requires `ok: true`, `code: "CLI_SUCCESS"`, `message: null`, and
|
|
121
|
+
`exitCode: 0`.
|
|
122
|
+
- `DOMAIN_ERROR` requires `ok: false`, `code: "CLI_DOMAIN_ERROR"`, a non-empty
|
|
123
|
+
safe public `message`, and a positive `exitCode` equal to the process status.
|
|
124
|
+
|
|
125
|
+
The envelope describes the CLI result transport and classification. It does
|
|
126
|
+
not replace the command's domain model: consumers must unwrap `payload` and
|
|
127
|
+
evaluate fields such as `payload.sucesso`, `payload.aprovado`,
|
|
128
|
+
`payload.bloqueado`, or another command-specific verdict separately. A
|
|
129
|
+
syntactically valid operation that returns a structured domain failure uses
|
|
130
|
+
`DOMAIN_ERROR`; it does not fall back to `sema.cli.control/v1`.
|
|
131
|
+
|
|
26
132
|
## Codex Setup
|
|
27
133
|
|
|
28
134
|
`AGENTS.md` is the official Sema entrypoint for Codex. Create or refresh it from
|
|
@@ -42,22 +148,24 @@ code, contracts, workflows, release scripts, or operational docs:
|
|
|
42
148
|
|
|
43
149
|
```bash
|
|
44
150
|
sema --version
|
|
45
|
-
sema resumo
|
|
151
|
+
sema resumo --drift none
|
|
46
152
|
sema docs-impacto --intencao "describe the change" --json
|
|
47
|
-
sema inspecionar contratos/example.sema --json
|
|
48
|
-
sema drift contratos/example.sema --escopo modulo --json
|
|
153
|
+
sema inspecionar contratos/example.sema --drift none --json
|
|
154
|
+
sema drift contratos/example.sema --escopo modulo --cache fresh --json
|
|
49
155
|
sema impacto contratos/example.sema --alvo sema.example.target --mudanca "describe the change" --json
|
|
50
156
|
```
|
|
51
157
|
|
|
52
158
|
Commands run directly against the local workspace. If `sema --version` fails,
|
|
53
|
-
|
|
159
|
+
try the managed absolute launcher before declaring the CLI unavailable. If both
|
|
160
|
+
fail, install or repair the npm package; there is no separate authorization
|
|
161
|
+
gate.
|
|
54
162
|
|
|
55
163
|
## Core Commands
|
|
56
164
|
|
|
57
165
|
- `sema iniciar`: create a governed starting point.
|
|
58
166
|
- `sema validar`: validate `.sema` contracts.
|
|
59
|
-
- `sema inspecionar`: inspect the applicable contract surface.
|
|
60
|
-
- `sema drift`: compare contracts and implementation.
|
|
167
|
+
- `sema inspecionar`: inspect the applicable contract surface; add `--drift cache|fresh` to request code evidence.
|
|
168
|
+
- `sema drift`: compare contracts and implementation with `--cache none|cache|fresh` (default `fresh`).
|
|
61
169
|
- `sema impacto`: map the blast radius of a planned change.
|
|
62
170
|
- `sema docs-impacto`: identify docs that must be read or updated.
|
|
63
171
|
- `sema finalizar-mudanca`: close the governed change with evidence.
|
|
@@ -66,6 +174,16 @@ install or repair the npm package; there is no separate authorization gate.
|
|
|
66
174
|
- `sema verificar`: run the final local verification bundle.
|
|
67
175
|
- `sema contexto-ia`: build local AI context from a contract.
|
|
68
176
|
- `sema sync-codex`: create or refresh the official `AGENTS.md` entrypoint.
|
|
177
|
+
- `sema skill status|sync`: inspect or repair the managed launcher and bundled
|
|
178
|
+
global skill without touching plugin caches or workspace files.
|
|
179
|
+
|
|
180
|
+
`resumo` and `inspecionar` default to `--drift none`, so they do not fabricate
|
|
181
|
+
scores or implementation evidence. In this mode those fields inside `payload`
|
|
182
|
+
are `null` or explicitly not evaluated. `sema drift --cache none` still runs
|
|
183
|
+
the analysis but does not touch persistent cache. `cache` reuses only a validated extraction hit;
|
|
184
|
+
`fresh` ignores hits and republishes recalculated extraction data. Cache objects
|
|
185
|
+
live in the operating system's user-cache directory outside the workspace, and
|
|
186
|
+
the final links, diagnostics, score, and success decision are always recomputed.
|
|
69
187
|
|
|
70
188
|
Generation targets are `typescript`, `python`, `php`, `dart`, `lua`,
|
|
71
189
|
`javascript`, `html`, `css`, `dotnet`, and `cpp`. The aliases `cs` and
|