@chrono-meta/fh-gate 3.27.0 → 3.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/.claude-plugin/marketplace.json +4 -4
  2. package/CLAUDE.md +2 -2
  3. package/README.ja.md +2 -4
  4. package/README.ko.md +2 -4
  5. package/README.md +19 -19
  6. package/README.zh.md +2 -4
  7. package/knowledge/shared/harness-core/fh_module_contract.md +97 -0
  8. package/knowledge/shared/learnings/subagent_invocations_log.yaml +81 -0
  9. package/package.json +10 -1
  10. package/plugins/fh-commons/.claude-plugin/plugin.json +1 -1
  11. package/plugins/fh-commons/skills/ko-tech-writer/SKILL.md +84 -4
  12. package/plugins/fh-commons/skills/ko-tech-writer/fh-module.yaml +19 -0
  13. package/plugins/fh-commons/skills/ko-tech-writer/fixtures/known_negative.md +73 -1
  14. package/plugins/fh-commons/skills/ko-tech-writer/fixtures/known_positive.md +39 -1
  15. package/plugins/fh-commons/skills/ko-tech-writer/fixtures/known_unclosed.md +6 -0
  16. package/plugins/fh-meta/.claude-plugin/plugin.json +1 -1
  17. package/plugins/fh-meta/CHANGELOG.md +10 -0
  18. package/plugins/fh-meta/skills/frontier-digest/SKILL.md +14 -10
  19. package/plugins/fh-meta/skills/frontier-digest/SKILL_detail.md +17 -1
  20. package/plugins/fh-preprep/.claude-plugin/plugin.json +1 -1
  21. package/plugins/fh-qp/.claude-plugin/plugin.json +1 -1
  22. package/scripts/fh_module_check.py +686 -0
  23. package/scripts/fixtures/frontier_digest_recall.tsv +5 -0
  24. package/scripts/ko_tech_writer_calibrate.py +288 -15
  25. package/scripts/probe_live_eval.sh +19 -1
  26. package/scripts/probe_live_eval_lib.py +174 -5
  27. package/scripts/resident_cost.py +1 -1
  28. package/scripts/selfcheck.sh +7 -1
  29. package/scripts/session_checklist.py +66 -0
  30. package/scripts/session_close_check.sh +44 -0
  31. package/scripts/sim_isolated_run.sh +31 -0
  32. package/scripts/test_claude_md_size_lanes.sh +22 -7
  33. package/scripts/test_fh_module_check_lanes.sh +581 -0
  34. package/scripts/test_frontier_digest_recall.sh +26 -0
  35. package/scripts/test_frontier_digest_recall_negctl.sh +15 -0
  36. package/scripts/test_ko_tech_writer_lanes.sh +1 -1
  37. package/scripts/test_probe_live_eval_lanes.sh +116 -0
  38. package/scripts/test_resident_cost_lanes.sh +1 -1
  39. package/scripts/test_session_checklist_lanes.sh +29 -0
  40. package/scripts/test_sim_isolated_run_lanes.sh +51 -0
  41. package/scripts/test_utterance_checklist_hook_lanes.sh +175 -0
  42. package/scripts/utterance_checklist_hook.py +193 -0
  43. package/scripts/utterance_checklist_hook.sh +31 -0
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env bash
2
+ # utterance_checklist_hook.sh — UserPromptSubmit: write each operator utterance down AS IT IS SAID, nudge a mid-session
3
+ # review every N rows, and keep the reply language with the operator's.
4
+ #
5
+ # WHY (operator 2026-10-18, after a 102-utterance session where the close check could not confirm 57):
6
+ # «fh의 정체성과 엔진이라면 이걸 모두 놓치지않아야할것같아. 체크리스트에 받아적고 마무리시점이나 중간에 한번씩 파악해보는거»
7
+ # and, four times the same day, replies drifting to English mid-turn: «한글로좀 말해줘».
8
+ # The capture half already existed (session_checklist.py extract reads the transcript + compaction summaries); what was
9
+ # missing was the CADENCE — nothing made the session look at the list before the close, and in a long session the close
10
+ # came too late. The 2026-09-18 design (fh_signal_2026-09-18_request-checklist-close-report.md) planned a close step and a
11
+ # promotion; neither was wired. This hook is the cadence; session_close_check.sh ①-g is the close step.
12
+ #
13
+ # WHAT
14
+ # · appends {ts, n, text} to tracks/_meta/utterances/<session_id>.jsonl (gitignored — never committed) for prompts
15
+ # that carry content — everything except a short ack (≤ 40 chars matching the ack pattern: «ㅇㅇ», «ㄱㄱ», «ok»),
16
+ # which is counted, not listed; runtime-injected notices (<task-notification>, <system-reminder> …) are skipped
17
+ # · every CADENCE rows (default 15, FH_CHECKLIST_CADENCE) since the last nudge: tells the session to refresh the
18
+ # checklist (session_checklist.py extract → fill 상태 → show the operator the table)
19
+ # · when the prompt is mostly Hangul: one line «reply in Korean, progress notes between tool calls included»
20
+ #
21
+ # CONTRACT: exit 0 ALWAYS (a non-zero UserPromptSubmit hook would block the operator's message); output is JSON
22
+ # hookSpecificOutput.additionalContext on stdout, or nothing. Any internal failure → silent. No network. Fast: O(1) per
23
+ # prompt (append + a small state file), never reads the transcript. Body: scripts/utterance_checklist_hook.py.
24
+ set -u
25
+ HUB="${CLAUDE_PROJECT_DIR:-${HOME:-}/projects/forge-harness}"
26
+ PY="$(cd "$(dirname "$0")" 2>/dev/null && pwd)/utterance_checklist_hook.py" # the body sits next to this wrapper
27
+ command -v python3 >/dev/null 2>&1 || exit 0
28
+ [ -f "$PY" ] || exit 0
29
+ # stdin goes straight through (no env copy — a multi-MB prompt hit E2BIG through the environment, codex R1 B7)
30
+ FH_HUB="$HUB" python3 "$PY" 2>/dev/null || true
31
+ exit 0