@chrono-meta/fh-gate 1.4.39 → 1.4.41

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/CLAUDE.md CHANGED
@@ -246,6 +246,14 @@ post-compaction 2026-06-12). 2026-06-15+: headless `claude -p` draws from the ha
246
246
  subscription — prefer in-session Agent dispatch when the plan gate allows; take the headless fallback
247
247
  knowingly. Record sim results in the Axes 2–3 marker + sub-agent invocation log.
248
248
 
249
+ **Measurement-integrity pre-flight** (when the sim/dispatch is a *cross-model measurement* — pinned to
250
+ a specific tier, comparing model behaviors, or feeding a paper/published claim): consult
251
+ `knowledge/shared/harness-core/measurement-integrity-checklist.md` first — pin the **display name** not
252
+ a slug (silent fallback to a weaker model is a measured failure), take **reps ≥ 3** on any
253
+ borderline/contested verdict (single draw = noise), and use a **discriminating** identity probe (a
254
+ generic "OK" proves nothing about which model answered). The instrument must be verified before the
255
+ measurement is trusted.
256
+
249
257
  **Floor-tier canary (optional pre-screen — token-free, *below* the Sonnet sim)**: a local model weaker
250
258
  than or comparable to Sonnet (e.g. `ollama run qwen3:8b` on the local host today; a cross-family local
251
259
  panel — qwen3.x:27b / gemma4:12b-qat / gpt-oss:20b / devstral — on a GPU host once its remote-exec path
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrono-meta/fh-gate",
3
- "version": "1.4.39",
3
+ "version": "1.4.41",
4
4
  "description": "FH runtime adapters — run FH governance, skills, and agents via Claude or Codex with machine-parseable gates.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -81,6 +81,8 @@ When context is near the limit and you want to *preserve state* rather than rese
81
81
  □ Switching to a different track/project
82
82
  □ Error debugging has gone long and noise has accumulated
83
83
  □ Previous attempts are unrelated to current work
84
+ □ Context has grown large (context rot — measurable quality degradation as input length grows,
85
+ well before the window fills; threshold varies by model/task. Chroma 2025 context-rot research)
84
86
  ```
85
87
 
86
88
  → Recommend immediate `/clear` and restart in fresh context.
@@ -196,6 +198,7 @@ Explicit invocation (`/context-doctor`) always runs regardless of suppress state
196
198
  - `/context-doctor`
197
199
  - "token waste", "session is slow", "reading the whole file", "claudeignore", "context cleanup"
198
200
  - "context diet", "memory audit", "CLAUDE.md is heavy", "MEMORY.md size"
201
+ - "context engineering", "context rot", "context collapse"
199
202
 
200
203
  ### Natural Language Triggers (activates without internal vocabulary)
201
204
 
@@ -210,6 +213,7 @@ Also activates when an external user expresses without token/context terminology
210
213
  | "Seems like it keeps re-reading the same thing" | Repeated full-read detected | Step 2 (burst pattern) |
211
214
  | "Answers get weird as the session gets longer" | Accumulated context noise | Step 3 (/clear recommended) |
212
215
  | "Context is getting full", "context meter is high" | Approaching context limit | Step 3 — propose Wrap-then-Compact pattern |
216
+ | "context engineering", "doing context engineering", "context rot setting in" | 2026 industry term for context discipline (Chroma 2025 / Anthropic) | Step 2 + Step 3 |
213
217
 
214
218
  ## Three-Doctor Loop Integration
215
219
 
@@ -88,7 +88,11 @@ All 3 → Proceed in order: Step 0-B (token injection) → Step 0 (environment c
88
88
 
89
89
  **Mode D detected (FH developer/researcher)**: Guide companion-store setup before Step 1. **Ask the backend first** — the store is a role (durable private home for artifacts), not a fixed `*-be` git repo: Obsidian vault / gbrain-ingest / `*-be` git repo (default) all qualify. Do not assume the repo path.
90
90
 
91
- > **Detail**: See `SKILL_detail.md §Mode-D-Companion-Setup` — backend-branching question (Obsidian / gbrain / *-be git default), remote-backed and local-only setup commands, cross-backend invariants read when Mode D is detected.
91
+ **Set the store up as a queryable WIKI, not an empty folder** the store earns its value when the agent can *read it well*, so the scaffold includes: an `INDEX.md` wiki-home (**the `CATALOG.md` read-first pattern applied to the store** named INDEX to avoid two CATALOG.md across the public + private repos; section map + **read-time-derived** pointers, never hand-maintained placeholders that rot) · session-start read wiring the AI **idempotently adds** to `CLAUDE.local.md` (grep-guarded against duplication: read INDEX → open result/signal files newer than the session card, not only handoffs) · the Raw/Wiki/Conversation ingest axis (`sync_push_protocols.md`). The git `*-be` form is the **default within the no-existing-store branch** (it stays an ask-first choice — see the backend question; SKILL.md does not override the detail file's neutral ordering), recommended *there* because for a non-visual user *observability is the agent querying the wiki* (INDEX + session-start read) — git-versioned, agent-native (grep/Read), no cloud egress; FH's answer to its weak Observability layer. Obsidian (graph-view = the visual observability surface) and cloud are equal options when the user already runs one. **Salience caveat**: the session-start read is prose in `CLAUDE.local.md` (no SessionStart hook) — on a weak tier it may silently not fire; accepted, revisit if a target-tier sim measures a miss.
92
+
93
+ **Beyond Mode D (not forced)**: a non-developer user who accumulates their own context into FH and keeps no separate local store benefits too — but since accumulation is unobservable at *first* install, surface this offer only on a **re-run where FH-written artifacts already exist** (e.g. non-empty `tracks/*/session_*.md`), not preemptively at first setup. A user with a local store, or with no FH artifacts, is not prompted.
94
+
95
+ > **Detail**: See `SKILL_detail.md §Mode-D-Companion-Setup` — backend-branching question (Obsidian / gbrain / *-be git default), the queryable-wiki scaffold (INDEX.md + session-start wiring), remote-backed and local-only setup commands, cross-backend invariants — read when Mode D is detected.
92
96
 
93
97
  ### Step 0-B. Git Token Pre-injection (when repo creation/fork/push included)
94
98
 
@@ -61,6 +61,51 @@ Invariant across ALL backends:
61
61
  · handoff/ files bridge cloud session → local without exposing content
62
62
  ```
63
63
 
64
+ **Queryable-wiki scaffold (all backends — the store is a wiki, not a dump):** after BE_DIR is set,
65
+ scaffold so the agent can *read the store well* (this is the recommended form's Observability answer —
66
+ the agent queries the wiki, vs a visual graph). `INDEX.md` here is the **`CATALOG.md` read-first pattern
67
+ applied to the store** (same semantics; named INDEX, not CATALOG, only to avoid two `CATALOG.md` across
68
+ the public mirror + the private store):
69
+
70
+ ```bash
71
+ # 1. INDEX.md — wiki home (read FIRST at session start). The section MAP is static (low rot);
72
+ # the volatile "latest" pointers are DERIVED at read time, never hand-maintained (a stale
73
+ # "latest" mis-routes the very read it exists to guide — worse than none).
74
+ cat > "$BE_DIR/INDEX.md" <<'IDX'
75
+ # <store> — Wiki Home (READ ME FIRST at session start)
76
+ > Read this store AS a wiki (relevance-query the right section), not pull + file-dump.
77
+ ## How to read at session start
78
+ 1. This INDEX first → pick the section for the session intent.
79
+ 2. DERIVE the latest pointers live (do NOT trust a hand-written "latest" line):
80
+ ls -t paper-signals/ handoff/ digests/ 2>/dev/null | head
81
+ then open anything newer than the session card (card=pointer, store commit=truth).
82
+ ## Sections (static map)
83
+ | Section | Holds | Read when |
84
+ |---|---|---|
85
+ | paper-signals/ | completed results + research signals | any measurement (check for a prior result first) |
86
+ | handoff/ | cross-machine/session bridges (entry points, run recipes) | resuming work started elsewhere |
87
+ | digests/ | frontier digests (cadence source) | cadence/frontier scan |
88
+ | (add your sections) | | |
89
+ IDX
90
+
91
+ # 2. session-start read wiring → IDEMPOTENT append to the user's CLAUDE.local.md (grep-guarded
92
+ # so a re-run never duplicates it; this is a REAL write, not a note):
93
+ WIRING="At session start: read \$BE_DIR/INDEX.md first; then ls -t paper-signals/ handoff/ digests/ and open anything newer than the session card (card=pointer, store commit=truth) — not only handoffs."
94
+ grep -qF "read \$BE_DIR/INDEX.md first" "$HUB_DIR/CLAUDE.local.md" 2>/dev/null \
95
+ || printf '\n## Companion-store session-start read\n%s\n' "$WIRING" >> "$HUB_DIR/CLAUDE.local.md"
96
+ ```
97
+
98
+ - **Raw / Wiki / Conversation ingest axis** (`sync_push_protocols.md`): classify each artifact by
99
+ processing stage — Raw (unprocessed capture) → stays raw; Wiki (distilled + `[[linked]]`) → the
100
+ compounding layer; Conversation (dialogue/decision log). The Raw→Wiki distill is where linking earns
101
+ its keep. Mention it so the store accumulates as a wiki, not a heap.
102
+ - **Backend note**: for an **Obsidian** backend the graph view is the *visual* observability surface
103
+ (free for that backend); for the recommended **git `*-be`** form, observability is the agent querying
104
+ INDEX + sections (no visualization needed). gbrain ingests the same markdown.
105
+ - **Salience caveat**: the CLAUDE.local.md session-start read is prose (no SessionStart hook) — on a weak
106
+ tier it may silently not fire. Accepted limitation (mirrors `operational_adaptation.md §Guards`);
107
+ revisit if a target-tier sim measures a miss.
108
+
64
109
 
65
110
  ---
66
111