- next 16.3.8 -> 16.4.3 (GHSA-2464-fhr4-w9xw, GHSA-673q-mjm6-r5xr) - every workspace dependency to latest; majors: express 5, @simplewebauthn 14, imapflow 2 (status() may return false), nodemailer 10, libsodium-wrappers 0.8, commander 15, vite 8, @vitejs/plugin-react 6, typescript 7 (base tsconfig lists types: ["node"]), @logicsrc/validators 0.6, openmcp 0.4, hqtui 0.11, stack 0.5, x402-gateway 0.13 - bun 1.4.4 (image + packageManager) - bun audit: 3 critical / 34 high -> 0 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| src | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
@logicsrc/openprd
Reference implementation of OpenPRD, a lightweight open standard for product requirements documents authored by humans or AI agents.
A repo keeps a numbered, committed collection under prd/ — one Markdown file
per product decision, with YAML front-matter, a fixed set of body sections, and
an enforced lifecycle. Where a change-oriented format models a change as a
multi-file bundle, OpenPRD models a product decision as one numbered file you
can read a year later to recover the why.
A PRD is just a file. Nothing here is required for a document to conform; this package exists to check and generate them.
Install
npm install @logicsrc/openprd
Or use it through the LogicSRC CLI, which wraps this package as logicsrc prd.
Usage
import { parsePrd, validatePrdDocument, loadPrdCollection, SECTIONS } from "@logicsrc/openprd";
const doc = parsePrd(source, "0001-expand-the-service.md");
const findings = validatePrdDocument(doc, { strict: true });
// Collection-level rules: contiguous numbering, unique ids, resolvable
// supersession links, a fresh index.
const collection = loadPrdCollection("prd");
The ten sections (OpenPRD 0.3)
Problem, Goals, Non-Goals, Users, Requirements, UX Notes,
Tech Stack, Monetization, Success Metrics, Risks & Open Questions — in
that order, all required. A section may be a single line such as _None._, but
it may not be missing. That is what keeps every PRD skimmable and diffable.
Versioning
A document is validated against the section list its own openprd: key fixes,
not against the newest version:
| Version | Sections |
|---|---|
0.2 |
eight |
0.3 |
ten — adds Tech Stack and Monetization after UX Notes |
So a 0.2 document keeps conforming. sectionsForVersion(version) exposes the
rule directly.
Conformance
A document conforms when it lives at prd/<id>-<slug>.md with a four-digit id,
its front-matter validates against openprd-prd.schema.json, id equals the
filename's numeric prefix, and every body section for its declared version is
present in order.
Everything else the validator reports is lint — an empty section, a requirement
missing its priority tag, numbering that skips, a stale index, a one-sided
supersession link. Findings carry stable codes (OP-C-SECTION-ORDER,
OP-L-REQ-DUPLICATE, …), the file, the line, and a remediation hint. strict
promotes lint to errors.
Links
MIT © Profullstack, Inc.