@chrono-meta/fh-gate 3.45.0 → 3.47.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.
- package/.claude/rules/fh_4axis_gate.md +1 -1
- package/.claude-plugin/marketplace.json +4 -4
- package/CHEATSHEET.md +8 -4
- package/README.ja.md +4 -0
- package/README.ko.md +22 -0
- package/README.md +24 -0
- package/README.zh.md +4 -0
- package/docs/codex-compat.md +4 -4
- package/knowledge/shared/harness-core/agents_md_runtime_details.md +2 -2
- package/knowledge/shared/harness-core/builtin_capability_map.md +5 -2
- package/knowledge/shared/harness-core/claude_md_full_reference.md +5 -1
- package/knowledge/shared/harness-core/fh_4axis_gate_detail.md +15 -0
- package/knowledge/shared/harness-core/fh_detail_protocols.md +1 -0
- package/knowledge/shared/harness-core/fh_integration_contract.md +2 -2
- package/knowledge/shared/learnings/subagent_invocations_log.yaml +14 -0
- package/package.json +3 -1
- package/plugins/fh-commons/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-commons/skills/mcp-circuit-breaker/SKILL.md +12 -6
- package/plugins/fh-meta/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-meta/CHANGELOG.md +89 -0
- package/plugins/fh-meta/skills/context-doctor/SKILL.md +1 -0
- package/plugins/fh-meta/skills/deep-clarify/SKILL.md +76 -22
- package/plugins/fh-meta/skills/frontier-digest/SKILL_detail.md +13 -7
- package/plugins/fh-meta/skills/harvest-loop/SKILL.md +2 -2
- package/plugins/fh-meta/skills/memory-hygiene/SKILL.md +6 -0
- package/plugins/fh-preprep/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-qp/.claude-plugin/plugin.json +1 -1
- package/scripts/fh-gate.sh +149 -19
- package/scripts/live_eval_trace.py +22 -4
- package/scripts/pr_merge_verified.sh +14 -4
- package/scripts/selfcheck.sh +2 -0
- package/scripts/test_action_yml_lanes.sh +50 -0
- package/scripts/test_deep_clarify_interview_lanes.sh +108 -0
- package/scripts/test_deep_clarify_spec_path_lanes.sh +91 -0
- package/scripts/test_fh_gate_absorb_lanes.sh +1 -0
- package/scripts/test_fh_gate_defaults_lanes.sh +229 -3
- package/scripts/test_fh_gate_fusion_lanes.sh +1 -0
- package/scripts/test_fh_gate_regressions.sh +1 -0
- package/scripts/test_live_eval_trace_lanes.sh +27 -7
- package/scripts/test_pr_merge_verified_lanes.sh +15 -2
- package/scripts/test_probe_live_eval_lanes.sh +4 -3
- package/scripts/worktree_reclaim.sh +1 -1
- package/templates/PRE-PUBLISH-CHECKLIST.md +22 -0
- package/templates/predelete_check.sh +2 -0
- package/templates/predelete_check.test.sh +10 -0
|
@@ -64,7 +64,7 @@ Each bullet says what the hook checks for that field; the hook checks form and n
|
|
|
64
64
|
- **`oracle:`** — optional; `oracle: <kind> — <grounds>`, kind ∈ `known-pair` (positive and negative controls in the same run) · `metamorphic` (judged by an input-change → expected-output-change relation) · `back-to-back` (another implementation or family's output on the same input) · `a-b` (one variable, ARM/CTRL, reps≥3; `A/B` allowed) · `human` (a person judged the expected value) · `none` (reason required). The hook checks form only, not whether the oracle really was that kind. Blocks: a kind outside the enum or with characters glued on (`known-pair2`), grounds under two words or a `<...>` placeholder, duplicates, and any near-key — every line whose key starts with `oracle` but is not exactly `oracle:`, plus `orcale:` `oralce:` `오라클:` — even next to a valid line. Lanes: `scripts/test_marker_oracle_lanes.sh`.
|
|
65
65
|
- **`diff-sha:`** — optional while `DIFF_SHA_REQUIRED_DATE` in the hook is empty (setting it is the operator's decision); `diff-sha: <64 lowercase hex>` from `bash scripts/marker_diff_sha.sh`. Several lines allowed; at least one must equal the current staged fingerprint, else block. Near-keys (`diff_sha:` `Diff-sha:` `diff-sha :` `diffsha:` `diff-fp:`) block. Fingerprint failure is HARNESS-ERROR, not a match. Lanes: `scripts/test_marker_diff_sha_lanes.sh`.
|
|
66
66
|
|
|
67
|
-
Fixtures for the field set: `scripts/test_marker_axes_run_lanes.sh` · `scripts/test_marker_standpoint_lanes.sh` · `scripts/test_marker_soul_check_lanes.sh`. Extending the format means adding lanes there and running the **revert probe** (disable the branch a lane claims to anchor; the lane must go red).
|
|
67
|
+
Fixtures for the field set: `scripts/test_marker_axes_run_lanes.sh` · `scripts/test_marker_standpoint_lanes.sh` · `scripts/test_marker_soul_check_lanes.sh`. Extending the format means adding lanes there and running the **revert probe** (disable the branch a lane claims to anchor; the lane must go red). **Repairing a gate or lane** (a fix to a check that let a known input through): build at least one fail-before fixture from the change record — the fix commit message, or the issue / review-finding body that reported the escape — and name that source on the first `controls:` line, after its alive/dead/n/a token, never instead of it (`input-from=<commit sha | issue # | finding id>`; no record → `input-from=none(self-found)`). It is one boundary input, not coverage: never write it as «the gate is safe». Record only — no new key, no hook check.
|
|
68
68
|
|
|
69
69
|
### Reviewer-visible evidence — the marker is not readable from the other side
|
|
70
70
|
|
|
@@ -11,25 +11,25 @@
|
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
13
13
|
"name": "fh-meta",
|
|
14
|
-
"version": "3.
|
|
14
|
+
"version": "3.47.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.
|
|
20
|
+
"version": "3.47.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.
|
|
26
|
+
"version": "3.47.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.
|
|
32
|
+
"version": "3.47.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
|
}
|
package/CHEATSHEET.md
CHANGED
|
@@ -239,6 +239,8 @@ npx --package @chrono-meta/fh-gate fh-gate "src/foo.ts" full # explicit files +
|
|
|
239
239
|
FH_BACKEND=codex npx --package @chrono-meta/fh-gate fh-gate # Codex backend (default: claude)
|
|
240
240
|
# → FH_GATE_VERDICT: PASS | PENDING | BLOCKED | ESCALATE
|
|
241
241
|
# → exit: 0 PASS · 1 PENDING · 2 BLOCKED · 3 ESCALATE · 10 harness error · 11 arg error · 12 dry-run
|
|
242
|
+
# → a changed file whose name holds a newline cannot be passed on: fh-gate (and fh-goal) exit 10
|
|
243
|
+
# instead of reviewing the rest. Rename the file, or name the files to review explicitly.
|
|
242
244
|
|
|
243
245
|
# Run a skill or agent doc through a backend, outside Claude Code
|
|
244
246
|
npx --package @chrono-meta/fh-gate fh-run --skill <name>
|
|
@@ -260,12 +262,12 @@ fh-codex-doctor --strict
|
|
|
260
262
|
| `FH_BACKEND=cross` | `cross` | **Both model families, findings UNIONed** (a finding only one family saw is still a finding, so union rather than vote); the verdict is the most severe leg. Costs ~2x, so it is for load-bearing verdict / gate / irreversible-surface changes, not a default. The output always declares which legs actually ran (`FH_GATE_LEGS:`, `FH_GATE_DECORRELATED:`) — on a machine with only one family installed, `cross` degrades to that single leg **and says so**, because a single-family result that reads as cross-checked is worse than an honest one. A single-leg PASS or PENDING becomes **ESCALATE (exit 3)** with `FH_GATE_ESCALATE_REASON: cross-degraded …` — cross was asked for and not delivered; `FH_GATE_CROSS_ALLOW_SINGLE=1` accepts one family and is echoed as `FH_GATE_CROSS_OVERRIDE:` |
|
|
261
263
|
| `FH_MODEL` | model id | Override backend model |
|
|
262
264
|
| level arg | `quick` \| `full` | Gate depth (default `quick`). With `FH_REVIEWER=code-review`, `quick` calls `/code-review medium` and `full` calls `/code-review high`; `FH_GATE_ELEPHANT=auto` turns the elephant pass on at `full` |
|
|
263
|
-
| `FH_REVIEWER` | `fh-legacy` \| `code-review` \| `fh` | Review stage. **Default (every backend): `fh-legacy`**, the steel-quench angle pass the gate shipped before 3.45.0. Opt-in: `code-review` = the built-in `/code-review` (claude only), its findings carried as reported (Important → B, Nit and Pre-existing → C) — **not read-only**: it runs git's read commands, which can write a file (`--output=`), so use it on trusted changes only; `fh` = FH's own **goldfish** pass, which follows `/code-review`'s method (eight finder angles, one CONFIRMED / PLAUSIBLE / REFUTED vote per candidate, severity-ordered, at most 10 at `full` / 8 at `quick`) and never sees the author's description; on the claude backend it gets only Read · Glob · Grep (no shell, no MCP server, no skill); on codex it runs in `codex exec -s read-only`. Both opt-ins default `FH_TIMEOUT` to 900. UNMEASURED: whether a headless `/code-review` or goldfish call returns the structured object on every runner — why neither is the default |
|
|
265
|
+
| `FH_REVIEWER` | `fh-legacy` \| `code-review` \| `fh` | Review stage. **Default (every backend): `fh-legacy`**, the steel-quench angle pass the gate shipped before 3.45.0. Opt-in: `code-review` = the built-in `/code-review` (claude only) — **currently always exits 10**: headless `/code-review` does not return the structured object fh-gate needs (0/11 on claude 2.1.330); when it does, its findings are carried as reported (Important → B, Nit and Pre-existing → C) — **not read-only**: it runs git's read commands, which can write a file (`--output=`), so use it on trusted changes only; `fh` = FH's own **goldfish** pass, which follows `/code-review`'s method (eight finder angles, one CONFIRMED / PLAUSIBLE / REFUTED vote per candidate, severity-ordered, at most 10 at `full` / 8 at `quick`) and never sees the author's description; on the claude backend it gets only Read · Glob · Grep (no shell, no MCP server, no skill); on codex it runs in `codex exec -s read-only`. Both opt-ins default `FH_TIMEOUT` to 900. UNMEASURED: whether a headless `/code-review` or goldfish call returns the structured object on every runner — why neither is the default |
|
|
264
266
|
| `FH_GATE_ELEPHANT` | `off` \| `auto` \| `on` | The **elephant** pass (default `off`; `auto` = on at `full`, off at `quick`), with any reviewer: it gets `FH_TASK_DESCRIPTION` and the touched files' git history and looks only for a past fix re-opened, a recorded decision undone, or the stated task contradicted. Its findings carry `source: "elephant"` |
|
|
265
267
|
| `FH_GATE_EXEC` | `off` \| `on` | Execution layer, token-free (default `off` — opt-in, because it runs the repository's own lane scripts): E0 class scanners and E1 the change's target lanes, run in a **copy** of the tree. A lane this change turns red → A (BLOCKED); red before the change too → C; did not finish → B. It runs the change's own lane scripts — use `off` where the change is not trusted. Each step prints what it ran, or `NOT RUN` and why, on `FH_GATE_E0:` / `FH_GATE_E1:` |
|
|
266
268
|
| `FH_GATE_BASE` · `FH_GATE_LANES` · `FH_LANE_TIMEOUT` | ref · commands · seconds | What the execution layer measures against (default: `HEAD` when the tree has uncommitted changes, else the merge-base with `main`); declared lanes instead of discovery; seconds per lane (600) |
|
|
267
269
|
|
|
268
|
-
Why `/code-review` is offered (2026-11-19): measured on 8 real past diff bugs × 3, fh-gate's own pass and `/code-review high` caught the same share (0.417) and the gate cost about 4.8× as much. What fh-gate adds is the typed verdict, the exit codes, the record, the cross leg — and the execution layer, which a reader cannot replace. Why it is not the default (3.45.0): whether a headless `/code-review` or goldfish call returns the structured object on every runner
|
|
270
|
+
Why `/code-review` is offered (2026-11-19): measured on 8 real past diff bugs × 3, fh-gate's own pass and `/code-review high` caught the same share (0.417) and the gate cost about 4.8× as much. What fh-gate adds is the typed verdict, the exit codes, the record, the cross leg — and the execution layer, which a reader cannot replace. Why it is not the default (3.45.0): whether a headless `/code-review` or goldfish call returns the structured object on every runner was unmeasured; for `/code-review` it has since been measured as 0/11 (3.47.0), so that opt-in currently always exits 10. Whether the execution layer catches what `/code-review` misses is being measured; until then it is a hypothesis.
|
|
269
271
|
|
|
270
272
|
> **vs the plugin path (§9):** the plugin gives you interactive `/slash-commands` inside a `claude` session (Claude-only). The npx path is a single-shot CLI that runs **without** Claude Code and works with Codex too — built for CI pipelines and non-Claude users. Exit codes make it gate-able in GitHub Actions.
|
|
271
273
|
|
|
@@ -526,7 +528,7 @@ Claude agents feature
|
|
|
526
528
|
| `harness-doctor` | Diagnoses harness structure (L1–L4) on the principle "a good harness gets simpler over time" | "check my Claude setup", "the harness feels complex", "too many skills" |
|
|
527
529
|
| `context-doctor` | Finds the 3 main causes of token waste + prescribes `.claudeignore` / `/clear` timing | "session is slow", "context is getting full", "clean up context" |
|
|
528
530
|
| `install-doctor` | Diagnoses conflicts/duplicates/overwrite risks before installing plugins into a project | "check the install", "verify my setup", "will this overwrite anything" |
|
|
529
|
-
| `mcp-circuit-breaker` *(commons)* | Detects MCP failure loops, trips a breaker to stop retry waste, proposes alternatives | "MCP keeps failing", "same tool error is looping" |
|
|
531
|
+
| `mcp-circuit-breaker` *(commons)* | Detects MCP failure loops, trips a breaker to stop retry waste, proposes alternatives. A success status with the wrong shape (an HTML page where JSON was expected) counts as a failure (`WRONG_SHAPE`) and does not close the breaker | "MCP keeps failing", "same tool error is looping" |
|
|
530
532
|
|
|
531
533
|
### Harvesting & learning — *"keep what we learned"*
|
|
532
534
|
|
|
@@ -552,6 +554,8 @@ Claude agents feature
|
|
|
552
554
|
> **Going public?** Don't run these one at a time — say **"publish"** / **"make this repo public"** and Claude
|
|
553
555
|
> fires the **Pre-Publish Surface Gate** (CLAUDE.md), which runs `public-surface-audit` + `marketplace-gate`
|
|
554
556
|
> Check 5 *before* the irreversible action. Portable checklist: `templates/PRE-PUBLISH-CHECKLIST.md`.
|
|
557
|
+
> Publishing a filtered copy (protected paths stripped, pushed to a second remote)? Its Step 0b checks that
|
|
558
|
+
> the stripped tree did not flow back into your own `main` — a tree diff shows it, commit counts do not.
|
|
555
559
|
|
|
556
560
|
### Discovery — *"what's out there?"*
|
|
557
561
|
|
|
@@ -567,7 +571,7 @@ Claude agents feature
|
|
|
567
571
|
|---|---|---|
|
|
568
572
|
| `sim-conductor` | Profiles a target → derives personas → parallel-agent audit → M/S/R triage. Areas: A external-user · B internal-audit · C ideation | "external user perspective", "run an internal audit", "simulate this" |
|
|
569
573
|
| `apex-review` | Reviews from a top-level decision-maker's lens, not a practitioner's | "will this hold up for leadership", "CTO-level review", "approval deck" |
|
|
570
|
-
| `deep-clarify` | Turns a vague request into an actionable spec through Socratic questioning | "I'm not sure what to build", "help me clarify the requirements" |
|
|
574
|
+
| `deep-clarify` | Turns a vague request into an actionable spec through Socratic questioning, saved to `specs/{slug}.md` in the work folder (not under `.claude/`, where Claude Code asks before writing) | "I'm not sure what to build", "help me clarify the requirements" |
|
|
571
575
|
|
|
572
576
|
### Setup & onboarding — *"get started / keep it tidy"*
|
|
573
577
|
|
package/README.ja.md
CHANGED
|
@@ -58,6 +58,10 @@ cd your-repo && npx --package @chrono-meta/fh-gate fh-gate # 現在のリポ
|
|
|
58
58
|
|
|
59
59
|
`git diff` から変更ファイルを見つけてレビューバックエンドに送り、判定(`FH_GATE_VERDICT: PASS | PENDING | BLOCKED | ESCALATE`)と終了コードを出力します。PASS はレビューが実際に走ったときだけ PASS と数えます。バックエンドが一度も応答しなかった場合、dry run、未知の終了コードは PASS ではなく、GitHub Actions のステップはデフォルトでこれらを失敗として扱います。Node ≥ 16 と、インストールしてログイン済みのバックエンド CLI がひとつ必要です。`claude`(デフォルト)または `codex`(`FH_BACKEND=codex`)です。CI、pre-commit フック、別のエージェントと併用できます。GitHub Actions のステップと Homebrew tap もあります — [ゲートを実行する](docs/REFERENCE.md#run-it-outside-claude-code--the-fh-gate-cli)を参照してください。
|
|
60
60
|
|
|
61
|
+
**1 回の実行で何が起き、何がかかるか。** 実行のたびに、変更ファイルをログイン済みのバックエンド CLI に送り、そこでレビューを 1 回呼び出します。そのアカウントの他の呼び出しと同じく課金・利用量に計上されます(`FH_BACKEND=cross` は最大 2 回、オプトインの層を有効にするとさらに増えます)。`FH_DRY_RUN=1` はプロンプトを出力するだけで何も呼び出しません(終了コード 12)。リポジトリのスクリプトをコピー上で実行するゲートの実行層(コピーであってサンドボックスではありません。信頼できない変更では使わないでください)は、`FH_GATE_EXEC=on` にしない限りオフです。既定のレビュー呼び出し自体は読み取りしかできません。`claude` には Read・Glob・Grep だけが渡され(シェル・書き込み・MCP サーバー・スキル・コマンドなし)、`codex` は `-s read-only` で動きます。`claude` では、レビュー対象のチェックアウトのプロジェクト設定・フック・`CLAUDE.md`・`.claude/rules` はその呼び出しで読み込まれません(`--setting-sources user` で動きます)。`codex` では、チェックアウトの `AGENTS.md` は送られず(`-c project_doc_max_bytes=0`)、あなたの codex の `config.toml` も読み込まれません(`--ignore-user-config`)。codex 0.164.0 で測ったところ、あなたの codex 設定が信頼済みとしているチェックアウトでも、その `.codex/config.toml` に書かれた MCP サーバーは起動しませんでした(そのチェックアウトのプロジェクトフックと `.rules` は測っていません)。`config.toml` のほかの設定(MCP サーバー、ログイン情報の保存方式、分析、テレメトリーなど)も、その呼び出しには適用されません。レビューが知らないうちに別の送り先へ行かないよう、fh-gate はまずそのファイルをテキストとして読みます。リクエストの送り先が書かれている場合(`openai` 以外の `model_provider`、`model_providers`、`openai_base_url`、`chatgpt_base_url`)はレビューを送らず、そのキー名を示して終了コード 10 で止まります。行末のコメントに書かれたものや、エスケープ(`\u`、`\U`、`\x`)で書かれたキーも数えます。ファイルを読み取れない場合も終了コード 10 で止まります。オプトインの `FH_REVIEWER=code-review` 呼び出しは読み取り専用ではありません(git の読み取りコマンドを使います)。信頼できる変更にだけ使ってください。また、まだ動作しません。ヘッドレスの `/code-review` は fh-gate が必要とする構造化された結果を返さないため(claude 2.1.330 で 0/11 — fh-gate 経由 0/5、直接 0/6)、現時点では `FH_REVIEWER=code-review` は常に終了コード 10 で止まります。
|
|
62
|
+
|
|
63
|
+
**CI ステップを失敗させる終了コード。** そのままステップとして実行すると(`npx … fh-gate`)、0 以外の終了コードはすべてステップを失敗させます。1 PENDING(B グレードの指摘 — 注意して進める)も失敗で、2 BLOCKED・3 ESCALATE・10 ハーネスエラー・11 引数エラー・12 dry run も同じです。GitHub Action は代わりに判定へ変換します。既定では BLOCKED・ESCALATE・HARNESS_ERROR・ARG_ERROR・DRY_RUN・不明なコードで失敗し、PENDING は通します(`fail-on` 入力で変更できます)。
|
|
64
|
+
|
|
61
65
|
**入口 ② — ハーネス全体を Claude Code の中で。**
|
|
62
66
|
|
|
63
67
|
```bash
|
package/README.ko.md
CHANGED
|
@@ -64,6 +64,28 @@ cd your-repo && npx --package @chrono-meta/fh-gate fh-gate # 현재 레포
|
|
|
64
64
|
백엔드 CLI 하나가 필요합니다. `claude`(기본) 또는 `codex`(`FH_BACKEND=codex`)입니다. CI, pre-commit 훅,
|
|
65
65
|
다른 에이전트 옆에서 쓰면 됩니다. GitHub Actions 스텝과 Homebrew tap 도 있습니다 — [게이트 실행하기](docs/REFERENCE.md#run-it-outside-claude-code--the-fh-gate-cli)를 보세요.
|
|
66
66
|
|
|
67
|
+
**한 번 돌리면 무엇이 일어나고 얼마가 드나.** 실행할 때마다 바뀐 파일을 로그인해 둔 백엔드 CLI 로 보내고, 그쪽에
|
|
68
|
+
리뷰 호출을 한 번 합니다. 그 계정의 다른 호출과 똑같이 과금되거나 사용량에 잡힙니다(`FH_BACKEND=cross` 는 최대 두 번,
|
|
69
|
+
선택 층을 켜면 더 늘어납니다). `FH_DRY_RUN=1` 은 프롬프트만 출력하고 아무것도 호출하지 않습니다(종료 코드 12).
|
|
70
|
+
레포의 스크립트를 사본에서 돌리는 게이트의 실행 층(사본일 뿐 격리 환경이 아닙니다 — 믿을 수 없는 변경에는 켜지 마세요)은 `FH_GATE_EXEC=on` 을 켜야만 켜집니다. 기본 리뷰 호출 자체는 읽기만
|
|
71
|
+
합니다. `claude` 는 Read · Glob · Grep 만 받고(셸 · 쓰기 · MCP 서버 · 스킬 · 명령 없음), `codex` 는 `-s read-only` 로
|
|
72
|
+
돕니다. `claude` 에서는 리뷰하는 체크아웃의 프로젝트 설정 · 훅 · `CLAUDE.md` · `.claude/rules` 가 그 호출에 로드되지
|
|
73
|
+
않습니다(`--setting-sources user` 로 돕니다). `codex` 에서는 체크아웃의 `AGENTS.md` 가 실리지 않고
|
|
74
|
+
(`-c project_doc_max_bytes=0`), 내 codex `config.toml` 도 로드되지 않습니다(`--ignore-user-config`). codex 0.164.0 에서 잰
|
|
75
|
+
결과, 내 codex 설정이 신뢰하는 체크아웃이라도 그 `.codex/config.toml` 에 적힌 MCP 서버가 뜨지 않았습니다(그 체크아웃의
|
|
76
|
+
프로젝트 훅 · `.rules` 는 재지 않았습니다). 내 `config.toml` 의 다른 설정(MCP 서버 · 로그인 저장 방식 · 분석 · 원격 측정 등)도
|
|
77
|
+
그 호출에는 적용되지 않습니다. 리뷰가 몰래 다른 곳으로 가지 않도록 fh-gate 는 먼저 그 파일을 텍스트로 읽습니다. 요청이 갈 곳이 적혀
|
|
78
|
+
있으면(`openai` 가 아닌 `model_provider` · `model_providers` · `openai_base_url` · `chatgpt_base_url`) 리뷰를 보내지 않고 그 키
|
|
79
|
+
이름과 함께 종료 코드 10 으로 멈춥니다. 줄 끝 주석에 적힌 것도, 이스케이프(`\u` · `\U` · `\x`)로 쓴 키도 셉니다. 파일을 읽을 수
|
|
80
|
+
없을 때도 종료 코드 10 으로 멈춥니다. 선택 호출 `FH_REVIEWER=code-review` 는 읽기 전용이 아닙니다(git 의 읽기 명령을 씁니다). 믿을 수 있는 변경에만 쓰세요.
|
|
81
|
+
그리고 아직 동작하지 않습니다. 헤드리스 `/code-review` 가 fh-gate 에 필요한 구조화된 결과를 돌려주지 않아서(claude 2.1.330 에서
|
|
82
|
+
0/11 — fh-gate 경유 0/5, 직접 0/6), 지금은 `FH_REVIEWER=code-review` 가 언제나 종료 코드 10 으로 멈춥니다.
|
|
83
|
+
|
|
84
|
+
**CI 스텝을 실패시키는 종료 코드.** 그냥 스텝으로 돌리면(`npx … fh-gate`) 0 이 아닌 종료 코드는 모두 스텝을 실패시킵니다.
|
|
85
|
+
1 PENDING(B 등급 지적 — 알고 진행)도 실패이고, 2 BLOCKED · 3 ESCALATE · 10 하네스 오류 · 11 인자 오류 · 12 dry run 도
|
|
86
|
+
마찬가지입니다. GitHub Action 은 대신 판정으로 바꿉니다. 기본값에서 BLOCKED · ESCALATE · HARNESS_ERROR · ARG_ERROR ·
|
|
87
|
+
DRY_RUN · 모르는 코드에서 실패하고 PENDING 은 통과시킵니다(`fail-on` 입력으로 바꿀 수 있습니다).
|
|
88
|
+
|
|
67
89
|
② 하네스 전체를 Claude Code 안에서.
|
|
68
90
|
|
|
69
91
|
```bash
|
package/README.md
CHANGED
|
@@ -66,6 +66,30 @@ It finds your changed files from `git diff`, sends them to a review backend, and
|
|
|
66
66
|
CLI installed and logged in: `claude` (default) or `codex` (`FH_BACKEND=codex`). Use it in CI, a pre-commit
|
|
67
67
|
hook, or beside another agent. A GitHub Actions step and a Homebrew tap exist too — see [Run the gate](docs/REFERENCE.md#run-it-outside-claude-code--the-fh-gate-cli).
|
|
68
68
|
|
|
69
|
+
**What a run costs and does.** Each run sends the changed files to the backend CLI you are logged in to and makes
|
|
70
|
+
one review call there, billed or counted against that account like any other call (`FH_BACKEND=cross` makes up to two, and the
|
|
71
|
+
opt-in layers add more). `FH_DRY_RUN=1` prints the prompt and calls nothing (exit 12). The gate's execution layer, which runs
|
|
72
|
+
your repository's own scripts in a copy (not a sandbox: never on untrusted changes), is off unless you set `FH_GATE_EXEC=on`. The default review call itself can only read:
|
|
73
|
+
on `claude` it gets Read, Glob and Grep and nothing else (no shell, no writes, no MCP server, no skill or command);
|
|
74
|
+
on `codex` it runs with `-s read-only`. On `claude`, the project settings, hooks, `CLAUDE.md` and `.claude/rules` of
|
|
75
|
+
the checkout under review are not loaded for that call (it runs with `--setting-sources user`). On `codex`, the
|
|
76
|
+
checkout's `AGENTS.md` is not sent (`-c project_doc_max_bytes=0`), and your codex `config.toml` is not loaded
|
|
77
|
+
(`--ignore-user-config`). Measured on codex 0.164.0: a checkout your codex config trusts then did not start the MCP
|
|
78
|
+
servers its `.codex/config.toml` declares (its project hooks and `.rules` were not measured). Nothing else in your
|
|
79
|
+
`config.toml` applies to the review call either, including its MCP servers, login-storage, analytics and telemetry
|
|
80
|
+
settings. So that the review is not silently sent somewhere else, fh-gate first reads that file as text. If it mentions
|
|
81
|
+
where requests go (`model_provider` other than `openai`, `model_providers`, `openai_base_url` or `chatgpt_base_url`),
|
|
82
|
+
it does not send the review: it exits 10 and names the key. Any mention counts, even in a trailing comment, and so
|
|
83
|
+
does an escaped key (`\u`, `\U`, `\x`). It also exits 10 if the file cannot be read. The opt-in `FH_REVIEWER=code-review` call is not read-only
|
|
84
|
+
(it keeps git's read commands); use it for trusted changes only. It also does not work yet: headless `/code-review`
|
|
85
|
+
does not return the structured object fh-gate needs (measured 0/11 on claude 2.1.330: 0/5 through fh-gate, 0/6
|
|
86
|
+
direct), so `FH_REVIEWER=code-review` currently always exits 10.
|
|
87
|
+
|
|
88
|
+
**Which exit codes fail a CI step.** Run as a plain step (`npx … fh-gate`), every non-zero exit fails it — including
|
|
89
|
+
1 PENDING (B-grade findings: proceed with care), as well as 2 BLOCKED, 3 ESCALATE, 10 harness error, 11 argument error
|
|
90
|
+
and 12 dry run. The GitHub Action maps them instead: by default it fails on BLOCKED, ESCALATE, HARNESS_ERROR,
|
|
91
|
+
ARG_ERROR, DRY_RUN and an unknown code, and lets PENDING pass (its `fail-on` input).
|
|
92
|
+
|
|
69
93
|
Door ② — the whole harness, inside Claude Code.
|
|
70
94
|
|
|
71
95
|
```bash
|
package/README.zh.md
CHANGED
|
@@ -58,6 +58,10 @@ cd your-repo && npx --package @chrono-meta/fh-gate fh-gate # 审查当前仓
|
|
|
58
58
|
|
|
59
59
|
它通过 `git diff` 找到你改动的文件,发给审查后端,并输出判定(`FH_GATE_VERDICT: PASS | PENDING | BLOCKED | ESCALATE`)和退出码。只有审查真的跑过,PASS 才算数:后端始终没有应答、dry run、或者出现未知退出码,都不是 PASS,而 GitHub Actions 步骤默认会因此失败。需要 Node ≥ 16,以及安装并登录好的一个后端 CLI:`claude`(默认)或 `codex`(`FH_BACKEND=codex`)。可用于 CI、pre-commit 钩子,或放在另一个 agent 旁边。也有 GitHub Actions 步骤和 Homebrew tap——见[运行门禁](docs/REFERENCE.md#run-it-outside-claude-code--the-fh-gate-cli)。
|
|
60
60
|
|
|
61
|
+
**跑一次会发生什么、花多少。** 每次运行都会把改动的文件发给你已登录的后端 CLI,并在那里调用一次审查,和该账号的其他调用一样计费或计入用量(`FH_BACKEND=cross` 最多两次,打开可选层会更多)。`FH_DRY_RUN=1` 只打印提示词,不调用任何东西(退出码 12)。门禁的执行层(在副本里运行你仓库自己的脚本;副本不是沙箱,不要用于不可信的改动)只有设置 `FH_GATE_EXEC=on` 才会打开。默认的审查调用本身只能读取:`claude` 只拿到 Read、Glob 和 Grep(没有 shell、写入、MCP 服务器、技能或命令),`codex` 以 `-s read-only` 运行。在 `claude` 上,被审查检出的项目设置、钩子、`CLAUDE.md` 和 `.claude/rules` 不会在这次调用中加载(以 `--setting-sources user` 运行)。在 `codex` 上,检出的 `AGENTS.md` 不会发送(`-c project_doc_max_bytes=0`),你自己的 codex `config.toml` 也不会加载(`--ignore-user-config`)。在 codex 0.164.0 上测得:即使你的 codex 配置信任这个检出,它的 `.codex/config.toml` 里声明的 MCP 服务器也没有启动(该检出的项目钩子和 `.rules` 没有测)。`config.toml` 里的其他设置(MCP 服务器、登录凭据存储方式、分析、遥测等)同样不适用于这次调用。为了不让审查悄悄发往别处,fh-gate 会先把这个文件当作文本读取:如果其中写明了请求的去向(不是 `openai` 的 `model_provider`、`model_providers`、`openai_base_url` 或 `chatgpt_base_url`),就不发送审查,而是给出那个键名并以退出码 10 停止。行尾注释里写的、用转义(`\u`、`\U`、`\x`)写的键也都算;文件无法读取时同样以退出码 10 停止。可选的 `FH_REVIEWER=code-review` 调用不是只读的(它会用 git 的读取命令),只用于可信的改动。而且它目前还不能用:无头模式下的 `/code-review` 不会返回 fh-gate 需要的结构化结果(在 claude 2.1.330 上 0/11——经 fh-gate 0/5,直接 0/6),所以 `FH_REVIEWER=code-review` 目前总是以退出码 10 停止。
|
|
62
|
+
|
|
63
|
+
**哪些退出码会让 CI 步骤失败。** 直接作为步骤运行(`npx … fh-gate`)时,任何非 0 退出码都会让步骤失败:1 PENDING(B 级发现——知情后继续)也算失败,2 BLOCKED、3 ESCALATE、10 门禁自身错误、11 参数错误、12 dry run 同样如此。GitHub Action 则会先换成判定:默认在 BLOCKED、ESCALATE、HARNESS_ERROR、ARG_ERROR、DRY_RUN 和未知退出码时失败,PENDING 放行(可通过 `fail-on` 输入修改)。
|
|
64
|
+
|
|
61
65
|
**门 ② —— 在 Claude Code 里使用整套框架。**
|
|
62
66
|
|
|
63
67
|
```bash
|
package/docs/codex-compat.md
CHANGED
|
@@ -33,10 +33,10 @@ irreversible surface. Source: [Codex sandboxing](https://learn.chatgpt.com/docs/
|
|
|
33
33
|
```bash
|
|
34
34
|
# headless, stdin — codex-cli >= 0.135.0
|
|
35
35
|
cat plugins/fh-meta/skills/<skill>/SKILL.md path/to/artifact \
|
|
36
|
-
| codex exec -
|
|
36
|
+
| codex exec -
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
- `codex exec
|
|
39
|
+
- `codex exec -` reads the combined prompt from stdin and runs headless. Add `-m <model>` only with a model your login accepts: codex 0.164.0 refuses `gpt-5.5` for a ChatGPT-account login, and with no `-m` it picks one from its own catalog.
|
|
40
40
|
- `npx @openai/codex` (interactive) requires a TTY and is **not** suitable for piped skill application.
|
|
41
41
|
- Inside a git repository (e.g. a clone of this repo) no extra flag is needed. **Outside** a git repo (e.g. running from `/tmp`), add `--skip-git-repo-check`.
|
|
42
42
|
- `codex exec` has its own file-read tools, so a skill that back-traces claims to source files (e.g. `phantom-quench`) can verify paths itself — it produced real `file:line` citations in validation.
|
|
@@ -63,7 +63,7 @@ Backend defaults:
|
|
|
63
63
|
| `FH_BACKEND` | Command | Default model |
|
|
64
64
|
|---|---|---|
|
|
65
65
|
| `claude` | `claude --print --model "$FH_MODEL"` | `claude-sonnet-5-5` |
|
|
66
|
-
| `codex` | `codex exec -m "$FH_MODEL" -` | `gpt-5.5` |
|
|
66
|
+
| `codex` | `codex exec [-m "$FH_MODEL"] -` | `fh-gate`: not pinned — no `-m` unless `FH_MODEL` is set, so codex picks from its own catalog (measured on one ChatGPT login; set `FH_MODEL` for a stable model). `fh-run` and `fh-goal` still default to `gpt-5.5`, which codex 0.164.0 refuses for a ChatGPT-account login — set `FH_MODEL` there |
|
|
67
67
|
| `auto` | `codex` if present, otherwise `claude` | backend default |
|
|
68
68
|
|
|
69
69
|
### `fh-run`
|
|
@@ -176,7 +176,7 @@ The sibling pattern for Gemini is `gemini -p "$(cat <skill+artifact>)"`. Outside
|
|
|
176
176
|
|
|
177
177
|
| Tier | Under Codex | Action |
|
|
178
178
|
|---|---|---|
|
|
179
|
-
| **M1** | Runs fully (`token-budget-gate`, `asset-placement-gate`, `phantom-quench`, `deep-clarify`, `convergence-loop`, `ko-tech-writer` (visual-QA degrades to text-only; the spoken register's Step 5-s renders audio through a shell TTS call — available here — but its **listening** pass is human in every runtime, so it degrades to declared-unmet, not to a Codex-specific gap)) | `cat SKILL.md artifact \| codex exec
|
|
179
|
+
| **M1** | Runs fully (`token-budget-gate`, `asset-placement-gate`, `phantom-quench`, `deep-clarify`, `convergence-loop`, `ko-tech-writer` (visual-QA degrades to text-only; the spoken register's Step 5-s renders audio through a shell TTS call — available here — but its **listening** pass is human in every runtime, so it degrades to declared-unmet, not to a Codex-specific gap)) | `cat SKILL.md artifact \| codex exec -` |
|
|
180
180
|
| **M2** | Core runs; agent/slash steps via adapter (`deliberation`, `steel-quench`, `harness-doctor`, `context-doctor`, `sim-conductor`, `harvest-loop`, `persona-cast` — its merge engine runs as is, the lens dispatch needs the adapter) | Use a permitted native agent, `fh-run`, or direct `codex exec` reading the spec; preserve dispatch constraints |
|
|
181
181
|
| **M3** | Does not run automatically | Use native Codex session features where available; otherwise read as methodology reference or use a dedicated adapter |
|
|
182
182
|
|
|
@@ -209,10 +209,10 @@ Direct headless fallback:
|
|
|
209
209
|
|
|
210
210
|
```bash
|
|
211
211
|
cat plugins/fh-meta/skills/steel-quench/SKILL.md path/to/artifact.md \
|
|
212
|
-
| codex exec -
|
|
212
|
+
| codex exec -
|
|
213
213
|
```
|
|
214
214
|
|
|
215
|
-
`codex exec
|
|
215
|
+
`codex exec -` reads stdin headlessly (add `-m <model>` only with one your login accepts — codex 0.164.0 refuses `gpt-5.5` for a ChatGPT-account login). Interactive `npx @openai/codex` requires a TTY and
|
|
216
216
|
is not the headless substitute.
|
|
217
217
|
|
|
218
218
|
## §Compatibility-tiers
|
|
@@ -25,6 +25,7 @@ Each row carries Korean phrasings too, so a Korean request can match a row by it
|
|
|
25
25
|
| context nearly full, keep working · «컨텍스트 거의 찼어», «압축하고 계속» | `/compact [focus]` (summarise to free space) | **before** compacting: write down what must survive (completion log, card, memory) — compaction loses what was only in the conversation |
|
|
26
26
|
| a side question that should not pollute this context · «잠깐 딴 질문», «곁가지로 하나만» | `/btw [question]` | — |
|
|
27
27
|
| "check my install / setup", CLAUDE.md problems · «설치 점검», «설정 확인해줘» | `/doctor` (bundled skill; installation, settings, extensions, CLAUDE.md; `prompt-audit`) | `/install-doctor` — FH plugin conflicts and overwrite risk · `/harness-doctor` — harness structure, drift, broken references. 🟥 Name clash: built-in `/doctor` ≠ `/harness-doctor` |
|
|
28
|
+
| stale, broken or contradicting instructions in CLAUDE.md, rules, skills · «지침 낡은 데 찾아줘», «규칙끼리 부딪히는 데 있나» | `/doctor prompt-audit [path]` (verified 2026-11-22, memory docs «Audit your instruction files»: text written for older models, references to files or commands that do not exist, files that contradict each other; covers CLAUDE.md · CLAUDE.local.md · AGENTS.md and `.claude/` + `~/.claude/` rules, skills, commands, subagents, output styles; report and proposed edits only, changes nothing until asked; Claude Code ≥ 2.1.283; runs through the bundled `/claude-api` skill, so it is gone when that skill is disabled) | `/harness-doctor --lint` — FH's own vocabulary checks and broken pointers · `/prompt-regression` — whether a change still says what each probe expects. The audit proposes; an FH-asset edit it suggests still goes through the 4-axis gate |
|
|
28
29
|
| cost / plan limits / "how much did this use" · «얼마나 썼어», «한도 얼마 남았어» | `/usage` (aliases `/cost`, `/stats`) | `/token-budget-gate` — *estimates before* an expensive run; it consumes `/usage` output as the actual |
|
|
29
30
|
| "how have I been using this", usage patterns · «내가 어떻게 쓰고 있나» | `/insights` (HTML report over recent local sessions; not in cloud sessions) | its findings are input for the UAP and the weekly audit — FH does not rebuild this report |
|
|
30
31
|
| review a diff for bugs · «이번 변경에 버그 있는지 봐줘», «코드 리뷰» | `/code-review [--comment]` (bundled; `ultra` = cloud deep review) | `/harness-pr-reviewer` for FH-asset coherence. 🟥 `--fix` writes to the tree — author use only; a sidecar reviewer never uses it (§Runtime Authority) |
|
|
@@ -33,6 +34,7 @@ Each row carries Korean phrasings too, so a Korean request can match a row by it
|
|
|
33
34
|
| undo the last edits / go back in the conversation · «편집 되돌려», «아까로 돌아가» | `/rewind` (aliases `/checkpoint`, `/undo`) — restores **checkpoint-tracked** edits only | 🟥 files changed by Bash commands and most subagent edits are not restored; nothing outside the session (pushed commits, remote branches) is. Check `git status` after a rewind; the Destructive-Op gate still governs remote state |
|
|
34
35
|
| keep working until a condition holds · «될 때까지 계속» | `/goal [condition]` | **before** starting: `/goal-quench`'s budget gate for an expensive run; verification after |
|
|
35
36
|
| repeat / watch on an interval · «N분마다 확인», «계속 지켜봐» | `/loop [interval] [prompt]` | pair with the WATCH list |
|
|
37
|
+
| split a large job across coordinated sessions that keep running · «큰 일을 스레드로 나눠 돌려줘», «노트북 닫아도 계속» | **Projects** (verified 2026-11-22, `claude-projects` docs: **public beta** on Pro, Max and Ultra, rolling out gradually, not on Team or Enterprise yet — a long-running project conversation where Claude coordinates and starts one thread per task, usually a cloud session, optionally on your own machine via Remote Control; separate coordinator and thread model/effort settings, default Opus) · locally: **agent teams** (experimental, off by default, `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`; a lead plus peer teammates with a shared task list) · **agent view** (`claude agents`, research preview; you dispatch each session yourself, each in its own worktree) | FH does not rebuild the coordinator. What stays FH's: independent verification (a thread checking another thread is the same family and often the same author's brief — `auto-decorrelation` and blind sims still own that axis), lease records for what was approved, and the irreversible gates (publish · delete · history rewrite) on whatever a thread produces. 🟥 Cloud threads leave this machine: company repos and company data stay out (company residency) |
|
|
36
38
|
| try another direction without losing this one · «이건 두고 다른 방향도» | `/branch [name]` (conversation branch; back via `/resume`). 🟥 Not a git branch | git branches still follow §PR Direction and the branch-claim steps |
|
|
37
39
|
| hand a copy of this conversation to a background session · «이 대화를 복사해서 별도 세션에서 백그라운드로» | `/fork [prompt]` (by default the copy is told to create its own worktree before editing) | 🟥 isolation is **conditional**: with `worktree.bgIsolation: "none"`, outside git, or with agent view off, the copy edits the same checkout. Check the copy's actual working directory. If it is a worktree: no FH-asset commits from it, reclaim gitignored output before removing it |
|
|
38
40
|
| free the terminal, let this session run on · «이 세션을 백그라운드로 돌려줘», «터미널 비워줘» | `/background` (`/bg`, CLI `--bg`; watch with `claude agents`) | close-protocol Agent-View pre-read applies |
|
|
@@ -60,11 +62,12 @@ video claims but that session could not see are listed under the table, not in i
|
|
|
60
62
|
|
|
61
63
|
**Claimed by the video, not visible to that session — UNVERIFIED, do not route to them as fact:**
|
|
62
64
|
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) ·
|
|
64
|
-
with a coordinator thread and shared memory that keep running with the laptop closed · «Motion» export
|
|
65
|
+
same family, not a cross-family check — `auto-decorrelation` still owns that axis) · «Motion» export
|
|
65
66
|
to MP4 · a session-rail context card with per-category usage. (`/btw` opening as a side tab via a
|
|
66
67
|
keyboard shortcut, and nested sessions, are also described by third-party write-ups of the 2026-10-14
|
|
67
68
|
desktop update; a web search the same day found no source at all for the advisor.)
|
|
69
|
+
«Projects» left this list on 2026-11-22: the official docs describe it (public beta — see the routing row). Its shared
|
|
70
|
+
memory across threads was not checked against the docs and is not claimed here.
|
|
68
71
|
|
|
69
72
|
### Desktop surfaces exercised — 2026-11-02 (one Code-tab session, CC 2.1.316, auto mode unless noted)
|
|
70
73
|
|
|
@@ -750,7 +750,11 @@ force-push, scrub of tracked history, bulk deletion of session records / tracks
|
|
|
750
750
|
2026-08-20, residency-ledger pass): `bash templates/predelete_check.sh <repo> [base]` — per branch: commits
|
|
751
751
|
off base + unique paths. Verdicts: SAFE (fully merged) · CHECK (0 unique paths but commits off
|
|
752
752
|
base — shared files may hold *newer* content, e.g. an unmerged session card) · REVIEW (unique
|
|
753
|
-
paths — recovery mandatory).
|
|
753
|
+
paths — recovery mandatory). The script lists what would be *lost*; it cannot tell who is *using*
|
|
754
|
+
the target, so also ask in words, before step 2: **is anything else using this target right now
|
|
755
|
+
(another session or worktree, a live site, a shared database or config)?** SAFE says «merged», not
|
|
756
|
+
«idle». Judgment question — answer it by looking (`git worktree list`, `ps`/`lsof` on the path,
|
|
757
|
+
the sibling session), not by recalling.
|
|
754
758
|
2. **Recover (judged — depth-sensitive)**: every CHECK/REVIEW item gets a content-direction look;
|
|
755
759
|
live un-integrated state (cards · handoffs · signals · session records) is integrated to main
|
|
756
760
|
**before** anything is deleted. This step exists because the loss class is silent — run it at the
|
|
@@ -484,6 +484,21 @@ the marker, which is not this hook's job.
|
|
|
484
484
|
> controls). Extending the format means adding lanes there, and running the **revert probe** — a
|
|
485
485
|
> lane that stays green when you disable the branch it claims to anchor is decoration.
|
|
486
486
|
|
|
487
|
+
**Gate-repair fixture provenance (record only, new records from 2026-11-22)** — a refinement of the
|
|
488
|
+
existing fail-before practice, not a new instrument: when the change repairs a gate or a lane (a fix
|
|
489
|
+
to a check that let a known input through), at least one fail-before fixture is built from the
|
|
490
|
+
**change record** — the fix commit message, or the issue / review-finding body that reported the
|
|
491
|
+
escape — not only from the author's own idea of the boundary. Its source goes on the first
|
|
492
|
+
`controls:` line, after the alive/dead/n/a token and never in place of it (the hook reads only that
|
|
493
|
+
line and only looks for the liveness token, so a bare sha could carry `dead` by accident), as
|
|
494
|
+
`input-from=<commit sha | issue # | finding id>`, or `input-from=none(self-found)` when no record
|
|
495
|
+
exists — never an invented id. There is no new marker key and the hook does not check it (the
|
|
496
|
+
operator and cross-family review read it). Why: an author's own fixtures sit where the
|
|
497
|
+
author already looked; the change record is where the escape was actually seen. Limit: a lane that
|
|
498
|
+
passes this input has passed **one boundary input** — it is not coverage, and «the gate is safe» is
|
|
499
|
+
never the sentence it supports. Source candidate: self-dev absorption row AQ-20261108-2 (a frontier
|
|
500
|
+
digest item; the cited paper was not read for this change, so no number from it is carried here).
|
|
501
|
+
|
|
487
502
|
### Reviewer-visible evidence — the marker is not readable from the other side
|
|
488
503
|
|
|
489
504
|
**Rule**: a PR touching FH assets carries a **sanitized evidence capsule** in its body — what was
|
|
@@ -292,6 +292,7 @@ priority: high|medium|low
|
|
|
292
292
|
## Session Retrospective ← 마감 회고로 생성된 신호만. 상한 8줄. 이벤트 신호는 이 절 없음
|
|
293
293
|
- 정정: {운영자가 나를 정정한 건수} — 각 한 줄, 무엇을 어떻게 틀렸나
|
|
294
294
|
- 자력 {N} / 타력 {M} — 타력은 **잡은 축 이름**으로 (레인 · 되돌림 · cross-family · 첫실사용 · ⓓ · 운영자 · CI)
|
|
295
|
+
- 막지 못한 통제: {그 결함이 지나간 게이트 · 레인 · 훅 이름, 또는 「그 자리에 통제 없음」} — 잡은 축과 따로 적는다. 같은 이름이 쌓이면 «어느 통제가 반복해서 새는가» 가 보인다
|
|
295
296
|
- 안 돌린 축: {이름, 또는 「없음」}
|
|
296
297
|
- 반복: {이번이 N번째인 실수 — memory 키 또는 「신규」}
|
|
297
298
|
|
|
@@ -49,7 +49,7 @@ Caller reads verdict, decides: merge / hold / escalate
|
|
|
49
49
|
| `FH_TASK_DESCRIPTION` | string | What the caller was trying to accomplish (context for adversarial pass) |
|
|
50
50
|
| `FH_SECURITY_LENS` | `on` or `off` (default `off`) | Force security-adjacent focus in steel-quench |
|
|
51
51
|
| `FH_BACKEND` | `claude`, `codex`, or `auto` (default `claude`) | Runtime backend. `auto` prefers Codex if installed, otherwise Claude |
|
|
52
|
-
| `FH_MODEL` | model id | Overrides backend default (`claude-sonnet-5-5` for Claude, `gpt-5.5`
|
|
52
|
+
| `FH_MODEL` | model id | Overrides backend default (`claude-sonnet-5-5` for Claude). Codex in `fh-gate`: none pinned — with `FH_MODEL` unset no `-m` is passed and the record says `codex default (not pinned, resolved review <model or unknown>)` (one entry per pass, e.g. `, elephant <model>`). `fh-run` / `fh-goal` still default to `gpt-5.5` |
|
|
53
53
|
|
|
54
54
|
### Capture pattern (caller's responsibility)
|
|
55
55
|
|
|
@@ -297,7 +297,7 @@ Every binary governance pass writes a compact record entry for calibration and a
|
|
|
297
297
|
- timestamp: 2026-05-31T12:00:00Z
|
|
298
298
|
caller: opencode
|
|
299
299
|
backend: codex
|
|
300
|
-
model: gpt-
|
|
300
|
+
model: codex default (not pinned, resolved review gpt-6.1-terra)
|
|
301
301
|
gate_level: quick
|
|
302
302
|
verdict: BLOCKED
|
|
303
303
|
findings_total: 3
|
|
@@ -5722,3 +5722,17 @@
|
|
|
5722
5722
|
purpose: blind grading of the Gemini 3.8 Flash arm on the same 12 public FH defect pairs (sheet B, 24 arm items + 24 planted controls, reviewer identity hidden, reads one local file only)
|
|
5723
5723
|
output: done — controls 24/24 correct (12 HIT, 12 MISS); Flash arm 2/24 HIT on pre-fix excerpts (P05 both reps)
|
|
5724
5724
|
lease: operator 2026-11-20 «지금돌려» (Hydrogen vs 3.8 Flash comparison)
|
|
5725
|
+
- date: 2026-11-22
|
|
5726
|
+
session: selfdev loop (unattended)
|
|
5727
|
+
agent: fh-commons:quench-challenger
|
|
5728
|
+
model: opus (inherited)
|
|
5729
|
+
purpose: Axis-2 adversarial read of the AQ-20261108-2 gate-rule change (thin + detail text, plus the pre-commit controls check)
|
|
5730
|
+
output: done — S0 A2 B2, all four fixed (repair undefined · no-record case · hook reads first controls line only · bare sha can match the liveness substring); hook claim verified at templates/.git-hooks/pre-commit:2544 → PR #1180
|
|
5731
|
+
lease: selfdev loop standing instruction (operator 2026-11-11, candidate rows)
|
|
5732
|
+
- date: 2026-11-22
|
|
5733
|
+
session: selfdev loop (unattended)
|
|
5734
|
+
agent: general-purpose
|
|
5735
|
+
model: sonnet
|
|
5736
|
+
purpose: soul-line restatement (1) and blind firing sims reading only a copy of the rule file — arm 4 (new rule), control 1 (main rule)
|
|
5737
|
+
output: done — soul both RESTATABLE; arm 4/4 wrote input-from on the first controls line, control 0/1 → PR #1180
|
|
5738
|
+
lease: selfdev loop standing instruction (operator 2026-11-11, candidate rows)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chrono-meta/fh-gate",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.47.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": {
|
|
@@ -187,6 +187,8 @@
|
|
|
187
187
|
"scripts/absorption_queue.py",
|
|
188
188
|
"scripts/test_absorption_queue_lanes.sh",
|
|
189
189
|
"scripts/test_meta_prompt_restate_lanes.sh",
|
|
190
|
+
"scripts/test_deep_clarify_spec_path_lanes.sh",
|
|
191
|
+
"scripts/test_deep_clarify_interview_lanes.sh",
|
|
190
192
|
"scripts/catch_tally.py",
|
|
191
193
|
"scripts/test_catch_tally_lanes.sh",
|
|
192
194
|
"scripts/test_name_boundary_locale_lanes.sh",
|
|
@@ -40,7 +40,7 @@ HALF-OPEN → Recovery probe (1 test call allowed, resets if success)
|
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
Default thresholds:
|
|
43
|
-
- **Trip threshold**: 3 consecutive failures of the same tool
|
|
43
|
+
- **Trip threshold**: 3 consecutive failures of the same tool for transient types (`TIMEOUT`, `RATE_LIMIT`, and `MALFORMED` / `UNKNOWN` until known); **1** for the non-transient types (`ADMIN_GATED`, `AUTH`, `NOT_FOUND`, `WRONG_SHAPE`) — see Step 2
|
|
44
44
|
- **Half-open probe**: after 60s cooldown (or explicit user command)
|
|
45
45
|
- **Reset**: 1 successful call in HALF-OPEN state → back to CLOSED
|
|
46
46
|
|
|
@@ -75,11 +75,14 @@ Classify failure type:
|
|
|
75
75
|
| `AUTH` | 401 / 403 response | Credentials expired or missing |
|
|
76
76
|
| `NOT_FOUND` | 404 / tool not available | Server down / tool removed |
|
|
77
77
|
| `MALFORMED` | Parse error on response | Schema mismatch / API change |
|
|
78
|
+
| `WRONG_SHAPE` | No error and a success status (e.g. HTTP 200), but the answer is not the expected shape — an HTML page where JSON was expected, or an expected field missing | Wrong host or path (a field run: a webhook path called on the API host returned 200 with a generic HTML page, so the call «succeeded» and did nothing) — retrying the same endpoint will not fix it |
|
|
78
79
|
| `RATE_LIMIT` | 429 / quota exceeded | Too many calls |
|
|
79
80
|
| `ADMIN_GATED` | "instance admin approval required" / server pending org enablement / tool unavailable until approved | Capability exists; the **MCP mount** is gated behind instance/admin permission — not a transport failure. Retrying never recovers it (an admin must act) |
|
|
80
81
|
|
|
81
82
|
If failure type cannot be determined: classify as `UNKNOWN`.
|
|
82
83
|
|
|
84
|
+
`MALFORMED` vs `WRONG_SHAPE`: the answer could not be parsed at all → `MALFORMED`; it parsed (or arrived as a page) but is not what the caller needs → `WRONG_SHAPE`.
|
|
85
|
+
|
|
83
86
|
> **`ADMIN_GATED` is not a retry case.** Distinguish *capability unavailable* from *MCP transport
|
|
84
87
|
> unavailable*: when the block is an org/admin approval dependency, do not burn retries — route straight
|
|
85
88
|
> to the lower-permission substitute in Step 4 (Priority 1b).
|
|
@@ -92,12 +95,13 @@ Count consecutive failures of the identified tool in the current session context
|
|
|
92
95
|
|
|
93
96
|
| Count | Action |
|
|
94
97
|
|---|---|
|
|
95
|
-
| 1 |
|
|
96
|
-
| 2 |
|
|
98
|
+
| 1 | Transient type: log warning and continue — *"MCP tool {name} failed once. Monitoring."* Non-transient type (see below): **TRIP CIRCUIT** now |
|
|
99
|
+
| 2 | Transient type: escalate warning. Suggest checking server status. |
|
|
97
100
|
| 3+ | **TRIP CIRCUIT** → output circuit open notice, block further calls to this tool |
|
|
98
101
|
|
|
99
|
-
> **Non-transient types trip at count 1, not 3.** `ADMIN_GATED`, `AUTH`, and `
|
|
100
|
-
> on retry (an admin must act / credentials must change / the tool is gone
|
|
102
|
+
> **Non-transient types trip at count 1, not 3.** `ADMIN_GATED`, `AUTH`, `NOT_FOUND` and `WRONG_SHAPE` do not
|
|
103
|
+
> recover on retry (an admin must act / credentials must change / the tool is gone / the host or path is wrong,
|
|
104
|
+
> so the same call keeps getting the same wrong answer), so counting to 3 only wastes
|
|
101
105
|
> calls. On the first failure of one of these types, trip immediately and go to Step 4. The 1→2→3 ramp is
|
|
102
106
|
> for *transient* types (`TIMEOUT`, `RATE_LIMIT`) where a later call may succeed.
|
|
103
107
|
|
|
@@ -127,6 +131,7 @@ cat >> .claude/mcp_circuit/circuit_log.yaml << EOF
|
|
|
127
131
|
state: OPEN # OPEN | HALF-OPEN | CLOSED — same enum as Done When
|
|
128
132
|
failure_type: {TYPE}
|
|
129
133
|
failure_count: {N}
|
|
134
|
+
expected_shape: {content type + the field the caller needs — WRONG_SHAPE only; the Step 5 probe checks against it}
|
|
130
135
|
tripped_at: {ISO-8601}
|
|
131
136
|
reset_at: null
|
|
132
137
|
EOF
|
|
@@ -141,6 +146,7 @@ Present the relevant fallback options ranked by effort (at least 3):
|
|
|
141
146
|
| Priority | Alternative | When to Use |
|
|
142
147
|
|---|---|---|
|
|
143
148
|
| **1 — Substitute tool** | Use a different MCP tool or built-in tool that covers the same task | Tool-specific failure (NOT_FOUND, AUTH) |
|
|
149
|
+
| **1a — Fix the endpoint** | Check the configured host and path against the service's documentation (an API host and a webhook host are often different), correct it, then let the Step 5 probe confirm the expected shape | `WRONG_SHAPE` |
|
|
144
150
|
| **1b — Lower-permission API / workflow substitute** | The MCP mount is gated, but the underlying capability is usually still reachable through a member-scoped path: a Personal-Access-Token REST API call, or a workflow-automation runner. Before relying on it, confirm **credential scope** (a member-level token suffices?), **audit parity** (logged where the MCP path would log?), and **behavior gap** (what the MCP path does that this does not — e.g. natural-language workflow creation vs hand-written JSON). | `ADMIN_GATED` |
|
|
145
151
|
| **2 — Degrade gracefully** | Skip the MCP step, note the gap, continue with available information | TIMEOUT / RATE_LIMIT |
|
|
146
152
|
| **3 — Pause and retry** | Wait for server recovery (HALF-OPEN probe after cooldown) | Transient failure (TIMEOUT, RATE_LIMIT) |
|
|
@@ -179,7 +185,7 @@ Sending HALF-OPEN probe to {tool-name}...
|
|
|
179
185
|
```
|
|
180
186
|
|
|
181
187
|
- 1 minimal test call is allowed through
|
|
182
|
-
- If success: circuit → CLOSED, log updated
|
|
188
|
+
- If success: circuit → CLOSED, log updated. **Success = the answer has the expected shape** (the content type and at least one field the caller needs), not a success status alone — a 200 with an HTML page or without that field is `WRONG_SHAPE`, and the circuit stays OPEN
|
|
183
189
|
- If fail: circuit remains OPEN, cooldown resets
|
|
184
190
|
|
|
185
191
|
Reset log entry — **append as a NEW list item (`- tool:`), never as bare indented keys**:
|