@chrono-meta/fh-gate 3.44.0 → 3.45.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 (89) hide show
  1. package/.claude/rules/fh_4axis_gate.md +50 -608
  2. package/.claude-plugin/marketplace.json +4 -4
  3. package/CATALOG.md +21 -0
  4. package/CHEATSHEET.md +7 -1
  5. package/docs/codex-compat.md +1 -1
  6. package/knowledge/shared/harness-core/fh_4axis_gate_detail.md +679 -0
  7. package/knowledge/shared/harness-core/fh_integration_contract.md +1 -1
  8. package/knowledge/shared/harness-core/fh_module_contract.md +106 -3
  9. package/knowledge/shared/harness-core/heavy_skill_to_cartridge.md +185 -0
  10. package/knowledge/shared/learnings/subagent_invocations_log.yaml +209 -0
  11. package/package.json +17 -1
  12. package/plugins/fh-commons/.claude-plugin/plugin.json +1 -1
  13. package/plugins/fh-commons/skills/ko-tech-writer/SKILL.md +9 -8
  14. package/plugins/fh-commons/skills/ko-tech-writer/SKILL_detail.md +20 -0
  15. package/plugins/fh-meta/.claude-plugin/plugin.json +1 -1
  16. package/plugins/fh-meta/CHANGELOG.md +95 -0
  17. package/plugins/fh-meta/skills/auto-decorrelation/SKILL.md +13 -0
  18. package/plugins/fh-meta/skills/install-wizard/SKILL_detail.md +4 -0
  19. package/plugins/fh-meta/skills/steel-quench/SKILL_detail.md +2 -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/agy_launch_guard.sh +117 -1
  23. package/scripts/below_floor_scan.sh +30 -0
  24. package/scripts/codex_launch_guard.sh +38 -2
  25. package/scripts/correction_moments.py +23 -2
  26. package/scripts/fh-gate.sh +612 -14
  27. package/scripts/fh-goal.sh +56 -12
  28. package/scripts/fh-run.sh +1 -1
  29. package/scripts/fh_gate_exec.sh +272 -0
  30. package/scripts/fh_session_load.sh +17 -0
  31. package/scripts/finding_fleet.sh +2 -1
  32. package/scripts/finding_verifier.sh +2 -1
  33. package/scripts/fixtures/heavy_skill_smell/clean/tidy-notes/README.md +16 -0
  34. package/scripts/fixtures/heavy_skill_smell/clean/tidy-notes/scripts/check_refs.py +12 -0
  35. package/scripts/fixtures/heavy_skill_smell/clean/tidy-notes/scripts/test_check_refs.py +24 -0
  36. package/scripts/fixtures/heavy_skill_smell/clean/tidy-notes/skills/tidy-notes/SKILL.md +16 -0
  37. package/scripts/fixtures/heavy_skill_smell/clean/tidy-notes/skills/tidy-notes/fh-module.yaml +20 -0
  38. package/scripts/fixtures/heavy_skill_smell/heavy/docs-publisher-pro/SKILL.md +25 -0
  39. package/scripts/fixtures/heavy_skill_smell/heavy/docs-publisher-pro/hooks/hooks.json +7 -0
  40. package/scripts/fixtures/heavy_skill_smell/heavy/docs-publisher-pro/scripts/check_links.py +25 -0
  41. package/scripts/fixtures/heavy_skill_smell/heavy/docs-publisher-pro/scripts/publish.sh +9 -0
  42. package/scripts/fixtures/heavy_skill_smell/heavy/docs-publisher-pro/scripts/publish_guard.py +6 -0
  43. package/scripts/fixtures/heavy_skill_smell/heavy/docs-publisher-pro/scripts/setup.sh +5 -0
  44. package/scripts/fixtures/heavy_skill_smell/heavy/release-notes-pro/SKILL.md +25 -0
  45. package/scripts/fixtures/heavy_skill_smell/heavy/release-notes-pro/hooks/hooks.json +10 -0
  46. package/scripts/fixtures/heavy_skill_smell/heavy/release-notes-pro/scripts/check_refs.py +12 -0
  47. package/scripts/fixtures/heavy_skill_smell/heavy/release-notes-pro/scripts/guard_push.py +9 -0
  48. package/scripts/fixtures/heavy_skill_smell/heavy/release-notes-pro/scripts/install.sh +6 -0
  49. package/scripts/fixtures/heavy_skill_smell/heavy/release-notes-pro/scripts/ship.sh +9 -0
  50. package/scripts/heavy_skill_smell.py +311 -0
  51. package/scripts/job_heartbeat.py +186 -0
  52. package/scripts/live_eval_matrix.py +128 -0
  53. package/scripts/live_eval_trace.py +176 -1
  54. package/scripts/package_coverage_check.sh +18 -0
  55. package/scripts/prepush_guard_check.sh +8 -0
  56. package/scripts/probe_live_eval.sh +32 -0
  57. package/scripts/probe_live_eval_lib.py +8 -2
  58. package/scripts/selfcheck.sh +111 -0
  59. package/scripts/selfcheck_shard_weights.txt +2 -0
  60. package/scripts/sidecar_calibrate.sh +7 -5
  61. package/scripts/sim_isolated_run.sh +20 -0
  62. package/scripts/test_agy_launch_guard_lanes.sh +120 -0
  63. package/scripts/test_below_floor_scan_lanes.sh +85 -0
  64. package/scripts/test_codex_launch_guard_lanes.sh +45 -0
  65. package/scripts/test_correction_moments_lanes.sh +37 -0
  66. package/scripts/test_fh_gate_absorb_lanes.sh +255 -0
  67. package/scripts/test_fh_gate_defaults_lanes.sh +169 -0
  68. package/scripts/test_fh_gate_exec_lanes.sh +244 -0
  69. package/scripts/test_fh_gate_fusion_lanes.sh +202 -0
  70. package/scripts/test_fh_gate_regressions.sh +92 -1
  71. package/scripts/test_fh_goal_change_detection_lanes.sh +103 -3
  72. package/scripts/test_finding_pipeline_lanes.sh +35 -1
  73. package/scripts/test_guard_anchor_override_env_lanes.sh +84 -0
  74. package/scripts/test_heavy_skill_smell_lanes.sh +160 -0
  75. package/scripts/test_job_heartbeat_lanes.sh +96 -0
  76. package/scripts/test_live_eval_construct_lanes.sh +29 -6
  77. package/scripts/test_live_eval_matrix_lanes.sh +53 -0
  78. package/scripts/test_live_eval_trace_lanes.sh +112 -5
  79. package/scripts/test_name_boundary_locale_lanes.sh +36 -5
  80. package/scripts/test_prepush_marker_lookup_lanes.sh +143 -0
  81. package/scripts/test_probe_live_eval_lanes.sh +43 -0
  82. package/scripts/test_regression_guard_sibling_lanes.sh +52 -1
  83. package/scripts/test_sidecar_calibrate_lanes.sh +1 -1
  84. package/scripts/test_sim_isolated_run_lanes.sh +43 -0
  85. package/scripts/universal_guard_check.sh +8 -0
  86. package/templates/.claude/rules/mcp_tool_gating.md +27 -0
  87. package/templates/.git-hooks/pre-push +60 -3
  88. package/templates/regression_guard.sh +8 -4
  89. package/templates/settings.LaneGap.snippet.json +27 -0
@@ -14,6 +14,15 @@ What it claims and what it does not:
14
14
  · "recurring" = two cue hits on different days that share >= --min-shared content words. Word
15
15
  overlap is a candidate filter, not a topic judgment — the reader decides whether a group is one rule.
16
16
  · every exclusion is counted and printed (malformed rows, short rows), never dropped silently.
17
+ · scheduled-trigger prompts (cron / self-scheduled check-ins) land in the ledger as if the operator
18
+ typed them. A row is a `repeated-prompt` (excluded, counted) when its whole text — whitespace
19
+ collapsed, digits removed so a time or counter inside it does not hide the repeat — is at least
20
+ REPEAT_MIN_CHARS long and occurs >= REPEAT_MIN times across ALL parseable ledger rows (counted
21
+ before --since, so the verdict does not depend on the window). Short texts are never excluded:
22
+ a short correction said three times is the signal this tool exists for. 2026-11-20 weekly audit:
23
+ 24 of 24 «recurring pairs» were two cron prompts pairing on «linked list_sessions».
24
+ Residual: a long correction pasted verbatim three times is excluded (counted, so it is visible);
25
+ a cron prompt over MAX_CHARS is counted under `long`, not here.
17
26
 
18
27
  usage: python3 scripts/correction_moments.py [ledger_dir] [--since YYYY-MM-DD] [--min-shared N] [--all]
19
28
  exit: 0 = ran · 2 = ledger dir missing or holds no rows (NOT a "no corrections" result)
@@ -27,6 +36,8 @@ STOP = set("그리고 그런데 그러면 이거 이건 그거 그건 저거 지
27
36
  "있어 있는 없어 없는 아니 아냐 아니야 아니라 말고 다시 정정 해줘 해봐 한번 모두 전부 같은 같아 "
28
37
  "this that with from have what when which there would could about into than then also only does your will".split())
29
38
  MIN_CHARS = 6
39
+ REPEAT_MIN_CHARS = 40 # shorter texts are never treated as scheduled prompts
40
+ REPEAT_MIN = 3 # occurrences across all ledger rows that make a text a scheduled prompt
30
41
  MAX_CHARS = 600 # longer rows are almost always pasted reports or documents, not a correction in the operator's words
31
42
 
32
43
 
@@ -54,6 +65,8 @@ def main(argv):
54
65
  min_shared = int(opt.get("--min-shared", "2"))
55
66
  files = sorted(glob.glob(os.path.join(d, "*.jsonl")))
56
67
  rows, bad, short, envelope, long_ = [], 0, 0, 0, 0
68
+ norm = lambda t: re.sub(r"\d+", "", " ".join(t.split()))
69
+ seen = {}
57
70
  for f in files:
58
71
  sess = os.path.basename(f)[:8]
59
72
  for line in open(f, encoding="utf-8", errors="replace"):
@@ -64,6 +77,7 @@ def main(argv):
64
77
  t, ts = x.get("text"), x.get("ts")
65
78
  if not isinstance(t, str) or not isinstance(ts, str):
66
79
  bad += 1; continue
80
+ seen[norm(t)] = seen.get(norm(t), 0) + 1
67
81
  if ts[:10] < since:
68
82
  continue
69
83
  if t.lstrip().startswith("<"):
@@ -74,6 +88,13 @@ def main(argv):
74
88
  if len(t) > MAX_CHARS:
75
89
  long_ += 1; continue
76
90
  rows.append((ts, sess, t))
91
+ is_rep = lambda t: len(norm(t)) >= REPEAT_MIN_CHARS and seen[norm(t)] >= REPEAT_MIN
92
+ repeated = sum(1 for _, _, t in rows if is_rep(t))
93
+ rows = [r for r in rows if not is_rep(r[2])]
94
+ if not rows and repeated:
95
+ print("⬜ every row is a repeated scheduled prompt (repeated-prompt=%d, envelope=%d short=%d long=%d malformed=%d)"
96
+ " — NOT MEASURED, not «no corrections»" % (repeated, envelope, short, long_, bad))
97
+ return 2
77
98
  if not rows:
78
99
  print("⬜ no ledger rows under %s (files=%d) — NOT MEASURED, not «no corrections»" % (d, len(files)))
79
100
  return 2
@@ -94,9 +115,9 @@ def main(argv):
94
115
  recurring.sort(key=lambda p: -len(p[2]))
95
116
  days = sorted({r[0][:10] for r in rows})
96
117
  print("# correction moments — %s .. %s (%d days)" % (days[0], days[-1], len(days)))
97
- print("ledgers=%d · utterances=%d · excluded: envelope=%d short(<%d chars)=%d long(>%d chars)=%d malformed=%d · cue hits=%d · "
118
+ print("ledgers=%d · utterances=%d · excluded: envelope=%d short(<%d chars)=%d long(>%d chars)=%d malformed=%d repeated-prompt=%d · cue hits=%d · "
98
119
  "recurring pairs (different days, >=%d shared words)=%d · re-pasted pairs dropped=%d" % (len(files), len(rows), envelope, MIN_CHARS, short, MAX_CHARS, long_, bad,
99
- len(hits), min_shared, len(recurring), repaste))
120
+ repeated, len(hits), min_shared, len(recurring), repaste))
100
121
  print("limits: cue-word recall only (a correction with no cue word is invisible — e.g. «영어로 써졌네», 2026-10-18) · word overlap is a candidate filter\n")
101
122
  for k, (i, j, sh) in enumerate(recurring, 1):
102
123
  print("## R%d — shared: %s" % (k, " ".join(sorted(sh)[:8])))