docs(claude-md): compress routing + design + graphify
Universal global config (loaded every session): 317 -> 286 lines (-31). - Routing: drop name-obvious lines (covered by skill descriptions), keep non-obvious only (gstack fallbacks, cryptic names, disambiguation) + dense catch-all. Restore plan-eng-review + validate (misleading names), add feat/hotfix/bugfix file-count pointer. - Design: compress + make the FILE signal explicit (UI-file edits trigger the toolchain, not just the prompt keyword). - graphify: densify conditional rules. No path-scope / no externalization: user-level path-scoped rules do not load (issue #21858, 2.1.190) -> compression is the only safe lever. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W9sqAwZxBMZSynZoVrEJhd
This commit is contained in:
parent
b03cb0b910
commit
ba743cf356
103
CLAUDE.md
103
CLAUDE.md
@ -229,83 +229,52 @@ Apply at every dev step: design, scaffolding, implementation, review.
|
|||||||
|
|
||||||
## Skill routing
|
## Skill routing
|
||||||
|
|
||||||
Request matches available skill → invoke via Skill tool first — no direct
|
Request matches a skill → invoke via Skill tool first, before any direct
|
||||||
answer, no other tools before. Skill workflows beat ad-hoc answers.
|
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.
|
||||||
|
|
||||||
Key routing rules:
|
- Product idea, "worth building?" → office-hours
|
||||||
- Product ideas, "worth building?", brainstorming → office-hours
|
- Bug / error / 500 → investigate (bugfix if gstack off)
|
||||||
- Bugs, errors, "why broken", 500s → investigate, or bugfix if no gstack
|
- feat / hotfix / bugfix distinguished by file count → see descriptions
|
||||||
- Small feature (1-5 files) → feat
|
- Ship / deploy / PR → ship (ship-feature if gstack off)
|
||||||
- Quick fix (typo, CSS, config, ≤2 files) → hotfix
|
- Docs post-ship → document-release (doc if gstack off); stale-doc audit → doc
|
||||||
- Ship, deploy, push, PR → ship, or ship-feature if no gstack
|
- Audit of changes since last run → audit-delta
|
||||||
- QA, test site, find bugs → qa
|
- Design / UI (build, system, audit, polish) → see "Design work" below
|
||||||
- Code review, check diff → review
|
|
||||||
- Docs update post-ship → document-release, or doc if no gstack
|
|
||||||
- Stale docs audit, doc sync → doc
|
|
||||||
- Recurring audit of changes since last run → audit-delta
|
|
||||||
- Weekly retro → retro
|
|
||||||
- Design / UI — build, design system, brand, visual audit, polish → see
|
|
||||||
"## Design work — full toolchain" (single source, below)
|
|
||||||
- Architecture review → plan-eng-review
|
- Architecture review → plan-eng-review
|
||||||
- Save/restore working context → context-save / context-restore
|
- Before /clear or /compact → capitalize; end-of-session ritual → close
|
||||||
- End-of-session ritual (3-question reflection) → close (= capitalize --ritual)
|
- SEO+GEO → seo (GEO only → geo)
|
||||||
- Flush memory before /clear or /compact, reconcile TODO → capitalize
|
|
||||||
- Registries too big/noisy → prune-memory
|
|
||||||
- Skill profiles (design/dev/qa/minimal) → profile
|
|
||||||
- Code quality dashboard → health
|
|
||||||
- Refactor without behavior change → refactor
|
|
||||||
- Dead code, style cleanup → code-clean
|
|
||||||
- SEO/GEO audit → seo (GEO only → geo)
|
|
||||||
- Web hardening (SSL/TLS, HSTS, CSP, redirects, headers) → harden
|
|
||||||
- W3C + WCAG a11y (HTML/CSS validity, axe, pa11y) → validate
|
- W3C + WCAG a11y (HTML/CSS validity, axe, pa11y) → validate
|
||||||
- Deep analysis before modification → analyze
|
- Security audit (secrets, CVE, OWASP) → cso
|
||||||
- Smart commit grouping → commit-change
|
- New project → init-project; onboard existing repo → onboard
|
||||||
- Security audit (secrets, deps CVE, OWASP) → cso
|
|
||||||
- New project from scratch → init-project
|
|
||||||
- Onboard existing repo (config + archetype + audits + backlog) → onboard
|
|
||||||
|
|
||||||
gstack OFF → gstack skills (investigate, ship, qa, review, health, retro,
|
gstack OFF → its skills (investigate, ship, qa, review, health, retro,
|
||||||
office-hours, context-save…) unavailable: use the non-gstack fallback
|
office-hours, context-save…) are gone: use the fallback above, else say so.
|
||||||
where listed, else say so instead of improvising.
|
|
||||||
|
|
||||||
## Design work — full toolchain (tiered by scope)
|
## Design work — full toolchain (tiered by scope)
|
||||||
|
|
||||||
Single source for all design/UI routing. Task touches design/UI →
|
Trigger = UI work: editing a component/style file (.tsx/.vue/.svelte/.css…)
|
||||||
mobilize tools by scope. Reinforced by design-toolchain-reminder hook
|
OR a design/UI request — not the keyword "design" alone in a prompt. Single
|
||||||
(injects on UI signals).
|
source for design routing; the design-toolchain hook reinforces it.
|
||||||
- Trivial (≤2 files, single cosmetic value) → /hotfix, no toolchain.
|
- Trivial (≤2 files, one cosmetic value) → /hotfix, no toolchain.
|
||||||
- Build UI (new component, page, screen, redesign) → ui-ux-pro-max
|
- Build UI (component, page, redesign) → ui-ux-pro-max + frontend-design
|
||||||
(plan/build) + frontend-design (anti AI-slop) + Magic MCP `/ui`
|
(anti-slop) + Magic MCP /ui + emil-design-eng (polish) +
|
||||||
(21st.dev scaffold) + emil-design-eng (polish pass)
|
design-motion-principles (if motion) + design-html (if static).
|
||||||
+ design-motion-principles (when motion) + design-html (static HTML).
|
- Design system / brand → design-consultation first, then the build tools.
|
||||||
- Design system / brand → design-consultation first (aesthetic, type,
|
- Review / audit → design-review + emil-design-eng + design-motion-principles.
|
||||||
color, spacing, motion), THEN build tools above.
|
Scope doubt → don't silently skip: ask, or default to Build tier.
|
||||||
- Review / audit → design-review (visual QA + fix) + emil-design-eng lens
|
Gate: lightweight skills run `~/.claude/lib/design-gate.md`; orchestrators via
|
||||||
+ design-motion-principles (audit mode).
|
plugin-check. Magic MCP costs API calls — generation, not micro-tweaks.
|
||||||
Scope doubt (trivial tweak vs real UI change?) → do not silently skip
|
|
||||||
toolchain: ask user, or default to Build tier.
|
|
||||||
Design gate (automatic): on UI/style signals, lightweight skills (feat,
|
|
||||||
hotfix, bugfix) run the gate spec `~/.claude/lib/design-gate.md` — it checks
|
|
||||||
the design toolchain's real state and, if incomplete, points at `/profile design`.
|
|
||||||
Orchestrators (ship-feature, init-project) handle via STEP 0 plugin-check.
|
|
||||||
Magic MCP (@21st-dev/magic) costs API calls — component generation only,
|
|
||||||
not micro-tweaks.
|
|
||||||
|
|
||||||
## graphify
|
## graphify
|
||||||
|
|
||||||
Knowledge-graph navigation via graphify CLI. ALL rules conditional:
|
ALL rules apply only if `graphify-out/graph.json` exists — else read files
|
||||||
`graphify-out/graph.json` exists in the project — else skip graphify
|
directly.
|
||||||
entirely, read files directly.
|
- Codebase-wide question → `graphify query`; relationships → `path A B`;
|
||||||
|
concept → `explain`. Scoped subgraph beats raw grep.
|
||||||
- Codebase-wide question → `graphify query "<question>"` first.
|
- Known file / small task → read directly, no graphify.
|
||||||
Relationships → `graphify path "<A>" "<B>"`. Focused concept →
|
- `wiki/index.md` → broad-nav entry; `GRAPH_REPORT.md` → whole-architecture.
|
||||||
`graphify explain "<concept>"`. Scoped subgraph beats raw grep.
|
- After editing code → `graphify update .` (AST-only, free).
|
||||||
- Known file/symbol lookup, small task (hotfix, typo, single file) →
|
|
||||||
read directly, no graphify.
|
|
||||||
- `graphify-out/wiki/index.md` exists → broad-navigation entrypoint.
|
|
||||||
`GRAPH_REPORT.md` only for whole-architecture review or when
|
|
||||||
query/path/explain insufficient.
|
|
||||||
- After modifying code → `graphify update .` (AST-only, no API cost).
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user