Merge chore/job1-fixes into develop

This commit is contained in:
Bastien Chanot
2026-07-06 02:49:02 +02:00
6 changed files with 54 additions and 50 deletions
+3 -2
View File
@@ -28,7 +28,7 @@ rules:
| BLK-006 | 2026-05-21 | `profile.sh current` false-negative via `~/.claude` symlink (`cd` not `cd -P`) | resolved | | 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-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-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-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-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 | | 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.) - **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. - **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. - **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]].
--- ---
+8
View File
@@ -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. - **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. - **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). - **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).
+28 -42
View File
@@ -41,7 +41,7 @@ Apply unless repo-specific instructions override.
More compute on hard problems. Task fans out across independent More compute on hard problems. Task fans out across independent
items (many files, parallel searches, multi-point checks) → delegate items (many files, parallel searches, multi-point checks) → delegate
to sub-agents, don't iterate serially. Default to delegation for 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. - One question upfront if needed — don't interrupt mid-task.
*Exception: skill-mandated gates and checkpoints (orchestrator *Exception: skill-mandated gates and checkpoints (orchestrator
validation gates, approval gates, darwin checkpoints) always fire.* validation gates, approval gates, darwin checkpoints) always fire.*
@@ -80,10 +80,9 @@ Apply unless repo-specific instructions override.
## Memory registries (`.claude/memory/`) ## Memory registries (`.claude/memory/`)
Five registries persist across sessions. Read all at session start. Five registries persist across sessions. Capitalize during/after work.
Capitalize during/after work. Append-only by default — never rewrite Append-only by default — never rewrite past entries; curation (merge,
past entries; curation (merge, mark superseded, compress) ONLY via mark superseded, compress) ONLY via `/prune-memory`.
`/prune-memory`.
| File | ID format | Purpose | | File | ID format | Purpose |
|------|-----------|---------| |------|-----------|---------|
@@ -164,40 +163,28 @@ All web API endpoints must be versioned from day one: `/api/v1/...`.
## Version control — gitflow (universal) ## Version control — gitflow (universal)
Every git action follows gitflow — inside a skill AND for ad-hoc commits made Every git action follows gitflow — in a skill, or an ad-hoc commit made outside
outside one on direct request. The model is universal across all projects. 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 Never commit code directly on `main` or `develop`: branch first from the
`main` (prod) · `develop` (integration, off main) · `feature/*` + `bugfix/*` + correct base as `<type>/<name>` (`.claude/**` memory/config commits are
`chore/*` (off develop → develop; `chore/*` = memory/doc maintenance, e.g. hook-exempt, following the work). Branch/merge only via the lib, never by hand:
standalone `/capitalize` `/prune-memory` `/reconcile`) · `release/*` (off develop → `bash ~/.claude/lib/gitflow.sh start <type> <name>` · `… finish`. Run `finish`
main + back-merge develop) · `hotfix/*` (off main → main + develop [+ any open (merge) only on an explicit human signal ("merge it", "feature OK"), never
release/*]). `master`→`main` everywhere. because tests pass, a plan step says "merge", or "ship" implied it. Assistance
flows (`/feat` `/bugfix` `/hotfix`) and the standalone memory/doc `chore`
### Rules for every git action skills auto-branch on a protected base but commit in place on a working branch,
- **Never commit code directly on `main` or `develop`.** Branch first from the never finishing — so those skills branch to `chore/*` via the aiguillage, not
correct base, named `<type>/<name>`. (`.claude/**` memory/config commits are the `.claude/**` exemption. New/onboarded projects get the model + the
hook-exempt — they follow the work; but *standalone* memory/doc skills branch to versioned pre-commit hook via `gitflow init`. Advisory, so two deterministic
`chore/*` via the aiguillage rather than lean on that exemption.) backstops apply: the per-repo pre-commit hook (blocks code commits on
- **Branch + merge via the lib, never by hand** — the directed-merge + hotfix main/develop, exempts `.claude/**` + merges + the root commit) and Gitea branch
fan-out logic lives there once: protection on `main`/`develop`. Don't lean on `--no-verify` to bypass them.
`bash ~/.claude/lib/gitflow.sh start <type> <name>` · `… 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.
## Security — non-negotiable defaults ## Security — non-negotiable defaults
@@ -257,10 +244,9 @@ Apply at every dev step: design, scaffolding, implementation, review.
# Tooling & skills # Tooling & skills
## Skill routing ## Skill routing
Request matches a skill → invoke via Skill tool first, before any direct Most skills route by name — match the request to the skill whose
answer or other tool. Most skills route by name — match the request to the description fits (full list is in context). Rules below cover only the
skill whose description fits (full list is in context). Rules below cover non-obvious cases: gstack fallbacks, disambiguation, cryptic names.
only the non-obvious cases: gstack fallbacks, disambiguation, cryptic names.
- Product idea, "worth building?" → office-hours - Product idea, "worth building?" → office-hours
- Bug / error / 500 → investigate (bugfix if gstack off) - Bug / error / 500 → investigate (bugfix if gstack off)
+1 -6
View File
@@ -48,12 +48,7 @@ if printf '%s' "$lc" | grep -Eq "$pattern"; then
"$(printf '%s' "$lc" | grep -oiE "$pattern" | head -1 || true)" \ "$(printf '%s' "$lc" | grep -oiE "$pattern" | head -1 || true)" \
"$(printf '%s' "$prompt" | tr '\n\t' ' ' | cut -c1-100)" >> "$logf" 2>/dev/null || true "$(printf '%s' "$prompt" | tr '\n\t' ' ' | cut -c1-100)" >> "$logf" 2>/dev/null || true
cat <<'EOF' cat <<'EOF'
[design-toolchain] UI/design signal detected. Apply CLAUDE.md "Design work — full toolchain (tiered by scope)": Design work detected → apply CLAUDE.md section "Design work — full toolchain" (already in context). Trivial (≤2 files, cosmetic) → /hotfix.
- 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.
EOF EOF
fi fi
+10
View File
@@ -198,6 +198,16 @@ unset _active_count _inactive_count
printf "│ 🖥️ CLI : %-40s│\n" "$GSD_STATUS" printf "│ 🖥️ CLI : %-40s│\n" "$GSD_STATUS"
[ -n "$TOKEN_WARN" ] && printf "│ 💰 %-44s│\n" "${TOKEN_WARN:0:44}" [ -n "$TOKEN_WARN" ] && printf "│ 💰 %-44s│\n" "${TOKEN_WARN:0:44}"
printf "│ 📦 v%-45s│\n" "$CONFIG_VERSION" 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) # Version check: compare local vs remote (non-blocking)
_remote_ver="" _remote_ver=""
if [ -n "$REPO_DIR" ] && [ -d "$REPO_DIR/.git" ]; then if [ -n "$REPO_DIR" ] && [ -d "$REPO_DIR/.git" ]; then
+4
View File
@@ -1,3 +1,7 @@
---
paths: ["rules/**"]
---
# rules/ # rules/
Modular instruction files loaded by Claude Code alongside `CLAUDE.md`. Modular instruction files loaded by Claude Code alongside `CLAUDE.md`.