[CLAUDE] Docs: S100 Harness-18 adopt — detector v2 ratio-band+glob (fault-inject 4/4, MED 11→0) + retire runs/_ledger 🧊 (0/15 lifetime, sweep 15 điểm/8 file, orphan=folder-scan) + engine §J + cron ghost-wire honest-retire (CronList=0, 5 file) + F2 SendMessage re-verified + 3 adap-report (frontier HELD hash-MISMATCH, flag reviewer_gate-missing) — WF1 wf_50a817ce-a69 · WF2 wf_31ea3985-92c in-flight
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m17s

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
pqhuy1987
2026-07-02 15:32:04 +07:00
parent 513aa09b2e
commit 5ee32c0c0b
19 changed files with 207 additions and 35 deletions

View File

@ -212,13 +212,18 @@ $countPatterns = @(
@{ Rx = ('(\d+)\s*(?:' + $VN_BANG + '|table)'); Key = 'table'; Label = 'table/bang' }
)
# H18-A(b) scan-range follows the REAL rule-range (S100, Harness-18 adopt): the derived-doc
# set expands DYNAMICALLY to ALL skill SKILL.md + ALL command *.md. Rationale (real pain):
# a stale hard-count "(68)" survived ~11 sessions inside .claude/commands/session-start.md
# because commands/ sat OUTSIDE this fixed list (blind class, H1 F3 catch S99). A fixed list
# self-ages as the rule-set grows; the glob tracks the live set. Test-Excluded still applies.
$derivedDocs = @(
'CLAUDE.md',
'docs\CLAUDE.md',
'.claude\skills\ef-core-migration\SKILL.md',
'.claude\skills\README.md',
'.claude\skills\dependency-audit-erp\SKILL.md'
'.claude\skills\README.md'
) | ForEach-Object { Join-Path $RepoRoot $_ }
$derivedDocs += @(Get-ChildItem -Path (Join-Path $RepoRoot '.claude\skills') -Recurse -Filter 'SKILL.md' -File -ErrorAction SilentlyContinue | ForEach-Object { $_.FullName })
$derivedDocs += @(Get-ChildItem -Path (Join-Path $RepoRoot '.claude\commands') -Filter '*.md' -File -ErrorAction SilentlyContinue | ForEach-Object { $_.FullName })
foreach ($doc in $derivedDocs) {
if (-not (Test-Path $doc)) { continue }
@ -240,7 +245,15 @@ foreach ($doc in $derivedDocs) {
if ($cp.Key -eq 'test' -and $post -match '^\s*project') { continue } # "N test project" = project count, not test count
$n = [int]$m.Groups[1].Value
if ($n -ne $canon) {
$sev = if ([math]::Abs($n - $canon) -ge 10) { 'MED' } else { 'LOW' }
# H18-A(a) mismatch-only CONFIDENCE band (S100): a stale TOTAL lags canonical
# by a few sessions so it lands NEAR canonical (ratio 0.5..2.0) -> MED.
# A module-local count ("6 test PeWorkflowDefinition" vs canonical 440) sits
# FAR from the total -> LOW advisory (likely a different quantity sharing the
# token word, NOT a stale claim). The old |diff|>=10 rule was BACKWARDS for
# that class (big diff = high sev = false alarm; S98 verify: 8/8 MED were FP).
# Correct restatement (n == canon) still never flags (mismatch-only base).
$ratio = if ($canon -gt 0) { [double]$n / [double]$canon } else { 0.0 }
$sev = if ($ratio -ge 0.5 -and $ratio -le 2.0) { 'MED' } else { 'LOW' }
Write-Flag $sev ("{0}:{1}" -f (Rel $doc), ($i + 1)) `
("derived-stale: writes {0} {1} but canonical={2}" -f $n, $cp.Label, $canon) `
("update to {0} OR replace with pointer '-> docs/STATUS.md'" -f $canon)
@ -249,7 +262,7 @@ foreach ($doc in $derivedDocs) {
}
}
}
Write-Host ' (note: count-token grep is a soft net - module-local phrases like "4 bang Budget" / "71 test (Phase 8)" can false-positive; treat LOW sev as review-not-fail)' -ForegroundColor DarkGray
Write-Host ' (note: count-token grep is a soft net - module-local phrases like "4 bang Budget" / "71 test (Phase 8)" can false-positive; H18-A ratio-band demotes far-from-canonical counts to LOW = review-not-fail, near-canonical stale-totals stay MED)' -ForegroundColor DarkGray
# ---------------------------------------------------------------------------
# C1 - broken-pointer: gotcha #N refs