wendkeep 0.58.3 → 0.60.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 +93 -0
- package/README.en.md +45 -3
- package/README.md +45 -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 +2 -0
- package/hooks/vault-runtime-store.mjs +558 -0
- package/package.json +10 -3
- package/packages/cli/package.json +5 -0
- package/packages/harness/package.json +5 -0
- package/packages/integrations/package.json +5 -0
- package/packages/mcp/package.json +5 -0
- package/packages/pi/package.json +5 -0
- package/packages/vault/package.json +6 -0
- package/packages/vault/src/index.mjs +2 -0
- package/packages/vault/src/project-vault.mjs +327 -0
- package/packages/vault/src/vault-path-safety.mjs +558 -0
- 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 +2 -221
- 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
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,99 @@ All notable changes to **wendkeep** are documented here. Format based on
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this project follows
|
|
5
5
|
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.60.0] — 2026-07-27
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **O runtime ganha seis fronteiras físicas internas:** `cli`, `harness`, `vault`, `mcp`,
|
|
12
|
+
`integrations` e `pi` passam a existir como workspaces privados `@wendkeep/*`, mantendo
|
|
13
|
+
`wendkeep` como uma única unidade de instalação e publicação.
|
|
14
|
+
- **O Keep Core inaugura a API programática `wendkeep/vault`.** Binding/resolução do Vault e a
|
|
15
|
+
fronteira segura de paths podem ser importados pelo novo subpath público, incluído e validado no
|
|
16
|
+
tarball.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- **Binding e segurança física agora pertencem a `packages/vault`.** Os paths históricos em
|
|
21
|
+
`src/project-vault.mjs` e `hooks/vault-path-safety.mjs` permanecem como fachadas compatíveis, sem
|
|
22
|
+
alterar CLI, hooks ou dados existentes.
|
|
23
|
+
- **A direção de dependências virou gate estrutural.** O workspace Vault aceita somente built-ins
|
|
24
|
+
Node e módulos internos, impedindo que Keep Core passe a depender de Harness, perfis, changes,
|
|
25
|
+
FLOW, sensores ou CLI.
|
|
26
|
+
|
|
27
|
+
## [0.59.0] — 2026-07-27
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
|
|
31
|
+
- **Perfis de Operação separam memória persistente de governança:** `OFF`, `FLOW`, `GUIDE`,
|
|
32
|
+
`GOVERN` e `ASSURE`, com resolução explícita por sessão ou projeto e fallback conservador para
|
|
33
|
+
`GOVERN`. O novo `wendkeep profile status|use` torna a escolha e sua origem auditáveis.
|
|
34
|
+
- **FLOW executa ajustes pequenos por um microcontrato E → V:** `flow start/status/show/finish`
|
|
35
|
+
exige allowlist e sensores, registra baseline Git e tentativas no Vault e produz um recibo
|
|
36
|
+
terminal imutável sem criar change, ADR ou veredicto independente. `flow promote` preserva a
|
|
37
|
+
evidência ao converter o trabalho em uma change normal, sem `--force`.
|
|
38
|
+
|
|
39
|
+
### Changed
|
|
40
|
+
|
|
41
|
+
- **Keep Core agora é explicitamente inegociável e sempre ativo.** Vault, identidade, sessões,
|
|
42
|
+
CORE, SHARED_MEMORY, lessons e persistência continuam funcionando em todos os perfis; apenas o
|
|
43
|
+
Wend Runtime de governança é desligado em `OFF`. Hooks, skills, `init` e `sync` respeitam a mesma
|
|
44
|
+
fronteira, e instalações novas começam em `GOVERN`.
|
|
45
|
+
- **Artefatos de runtime FLOW vivem em `.brain/runtime/flows/`.** A fronteira arquitetural impede
|
|
46
|
+
dependências do Vault para o harness/perfil e mantém aberta uma modularização física posterior
|
|
47
|
+
em `cli`, `harness`, `vault`, `mcp`, `integration` e `pi`.
|
|
48
|
+
|
|
49
|
+
### Fixed
|
|
50
|
+
|
|
51
|
+
- **Retries concorrentes do mesmo evento de memória convergem durante a publicação.** O perdedor
|
|
52
|
+
do `open(..., 'wx')` tolera por uma janela limitada apenas o JSON ainda parcial do produtor
|
|
53
|
+
vencedor, revalidando a fronteira física do Vault a cada leitura; payload diferente, arquivo
|
|
54
|
+
permanentemente ilegível e aliases inseguros continuam falhando fechado. Fixtures de CLI também
|
|
55
|
+
isolam `WENDKEEP_SENSOR_VAULT`, permitindo que a suíte rode dentro do próprio `verify --vault`.
|
|
56
|
+
- **Handoffs sequenciais da mesma ativação respeitam causalidade.** Um turno mais novo da mesma
|
|
57
|
+
sessão/ativação substitui o anterior em vez de abrir conflito; ativações realmente distintas
|
|
58
|
+
continuam exigindo resolução humana.
|
|
59
|
+
- **Todas as tags de sensor de uma tarefa entram no gate.** `verify` não descarta mais tags
|
|
60
|
+
`[sensor:]` adicionais na mesma linha: IDs distintos executam uma vez, na ordem declarada, e o
|
|
61
|
+
primeiro continua disponível como alias legado para consumidores antigos.
|
|
62
|
+
- **Reconciliação de memória separa reparo estrutural de decisão semântica.** O novo `memory
|
|
63
|
+
reconcile` é dry-run por padrão, reprojeta o ledger sem consumir outbox, distingue cursor físico
|
|
64
|
+
de ordem causal e usa os mesmos invariantes do CORE no projector e no health check. `verify` e
|
|
65
|
+
`flow finish` agora executam sensores contra o Vault efetivamente selecionado. `memory repair`
|
|
66
|
+
reconhece e migra por CAS checkpoints causais válidos pré-0.59, com backup/auditoria, enquanto
|
|
67
|
+
locks owner-aware por PID/token impedem reap de processos vivos e remoção ABA.
|
|
68
|
+
- **Iterações truncadas preservam Markdown válido.** Backticks inline ou fences cortados pelo
|
|
69
|
+
limite de tamanho são escapados antes da escrita e não engolem mais a linha seguinte.
|
|
70
|
+
- **`sync` preserva seu estágio de reparo sem reabrir fallback global.** A CLI não tenta resolver
|
|
71
|
+
o Vault antes do `init`; binding inválido falha fechado nessa primeira etapa, e apenas o vínculo
|
|
72
|
+
validado é repassado a `sync-defs` e `doctor`.
|
|
73
|
+
|
|
74
|
+
### Security
|
|
75
|
+
|
|
76
|
+
- **FLOW falha fechado fora do contrato.** Escapes da allowlist, superfícies protegidas, mudança
|
|
77
|
+
de configuração de sensores, metadata/flags ocultas do Git, sensores críticos vermelhos ou
|
|
78
|
+
mutantes, symlink/junction/reparse/hardlink, submodules e superfícies ignoradas bloqueiam o
|
|
79
|
+
recibo. ProjectRoot/sensor cwd ficam congelados e um snapshot terminal fecha a janela após os
|
|
80
|
+
sensores. Raízes adicionais podem ser declaradas por `harness.flow.protectedRoots`; uma política
|
|
81
|
+
canônica gera classifier, discovery e topologia. Escritas/locks do Vault falham antes de escapar,
|
|
82
|
+
usando owner+lease sem reap de processo vivo ou liberação ABA. Uma descoberta no-follow limitada
|
|
83
|
+
inclui aliases protegidos vazios/ignorados sem entrar no Vault, `.git` ou caches. Promoção
|
|
84
|
+
cross-process elege um dono, vincula semanticamente contrato/reserva/recibo/origem, preflighta
|
|
85
|
+
destinos multi-spec e permite ao perdedor repetir com `--change-slug`. IDs não atravessam o
|
|
86
|
+
runtime root, artefatos corrompidos nunca reabrem o FLOW, não existe `--force`, e promoção nunca
|
|
87
|
+
toma outra change ou repositório. Ledger, outbox, CORE/SHARED, registry, notas, sidecars,
|
|
88
|
+
temporários e backups também falham fechados em aliases físicos ou hardlinks externos.
|
|
89
|
+
- **Supersession ambígua exige autorização auditável e CAS exato.** A aplicação nomeia a sessão
|
|
90
|
+
sucessora e o motivo, prova que cada evento pertence à identidade causal nomeada, rejeita flags
|
|
91
|
+
ambíguas antes de I/O, limita a mutação às duas sessões, preserva o attempt original e cria backup
|
|
92
|
+
exato do registry antes da troca.
|
|
93
|
+
- **Binding ilegível não desliga governança silenciosamente.** Hooks mutantes falham fechados;
|
|
94
|
+
quando um Vault explícito ou legado é inequívoco, Keep Core continua injetado sob fallback
|
|
95
|
+
`GOVERN` junto do diagnóstico de corrupção. Config legada mais próxima inválida, shape tipado
|
|
96
|
+
incorreto, marcador ausente ou identidade divergente não herdam Vault pai/global; `profile`
|
|
97
|
+
expõe `binding_error` e rejeita flags duplicadas/ambíguas antes de I/O. O guard cobre caixa,
|
|
98
|
+
shims locais, entrypoint Node e paths/call operator de Git nos gates force/no-verify.
|
|
99
|
+
|
|
7
100
|
## [0.58.3] — 2026-07-26
|
|
8
101
|
|
|
9
102
|
### Fixed
|
package/README.en.md
CHANGED
|
@@ -13,7 +13,11 @@
|
|
|
13
13
|
|
|
14
14
|
**In the graph:** 🔵 session · 🟣 decision · 🔴 bug · 🟢 learning · 🟡 change — every note, backlinked.
|
|
15
15
|
|
|
16
|
-
**
|
|
16
|
+
**Persistent memory for AI coding agents, built on your Obsidian vault.** Every Claude Code **and Codex** session is captured turn by turn into local Markdown — `init` wires both (Codex asks you to approve its hooks once; `import` backfills past sessions either way) — with token/cost tracking and automatically extracted decisions, bugs, and learnings. That always-on plane is **Keep Core**. On top of it, **Wend Runtime** provides a native, zero-dependency lifecycle (spec → change → TDD → sensor-gated archive), selected through the `OFF`, `FLOW`, `GUIDE`, `GOVERN`, and `ASSURE` Operating Profiles. 100% local, open-core.
|
|
17
|
+
|
|
18
|
+
The runtime is being separated into six physical boundaries — `cli`, `harness`, `vault`, `mcp`,
|
|
19
|
+
`integrations`, and `pi` — without fragmenting installation. Vault is the first extracted surface
|
|
20
|
+
and is importable through `wendkeep/vault`; see the [modular architecture](docs/en/architecture.md).
|
|
17
21
|
|
|
18
22
|
```bash
|
|
19
23
|
npm i -D wendkeep && npx wendkeep init # captures from the next session on
|
|
@@ -120,6 +124,9 @@ one command:
|
|
|
120
124
|
npm install --save-dev wendkeep@latest && npx --no-install wendkeep sync --project . --yes
|
|
121
125
|
```
|
|
122
126
|
|
|
127
|
+
`sync` lets its own `init` stage validate or rebuild the binding before resolving the Vault for
|
|
128
|
+
later stages. An invalid `.wendkeep.json` stops at `init` without falling back to an inherited global Vault.
|
|
129
|
+
|
|
123
130
|
The install stays outside `sync` on purpose: a running process cannot replace itself and
|
|
124
131
|
keep going — the code in memory would still be the old one.
|
|
125
132
|
|
|
@@ -163,6 +170,7 @@ The README is the map; the guides provide syntax, options, exit codes, examples,
|
|
|
163
170
|
| Group | Use it for | Detailed guide |
|
|
164
171
|
|---|---|---|
|
|
165
172
|
| **Installation and updates** | `init`, `sync`, companions, and the first project↔vault binding | [Installation and first use](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/getting-started.md) |
|
|
173
|
+
| **Operating profiles** | `profile`, `flow`, always-on Keep Core, and Wend Runtime governance | [Operating profiles](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/operating-profiles.md) |
|
|
166
174
|
| **Changes and verification** | `change`, specs, sensors, TDD, evidence, and archive | [Changes and verification](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/changes-and-verification.md) |
|
|
167
175
|
| **Shared memory** | CORE, SHARED, status, validation, repair, and curation | [Memory](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/memory.md) |
|
|
168
176
|
| **Sessions and import** | hooks, registry, session focus, and Claude/Codex backfill | [Sessions and import](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/sessions-and-import.md) |
|
|
@@ -174,6 +182,34 @@ Operations that deserve step-by-step guidance: [verify and exits 0/1/2](https://
|
|
|
174
182
|
[legacy-memory migration](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/memory-migration.md), and
|
|
175
183
|
[safe retroactive import](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/retroactive-import.md).
|
|
176
184
|
|
|
185
|
+
## Operating Profiles — Keep Core is always active
|
|
186
|
+
|
|
187
|
+
**Keep Core is always active**: the Vault, sessions, identity, CORE/SHARED, lessons, costs,
|
|
188
|
+
and persistence do not turn off with the harness. **Wend Runtime** controls only the governance
|
|
189
|
+
layer:
|
|
190
|
+
|
|
191
|
+
| Profile | Route | Use |
|
|
192
|
+
|---|---|---|
|
|
193
|
+
| `OFF` | LLM-native harness | No Wend router, skill gate, or gates; explicit selection only. |
|
|
194
|
+
| `FLOW` | E → V | Microcontract with Git baseline, allowlist, sensor, and receipt, without a change. |
|
|
195
|
+
| `GUIDE` | P → E → V | Compact guided change. |
|
|
196
|
+
| `GOVERN` | P → R → E → V | Current a2 loop and compatible fallback. |
|
|
197
|
+
| `ASSURE` | P → R → E → V → C | Governance with confirmation and handoff. |
|
|
198
|
+
|
|
199
|
+
A corrupt binding never selects `OFF`: with one unambiguous explicit or legacy Vault, Keep Core
|
|
200
|
+
remains active under `GOVERN`, the error stays visible, and mutation guards fail closed. Additional
|
|
201
|
+
roots that FLOW must protect can be declared as project-relative paths under
|
|
202
|
+
`harness.flow.protectedRoots` in `.wendkeep.json`; any change below them requires promotion.
|
|
203
|
+
Invalid local config, marker, or identity never silently falls back to a parent/global Vault.
|
|
204
|
+
|
|
205
|
+
`wendkeep profile status/use` makes the choice observable; `wendkeep flow
|
|
206
|
+
start/finish/promote` handles local adjustments without manufacturing an ADR and fails closed on
|
|
207
|
+
physical escapes, Git metadata/hidden flags, mutating sensors, protected surfaces, or incomplete
|
|
208
|
+
session projection. Bounded no-follow discovery sees empty/ignored protected aliases; Vault writes
|
|
209
|
+
and owner+lease locks validate physical topology. Concurrent promotion elects one owner and supports
|
|
210
|
+
retry through `--change-slug`. Read the complete
|
|
211
|
+
[Operating profiles guide](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/operating-profiles.md).
|
|
212
|
+
|
|
177
213
|
## Shared Project Memory v2
|
|
178
214
|
|
|
179
215
|
Hot memory now separates human authorship, operational state, and evidence:
|
|
@@ -211,7 +247,13 @@ ledger, SHARED, and checkpoint: `degraded` with a durable outbox is a warning; a
|
|
|
211
247
|
lost publication, or mismatched checkpoint blocks. See [migration](docs/en/commands/memory-migration.md)
|
|
212
248
|
and [diagnostics](docs/en/commands/maintenance-and-diagnostics.md).
|
|
213
249
|
|
|
214
|
-
If status blocks, preserve the evidence and run `wendkeep memory repair --vault <vault>` to
|
|
250
|
+
If status blocks, preserve the evidence and run `wendkeep memory repair --vault <vault>` to back up
|
|
251
|
+
the corrupt ledger, retain valid lines, and re-project. Repair never reclassifies attempts. A
|
|
252
|
+
valid pre-0.59 causal checkpoint is CAS-migrated to the physical boundary with backup/audit. A
|
|
253
|
+
demonstrably superseded ambiguity uses `memory reconcile <session> --by-session <successor>
|
|
254
|
+
--reason <reason>` as a dry run and requires `--apply`; the decision is backed up and audited
|
|
255
|
+
without rewriting ledger, CORE, or notes. Run `status --gate` again afterwards. Conflicts require
|
|
256
|
+
explicit curation with `memory promote <id>` or `memory reject <id>`; doctor only diagnoses.
|
|
215
257
|
|
|
216
258
|
Session notes use one live `## Agentes, tokens e custos` snapshot. Main-agent and subagent hooks recompose it atomically, with costs, token dimensions, reasoning tokens and effort per model/source. Every hook that rewrites a session note takes a per-file lock and writes through a temp file + rename, so the `SubagentStop` fan-out (one hook run per subagent) can never leave a note half-written; a note whose frontmatter reads back damaged is left untouched rather than patched.
|
|
217
259
|
|
|
@@ -279,7 +321,7 @@ explore → propose → apply (TDD) → verify → archive
|
|
|
279
321
|
```
|
|
280
322
|
|
|
281
323
|
- **Propose** — `wendkeep change new <slug>` scaffolds `08-Mudanças/<slug>/` (`proposta.md`, `design.md`, `tarefas.md`; `--simple` skips the design). It becomes the global *current* change. When the change declares `spec_impact: required`, you author the delta yourself at `specs/<capability>/spec.md` — there is no placeholder to delete. Multiple changes may remain open: `change list`/`status` and the hooks show every pending one, while commands without `--change` act on the current one alone. `change use <slug>` changes focus and `change continue <archived> <new>` creates an auditable continuation.
|
|
282
|
-
- **Apply** — implement each `tarefas.md` task.
|
|
324
|
+
- **Apply** — implement each `tarefas.md` task. Mark machine proof with one or more `[sensor:<id>]` tags on the same task: every distinct ID enters the gate once, in declaration order. Also mark satisfied requirements with one or more `[req:<ID>]` tags.
|
|
283
325
|
- **Verify** — `wendkeep verify` runs the sensors your tasks declared (from `wendkeep.sensors.json` at the project root) and writes `evidencia.json`. A red `critical` fails the gate; a red `warning` is advisory. `verify --deep` builds a self-contained package with complete effective requirements (living contract + this change's delta), so the independent verifier never needs to reconstruct unarchived requirements from `07-Specs`. Every change needs a `verdict.json` to archive; `verify --deep` writes a trivial one automatically when the change declares no `[req:]`.
|
|
284
326
|
- **Archive** — `wendkeep change archive <slug>` **gates** on the evidence (blocks unless every declared critical sensor is green), promotes each capability's spec delta (`ADDED`/`MODIFIED`/`REMOVED`) into the living `07-Specs/<capability>.md`, moves the change to `_arquivo/`, and mints an ADR in `04-Decisões/`.
|
|
285
327
|
|
package/README.md
CHANGED
|
@@ -13,7 +13,11 @@
|
|
|
13
13
|
|
|
14
14
|
**In the graph:** 🔵 session · 🟣 decision · 🔴 bug · 🟢 learning · 🟡 change — every note, backlinked.
|
|
15
15
|
|
|
16
|
-
**
|
|
16
|
+
**Persistent memory for AI coding agents, built on your Obsidian vault.** Every Claude Code **and Codex** session is captured turn by turn into local Markdown — `init` wires both (Codex asks you to approve its hooks once; `import` backfills past sessions either way) — with token/cost tracking and automatically extracted decisions, bugs, and learnings. That always-on plane is **Keep Core**. On top of it, **Wend Runtime** provides a native, zero-dependency lifecycle (spec → change → TDD → sensor-gated archive), selected through the `OFF`, `FLOW`, `GUIDE`, `GOVERN`, and `ASSURE` Operating Profiles. 100% local, open-core.
|
|
17
|
+
|
|
18
|
+
The runtime is being separated into six physical boundaries — `cli`, `harness`, `vault`, `mcp`,
|
|
19
|
+
`integrations`, and `pi` — without fragmenting installation. Vault is the first extracted surface
|
|
20
|
+
and is importable through `wendkeep/vault`; see the [modular architecture](docs/en/architecture.md).
|
|
17
21
|
|
|
18
22
|
```bash
|
|
19
23
|
npm i -D wendkeep && npx wendkeep init # captures from the next session on
|
|
@@ -120,6 +124,9 @@ one command:
|
|
|
120
124
|
npm install --save-dev wendkeep@latest && npx --no-install wendkeep sync --project . --yes
|
|
121
125
|
```
|
|
122
126
|
|
|
127
|
+
`sync` lets its own `init` stage validate or rebuild the binding before resolving the Vault for
|
|
128
|
+
later stages. An invalid `.wendkeep.json` stops at `init` without falling back to an inherited global Vault.
|
|
129
|
+
|
|
123
130
|
The install stays outside `sync` on purpose: a running process cannot replace itself and
|
|
124
131
|
keep going — the code in memory would still be the old one.
|
|
125
132
|
|
|
@@ -163,6 +170,7 @@ The README is the map; the guides provide syntax, options, exit codes, examples,
|
|
|
163
170
|
| Group | Use it for | Detailed guide |
|
|
164
171
|
|---|---|---|
|
|
165
172
|
| **Installation and updates** | `init`, `sync`, companions, and the first project↔vault binding | [Installation and first use](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/getting-started.md) |
|
|
173
|
+
| **Operating profiles** | `profile`, `flow`, always-on Keep Core, and Wend Runtime governance | [Operating profiles](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/operating-profiles.md) |
|
|
166
174
|
| **Changes and verification** | `change`, specs, sensors, TDD, evidence, and archive | [Changes and verification](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/changes-and-verification.md) |
|
|
167
175
|
| **Shared memory** | CORE, SHARED, status, validation, repair, and curation | [Memory](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/memory.md) |
|
|
168
176
|
| **Sessions and import** | hooks, registry, session focus, and Claude/Codex backfill | [Sessions and import](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/sessions-and-import.md) |
|
|
@@ -174,6 +182,34 @@ Operations that deserve step-by-step guidance: [verify and exits 0/1/2](https://
|
|
|
174
182
|
[legacy-memory migration](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/memory-migration.md), and
|
|
175
183
|
[safe retroactive import](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/retroactive-import.md).
|
|
176
184
|
|
|
185
|
+
## Operating Profiles — Keep Core is always active
|
|
186
|
+
|
|
187
|
+
**Keep Core is always active**: the Vault, sessions, identity, CORE/SHARED, lessons, costs,
|
|
188
|
+
and persistence do not turn off with the harness. **Wend Runtime** controls only the governance
|
|
189
|
+
layer:
|
|
190
|
+
|
|
191
|
+
| Profile | Route | Use |
|
|
192
|
+
|---|---|---|
|
|
193
|
+
| `OFF` | LLM-native harness | No Wend router, skill gate, or gates; explicit selection only. |
|
|
194
|
+
| `FLOW` | E → V | Microcontract with Git baseline, allowlist, sensor, and receipt, without a change. |
|
|
195
|
+
| `GUIDE` | P → E → V | Compact guided change. |
|
|
196
|
+
| `GOVERN` | P → R → E → V | Current a2 loop and compatible fallback. |
|
|
197
|
+
| `ASSURE` | P → R → E → V → C | Governance with confirmation and handoff. |
|
|
198
|
+
|
|
199
|
+
A corrupt binding never selects `OFF`: with one unambiguous explicit or legacy Vault, Keep Core
|
|
200
|
+
remains active under `GOVERN`, the error stays visible, and mutation guards fail closed. Additional
|
|
201
|
+
roots that FLOW must protect can be declared as project-relative paths under
|
|
202
|
+
`harness.flow.protectedRoots` in `.wendkeep.json`; any change below them requires promotion.
|
|
203
|
+
Invalid local config, marker, or identity never silently falls back to a parent/global Vault.
|
|
204
|
+
|
|
205
|
+
`wendkeep profile status/use` makes the choice observable; `wendkeep flow
|
|
206
|
+
start/finish/promote` handles local adjustments without manufacturing an ADR and fails closed on
|
|
207
|
+
physical escapes, Git metadata/hidden flags, mutating sensors, protected surfaces, or incomplete
|
|
208
|
+
session projection. Bounded no-follow discovery sees empty/ignored protected aliases; Vault writes
|
|
209
|
+
and owner+lease locks validate physical topology. Concurrent promotion elects one owner and supports
|
|
210
|
+
retry through `--change-slug`. Read the complete
|
|
211
|
+
[Operating profiles guide](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/operating-profiles.md).
|
|
212
|
+
|
|
177
213
|
## Shared Project Memory v2
|
|
178
214
|
|
|
179
215
|
Hot memory now separates human authorship, operational state, and evidence:
|
|
@@ -211,7 +247,13 @@ ledger, SHARED, and checkpoint: `degraded` with a durable outbox is a warning; a
|
|
|
211
247
|
lost publication, or mismatched checkpoint blocks. See [migration](docs/en/commands/memory-migration.md)
|
|
212
248
|
and [diagnostics](docs/en/commands/maintenance-and-diagnostics.md).
|
|
213
249
|
|
|
214
|
-
If status blocks, preserve the evidence and run `wendkeep memory repair --vault <vault>` to
|
|
250
|
+
If status blocks, preserve the evidence and run `wendkeep memory repair --vault <vault>` to back up
|
|
251
|
+
the corrupt ledger, retain valid lines, and re-project. Repair never reclassifies attempts. A
|
|
252
|
+
valid pre-0.59 causal checkpoint is CAS-migrated to the physical boundary with backup/audit. A
|
|
253
|
+
demonstrably superseded ambiguity uses `memory reconcile <session> --by-session <successor>
|
|
254
|
+
--reason <reason>` as a dry run and requires `--apply`; the decision is backed up and audited
|
|
255
|
+
without rewriting ledger, CORE, or notes. Run `status --gate` again afterwards. Conflicts require
|
|
256
|
+
explicit curation with `memory promote <id>` or `memory reject <id>`; doctor only diagnoses.
|
|
215
257
|
|
|
216
258
|
Session notes use one live `## Agentes, tokens e custos` snapshot. Main-agent and subagent hooks recompose it atomically, with costs, token dimensions, reasoning tokens and effort per model/source. Every hook that rewrites a session note takes a per-file lock and writes through a temp file + rename, so the `SubagentStop` fan-out (one hook run per subagent) can never leave a note half-written; a note whose frontmatter reads back damaged is left untouched rather than patched.
|
|
217
259
|
|
|
@@ -279,7 +321,7 @@ explore → propose → apply (TDD) → verify → archive
|
|
|
279
321
|
```
|
|
280
322
|
|
|
281
323
|
- **Propose** — `wendkeep change new <slug>` scaffolds `08-Mudanças/<slug>/` (`proposta.md`, `design.md`, `tarefas.md`; `--simple` skips the design). It becomes the global *current* change. When the change declares `spec_impact: required`, you author the delta yourself at `specs/<capability>/spec.md` — there is no placeholder to delete. Multiple changes may remain open: `change list`/`status` and the hooks show every pending one, while commands without `--change` act on the current one alone. `change use <slug>` changes focus and `change continue <archived> <new>` creates an auditable continuation.
|
|
282
|
-
- **Apply** — implement each `tarefas.md` task.
|
|
324
|
+
- **Apply** — implement each `tarefas.md` task. Mark machine proof with one or more `[sensor:<id>]` tags on the same task: every distinct ID enters the gate once, in declaration order. Also mark satisfied requirements with one or more `[req:<ID>]` tags.
|
|
283
325
|
- **Verify** — `wendkeep verify` runs the sensors your tasks declared (from `wendkeep.sensors.json` at the project root) and writes `evidencia.json`. A red `critical` fails the gate; a red `warning` is advisory. `verify --deep` builds a self-contained package with complete effective requirements (living contract + this change's delta), so the independent verifier never needs to reconstruct unarchived requirements from `07-Specs`. Every change needs a `verdict.json` to archive; `verify --deep` writes a trivial one automatically when the change declares no `[req:]`.
|
|
284
326
|
- **Archive** — `wendkeep change archive <slug>` **gates** on the evidence (blocks unless every declared critical sensor is green), promotes each capability's spec delta (`ADDED`/`MODIFIED`/`REMOVED`) into the living `07-Specs/<capability>.md`, moves the change to `_arquivo/`, and mints an ADR in `04-Decisões/`.
|
|
285
327
|
|
package/bin/wendkeep.mjs
CHANGED
|
@@ -22,12 +22,13 @@ function version() {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
const HELP = `wendkeep ${version()} —
|
|
25
|
+
const HELP = `wendkeep ${version()} — keep durable AI sessions in an Obsidian vault, with optional governance.
|
|
26
26
|
|
|
27
27
|
Usage:
|
|
28
28
|
wendkeep init [options] Set up wendkeep in a project (cross-platform).
|
|
29
29
|
--vault <path> Obsidian vault folder (default: <project>/.<project-name>-vault).
|
|
30
30
|
--project <path> Project root to wire (default: current directory).
|
|
31
|
+
--profile <name> Operating profile: OFF, FLOW, GUIDE, GOVERN (default), or ASSURE.
|
|
31
32
|
--no-mcp Do not add the mcpvault MCP server to .mcp.json.
|
|
32
33
|
--companions <csv> Companion plugins/MCP to pin: context-mode,caveman,understand-anything
|
|
33
34
|
(default: none — opt in explicitly). dotcontext is legacy — the native a2 loop replaces it.
|
|
@@ -46,7 +47,7 @@ Usage:
|
|
|
46
47
|
command — the three steps that repeat identically after every
|
|
47
48
|
package update. Stops at the first failing step. Install the
|
|
48
49
|
package first (npm i -D wendkeep@latest); a running process
|
|
49
|
-
cannot replace itself. · --vault P · --yes.
|
|
50
|
+
cannot replace itself. · --vault P · --profile <name> · --yes.
|
|
50
51
|
|
|
51
52
|
wendkeep doctor [--vault P] Run a vault health check.
|
|
52
53
|
wendkeep change <sub> Change lifecycle: new [--simple] | use | bind <slug> --session <id> | continue | list | show |
|
|
@@ -56,6 +57,11 @@ Usage:
|
|
|
56
57
|
wendkeep theme sync Re-aplica o color system (snippet CSS + graph color groups) num vault
|
|
57
58
|
existente — recupera o grafo cinza sem re-init. --vault P.
|
|
58
59
|
wendkeep session <sub> Session registry: list | show <id> | use <id>.
|
|
60
|
+
wendkeep profile <sub> Operating profile: status | use <OFF|FLOW|GUIDE|GOVERN|ASSURE>.
|
|
61
|
+
--session <id> sets an audited session override; otherwise changes
|
|
62
|
+
the project default. The Vault/session/memory core is always active.
|
|
63
|
+
wendkeep flow <sub> Low-ceremony E -> V contract: start | status | show | finish | promote.
|
|
64
|
+
FLOW records scope, sensors and a receipt without creating a change.
|
|
59
65
|
wendkeep spec <sub> Specs: list | show | effective [--change] [--json] | migrate | rebase.
|
|
60
66
|
wendkeep sensors <sub> list | add <id> "<command>" [--severity --type --report].
|
|
61
67
|
wendkeep cost [opts] Aggregate AI-coding spend across the vault's sessions.
|
|
@@ -95,7 +101,9 @@ Usage:
|
|
|
95
101
|
behind the closing block. Dry-run by default · --apply · --json.
|
|
96
102
|
wendkeep lesson add "t" "l" Record a project-local lesson (injected at SessionStart).
|
|
97
103
|
wendkeep memory <sub> Shared memory v2: status | migrate [--apply] | repair |
|
|
104
|
+
reconcile <session> --by-session <session> --reason <text> [--apply] |
|
|
98
105
|
promote <candidate> | reject <candidate>. --vault P.
|
|
106
|
+
Reconcile is dry-run by default; the original attempt remains audited.
|
|
99
107
|
wendkeep validate-memory [path] Validate .brain/CORE.md against the compaction
|
|
100
108
|
protocol (cap 25, 3 sections, no secrets/PII).
|
|
101
109
|
--vault <path> validates the complete v2 bundle.
|
|
@@ -142,11 +150,25 @@ async function preferProjectVault(argv) {
|
|
|
142
150
|
if (optionValue(argv, '--vault')) return;
|
|
143
151
|
try {
|
|
144
152
|
const { resolveProjectVault } = await import('../src/project-vault.mjs');
|
|
153
|
+
// A sensor may itself invoke WendKeep. `verify`/`flow finish` already selected the
|
|
154
|
+
// authoritative Vault explicitly, so preserve that choice across the child process
|
|
155
|
+
// instead of letting the sensor cwd's project binding redirect it.
|
|
156
|
+
const sensorVault = process.env.WENDKEEP_SENSOR_VAULT;
|
|
157
|
+
if (sensorVault) {
|
|
158
|
+
const selected = resolveProjectVault({
|
|
159
|
+
startDir: optionValue(argv, '--project') || process.cwd(),
|
|
160
|
+
explicitVault: sensorVault,
|
|
161
|
+
});
|
|
162
|
+
process.env.OBSIDIAN_VAULT_PATH = selected.base;
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
145
165
|
const resolved = resolveProjectVault({ startDir: optionValue(argv, '--project') || process.cwd() });
|
|
146
166
|
process.env.OBSIDIAN_VAULT_PATH = resolved.base;
|
|
147
|
-
} catch {
|
|
167
|
+
} catch (error) {
|
|
148
168
|
// Backward-compatible manual CLI behavior: individual commands still explain
|
|
149
|
-
// --vault / legacy env when no project binding exists.
|
|
169
|
+
// --vault / legacy env only when no project binding exists. A configured but
|
|
170
|
+
// corrupt/missing/mismatched binding must abort before dispatch to another Vault.
|
|
171
|
+
if (error?.code !== 'WENDKEEP_VAULT_UNCONFIGURED') throw error;
|
|
150
172
|
}
|
|
151
173
|
}
|
|
152
174
|
|
|
@@ -156,10 +178,26 @@ async function main() {
|
|
|
156
178
|
// Intercepted BEFORE vault resolution so it works anywhere — help must never depend
|
|
157
179
|
// on project state, and no command may treat --help as a runnable default.
|
|
158
180
|
if (cmd && (rest.includes('--help') || rest.includes('-h'))) {
|
|
159
|
-
|
|
181
|
+
if (cmd === 'flow') {
|
|
182
|
+
const { FLOW_HELP } = await import('../src/flow.mjs');
|
|
183
|
+
process.stdout.write(FLOW_HELP);
|
|
184
|
+
} else if (cmd === 'profile') {
|
|
185
|
+
const { PROFILE_HELP } = await import('../src/profile.mjs');
|
|
186
|
+
process.stdout.write(PROFILE_HELP);
|
|
187
|
+
} else {
|
|
188
|
+
process.stdout.write(HELP);
|
|
189
|
+
}
|
|
160
190
|
process.exit(0);
|
|
161
191
|
}
|
|
162
|
-
|
|
192
|
+
const validatesStandaloneCore = cmd === 'validate-memory'
|
|
193
|
+
&& !rest.includes('--vault')
|
|
194
|
+
&& !rest.some((item) => item.startsWith('--vault='));
|
|
195
|
+
if (cmd
|
|
196
|
+
&& !validatesStandaloneCore
|
|
197
|
+
// `sync` starts with `init` and resolves the freshly bound Vault itself. Pre-resolving
|
|
198
|
+
// here would prevent that repair step from reporting a corrupt binding as its own
|
|
199
|
+
// first-stage failure (and could never make it as far as the guarded init).
|
|
200
|
+
&& !['init', 'sync', 'hook', '--version', '-v', '--help', '-h', 'help'].includes(cmd)) {
|
|
163
201
|
await preferProjectVault(rest);
|
|
164
202
|
}
|
|
165
203
|
switch (cmd) {
|
|
@@ -211,6 +249,16 @@ async function main() {
|
|
|
211
249
|
runSession(rest);
|
|
212
250
|
break;
|
|
213
251
|
}
|
|
252
|
+
case 'profile': {
|
|
253
|
+
const { runProfile } = await import('../src/profile.mjs');
|
|
254
|
+
process.exit(runProfile(rest));
|
|
255
|
+
break;
|
|
256
|
+
}
|
|
257
|
+
case 'flow': {
|
|
258
|
+
const { runFlow } = await import('../src/flow.mjs');
|
|
259
|
+
process.exit(await runFlow(rest));
|
|
260
|
+
break;
|
|
261
|
+
}
|
|
214
262
|
case 'theme': {
|
|
215
263
|
const { runTheme } = await import('../src/theme.mjs');
|
|
216
264
|
runTheme(rest);
|
|
@@ -14,6 +14,9 @@ Use for any non-trivial implementation or fix that must leave auditable proof.
|
|
|
14
14
|
## When not to use
|
|
15
15
|
|
|
16
16
|
Do not create a change merely to inspect health, import sessions, or run read-only maintenance.
|
|
17
|
+
For local maintenance eligible for the `FLOW` profile, use the microcontract in
|
|
18
|
+
[Operating profiles](operating-profiles.md); under `OFF`, the lifecycle remains available but is
|
|
19
|
+
not imposed by Wend Runtime.
|
|
17
20
|
|
|
18
21
|
## Prerequisites
|
|
19
22
|
|
|
@@ -32,7 +35,8 @@ npx wendkeep change archive <slug>
|
|
|
32
35
|
|
|
33
36
|
## Options and exit codes
|
|
34
37
|
|
|
35
|
-
- `wendkeep change new <slug> [--simple]` creates
|
|
38
|
+
- `wendkeep change new <slug> [--simple]` creates a change; `--simple` only skips design, is not
|
|
39
|
+
`FLOW`, and preserves the legacy lifecycle/ADR contract.
|
|
36
40
|
- `change use`, `list`, `show`, `status`, `diff`, `done`, and `undone` inspect or update work
|
|
37
41
|
without archiving it.
|
|
38
42
|
- `change continue <archived> <new>` starts follow-up work without inheriting stale proof.
|
|
@@ -70,10 +74,12 @@ and mints an ADR. Archive passes only with closed tasks, green required sensors,
|
|
|
70
74
|
|
|
71
75
|
- `no change`: select one with `change use <slug>` or pass `--change`.
|
|
72
76
|
- `spec_impact: pending`: choose `required` with a delta or `none` with a real reason.
|
|
73
|
-
- Sensor not executed: keep `[sensor:id]` on the same checkbox line
|
|
77
|
+
- Sensor not executed: keep one or more `[sensor:id]` tags on the same checkbox line. Every
|
|
78
|
+
distinct ID on that line is required and runs once, in declaration order.
|
|
74
79
|
- Stale evidence: rerun `verify` and `verify --deep` after task/spec edits.
|
|
75
80
|
- Rebase conflict: resolve the delta or use `--accept-current` only when that is the decision.
|
|
76
81
|
|
|
77
82
|
## Next steps
|
|
78
83
|
|
|
79
|
-
Read the deep [verify guide](verify.md) and
|
|
84
|
+
Read [Operating profiles](operating-profiles.md), the deep [verify guide](verify.md), and
|
|
85
|
+
[maintenance and diagnostics](maintenance-and-diagnostics.md).
|
|
@@ -27,18 +27,22 @@ Do not run `init --force` as a generic repair for memory or unreadable configura
|
|
|
27
27
|
```bash
|
|
28
28
|
npm install --save-dev wendkeep
|
|
29
29
|
npx wendkeep init [options]
|
|
30
|
-
npx wendkeep sync [--project <root>] [--vault <vault>] [--yes]
|
|
30
|
+
npx wendkeep sync [--project <root>] [--vault <vault>] [--profile <profile>] [--yes]
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
## Options and exit codes
|
|
34
34
|
|
|
35
35
|
- `--vault <path>` selects the vault; otherwise the local `.wendkeep.json` binding wins.
|
|
36
36
|
- `--project <path>` selects the project root.
|
|
37
|
+
- `--profile <OFF|FLOW|GUIDE|GOVERN|ASSURE>` selects the Operating Profile; new installs use
|
|
38
|
+
`GOVERN`, re-init/sync without the flag preserves the existing choice, and `OFF` is never inferred.
|
|
37
39
|
- `--no-mcp`, `--no-colors`, and `--no-companions` disable optional integrations.
|
|
38
40
|
- `--companions <csv>` explicitly enables companion integrations.
|
|
39
41
|
- `--yes` accepts non-interactive defaults; `--force` refreshes managed blocks only.
|
|
40
42
|
- Exit `0` means setup/sync completed. Any other exit identifies the failed stage. `sync` stops at
|
|
41
43
|
`init`, `sync-defs`, or `doctor` instead of hiding the error.
|
|
44
|
+
- `sync` does not pre-resolve the Vault before `init`: an invalid binding fails closed at that first
|
|
45
|
+
stage, and only a validated binding reaches `sync-defs` and `doctor`; no global fallback is used.
|
|
42
46
|
|
|
43
47
|
## Examples
|
|
44
48
|
|
|
@@ -46,7 +50,7 @@ First installation in the current project:
|
|
|
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
|
Later update:
|
|
@@ -60,7 +64,7 @@ With pnpm, pin a concrete version because minimum-release-age policies may keep
|
|
|
60
64
|
behind:
|
|
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 @@ Pass the vault explicitly in automation. Preserve backups and evidence before re
|
|
|
25
25
|
```bash
|
|
26
26
|
npx wendkeep memory status [--gate] --vault <vault>
|
|
27
27
|
npx wendkeep memory repair --vault <vault>
|
|
28
|
+
npx wendkeep memory reconcile <ambiguous-session> --by-session <successor-session> --reason <reason> [--apply] --vault <vault>
|
|
28
29
|
npx wendkeep memory promote <candidate> --vault <vault>
|
|
29
30
|
npx wendkeep memory reject <candidate> --vault <vault>
|
|
30
31
|
npx wendkeep validate-memory [CORE-path]
|
|
@@ -44,7 +45,20 @@ npx wendkeep validate-memory --vault <v2-vault>
|
|
|
44
45
|
- A valid legacy vault warns and exits `0`. For v2, status correlates `last_memory_attempt`,
|
|
45
46
|
disposition, outbox, ledger, SHARED, and checkpoint: an ambiguous attempt, lost publication, or
|
|
46
47
|
mismatched checkpoint blocks; `degraded` with an intact outbox is a warning.
|
|
47
|
-
- `memory repair` locks, writes a `.bak`, retains
|
|
48
|
+
- `memory repair` is structural only: it uses PID/token-owned locks, writes a `.bak`, retains
|
|
49
|
+
valid events, and reprojects state. When it recognizes a valid pre-0.59 checkpoint whose cursor
|
|
50
|
+
is causal, it CAS-migrates it to the physical boundary with backup/audit; it never reclassifies
|
|
51
|
+
registry attempts or accepts a tuple that cannot be fully re-derived.
|
|
52
|
+
- `memory reconcile` is a dry run by default. `--apply` requires two named sessions plus a reason,
|
|
53
|
+
CAS-checks the exact attempt, backs up the registry, and limits mutation to the ambiguous attempt
|
|
54
|
+
and its successor. Replay is CORE-aware, checkpoints use the physical ledger cursor, and the
|
|
55
|
+
command neither rewrites ledger/CORE/notes nor consumes the outbox. Retrying the same applied
|
|
56
|
+
decision is idempotent.
|
|
57
|
+
- Every memory path validates the physical topology of `.brain`, ledger, outbox, CORE, SHARED,
|
|
58
|
+
candidates, registry, notes, backups, temporary files, and sidecars before reading or writing.
|
|
59
|
+
Junctions, symlinks, reparse points, or hardlinks fail closed without touching external bytes.
|
|
60
|
+
Locks publish owner and lease atomically, never reap a live PID by age alone, and release only
|
|
61
|
+
the lease they acquired.
|
|
48
62
|
- `promote`/`reject` append auditable decisions and never rewrite the ledger in place.
|
|
49
63
|
- `validate-memory <CORE.md>` checks the 25-line cap, required sections, and secrets.
|
|
50
64
|
- `validate-memory --vault` requires a complete v2 bundle and is not the legacy-vault gate.
|
|
@@ -53,6 +67,8 @@ npx wendkeep validate-memory --vault <v2-vault>
|
|
|
53
67
|
|
|
54
68
|
```bash
|
|
55
69
|
npx wendkeep memory status --gate --vault .MyApp-vault
|
|
70
|
+
npx wendkeep memory reconcile old --by-session current --reason "delivery continued" --vault .MyApp-vault
|
|
71
|
+
npx wendkeep memory reconcile old --by-session current --reason "delivery continued" --apply --vault .MyApp-vault
|
|
56
72
|
npx wendkeep validate-memory .MyApp-vault/.brain/CORE.md
|
|
57
73
|
npx wendkeep memory promote candidate-123 --vault .MyApp-vault
|
|
58
74
|
```
|
|
@@ -73,7 +89,9 @@ of a global projection that has already advanced with concurrent events.
|
|
|
73
89
|
let idempotent replay finish. An event ID absent from both locations means lost publication.
|
|
74
90
|
- An `ambiguous` attempt, an `applied` attempt without event IDs, a `projected` event found only in
|
|
75
91
|
the outbox, or a mismatched checkpoint is blocking: preserve the artifacts and investigate
|
|
76
|
-
before repair.
|
|
92
|
+
before repair. If the ambiguity is demonstrably superseded by a successor session, inspect the
|
|
93
|
+
`memory reconcile` dry run before authorizing `--apply`; the command fails when the ambiguous
|
|
94
|
+
attempt already contains event IDs.
|
|
77
95
|
- Ordinary pending candidate: recoverable warning, requiring human choice when appropriate.
|
|
78
96
|
- Missing `event_cursor` or mismatched v2 hash: preserve the bundle and assess `memory repair`.
|
|
79
97
|
- `validate-memory --vault` fails on legacy: validate CORE only or migrate first.
|