@chrono-meta/fh-gate 1.4.72 → 1.4.74

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 (51) hide show
  1. package/.claude/rules/.public-surface-patterns.defaults +44 -0
  2. package/.claude/rules/fh_4axis_gate.md +207 -0
  3. package/.claude-plugin/marketplace.json +2 -2
  4. package/AGENTS.md +26 -2
  5. package/CATALOG.md +31 -0
  6. package/docs/ETHOS.md +106 -0
  7. package/docs/OUTPUT_EVIDENCE.md +118 -0
  8. package/docs/WHY.md +42 -0
  9. package/knowledge/patterns/ensemble_union_detection_task_pattern.md +125 -0
  10. package/knowledge/shared/GLOSSARY.md +77 -0
  11. package/knowledge/shared/harness-core/measurement-integrity-checklist.md +10 -0
  12. package/knowledge/shared/learnings/subagent_invocations_log.yaml +554 -0
  13. package/knowledge/shared/patterns/multi-persona-review.md +88 -0
  14. package/knowledge/shared/plugin-catalog/recommended_plugins.md +117 -0
  15. package/package.json +42 -1
  16. package/plugins/fh-commons/.claude-plugin/plugin.json +1 -1
  17. package/plugins/fh-meta/.claude-plugin/plugin.json +2 -2
  18. package/plugins/fh-meta/CHANGELOG.md +617 -0
  19. package/plugins/fh-meta/skills/context-doctor/SKILL.md +42 -4
  20. package/plugins/fh-meta/skills/context-doctor/SKILL_detail.md +38 -0
  21. package/scripts/below_floor_scan.sh +91 -0
  22. package/scripts/chamber_candidate_collect.sh +223 -0
  23. package/scripts/chamber_run.sh +184 -0
  24. package/scripts/degrade_direction_scan.sh +222 -0
  25. package/scripts/fh_env_delta_scan.sh +108 -0
  26. package/scripts/fh_session_load.sh +202 -0
  27. package/scripts/gate_pathspec_check.sh +166 -0
  28. package/scripts/package_coverage_check.sh +119 -0
  29. package/scripts/prepush_guard_check.sh +374 -0
  30. package/scripts/psa_scan_lib.sh +153 -0
  31. package/scripts/public_surface_scan_files.sh +157 -0
  32. package/scripts/selfcheck.sh +28 -0
  33. package/scripts/session_close_check.sh +171 -0
  34. package/scripts/substrate_jump_detector.sh +60 -0
  35. package/scripts/test_degrade_scan_shell_probes.sh +185 -0
  36. package/scripts/test_marker_floor_lanes.sh +45 -0
  37. package/scripts/test_prepush_stdin_integrity.sh +119 -0
  38. package/scripts/tier_census_grep.sh +54 -0
  39. package/scripts/universal_guard_check.sh +280 -0
  40. package/templates/.claude/rules/mcp_tool_gating.md +157 -0
  41. package/templates/.claude/rules/session.md +153 -0
  42. package/templates/.git-hooks/pre-commit +848 -0
  43. package/templates/.git-hooks/pre-push +585 -0
  44. package/templates/PRE-PUBLISH-CHECKLIST.md +85 -0
  45. package/templates/contrib_session.md +34 -0
  46. package/templates/degrade_direction_scan.sh +222 -0
  47. package/templates/goal-quench-hook-setup.md +152 -0
  48. package/templates/predelete_check.sh +72 -0
  49. package/templates/regression_guard.sh +563 -0
  50. package/templates/starter_profile.md +83 -0
  51. package/templates/temper_check.sh +46 -0
@@ -0,0 +1,46 @@
1
+ #!/usr/bin/env bash
2
+ # temper_check.sh — Wave-T (Temper) step T-1: complexity delta of a quench.
3
+ # Measures how much complexity a steel-quench ADDED to a markdown asset
4
+ # (pre-quench baseline → post-convergence). It is a MEASUREMENT, not a detector
5
+ # (don't-overbuild guard: no judgment engine here — T-3 verdict is human/LLM).
6
+ #
7
+ # Usage: temper_check.sh <repo> <file-rel-path> <pre-quench-ref> [<post-ref>]
8
+ # <post-ref> default = working tree.
9
+ # See plugins/fh-meta/skills/steel-quench/SKILL.md §Wave-T.
10
+ set -euo pipefail
11
+
12
+ repo="${1:?repo path}"; file="${2:?file rel path}"; pre="${3:?pre-quench ref}"; post="${4:-}"
13
+
14
+ metrics() { # reads text on stdin → "lines sections steps tables fences crossrefs"
15
+ local t prose; t="$(cat)"
16
+ # sections/steps/tables count PROSE only — lines inside ``` fences are code
17
+ # (bash comments `# ...` would otherwise inflate Δsections; found run #4, install-wizard)
18
+ prose="$(printf '%s\n' "$t" | awk '/^[[:space:]]*```/{f=!f;next} !f')"
19
+ local lines sections steps tables fences crossrefs
20
+ lines=$(printf '%s\n' "$t" | wc -l | tr -d ' ')
21
+ sections=$(printf '%s\n' "$prose" | grep -cE '^#{1,6} ' || true)
22
+ steps=$(printf '%s\n' "$prose" | grep -cE '^[[:space:]]*([0-9]+\.|[-*] )' || true)
23
+ tables=$(printf '%s\n' "$prose" | grep -cE '^\|' || true)
24
+ fences=$(( $(printf '%s\n' "$t" | grep -c '```' || true) / 2 ))
25
+ crossrefs=$(printf '%s\n' "$t" | grep -oE '\]\(|\[\[' | wc -l | tr -d ' ')
26
+ echo "$lines $sections $steps $tables $fences $crossrefs"
27
+ }
28
+
29
+ pre_txt=$(git -C "$repo" show "$pre:$file")
30
+ if [ -n "$post" ]; then post_txt=$(git -C "$repo" show "$post:$file"); else post_txt=$(cat "$repo/$file"); fi
31
+
32
+ read -r l0 s0 p0 t0 f0 x0 <<<"$(printf '%s' "$pre_txt" | metrics)"
33
+ read -r l1 s1 p1 t1 f1 x1 <<<"$(printf '%s' "$post_txt" | metrics)"
34
+
35
+ printf '\n=== Wave-T complexity delta — %s ===\n' "$file"
36
+ printf 'baseline: %s post: %s\n\n' "$pre" "${post:-<working>}"
37
+ printf '%-12s %6s %6s %8s\n' metric pre post Δ
38
+ for row in "lines $l0 $l1" "sections $s0 $s1" "steps $p0 $p1" "tables $t0 $t1" "fences $f0 $f1" "cross-refs $x0 $x1"; do
39
+ set -- $row; printf '%-12s %6s %6s %+8d\n' "$1" "$2" "$3" "$(( $3 - $2 ))"
40
+ done
41
+
42
+ dx=$(( x1 - x0 )); dp=$(( p1 - p0 ))
43
+ printf '\n-- T-3 heuristic flags (review, not auto-reject) --\n'
44
+ [ "$dx" -gt "$dp" ] && printf ' ⚠ Δcross-refs(%+d) > Δsteps(%+d): quench added wiring, not function?\n' "$dx" "$dp" || true
45
+ [ "$(( s1 - s0 ))" -gt 0 ] && printf ' ⚠ %+d new section(s): confirm each fixes a flaw, not just defends a Wave finding\n' "$(( s1 - s0 ))" || true
46
+ printf '\nNext: run harness-doctor on post asset for absolute tier (T-2), then record τ verdict (PASS / FAIL + named construct)\n'