@chrono-meta/fh-gate 3.26.1 → 3.27.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-plugin/marketplace.json +4 -4
- package/AGENTS.md +2 -1
- package/CLAUDE.md +84 -1329
- package/knowledge/shared/dialogue/memory_intent_recall.md +35 -0
- package/knowledge/shared/harness-core/builtin_capability_map.md +70 -0
- package/knowledge/shared/harness-core/claude_md_full_reference.md +1277 -0
- package/knowledge/shared/harness-core/multi_model_sidecar_strategy.md +64 -0
- package/knowledge/shared/learnings/subagent_invocations_log.yaml +64 -0
- package/package.json +5 -1
- package/plugins/fh-commons/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-meta/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-meta/CHANGELOG.md +20 -0
- package/plugins/fh-meta/skills/context-doctor/SKILL.md +1 -1
- package/plugins/fh-meta/skills/install-doctor/SKILL.md +1 -1
- package/plugins/fh-preprep/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-qp/.claude-plugin/plugin.json +1 -1
- package/scripts/capability_effect_probe.sh +98 -23
- package/scripts/fh_env_delta_scan.sh +20 -4
- package/scripts/memory_gc_report.py +270 -0
- package/scripts/selfcheck.sh +27 -0
- package/scripts/test_env_delta_worktree_lanes.sh +61 -0
- package/scripts/test_memory_gc_report_lanes.sh +210 -0
- package/scripts/test_regression_guard_sibling_lanes.sh +193 -0
- package/templates/regression_guard.sh +30 -12
|
@@ -173,6 +173,41 @@ guard's **explicit, goal-justified opt-out**. (Operator observation, 2026-06-14:
|
|
|
173
173
|
are the graceful fallback. A hook-enforced semantic recall is a future candidate, deliberately not
|
|
174
174
|
built today (keep the surface thin).
|
|
175
175
|
|
|
176
|
+
## Lifecycle — which entries stay above the index cap (recurrence age, not recency)
|
|
177
|
+
|
|
178
|
+
The index is a **capped overview**: the loader reads about 25,000 characters of `MEMORY.md` and drops
|
|
179
|
+
the rest without warning, so the ordering rule decides which entries a new session ever sees. Ordering
|
|
180
|
+
by recency pushes long-confirmed feedback below the cut. The lifecycle model (generational GC applied to
|
|
181
|
+
agent rules — imweb tech, 2026-10-06) ranks by **age instead: age rises only when the same observation
|
|
182
|
+
is recorded again.**
|
|
183
|
+
|
|
184
|
+
- **Record recurrence, do not re-create.** When a mistake a memory already covers happens again, append
|
|
185
|
+
one dated line to that file's frontmatter instead of writing a near-duplicate file:
|
|
186
|
+
```yaml
|
|
187
|
+
metadata:
|
|
188
|
+
type: feedback
|
|
189
|
+
hits:
|
|
190
|
+
- 2026-10-15 | live-lane windows covered the operator's screen
|
|
191
|
+
- 2026-10-16 | same class, a different lane
|
|
192
|
+
```
|
|
193
|
+
The first line is the founding incident. A recurrence stated only in prose ("하루 3회") is invisible
|
|
194
|
+
to any ranking.
|
|
195
|
+
- **States.** age 1 and recent = new · age ≥ 2 = recurred · age ≥ 3 across ≥ 2 distinct days =
|
|
196
|
+
**promotion candidate** (to a rule, a hook or a lint — same-day repeats count once, they may be one
|
|
197
|
+
session's circumstances; promotion is proposed, a human approves) · a non-user entry at age 1 with no
|
|
198
|
+
recurrence for 30 days or more = **cold**: drop it from the index, keep the file. User entries never go cold.
|
|
199
|
+
- **Never delete for lack of recurrence.** A rule that is followed well also stops recurring; the
|
|
200
|
+
record cannot tell "obsolete" from "working". And **no `hits` is UNMEASURED, not age 1** — an entry
|
|
201
|
+
nobody has recorded a date for is never called cold.
|
|
202
|
+
- **Before adding an entry at all:** a fact the agent can find another way (reading code, running a
|
|
203
|
+
command, a test, a hook message) does not belong in memory — route it to that mechanism. Memory keeps
|
|
204
|
+
judgment.
|
|
205
|
+
- **Instrument:** `python3 scripts/memory_gc_report.py <memory_dir>` — read-only. It prints index
|
|
206
|
+
hygiene (unlisted files, duplicate lines, dangling local links), the line where the loader cap cuts, age per
|
|
207
|
+
entry (and every malformed, unreadable or future-dated record as an error — never as "no hits"), cold and promotion candidates, and a proposed order (user entries first, then measured entries
|
|
208
|
+
by age, then the rest in place). It changes nothing; reordering the index and promoting are separate,
|
|
209
|
+
approved steps. Lanes: `scripts/test_memory_gc_report_lanes.sh`.
|
|
210
|
+
|
|
176
211
|
## Check class
|
|
177
212
|
|
|
178
213
|
**Judged** — recall relevance and divergent-traversal are LLM-judge calls, paired (no judge-only path)
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Built-in Capability Map — Claude Code features to reach for BEFORE an FH skill
|
|
2
|
+
|
|
3
|
+
> **Why this exists.** FH's no-reinvention rule says a platform built-in that covers the need outranks
|
|
4
|
+
> an FH skill (Tier 0 before Tier 1 before net-new). That rule only fires if the session *knows* the
|
|
5
|
+
> built-in exists. A feature that is not on any routing surface gets used only when the model happens
|
|
6
|
+
> to remember it — muscle, not skeleton — so a Sonnet session or another person's install silently
|
|
7
|
+
> skips it. This map is the routing surface. It is a lookup table, not doctrine: keep it current with
|
|
8
|
+
> the platform, and route to it from `CLAUDE.md` §Autonomous Initiative Layer.
|
|
9
|
+
>
|
|
10
|
+
> **Verified 2026-10-15** against the official command reference (`code.claude.com/docs` — commands,
|
|
11
|
+
> skills, model-config pages) and a local `claude --version` = 2.1.300 / `claude --help`. Trigger: an
|
|
12
|
+
> external cheat sheet (Claude Code Cheat Sheet v2, 2026-10-15) listed 51 items; 13 had no FH route.
|
|
13
|
+
> **Re-verify when the CLI version changes** — names and flags churn (`multi_model_sidecar_strategy.md`
|
|
14
|
+
> §Binary names churn).
|
|
15
|
+
|
|
16
|
+
## Routing table — intent → preferred built-in (after its prerequisites) → what FH adds
|
|
17
|
+
|
|
18
|
+
Each row carries Korean phrasings too, so a Korean request can match a row by its words. Measured on the `/simplify` row (floor tier, Sonnet, 3 runs, isolated clone with a real duplicate in the diff): 0/3 before and 0/3 after adding «단순하게 정리» — in every run the session simplified the code itself instead of naming `/simplify`. Simplifying directly may well satisfy the request, but these runs only show that the added phrase did not change routing. The Korean phrasings are kept as unvalidated intent examples.
|
|
19
|
+
|
|
20
|
+
"Built-in first" means *prefer the built-in over rebuilding it*, not *run it before its prerequisites*: where a row names a step that must happen first, that step comes first.
|
|
21
|
+
|
|
22
|
+
| User intent / situation | Preferred built-in | FH on top / prerequisite |
|
|
23
|
+
|---|---|---|
|
|
24
|
+
| "how full is my context", "why so slow", token pressure · «컨텍스트 얼마나 찼어», «왜 이렇게 느려» | `/context` (usage grid + heavy-tool / memory-bloat hints; `/context all` itemises) | `/context-doctor` — writes `.claudeignore`, routes CLI output through a trimming proxy, audits hub CLAUDE.md / MEMORY.md bloat on a cadence |
|
|
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
|
+
| a side question that should not pollute this context · «잠깐 딴 질문», «곁가지로 하나만» | `/btw [question]` | — |
|
|
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
|
+
| 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
|
+
| "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
|
+
| 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) |
|
|
31
|
+
| simplify / de-duplicate changed code · «단순하게 정리», «중복 줄여줘», «바꾼 코드 깔끔하게» | `/simplify [target]` (bundled; 4 parallel agents; not a bug hunt). 🟥 **It applies fixes to the tree** | author use only — never as a read-only review lane or a sidecar (§Runtime Authority: a sidecar does not write). The 4-axis gate verifies afterwards |
|
|
32
|
+
| see what changed · «뭐 바뀌었어» | `/diff` | — |
|
|
33
|
+
| 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
|
+
| keep working until a condition holds · «될 때까지 계속» | `/goal [condition]` | **before** starting: `/goal-quench`'s budget gate for an expensive run; verification after |
|
|
35
|
+
| repeat / watch on an interval · «N분마다 확인», «계속 지켜봐» | `/loop [interval] [prompt]` | pair with the WATCH list |
|
|
36
|
+
| 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
|
+
| 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
|
+
| free the terminal, let this session run on · «이 세션을 백그라운드로 돌려줘», «터미널 비워줘» | `/background` (`/bg`, CLI `--bg`; watch with `claude agents`) | close-protocol Agent-View pre-read applies |
|
|
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
|
+
| faster output · «추가 비용이 들어도 빠른 출력 모드로» | `/fast` (extra cost; limited under `-p`) | — |
|
|
41
|
+
|
|
42
|
+
## Skill frontmatter `context: fork` — what it is NOT
|
|
43
|
+
|
|
44
|
+
`context: fork` runs a skill body as a prompt in a new subagent (general-purpose unless `agent:` says
|
|
45
|
+
otherwise), without the conversation history. **It does not isolate the subagent from the project
|
|
46
|
+
`CLAUDE.md`.** Measured 2026-10-15 in a folder outside this repo, Sonnet, 3 runs per arm, with a
|
|
47
|
+
canary string placed only in the project `CLAUDE.md`:
|
|
48
|
+
|
|
49
|
+
| Arm | Setup | Answer |
|
|
50
|
+
|---|---|---|
|
|
51
|
+
| F | `context: fork` + CLAUDE.md | canary 3/3 |
|
|
52
|
+
| control A | no fork + CLAUDE.md | canary 3/3 |
|
|
53
|
+
| control B | no CLAUDE.md | NONE 3/3 |
|
|
54
|
+
|
|
55
|
+
The canary came from the forked subagent itself (its task prompt did not contain it; the final message
|
|
56
|
+
was the relayed subagent output). So a blind evaluation still needs a clone outside the repo run
|
|
57
|
+
headless (`scripts/sim_isolated_run.sh`), exactly as before. Not measured: the docs' claim that
|
|
58
|
+
`agent: Explore` / `Plan` start without `CLAUDE.md`; whether the user-level `~/.claude/CLAUDE.md` is
|
|
59
|
+
visible to the fork. ⚠️ The `-p` JSON summary reported `subagent_stats.spawned: 0` and `num_turns: 0`
|
|
60
|
+
for the forked run although the stream shows `task_started … spawn_depth=1` — read the stream, not the
|
|
61
|
+
summary, before concluding a fork did or did not happen.
|
|
62
|
+
|
|
63
|
+
## Limits
|
|
64
|
+
|
|
65
|
+
- Built-in names, aliases and flags come from one CLI version (2.1.300) and the docs read on
|
|
66
|
+
2026-10-15; the docs' skills and model-config pages were read up to 100,000 characters (their last
|
|
67
|
+
~9k / ~17k characters unread).
|
|
68
|
+
- The exact text `ultrathink` injects is not documented.
|
|
69
|
+
- This map routes; it does not prove a session follows it. Whether a floor-tier session reaches for the
|
|
70
|
+
built-in first is a separate measurement (blind sim, isolated clone, with and without this map).
|