@chrono-meta/fh-gate 3.36.0 → 3.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/.claude-plugin/marketplace.json +4 -4
  2. package/knowledge/shared/harness-core/builtin_capability_map.md +50 -0
  3. package/knowledge/shared/harness-core/claude_md_full_reference.md +17 -1
  4. package/knowledge/shared/learnings/subagent_invocations_log.yaml +78 -0
  5. package/package.json +8 -1
  6. package/plugins/fh-commons/.claude-plugin/plugin.json +1 -1
  7. package/plugins/fh-meta/.claude-plugin/plugin.json +1 -1
  8. package/plugins/fh-meta/CHANGELOG.md +30 -0
  9. package/plugins/fh-meta/skills/frontier-digest/SKILL.md +2 -0
  10. package/plugins/fh-meta/skills/harness-doctor/SKILL.md +1 -0
  11. package/plugins/fh-meta/skills/harvest-loop/SKILL.md +1 -0
  12. package/plugins/fh-preprep/.claude-plugin/plugin.json +1 -1
  13. package/plugins/fh-qp/.claude-plugin/plugin.json +1 -1
  14. package/scripts/card_status_tags.sh +47 -0
  15. package/scripts/correction_moments.py +116 -0
  16. package/scripts/destructive_pre_gate.sh +25 -2
  17. package/scripts/env_layer_fingerprint.sh +44 -3
  18. package/scripts/package_coverage_check.sh +13 -5
  19. package/scripts/probe_live_eval.sh +9 -0
  20. package/scripts/probe_live_eval_lib.py +40 -0
  21. package/scripts/selfcheck.sh +3 -0
  22. package/scripts/selfcheck_shard_weights.txt +184 -0
  23. package/scripts/session_close_check.sh +11 -0
  24. package/scripts/test_card_status_tags_lanes.sh +58 -0
  25. package/scripts/test_correction_moments_lanes.sh +42 -0
  26. package/scripts/test_destructive_pre_gate_lanes.sh +36 -0
  27. package/scripts/test_env_layer_fingerprint_lanes.sh +6 -1
  28. package/scripts/test_fh_detach_lanes.sh +27 -4
  29. package/scripts/test_live_eval_transitions_lanes.sh +32 -0
  30. package/scripts/test_package_coverage_lanes.sh +31 -0
  31. package/scripts/test_selfcheck_shard_lanes.sh +44 -0
  32. package/scripts/test_utterance_checklist_hook_lanes.sh +9 -0
  33. package/scripts/utterance_checklist_hook.py +14 -5
  34. package/templates/fh_audit_check.zsh +140 -0
  35. package/templates/settings.PreToolUse.snippet.json +2 -1
@@ -11,25 +11,25 @@
11
11
  "plugins": [
12
12
  {
13
13
  "name": "fh-meta",
14
- "version": "3.36.0",
14
+ "version": "3.37.0",
15
15
  "description": "New in 2.2.0: BREAKING (gate): chamber step 6 now reads ACTUAL.md, not BUDGET.md — an in-flight chamber run whose actual cost sits in BUDGET.md blocks until the ACTUAL: line moves to tracks/_chamber/<slug>/ACTUAL.md (the runner prints the path). Why: BUDGET.md's pre-verdict hash IS the ordering witness, and step 6 hard-blocked until that same file changed, so every run that reached COMPLETE necessarily mutated a witnessed artifact and verify returned TAMPERED — the chamber's promotion condition was unsatisfiable by construction, not by strictness. Two roles (immutable witness / post-verdict calibration sink) had collided in one file; each was correct alone, so neither side's code showed the conflict. Also: ko-tech-writer Step 2/4-b scans are now calibration-backed (known-pair fixtures + reproducible command, shipped) — discrimination is proven, 'zero residue' is explicitly NOT; chamber lane suite 12 -> 33 including the runner x witness seam no test covered; chamber_run.sh now teaches the two-commit discipline (gate hashes and verdict hash must land in separate commits/PRs — it previously advised the opposite). New in 2.1.0: BREAKING (gate): `crossfamily: declined` in an Axes 2-3 marker now requires grounds naming a record path that RESOLVES on disk — bare `declined`, and `declined` justified by author judgment, are blocked at commit. Remedy: cite where the operator decision lives (e.g. `.. — operator declined sidecars, per knowledge/shared/rules/operational_adaptation.md`), or use `DEGRADED_PANEL_UNUSED` if a panel was reachable and you chose not to recruit it — which is what author judgment actually is. `declined` was the only enum value with no grounds requirement; a cross-family review then broke the first (vocabulary-grep) fix three ways — self-validating on the value's own token, vacuous keyword passes, and over-blocking real declinations in natural prose — so the check asserts a resolvable record instead of words. Also: standpoint axis gains `tier1b` (a STATIC read of a target repo, executed nothing) plus a decide-in-order procedure, after blind floor-tier sims graded pure cold-reads as `tier2` three rounds running; steel-quench Wave 1's sixth angle (gate-locality) gains the output-template row it never had, so a mandatory angle stops being structurally unreportable; verify-bidirectional gains category 5 (prescriptive doctrine statement); Sister Asset Protocol gains an active-adoption trigger; new resident doctrine — Mechanization Boundary, Local Execution First, Skeleton-not-Muscle, Expedition track, and this package's versioning policy. Hub meta-operations toolkit — 35 skills + 7 agents. New in 2.0.1: harness-doctor cadence hook, portability lint wired into pre-commit, branch_claim.sh claim-count-vs-tree-count warning, louder confidentiality-scan fail-open notice, fh-gate.sh missing-package.json survival, identity ① reclassified 🟢 (cross-harness adapters + relay argument channel). New in 1.4.53: `fh-codex-doctor` (npm bin) — Codex adapter drift scanner; reads the documented M1/M2/M3 skill tier map + skill/agent source and reports codex-native/adapter-required/claude-native/unclassified per unit, wired into `npm test`/`prepublishOnly` (fail-closed on unclassified Claude-native primitives). New in 1.4.49: steel-quench gains Step 0.6 Verdict-Invariance Probe (groundedness axis — a load-bearing judged gate's verdict must track behavior, not rubric phrasing; measured flip-count over cross-family paraphrases; arXiv:2605.06161 Policy Invariance anchor); multi_model_sidecar_strategy §Vendor-native harness (a model is strongest in its own vendor CLI — Claude/CC, GPT/codex, Gemini/Antigravity; a universal router degrades all of them, so it stays an autocomplete/QA sidecar, never orchestration); predelete_check.sh fail-closed rewrite; memory-hygiene A-TMA anchor. New in 1.4.48: phantom-quench + steel-quench gain external frontier anchors (arXiv:2607.02052 package-hallucination; arXiv:2607.02057 prompt-coverage-adequacy); README model-flat claim reframed from a per-release point-curve to structural invariants (operation flattens across tiers; depth tier-order fixed within a generation). New in 1.4.47: onboarding step ① surfaces the Mode D companion-store session-start load in the auto-read salience anchor (previously only in the local binding + rules, so a greeting could skip the load). New in 1.4.46: context-doctor command-output axis (route to rtk/proxy for verbose CLI stdout, complementing .claudeignore; risk-gated to token-scarce envs). New in 1.4.41: context-doctor 2026 trigger vocab (context engineering/rot/collapse) + phantom-citation hardening; hub measurement-integrity-checklist (cross-model measurement pre-flight: display-name pin/reps≥3/discriminating probe). New in 1.4.40: install-wizard queryable-wiki scaffold (INDEX + session-start read + R/W/C ingest). New in 1.4.39: auto-decorrelation (cross-family verifier sidecar recruitment) + video-ingest (capability-routed video ingestion). New in 1.4.x: verify-axis check-class taxonomy (mandatory-pass/measured/judged), no-reinvention Tier-0 inventory, 7-class failure taxonomy, Destructive-Op Gate, Wave-T (Temper), tier-floor governance, Mode D Model Notice, FC consent lane, default-Sonnet guidance. New in 1.3.0: public-surface-audit, field-harvest Mode B auto-trigger, 4-axis gate scope ext. Validated cross-CLI: Claude Code, Codex, Gemini.",
16
16
  "source": "./plugins/fh-meta"
17
17
  },
18
18
  {
19
19
  "name": "fh-commons",
20
- "version": "3.36.0",
20
+ "version": "3.37.0",
21
21
  "description": "Project-agnostic utility skills — 7 skills (convergence-loop · deliberation · mcp-circuit-breaker · token-budget-gate · ko-tech-writer · persona-cast · standpoint-review) + 7 agents (quench-challenger + the web-review cast: designer · ux-writer · fe-dev · be-dev · qa · a11y). Domain-independent utilities transplantable into any project.",
22
22
  "source": "./plugins/fh-commons"
23
23
  },
24
24
  {
25
25
  "name": "fh-qp",
26
- "version": "3.36.0",
26
+ "version": "3.37.0",
27
27
  "description": "QP (Quality Platform) — the generic edition of a field QA harness's Prepare→Automation→Regression loop as an FH plugin: 4 skills (qp router · qp-plan · qp-run · qp-regress) + qp_tools.sh (target-class · adapter-probe · mask · surface-reach · mtm-check · run-verbs, typed exit codes) + a zero-domain-constant profile slot + 29 known-pair lanes. Drives web targets through the session's Playwright MCP and desktop targets through computer-use MCP (mobile deferred); calls a registered qasp typed capability when one exists (strictest-wins) — none is registered today, so the MCP fallback is the first edition. Verdict contract: a MACHINE closure requires a recorded assertion; a failed first step is attributed BLOCKED, not FAIL; surface_reach counts every TC in the denominator. Born as chamber run #18 (EMIT, 2026-09-05).",
28
28
  "source": "./plugins/fh-qp"
29
29
  },
30
30
  {
31
31
  "name": "fh-preprep",
32
- "version": "3.36.0",
32
+ "version": "3.37.0",
33
33
  "description": "preprep — a presentation-preparation harness. 1 skill. One CLI over 17 lanes (7 built-in + 10 module) that reads a declared surface manifest and checks a talk's assets against each other: canonical terms, jargon glosses, retired vocabulary, inter-slide dependencies, pacing, get/put round-trips, adjacent duplication, slide relations, geometry, attribute consistency, fonts, diagrams, slide refs, and screen-parity between manuscript and deck. Verdict contract: exit 0 pass / 1 findings / 2 cannot-judge — a surface that could not be read is UNMEASURED, never 0. Promoted out of fh-commons 2026-09-13 after the skill grew past one role (routing / lane modules / fixtures).",
34
34
  "source": "./plugins/fh-preprep"
35
35
  }
@@ -39,6 +39,53 @@ Each row carries Korean phrasings too, so a Korean request can match a row by it
39
39
  | think harder on this turn / this session · «더 깊게 생각해», «깊이 고민» | `ultrathink` in the prompt (that turn only; API effort unchanged) · `/effort low…max\|auto` | Mode D model notice and `capability_escalation_consent.md` decide when to *ask* for more |
40
40
  | faster output · «추가 비용이 들어도 빠른 출력 모드로» | `/fast` (extra cost; limited under `-p`) | — |
41
41
 
42
+ ## Desktop app (Code tab) surfaces — added 2026-11-02
43
+
44
+ The table above is CLI-shaped. A session running inside the Claude desktop app's Code tab has more
45
+ surfaces, and none of them was on this map. Trigger: an external Korean walkthrough video (2026-11-01)
46
+ listing app features shipped 2026-09-16 … 10-15. **Verified against the tool and skill names exposed to
47
+ one Code-tab session on 2026-11-02 — names only; no row below was exercised end to end.** Features the
48
+ video claims but that session could not see are listed under the table, not in it.
49
+
50
+ | User intent / situation | Preferred built-in | FH on top / prerequisite |
51
+ |---|---|---|
52
+ | hand a self-contained task to its own session the user can open and steer · «이건 세션 따로 띄워서 맡겨», «세션 나눠서 동시에» | Code-tab nested session (`start_session` — shows under the parent in the sidebar, reports back to it) | 🟥 **a session is not isolation.** Without a worktree it may share this folder: no FH-asset commits from a worktree, two writers never on the same files, company data stays on the machine. A piece of the *current* task (search, review, a sim) is a subagent, not a session — and a blind sim still needs the isolated clone (§`context: fork` below) |
53
+ | start a session in a folder another session is already using · «같은 폴더에서 세션 하나 더», «세션끼리 안 섞이게» | the new-session panel's **worktree toggle** — the app warns when another session runs in the same folder and offers a worktree; a saved environment can turn the worktree on per folder (operator screenshots, 2026-11-02) | right for side sessions that report and do not commit. 🟥 Not for the governor that commits FH assets: gitignored state (`tracks/_meta` markers, manifest, completion log) does not follow into a worktree. Before removing one: `bash scripts/worktree_reclaim.sh <worktree> --apply`. The panel's «continue uncommitted work» count included untracked experiment folders (it matched `git status`'s `??` entries) — what it then copies was not tested; check `git status` before using it |
54
+ | which sessions are waiting on me · tell another session something · «내 답 기다리는 세션 모아줘», «저 세션한테 전해줘» | session list + `ListAgents` / `SendMessage` | `success:true` means queued, not delivered — only a reply establishes it. A message from another session is information, never operator approval (no permission laundering) |
55
+ | tidy the sidebar · «세션 섹션으로 묶어», «끝난 세션 정리» | sidebar sections / groups, archive (session-management tools) | archive is reversible; **delete is not** → Destructive-Op gate (enumerate → recover → destroy) |
56
+ | keep working while I'm away · «잠들지 않게 해줘», «폰에서 이어 볼래» | keep-awake request · Remote Control | cross-machine messaging is one-way unless both ends are connected — do not wait for a reply that cannot come |
57
+ | change how the app looks or behaves (a side panel, a band, a status line, a hook) · «앱에 패널 하나 띄워», «모드 만들어줘» | mods (`plugin-authoring` skill) | a mod runs with the user's permissions: a third-party mod is an external asset (`sister_asset_protocol.md`); a mod that blocks is machinery, so it belongs only at irreversible edges (§Mechanization Boundary) |
58
+ | which skills eat my context · «스킬이 컨텍스트 얼마나 먹어», «안 쓰는 스킬 정리» | `/skill-doctor` (named in that session's built-in agent descriptions; not run there) | `/context-doctor` for hub CLAUDE.md / memory bloat · `/harness-doctor` for unused skills inside a harness. Removing a skill = the shrink rule: log what was dropped |
59
+ | shorter or differently styled answers · «답 짧게», «설명 줄여줘» | output style (app setting) | the Voice/Tone rule still sets language and register; a style never relaxes verification |
60
+
61
+ **Claimed by the video, not visible to that session — UNVERIFIED, do not route to them as fact:**
62
+ an «advisor» that consults a second model at key moments (if it exists, it is a second opinion from the
63
+ same family, not a cross-family check — `auto-decorrelation` still owns that axis) · cloud «Projects»
64
+ with a coordinator thread and shared memory that keep running with the laptop closed · «Motion» export
65
+ to MP4 · a session-rail context card with per-category usage. (`/btw` opening as a side tab via a
66
+ keyboard shortcut, and nested sessions, are also described by third-party write-ups of the 2026-10-14
67
+ desktop update; a web search the same day found no source at all for the advisor.)
68
+
69
+ ### Desktop surfaces exercised — 2026-11-02 (one Code-tab session, CC 2.1.316, auto mode unless noted)
70
+
71
+ The rows above were names only. These were run end to end, once each unless a count is given; read them as
72
+ observations from one machine, not as documented behaviour.
73
+
74
+ | Situation | What happened | So, in FH |
75
+ |---|---|---|
76
+ | a Bash `cd` that ends somewhere else | four paths tried, one call each: the repo's `scripts/` and a folder added to the session **persisted** into the next call and the app reported the session's primary working directory moved; the session scratchpad and the repo's parent folder were reset after the call | give later `git` commands an explicit directory (`git -C <repo>`, absolute paths) rather than relying on where the last call ended. In the same session the SubagentStop hook still wrote to the starting repo while the primary directory was moved, so hooks did not follow the `cd` there |
77
+ | wait for a PR's CI, then merge | the app bound a PR opened from the session without being asked. Its tool description says the monitor wakes the session on CI failure, merge conflict or review comment; success is not in that list, and none arrived on success here. Turning the monitor on was refused twice by the auto-mode classifier; the operator turned it on in the PR bar. The app's cached check counts lagged `gh pr checks` once (13 passing + 1 pending vs 15/15) | «merge when green» waits for a person to continue the session or for another notification; then run one current-status check (`gh pr checks`) before the merge verdict. The app's instructions forbid polling CI from the session |
78
+ | change this session's permission mode | lowering (bypass → auto) applied at once with no card (observed). Raising was not exercised; the tool description says it shows an approval card in every mode and is unavailable in unattended sessions | in this app a session can lower its own mode without a person; raising is documented as a person's step. That is an app behaviour to rely on only as far as its description, not a boundary FH has tested |
79
+ | plan limits from inside a session | `get_usage` returned the 5-hour and weekly windows with percent and reset time | a pacing input for long runs. No status-line run was observed from these desktop sessions: a desktop pet fed only by the status line kept a Claude value last written by a terminal session ~20 h earlier, and took a new one only when the status-line program was fed by hand |
80
+ | run a cross-family check from a desktop session | `codex` and `agy` resolved and ran from the desktop shell: one reader-doc review on each, one two-round code review on `codex` | those invocations work; the full `auto-decorrelation` skill (panel discovery, consent) was not exercised from a desktop session |
81
+ | a nested session in its own worktree writing a report into the main checkout | a Write hook refused the main-checkout path; the session wrote inside its worktree and the governor copied the file across | brief side sessions to write in their own tree and say so, or have the governor collect — FH's rule against committing FH assets from a worktree already assumes this |
82
+ | deny rules and PreToolUse hooks under `bypassPermissions` | in a scratch folder, headless, Bash tool only, 3 runs: a `permissions.deny` match, a hook exiting 2 and a hook returning `ask` each left the command unrun (marker files 0/3 each); an unmatched control ran 3/3 | in those runs, rules and exit-2 hooks stopped commands with no classifier in the loop — a result for that configuration, not a guarantee for other tools or setups. `destructive_pre_gate.sh` exited 2 only with `FH_DESTRUCTIVE_BLOCK=1`; unset, a forced branch delete went through in bypass headless runs (3 of 3). Since 2026-11-03 it reads the payload's `permission_mode` and blocks by default under `bypassPermissions` (`FH_DESTRUCTIVE_BLOCK=0` keeps it advisory); other modes are unchanged. The hook wiring lives in the gitignored project settings, so a fresh clone has none until it is installed |
83
+
84
+ Also relevant from the [CLI changelog](https://code.claude.com/docs/en/changelog) (2.1.314, dated October 30, 2026, read
85
+ 2026-11-02): it added `permissions.blockWritesOutsideWorkingDirectories`, under which the Write, Edit and NotebookEdit tools
86
+ reject paths outside the working directories in any permission mode. The scope is those three tools: it does not cover shell
87
+ writes, and whether it is on by default was not checked.
88
+
42
89
  ## Skill frontmatter `context: fork` — what it is NOT
43
90
 
44
91
  `context: fork` runs a skill body as a prompt in a new subagent (general-purpose unless `agent:` says
@@ -66,5 +113,8 @@ summary, before concluding a fork did or did not happen.
66
113
  2026-10-15; the docs' skills and model-config pages were read up to 100,000 characters (their last
67
114
  ~9k / ~17k characters unread).
68
115
  - The exact text `ultrathink` injects is not documented.
116
+ - The first desktop table rests on tool and skill *names* seen in one session, not on docs or on running them;
117
+ the app's surfaces roll out per account, so another install may show fewer. The «exercised — 2026-11-02»
118
+ table was run once on one machine (counts given where more); none of it was repeated on a second install.
69
119
  - This map routes; it does not prove a session follows it. Whether a floor-tier session reaches for the
70
120
  built-in first is a separate measurement (blind sim, isolated clone, with and without this map).
@@ -692,7 +692,21 @@ not marketplace-gate alone:
692
692
  **genuinely not-applicable** (`skipped: docs-only repo` — surface ships no code). When code *does*
693
693
  ship, `skipped: built-in unavailable` is **not** a free skip: per the Surface-Class Degrade Invariant
694
694
  above this is an applicable-but-tooling-down case on an irreversible surface → **fail-CLOSED** (run a
695
- manual security pass or take an explicit operator override before publishing; never silent-proceed)
695
+ manual security pass or take an explicit operator override before publishing; never silent-proceed).
696
+ **A pass is not coverage of every class.** The built-in's own policy leaves regular-expression
697
+ denial of service out and reports prototype pollution and open redirect only at very high
698
+ confidence; on a public benchmark the same model matched 9 of the 20 vulnerabilities in those classes
699
+ under `/security-review` and 16 with a plain audit prompt (arXiv:2610.38617, VulnBench 2.0 — a
700
+ supplementary run over 19 of 20 apps; the authors work for a SAST vendor). When the shipped code parses untrusted input
701
+ with regexes, merges objects, or redirects to a URL it was given, pair the pass with a check that
702
+ covers that class on that code — a scanner rule set that includes it, or a second review without
703
+ that policy pointed at those call sites — and name which one ran. If no such check can run, this is
704
+ the same applicable-but-tooling-down case as above: manual pass or explicit override, not a silent pass.
705
+ **Point it at what ships, not at the release PR.** A release PR's diff is usually the version bump
706
+ and the changelog, so a review of "the pending changes" there reads almost no shipped code and still
707
+ comes back clean. The surface for a registry publish is the shipped code between the previous release
708
+ tag and the commit being tagged — `git diff <previous-tag>..<release-commit> -- <the files[] paths>`
709
+ — and the record names that range. A clean pass over the release PR alone is not this step.
696
710
 
697
711
  > Routing vs the rows below: `/marketplace-gate` alone = "is this ready to **list on a marketplace**?";
698
712
  > `/public-surface-audit` alone = reactive "did I leak a token?"; **this gate** = the *act of going
@@ -1257,6 +1271,8 @@ Card update is NOT a sub-step of harvest-loop — even if harvest-loop is skippe
1257
1271
  **Agent View pre-read (mandatory when session ran in Agent View / worktree / background job)**: Before writing the card, read your companion store's handoff files (if you keep one) to recover sub-agent completions that may not be in main session context. Skipping this step in Agent View is the root cause of "card created with stale content" bugs — the main context does not automatically see worktree-completed items.
1258
1272
 
1259
1273
  **Card update obligation** (independent obligation — regardless of harvest-loop completion): Update `reference_next_session_starter.md`.
1274
+ **Status tag per item (2026-11-03)**: every «🌅 다음에 볼 것» item in the new block opens with exactly one tag — `N. [merged|open-pr|in-flight|uncommitted|reverted|planned|operator|held] text`. The tag says what state the item is in, so the next session reads it instead of re-deriving it (merged read as open, a verified-but-uncommitted fix read as done). `session_close_check.sh` ⑤-S lists untagged items (advisory — the tag being *true* stays judgment). The tag does not change step ③ below: `merged` / `reverted` items still move to «↩️ 닫힌 것» unless the next session must act on them. Borrowed from pstack recall tags (`tracks/_meta/research_2026-11-03_pstack_video.md`).
1275
+
1260
1276
  ① **Agent View pre-read** (see above) → ② Step 0-b cross-check generates removal list → ③ Remove completed items → ④ Add new priorities → ⑤ Fix stale paths/versions → ⑥ Overwrite → ⑦ Output "BEFORE N items → AFTER M items" diff.
1261
1277
  "Delta update" not "snapshot" — completed items remaining in next session card is a bug.
1262
1278
  🟥 **그리고 그 역방향도 버그다 — «안 닫힌 것이 사라지는 것».** 재작성은 줄이는 일이 아니라 «완료를 덜어내는」 일이다: 카드에서 빠진 항목은 ⓐ `fh_completed_{date}.md` 에 완료로 적혔거나 ⓑ 카드에 «왜 뺐는지」가 적혀 있어야 하고, 둘 다 아니면 유실이다. (2026-08-24 실사고: `knowledge/shared/harness-core/claude_md_gate_details.md §CM-Card-Loss-Evidence`) 기계 앵커는 `session_close_check.sh` ⑤-C(이전 카드의 **미래 날짜**가 카드나 오늘 완료 로그에 살아 있나) — 🟥 **날짜 토큰만 보므로 날짜 없는 미완은 구조적으로 못 잡는다**(앵커지 floor 아님). 외부 근거: arXiv 2607.26637(같은 절). 같은 규율을 카드·메모리·상주 문서를 **줄이는 모든 패스**(마감 ⑤ · `/memory-hygiene` · `/salience-splitter`)에 적용한다 — «줄여라」만 있는 지시는 조용히 사실을 지운다. ⚠️ 그 연구는 반대 방향도 함께 보고한다(작은 코퍼스에서는 응축이 56.2% → 68.8% 로 **도움**) — 그래서 이 규칙은 «줄이지 마라」가 아니라 «빠진 것은 완료이거나 명시된 것이어야 한다」다.
@@ -5267,3 +5267,81 @@
5267
5267
  outcome: "M 0 / S 2 / R 3; no rename, no role collision (auto-decorrelation, persona-cast, harness-pr-reviewer distinct). S1 (intro jargon) and S2 (fallback bullet) and R3 (how to make the diff) fixed; R1 (version field) checked — persona-cast uses the same field"
5268
5268
  evidence: "same commit and marker"
5269
5269
  tokens: "103732"
5270
+ - date: 2026-11-02
5271
+ agent: "general-purpose (sonnet) ×3 — session-card 🔧 item investigation, one item each (purpose: context)"
5272
+ task: "4b package-coverage exceptions · 5/5b tilde reason text and U15 race · 6c mutation probe and G-TRIG-04"
5273
+ outcome: "4b «delete the 3 exceptions» prescription was WRONG (live 65/65, clean clone 62/65) — governor re-measured; fixed by changing the STALE predicate (PR #1002). 5 = FoD gate, not FH. U15 race reproduced (fixed in PR #1000). 6c designed UNMEASURED"
5274
+ evidence: "tracks/_meta/fh_completed_2026-11-02.md · PR #1000 · PR #1002"
5275
+ tokens: "not recorded"
5276
+ - date: 2026-11-02
5277
+ agent: "general-purpose (sonnet) — U15 lock-contention arm measurement (purpose: context)"
5278
+ task: "measure row loss under load for original / retry-only / retry+3.0 s"
5279
+ outcome: "0/300 on the fixed arm; its trace.log held no ENOENT evidence — governor re-grounded the cause by errno trace before citing it"
5280
+ evidence: "tracks/_meta/.axes_23_passed_fix_utterance-hook-lock-drop_2026-11-02.marker"
5281
+ tokens: "not recorded"
5282
+ - date: 2026-11-02
5283
+ agent: "web-fetch (sonnet) ×2 — read arXiv:2610.38617 and arXiv:2610.39884 (purpose: context)"
5284
+ task: "extract the /security-review policy-excluded classes and numbers; KARMA's acceptance gate, revert and success/failure ablation"
5285
+ outcome: "both HTML pages truncated at ~39k chars; abstract/introduction verbatim, rest tool-summarised. One summarised claim («one run per arm») dropped from the rule before commit"
5286
+ evidence: "PR #1003 · tracks/_meta/memo_2026-11-02_edit_manifest_vs_karma.md"
5287
+ tokens: "31536 + 31558"
5288
+ - date: 2026-11-02
5289
+ agent: "general-purpose (sonnet) ×3 — blind floor-tier sims of the Pre-Publish /security-review paragraph (purpose: independence)"
5290
+ task: "two risky scenarios (RegExp from user input + deep merge; next= redirect) and one control (fixed-template copy)"
5291
+ outcome: "3/3 as predicted — both risky scenarios not complete and named the class check; control complete with no extra check"
5292
+ evidence: "tracks/_meta/.axes_23_passed_docs_prepublish-security-review-policy-gap_2026-11-02.marker"
5293
+ tokens: "134765 + 111534 + 134559"
5294
+ - date: 2026-11-02
5295
+ agent: "general-purpose (sonnet) ×6 — blind A/B sims of the Pre-Publish 'point it at what ships' line, new text vs main text (purpose: independence)"
5296
+ task: "S1 leading scenario (14 PRs since tag named) 1+1; S2 unleading scenario (release branch, /security-review defaults to the branch diff) 2+2"
5297
+ outcome: "S1 both arms named the tag range — scenario leaked the answer, no discrimination. S2 tag..release-commit range named: new 2/2, old 0/2 (old arms said 'point it at bin/ scripts/ or the release tree'). 'Clean on the release PR completes step 3?': no in 4/4, no difference — the line adds range and record shape, not the refusal"
5298
+ evidence: "PR body of docs/prepublish-security-review-target · scratchpad sim/new.md, old.md, scenario2.txt"
5299
+ tokens: "113122 + 113710 + 113297 + 113283 + 113162 + 113163"
5300
+ - date: 2026-11-02
5301
+ agent: "general-purpose (sonnet) ×2 + web-fetch (sonnet) ×1 — builtin map desktop rows: blind A/B sim and changelog check (purpose: independence)"
5302
+ task: "sim: «merge when CI is green while the user is away» + a stray in-repo cd, routing note = main's desktop section vs main + the new exercised table; web-fetch: verify the 2.1.314 changelog line"
5303
+ outcome: "new arm: one-off gh check, monitor does not wake on success, no polling; main arm: «poll or monitor the PR's checks». cd risk named by both (no difference). Changelog 2.1.314 (Oct 30, 2026) line found verbatim"
5304
+ evidence: "PR body of docs/builtin-map-desktop-measured"
5305
+ tokens: "115132 + 113795 + 22074"
5306
+ - date: 2026-11-03
5307
+ agent: "general-purpose (sonnet) ×2 — FoD audits on a frozen export of 96d66a9: autopilot «safer bypass» promise, and full mode «FH plugged in» (purpose: independence)"
5308
+ task: "A: map autopilot/gate paths, check irreversible classes, fail direction, ledger counts. B: what full mode injects vs FH, prior P-series evidence, cheapest decisive next measurement"
5309
+ outcome: "A: Bash-path git/publish holds; MCP outside hook matchers; gate is a no-op when the app is not running; launcher-form publish (npx … npm publish) and local data-loss git commands not flagged. B: full mode carries a few FH lines + a diff-only second opinion; capability SUGGESTIVE (+8–12pp, no pre-registered threshold met), thinking style NOT MEASURED. Three claims source-grounded by the governor (matcher list, _app_running return 0, publish head match)"
5310
+ evidence: "tracks/_meta/fod_audit_2026-11-03.md"
5311
+ tokens: "244195 + 225116"
5312
+ - date: 2026-11-03
5313
+ agent: "general-purpose (sonnet) ×8 — blind A/B sims of the frontier-digest prior-art line, new SKILL vs main SKILL (purpose: independence)"
5314
+ task: "S1 .worktreeinclude item, no identifier given (2+2); S2 leakcheck item with HN id, existing asset = public-surface-audit + prepublishOnly scan (2+2)"
5315
+ outcome: "S1: no discrimination — the answer was in today's git log, all 4 checked the repo (one old arm also dropped the item for the missing identifier, a scenario defect). S2: new 2/2 grepped and closed it as already covered (prepublishOnly blocks); old 0/2 opened the repo, both left «check whether our scan blocks publish» as the candidate"
5316
+ evidence: "PR body of docs/frontier-digest-prior-art-line"
5317
+ tokens: "122609 + 122589 + 124646 + 122885 + 125135 + 125191 + 123237 + 123368"
5318
+ - date: 2026-11-03
5319
+ agent: "general-purpose (sonnet) ×4 — blind A/B sims of the card status-tag rule, excerpt with vs without the line (purpose: independence)"
5320
+ task: "write the newest card block's «🌅 다음에 볼 것» section from an 8-fact scenario (merged · open PR · uncommitted · planned · operator · reverted · held)"
5321
+ outcome: "new 2/2 tagged all 7 items with the right state; old 0/2 tagged (0/6 each). Side effect: new arms kept merged/reverted facts in 🌅 where old arms moved them to a removed-items note — folded back into the rule"
5322
+ evidence: "PR #1010 body"
5323
+ tokens: "117295 + 117327 + 118690 + 118423"
5324
+ - date: 2026-11-03
5325
+ agent: "general-purpose (sonnet) ×3 — blind A/B sims of the harvest-loop correction_moments line, new excerpt ×2 vs main excerpt ×1 (purpose: independence)"
5326
+ task: "plan a weekly harvest-loop retro (10-27..11-03) up to Step 2: commands in order and what to do with each output; nothing run"
5327
+ outcome: "new 2/2 planned correction_moments.py --since 2026-10-27, read the header limits, kept the output local, and stated «0 pairs = none found by cue words»; old 0/1 had no correction step. Contamination: arms ran git status and saw the branch and the untracked script (the old arm named «correction-moments work» from the branch) — still did not plan the step"
5328
+ evidence: "PR body of feat/correction-moments"
5329
+ tokens: "119563 + 119731 + 121067"
5330
+ - date: 2026-11-03
5331
+ agent: "general-purpose (sonnet) ×1 — today's frontier digest application candidates, read-only (purpose: context)"
5332
+ task: "read frontier_digest_2026_11_03.md, check each Immediate Application Candidate against the repo with grep, rank uncovered ones"
5333
+ outcome: "3 uncovered: live-eval transition list on by default (extend split_by_target) · harness-doctor «called but content-blind» row · Gemini 2.5 Pro re-route sweep (0 hits, doc only)"
5334
+ evidence: "tracks/_meta/morning_report_2026-11-04.md"
5335
+ tokens: "128752"
5336
+ - date: 2026-11-03
5337
+ agent: "general-purpose (sonnet) ×3 — blind A/B sims of the harness-doctor «called but content-blind» row, new excerpt ×2 vs main ×1 (purpose: independence)"
5338
+ task: "audit a toy project with two registered PreToolUse hooks (one always allows despite its comment, one really blocks force push) against the checklist excerpt"
5339
+ outcome: "new 2/2 fired the row at S-tier for the always-allow hook after feeding a known-positive and known-negative input, and passed the real guard; old 0/1 fired no row (it noticed the no-op in prose but had no row to grade it)"
5340
+ evidence: "PR body of docs/harness-doctor-content-blind"
5341
+ tokens: "118926 + 119003 + 119166"
5342
+ - date: 2026-11-03
5343
+ agent: "general-purpose (sonnet) ×2 — blind reader A/B of the live-eval «moved since previous» section (purpose: independence)"
5344
+ task: "read one nightly report (pass rate flat at 0.70, one probe regressed and one recovered) and say whether anything regressed since last night"
5345
+ outcome: "with the section: named G-TRIG-05 PASS->FAIL and G-TRIG-02 FAIL->PASS and said the flat rate hides it; without: «can't tell from this file»"
5346
+ evidence: "PR body of feat/live-eval-moved-since-previous"
5347
+ tokens: "115131 + 115035"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrono-meta/fh-gate",
3
- "version": "3.36.0",
3
+ "version": "3.37.0",
4
4
  "description": "FH runtime adapters — run FH governance, skills, and agents via Claude or Codex with machine-parseable gates.",
5
5
  "homepage": "https://github.com/chrono-meta/forge-harness#readme",
6
6
  "bugs": {
@@ -134,6 +134,11 @@
134
134
  "scripts/fixtures/frontier_digest_recall.tsv",
135
135
  "scripts/pr_merge_verified.sh",
136
136
  "scripts/test_pr_merge_verified_lanes.sh",
137
+ "scripts/test_live_eval_transitions_lanes.sh",
138
+ "scripts/correction_moments.py",
139
+ "scripts/test_correction_moments_lanes.sh",
140
+ "scripts/card_status_tags.sh",
141
+ "scripts/test_card_status_tags_lanes.sh",
137
142
  "scripts/adapters/fixtures/mate_agent_boundary_known_negative.md",
138
143
  "scripts/adapters/fixtures/mate_agent_boundary_known_positive.md",
139
144
  "scripts/adapters/fixtures/qasp_web_rules_known_negative.json",
@@ -250,6 +255,7 @@
250
255
  "scripts/rtk_gross_ablation.sh",
251
256
  "scripts/section_ref_check.py",
252
257
  "scripts/selfcheck.sh",
258
+ "scripts/selfcheck_shard_weights.txt",
253
259
  "scripts/session_checklist.py",
254
260
  "scripts/checklist_unblocked_hook.sh",
255
261
  "scripts/session_close_check.sh",
@@ -417,6 +423,7 @@
417
423
  "templates/consent_classes.yaml.example",
418
424
  "templates/contrib_session.md",
419
425
  "templates/degrade_direction_scan.sh",
426
+ "templates/fh_audit_check.zsh",
420
427
  "templates/goal-quench-hook-setup.md",
421
428
  "templates/goal-quench-settings-merged.json",
422
429
  "templates/local_fh_context.md",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fh-commons",
3
- "version": "3.36.0",
3
+ "version": "3.37.0",
4
4
  "engines": {
5
5
  "claudeCode": ">=1.0.0"
6
6
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fh-meta",
3
- "version": "3.36.0",
3
+ "version": "3.37.0",
4
4
  "engines": {
5
5
  "claudeCode": ">=1.0.0"
6
6
  },
@@ -2,6 +2,36 @@
2
2
 
3
3
  ### [Unreleased]
4
4
 
5
+ ### [3.37.0] — 2026-11-04 — 권한 무시 모드에서 파괴 명령 기본 차단 · 카드 상태 태그 · 정정 순간 마이닝 · live-eval 직전 밤 대비 변화 · «측정 못 함» 을 판정으로 내던 채널 여섯
6
+
7
+ 새 스크립트와 새 레인이 들어가고 게이트 하나의 기본 동작이 조여져서 버전 정책상 minor 다.
8
+
9
+ **BREAKING (gate): `destructive_pre_gate.sh` 가 `permission_mode=bypassPermissions` 에서 `FH_DESTRUCTIVE_BLOCK` 이 비어 있으면 파괴 명령(`git branch -D` 등)을 경고가 아니라 차단한다 — 권한 무시 모드로 무인 실행하면서 그 명령을 의도한 경우 `FH_DESTRUCTIVE_BLOCK=0` 으로 종전 경고 동작을 고른다.** 다른 권한 모드와 `--stdin-raw`(페이로드 없음) 경로는 바뀌지 않았다.
10
+
11
+ In English: under `bypassPermissions` the destructive-op hook now blocks by default (set `FH_DESTRUCTIVE_BLOCK=0` to keep the old advisory behaviour); session cards get a per-item status tag with an advisory close check; a period retrospective can mine operator correction moments from the utterance ledgers; the nightly live-eval report records which probes flipped since the previous night; harness-doctor gains a «called but content-blind» row; six channels that rendered an unmeasured result as a verdict now say what they measured.
12
+
13
+ 소비자에게 닿는 변화:
14
+ - `destructive_pre_gate.sh`(#1008): 위 BREAKING 줄. 근거 실측 — 헤드리스 `--dangerously-skip-permissions` Sonnet 에 버릴 브랜치 `git branch -D` 를 시켰을 때 옛 훅(스위치 비움)은 0/3 보존(삭제됨), 새 훅은 3/3 보존이고 차단 사유가 `permission_mode=bypassPermissions` 를 말한다. 권한 무시 모드에선 경고를 읽는 사람이 실행 전에 없다는 게 이유다. `templates/settings.PreToolUse.snippet.json` 은 설명 문구만 바뀌었다.
15
+ - `card_status_tags.sh` · `session_close_check.sh ⑤-S`(#1010): 다음 세션 카드의 «다음에 볼 것» 항목마다 상태 태그 하나(`merged|open-pr|in-flight|uncommitted|reverted|planned|operator|held`)를 붙이는 규칙과, 태그 없는 항목을 나열하는 마감 점검(권고 — 막지 않는다). 태그가 참인지는 판단으로 남긴다.
16
+ - `correction_moments.py` + harvest-loop Step 1 한 줄(#1011): 발화 원장에서 운영자의 정정 낱말이 든 발화를 추리고, 다른 날 다시 나온 정정을 «아직 못 배운 규칙» 후보로 짝짓는다. 로컬 전용이며 원장 내용을 다른 모델에 보내지 않는다. 짝 0 은 «재발 없음» 이 아니다 — 정정 낱말 없는 정정은 못 잡는다(재현율 미보정, 머리말에 적음).
17
+ - `probe_live_eval.sh` · `probe_live_eval_lib.py`(#1013): 밤마다 내는 live-eval 보고서에 «Moved since previous» 절 — 직전 보고서 대비 판정이 바뀐 프로브를 적는다(통과율이 그대로여도 회귀 하나와 회복 하나가 상쇄되는 경우를 드러낸다). 직전 보고서가 없으면 «not supplied», 프로브 집합이 다르면 «not comparable» 로 적고 변화 없음과 섞지 않는다. `--prev` 와 `FH_LIVE_EVAL_PREV_DIR` 로 지정할 수 있다.
18
+ - `harness-doctor` SKILL(#1012): «호출은 되지만 입력과 무관하게 같은 판정을 내는» 게이트를 S등급 장식으로 판정하는 줄. 판정은 코드 읽기가 아니라 known-positive / known-negative 입력 두 개로 낸다.
19
+ - `frontier-digest` SKILL(#1009): 대화형 실행에서 «FH 적용 후보» 마다 레포를 grep 해 «이미 있나» 줄로 끝낸다.
20
+ - `claude_md_full_reference.md`(#1005 · #1010): Pre-Publish 3단계 보안 점검은 릴리스 PR 이 아니라 «지난 태그 → 릴리스 커밋» 출하 범위를 대상으로 한다는 문단 · 카드 상태 태그 규칙. `builtin_capability_map.md`(#1007): 데스크톱 Code 탭에서 실제로 써 본 표면 기록.
21
+ - 측정 채널 여섯(#1001): `selfcheck --shard` 의 인라인 검사 39개를 지키는 레인(S8) · `env_layer_fingerprint.sh` 의 마커 판정이 훅이 실제로 읽는 이름 하나만 본다 · detach 레인이 `chmod 000` 이 안 먹는 환경(root)에서 통과가 아니라 UNMEASURED · npm 설치본에 빠져 있던 `templates/fh_audit_check.zsh`(install-wizard 의 zshrc 단계가 늘 거절되던 원인)와 `scripts/selfcheck_shard_weights.txt` 를 `files[]` 에 넣었다.
22
+
23
+ ### [3.36.1] — 2026-11-02 — 발화 기록 훅이 행을 조용히 잃던 것 · package-coverage 가 쓰이는 예외를 «안 쓰임» 으로 읽던 것 · Pre-Publish 보안 단계 한 문단 · 기능 지도 데스크톱 줄
24
+
25
+ 새 스킬 · 새 게이트 레인 · 새 행동 규칙은 없다. 수정과 문서라 버전 정책상 patch 다. 훅 설정은 바뀌지 않았고, 훅이 부르는 스크립트 한 개의 대기 동작이 바뀌었다.
26
+
27
+ In English: the utterance checklist hook no longer drops a prompt row in silence when two prompts land at once; `package_coverage_check.sh` no longer reports in-use exceptions as stale in a clean clone; the Pre-Publish reference says a `/security-review` pass does not cover its policy-excluded classes; the built-in capability map routes desktop Code-tab surfaces.
28
+
29
+ 소비자에게 닿는 변화:
30
+ - `utterance_checklist_hook.py`(#1000): 같은 세션에 프롬프트가 겹쳐 들어오면 잠금 파일 열기가 `ENOENT` 로 실패하거나 0.3초 잠금 대기가 끝나서, 운영자 발화 한 줄이 기록 없이 사라질 수 있었다(부하 실측 원본 3/200 · 10/150 유실). 열기를 10ms 간격으로 50번까지 다시 하고, 잠금은 3.0초까지 기다린다(고친 뒤 0/100). 한 세션이 자기 자신과 겹치지는 않으므로 평소 프롬프트에는 대기가 생기지 않는다. 남는 것: 잠금을 3초 넘게 쥔 쪽이 있으면 여전히 그 행을 건너뛴다. 레인 U15b 가 대기를 0.3초로 되돌리면 빨개진다.
31
+ - `package_coverage_check.sh`(#1002): `ACCEPTED_ABSENT` 예외를 «쓰이는 중» 으로 세는 조건이 «출하 문서가 가리키고 **그 파일이 이 머신에 있을 때**» 였다. 그래서 git 에 없는 파일을 가리키는 예외 셋이 깨끗한 클론(CI · 릴리스 사슬)에서 늘 «안 쓰임 — 지워라» 로 떴다(62/65). 이제 출하 문서가 가리키기만 하면 쓰이는 걸로 센다(65/65). 출하 누락을 잡는 FAIL 경로는 그대로다. 레인 L8a/b/c.
32
+ - `claude_md_full_reference.md` Pre-Publish 3단계(#1003): `/security-review` 통과가 모든 부류를 본 것은 아니라는 문단. 내장 정책이 정규식 DoS 를 빼고 prototype pollution · open redirect 는 확신이 매우 높을 때만 보고한다 — 공개 벤치마크(arXiv:2610.38617)에서 그 부류 20건 중 9건(`/security-review`) 대 16건(같은 모델, 일반 감사 프롬프트). 출하 코드가 신뢰 못 할 입력으로 정규식을 만들거나 객체를 병합하거나 받은 URL 로 리다이렉트하면, 그 부류를 그 코드에서 보는 검사를 하나 더 붙이고 무엇을 돌렸는지 적는다. 못 돌리면 기존의 수동 점검 · 명시적 오버라이드 경로로 간다.
33
+ - `builtin_capability_map.md`(#999): 데스크톱 앱 Code 탭 기능 8줄(별도 세션에 맡기기 · 같은 폴더에 세션 하나 더 · 답을 기다리는 세션 모으기와 세션 간 메시지 · 사이드바 정리 · 잠들지 않게와 원격 제어 · 앱 모드 · `/skill-doctor` · 출력 스타일)에 길을 냈다. 근거는 한 세션에서 보인 도구 · 스킬 이름뿐이고 끝까지 실행해 본 줄은 없다. 영상에만 나오고 그 세션에서 보이지 않은 넷(어드바이저 · 클라우드 Projects · Motion 내보내기 · 컨텍스트 카드)은 표 밖에 `UNVERIFIED` 로 적었다.
34
+
5
35
  ### [3.36.0] — 2026-11-01 — 새 스킬 standpoint-review(받는 쪽에서 변경 검토) · deliberation 예시 기록 수리
6
36
 
7
37
  훅 변경은 없다. 스크립트 변경도 없다. 새 스킬이 들어가서 버전 정책상 minor 다.
@@ -102,6 +102,8 @@ Report progress: `📡 HN 15 items · arxiv 5 items · TLDR 5 items · Batch 5 i
102
102
 
103
103
  Print the synthesis result in the conversation (format in §Output-Formats): engine line + Highlights + Immediate Application Candidates + Warning Signals + collection stats.
104
104
 
105
+ **Prior-art line (interactive session only — the API-mode synthesis has no repo access, so it cannot write this).** Before an Immediate Application Candidate is printed or queued, grep the repo for its own token (backticked span / script name / rule name) and end the candidate with `이미 있나: <hit path:line | 0 hits in <dirs searched>>`. A hit is opened, not counted. A 0 with no named scope is not «absent» (not searched ≠ not there). Measured 2026-11-02: candidate «증거 빈 완료 행 세기» already existed as `session_checklist.py check`; the grep before building caught it.
106
+
105
107
  **With `--save` flag**: save to **`{FH}/tracks/_meta/frontier_digest_{YYYY_MM_DD}.md`** — underscores in
106
108
  the date, matching `date +%Y_%m_%d`. Fallback when no FH install is resolvable:
107
109
  `~/.claude/forge-harness/tracks/_meta/` → cwd `tracks/_meta/`, same filename either way. After saving:
@@ -115,6 +115,7 @@ size instrument* is read. The footprint rows below apply to **both** scopes and
115
115
  | **Meta-harness** growth since last run: decompose into *new sections* vs *existing-section growth* (mechanical — diff `##` section names + line counts vs the prior run's commit; **first run / no prior commit → report both as n/a, no tier**) | **Tier is decided by the two counts alone**: **S-tier iff existing-section growth > new-section growth** (the file is thickening faster than it is gaining capability); otherwise advisory, no tier. Report both numbers **and** the new sections' names — the names are *reporting output for the human*, never an input to the tier. Do not judge "was this growth capability-bearing?" per line |
116
116
  | SKILL.md > 300 lines AND no `SKILL_detail.md` | S-tier — propose `/salience-splitter` (governance-semantic split, not compression) |
117
117
  | Rules files unreferenced in CLAUDE.md | R-tier |
118
+ | **Called but content-blind** — a gate · check · lane that IS invoked (has callers) but returns the same verdict whatever its input (the third «decorative» shape, after «no caller» and «caller ignores the result»; arXiv:2610.41604) | S-tier. Detector is the existing revert/mutation probe, not a new scanner: feed one known-positive and one known-negative input and confirm the verdict differs. Same verdict for both → decorative. Reading the code is not the test — a check that greps for its own hook reference passes this row while its verdict never moves |
118
119
  | Always-loaded footprint > 40k chars (see scan below for what counts) | S-tier — **lever depends on where the chars live**: rules/detail still auto-loading → relocate to a non-loaded dir (e.g. `knowledge/shared/rules/`), pointers stay in CLAUDE.md · narrative inside CLAUDE.md → `/salience-splitter` · **behavioral content only, nothing left to relocate** → capability-level (merge/retire a governance unit) |
119
120
  | **Memory-index footprint** — the session's auto-loaded memory index (`~/.claude/projects/<slug>/memory/MEMORY.md`), reported as **its own line, never summed into the row above** | S-tier > 10k chars — **different residency, different lever**: this one is `/memory-hygiene` (archive closed items to `MEMORY_archive.md`, tighten hooks to one line), NOT `/salience-splitter`. Summing it into the CLAUDE.md row would mis-route the lever, which is exactly what the row above ties to "where the chars live". **Blind spot this closes (2026-07-20, measured)**: a fresh top-level `/context` showed **Memory files = 41.7k of 68.8k resident tokens (61%)**, of which `MEMORY.md` alone was **14.1k — 55% the size of CLAUDE.md (25.5k)** — and the footprint scan below counted **none of it**. The instrument was optimising the smaller half of the surface it claimed to measure |
120
121
  | Always-loaded footprint > 80k chars | M-tier — same lever selection, mandatory, **and never self-discharged** (see below) |
@@ -124,6 +124,7 @@ Output final proposal list → Y: PR creation / N: persist to tracks/_meta/fh_si
124
124
 
125
125
  ### Step 1 — field-harvest
126
126
  `/field-harvest --since 1d` — Fewer than 3 patterns → auto-skip + output "no session harvest targets".
127
+ **Weekly / period runs also read the operator's corrections**: `python3 scripts/correction_moments.py --since <period start>` lists correction moments from the utterance ledgers and pairs the ones that came back on a different day — a returning correction is a rule the harness has not learned yet, so each pair goes to Step 2 as a pattern. Its header prints what it excluded and its recall limit (cue words only); «0 pairs» means none found by cue words, not that none recurred. The ledgers can hold in-house context — read the output yourself, never hand it to another model.
127
128
 
128
129
  ### Step 2 — contention-layer
129
130
  `/contention-layer [field-harvest output patterns]`
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fh-preprep",
3
- "version": "3.36.0",
3
+ "version": "3.37.0",
4
4
  "engines": {
5
5
  "claudeCode": ">=1.0.0"
6
6
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fh-qp",
3
- "version": "3.36.0",
3
+ "version": "3.37.0",
4
4
  "engines": {
5
5
  "claudeCode": ">=1.0.0"
6
6
  },
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env bash
2
+ # card_status_tags.sh — ⑤-S: does every «다음에 볼 것» item in the newest session-card block carry
3
+ # exactly one status tag? ADVISORY: never blocks, never changes a close verdict.
4
+ #
5
+ # Why (2026-11-03, borrowed from pstack's recall tags): card items are free prose, and the next
6
+ # session has to re-derive each item's state — «merged» read as «open PR», a verified-but-uncommitted
7
+ # fix read as done. A one-word tag makes the state a typed property of the record (present · from a
8
+ # closed set), which is what a check may assert; whether the tag is TRUE stays judgment.
9
+ #
10
+ # Tag set (closed): merged · open-pr · in-flight · uncommitted · reverted · planned · operator · held
11
+ # Item form: "N. [tag] text" (the tag is the first thing after "N. ")
12
+ #
13
+ # usage: card_status_tags.sh [card] (default: tracks/_meta/reference_next_session_starter.md)
14
+ # exit: 0 = measured (tagged or not — advisory) · 3 = NOT MEASURED (no card / no section)
15
+ set -u
16
+ FH="$(cd "$(dirname "$0")/.." && pwd)"
17
+ CARD="${1:-$FH/tracks/_meta/reference_next_session_starter.md}"
18
+ TAGS='merged|open-pr|in-flight|uncommitted|reverted|planned|operator|held'
19
+
20
+ if [ ! -f "$CARD" ]; then
21
+ echo "⬜ ⑤-S status tags NOT MEASURED — card not found"
22
+ exit 3
23
+ fi
24
+
25
+ # Newest block = from line 1 to the first «---» line; the section = «## 🌅» up to the next «## ».
26
+ section=$(awk '/^---[[:space:]]*$/ {exit} /^## / {insec = ($0 ~ /^## 🌅/); next} insec' "$CARD")
27
+ if ! awk '/^---[[:space:]]*$/ {exit} /^## 🌅/ {f=1} END {exit !f}' "$CARD"; then
28
+ echo "⬜ ⑤-S status tags NOT MEASURED — newest card block has no «## 🌅» section"
29
+ exit 3
30
+ fi
31
+
32
+ items=$(printf '%s\n' "$section" | grep -E '^[0-9]+\. ' || true)
33
+ total=$(printf '%s\n' "$items" | grep -c -E '^[0-9]+\. ' || true)
34
+ if [ "$total" -eq 0 ]; then
35
+ # An empty set is not «all tagged» — say it is empty.
36
+ echo "⬜ ⑤-S status tags: 0 items in «🌅» — nothing to check (not a pass)"
37
+ exit 0
38
+ fi
39
+ good=$(printf '%s\n' "$items" | grep -c -E "^[0-9]+\. \[($TAGS)\] " || true)
40
+ bad=$((total - good))
41
+ if [ "$bad" -eq 0 ]; then
42
+ echo "✅ ⑤-S status tags: $good/$total «🌅» items tagged"
43
+ else
44
+ echo "⚠️ ⑤-S status tags: $bad/$total «🌅» items lack a tag from [$TAGS] (advisory)"
45
+ printf '%s\n' "$items" | grep -v -E "^[0-9]+\. \[($TAGS)\] " | cut -c1-90 | sed 's/^/ ↳ /'
46
+ fi
47
+ exit 0
@@ -0,0 +1,116 @@
1
+ #!/usr/bin/env python3
2
+ """correction_moments.py — find the operator's correction moments in the utterance ledgers and group
3
+ the ones that recur on different days. Input for harvest-loop / memory: a correction that came back on
4
+ a second day is a rule the harness has not learned yet.
5
+
6
+ Borrowed from pstack automate-me (2026-11-03, tracks/_meta/research_2026-11-03_pstack_video.md) without
7
+ its cost: pstack sends every conversation slice to a subagent; this is a local regex + word-overlap pass
8
+ over the ledgers the UserPromptSubmit hook already writes (tracks/_meta/utterances/*.jsonl). Nothing
9
+ leaves the machine — the ledgers can hold in-house context, so do not hand the output to another model.
10
+
11
+ What it claims and what it does not:
12
+ · a "correction moment" = an utterance matching CUE (Korean/English correction words). Cue-word
13
+ recall is the instrument's limit: a correction phrased without any cue word is not seen.
14
+ · "recurring" = two cue hits on different days that share >= --min-shared content words. Word
15
+ overlap is a candidate filter, not a topic judgment — the reader decides whether a group is one rule.
16
+ · every exclusion is counted and printed (malformed rows, short rows), never dropped silently.
17
+
18
+ usage: python3 scripts/correction_moments.py [ledger_dir] [--since YYYY-MM-DD] [--min-shared N] [--all]
19
+ exit: 0 = ran · 2 = ledger dir missing or holds no rows (NOT a "no corrections" result)
20
+ """
21
+ import glob, json, os, re, sys
22
+
23
+ CUE = re.compile(
24
+ r"(?:^|\s)아니(?=[\s,.]|$)|아니(?:야|라|지|고|잖)|아냐|틀렸|틀린|잘못|말고|정정|하지\s?마|쓰지\s?마|왜\s|다시\s?(?:해|봐|확인)|그게 아니|"
25
+ r"\bno,|\bwrong\b|\bdon'?t\b|\bstop\b|\bnot what\b", re.I)
26
+ STOP = set("그리고 그런데 그러면 이거 이건 그거 그건 저거 지금 여기 거기 이제 근데 그냥 하는 하고 해서 했어 했는데 "
27
+ "있어 있는 없어 없는 아니 아냐 아니야 아니라 말고 다시 정정 해줘 해봐 한번 모두 전부 같은 같아 "
28
+ "this that with from have what when which there would could about into than then also only does your will".split())
29
+ MIN_CHARS = 6
30
+ MAX_CHARS = 600 # longer rows are almost always pasted reports or documents, not a correction in the operator's words
31
+
32
+
33
+ def words(t):
34
+ ws = set(re.findall(r"[가-힣]{2,}|[A-Za-z][A-Za-z0-9_.\-]{2,}", t.lower()))
35
+ return {w for w in ws if w not in STOP and not CUE.fullmatch(w)}
36
+
37
+
38
+ def cue_window(t):
39
+ """The sentence holding the first cue word, plus its neighbours — long messages otherwise match on
40
+ unrelated words elsewhere in the text."""
41
+ parts = re.split(r"(?<=[.!?。])\s+|\n+", t)
42
+ for k, p in enumerate(parts):
43
+ if CUE.search(p):
44
+ return " ".join(parts[max(0, k - 1):k + 2])
45
+ return t
46
+
47
+
48
+ def main(argv):
49
+ args = [a for a in argv if not a.startswith("--")]
50
+ opt = dict(zip(argv[::1], argv[1::1]))
51
+ root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
52
+ d = args[0] if args and not args[0][:4].isdigit() else os.path.join(root, "tracks", "_meta", "utterances")
53
+ since = opt.get("--since", "")
54
+ min_shared = int(opt.get("--min-shared", "2"))
55
+ files = sorted(glob.glob(os.path.join(d, "*.jsonl")))
56
+ rows, bad, short, envelope, long_ = [], 0, 0, 0, 0
57
+ for f in files:
58
+ sess = os.path.basename(f)[:8]
59
+ for line in open(f, encoding="utf-8", errors="replace"):
60
+ try:
61
+ x = json.loads(line)
62
+ except Exception:
63
+ bad += 1; continue
64
+ t, ts = x.get("text"), x.get("ts")
65
+ if not isinstance(t, str) or not isinstance(ts, str):
66
+ bad += 1; continue
67
+ if ts[:10] < since:
68
+ continue
69
+ if t.lstrip().startswith("<"):
70
+ # subagent hand-backs, peer messages, pasted blocks: the ledger keeps them, they are not the operator's words
71
+ envelope += 1; continue
72
+ if len(t.strip()) < MIN_CHARS:
73
+ short += 1; continue
74
+ if len(t) > MAX_CHARS:
75
+ long_ += 1; continue
76
+ rows.append((ts, sess, t))
77
+ if not rows:
78
+ print("⬜ no ledger rows under %s (files=%d) — NOT MEASURED, not «no corrections»" % (d, len(files)))
79
+ return 2
80
+ hits = [(ts, s, t, words(cue_window(t))) for ts, s, t in rows if CUE.search(t)]
81
+ # PAIRS, not union-find: chaining long messages through one shared word each merged 29 hits into one
82
+ # «group» on the first run (2026-11-03). A pair is two hits on different days whose cue sentences share
83
+ # >= min_shared content words.
84
+ recurring, repaste = [], 0
85
+ for i in range(len(hits)):
86
+ for j in range(i + 1, len(hits)):
87
+ if hits[i][0][:10] != hits[j][0][:10]:
88
+ sh = hits[i][3] & hits[j][3]
89
+ union = hits[i][3] | hits[j][3]
90
+ if len(sh) >= min_shared and union and len(sh) / len(union) < 0.8:
91
+ recurring.append((i, j, sh))
92
+ elif len(sh) >= min_shared:
93
+ repaste += 1 # the same text pasted on two days is not a correction coming back
94
+ recurring.sort(key=lambda p: -len(p[2]))
95
+ days = sorted({r[0][:10] for r in rows})
96
+ print("# correction moments — %s .. %s (%d days)" % (days[0], days[-1], len(days)))
97
+ print("ledgers=%d · utterances=%d · excluded: envelope=%d short(<%d chars)=%d long(>%d chars)=%d malformed=%d · cue hits=%d · "
98
+ "recurring pairs (different days, >=%d shared words)=%d · re-pasted pairs dropped=%d" % (len(files), len(rows), envelope, MIN_CHARS, short, MAX_CHARS, long_, bad,
99
+ len(hits), min_shared, len(recurring), repaste))
100
+ print("limits: cue-word recall only (a correction with no cue word is invisible — e.g. «영어로 써졌네», 2026-10-18) · word overlap is a candidate filter\n")
101
+ for k, (i, j, sh) in enumerate(recurring, 1):
102
+ print("## R%d — shared: %s" % (k, " ".join(sorted(sh)[:8])))
103
+ for x in (i, j):
104
+ print("- %s %s · %s" % (hits[x][0][:16], hits[x][1], cue_window(hits[x][2]).replace("\n", " ")[:160]))
105
+ print()
106
+ if "--all" in argv:
107
+ print("## hits not in a pair")
108
+ grouped = {x for p in recurring for x in p[:2]}
109
+ for i, h in enumerate(hits):
110
+ if i not in grouped:
111
+ print("- %s %s · %s" % (h[0][:16], h[1], h[2].replace("\n", " ")[:160]))
112
+ return 0
113
+
114
+
115
+ if __name__ == "__main__":
116
+ sys.exit(main(sys.argv[1:]))
@@ -19,6 +19,9 @@
19
19
  # DEGRADE DIRECTION: advisory. Warns and exits 0 — a false block on a developer's shell trains
20
20
  # the --no-verify reflex on the hooks that DO guard irreversible surfaces. Set
21
21
  # FH_DESTRUCTIVE_BLOCK=1 to escalate to exit 2 (stderr → model, call blocked).
22
+ # EXCEPTION (2026-11-03): with FH_DESTRUCTIVE_BLOCK unset and the hook payload's
23
+ # permission_mode = bypassPermissions, it blocks by default — nobody reads an advisory before a
24
+ # bypass-mode call runs. FH_DESTRUCTIVE_BLOCK=0 restores advisory there. Other modes unchanged.
22
25
  # Unparseable/absent payload → silent exit 0 (an unparsed input is not a finding; block mode
23
26
  # fails open on a dead python3 — same accepted residual as pipe_verdict_guard, the surface is
24
27
  # the reversible Bash call, not the irreversible act itself).
@@ -73,6 +76,7 @@
73
76
  set -u
74
77
 
75
78
  CMD=""
79
+ PERM_MODE=""
76
80
  if [ "${1:-}" = "--stdin-raw" ]; then
77
81
  CMD=$(cat)
78
82
  else
@@ -84,6 +88,14 @@ except Exception: sys.exit(0)
84
88
  if d.get("tool_name") != "Bash": sys.exit(0)
85
89
  sys.stdout.buffer.write((d.get("tool_input", {}).get("command", "") or "").encode("utf-8"))
86
90
  ' 2>/dev/null) || CMD=""
91
+ # permission_mode rides on every hook payload. Read separately so a missing field changes nothing.
92
+ PERM_MODE=$(printf '%s' "$RAW" | python3 -c '
93
+ import json,sys
94
+ try: d = json.load(sys.stdin)
95
+ except Exception: sys.exit(0)
96
+ m = d.get("permission_mode")
97
+ if isinstance(m, str): sys.stdout.write(m)
98
+ ' 2>/dev/null) || PERM_MODE=""
87
99
  fi
88
100
  [ -n "$CMD" ] || exit 0
89
101
 
@@ -193,10 +205,21 @@ hits="${hits} Advisory timing: this context reaches the model on the NEXT t
193
205
  Destructive-Op Gate order: enumerate → recover → destroy — never destroy-then-check.
194
206
  Intentional and reviewed → re-run with trailing \`# noqa: destructive-op\`."
195
207
 
196
- if [ "${FH_DESTRUCTIVE_BLOCK:-0}" = "1" ]; then
208
+ # Block decision. Explicit FH_DESTRUCTIVE_BLOCK wins either way (1 = block, 0 = advisory). Unset:
209
+ # block when the session runs with permission_mode=bypassPermissions — there no human sees the
210
+ # advisory before the call runs, so a warning is a post-mortem (measured 2026-11-03, headless
211
+ # bypass, Sonnet: unset → branch deleted 3/3, =1 → kept 3/3).
212
+ BLOCK_WHY=""
213
+ case "${FH_DESTRUCTIVE_BLOCK-}" in
214
+ 1) BLOCK_WHY="FH_DESTRUCTIVE_BLOCK=1 — add noqa after review, or set FH_DESTRUCTIVE_BLOCK=0, to proceed." ;;
215
+ "") [ "$PERM_MODE" = "bypassPermissions" ] && \
216
+ BLOCK_WHY="permission_mode=bypassPermissions (no human sees a warning before the call runs) — add noqa after review, or set FH_DESTRUCTIVE_BLOCK=0 to keep advisory." ;;
217
+ *) BLOCK_WHY="" ;; # 0 and any other explicit value: advisory, as before this default existed
218
+ esac
219
+ if [ -n "$BLOCK_WHY" ]; then
197
220
  # Block mode: exit 2 = stderr fed to the model as the blocking reason; stdout ignored by contract.
198
221
  printf '%s\n' "$hits" >&2
199
- printf '%s\n' " [BLOCKED] FH_DESTRUCTIVE_BLOCK=1 — unset or add noqa after review to proceed." >&2
222
+ printf '%s\n' " [BLOCKED] $BLOCK_WHY" >&2
200
223
  exit 2
201
224
  fi
202
225