Prisma Schema - version 0.1
1. Core principle (important)
Seed structure, not content.
- Titles (Yes)
- Codes (Yes)
- Hints (Yes)
- Placeholder text (No)
- Sample requirements (No)
2. Model the ISO structure as “templates”, not data
Key idea
Treat ISO/IEC/IEEE 29148 as a Section Template, not a Workspace artifact.
This gives you:
- Reusability
- Upgradability
- Multiple standards later
3. Minimal “Standard Template” concept (v0.1-friendly)
You don’t need a new Prisma model yet. Use JSON-based templates in code for now.
Example: /standards/iso-29148.json
{
"standard": "ISO/IEC/IEEE 29148:2018",
"sections": [
{ "code": "1", "title": "Introduction" },
{ "code": "1.1", "title": "Purpose" },
{ "code": "1.2", "title": "Scope" },
{ "code": "1.3", "title": "Definitions, Acronyms, and Abbreviations" },
{ "code": "2", "title": "Overall Description" },
{ "code": "2.1", "title": "Product Perspective" },
{ "code": "2.2", "title": "Product Functions" },
{ "code": "2.3", "title": "User Classes and Characteristics" },
{ "code": "3", "title": "Specific Requirements" },
{ "code": "3.1", "title": "Functional Requirements" },
{ "code": "3.2", "title": "Non-Functional Requirements" }
]
}Simple. Clear. Auditable.
4. Seeding strategy (step-by-step)
Workspace creation hook
When a workspace is created:
createWorkspace()
→ load standard template
→ create sections
→ mark them as system-seededAdd one tiny flag:
model Section {
...
isSeeded Boolean @default(false)
}This enables future features:
- reset
- restore
- compare against standard
Preserve ordering deterministically
Do not infer order from codes at runtime.
When seeding:
sections.forEach((s, index) => {
order: index + 1
})Why?
- Codes can change
- Order must be stable
- Sorting logic stays trivial
5. Gentle guidance, not enforcement
Add section-level hints, not content.
Example UI microcopy:
This section typically describes the purpose of the system and intended audience.
Store this as optional metadata in your JSON template, not DB.
6. Allow safe customization
Crucial for trust.
Users must be able to:
- rename sections
- delete sections
- reorder sections
- add new ones
But:
- never auto-reinsert deleted ISO sections
- never nag “non-compliant”
ISO is guidance, not law.
7. Clever UX tricks that teach juniors (quietly)
7.1 Visual badges
Small tag next to seeded sections:
[ISO]No tooltip spam. Just subtle.
7.2 “Missing recommended sections” (read-only insight)
Later (v0.2+):
- Compare workspace sections vs template
- Show info panel:
“2 recommended sections are missing”
No blocking. No red warnings.
8. Why this beats hard-coding
| Approach | Problem |
|---|---|
| Hard-coded sections | Impossible to evolve |
| Stored in DB as gospel | Hard to compare |
| Template-based seeding | Flexible, explainable |
This strategy:
- feels professional
- avoids overengineering
- keeps ISO “out of the way”
- is easy for juniors to reason about
9. Future-proofing (without implementing now)
Later you can:
- Add other standards (IEEE 830, custom org templates)
- Version templates
- Diff workspace vs standard
- Export “ISO-aligned” PDFs
All without breaking v0.1 data.
10. One golden rule (print this for your team)
The standard helps you think. It doesn’t think for you.
Your seeding strategy should reflect that.