Skip to content

feat(planning): add the bundled design-principles reference #8332

Description

@kyle-sexton

Parent

Refs #8326 · Source: PLAN Phase 2, topic malleable-design-defaults

Depends on

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-design for 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:skill only; 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, and grep -c "; recheck when" is ≥ 11.
  • After the commit, bash scripts/check-affected.sh exits 0 with no SKIP line.
  • 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).

Metadata

Metadata

Assignees

Labels

agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.

Fields

No fields configured for Feature.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions