wendkeep 0.66.4 → 0.67.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.
Files changed (40) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.en.md +78 -5
  3. package/README.md +78 -5
  4. package/docs/en/commands/costs-and-observability.md +21 -7
  5. package/docs/en/commands/maintenance-and-diagnostics.md +13 -1
  6. package/docs/en/commands/operating-profiles.md +65 -10
  7. package/docs/en/commands/sessions-and-import.md +22 -1
  8. package/docs/en/commands/verify.md +5 -3
  9. package/docs/pt-BR/commands/costs-and-observability.md +21 -7
  10. package/docs/pt-BR/commands/maintenance-and-diagnostics.md +12 -1
  11. package/docs/pt-BR/commands/operating-profiles.md +66 -11
  12. package/docs/pt-BR/commands/sessions-and-import.md +20 -0
  13. package/docs/pt-BR/commands/verify.md +6 -3
  14. package/hooks/change-nag.mjs +8 -0
  15. package/hooks/codex-rollout-meta.mjs +112 -0
  16. package/hooks/codex-subagent-graph.mjs +903 -0
  17. package/hooks/harness-doctor.mjs +82 -1
  18. package/hooks/import-sessions.mjs +185 -50
  19. package/hooks/operating-profile-runtime.mjs +36 -2
  20. package/hooks/operating-profile-task-store.mjs +77 -0
  21. package/hooks/session-identity.mjs +40 -5
  22. package/hooks/session-observability-lifecycle.mjs +129 -0
  23. package/hooks/session-observability-state.mjs +241 -0
  24. package/hooks/session-observability-store.mjs +436 -0
  25. package/hooks/session-observability.mjs +647 -21
  26. package/hooks/session-stop.mjs +339 -11
  27. package/hooks/subagent-stop.mjs +266 -12
  28. package/hooks/subagent-usage.mjs +65 -0
  29. package/hooks/token-usage.mjs +81 -4
  30. package/package.json +3 -3
  31. package/packages/harness/src/operating-profile.mjs +127 -0
  32. package/packages/harness/src/sensors-core.mjs +41 -1
  33. package/packages/integrations/src/prompt-content.mjs +123 -0
  34. package/packages/integrations/src/transcripts.mjs +16 -10
  35. package/src/cost.mjs +40 -6
  36. package/src/doctor.mjs +4 -1
  37. package/src/profile.mjs +95 -17
  38. package/src/rebuild-costs.mjs +220 -34
  39. package/src/skills-seed.mjs +38 -2
  40. package/src/sync-defs.mjs +6 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,56 @@ 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.67.0] — 2026-08-01
8
+
9
+ ### Added
10
+
11
+ - **O harness da LLM pode selecionar uma rota Wend temporária por solicitação.**
12
+ `profile route <FLOW|GUIDE|GOVERN|ASSURE> --session <id> --reason <texto>` grava uma lease
13
+ auditável ligada ao prompt atual, sem alterar o perfil persistente do projeto ou da sessão.
14
+ `OFF` permanece exclusivamente humano e é rejeitado na seleção adaptativa. Contexto sem prompt
15
+ causal completo e coincidente no registry falha antes de mutar, e `profile status --session`
16
+ mostra perfil-base e estado da lease também na saída humana.
17
+ - **A lease expira causalmente sem interromper implementações longas.** Um Stop aceito a consome
18
+ por CAS; bloqueio/retry a preserva, e o próximo prompt restaura o perfil-base mesmo depois de
19
+ crash ou hook ausente. Skills e AGENTS gerados ensinam a matriz FLOW/GUIDE/GOVERN/ASSURE.
20
+
21
+ ### Fixed
22
+
23
+ - **Sessões Obsidian não renderizam envelopes internos do assistente como HTML.** A captura remove
24
+ metadata completa ou truncada de citação somente das respostas do assistente e escapa tags
25
+ XML-like nas linhas geradas, preservando relatos do usuário e autolinks HTTP(S). Reimport e
26
+ `SessionStop` convergem no mesmo normalizador idempotente, e o encerramento migra somente campos
27
+ gerados reconhecíveis de notas antigas sem reescrever prosa autoral.
28
+ - **README e guias bilíngues explicam as letras `P/R/E/V/C` e a duração das escolhas.** A
29
+ documentação distingue `profile use` persistente de `profile route` por solicitação e deixa
30
+ explícito que a classificação semântica pertence ao harness, não a heurísticas do runtime.
31
+ - **Sensores vermelhos deixam diagnóstico acionável sem persistir logs verdes.** O runner captura
32
+ stdout/stderr com limite, redige segredos e grava no máximo 2.000 caracteres apenas na entrada
33
+ vermelha de `evidencia.json`, em vez de descartar a causa da falha.
34
+
35
+ ## [0.66.5] — 2026-08-01
36
+
37
+ ### Fixed
38
+
39
+ - **A observabilidade Codex passa a registrar o grafo completo de subagentes.** Metadata é
40
+ lida incrementalmente mesmo em rollouts grandes; descendentes em dias posteriores ou níveis
41
+ aninhados são atribuídos uma única vez, enquanto transcripts top-level permanecem no bucket
42
+ principal e sinais duplicados ou atrasados não regridem o snapshot publicado.
43
+ - **SessionStop e SubagentStop convergem sob frontier causal e estado explícito.** O schema 2
44
+ distingue `complete`, `none` e `degraded`, coalesce rajadas com lease, preserva o último
45
+ snapshot íntegro diante de fonte incompleta e mantém cache/runtime reconstruíveis sem publicar
46
+ zero silencioso.
47
+ - **Rebuild, import e doctor agora reconciliam a observabilidade persistida.** Preview permanece
48
+ sem escrita, apply rejeita resultado parcial, import atualiza notas completas porém stale e o
49
+ doctor correlaciona checkpoint, manifest e dirty para expor degradação real.
50
+
51
+ ### Security
52
+
53
+ - **Diagnostics e provas públicas aplicam uma fronteira de privacidade estável.** Somente pares
54
+ allowlisted `{code,count}` podem ser persistidos; paths, identificadores, prompts e exceções
55
+ brutas ficam fora de fixtures, evidências e notas de release.
56
+
7
57
  ## [0.66.4] — 2026-07-30
8
58
 
9
59
  ### Fixed
package/README.en.md CHANGED
@@ -15,6 +15,10 @@
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
17
 
18
+ When projecting sessions, trailing internal metadata is removed only from assistant responses;
19
+ user reports remain intact. XML-like tags are written as escaped text so Obsidian Reading view
20
+ does not interpret them as HTML.
21
+
18
22
  The runtime is being separated into six physical boundaries — `cli`, `harness`, `vault`, `mcp`,
19
23
  `integrations`, and `pi` — without fragmenting installation. The private `cli`, `harness`,
20
24
  `vault`, `mcp`, and `integrations` workspaces now canonically own the executable runtime,
@@ -211,10 +215,10 @@ The README is the map; the guides provide syntax, options, exit codes, examples,
211
215
  | **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) |
212
216
  | **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) |
213
217
  | **Shared memory** | CORE, SHARED, status, validation, repair, and curation | [Memory](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/memory.md) |
214
- | **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) |
218
+ | **Sessions and import** | causal hooks, observability reconciliation, and Claude/Codex backfill | [Sessions and import](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/sessions-and-import.md) |
215
219
  | **Notes and knowledge** | BUG/APR/ADR, repairs, renumbering, lessons, and dashboard | [Notes and knowledge](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/notes-and-knowledge.md) |
216
- | **Costs and observability** | stats, aggregation, trends, and historical rebuild | [Costs and observability](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/costs-and-observability.md) |
217
- | **Maintenance and diagnostics** | doctor, definition drift, theme, version, and help | [Maintenance and diagnostics](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/maintenance-and-diagnostics.md) |
220
+ | **Costs and observability** | safe dry-run, tri-state, aggregation, trends, and historical rebuild | [Costs and observability](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/costs-and-observability.md) |
221
+ | **Maintenance and diagnostics** | doctor, frontier/manifest freshness, drift, version, and help | [Maintenance and diagnostics](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/maintenance-and-diagnostics.md) |
218
222
 
219
223
  Operations that deserve step-by-step guidance: [verify and exits 0/1/2](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/verify.md),
220
224
  [legacy-memory migration](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/memory-migration.md), and
@@ -235,13 +239,82 @@ deliberate opt-in and runs that command's own validations:
235
239
  | `GOVERN` | P → R → E → V | Current a2 loop and compatible fallback. |
236
240
  | `ASSURE` | P → R → E → V → C | Governance with confirmation and handoff. |
237
241
 
242
+ A route is a sequence of work stages, not a list of command names:
243
+
244
+ - `P` = **Plan/Propose** — understand the request, bound the scope, and record the approach when a change is needed.
245
+ - `R` = **Review** — inspect the proposal/design before execution; this is the formal a2-loop review.
246
+ - `E` = **Execute** — edit the permitted code or artifacts.
247
+ - `V` = **Validate** — run tests, sensors, and checks and record evidence.
248
+ - `C` = **Confirm/hand off** — obtain explicit confirmation and complete the handoff.
249
+
250
+ Thus, `P → R → E → V` means “plan/propose, review, execute, and validate”. `FLOW` starts at the
251
+ execution/validation microcontract; `OFF` applies no automatic Wend route and returns process
252
+ ownership to the native LLM harness.
253
+
254
+ ### Who selects the profile, and for how long?
255
+
256
+ The LLM harness (Codex, Claude, or another agent) **classifies the current implementation** and can
257
+ record a temporary choice with `wendkeep profile route`. Wend Runtime does not interpret prompt
258
+ text or use diff size, heuristics, or environment variables: it validates the choice, applies the
259
+ route in hooks, and expires the lease when the request ends. With no recorded route, the configured
260
+ base profile remains effective.
261
+
262
+ Resolution follows this order:
263
+
264
+ 1. a valid lease for the current request in `SESSION_REGISTRY.json`;
265
+ 2. a persistent session override in that registry;
266
+ 3. `harness.profile` in the project's `.wendkeep.json`;
267
+ 4. `GOVERN` when no valid setting exists.
268
+
269
+ Without `--session`, `profile use` changes the **project default** for conversations/hooks that do
270
+ not have a session override. With `--session <id>`, it changes only that session and leaves the
271
+ project default untouched. Therefore, `profile use OFF` without `--session` is not an isolated
272
+ test: it writes the project binding and can be shared if `.wendkeep.json` is committed.
273
+
274
+ `profile route` is different: it requires `--session` and `--reason`, accepts only `FLOW`, `GUIDE`,
275
+ `GOVERN`, or `ASSURE`, does not rewrite the project/persistent override, and applies only to the
276
+ current causal prompt. An accepted `Stop` consumes the lease; if the process dies first, the next
277
+ prompt advances the sequence and makes the old lease ineffective. `OFF` is never selected
278
+ automatically.
279
+
280
+ ```bash
281
+ npx wendkeep profile status
282
+ npx wendkeep profile use GUIDE # project default
283
+ npx wendkeep profile use FLOW --session <id> # one session only
284
+ npx wendkeep profile route FLOW --session <id> --reason "local fix" # current request
285
+ npx wendkeep profile status --session <id> # session-effective profile
286
+ ```
287
+
288
+ In human `status --session` output, `base=<profile>/<source>` and `lease=<state>` accompany the
289
+ effective profile; `--json` exposes the same data as `base_profile`, `base_source`, and
290
+ `task_lease`. `profile route` only accepts a session after `UserPromptSubmit` has recorded a
291
+ positive causal turn and sequence that agree in the registry.
292
+
293
+ ### Which profile fits a simple request?
294
+
295
+ “Small” describes size, not risk. The harness uses this matrix to choose and record a temporary
296
+ route; semantic inference remains in the agent, not Wend Runtime:
297
+
298
+ | Situation | Suggested profile |
299
+ |---|---|
300
+ | Question, inspection, or diagnosis with no mutation | No profile transition |
301
+ | Local, reversible fix with an allowlist and no contract/spec change | `FLOW` (`E → V`) |
302
+ | Small behavior change that needs a change but not formal Wend Runtime review | `GUIDE` (`P → E → V`) |
303
+ | Normal, ambiguous, public-contract, security, dependency, CI/release, or policy change | `GOVERN` (`P → R → E → V`) |
304
+ | Work requiring explicit confirmation and handoff | `ASSURE` (`P → R → E → V → C`) |
305
+
306
+ If the harness does not record a lease, a small fix remains under the configured profile —
307
+ `GOVERN` by default. `OFF` does not mean “simple task”: it is a persistent human choice that hands
308
+ governance to the native harness. The LLM may temporarily elevate an `OFF` base to a Wend route,
309
+ but it can never select `OFF` on its own.
310
+
238
311
  A corrupt binding never selects `OFF`: with one unambiguous explicit or legacy Vault, Keep Core
239
312
  remains active under `GOVERN`, the error stays visible, and mutation guards fail closed. Additional
240
313
  roots that FLOW must protect can be declared as project-relative paths under
241
314
  `harness.flow.protectedRoots` in `.wendkeep.json`; any change below them requires promotion.
242
315
  Invalid local config, marker, or identity never silently falls back to a parent/global Vault.
243
316
 
244
- `wendkeep profile status/use` makes the choice observable; `wendkeep flow
317
+ `wendkeep profile status/use/route` makes the choice observable; `wendkeep flow
245
318
  start/finish/promote` handles local adjustments without manufacturing an ADR and fails closed on
246
319
  physical escapes, Git metadata/hidden flags, mutating sensors, protected surfaces, or incomplete
247
320
  session projection. Bounded no-follow discovery sees empty/ignored protected aliases; Vault writes
@@ -379,7 +452,7 @@ explore → propose → apply (TDD) → verify → archive
379
452
 
380
453
  - **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.
381
454
  - **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.
382
- - **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:]`.
455
+ - **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. Failures retain only a bounded, sanitized diagnostic; green output is not persisted. `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:]`.
383
456
  - **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/`.
384
457
 
385
458
  > The gate blocks unless the scaffold is filled, no task is open, evidence is fresh, and every declared requirement is covered. **`--force` waives exactly one of those — the open-task check — and is the human's call, never the agent's.** An unfilled scaffold, a red critical sensor, stale evidence, an orphan requirement or a missing verdict block regardless.
package/README.md CHANGED
@@ -15,6 +15,10 @@
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
17
 
18
+ When projecting sessions, trailing internal metadata is removed only from assistant responses;
19
+ user reports remain intact. XML-like tags are written as escaped text so Obsidian Reading view
20
+ does not interpret them as HTML.
21
+
18
22
  The runtime is being separated into six physical boundaries — `cli`, `harness`, `vault`, `mcp`,
19
23
  `integrations`, and `pi` — without fragmenting installation. The private `cli`, `harness`,
20
24
  `vault`, `mcp`, and `integrations` workspaces now canonically own the executable runtime,
@@ -211,10 +215,10 @@ The README is the map; the guides provide syntax, options, exit codes, examples,
211
215
  | **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) |
212
216
  | **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) |
213
217
  | **Shared memory** | CORE, SHARED, status, validation, repair, and curation | [Memory](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/memory.md) |
214
- | **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) |
218
+ | **Sessions and import** | causal hooks, observability reconciliation, and Claude/Codex backfill | [Sessions and import](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/sessions-and-import.md) |
215
219
  | **Notes and knowledge** | BUG/APR/ADR, repairs, renumbering, lessons, and dashboard | [Notes and knowledge](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/notes-and-knowledge.md) |
216
- | **Costs and observability** | stats, aggregation, trends, and historical rebuild | [Costs and observability](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/costs-and-observability.md) |
217
- | **Maintenance and diagnostics** | doctor, definition drift, theme, version, and help | [Maintenance and diagnostics](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/maintenance-and-diagnostics.md) |
220
+ | **Costs and observability** | safe dry-run, tri-state, aggregation, trends, and historical rebuild | [Costs and observability](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/costs-and-observability.md) |
221
+ | **Maintenance and diagnostics** | doctor, frontier/manifest freshness, drift, version, and help | [Maintenance and diagnostics](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/maintenance-and-diagnostics.md) |
218
222
 
219
223
  Operations that deserve step-by-step guidance: [verify and exits 0/1/2](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/verify.md),
220
224
  [legacy-memory migration](https://github.com/rogersialves/wendkeep/blob/main/docs/en/commands/memory-migration.md), and
@@ -235,13 +239,82 @@ deliberate opt-in and runs that command's own validations:
235
239
  | `GOVERN` | P → R → E → V | Current a2 loop and compatible fallback. |
236
240
  | `ASSURE` | P → R → E → V → C | Governance with confirmation and handoff. |
237
241
 
242
+ A route is a sequence of work stages, not a list of command names:
243
+
244
+ - `P` = **Plan/Propose** — understand the request, bound the scope, and record the approach when a change is needed.
245
+ - `R` = **Review** — inspect the proposal/design before execution; this is the formal a2-loop review.
246
+ - `E` = **Execute** — edit the permitted code or artifacts.
247
+ - `V` = **Validate** — run tests, sensors, and checks and record evidence.
248
+ - `C` = **Confirm/hand off** — obtain explicit confirmation and complete the handoff.
249
+
250
+ Thus, `P → R → E → V` means “plan/propose, review, execute, and validate”. `FLOW` starts at the
251
+ execution/validation microcontract; `OFF` applies no automatic Wend route and returns process
252
+ ownership to the native LLM harness.
253
+
254
+ ### Who selects the profile, and for how long?
255
+
256
+ The LLM harness (Codex, Claude, or another agent) **classifies the current implementation** and can
257
+ record a temporary choice with `wendkeep profile route`. Wend Runtime does not interpret prompt
258
+ text or use diff size, heuristics, or environment variables: it validates the choice, applies the
259
+ route in hooks, and expires the lease when the request ends. With no recorded route, the configured
260
+ base profile remains effective.
261
+
262
+ Resolution follows this order:
263
+
264
+ 1. a valid lease for the current request in `SESSION_REGISTRY.json`;
265
+ 2. a persistent session override in that registry;
266
+ 3. `harness.profile` in the project's `.wendkeep.json`;
267
+ 4. `GOVERN` when no valid setting exists.
268
+
269
+ Without `--session`, `profile use` changes the **project default** for conversations/hooks that do
270
+ not have a session override. With `--session <id>`, it changes only that session and leaves the
271
+ project default untouched. Therefore, `profile use OFF` without `--session` is not an isolated
272
+ test: it writes the project binding and can be shared if `.wendkeep.json` is committed.
273
+
274
+ `profile route` is different: it requires `--session` and `--reason`, accepts only `FLOW`, `GUIDE`,
275
+ `GOVERN`, or `ASSURE`, does not rewrite the project/persistent override, and applies only to the
276
+ current causal prompt. An accepted `Stop` consumes the lease; if the process dies first, the next
277
+ prompt advances the sequence and makes the old lease ineffective. `OFF` is never selected
278
+ automatically.
279
+
280
+ ```bash
281
+ npx wendkeep profile status
282
+ npx wendkeep profile use GUIDE # project default
283
+ npx wendkeep profile use FLOW --session <id> # one session only
284
+ npx wendkeep profile route FLOW --session <id> --reason "local fix" # current request
285
+ npx wendkeep profile status --session <id> # session-effective profile
286
+ ```
287
+
288
+ In human `status --session` output, `base=<profile>/<source>` and `lease=<state>` accompany the
289
+ effective profile; `--json` exposes the same data as `base_profile`, `base_source`, and
290
+ `task_lease`. `profile route` only accepts a session after `UserPromptSubmit` has recorded a
291
+ positive causal turn and sequence that agree in the registry.
292
+
293
+ ### Which profile fits a simple request?
294
+
295
+ “Small” describes size, not risk. The harness uses this matrix to choose and record a temporary
296
+ route; semantic inference remains in the agent, not Wend Runtime:
297
+
298
+ | Situation | Suggested profile |
299
+ |---|---|
300
+ | Question, inspection, or diagnosis with no mutation | No profile transition |
301
+ | Local, reversible fix with an allowlist and no contract/spec change | `FLOW` (`E → V`) |
302
+ | Small behavior change that needs a change but not formal Wend Runtime review | `GUIDE` (`P → E → V`) |
303
+ | Normal, ambiguous, public-contract, security, dependency, CI/release, or policy change | `GOVERN` (`P → R → E → V`) |
304
+ | Work requiring explicit confirmation and handoff | `ASSURE` (`P → R → E → V → C`) |
305
+
306
+ If the harness does not record a lease, a small fix remains under the configured profile —
307
+ `GOVERN` by default. `OFF` does not mean “simple task”: it is a persistent human choice that hands
308
+ governance to the native harness. The LLM may temporarily elevate an `OFF` base to a Wend route,
309
+ but it can never select `OFF` on its own.
310
+
238
311
  A corrupt binding never selects `OFF`: with one unambiguous explicit or legacy Vault, Keep Core
239
312
  remains active under `GOVERN`, the error stays visible, and mutation guards fail closed. Additional
240
313
  roots that FLOW must protect can be declared as project-relative paths under
241
314
  `harness.flow.protectedRoots` in `.wendkeep.json`; any change below them requires promotion.
242
315
  Invalid local config, marker, or identity never silently falls back to a parent/global Vault.
243
316
 
244
- `wendkeep profile status/use` makes the choice observable; `wendkeep flow
317
+ `wendkeep profile status/use/route` makes the choice observable; `wendkeep flow
245
318
  start/finish/promote` handles local adjustments without manufacturing an ADR and fails closed on
246
319
  physical escapes, Git metadata/hidden flags, mutating sensors, protected surfaces, or incomplete
247
320
  session projection. Bounded no-follow discovery sees empty/ignored protected aliases; Vault writes
@@ -379,7 +452,7 @@ explore → propose → apply (TDD) → verify → archive
379
452
 
380
453
  - **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.
381
454
  - **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.
382
- - **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:]`.
455
+ - **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. Failures retain only a bounded, sanitized diagnostic; green output is not persisted. `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:]`.
383
456
  - **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/`.
384
457
 
385
458
  > The gate blocks unless the scaffold is filled, no task is open, evidence is fresh, and every declared requirement is covered. **`--force` waives exactly one of those — the open-task check — and is the human's call, never the agent's.** An unfilled scaffold, a red critical sensor, stale evidence, an orphan requirement or a missing verdict block regardless.
@@ -26,7 +26,7 @@ A consistent registry, complete price table, and transcript access for rebuilt s
26
26
  ```bash
27
27
  npx wendkeep stats [--vault <vault>] [--json]
28
28
  npx wendkeep cost [--since <date>] [--top [N]] [--trend day|week|month] [--write] [--json]
29
- npx wendkeep cost rebuild [--session <id|file>] [--limit N] [--apply] [--json]
29
+ npx wendkeep cost rebuild [--session <id|file>] [--limit N] [--max-graph-nodes N] [--max-fallback-days N] [--max-fallback-candidates N] [--apply] [--json]
30
30
  ```
31
31
 
32
32
  ## Options and exit codes
@@ -34,10 +34,18 @@ npx wendkeep cost rebuild [--session <id|file>] [--limit N] [--apply] [--json]
34
34
  - `wendkeep stats` emits one shareable line or JSON.
35
35
  - `wendkeep cost` aggregates total/model/day; `--trend` adds projection and `--write` refreshes
36
36
  `00-Custo.md`.
37
- - `wendkeep cost rebuild` is dry-run by default; `--apply` writes notes and
38
- `.brain/COST_REBUILD.json`.
39
- - Exit `0` means a consistent calculation; non-zero reports insufficient registry, price,
40
- transcript, or parsing state.
37
+ - `wendkeep cost rebuild` is dry-run by default and performs **zero writes**: it acquires no write
38
+ lock, changes no note, registry, or runtime state, and does not create `.brain/COST_REBUILD.json`.
39
+ - `--apply` publishes only `complete` or `none` candidates. The `none` state clears the section
40
+ only after a stable offline scan proves that no subagent was started.
41
+ - A `degraded` or `stale` candidate returns exit `1` and preserves the note without changes; the
42
+ batch continues so other safe sessions can be processed and the report can expose sanitized
43
+ diagnostic codes.
44
+ - The `--max-graph-nodes`, `--max-fallback-days`, and `--max-fallback-candidates` overrides are
45
+ exclusively for a targeted rebuild with `--session`. Using them without `--session` is invalid
46
+ usage and returns exit `2`; hooks, import, and bulk rebuild retain the default limits.
47
+ - Exit `0` means a consistent preview/apply; exit `1` means a partial `degraded`/`stale` result;
48
+ exit `2` means invalid syntax or context.
41
49
 
42
50
  ## Examples
43
51
 
@@ -45,12 +53,16 @@ npx wendkeep cost rebuild [--session <id|file>] [--limit N] [--apply] [--json]
45
53
  npx wendkeep stats --vault .MyApp-vault
46
54
  npx wendkeep cost --since 2026-07-01 --top 10 --trend week
47
55
  npx wendkeep cost rebuild --session 019abc --json
56
+ npx wendkeep cost rebuild --session 019abc --max-graph-nodes 8192 --json
57
+ npx wendkeep cost rebuild --session 019abc --apply
48
58
  ```
49
59
 
50
60
  ## Expected result
51
61
 
52
- Totals retain input/output/cache/reasoning dimensions by model and period. Rebuild shows a preview
53
- before changing notes and leaves a reproducible report when applied.
62
+ Totals retain input/output/cache/reasoning dimensions by model and period. Tri-state composition
63
+ returns `complete`, `none`, or `degraded`, plus a frontier, manifest, and sanitized diagnostics.
64
+ Run and review the dry-run before repeating the same command with `--apply`; a semantically
65
+ identical second apply preserves the note, checkpoint, report, and mtime.
54
66
 
55
67
  ## Common errors and diagnosis
56
68
 
@@ -58,6 +70,8 @@ before changing notes and leaves a reproducible report when applied.
58
70
  - Wrong-provider costs: validate the session identity chain.
59
71
  - Missing transcript: do not estimate silently; keep the gap visible.
60
72
  - Duplicated parent/subagent/fork totals: verify registry relationships and deduplication.
73
+ - `degraded`/`stale`: preserve the note and inspect diagnostics/frontier before authorizing apply.
74
+ - Rejected override: add `--session <id|file>` or remove the three targeted limits.
61
75
 
62
76
  ## Next steps
63
77
 
@@ -39,6 +39,11 @@ npx wendkeep --help
39
39
  events remain durable in the outbox/ledger is a recoverable warning.
40
40
  - An ambiguous attempt, a lost event ID (absent from ledger and outbox), `projected` state found
41
41
  only in the outbox, or a mismatched checkpoint is blocking.
42
+ - For session observability, `legacy`, `degraded`, `stale`, and `manifest-unproven` require
43
+ reconciliation or more evidence. Only fresh `none` and fresh `complete` are healthy: frontier,
44
+ checkpoint, root stat, and source manifest must agree.
45
+ - `doctor` remains read-only. It recommends the targeted dry-run first and only advises repeating
46
+ the command with `--apply` after human review.
42
47
  - `sync-defs --check` detects drift without writes; `--reseed` restores packaged `wk-*` skills.
43
48
  - `theme sync` reapplies the CSS snippet and graph groups without recreating the vault.
44
49
  - `wendkeep --version` prints the running version; `wendkeep --help` lists the public interface.
@@ -52,6 +57,8 @@ npx wendkeep --version
52
57
  npx wendkeep sync-defs --check --vault .MyApp-vault --project .
53
58
  npx wendkeep doctor --vault .MyApp-vault
54
59
  npx wendkeep memory status --gate --vault .MyApp-vault
60
+ npx wendkeep cost rebuild --session <id> --json
61
+ npx wendkeep cost rebuild --session <id> --apply
55
62
  ```
56
63
 
57
64
  ## Expected result
@@ -59,7 +66,9 @@ npx wendkeep memory status --gate --vault .MyApp-vault
59
66
  Doctor names sessions, registry, links, notes, prices, derived sections, and memory as healthy or
60
67
  provides a specific diagnostic/repair command. For memory, it distinguishes a valid initial empty
61
68
  state, recoverable pending replay, and lost/divergent lifecycle state. It never repairs implicitly
62
- or echoes private projector-error content into its report.
69
+ or echoes private projector-error content into its report. For session observability, it separates
70
+ fresh `none`/`complete` from legacy, degraded, stale, or manifest-unproven state and gives a
71
+ dry-run path before any write.
63
72
 
64
73
  ## Common errors and diagnosis
65
74
 
@@ -70,6 +79,9 @@ or echoes private projector-error content into its report.
70
79
  - `ambiguous`, lost publication, or a mismatched checkpoint: blocking; preserve registry, ledger,
71
80
  outbox, and SHARED so `last_memory_attempt` can be correlated before repair.
72
81
  - Corrupt bundle: preserve evidence and run `memory status --gate` before `memory repair`.
82
+ - `legacy`/`degraded`/`stale`/`manifest-unproven` observability: run
83
+ `wendkeep cost rebuild --session <id> --json`, review diagnostics, and only then authorize
84
+ `--apply`.
73
85
 
74
86
  ## Next steps
75
87
 
@@ -14,9 +14,9 @@ opt-in and runs that command's own validations and gates.
14
14
 
15
15
  ## When to use
16
16
 
17
- Use `profile` to inspect or explicitly select an Operating Profile. Use `FLOW` for local,
18
- reversible `spec_impact:none` maintenance that fits an Execute Validate microcontract without a
19
- change.
17
+ Use `profile use` for a persistent human selection and `profile route` for the harness to record
18
+ the temporary route for the current implementation. Use `FLOW` for local, reversible
19
+ `spec_impact:none` maintenance that fits an Execute → Validate microcontract without a change.
20
20
 
21
21
  ## When not to use
22
22
 
@@ -28,7 +28,8 @@ change.
28
28
  ## Prerequisites
29
29
 
30
30
  - An initialized project whose `.wendkeep.json` is bound to the correct Vault.
31
- - For a session override, one unambiguous session in `SESSION_REGISTRY.json`.
31
+ - For an override or temporary route, one unambiguous session in `SESSION_REGISTRY.json`; `route`
32
+ also requires the current prompt to have a recorded causal frontier.
32
33
  - For FLOW, a Git repository, a path allowlist, a reason, and at least one existing sensor in
33
34
  `wendkeep.sensors.json`.
34
35
 
@@ -37,6 +38,7 @@ change.
37
38
  ```bash
38
39
  npx wendkeep profile status [--project <path>] [--vault <path>] [--session <id>] [--json]
39
40
  npx wendkeep profile use <profile> [--project <path>] [--vault <path>] [--session <id>] [--json]
41
+ npx wendkeep profile route <FLOW|GUIDE|GOVERN|ASSURE> --session <id> --reason <text> [--project <path>] [--vault <path>] [--json]
40
42
  npx wendkeep flow start <slug> --allow <path> [--allow <path>...] --sensor <id> [--sensor <id>...] --reason <text> [--session <id>]
41
43
  npx wendkeep flow status [<id>]
42
44
  npx wendkeep flow show <id> [--session <id>]
@@ -75,15 +77,42 @@ Harness. The workspaces remain private and are not published as independent npm
75
77
  | `GOVERN` | P → R → E → V | Current a2 loop and conservative fallback. |
76
78
  | `ASSURE` | P → R → E → V → C | Governance plus confirmation and handoff. |
77
79
 
78
- - Resolution is explicit session override → project `harness.profile` → `GOVERN`. Heuristics,
79
- diff size, prompt text, environment variables, or read failures never select `OFF`.
80
- - `profile status` prints the effective profile and source; `--json` emits structured output. When
81
- an explicit Vault preserves the selection despite a corrupt binding, output includes
80
+ ### Route legend
81
+
82
+ The letters are work stages, not individual commands:
83
+
84
+ - `P` = **Plan/Propose** — understand the request, bound the scope, and record the approach.
85
+ - `R` = **Review** — inspect the proposal/design before execution; this is the formal a2-loop review.
86
+ - `E` = **Execute** — edit the permitted paths and artifacts.
87
+ - `V` = **Validate** — run tests, sensors, and checks and record evidence.
88
+ - `C` = **Confirm/hand off** — obtain explicit confirmation and complete the handoff.
89
+
90
+ So, `P → R → E → V` means “plan/propose, review, execute, and validate”. `FLOW` starts at the
91
+ execution/validation microcontract; `OFF` imposes no automatic Wend route and returns process
92
+ ownership to the native LLM harness.
93
+
94
+ - The LLM harness semantically classifies the request and records `profile route`; Wend Runtime
95
+ does not classify text, diff size, heuristics, or environment variables. It validates and applies
96
+ the deterministic lease.
97
+ - For a local, reversible fix with no contract/spec change, choose `FLOW`. For a compact behavior
98
+ change that needs a change but no formal review, choose `GUIDE`. For uncertainty, risk, security,
99
+ public contracts, dependencies, CI/release, or policy, choose `GOVERN`. Use `ASSURE` when
100
+ confirmation and handoff are part of the contract.
101
+ - `OFF` can never be an adaptive route; only a human persists it explicitly through
102
+ `profile use OFF`. An `OFF` base may still receive a temporary elevation to a Wend route.
103
+
104
+ - Resolution is active prompt lease → persistent session override → project
105
+ `harness.profile` → `GOVERN`. Invalid/expired leases and read failures never select `OFF`.
106
+ - `profile status` prints the effective profile and source. With `--session`, human output adds
107
+ `base=<profile>/<source>` and `lease=<state>`; `--json` emits the same data structurally. When an
108
+ explicit Vault preserves the selection despite a corrupt binding, output includes
82
109
  `binding_error` and the diagnostic is also written to stderr.
83
110
  - `profile use` validates names and flags strictly; a duplicate/incomplete singleton option or a
84
111
  value beginning with `--` fails before I/O. Without `--session`, it atomically changes the
85
112
  project binding; with `--session`, it records override, source, and timestamp without changing
86
113
  session identity.
114
+ - `profile route` requires `--session` and `--reason`, accepts only the four adaptive profiles,
115
+ and records lease id, reason, turn/sequence, and timestamp without touching persistent profiles.
87
116
  - `.wendkeep.json` stays on `schemaVersion: 1`; the additive field is, for example,
88
117
  `"harness": { "profile": "GOVERN" }`. A legacy binding without it also resolves to `GOVERN`.
89
118
  - A corrupt binding never means `OFF`. When the payload or legacy integration identifies one
@@ -127,13 +156,39 @@ Harness. The workspaces remain private and are not published as independent npm
127
156
  - Exit `0` means a successful query or transition; exit `1` means a policy/red-sensor block; exit
128
157
  `2` means invalid profile, session, flow, or arguments, with no partial mutation.
129
158
 
159
+ ### Selection scope
160
+
161
+ Without `--session`, `profile use` writes `harness.profile` to `.wendkeep.json` and changes the
162
+ project default for conversations/hooks that have no session override. With `--session <id>`, it
163
+ writes an override only to that session's `SESSION_REGISTRY.json` and leaves the project default
164
+ unchanged. Therefore, `profile use OFF` without `--session` is not an isolated test; if
165
+ `.wendkeep.json` is committed, that choice is shared with other checkouts as well.
166
+
167
+ `profile route` creates a lease only for the current request. An accepted `Stop` consumes it by
168
+ CAS; if cleanup does not run, the next `UserPromptSubmit` advances the sequence and the lease is no
169
+ longer effective. A blocked Stop preserves it for a retry of the same request. There is no
170
+ wall-clock TTL that can interrupt long work. A session with no causal prompt recorded yet (missing
171
+ turn, zero sequence, or missing/mismatched causal map entry) is rejected before any mutation.
172
+ `status --session` includes the base profile and lease state in both human and `--json` output; in
173
+ JSON the fields are `base_profile`, `base_source`, and `task_lease.state` (`active`, `consumed`,
174
+ `expired`, `invalid`, or `absent`).
175
+
176
+ ```bash
177
+ npx wendkeep profile status # project default
178
+ npx wendkeep profile use GUIDE # change the project default
179
+ npx wendkeep profile use FLOW --session <id> # one session only
180
+ npx wendkeep profile route FLOW --session <id> --reason "local adjustment" # current request
181
+ npx wendkeep profile status --session <id> # session-effective profile
182
+ ```
183
+
130
184
  ## Examples
131
185
 
132
- Inspect the effective default and apply an override only to the current session:
186
+ Inspect the effective default and route only the current implementation:
133
187
 
134
188
  ```bash
135
189
  npx wendkeep profile status
136
- npx wendkeep profile use OFF --session 019abc-session-id --json
190
+ npx wendkeep profile route FLOW --session 019abc-session-id --reason "fix local typo" --json
191
+ npx wendkeep profile status --session 019abc-session-id --json
137
192
  ```
138
193
 
139
194
  Run FLOW maintenance while capturing the `flow_id` returned by `start`:
@@ -46,6 +46,14 @@ npx wendkeep import [options]
46
46
  - `Stop` accepts only a transcript-proven turn from the compatible active activation. Duplicates
47
47
  are no-ops; stale/superseded Stops neither publish memory nor overwrite a newer epoch's
48
48
  checkpoint.
49
+ - `Stop` receives an absolute **45 s** deadline from hook entry. Reads check the clock between
50
+ rollouts and on every chunk; reaching the limit returns `degraded` before the host timeout.
51
+ - `SubagentStop` receives an absolute **15 s** deadline. Signals arriving within the **250 ms**
52
+ window are coalesced: only the highest sequence recomposes/publishes, without losing the last
53
+ child.
54
+ - Observability is tri-state: `complete` publishes the full snapshot; `none` means zero proven by
55
+ a causal Stop or stable offline scan; `degraded` preserves the previous snapshot and allowlisted
56
+ diagnostics. An isolated `SubagentStop` never publishes `none`.
49
57
  - When compacting conversations into `## Iterações`, the hook escapes code delimiters cut by the
50
58
  size limit; inline backticks and fences never remain open and consume the following line.
51
59
  - `session list` reads `SESSION_REGISTRY`; `show` displays one session and `use` only changes human
@@ -53,6 +61,9 @@ npx wendkeep import [options]
53
61
  - `import --source all|claude|codex`, `--since`, `--limit`, `--from`, and `--codex-from` bound scope.
54
62
  - `--dry-run`/`--json` support audit before writes; `--stamp-ids` and `--rescan-decisions` address
55
63
  specific historical gaps.
64
+ - `import` reconciles observability even when no `wk-turn` is missing: a legacy schema, stale
65
+ frontier, or unproven manifest triggers recomposition without duplicating iterations. A fresh
66
+ checkpoint remains byte-identical; `degraded` is reported and does not change the note.
56
67
  - Exit `0` means consistent processing; non-zero reports invalid source/config/write instead of
57
68
  presenting silent partial success.
58
69
 
@@ -70,7 +81,15 @@ Each canonical session points to the matching provider, transcript, note file, a
70
81
  registry keeps one `SessionStart` epoch per activation plus the latest native turn; multiple
71
82
  `Stop` events may acknowledge turns in that epoch without closing it. Repeated imports of the
72
83
  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.
84
+ automatic iteration remains valid Markdown even when a message must be truncated. Complete or
85
+ truncated trailing internal metadata is removed only from assistant messages; a reproduction
86
+ written by the user remains in the transcript. In the note, XML-like tags are encoded as visible
87
+ text — including placeholders such as `<session>` — without changing `<https://...>` autolinks.
88
+ Reimport and `SessionStop` share the same idempotent normalizer; when an older note is finalized,
89
+ only recognized generated fields under `Iterações` and `Encerramento` are migrated, without rewriting
90
+ authored prose.
91
+ Duplicate/stale hooks converge on the same frontier, and imports may refresh only observability
92
+ without creating a new turn block.
74
93
 
75
94
  ## Common errors and diagnosis
76
95
 
@@ -82,6 +101,8 @@ automatic iteration remains valid Markdown even when a message must be truncated
82
101
  - Fork duplicates: bound source/date and inspect `forked_from_id`/`source.subagent`.
83
102
  - Codex does not capture: approve hooks and start a new session after `sync`.
84
103
  - Contaminated cost: validate `session_id → session_file → transcript_path → provider`.
104
+ - `degraded` observability: preserve the note and run a targeted rebuild dry-run; never force a
105
+ partial snapshot over the last `complete` one.
85
106
 
86
107
  ## Next steps
87
108
 
@@ -73,15 +73,17 @@ npx wendkeep memory status --gate --vault .MyApp-vault
73
73
  ## Expected result
74
74
 
75
75
  `evidencia.json` contains sensor results and a seal binds proof to the current `tarefas.md` hash.
76
- Deep mode packages requirements, tasks, and evidence for read-only review; the verdict covers every
77
- `[req:]` before archive.
76
+ When a sensor is red, its entry receives only a local, sanitized diagnostic bounded to 2,000
77
+ characters; stdout/stderr from green sensors is not persisted. Deep mode packages requirements,
78
+ tasks, and evidence for read-only review; the verdict covers every `[req:]` before archive.
78
79
 
79
80
  ## Common errors and diagnosis
80
81
 
81
82
  - `no change`: this is exit 2 and a valid idle state; create/use a change or skip verify.
82
83
  - Zero/missing sensors: inspect every same-line tag and `sensors list`; multiple tags on one task
83
84
  are valid and all of them enter the gate.
84
- - Red gate: fix the cause and rerun; never choose `archive --force` on your own.
85
+ - Red gate: inspect the bounded `note` field on the `evidencia.json` entry, fix the cause, and
86
+ rerun; never choose `archive --force` on your own.
85
87
  - Missing/stale verdict: regenerate `--deep` and request a fresh independent pass.
86
88
  - Surviving mutants: strengthen the discriminating test; after three rounds, review manually.
87
89