mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-20 19:12:17 +01:00
This file loads into context on every turn of every session, so every line is
paid for repeatedly. Two thirds of it either duplicated a gate that already
fails the commit, or stated something untrue.
Deleted because a hook enforces it: the ruff/mypy/pylint/coverage settings,
"double-quote expansions" (shellcheck runs with no severity filter), absolute
imports, Google docstrings, type hints, and the inline-Python rule -- which
got a real gate in 17b20e5 rather than being dropped.
Corrected four claims that were simply false, all verified against the config:
- pytest-coverage was listed as a pre-push hook; it is stages:[pre-commit].
Pre-push is prettier + ci-mirror.
- the root-symlink list named requirements.txt twice and omitted lint_python.sh
- "scripts/" described a directory that does not exist at repo root
- per-file-ignores were listed as S101/PLR2004/S310/S607/PLC0415; the actual
set is ARG/D/PLC0415/PLR2004/S101/SLF001
Added the five top-level dirs the layout table omitted (poker-stakes, bottles,
bucket_catch, focus_owner, kcd2_dice_solver) and documented three gates that
were enforced but undocumented: the 4-file contract threshold, append-only
session logs, and the 2% jscpd limit.
Also recorded two places the gate is weaker than it looks: the mypy hook
disables ~20 error codes despite strict=true, and no-polling-antipatterns only
inspects *_loop/*_daemon/poll* functions.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
40 lines
3.3 KiB
JSON
40 lines
3.3 KiB
JSON
{
|
|
"intent": "Shrink CLAUDE.md from 259 to 141 lines by deleting rules that hooks already enforce, correcting claims that were factually wrong, and rewriting the remainder as HOW rather than WHY.",
|
|
"scope": [
|
|
"CLAUDE.md (rewritten)",
|
|
"Non-goal: no hook behaviour changes in this commit; the one new gate (no-inline-python) landed separately in 17b20e5"
|
|
],
|
|
"changes": [
|
|
"Deleted prose duplicating existing gates: ruff/mypy/pylint/coverage settings, 'double-quote expansions' (shellcheck SC2086, no severity filter), absolute imports (TID252), Google docstrings, type hints (ANN), the inline-Python rule (now the no-inline-python hook), and the evidence-file procedure detail.",
|
|
"Corrected four factual errors found by auditing the config: (1) pytest-coverage was listed as a pre-push hook but is stages:[pre-commit] -- pre-push is prettier + ci-mirror only; (2) the root-symlink list named requirements.txt twice and omitted lint_python.sh; (3) 'scripts/ -- workspace-level helpers' described a directory that does not exist at repo root; (4) per-file-ignores were listed as S101/PLR2004/S310/S607/PLC0415 when the actual set is ARG/D/PLC0415/PLR2004/S101/SLF001.",
|
|
"Added five top-level directories the layout table omitted: poker-stakes, bottles, bucket_catch, focus_owner, kcd2_dice_solver.",
|
|
"Documented three enforced-but-undocumented gates an agent would otherwise hit blind: the 4-file contract threshold, append-only session logs, and the 2% jscpd duplication limit.",
|
|
"Recorded two places where the gate is weaker than it looks: the mypy hook disables ~20 error codes despite strict=true in config, and no-polling-antipatterns only inspects *_loop/*_daemon/poll* functions."
|
|
],
|
|
"verification": [
|
|
{
|
|
"command": "bash ~/utils/scripts/check_file_length.sh CLAUDE.md",
|
|
"result": "pass",
|
|
"evidence": "259 -> 141 lines; exits 0, comfortably under the 250-line cap with headroom rather than trimming to exactly 250."
|
|
},
|
|
{
|
|
"command": "grep checks against check_python_location.sh, validate_evidence.py, check_append_only_sessions.sh, check_agent_contract.sh, check_polling_antipatterns.sh, .githooks/pre-commit",
|
|
"result": "pass",
|
|
"evidence": "Every retained claim verified against its source: allowlist dirs match; banned phrases are exactly 'should work'/'probably fine'/'seems right'; sessions regex is ^docs/superpowers/sessions/.*\\.(jsonl|log|txt)$; MULTI_FILE_THRESHOLD=4; in_poll awk guard matches *_loop|*_daemon|poll*; jscpd --threshold 2."
|
|
},
|
|
{
|
|
"command": "test -d for each of the 13 directories named in the layout table",
|
|
"result": "pass",
|
|
"evidence": "No MISSING lines -- every path in the table exists."
|
|
}
|
|
],
|
|
"risks": [
|
|
"Deleting enforced prose relies on the hooks staying wired. That is the intended trade: a gate that fails the commit is stronger than a sentence an agent may not read, and .pre-commit-config.yaml is now named as the source of truth.",
|
|
"The audit that classified each rule was produced by a subagent; every claim retained or corrected here was independently re-verified against the config files before editing."
|
|
],
|
|
"rollback": [
|
|
"git revert this commit to restore the 259-line version.",
|
|
"Validate with: bash ~/utils/scripts/check_file_length.sh CLAUDE.md (will then fail at 259 lines)."
|
|
]
|
|
}
|