From d1e74238d333acc9cf3d68ee4927bc1f8190d0f7 Mon Sep 17 00:00:00 2001 From: Bastien Chanot Date: Mon, 6 Jul 2026 02:09:16 +0200 Subject: [PATCH 1/7] job1: close BLK-009 --- .claude/memory/blockers.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.claude/memory/blockers.md b/.claude/memory/blockers.md index 761c3e9..99e46df 100644 --- a/.claude/memory/blockers.md +++ b/.claude/memory/blockers.md @@ -28,7 +28,7 @@ rules: | BLK-006 | 2026-05-21 | `profile.sh current` false-negative via `~/.claude` symlink (`cd` not `cd -P`) | resolved | | BLK-007 | 2026-06-02 | 6 gstack source skills (ios-*, spec) unlinked post-bump — invisible to profiles + `gstack on` | resolved | | BLK-008 | 2026-06-23 | gstack ./setup on Ubuntu 26.04: Playwright chromium unsupported → gstack browser (/browse, /qa, screenshots) silently dead | resolved (211c7d4) | -| BLK-009 | 2026-06-25 | user-level path-scoped rules (`paths:` frontmatter in `~/.claude/rules/`) never inject — broken in CC 2.1.190 (#21858) | upstream, open | +| BLK-009 | 2026-06-25 | user-level path-scoped rules (`paths:` frontmatter in `~/.claude/rules/`) never inject — broken in CC 2.1.190 (#21858) | resolved (2026-07-06) | | BLK-010 | 2026-06-27 | init-project: scaffold (STEP 5) + bootstrap README (5b) have no deterministic commit owner; worktree `add -b` on unborn HEAD | resolved (uncommitted) | | BLK-011 | 2026-06-27 | init-project STEP 13 GSD post-FINISH creates ROADMAP.md → stranded doc (3rd post-FINISH artifact) | resolved (STEP 12 removed) | | BLK-012 | 2026-06-29 | gitflow_init half-applied: socle-commit failure swallowed → hook activated on partial run → re-run self-blocks | resolved | @@ -124,7 +124,8 @@ rules: - **Real cause**: GitHub issue #21858 — user-level (`~/.claude/rules/`) rules carrying `paths:` frontmatter are not evaluated/injected; still unfixed in 2.1.190. (Project-level path-scoped rules not tested here.) - **Probe method**: 3-file probe — `_probe.md` (`paths: ["**/*.probe"]`, sentinel `SENTINEL_USER_RULE_LOADED`), `_probe_ctl.md` (NO `paths`, control sentinel `CONTROL_NOPATHS_LOADED`), `_probe_target.probe` (target, read in a fresh session). Result: control sentinel PRESENT in session context, path-scoped sentinel ABSENT → the path-scoped rule did not load. Probe files removed after. - **Status**: upstream, open. Workaround: don't rely on user-level path-scoping → keep global guidance unconditional + COMPRESSED ([[BDR-031]]). Side-note: native auto-memory = "on" but writes nothing yet (fresh machine). Re-test on CC upgrades. -- **Reference**: GitHub #21858. Linked to [[BDR-031]], [[LRN-044]]. +- **2026-07-06 UPDATE — RESOLVED**: re-probed `paths:` frontmatter lazy-load with fresh 3-file probe (`**/*.blkprobe` glob) — confirmed loading works at BOTH project-level AND user-level (`~/.claude/rules/`) rule dirs. #21858 no longer reproduces on current CC version. Status → resolved. Prior workaround (unconditional + compressed global CLAUDE.md, [[BDR-031]]) no longer forced by this bug — see [[LRN-103]]. +- **Reference**: GitHub #21858. Linked to [[BDR-031]], [[LRN-044]], [[LRN-103]]. --- From b4449ce678745c2fdbbcaaf7db91b116b59d9073 Mon Sep 17 00:00:00 2001 From: Bastien Chanot Date: Mon, 6 Jul 2026 02:09:25 +0200 Subject: [PATCH 2/7] job1: F8 stale model ref, F7 internal dup, F4 skill-first redundant --- CLAUDE.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index bd6bd56..2020ca1 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -41,7 +41,7 @@ Apply unless repo-specific instructions override. More compute on hard problems. Task fans out across independent items (many files, parallel searches, multi-point checks) → delegate to sub-agents, don't iterate serially. Default to delegation for - multi-file exploration. Counters Opus 4.8 tendency to under-delegate. + multi-file exploration. Counters model tendency to under-delegate. - One question upfront if needed — don't interrupt mid-task. *Exception: skill-mandated gates and checkpoints (orchestrator validation gates, approval gates, darwin checkpoints) always fire.* @@ -80,10 +80,9 @@ Apply unless repo-specific instructions override. ## Memory registries (`.claude/memory/`) -Five registries persist across sessions. Read all at session start. -Capitalize during/after work. Append-only by default — never rewrite -past entries; curation (merge, mark superseded, compress) ONLY via -`/prune-memory`. +Five registries persist across sessions. Capitalize during/after work. +Append-only by default — never rewrite past entries; curation (merge, +mark superseded, compress) ONLY via `/prune-memory`. | File | ID format | Purpose | |------|-----------|---------| @@ -257,10 +256,9 @@ Apply at every dev step: design, scaffolding, implementation, review. # Tooling & skills ## Skill routing -Request matches a skill → invoke via Skill tool first, before any direct -answer or other tool. Most skills route by name — match the request to the -skill whose description fits (full list is in context). Rules below cover -only the non-obvious cases: gstack fallbacks, disambiguation, cryptic names. +Most skills route by name — match the request to the skill whose +description fits (full list is in context). Rules below cover only the +non-obvious cases: gstack fallbacks, disambiguation, cryptic names. - Product idea, "worth building?" → office-hours - Bug / error / 500 → investigate (bugfix if gstack off) From 10d97df0c8804122a60074a4bcb1cc2509ef989d Mon Sep 17 00:00:00 2001 From: Bastien Chanot Date: Mon, 6 Jul 2026 02:12:04 +0200 Subject: [PATCH 3/7] job1: F9 path-scope rules README --- rules/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rules/README.md b/rules/README.md index 775b2df..9346163 100644 --- a/rules/README.md +++ b/rules/README.md @@ -1,3 +1,7 @@ +--- +paths: ["rules/**"] +--- + # rules/ Modular instruction files loaded by Claude Code alongside `CLAUDE.md`. From 98761fc1d0b4b5771647eb6efa1280a22dff4d4e Mon Sep 17 00:00:00 2001 From: Bastien Chanot Date: Mon, 6 Jul 2026 02:31:29 +0200 Subject: [PATCH 4/7] =?UTF-8?q?job1:=20capitalize=20LRN-103=20=E2=80=94=20?= =?UTF-8?q?BLK-009=20doc=20was=20stale,=20paths:=20works=20at=20both=20lev?= =?UTF-8?q?els?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .claude/memory/learnings.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.claude/memory/learnings.md b/.claude/memory/learnings.md index 1416a73..243ae4a 100644 --- a/.claude/memory/learnings.md +++ b/.claude/memory/learnings.md @@ -1050,3 +1050,11 @@ rules: - **context**: 2026-07-05 /deploy run 2 (bchanot-cv). Skill patched same turn: checklist display-only (no NEXT.sh file at all — user: throwaway once deployed) + hand-back ends the turn, no tool call after. - **future application**: designing any skill/flow output meant to be read+used from the conversation — put it LAST; never sandwich a deliverable between tool calls; prefer plain-text report requests over blocking question tools after a deliverable. - **cousin**: [[LRN-100]] same skill lineage; CLAUDE.md communication doctrine (final message carries everything). + +## LRN-103 — BLK-009 was stale: re-probe confirms `paths:` frontmatter works at BOTH levels now + +- **pattern**: BLK-009 (2026-06-25) recorded user-level `paths:` rules never inject (GH #21858, CC 2.1.190). job1 instruction-file audit (2026-07-06) cited it as open/broken to flag rules/README.md's documented lazy-load mechanism as self-contradicting. Fresh re-probe same day (3-file probe, `**/*.blkprobe` glob): confirmed loading now works at BOTH project-level AND user-level. Bug gone (or no longer reproducible on current CC version) — the registry's "still broken" claim was stale and was about to justify a caveat in rules/README.md warning about a bug that no longer exists. +- **why**: registries are append-only + dated — a recorded status is a snapshot, not a standing fact. Any decision or audit finding that cites an open upstream blocker without re-probing risks acting on stale tool-version info, especially across CC version bumps. +- **context**: 2026-07-06, job1 audit follow-up (.audit/job1-report.md, finding F13). BLK-009 closed same session; workaround it forced ([[BDR-031]] unconditional + compressed global CLAUDE.md) no longer required by this bug specifically, though BDR-031 itself stands on its own merits pending separate review. +- **future application**: before acting on ANY open upstream/tool blocker cited to justify a fix, a caveat, or a design constraint — re-probe it live if cheap, don't just trust the registry's last-recorded status. +- **cousin**: [[BLK-009]] closed this session; [[BDR-031]] (the workaround this bug forced). From 5078eb0709d811e3b31aad4011093ddde1e74a66 Mon Sep 17 00:00:00 2001 From: Bastien Chanot Date: Mon, 6 Jul 2026 02:33:56 +0200 Subject: [PATCH 5/7] =?UTF-8?q?job1:=20F1=20density=20pass=20=E2=80=94=20g?= =?UTF-8?q?itflow=20section=2036=E2=86=9224=20lines,=20all=20constraints?= =?UTF-8?q?=20preserved?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CLAUDE.md | 54 +++++++++++++++++++++--------------------------------- 1 file changed, 21 insertions(+), 33 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 2020ca1..a293e0c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -163,40 +163,28 @@ All web API endpoints must be versioned from day one: `/api/v1/...`. ## Version control — gitflow (universal) -Every git action follows gitflow — inside a skill AND for ad-hoc commits made -outside one on direct request. The model is universal across all projects. +Every git action follows gitflow — in a skill, or an ad-hoc commit made outside +one on request. `main` (prod) · `develop` (integration, off main) · `feature/*` + `bugfix/*` + `chore/*` (off develop → develop; `chore/*` = memory/doc +maintenance, e.g. standalone `/capitalize` `/close` `/prune-memory` +`/reconcile`) · `release/*` (off develop → main + back-merge develop) · +`hotfix/*` (off main → main + develop [+ any open release/*]). `master`→`main` +everywhere. -### Branch model -`main` (prod) · `develop` (integration, off main) · `feature/*` + `bugfix/*` + -`chore/*` (off develop → develop; `chore/*` = memory/doc maintenance, e.g. -standalone `/capitalize` `/prune-memory` `/reconcile`) · `release/*` (off develop → -main + back-merge develop) · `hotfix/*` (off main → main + develop [+ any open -release/*]). `master`→`main` everywhere. - -### Rules for every git action -- **Never commit code directly on `main` or `develop`.** Branch first from the - correct base, named `/`. (`.claude/**` memory/config commits are - hook-exempt — they follow the work; but *standalone* memory/doc skills branch to - `chore/*` via the aiguillage rather than lean on that exemption.) -- **Branch + merge via the lib, never by hand** — the directed-merge + hotfix - fan-out logic lives there once: - `bash ~/.claude/lib/gitflow.sh start ` · `… finish`. -- **`gitflow finish` (merge) only on an explicit human signal** ("merge it", - "feature OK") — never because tests pass, a plan step says "merge", or a verb - ("ship") implied it. -- **Assistance flows** (`/feat` `/bugfix` `/hotfix`) AND **standalone memory/doc - skills** (`/capitalize` `/close` `/prune-memory` `/reconcile`, type `chore`) - auto-branch on a protected base (the aiguillage); on a working branch they commit - in place, never finish. -- **New/onboarded projects** get the model + the versioned pre-commit hook via - `gitflow init` (init-project STEP 5f, onboard STEP 2.6). - -### Enforcement layers -Advisory — it can be forgotten on a long conversation (no reliable oracle). The -deterministic backstops are the per-repo **pre-commit hook** (`gitflow init` -installs it: blocks code commits on main/develop, exempts `.claude/**` + merges + -the root commit) and **Gitea branch protection** on `main`/`develop` (set up by -the migration). Don't lean on `--no-verify` to bypass them. +Never commit code directly on `main` or `develop`: branch first from the +correct base as `/` (`.claude/**` memory/config commits are +hook-exempt, following the work). Branch/merge only via the lib, never by hand: +`bash ~/.claude/lib/gitflow.sh start ` · `… finish`. Run `finish` +(merge) only on an explicit human signal ("merge it", "feature OK"), never +because tests pass, a plan step says "merge", or "ship" implied it. Assistance +flows (`/feat` `/bugfix` `/hotfix`) and the standalone memory/doc `chore` +skills auto-branch on a protected base but commit in place on a working branch, +never finishing — so those skills branch to `chore/*` via the aiguillage, not +the `.claude/**` exemption. New/onboarded projects get the model + the +versioned pre-commit hook via `gitflow init`. Advisory, so two deterministic +backstops apply: the per-repo pre-commit hook (blocks code commits on +main/develop, exempts `.claude/**` + merges + the root commit) and Gitea branch +protection on `main`/`develop`. Don't lean on `--no-verify` to bypass them. ## Security — non-negotiable defaults From 3f639b306792960a9d46ba8bbf9d2d8fb4b38459 Mon Sep 17 00:00:00 2001 From: Bastien Chanot Date: Mon, 6 Jul 2026 02:40:46 +0200 Subject: [PATCH 6/7] job1: F14 hook pointer-only --- hooks/design-toolchain-reminder.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hooks/design-toolchain-reminder.sh b/hooks/design-toolchain-reminder.sh index 998c77c..b69bc9e 100755 --- a/hooks/design-toolchain-reminder.sh +++ b/hooks/design-toolchain-reminder.sh @@ -48,12 +48,7 @@ if printf '%s' "$lc" | grep -Eq "$pattern"; then "$(printf '%s' "$lc" | grep -oiE "$pattern" | head -1 || true)" \ "$(printf '%s' "$prompt" | tr '\n\t' ' ' | cut -c1-100)" >> "$logf" 2>/dev/null || true cat <<'EOF' -[design-toolchain] UI/design signal detected. Apply CLAUDE.md "Design work — full toolchain (tiered by scope)": -- Trivial (≤2 files, single cosmetic value, CSS tweak) → /hotfix, NO toolchain. -- Build UI (component/page/screen/redesign) → ui-ux-pro-max (plan/build) + frontend-design (anti-slop) + Magic MCP /ui (21st.dev scaffold) + emil-design-eng (polish) + design-motion-principles (if motion) + design-html (if static/Pretext). -- Design system/brand → design-consultation FIRST, then the build tools above. -- Review/audit → design-review + emil-design-eng lens + design-motion-principles (audit mode). -If genuinely trivial/non-UI, ignore this and proceed. IN DOUBT about scope (trivial vs real UI change) → do NOT silently skip: ask the user, or default to the build tier rather than /hotfix. +Design work detected → apply CLAUDE.md section "Design work — full toolchain" (already in context). Trivial (≤2 files, cosmetic) → /hotfix. EOF fi From f0e2d0cda338d74a315cc89af3e691faf5130ee1 Mon Sep 17 00:00:00 2001 From: Bastien Chanot Date: Mon, 6 Jul 2026 02:43:37 +0200 Subject: [PATCH 7/7] job1: guard CLAUDE.md line count --- hooks/session-start.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hooks/session-start.sh b/hooks/session-start.sh index de2b952..9a749f9 100644 --- a/hooks/session-start.sh +++ b/hooks/session-start.sh @@ -198,6 +198,16 @@ unset _active_count _inactive_count printf "│ 🖥️ CLI : %-40s│\n" "$GSD_STATUS" [ -n "$TOKEN_WARN" ] && printf "│ 💰 %-44s│\n" "${TOKEN_WARN:0:44}" printf "│ 📦 v%-45s│\n" "$CONFIG_VERSION" +# CLAUDE.md line-count guard (job1 anti-regression, BDR-031 density target: 275) +if [ -n "$REPO_DIR" ] && [ -f "$REPO_DIR/CLAUDE.md" ]; then + _claude_lines=$(wc -l < "$REPO_DIR/CLAUDE.md") + if [ "$_claude_lines" -gt 280 ]; then + _cmd_warn="CLAUDE.md ${_claude_lines}L (>280) — density pass requis" + printf "│ ⚠️ %-44s│\n" "${_cmd_warn:0:44}" + unset _cmd_warn + fi + unset _claude_lines +fi # Version check: compare local vs remote (non-blocking) _remote_ver="" if [ -n "$REPO_DIR" ] && [ -d "$REPO_DIR/.git" ]; then