@chrono-meta/fh-gate 2.12.1 → 2.14.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.
- package/.claude/rules/fh_4axis_gate.md +35 -1
- package/.claude-plugin/marketplace.json +2 -2
- package/AGENTS.md +17 -0
- package/CHEATSHEET.md +19 -1
- package/CLAUDE.md +34 -9
- package/README.ja.md +186 -649
- package/README.ko.md +207 -698
- package/README.md +186 -698
- package/README.zh.md +167 -601
- package/docs/ETHOS.md +73 -1
- package/docs/IDENTITIES.md +83 -0
- package/docs/MODEL_SETUP.md +111 -0
- package/docs/OUTPUT_EVIDENCE.md +10 -2
- package/knowledge/shared/harness-core/fh_detail_protocols.md +131 -1
- package/knowledge/shared/harness-core/fh_three_layer_canon.md +15 -0
- package/knowledge/shared/harness-core/field_harness_diagnostic.md +30 -0
- package/knowledge/shared/harness-core/gate_locality_principle.md +29 -0
- package/knowledge/shared/harness-core/measurement-integrity-checklist.md +80 -0
- package/knowledge/shared/harness-core/ship_readiness_gate.md +103 -15
- package/knowledge/shared/learnings/subagent_invocations_log.yaml +120 -0
- package/knowledge/shared/rules/multi_session_close_protocol.md +7 -1
- package/package.json +22 -2
- package/plugins/fh-commons/.claude-plugin/plugin.json +2 -2
- package/plugins/fh-commons/skills/preprep/README.md +45 -0
- package/plugins/fh-commons/skills/preprep/SKILL.md +214 -0
- package/plugins/fh-commons/skills/preprep/canon_terms.example.yaml +36 -0
- package/plugins/fh-commons/skills/preprep/fixtures/adjdup_known_negative.md +7 -0
- package/plugins/fh-commons/skills/preprep/fixtures/adjdup_known_positive.md +8 -0
- package/plugins/fh-commons/skills/preprep/fixtures/progression_known_negative.md +13 -0
- package/plugins/fh-commons/skills/preprep/fixtures/progression_known_positive.md +13 -0
- package/plugins/fh-commons/skills/preprep/fixtures/promise_known_negative.md +9 -0
- package/plugins/fh-commons/skills/preprep/fixtures/promise_known_positive.md +7 -0
- package/plugins/fh-commons/skills/preprep/interslide_deps.py +223 -0
- package/plugins/fh-commons/skills/preprep/jargon_terms.example.yaml +40 -0
- package/plugins/fh-commons/skills/preprep/lane_adjacent_dup.py +86 -0
- package/plugins/fh-commons/skills/preprep/lane_progression.py +81 -0
- package/plugins/fh-commons/skills/preprep/lane_promise.py +121 -0
- package/plugins/fh-commons/skills/preprep/ooxml/c1_baseline.txt +12 -0
- package/plugins/fh-commons/skills/preprep/ooxml/gate.py +164 -0
- package/plugins/fh-commons/skills/preprep/preprep.py +776 -0
- package/plugins/fh-commons/skills/preprep/presentation_checklist.md +310 -0
- package/plugins/fh-commons/skills/preprep/surfaces.example.yaml +148 -0
- package/plugins/fh-meta/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-meta/CHANGELOG.md +150 -0
- package/plugins/fh-meta/skills/install-wizard/SKILL.md +39 -0
- package/scripts/activity_log.sh +144 -0
- package/scripts/com.forge-harness.daily-report.plist +44 -0
- package/scripts/context_continuity_score.sh +435 -0
- package/scripts/daily_report.sh +208 -0
- package/scripts/digest_landing_check.sh +71 -0
- package/scripts/fh_session_load.sh +71 -2
- package/scripts/field_canon_preload.sh +44 -0
- package/scripts/gate_pathspec_check.sh +10 -4
- package/scripts/lane_runner_check.sh +34 -1
- package/scripts/launchd_wiring_check.sh +182 -0
- package/scripts/mapped_tracks.sh +69 -0
- package/scripts/package_coverage_check.sh +28 -11
- package/scripts/portability_lint.sh +30 -0
- package/scripts/selfcheck.sh +98 -1
- package/scripts/sim_isolated_run.sh +339 -0
- package/scripts/test_heavy_classifier_lanes.sh +4 -1
- package/scripts/test_lane_runner_lanes.sh +75 -0
- package/scripts/test_mapped_tracks_lanes.sh +58 -0
- package/scripts/test_marker_address_lanes.sh +78 -0
- package/scripts/test_marker_soul_check_lanes.sh +36 -0
- package/scripts/test_precommit_staged_drift_lanes.sh +91 -0
- package/scripts/test_preprep_adjacent_dup_lanes.sh +57 -0
- package/scripts/test_preprep_drift_anchor.sh +65 -0
- package/scripts/test_preprep_progression_lanes.sh +53 -0
- package/scripts/test_preprep_promise_lanes.sh +56 -0
- package/scripts/test_preprep_retired_lanes.sh +54 -0
- package/scripts/test_sim_isolated_run_lanes.sh +219 -0
- package/scripts/test_skill_canon_preload_lanes.sh +58 -0
- package/scripts/universal_guard_check.sh +20 -8
- package/templates/.git-hooks/pre-commit +465 -8
- package/templates/regression_guard.sh +40 -1
|
@@ -83,6 +83,63 @@ is_carveout_path() {
|
|
|
83
83
|
# challenger S1). Filtering by the new path alone also breaks rename pairing, which
|
|
84
84
|
# was the original false positive on pure within-scope moves.
|
|
85
85
|
# Fails CLOSED (returns substantive) on any git error — a gate must not fail open.
|
|
86
|
+
# ── README first-screen rule (2026-08-28) ────────────────────────────────────────
|
|
87
|
+
# WHY: README*.md matched NONE of HEAVY/CARVEOUT/LIGHT — a measured blind spot. Three
|
|
88
|
+
# paths, all reproduced in a scratch repo before this was written:
|
|
89
|
+
# ⓐ README alone → "no FH asset staged; 4-axis gate not applicable" — Axes 1/2+3/4 ALL skipped
|
|
90
|
+
# ⓑ README + a prose-only docs/*.md → that file's LIGHT verdict pulls the WHOLE commit to
|
|
91
|
+
# lightweight, so the README's real content change rides along (this is
|
|
92
|
+
# what actually happened on commits 8b982e9 / 73c1e4a)
|
|
93
|
+
# ⓒ README + a HEAVY file → full mode, but Axis 1 still never scans README (regression_guard.sh
|
|
94
|
+
# has no README in its own pathspec — NOT closed here, named as residual)
|
|
95
|
+
# The READMEs are npm-shipped, so a consumer-visible surface was changing with no axis enforced.
|
|
96
|
+
#
|
|
97
|
+
# WHY NOT "README is always HEAVY": a typo or badge fix would then demand a marker. Over-blocking
|
|
98
|
+
# trains `--no-verify`, which disarms the Destructive-Op gate living in this same hook — the repo
|
|
99
|
+
# has already reasoned that trade once and it holds here.
|
|
100
|
+
#
|
|
101
|
+
# WHY THIS PREDICATE: `diff_is_substantive` keys on fenced code / citation / version tokens. A
|
|
102
|
+
# README's load-bearing change is often none of those — today's was a first-line rewrite with no
|
|
103
|
+
# fence, no URL, no version, and it read as prose-only. So README additionally asks WHERE the
|
|
104
|
+
# change landed: above the first `---` is the first screen, the part a reader decides on. That is
|
|
105
|
+
# a property of the record (which lines moved), not a judgement about whether the copy is good —
|
|
106
|
+
# a channel check, per CLAUDE.md §Mechanization Boundary.
|
|
107
|
+
# Fails CLOSED on any git error, same as diff_is_substantive.
|
|
108
|
+
readme_first_screen_touched() { # $1 = staged README path
|
|
109
|
+
local file="$1" fold hunks body first_screen_cap=60
|
|
110
|
+
body=$(git show ":$file" 2>/dev/null) || return 0 # unreadable → fail closed
|
|
111
|
+
# 🟥 YAML front matter: a README that opens with `---` would set fold=1 and then EVERY real
|
|
112
|
+
# first-screen edit reads as below-the-fold — fail-OPEN, and both cross-family auditors found
|
|
113
|
+
# it independently (2026-08-28). So the fold search starts AFTER a leading front-matter block.
|
|
114
|
+
local skip=0
|
|
115
|
+
if printf '%s\n' "$body" | head -1 | grep -qE '^---[[:space:]]*$'; then
|
|
116
|
+
skip=$(printf '%s\n' "$body" | awk 'NR>1 && /^---[[:space:]]*$/ {print NR; exit}')
|
|
117
|
+
[ -n "$skip" ] || skip=1
|
|
118
|
+
fi
|
|
119
|
+
fold=$(printf '%s\n' "$body" | awk -v s="$skip" 'NR>s && /^---[[:space:]]*$/ {print NR; exit}')
|
|
120
|
+
# 🟥 No horizontal rule at all: do NOT treat the whole file as first screen. That was the first
|
|
121
|
+
# draft and it is an over-block mine — a typo on line 800 of a rule-less README would demand a
|
|
122
|
+
# marker, which is exactly the `--no-verify` training this rule's own comment forbids. Both
|
|
123
|
+
# auditors named the self-contradiction. Bound it instead: the first screen is what a reader
|
|
124
|
+
# sees before scrolling, and 60 lines is the same window the cold-read fixture used.
|
|
125
|
+
[ -n "$fold" ] || fold="$first_screen_cap"
|
|
126
|
+
hunks=$(git diff --cached -U0 -- "$file" 2>/dev/null | grep -E '^@@')
|
|
127
|
+
if [ -z "$hunks" ]; then
|
|
128
|
+
# 🟥 No hunks is NOT "nothing changed above the fold". `git diff -U0` prints no @@ for a
|
|
129
|
+
# binary blob or a pure rename, so returning false here renders UNMEASURED as none — the
|
|
130
|
+
# exact family this repo keeps closing. Measure whether the file is staged at all first.
|
|
131
|
+
git diff --cached --name-only -- "$file" 2>/dev/null | grep -q . || return 1 # genuinely unstaged
|
|
132
|
+
return 0 # staged but unreadable → fail closed
|
|
133
|
+
fi
|
|
134
|
+
while IFS= read -r h; do
|
|
135
|
+
local start
|
|
136
|
+
start=$(printf '%s' "$h" | sed -E 's/^@@ [^+]*\+([0-9]+).*/\1/')
|
|
137
|
+
case "$start" in ''|*[!0-9]*) return 0 ;; esac # unparseable → fail closed
|
|
138
|
+
[ "$start" -le "$fold" ] && return 0
|
|
139
|
+
done <<< "$hunks"
|
|
140
|
+
return 1
|
|
141
|
+
}
|
|
142
|
+
|
|
86
143
|
diff_is_substantive() {
|
|
87
144
|
local file="$1" body rc oldpath mode
|
|
88
145
|
oldpath=$(git diff --cached -M --name-status 2>/dev/null \
|
|
@@ -180,12 +237,16 @@ fi
|
|
|
180
237
|
# content out of SKILL.md to lean the resident layer — coverage shrank as the diet progressed.
|
|
181
238
|
# Over-firing measured before shipping: of the last 60 commits, 28 touched a detail file and 26
|
|
182
239
|
# already tripped HEAVY via a companion file, so this adds a heavy path to ~7% of them.
|
|
240
|
+
# 🟥 `.claude/soul_tenets.txt` 추가 (2026-08-30, cross-family codex #7 — 자력 적발 0).
|
|
241
|
+
# 등록부는 **심지 원칙의 정본**인데 어느 분류에도 안 걸려서, 등록부만 고치는 커밋이
|
|
242
|
+
# «no FH asset staged» 로 빠져 4축 게이트를 통째로 건너뛰었다. tenet 을 바꾸는 것은
|
|
243
|
+
# 이 레포에서 가장 하중 큰 편집 중 하나다 — LIGHT 는커녕 CARVEOUT 도 아니다.
|
|
183
244
|
HEAVY=$(echo "$STAGED" \
|
|
184
|
-
| grep -E "(SKILL(_detail)?\.md|^plugins/[^/]+/skills/[^/]+/.*\.md$|\.claude/rules/|^knowledge/shared/rules/|templates/|CLAUDE\.md|^scripts/.*\.sh$|^plugins/[^/]+/agents/.*\.md$|^\.claude/agents/.*\.md$)" || true)
|
|
245
|
+
| grep -E "(SKILL(_detail)?\.md|^plugins/[^/]+/skills/[^/]+/.*\.md$|\.claude/rules/|^knowledge/shared/rules/|templates/|CLAUDE\.md|^scripts/.*\.sh$|^plugins/[^/]+/agents/.*\.md$|^\.claude/agents/.*\.md$|^\.claude/soul_tenets\.txt$)" || true)
|
|
185
246
|
|
|
186
247
|
# Carve-out candidates: knowledge/ docs, docs/*.md, AGENTS.md. Heavy only if substantive.
|
|
187
248
|
CARVEOUT=$(echo "$STAGED" \
|
|
188
|
-
| grep -E "(^knowledge/.*\.md$|^docs/.*\.md$|(^|/)AGENTS\.md$)" | grep -v "^knowledge/shared/rules/" || true)
|
|
249
|
+
| grep -E "(^knowledge/.*\.md$|^docs/.*\.md$|(^|/)AGENTS\.md$|^README(\.[A-Za-z]{2,3}([-_][A-Za-z]{2,4})?)?\.md$)" | grep -v "^knowledge/shared/rules/" || true)
|
|
189
250
|
|
|
190
251
|
# Always-light by path.
|
|
191
252
|
LIGHT=$(echo "$STAGED" \
|
|
@@ -197,6 +258,8 @@ if [ -n "$CARVEOUT" ]; then
|
|
|
197
258
|
[ -z "$f" ] && continue
|
|
198
259
|
if diff_is_substantive "$f"; then
|
|
199
260
|
HEAVY="$HEAVY"$'\n'"$f (substantive: code/claim added)"
|
|
261
|
+
elif case "$f" in README.md|README.*.md) true ;; *) false ;; esac && readme_first_screen_touched "$f"; then
|
|
262
|
+
HEAVY="$HEAVY"$'\n'"$f (substantive: first screen — the part a reader decides on)"
|
|
200
263
|
else
|
|
201
264
|
LIGHT="$LIGHT"$'\n'"$f (prose-only)"
|
|
202
265
|
fi
|
|
@@ -587,8 +650,49 @@ fi
|
|
|
587
650
|
# Single-line recreate command — indentation-immune on paste (a displayed heredoc
|
|
588
651
|
# pastes with leading indent: the anchored grep misses and an indented EOF never
|
|
589
652
|
# terminates <<'EOF' — non-converging fix loop, challenger Axis-5 A-finding).
|
|
653
|
+
# ── 템플릿 잔여 검사 (2026-08-30, 블라인드 sim 이 잡았다) ─────────────────────────
|
|
654
|
+
# 🟥 오늘 `marker_recreate_hint` 에 `soul:`/`defeater:` 를 넣자마자 플로어 티어 팔 3/3 이
|
|
655
|
+
# **힌트의 자리표시자를 그대로 복사**해서 냈고 비공허성 검사를 **통과했다**
|
|
656
|
+
# (`<이 fix가 통과했다고 판단할 관측 가능한 결과>` = 26 낱말). 즉 내가 만든 힌트가
|
|
657
|
+
# 게이트를 우회하는 가장 쉬운 답을 같이 제공했다.
|
|
658
|
+
# ⚠️ **채널 검사다**: 「그 값이 옳은가」가 아니라 「이 기록이 템플릿 자신인가」를 묻는다.
|
|
659
|
+
# 🟥 좁게 잡는다 — 꺾쇠를 정당하게 쓰는 기술 서술을 안 막으려고, **힌트에 실제로 등장하는
|
|
660
|
+
# 문자열**만 본다. 목록이지 정규식 일반화가 아니다. 힌트를 바꾸면 여기도 같이 바꿔라.
|
|
661
|
+
_marker_template_residue() { # $1 = 줄 내용 → 0 = 템플릿 잔여
|
|
662
|
+
# 🟥 **세 번째 설계다. 앞의 둘이 왜 틀렸는지 남긴다** (cross-family 3라운드, 자력 적발 0).
|
|
663
|
+
# v1 손목록 → 규칙 문서가 새 자리표시자를 실을 때마다 어긋났다(구조적 desync).
|
|
664
|
+
# v2 일반규칙 → 「꺾쇠 안에 공백/비-ASCII」. 놓친 것: `<reason>` `< 무엇을 했나>` `<..>`.
|
|
665
|
+
# **과차단**: `Map<String, Object>` · `Result<T, Error>` · `<사용자_ID>`.
|
|
666
|
+
# 두 계열이 각각 실물 문자열로 지적했다 — 그리고 그게 맞다.
|
|
667
|
+
# 🟥 v2 가 틀린 이유는 «구멍»이 아니라 **범주**다: 「이 꺾쇠가 자리표시자인가 타입인가」는
|
|
668
|
+
# **판단**이고, §Mechanization Boundary 가 코드로 굳히지 말라는 바로 그 층이다.
|
|
669
|
+
# 기계가 답할 수 있는 것은 **«이 줄이 우리가 배포한 템플릿과 같은가»** 뿐이다.
|
|
670
|
+
# ⇒ v3: **템플릿에서 파생한다.** 힌트가 실제로 출력하는 문자열에서 `<...>` 조각을 런타임에
|
|
671
|
+
# 뽑아 그것만 본다. 목록을 손으로 안 적으므로 desync 가 **구조적으로 불가능**하다.
|
|
672
|
+
# ⚠️ 정직한 대가: 「스펙 문서에만 있고 힌트에 없는」 자리표시자는 안 잡힌다. 그건 v1 의
|
|
673
|
+
# 구멍이 남은 것인데, 판단을 코드로 굳히는 것보다 낫다고 보고 **명명한 채로 둔다.**
|
|
674
|
+
local _line="$1" _tpl _frag
|
|
675
|
+
_tpl=$(marker_recreate_hint "X" 2>/dev/null)
|
|
676
|
+
# 힌트 문자열에서 `<...>` 조각을 뽑는다. 하나도 못 뽑으면 계기가 죽은 것이지 «잔여 없음»이 아니다.
|
|
677
|
+
_frag=$(printf '%s' "$_tpl" | grep -oE '<[^<>]+>' | sort -u)
|
|
678
|
+
if [ -z "$_frag" ]; then
|
|
679
|
+
echo " ⚠️ template-residue: 힌트에서 자리표시자를 못 뽑았다 — 이 검사는 SKIPPED 다(통과 아님)." >&2
|
|
680
|
+
return 1
|
|
681
|
+
fi
|
|
682
|
+
while IFS= read -r f; do
|
|
683
|
+
[ -n "$f" ] || continue
|
|
684
|
+
case "$_line" in *"$f"*) return 0 ;; esac
|
|
685
|
+
done <<EOF_FRAG
|
|
686
|
+
$_frag
|
|
687
|
+
EOF_FRAG
|
|
688
|
+
return 1
|
|
689
|
+
}
|
|
690
|
+
|
|
590
691
|
marker_recreate_hint() {
|
|
591
|
-
|
|
692
|
+
# 🟥 힌트는 «행위자가 읽는 자리»다(FH-T07). 2026-08-30 블라인드 sim 실측: 플로어 티어 세 팔이
|
|
693
|
+
# 나머지 필드를 다 쓰고 `soul:` 을 **하나도 안 썼다** — 차단되는 필드인데도. 스펙에도 힌트에도
|
|
694
|
+
# 없었기 때문이다. 여기에 최소 필드를 다 넣는다. 정본 = .claude/rules/fh_4axis_gate.md
|
|
695
|
+
echo " printf 'axis2-engine: quench-challenger\\naxis2-model: opus\\nfloor-status: at-floor\\naxis2-evidence: PASS no-S\\nsoul: 성공 정의 = <...> · 절대 안 함 = <...>\\nsoul-check: reflected(<무엇이 되돌아왔나>)\\ndefeater: <틀렸다면 무엇이 관측되나>\\n' > \"$1\""
|
|
592
696
|
}
|
|
593
697
|
|
|
594
698
|
# ── Cross-family leg — typed verdict (see the load-bearing block below for WHY) ──
|
|
@@ -837,7 +941,22 @@ validate_crossfamily_leg() { # $1 = marker path
|
|
|
837
941
|
return 1
|
|
838
942
|
fi
|
|
839
943
|
echo " ⚠️ cross-family leg: $val — recorded, not silent (weekly audit re-queues these)"
|
|
840
|
-
echo " $(printf '%s' "$reason" | cut -c1-80)"
|
|
944
|
+
echo " $(printf '%s' "$reason" | cut -c1-80)"
|
|
945
|
+
# 🟥 수락 경로에도 «안 짚은 채널»을 띄운다. 실패 메시지에만 채널 목록이 있으면,
|
|
946
|
+
# 근거를 적어서 통과한 사람은 그 목록을 **영영 못 본다** — 오늘 저자가 선 자리가 거기다.
|
|
947
|
+
# 실측 2026-08-29: 마커 다섯 개가 연속으로 DEGRADED 였고, `gemini` 가 인증 실패로 죽자
|
|
948
|
+
# 거기서 멈췄다. `agy` 는 살아 있었고 `scripts/sidecar_calibrate.sh` 가 그것을 codex 보다
|
|
949
|
+
# 많이 알고 있었는데(8 vs 7 히트) 아무도 그 자리에서 말해주지 않았다.
|
|
950
|
+
# ⚠️ 차단하지 않는다 — 근거는 이미 통과했다. 이건 살리언스이지 판정이 아니다.
|
|
951
|
+
_unnamed=""
|
|
952
|
+
for _ch in codex agy gemini copilot; do
|
|
953
|
+
printf '%s' "$reason" | grep -qi -- "$_ch" || _unnamed="$_unnamed $_ch"
|
|
954
|
+
done
|
|
955
|
+
if [ -n "$_unnamed" ]; then
|
|
956
|
+
echo " ℹ️ 근거에 안 나온 채널:$_unnamed"
|
|
957
|
+
echo " «probe 안 한 패널은 패널이 아니라 호스트명이 붙은 가정»이다."
|
|
958
|
+
echo " 살아있는지 재려면: bash scripts/sidecar_calibrate.sh --only <채널>"
|
|
959
|
+
fi ;;
|
|
841
960
|
single-family|none|none-this-round|N/A|n/a)
|
|
842
961
|
# `single-family` is deliberately NOT accepted HERE. This block runs only on
|
|
843
962
|
# load-bearing changes, where "decorrelation not required" is a contradiction — and
|
|
@@ -1071,6 +1190,175 @@ validate_thirdparty_leg() { # $1 = marker path
|
|
|
1071
1190
|
esac
|
|
1072
1191
|
return 0
|
|
1073
1192
|
}
|
|
1193
|
+
# ── ① 원자 tenet 참조 무결성 (2026-08-30) ─────────────────────────────────────────
|
|
1194
|
+
# tenet: FH-T02 (기계는 «기록의 속성»만 — 여기서는 참조 무결성) · FH-T01 (부재는 0이 아니다)
|
|
1195
|
+
#
|
|
1196
|
+
# WHY: 마커의 `①영혼` 은 자유 산문이라 `validate_soul_present_leg` 은 «비었나» 밖에 못 본다.
|
|
1197
|
+
# 저자마다 다른 말로 같은 원칙을 적고, 두 마커가 같은 원칙을 근거로 삼았는지 기계가 못 안다.
|
|
1198
|
+
# 원자 ID 를 인용하면 그 관계가 **참조 무결성**이 된다.
|
|
1199
|
+
# 외부 근거: arXiv 2605.24229 — 스펙을 atomic testable tenets 로 분해.
|
|
1200
|
+
#
|
|
1201
|
+
# SCOPE — 기록의 속성이지 결론이 아니다. 「인용한 ID 가 레지스트리에 실재하는가」**만** 본다.
|
|
1202
|
+
# 그 tenet 이 옳은지, 이 델타가 그것을 지켰는지는 **묻지 않는다**(CLAUDE.md §Mechanization
|
|
1203
|
+
# Boundary — 오늘의 판단을 코드로 굳히면 내일의 천장이 된다).
|
|
1204
|
+
#
|
|
1205
|
+
# 🟥 GRACE 가 필요 없다. ID 를 **하나도 인용하지 않은 마커는 통과**하므로 기존 300+ 마커에
|
|
1206
|
+
# 소급 효과가 0이다. 채택은 점진적이고, 그것이 이 설계가 새 필드를 안 만든 이유다.
|
|
1207
|
+
SOUL_TENET_REGISTRY_REL=".claude/soul_tenets.txt"
|
|
1208
|
+
validate_soul_tenet_refs() { # $1 = marker path
|
|
1209
|
+
# tenet: FH-T02 (기계는 «기록의 속성»만 — 여기서는 참조 무결성) · FH-T01 (부재는 0이 아니다)
|
|
1210
|
+
# 🟥 `rel` 은 **함수 안에서 기본값을 갖는다.** 레인 스위트가 `sed` 로 함수만 추출해 격리
|
|
1211
|
+
# 실행하므로, 밖에 있는 상수를 참조하면 `set -u` 아래서 unbound 로 죽는다 — 그러면 레인은
|
|
1212
|
+
# 그 죽음을 «BLOCK» 으로 읽고 초록을 보고한다(실측 2026-08-30, 이 레인 3개가 그랬다.
|
|
1213
|
+
# [[feedback_broken_parser_reports_a_verdict]]).
|
|
1214
|
+
local m="$1" reg ids id missing="" n=0
|
|
1215
|
+
local rel="${SOUL_TENET_REGISTRY_REL:-.claude/soul_tenets.txt}"
|
|
1216
|
+
reg="${EVIDENCE_ROOT:-$REPO_ROOT}/$rel"
|
|
1217
|
+
[ -f "$reg" ] || reg="$REPO_ROOT/$rel"
|
|
1218
|
+
# 🟥 인용은 **`tenets:` 줄에서만** 읽는다 — 마커 전문에서 긁으면 «설명»이 «인용»이 된다.
|
|
1219
|
+
# 실측 2026-08-30: 이 마커의 `controls:` 줄이 «known-negative FH-T99 가 잡히면
|
|
1220
|
+
# HARNESS-ERROR» 라고 **계기를 설명**했는데 훅이 그걸 인용으로 읽고 차단했다.
|
|
1221
|
+
# 같은 얼굴이 오늘 세 번째다(픽스처 토큰 3회 · 이번이 4회째) —
|
|
1222
|
+
# «토큰을 설명하는 것»과 «쓰는 것»은 grep 에게 구분되지 않는다.
|
|
1223
|
+
# `soul_trace.sh` 는 아침에 등록부 교집합으로 같은 오탐을 닫았는데 **여기는 안 닫았다**
|
|
1224
|
+
# ([[feedback_half_fix_propagation_boundary]] — 오늘 세 번째 반쪽).
|
|
1225
|
+
# ⚠️ 필드로 좁히는 것이 교집합보다 낫다: 교집합은 «미등록 인용»을 조용히 버리는데,
|
|
1226
|
+
# 마커에서 그건 오타일 수 있고 오타는 잡아야 한다. 필드는 «어디가 인용인가»를 정한다.
|
|
1227
|
+
# 🟥 cross-family 독립 수렴(codex #4 · agy 2-a): `^tenets:` 는 **선행 공백 하나로 우회**된다.
|
|
1228
|
+
# 다른 마커 필드는 대부분 `^[[:space:]]*` 를 허용하는데 여기만 안 했다. 들여쓴 줄은
|
|
1229
|
+
# «인용 없음»으로 읽혀 미등록 ID 가 조용히 통과했다(실측 rc=0).
|
|
1230
|
+
# 단수형 `tenet:` near-miss 도 같이 잡는다 — 필드명을 살짝 틀리면 검사가 통째로 빠진다.
|
|
1231
|
+
ids=$(sed -n -E 's/^[[:space:]]*#*[[:space:]]*[Tt][Ee][Nn][Ee][Tt][Ss]?[[:space:]]*:[[:space:]]*//p' "$m" 2>/dev/null \
|
|
1232
|
+
| grep -oE 'FH-T[0-9]{2}' | sort -u)
|
|
1233
|
+
[ -z "$ids" ] && return 0 # 인용 없음 = 합법. 채택은 점진적이다(thirdparty: 와 같은 형태)
|
|
1234
|
+
if [ ! -f "$reg" ]; then
|
|
1235
|
+
echo " ❌ FAIL — 마커가 tenet ID 를 인용하는데 등록부가 없다: $rel"
|
|
1236
|
+
echo " 부재를 «통과»로 렌더하지 않는다 — 없는 등록부는 «전부 유효»가 아니다."
|
|
1237
|
+
return 1
|
|
1238
|
+
fi
|
|
1239
|
+
for id in $ids; do
|
|
1240
|
+
n=$((n+1))
|
|
1241
|
+
grep -qE "^${id}:" "$reg" || missing="${missing:+$missing }$id"
|
|
1242
|
+
done
|
|
1243
|
+
if [ -n "$missing" ]; then
|
|
1244
|
+
echo " ❌ FAIL — 마커가 등록부에 없는 tenet 을 인용한다: $missing"
|
|
1245
|
+
echo " 실재하는 ID: $(grep -oE '^FH-T[0-9]{2}' "$reg" | sort -u | tr '\n' ' ')"
|
|
1246
|
+
echo " 새 원칙이면 먼저 $rel 에 등재하라 — 다만 **최대 7개**이므로"
|
|
1247
|
+
echo " 넣으려면 하나를 빼야 한다(Amazon tenets 규율: 목록이 길어지면 우선순위가 죽는다)."
|
|
1248
|
+
return 1
|
|
1249
|
+
fi
|
|
1250
|
+
echo " ✅ soul tenets: $n 건 인용, 전부 등록부에 실재 ($(printf '%s' "$ids" | tr '\n' ' '))"
|
|
1251
|
+
return 0
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
# ── ② defeater: — «틀렸다면 무엇이 관측될 것인가» (2026-08-30) ────────────────────
|
|
1255
|
+
# tenet: FH-T02 (기록의 속성) · FH-T06 (실행이 하중 지는 절반 — defeater 는 관측 가능해야 한다)
|
|
1256
|
+
#
|
|
1257
|
+
# WHY: `①영혼` 은 성공 정의를 적게 하지만 **반증 조건**을 안 적게 한다. 반증 조건이 없는 성공
|
|
1258
|
+
# 정의는 사후에 언제나 충족된 것으로 회상된다(저자는 늘 «고른 것»이라고 회상한다).
|
|
1259
|
+
# 외부 근거: Assurance 2.0 (arXiv 2004.10474) — *"explicit identification of defeaters and
|
|
1260
|
+
# counterevidence"*. 보증 논증의 신뢰도는 «무엇이 이 논증을 무너뜨리는가»를 명시하는 데서 온다.
|
|
1261
|
+
#
|
|
1262
|
+
# SCOPE — **비공허성만**. 「그 defeater 가 좋은가」·「실제로 관측했는가」는 안 묻는다.
|
|
1263
|
+
# 형태는 `validate_crossfamily_leg` 의 grounds 검사와 **같다**(길이 + 기록의 속성). 새 클래스가
|
|
1264
|
+
# 아니다. 다만 어휘 grep 은 쓰지 않는다 — Grep-Collision Treadmill 이 되기 때문이다.
|
|
1265
|
+
#
|
|
1266
|
+
# 🟥 소급 적용 금지. `SOUL_PRESENT_GRACE_DATE` 와 **같은 패턴**으로, GRACE 이전 날짜의 마커는
|
|
1267
|
+
# 면제된다. 소급 강제는 진행 중인 모든 브랜치를 막고, 그 과차단이 `--no-verify` 를 훈련시켜
|
|
1268
|
+
# 같은 훅 안의 Destructive-Op 게이트까지 무장해제한다.
|
|
1269
|
+
DEFEATER_GRACE_DATE="2026-09-01"
|
|
1270
|
+
validate_defeater_leg() { # $1 = marker path
|
|
1271
|
+
# tenet: FH-T02 (기록의 속성) · FH-T06 (실행이 하중 지는 절반 — defeater 는 관측 가능해야 한다)
|
|
1272
|
+
local m="$1" mdate n line body words soul_line
|
|
1273
|
+
n=$(grep -cE '^[[:space:]]*defeater:' "$m" 2>/dev/null); n=${n:-0}
|
|
1274
|
+
if [ "$n" -gt 1 ]; then
|
|
1275
|
+
echo " ❌ FAIL — 마커에 'defeater:' 줄이 둘 이상이다."
|
|
1276
|
+
grep -nE '^[[:space:]]*defeater:' "$m" | sed 's/^/ /'
|
|
1277
|
+
echo " 읽는 쪽은 첫 줄을 취하므로 나중에 붙인 정정이 조용히 가려진다."
|
|
1278
|
+
return 1
|
|
1279
|
+
fi
|
|
1280
|
+
mdate=$(printf '%s' "$m" | sed -nE 's/.*_([0-9]{4}-[0-9]{2}-[0-9]{2})\.marker$/\1/p')
|
|
1281
|
+
# 🟥 near-miss 검사를 `n==0` 밖으로 꺼낸다 (cross-family codex #5, 2026-08-30 — 자력 적발 0).
|
|
1282
|
+
# 종전에는 «정확한 defeater: 줄이 하나라도 있으면» near-miss 를 건너뛰었다. 그래서
|
|
1283
|
+
# defeater: 없음
|
|
1284
|
+
# defeaters: 진짜로 하고 싶은 말은 여기 적혀 있다
|
|
1285
|
+
# 가 통과했다 — 저자는 두 번째 줄을 썼다고 믿는데 게이트는 첫 줄만 읽는다.
|
|
1286
|
+
# 오타는 «부재»가 아니라 **오타**이고, 그 판정은 정확한 줄의 존재와 무관하다.
|
|
1287
|
+
if grep -qE '^[[:space:]]*(defeaters:|defeator:|defeter:|defeater[[:space:]]+:|counter-evidence:|반증:)' "$m" 2>/dev/null; then
|
|
1288
|
+
echo " ❌ FAIL — defeater 키처럼 보이지만 정확히 'defeater:' 가 아닌 줄이 있다."
|
|
1289
|
+
grep -nE '^[[:space:]]*(defeaters:|defeator:|defeter:|defeater[[:space:]]+:|counter-evidence:|반증:)' "$m" | sed 's/^/ /'
|
|
1290
|
+
echo " 저자는 적었다고 믿는데 게이트는 못 읽는다 — 가장 조용한 실패다."
|
|
1291
|
+
return 1
|
|
1292
|
+
fi
|
|
1293
|
+
if [ "$n" -eq 0 ]; then
|
|
1294
|
+
# 🟥 날짜를 못 읽으면 면제하지 않는다. 이 훅이 파일명을 `..._${TODAY}.marker` 로 만들므로
|
|
1295
|
+
# 날짜 없는 이름은 «오래된 것»이 아니라 «예상 밖»이다([[feedback_not_found_is_not_zero_family]]).
|
|
1296
|
+
[ -z "$mdate" ] || { [ "$mdate" \< "$DEFEATER_GRACE_DATE" ] && return 0; }
|
|
1297
|
+
echo " ❌ FAIL — 마커에 'defeater:' 줄이 없다."
|
|
1298
|
+
echo " 성공 정의를 적었으면 **그것이 틀렸을 때 무엇이 관측되는지**도 적어라."
|
|
1299
|
+
echo " 반증 조건 없는 성공 정의는 사후에 언제나 충족된 것으로 회상된다."
|
|
1300
|
+
echo " defeater: 소비자 경로 러너가 rc=0 인데 컨트롤 팔도 rc=0 이면 이 레인은 아무것도 안 가른 것이다"
|
|
1301
|
+
echo " defeater: 없음 ← 선언된 부재도 값이다(기록되고, 침묵은 아니다)"
|
|
1302
|
+
echo " Append to: $m"
|
|
1303
|
+
return 1
|
|
1304
|
+
fi
|
|
1305
|
+
line=$(grep -m1 -E '^[[:space:]]*defeater:' "$m" | sed -E 's/^[[:space:]]*defeater:[[:space:]]*//')
|
|
1306
|
+
body=$(printf '%s' "$line" | sed -E 's/^[[:space:]]+//; s/[[:space:]]+$//')
|
|
1307
|
+
# 선언된 부재는 값이다 — `①영혼: 없음` 과 같은 형태. 정직한 형태를 벌하고 분량으로 채운
|
|
1308
|
+
# 「안 썼다」 문단을 통과시키는 것이 [[feedback_unreachable_done_when_trains_evasion]] 이다.
|
|
1309
|
+
# 🟥 **`tr -d '[:space:].·—-]'` 를 걷어냈다 (2026-08-30, CI 가 잡았다 — 로컬은 초록이었다).**
|
|
1310
|
+
# 그 브래킷 표현은 이식 불가다: `—-]` 를 **범위**로 읽는 구현이 있고(GNU tr), 그러면 한글
|
|
1311
|
+
# 바이트가 삭제돼 `case` 가 안 걸린다 → `defeater: 없음` 이 «1 낱말 공허» 로 차단된다.
|
|
1312
|
+
# macOS(BSD/ugrep 환경)에서는 `없음` 이 그대로 남아 통과했고, **그래서 로컬만 초록이었다.**
|
|
1313
|
+
# ⇒ `tr` 대신 셸 파라미터 확장으로 «양끝 구두점/공백»만 벗긴다. 클래스 파싱에 안 기댄다.
|
|
1314
|
+
_dv="$body"
|
|
1315
|
+
while :; do
|
|
1316
|
+
case "$_dv" in
|
|
1317
|
+
' '*|' '*) _dv="${_dv# }"; _dv="${_dv# }" ;;
|
|
1318
|
+
*' '|*' ') _dv="${_dv% }"; _dv="${_dv% }" ;;
|
|
1319
|
+
*'.'|*'·'|*'—'|*'-'|*']') _dv="${_dv%?}" ;;
|
|
1320
|
+
*) break ;;
|
|
1321
|
+
esac
|
|
1322
|
+
done
|
|
1323
|
+
case "$_dv" in
|
|
1324
|
+
없음|none|None|NONE|n/a|N/A|해당없음)
|
|
1325
|
+
echo " ⚠️ defeater: 없음 — 선언된 부재. 기록되었고, 침묵은 아니다."
|
|
1326
|
+
return 0 ;;
|
|
1327
|
+
esac
|
|
1328
|
+
# 비공허성 — 한글 코퍼스이므로 **낱말 수**로 센다. `${#}` 는 로케일 의존이고, 긴 한글 한 덩어리가
|
|
1329
|
+
# 문자 수 검사를 그냥 통과한 전례가 있다(A6 레인).
|
|
1330
|
+
words=$(printf '%s' "$body" | wc -w | tr -d ' '); words=${words:-0}
|
|
1331
|
+
if [ "$words" -lt 6 ]; then
|
|
1332
|
+
echo " ❌ FAIL — defeater 가 공허하다 ($words 낱말). **무엇이 관측될 것인가**를 적어라."
|
|
1333
|
+
echo " '틀렸을 수 있다' 는 반증 조건이 아니다 — 관측 가능한 사건이어야 한다."
|
|
1334
|
+
return 1
|
|
1335
|
+
fi
|
|
1336
|
+
# 🟥 기록의 속성 하나 더: defeater 가 ①영혼 줄의 **복붙**이면 두 필드가 한 필드다.
|
|
1337
|
+
# (이것은 «내용이 옳은가»가 아니라 «두 칸이 서로 다른 값을 담는가»다 — 채널 검사.)
|
|
1338
|
+
soul_line=$(grep -m1 -E '^[[:space:]]*#*[[:space:]]*(①영혼|soul)[[:space:]]*[:—-]' "$m" 2>/dev/null \
|
|
1339
|
+
| sed -E 's/^[^:—-]*[:—-][[:space:]]*//; s/[[:space:]]+$//')
|
|
1340
|
+
if [ -n "$soul_line" ] && [ "$body" = "$soul_line" ]; then
|
|
1341
|
+
echo " ❌ FAIL — defeater 가 ①영혼 줄과 글자 그대로 같다. 두 칸이 한 칸이 되었다."
|
|
1342
|
+
echo " 성공 정의와 그 반증 조건은 다른 문장이다."
|
|
1343
|
+
return 1
|
|
1344
|
+
fi
|
|
1345
|
+
# 🟥 헬퍼 부재를 «잔여 없음»으로 렌더하지 않는다. 레인 스위트가 `sed` 로 이 함수만 추출하면
|
|
1346
|
+
# 헬퍼가 안 따라오고, 정의되지 않은 명령은 거짓이 되어 **fail-open** 이 된다.
|
|
1347
|
+
# 실측 2026-08-30: 그렇게 만든 레인 R1 이 BLOCK 기대에 PASS 를 냈다.
|
|
1348
|
+
if ! declare -f _marker_template_residue >/dev/null 2>&1; then
|
|
1349
|
+
echo " ❌ HARNESS-ERROR — _marker_template_residue 가 정의돼 있지 않다."
|
|
1350
|
+
echo " 격리 실행이면 그 헬퍼도 같이 추출해야 한다. 부재는 «통과»가 아니다."
|
|
1351
|
+
return 1
|
|
1352
|
+
fi
|
|
1353
|
+
if _marker_template_residue "$body"; then
|
|
1354
|
+
echo " ❌ FAIL — defeater 가 힌트의 자리표시자 그대로다 (기록이 아직 안 쓰였다)."
|
|
1355
|
+
echo " «틀렸다면 무엇이 관측될 것인가»를 실제 사건으로 적어라."
|
|
1356
|
+
return 1
|
|
1357
|
+
fi
|
|
1358
|
+
echo " ✅ defeater 기록됨 ($words 낱말)"
|
|
1359
|
+
return 0
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1074
1362
|
|
|
1075
1363
|
SOUL_PRESENT_GRACE_DATE="2026-08-21"
|
|
1076
1364
|
validate_soul_present_leg() { # $1 = marker path
|
|
@@ -1168,6 +1456,20 @@ validate_soul_present_leg() { # $1 = marker path
|
|
|
1168
1456
|
echo " the 절대 안 함. A one-word placeholder trains the ritual this field exists to avoid."
|
|
1169
1457
|
return 1
|
|
1170
1458
|
fi
|
|
1459
|
+
# 🟥 헬퍼 부재를 «잔여 없음»으로 렌더하지 않는다. 레인 스위트가 `sed` 로 이 함수만 추출하면
|
|
1460
|
+
# 헬퍼가 안 따라오고, 정의되지 않은 명령은 거짓이 되어 **fail-open** 이 된다.
|
|
1461
|
+
# 실측 2026-08-30: 그렇게 만든 레인 R1 이 BLOCK 기대에 PASS 를 냈다.
|
|
1462
|
+
if ! declare -f _marker_template_residue >/dev/null 2>&1; then
|
|
1463
|
+
echo " ❌ HARNESS-ERROR — _marker_template_residue 가 정의돼 있지 않다."
|
|
1464
|
+
echo " 격리 실행이면 그 헬퍼도 같이 추출해야 한다. 부재는 «통과»가 아니다."
|
|
1465
|
+
return 1
|
|
1466
|
+
fi
|
|
1467
|
+
if _marker_template_residue "$body"; then
|
|
1468
|
+
echo " ❌ FAIL — soul: 줄이 힌트의 자리표시자 그대로다 (기록이 아직 안 쓰였다)."
|
|
1469
|
+
echo " 꺾쇠 안을 실제 내용으로 바꿔라. 이 검사는 «값이 옳은가»가 아니라"
|
|
1470
|
+
echo " «이 기록이 템플릿 자신인가»만 본다 — 채널 검사다."
|
|
1471
|
+
return 1
|
|
1472
|
+
fi
|
|
1171
1473
|
echo " ✅ ①영혼 present: $words word(s)"
|
|
1172
1474
|
return 0
|
|
1173
1475
|
}
|
|
@@ -1395,6 +1697,45 @@ AXES_RUN_GRACE_DATE="2026-08-10"
|
|
|
1395
1697
|
# 대신 `ⓑ=→standpoint` 포인터를 요구하고, 그 경우 `standpoint:` 줄의 **존재**를 확인한다.
|
|
1396
1698
|
# (`standpoint:` 값 자체의 enum 검증은 별건이고 정본이 명시적으로 유보해 뒀다.)
|
|
1397
1699
|
SIX_AXES_GRACE_DATE="2026-08-17"
|
|
1700
|
+
# ── ⓔ 첫 실사용 — «새 계기를 지으면서 안 돌렸다» 에는 근거를 요구한다 ────────────────────
|
|
1701
|
+
# 🟥 채널이지 결론이 아니다. 「여섯 축을 매번 다 돌려라」는 정본이 명시적으로 금지한다
|
|
1702
|
+
# («비용 경계: 넷을 매번 다 돌리는 축이 아니다. 곱하지 말고 실패 모드에 맞춰 골라라»).
|
|
1703
|
+
# 그래서 이 검사는 **한 경우에만** 걸린다: 이 커밋이 **새 계기를 추가**하는데 `ⓔ=none` 일 때.
|
|
1704
|
+
#
|
|
1705
|
+
# WHY (2026-08-29 실측): 레인 넷 + 훅 하나를 지으면서 ⓐ(계열)·ⓕ(되돌림)를 여러 번 돌렸고
|
|
1706
|
+
# 둘 다 초록이었다. ⓔ(첫 실사용)만 **주석 블록 오탐 · 회고문 오탐** 둘을 냈고, 그건
|
|
1707
|
+
# 정본이 «ⓑ는 계기의 계기가 틀린 경우라 ⓐ·ⓓ 가 구조적으로 못 본다» 고 적어둔 그 자리다.
|
|
1708
|
+
# 🟥 그런데 그 ⓔ 는 **운영자가 잡아서** 돌았다. 마커는 여섯 축을 다 적게 하는데,
|
|
1709
|
+
# **그 기록을 델타의 성격과 대조하는 소비처가 0** 이었다 — 슬롯은 있고 소비처가 없는 형태.
|
|
1710
|
+
#
|
|
1711
|
+
# 근거 요구의 모양은 `crossfamily:` degrade 삼종이 이미 쓰는 것과 **같다**: 값만으로는 못 지나가고
|
|
1712
|
+
# 같은 줄에 무엇을 걸고 있는지 적어야 한다. 새 형식이 아니다.
|
|
1713
|
+
# ⚠️ 판별자는 «새 파일이 계기 모양인가» 라는 **경로 규칙**이고, 그것이 정말 계기인지는 판단이다.
|
|
1714
|
+
# 과탐은 근거 한 줄로 통과하므로 비용이 낮다(과차단은 --no-verify 를 훈련시킨다).
|
|
1715
|
+
validate_first_use_leg() { # $1 = marker path
|
|
1716
|
+
m="$1"
|
|
1717
|
+
# 새로 «추가»된 계기 후보만 본다. 수정은 대상이 아니다 — 첫 실사용은 첫 번째에만 성립한다.
|
|
1718
|
+
new_instr=$(git -c core.quotePath=false diff --cached --name-only --no-renames --diff-filter=A 2>/dev/null \
|
|
1719
|
+
| grep -E '(^|/)(lane_[a-z_]+\.py|[a-z_]+_check\.sh)$' || true)
|
|
1720
|
+
[ -n "$new_instr" ] || return 0
|
|
1721
|
+
line=$(grep -m1 -E '^[[:space:]]*axes-run:' "$m" 2>/dev/null)
|
|
1722
|
+
[ -n "$line" ] || return 0 # axes-run 자체 부재는 위 검사가 이미 막는다
|
|
1723
|
+
# ⓔ 값 추출: `ⓔ=...` 부터 다음 축 키 직전까지
|
|
1724
|
+
e_val=$(printf '%s' "$line" | sed -n 's/.*ⓔ=\([^ⓕ]*\).*/\1/p' | sed 's/[[:space:]]*$//')
|
|
1725
|
+
case "$e_val" in
|
|
1726
|
+
''|none|None|NONE|-)
|
|
1727
|
+
echo " ❌ MARKER — 이 커밋은 **새 계기를 추가**하는데 'axes-run' 의 ⓔ(첫 실사용)이 'none' 이다."
|
|
1728
|
+
printf ' 새 계기: %s\n' $new_instr
|
|
1729
|
+
echo " 🟥 정본 실측: ⓐ(계열)·ⓕ(되돌림)가 전부 초록인데 ⓔ만 오탐 둘을 낸 사례가 있다 —"
|
|
1730
|
+
echo " «계기의 계기가 틀린» 경우는 ⓐ·ⓓ 가 **구조적으로** 못 본다."
|
|
1731
|
+
echo " 둘 중 하나를 해라 (여섯 축을 다 돌리라는 뜻이 아니다):"
|
|
1732
|
+
echo " · 실물 대상에 한 번 돌리고 ⓔ=<무엇에 돌렸고 무엇이 나왔나>"
|
|
1733
|
+
echo " · 안 돌릴 거면 **같은 줄에 근거**를 ⓔ=none(<왜 이 계기는 첫 실사용이 불필요/불가한가>)"
|
|
1734
|
+
return 1 ;;
|
|
1735
|
+
esac
|
|
1736
|
+
return 0
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1398
1739
|
validate_marker_axes_run() { # $1 = marker path
|
|
1399
1740
|
local m="$1" mdate line ax miss="" nlines axkeys six=0
|
|
1400
1741
|
mdate=$(basename "$m" | sed -nE 's/.*_([0-9]{4}-[0-9]{2}-[0-9]{2})\.marker$/\1/p')
|
|
@@ -1643,6 +1984,14 @@ validate_marker_floor() {
|
|
|
1643
1984
|
return 0
|
|
1644
1985
|
}
|
|
1645
1986
|
|
|
1987
|
+
# 오늘자 마커 중 이 게이트가 «안 읽는» 것들. 순수 함수인 이유는 staged_worktree_drift 와 같다 —
|
|
1988
|
+
# 레인이 저장소 없이 구동해야 한다. 입력은 파일명 목록과 이 게이트가 읽는 주소, 출력은 나머지.
|
|
1989
|
+
# 🟥 빈 입력에서 무엇이 나오나: 목록이 비면 결과도 빈다(= 소견 없음). 그 방향이 옳다 — 마커가
|
|
1990
|
+
# 아예 없으면 아래 NOT CONFIRMED 가 이미 말하므로 여기서 또 말하면 중복이다.
|
|
1991
|
+
unread_markers() { # $1 = 오늘자 마커 파일명들 (LF) · $2 = 이 게이트가 읽는 파일명
|
|
1992
|
+
printf '%s\n' "${1:-}" | sed '/^$/d' | LC_ALL=C sort -u | LC_ALL=C grep -vxF "${2:-}" || true
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1646
1995
|
# ── Axes 2+3 — steel-quench + phantom-quench (full gate only) ─────────
|
|
1647
1996
|
if [ "$GATE_MODE" = "full" ]; then
|
|
1648
1997
|
echo "[Axis 2+3] Adversarial + Source-Grounding..."
|
|
@@ -1670,12 +2019,60 @@ if [ "$GATE_MODE" = "full" ]; then
|
|
|
1670
2019
|
_SOUL_OK=1
|
|
1671
2020
|
validate_soul_present_leg "$MARKER" || _SOUL_OK=0
|
|
1672
2021
|
validate_soul_check_leg "$MARKER" || _SOUL_OK=0
|
|
1673
|
-
|
|
2022
|
+
# 🟥 2026-08-30 신설 — 이 두 줄이 «정의만 하고 안 부르는» 상태로 착지할 뻔했다.
|
|
2023
|
+
# `scripts/test_hook_leg_wiring_lanes.sh` 가 W3·W4 를 NOT WIRED 로 잡았다.
|
|
2024
|
+
# 함수가 옳은지가 아니라 «호출되는지»를 보는 레인이 없으면 이건 조용히 통과한다
|
|
2025
|
+
# ([[feedback_built_but_not_wired]] — 오늘만 다섯 번째 얼굴).
|
|
2026
|
+
validate_soul_tenet_refs "$MARKER" || _SOUL_OK=0
|
|
2027
|
+
validate_defeater_leg "$MARKER" || _SOUL_OK=0
|
|
2028
|
+
if [ "$_DEFENSE_OK" -eq 1 ] && [ "$_SOUL_OK" -eq 1 ] && validate_marker_floor "$MARKER" && validate_marker_axes_run "$MARKER" && validate_first_use_leg "$MARKER"; then
|
|
1674
2029
|
echo " ✅ PASS (marker confirmed + floor/axes fields valid:"
|
|
1675
2030
|
echo " .axes_23_passed_${BRANCH_SLUG}_${TODAY}.marker)"
|
|
1676
2031
|
else
|
|
1677
2032
|
FAILED=1
|
|
1678
2033
|
fi
|
|
2034
|
+
# ── 전부-부재 마커 표면화 (advisory · 2026-08-30, cross-family codex «가장 싼 우회») ──
|
|
2035
|
+
# 🟥 모든 축을 «선언된 부재»로 채운 마커는 **형식적으로 완전히 합법**이다 — 그리고 그건
|
|
2036
|
+
# 설계다. 선언된 부재가 침묵보다 낫다는 것이 이 게이트들의 전제이므로 **차단하지 않는다.**
|
|
2037
|
+
# 그러나 «전부가 부재»라는 것 자체는 «기록의 속성»이라 기계가 볼 수 있다. 결론을 말하지
|
|
2038
|
+
# 않고 세어서 보여준다 — 저자와 리뷰어가 그 마커를 다시 보게 만드는 것이 전부다.
|
|
2039
|
+
# (판정을 코드로 굳히면 §Mechanization Boundary 위반이다. 그래서 advisory 다.)
|
|
2040
|
+
_empt=0
|
|
2041
|
+
grep -qE '^[[:space:]]*soul:[[:space:]]*(없음|none|n/a)[[:space:]]*$' "$MARKER" && _empt=$((_empt+1))
|
|
2042
|
+
grep -qE '^[[:space:]]*defeater:[[:space:]]*(없음|none|n/a)[[:space:]]*$' "$MARKER" && _empt=$((_empt+1))
|
|
2043
|
+
grep -qE '^[[:space:]]*axes-run:.*ⓐ=none.*ⓒ=none.*ⓔ=none.*ⓕ=none' "$MARKER" && _empt=$((_empt+1))
|
|
2044
|
+
grep -qE '^[[:space:]]*crossfamily:[[:space:]]*(UNKNOWN|DEGRADED)' "$MARKER" && _empt=$((_empt+1))
|
|
2045
|
+
grep -qE '^[[:space:]]*standpoint:[[:space:]]*(UNKNOWN|DEGRADED)' "$MARKER" && _empt=$((_empt+1))
|
|
2046
|
+
grep -qE '^[[:space:]]*thirdparty:[[:space:]]*(UNKNOWN|DEGRADED)' "$MARKER" && _empt=$((_empt+1))
|
|
2047
|
+
# 🟥 3라운드 두 계열 독립 수렴: 임계 4 는 **정상 마커를 매번 시끄럽게** 만든다 —
|
|
2048
|
+
# 혼자 한 작업이면 `axes-run: ⓐ=none…` + crossfamily/standpoint/thirdparty UNKNOWN 만으로
|
|
2049
|
+
# 4점이 되고, 그건 «점진 채택»의 의도된 정상 상태다.
|
|
2050
|
+
# ⇒ 하중 지는 둘(`soul:`·`defeater:`)이 **부재일 때만** 세고, 임계를 5로 올린다.
|
|
2051
|
+
_core_empty=0
|
|
2052
|
+
grep -qE '^[[:space:]]*soul:[[:space:]]*(없음|none|n/a)[[:space:]]*$' "$MARKER" && _core_empty=1
|
|
2053
|
+
grep -qE '^[[:space:]]*defeater:[[:space:]]*(없음|none|n/a)[[:space:]]*$' "$MARKER" && _core_empty=1
|
|
2054
|
+
if [ "$_core_empty" = 1 ] && [ "$_empt" -ge 5 ]; then
|
|
2055
|
+
echo " ⚠️ 이 마커는 $_empt 개 축이 «선언된 부재»다 — 형식은 통과지만 실질은 비어 있다."
|
|
2056
|
+
echo " 막지 않는다(선언된 부재는 침묵보다 낫다). 다만 «게이트를 통과했다»가"
|
|
2057
|
+
echo " «검증했다»로 읽히지 않도록 여기 남긴다. 리뷰어는 이 줄을 보고 마커를 다시 봐라."
|
|
2058
|
+
fi
|
|
2059
|
+
# ── 이 게이트가 «안 읽는» 오늘자 마커가 또 있나 (advisory) ──────────────────────
|
|
2060
|
+
# WHY. 이 훅은 `.axes_23_passed_<브랜치슬러그>_<날짜>.marker` **하나만** 읽는다. 다른 이름으로
|
|
2061
|
+
# 쓴 마커는 기록으로는 유효하지만 **검증은 하나도 안 거친다** — 그런데 저자는 「마커를 썼다」는
|
|
2062
|
+
# 사실만으로 검증됐다고 믿는다. 2026-08-30 실측: 한 세션이 안 읽히는 주소에 **8개**를 썼고,
|
|
2063
|
+
# 그 8개 전부 `floor-status: opus-tier`(enum 밖)를 갖고 있었으며 아무도 안 잡았다. 이름을
|
|
2064
|
+
# 맞추자 게이트가 **두 번의 시도로** 그 형식 오류들을 잡았다.
|
|
2065
|
+
# 🟥 채널이지 결론이 아니다 — 「그 마커가 옳은가」는 안 묻는다. 「네 증거가 독자가 보는
|
|
2066
|
+
# 주소에 있는가」만 묻고, 절대 차단하지 않는다(다른 이름의 기록은 정당한 관행이다).
|
|
2067
|
+
_MK_ADDR=".axes_23_passed_${BRANCH_SLUG}_${TODAY}.marker"
|
|
2068
|
+
_MK_ALL=$(ls -1 "$MARKER_DIR"/.axes_23_passed_*"${TODAY}".marker 2>/dev/null | sed 's|.*/||' || true)
|
|
2069
|
+
_MK_UNREAD=$(unread_markers "$_MK_ALL" "$_MK_ADDR")
|
|
2070
|
+
if [ -n "$_MK_UNREAD" ]; then
|
|
2071
|
+
echo " ⚠️ 오늘자 마커가 더 있는데 이 게이트는 안 읽는다 — 검증을 하나도 안 거친 기록이다:"
|
|
2072
|
+
printf '%s\n' "$_MK_UNREAD" | sed 's/^/ /'
|
|
2073
|
+
echo " 이 게이트가 읽는 주소는 $_MK_ADDR 하나다."
|
|
2074
|
+
echo " (advisory — 막지 않는다. 다른 이름의 «기록»은 정당하다. 다만 «검증됐다»고 읽지 마라.)"
|
|
2075
|
+
fi
|
|
1679
2076
|
else
|
|
1680
2077
|
echo " ❌ NOT CONFIRMED"
|
|
1681
2078
|
echo ""
|
|
@@ -2095,6 +2492,40 @@ fi
|
|
|
2095
2492
|
# vocabulary test for "human-facing document" over-blocked a legitimate case the same day it was
|
|
2096
2493
|
# first tried. The trigger is therefore a PATH SET (what actually ships to readers), not a
|
|
2097
2494
|
# vocabulary guess, and its whole output is one line of salience.
|
|
2495
|
+
# ── STAGED ≠ WORKTREE — «네가 검증한 트리»와 «커밋되는 트리»가 갈렸다 (advisory) ──────
|
|
2496
|
+
# WHY. 2026-08-29/30 하루에 네 번 났다, 매번 다른 계기가 잡았다 = 운이었다:
|
|
2497
|
+
# ⑴ pathspec 실패를 무시하고 검증 결과를 커밋에 귀속 ⑵ `git add` 뒤에 파일을 더 편집
|
|
2498
|
+
# ⑶ 검출기가 인덱스를 읽는데 나는 워킹트리에서 돌림(lane_runner_check)
|
|
2499
|
+
# ⑷ 래칫이 스테이징 전에는 새 배선을 못 봄
|
|
2500
|
+
# 공통 형태 하나: **검사기가 본 바이트와 커밋되는 바이트가 다르다.** 그런데 그 사실은
|
|
2501
|
+
# 커밋 시점에 한 줄로 계산된다 — `git diff`(워킹트리 vs 인덱스) ∩ `git diff --cached`.
|
|
2502
|
+
#
|
|
2503
|
+
# 🟥 WHAT THIS IS NOT — 판정이 아니라 채널이다(§Mechanization Boundary). 「이 편집이 검증을
|
|
2504
|
+
# 무효화하는가」는 안 묻는다; 그건 사람 몫이고 부분 스테이징은 정당한 관행이다. 묻는 것은
|
|
2505
|
+
# 오직 **«두 바이트열이 갈렸다»** 라는 기록의 성질이고, 그래서 절대 차단하지 않는다.
|
|
2506
|
+
# 차단했다면 hunk 단위 스테이징마다 막혀 `--no-verify` 를 훈련시켰을 것이고, 그건 같은 훅
|
|
2507
|
+
# 안의 Destructive-Op 게이트를 무장해제한다.
|
|
2508
|
+
#
|
|
2509
|
+
# 순수 함수인 이유: 레인이 저장소 없이 구동해야 한다. 입력은 두 경로 목록, 출력은 교집합.
|
|
2510
|
+
staged_worktree_drift() { # $1 = staged paths (LF) · $2 = worktree-modified paths (LF)
|
|
2511
|
+
# 🟥 빈 입력에서 무엇이 나오나 — `comm` 은 빈 파일 둘에서 빈 결과를 낸다(= 소견 없음).
|
|
2512
|
+
# 그 방향이 옳다: 「비교할 게 없다」와 「갈린 게 없다」는 여기서 같은 처방(아무것도 안 함)이라
|
|
2513
|
+
# 접어도 손실이 없다. 다른 필드에서 이 접기가 결함인 것과 구분해서 적어 둔다.
|
|
2514
|
+
_d_a=$(printf '%s\n' "${1:-}" | sed '/^$/d' | LC_ALL=C sort -u)
|
|
2515
|
+
_d_b=$(printf '%s\n' "${2:-}" | sed '/^$/d' | LC_ALL=C sort -u)
|
|
2516
|
+
LC_ALL=C comm -12 <(printf '%s\n' "$_d_a") <(printf '%s\n' "$_d_b")
|
|
2517
|
+
}
|
|
2518
|
+
_WT_MOD=$(git diff --name-only 2>/dev/null || true)
|
|
2519
|
+
_DRIFT=$(staged_worktree_drift "$STAGED" "$_WT_MOD")
|
|
2520
|
+
if [ -n "$_DRIFT" ]; then
|
|
2521
|
+
echo "[Gate] staged ≠ worktree — 검증한 바이트와 커밋되는 바이트가 다르다 (advisory)..."
|
|
2522
|
+
printf '%s\n' "$_DRIFT" | sed 's/^/ /'
|
|
2523
|
+
echo " ⚠️ 이 파일들은 **스테이징된 뒤에 또 편집됐다.** 방금 돌린 검사기가 워킹트리를"
|
|
2524
|
+
echo " 읽었다면 그 결과는 이 커밋을 서술하지 않는다."
|
|
2525
|
+
echo " 담으려면: git add <경로> · 빼려면: git restore <경로>"
|
|
2526
|
+
echo " (advisory — 막지 않는다. 부분 스테이징은 정당하고, 여기서 막으면 --no-verify 를 훈련시킨다.)"
|
|
2527
|
+
fi
|
|
2528
|
+
|
|
2098
2529
|
_PRESHIP=$(printf '%s\n' "$STAGED" | grep -E '^(README([._a-z]*)?\.md|CHEATSHEET\.md|CATALOG\.md|docs/[^/]*\.md|templates/[^/]*\.md)$' || true)
|
|
2099
2530
|
if [ -n "$_PRESHIP" ]; then
|
|
2100
2531
|
echo "[Gate] reader-facing surface staged — pre-ship read reminder (advisory)..."
|
|
@@ -2135,9 +2566,35 @@ if [ -f "$NC_CHECK" ]; then
|
|
|
2135
2566
|
fi
|
|
2136
2567
|
_nc_out=$(printf '%s\n' "$_nc_raw" | grep -E '🟥 무앵커' | head -5 || true)
|
|
2137
2568
|
if [ -n "$_nc_out" ]; then
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2569
|
+
# 🟥 2026-08-30: advisory → **차단**. 운영자 결정("남은 다리 가기 위해서는 강행해야지").
|
|
2570
|
+
# 켜기 전에 **과차단률을 쟀다**: 대상 표면 전수(knowledge/·docs/ 69개)에서 무앵커 **0건**.
|
|
2571
|
+
# 즉 이 게이트를 켜는 비용이 현재 0 이다 — 아무도 안 막힌다. 재기 전에 켰으면 그건
|
|
2572
|
+
# 강행이 아니라 도박이었다. 과차단은 `--no-verify` 를 훈련시키고 그건 **같은 훅의**
|
|
2573
|
+
# Destructive-Op 게이트를 무장해제한다(CLAUDE.md 가 반복해서 경고하는 그 축).
|
|
2574
|
+
# 그래서 집안 관행대로 **명시적·기록되는 override** 를 같이 둔다.
|
|
2575
|
+
if [ "${FH_NOVELTY_OK:-}" = "1" ]; then
|
|
2576
|
+
echo "[Gate] novelty/absence claim without an external anchor — OVERRIDDEN (FH_NOVELTY_OK=1):"
|
|
2577
|
+
printf '%s\n' "$_nc_out" | sed 's/^/ /'
|
|
2578
|
+
# 🟥 cross-family(gpt-5.5, 2026-08-30)가 잡았다: 초판은 «기록에 남는다» 고 «말만» 하고
|
|
2579
|
+
# 원장 append 가 없었다 — 터미널 로그가 사라지면 무엇을 우회했는지 감사 불가.
|
|
2580
|
+
# 집안 관행(`.psa_override_log`)과 같은 형태로 실제로 남긴다.
|
|
2581
|
+
mkdir -p "$EVIDENCE_ROOT/tracks/_meta" 2>/dev/null || true
|
|
2582
|
+
{ printf '%s FH_NOVELTY_OK=1 branch=%s\n' "$(date '+%Y-%m-%dT%H:%M:%S')" "${BRANCH:-?}"
|
|
2583
|
+
printf '%s\n' "$_nc_out" | sed 's/^/ /'
|
|
2584
|
+
} >> "$EVIDENCE_ROOT/tracks/_meta/.novelty_override_log" 2>/dev/null || true
|
|
2585
|
+
else
|
|
2586
|
+
echo "[Gate] 🚫 novelty/absence claim without an external anchor:"
|
|
2587
|
+
printf '%s\n' "$_nc_out" | sed 's/^/ /'
|
|
2588
|
+
echo " 각 줄 = '세상에 대해 단언했는데 세상에 안 물어봤다'."
|
|
2589
|
+
echo " 고치는 법: 그 주장 ±6줄 안에 외부 앵커를 둬라 —"
|
|
2590
|
+
echo " URL · arXiv/DOI · WebSearch/WebFetch · 출처 · 원문 확인 · 서베이"
|
|
2591
|
+
echo " 🟥 앵커 존재가 진위를 보증하지 않는다(그건 phantom-quench). 여기서 막는 것은"
|
|
2592
|
+
echo " '안 물어본 채 단언한 것' 하나다."
|
|
2593
|
+
echo " 강행: FH_NOVELTY_OK=1 git commit … (tracks/_meta/.novelty_override_log 에 append)"
|
|
2594
|
+
echo " ⚠️ GUI git 클라이언트에서는 env 주입이 번거로워 --no-verify 로 새기 쉽다 —"
|
|
2595
|
+
echo " 그건 같은 훅의 Destructive-Op 게이트까지 끈다. 앵커를 다는 쪽이 싸다."
|
|
2596
|
+
FAILED=1
|
|
2597
|
+
fi
|
|
2141
2598
|
fi
|
|
2142
2599
|
fi
|
|
2143
2600
|
fi
|
|
@@ -170,6 +170,25 @@ GUARD_PATHSPEC=(
|
|
|
170
170
|
'templates/.git-hooks/*'
|
|
171
171
|
'plugins/*/agents/*.md'
|
|
172
172
|
'.claude/agents/*.md'
|
|
173
|
+
# ── Added 2026-08-29 — 세 번의 SKIP 을 추적해 보니 «진짜 갭 1 · 계기 오용 2» 였다.
|
|
174
|
+
# 계기 오용: `--pr` 는 커밋된 ref 를 비교하는데 커밋 «전에» 불렀다 → merge-base==HEAD → 빈 diff
|
|
175
|
+
# → skip. (--staged 가 그 자리에 있는 이유이고, 위 --staged 주석이 이미 그렇게 적고 있었다.)
|
|
176
|
+
# 진짜 갭: README 4종. 공개 첫 화면인데 Axis 1 이 구조적으로 안 돌았다 — PR #550 이 실물이다.
|
|
177
|
+
# 같이 들어온 나머지는 4축 자산 목록과 이 배열을 기계로 대조해 나온 미커버분이다.
|
|
178
|
+
# 캘리브레이션(양방향, 넓힌 사본으로 실제 이력에 실행):
|
|
179
|
+
# · 이력 20 커밋(README·CHEATSHEET·package.json 등을 건드린 것) → M=0 S=0, 전부 pass.
|
|
180
|
+
# 오탐 폭풍 없음. 그리고 SKIP 이 아니라 pass 라는 것이 «파일이 실제로 선택됐다»의 컨트롤이다
|
|
181
|
+
# (무기력한 pathspec 에서 오는 깨끗한 0 을 배제한다 — 2026-08-04 항목과 같은 규율).
|
|
182
|
+
# · known-positive: README.md 를 60% 절단 → ❌ BLOCK (M-tier 2, 'BLOCK' 토큰 66% 소실, rc=2).
|
|
183
|
+
# package.json 은 md/sh 형 검사 대부분이 무력하지만 F6 줄-감소가 살아 있다 — files[] 항목이
|
|
184
|
+
# 대량 삭제되는 회귀가 이 저장소에서 실제로 있었던 클래스다.
|
|
185
|
+
'README*.md'
|
|
186
|
+
'CHEATSHEET.md'
|
|
187
|
+
'CATALOG.md'
|
|
188
|
+
'.github/workflows/*.yml'
|
|
189
|
+
'scripts/*.py'
|
|
190
|
+
'.claude/registry/*.md'
|
|
191
|
+
'package.json'
|
|
173
192
|
)
|
|
174
193
|
|
|
175
194
|
# 계기 무결: base ref 가 안 풀리면 diff 실패가 2>/dev/null 로 삼켜져 CHANGED 공백 →
|
|
@@ -364,7 +383,27 @@ for req in ('name:', 'description:'):
|
|
|
364
383
|
sys.exit(1)
|
|
365
384
|
print('OK')
|
|
366
385
|
" 2>&1)
|
|
367
|
-
|
|
386
|
+
fm_rc=$?
|
|
387
|
+
# 🟥 An ABSENT instrument is not a clean result. Before 2026-08-29 this `else` printed
|
|
388
|
+
# "✅ frontmatter intact" whenever `$fm_check` merely lacked the token FAIL — and
|
|
389
|
+
# `python3: command not found` lacks it. macOS ships no python3 by default, so on a stock
|
|
390
|
+
# consumer machine F1 was ALWAYS green, and that green meant "no checker", not "no defect".
|
|
391
|
+
# Measured by execution, not reading: same broken content, python3 present → `❌ M-TIER`,
|
|
392
|
+
# python3 shadowed with a 127 stub → `✅ frontmatter intact`.
|
|
393
|
+
# Degrade direction: this is the REVERSIBLE commit surface, so it degrades to a LOUD
|
|
394
|
+
# ADVISORY and deliberately does NOT touch S_TIER — bumping it would exit 1 and redden every
|
|
395
|
+
# such consumer's CI on any SKILL.md edit, and this file's own line 659 warns that
|
|
396
|
+
# over-blocking is what trains `--no-verify` into muscle memory. Not-silent and not-blocking
|
|
397
|
+
# are different properties; only the first is mandatory here.
|
|
398
|
+
# 🟥 The discriminator is the EXIT CODE, not `command -v`. A first pass at this fix asked
|
|
399
|
+
# "is python3 available?" and a three-way known-pair immediately broke it: a 127-stub IS on
|
|
400
|
+
# PATH, so `command -v` succeeded and the fail-open survived. The checker contract is
|
|
401
|
+
# rc 0 = intact · rc 1 = a FAIL line was printed · anything else = the instrument did not run
|
|
402
|
+
# (127 absent, 126 not-executable, a broken interpreter), which covers absent AND broken with
|
|
403
|
+
# one branch instead of enumerating causes.
|
|
404
|
+
if [ "$fm_rc" -ne 0 ] && [ "$fm_rc" -ne 1 ]; then
|
|
405
|
+
echo " ⚠️ F1 UNMEASURED — frontmatter checker did not run (rc=$fm_rc): $fm_check"
|
|
406
|
+
elif echo "$fm_check" | grep -q FAIL; then
|
|
368
407
|
echo " ❌ M-TIER frontmatter: $fm_check"
|
|
369
408
|
M_TIER=$((M_TIER + 1))
|
|
370
409
|
else
|