{
  "uid": "cogitave.learn.inherit-the-project-baseline.reuse-first-discover-before-you-build",
  "kind": "moduleUnit",
  "href": "/modules/inherit-the-project-baseline/reuse-first-discover-before-you-build/",
  "title": "Reuse first - discover before you build",
  "summary": "",
  "type": null,
  "products": [],
  "roles": [],
  "levels": [],
  "subjects": [],
  "headings": [
    "What a catalog entry is — and is not",
    "The four-step loop"
  ],
  "source": "Inheriting the ruleset is only half of staying on the paved road. The other half\nis a habit: **discover before you build**. Before you write a service, an\nendpoint, a background job, or a UI component, you look for how your org already\ndoes it — and start from that.\n\nA **patterns catalog** is where you look: the machine-queryable index of \"how do I\ndo X the org's way?\", which exists precisely so that an agent or a person\ndiscovers before generating. **Building from scratch is the exception that must be\njustified, not the default.** Cogitave's own\n[patterns catalog](../../../../standards/docs/patterns/README.md) is the worked\nexample here.\n\n## What a catalog entry is — and is not\n\nThe catalog does not invent policy and it does not restate standards. In\nCogitave's catalog, each entry is a thin, honest pointer with the **same five\nsections**:\n\n| Section | What it tells you |\n| --- | --- |\n| **Problem** | when to reach for this pattern |\n| **The Cogitave way** | the one canonical solution, concretely |\n| **Governing standard(s)** | the authority — the rules live *there*, not in the entry |\n| **Reusable artifact** | the template, primitive, or snippet you start from |\n| **Anti-pattern** | what agents most often wrongly generate instead |\n\nThe authority always lives in the standard; the catalog only tells you which door\nto walk through.\n\n## The four-step loop\n\n1. **Query before you generate.** Every pattern is a node reachable over MCP. Ask\n   for the task (\"add an HTTP endpoint\", \"emit a domain event\") before writing any\n   code.\n2. **Read the entry, follow the two links** — its governing standard (the rules you\n   must obey) and its reusable artifact (the code you start from).\n3. **Start from the artifact, not a blank file.** Scaffold from the named template,\n   extend the named primitive, or copy the named snippet. A repo born from a\n   template already inherits the floor, the standards, the lifecycle, and the\n   identity.\n4. **If you must go off-road, own it.** Deviating is allowed, but it is a decision\n   with a cost: you record the rationale (an ADR or a lifecycle *evaluate* note),\n   you own the maintenance, and you still satisfy the Definition of Done.\n\n> [!TIP]\n> The rule of thumb for anything new: **query the catalog, compose from the named\n> artifact, and only author new after a recorded \"no fit\" — then contribute the\n> new pattern back**, so the next project finds it. An industrial-standard\n> solution that stops at the catalog becomes *our* standard.\n\nThis is the concrete enactment of the reuse-first, discover-before-generate rule\nthe always-on standards inherit. Reuse over regeneration is not a preference here;\nit is the inherited default.\n",
  "partOf": "cogitave.learn.inherit-the-project-baseline",
  "durationInMinutes": 6,
  "quiz": null
}