@vectorize-io/hindsight-coding-agents 0.1.0 → 0.1.1

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/README.md CHANGED
@@ -15,14 +15,13 @@ in front of the agent at the moment it starts working, and keeps a curated set o
15
15
  ## Install
16
16
 
17
17
  ```bash
18
- npm install -g @vectorize-io/hindsight-coding-agents
19
- hindsight-coding-agents install all # every detected agent, wired natively
20
- hindsight-coding-agents install claude-code # or just one
21
- hindsight-coding-agents uninstall all # removes exactly what install added
18
+ npx @vectorize-io/hindsight-coding-agents install all # every detected agent, wired natively
19
+ npx @vectorize-io/hindsight-coding-agents install claude-code # or just one
20
+ npx @vectorize-io/hindsight-coding-agents uninstall all # removes exactly what install added
22
21
  ```
23
22
 
24
23
  `install` takes an explicit target — `all`, or one or more harness names. A bare
25
- `hindsight-coding-agents install` changes nothing and prints the choice, so wiring every agent on
24
+ `npx @vectorize-io/hindsight-coding-agents install` changes nothing and prints the choice, so wiring every agent on
26
25
  the machine is never something that happens by accident.
27
26
 
28
27
  On a terminal it also asks **where memory should live** — Hindsight Cloud, a server you run, or a
@@ -33,30 +32,96 @@ local daemon on this machine (see [Where memory lives](#where-memory-lives)). Sc
33
32
 
34
33
  Same command, only the harness name changes. Run after installing the package globally.
35
34
 
36
- | agent | command | what it wires |
37
- | ------------------ | --------------------------------------------- | ------------------------------------------------------------------------------------------------ |
38
- | Claude Code | `hindsight-coding-agents install claude-code` | 3 hooks in `~/.claude/settings.json` + MCP (`claude mcp add`, user scope) + companion skill |
39
- | opencode | `hindsight-coding-agents install opencode` | plugin entry in `~/.config/opencode/opencode.json` (native tools, no MCP needed) |
40
- | Kilo CLI | `hindsight-coding-agents install kilo` | plugin entry in `~/.config/kilo/kilo.json[c]` |
41
- | Codex CLI | `hindsight-coding-agents install codex` | 3 hooks in `~/.codex/hooks.json` + `[mcp_servers]` in `config.toml` (needs `codex_hooks = true`) |
42
- | Cursor CLI | `hindsight-coding-agents install cursor-cli` | hooks in `~/.cursor/hooks.json` + `~/.cursor/mcp.json` + skill |
43
- | GitHub Copilot CLI | `hindsight-coding-agents install copilot-cli` | `~/.copilot/hooks/` + `mcp-config.json` + skill |
44
- | Grok Build | `hindsight-coding-agents install grok-build` | native hooks + MCP in `~/.grok/config.toml` + skill |
45
- | Antigravity CLI | `hindsight-coding-agents install agy` | lifecycle hooks + MCP + the `Hindsight · <bank>` status line |
46
- | Devin CLI | `hindsight-coding-agents install devin-cli` | hooks in `~/.config/devin/config.json` + MCP (needs Node 22.5+, see below) |
47
- | Cline CLI | `hindsight-coding-agents install cline-cli` | native plugin via `cline plugin install` + MCP + skill |
48
-
49
- Uninstall the same way: `hindsight-coding-agents uninstall claude-code` (or `uninstall all`).
35
+ #### <img src="https://hindsight.vectorize.io/img/harness/claude-code.png" alt="" width="20" height="20" /> Claude Code
36
+
37
+ ```bash
38
+ npx @vectorize-io/hindsight-coding-agents install claude-code
39
+ ```
40
+
41
+ 3 hooks in `~/.claude/settings.json`, MCP via `claude mcp add` (user scope), and the companion skill.
42
+
43
+ #### <img src="https://hindsight.vectorize.io/img/harness/codex.svg" alt="" width="20" height="20" /> Codex CLI
44
+
45
+ ```bash
46
+ npx @vectorize-io/hindsight-coding-agents install codex
47
+ ```
48
+
49
+ 3 hooks in `~/.codex/hooks.json` plus `[mcp_servers]` in `config.toml` (needs `codex_hooks = true`).
50
+
51
+ #### <img src="https://hindsight.vectorize.io/img/harness/opencode.png" alt="" width="20" height="20" /> opencode
52
+
53
+ ```bash
54
+ npx @vectorize-io/hindsight-coding-agents install opencode
55
+ ```
56
+
57
+ A plugin entry in `~/.config/opencode/opencode.json` — native tools, no MCP needed.
58
+
59
+ #### <img src="https://hindsight.vectorize.io/img/harness/kilo.svg" alt="" width="20" height="20" /> Kilo CLI
60
+
61
+ ```bash
62
+ npx @vectorize-io/hindsight-coding-agents install kilo
63
+ ```
64
+
65
+ A plugin entry in `~/.config/kilo/kilo.json[c]`.
66
+
67
+ #### <img src="https://hindsight.vectorize.io/img/harness/cursor-cli.svg" alt="" width="20" height="20" /> Cursor CLI
68
+
69
+ ```bash
70
+ npx @vectorize-io/hindsight-coding-agents install cursor-cli
71
+ ```
72
+
73
+ Hooks in `~/.cursor/hooks.json`, `~/.cursor/mcp.json`, and the companion skill.
74
+
75
+ #### <img src="https://hindsight.vectorize.io/img/harness/copilot-cli.svg" alt="" width="20" height="20" /> GitHub Copilot CLI
76
+
77
+ ```bash
78
+ npx @vectorize-io/hindsight-coding-agents install copilot-cli
79
+ ```
80
+
81
+ `~/.copilot/hooks/`, `mcp-config.json`, and the companion skill.
82
+
83
+ #### <img src="https://hindsight.vectorize.io/img/harness/grok-build.svg" alt="" width="20" height="20" /> Grok Build
84
+
85
+ ```bash
86
+ npx @vectorize-io/hindsight-coding-agents install grok-build
87
+ ```
88
+
89
+ Native hooks and MCP in `~/.grok/config.toml`, plus the companion skill.
90
+
91
+ #### <img src="https://hindsight.vectorize.io/img/harness/antigravity-cli.png" alt="" width="20" height="20" /> Antigravity CLI
92
+
93
+ ```bash
94
+ npx @vectorize-io/hindsight-coding-agents install agy
95
+ ```
96
+
97
+ Lifecycle hooks, MCP, and the `Hindsight · <bank>` status line.
98
+
99
+ #### <img src="https://hindsight.vectorize.io/img/harness/devin-cli.svg" alt="" width="20" height="20" /> Devin CLI
100
+
101
+ ```bash
102
+ npx @vectorize-io/hindsight-coding-agents install devin-cli
103
+ ```
104
+
105
+ Hooks in `~/.config/devin/config.json` plus MCP. Needs Node 22.5+ — see below.
106
+
107
+ #### <img src="https://hindsight.vectorize.io/img/harness/cline-cli.svg" alt="" width="20" height="20" /> Cline CLI
108
+
109
+ ```bash
110
+ npx @vectorize-io/hindsight-coding-agents install cline-cli
111
+ ```
112
+
113
+ A native plugin via `cline plugin install`, plus MCP and the companion skill.
114
+
115
+ Uninstall the same way: `npx @vectorize-io/hindsight-coding-agents uninstall claude-code` (or `uninstall all`).
50
116
 
51
117
  **Devin CLI needs Node 22.5 or newer.** Its hooks pass only a session id — the conversation itself
52
118
  lives in `~/.local/share/devin/cli/sessions.db` — so reading it depends on Node's built-in
53
119
  `node:sqlite`. Installing `devin-cli` checks for this first and refuses (with the reason) rather
54
120
  than wiring hooks that could never retain anything. Every other agent works on any supported Node.
55
121
 
56
- Install globally (not `npx`): the wiring points at this package's files, so it must live at a
57
- stable path — the installer refuses to run from an npx cache. **Updating** is just
58
- `npm update -g @vectorize-io/hindsight-coding-agents`: the wired paths stay valid, every new session runs the
59
- new version; re-run `install` (idempotent) only when a release note says the wiring changed.
122
+ `install` copies what it needs into `~/.hindsight/coding-agents` and points each agent's wiring
123
+ there, so nothing depends on where you ran it from. **Updating** is the same command again — it
124
+ re-copies the runtime in place, leaving the wiring valid and every new session on the new version.
60
125
 
61
126
  `install` merges the native wiring (hooks + MCP registration where the host wants them) into each
62
127
  agent's own config, preserving everything already there; it is idempotent (re-run after moving the
@@ -73,7 +138,7 @@ can ask the agent itself. Manual wiring per harness, if you prefer:
73
138
  ```
74
139
 
75
140
  **Claude Code** and **Codex** get their full three-hook + MCP wiring from this package's own
76
- installer — `hindsight-coding-agents install claude-code` / `install codex`. This package's `bin`
141
+ installer — `npx @vectorize-io/hindsight-coding-agents install claude-code` / `install codex`. This package's `bin`
77
142
  entries (`hindsight-claude-hook`, `hindsight-codex-hook`,
78
143
  `hindsight-cursor-hook`) are the individual injection-only `UserPromptSubmit` entrypoints for a
79
144
  minimal, hand-wired setup.
@@ -98,7 +163,7 @@ that shipped a user config — Cursor CLI, Copilot CLI, opencode and Cline have
98
163
 
99
164
  ```bash
100
165
  cd /path/to/your/repo
101
- hindsight-coding-agents install claude-code --import-conversations # or: install codex --import-conversations
166
+ npx @vectorize-io/hindsight-coding-agents install claude-code --import-conversations # or: install codex --import-conversations
102
167
  ```
103
168
 
104
169
  This re-extracts the transcripts the agent already wrote, so it costs tokens roughly in proportion
@@ -141,9 +206,9 @@ Three modes, chosen once when you install (`install` asks on a terminal; pass `-
141
206
  | `daemon` | a local `hindsight-embed` on this machine | `uv` on PATH + an LLM key for extraction |
142
207
 
143
208
  ```bash
144
- hindsight-coding-agents install claude-code --server daemon
145
- hindsight-coding-agents install claude-code --server self-hosted --api-url http://localhost:8888
146
- hindsight-coding-agents install claude-code --server cloud --api-token <token>
209
+ npx @vectorize-io/hindsight-coding-agents install claude-code --server daemon
210
+ npx @vectorize-io/hindsight-coding-agents install claude-code --server self-hosted --api-url http://localhost:8888
211
+ npx @vectorize-io/hindsight-coding-agents install claude-code --server cloud --api-token <token>
147
212
  ```
148
213
 
149
214
  Re-running `install` never re-asks: a config that already names a server is left alone.
@@ -238,7 +238,9 @@ function readEnvConfig(env = process.env) {
238
238
  function loadConfig(opts = {}) {
239
239
  const o = typeof opts === "string" ? { path: opts } : opts;
240
240
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
241
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
241
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
242
+ if (!raw.harness && o.harness) raw.harness = o.harness;
243
+ return resolveConfig(raw);
242
244
  }
243
245
  var BANK_OVERRIDE_EXCLUDED = [
244
246
  "bankId",
@@ -322,7 +324,7 @@ var GITLOG_MISSION = "You are ingesting an aggregated block of git commit MESSAG
322
324
  var CONVERSATION_MISSION = `You are ingesting a developer conversation as a JSONL transcript (one {role, content} turn per line): the user's requests, the assistant's narration, and compact 'action' turns naming each tool use and its target (e.g. "Edit boltons/strutils.py") with no arguments or outputs. It may be a SHORT decision chat or a LONG working session \u2014 scale the facts to the substance, never to the message count. Extract the FEWEST facts that capture the OUTCOME: the settled DECISIONS and their exact rules/values (quote literals VERBATIM); concrete CHANGES to specific code entities; problems and how they were resolved; conventions or invariants established; at most one fact for a notable REJECTED alternative ('initially proposed X, changed to Y because Z'). A short decision chat usually yields 1-2 facts; a substantial working session several. CRITICAL: a conversation REVISES itself \u2014 record ONLY the FINAL state as what is in effect; a superseded proposal appears ONLY inside the rejected fact, NEVER as its own 'decided' fact; if the same setting changes several times keep only the LAST, and make unmistakably clear which choice WON. Do NOT emit one fact per message, per intermediate proposal, or per action turn. Keep issue/PR references (#123, GH-123) VERBATIM and emit each as an ENTITY. Preserve the 'REF-ID: <token>' marker verbatim in every fact. Do not invent; capture only what was actually settled.`;
323
325
  var REFLECT_MISSION = "You are a debugging assistant with the project's past decisions in memory (git rationale and developer chats). Given a bug's SYMPTOM, find the past decision whose rationale explains the ROOT CAUSE \u2014 not one that merely shares vocabulary. Answer with the PRECISE fix: state the EXACT rule and the LITERAL values, identifiers, strings, numbers, or set members that were decided \u2014 quote them VERBATIM, never paraphrase, generalize, or omit them (give the actual decided value, not 'the project standard'). If memories CONFLICT on the same rule, the LATEST decision wins \u2014 prefer facts that explicitly amend or supersede an earlier one, state the superseded rule as no longer in effect, and never present it as the fix. Name the function/file to change and cite the REF-ID(s). If NOTHING in memory genuinely explains THIS symptom, say exactly that in one short sentence \u2014 a wrong-but-confident nearest match is worse than an honest miss; never stretch an unrelated decision to fit.";
324
326
  var DOCUMENT_MISSION = "You are ingesting a standalone document (notes, docs, or structural findings). Extract the concrete facts, concepts, and structure it describes.";
325
- var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details.";
327
+ var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details. When a new fact contradicts or supersedes an existing observation, UPDATE that observation to reflect the current state rather than creating a sibling alongside it; note that the rule was revised and when, so the superseded version is visible as history rather than as a competing claim.";
326
328
  var RETAIN_STRATEGIES = {
327
329
  git: { retain_mission: GIT_MISSION, retain_extraction_mode: "verbose" },
328
330
  // ONE big aggregated document (last N commit messages, no diffs) -> a larger chunk size so it stays
@@ -145,7 +145,9 @@ function readEnvConfig(env = process.env) {
145
145
  function loadConfig(opts = {}) {
146
146
  const o = typeof opts === "string" ? { path: opts } : opts;
147
147
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
148
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
148
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
149
+ if (!raw.harness && o.harness) raw.harness = o.harness;
150
+ return resolveConfig(raw);
149
151
  }
150
152
  var BANK_OVERRIDE_EXCLUDED = [
151
153
  "bankId",
@@ -212,7 +212,9 @@ function readEnvConfig(env = process.env) {
212
212
  function loadConfig(opts = {}) {
213
213
  const o = typeof opts === "string" ? { path: opts } : opts;
214
214
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
215
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
215
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
216
+ if (!raw.harness && o.harness) raw.harness = o.harness;
217
+ return resolveConfig(raw);
216
218
  }
217
219
  var BANK_OVERRIDE_EXCLUDED = [
218
220
  "bankId",
@@ -296,7 +298,7 @@ var GITLOG_MISSION = "You are ingesting an aggregated block of git commit MESSAG
296
298
  var CONVERSATION_MISSION = `You are ingesting a developer conversation as a JSONL transcript (one {role, content} turn per line): the user's requests, the assistant's narration, and compact 'action' turns naming each tool use and its target (e.g. "Edit boltons/strutils.py") with no arguments or outputs. It may be a SHORT decision chat or a LONG working session \u2014 scale the facts to the substance, never to the message count. Extract the FEWEST facts that capture the OUTCOME: the settled DECISIONS and their exact rules/values (quote literals VERBATIM); concrete CHANGES to specific code entities; problems and how they were resolved; conventions or invariants established; at most one fact for a notable REJECTED alternative ('initially proposed X, changed to Y because Z'). A short decision chat usually yields 1-2 facts; a substantial working session several. CRITICAL: a conversation REVISES itself \u2014 record ONLY the FINAL state as what is in effect; a superseded proposal appears ONLY inside the rejected fact, NEVER as its own 'decided' fact; if the same setting changes several times keep only the LAST, and make unmistakably clear which choice WON. Do NOT emit one fact per message, per intermediate proposal, or per action turn. Keep issue/PR references (#123, GH-123) VERBATIM and emit each as an ENTITY. Preserve the 'REF-ID: <token>' marker verbatim in every fact. Do not invent; capture only what was actually settled.`;
297
299
  var REFLECT_MISSION = "You are a debugging assistant with the project's past decisions in memory (git rationale and developer chats). Given a bug's SYMPTOM, find the past decision whose rationale explains the ROOT CAUSE \u2014 not one that merely shares vocabulary. Answer with the PRECISE fix: state the EXACT rule and the LITERAL values, identifiers, strings, numbers, or set members that were decided \u2014 quote them VERBATIM, never paraphrase, generalize, or omit them (give the actual decided value, not 'the project standard'). If memories CONFLICT on the same rule, the LATEST decision wins \u2014 prefer facts that explicitly amend or supersede an earlier one, state the superseded rule as no longer in effect, and never present it as the fix. Name the function/file to change and cite the REF-ID(s). If NOTHING in memory genuinely explains THIS symptom, say exactly that in one short sentence \u2014 a wrong-but-confident nearest match is worse than an honest miss; never stretch an unrelated decision to fit.";
298
300
  var DOCUMENT_MISSION = "You are ingesting a standalone document (notes, docs, or structural findings). Extract the concrete facts, concepts, and structure it describes.";
299
- var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details.";
301
+ var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details. When a new fact contradicts or supersedes an existing observation, UPDATE that observation to reflect the current state rather than creating a sibling alongside it; note that the rule was revised and when, so the superseded version is visible as history rather than as a competing claim.";
300
302
  var RETAIN_STRATEGIES = {
301
303
  git: { retain_mission: GIT_MISSION, retain_extraction_mode: "verbose" },
302
304
  // ONE big aggregated document (last N commit messages, no diffs) -> a larger chunk size so it stays
@@ -238,7 +238,9 @@ function readEnvConfig(env = process.env) {
238
238
  function loadConfig(opts = {}) {
239
239
  const o = typeof opts === "string" ? { path: opts } : opts;
240
240
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
241
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
241
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
242
+ if (!raw.harness && o.harness) raw.harness = o.harness;
243
+ return resolveConfig(raw);
242
244
  }
243
245
  var BANK_OVERRIDE_EXCLUDED = [
244
246
  "bankId",
@@ -322,7 +324,7 @@ var GITLOG_MISSION = "You are ingesting an aggregated block of git commit MESSAG
322
324
  var CONVERSATION_MISSION = `You are ingesting a developer conversation as a JSONL transcript (one {role, content} turn per line): the user's requests, the assistant's narration, and compact 'action' turns naming each tool use and its target (e.g. "Edit boltons/strutils.py") with no arguments or outputs. It may be a SHORT decision chat or a LONG working session \u2014 scale the facts to the substance, never to the message count. Extract the FEWEST facts that capture the OUTCOME: the settled DECISIONS and their exact rules/values (quote literals VERBATIM); concrete CHANGES to specific code entities; problems and how they were resolved; conventions or invariants established; at most one fact for a notable REJECTED alternative ('initially proposed X, changed to Y because Z'). A short decision chat usually yields 1-2 facts; a substantial working session several. CRITICAL: a conversation REVISES itself \u2014 record ONLY the FINAL state as what is in effect; a superseded proposal appears ONLY inside the rejected fact, NEVER as its own 'decided' fact; if the same setting changes several times keep only the LAST, and make unmistakably clear which choice WON. Do NOT emit one fact per message, per intermediate proposal, or per action turn. Keep issue/PR references (#123, GH-123) VERBATIM and emit each as an ENTITY. Preserve the 'REF-ID: <token>' marker verbatim in every fact. Do not invent; capture only what was actually settled.`;
323
325
  var REFLECT_MISSION = "You are a debugging assistant with the project's past decisions in memory (git rationale and developer chats). Given a bug's SYMPTOM, find the past decision whose rationale explains the ROOT CAUSE \u2014 not one that merely shares vocabulary. Answer with the PRECISE fix: state the EXACT rule and the LITERAL values, identifiers, strings, numbers, or set members that were decided \u2014 quote them VERBATIM, never paraphrase, generalize, or omit them (give the actual decided value, not 'the project standard'). If memories CONFLICT on the same rule, the LATEST decision wins \u2014 prefer facts that explicitly amend or supersede an earlier one, state the superseded rule as no longer in effect, and never present it as the fix. Name the function/file to change and cite the REF-ID(s). If NOTHING in memory genuinely explains THIS symptom, say exactly that in one short sentence \u2014 a wrong-but-confident nearest match is worse than an honest miss; never stretch an unrelated decision to fit.";
324
326
  var DOCUMENT_MISSION = "You are ingesting a standalone document (notes, docs, or structural findings). Extract the concrete facts, concepts, and structure it describes.";
325
- var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details.";
327
+ var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details. When a new fact contradicts or supersedes an existing observation, UPDATE that observation to reflect the current state rather than creating a sibling alongside it; note that the rule was revised and when, so the superseded version is visible as history rather than as a competing claim.";
326
328
  var RETAIN_STRATEGIES = {
327
329
  git: { retain_mission: GIT_MISSION, retain_extraction_mode: "verbose" },
328
330
  // ONE big aggregated document (last N commit messages, no diffs) -> a larger chunk size so it stays
@@ -238,7 +238,9 @@ function readEnvConfig(env = process.env) {
238
238
  function loadConfig(opts = {}) {
239
239
  const o = typeof opts === "string" ? { path: opts } : opts;
240
240
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
241
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
241
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
242
+ if (!raw.harness && o.harness) raw.harness = o.harness;
243
+ return resolveConfig(raw);
242
244
  }
243
245
  var BANK_OVERRIDE_EXCLUDED = [
244
246
  "bankId",
@@ -322,7 +324,7 @@ var GITLOG_MISSION = "You are ingesting an aggregated block of git commit MESSAG
322
324
  var CONVERSATION_MISSION = `You are ingesting a developer conversation as a JSONL transcript (one {role, content} turn per line): the user's requests, the assistant's narration, and compact 'action' turns naming each tool use and its target (e.g. "Edit boltons/strutils.py") with no arguments or outputs. It may be a SHORT decision chat or a LONG working session \u2014 scale the facts to the substance, never to the message count. Extract the FEWEST facts that capture the OUTCOME: the settled DECISIONS and their exact rules/values (quote literals VERBATIM); concrete CHANGES to specific code entities; problems and how they were resolved; conventions or invariants established; at most one fact for a notable REJECTED alternative ('initially proposed X, changed to Y because Z'). A short decision chat usually yields 1-2 facts; a substantial working session several. CRITICAL: a conversation REVISES itself \u2014 record ONLY the FINAL state as what is in effect; a superseded proposal appears ONLY inside the rejected fact, NEVER as its own 'decided' fact; if the same setting changes several times keep only the LAST, and make unmistakably clear which choice WON. Do NOT emit one fact per message, per intermediate proposal, or per action turn. Keep issue/PR references (#123, GH-123) VERBATIM and emit each as an ENTITY. Preserve the 'REF-ID: <token>' marker verbatim in every fact. Do not invent; capture only what was actually settled.`;
323
325
  var REFLECT_MISSION = "You are a debugging assistant with the project's past decisions in memory (git rationale and developer chats). Given a bug's SYMPTOM, find the past decision whose rationale explains the ROOT CAUSE \u2014 not one that merely shares vocabulary. Answer with the PRECISE fix: state the EXACT rule and the LITERAL values, identifiers, strings, numbers, or set members that were decided \u2014 quote them VERBATIM, never paraphrase, generalize, or omit them (give the actual decided value, not 'the project standard'). If memories CONFLICT on the same rule, the LATEST decision wins \u2014 prefer facts that explicitly amend or supersede an earlier one, state the superseded rule as no longer in effect, and never present it as the fix. Name the function/file to change and cite the REF-ID(s). If NOTHING in memory genuinely explains THIS symptom, say exactly that in one short sentence \u2014 a wrong-but-confident nearest match is worse than an honest miss; never stretch an unrelated decision to fit.";
324
326
  var DOCUMENT_MISSION = "You are ingesting a standalone document (notes, docs, or structural findings). Extract the concrete facts, concepts, and structure it describes.";
325
- var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details.";
327
+ var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details. When a new fact contradicts or supersedes an existing observation, UPDATE that observation to reflect the current state rather than creating a sibling alongside it; note that the rule was revised and when, so the superseded version is visible as history rather than as a competing claim.";
326
328
  var RETAIN_STRATEGIES = {
327
329
  git: { retain_mission: GIT_MISSION, retain_extraction_mode: "verbose" },
328
330
  // ONE big aggregated document (last N commit messages, no diffs) -> a larger chunk size so it stays
@@ -1365,7 +1367,7 @@ async function buildSessionStartContext(args) {
1365
1367
  cold = docIds !== void 0 ? docIds.size === 0 : void 0;
1366
1368
  gitDocIds = docIds;
1367
1369
  if (docIds !== void 0) {
1368
- startSeed(cwd, { limit: cfg.seedLimit });
1370
+ startSeed(cwd, { limit: cfg.seedLimit, harness });
1369
1371
  if (docIds.size === 0) {
1370
1372
  if (cfg.codebaseSurvey !== false) {
1371
1373
  startSurvey(cwd, {
@@ -212,7 +212,9 @@ function readEnvConfig(env = process.env) {
212
212
  function loadConfig(opts = {}) {
213
213
  const o = typeof opts === "string" ? { path: opts } : opts;
214
214
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
215
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
215
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
216
+ if (!raw.harness && o.harness) raw.harness = o.harness;
217
+ return resolveConfig(raw);
216
218
  }
217
219
  var BANK_OVERRIDE_EXCLUDED = [
218
220
  "bankId",
@@ -296,7 +298,7 @@ var GITLOG_MISSION = "You are ingesting an aggregated block of git commit MESSAG
296
298
  var CONVERSATION_MISSION = `You are ingesting a developer conversation as a JSONL transcript (one {role, content} turn per line): the user's requests, the assistant's narration, and compact 'action' turns naming each tool use and its target (e.g. "Edit boltons/strutils.py") with no arguments or outputs. It may be a SHORT decision chat or a LONG working session \u2014 scale the facts to the substance, never to the message count. Extract the FEWEST facts that capture the OUTCOME: the settled DECISIONS and their exact rules/values (quote literals VERBATIM); concrete CHANGES to specific code entities; problems and how they were resolved; conventions or invariants established; at most one fact for a notable REJECTED alternative ('initially proposed X, changed to Y because Z'). A short decision chat usually yields 1-2 facts; a substantial working session several. CRITICAL: a conversation REVISES itself \u2014 record ONLY the FINAL state as what is in effect; a superseded proposal appears ONLY inside the rejected fact, NEVER as its own 'decided' fact; if the same setting changes several times keep only the LAST, and make unmistakably clear which choice WON. Do NOT emit one fact per message, per intermediate proposal, or per action turn. Keep issue/PR references (#123, GH-123) VERBATIM and emit each as an ENTITY. Preserve the 'REF-ID: <token>' marker verbatim in every fact. Do not invent; capture only what was actually settled.`;
297
299
  var REFLECT_MISSION = "You are a debugging assistant with the project's past decisions in memory (git rationale and developer chats). Given a bug's SYMPTOM, find the past decision whose rationale explains the ROOT CAUSE \u2014 not one that merely shares vocabulary. Answer with the PRECISE fix: state the EXACT rule and the LITERAL values, identifiers, strings, numbers, or set members that were decided \u2014 quote them VERBATIM, never paraphrase, generalize, or omit them (give the actual decided value, not 'the project standard'). If memories CONFLICT on the same rule, the LATEST decision wins \u2014 prefer facts that explicitly amend or supersede an earlier one, state the superseded rule as no longer in effect, and never present it as the fix. Name the function/file to change and cite the REF-ID(s). If NOTHING in memory genuinely explains THIS symptom, say exactly that in one short sentence \u2014 a wrong-but-confident nearest match is worse than an honest miss; never stretch an unrelated decision to fit.";
298
300
  var DOCUMENT_MISSION = "You are ingesting a standalone document (notes, docs, or structural findings). Extract the concrete facts, concepts, and structure it describes.";
299
- var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details.";
301
+ var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details. When a new fact contradicts or supersedes an existing observation, UPDATE that observation to reflect the current state rather than creating a sibling alongside it; note that the rule was revised and when, so the superseded version is visible as history rather than as a competing claim.";
300
302
  var RETAIN_STRATEGIES = {
301
303
  git: { retain_mission: GIT_MISSION, retain_extraction_mode: "verbose" },
302
304
  // ONE big aggregated document (last N commit messages, no diffs) -> a larger chunk size so it stays
package/dist/cline.js CHANGED
@@ -175,7 +175,9 @@ function readEnvConfig(env = process.env) {
175
175
  function loadConfig(opts = {}) {
176
176
  const o = typeof opts === "string" ? { path: opts } : opts;
177
177
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
178
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
178
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
179
+ if (!raw.harness && o.harness) raw.harness = o.harness;
180
+ return resolveConfig(raw);
179
181
  }
180
182
  var BANK_OVERRIDE_EXCLUDED = [
181
183
  "bankId",
@@ -278,7 +280,7 @@ var GITLOG_MISSION = "You are ingesting an aggregated block of git commit MESSAG
278
280
  var CONVERSATION_MISSION = `You are ingesting a developer conversation as a JSONL transcript (one {role, content} turn per line): the user's requests, the assistant's narration, and compact 'action' turns naming each tool use and its target (e.g. "Edit boltons/strutils.py") with no arguments or outputs. It may be a SHORT decision chat or a LONG working session \u2014 scale the facts to the substance, never to the message count. Extract the FEWEST facts that capture the OUTCOME: the settled DECISIONS and their exact rules/values (quote literals VERBATIM); concrete CHANGES to specific code entities; problems and how they were resolved; conventions or invariants established; at most one fact for a notable REJECTED alternative ('initially proposed X, changed to Y because Z'). A short decision chat usually yields 1-2 facts; a substantial working session several. CRITICAL: a conversation REVISES itself \u2014 record ONLY the FINAL state as what is in effect; a superseded proposal appears ONLY inside the rejected fact, NEVER as its own 'decided' fact; if the same setting changes several times keep only the LAST, and make unmistakably clear which choice WON. Do NOT emit one fact per message, per intermediate proposal, or per action turn. Keep issue/PR references (#123, GH-123) VERBATIM and emit each as an ENTITY. Preserve the 'REF-ID: <token>' marker verbatim in every fact. Do not invent; capture only what was actually settled.`;
279
281
  var REFLECT_MISSION = "You are a debugging assistant with the project's past decisions in memory (git rationale and developer chats). Given a bug's SYMPTOM, find the past decision whose rationale explains the ROOT CAUSE \u2014 not one that merely shares vocabulary. Answer with the PRECISE fix: state the EXACT rule and the LITERAL values, identifiers, strings, numbers, or set members that were decided \u2014 quote them VERBATIM, never paraphrase, generalize, or omit them (give the actual decided value, not 'the project standard'). If memories CONFLICT on the same rule, the LATEST decision wins \u2014 prefer facts that explicitly amend or supersede an earlier one, state the superseded rule as no longer in effect, and never present it as the fix. Name the function/file to change and cite the REF-ID(s). If NOTHING in memory genuinely explains THIS symptom, say exactly that in one short sentence \u2014 a wrong-but-confident nearest match is worse than an honest miss; never stretch an unrelated decision to fit.";
280
282
  var DOCUMENT_MISSION = "You are ingesting a standalone document (notes, docs, or structural findings). Extract the concrete facts, concepts, and structure it describes.";
281
- var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details.";
283
+ var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details. When a new fact contradicts or supersedes an existing observation, UPDATE that observation to reflect the current state rather than creating a sibling alongside it; note that the rule was revised and when, so the superseded version is visible as history rather than as a competing claim.";
282
284
  var RETAIN_STRATEGIES = {
283
285
  git: { retain_mission: GIT_MISSION, retain_extraction_mode: "verbose" },
284
286
  // ONE big aggregated document (last N commit messages, no diffs) -> a larger chunk size so it stays
@@ -15945,7 +15947,7 @@ async function buildSessionStartContext(args) {
15945
15947
  cold = docIds !== void 0 ? docIds.size === 0 : void 0;
15946
15948
  gitDocIds = docIds;
15947
15949
  if (docIds !== void 0) {
15948
- startSeed(cwd, { limit: cfg.seedLimit });
15950
+ startSeed(cwd, { limit: cfg.seedLimit, harness });
15949
15951
  if (docIds.size === 0) {
15950
15952
  if (cfg.codebaseSurvey !== false) {
15951
15953
  startSurvey(cwd, {
@@ -238,7 +238,9 @@ function readEnvConfig(env = process.env) {
238
238
  function loadConfig(opts = {}) {
239
239
  const o = typeof opts === "string" ? { path: opts } : opts;
240
240
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
241
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
241
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
242
+ if (!raw.harness && o.harness) raw.harness = o.harness;
243
+ return resolveConfig(raw);
242
244
  }
243
245
  var BANK_OVERRIDE_EXCLUDED = [
244
246
  "bankId",
@@ -322,7 +324,7 @@ var GITLOG_MISSION = "You are ingesting an aggregated block of git commit MESSAG
322
324
  var CONVERSATION_MISSION = `You are ingesting a developer conversation as a JSONL transcript (one {role, content} turn per line): the user's requests, the assistant's narration, and compact 'action' turns naming each tool use and its target (e.g. "Edit boltons/strutils.py") with no arguments or outputs. It may be a SHORT decision chat or a LONG working session \u2014 scale the facts to the substance, never to the message count. Extract the FEWEST facts that capture the OUTCOME: the settled DECISIONS and their exact rules/values (quote literals VERBATIM); concrete CHANGES to specific code entities; problems and how they were resolved; conventions or invariants established; at most one fact for a notable REJECTED alternative ('initially proposed X, changed to Y because Z'). A short decision chat usually yields 1-2 facts; a substantial working session several. CRITICAL: a conversation REVISES itself \u2014 record ONLY the FINAL state as what is in effect; a superseded proposal appears ONLY inside the rejected fact, NEVER as its own 'decided' fact; if the same setting changes several times keep only the LAST, and make unmistakably clear which choice WON. Do NOT emit one fact per message, per intermediate proposal, or per action turn. Keep issue/PR references (#123, GH-123) VERBATIM and emit each as an ENTITY. Preserve the 'REF-ID: <token>' marker verbatim in every fact. Do not invent; capture only what was actually settled.`;
323
325
  var REFLECT_MISSION = "You are a debugging assistant with the project's past decisions in memory (git rationale and developer chats). Given a bug's SYMPTOM, find the past decision whose rationale explains the ROOT CAUSE \u2014 not one that merely shares vocabulary. Answer with the PRECISE fix: state the EXACT rule and the LITERAL values, identifiers, strings, numbers, or set members that were decided \u2014 quote them VERBATIM, never paraphrase, generalize, or omit them (give the actual decided value, not 'the project standard'). If memories CONFLICT on the same rule, the LATEST decision wins \u2014 prefer facts that explicitly amend or supersede an earlier one, state the superseded rule as no longer in effect, and never present it as the fix. Name the function/file to change and cite the REF-ID(s). If NOTHING in memory genuinely explains THIS symptom, say exactly that in one short sentence \u2014 a wrong-but-confident nearest match is worse than an honest miss; never stretch an unrelated decision to fit.";
324
326
  var DOCUMENT_MISSION = "You are ingesting a standalone document (notes, docs, or structural findings). Extract the concrete facts, concepts, and structure it describes.";
325
- var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details.";
327
+ var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details. When a new fact contradicts or supersedes an existing observation, UPDATE that observation to reflect the current state rather than creating a sibling alongside it; note that the rule was revised and when, so the superseded version is visible as history rather than as a competing claim.";
326
328
  var RETAIN_STRATEGIES = {
327
329
  git: { retain_mission: GIT_MISSION, retain_extraction_mode: "verbose" },
328
330
  // ONE big aggregated document (last N commit messages, no diffs) -> a larger chunk size so it stays
@@ -238,7 +238,9 @@ function readEnvConfig(env = process.env) {
238
238
  function loadConfig(opts = {}) {
239
239
  const o = typeof opts === "string" ? { path: opts } : opts;
240
240
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
241
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
241
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
242
+ if (!raw.harness && o.harness) raw.harness = o.harness;
243
+ return resolveConfig(raw);
242
244
  }
243
245
  var BANK_OVERRIDE_EXCLUDED = [
244
246
  "bankId",
@@ -322,7 +324,7 @@ var GITLOG_MISSION = "You are ingesting an aggregated block of git commit MESSAG
322
324
  var CONVERSATION_MISSION = `You are ingesting a developer conversation as a JSONL transcript (one {role, content} turn per line): the user's requests, the assistant's narration, and compact 'action' turns naming each tool use and its target (e.g. "Edit boltons/strutils.py") with no arguments or outputs. It may be a SHORT decision chat or a LONG working session \u2014 scale the facts to the substance, never to the message count. Extract the FEWEST facts that capture the OUTCOME: the settled DECISIONS and their exact rules/values (quote literals VERBATIM); concrete CHANGES to specific code entities; problems and how they were resolved; conventions or invariants established; at most one fact for a notable REJECTED alternative ('initially proposed X, changed to Y because Z'). A short decision chat usually yields 1-2 facts; a substantial working session several. CRITICAL: a conversation REVISES itself \u2014 record ONLY the FINAL state as what is in effect; a superseded proposal appears ONLY inside the rejected fact, NEVER as its own 'decided' fact; if the same setting changes several times keep only the LAST, and make unmistakably clear which choice WON. Do NOT emit one fact per message, per intermediate proposal, or per action turn. Keep issue/PR references (#123, GH-123) VERBATIM and emit each as an ENTITY. Preserve the 'REF-ID: <token>' marker verbatim in every fact. Do not invent; capture only what was actually settled.`;
323
325
  var REFLECT_MISSION = "You are a debugging assistant with the project's past decisions in memory (git rationale and developer chats). Given a bug's SYMPTOM, find the past decision whose rationale explains the ROOT CAUSE \u2014 not one that merely shares vocabulary. Answer with the PRECISE fix: state the EXACT rule and the LITERAL values, identifiers, strings, numbers, or set members that were decided \u2014 quote them VERBATIM, never paraphrase, generalize, or omit them (give the actual decided value, not 'the project standard'). If memories CONFLICT on the same rule, the LATEST decision wins \u2014 prefer facts that explicitly amend or supersede an earlier one, state the superseded rule as no longer in effect, and never present it as the fix. Name the function/file to change and cite the REF-ID(s). If NOTHING in memory genuinely explains THIS symptom, say exactly that in one short sentence \u2014 a wrong-but-confident nearest match is worse than an honest miss; never stretch an unrelated decision to fit.";
324
326
  var DOCUMENT_MISSION = "You are ingesting a standalone document (notes, docs, or structural findings). Extract the concrete facts, concepts, and structure it describes.";
325
- var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details.";
327
+ var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details. When a new fact contradicts or supersedes an existing observation, UPDATE that observation to reflect the current state rather than creating a sibling alongside it; note that the rule was revised and when, so the superseded version is visible as history rather than as a competing claim.";
326
328
  var RETAIN_STRATEGIES = {
327
329
  git: { retain_mission: GIT_MISSION, retain_extraction_mode: "verbose" },
328
330
  // ONE big aggregated document (last N commit messages, no diffs) -> a larger chunk size so it stays
@@ -1365,7 +1367,7 @@ async function buildSessionStartContext(args) {
1365
1367
  cold = docIds !== void 0 ? docIds.size === 0 : void 0;
1366
1368
  gitDocIds = docIds;
1367
1369
  if (docIds !== void 0) {
1368
- startSeed(cwd, { limit: cfg.seedLimit });
1370
+ startSeed(cwd, { limit: cfg.seedLimit, harness });
1369
1371
  if (docIds.size === 0) {
1370
1372
  if (cfg.codebaseSurvey !== false) {
1371
1373
  startSurvey(cwd, {
@@ -212,7 +212,9 @@ function readEnvConfig(env = process.env) {
212
212
  function loadConfig(opts = {}) {
213
213
  const o = typeof opts === "string" ? { path: opts } : opts;
214
214
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
215
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
215
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
216
+ if (!raw.harness && o.harness) raw.harness = o.harness;
217
+ return resolveConfig(raw);
216
218
  }
217
219
  var BANK_OVERRIDE_EXCLUDED = [
218
220
  "bankId",
@@ -296,7 +298,7 @@ var GITLOG_MISSION = "You are ingesting an aggregated block of git commit MESSAG
296
298
  var CONVERSATION_MISSION = `You are ingesting a developer conversation as a JSONL transcript (one {role, content} turn per line): the user's requests, the assistant's narration, and compact 'action' turns naming each tool use and its target (e.g. "Edit boltons/strutils.py") with no arguments or outputs. It may be a SHORT decision chat or a LONG working session \u2014 scale the facts to the substance, never to the message count. Extract the FEWEST facts that capture the OUTCOME: the settled DECISIONS and their exact rules/values (quote literals VERBATIM); concrete CHANGES to specific code entities; problems and how they were resolved; conventions or invariants established; at most one fact for a notable REJECTED alternative ('initially proposed X, changed to Y because Z'). A short decision chat usually yields 1-2 facts; a substantial working session several. CRITICAL: a conversation REVISES itself \u2014 record ONLY the FINAL state as what is in effect; a superseded proposal appears ONLY inside the rejected fact, NEVER as its own 'decided' fact; if the same setting changes several times keep only the LAST, and make unmistakably clear which choice WON. Do NOT emit one fact per message, per intermediate proposal, or per action turn. Keep issue/PR references (#123, GH-123) VERBATIM and emit each as an ENTITY. Preserve the 'REF-ID: <token>' marker verbatim in every fact. Do not invent; capture only what was actually settled.`;
297
299
  var REFLECT_MISSION = "You are a debugging assistant with the project's past decisions in memory (git rationale and developer chats). Given a bug's SYMPTOM, find the past decision whose rationale explains the ROOT CAUSE \u2014 not one that merely shares vocabulary. Answer with the PRECISE fix: state the EXACT rule and the LITERAL values, identifiers, strings, numbers, or set members that were decided \u2014 quote them VERBATIM, never paraphrase, generalize, or omit them (give the actual decided value, not 'the project standard'). If memories CONFLICT on the same rule, the LATEST decision wins \u2014 prefer facts that explicitly amend or supersede an earlier one, state the superseded rule as no longer in effect, and never present it as the fix. Name the function/file to change and cite the REF-ID(s). If NOTHING in memory genuinely explains THIS symptom, say exactly that in one short sentence \u2014 a wrong-but-confident nearest match is worse than an honest miss; never stretch an unrelated decision to fit.";
298
300
  var DOCUMENT_MISSION = "You are ingesting a standalone document (notes, docs, or structural findings). Extract the concrete facts, concepts, and structure it describes.";
299
- var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details.";
301
+ var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details. When a new fact contradicts or supersedes an existing observation, UPDATE that observation to reflect the current state rather than creating a sibling alongside it; note that the rule was revised and when, so the superseded version is visible as history rather than as a competing claim.";
300
302
  var RETAIN_STRATEGIES = {
301
303
  git: { retain_mission: GIT_MISSION, retain_extraction_mode: "verbose" },
302
304
  // ONE big aggregated document (last N commit messages, no diffs) -> a larger chunk size so it stays
@@ -238,7 +238,9 @@ function readEnvConfig(env = process.env) {
238
238
  function loadConfig(opts = {}) {
239
239
  const o = typeof opts === "string" ? { path: opts } : opts;
240
240
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
241
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
241
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
242
+ if (!raw.harness && o.harness) raw.harness = o.harness;
243
+ return resolveConfig(raw);
242
244
  }
243
245
  var BANK_OVERRIDE_EXCLUDED = [
244
246
  "bankId",
@@ -322,7 +324,7 @@ var GITLOG_MISSION = "You are ingesting an aggregated block of git commit MESSAG
322
324
  var CONVERSATION_MISSION = `You are ingesting a developer conversation as a JSONL transcript (one {role, content} turn per line): the user's requests, the assistant's narration, and compact 'action' turns naming each tool use and its target (e.g. "Edit boltons/strutils.py") with no arguments or outputs. It may be a SHORT decision chat or a LONG working session \u2014 scale the facts to the substance, never to the message count. Extract the FEWEST facts that capture the OUTCOME: the settled DECISIONS and their exact rules/values (quote literals VERBATIM); concrete CHANGES to specific code entities; problems and how they were resolved; conventions or invariants established; at most one fact for a notable REJECTED alternative ('initially proposed X, changed to Y because Z'). A short decision chat usually yields 1-2 facts; a substantial working session several. CRITICAL: a conversation REVISES itself \u2014 record ONLY the FINAL state as what is in effect; a superseded proposal appears ONLY inside the rejected fact, NEVER as its own 'decided' fact; if the same setting changes several times keep only the LAST, and make unmistakably clear which choice WON. Do NOT emit one fact per message, per intermediate proposal, or per action turn. Keep issue/PR references (#123, GH-123) VERBATIM and emit each as an ENTITY. Preserve the 'REF-ID: <token>' marker verbatim in every fact. Do not invent; capture only what was actually settled.`;
323
325
  var REFLECT_MISSION = "You are a debugging assistant with the project's past decisions in memory (git rationale and developer chats). Given a bug's SYMPTOM, find the past decision whose rationale explains the ROOT CAUSE \u2014 not one that merely shares vocabulary. Answer with the PRECISE fix: state the EXACT rule and the LITERAL values, identifiers, strings, numbers, or set members that were decided \u2014 quote them VERBATIM, never paraphrase, generalize, or omit them (give the actual decided value, not 'the project standard'). If memories CONFLICT on the same rule, the LATEST decision wins \u2014 prefer facts that explicitly amend or supersede an earlier one, state the superseded rule as no longer in effect, and never present it as the fix. Name the function/file to change and cite the REF-ID(s). If NOTHING in memory genuinely explains THIS symptom, say exactly that in one short sentence \u2014 a wrong-but-confident nearest match is worse than an honest miss; never stretch an unrelated decision to fit.";
324
326
  var DOCUMENT_MISSION = "You are ingesting a standalone document (notes, docs, or structural findings). Extract the concrete facts, concepts, and structure it describes.";
325
- var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details.";
327
+ var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details. When a new fact contradicts or supersedes an existing observation, UPDATE that observation to reflect the current state rather than creating a sibling alongside it; note that the rule was revised and when, so the superseded version is visible as history rather than as a competing claim.";
326
328
  var RETAIN_STRATEGIES = {
327
329
  git: { retain_mission: GIT_MISSION, retain_extraction_mode: "verbose" },
328
330
  // ONE big aggregated document (last N commit messages, no diffs) -> a larger chunk size so it stays
@@ -238,7 +238,9 @@ function readEnvConfig(env = process.env) {
238
238
  function loadConfig(opts = {}) {
239
239
  const o = typeof opts === "string" ? { path: opts } : opts;
240
240
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
241
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
241
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
242
+ if (!raw.harness && o.harness) raw.harness = o.harness;
243
+ return resolveConfig(raw);
242
244
  }
243
245
  var BANK_OVERRIDE_EXCLUDED = [
244
246
  "bankId",
@@ -322,7 +324,7 @@ var GITLOG_MISSION = "You are ingesting an aggregated block of git commit MESSAG
322
324
  var CONVERSATION_MISSION = `You are ingesting a developer conversation as a JSONL transcript (one {role, content} turn per line): the user's requests, the assistant's narration, and compact 'action' turns naming each tool use and its target (e.g. "Edit boltons/strutils.py") with no arguments or outputs. It may be a SHORT decision chat or a LONG working session \u2014 scale the facts to the substance, never to the message count. Extract the FEWEST facts that capture the OUTCOME: the settled DECISIONS and their exact rules/values (quote literals VERBATIM); concrete CHANGES to specific code entities; problems and how they were resolved; conventions or invariants established; at most one fact for a notable REJECTED alternative ('initially proposed X, changed to Y because Z'). A short decision chat usually yields 1-2 facts; a substantial working session several. CRITICAL: a conversation REVISES itself \u2014 record ONLY the FINAL state as what is in effect; a superseded proposal appears ONLY inside the rejected fact, NEVER as its own 'decided' fact; if the same setting changes several times keep only the LAST, and make unmistakably clear which choice WON. Do NOT emit one fact per message, per intermediate proposal, or per action turn. Keep issue/PR references (#123, GH-123) VERBATIM and emit each as an ENTITY. Preserve the 'REF-ID: <token>' marker verbatim in every fact. Do not invent; capture only what was actually settled.`;
323
325
  var REFLECT_MISSION = "You are a debugging assistant with the project's past decisions in memory (git rationale and developer chats). Given a bug's SYMPTOM, find the past decision whose rationale explains the ROOT CAUSE \u2014 not one that merely shares vocabulary. Answer with the PRECISE fix: state the EXACT rule and the LITERAL values, identifiers, strings, numbers, or set members that were decided \u2014 quote them VERBATIM, never paraphrase, generalize, or omit them (give the actual decided value, not 'the project standard'). If memories CONFLICT on the same rule, the LATEST decision wins \u2014 prefer facts that explicitly amend or supersede an earlier one, state the superseded rule as no longer in effect, and never present it as the fix. Name the function/file to change and cite the REF-ID(s). If NOTHING in memory genuinely explains THIS symptom, say exactly that in one short sentence \u2014 a wrong-but-confident nearest match is worse than an honest miss; never stretch an unrelated decision to fit.";
324
326
  var DOCUMENT_MISSION = "You are ingesting a standalone document (notes, docs, or structural findings). Extract the concrete facts, concepts, and structure it describes.";
325
- var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details.";
327
+ var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details. When a new fact contradicts or supersedes an existing observation, UPDATE that observation to reflect the current state rather than creating a sibling alongside it; note that the rule was revised and when, so the superseded version is visible as history rather than as a competing claim.";
326
328
  var RETAIN_STRATEGIES = {
327
329
  git: { retain_mission: GIT_MISSION, retain_extraction_mode: "verbose" },
328
330
  // ONE big aggregated document (last N commit messages, no diffs) -> a larger chunk size so it stays
@@ -1365,7 +1367,7 @@ async function buildSessionStartContext(args) {
1365
1367
  cold = docIds !== void 0 ? docIds.size === 0 : void 0;
1366
1368
  gitDocIds = docIds;
1367
1369
  if (docIds !== void 0) {
1368
- startSeed(cwd, { limit: cfg.seedLimit });
1370
+ startSeed(cwd, { limit: cfg.seedLimit, harness });
1369
1371
  if (docIds.size === 0) {
1370
1372
  if (cfg.codebaseSurvey !== false) {
1371
1373
  startSurvey(cwd, {
@@ -212,7 +212,9 @@ function readEnvConfig(env = process.env) {
212
212
  function loadConfig(opts = {}) {
213
213
  const o = typeof opts === "string" ? { path: opts } : opts;
214
214
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
215
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
215
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
216
+ if (!raw.harness && o.harness) raw.harness = o.harness;
217
+ return resolveConfig(raw);
216
218
  }
217
219
  var BANK_OVERRIDE_EXCLUDED = [
218
220
  "bankId",
@@ -296,7 +298,7 @@ var GITLOG_MISSION = "You are ingesting an aggregated block of git commit MESSAG
296
298
  var CONVERSATION_MISSION = `You are ingesting a developer conversation as a JSONL transcript (one {role, content} turn per line): the user's requests, the assistant's narration, and compact 'action' turns naming each tool use and its target (e.g. "Edit boltons/strutils.py") with no arguments or outputs. It may be a SHORT decision chat or a LONG working session \u2014 scale the facts to the substance, never to the message count. Extract the FEWEST facts that capture the OUTCOME: the settled DECISIONS and their exact rules/values (quote literals VERBATIM); concrete CHANGES to specific code entities; problems and how they were resolved; conventions or invariants established; at most one fact for a notable REJECTED alternative ('initially proposed X, changed to Y because Z'). A short decision chat usually yields 1-2 facts; a substantial working session several. CRITICAL: a conversation REVISES itself \u2014 record ONLY the FINAL state as what is in effect; a superseded proposal appears ONLY inside the rejected fact, NEVER as its own 'decided' fact; if the same setting changes several times keep only the LAST, and make unmistakably clear which choice WON. Do NOT emit one fact per message, per intermediate proposal, or per action turn. Keep issue/PR references (#123, GH-123) VERBATIM and emit each as an ENTITY. Preserve the 'REF-ID: <token>' marker verbatim in every fact. Do not invent; capture only what was actually settled.`;
297
299
  var REFLECT_MISSION = "You are a debugging assistant with the project's past decisions in memory (git rationale and developer chats). Given a bug's SYMPTOM, find the past decision whose rationale explains the ROOT CAUSE \u2014 not one that merely shares vocabulary. Answer with the PRECISE fix: state the EXACT rule and the LITERAL values, identifiers, strings, numbers, or set members that were decided \u2014 quote them VERBATIM, never paraphrase, generalize, or omit them (give the actual decided value, not 'the project standard'). If memories CONFLICT on the same rule, the LATEST decision wins \u2014 prefer facts that explicitly amend or supersede an earlier one, state the superseded rule as no longer in effect, and never present it as the fix. Name the function/file to change and cite the REF-ID(s). If NOTHING in memory genuinely explains THIS symptom, say exactly that in one short sentence \u2014 a wrong-but-confident nearest match is worse than an honest miss; never stretch an unrelated decision to fit.";
298
300
  var DOCUMENT_MISSION = "You are ingesting a standalone document (notes, docs, or structural findings). Extract the concrete facts, concepts, and structure it describes.";
299
- var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details.";
301
+ var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details. When a new fact contradicts or supersedes an existing observation, UPDATE that observation to reflect the current state rather than creating a sibling alongside it; note that the rule was revised and when, so the superseded version is visible as history rather than as a competing claim.";
300
302
  var RETAIN_STRATEGIES = {
301
303
  git: { retain_mission: GIT_MISSION, retain_extraction_mode: "verbose" },
302
304
  // ONE big aggregated document (last N commit messages, no diffs) -> a larger chunk size so it stays
@@ -238,7 +238,9 @@ function readEnvConfig(env = process.env) {
238
238
  function loadConfig(opts = {}) {
239
239
  const o = typeof opts === "string" ? { path: opts } : opts;
240
240
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
241
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
241
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
242
+ if (!raw.harness && o.harness) raw.harness = o.harness;
243
+ return resolveConfig(raw);
242
244
  }
243
245
  var BANK_OVERRIDE_EXCLUDED = [
244
246
  "bankId",
@@ -322,7 +324,7 @@ var GITLOG_MISSION = "You are ingesting an aggregated block of git commit MESSAG
322
324
  var CONVERSATION_MISSION = `You are ingesting a developer conversation as a JSONL transcript (one {role, content} turn per line): the user's requests, the assistant's narration, and compact 'action' turns naming each tool use and its target (e.g. "Edit boltons/strutils.py") with no arguments or outputs. It may be a SHORT decision chat or a LONG working session \u2014 scale the facts to the substance, never to the message count. Extract the FEWEST facts that capture the OUTCOME: the settled DECISIONS and their exact rules/values (quote literals VERBATIM); concrete CHANGES to specific code entities; problems and how they were resolved; conventions or invariants established; at most one fact for a notable REJECTED alternative ('initially proposed X, changed to Y because Z'). A short decision chat usually yields 1-2 facts; a substantial working session several. CRITICAL: a conversation REVISES itself \u2014 record ONLY the FINAL state as what is in effect; a superseded proposal appears ONLY inside the rejected fact, NEVER as its own 'decided' fact; if the same setting changes several times keep only the LAST, and make unmistakably clear which choice WON. Do NOT emit one fact per message, per intermediate proposal, or per action turn. Keep issue/PR references (#123, GH-123) VERBATIM and emit each as an ENTITY. Preserve the 'REF-ID: <token>' marker verbatim in every fact. Do not invent; capture only what was actually settled.`;
323
325
  var REFLECT_MISSION = "You are a debugging assistant with the project's past decisions in memory (git rationale and developer chats). Given a bug's SYMPTOM, find the past decision whose rationale explains the ROOT CAUSE \u2014 not one that merely shares vocabulary. Answer with the PRECISE fix: state the EXACT rule and the LITERAL values, identifiers, strings, numbers, or set members that were decided \u2014 quote them VERBATIM, never paraphrase, generalize, or omit them (give the actual decided value, not 'the project standard'). If memories CONFLICT on the same rule, the LATEST decision wins \u2014 prefer facts that explicitly amend or supersede an earlier one, state the superseded rule as no longer in effect, and never present it as the fix. Name the function/file to change and cite the REF-ID(s). If NOTHING in memory genuinely explains THIS symptom, say exactly that in one short sentence \u2014 a wrong-but-confident nearest match is worse than an honest miss; never stretch an unrelated decision to fit.";
324
326
  var DOCUMENT_MISSION = "You are ingesting a standalone document (notes, docs, or structural findings). Extract the concrete facts, concepts, and structure it describes.";
325
- var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details.";
327
+ var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details. When a new fact contradicts or supersedes an existing observation, UPDATE that observation to reflect the current state rather than creating a sibling alongside it; note that the rule was revised and when, so the superseded version is visible as history rather than as a competing claim.";
326
328
  var RETAIN_STRATEGIES = {
327
329
  git: { retain_mission: GIT_MISSION, retain_extraction_mode: "verbose" },
328
330
  // ONE big aggregated document (last N commit messages, no diffs) -> a larger chunk size so it stays
@@ -238,7 +238,9 @@ function readEnvConfig(env = process.env) {
238
238
  function loadConfig(opts = {}) {
239
239
  const o = typeof opts === "string" ? { path: opts } : opts;
240
240
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
241
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
241
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
242
+ if (!raw.harness && o.harness) raw.harness = o.harness;
243
+ return resolveConfig(raw);
242
244
  }
243
245
  var BANK_OVERRIDE_EXCLUDED = [
244
246
  "bankId",
@@ -322,7 +324,7 @@ var GITLOG_MISSION = "You are ingesting an aggregated block of git commit MESSAG
322
324
  var CONVERSATION_MISSION = `You are ingesting a developer conversation as a JSONL transcript (one {role, content} turn per line): the user's requests, the assistant's narration, and compact 'action' turns naming each tool use and its target (e.g. "Edit boltons/strutils.py") with no arguments or outputs. It may be a SHORT decision chat or a LONG working session \u2014 scale the facts to the substance, never to the message count. Extract the FEWEST facts that capture the OUTCOME: the settled DECISIONS and their exact rules/values (quote literals VERBATIM); concrete CHANGES to specific code entities; problems and how they were resolved; conventions or invariants established; at most one fact for a notable REJECTED alternative ('initially proposed X, changed to Y because Z'). A short decision chat usually yields 1-2 facts; a substantial working session several. CRITICAL: a conversation REVISES itself \u2014 record ONLY the FINAL state as what is in effect; a superseded proposal appears ONLY inside the rejected fact, NEVER as its own 'decided' fact; if the same setting changes several times keep only the LAST, and make unmistakably clear which choice WON. Do NOT emit one fact per message, per intermediate proposal, or per action turn. Keep issue/PR references (#123, GH-123) VERBATIM and emit each as an ENTITY. Preserve the 'REF-ID: <token>' marker verbatim in every fact. Do not invent; capture only what was actually settled.`;
323
325
  var REFLECT_MISSION = "You are a debugging assistant with the project's past decisions in memory (git rationale and developer chats). Given a bug's SYMPTOM, find the past decision whose rationale explains the ROOT CAUSE \u2014 not one that merely shares vocabulary. Answer with the PRECISE fix: state the EXACT rule and the LITERAL values, identifiers, strings, numbers, or set members that were decided \u2014 quote them VERBATIM, never paraphrase, generalize, or omit them (give the actual decided value, not 'the project standard'). If memories CONFLICT on the same rule, the LATEST decision wins \u2014 prefer facts that explicitly amend or supersede an earlier one, state the superseded rule as no longer in effect, and never present it as the fix. Name the function/file to change and cite the REF-ID(s). If NOTHING in memory genuinely explains THIS symptom, say exactly that in one short sentence \u2014 a wrong-but-confident nearest match is worse than an honest miss; never stretch an unrelated decision to fit.";
324
326
  var DOCUMENT_MISSION = "You are ingesting a standalone document (notes, docs, or structural findings). Extract the concrete facts, concepts, and structure it describes.";
325
- var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details.";
327
+ var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details. When a new fact contradicts or supersedes an existing observation, UPDATE that observation to reflect the current state rather than creating a sibling alongside it; note that the rule was revised and when, so the superseded version is visible as history rather than as a competing claim.";
326
328
  var RETAIN_STRATEGIES = {
327
329
  git: { retain_mission: GIT_MISSION, retain_extraction_mode: "verbose" },
328
330
  // ONE big aggregated document (last N commit messages, no diffs) -> a larger chunk size so it stays
@@ -1365,7 +1367,7 @@ async function buildSessionStartContext(args) {
1365
1367
  cold = docIds !== void 0 ? docIds.size === 0 : void 0;
1366
1368
  gitDocIds = docIds;
1367
1369
  if (docIds !== void 0) {
1368
- startSeed(cwd, { limit: cfg.seedLimit });
1370
+ startSeed(cwd, { limit: cfg.seedLimit, harness });
1369
1371
  if (docIds.size === 0) {
1370
1372
  if (cfg.codebaseSurvey !== false) {
1371
1373
  startSurvey(cwd, {
@@ -212,7 +212,9 @@ function readEnvConfig(env = process.env) {
212
212
  function loadConfig(opts = {}) {
213
213
  const o = typeof opts === "string" ? { path: opts } : opts;
214
214
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
215
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
215
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
216
+ if (!raw.harness && o.harness) raw.harness = o.harness;
217
+ return resolveConfig(raw);
216
218
  }
217
219
  var BANK_OVERRIDE_EXCLUDED = [
218
220
  "bankId",
@@ -296,7 +298,7 @@ var GITLOG_MISSION = "You are ingesting an aggregated block of git commit MESSAG
296
298
  var CONVERSATION_MISSION = `You are ingesting a developer conversation as a JSONL transcript (one {role, content} turn per line): the user's requests, the assistant's narration, and compact 'action' turns naming each tool use and its target (e.g. "Edit boltons/strutils.py") with no arguments or outputs. It may be a SHORT decision chat or a LONG working session \u2014 scale the facts to the substance, never to the message count. Extract the FEWEST facts that capture the OUTCOME: the settled DECISIONS and their exact rules/values (quote literals VERBATIM); concrete CHANGES to specific code entities; problems and how they were resolved; conventions or invariants established; at most one fact for a notable REJECTED alternative ('initially proposed X, changed to Y because Z'). A short decision chat usually yields 1-2 facts; a substantial working session several. CRITICAL: a conversation REVISES itself \u2014 record ONLY the FINAL state as what is in effect; a superseded proposal appears ONLY inside the rejected fact, NEVER as its own 'decided' fact; if the same setting changes several times keep only the LAST, and make unmistakably clear which choice WON. Do NOT emit one fact per message, per intermediate proposal, or per action turn. Keep issue/PR references (#123, GH-123) VERBATIM and emit each as an ENTITY. Preserve the 'REF-ID: <token>' marker verbatim in every fact. Do not invent; capture only what was actually settled.`;
297
299
  var REFLECT_MISSION = "You are a debugging assistant with the project's past decisions in memory (git rationale and developer chats). Given a bug's SYMPTOM, find the past decision whose rationale explains the ROOT CAUSE \u2014 not one that merely shares vocabulary. Answer with the PRECISE fix: state the EXACT rule and the LITERAL values, identifiers, strings, numbers, or set members that were decided \u2014 quote them VERBATIM, never paraphrase, generalize, or omit them (give the actual decided value, not 'the project standard'). If memories CONFLICT on the same rule, the LATEST decision wins \u2014 prefer facts that explicitly amend or supersede an earlier one, state the superseded rule as no longer in effect, and never present it as the fix. Name the function/file to change and cite the REF-ID(s). If NOTHING in memory genuinely explains THIS symptom, say exactly that in one short sentence \u2014 a wrong-but-confident nearest match is worse than an honest miss; never stretch an unrelated decision to fit.";
298
300
  var DOCUMENT_MISSION = "You are ingesting a standalone document (notes, docs, or structural findings). Extract the concrete facts, concepts, and structure it describes.";
299
- var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details.";
301
+ var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details. When a new fact contradicts or supersedes an existing observation, UPDATE that observation to reflect the current state rather than creating a sibling alongside it; note that the rule was revised and when, so the superseded version is visible as history rather than as a competing claim.";
300
302
  var RETAIN_STRATEGIES = {
301
303
  git: { retain_mission: GIT_MISSION, retain_extraction_mode: "verbose" },
302
304
  // ONE big aggregated document (last N commit messages, no diffs) -> a larger chunk size so it stays
@@ -439,7 +439,9 @@ function readEnvConfig(env = process.env) {
439
439
  function loadConfig(opts = {}) {
440
440
  const o = typeof opts === "string" ? { path: opts } : opts;
441
441
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
442
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
442
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
443
+ if (!raw.harness && o.harness) raw.harness = o.harness;
444
+ return resolveConfig(raw);
443
445
  }
444
446
 
445
447
  // src/core/daemon.ts
package/dist/deepen.js CHANGED
@@ -287,7 +287,9 @@ function readEnvConfig(env = process.env) {
287
287
  function loadConfig(opts = {}) {
288
288
  const o = typeof opts === "string" ? { path: opts } : opts;
289
289
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
290
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
290
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
291
+ if (!raw.harness && o.harness) raw.harness = o.harness;
292
+ return resolveConfig(raw);
291
293
  }
292
294
  var BANK_OVERRIDE_EXCLUDED = [
293
295
  "bankId",
@@ -448,7 +450,7 @@ var GITLOG_MISSION = "You are ingesting an aggregated block of git commit MESSAG
448
450
  var CONVERSATION_MISSION = `You are ingesting a developer conversation as a JSONL transcript (one {role, content} turn per line): the user's requests, the assistant's narration, and compact 'action' turns naming each tool use and its target (e.g. "Edit boltons/strutils.py") with no arguments or outputs. It may be a SHORT decision chat or a LONG working session \u2014 scale the facts to the substance, never to the message count. Extract the FEWEST facts that capture the OUTCOME: the settled DECISIONS and their exact rules/values (quote literals VERBATIM); concrete CHANGES to specific code entities; problems and how they were resolved; conventions or invariants established; at most one fact for a notable REJECTED alternative ('initially proposed X, changed to Y because Z'). A short decision chat usually yields 1-2 facts; a substantial working session several. CRITICAL: a conversation REVISES itself \u2014 record ONLY the FINAL state as what is in effect; a superseded proposal appears ONLY inside the rejected fact, NEVER as its own 'decided' fact; if the same setting changes several times keep only the LAST, and make unmistakably clear which choice WON. Do NOT emit one fact per message, per intermediate proposal, or per action turn. Keep issue/PR references (#123, GH-123) VERBATIM and emit each as an ENTITY. Preserve the 'REF-ID: <token>' marker verbatim in every fact. Do not invent; capture only what was actually settled.`;
449
451
  var REFLECT_MISSION = "You are a debugging assistant with the project's past decisions in memory (git rationale and developer chats). Given a bug's SYMPTOM, find the past decision whose rationale explains the ROOT CAUSE \u2014 not one that merely shares vocabulary. Answer with the PRECISE fix: state the EXACT rule and the LITERAL values, identifiers, strings, numbers, or set members that were decided \u2014 quote them VERBATIM, never paraphrase, generalize, or omit them (give the actual decided value, not 'the project standard'). If memories CONFLICT on the same rule, the LATEST decision wins \u2014 prefer facts that explicitly amend or supersede an earlier one, state the superseded rule as no longer in effect, and never present it as the fix. Name the function/file to change and cite the REF-ID(s). If NOTHING in memory genuinely explains THIS symptom, say exactly that in one short sentence \u2014 a wrong-but-confident nearest match is worse than an honest miss; never stretch an unrelated decision to fit.";
450
452
  var DOCUMENT_MISSION = "You are ingesting a standalone document (notes, docs, or structural findings). Extract the concrete facts, concepts, and structure it describes.";
451
- var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details.";
453
+ var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details. When a new fact contradicts or supersedes an existing observation, UPDATE that observation to reflect the current state rather than creating a sibling alongside it; note that the rule was revised and when, so the superseded version is visible as history rather than as a competing claim.";
452
454
  var RETAIN_STRATEGIES = {
453
455
  git: { retain_mission: GIT_MISSION, retain_extraction_mode: "verbose" },
454
456
  // ONE big aggregated document (last N commit messages, no diffs) -> a larger chunk size so it stays
@@ -238,7 +238,9 @@ function readEnvConfig(env = process.env) {
238
238
  function loadConfig(opts = {}) {
239
239
  const o = typeof opts === "string" ? { path: opts } : opts;
240
240
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
241
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
241
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
242
+ if (!raw.harness && o.harness) raw.harness = o.harness;
243
+ return resolveConfig(raw);
242
244
  }
243
245
  var BANK_OVERRIDE_EXCLUDED = [
244
246
  "bankId",
@@ -322,7 +324,7 @@ var GITLOG_MISSION = "You are ingesting an aggregated block of git commit MESSAG
322
324
  var CONVERSATION_MISSION = `You are ingesting a developer conversation as a JSONL transcript (one {role, content} turn per line): the user's requests, the assistant's narration, and compact 'action' turns naming each tool use and its target (e.g. "Edit boltons/strutils.py") with no arguments or outputs. It may be a SHORT decision chat or a LONG working session \u2014 scale the facts to the substance, never to the message count. Extract the FEWEST facts that capture the OUTCOME: the settled DECISIONS and their exact rules/values (quote literals VERBATIM); concrete CHANGES to specific code entities; problems and how they were resolved; conventions or invariants established; at most one fact for a notable REJECTED alternative ('initially proposed X, changed to Y because Z'). A short decision chat usually yields 1-2 facts; a substantial working session several. CRITICAL: a conversation REVISES itself \u2014 record ONLY the FINAL state as what is in effect; a superseded proposal appears ONLY inside the rejected fact, NEVER as its own 'decided' fact; if the same setting changes several times keep only the LAST, and make unmistakably clear which choice WON. Do NOT emit one fact per message, per intermediate proposal, or per action turn. Keep issue/PR references (#123, GH-123) VERBATIM and emit each as an ENTITY. Preserve the 'REF-ID: <token>' marker verbatim in every fact. Do not invent; capture only what was actually settled.`;
323
325
  var REFLECT_MISSION = "You are a debugging assistant with the project's past decisions in memory (git rationale and developer chats). Given a bug's SYMPTOM, find the past decision whose rationale explains the ROOT CAUSE \u2014 not one that merely shares vocabulary. Answer with the PRECISE fix: state the EXACT rule and the LITERAL values, identifiers, strings, numbers, or set members that were decided \u2014 quote them VERBATIM, never paraphrase, generalize, or omit them (give the actual decided value, not 'the project standard'). If memories CONFLICT on the same rule, the LATEST decision wins \u2014 prefer facts that explicitly amend or supersede an earlier one, state the superseded rule as no longer in effect, and never present it as the fix. Name the function/file to change and cite the REF-ID(s). If NOTHING in memory genuinely explains THIS symptom, say exactly that in one short sentence \u2014 a wrong-but-confident nearest match is worse than an honest miss; never stretch an unrelated decision to fit.";
324
326
  var DOCUMENT_MISSION = "You are ingesting a standalone document (notes, docs, or structural findings). Extract the concrete facts, concepts, and structure it describes.";
325
- var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details.";
327
+ var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details. When a new fact contradicts or supersedes an existing observation, UPDATE that observation to reflect the current state rather than creating a sibling alongside it; note that the rule was revised and when, so the superseded version is visible as history rather than as a competing claim.";
326
328
  var RETAIN_STRATEGIES = {
327
329
  git: { retain_mission: GIT_MISSION, retain_extraction_mode: "verbose" },
328
330
  // ONE big aggregated document (last N commit messages, no diffs) -> a larger chunk size so it stays
@@ -238,7 +238,9 @@ function readEnvConfig(env = process.env) {
238
238
  function loadConfig(opts = {}) {
239
239
  const o = typeof opts === "string" ? { path: opts } : opts;
240
240
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
241
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
241
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
242
+ if (!raw.harness && o.harness) raw.harness = o.harness;
243
+ return resolveConfig(raw);
242
244
  }
243
245
  var BANK_OVERRIDE_EXCLUDED = [
244
246
  "bankId",
@@ -322,7 +324,7 @@ var GITLOG_MISSION = "You are ingesting an aggregated block of git commit MESSAG
322
324
  var CONVERSATION_MISSION = `You are ingesting a developer conversation as a JSONL transcript (one {role, content} turn per line): the user's requests, the assistant's narration, and compact 'action' turns naming each tool use and its target (e.g. "Edit boltons/strutils.py") with no arguments or outputs. It may be a SHORT decision chat or a LONG working session \u2014 scale the facts to the substance, never to the message count. Extract the FEWEST facts that capture the OUTCOME: the settled DECISIONS and their exact rules/values (quote literals VERBATIM); concrete CHANGES to specific code entities; problems and how they were resolved; conventions or invariants established; at most one fact for a notable REJECTED alternative ('initially proposed X, changed to Y because Z'). A short decision chat usually yields 1-2 facts; a substantial working session several. CRITICAL: a conversation REVISES itself \u2014 record ONLY the FINAL state as what is in effect; a superseded proposal appears ONLY inside the rejected fact, NEVER as its own 'decided' fact; if the same setting changes several times keep only the LAST, and make unmistakably clear which choice WON. Do NOT emit one fact per message, per intermediate proposal, or per action turn. Keep issue/PR references (#123, GH-123) VERBATIM and emit each as an ENTITY. Preserve the 'REF-ID: <token>' marker verbatim in every fact. Do not invent; capture only what was actually settled.`;
323
325
  var REFLECT_MISSION = "You are a debugging assistant with the project's past decisions in memory (git rationale and developer chats). Given a bug's SYMPTOM, find the past decision whose rationale explains the ROOT CAUSE \u2014 not one that merely shares vocabulary. Answer with the PRECISE fix: state the EXACT rule and the LITERAL values, identifiers, strings, numbers, or set members that were decided \u2014 quote them VERBATIM, never paraphrase, generalize, or omit them (give the actual decided value, not 'the project standard'). If memories CONFLICT on the same rule, the LATEST decision wins \u2014 prefer facts that explicitly amend or supersede an earlier one, state the superseded rule as no longer in effect, and never present it as the fix. Name the function/file to change and cite the REF-ID(s). If NOTHING in memory genuinely explains THIS symptom, say exactly that in one short sentence \u2014 a wrong-but-confident nearest match is worse than an honest miss; never stretch an unrelated decision to fit.";
324
326
  var DOCUMENT_MISSION = "You are ingesting a standalone document (notes, docs, or structural findings). Extract the concrete facts, concepts, and structure it describes.";
325
- var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details.";
327
+ var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details. When a new fact contradicts or supersedes an existing observation, UPDATE that observation to reflect the current state rather than creating a sibling alongside it; note that the rule was revised and when, so the superseded version is visible as history rather than as a competing claim.";
326
328
  var RETAIN_STRATEGIES = {
327
329
  git: { retain_mission: GIT_MISSION, retain_extraction_mode: "verbose" },
328
330
  // ONE big aggregated document (last N commit messages, no diffs) -> a larger chunk size so it stays
@@ -1365,7 +1367,7 @@ async function buildSessionStartContext(args) {
1365
1367
  cold = docIds !== void 0 ? docIds.size === 0 : void 0;
1366
1368
  gitDocIds = docIds;
1367
1369
  if (docIds !== void 0) {
1368
- startSeed(cwd, { limit: cfg.seedLimit });
1370
+ startSeed(cwd, { limit: cfg.seedLimit, harness });
1369
1371
  if (docIds.size === 0) {
1370
1372
  if (cfg.codebaseSurvey !== false) {
1371
1373
  startSurvey(cwd, {
@@ -212,7 +212,9 @@ function readEnvConfig(env = process.env) {
212
212
  function loadConfig(opts = {}) {
213
213
  const o = typeof opts === "string" ? { path: opts } : opts;
214
214
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
215
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
215
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
216
+ if (!raw.harness && o.harness) raw.harness = o.harness;
217
+ return resolveConfig(raw);
216
218
  }
217
219
  var BANK_OVERRIDE_EXCLUDED = [
218
220
  "bankId",
@@ -296,7 +298,7 @@ var GITLOG_MISSION = "You are ingesting an aggregated block of git commit MESSAG
296
298
  var CONVERSATION_MISSION = `You are ingesting a developer conversation as a JSONL transcript (one {role, content} turn per line): the user's requests, the assistant's narration, and compact 'action' turns naming each tool use and its target (e.g. "Edit boltons/strutils.py") with no arguments or outputs. It may be a SHORT decision chat or a LONG working session \u2014 scale the facts to the substance, never to the message count. Extract the FEWEST facts that capture the OUTCOME: the settled DECISIONS and their exact rules/values (quote literals VERBATIM); concrete CHANGES to specific code entities; problems and how they were resolved; conventions or invariants established; at most one fact for a notable REJECTED alternative ('initially proposed X, changed to Y because Z'). A short decision chat usually yields 1-2 facts; a substantial working session several. CRITICAL: a conversation REVISES itself \u2014 record ONLY the FINAL state as what is in effect; a superseded proposal appears ONLY inside the rejected fact, NEVER as its own 'decided' fact; if the same setting changes several times keep only the LAST, and make unmistakably clear which choice WON. Do NOT emit one fact per message, per intermediate proposal, or per action turn. Keep issue/PR references (#123, GH-123) VERBATIM and emit each as an ENTITY. Preserve the 'REF-ID: <token>' marker verbatim in every fact. Do not invent; capture only what was actually settled.`;
297
299
  var REFLECT_MISSION = "You are a debugging assistant with the project's past decisions in memory (git rationale and developer chats). Given a bug's SYMPTOM, find the past decision whose rationale explains the ROOT CAUSE \u2014 not one that merely shares vocabulary. Answer with the PRECISE fix: state the EXACT rule and the LITERAL values, identifiers, strings, numbers, or set members that were decided \u2014 quote them VERBATIM, never paraphrase, generalize, or omit them (give the actual decided value, not 'the project standard'). If memories CONFLICT on the same rule, the LATEST decision wins \u2014 prefer facts that explicitly amend or supersede an earlier one, state the superseded rule as no longer in effect, and never present it as the fix. Name the function/file to change and cite the REF-ID(s). If NOTHING in memory genuinely explains THIS symptom, say exactly that in one short sentence \u2014 a wrong-but-confident nearest match is worse than an honest miss; never stretch an unrelated decision to fit.";
298
300
  var DOCUMENT_MISSION = "You are ingesting a standalone document (notes, docs, or structural findings). Extract the concrete facts, concepts, and structure it describes.";
299
- var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details.";
301
+ var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details. When a new fact contradicts or supersedes an existing observation, UPDATE that observation to reflect the current state rather than creating a sibling alongside it; note that the rule was revised and when, so the superseded version is visible as history rather than as a competing claim.";
300
302
  var RETAIN_STRATEGIES = {
301
303
  git: { retain_mission: GIT_MISSION, retain_extraction_mode: "verbose" },
302
304
  // ONE big aggregated document (last N commit messages, no diffs) -> a larger chunk size so it stays
package/dist/grok-hook.js CHANGED
@@ -238,7 +238,9 @@ function readEnvConfig(env = process.env) {
238
238
  function loadConfig(opts = {}) {
239
239
  const o = typeof opts === "string" ? { path: opts } : opts;
240
240
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
241
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
241
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
242
+ if (!raw.harness && o.harness) raw.harness = o.harness;
243
+ return resolveConfig(raw);
242
244
  }
243
245
  var BANK_OVERRIDE_EXCLUDED = [
244
246
  "bankId",
@@ -322,7 +324,7 @@ var GITLOG_MISSION = "You are ingesting an aggregated block of git commit MESSAG
322
324
  var CONVERSATION_MISSION = `You are ingesting a developer conversation as a JSONL transcript (one {role, content} turn per line): the user's requests, the assistant's narration, and compact 'action' turns naming each tool use and its target (e.g. "Edit boltons/strutils.py") with no arguments or outputs. It may be a SHORT decision chat or a LONG working session \u2014 scale the facts to the substance, never to the message count. Extract the FEWEST facts that capture the OUTCOME: the settled DECISIONS and their exact rules/values (quote literals VERBATIM); concrete CHANGES to specific code entities; problems and how they were resolved; conventions or invariants established; at most one fact for a notable REJECTED alternative ('initially proposed X, changed to Y because Z'). A short decision chat usually yields 1-2 facts; a substantial working session several. CRITICAL: a conversation REVISES itself \u2014 record ONLY the FINAL state as what is in effect; a superseded proposal appears ONLY inside the rejected fact, NEVER as its own 'decided' fact; if the same setting changes several times keep only the LAST, and make unmistakably clear which choice WON. Do NOT emit one fact per message, per intermediate proposal, or per action turn. Keep issue/PR references (#123, GH-123) VERBATIM and emit each as an ENTITY. Preserve the 'REF-ID: <token>' marker verbatim in every fact. Do not invent; capture only what was actually settled.`;
323
325
  var REFLECT_MISSION = "You are a debugging assistant with the project's past decisions in memory (git rationale and developer chats). Given a bug's SYMPTOM, find the past decision whose rationale explains the ROOT CAUSE \u2014 not one that merely shares vocabulary. Answer with the PRECISE fix: state the EXACT rule and the LITERAL values, identifiers, strings, numbers, or set members that were decided \u2014 quote them VERBATIM, never paraphrase, generalize, or omit them (give the actual decided value, not 'the project standard'). If memories CONFLICT on the same rule, the LATEST decision wins \u2014 prefer facts that explicitly amend or supersede an earlier one, state the superseded rule as no longer in effect, and never present it as the fix. Name the function/file to change and cite the REF-ID(s). If NOTHING in memory genuinely explains THIS symptom, say exactly that in one short sentence \u2014 a wrong-but-confident nearest match is worse than an honest miss; never stretch an unrelated decision to fit.";
324
326
  var DOCUMENT_MISSION = "You are ingesting a standalone document (notes, docs, or structural findings). Extract the concrete facts, concepts, and structure it describes.";
325
- var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details.";
327
+ var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details. When a new fact contradicts or supersedes an existing observation, UPDATE that observation to reflect the current state rather than creating a sibling alongside it; note that the rule was revised and when, so the superseded version is visible as history rather than as a competing claim.";
326
328
  var RETAIN_STRATEGIES = {
327
329
  git: { retain_mission: GIT_MISSION, retain_extraction_mode: "verbose" },
328
330
  // ONE big aggregated document (last N commit messages, no diffs) -> a larger chunk size so it stays
@@ -238,7 +238,9 @@ function readEnvConfig(env = process.env) {
238
238
  function loadConfig(opts = {}) {
239
239
  const o = typeof opts === "string" ? { path: opts } : opts;
240
240
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
241
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
241
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
242
+ if (!raw.harness && o.harness) raw.harness = o.harness;
243
+ return resolveConfig(raw);
242
244
  }
243
245
  var BANK_OVERRIDE_EXCLUDED = [
244
246
  "bankId",
@@ -322,7 +324,7 @@ var GITLOG_MISSION = "You are ingesting an aggregated block of git commit MESSAG
322
324
  var CONVERSATION_MISSION = `You are ingesting a developer conversation as a JSONL transcript (one {role, content} turn per line): the user's requests, the assistant's narration, and compact 'action' turns naming each tool use and its target (e.g. "Edit boltons/strutils.py") with no arguments or outputs. It may be a SHORT decision chat or a LONG working session \u2014 scale the facts to the substance, never to the message count. Extract the FEWEST facts that capture the OUTCOME: the settled DECISIONS and their exact rules/values (quote literals VERBATIM); concrete CHANGES to specific code entities; problems and how they were resolved; conventions or invariants established; at most one fact for a notable REJECTED alternative ('initially proposed X, changed to Y because Z'). A short decision chat usually yields 1-2 facts; a substantial working session several. CRITICAL: a conversation REVISES itself \u2014 record ONLY the FINAL state as what is in effect; a superseded proposal appears ONLY inside the rejected fact, NEVER as its own 'decided' fact; if the same setting changes several times keep only the LAST, and make unmistakably clear which choice WON. Do NOT emit one fact per message, per intermediate proposal, or per action turn. Keep issue/PR references (#123, GH-123) VERBATIM and emit each as an ENTITY. Preserve the 'REF-ID: <token>' marker verbatim in every fact. Do not invent; capture only what was actually settled.`;
323
325
  var REFLECT_MISSION = "You are a debugging assistant with the project's past decisions in memory (git rationale and developer chats). Given a bug's SYMPTOM, find the past decision whose rationale explains the ROOT CAUSE \u2014 not one that merely shares vocabulary. Answer with the PRECISE fix: state the EXACT rule and the LITERAL values, identifiers, strings, numbers, or set members that were decided \u2014 quote them VERBATIM, never paraphrase, generalize, or omit them (give the actual decided value, not 'the project standard'). If memories CONFLICT on the same rule, the LATEST decision wins \u2014 prefer facts that explicitly amend or supersede an earlier one, state the superseded rule as no longer in effect, and never present it as the fix. Name the function/file to change and cite the REF-ID(s). If NOTHING in memory genuinely explains THIS symptom, say exactly that in one short sentence \u2014 a wrong-but-confident nearest match is worse than an honest miss; never stretch an unrelated decision to fit.";
324
326
  var DOCUMENT_MISSION = "You are ingesting a standalone document (notes, docs, or structural findings). Extract the concrete facts, concepts, and structure it describes.";
325
- var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details.";
327
+ var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details. When a new fact contradicts or supersedes an existing observation, UPDATE that observation to reflect the current state rather than creating a sibling alongside it; note that the rule was revised and when, so the superseded version is visible as history rather than as a competing claim.";
326
328
  var RETAIN_STRATEGIES = {
327
329
  git: { retain_mission: GIT_MISSION, retain_extraction_mode: "verbose" },
328
330
  // ONE big aggregated document (last N commit messages, no diffs) -> a larger chunk size so it stays
@@ -1365,7 +1367,7 @@ async function buildSessionStartContext(args) {
1365
1367
  cold = docIds !== void 0 ? docIds.size === 0 : void 0;
1366
1368
  gitDocIds = docIds;
1367
1369
  if (docIds !== void 0) {
1368
- startSeed(cwd, { limit: cfg.seedLimit });
1370
+ startSeed(cwd, { limit: cfg.seedLimit, harness });
1369
1371
  if (docIds.size === 0) {
1370
1372
  if (cfg.codebaseSurvey !== false) {
1371
1373
  startSurvey(cwd, {
@@ -212,7 +212,9 @@ function readEnvConfig(env = process.env) {
212
212
  function loadConfig(opts = {}) {
213
213
  const o = typeof opts === "string" ? { path: opts } : opts;
214
214
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
215
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
215
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
216
+ if (!raw.harness && o.harness) raw.harness = o.harness;
217
+ return resolveConfig(raw);
216
218
  }
217
219
  var BANK_OVERRIDE_EXCLUDED = [
218
220
  "bankId",
@@ -296,7 +298,7 @@ var GITLOG_MISSION = "You are ingesting an aggregated block of git commit MESSAG
296
298
  var CONVERSATION_MISSION = `You are ingesting a developer conversation as a JSONL transcript (one {role, content} turn per line): the user's requests, the assistant's narration, and compact 'action' turns naming each tool use and its target (e.g. "Edit boltons/strutils.py") with no arguments or outputs. It may be a SHORT decision chat or a LONG working session \u2014 scale the facts to the substance, never to the message count. Extract the FEWEST facts that capture the OUTCOME: the settled DECISIONS and their exact rules/values (quote literals VERBATIM); concrete CHANGES to specific code entities; problems and how they were resolved; conventions or invariants established; at most one fact for a notable REJECTED alternative ('initially proposed X, changed to Y because Z'). A short decision chat usually yields 1-2 facts; a substantial working session several. CRITICAL: a conversation REVISES itself \u2014 record ONLY the FINAL state as what is in effect; a superseded proposal appears ONLY inside the rejected fact, NEVER as its own 'decided' fact; if the same setting changes several times keep only the LAST, and make unmistakably clear which choice WON. Do NOT emit one fact per message, per intermediate proposal, or per action turn. Keep issue/PR references (#123, GH-123) VERBATIM and emit each as an ENTITY. Preserve the 'REF-ID: <token>' marker verbatim in every fact. Do not invent; capture only what was actually settled.`;
297
299
  var REFLECT_MISSION = "You are a debugging assistant with the project's past decisions in memory (git rationale and developer chats). Given a bug's SYMPTOM, find the past decision whose rationale explains the ROOT CAUSE \u2014 not one that merely shares vocabulary. Answer with the PRECISE fix: state the EXACT rule and the LITERAL values, identifiers, strings, numbers, or set members that were decided \u2014 quote them VERBATIM, never paraphrase, generalize, or omit them (give the actual decided value, not 'the project standard'). If memories CONFLICT on the same rule, the LATEST decision wins \u2014 prefer facts that explicitly amend or supersede an earlier one, state the superseded rule as no longer in effect, and never present it as the fix. Name the function/file to change and cite the REF-ID(s). If NOTHING in memory genuinely explains THIS symptom, say exactly that in one short sentence \u2014 a wrong-but-confident nearest match is worse than an honest miss; never stretch an unrelated decision to fit.";
298
300
  var DOCUMENT_MISSION = "You are ingesting a standalone document (notes, docs, or structural findings). Extract the concrete facts, concepts, and structure it describes.";
299
- var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details.";
301
+ var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details. When a new fact contradicts or supersedes an existing observation, UPDATE that observation to reflect the current state rather than creating a sibling alongside it; note that the rule was revised and when, so the superseded version is visible as history rather than as a competing claim.";
300
302
  var RETAIN_STRATEGIES = {
301
303
  git: { retain_mission: GIT_MISSION, retain_extraction_mode: "verbose" },
302
304
  // ONE big aggregated document (last N commit messages, no diffs) -> a larger chunk size so it stays
@@ -181,7 +181,9 @@ function readEnvConfig(env = process.env) {
181
181
  function loadConfig(opts = {}) {
182
182
  const o = typeof opts === "string" ? { path: opts } : opts;
183
183
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
184
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
184
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
185
+ if (!raw.harness && o.harness) raw.harness = o.harness;
186
+ return resolveConfig(raw);
185
187
  }
186
188
 
187
189
  // src/core/bank.ts
package/dist/index.js CHANGED
@@ -242,7 +242,9 @@ function readEnvConfig(env = process.env) {
242
242
  function loadConfig(opts = {}) {
243
243
  const o = typeof opts === "string" ? { path: opts } : opts;
244
244
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
245
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
245
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
246
+ if (!raw.harness && o.harness) raw.harness = o.harness;
247
+ return resolveConfig(raw);
246
248
  }
247
249
  var BANK_OVERRIDE_EXCLUDED = [
248
250
  "bankId",
@@ -311,7 +313,7 @@ var GITLOG_MISSION = "You are ingesting an aggregated block of git commit MESSAG
311
313
  var CONVERSATION_MISSION = `You are ingesting a developer conversation as a JSONL transcript (one {role, content} turn per line): the user's requests, the assistant's narration, and compact 'action' turns naming each tool use and its target (e.g. "Edit boltons/strutils.py") with no arguments or outputs. It may be a SHORT decision chat or a LONG working session \u2014 scale the facts to the substance, never to the message count. Extract the FEWEST facts that capture the OUTCOME: the settled DECISIONS and their exact rules/values (quote literals VERBATIM); concrete CHANGES to specific code entities; problems and how they were resolved; conventions or invariants established; at most one fact for a notable REJECTED alternative ('initially proposed X, changed to Y because Z'). A short decision chat usually yields 1-2 facts; a substantial working session several. CRITICAL: a conversation REVISES itself \u2014 record ONLY the FINAL state as what is in effect; a superseded proposal appears ONLY inside the rejected fact, NEVER as its own 'decided' fact; if the same setting changes several times keep only the LAST, and make unmistakably clear which choice WON. Do NOT emit one fact per message, per intermediate proposal, or per action turn. Keep issue/PR references (#123, GH-123) VERBATIM and emit each as an ENTITY. Preserve the 'REF-ID: <token>' marker verbatim in every fact. Do not invent; capture only what was actually settled.`;
312
314
  var REFLECT_MISSION = "You are a debugging assistant with the project's past decisions in memory (git rationale and developer chats). Given a bug's SYMPTOM, find the past decision whose rationale explains the ROOT CAUSE \u2014 not one that merely shares vocabulary. Answer with the PRECISE fix: state the EXACT rule and the LITERAL values, identifiers, strings, numbers, or set members that were decided \u2014 quote them VERBATIM, never paraphrase, generalize, or omit them (give the actual decided value, not 'the project standard'). If memories CONFLICT on the same rule, the LATEST decision wins \u2014 prefer facts that explicitly amend or supersede an earlier one, state the superseded rule as no longer in effect, and never present it as the fix. Name the function/file to change and cite the REF-ID(s). If NOTHING in memory genuinely explains THIS symptom, say exactly that in one short sentence \u2014 a wrong-but-confident nearest match is worse than an honest miss; never stretch an unrelated decision to fit.";
313
315
  var DOCUMENT_MISSION = "You are ingesting a standalone document (notes, docs, or structural findings). Extract the concrete facts, concepts, and structure it describes.";
314
- var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details.";
316
+ var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details. When a new fact contradicts or supersedes an existing observation, UPDATE that observation to reflect the current state rather than creating a sibling alongside it; note that the rule was revised and when, so the superseded version is visible as history rather than as a competing claim.";
315
317
  var RETAIN_STRATEGIES = {
316
318
  git: { retain_mission: GIT_MISSION, retain_extraction_mode: "verbose" },
317
319
  // ONE big aggregated document (last N commit messages, no diffs) -> a larger chunk size so it stays
@@ -15943,7 +15945,7 @@ async function buildSessionStartContext(args) {
15943
15945
  cold = docIds !== void 0 ? docIds.size === 0 : void 0;
15944
15946
  gitDocIds = docIds;
15945
15947
  if (docIds !== void 0) {
15946
- startSeed(cwd, { limit: cfg.seedLimit });
15948
+ startSeed(cwd, { limit: cfg.seedLimit, harness });
15947
15949
  if (docIds.size === 0) {
15948
15950
  if (cfg.codebaseSurvey !== false) {
15949
15951
  startSurvey(cwd, {
package/dist/kilo.js CHANGED
@@ -242,7 +242,9 @@ function readEnvConfig(env = process.env) {
242
242
  function loadConfig(opts = {}) {
243
243
  const o = typeof opts === "string" ? { path: opts } : opts;
244
244
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
245
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
245
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
246
+ if (!raw.harness && o.harness) raw.harness = o.harness;
247
+ return resolveConfig(raw);
246
248
  }
247
249
  var BANK_OVERRIDE_EXCLUDED = [
248
250
  "bankId",
@@ -311,7 +313,7 @@ var GITLOG_MISSION = "You are ingesting an aggregated block of git commit MESSAG
311
313
  var CONVERSATION_MISSION = `You are ingesting a developer conversation as a JSONL transcript (one {role, content} turn per line): the user's requests, the assistant's narration, and compact 'action' turns naming each tool use and its target (e.g. "Edit boltons/strutils.py") with no arguments or outputs. It may be a SHORT decision chat or a LONG working session \u2014 scale the facts to the substance, never to the message count. Extract the FEWEST facts that capture the OUTCOME: the settled DECISIONS and their exact rules/values (quote literals VERBATIM); concrete CHANGES to specific code entities; problems and how they were resolved; conventions or invariants established; at most one fact for a notable REJECTED alternative ('initially proposed X, changed to Y because Z'). A short decision chat usually yields 1-2 facts; a substantial working session several. CRITICAL: a conversation REVISES itself \u2014 record ONLY the FINAL state as what is in effect; a superseded proposal appears ONLY inside the rejected fact, NEVER as its own 'decided' fact; if the same setting changes several times keep only the LAST, and make unmistakably clear which choice WON. Do NOT emit one fact per message, per intermediate proposal, or per action turn. Keep issue/PR references (#123, GH-123) VERBATIM and emit each as an ENTITY. Preserve the 'REF-ID: <token>' marker verbatim in every fact. Do not invent; capture only what was actually settled.`;
312
314
  var REFLECT_MISSION = "You are a debugging assistant with the project's past decisions in memory (git rationale and developer chats). Given a bug's SYMPTOM, find the past decision whose rationale explains the ROOT CAUSE \u2014 not one that merely shares vocabulary. Answer with the PRECISE fix: state the EXACT rule and the LITERAL values, identifiers, strings, numbers, or set members that were decided \u2014 quote them VERBATIM, never paraphrase, generalize, or omit them (give the actual decided value, not 'the project standard'). If memories CONFLICT on the same rule, the LATEST decision wins \u2014 prefer facts that explicitly amend or supersede an earlier one, state the superseded rule as no longer in effect, and never present it as the fix. Name the function/file to change and cite the REF-ID(s). If NOTHING in memory genuinely explains THIS symptom, say exactly that in one short sentence \u2014 a wrong-but-confident nearest match is worse than an honest miss; never stretch an unrelated decision to fit.";
313
315
  var DOCUMENT_MISSION = "You are ingesting a standalone document (notes, docs, or structural findings). Extract the concrete facts, concepts, and structure it describes.";
314
- var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details.";
316
+ var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details. When a new fact contradicts or supersedes an existing observation, UPDATE that observation to reflect the current state rather than creating a sibling alongside it; note that the rule was revised and when, so the superseded version is visible as history rather than as a competing claim.";
315
317
  var RETAIN_STRATEGIES = {
316
318
  git: { retain_mission: GIT_MISSION, retain_extraction_mode: "verbose" },
317
319
  // ONE big aggregated document (last N commit messages, no diffs) -> a larger chunk size so it stays
@@ -15943,7 +15945,7 @@ async function buildSessionStartContext(args) {
15943
15945
  cold = docIds !== void 0 ? docIds.size === 0 : void 0;
15944
15946
  gitDocIds = docIds;
15945
15947
  if (docIds !== void 0) {
15946
- startSeed(cwd, { limit: cfg.seedLimit });
15948
+ startSeed(cwd, { limit: cfg.seedLimit, harness });
15947
15949
  if (docIds.size === 0) {
15948
15950
  if (cfg.codebaseSurvey !== false) {
15949
15951
  startSurvey(cwd, {
@@ -31102,7 +31102,9 @@ function readEnvConfig(env = process.env) {
31102
31102
  function loadConfig(opts = {}) {
31103
31103
  const o = typeof opts === "string" ? { path: opts } : opts;
31104
31104
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
31105
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
31105
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
31106
+ if (!raw.harness && o.harness) raw.harness = o.harness;
31107
+ return resolveConfig(raw);
31106
31108
  }
31107
31109
  var BANK_OVERRIDE_EXCLUDED = [
31108
31110
  "bankId",
@@ -31205,7 +31207,7 @@ var GITLOG_MISSION = "You are ingesting an aggregated block of git commit MESSAG
31205
31207
  var CONVERSATION_MISSION = `You are ingesting a developer conversation as a JSONL transcript (one {role, content} turn per line): the user's requests, the assistant's narration, and compact 'action' turns naming each tool use and its target (e.g. "Edit boltons/strutils.py") with no arguments or outputs. It may be a SHORT decision chat or a LONG working session \u2014 scale the facts to the substance, never to the message count. Extract the FEWEST facts that capture the OUTCOME: the settled DECISIONS and their exact rules/values (quote literals VERBATIM); concrete CHANGES to specific code entities; problems and how they were resolved; conventions or invariants established; at most one fact for a notable REJECTED alternative ('initially proposed X, changed to Y because Z'). A short decision chat usually yields 1-2 facts; a substantial working session several. CRITICAL: a conversation REVISES itself \u2014 record ONLY the FINAL state as what is in effect; a superseded proposal appears ONLY inside the rejected fact, NEVER as its own 'decided' fact; if the same setting changes several times keep only the LAST, and make unmistakably clear which choice WON. Do NOT emit one fact per message, per intermediate proposal, or per action turn. Keep issue/PR references (#123, GH-123) VERBATIM and emit each as an ENTITY. Preserve the 'REF-ID: <token>' marker verbatim in every fact. Do not invent; capture only what was actually settled.`;
31206
31208
  var REFLECT_MISSION = "You are a debugging assistant with the project's past decisions in memory (git rationale and developer chats). Given a bug's SYMPTOM, find the past decision whose rationale explains the ROOT CAUSE \u2014 not one that merely shares vocabulary. Answer with the PRECISE fix: state the EXACT rule and the LITERAL values, identifiers, strings, numbers, or set members that were decided \u2014 quote them VERBATIM, never paraphrase, generalize, or omit them (give the actual decided value, not 'the project standard'). If memories CONFLICT on the same rule, the LATEST decision wins \u2014 prefer facts that explicitly amend or supersede an earlier one, state the superseded rule as no longer in effect, and never present it as the fix. Name the function/file to change and cite the REF-ID(s). If NOTHING in memory genuinely explains THIS symptom, say exactly that in one short sentence \u2014 a wrong-but-confident nearest match is worse than an honest miss; never stretch an unrelated decision to fit.";
31207
31209
  var DOCUMENT_MISSION = "You are ingesting a standalone document (notes, docs, or structural findings). Extract the concrete facts, concepts, and structure it describes.";
31208
- var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details.";
31210
+ var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details. When a new fact contradicts or supersedes an existing observation, UPDATE that observation to reflect the current state rather than creating a sibling alongside it; note that the rule was revised and when, so the superseded version is visible as history rather than as a competing claim.";
31209
31211
  var RETAIN_STRATEGIES = {
31210
31212
  git: { retain_mission: GIT_MISSION, retain_extraction_mode: "verbose" },
31211
31213
  // ONE big aggregated document (last N commit messages, no diffs) -> a larger chunk size so it stays
package/dist/status.js CHANGED
@@ -212,7 +212,9 @@ function readEnvConfig(env = process.env) {
212
212
  function loadConfig(opts = {}) {
213
213
  const o = typeof opts === "string" ? { path: opts } : opts;
214
214
  const withEnv = applyLayer({}, readEnvConfig(), o.harness);
215
- return resolveConfig(applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness));
215
+ const raw = applyLayer(withEnv, readRaw(o.path ?? CONFIG_PATH), o.harness);
216
+ if (!raw.harness && o.harness) raw.harness = o.harness;
217
+ return resolveConfig(raw);
216
218
  }
217
219
  var BANK_OVERRIDE_EXCLUDED = [
218
220
  "bankId",
@@ -248,7 +250,7 @@ var GITLOG_MISSION = "You are ingesting an aggregated block of git commit MESSAG
248
250
  var CONVERSATION_MISSION = `You are ingesting a developer conversation as a JSONL transcript (one {role, content} turn per line): the user's requests, the assistant's narration, and compact 'action' turns naming each tool use and its target (e.g. "Edit boltons/strutils.py") with no arguments or outputs. It may be a SHORT decision chat or a LONG working session \u2014 scale the facts to the substance, never to the message count. Extract the FEWEST facts that capture the OUTCOME: the settled DECISIONS and their exact rules/values (quote literals VERBATIM); concrete CHANGES to specific code entities; problems and how they were resolved; conventions or invariants established; at most one fact for a notable REJECTED alternative ('initially proposed X, changed to Y because Z'). A short decision chat usually yields 1-2 facts; a substantial working session several. CRITICAL: a conversation REVISES itself \u2014 record ONLY the FINAL state as what is in effect; a superseded proposal appears ONLY inside the rejected fact, NEVER as its own 'decided' fact; if the same setting changes several times keep only the LAST, and make unmistakably clear which choice WON. Do NOT emit one fact per message, per intermediate proposal, or per action turn. Keep issue/PR references (#123, GH-123) VERBATIM and emit each as an ENTITY. Preserve the 'REF-ID: <token>' marker verbatim in every fact. Do not invent; capture only what was actually settled.`;
249
251
  var REFLECT_MISSION = "You are a debugging assistant with the project's past decisions in memory (git rationale and developer chats). Given a bug's SYMPTOM, find the past decision whose rationale explains the ROOT CAUSE \u2014 not one that merely shares vocabulary. Answer with the PRECISE fix: state the EXACT rule and the LITERAL values, identifiers, strings, numbers, or set members that were decided \u2014 quote them VERBATIM, never paraphrase, generalize, or omit them (give the actual decided value, not 'the project standard'). If memories CONFLICT on the same rule, the LATEST decision wins \u2014 prefer facts that explicitly amend or supersede an earlier one, state the superseded rule as no longer in effect, and never present it as the fix. Name the function/file to change and cite the REF-ID(s). If NOTHING in memory genuinely explains THIS symptom, say exactly that in one short sentence \u2014 a wrong-but-confident nearest match is worse than an honest miss; never stretch an unrelated decision to fit.";
250
252
  var DOCUMENT_MISSION = "You are ingesting a standalone document (notes, docs, or structural findings). Extract the concrete facts, concepts, and structure it describes.";
251
- var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details.";
253
+ var OBSERVATIONS_MISSION = "Consolidate durable knowledge about THIS codebase \u2014 recurring patterns, conventions, module responsibilities, and how components relate \u2014 from the ingested commits and conversations. Favor stable structural understanding over one-off details. When a new fact contradicts or supersedes an existing observation, UPDATE that observation to reflect the current state rather than creating a sibling alongside it; note that the rule was revised and when, so the superseded version is visible as history rather than as a competing claim.";
252
254
  var RETAIN_STRATEGIES = {
253
255
  git: { retain_mission: GIT_MISSION, retain_extraction_mode: "verbose" },
254
256
  // ONE big aggregated document (last N commit messages, no diffs) -> a larger chunk size so it stays
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectorize-io/hindsight-coding-agents",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/vectorize-io/hindsight.git",
package/skill/SKILL.md CHANGED
@@ -94,10 +94,10 @@ name, or by one `mapPathToBank` prefix over their parent directory.
94
94
  ## Install / update (for setting up another machine or harness)
95
95
 
96
96
  ```bash
97
- npm install -g @vectorize-io/hindsight-coding-agents && hindsight-coding-agents install all # every detected agent
98
- hindsight-coding-agents install codex # or specific: opencode|claude-code|codex|antigravity-cli|cursor-cli
99
- hindsight-coding-agents uninstall # removes exactly what install added
100
- npm update -g @vectorize-io/hindsight-coding-agents # update; wired paths stay valid
97
+ npx @vectorize-io/hindsight-coding-agents install all # every detected agent
98
+ npx @vectorize-io/hindsight-coding-agents install codex # or specific: opencode|claude-code|codex|antigravity-cli|cursor-cli
99
+ npx @vectorize-io/hindsight-coding-agents uninstall # removes exactly what install added
100
+ # updating is the same install command again — it re-copies the runtime in place
101
101
  ```
102
102
 
103
103
  ## Debugging