Document Types
Archcore has 19 document types organized into 3 layers. Each type has a template with required sections that the CLI generates automatically. Install it from the CLI page if you have not yet.
Choosing the Right Type
Section titled “Choosing the Right Type”Need to record a final decision? → adrNeed to propose a change for review? → rfcNeed to enforce a team standard? → ruleNeed step-by-step instructions? → guideNeed a contract for a boundary or feature? → specNeed reference/lookup material? → docNeed to define product requirements? → prdNeed to capture an early idea? → ideaNeed to investigate before deciding? → rndNeed to plan implementation tasks? → planNeed market analysis (TAM, competitors)? → mrdNeed business justification (ROI, budget)? → brdNeed user personas and journeys? → urdNeed ISO business requirements? → brsNeed ISO stakeholder requirements? → strsNeed ISO system requirements? → syrsNeed ISO software requirements? → srsNeed to document a repeatable workflow? → task-typeNeed to record a coding pattern change? → cpatVision
Section titled “Vision”Where the product and project are heading. Vision documents are organized into three requirement tracks — pick the one that matches your team’s complexity and process.
Product Track (Simple)
Section titled “Product Track (Simple)”The starting point for most teams. Three types that cover the full lifecycle from idea to implementation.
PRD — Product Requirements Document
Section titled “PRD — Product Requirements Document”Product requirements with goals, scope, and acceptance criteria.
| File extension | .prd.md |
| When to use | Product requirements with goals and acceptance criteria are defined |
| Required sections | Vision, Problem Statement, Goals & Success Metrics, Requirements |
Idea — Concept to Explore
Section titled “Idea — Concept to Explore”A product or technical concept that needs capturing before it’s fully formed.
| File extension | .idea.md |
| When to use | A concept needs capturing for future evaluation |
| Required sections | Idea, Value, Possible Implementation, Risks & Constraints |
RnD — Research & Investigation
Section titled “RnD — Research & Investigation”A bounded investigation that answers an open question before a decision is made or work begins. Every rnd ends with a Recommendation — proceed, refine, defer, or stop — plus the single next action that follows from it.
| File extension | .rnd.md |
| When to use | A bounded investigation is needed to answer a question before deciding or building |
| Required sections | Research Goal, Questions/Hypotheses, Approach, Findings, Recommendation, Next Action |
An rnd is the Research Gate in front of the committing tracks (rnd -> idea, rnd -> adr -> spec -> plan). Its status maps to the verdict:
draft— still investigatingaccepted— recommendation adopted, proceed or refinerejected— defer or stop
A rejected rnd is a first-class outcome, not a failure. “We investigated and decided not to” stays visible as a record of the dead end — keep it, don’t delete it. By convention, prd/plan/adr depends_on an rnd, and an rfc may extend one; rnd never uses implements.
Plan — Implementation Plan
Section titled “Plan — Implementation Plan”An actionable plan with phased tasks and acceptance criteria.
| File extension | .plan.md |
| When to use | An implementation plan with tasks is formed |
| Required sections | Goal, Tasks (phased), Acceptance Criteria, Dependencies |
Sources Track (Discovery)
Section titled “Sources Track (Discovery)”Captures where requirements come from — market, business, and users. Documents flow naturally: MRD (market landscape) -> BRD (business justification) -> URD (user needs).
MRD — Market Requirements Document
Section titled “MRD — Market Requirements Document”Market analysis covering TAM/SAM/SOM, competitive landscape, market needs, and timing.
| File extension | .mrd.md |
| When to use | Market analysis is needed before proposing a solution |
| Required sections | Market Overview, TAM/SAM/SOM, Competitive Landscape, Market Needs, Timing |
BRD — Business Requirements Document
Section titled “BRD — Business Requirements Document”Business justification with objectives, ROI, stakeholders, budget, and constraints.
| File extension | .brd.md |
| When to use | Business justification and organizational impact need documenting |
| Required sections | Objectives, ROI, Stakeholders, Budget, Constraints |
URD — User Requirements Document
Section titled “URD — User Requirements Document”User needs captured through personas, journeys, usability requirements, and acceptance criteria.
| File extension | .urd.md |
| When to use | User needs, personas, and journeys need capturing during discovery |
| Required sections | Personas, User Journeys, Usability Requirements, Acceptance Criteria |
ISO Track (Decomposition)
Section titled “ISO Track (Decomposition)”Decomposes requirements through progressively detailed levels, following ISO/IEC/IEEE 29148:2018 — Systems and software engineering — Life cycle processes — Requirements engineering. BRS (why the business needs it) -> StRS (what stakeholders need) -> SyRS (how the system behaves) -> SRS (how the software works).
BRS — Business Requirements Specification
Section titled “BRS — Business Requirements Specification”Mission, goals, operational concept, and success criteria.
| File extension | .brs.md |
| ISO reference | ISO/IEC/IEEE 29148:2018 §9.3 |
| When to use | Business requirements need formalizing into ISO-structured specification |
| Required sections | Mission, Business Goals, Operational Concept, Success Criteria |
StRS — Stakeholder Requirements Specification
Section titled “StRS — Stakeholder Requirements Specification”Per-stakeholder-class requirements with concept of operations and compliance.
| File extension | .strs.md |
| ISO reference | ISO/IEC/IEEE 29148:2018 §9.4 |
| When to use | Stakeholder requirements need structuring per class with ConOps |
| Required sections | Stakeholder Classes, Per-Class Requirements, ConOps, Compliance |
SyRS — System Requirements Specification
Section titled “SyRS — System Requirements Specification”System boundary, interfaces, modes, and verification approach.
| File extension | .syrs.md |
| ISO reference | ISO/IEC/IEEE 29148:2018 §9.5 |
| When to use | The whole system boundary, interfaces, and verification need specifying |
| Required sections | System Boundary, Interfaces, Modes of Operation, Verification Approach |
SRS — Software Requirements Specification
Section titled “SRS — Software Requirements Specification”Per-function and per-endpoint specifications with a verification matrix.
| File extension | .srs.md |
| ISO reference | ISO/IEC/IEEE 29148:2018 §9.6 |
| When to use | Detailed software requirements need per-function/per-endpoint specification |
| Required sections | Functional Requirements, Interface Requirements, Verification Matrix |
Choosing the Right Requirements Track
Section titled “Choosing the Right Requirements Track”| Track | Documents | Best For |
|---|---|---|
| Product (simple) | prd | Individual features, small teams, rapid prototyping, internal tools |
| Sources (discovery) | mrd -> brd -> urd | Product teams doing discovery, stakeholder alignment, business analysis |
| ISO (decomposition) | brs -> strs -> syrs -> srs | Regulated systems, multi-team projects, complex distributed systems |
All three tracks can coexist — e.g. prd for a small feature while the full ISO track covers a safety-critical subsystem.
Requirements Layers — Sources vs Specifications
Section titled “Requirements Layers — Sources vs Specifications”Sources and Specifications serve separate purposes:
- Layer A (Sources):
mrd,brd,urd,prd— capture raw requirements from market, business, and user perspectives - Layer B (Specifications):
brs,strs,syrs,srs— formalize what sources capture informally, connected via theimplementsrelation
Knowledge
Section titled “Knowledge”Decisions, standards, and reference material.
ADR — Architecture Decision Record
Section titled “ADR — Architecture Decision Record”Records a decision that has been made.
| File extension | .adr.md |
| When to use | A technical decision is made or finalized |
| Required sections | Context, Decision, Alternatives Considered, Consequences |
---title: Use PostgreSQL as Primary Databasestatus: accepted---
## ContextWe need a relational database with strong ACID guarantees...
## DecisionUse PostgreSQL 16 for all persistent storage...
## Alternatives Considered- MySQL — fewer advanced features- MongoDB — doesn't fit our relational model
## Consequences### Positive- Strong ACID guarantees- Excellent JSON support via JSONB### Negative- Schema migrations required for changesRFC — Request for Comments
Section titled “RFC — Request for Comments”Proposes a significant change for team review.
| File extension | .rfc.md |
| When to use | A significant change is being proposed |
| Required sections | Summary, Motivation, Detailed Design, Drawbacks, Alternatives |
Rule — Standard or Required Behavior
Section titled “Rule — Standard or Required Behavior”Imperative statements that the team must follow.
| File extension | .rule.md |
| When to use | A team standard or required behavior is established |
| Required sections | Rule statements, Rationale, Examples (Good/Bad), Enforcement |
---title: API Error Response Formatstatus: accepted---
## Rule
1. ALL API errors MUST return a JSON body with `code`, `message`, and `request_id`2. Error codes MUST use UPPER_SNAKE_CASE3. HTTP status codes MUST match the error semantics (404 for not found, etc.)4. Stack traces MUST NOT be included in production responses
## RationaleConsistent error format enables clients to handle errors programmatically...
## Examples### Good...### Bad...Guide — Step-by-Step Instructions
Section titled “Guide — Step-by-Step Instructions”How-to instructions for completing a specific task.
| File extension | .guide.md |
| When to use | Step-by-step instructions need to be documented |
| Required sections | Prerequisites, Steps (numbered), Verification, Common Issues |
Spec — Normative Contract
Section titled “Spec — Normative Contract”Normative behavior contract of something others rely on — a boundary (API/interface/schema/protocol) or a feature/subsystem — captured after code or specified ahead of it.
| File extension | .spec.md |
| When to use | A normative contract with behavior, constraints, and conformance criteria is being formalized |
| Required sections | Purpose & Scope, Surface, Normative Behavior, Constraints & Invariants, Failure Behavior, Conformance |
---title: Webhook Delivery Contractstatus: accepted---
## Purpose & ScopeThis specification is normative for webhook delivery — how the system pushesevent payloads to subscriber endpoints.
Depended on by: subscriber integrations and the delivery worker.
Out of scope: the webhook management API (registration, listing, deletion).
## SurfaceWhat dependents see of the subject. Reference source definitions with @-notation —don't copy interface or struct bodies; copies go stale.
- Delivery worker: @internal/webhooks/delivery.go — sends each event to subscribers- Signature header: `X-Signature` carries the payload HMAC- States: queued → delivering → delivered | failed
## Normative Behavior1. The system MUST deliver payloads as JSON with Content-Type `application/json`.2. WHEN a delivery fails, the system MUST retry up to 5 times with exponential backoff.3. The system SHOULD include an HMAC-SHA256 signature in the `X-Signature` header.
## Constraints & Invariants- Constraint: payloads MUST NOT exceed 256 KB — keeps delivery within the request timeout.- Invariant: each event MUST be delivered at least once to every active subscriber.
## Failure Behavior1. IF all retries are exhausted, THEN the system MUST mark the delivery `failed` and stop.2. WHEN a subscriber endpoint times out, the system MUST re-queue the delivery for retry.
## ConformanceAn implementation conforms when it satisfies all MUST requirements, allinvariants, and all failure rules above.Doc — Reference Documentation
Section titled “Doc — Reference Documentation”Non-behavioral reference material — registries, glossaries, lookup tables, component lists.
| File extension | .doc.md |
| When to use | Non-behavioral reference material like registries, glossaries, or lookup tables needs documenting |
| Required sections | Overview, Content sections, Examples |
Experience
Section titled “Experience”Patterns learned from doing the work. You can ignore these types at first — they become useful once your team has enough practice to recognize repeatable patterns.
Task Type — Recurring Task Pattern
Section titled “Task Type — Recurring Task Pattern”A proven workflow for a recurring implementation task.
| File extension | .task-type.md |
| When to use | A proven workflow for a recurring task is documented |
| Required sections | What, When to Use, Steps, Example, Things to Watch Out For |
CPAT — Code Pattern Change
Section titled “CPAT — Code Pattern Change”Documents how and why a coding convention or pattern changed.
| File extension | .cpat.md |
| When to use | A coding pattern or convention has deliberately changed |
| Required sections | What Changed, Why, Before, After, Scope |
---title: Switch from Callbacks to Async/Awaitstatus: accepted---
## What ChangedAll asynchronous code now uses async/await instead of callbacks.
## WhyCallbacks led to deeply nested code and inconsistent error handling...
## Before\`\`\`javascriptgetUser(id, (err, user) => { if (err) return handleError(err); getOrders(user.id, (err, orders) => { ... });});\`\`\`
## After\`\`\`javascriptconst user = await getUser(id);const orders = await getOrders(user.id);\`\`\`
## ScopeAll files in `src/services/` and `src/handlers/`.