wendkeep 0.58.3 → 0.59.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/CHANGELOG.md +73 -0
- package/README.en.md +41 -3
- package/README.md +41 -3
- package/bin/wendkeep.mjs +54 -6
- package/docs/en/commands/changes-and-verification.md +9 -3
- package/docs/en/commands/getting-started.md +7 -3
- package/docs/en/commands/memory.md +20 -2
- package/docs/en/commands/operating-profiles.md +173 -0
- package/docs/en/commands/sessions-and-import.md +8 -4
- package/docs/en/commands/verify.md +12 -6
- package/docs/pt-BR/commands/changes-and-verification.md +9 -4
- package/docs/pt-BR/commands/getting-started.md +7 -3
- package/docs/pt-BR/commands/memory.md +18 -2
- package/docs/pt-BR/commands/operating-profiles.md +171 -0
- package/docs/pt-BR/commands/sessions-and-import.md +7 -3
- package/docs/pt-BR/commands/verify.md +11 -5
- package/hooks/brain-core.mjs +159 -159
- package/hooks/brain-inject.mjs +83 -26
- package/hooks/brain-recall.mjs +32 -32
- package/hooks/brain-reindex.mjs +13 -13
- package/hooks/change-context.mjs +24 -10
- package/hooks/change-core.mjs +174 -37
- package/hooks/change-guard.mjs +115 -16
- package/hooks/change-nag.mjs +20 -5
- package/hooks/change-warn.mjs +27 -9
- package/hooks/decision-capture.mjs +1 -1
- package/hooks/derived-sections.mjs +1 -1
- package/hooks/flow-core.mjs +891 -0
- package/hooks/flow-protected-policy.mjs +218 -0
- package/hooks/frontmatter-repair.mjs +3 -1
- package/hooks/git-snapshot.mjs +722 -0
- package/hooks/import-sessions.mjs +10 -5
- package/hooks/memory-mode.mjs +63 -13
- package/hooks/memory-store.mjs +309 -69
- package/hooks/obsidian-common.mjs +39 -55
- package/hooks/operating-profile-runtime.mjs +157 -0
- package/hooks/plan-capture.mjs +14 -3
- package/hooks/sensors-core.mjs +15 -3
- package/hooks/session-backfill.mjs +7 -2
- package/hooks/session-ensure.mjs +6 -4
- package/hooks/session-iteration.mjs +65 -0
- package/hooks/session-memory-lifecycle.mjs +10 -5
- package/hooks/session-note-io.mjs +130 -15
- package/hooks/session-observability.mjs +4 -2
- package/hooks/session-stop.mjs +65 -19
- package/hooks/spec-core.mjs +91 -12
- package/hooks/subagent-stop.mjs +4 -1
- package/hooks/subagent-usage.mjs +2 -2
- package/hooks/task-log.mjs +3 -1
- package/hooks/token-usage.mjs +1 -1
- package/hooks/vault-health.mjs +183 -37
- package/hooks/vault-path-safety.mjs +558 -0
- package/hooks/vault-runtime-store.mjs +558 -0
- package/package.json +3 -3
- package/src/change.mjs +2 -1
- package/src/flow.mjs +232 -0
- package/src/init.mjs +26 -3
- package/src/memory.mjs +785 -35
- package/src/operating-profile.mjs +133 -0
- package/src/profile.mjs +224 -0
- package/src/project-vault.mjs +110 -5
- package/src/rebuild-costs.mjs +11 -4
- package/src/skills-seed.mjs +38 -16
- package/src/sync-defs.mjs +16 -7
- package/src/sync.mjs +9 -1
- package/src/taxonomy.mjs +8 -0
- package/src/validate-memory.mjs +21 -8
- package/src/verify.mjs +12 -2
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# Operating profiles and FLOW
|
|
2
|
+
|
|
3
|
+
**English** · [Português](../../pt-BR/commands/operating-profiles.md)
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
Choose how much Wend Runtime governance an execution needs without disabling **Keep Core**.
|
|
8
|
+
Keep Core is always active: the Vault, session, identity, CORE/SHARED, lessons, costs, and
|
|
9
|
+
persistence integrations continue working under every profile.
|
|
10
|
+
|
|
11
|
+
## When to use
|
|
12
|
+
|
|
13
|
+
Use `profile` to inspect or explicitly select an Operating Profile. Use `FLOW` for local,
|
|
14
|
+
reversible `spec_impact:none` maintenance that fits an Execute → Validate microcontract without a
|
|
15
|
+
change.
|
|
16
|
+
|
|
17
|
+
## When not to use
|
|
18
|
+
|
|
19
|
+
Do not select `OFF` to bypass policy: it hands execution to the LLM's native harness and can only
|
|
20
|
+
be selected explicitly. Do not finish public-contract, security/auth, migration/schema,
|
|
21
|
+
dependency, CI/release, spec, or WendKeep gate/policy changes in FLOW; promote the work to a
|
|
22
|
+
change.
|
|
23
|
+
|
|
24
|
+
## Prerequisites
|
|
25
|
+
|
|
26
|
+
- An initialized project whose `.wendkeep.json` is bound to the correct Vault.
|
|
27
|
+
- For a session override, one unambiguous session in `SESSION_REGISTRY.json`.
|
|
28
|
+
- For FLOW, a Git repository, a path allowlist, a reason, and at least one existing sensor in
|
|
29
|
+
`wendkeep.sensors.json`.
|
|
30
|
+
|
|
31
|
+
## Syntax
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npx wendkeep profile status [--project <path>] [--vault <path>] [--session <id>] [--json]
|
|
35
|
+
npx wendkeep profile use <profile> [--project <path>] [--vault <path>] [--session <id>] [--json]
|
|
36
|
+
npx wendkeep flow start <slug> --allow <path> [--allow <path>...] --sensor <id> [--sensor <id>...] --reason <text> [--session <id>]
|
|
37
|
+
npx wendkeep flow status [<id>]
|
|
38
|
+
npx wendkeep flow show <id> [--session <id>]
|
|
39
|
+
npx wendkeep flow finish <id> [--session <id>]
|
|
40
|
+
npx wendkeep flow promote <id> [--change-slug <slug>] [--session <id>]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Every FLOW subcommand also accepts `--project <path>`, `--vault <path>`, and `--json`. When
|
|
44
|
+
provided, `--session` scopes ID-based reads and mutations to the session that owns the FLOW; an
|
|
45
|
+
ID from another session fails without mutation.
|
|
46
|
+
|
|
47
|
+
## Options and exit codes
|
|
48
|
+
|
|
49
|
+
| Profile | Route | Contract |
|
|
50
|
+
|---|---|---|
|
|
51
|
+
| `OFF` | LLM-native harness | Wend Runtime off; Keep Core intact. |
|
|
52
|
+
| `FLOW` | E → V | Microcontract with Git baseline, allowlist, sensors, and receipt, without a change. |
|
|
53
|
+
| `GUIDE` | P → E → V | Compact change; policy recognized for compatible evolution. |
|
|
54
|
+
| `GOVERN` | P → R → E → V | Current a2 loop and conservative fallback. |
|
|
55
|
+
| `ASSURE` | P → R → E → V → C | Governance plus confirmation and handoff. |
|
|
56
|
+
|
|
57
|
+
- Resolution is explicit session override → project `harness.profile` → `GOVERN`. Heuristics,
|
|
58
|
+
diff size, prompt text, environment variables, or read failures never select `OFF`.
|
|
59
|
+
- `profile status` prints the effective profile and source; `--json` emits structured output. When
|
|
60
|
+
an explicit Vault preserves the selection despite a corrupt binding, output includes
|
|
61
|
+
`binding_error` and the diagnostic is also written to stderr.
|
|
62
|
+
- `profile use` validates names and flags strictly; a duplicate/incomplete singleton option or a
|
|
63
|
+
value beginning with `--` fails before I/O. Without `--session`, it atomically changes the
|
|
64
|
+
project binding; with `--session`, it records override, source, and timestamp without changing
|
|
65
|
+
session identity.
|
|
66
|
+
- `.wendkeep.json` stays on `schemaVersion: 1`; the additive field is, for example,
|
|
67
|
+
`"harness": { "profile": "GOVERN" }`. A legacy binding without it also resolves to `GOVERN`.
|
|
68
|
+
- A corrupt binding never means `OFF`. When the payload or legacy integration identifies one
|
|
69
|
+
unambiguous Vault, Keep Core remains active under `GOVERN` and the hook exposes a diagnostic;
|
|
70
|
+
mutation guards fail closed until the binding is repaired. Invalid local configuration, a
|
|
71
|
+
missing marker, or a mismatched identity never silently inherits a parent/global Vault.
|
|
72
|
+
- `harness.flow.protectedRoots` accepts an array of project-relative roots, without globs or `..`
|
|
73
|
+
escapes. Each root extends FLOW's protected surfaces; any change below it requires
|
|
74
|
+
`flow promote`.
|
|
75
|
+
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"harness": {
|
|
79
|
+
"profile": "FLOW",
|
|
80
|
+
"flow": {
|
|
81
|
+
"protectedRoots": ["src/internal-api", "infra/releases"]
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
- `flow start` captures HEAD, pre-existing Git state, allowlist, sensors, reason, and session under
|
|
88
|
+
`.brain/runtime/flows/`; it creates no `08-Mudanças`, ADR, verdict, spec, or
|
|
89
|
+
`CURRENT_CHANGE.md`.
|
|
90
|
+
- `flow finish` compares the real diff with the Git baseline and allowlist, including submodule
|
|
91
|
+
changes, Git metadata/config/hidden flags, and ignored protected surfaces. The projectRoot is
|
|
92
|
+
frozen and sensors run in that cwd. A bounded, no-follow physical discovery keeps empty or
|
|
93
|
+
ignored protected aliases visible without entering `.git`, the effective Vault, or local caches;
|
|
94
|
+
ambiguity or a limit breach blocks. It rejects symlink/junction/reparse/hardlink paths in both
|
|
95
|
+
the worktree and Vault destinations, revalidates before/after sensors, and recaptures the snapshot
|
|
96
|
+
immediately before the receipt, blocking any sensor that mutates the repository. A terminal
|
|
97
|
+
receipt and idempotent
|
|
98
|
+
session iteration count as success only together; a temporarily
|
|
99
|
+
busy projection exits `1` and can be retried safely.
|
|
100
|
+
- `flow promote` creates a normal change while preserving session, reason, paths, sensors, and
|
|
101
|
+
evidence. A cross-process owner+lease slug lock, reservation, and durable `promoting` state elect
|
|
102
|
+
one owner; contract, reservation, attempts, receipt, and origin remain semantically bound. The
|
|
103
|
+
loser remains active and can retry with `--change-slug`. Retries idempotently resume the same
|
|
104
|
+
promotion instead of creating another change.
|
|
105
|
+
No FLOW command accepts `--force`.
|
|
106
|
+
- Exit `0` means a successful query or transition; exit `1` means a policy/red-sensor block; exit
|
|
107
|
+
`2` means invalid profile, session, flow, or arguments, with no partial mutation.
|
|
108
|
+
|
|
109
|
+
## Examples
|
|
110
|
+
|
|
111
|
+
Inspect the effective default and apply an override only to the current session:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
npx wendkeep profile status
|
|
115
|
+
npx wendkeep profile use OFF --session 019abc-session-id --json
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Run FLOW maintenance while capturing the `flow_id` returned by `start`:
|
|
119
|
+
|
|
120
|
+
```powershell
|
|
121
|
+
$flow = npx wendkeep flow start fix-copy --allow README.md --sensor docs-bilingual --reason "Fix copy without changing the contract" --json | ConvertFrom-Json
|
|
122
|
+
$flowId = $flow.contract.flow_id
|
|
123
|
+
npx wendkeep flow status $flowId
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
If the work remains local and inside the microcontract, finish it with the returned ID:
|
|
127
|
+
|
|
128
|
+
```powershell
|
|
129
|
+
npx wendkeep flow finish $flowId
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
If the scope grows before `finish`, promote instead of finishing:
|
|
133
|
+
|
|
134
|
+
```powershell
|
|
135
|
+
npx wendkeep flow promote $flowId
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
If another session already claimed the original slug, the FLOW stays active and can be promoted
|
|
139
|
+
again with an explicit destination:
|
|
140
|
+
|
|
141
|
+
```powershell
|
|
142
|
+
npx wendkeep flow promote $flowId --change-slug another-slug
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Expected result
|
|
146
|
+
|
|
147
|
+
Changing profile neither creates a new session nor interrupts the Vault. In `OFF`, memory and
|
|
148
|
+
lessons are still injected and Stop still persists the session/memory lifecycle, while the
|
|
149
|
+
router, skill gate, change context/warn/nag/guard, and plan capture are inactive. A completed FLOW
|
|
150
|
+
leaves a durable, inspectable receipt; a promoted FLOW enters the normal change lifecycle.
|
|
151
|
+
|
|
152
|
+
## Common errors and diagnosis
|
|
153
|
+
|
|
154
|
+
- Unknown profile: use exactly `OFF`, `FLOW`, `GUIDE`, `GOVERN`, or `ASSURE`.
|
|
155
|
+
- `OFF` appeared without explicit selection: treat it as an error; missing/invalid reads must fall
|
|
156
|
+
back to `GOVERN`.
|
|
157
|
+
- Missing or ambiguous session: inspect `session list` and pass `--session <id>` without retrying
|
|
158
|
+
against a different target.
|
|
159
|
+
- FLOW without allowlist, reason, or sensor: complete the microcontract before editing.
|
|
160
|
+
- Out-of-scope path, protected surface, or red sensor: fix/abandon the FLOW or use
|
|
161
|
+
`flow promote`; there is no bypass.
|
|
162
|
+
- A sensor changed the repository, the allowlist crosses a symlink/junction, or a sensitive
|
|
163
|
+
ignored surface changed: restore the state and promote when the change is not strictly local.
|
|
164
|
+
FLOW sensors must be read-only.
|
|
165
|
+
- Session projection is `missing`, `invalid-frontmatter`, or `busy`: restore/unlock the note and
|
|
166
|
+
retry `flow finish` or `flow promote`; the idempotent marker prevents duplication.
|
|
167
|
+
- Pre-existing dirt appeared in the diff: it must match the initial fingerprint and must never be
|
|
168
|
+
silently attributed to the FLOW.
|
|
169
|
+
|
|
170
|
+
## Next steps
|
|
171
|
+
|
|
172
|
+
Read [changes and verification](changes-and-verification.md), the deep
|
|
173
|
+
[verify guide](verify.md), and [sessions and import](sessions-and-import.md).
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
## Purpose
|
|
6
6
|
|
|
7
7
|
Understand how hooks capture live sessions, how activation/turn state preserves causality in the
|
|
8
|
-
registry, and when to use retroactive import.
|
|
8
|
+
registry, and when to use retroactive import. Under `OFF`, the Vault remains active: session,
|
|
9
|
+
identity, memory, cost, and persistence hooks belong to Keep Core, not Wend Runtime.
|
|
9
10
|
|
|
10
11
|
## When to use
|
|
11
12
|
|
|
@@ -45,6 +46,8 @@ npx wendkeep import [options]
|
|
|
45
46
|
- `Stop` accepts only a transcript-proven turn from the compatible active activation. Duplicates
|
|
46
47
|
are no-ops; stale/superseded Stops neither publish memory nor overwrite a newer epoch's
|
|
47
48
|
checkpoint.
|
|
49
|
+
- When compacting conversations into `## Iterações`, the hook escapes code delimiters cut by the
|
|
50
|
+
size limit; inline backticks and fences never remain open and consume the following line.
|
|
48
51
|
- `session list` reads `SESSION_REGISTRY`; `show` displays one session and `use` only changes human
|
|
49
52
|
focus in `CURRENT_SESSION.md`.
|
|
50
53
|
- `import --source all|claude|codex`, `--since`, `--limit`, `--from`, and `--codex-from` bound scope.
|
|
@@ -66,7 +69,8 @@ npx wendkeep import --source codex --since 2026-07-01 --dry-run --json
|
|
|
66
69
|
Each canonical session points to the matching provider, transcript, note file, and costs. The
|
|
67
70
|
registry keeps one `SessionStart` epoch per activation plus the latest native turn; multiple
|
|
68
71
|
`Stop` events may acknowledge turns in that epoch without closing it. Repeated imports of the
|
|
69
|
-
same `session_id` deduplicate; human focus does not close or re-identify live hooks.
|
|
72
|
+
same `session_id` deduplicate; human focus does not close or re-identify live hooks. Every
|
|
73
|
+
automatic iteration remains valid Markdown even when a message must be truncated.
|
|
70
74
|
|
|
71
75
|
## Common errors and diagnosis
|
|
72
76
|
|
|
@@ -81,5 +85,5 @@ same `session_id` deduplicate; human focus does not close or re-identify live ho
|
|
|
81
85
|
|
|
82
86
|
## Next steps
|
|
83
87
|
|
|
84
|
-
Read [
|
|
85
|
-
and [notes](notes-and-knowledge.md).
|
|
88
|
+
Read [Operating profiles](operating-profiles.md), [retroactive import](retroactive-import.md),
|
|
89
|
+
[costs and observability](costs-and-observability.md), and [notes](notes-and-knowledge.md).
|
|
@@ -14,12 +14,15 @@ Run after implementing tasks and again whenever tasks, specs, or tests change.
|
|
|
14
14
|
## When not to use
|
|
15
15
|
|
|
16
16
|
Do not use it as a post-install health check or when no change exists. Run `wendkeep doctor` and
|
|
17
|
-
`wendkeep memory status --gate` instead.
|
|
17
|
+
`wendkeep memory status --gate` instead. In `FLOW`, validation and the receipt belong to
|
|
18
|
+
`flow finish`; under `OFF`, `verify` remains available only when the user chooses to run the
|
|
19
|
+
lifecycle manually.
|
|
18
20
|
|
|
19
21
|
## Prerequisites
|
|
20
22
|
|
|
21
23
|
- An open change selected through `CURRENT_CHANGE.md` or `--change <slug>`.
|
|
22
|
-
- A placeholder-free `tarefas.md` with `[req:]` and `[sensor:]` tags on checkbox lines
|
|
24
|
+
- A placeholder-free `tarefas.md` with `[req:]` and one or more `[sensor:]` tags on checkbox lines;
|
|
25
|
+
every distinct sensor ID is required once, in declaration order.
|
|
23
26
|
- Sensors declared in `wendkeep.sensors.json`.
|
|
24
27
|
|
|
25
28
|
## Syntax
|
|
@@ -34,7 +37,8 @@ npx wendkeep change use <slug>
|
|
|
34
37
|
|
|
35
38
|
- `--change <slug>` targets a change without changing the active pointer.
|
|
36
39
|
- `change use <slug>` persists focus for following commands.
|
|
37
|
-
- `--project <root>` selects the sensor cwd; `--vault` selects where proof is stored
|
|
40
|
+
- `--project <root>` selects the sensor cwd; `--vault` selects where proof is stored and is passed
|
|
41
|
+
to sensors as `OBSIDIAN_VAULT_PATH`, including `memory-health`.
|
|
38
42
|
- **Exit 0:** all required sensors passed and evidence was written.
|
|
39
43
|
- **Exit 1:** the gate ran, but at least one critical sensor was red or a mutant survived.
|
|
40
44
|
- **Exit 2:** invalid usage/context, including `no change (--change or active)`, missing vault,
|
|
@@ -75,12 +79,14 @@ Deep mode packages requirements, tasks, and evidence for read-only review; the v
|
|
|
75
79
|
## Common errors and diagnosis
|
|
76
80
|
|
|
77
81
|
- `no change`: this is exit 2 and a valid idle state; create/use a change or skip verify.
|
|
78
|
-
- Zero sensors: inspect same-line
|
|
82
|
+
- Zero/missing sensors: inspect every same-line tag and `sensors list`; multiple tags on one task
|
|
83
|
+
are valid and all of them enter the gate.
|
|
79
84
|
- Red gate: fix the cause and rerun; never choose `archive --force` on your own.
|
|
80
85
|
- Missing/stale verdict: regenerate `--deep` and request a fresh independent pass.
|
|
81
86
|
- Surviving mutants: strengthen the discriminating test; after three rounds, review manually.
|
|
82
87
|
|
|
83
88
|
## Next steps
|
|
84
89
|
|
|
85
|
-
Return to the [change lifecycle](changes-and-verification.md) for archive,
|
|
86
|
-
[maintenance](maintenance-and-diagnostics.md)
|
|
90
|
+
Return to the [change lifecycle](changes-and-verification.md) for archive, review
|
|
91
|
+
[Operating profiles](operating-profiles.md), or use [maintenance](maintenance-and-diagnostics.md)
|
|
92
|
+
when no change exists.
|
|
@@ -14,6 +14,9 @@ Use para qualquer implementação não trivial ou correção que precise deixar
|
|
|
14
14
|
## Quando não usar
|
|
15
15
|
|
|
16
16
|
Não crie uma change para consultar saúde, importar sessões ou executar manutenção read-only.
|
|
17
|
+
Para manutenção local elegível ao perfil `FLOW`, use o microcontrato descrito em
|
|
18
|
+
[Perfis de Operação](operating-profiles.md); em `OFF`, o lifecycle permanece disponível, mas não
|
|
19
|
+
é imposto pelo Wend Runtime.
|
|
17
20
|
|
|
18
21
|
## Pré-requisitos
|
|
19
22
|
|
|
@@ -32,7 +35,8 @@ npx wendkeep change archive <slug>
|
|
|
32
35
|
|
|
33
36
|
## Opções e códigos de saída
|
|
34
37
|
|
|
35
|
-
- `wendkeep change new <slug> [--simple]` cria
|
|
38
|
+
- `wendkeep change new <slug> [--simple]` cria uma change; `--simple` só pula o design, não é nem
|
|
39
|
+
equivale a `FLOW` e preserva o lifecycle/ADR legado.
|
|
36
40
|
- `change use`, `list`, `show`, `status`, `diff`, `done` e `undone` inspecionam ou atualizam o
|
|
37
41
|
trabalho sem arquivar.
|
|
38
42
|
- `change continue <arquivada> <nova>` abre continuação sem herdar evidência antiga.
|
|
@@ -70,11 +74,12 @@ gera um ADR. O archive só passa com tarefas fechadas, sensores exigidos verdes
|
|
|
70
74
|
|
|
71
75
|
- `no change`: selecione com `change use <slug>` ou informe `--change`.
|
|
72
76
|
- `spec_impact: pending`: defina `required` com delta ou `none` com justificativa real.
|
|
73
|
-
- Sensor não executado: mantenha `[sensor:id]` na mesma linha do checkbox
|
|
77
|
+
- Sensor não executado: mantenha uma ou mais tags `[sensor:id]` na mesma linha do checkbox. Todos
|
|
78
|
+
os IDs distintos dessa linha são exigidos e executados uma vez, na ordem declarada.
|
|
74
79
|
- Evidência stale: rode novamente `verify` e `verify --deep` depois de alterar tarefas/spec.
|
|
75
80
|
- Rebase em conflito: resolva o delta ou use `--accept-current` apenas quando isso for a decisão.
|
|
76
81
|
|
|
77
82
|
## Próximos passos
|
|
78
83
|
|
|
79
|
-
Leia o guia profundo de [verify](verify.md) e a
|
|
80
|
-
[manutenção e diagnóstico](maintenance-and-diagnostics.md).
|
|
84
|
+
Leia [Perfis de Operação](operating-profiles.md), o guia profundo de [verify](verify.md) e a
|
|
85
|
+
referência de [manutenção e diagnóstico](maintenance-and-diagnostics.md).
|
|
@@ -27,18 +27,22 @@ Não rode `init --force` para tentar reparar memória ou uma configuração ileg
|
|
|
27
27
|
```bash
|
|
28
28
|
npm install --save-dev wendkeep
|
|
29
29
|
npx wendkeep init [opções]
|
|
30
|
-
npx wendkeep sync [--project <raiz>] [--vault <cofre>] [--yes]
|
|
30
|
+
npx wendkeep sync [--project <raiz>] [--vault <cofre>] [--profile <perfil>] [--yes]
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
## Opções e códigos de saída
|
|
34
34
|
|
|
35
35
|
- `--vault <path>` escolhe o cofre; sem ele, o vínculo local `.wendkeep.json` prevalece.
|
|
36
36
|
- `--project <path>` aponta a raiz do projeto.
|
|
37
|
+
- `--profile <OFF|FLOW|GUIDE|GOVERN|ASSURE>` seleciona o Perfil de Operação; instalação nova usa
|
|
38
|
+
`GOVERN`, re-init/sync sem a flag preserva a escolha existente e `OFF` nunca é inferido.
|
|
37
39
|
- `--no-mcp`, `--no-colors` e `--no-companions` desativam integrações opcionais.
|
|
38
40
|
- `--companions <csv>` habilita companions explicitamente.
|
|
39
41
|
- `--yes` aceita defaults não interativos; `--force` atualiza apenas blocos gerenciados.
|
|
40
42
|
- Exit `0` indica instalação/sincronização concluída; exit diferente de zero identifica a etapa
|
|
41
43
|
que falhou. `sync` para em `init`, `sync-defs` ou `doctor`, sem esconder o erro.
|
|
44
|
+
- `sync` não pré-resolve o Vault antes de `init`: um vínculo inválido falha fechado nessa primeira
|
|
45
|
+
etapa, e apenas um vínculo validado segue para `sync-defs` e `doctor`; nunca há fallback global.
|
|
42
46
|
|
|
43
47
|
## Exemplos
|
|
44
48
|
|
|
@@ -46,7 +50,7 @@ Primeira instalação no projeto atual:
|
|
|
46
50
|
|
|
47
51
|
```bash
|
|
48
52
|
npm install --save-dev wendkeep
|
|
49
|
-
npx wendkeep init --no-companions
|
|
53
|
+
npx wendkeep init --profile GOVERN --no-companions
|
|
50
54
|
```
|
|
51
55
|
|
|
52
56
|
Atualização posterior:
|
|
@@ -60,7 +64,7 @@ Com pnpm, informe uma versão concreta porque políticas de idade mínima podem
|
|
|
60
64
|
atrasado silenciosamente:
|
|
61
65
|
|
|
62
66
|
```bash
|
|
63
|
-
pnpm add -D wendkeep@
|
|
67
|
+
pnpm add -D wendkeep@X.Y.Z --config.minimumReleaseAge=0
|
|
64
68
|
pnpm exec wendkeep sync --yes
|
|
65
69
|
```
|
|
66
70
|
|
|
@@ -25,6 +25,7 @@ Informe o vault explicitamente em automações. Preserve backups e evidências a
|
|
|
25
25
|
```bash
|
|
26
26
|
npx wendkeep memory status [--gate] --vault <cofre>
|
|
27
27
|
npx wendkeep memory repair --vault <cofre>
|
|
28
|
+
npx wendkeep memory reconcile <sessão-ambígua> --by-session <sessão-sucessora> --reason <motivo> [--apply] --vault <cofre>
|
|
28
29
|
npx wendkeep memory promote <candidate> --vault <cofre>
|
|
29
30
|
npx wendkeep memory reject <candidate> --vault <cofre>
|
|
30
31
|
npx wendkeep validate-memory [caminho-do-CORE]
|
|
@@ -44,7 +45,18 @@ npx wendkeep validate-memory --vault <cofre-v2>
|
|
|
44
45
|
- Vault legado válido gera warning e exit `0`. Em v2, o status correlaciona
|
|
45
46
|
`last_memory_attempt`, disposition, outbox, ledger, SHARED e checkpoint: attempt ambíguo,
|
|
46
47
|
publicação perdida ou checkpoint divergente bloqueiam; `degraded` com outbox íntegra é warning.
|
|
47
|
-
- `memory repair`
|
|
48
|
+
- `memory repair` é exclusivamente estrutural: trabalha sob locks com owner PID/token, salva
|
|
49
|
+
`.bak`, retém eventos válidos e reprojeta. Quando reconhece um checkpoint pré-0.59 válido com
|
|
50
|
+
cursor causal, migra-o por CAS para a fronteira física e registra backup/auditoria; nunca
|
|
51
|
+
reclassifica attempts do registry nem aceita tuple que não seja rederivada integralmente.
|
|
52
|
+
- `memory reconcile` é dry-run por padrão. `--apply` exige duas sessões nomeadas e motivo, faz CAS
|
|
53
|
+
do attempt exato, salva backup do registry e limita a mutação ao attempt ambíguo e à sucessora.
|
|
54
|
+
O replay é CORE-aware, usa cursor físico do ledger no checkpoint e não reescreve ledger, CORE ou
|
|
55
|
+
notas, nem consome a outbox. Repetir a mesma decisão aplicada é idempotente.
|
|
56
|
+
- Toda rota de memória valida a topologia física de `.brain`, ledger, outbox, CORE, SHARED,
|
|
57
|
+
candidates, registry, notas, backups, temporários e sidecars antes de ler ou escrever. Junction,
|
|
58
|
+
symlink, reparse point ou hardlink falham fechados sem tocar bytes externos. Locks publicam owner
|
|
59
|
+
e lease atomicamente, não colhem PID vivo apenas por idade e só liberam a lease adquirida.
|
|
48
60
|
- `promote`/`reject` acrescentam decisão auditável; nunca reescrevem o ledger no lugar.
|
|
49
61
|
- `validate-memory <CORE.md>` valida cap de 25 linhas, seções e segredos.
|
|
50
62
|
- `validate-memory --vault` exige bundle v2 completo; não é o gate correto para vault legado.
|
|
@@ -53,6 +65,8 @@ npx wendkeep validate-memory --vault <cofre-v2>
|
|
|
53
65
|
|
|
54
66
|
```bash
|
|
55
67
|
npx wendkeep memory status --gate --vault .MeuApp-vault
|
|
68
|
+
npx wendkeep memory reconcile antiga --by-session atual --reason "entrega continuada" --vault .MeuApp-vault
|
|
69
|
+
npx wendkeep memory reconcile antiga --by-session atual --reason "entrega continuada" --apply --vault .MeuApp-vault
|
|
56
70
|
npx wendkeep validate-memory .MeuApp-vault/.brain/CORE.md
|
|
57
71
|
npx wendkeep memory promote candidate-123 --vault .MeuApp-vault
|
|
58
72
|
```
|
|
@@ -72,7 +86,9 @@ prefixo válido de uma projeção global que já avançou com eventos concorrent
|
|
|
72
86
|
- `degraded` com todos os event IDs presentes no ledger ou na outbox íntegra é recuperável; deixe o
|
|
73
87
|
replay idempotente concluir. Event ID ausente nos dois lugares indica publicação perdida.
|
|
74
88
|
- Attempt `ambiguous`, attempt `applied` sem event IDs, evento `projected` apenas na outbox ou
|
|
75
|
-
checkpoint divergente são bloqueantes: preserve os artefatos e investigue antes de repair.
|
|
89
|
+
checkpoint divergente são bloqueantes: preserve os artefatos e investigue antes de repair. Se a
|
|
90
|
+
ambiguidade for comprovadamente substituída por uma sessão sucessora, revise o dry-run de
|
|
91
|
+
`memory reconcile` antes de autorizar `--apply`; o comando falha se o attempt ambíguo tiver IDs.
|
|
76
92
|
- Candidate pendente comum: warning recuperável, exige decisão humana quando apropriado.
|
|
77
93
|
- `event_cursor` ausente ou hash divergente em v2: preserve o bundle e avalie `memory repair`.
|
|
78
94
|
- `validate-memory --vault` falha no legado: valide apenas CORE ou migre primeiro.
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# Perfis de Operação e FLOW
|
|
2
|
+
|
|
3
|
+
**PT-BR** · [English](../../en/commands/operating-profiles.md)
|
|
4
|
+
|
|
5
|
+
## Objetivo
|
|
6
|
+
|
|
7
|
+
Escolher quanta governança do Wend Runtime uma execução precisa sem desligar o **Keep Core**.
|
|
8
|
+
O Keep Core permanece sempre ativo: Vault, sessão, identidade, CORE/SHARED, lessons, custos e
|
|
9
|
+
integrações de persistência continuam funcionando em todos os perfis.
|
|
10
|
+
|
|
11
|
+
## Quando usar
|
|
12
|
+
|
|
13
|
+
Use `profile` para consultar ou selecionar explicitamente um Perfil de Operação. Use `FLOW` para
|
|
14
|
+
manutenção local, reversível e com `spec_impact:none` que caiba num microcontrato Executar →
|
|
15
|
+
Validar, sem change.
|
|
16
|
+
|
|
17
|
+
## Quando não usar
|
|
18
|
+
|
|
19
|
+
Não selecione `OFF` para tentar contornar uma política: ele entrega a execução ao harness nativo
|
|
20
|
+
da LLM e só pode ser escolhido explicitamente. Não finalize em FLOW alterações de contrato
|
|
21
|
+
público, segurança/auth, migração/schema, dependências, CI/release, specs ou dos próprios
|
|
22
|
+
gates/policies do WendKeep; promova o trabalho para uma change.
|
|
23
|
+
|
|
24
|
+
## Pré-requisitos
|
|
25
|
+
|
|
26
|
+
- Projeto inicializado, com `.wendkeep.json` vinculado ao Vault correto.
|
|
27
|
+
- Para override de sessão, uma sessão inequívoca no `SESSION_REGISTRY.json`.
|
|
28
|
+
- Para FLOW, repositório Git, allowlist de paths, motivo e ao menos um sensor existente em
|
|
29
|
+
`wendkeep.sensors.json`.
|
|
30
|
+
|
|
31
|
+
## Sintaxe
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npx wendkeep profile status [--project <path>] [--vault <path>] [--session <id>] [--json]
|
|
35
|
+
npx wendkeep profile use <perfil> [--project <path>] [--vault <path>] [--session <id>] [--json]
|
|
36
|
+
npx wendkeep flow start <slug> --allow <path> [--allow <path>...] --sensor <id> [--sensor <id>...] --reason <texto> [--session <id>]
|
|
37
|
+
npx wendkeep flow status [<id>]
|
|
38
|
+
npx wendkeep flow show <id> [--session <id>]
|
|
39
|
+
npx wendkeep flow finish <id> [--session <id>]
|
|
40
|
+
npx wendkeep flow promote <id> [--change-slug <slug>] [--session <id>]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Todos os subcomandos FLOW também aceitam `--project <path>`, `--vault <path>` e `--json`.
|
|
44
|
+
Quando informado, `--session` restringe inclusive consultas e mutações por ID à sessão dona do
|
|
45
|
+
FLOW; um ID de outra sessão falha sem mutação.
|
|
46
|
+
|
|
47
|
+
## Opções e códigos de saída
|
|
48
|
+
|
|
49
|
+
| Perfil | Rota | Contrato |
|
|
50
|
+
|---|---|---|
|
|
51
|
+
| `OFF` | harness nativo da LLM | Wend Runtime desligado; Keep Core integral. |
|
|
52
|
+
| `FLOW` | E → V | Microcontrato com baseline Git, allowlist, sensores e recibo, sem change. |
|
|
53
|
+
| `GUIDE` | P → E → V | Change compacta; política reconhecida para evolução compatível. |
|
|
54
|
+
| `GOVERN` | P → R → E → V | Loop a2 atual e fallback conservador. |
|
|
55
|
+
| `ASSURE` | P → R → E → V → C | Governança acrescida de confirmação e handoff. |
|
|
56
|
+
|
|
57
|
+
- A resolução segue override explícito da sessão → `harness.profile` do projeto → `GOVERN`.
|
|
58
|
+
Heurística, tamanho do diff, texto do prompt, variável de ambiente ou erro de leitura nunca
|
|
59
|
+
selecionam `OFF`.
|
|
60
|
+
- `profile status` mostra perfil efetivo e origem; `--json` produz saída estruturada. Quando um
|
|
61
|
+
Vault explícito preserva a escolha apesar de binding corrompido, a saída inclui `binding_error`
|
|
62
|
+
e o diagnóstico também vai para stderr.
|
|
63
|
+
- `profile use` valida nome e flags estritamente; opção singleton duplicada, incompleta ou com
|
|
64
|
+
valor iniciado por `--` falha antes de I/O. Sem `--session`, altera atomicamente o binding do
|
|
65
|
+
projeto; com `--session`, grava override, origem e timestamp sem trocar a identidade da sessão.
|
|
66
|
+
- `.wendkeep.json` continua em `schemaVersion: 1`; o campo aditivo usa, por exemplo,
|
|
67
|
+
`"harness": { "profile": "GOVERN" }`. Binding legado sem o campo também resolve `GOVERN`.
|
|
68
|
+
- Binding corrompido nunca equivale a `OFF`. Quando o payload ou a integração legada identifica
|
|
69
|
+
um Vault inequívoco, o Keep Core continua ativo sob `GOVERN` e o hook expõe um diagnóstico;
|
|
70
|
+
guards de mutação falham fechados até o binding ser reparado. Configuração local inválida,
|
|
71
|
+
marcador ausente ou identidade divergente nunca herdam silenciosamente o Vault pai/global.
|
|
72
|
+
- `harness.flow.protectedRoots` aceita um array de raízes relativas ao projeto, sem globs ou
|
|
73
|
+
escapes `..`. Cada raiz amplia as superfícies protegidas do FLOW; qualquer alteração sob ela
|
|
74
|
+
exige `flow promote`.
|
|
75
|
+
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"harness": {
|
|
79
|
+
"profile": "FLOW",
|
|
80
|
+
"flow": {
|
|
81
|
+
"protectedRoots": ["src/internal-api", "infra/releases"]
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
- `flow start` captura HEAD, estado Git preexistente, allowlist, sensores, motivo e sessão em
|
|
88
|
+
`.brain/runtime/flows/`; não cria `08-Mudanças`, ADR, verdict, spec ou `CURRENT_CHANGE.md`.
|
|
89
|
+
- `flow finish` compara o diff real ao baseline Git e à allowlist, incluindo troca de commit em
|
|
90
|
+
submodule, metadata/config/flags ocultas do Git e superfícies protegidas ignoradas. O projectRoot
|
|
91
|
+
fica congelado e sensores rodam nesse cwd. Uma descoberta física limitada e no-follow mantém
|
|
92
|
+
visíveis aliases protegidos vazios ou ignorados, sem entrar em `.git`, no Vault efetivo ou em
|
|
93
|
+
caches locais; ambiguidade ou estouro de limite bloqueia. Ele rejeita
|
|
94
|
+
symlink/junction/reparse/hardlink no worktree e nos destinos do Vault, revalida antes/depois dos
|
|
95
|
+
sensores e recaptura o snapshot imediatamente antes do recibo, bloqueando qualquer sensor que
|
|
96
|
+
modifique o repositório. Recibo terminal e iteração
|
|
97
|
+
idempotente na sessão só contam como sucesso juntos;
|
|
98
|
+
uma projeção temporariamente ocupada retorna exit `1` e pode ser repetida com segurança.
|
|
99
|
+
- `flow promote` cria uma change normal preservando sessão, motivo, paths, sensores e evidência.
|
|
100
|
+
Lock cross-process owner+lease por slug, reserva e estado durável `promoting` elegem um único
|
|
101
|
+
dono; contrato, reserva, attempts, recibo e origem permanecem semanticamente vinculados. O
|
|
102
|
+
perdedor permanece ativo e pode repetir com `--change-slug`. Retries retomam idempotentemente a
|
|
103
|
+
mesma promoção em vez de criar outra change. Não existe `--force` no FLOW.
|
|
104
|
+
- Exit `0` indica consulta ou transição concluída; exit `1` indica política/sensor vermelho; exit
|
|
105
|
+
`2` indica perfil, sessão, flow ou argumentos inválidos, sem mutação parcial.
|
|
106
|
+
|
|
107
|
+
## Exemplos
|
|
108
|
+
|
|
109
|
+
Consultar o padrão efetivo e aplicar override somente à sessão atual:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
npx wendkeep profile status
|
|
113
|
+
npx wendkeep profile use OFF --session 019abc-session-id --json
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Executar uma manutenção FLOW capturando o `flow_id` retornado por `start`:
|
|
117
|
+
|
|
118
|
+
```powershell
|
|
119
|
+
$flow = npx wendkeep flow start corrige-copy --allow README.md --sensor docs-bilingual --reason "Corrige texto sem alterar contrato" --json | ConvertFrom-Json
|
|
120
|
+
$flowId = $flow.contract.flow_id
|
|
121
|
+
npx wendkeep flow status $flowId
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Se o trabalho permanecer local e dentro do microcontrato, finalize com o ID retornado:
|
|
125
|
+
|
|
126
|
+
```powershell
|
|
127
|
+
npx wendkeep flow finish $flowId
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Se o escopo crescer antes do `finish`, promova em vez de finalizar:
|
|
131
|
+
|
|
132
|
+
```powershell
|
|
133
|
+
npx wendkeep flow promote $flowId
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Se outra sessão já reivindicou o slug original, o FLOW continua ativo e pode ser promovido
|
|
137
|
+
novamente com um destino explícito:
|
|
138
|
+
|
|
139
|
+
```powershell
|
|
140
|
+
npx wendkeep flow promote $flowId --change-slug outro-slug
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Resultado esperado
|
|
144
|
+
|
|
145
|
+
Trocar o perfil não cria outra sessão nem interrompe o Vault. Em `OFF`, a memória e as lessons
|
|
146
|
+
continuam injetadas e o Stop continua persistindo sessão/memória, mas router, skill gate,
|
|
147
|
+
change context/warn/nag/guard e captura de plano ficam inativos. Um FLOW concluído deixa recibo
|
|
148
|
+
durável e consultável; um FLOW promovido passa a seguir o lifecycle normal de change.
|
|
149
|
+
|
|
150
|
+
## Erros comuns e diagnóstico
|
|
151
|
+
|
|
152
|
+
- Perfil desconhecido: use exatamente `OFF`, `FLOW`, `GUIDE`, `GOVERN` ou `ASSURE`.
|
|
153
|
+
- `OFF` apareceu sem escolha explícita: trate como erro; leitura ausente/inválida deve cair em
|
|
154
|
+
`GOVERN`.
|
|
155
|
+
- Sessão ausente ou ambígua: confira `session list` e informe `--session <id>` sem tentar de novo
|
|
156
|
+
com um alvo diferente.
|
|
157
|
+
- FLOW sem allowlist, motivo ou sensor: complete o microcontrato antes de editar.
|
|
158
|
+
- Path fora do escopo, superfície protegida ou sensor vermelho: corrija/abandone o FLOW ou use
|
|
159
|
+
`flow promote`; não há bypass.
|
|
160
|
+
- Sensor que alterou o repositório, allowlist atravessando symlink/junction ou superfície sensível
|
|
161
|
+
ignorada: restaure o estado e promova quando a mudança não for estritamente local. Sensores FLOW
|
|
162
|
+
devem ser somente leitura.
|
|
163
|
+
- Projeção da sessão `missing`, `invalid-frontmatter` ou `busy`: restaure/desbloqueie a nota e
|
|
164
|
+
repita `flow finish` ou `flow promote`; o marcador idempotente impede duplicação.
|
|
165
|
+
- Sujeira anterior apareceu no diff: ela deve coincidir com o fingerprint inicial e nunca pode ser
|
|
166
|
+
atribuída silenciosamente ao FLOW.
|
|
167
|
+
|
|
168
|
+
## Próximos passos
|
|
169
|
+
|
|
170
|
+
Leia [changes e verificação](changes-and-verification.md), o guia profundo de
|
|
171
|
+
[verify](verify.md) e [sessões e importação](sessions-and-import.md).
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
## Objetivo
|
|
6
6
|
|
|
7
7
|
Entender como os hooks capturam sessões ao vivo, como activation/turno preservam causalidade no
|
|
8
|
-
registry e quando usar a importação retroativa.
|
|
8
|
+
registry e quando usar a importação retroativa. No perfil `OFF`, o Vault continua ativo: hooks de
|
|
9
|
+
sessão, identidade, memória, custos e persistência pertencem ao Keep Core, não ao Wend Runtime.
|
|
9
10
|
|
|
10
11
|
## Quando usar
|
|
11
12
|
|
|
@@ -45,6 +46,8 @@ npx wendkeep import [opções]
|
|
|
45
46
|
- `Stop` aceita somente o turno comprovado pelo transcript e pela activation ativa compatível.
|
|
46
47
|
Duplicatas são no-op; Stops stale/superseded não publicam memória nem sobrescrevem o checkpoint
|
|
47
48
|
de um epoch mais novo.
|
|
49
|
+
- Ao compactar conversas em `## Iterações`, o hook escapa delimitadores de código cortados pelo
|
|
50
|
+
limite de tamanho; backticks inline ou fences nunca ficam abertos para engolir a linha seguinte.
|
|
48
51
|
- `session list` lê `SESSION_REGISTRY`; `show` exibe uma sessão e `use` muda apenas o foco humano
|
|
49
52
|
em `CURRENT_SESSION.md`.
|
|
50
53
|
- `import --source all|claude|codex`, `--since`, `--limit`, `--from` e `--codex-from` limitam escopo.
|
|
@@ -66,7 +69,8 @@ npx wendkeep import --source codex --since 2026-07-01 --dry-run --json
|
|
|
66
69
|
Cada sessão canônica aponta para provider, transcript, arquivo de nota e custos correspondentes.
|
|
67
70
|
O registry mantém um epoch de `SessionStart` por activation e o turno nativo mais recente; vários
|
|
68
71
|
`Stop` podem confirmar turnos do mesmo epoch sem fechá-lo. Importações repetidas do mesmo
|
|
69
|
-
`session_id` são deduplicadas; o foco humano não encerra nem altera a identidade dos hooks.
|
|
72
|
+
`session_id` são deduplicadas; o foco humano não encerra nem altera a identidade dos hooks. Cada
|
|
73
|
+
iteração automática permanece Markdown válido mesmo quando uma fala precisa ser truncada.
|
|
70
74
|
|
|
71
75
|
## Erros comuns e diagnóstico
|
|
72
76
|
|
|
@@ -81,5 +85,5 @@ O registry mantém um epoch de `SessionStart` por activation e o turno nativo ma
|
|
|
81
85
|
|
|
82
86
|
## Próximos passos
|
|
83
87
|
|
|
84
|
-
Leia [importação retroativa](retroactive-import.md),
|
|
88
|
+
Leia [Perfis de Operação](operating-profiles.md), [importação retroativa](retroactive-import.md),
|
|
85
89
|
[custos e observabilidade](costs-and-observability.md) e [notas](notes-and-knowledge.md).
|
|
@@ -14,12 +14,15 @@ Use depois de implementar as tarefas e novamente sempre que tarefas, specs ou te
|
|
|
14
14
|
## Quando não usar
|
|
15
15
|
|
|
16
16
|
Não use como health check pós-instalação ou quando não existe change. Nesse caso, rode
|
|
17
|
-
`wendkeep doctor` e `wendkeep memory status --gate`.
|
|
17
|
+
`wendkeep doctor` e `wendkeep memory status --gate`. Em `FLOW`, a validação e o recibo pertencem a
|
|
18
|
+
`flow finish`; em `OFF`, `verify` continua disponível apenas quando o usuário escolhe executar o
|
|
19
|
+
lifecycle manualmente.
|
|
18
20
|
|
|
19
21
|
## Pré-requisitos
|
|
20
22
|
|
|
21
23
|
- Change aberta selecionada por `CURRENT_CHANGE.md` ou `--change <slug>`.
|
|
22
|
-
- `tarefas.md` sem placeholders, com tags `[req:]` e `[sensor:]` na linha do checkbox
|
|
24
|
+
- `tarefas.md` sem placeholders, com tags `[req:]` e uma ou mais `[sensor:]` na linha do checkbox;
|
|
25
|
+
todos os IDs distintos de sensor são exigidos uma vez, na ordem declarada.
|
|
23
26
|
- Sensores declarados em `wendkeep.sensors.json`.
|
|
24
27
|
|
|
25
28
|
## Sintaxe
|
|
@@ -34,7 +37,8 @@ npx wendkeep change use <slug>
|
|
|
34
37
|
|
|
35
38
|
- `--change <slug>` mira uma change sem alterar o ponteiro ativo.
|
|
36
39
|
- `change use <slug>` troca o foco persistido para comandos seguintes.
|
|
37
|
-
- `--project <raiz>` define onde os sensores executam; `--vault` define onde a prova é gravada
|
|
40
|
+
- `--project <raiz>` define onde os sensores executam; `--vault` define onde a prova é gravada e é
|
|
41
|
+
propagado aos sensores como `OBSIDIAN_VAULT_PATH`, inclusive no `memory-health`.
|
|
38
42
|
- **Exit 0:** todos os sensores exigidos passaram e a evidência foi gravada.
|
|
39
43
|
- **Exit 1:** o gate executou, mas ao menos um sensor crítico ficou vermelho ou um mutante
|
|
40
44
|
sobreviveu.
|
|
@@ -76,12 +80,14 @@ read-only; o verdict cobre cada `[req:]` antes do archive.
|
|
|
76
80
|
## Erros comuns e diagnóstico
|
|
77
81
|
|
|
78
82
|
- `no change`: isso é exit 2 e estado ocioso válido; crie/use uma change ou não rode verify.
|
|
79
|
-
- Zero
|
|
83
|
+
- Zero/sensores ausentes: confira todas as tags na mesma linha e `sensors list`; várias tags na
|
|
84
|
+
mesma tarefa são válidas e todas entram no gate.
|
|
80
85
|
- Gate vermelho: corrija a causa e repita; não use `archive --force` por conta própria.
|
|
81
86
|
- Verdict stale/ausente: regenere `--deep` e peça novo passe independente.
|
|
82
87
|
- Mutantes sobreviventes: fortaleça o teste discriminante; após três rodadas, revise manualmente.
|
|
83
88
|
|
|
84
89
|
## Próximos passos
|
|
85
90
|
|
|
86
|
-
Volte ao [ciclo de changes](changes-and-verification.md) para archive
|
|
91
|
+
Volte ao [ciclo de changes](changes-and-verification.md) para archive, confira os
|
|
92
|
+
[Perfis de Operação](operating-profiles.md) ou consulte
|
|
87
93
|
[manutenção](maintenance-and-diagnostics.md) quando não houver change.
|