@chrono-meta/fh-gate 2.15.1 → 3.1.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 (134) hide show
  1. package/.claude/regression/probes_live.yaml +137 -0
  2. package/.claude/rules/.residency-patterns.defaults +7 -0
  3. package/.claude/rules/fh_4axis_gate.md +88 -1
  4. package/.claude-plugin/marketplace.json +8 -2
  5. package/AGENTS.md +27 -0
  6. package/CATALOG.md +17 -0
  7. package/CLAUDE.md +13 -3
  8. package/README.ja.md +51 -7
  9. package/README.ko.md +48 -7
  10. package/README.md +43 -6
  11. package/README.zh.md +45 -8
  12. package/docs/STANDARDS_ALIGNMENT.md +61 -0
  13. package/docs/USER_GUIDE.md +3 -0
  14. package/docs/USE_CASES.md +50 -0
  15. package/docs/model_tier_expectations.md +60 -0
  16. package/knowledge/shared/harness-core/fh_three_layer_canon.md +77 -10
  17. package/knowledge/shared/harness-core/field_verdict_crossfamily_gate.md +18 -0
  18. package/knowledge/shared/harness-core/harness_incubator_doctrine.md +9 -0
  19. package/knowledge/shared/harness-core/iso_ai_standards_crosswalk.md +139 -0
  20. package/knowledge/shared/harness-core/measurement-integrity-checklist.md +35 -1
  21. package/knowledge/shared/harness-core/ship_readiness_gate.md +19 -2
  22. package/knowledge/shared/learnings/subagent_invocations_log.yaml +489 -3
  23. package/package.json +48 -2
  24. package/plugins/fh-commons/.claude-plugin/plugin.json +1 -1
  25. package/plugins/fh-commons/skills/preprep/README.md +4 -1
  26. package/plugins/fh-commons/skills/preprep/SKILL.md +99 -3
  27. package/plugins/fh-commons/skills/preprep/diagram_from_json.py +154 -0
  28. package/plugins/fh-commons/skills/preprep/fixtures/fixture_R3_negative.pptx +0 -0
  29. package/plugins/fh-commons/skills/preprep/fixtures/fixture_R3_positive.pptx +0 -0
  30. package/plugins/fh-commons/skills/preprep/fixtures/mk_slide_fixtures.py +179 -0
  31. package/plugins/fh-commons/skills/preprep/interslide_deps.py +98 -9
  32. package/plugins/fh-commons/skills/preprep/lane_adjacent_dup.py +4 -1
  33. package/plugins/fh-commons/skills/preprep/lane_diagram.py +95 -0
  34. package/plugins/fh-commons/skills/preprep/lane_geometry.py +181 -0
  35. package/plugins/fh-commons/skills/preprep/lane_promise.py +4 -1
  36. package/plugins/fh-commons/skills/preprep/lane_slide_refs.py +134 -0
  37. package/plugins/fh-commons/skills/preprep/lane_slide_relations.py +300 -0
  38. package/plugins/fh-commons/skills/preprep/preprep.py +129 -8
  39. package/plugins/fh-commons/skills/preprep/preprep_wire.py +210 -0
  40. package/plugins/fh-commons/skills/preprep/presentation_checklist.md +4 -0
  41. package/plugins/fh-commons/skills/preprep/surfaces.example.yaml +18 -0
  42. package/plugins/fh-commons/skills/preprep/test_preprep_lanes_rp.py +184 -0
  43. package/plugins/fh-meta/.claude-plugin/plugin.json +1 -1
  44. package/plugins/fh-meta/CHANGELOG.md +67 -0
  45. package/plugins/fh-meta/skills/auto-decorrelation/SKILL.md +87 -2
  46. package/plugins/fh-meta/skills/frontier-digest/SKILL.md +2 -2
  47. package/plugins/fh-meta/skills/frontier-digest/SKILL_detail.md +25 -5
  48. package/plugins/fh-meta/skills/hub-cc-pr-reviewer/SKILL.md +11 -0
  49. package/plugins/fh-meta/skills/hub-cc-pr-reviewer/SKILL_detail.md +3 -0
  50. package/plugins/fh-qp/.claude-plugin/plugin.json +22 -0
  51. package/plugins/fh-qp/README.md +71 -0
  52. package/plugins/fh-qp/fixtures/evidence_known_clean.txt +3 -0
  53. package/plugins/fh-qp/fixtures/evidence_known_dirty.txt +6 -0
  54. package/plugins/fh-qp/fixtures/reach_known_partial.tsv +4 -0
  55. package/plugins/fh-qp/fixtures/reach_known_reached.tsv +4 -0
  56. package/plugins/fh-qp/fixtures/reach_known_wall.tsv +3 -0
  57. package/plugins/fh-qp/fixtures/verdicts_known_bad_branch.tsv +2 -0
  58. package/plugins/fh-qp/fixtures/verdicts_known_bad_vacuous_machine.tsv +2 -0
  59. package/plugins/fh-qp/fixtures/verdicts_known_good.tsv +4 -0
  60. package/plugins/fh-qp/fixtures/verdicts_verify_only.tsv +3 -0
  61. package/plugins/fh-qp/qp_profile.example.yaml +29 -0
  62. package/plugins/fh-qp/scripts/qp_tools.sh +216 -0
  63. package/plugins/fh-qp/skills/qp/SKILL.md +65 -0
  64. package/plugins/fh-qp/skills/qp-plan/SKILL.md +42 -0
  65. package/plugins/fh-qp/skills/qp-regress/SKILL.md +45 -0
  66. package/plugins/fh-qp/skills/qp-run/SKILL.md +49 -0
  67. package/scripts/backtick_guard.sh +194 -0
  68. package/scripts/chamber_run.sh +14 -5
  69. package/scripts/com.forge-harness.live-eval.plist +84 -0
  70. package/scripts/compaction_probe.sh +9 -35
  71. package/scripts/context_continuity_score.sh +49 -7
  72. package/scripts/directional_diff_gate.sh +14 -2
  73. package/scripts/fh-gate.sh +3 -3
  74. package/scripts/files_manifest_shipping_check.sh +19 -0
  75. package/scripts/frontier_digest_autopilot.sh +4 -1
  76. package/scripts/gate_pathspec_check.sh +1 -1
  77. package/scripts/map_postprocess.py +90 -0
  78. package/scripts/outbound_query_guard.sh +131 -0
  79. package/scripts/outbound_query_hook.sh +373 -0
  80. package/scripts/package_coverage_check.sh +79 -18
  81. package/scripts/pipe_verdict_guard.sh +41 -1
  82. package/scripts/probe_live_eval.sh +240 -0
  83. package/scripts/probe_live_eval_lib.py +579 -0
  84. package/scripts/proposal_hook.sh +192 -0
  85. package/scripts/public_surface_scan_files.sh +11 -2
  86. package/scripts/push_zone_check.sh +78 -0
  87. package/scripts/residency_closure_scan.py +252 -0
  88. package/scripts/revert_probe.sh +250 -0
  89. package/scripts/selfcheck.sh +106 -3
  90. package/scripts/session_close_check.sh +100 -0
  91. package/scripts/sim_isolated_run.sh +195 -9
  92. package/scripts/test_action_yml_lanes.sh +97 -0
  93. package/scripts/test_backtick_guard_lanes.sh +115 -0
  94. package/scripts/test_degrade_scan_shell_probes.sh +7 -7
  95. package/scripts/test_fh_qp_lanes.sh +105 -0
  96. package/scripts/test_files_manifest_shipping_lanes.sh +5 -5
  97. package/scripts/test_gate_two_verdicts_lanes.sh +139 -0
  98. package/scripts/test_heavy_classifier_lanes.sh +1 -1
  99. package/scripts/test_lane_runner_lanes.sh +59 -33
  100. package/scripts/test_map_postprocess_lanes.sh +143 -0
  101. package/scripts/test_mapped_tracks_lanes.sh +1 -1
  102. package/scripts/test_marker_affected_lanes.sh +93 -0
  103. package/scripts/test_marker_crossfamily_lanes.sh +90 -6
  104. package/scripts/test_marker_oracle_lanes.sh +136 -0
  105. package/scripts/test_marker_soul_check_lanes.sh +24 -0
  106. package/scripts/test_node_check_lanes.sh +34 -34
  107. package/scripts/test_outbound_query_hook_lanes.sh +433 -0
  108. package/scripts/test_outbound_query_lanes.sh +87 -0
  109. package/scripts/test_package_coverage_lanes.sh +53 -27
  110. package/scripts/test_pipe_verdict_guard_lanes.sh +31 -5
  111. package/scripts/test_precommit_pointer_index_lanes.sh +33 -0
  112. package/scripts/test_preprep_diagram_lanes.sh +87 -0
  113. package/scripts/test_preprep_drift_anchor.sh +16 -7
  114. package/scripts/test_preprep_drift_anchor_lanes.sh +23 -0
  115. package/scripts/test_preprep_slide_refs_lanes.sh +169 -0
  116. package/scripts/test_probe_live_eval_lanes.sh +437 -0
  117. package/scripts/test_proposal_hook_lanes.sh +57 -0
  118. package/scripts/test_push_zone_lanes.sh +304 -0
  119. package/scripts/test_residency_closure_lanes.sh +70 -0
  120. package/scripts/test_revert_probe_lanes.sh +146 -0
  121. package/scripts/test_session_close_lanes.sh +3 -5
  122. package/scripts/test_sim_isolated_run_lanes.sh +136 -0
  123. package/scripts/test_utterance_intake_lanes.sh +414 -0
  124. package/scripts/test_worktree_reclaim_lanes.sh +70 -0
  125. package/scripts/transcript_utterances.py +222 -0
  126. package/scripts/utterance_intake.sh +424 -0
  127. package/scripts/utterance_landing_check.sh +2 -2
  128. package/scripts/validate_yaml.sh +27 -0
  129. package/scripts/worktree_reclaim.sh +95 -0
  130. package/templates/.git-hooks/pre-commit +380 -5
  131. package/templates/.git-hooks/pre-push +91 -0
  132. package/templates/RED_TEAM_REPORT.md +49 -0
  133. package/templates/settings.PreToolUse.snippet.json +101 -1
  134. package/plugins/fh-commons/README.md +0 -38
@@ -50,7 +50,82 @@
50
50
  "built on a 46-PR-behind clone and manufactured a duplicate of an upstream lane. found→extend",
51
51
  "applies at repo level; this is its mechanical layer. Same advisory contract; fail-open on",
52
52
  "every uncertainty (non-repo, no upstream, fetch failure).",
53
- " bash scripts/test_stale_clone_guard_lanes.sh # expect: all known pairs hold (count self-reported)"
53
+ " bash scripts/test_stale_clone_guard_lanes.sh # expect: all known pairs hold (count self-reported)",
54
+ "",
55
+ "FOURTH GUARD, Bash matcher — backtick_guard.sh (added 2026-09-03, weekly_audit_2026-09-02 HIGH #1):",
56
+ "advisory when a Bash call carries a backtick inside a shell DOUBLE-QUOTING context — an unquoted",
57
+ "heredoc body (<<EOF) or a \"double-quoted string\". There a backtick is command substitution: the text",
58
+ "between the backticks is REPLACED by the command's output — empty when it names no command, so the",
59
+ "text is silently DELETED and the record commits with a hole (every record hook checks presence, not",
60
+ "completeness). Measured 7x 2026-08-10..09-02 with a resident memory rule that failed each time because",
61
+ "the actor's task had a different name than the rule's title. Quote-aware state machine, not a regex:",
62
+ "single-quoted text, quoted heredocs (<<'EOF'), and escaped backticks are CLEAN. Same advisory contract;",
63
+ "escalate with FH_BACKTICK_BLOCK=1; opt out with `# noqa: backtick` (whole payload).",
64
+ " bash scripts/test_backtick_guard_lanes.sh # expect: all known pairs hold (count self-reported)",
65
+ "",
66
+ "FIFTH GUARD, Edit|Write|Bash matcher — proposal_hook.sh (added 2026-09-03, identity ⑤ r4):",
67
+ "advisory when a verdict/guard line in scripts/**/*.sh or templates/*.sh is about to change: puts ONE",
68
+ "instruction into the model context — offer the user a known-pair control + degrade_direction_scan.sh in",
69
+ "one line. Measured: the same rule as a CLAUDE.md table row fired 1/15 at floor tier (r3); as this hook",
70
+ "9/9 relay on editing reps and 0/5 on a usage-string edit (r4). Quote-aware: an edit confined to quoted",
71
+ "strings does not fire. Bash path (sed -i / > / tee into a .sh) covered with a weaker rule (named",
72
+ "residual in the script header). Evidence row in .claude/.proposal_hook_events.tsv. Relaying an",
73
+ "injected instruction is not initiative — see the r4 RESULT for what this does and does not claim.",
74
+ " bash scripts/test_proposal_hook_lanes.sh # expect: all known pairs hold (count self-reported)",
75
+ "",
76
+ "SIXTH GUARD, WebSearch|WebFetch matcher — outbound_query_hook.sh (added 2026-09-05):",
77
+ "the FIRST hook here that can emit permissionDecision:\"deny\", so read its degrade direction before",
78
+ "wiring it. WHAT IT GUARDS: a WebSearch/WebFetch query is an OUTBOUND, IRREVERSIBLE act — if the",
79
+ "string names an internal asset, the query IS the leak (CLAUDE.md §Field-Harness Diagnostic: internal",
80
+ "names never reach a log, a comment or a paste). scripts/outbound_query_guard.sh has owned that lint",
81
+ "since 2026-08-21 with ZERO callers, and its own header says so; this is its wiring. A repo scanner",
82
+ "cannot see an interactively-composed query, so the guard belongs on the call — same reasoning as",
83
+ "pipe_verdict_guard's.",
84
+ "",
85
+ "TWO LAYERS, AND ONLY ONE OF THEM DENIES. The CLI guard fail-closes when the operator's gitignored",
86
+ "override layer is absent. Correct for a CLI you type; wrong for a hook, because in a consumer",
87
+ "install that layer is absent BY CONSTRUCTION — importing that contract would deny every consumer's",
88
+ "WebSearch, and the bypass it would train is turning hooks off, disarming the destructive-op and",
89
+ "confidentiality guards riding the same channel. So:",
90
+ " override-layer hit -> deny (the operator's own internal literals)",
91
+ " defaults-layer hit -> advisory (universal shapes; FP-prone, and all a consumer has)",
92
+ " no override present -> advisory + a once-per-session UNCALIBRATED notice (a defaults-only scan",
93
+ " cannot say \"no internal tokens\", only \"no universal shapes\")",
94
+ " instrument incomplete-> deny (NOT SCANNED is not clean; irreversible surface fails CLOSED)",
95
+ " not an FH checkout -> silent (mechanical test: is the tracked defaults file here?)",
96
+ " hook command absent -> the tool RUNS. A PreToolUse command that cannot be found is a non-blocking",
97
+ " error, so on a consumer install where scripts/outbound_query_hook.sh is not at",
98
+ " $CLAUDE_PROJECT_DIR/scripts/ the deny you think you wired is fail-OPEN (cross-family",
99
+ " review, 2026-09-05). Same contract as the five guards above, but this one denies,",
100
+ " so VERIFY after wiring: echo '{}' | bash \"$CLAUDE_PROJECT_DIR/scripts/outbound_query_hook.sh\"; echo rc=$?",
101
+ " rc=0 and no output = resolved and silent on an empty payload; 'No such file' = not wired.",
102
+ "The layer is decided by comparing hit COUNTS across two scans (full set, then defaults-only). A",
103
+ "boolean would collapse \"both layers hit\" into \"defaults hit\" and silently downgrade a real deny.",
104
+ "",
105
+ "🟥 THE OUTPUT NEVER CARRIES THE TOKEN VALUE — only the count and the severity label. A leak guard",
106
+ "that echoes the token into its own deny reason or log is the leak channel. Lane H10 asserts the",
107
+ "fixture token appears on no output surface (stdout, stderr, event log).",
108
+ "",
109
+ "Opt out on one call by putting `# noqa: outbound` in the query. That channel is gameable, which is",
110
+ "exactly why it writes a log row — an invisible bypass is worse than a recorded one. Evidence rows in",
111
+ ".claude/.outbound_hook_events.tsv: ts, tool, verdict(deny|advisory|clean|noqa|na), layer, and the",
112
+ "tool_input KEY NAMES (schema, never content) — the official hooks reference does not document",
113
+ "WebSearch/WebFetch tool_input keys, so the hook scans every string value rather than hardcoding a",
114
+ "key name that would fail SILENTLY OPEN, and logs the observed shape so it becomes measured.",
115
+ "",
116
+ "🟥 ADD THESE TWO TO YOUR .gitignore WHEN YOU WIRE THIS — the hook writes them on every matched",
117
+ "call and they are not tracked content:",
118
+ " .claude/.outbound_hook_events.tsv",
119
+ " .claude/.outbound_hook_uncalibrated_notice",
120
+ "Missed on the first build; a clean-clone run flagged both as tree contamination, which is also",
121
+ "what a consumer's `git status` would have shown after their first WebSearch.",
122
+ "",
123
+ "Verify after wiring (known pair, both directions):",
124
+ " bash scripts/test_outbound_query_hook_lanes.sh # expect: all known pairs hold (count self-reported)",
125
+ " printf '%s' '{\"tool_name\":\"WebSearch\",\"tool_input\":{\"query\":\"bash printf portability\"}}' \\",
126
+ " | bash scripts/outbound_query_hook.sh # expect: NO output (a clean query is silent)",
127
+ " bash scripts/test_outbound_query_lanes.sh # the CLI twin, for outbound paths this hook",
128
+ " # does NOT cover (curl / external CLIs via Bash)"
54
129
  ],
55
130
  "project_settings_json": {
56
131
  "hooks": {
@@ -67,6 +142,11 @@
67
142
  "type": "command",
68
143
  "command": "bash \"$CLAUDE_PROJECT_DIR/scripts/destructive_pre_gate.sh\"",
69
144
  "timeout": 5
145
+ },
146
+ {
147
+ "type": "command",
148
+ "command": "bash \"$CLAUDE_PROJECT_DIR/scripts/backtick_guard.sh\"",
149
+ "timeout": 5
70
150
  }
71
151
  ]
72
152
  },
@@ -79,6 +159,26 @@
79
159
  "timeout": 20
80
160
  }
81
161
  ]
162
+ },
163
+ {
164
+ "matcher": "Edit|Write|Bash",
165
+ "hooks": [
166
+ {
167
+ "type": "command",
168
+ "command": "bash \"$CLAUDE_PROJECT_DIR/scripts/proposal_hook.sh\"",
169
+ "timeout": 5
170
+ }
171
+ ]
172
+ },
173
+ {
174
+ "matcher": "WebSearch|WebFetch",
175
+ "hooks": [
176
+ {
177
+ "type": "command",
178
+ "command": "bash \"$CLAUDE_PROJECT_DIR/scripts/outbound_query_hook.sh\"",
179
+ "timeout": 5
180
+ }
181
+ ]
82
182
  }
83
183
  ]
84
184
  }
@@ -1,38 +0,0 @@
1
- # fh-commons — Contention-Born Skill Habitat
2
-
3
- **A different layer of plugin from fh-meta.**
4
-
5
- fh-meta = meta-engineering skills for operating, diagnosing, and improving the harness itself
6
- fh-commons = general-purpose utility skills born from the contention layer, transplantable to any project
7
-
8
- ## Placement Criteria
9
-
10
- When the `contention-layer` skill harvests contentions and generates new skill candidates:
11
-
12
- | Determination | Destination |
13
- |---|---|
14
- | Harness engineering in nature | `fh-meta` |
15
- | Project-general · domain-agnostic | **`fh-commons`** (this plugin) |
16
- | Domain/team specific | field harvest (decided by the field team) |
17
-
18
- ## Skill List
19
-
20
- | Skill | Description | Contention Parent |
21
- |---|---|---|
22
- | `convergence-loop` | General-purpose gate reinforcement that replaces single-pass structures with a convergence loop of up to N rounds | harvest-loop (recurring single-pass-distrust pattern across hub gates) |
23
- | `deliberation` | Innovator → Devil-Advocate → Mediator 3-layer multi-perspective synthesis. Generates conditional verdicts without binary win/loss | Migrated from fh-meta (2026-05-23 — domain-agnostic general decision structure) |
24
- | `ko-tech-writer` | Korean technical-writing pipeline — register detection, venue calibration, translationese scan, honesty layering, number/claim gate, perceptual QA | Field-session harvest (2026-08-10 — conference tech-doc revision session, operator-driven shipping) |
25
-
26
- ## The `origin` Field
27
-
28
- Commons skills include the following fields in their SKILL.md frontmatter:
29
-
30
- ```yaml
31
- # Contention-born (extracted by contention-layer)
32
- origin: contention-layer
33
- contention-parents: [skill-A, skill-B]
34
-
35
- # Migrated from fh-meta (reclassified as general-purpose)
36
- origin: fh-meta
37
- migration: "YYYY-MM-DD — reason for migration"
38
- ```