@semacode/cli 3.8.0 → 3.8.2
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 +119 -119
- package/dist/iaPrompts.js +11 -11
- package/dist/index.part02.js +21 -21
- package/dist/index.part07.js +24 -24
- package/dist/initCommand.js +1 -1
- package/dist/initTemplatesBase.js +84 -84
- package/dist/projetoOrigens.js +8 -2
- package/docs/README.md +15 -15
- package/docs/ai-onboarding.md +81 -81
- package/docs/cli.md +197 -197
- package/docs/deploy.md +54 -54
- package/docs/documentation.md +11 -11
- package/docs/drift-cache.md +108 -108
- package/docs/getting-started.md +82 -82
- package/docs/repositories.md +60 -60
- package/docs/rollback.md +38 -38
- package/docs/security.md +54 -54
- package/docs/sistemas-interativos.md +27 -27
- package/docs/support.md +8 -8
- package/docs/testing.md +123 -123
- package/docs/vocabulary.md +29 -29
- package/exemplos/express_crud.sema +139 -139
- package/exemplos/fastify_crud.sema +146 -146
- package/exemplos/koa_crud.sema +95 -95
- package/package.json +4 -4
- package/scripts/postinstall.mjs +148 -148
- package/skills/sema/SKILL.md +199 -199
package/docs/cli.md
CHANGED
|
@@ -1,197 +1,197 @@
|
|
|
1
|
-
# Sema CLI
|
|
2
|
-
|
|
3
|
-
Sema is a
|
|
4
|
-
workspace on the user's machine, validates `.sema` contracts, checks drift,
|
|
5
|
-
maps impact, and generates code without login, user authorization, license
|
|
6
|
-
activation, tokens, credits, billing services, a control panel, or external
|
|
7
|
-
service credentials.
|
|
8
|
-
|
|
9
|
-
Support: suporte@otimitare.
|
|
10
|
-
|
|
11
|
-
## Install
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
npm install -g @semacode/cli
|
|
15
|
-
sema --version
|
|
16
|
-
sema skill status --json
|
|
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
|
-
|
|
32
|
-
For development inside this repository:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
npm install
|
|
36
|
-
npm run build
|
|
37
|
-
node pacotes/cli/dist/bin.js --help
|
|
38
|
-
```
|
|
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
|
-
|
|
132
|
-
## Codex Setup
|
|
133
|
-
|
|
134
|
-
`AGENTS.md` is the official Sema entrypoint for Codex. Create or refresh it from
|
|
135
|
-
the local CLI:
|
|
136
|
-
|
|
137
|
-
```bash
|
|
138
|
-
sema sync-codex --json
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
Codex automatically loads `AGENTS.md` as repository guidance. Sema is an
|
|
142
|
-
independent product and is not affiliated with or endorsed by OpenAI.
|
|
143
|
-
|
|
144
|
-
## Required Local Flow
|
|
145
|
-
|
|
146
|
-
Codex and humans should use the same local sequence before changing governed
|
|
147
|
-
code, contracts, workflows, release scripts, or operational docs:
|
|
148
|
-
|
|
149
|
-
```bash
|
|
150
|
-
sema --version
|
|
151
|
-
sema resumo --drift none
|
|
152
|
-
sema docs-impacto --intencao "describe the change" --json
|
|
153
|
-
sema inspecionar contratos/example.sema --drift none --json
|
|
154
|
-
sema drift contratos/example.sema --escopo modulo --cache fresh --json
|
|
155
|
-
sema impacto contratos/example.sema --alvo sema.example.target --mudanca "describe the change" --json
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
Commands run directly against the local workspace. If `sema --version` fails,
|
|
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.
|
|
162
|
-
|
|
163
|
-
## Core Commands
|
|
164
|
-
|
|
165
|
-
- `sema iniciar`: create a governed starting point.
|
|
166
|
-
- `sema validar`: validate `.sema` contracts.
|
|
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`).
|
|
169
|
-
- `sema impacto`: map the blast radius of a planned change.
|
|
170
|
-
- `sema docs-impacto`: identify docs that must be read or updated.
|
|
171
|
-
- `sema finalizar-mudanca`: close the governed change with evidence.
|
|
172
|
-
- `sema compilar`: generate code from contracts.
|
|
173
|
-
- `sema testar`: generate, compile, and execute local contract tests, including `dotnet` and `cpp`.
|
|
174
|
-
- `sema verificar`: run the final local verification bundle.
|
|
175
|
-
- `sema contexto-ia`: build local AI context from a contract.
|
|
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.
|
|
187
|
-
|
|
188
|
-
Generation targets are `typescript`, `python`, `php`, `dart`, `lua`,
|
|
189
|
-
`javascript`, `html`, `css`, `dotnet`, and `cpp`. The aliases `cs` and
|
|
190
|
-
`csharp` select `dotnet`; `c++`, `cxx`, and `cc` select `cpp`.
|
|
191
|
-
Native targets are opt-in in `sema.config.json.alvos` for project-wide
|
|
192
|
-
verification because they require local compiler toolchains.
|
|
193
|
-
|
|
194
|
-
## Public Boundary
|
|
195
|
-
|
|
196
|
-
Do not publish private or sensitive operational material in public Sema
|
|
197
|
-
artifacts.
|
|
1
|
+
# Sema CLI
|
|
2
|
+
|
|
3
|
+
Sema is a local-first CLI distribution, proven with Claude, Codex, zCode (GLM) and Kimi. The public package reads the
|
|
4
|
+
workspace on the user's machine, validates `.sema` contracts, checks drift,
|
|
5
|
+
maps impact, and generates code without login, user authorization, license
|
|
6
|
+
activation, tokens, credits, billing services, a control panel, or external
|
|
7
|
+
service credentials.
|
|
8
|
+
|
|
9
|
+
Support: suporte@otimitare.com
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install -g @semacode/cli
|
|
15
|
+
sema --version
|
|
16
|
+
sema skill status --json
|
|
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
|
+
|
|
32
|
+
For development inside this repository:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install
|
|
36
|
+
npm run build
|
|
37
|
+
node pacotes/cli/dist/bin.js --help
|
|
38
|
+
```
|
|
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
|
+
|
|
132
|
+
## Codex Setup
|
|
133
|
+
|
|
134
|
+
`AGENTS.md` is the official Sema entrypoint for Codex. Create or refresh it from
|
|
135
|
+
the local CLI:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
sema sync-codex --json
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Codex automatically loads `AGENTS.md` as repository guidance. Sema is an
|
|
142
|
+
independent product and is not affiliated with or endorsed by OpenAI.
|
|
143
|
+
|
|
144
|
+
## Required Local Flow
|
|
145
|
+
|
|
146
|
+
Codex and humans should use the same local sequence before changing governed
|
|
147
|
+
code, contracts, workflows, release scripts, or operational docs:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
sema --version
|
|
151
|
+
sema resumo --drift none
|
|
152
|
+
sema docs-impacto --intencao "describe the change" --json
|
|
153
|
+
sema inspecionar contratos/example.sema --drift none --json
|
|
154
|
+
sema drift contratos/example.sema --escopo modulo --cache fresh --json
|
|
155
|
+
sema impacto contratos/example.sema --alvo sema.example.target --mudanca "describe the change" --json
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Commands run directly against the local workspace. If `sema --version` fails,
|
|
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.
|
|
162
|
+
|
|
163
|
+
## Core Commands
|
|
164
|
+
|
|
165
|
+
- `sema iniciar`: create a governed starting point.
|
|
166
|
+
- `sema validar`: validate `.sema` contracts.
|
|
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`).
|
|
169
|
+
- `sema impacto`: map the blast radius of a planned change.
|
|
170
|
+
- `sema docs-impacto`: identify docs that must be read or updated.
|
|
171
|
+
- `sema finalizar-mudanca`: close the governed change with evidence.
|
|
172
|
+
- `sema compilar`: generate code from contracts.
|
|
173
|
+
- `sema testar`: generate, compile, and execute local contract tests, including `dotnet` and `cpp`.
|
|
174
|
+
- `sema verificar`: run the final local verification bundle.
|
|
175
|
+
- `sema contexto-ia`: build local AI context from a contract.
|
|
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.
|
|
187
|
+
|
|
188
|
+
Generation targets are `typescript`, `python`, `php`, `dart`, `lua`,
|
|
189
|
+
`javascript`, `html`, `css`, `dotnet`, and `cpp`. The aliases `cs` and
|
|
190
|
+
`csharp` select `dotnet`; `c++`, `cxx`, and `cc` select `cpp`.
|
|
191
|
+
Native targets are opt-in in `sema.config.json.alvos` for project-wide
|
|
192
|
+
verification because they require local compiler toolchains.
|
|
193
|
+
|
|
194
|
+
## Public Boundary
|
|
195
|
+
|
|
196
|
+
Do not publish private or sensitive operational material in public Sema
|
|
197
|
+
artifacts.
|
package/docs/deploy.md
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
# Deployment Boundary
|
|
2
|
-
|
|
3
|
-
The public Sema repository documents one coordinated npm artifact containing
|
|
4
|
-
the local CLI, its absolute managed launcher, and the portable bootstrap skill.
|
|
5
|
-
The repository Codex plugin remains an optional namespaced distribution channel
|
|
6
|
-
for the same versioned skill.
|
|
7
|
-
|
|
8
|
-
Run the complete public gate:
|
|
9
|
-
|
|
10
|
-
```bash
|
|
11
|
-
npm run build
|
|
12
|
-
npm run codex:sync-entrypoint
|
|
13
|
-
npm run status:check
|
|
14
|
-
npm run repo:verificar-publico
|
|
15
|
-
npm run plugin:testar-codex
|
|
16
|
-
npm test
|
|
17
|
-
npm run release:verificar-drift
|
|
18
|
-
npm run release:preparar-publica
|
|
19
|
-
npm run release:publicar-npm-dry-run
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
`release:preparar-publica` performs the Codex entrypoint sync before checking
|
|
23
|
-
the public boundary, so a clean clone does not depend on ignored generated
|
|
24
|
-
handshake files left by a previous local run.
|
|
25
|
-
|
|
26
|
-
All release and local-install routes delegate to `npm run
|
|
27
|
-
cli:empacotar-publica`. The factory uses a unique private stage, disables npm
|
|
28
|
-
lifecycle scripts while packing that stage, and publishes only a fully
|
|
29
|
-
validated tarball. Do not use `npm pack --workspace @semacode/cli`; the source
|
|
30
|
-
package guard rejects that unsupported path without staging files in the
|
|
31
|
-
workspace.
|
|
32
|
-
|
|
33
|
-
The public-package smoke performs a global install with isolated home, npm
|
|
34
|
-
prefix, npm cache, and user cache. It proves the launcher works through its
|
|
35
|
-
absolute path with Node.js and npm removed from `PATH`. On Windows it exercises
|
|
36
|
-
`sema.ps1` as the PowerShell `PATH` entrypoint, `sema-managed.ps1` through the
|
|
37
|
-
absolute `%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe`, and
|
|
38
|
-
`sema.cmd` through `cmd.exe`. The smoke also proves the synchronized
|
|
39
|
-
skill matches the packaged source, the real user home is unchanged, and local
|
|
40
|
-
installs leave global state untouched. The plugin smoke independently compares
|
|
41
|
-
its cached skill with the versioned source and proves no Sema MCP server was
|
|
42
|
-
registered. Plugin and CLI versions must match before the commit is pushed.
|
|
43
|
-
|
|
44
|
-
Push the commit containing `.agents/plugins/marketplace.json` and
|
|
45
|
-
`plugins/sema/` before telling users to install from `gerlanss/Sema`. Publish
|
|
46
|
-
the npm package only after the tarball smoke passes. After npm publication, run
|
|
47
|
-
`npm run release:verificar-distribuicao` to verify the registry and live GitHub
|
|
48
|
-
state. That final verifier also requires the remote GitHub HEAD to match the
|
|
49
|
-
local commit, installs `sema@sema` from `gerlanss/Sema` in an isolated
|
|
50
|
-
`CODEX_HOME`, compares the remote skill with the versioned source, and proves
|
|
51
|
-
that the remote plugin registers no Sema MCP. The current contract does not
|
|
52
|
-
permit creating a GitHub Release or release asset.
|
|
53
|
-
|
|
54
|
-
Do not publish private or sensitive operational material in this repository.
|
|
1
|
+
# Deployment Boundary
|
|
2
|
+
|
|
3
|
+
The public Sema repository documents one coordinated npm artifact containing
|
|
4
|
+
the local CLI, its absolute managed launcher, and the portable bootstrap skill.
|
|
5
|
+
The repository Codex plugin remains an optional namespaced distribution channel
|
|
6
|
+
for the same versioned skill.
|
|
7
|
+
|
|
8
|
+
Run the complete public gate:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm run build
|
|
12
|
+
npm run codex:sync-entrypoint
|
|
13
|
+
npm run status:check
|
|
14
|
+
npm run repo:verificar-publico
|
|
15
|
+
npm run plugin:testar-codex
|
|
16
|
+
npm test
|
|
17
|
+
npm run release:verificar-drift
|
|
18
|
+
npm run release:preparar-publica
|
|
19
|
+
npm run release:publicar-npm-dry-run
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
`release:preparar-publica` performs the Codex entrypoint sync before checking
|
|
23
|
+
the public boundary, so a clean clone does not depend on ignored generated
|
|
24
|
+
handshake files left by a previous local run.
|
|
25
|
+
|
|
26
|
+
All release and local-install routes delegate to `npm run
|
|
27
|
+
cli:empacotar-publica`. The factory uses a unique private stage, disables npm
|
|
28
|
+
lifecycle scripts while packing that stage, and publishes only a fully
|
|
29
|
+
validated tarball. Do not use `npm pack --workspace @semacode/cli`; the source
|
|
30
|
+
package guard rejects that unsupported path without staging files in the
|
|
31
|
+
workspace.
|
|
32
|
+
|
|
33
|
+
The public-package smoke performs a global install with isolated home, npm
|
|
34
|
+
prefix, npm cache, and user cache. It proves the launcher works through its
|
|
35
|
+
absolute path with Node.js and npm removed from `PATH`. On Windows it exercises
|
|
36
|
+
`sema.ps1` as the PowerShell `PATH` entrypoint, `sema-managed.ps1` through the
|
|
37
|
+
absolute `%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe`, and
|
|
38
|
+
`sema.cmd` through `cmd.exe`. The smoke also proves the synchronized
|
|
39
|
+
skill matches the packaged source, the real user home is unchanged, and local
|
|
40
|
+
installs leave global state untouched. The plugin smoke independently compares
|
|
41
|
+
its cached skill with the versioned source and proves no Sema MCP server was
|
|
42
|
+
registered. Plugin and CLI versions must match before the commit is pushed.
|
|
43
|
+
|
|
44
|
+
Push the commit containing `.agents/plugins/marketplace.json` and
|
|
45
|
+
`plugins/sema/` before telling users to install from `gerlanss/Sema`. Publish
|
|
46
|
+
the npm package only after the tarball smoke passes. After npm publication, run
|
|
47
|
+
`npm run release:verificar-distribuicao` to verify the registry and live GitHub
|
|
48
|
+
state. That final verifier also requires the remote GitHub HEAD to match the
|
|
49
|
+
local commit, installs `sema@sema` from `gerlanss/Sema` in an isolated
|
|
50
|
+
`CODEX_HOME`, compares the remote skill with the versioned source, and proves
|
|
51
|
+
that the remote plugin registers no Sema MCP. The current contract does not
|
|
52
|
+
permit creating a GitHub Release or release asset.
|
|
53
|
+
|
|
54
|
+
Do not publish private or sensitive operational material in this repository.
|
package/docs/documentation.md
CHANGED
|
@@ -36,14 +36,14 @@ sema finalizar-mudanca \
|
|
|
36
36
|
keywords literal.
|
|
37
37
|
- Do not include private or sensitive operational material.
|
|
38
38
|
- Prefer local CLI examples.
|
|
39
|
-
- Point support requests to suporte@otimitare.
|
|
40
|
-
|
|
41
|
-
## Contract Structure
|
|
42
|
-
|
|
43
|
-
Documentation governance is split by capability: required-document resolution
|
|
44
|
-
stays in `governanca_ia_documentacao.sema`, while localization and
|
|
45
|
-
change-finalization evidence live in explicitly named child contracts. The
|
|
46
|
-
same rule applies to drift and semantic-budget governance: keep a cohesive
|
|
47
|
-
primary capability in the root contract and move secondary responsibilities to
|
|
48
|
-
named children. Preserve task names, guarantees, implementations, and
|
|
49
|
-
`vinculos`; never create numbered part files.
|
|
39
|
+
- Point support requests to suporte@otimitare.com.
|
|
40
|
+
|
|
41
|
+
## Contract Structure
|
|
42
|
+
|
|
43
|
+
Documentation governance is split by capability: required-document resolution
|
|
44
|
+
stays in `governanca_ia_documentacao.sema`, while localization and
|
|
45
|
+
change-finalization evidence live in explicitly named child contracts. The
|
|
46
|
+
same rule applies to drift and semantic-budget governance: keep a cohesive
|
|
47
|
+
primary capability in the root contract and move secondary responsibilities to
|
|
48
|
+
named children. Preserve task names, guarantees, implementations, and
|
|
49
|
+
`vinculos`; never create numbered part files.
|