Repository navigation
feat(planning): add the bundled design-principles reference #8332
Description
Parent
Refs #8326 · Source: PLAN Phase 2, topic malleable-design-defaults
Depends on
- feat(review): add /review:quality-gate code-design mode with bundled criteria and cascade severity #8329
- feat(implementation): dispatch phase Review: tags to /review:quality-gate at phase boundaries #8331
Outcome
The planning plugin ships a bundled design-principles reference. Each principle gets one directive line in this form: - **<Name>**: <directive>. Source: <primary>. As of <date>; recheck when <trigger>. The file opens with a scope line: the principles apply to code, Markdown, skills and agent instructions, and consumer standards win, emitting the override line. It covers SRP, OCP, LSP, ISP, DIP, composition over inheritance, reuse/DRY of knowledge, coupling and cohesion, information hiding, deep modules and change amplification, and YAGNI's cheap-now test, with a Markdown example where one fits. It also carries:
- The reuse line. Search for and reuse existing code first. Whether to generalize now or wait is asked per task, from intent, existing structure and upstream context. With known repetition, generalize up front and isolate what varies; otherwise apply the Rule of Three and Metz's wrong-abstraction caution.
- A pointer to
/review:quality-gate code-designfor review-time criteria. - For Markdown and skill authoring, pointers to existing rules (
.claude/rules/skill-bodies-state-current-rules.md,/docs-hygiene:extract-ssot). No new rule.
Key interfaces
From the plan's ## Design:
planning
reference/design-principles.md(new) | principle directives, scope line, consumer-wins line, reuse line | proactive
Overrides bundled default <principle> per <standards file>
Dependency direction: planning cites review and implementation by
/plugin:skillonly; review never cites planning files.
Conventions followed: the planning plugin's variation-points reference (intent vocabulary, contain-by-default); .claude/rules/skill-bodies-state-current-rules.md.
Done when
- Primaries fetched for the GoF composition wording, Constantine's coupling/cohesion origin and the Rule of Three (
/discovery:research). Where a primary cannot be fetched, the line cites the best secondary, is labeled secondary, and uses the recheck trigger "the cited secondary moves or changes, or a recheck reaches the primary". -
grep -c "melodic-software/standards"on the reference returns 0, and it cites no other organization's convention files. -
grep -cE "^- \*\*(SRP|OCP|LSP|ISP|DIP)\*\*"returns 5, andgrep -c "; recheck when"is ≥ 11. - After the commit,
bash scripts/check-affected.shexits 0 with noSKIPline. - A changelog fragment for the planning plugin.
Out of scope
- Connascence, the Law of Demeter, Beck's simple design.
- A new "SRP for skills" rule.
- Eval cases (the readers' items cover this reference).
Activity
kyle-sexton commentedon Oct 19, 2026