@chrono-meta/fh-gate 1.4.14 → 1.4.16

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
@@ -103,17 +103,28 @@ Simplification guard: trivial denials with one obvious fix → state block + sin
103
103
 
104
104
  **4-step summary**: ① Auto-read CLAUDE.md + CATALOG + session card + registry scan → ② One-line proposal (new user / exploratory / returning branches) → ③ 5-skill cascade (plugin-recommender → synergy → .claudeignore → model → verify) → ④ Approval + setup
105
105
 
106
- **Returning-user door skeleton (summary-level — applies even if the detail file read is skipped; returning users only, new/exploratory branches stay in the detail file)**: open with the fixed 3-door menu, **🐿️ on its own line as the skeleton's first line** —
106
+ **Greeting branch + door skeleton (summary-level — applies even if the detail file read is skipped)**: the branch test is **mechanical local state — session files under `tracks/`** — never git log / CATALOG residue (a fresh clone carries full history but zero session files: it is a NEW install — origin: a fresh-clone sonnet sim rendered the returning menu off commit messages, `fh_signal_2026-06-11` FP8). Every variant opens with **🐿️ on its own line as the skeleton's first line** — the marker is part of the skeleton, one salience unit with the menu, not a separate rule.
107
107
 
108
- > 🐿️
109
- > *"① Connect/map a project · ② Work on a mapped project — {field candidates} · ③ FH self-development — {FH worklist}"*
108
+ - **New user** (no session files AND no mapped project tracks under `tracks/` — fresh clone/install; underscore meta dirs `_meta`/`_audit`/`_contrib` don't count): 2-door starter, never the returning menu —
110
109
 
111
- The marker is part of this skeleton — one salience unit with the menu, not a separate rule (origin: a sonnet-tier sim emitted the menu but dropped the standalone marker rule, `fh_signal_2026-06-11`). Compose session-card candidates **into doors ②/③**, never as a raw priority dump that replaces the menu. An urgent open item (time-windowed handoff · blocking external deadline) outranks the menu; an explicit task utterance skips it entirely (see Guards below); cadence reminders (§Cadence Rules) ride below it, they don't displace it. Canonical source: `fh_detail_protocols.md` Step 2 §Returning user — keep door labels in sync.
110
+ > 🐿️
111
+ > *"Looks like you're new here! ① Create your first project (guided) · ② Map an existing project — and I can run `/install-wizard` to finish initial setup."*
112
112
 
113
- **Identity marker**: every greeting response (Step ②) opens with 🐿️ on its own line. For returning users it is embedded in the door skeleton above (do not strip it when composing doors); new/exploratory branch templates carry it in `fh_detail_protocols.md` Step 2.
113
+ - **Returning user** (session files OR mapped project tracks exist): fixed 4-door menu
114
+
115
+ > 🐿️
116
+ > *"① Map a project · ② Create a new project · ③ Accelerate a mapped project (work · Full-Harness · skills/agents/plugins) — {field candidates} · ④ Cross-project synergy"*
117
+
118
+ Render conditions: ①②③ always (③'s candidates composed live) · ④ only when **2+ project tracks** exist (underscore meta dirs don't count) — synergy findings flow back into each project, and may *propose* an FH contribution (`/field-harvest` → `tracks/_contrib`) as an **outcome of findings, never a standing door**.
119
+
120
+ - **Developer door (unnumbered, outside the menu)**: when **FH-dev state exists** (session card `tracks/_meta/reference_next_session_starter.md` · open `fh_signal_*` files · `CLAUDE.local.md`), append to the menu line: ` · 🔧 FH self-development — {FH worklist}`. The hub operator always has this state, so the owner always sees it — no flag needed. Without dev state the door is **silently absent**; the user typing `developer` / `개발자` **as a standalone utterance or menu reply** (not a substring of a task sentence) opens it on demand (routes to `docs/CONTRIBUTING.md` + `tracks/_contrib/` + open `fh_signal_*` items).
121
+
122
+ Compose session-card candidates **into door ③ (field) and the 🔧 door (FH-dev)**, never as a raw priority dump that replaces the menu. An urgent open item (time-windowed handoff · blocking external deadline) outranks the menu; an explicit task utterance skips it entirely (see Guards below); cadence reminders (§Cadence Rules) ride below it, they don't displace it. Canonical source: `fh_detail_protocols.md` Step 2 — keep branch tests and door labels in sync.
123
+
124
+ **Identity marker**: every greeting response (Step ②) opens with 🐿️ on its own line. It is embedded in both skeletons above (do not strip it when composing doors); the exploratory branch template carries it in `fh_detail_protocols.md` Step 2.
114
125
 
115
126
  **Guards**: explicit task-entry utterance → skip onboarding · once per session · code/debug requests → start working directly · project routing is a suggestion, mention at most once
116
- **Metadata-is-not-intent guard**: the trigger is the user's **typed message only**. Session metadata — branch name (auto-derived from the first message, e.g. `claude/korean-greeting-*`), repo name, file paths — is **never** a task spec and never suppresses or redirects the greeting trigger. A bare greeting fires onboarding even when the branch name looks like a feature request; if the only "task" signal lives in metadata and not in what the user typed, treat the message as a greeting and run the 3-axis scaffold.
127
+ **Metadata-is-not-intent guard**: the trigger is the user's **typed message only**. Session metadata — branch name (auto-derived from the first message, e.g. `claude/korean-greeting-*`), repo name, file paths — is **never** a task spec and never suppresses or redirects the greeting trigger. A bare greeting fires onboarding even when the branch name looks like a feature request; if the only "task" signal lives in metadata and not in what the user typed, treat the message as a greeting and run the greeting branch + door skeleton above.
117
128
 
118
129
  ## New Skill Creation Pre-Commit Gate
119
130
 
@@ -183,7 +194,11 @@ the operator (one line), mirroring §Floor governance.
183
194
 
184
195
  If `model:`-pinned dispatch is unavailable (plan/billing gate), fall back to a cross-session headless
185
196
  run (`claude -p "<trigger>" --model <tier>` in the target cwd) — stronger isolation, zero instruction
186
- contamination. 2026-06-15+: headless `claude -p` draws from the hard-capped credit pool, not the
197
+ contamination. **Saturation disguise (N=2, 2026-06-11/12)**: the same "Usage credits required for 1M
198
+ context" error also fires when the *session* is near context saturation, not the plan gate — in a
199
+ long-running session, compact (flush handoff state to disk first) and retry the dispatch once before
200
+ concluding the gate is closed (identical opus-pinned dispatch failed pre-compaction, succeeded
201
+ post-compaction 2026-06-12). 2026-06-15+: headless `claude -p` draws from the hard-capped credit pool, not the
187
202
  subscription — prefer in-session Agent dispatch when the plan gate allows; take the headless fallback
188
203
  knowingly. Record sim results in the Axes 2–3 marker + sub-agent invocation log.
189
204
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrono-meta/fh-gate",
3
- "version": "1.4.14",
3
+ "version": "1.4.16",
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": [
@@ -24,10 +24,10 @@ What expert grounds against:
24
24
  What expert does NOT rely on:
25
25
  - Its own unverified parametric recall ("I think X is true")
26
26
  - Internal hub assets only (that is fact-checker's job — internal grep)
27
- - Declared-source-file back-tracing only (that is source-grounding-audit's job)
27
+ - Declared-source-file back-tracing only (that is phantom-quench's job)
28
28
  ```
29
29
 
30
- **Boundary (no overlap)**: `fact-checker` greps the *hub/own environment*; `source-grounding-audit` traces claims to *declared internal source files*; `expert` checks against the *external world / frontier*. The three cover internal-duplication, internal-provenance, and external-accuracy respectively.
30
+ **Boundary (no overlap)**: `fact-checker` greps the *hub/own environment*; `phantom-quench` traces claims to *declared internal source files*; `expert` checks against the *external world / frontier*. The three cover internal-duplication, internal-provenance, and external-accuracy respectively.
31
31
 
32
32
  ## Accuracy Matrix
33
33
 
@@ -296,6 +296,14 @@ Output to user (one line only):
296
296
 
297
297
  Do not ask for confirmation. The user may override by re-running `/goal-quench --sidecar none`.
298
298
 
299
+ **Dispatch-failure triage (saturation disguise)**: a sidecar dispatch that fails with a 1M-context /
300
+ usage-credits error late in a long run may be reporting *session context saturation*, not a billing
301
+ gate (measured 2026-06-12: identical error pre-compaction; the same opus-pinned dispatch succeeded
302
+ post-compaction with the sub-agent completing normally). Triage order: compact — flushing handoff
303
+ state to disk first — → retry the dispatch once → only then take the headless `claude -p` fallback
304
+ (credit-pool cost) or an inline at-floor pass. Concluding "billing gate" from the first failure
305
+ skips the cheapest recovery.
306
+
299
307
  ### Hand-off
300
308
 
301
309
  After orchestration, **update** (not re-create) `.claude/goal-quench.active` — add `mode:` and `composed_plan:` lines alongside existing budget fields. Re-creating the file loses the `start_commit` field written in Phase 1 Step 3. Then proceed to threshold injection (Phase 1 Step 4) and hand off to /goal. Phase 3 verification then runs as in core — `pipeline-conductor --quick` for pro, `--full` for max (max implies external-facing stakes).
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: phantom-quench
3
- description: The grounding member of the quench series — extracts proper nouns, numerical values, and branching conditions from artifacts (TCs, analysis reports, design documents), back-traces them to declared source files, and marks anything not found as a Phantom Claim (ungrounded — present in the artifact but not traceable to a declared source; not a claim that it is necessarily false). If steel-quench attacks output patterns (self-declarations, cushion language), phantom-quench attacks input tracing (where did this come from?). Renamed from source-grounding-audit (2026-06-06, quench-series); `/source-grounding-audit` still resolves as an alias. Triggered by "phantom detection", "phantom-quench", "phantom claim", "hallucinated claim detection", "source back-trace", "source audit", "verify source", "TC evidence tracing", "where did this come from", "grounding audit", "source grounding audit", "false claim detection".
3
+ description: The grounding member of the quench series — extracts proper nouns, numerical values, and branching conditions from artifacts (TCs, analysis reports, design documents), back-traces them to declared source files, and marks anything not found as a Phantom Claim (ungrounded — present in the artifact but not traceable to a declared source; not a claim that it is necessarily false). If steel-quench attacks output patterns (self-declarations, cushion language), phantom-quench attacks input tracing (where did this come from?). Renamed from source-grounding-audit (2026-06-06, quench-series); the old name appears here so legacy references still route to this skill (alias stub directory removed 2026-06-12). Triggered by "phantom detection", "phantom-quench", "phantom claim", "hallucinated claim detection", "source back-trace", "source audit", "verify source", "TC evidence tracing", "where did this come from", "grounding audit", "source grounding audit", "false claim detection".
4
4
  user-invocable: true
5
5
  allowed-tools: ["Read", "Write", "Edit", "Bash", "Grep", "Glob"]
6
6
  model: sonnet
@@ -13,8 +13,10 @@ model: sonnet
13
13
  > **Renamed from `source-grounding-audit` (2026-06-06)** — the grounding member of the quench series
14
14
  > (steel-quench · phantom-quench · goal-quench). Same skill, same ruleset; only the label changed to fit
15
15
  > the family. The **v1 paper (Zenodo 10.5281/zenodo.20397566) cites the old name** — that is the
16
- > historical record, not a phantom. `/source-grounding-audit` still resolves via the deprecated redirect
17
- > stub at `plugins/fh-meta/skills/source-grounding-audit/SKILL.md` (`successor: phantom-quench`).
16
+ > historical record, not a phantom (`paper/forge_harness_v1.0.html` is left unchanged by design; readers
17
+ > map *source-grounding-audit (v1) = phantom-quench (current)*). The deprecated redirect stub directory
18
+ > was removed 2026-06-12 — old-name utterances ("source grounding audit", "grounding audit") route here
19
+ > via this description's trigger phrases.
18
20
  > This is a **label rename, not a capability change** — phantom-quench does not fuse steel-quench or
19
21
  > inject faults; those remain separate (orthogonality is deliberate — see Role Separation below).
20
22
  >
@@ -65,6 +65,27 @@ count_check "marketplace.json fh-meta" .claude-plugin/marketplace.json
65
65
  count_check "README header" README.md "${total_sk} skills · ${total_ag} agents"
66
66
  count_check "local_fh_context fh-meta" templates/local_fh_context.md "(fh-meta, ${meta_sk})"
67
67
 
68
+ # Referenced-path existence: backtick-quoted repo-relative file refs in the always-loaded
69
+ # governance surface (CLAUDE.md + .claude/rules/*.md) must exist. Phantom-reference class
70
+ # recurred N>=3 in the 2026-06-11 audit window (operations.md _scanner.sh, claude-chrono path,
71
+ # stale templates ref) — instrument-not-habit. Globs/placeholders/{vars} are excluded by the
72
+ # filter; tracks/ is machine-local and deliberately out of scope. Gitignored refs (e.g.
73
+ # `.claude/settings.json` named in prose *about* gitignored files) are skipped — they exist
74
+ # locally but not on a fresh clone, and "must exist" here means "must ship".
75
+ while IFS= read -r p; do
76
+ if git check-ignore -q "$p" 2>/dev/null; then
77
+ echo "SKIP ref-path (gitignored): $p"
78
+ elif [ -f "$p" ]; then
79
+ echo "PASS ref-path: $p"
80
+ else
81
+ echo "FAIL ref-path: $p — referenced in CLAUDE.md/.claude/rules but missing"
82
+ fail=1
83
+ fi
84
+ done < <(grep -hoE '\`[^\` ]+\`' CLAUDE.md .claude/rules/*.md 2>/dev/null \
85
+ | sed 's/\`//g' \
86
+ | grep -E '^(knowledge|templates|scripts|docs|plugins|\.claude)/[^*{}<>$]+\.(md|sh|ya?ml|jsonc|json)$' \
87
+ | sort -u)
88
+
68
89
  if [ "$fail" -ne 0 ]; then
69
90
  echo "SELFCHECK: FAIL"
70
91
  exit 1
@@ -1,42 +0,0 @@
1
- ---
2
- name: source-grounding-audit
3
- description: >-
4
- RENAMED to phantom-quench (2026-06-06, quench-series rebrand). Same skill, same ruleset — only the
5
- label changed to fit the quench family (steel-quench · phantom-quench · goal-quench). Use
6
- /phantom-quench. This alias is retained so old references and the v1 paper's name still resolve.
7
- user-invocable: false
8
- allowed-tools: []
9
- model: sonnet
10
- deprecated: true
11
- deprecated_reason: renamed to phantom-quench (label-only; not a merge — same skill)
12
- deprecated_date: 2026-06-06
13
- successor: phantom-quench
14
- ---
15
-
16
- # source-grounding-audit — RENAMED to `phantom-quench`
17
-
18
- > **Renamed to `phantom-quench` (2026-06-06).** This is a **label rename, not a deprecation-by-merge** —
19
- > the skill is unchanged and fully active under its new name. Invoke **`/phantom-quench`**.
20
-
21
- ## Why the rename
22
-
23
- phantom-quench is the **grounding member of the quench series** (steel-quench attacks output patterns ·
24
- phantom-quench traces inputs for Phantom Claims · goal-quench gates autonomous runs). The old descriptive
25
- name did not signal that family membership; the function is identical.
26
-
27
- ## Where the skill lives now
28
-
29
- `plugins/fh-meta/skills/phantom-quench/SKILL.md` (+ `SKILL_detail.md`) — full ruleset preserved
30
- (S-grade blocker, Human Gate, Pattern Diagnosis, etc.).
31
-
32
- ## Record note (do not "fix")
33
-
34
- The **v1 paper** (Zenodo 10.5281/zenodo.20397566; arXiv submission) cites `source-grounding-audit`.
35
- That is the **immutable historical name**, not a phantom — `paper/forge_harness_v1.0.html` is left
36
- unchanged by design. Future readers map: *source-grounding-audit (v1 paper) = phantom-quench (current)*.
37
-
38
- ## Done When
39
-
40
- Deprecated alias — no active execution path of its own. Done When: all invocation routes through
41
- `/phantom-quench` (the successor); this entry exists only so old names resolve. Satisfies the
42
- harness-doctor L2 M-tier Done-When requirement (CLAUDE.md §New Skill Creation Pre-Commit Gate).