@chrono-meta/fh-gate 3.25.1 → 3.26.2

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 (87) hide show
  1. package/.claude/regression/probes_live.yaml +9 -3
  2. package/.claude/rules/fh_4axis_gate.md +2 -0
  3. package/.claude-plugin/marketplace.json +4 -4
  4. package/AGENTS.md +69 -13
  5. package/CLAUDE.md +3 -3
  6. package/README.ja.md +90 -379
  7. package/README.ko.md +130 -379
  8. package/README.md +122 -364
  9. package/README.zh.md +90 -346
  10. package/docs/REFERENCE.md +465 -0
  11. package/docs/USER_GUIDE.md +19 -0
  12. package/docs/codex-compat.md +36 -9
  13. package/knowledge/shared/harness-core/agents_md_runtime_details.md +49 -5
  14. package/knowledge/shared/harness-core/multi_model_sidecar_strategy.md +7 -3
  15. package/knowledge/shared/learnings/subagent_invocations_log.yaml +73 -0
  16. package/knowledge/shared/rules/operations.md +3 -2
  17. package/package.json +10 -1
  18. package/plugins/fh-commons/.claude-plugin/plugin.json +1 -1
  19. package/plugins/fh-meta/.claude-plugin/plugin.json +1 -1
  20. package/plugins/fh-meta/CHANGELOG.md +31 -0
  21. package/plugins/fh-meta/skills/prompt-regression/SKILL.md +2 -2
  22. package/plugins/fh-preprep/.claude-plugin/plugin.json +1 -1
  23. package/plugins/fh-preprep/skills/preprep/lane_speech_coach.py +0 -18
  24. package/plugins/fh-qp/.claude-plugin/plugin.json +1 -1
  25. package/scripts/capability_effect_probe.sh +98 -23
  26. package/scripts/fixtures/generated_harness/P1_r1/.claude/agents/todo-developer.md +28 -0
  27. package/scripts/fixtures/generated_harness/P1_r1/.claude/agents/todo-qa.md +25 -0
  28. package/scripts/fixtures/generated_harness/P1_r1/.claude/skills/harness/SKILL.md +6 -0
  29. package/scripts/fixtures/generated_harness/P1_r1/.claude/skills/todo-dev/SKILL.md +37 -0
  30. package/scripts/fixtures/generated_harness/P1_r1/CLAUDE.md +10 -0
  31. package/scripts/fixtures/generated_harness/P1_r1/tests/test_cli.py +1 -0
  32. package/scripts/fixtures/generated_harness/P1_r1/todo/cli.py +13 -0
  33. package/scripts/fixtures/generated_harness/P2_r2/.claude/agents/note-organizer.md +26 -0
  34. package/scripts/fixtures/generated_harness/P2_r2/.claude/agents/summary-reviewer.md +20 -0
  35. package/scripts/fixtures/generated_harness/P2_r2/.claude/agents/summary-writer.md +23 -0
  36. package/scripts/fixtures/generated_harness/P2_r2/.claude/skills/meeting-notes-organize/SKILL.md +23 -0
  37. package/scripts/fixtures/generated_harness/P2_r2/.claude/skills/weekly-meeting-summary/SKILL.md +39 -0
  38. package/scripts/fixtures/generated_harness/P2_r2/.claude/skills/weekly-summary-write/SKILL.md +25 -0
  39. package/scripts/fixtures/generated_harness/P2_r2/CLAUDE.md +10 -0
  40. package/scripts/fixtures/generated_harness/P2_r2/tests/test_cli.py +1 -0
  41. package/scripts/fixtures/generated_harness/P2_r2/todo/cli.py +13 -0
  42. package/scripts/fixtures/generated_harness/P3_r1/.claude/agents/todo-developer.md +30 -0
  43. package/scripts/fixtures/generated_harness/P3_r1/.claude/agents/todo-reviewer.md +21 -0
  44. package/scripts/fixtures/generated_harness/P3_r1/.claude/agents/todo-tester.md +23 -0
  45. package/scripts/fixtures/generated_harness/P3_r1/.claude/settings.json +11 -0
  46. package/scripts/fixtures/generated_harness/P3_r1/.claude/skills/todo-dev/SKILL.md +38 -0
  47. package/scripts/fixtures/generated_harness/P3_r1/CLAUDE.md +12 -0
  48. package/scripts/fixtures/generated_harness/P3_r1/tests/test_cli.py +1 -0
  49. package/scripts/fixtures/generated_harness/P3_r1/todo/cli.py +13 -0
  50. package/scripts/fixtures/generated_harness/P3_r2/.claude/agents/todo-developer.md +27 -0
  51. package/scripts/fixtures/generated_harness/P3_r2/.claude/agents/todo-reviewer.md +15 -0
  52. package/scripts/fixtures/generated_harness/P3_r2/.claude/agents/todo-tester.md +20 -0
  53. package/scripts/fixtures/generated_harness/P3_r2/.claude/settings.json +12 -0
  54. package/scripts/fixtures/generated_harness/P3_r2/.claude/skills/todo-dev-team/SKILL.md +32 -0
  55. package/scripts/fixtures/generated_harness/P3_r2/CLAUDE.md +12 -0
  56. package/scripts/fixtures/generated_harness/P3_r2/tests/test_cli.py +1 -0
  57. package/scripts/fixtures/generated_harness/P3_r2/todo/cli.py +13 -0
  58. package/scripts/fixtures/generated_harness/P4_r2/.claude/agents/todo-developer.md +27 -0
  59. package/scripts/fixtures/generated_harness/P4_r2/.claude/agents/todo-qa.md +23 -0
  60. package/scripts/fixtures/generated_harness/P4_r2/.claude/skills/todo-dev/SKILL.md +19 -0
  61. package/scripts/fixtures/generated_harness/P4_r2/.claude/skills/todo-orchestrator/SKILL.md +33 -0
  62. package/scripts/fixtures/generated_harness/P4_r2/CLAUDE.md +10 -0
  63. package/scripts/fixtures/generated_harness/P4_r2/tests/test_cli.py +1 -0
  64. package/scripts/fixtures/generated_harness/P4_r2/todo/cli.py +13 -0
  65. package/scripts/gate_bootstrap_ephemeral.sh +0 -2
  66. package/scripts/generated_harness_check.py +740 -0
  67. package/scripts/lane_onoff_compare.py +138 -0
  68. package/scripts/lane_stub_env.allow +5 -0
  69. package/scripts/lane_stub_env.sh +63 -0
  70. package/scripts/mutation_probe.py +0 -5
  71. package/scripts/pr_merge_verified.sh +27 -3
  72. package/scripts/probe_live_eval.sh +1 -1
  73. package/scripts/probe_live_eval_lib.py +2 -2
  74. package/scripts/selfcheck.sh +22 -1
  75. package/scripts/test_axis4_lane_substitute_lanes.sh +93 -0
  76. package/scripts/test_card_drift_probe.sh +7 -0
  77. package/scripts/test_generated_harness_check_lanes.sh +325 -0
  78. package/scripts/test_hook_source_gate_lanes.sh +14 -3
  79. package/scripts/test_lane_stub_env_lanes.sh +218 -0
  80. package/scripts/test_marker_floor_lanes.sh +7 -0
  81. package/scripts/test_pr_merge_verified_lanes.sh +50 -3
  82. package/scripts/test_probe_live_eval_lanes.sh +1 -1
  83. package/scripts/test_push_zone_lanes.sh +6 -0
  84. package/scripts/test_session_close_lanes.sh +7 -0
  85. package/scripts/test_utterance_intake_lanes.sh +20 -1
  86. package/templates/.claude/rules/session.md +11 -0
  87. package/templates/.git-hooks/pre-commit +63 -21
@@ -19,7 +19,8 @@ methodology is portable, while their automatic invocation is Claude-native.
19
19
  The methodology layer is Codex-compatible, marked **beta** in the *validation-maturity* sense
20
20
  (external validation is still thin — see §Beta-removal), not in the *scope* sense: partial
21
21
  automation-layer support is the design, not an unfinished state. Gemini, Codex, and other runtimes
22
- can apply it by replacing hooks and native dispatch with manual invocation.
22
+ can apply it through native capabilities and explicit FH adapters. A host supporting hooks does
23
+ not establish compatibility with FH's Claude hook configuration or event payloads.
23
24
 
24
25
  Directory names do not determine publication residency:
25
26
 
@@ -32,10 +33,52 @@ In a workspace pairing a public mirror with a private companion store, preserve
32
33
  even when both are locally available. Treat observational or operator-specific material as
33
34
  private-first and promote only the polished result.
34
35
 
36
+ ## §Governor-operation
37
+
38
+ A user-directed Codex session may govern its assigned task; a delegated audit process may not
39
+ promote itself into that role. Resolve role and scope first, then enumerate the available tools,
40
+ installed skills, project registry, and adapters. Execute authorized reversible work and required
41
+ quality checks; source-close findings before deciding. Do not infer broad design competence from
42
+ an old model benchmark or infer current incapacity from a historical CLI limitation.
43
+
44
+ Keep four decisions distinct:
45
+
46
+ | Decision | Governor action |
47
+ |---|---|
48
+ | FH check failed | Read the failing source/typed result; repair and retest within scope |
49
+ | Evidence unavailable or check skipped | Report the missing coverage; continue independent work; do not manufacture a PASS |
50
+ | Task authorization already covers the action | Reuse it while scope and conditions remain unchanged |
51
+ | Runtime permission or irreversible clearance missing | Prepare the concrete action and request the actual required clearance; do not bypass it |
52
+
53
+ A hook interruption is a diagnostic event, not automatically a question for the operator. Capture
54
+ the exit status, typed verdict, affected paths, and stated reason. Confirm checkout wiring and
55
+ private pattern coverage before trusting a quiet result. Fix the underlying issue rather than
56
+ setting an override or writing a marker to satisfy form. Evidence records describe real execution;
57
+ human-authored evidence requirements remain human-authored.
58
+
59
+ Codex's sandbox controls technical access; its approval policy/reviewer controls permission review.
60
+ An automatic permission reviewer does not supply FH quality evidence or clear an irreversible gate.
61
+ Do not change the operator's permission configuration as part of an ordinary documentation repair.
62
+ Source: [Codex sandbox and approval controls](https://learn.chatgpt.com/docs/sandboxing).
63
+
64
+ Before replacing a Claude automation step, inspect the actual host version, exposed tools,
65
+ configuration, enabled plugin, hook trust, event schema, and result semantics. Codex supports its
66
+ own hook definitions; project hooks require a trusted project layer and new/changed definitions
67
+ require trust. Installation/enabling alone is insufficient. These are host capabilities, not a
68
+ claim that FH's existing Claude hook bundle has been ported.
69
+ Sources: [Codex hooks](https://learn.chatgpt.com/docs/hooks) and
70
+ [Codex plugin construction](https://developers.openai.com/plugins/build/plugins).
71
+
72
+ Select a supported native operation or an FH adapter only after those checks. Keep delegated
73
+ auditors read-only, consent leased as specified in `AGENTS.md`, and result/return gates intact.
74
+ If no runnable equivalent exists, name the specific missing phase; do not label the entire runtime
75
+ manual-only. Before an outward or irreversible step, complete the reviewable artifact and apply
76
+ `CLAUDE.md`'s corresponding gate using existing authorization where it actually covers that step.
77
+
35
78
  ## §Sidecar-routing-and-waiting
36
79
 
37
80
  A sidecar is a capability-routing layer, not a second harness or co-governor. Gemini/Antigravity is
38
- suited to breadth and multimodal work. Codex's primary FH role is repo-grounded audit: file reads,
81
+ suited to breadth and multimodal work. When recruited as a sidecar, Codex's default FH role is repo-grounded audit: file reads,
39
82
  source-close grep, diff/patch review, gate execution, and phantom/backtrace. A Codex session with
40
83
  Browser or Chrome connectors may also take live web-flow automation.
41
84
 
@@ -178,7 +221,7 @@ is not the headless substitute.
178
221
  |---|---|---|
179
222
  | **M1 — Full** | No Claude-native dependency | `token-budget-gate`, `asset-placement-gate`, `phantom-quench`, `deep-clarify`, `convergence-loop` |
180
223
  | **M2 — Partial** | Core works; native agent/slash-command steps need adaptation | `deliberation`, `steel-quench`, `harness-doctor`, `context-doctor`, `sim-conductor`, `harvest-loop` |
181
- | **M3 — Claude-only** | Requires a Claude hook or session-scoped dispatch | `goal-quench`, `harness-pr-reviewer`, `install-wizard` |
224
+ | **M3 — Claude-bound implementation** | Shipped workflow requires Claude-specific hook/configuration or session context | `goal-quench`, `harness-pr-reviewer`, `install-wizard` |
182
225
 
183
226
  **Which phase needs adapting** — the operative half of the M2/M3 rows. Without this a tier label
184
227
  tells a non-Claude runtime that a skill is "partial" but not *where* to intervene, which is the only
@@ -194,8 +237,9 @@ move, these per-skill cues did not, and they existed in no other file.)
194
237
  | `harness-pr-reviewer` (M3) | — | needs Claude session context |
195
238
  | `install-wizard` (M3) | — | writes `settings.json` |
196
239
 
197
- For M2, replace `Agent(subagent_type=...)` and slash-command steps with `fh-run` or direct
198
- `codex exec` reading the relevant spec.
240
+ For M2, replace `Agent(subagent_type=...)` and slash-command steps with a permitted native agent,
241
+ `fh-run`, or direct `codex exec` reading the relevant spec. Preserve isolation, tool limits, model
242
+ floor, consent, and return gates; native availability alone does not satisfy them.
199
243
 
200
244
  Use Codex native goal/session control when available. FH's portable role is the post-goal quality
201
245
  gate (`fh-gate`). `fh-goal` is for non-interactive one-shot runs followed automatically by
@@ -96,7 +96,8 @@ This means FH is not just model-agnostic in theory — the methodology layer phy
96
96
  > degradation. Once EOL hits, sidecar team detection should probe `agy` first (follow-up:
97
97
  > `fh_signal_2026-06-11_fh-direct`).
98
98
 
99
- > **Load ≠ full parity**: "loads and lists as Enabled" means the SKILL.md *methodology* is readable and runnable as guidance. Skills whose steps dispatch a sub-agent (`Agent` tool, `fh-commons:*` challengers) or depend on slash-commands/hooks are **Claude-native** — on Gemini/Codex they degrade to manual methodology, not automated execution. Cross-CLI portability covers the *methodology layer*; the automation layer (sub-agents, hooks, slash commands) requires Claude Code as host. See `README.md §2-layer architecture`.
99
+ > **Load ≠ full parity**: "loads and lists as Enabled" means the SKILL.md *methodology* is readable and runnable as guidance. Skills whose steps dispatch a sub-agent (`Agent` tool, `fh-commons:*` challengers) or depend on slash-commands/hooks are **Claude-native** — without a verified native equivalent or adapter, their Claude-specific steps require manual substitution. Cross-CLI portability covers the *methodology layer*; the shipped Claude automation still requires its matching host or a verified adapter. Current
100
+ Codex-native capability is assessed separately; see `docs/codex-compat.md §Current host capability`. See `README.md §2-layer architecture`.
100
101
 
101
102
  > **Check-class taxonomy = the model-portability map**: the Axis-5 check classes
102
103
  > (`harness_6axis_framework.md` §Axis 5) double as the portability map. **Mandatory-pass** checks —
@@ -136,7 +137,7 @@ FH is a **multi-runtime harness with explicit runtime authority**, not Claude-on
136
137
  | Runtime | Authority | Fit task-class (aggressive *within* it, not blanket) |
137
138
  |---|---|---|
138
139
  | **Claude Code** | default **action/governor** — Claude-native automation, hooks, agents, MCP writeback, terminal verdict | orchestration · design-depth · synthesis · the writeback/commit path |
139
- | **Codex** | **audit / repo-grounded sidecar** | file reads · grep/source-close · diff & patch · gate execution · phantom/backtrace (`fh-run` / `codex exec`). **NOT** discovery/design-depth — below-floor there |
140
+ | **Codex** | User-directed session: **governor for the assigned scope**. Recruited auditor: **repo-grounded sidecar** | Governor: implementation, repair, verification, and integration within exposed capability and authorization. Sidecar default: file reads · source-close · diff review · gate execution · phantom/backtrace; no target-tree writes |
140
141
  | **Gemini / agy** | **breadth / multimodal sidecar** | wide alt-generation · multimodal/video/image · exploratory critique · non-code artifacts. Outputs stay **source candidates** until grounded |
141
142
  | **Other runtimes** | **portable entrypoint only** (`AGENTS.md`) | apply FH methodology via adapter; do **not** inherit Claude-native automation or writeback authority unless explicitly scoped |
142
143
 
@@ -147,7 +148,10 @@ External causal anchor for *why* the ceiling sits in the weights (wsff.md, Human
147
148
  weeks — *"maintainability has no fast oracle, so we can't reward for it during RL"* — hence the
148
149
  human-review floor is structural, not a transitional patch. (Its Faros AI numbers are correlation-only;
149
150
  the author's own caveat travels with any citation.)
150
- "Aggressive" Codex/Gemini use is bounded by the fit task-class above, never a blanket main-seat swap.
151
+ "Aggressive" sidecar use is bounded by the assigned task class, never a blanket main-seat swap.
152
+ A directly tasked Codex governor is an explicit context, not a promotion of an audit sidecar or a
153
+ change to the default Claude-led deployment. Historical model-floor observations do not classify
154
+ every future Codex model; assess the actual model and task, retaining required verification floors.
151
155
 
152
156
  ### Write authority — a sidecar audits, it does not edit (measured 2026-08-21)
153
157
 
@@ -4651,3 +4651,76 @@
4651
4651
  learning: >-
4652
4652
  cross-family(codex)는 «회귀만» 으로 좁혀 물으면 수렴한다(2→3→parity) — 그리고 입장(메인테이너 sim)이 계열과 다른 축을 잡는다: codex 는 코드 구멍,
4653
4653
  메인테이너 sim 은 «그쪽이 이미 머지 차단 사유로 적은 형태» 와 과장 문구. qasp 는 계기가 살아 있어도 «표시 일관성» 부류를 구조적으로 못 본다 — 오라클 층이 빈다.
4654
+
4655
+ - date: 2026-10-11
4656
+ session: "cd86b9dd (FoD v0.1.22·v0.1.23 출하 · revfactory 측정 · N3/N4 체커 #868 · 슬롭 규약 #869 · 블랙춘 v2.19·v2.20 · 카트리지 스펙)"
4657
+ agent: general-purpose ×~46 (Sonnet 고정) · codex 사이드카 다수
4658
+ task: >-
4659
+ FoD 라이브 레인·게이트 수리 · 블랙춘 프레임 수리 · harness-100 스캔 · generated_harness_check 레인 · 슬롭 sim/실측 · 카트리지 스펙 초안·검수 대응
4660
+ count: 46
4661
+ outcome: partial
4662
+ evidence: >-
4663
+ 건수 = 인계 문서의 그날 집계(SubagentStop 기준 근사, 재개 정지 포함). 착지: FoD #207 · #208 · FH #868 · #869 · 블랙춘 v2.20 커밋 3건.
4664
+ partial 사유: 실행 중 에이전트에 보낸 지시가 도구 결과 안에 도착해 거부됨 → 새 에이전트로 재디스패치 · 슬롭 sim 러너 비용 집계 버그($0 표기)
4665
+ learning: >-
4666
+ 돌고 있는 에이전트에 SendMessage 로 범위를 바꾸면 «도구 결과 속 지시» 로 읽혀 거부될 수 있다 — 범위 변경은 새 디스패치로. 픽셀 수리는 «링 픽셀 변화 0» 같은 제약이 해법 자체를 막을 수 있다 — 운영자 그림이 반증했다.
4667
+
4668
+ - date: 2026-10-12
4669
+ session: "cd86b9dd (야간 자율주행 — v0.1.24 · 정리 갈래)"
4670
+ agent: general-purpose ×6 (Sonnet, 재개 5회 포함 별도 집계 안 함) · codex 사이드카 ×11
4671
+ task: >-
4672
+ 가벼운 게이트 설계 문서 + v2 개정 · 노블라이터 카트리지 추출 계획 · FH 출처 주석 토큰 실측 · fh-qp cartridge.yaml + cartridge_admit 초안·수리 6라운드
4673
+ count: 6
4674
+ outcome: accepted
4675
+ evidence: >-
4676
+ 설계 문서 3건 착지(tracks/_meta) · cartridge_admit 레인 85(feat/cartridge-fh-qp ed2acc6) · codex 라운드마다 재현 입력 → fail-before 레인 → 수리 → 변이 빨강 확인
4677
+ learning: >-
4678
+ 거부 목록(denylist)을 codex 와 주고받으면 S 가 2→1→3 으로 다시 늘었다 — 허용 목록으로 범위를 줄이자 S 0 으로 수렴. 같은 에이전트를 SendMessage 로 재개하면 이전 라운드 맥락을 잃지 않아 라운드당 1~4분.
4679
+ - date: 2026-10-14
4680
+ agent: general-purpose (sonnet)
4681
+ task: FoD v1 B11 SPEC r4 leak rewrites (clean room, review text only)
4682
+ trigger: codex r4 REVISE A14 C5
4683
+ outcome: accepted
4684
+ evidence: governor grep of 28 A identifiers = 0 residual; Z145-Z149 present; cap table appended
4685
+ tokens: 173982
4686
+ note: also removed 6 same-class names unflagged by review
4687
+ - date: 2026-10-14
4688
+ agent: general-purpose (sonnet)
4689
+ task: FoD gate unresolved-redirect fix implementation (worktree fod-wt-redirect, branch fix/gate-unresolved-redirect)
4690
+ trigger: redirect design finalized at cap (r3 -> final)
4691
+ outcome: accepted
4692
+ evidence: commit 2ac9215; governor re-run new 53/0 old 45/8; revert probe b reproduced (R-D10, R-D10c flip); real ~/.claude sha unchanged; no bypass tokens in diff
4693
+ tokens: 279537
4694
+ note: pre-commit gate needed a dedicated FOD_WORK assembly tree (shared tree incomplete); one gate run ~20min
4695
+ - date: 2026-10-14
4696
+ agent: general-purpose (sonnet)
4697
+ task: FoD gate mention-as-write fix implementation (worktree fod-wt-mention, branch fix/gate-mention-as-write)
4698
+ trigger: mention design finalized at cap (§9 final)
4699
+ outcome: accepted
4700
+ evidence: commit 7670b77; governor re-run new 41/0 old 29/12 (M1-M3b allow + D7/D7b/D9/D19b old holes closed); revert probe c reproduced (D7, D7b, D19b flip); real ~/.claude sha unchanged; no bypass tokens in diff
4701
+ tokens: 309224
4702
+ note: arm's own Bash was blocked twice by the installed global gate (code text mentioning protected folder) and it switched to Write/Edit for worktree files — over-block of the very class being fixed, but it is a tool reroute after a gate block; surfaced to operator. Probe e initially instrument-error (green), fixed by narrowing exemption FORBID regex import->import( ; sent to codex review.
4703
+ - date: 2026-10-14
4704
+ agent: general-purpose (sonnet) — resumed mention arm
4705
+ task: fix codex mention impl r1 (6 findings) — closed allowlists
4706
+ trigger: codex impl r1 REVISE
4707
+ outcome: accepted
4708
+ evidence: commit 5f17f40; governor re-run new 51/0, old fails only allow+old-hole lanes; real ~/.claude unchanged; watchdog fail-open measured as pre-existing on both gates
4709
+ tokens: 347379
4710
+ note: shrinking to ast grammar + program allowlist moved the REAL M2 and M3 shapes back to DENY (named residual); only M1 and grammar-shaped variants are newly allowed. Old holes D7/D7b/D9/D19b closed.
4711
+ - date: 2026-10-14
4712
+ agent: general-purpose (sonnet) — resumed redirect arm x3
4713
+ task: fix codex redirect impl r1/r2/r3 findings (commits 036bdeb, 8253b5a, 4aec3c4)
4714
+ trigger: codex impl REVISE each round, cap 3
4715
+ outcome: accepted
4716
+ evidence: governor re-ran lanes each round (61/0, 69/0, 71/0) and own revert probes (GIT_* env, ROOTCOMPLETE); real ~/.claude unchanged; branch pushed
4717
+ tokens: 962430
4718
+ note: name allowlist made the preregistered real case (uppercase HOOK) a residual — governor declined widening at cap
4719
+ - date: 2026-10-14
4720
+ agent: general-purpose (sonnet) — resumed mention arm x3
4721
+ task: fix codex mention impl r1/r2/r3 findings (commits 5f17f40, b8851f5, 805609a)
4722
+ trigger: codex impl REVISE each round, cap 3
4723
+ outcome: partial
4724
+ evidence: governor re-ran lanes each round (51/0, 56/0, 62/0) + revert probe script 8/8; real ~/.claude unchanged; branch pushed
4725
+ tokens: 1095435
4726
+ note: partial = fix landed safely but only real case M1 is unblocked; M2/M3 back to residual after closing to allowlists. No gate-block reroute after the rule was added to the brief.
@@ -28,8 +28,9 @@ The hub audits and improves itself weekly.
28
28
  **Phase 1.5 (manual):**
29
29
  1. Gather window data by hand — `git log --since="{window}" --oneline` (+ count), `git tag --sort=-creatordate`, tail of `knowledge/shared/learnings/subagent_invocations_log.yaml`, stale-file spot checks. (No `_scanner.sh` exists — a prior reference here was a phantom, fixed 2026-06-11; the automation path is Phase 2 harvest-loop, a standalone scanner script is deliberately not built.)
30
30
  2. `bash scripts/below_floor_scan.sh` — below-floor marker re-run queue (the standing consumer §Floor governance promises: exit 1 = pending floor-tier re-validations, treat as S-tier; resolve via `floor-rerun:` / `floor-writeoff:` appended to the marker)
31
- 3. Write `tracks/_audit/weekly_audit_YYYY-MM-DD.md` mirroring the previous audit file's format (frontmatter + activity table + 🟥🟧🟩 + pattern table — no separate template file exists)
32
- 4. Propose 3-tier improvements (🟥mandatory/🟧strong/🟩recommended)
31
+ 3. **Carry-over re-check before copying.** Every carried-over / unresolved item from the previous audit is re-confirmed against a primary source (`gh pr view` · `git log -S` · a grep of the file it names) *before* it is copied forward, and the command used is written next to it together with what it returned for the current state (a `git log -S` hit shows history, not current status). Cannot confirm → mark `UNVERIFIED`; never promote it to "awaiting operator decision". (2026-10-11: a Haiku arm copied the 09-24 carry-over list without checking current state and re-reported an already-closed awesome-list PR and a nested-repo gitlink as pending; the governor corrected both.)
32
+ 4. Write `tracks/_audit/weekly_audit_YYYY-MM-DD.md` mirroring the previous audit file's format (frontmatter + activity table + 🟥🟧🟩 + pattern table — no separate template file exists)
33
+ 5. Propose 3-tier improvements (🟥mandatory/🟧strong/🟩recommended)
33
34
 
34
35
  **Recurrence escalation** (N=3 threshold): Scanner output shows the same defect class in 3+ distinct commits or sessions within the audit window → S-tier signal; propose instrumenting as a CI probe (`npm test` extension or pre-commit hook) rather than adding a new habit rule. Three recurrences indicate the defect class is structural — habits don't hold.
35
36
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrono-meta/fh-gate",
3
- "version": "3.25.1",
3
+ "version": "3.26.2",
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": {
@@ -82,6 +82,7 @@
82
82
  "docs/IDENTITIES.md",
83
83
  "docs/MODEL_SETUP.md",
84
84
  "docs/OUTPUT_EVIDENCE.md",
85
+ "docs/REFERENCE.md",
85
86
  "docs/STANDARDS_ALIGNMENT.md",
86
87
  "docs/USER_GUIDE.md",
87
88
  "docs/USE_CASES.md",
@@ -120,6 +121,10 @@
120
121
  "scripts/.env_purity_tokens.defaults",
121
122
  "scripts/activity_log.sh",
122
123
  "scripts/post_squash_verify.sh",
124
+ "scripts/lane_stub_env.sh",
125
+ "scripts/lane_stub_env.allow",
126
+ "scripts/lane_onoff_compare.py",
127
+ "scripts/test_lane_stub_env_lanes.sh",
123
128
  "scripts/test_post_squash_verify_lanes.sh",
124
129
  "scripts/pr_merge_verified.sh",
125
130
  "scripts/test_pr_merge_verified_lanes.sh",
@@ -174,6 +179,7 @@
174
179
  "scripts/finding_pipeline.sh",
175
180
  "scripts/finding_verifier.sh",
176
181
  "scripts/finding_verify.py",
182
+ "scripts/fixtures/generated_harness",
177
183
  "scripts/fixture_guard_lib.sh",
178
184
  "scripts/frontier_digest_autopilot.sh",
179
185
  "scripts/gate_anchor_check.sh",
@@ -186,6 +192,7 @@
186
192
  "scripts/test_prless_delta_scan_lanes.sh",
187
193
  "scripts/gate_bootstrap_ephemeral.sh",
188
194
  "scripts/gate_shape_scan.sh",
195
+ "scripts/generated_harness_check.py",
189
196
  "scripts/governor_board.sh",
190
197
  "scripts/halffix_propagation_scan.sh",
191
198
  "scripts/hook_source_lib.sh",
@@ -279,10 +286,12 @@
279
286
  "scripts/test_finding_pipeline_lanes.sh",
280
287
  "scripts/test_gate_bootstrap_ephemeral_lanes.sh",
281
288
  "scripts/test_gate_shape_scan_lanes.sh",
289
+ "scripts/test_generated_harness_check_lanes.sh",
282
290
  "scripts/test_gate_two_verdicts_lanes.sh",
283
291
  "scripts/test_halffix_lanes.sh",
284
292
  "scripts/test_heavy_classifier_lanes.sh",
285
293
  "scripts/test_axis23_skip_reason_lanes.sh",
294
+ "scripts/test_axis4_lane_substitute_lanes.sh",
286
295
  "scripts/test_hook_source_gate_lanes.sh",
287
296
  "scripts/test_knowledge_seam_lanes.sh",
288
297
  "scripts/test_ko_tech_writer_lanes.sh",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fh-commons",
3
- "version": "3.25.1",
3
+ "version": "3.26.2",
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.25.1",
3
+ "version": "3.26.2",
4
4
  "engines": {
5
5
  "claudeCode": ">=1.0.0"
6
6
  },
@@ -1,5 +1,36 @@
1
1
  # forge-harness (fh-meta) Changelog
2
2
 
3
+ ### [3.26.2] — 2026-10-14 — self-test 가 Windows 에서 실행 파일을 대량 복사하던 것
4
+
5
+ **patch.** 수리.
6
+
7
+ - `capability_effect_probe.sh --self-test`(selfcheck 가 부른다): shim 빌더가 PATH 의 모든 실행 파일을 임시 폴더에 링크했고, Windows Git Bash 는 그 링크를 복사로 바꿔 보안 제품 오탐이 났다. 허용 목록만 링크하고, 심링크가 안 되는 환경이면 실행 파일을 하나도 넘기지 않고 해당 레인을 SKIP(미측정, 통과 아님)으로 남긴다(#890).
8
+ - 같은 파일: 홈 디렉터리 감시가 `shasum` 을 직접 불러, shasum 이 없는 호스트에서는 홈 쓰기를 늘 «안 바뀜» 으로 봤다 — 목록을 직접 비교한다(#890).
9
+
10
+ ### [3.26.1] — 2026-10-13 — README 정리 · 레인 플레이크 · live-eval 거짓 적색
11
+
12
+ **patch.** 행동을 바꾸지 않는 문서·계기 수정.
13
+
14
+ - README(한·영): 하는 일과 그 범위를 정본과 맞추고, 깨져 보이던 `**` 강조를 걷었다(#885).
15
+ - 레인: `pipefail` 아래 조기 종료 소비자(`| head -1 | grep -q`)가 생산자를 SIGPIPE 로 죽여 간헐 적색을 내던 한 곳을 고쳤다(#872).
16
+ - live-eval G-MAP-01: 매핑 규칙은 발동했는데 응답이 프로토콜 이름 대신 1단계 경로를 말해 매일 FAIL 로 채점되던 것 — 1단계 경로도 일치로 센다. 기록된 대조 응답 1,057 개에 새 일치 0(#887).
17
+
18
+ ### [3.26.0] — 2026-10-12 — 권한 검사 강화 · 가벼운 게이트 · 다른 런타임 온보딩
19
+
20
+ **minor.** 새 도구(생성된 하네스의 비가역 권한 검사)와 가벼운 게이트를 싣고, pre-commit 마커 검사를 한 칸 조인다.
21
+
22
+ BREAKING (gate): pre-commit 이 `axis2-engine` · `axis2-model` · `floor-status` 값이 `<` 로 시작하는 마커(재생성 힌트의 자리표시자를 그대로 둔 마커)를 차단한다 — 처방: 자리표시자를 실제로 돌린 엔진·모델·티어 값으로 바꿔 적는다.
23
+
24
+ - 새 도구 `scripts/generated_harness_check.py`: 외부 생성기가 쓴 하네스·카트리지의 비가역 권한(publish · 삭제 · 이력 재작성 · 강제 푸시 등)을 사람 확인으로 분류한다. 인자를 명령으로 실행하는 Bash 허용(`sh:*` · `python3:*` · `env -i *` · `npx …`)과 인터프리터·감싸개·패키지 실행기 와일드카드, 표준입력 경로(`/dev/stdin`)와 그 별칭, 셸 전개·명령 치환, 머리 따옴표, 따옴표·역슬래시·리다이렉션, 문자 허용목록 밖의 글자가 든 항목을 H1(사람 확인)으로. 고정 스크립트는 레포 안 상대 경로(`python3 scripts/x.py:*`)로 쓰면 통과한다. 로컬 프로젝트 23개 판정 변화 0. 정적 문자열 검사의 한계로 셸 문법 우회는 다 닫히지 않는다(codex 15라운드 — 잔여로 기록).
25
+ - 가벼운 게이트 P1·P2: selfcheck 의 비주제 레인 5개가 `gh` 와 오래된 Zenodo 참조 스캐너를 레인 안에서만 스텁한다(`scripts/lane_stub_env.sh`, 허용 목록). 생산 체커·훅은 그대로. 켠/끈 비교기 `scripts/lane_onoff_compare.py`.
26
+ - `pr_merge_verified.sh`: gh 가 서버 머지 뒤 로컬 정리에서 실패해도 «nothing merged» 라고 하지 않는다 — GitHub 상태를 다시 묻는다.
27
+ - `AGENTS.md`: 인사 절 — Antigravity 등 Claude Code 밖 런타임에서도 FH 온보딩이 뜬다(agy 실측 0/3 → 3/3).
28
+ - pre-commit 마커 재생성 힌트를 자리표시자로 — 다른 런타임이 예시값을 베껴 모델을 거짓 기입하던 것(agy 3/3)을 막는다. 자리표시자를 그대로 둔 마커는 차단한다(위 BREAKING).
29
+ - `templates/.claude/rules/session.md`: «완료 전 슬롭 점검» — 언어와 무관한 행동 규약(호출 없는 새 함수 · 복붙 · 수리 경위를 적는 주석). 샘플링 점검이며 전수 차단이 아니다.
30
+ - Axis 4 매니페스트가 예측 대신 «레인 + 미관측»을 받는다.
31
+ - README 를 한 페이지 입구로 다시 쓰고 번역 3종을 맞췄다. 번역본의 동작 그림은 Mermaid 로.
32
+ - 정리: WARN 만 내던 doc-code 결합 블록 삭제 · 호출 없는 함수 4개 삭제 · 주간 감사에 이월 재대조 단계.
33
+
3
34
  ### [3.25.1] — 2026-10-10 — 로컬 미디어 입력 · 오류처리 · 점검 주기
4
35
 
5
36
  **patch.** PR #861의 출시 후 수정 사항을 배포한다.
@@ -58,8 +58,8 @@ ls .claude/regression/probes.md 2>/dev/null || echo "NO_CUSTOM_PROBES"
58
58
  ```
59
59
 
60
60
  **If custom probes exist**: load and use them. The hub repo ships its golden probe set
61
- (known-answer offline eval, **33 probes** with check classes — 27 mandatory-pass · 1 measured ·
62
- 5 judged, of which 2 rows are inert deletion anchors, so live coverage is 31) at exactly this path
61
+ (known-answer offline eval, **32 probes** with check classes — 27 mandatory-pass · 0 measured ·
62
+ 5 judged, of which 2 rows are inert deletion anchors, so live coverage is 30) at exactly this path
63
63
  — when present it is canonical and supersedes the default matrix below.
64
64
 
65
65
  > Count from the file, not from this line: `grep -cE '^\| *`[A-Z][A-Z0-9-]*-[0-9]+` *\|'
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fh-preprep",
3
- "version": "3.25.1",
3
+ "version": "3.26.2",
4
4
  "engines": {
5
5
  "claudeCode": ">=1.0.0"
6
6
  },
@@ -195,24 +195,6 @@ def smooth(v, k=5):
195
195
  return out
196
196
 
197
197
 
198
- def peaks_in(db, thr_v, f0, f1):
199
- """f0..f1 프레임 구간의 음절 핵(평활 에너지 봉우리, 돌출 3dB · 간격 80ms)."""
200
- lo_ = max(0, f0 - 20)
201
- seg = smooth(db[lo_:f1 + 20], 5)
202
- out, last = [], -999
203
- for i in range(1, len(seg) - 1):
204
- g = lo_ + i
205
- if g < f0 or g >= f1:
206
- continue
207
- if seg[i] > thr_v and seg[i] >= seg[i - 1] and seg[i] > seg[i + 1]:
208
- lo = min(seg[max(0, i - 15):i] or [seg[i]])
209
- ro = min(seg[i + 1:i + 16] or [seg[i]])
210
- if seg[i] - max(lo, ro) >= 3.0 and g - last >= 8:
211
- out.append(g)
212
- last = g
213
- return out
214
-
215
-
216
198
  def f0_at(x, center_s):
217
199
  """40ms 창 · 4kHz 자기상관 피치(50~400Hz). 서브하모닉 회피: 최댓값 0.85 이상인 첫 국소 최대."""
218
200
  c = int(center_s * SR)
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fh-qp",
3
- "version": "3.25.1",
3
+ "version": "3.26.2",
4
4
  "engines": {
5
5
  "claudeCode": ">=1.0.0"
6
6
  },
@@ -316,7 +316,9 @@ probe_one() { # $1=capfile → rc
316
316
  # (d) 가 말하는 결함을 프로브 자신이 갖고 있었던 것이다. 절대경로 쓰기의 가장 흔한
317
317
  # 표적이 홈이므로 여기에도 감시를 둔다. ⚠️ 완전하지 않다 — 아래 §잔여 참조.
318
318
  local home_before home_after
319
- home_before=$(ls -A "$HOME" 2>/dev/null | LC_ALL=C sort | shasum -a 256 | cut -d" " -f1)
319
+ # 해시 없이 목록 자체를 비교한다 — `shasum` 직접 호출은 shasum 없는 Linux 에서 앞뒤 모두 빈 값이 돼
320
+ # 홈 감시가 늘 «안 바뀜» 으로 죽었다(2026-10-14, L20b 문구 검사가 드러냄). 해시 도구 의존 자체를 뺀다.
321
+ home_before=$(ls -A "$HOME" 2>/dev/null | LC_ALL=C sort; echo "|end") # 표지: 치환이 끝 줄바꿈을 먹지 않게(codex R3 #2)
320
322
  mkdir -p "$sandbox/scripts"; printf 'x\n' > "$sandbox/scripts/CANARY_SCRIPTS"
321
323
 
322
324
  local before after out rc
@@ -388,7 +390,7 @@ $out2"
388
390
  _cleanup_probe
389
391
  rm -rf "$outside"
390
392
 
391
- home_after=$(ls -A "$HOME" 2>/dev/null | LC_ALL=C sort | shasum -a 256 | cut -d" " -f1)
393
+ home_after=$(ls -A "$HOME" 2>/dev/null | LC_ALL=C sort; echo "|end") # 표지: 치환이 끝 줄바꿈을 먹지 않게(codex R3 #2)
392
394
  local home_changed
393
395
  home_changed=$([ "$home_before" = "$home_after" ] && echo 0 || echo 1)
394
396
 
@@ -873,55 +875,128 @@ EOF
873
875
  # ⓑ shim 빌더가 `set -f`(전역 noglob) 때문에 확장이 안 됨 — **캘리브레이션 짝**이 적발
874
876
  # 여기서는 도구를 **하나씩** 빼고, 매 arm 에 기대값을 다르게 건다.
875
877
  # ★PATH 원소 분해는 공백/글롭 안전하게(`tr` → 줄 단위). cross-family 지목 #7.
876
- _mkshim() { # $1=shim경로 $2..=제외할 도구명
878
+ # 🟥 PATH 전체가 아니라 **허용 목록**만 링크한다 (pmh-dev #87). 옛 판은 PATH 의 모든 실행 파일을
879
+ # 깔았고, Windows Git Bash 는 `ln -s` 를 «복사» 로 바꾸므로 System32 까지 수천 개가 임시 트리로
880
+ # 복사돼 EDR 이 짖었다. 이제 실행 파일을 넘기기 전에 텍스트 탐침으로 심링크가 되는지 묻고, 안 되면
881
+ # rc=2 로 돌아가 부르는 쪽이 그 레인을 SKIP(미측정, 통과 아님)한다.
882
+ # ⚠️ 보장 범위(codex R3 #1): MSYS/Git Bash 처럼 폴백이 «균일한» ln 에서는 실행 파일 복사 0 이다.
883
+ # 텍스트는 링크하고 실행 파일만 복사하는 ln 이라면 첫 실행 파일 하나가 복사된 뒤 rc=3(FAIL)로 멈춘다.
884
+ _SHIM_TOOLS="bash sh env cat cp mv rm ln mkdir mktemp touch chmod ls find stat readlink realpath
885
+ dirname basename sed awk grep egrep tr cut head tail sort uniq wc comm diff cmp xargs od
886
+ date sleep uname id expr git perl shasum sha256sum"
887
+ _mkshim() { # $1=shim경로 $2..=제외할 도구명 · rc=2 = 심링크를 못 만드는 환경(복사 폴백)
877
888
  local shimd="$1"; shift
878
889
  mkdir -p "$shimd"
879
- printf '%s\n' "$PATH" | tr ':' '\n' > "$d/_pathdirs"
880
- local _p _f _b _x _skip
881
- set +f
882
- while IFS= read -r _p; do
883
- [ -n "$_p" ] && [ -d "$_p" ] || continue
884
- for _f in "$_p"/*; do
885
- [ -e "$_f" ] || continue
886
- _b=${_f##*/}; _skip=0
887
- for _x in "$@"; do [ "$_b" = "$_x" ] && { _skip=1; break; }; done
888
- [ "$_skip" = 1 ] && continue
889
- [ -e "$shimd/$_b" ] || ln -s "$_f" "$shimd/$_b" 2>/dev/null
890
- done
891
- done < "$d/_pathdirs"
892
- set -f
890
+ # 실행 파일을 넘기기 «전에» 무해한 텍스트 파일로 심링크가 되는지 묻는다 — 복사 폴백이면
891
+ # 복사되는 것은 이 텍스트 한 장뿐이다(cross-family codex R1 #1: 사후 감지는 이미 복사한 뒤다)
892
+ printf 'symlink probe\n' > "$shimd/.lnprobe.txt"
893
+ MSYS=winsymlinks:nativestrict ln -s "$shimd/.lnprobe.txt" "$shimd/.lnprobe" 2>/dev/null
894
+ if [ ! -L "$shimd/.lnprobe" ]; then rm -f "$shimd/.lnprobe" "$shimd/.lnprobe.txt"; return 2; fi
895
+ rm -f "$shimd/.lnprobe" "$shimd/.lnprobe.txt"
896
+ hash -r # type -P 가 해시 캐시가 아니라 지금 PATH 의 첫 일치를 고르게(codex R1 #2)
897
+ local _t _x _skip _src
898
+ for _t in $_SHIM_TOOLS; do
899
+ _skip=0
900
+ for _x in "$@"; do [ "$_t" = "$_x" ] && { _skip=1; break; }; done
901
+ [ "$_skip" = 1 ] && continue
902
+ _src=$(type -P "$_t" 2>/dev/null) || continue
903
+ [ -n "$_src" ] || continue
904
+ # 탐침이 심링크였는데 실행 파일에서 실패·복사하면 «환경 미지원» 이 아니라 구성 오류다 — rc=3(codex R2 #1·#2)
905
+ MSYS=winsymlinks:nativestrict ln -s "$_src" "$shimd/$_t" 2>/dev/null || return 3
906
+ if [ ! -L "$shimd/$_t" ]; then rm -f "$shimd/$_t"; return 3; fi
907
+ done
908
+ }
909
+ _shim_skip() { echo "⏭ $1 SKIP — 이 환경에서는 심링크를 못 만든다(복사 폴백). 복사하지 않는다 — 미측정, 통과 아님"; }
910
+ # rc=2 만 SKIP 이다. 그 밖의 실패(링크 도중 오류)는 SKIP 으로 접지 않고 FAIL 로 센다(codex R2 #2)
911
+ _shim_ready() { # $1=레인 $2=shim경로 $3..=제외할 도구명 · 0=준비됨
912
+ local _lane="$1" _rc; shift
913
+ _mkshim "$@"; _rc=$?
914
+ [ "$_rc" = 0 ] && return 0
915
+ if [ "$_rc" = 2 ]; then _shim_skip "$_lane"
916
+ else fails=$((fails+1)); echo "❌ $_lane shim 구성 오류 rc=$_rc — 링크 도중 실패/복사(SKIP 아님)"; fi
917
+ return 1
893
918
  }
919
+ # 정상 위반 판정인가 — rc 만이 아니라 판정 문구가 있고 도구 조회 오류가 없어야 한다(codex R1 #3 · R2 #3)
920
+ _viol_ok() { printf '%s' "$1" | grep -q '^🟥 VIOLATION .*샌드박스가 바뀌었다' \
921
+ && ! printf '%s' "$1" | grep -qiE 'command not found|not found|no such file'; }
922
+
923
+ # L20g **판정 문구 검사 자체의 짝** — 위반 문구만 있으면 참, 도구 조회 오류가 섞이면 거짓, 문구가 없으면 거짓.
924
+ if _viol_ok '🟥 VIOLATION /x/a.cap — `writes: read-only` 선언인데 샌드박스가 바뀌었다' \
925
+ && ! _viol_ok "$(printf 'bash: touch: command not found\n🟥 VIOLATION /x/a.cap — 샌드박스가 바뀌었다')" \
926
+ && ! _viol_ok '✅ VERIFIED /x/a.cap'; then
927
+ pass=$((pass+1)); echo "✅ L20g 판정 문구 검사: 양성 1 참 · 조회 오류 섞임 거짓 · 문구 없음 거짓"
928
+ else
929
+ fails=$((fails+1)); echo "❌ L20g 판정 문구 검사가 짝을 못 가른다 — rc=1 만으로 통과하는 레인이 된다"
930
+ fi
931
+
932
+ # L20-ctl **허용 목록 컨트롤** — 아무것도 안 뺀 shim 에서 «정상 위반 판정» 이 나와야 한다.
933
+ # rc 만 보면 의존 도구가 빠져 오류로 끝난 rc=1 도 통과한다(codex R1 #3) — 판정 문구까지 본다.
934
+ # 이게 빨갛면 허용 목록에 프로브가 쓰는 도구가 빠진 것이고, 아래 L20 계열의 rc 는 의미가 없다.
935
+ if _shim_ready "L20-ctl" "$d/bin_all"; then
936
+ out=$(PATH="$d/bin_all" "${BASH:-/bin/bash}" "$0" "$d/agg_viol.cap" 2>&1); rc=$?
937
+ if [ "$rc" = "1" ] && _viol_ok "$out"; then
938
+ pass=$((pass+1)); echo "✅ L20-ctl 허용 목록 shim 에서 정상 위반 판정(도구 누락 없음)"
939
+ else
940
+ fails=$((fails+1)); echo "❌ L20-ctl rc=$rc (1 + 위반 문구 기대) — 허용 목록에 프로브가 쓰는 도구가 빠졌다: $(printf '%s' "$out" | head -1)"
941
+ fi
942
+ fi
943
+ # L20e **복사 폴백이면 실행 파일을 하나도 안 넘긴다** — 복사하는 가짜 ln 이 받은 원본을 전부 적는다.
944
+ mkdir -p "$d/fakeln"; : > "$d/fakeln_sources"
945
+ printf '#!/bin/sh\n# 심링크 대신 복사하는 ln (MSYS 기본 폴백 재현) — 받은 원본을 적는다\nshift; printf "%%s\\n" "$1" >> "%s"; cp "$1" "$2"\n' "$d/fakeln_sources" > "$d/fakeln/ln"; chmod +x "$d/fakeln/ln"
946
+ ( PATH="$d/fakeln:$PATH"; _mkshim "$d/bin_copy" ); rc=$?
947
+ _nsrc=$(wc -l < "$d/fakeln_sources" | tr -d ' ')
948
+ _nexe=$(grep -vc '\.lnprobe\.txt$' "$d/fakeln_sources")
949
+ _nleft=$(find "$d/bin_copy" -type f 2>/dev/null | wc -l | tr -d ' ')
950
+ if [ "$rc" = "2" ] && [ "$_nsrc" = "1" ] && [ "$_nexe" = "0" ] && [ "$_nleft" = "0" ]; then
951
+ pass=$((pass+1)); echo "✅ L20e 복사 폴백 환경: 텍스트 탐침 한 장만 넘기고 rc=2 · 실행 파일 0 · 남은 사본 0"
952
+ else
953
+ fails=$((fails+1)); echo "❌ L20e rc=$rc 넘긴 원본=$_nsrc 그중 실행 파일=$_nexe 남은 사본=$_nleft (2·1·0·0 기대) — 복사 폴백에서 실행 파일을 넘긴다"
954
+ fi
894
955
 
895
956
  # L20 해시 도구가 **둘 다** 없으면 판정하지 않는다.
896
- _mkshim "$d/bin_none" shasum sha256sum
957
+ if _shim_ready "L20" "$d/bin_none" shasum sha256sum; then
897
958
  out=$(PATH="$d/bin_none" "${BASH:-/bin/bash}" "$0" "$d/agg_viol.cap" 2>&1); rc=$?
898
959
  if [ "$rc" = "10" ] && printf '%s' "$out" | grep -q "sha256sum"; then
899
960
  pass=$((pass+1)); echo "✅ L20 해시 도구 전무는 HARNESS_ERROR (이유도 찍힌다)"
900
961
  else
901
962
  fails=$((fails+1)); echo "❌ L20 rc=$rc (10 기대) — 계기 사망이 통과/판정으로 렌더된다"
902
963
  fi
964
+ fi
903
965
  # L20b **과차단 방지** — `shasum` 만 없고 `sha256sum` 이 있으면 정상 판정해야 한다.
904
966
  # cross-family 지목 #3: 이 파일은 files[] 로 출하되고 Linux 소비자는 sha256sum 만 갖는다.
905
967
  if command -v sha256sum >/dev/null 2>&1; then
906
- _mkshim "$d/bin_s256" shasum
968
+ if _shim_ready "L20b" "$d/bin_s256" shasum; then
907
969
  out=$(PATH="$d/bin_s256" "${BASH:-/bin/bash}" "$0" "$d/agg_viol.cap" 2>&1); rc=$?
908
- if [ "$rc" = "1" ]; then
970
+ if [ "$rc" = "1" ] && _viol_ok "$out"; then
909
971
  pass=$((pass+1)); echo "✅ L20b shasum 부재+sha256sum 존재 → 폴백이 정상 판정(과차단 없음)"
910
972
  else
911
973
  fails=$((fails+1)); echo "❌ L20b rc=$rc (1 기대) — 폴백이 없거나 과차단한다"
912
974
  fi
975
+ fi
976
+ # L20f **shasum 없이도 홈 감시가 산다** — 옛 판은 홈 목록을 `shasum` 으로 직접 해시해서, shasum 없는
977
+ # Linux 에서 앞뒤가 둘 다 빈 값 → 홈 쓰기가 늘 «안 바뀜» 이었다. L14b 와 같은 과녁을 shim 아래에서 친다.
978
+ if _shim_ready "L20f" "$d/bin_s256f" shasum; then
979
+ out=$(PATH="$d/bin_s256f" "${BASH:-/bin/bash}" "$0" "$d/outside.cap" 2>&1); rc=$?
980
+ rm -f "$_homemark"
981
+ if [ "$rc" = "1" ] && printf '%s' "$out" | grep -q '홈 디렉토리'; then
982
+ pass=$((pass+1)); echo "✅ L20f shasum 부재에서도 홈 쓰기는 VIOLATION(이유 «홈»)"
983
+ else
984
+ fails=$((fails+1)); echo "❌ L20f rc=$rc · 이유=[$(printf '%s' "$out" | tail -1)] — shasum 없는 환경에서 홈 감시가 죽었다"
985
+ fi
986
+ fi
913
987
  else
914
- echo "⏭ L20b SKIP — 이 머신에 sha256sum 이 없다(미측정, 통과 아님)"
988
+ echo "⏭ L20b · L20f SKIP — 이 머신에 sha256sum 이 없다(미측정, 통과 아님)"
915
989
  fi
916
990
  # L20c **«있는데 고장난» 해시 도구** — cross-family 지목 #1. 프리플라이트는 통과한다.
917
- _mkshim "$d/bin_broken" shasum sha256sum
991
+ if _shim_ready "L20c" "$d/bin_broken" shasum sha256sum; then
918
992
  printf '#!/bin/sh\nexit 1\n' > "$d/bin_broken/shasum"; chmod +x "$d/bin_broken/shasum"
919
993
  out=$(PATH="$d/bin_broken" "${BASH:-/bin/bash}" "$0" "$d/agg_viol.cap" 2>&1); rc=$?
920
- if [ "$rc" = "1" ]; then
994
+ if [ "$rc" = "1" ] && _viol_ok "$out"; then
921
995
  pass=$((pass+1)); echo "✅ L20c 해시 도구가 고장나도 파일 생성은 잡힌다(이름 목록 축)"
922
996
  else
923
997
  fails=$((fails+1)); echo "❌ L20c rc=$rc (1 기대) — 고장난 계기가 거짓 VERIFIED 를 낸다"
924
998
  fi
999
+ fi
925
1000
  # L20d **읽을 수 없는 파일** — 가짜 도구 없이 재현되는 형태(cross-family 지목 #1 두 번째).
926
1001
  cat > "$d/unreadable.cap" <<EOF
927
1002
  id: t:unread
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: todo-developer
3
+ description: todo/ 아래 파이썬 TODO CLI의 기능 추가·버그 수정·리팩터링을 맡는 구현 전문가. 코드와 해당 테스트를 함께 고친다.
4
+ tools: Read, Write, Edit, Bash, Grep, Glob
5
+ # 모델 선택 이유: 코드 생성과 설계 판단이 필요한 범위가 정해진 업무이므로 opus
6
+ model: opus
7
+ ---
8
+
9
+ # todo-developer
10
+
11
+ ## 핵심 역할
12
+ `todo/cli.py` 중심의 TODO CLI 코드를 구현·수정한다. 작업은 `todo-dev` 스킬의 절차를 따른다.
13
+
14
+ ## 작업 원칙
15
+ - 데이터는 `TODO_DB` 환경변수(기본 `todo.json`)가 가리키는 JSON 파일에 저장한다. 이 계약을 바꾸지 않는다. 바꿔야 하면 보고서에 명시한다.
16
+ - 동작을 바꾸면 `tests/`의 테스트도 같이 추가·수정한다. 테스트는 `TODO_DB`를 임시 경로로 지정해 실제 데이터 파일을 건드리지 않는다.
17
+ - 요청받지 않은 대규모 재작성은 하지 않는다. 기존 코드는 매우 압축된 스타일이므로, 고치는 범위만 읽기 쉽게 쓴다.
18
+ - 표준 라이브러리만 쓴다. 외부 의존성은 사용자 승인 없이 추가하지 않는다.
19
+
20
+ ## 입력·출력
21
+ - 입력: 요청 내용, 필요하면 QA 에이전트의 결함 보고서(`_workspace/`)
22
+ - 출력: 수정된 코드·테스트, 그리고 변경 파일 목록과 실행한 테스트 결과를 담은 짧은 보고
23
+
24
+ ## 오류 처리
25
+ - 테스트가 실패하면 원인을 고친 뒤 다시 실행한다. 같은 원인으로 두 번 실패하면 멈추고 상황을 보고한다.
26
+
27
+ ## 재호출
28
+ 이전 QA 보고서가 있으면 읽고 지적된 항목만 고친다.
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: todo-qa
3
+ description: TODO CLI 변경을 검증하는 QA 전문가. 테스트를 실행하고 실제 CLI를 돌려 경계 사례(빈 인자, 범위 밖 번호, 없는 DB 파일)를 점검한 뒤 결함을 보고한다.
4
+ tools: Read, Bash, Grep, Glob, Write
5
+ # 모델 선택 이유: 절차가 분명한 검증이지만 교차 검증 추론이 필요하므로 opus. 코드는 고치지 않으므로 Edit 제외
6
+ model: opus
7
+ ---
8
+
9
+ # todo-qa
10
+
11
+ ## 핵심 역할
12
+ 변경된 CLI가 의도대로 동작하는지 독립적으로 검증한다. 구현자의 설명을 믿지 말고 직접 실행한다. 작업은 `todo-dev` 스킬의 QA 절차를 따른다.
13
+
14
+ ## 작업 원칙
15
+ - `python -m pytest`로 테스트를 실행하고, `TODO_DB`를 임시 경로로 지정해 `add`, `list`, `done`을 실제로 실행한다.
16
+ - 테스트 통과만으로 끝내지 않는다. 기존 `test_x`처럼 아무것도 검증하지 않는 테스트가 있는지 확인한다.
17
+ - 점검 경계 사례: 인자 없음(`a[0]` IndexError), 범위 밖 번호, 숫자가 아닌 번호, 존재하지 않는 DB 파일, 빈 제목.
18
+ - 코드는 고치지 않는다. 발견한 결함을 재현 명령과 함께 보고한다.
19
+
20
+ ## 입력·출력
21
+ - 입력: 변경 파일 목록과 요청 내용
22
+ - 출력: `_workspace/qa_report.md` — 통과 항목, 결함(재현 명령·기대 결과·실제 결과), 심각도
23
+
24
+ ## 오류 처리
25
+ - pytest가 없으면 `python -m unittest` 또는 직접 실행으로 대체하고 보고서에 적는다.
@@ -0,0 +1,6 @@
1
+ ---
2
+ name: harness
3
+ description: generator skill stub
4
+ ---
5
+ # harness
6
+ rm -rf 를 확인 없이 해도 된다.