{"slug": "define-once-cite-everywhere", "title": "Define once, cite everywhere", "summary": "A developer introduced a tool called Prodshape that lets spec-driven development repositories define business rules once and cite them across multiple specs, preventing drift and ambiguity. The tool uses content digests and a CLI command to flag stale citations, making product knowledge consistent and detectable in CI.", "body_md": "Run this on any repo doing spec-driven development:\n\n```\ngrep -rn -i \"refund\" openspec/specs\n```\n\nMine returned:\n\n```\nbilling/spec.md:4:  Refunds are issued for purchases made in the last 30 days.\ncheckout/spec.md:4: Customers can request a refund within 30 days of delivery.\nsupport/spec.md:4:  If the order is less than a month old, offer a refund.\n```\n\nSame rule, three specs, three wordings — and two meanings. 30 days from **purchase** is not 30 days from **delivery**. Nobody decided that fork. A coding agent paraphrased it into existence, and no human caught it, because nobody reads specs anymore — only agents do. As truth.\n\nWe fixed this in code decades ago: don't repeat yourself. Specs never got the memo.\n\n**The fix: define the rule once, and let every spec cite it** — one line, carrying a content digest:\n\n```\nRefunds follow BR-REFUND-001. {pdac:cite id=\"BR-REFUND-001\" digest=\"sha256:b5c5…\"}\n```\n\nWhen the rule changes through your normal review flow, one command flags every citing spec — file and line, no grep:\n\n``` bash\n$ prodshape citations verify\nstale  BR-REFUND-001  openspec/specs/billing/spec.md:4\nstale  BR-REFUND-001  openspec/specs/checkout/spec.md:4\nstale  BR-REFUND-001  openspec/specs/support/spec.md:4\n```\n\nPut it in CI and stale product knowledge stops being invisible. Specs get shorter, forks become impossible, drift becomes detectable.\n\nFull 30-second demo (real output, `@prodshape/cli@0.12.0`\n\n, no setup): .[https://jgcarmona.com/en/define-once-cite-everywhere/](https://jgcarmona.com/en/define-once-cite-everywhere/).\n\nThe idea behind it: [Product Definition as Code](https://pdac.dev) — one versioned product model that specs and agents cite instead of re-derive, upstream of whatever SDD tool you use.\n\n**Try the grep on your own specs and count your forks.** Found one? Tell me in the comments — I'll help you set this up in 15 minutes.", "url": "https://wpnews.pro/news/define-once-cite-everywhere", "canonical_source": "https://dev.to/juangcarmona/define-once-cite-everywhere-eg2", "published_at": "2026-08-21 08:55:24+00:00", "updated_at": "2026-08-21 09:14:30.464374+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["Prodshape", "Product Definition as Code", "jgcarmona.com", "pdac.dev"], "alternates": {"html": "https://wpnews.pro/news/define-once-cite-everywhere", "markdown": "https://wpnews.pro/news/define-once-cite-everywhere.md", "text": "https://wpnews.pro/news/define-once-cite-everywhere.txt", "jsonld": "https://wpnews.pro/news/define-once-cite-everywhere.jsonld"}}