@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.
- package/.claude/rules/.public-surface-patterns.defaults +44 -0
- package/.claude/rules/fh_4axis_gate.md +207 -0
- package/.claude-plugin/marketplace.json +2 -2
- package/AGENTS.md +26 -2
- package/CATALOG.md +31 -0
- package/docs/ETHOS.md +106 -0
- package/docs/OUTPUT_EVIDENCE.md +118 -0
- package/docs/WHY.md +42 -0
- package/knowledge/patterns/ensemble_union_detection_task_pattern.md +125 -0
- package/knowledge/shared/GLOSSARY.md +77 -0
- package/knowledge/shared/harness-core/measurement-integrity-checklist.md +10 -0
- package/knowledge/shared/learnings/subagent_invocations_log.yaml +554 -0
- package/knowledge/shared/patterns/multi-persona-review.md +88 -0
- package/knowledge/shared/plugin-catalog/recommended_plugins.md +117 -0
- package/package.json +42 -1
- package/plugins/fh-commons/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-meta/.claude-plugin/plugin.json +2 -2
- package/plugins/fh-meta/CHANGELOG.md +617 -0
- package/plugins/fh-meta/skills/context-doctor/SKILL.md +42 -4
- package/plugins/fh-meta/skills/context-doctor/SKILL_detail.md +38 -0
- package/scripts/below_floor_scan.sh +91 -0
- package/scripts/chamber_candidate_collect.sh +223 -0
- package/scripts/chamber_run.sh +184 -0
- package/scripts/degrade_direction_scan.sh +222 -0
- package/scripts/fh_env_delta_scan.sh +108 -0
- package/scripts/fh_session_load.sh +202 -0
- package/scripts/gate_pathspec_check.sh +166 -0
- package/scripts/package_coverage_check.sh +119 -0
- package/scripts/prepush_guard_check.sh +374 -0
- package/scripts/psa_scan_lib.sh +153 -0
- package/scripts/public_surface_scan_files.sh +157 -0
- package/scripts/selfcheck.sh +28 -0
- package/scripts/session_close_check.sh +171 -0
- package/scripts/substrate_jump_detector.sh +60 -0
- package/scripts/test_degrade_scan_shell_probes.sh +185 -0
- package/scripts/test_marker_floor_lanes.sh +45 -0
- package/scripts/test_prepush_stdin_integrity.sh +119 -0
- package/scripts/tier_census_grep.sh +54 -0
- package/scripts/universal_guard_check.sh +280 -0
- package/templates/.claude/rules/mcp_tool_gating.md +157 -0
- package/templates/.claude/rules/session.md +153 -0
- package/templates/.git-hooks/pre-commit +848 -0
- package/templates/.git-hooks/pre-push +585 -0
- package/templates/PRE-PUBLISH-CHECKLIST.md +85 -0
- package/templates/contrib_session.md +34 -0
- package/templates/degrade_direction_scan.sh +222 -0
- package/templates/goal-quench-hook-setup.md +152 -0
- package/templates/predelete_check.sh +72 -0
- package/templates/regression_guard.sh +563 -0
- package/templates/starter_profile.md +83 -0
- 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'
|