@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.
- package/LICENSE +39 -39
- package/README.md +112 -41
- package/dist/agentContextPack.js +14 -10
- package/dist/agentEntryPoints.d.ts +5 -0
- package/dist/agentEntryPoints.js +102 -91
- package/dist/angular-consumer-standalone.d.ts +3 -1
- package/dist/angular-consumer-standalone.js +12 -8
- 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 +34 -2
- package/dist/drift.part01.js +3 -0
- package/dist/drift.part04.d.ts +12 -2
- package/dist/drift.part04.js +89 -15
- package/dist/drift.part05.d.ts +2 -1
- package/dist/drift.part05.js +9 -6
- package/dist/drift.part06.d.ts +2 -1
- package/dist/drift.part06.js +115 -24
- package/dist/drift.part07.d.ts +11 -10
- package/dist/drift.part07.js +261 -255
- package/dist/drift.part08.d.ts +2 -1
- package/dist/drift.part08.js +35 -25
- package/dist/drift.part11.js +279 -32
- package/dist/drift.part12.d.ts +1 -1
- package/dist/drift.part12.js +196 -11
- package/dist/drift.part13.d.ts +18 -2
- package/dist/drift.part13.js +654 -76
- 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 +65 -0
- package/dist/driftCatalogo.js +516 -0
- package/dist/driftEscopo.d.ts +21 -0
- package/dist/driftEscopo.js +647 -0
- package/dist/driftEscopoReferencias.d.ts +8 -0
- package/dist/driftEscopoReferencias.js +612 -0
- package/dist/driftOrcamento.d.ts +6 -0
- package/dist/driftOrcamento.js +20 -3
- package/dist/geracaoCore.js +4 -6
- package/dist/iaPrompts.d.ts +3 -3
- package/dist/iaPrompts.js +13 -14
- package/dist/index.d.ts +4 -1
- package/dist/index.js +6 -25
- package/dist/index.part01.d.ts +21 -14
- package/dist/index.part01.js +20 -165
- package/dist/index.part02.js +57 -43
- package/dist/index.part03.d.ts +23 -1
- package/dist/index.part03.js +83 -8
- package/dist/index.part04.d.ts +10 -2
- package/dist/index.part04.js +48 -14
- package/dist/index.part05.d.ts +1 -1
- package/dist/index.part05.js +109 -30
- package/dist/index.part06.js +34 -16
- package/dist/index.part07.js +31 -27
- package/dist/index.part08.d.ts +1 -1
- package/dist/index.part08.js +23 -28
- package/dist/init/templates.part01.js +393 -393
- package/dist/init/templates.part02.js +189 -189
- package/dist/initCommand.js +5 -1
- package/dist/initTemplatesBackend.js +73 -73
- package/dist/initTemplatesBase.js +7 -5
- package/dist/initTemplatesFlutter.js +137 -137
- package/dist/initTemplatesRuntime.js +350 -350
- package/dist/initTemplatesWeb.js +309 -309
- package/dist/pipelineConteudo/command.d.ts +1 -0
- package/dist/pipelineConteudo/command.js +4 -32
- 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/projeto.d.ts +1 -1
- package/dist/projetoCarregar.d.ts +2 -2
- package/dist/projetoCarregar.js +69 -28
- package/dist/projetoCatalogo.d.ts +8 -0
- package/dist/projetoCatalogo.js +164 -0
- package/dist/projetoOrigens.d.ts +2 -0
- package/dist/projetoOrigens.js +65 -9
- package/dist/projetoTipos.d.ts +15 -5
- 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/dist/sync/index.js +35 -35
- package/docs/README.md +11 -7
- package/docs/ai-integration.md +18 -11
- package/docs/ai-onboarding.md +81 -62
- package/docs/ai-workflow.md +10 -4
- package/docs/auth.md +26 -26
- package/docs/cli.md +197 -79
- package/docs/commands.md +30 -6
- package/docs/database.md +15 -15
- package/docs/deploy.md +54 -41
- package/docs/documentation.md +11 -10
- package/docs/drift-cache.md +108 -0
- package/docs/env.md +16 -16
- package/docs/frontend.md +41 -41
- package/docs/getting-started.md +82 -57
- package/docs/i18n.md +15 -15
- package/docs/repositories.md +60 -43
- package/docs/rollback.md +38 -31
- package/docs/security.md +54 -32
- package/docs/sistemas-interativos.md +27 -27
- package/docs/support.md +8 -8
- package/docs/testing.md +123 -17
- package/docs/vocabulary.md +29 -29
- package/exemplos/agendamento.sema +1 -1
- package/exemplos/assinatura.sema +1 -1
- package/exemplos/auditoria.sema +1 -1
- package/exemplos/autenticacao.sema +1 -1
- package/exemplos/author_obra_comum.sema +1 -1
- package/exemplos/author_tema_sensivel.sema +1 -1
- package/exemplos/automacao.sema +1 -1
- package/exemplos/cadastro_usuario.sema +1 -1
- package/exemplos/calculadora.sema +1 -1
- package/exemplos/crud_simples.sema +1 -1
- package/exemplos/estoque.sema +1 -1
- package/exemplos/exportacao.sema +1 -1
- package/exemplos/fila.sema +1 -1
- package/exemplos/integracao_externa.sema +1 -1
- package/exemplos/multi_tenant.sema +1 -1
- package/exemplos/notificacao.sema +1 -1
- package/exemplos/operacao_estrategia.sema +132 -132
- package/exemplos/operacao_estrategia_discovery.sema +220 -220
- package/exemplos/operacao_estrategia_fluxo.sema +114 -114
- package/exemplos/operacao_estrategia_gates.sema +106 -106
- package/exemplos/operacao_estrategia_quarentena.sema +133 -133
- package/exemplos/operacao_estrategia_rollout.sema +124 -124
- package/exemplos/pagamento.sema +1 -1
- package/exemplos/pagamento_dominio.sema +1 -1
- package/exemplos/pedido.sema +1 -1
- package/exemplos/permissao.sema +1 -1
- package/exemplos/persistencia_vendor_first.sema +1 -1
- package/exemplos/profile_conversas.sema +165 -165
- package/exemplos/profile_game.sema +1 -1
- package/exemplos/profile_legal.sema +1 -1
- package/exemplos/profile_ops.sema +1 -1
- package/exemplos/profile_research.sema +1 -1
- package/exemplos/profile_software.sema +1 -1
- package/exemplos/profile_workflow_n8n.sema +1 -1
- package/exemplos/relatorio.sema +1 -1
- package/exemplos/replica_analitica_erp.sema +1 -1
- package/exemplos/testes_embutidos.sema +1 -1
- package/exemplos/tratamento_erro.sema +1 -1
- package/exemplos/upload_arquivo.sema +1 -1
- package/exemplos/webhook.sema +1 -1
- package/node_modules/@sema/gerador-cpp/dist/index.js +176 -176
- package/node_modules/@sema/gerador-css/dist/index.part01.js +10 -10
- package/node_modules/@sema/gerador-css/dist/index.part02.js +460 -460
- package/node_modules/@sema/gerador-dotnet/dist/index.js +169 -169
- package/node_modules/@sema/gerador-html/dist/index.js +17 -17
- package/node_modules/@sema/gerador-python/dist/index.part02.js +3 -3
- package/node_modules/@sema/gerador-typescript/dist/index.part02.js +11 -11
- package/node_modules/@sema/nucleo/dist/diagnosticos/melhorador.js +42 -42
- 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 +7 -2
- package/scripts/postinstall.mjs +148 -0
- package/skills/sema/SKILL.md +199 -0
- package/skills/sema/agents/openai.yaml +4 -0
- 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
|
@@ -1,220 +1,220 @@
|
|
|
1
|
-
module exemplos.operacao_estrategia.discovery {
|
|
2
|
-
docs {
|
|
3
|
-
resumo: "Tasks oficiais de discovery semanal e avaliacao de slice apos discovery."
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
type JanelaDiscovery {
|
|
7
|
-
fields {
|
|
8
|
-
semana_referencia: Data
|
|
9
|
-
strategy_id: Id
|
|
10
|
-
versao_modelo_candidata: Texto
|
|
11
|
-
status_discovery: StatusDiscovery
|
|
12
|
-
}
|
|
13
|
-
invariants {
|
|
14
|
-
semana_referencia existe
|
|
15
|
-
strategy_id existe
|
|
16
|
-
versao_modelo_candidata existe
|
|
17
|
-
status_discovery em [ABERTA, EM_AVALIACAO, APROVADA, REJEITADA]
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
enum StatusSlice {
|
|
22
|
-
ATIVO,
|
|
23
|
-
QUARENTENA,
|
|
24
|
-
DESLIGADO
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
enum StatusGate {
|
|
28
|
-
ABERTO,
|
|
29
|
-
FECHADO
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
enum StatusDiscovery {
|
|
33
|
-
ABERTA,
|
|
34
|
-
EM_AVALIACAO,
|
|
35
|
-
APROVADA,
|
|
36
|
-
REJEITADA
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
task registrar_discovery_semanal {
|
|
40
|
-
docs {
|
|
41
|
-
resumo: "Abre a janela semanal de discovery para uma strategy e marca a versao candidata que esta entrando em avaliacao."
|
|
42
|
-
}
|
|
43
|
-
input {
|
|
44
|
-
strategy_id: Id required
|
|
45
|
-
semana_referencia: Data required
|
|
46
|
-
versao_modelo_candidata: Texto required
|
|
47
|
-
}
|
|
48
|
-
output {
|
|
49
|
-
janela: JanelaDiscovery
|
|
50
|
-
discovery_registrada: Booleano
|
|
51
|
-
}
|
|
52
|
-
authz {
|
|
53
|
-
escopo: strategy.discovery.operar
|
|
54
|
-
tenant: obrigatorio
|
|
55
|
-
}
|
|
56
|
-
dados {
|
|
57
|
-
classificacao_padrao: interno
|
|
58
|
-
redacao_log: obrigatoria
|
|
59
|
-
input {
|
|
60
|
-
strategy_id: interno
|
|
61
|
-
semana_referencia: interno
|
|
62
|
-
versao_modelo_candidata: interno
|
|
63
|
-
}
|
|
64
|
-
output {
|
|
65
|
-
janela: interno
|
|
66
|
-
discovery_registrada: interno
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
audit {
|
|
70
|
-
evento: strategy.discovery.aberta
|
|
71
|
-
ator: sistema.strategy
|
|
72
|
-
correlacao: request_id
|
|
73
|
-
retencao: "180d"
|
|
74
|
-
motivo: obrigatorio
|
|
75
|
-
}
|
|
76
|
-
forbidden {
|
|
77
|
-
shell.exec
|
|
78
|
-
log.segredo
|
|
79
|
-
retorno.credencial
|
|
80
|
-
}
|
|
81
|
-
rules {
|
|
82
|
-
strategy_id existe
|
|
83
|
-
semana_referencia existe
|
|
84
|
-
versao_modelo_candidata existe
|
|
85
|
-
}
|
|
86
|
-
effects {
|
|
87
|
-
persistencia discovery_semanal criticidade = alta
|
|
88
|
-
auditoria strategy criticidade = alta
|
|
89
|
-
evento discovery_aberta criticidade = media
|
|
90
|
-
}
|
|
91
|
-
vinculos {
|
|
92
|
-
tabela: discovery_semanal
|
|
93
|
-
recurso: strategy_registry
|
|
94
|
-
evento: discovery_aberta
|
|
95
|
-
}
|
|
96
|
-
execucao {
|
|
97
|
-
idempotencia: verdadeiro
|
|
98
|
-
timeout: "10s"
|
|
99
|
-
retry: "nenhum"
|
|
100
|
-
compensacao: "fechar_janela_discovery_inconsistente"
|
|
101
|
-
criticidade_operacional: alta
|
|
102
|
-
}
|
|
103
|
-
guarantees {
|
|
104
|
-
janela existe
|
|
105
|
-
discovery_registrada == verdadeiro
|
|
106
|
-
}
|
|
107
|
-
tests {
|
|
108
|
-
caso "abre discovery da semana" {
|
|
109
|
-
given {
|
|
110
|
-
strategy_id: "strategy_alpha"
|
|
111
|
-
semana_referencia: "2026-03-30"
|
|
112
|
-
versao_modelo_candidata: "modelo_2026_13"
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
expect {
|
|
116
|
-
sucesso: verdadeiro
|
|
117
|
-
discovery_registrada: verdadeiro
|
|
118
|
-
janela: "janela_strategy_alpha_2026_13"
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
task avaliar_slice_apos_discovery {
|
|
125
|
-
docs {
|
|
126
|
-
resumo: "Decide se um slice segue aberto,entra em quarentena ou precisa ficar bloqueado ate nova avaliacao."
|
|
127
|
-
}
|
|
128
|
-
input {
|
|
129
|
-
strategy_id: Id required
|
|
130
|
-
slice_id: Id required
|
|
131
|
-
precision_observada: Decimal required
|
|
132
|
-
precision_minima: Decimal required
|
|
133
|
-
risco_operacional: Texto required
|
|
134
|
-
}
|
|
135
|
-
output {
|
|
136
|
-
gate_slice: StatusGate
|
|
137
|
-
slice_status: StatusSlice
|
|
138
|
-
motivo_operacional: Texto
|
|
139
|
-
}
|
|
140
|
-
authz {
|
|
141
|
-
escopo: strategy.slice.avaliar
|
|
142
|
-
tenant: obrigatorio
|
|
143
|
-
}
|
|
144
|
-
dados {
|
|
145
|
-
classificacao_padrao: interno
|
|
146
|
-
redacao_log: obrigatoria
|
|
147
|
-
input {
|
|
148
|
-
strategy_id: interno
|
|
149
|
-
slice_id: interno
|
|
150
|
-
precision_observada: interno
|
|
151
|
-
precision_minima: interno
|
|
152
|
-
risco_operacional: interno
|
|
153
|
-
}
|
|
154
|
-
output {
|
|
155
|
-
gate_slice: interno
|
|
156
|
-
slice_status: interno
|
|
157
|
-
motivo_operacional: interno
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
audit {
|
|
161
|
-
evento: strategy.slice.avaliado
|
|
162
|
-
ator: sistema.strategy
|
|
163
|
-
correlacao: request_id
|
|
164
|
-
retencao: "180d"
|
|
165
|
-
motivo: obrigatorio
|
|
166
|
-
}
|
|
167
|
-
forbidden {
|
|
168
|
-
shell.exec
|
|
169
|
-
log.segredo
|
|
170
|
-
retorno.credencial
|
|
171
|
-
}
|
|
172
|
-
rules {
|
|
173
|
-
strategy_id existe
|
|
174
|
-
slice_id existe
|
|
175
|
-
precision_observada existe
|
|
176
|
-
precision_minima existe
|
|
177
|
-
risco_operacional existe
|
|
178
|
-
}
|
|
179
|
-
effects {
|
|
180
|
-
persistencia slice criticidade = alta
|
|
181
|
-
auditoria discovery_slice criticidade = alta
|
|
182
|
-
notificacao operacao criticidade = media
|
|
183
|
-
}
|
|
184
|
-
vinculos {
|
|
185
|
-
tabela: slice
|
|
186
|
-
recurso: strategy_registry
|
|
187
|
-
evento: discovery_slice_avaliado
|
|
188
|
-
}
|
|
189
|
-
execucao {
|
|
190
|
-
idempotencia: verdadeiro
|
|
191
|
-
timeout: "10s"
|
|
192
|
-
retry: "nenhum"
|
|
193
|
-
compensacao: "manter_gate_slice_fechado_ate_reavaliacao"
|
|
194
|
-
criticidade_operacional: alta
|
|
195
|
-
}
|
|
196
|
-
guarantees {
|
|
197
|
-
gate_slice existe
|
|
198
|
-
slice_status existe
|
|
199
|
-
motivo_operacional existe
|
|
200
|
-
}
|
|
201
|
-
tests {
|
|
202
|
-
caso "slice ruim fecha gate na avaliacao" {
|
|
203
|
-
given {
|
|
204
|
-
strategy_id: "strategy_alpha"
|
|
205
|
-
slice_id: "slice_under35_serie_a"
|
|
206
|
-
precision_observada: 0.49
|
|
207
|
-
precision_minima: 0.58
|
|
208
|
-
risco_operacional: "drawdown_excessivo"
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
expect {
|
|
212
|
-
sucesso: verdadeiro
|
|
213
|
-
gate_slice: "FECHADO"
|
|
214
|
-
slice_status: "QUARENTENA"
|
|
215
|
-
motivo_operacional: "drawdown_excessivo"
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
}
|
|
1
|
+
module exemplos.operacao_estrategia.discovery {
|
|
2
|
+
docs {
|
|
3
|
+
resumo: "Tasks oficiais de discovery semanal e avaliacao de slice apos discovery."
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
type JanelaDiscovery {
|
|
7
|
+
fields {
|
|
8
|
+
semana_referencia: Data
|
|
9
|
+
strategy_id: Id
|
|
10
|
+
versao_modelo_candidata: Texto
|
|
11
|
+
status_discovery: StatusDiscovery
|
|
12
|
+
}
|
|
13
|
+
invariants {
|
|
14
|
+
semana_referencia existe
|
|
15
|
+
strategy_id existe
|
|
16
|
+
versao_modelo_candidata existe
|
|
17
|
+
status_discovery em [ABERTA, EM_AVALIACAO, APROVADA, REJEITADA]
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
enum StatusSlice {
|
|
22
|
+
ATIVO,
|
|
23
|
+
QUARENTENA,
|
|
24
|
+
DESLIGADO
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
enum StatusGate {
|
|
28
|
+
ABERTO,
|
|
29
|
+
FECHADO
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
enum StatusDiscovery {
|
|
33
|
+
ABERTA,
|
|
34
|
+
EM_AVALIACAO,
|
|
35
|
+
APROVADA,
|
|
36
|
+
REJEITADA
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
task registrar_discovery_semanal {
|
|
40
|
+
docs {
|
|
41
|
+
resumo: "Abre a janela semanal de discovery para uma strategy e marca a versao candidata que esta entrando em avaliacao."
|
|
42
|
+
}
|
|
43
|
+
input {
|
|
44
|
+
strategy_id: Id required
|
|
45
|
+
semana_referencia: Data required
|
|
46
|
+
versao_modelo_candidata: Texto required
|
|
47
|
+
}
|
|
48
|
+
output {
|
|
49
|
+
janela: JanelaDiscovery
|
|
50
|
+
discovery_registrada: Booleano
|
|
51
|
+
}
|
|
52
|
+
authz {
|
|
53
|
+
escopo: strategy.discovery.operar
|
|
54
|
+
tenant: obrigatorio
|
|
55
|
+
}
|
|
56
|
+
dados {
|
|
57
|
+
classificacao_padrao: interno
|
|
58
|
+
redacao_log: obrigatoria
|
|
59
|
+
input {
|
|
60
|
+
strategy_id: interno
|
|
61
|
+
semana_referencia: interno
|
|
62
|
+
versao_modelo_candidata: interno
|
|
63
|
+
}
|
|
64
|
+
output {
|
|
65
|
+
janela: interno
|
|
66
|
+
discovery_registrada: interno
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
audit {
|
|
70
|
+
evento: strategy.discovery.aberta
|
|
71
|
+
ator: sistema.strategy
|
|
72
|
+
correlacao: request_id
|
|
73
|
+
retencao: "180d"
|
|
74
|
+
motivo: obrigatorio
|
|
75
|
+
}
|
|
76
|
+
forbidden {
|
|
77
|
+
shell.exec
|
|
78
|
+
log.segredo
|
|
79
|
+
retorno.credencial
|
|
80
|
+
}
|
|
81
|
+
rules {
|
|
82
|
+
strategy_id existe
|
|
83
|
+
semana_referencia existe
|
|
84
|
+
versao_modelo_candidata existe
|
|
85
|
+
}
|
|
86
|
+
effects {
|
|
87
|
+
persistencia discovery_semanal criticidade = alta
|
|
88
|
+
auditoria strategy criticidade = alta
|
|
89
|
+
evento discovery_aberta criticidade = media
|
|
90
|
+
}
|
|
91
|
+
vinculos {
|
|
92
|
+
tabela: discovery_semanal
|
|
93
|
+
recurso: strategy_registry
|
|
94
|
+
evento: discovery_aberta
|
|
95
|
+
}
|
|
96
|
+
execucao {
|
|
97
|
+
idempotencia: verdadeiro
|
|
98
|
+
timeout: "10s"
|
|
99
|
+
retry: "nenhum"
|
|
100
|
+
compensacao: "fechar_janela_discovery_inconsistente"
|
|
101
|
+
criticidade_operacional: alta
|
|
102
|
+
}
|
|
103
|
+
guarantees {
|
|
104
|
+
janela existe
|
|
105
|
+
discovery_registrada == verdadeiro
|
|
106
|
+
}
|
|
107
|
+
tests {
|
|
108
|
+
caso "abre discovery da semana" {
|
|
109
|
+
given {
|
|
110
|
+
strategy_id: "strategy_alpha"
|
|
111
|
+
semana_referencia: "2026-03-30"
|
|
112
|
+
versao_modelo_candidata: "modelo_2026_13"
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
expect {
|
|
116
|
+
sucesso: verdadeiro
|
|
117
|
+
discovery_registrada: verdadeiro
|
|
118
|
+
janela: "janela_strategy_alpha_2026_13"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
task avaliar_slice_apos_discovery {
|
|
125
|
+
docs {
|
|
126
|
+
resumo: "Decide se um slice segue aberto,entra em quarentena ou precisa ficar bloqueado ate nova avaliacao."
|
|
127
|
+
}
|
|
128
|
+
input {
|
|
129
|
+
strategy_id: Id required
|
|
130
|
+
slice_id: Id required
|
|
131
|
+
precision_observada: Decimal required
|
|
132
|
+
precision_minima: Decimal required
|
|
133
|
+
risco_operacional: Texto required
|
|
134
|
+
}
|
|
135
|
+
output {
|
|
136
|
+
gate_slice: StatusGate
|
|
137
|
+
slice_status: StatusSlice
|
|
138
|
+
motivo_operacional: Texto
|
|
139
|
+
}
|
|
140
|
+
authz {
|
|
141
|
+
escopo: strategy.slice.avaliar
|
|
142
|
+
tenant: obrigatorio
|
|
143
|
+
}
|
|
144
|
+
dados {
|
|
145
|
+
classificacao_padrao: interno
|
|
146
|
+
redacao_log: obrigatoria
|
|
147
|
+
input {
|
|
148
|
+
strategy_id: interno
|
|
149
|
+
slice_id: interno
|
|
150
|
+
precision_observada: interno
|
|
151
|
+
precision_minima: interno
|
|
152
|
+
risco_operacional: interno
|
|
153
|
+
}
|
|
154
|
+
output {
|
|
155
|
+
gate_slice: interno
|
|
156
|
+
slice_status: interno
|
|
157
|
+
motivo_operacional: interno
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
audit {
|
|
161
|
+
evento: strategy.slice.avaliado
|
|
162
|
+
ator: sistema.strategy
|
|
163
|
+
correlacao: request_id
|
|
164
|
+
retencao: "180d"
|
|
165
|
+
motivo: obrigatorio
|
|
166
|
+
}
|
|
167
|
+
forbidden {
|
|
168
|
+
shell.exec
|
|
169
|
+
log.segredo
|
|
170
|
+
retorno.credencial
|
|
171
|
+
}
|
|
172
|
+
rules {
|
|
173
|
+
strategy_id existe
|
|
174
|
+
slice_id existe
|
|
175
|
+
precision_observada existe
|
|
176
|
+
precision_minima existe
|
|
177
|
+
risco_operacional existe
|
|
178
|
+
}
|
|
179
|
+
effects {
|
|
180
|
+
persistencia slice criticidade = alta
|
|
181
|
+
auditoria discovery_slice criticidade = alta
|
|
182
|
+
notificacao operacao criticidade = media
|
|
183
|
+
}
|
|
184
|
+
vinculos {
|
|
185
|
+
tabela: slice
|
|
186
|
+
recurso: strategy_registry
|
|
187
|
+
evento: discovery_slice_avaliado
|
|
188
|
+
}
|
|
189
|
+
execucao {
|
|
190
|
+
idempotencia: verdadeiro
|
|
191
|
+
timeout: "10s"
|
|
192
|
+
retry: "nenhum"
|
|
193
|
+
compensacao: "manter_gate_slice_fechado_ate_reavaliacao"
|
|
194
|
+
criticidade_operacional: alta
|
|
195
|
+
}
|
|
196
|
+
guarantees {
|
|
197
|
+
gate_slice existe
|
|
198
|
+
slice_status existe
|
|
199
|
+
motivo_operacional existe
|
|
200
|
+
}
|
|
201
|
+
tests {
|
|
202
|
+
caso "slice ruim fecha gate na avaliacao" {
|
|
203
|
+
given {
|
|
204
|
+
strategy_id: "strategy_alpha"
|
|
205
|
+
slice_id: "slice_under35_serie_a"
|
|
206
|
+
precision_observada: 0.49
|
|
207
|
+
precision_minima: 0.58
|
|
208
|
+
risco_operacional: "drawdown_excessivo"
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
expect {
|
|
212
|
+
sucesso: verdadeiro
|
|
213
|
+
gate_slice: "FECHADO"
|
|
214
|
+
slice_status: "QUARENTENA"
|
|
215
|
+
motivo_operacional: "drawdown_excessivo"
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
@@ -1,114 +1,114 @@
|
|
|
1
|
-
module exemplos.operacao_estrategia.fluxo {
|
|
2
|
-
docs {
|
|
3
|
-
resumo: "Flow oficial de governanca operacional com stubs curtos para manter a orquestracao validavel sem virar contrato monolitico."
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
enum StatusStrategy {
|
|
7
|
-
RASCUNHO,
|
|
8
|
-
ATIVA,
|
|
9
|
-
QUARENTENA,
|
|
10
|
-
DESATIVADA
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
enum StatusGate {
|
|
14
|
-
ABERTO,
|
|
15
|
-
FECHADO
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
task registrar_discovery_semanal {
|
|
19
|
-
input {
|
|
20
|
-
strategy_id: Id required
|
|
21
|
-
semana_referencia: Data required
|
|
22
|
-
versao_modelo_candidata: Texto required
|
|
23
|
-
}
|
|
24
|
-
output {
|
|
25
|
-
discovery_registrada: Booleano
|
|
26
|
-
}
|
|
27
|
-
guarantees {
|
|
28
|
-
discovery_registrada existe
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
task avaliar_slice_apos_discovery {
|
|
33
|
-
input {
|
|
34
|
-
strategy_id: Id required
|
|
35
|
-
slice_id: Id required
|
|
36
|
-
precision_observada: Decimal required
|
|
37
|
-
precision_minima: Decimal required
|
|
38
|
-
risco_operacional: Texto required
|
|
39
|
-
}
|
|
40
|
-
output {
|
|
41
|
-
motivo_operacional: Texto
|
|
42
|
-
}
|
|
43
|
-
guarantees {
|
|
44
|
-
motivo_operacional existe
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
task colocar_slice_em_quarentena {
|
|
49
|
-
input {
|
|
50
|
-
strategy_id: Id required
|
|
51
|
-
slice_id: Id required
|
|
52
|
-
motivo: Texto required
|
|
53
|
-
origem: Texto required
|
|
54
|
-
data_referencia: Data required
|
|
55
|
-
}
|
|
56
|
-
output {
|
|
57
|
-
gate_slice: StatusGate
|
|
58
|
-
}
|
|
59
|
-
guarantees {
|
|
60
|
-
gate_slice existe
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
task fechar_gate_global_strategy {
|
|
65
|
-
input {
|
|
66
|
-
strategy_id: Id required
|
|
67
|
-
motivo_operacional: Texto required
|
|
68
|
-
versao_modelo_ativa: Texto required
|
|
69
|
-
}
|
|
70
|
-
output {
|
|
71
|
-
gate_global: StatusGate
|
|
72
|
-
}
|
|
73
|
-
guarantees {
|
|
74
|
-
gate_global existe
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
task ativar_strategy_com_nova_versao {
|
|
79
|
-
input {
|
|
80
|
-
strategy_id: Id required
|
|
81
|
-
versao_modelo_ativa: Texto required
|
|
82
|
-
versao_modelo_candidata: Texto required
|
|
83
|
-
strategy_status_atual: StatusStrategy required
|
|
84
|
-
gate_global_atual: StatusGate required
|
|
85
|
-
aprovacao_manual: Booleano required
|
|
86
|
-
}
|
|
87
|
-
output {
|
|
88
|
-
strategy_status: StatusStrategy
|
|
89
|
-
}
|
|
90
|
-
guarantees {
|
|
91
|
-
strategy_status existe
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
flow governanca_operacional {
|
|
96
|
-
strategy_id: Id
|
|
97
|
-
slice_id: Id
|
|
98
|
-
semana_referencia: Data
|
|
99
|
-
versao_modelo_ativa: Texto
|
|
100
|
-
versao_modelo_candidata: Texto
|
|
101
|
-
precision_observada: Decimal
|
|
102
|
-
precision_minima: Decimal
|
|
103
|
-
risco_operacional: Texto
|
|
104
|
-
motivo_operacional: Texto
|
|
105
|
-
strategy_status_atual: StatusStrategy
|
|
106
|
-
gate_global_atual: StatusGate
|
|
107
|
-
aprovacao_manual: Booleano
|
|
108
|
-
etapa discovery usa registrar_discovery_semanal com strategy_id = strategy_id, semana_referencia = semana_referencia, versao_modelo_candidata = versao_modelo_candidata
|
|
109
|
-
etapa avaliar_slice usa avaliar_slice_apos_discovery com strategy_id = strategy_id, slice_id = slice_id, precision_observada = precision_observada, precision_minima = precision_minima, risco_operacional = risco_operacional depende_de discovery
|
|
110
|
-
etapa quarentena_slice usa colocar_slice_em_quarentena com strategy_id = strategy_id, slice_id = slice_id, motivo = motivo_operacional, origem = risco_operacional, data_referencia = semana_referencia quando motivo_operacional existe depende_de avaliar_slice
|
|
111
|
-
etapa fechar_gate_global usa fechar_gate_global_strategy com strategy_id = strategy_id, motivo_operacional = motivo_operacional, versao_modelo_ativa = versao_modelo_ativa quando motivo_operacional existe depende_de quarentena_slice
|
|
112
|
-
etapa reativacao usa ativar_strategy_com_nova_versao com strategy_id = strategy_id, versao_modelo_ativa = versao_modelo_ativa, versao_modelo_candidata = versao_modelo_candidata, strategy_status_atual = strategy_status_atual, gate_global_atual = gate_global_atual, aprovacao_manual = aprovacao_manual quando aprovacao_manual == verdadeiro depende_de fechar_gate_global
|
|
113
|
-
}
|
|
114
|
-
}
|
|
1
|
+
module exemplos.operacao_estrategia.fluxo {
|
|
2
|
+
docs {
|
|
3
|
+
resumo: "Flow oficial de governanca operacional com stubs curtos para manter a orquestracao validavel sem virar contrato monolitico."
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
enum StatusStrategy {
|
|
7
|
+
RASCUNHO,
|
|
8
|
+
ATIVA,
|
|
9
|
+
QUARENTENA,
|
|
10
|
+
DESATIVADA
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
enum StatusGate {
|
|
14
|
+
ABERTO,
|
|
15
|
+
FECHADO
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
task registrar_discovery_semanal {
|
|
19
|
+
input {
|
|
20
|
+
strategy_id: Id required
|
|
21
|
+
semana_referencia: Data required
|
|
22
|
+
versao_modelo_candidata: Texto required
|
|
23
|
+
}
|
|
24
|
+
output {
|
|
25
|
+
discovery_registrada: Booleano
|
|
26
|
+
}
|
|
27
|
+
guarantees {
|
|
28
|
+
discovery_registrada existe
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
task avaliar_slice_apos_discovery {
|
|
33
|
+
input {
|
|
34
|
+
strategy_id: Id required
|
|
35
|
+
slice_id: Id required
|
|
36
|
+
precision_observada: Decimal required
|
|
37
|
+
precision_minima: Decimal required
|
|
38
|
+
risco_operacional: Texto required
|
|
39
|
+
}
|
|
40
|
+
output {
|
|
41
|
+
motivo_operacional: Texto
|
|
42
|
+
}
|
|
43
|
+
guarantees {
|
|
44
|
+
motivo_operacional existe
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
task colocar_slice_em_quarentena {
|
|
49
|
+
input {
|
|
50
|
+
strategy_id: Id required
|
|
51
|
+
slice_id: Id required
|
|
52
|
+
motivo: Texto required
|
|
53
|
+
origem: Texto required
|
|
54
|
+
data_referencia: Data required
|
|
55
|
+
}
|
|
56
|
+
output {
|
|
57
|
+
gate_slice: StatusGate
|
|
58
|
+
}
|
|
59
|
+
guarantees {
|
|
60
|
+
gate_slice existe
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
task fechar_gate_global_strategy {
|
|
65
|
+
input {
|
|
66
|
+
strategy_id: Id required
|
|
67
|
+
motivo_operacional: Texto required
|
|
68
|
+
versao_modelo_ativa: Texto required
|
|
69
|
+
}
|
|
70
|
+
output {
|
|
71
|
+
gate_global: StatusGate
|
|
72
|
+
}
|
|
73
|
+
guarantees {
|
|
74
|
+
gate_global existe
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
task ativar_strategy_com_nova_versao {
|
|
79
|
+
input {
|
|
80
|
+
strategy_id: Id required
|
|
81
|
+
versao_modelo_ativa: Texto required
|
|
82
|
+
versao_modelo_candidata: Texto required
|
|
83
|
+
strategy_status_atual: StatusStrategy required
|
|
84
|
+
gate_global_atual: StatusGate required
|
|
85
|
+
aprovacao_manual: Booleano required
|
|
86
|
+
}
|
|
87
|
+
output {
|
|
88
|
+
strategy_status: StatusStrategy
|
|
89
|
+
}
|
|
90
|
+
guarantees {
|
|
91
|
+
strategy_status existe
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
flow governanca_operacional {
|
|
96
|
+
strategy_id: Id
|
|
97
|
+
slice_id: Id
|
|
98
|
+
semana_referencia: Data
|
|
99
|
+
versao_modelo_ativa: Texto
|
|
100
|
+
versao_modelo_candidata: Texto
|
|
101
|
+
precision_observada: Decimal
|
|
102
|
+
precision_minima: Decimal
|
|
103
|
+
risco_operacional: Texto
|
|
104
|
+
motivo_operacional: Texto
|
|
105
|
+
strategy_status_atual: StatusStrategy
|
|
106
|
+
gate_global_atual: StatusGate
|
|
107
|
+
aprovacao_manual: Booleano
|
|
108
|
+
etapa discovery usa registrar_discovery_semanal com strategy_id = strategy_id, semana_referencia = semana_referencia, versao_modelo_candidata = versao_modelo_candidata
|
|
109
|
+
etapa avaliar_slice usa avaliar_slice_apos_discovery com strategy_id = strategy_id, slice_id = slice_id, precision_observada = precision_observada, precision_minima = precision_minima, risco_operacional = risco_operacional depende_de discovery
|
|
110
|
+
etapa quarentena_slice usa colocar_slice_em_quarentena com strategy_id = strategy_id, slice_id = slice_id, motivo = motivo_operacional, origem = risco_operacional, data_referencia = semana_referencia quando motivo_operacional existe depende_de avaliar_slice
|
|
111
|
+
etapa fechar_gate_global usa fechar_gate_global_strategy com strategy_id = strategy_id, motivo_operacional = motivo_operacional, versao_modelo_ativa = versao_modelo_ativa quando motivo_operacional existe depende_de quarentena_slice
|
|
112
|
+
etapa reativacao usa ativar_strategy_com_nova_versao com strategy_id = strategy_id, versao_modelo_ativa = versao_modelo_ativa, versao_modelo_candidata = versao_modelo_candidata, strategy_status_atual = strategy_status_atual, gate_global_atual = gate_global_atual, aprovacao_manual = aprovacao_manual quando aprovacao_manual == verdadeiro depende_de fechar_gate_global
|
|
113
|
+
}
|
|
114
|
+
}
|