Merge feature/graphify-threshold-banner into develop

This commit is contained in:
bastien
2026-09-24 13:24:52 +02:00
10 changed files with 161 additions and 4 deletions
+7
View File
@@ -1215,6 +1215,13 @@ Branch feature/user-writing-web-rules, UNMERGED (human gate).
- **Reference**: `lib/gitflow.sh`, `lib/gitflow-test.sh` T22/T23, `githooks/reference-transaction`, `.githooks/reference-transaction`, `settings.json`, `doctor.sh`, `skills/gitflow/SKILL.md`, `CLAUDE.global.md`, `templates/settings/SETTINGS.md`. Extends [[BDR-095]]; links [[LRN-161]], [[LRN-114]].
- **Amendment 2026-09-24 (user go: "nettoie aussi les branches distantes une fois mergées")**: `_gitflow_delete_remote` runs after the local delete — `ls-remote --exit-code` reads the remote tip, `gitflow_merged_into_base <tip>` re-checks it (unknown or unmerged sha → remote copy KEPT, loud), then `push origin --delete`. Best effort like the pushes: no origin / `GITFLOW_NO_PUSH=1` / `gitflow.autopush false` → skip; unreachable or refused → "NOT removed" + the hand command, rc 0. Explicit protected-base guard inside the helper too. Static deny on hand `git push --delete` UNCHANGED: it matches the Bash tool's command string, the lib's sub-process is the sanctioned path (prose says so). Rejected: making a failed remote delete fail `finish` (merge done, local gone → nothing to roll back; loud is enough); deleting without re-checking the remote tip (a push from another clone would be lost). T24 9/9, suite 161/163 (2 pre-existing T16a). Live: origin/feature/branch-delete-guard + origin/feature/destructive-guardrails removed by `gitflow.sh delete` (both tips verified merged), bases untouched. On feature/remote-branch-cleanup, UNMERGED (human gate).
## BDR-097 — graphify from 200 tracked code files: the banner informs, the user decides
- **Date**: 2026-09-24
- **Decision**: deterministic threshold, not AI judgment. `lib/graphify-gate.sh`: `git ls-files` code extensions (graphify's AST set), vendored trees (`vendor|node_modules|third_party|dist|build`) excluded, ≥ 200 AND no `graphify-out/graph.json` → one banner-sized line `graphify? N code files ≥ 200, no graph` + `→ /graphify (AST, seconds) — you decide` in session-start. Nothing built, installed or updated by the hook. Doctrine: CLAUDE.global.md graphify § carries the threshold + "never `graphify claude install` without a go"; plugin-advisor thresholds stop pre-enabling graphify at scaffold time. `GRAPHIFY_MIN_CODE_FILES` overrides (tests).
- **Why**: user question "when is graphify worth it, can the AI suggest it, even set it up". Measured first ([[LRN-162]]): value = localisation (who calls what), not editing (the file is read anyway); code-only build is free (AST), docs cost session tokens; a query costs 2-3k tokens ≈ two file reads. Below ~200 files grep beats the graph. User's own words: "tu informes, je décide" — an AI-estimated trigger is judgment (irreproducible, invisible when silent), a count is a rule. Fits `graphify-out/` being a per-project write the user owns.
- **Alternatives rejected**: AI "estimates the project needs graphify" → not reproducible. Auto-build at threshold → writes ~8 MB into the project, user's decision. Interconnection metric (import graph density) → needs the graph itself to compute; file count is the honest proxy. Post-commit `graphify update` in the gitflow hooks → deferred to a pilot (user picked the inform-only compromise); note `update` refuses a smaller graph without `--force`, and `graphify hook install` is inert under the global `core.hooksPath`. `graphify claude install` → rejected again (PreToolUse nudges on every Read/Glob = the context tax, [[BDR-028]]).
- **Status**: accepted, on feature/graphify-threshold-banner, UNMERGED (human gate). Test 11/11, shellcheck clean; live: this repo silent (74 files), robin_petier fires (214).
- **Reference**: `lib/graphify-gate.sh`, `lib/tests/graphify-gate.test.sh`, `hooks/session-start.sh`, `CLAUDE.global.md` § graphify, `agents/plugin-advisor.md`, CHANGELOG. Links [[LRN-162]], [[BDR-028]], [[BDR-021]] (conditional graphify rules).
## BDR-098 — CLAUDE.global.md density pass 352 → 270: compression only, three name-obvious routing lines dropped
- **Date**: 2026-09-24
- **Decision**: user go "fais la passe de densité". [[BDR-031]] principle kept (compression, no path-scoping, no externalization, no caveman); [[BDR-062]]'s 320 guard kept. Method: prose tightened section by section, blank lines after headings removed, the 6 classic Security subsections folded into one bold-labelled bullet list (`### Destructive tools & data loss` kept as a heading, referenced from Workflow), Session-start / Planning / After-code numbered lists collapsed, Memory-registries prose rewritten (routing list → one sentence, language + format paragraphs merged, close ritual → one sentence), radical-honesty tenets paired two per bullet, gitflow paragraphs re-flowed. Deliberately dropped: routing lines `release-candidate`, `audit-delta`, `init-project`/`onboard` (name-obvious, the skill descriptions carry them — BDR-031's own criterion), rationale clauses (why English, why caveman), `~/.claude/githooks` literal, `T22a` cite, pa11y/HTML-CSS detail in the web-validate line. Every `##` heading verbatim (`Design work — full toolchain (tiered by scope)` is matched by the design-toolchain hook). graphify section left byte-identical: `feature/graphify-threshold-banner` (unmerged) edits it, a clean merge matters more than 2 lines.