Skip to content

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.

Need to record a final decision? → adr
Need to propose a change for review? → rfc
Need to enforce a team standard? → rule
Need step-by-step instructions? → guide
Need a contract for a boundary or feature? → spec
Need reference/lookup material? → doc
Need to define product requirements? → prd
Need to capture an early idea? → idea
Need to investigate before deciding? → rnd
Need to plan implementation tasks? → plan
Need market analysis (TAM, competitors)? → mrd
Need business justification (ROI, budget)? → brd
Need user personas and journeys? → urd
Need ISO business requirements? → brs
Need ISO stakeholder requirements? → strs
Need ISO system requirements? → syrs
Need ISO software requirements? → srs
Need to document a repeatable workflow? → task-type
Need to record a coding pattern change? → cpat

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.

The starting point for most teams. Three types that cover the full lifecycle from idea to implementation.

Product requirements with goals, scope, and acceptance criteria.

File extension.prd.md
When to useProduct requirements with goals and acceptance criteria are defined
Required sectionsVision, Problem Statement, Goals & Success Metrics, Requirements

A product or technical concept that needs capturing before it’s fully formed.

File extension.idea.md
When to useA concept needs capturing for future evaluation
Required sectionsIdea, Value, Possible Implementation, Risks & Constraints

A bounded investigation that answers an open question before a decision is made or work begins. Every rnd ends with a Recommendationproceed, refine, defer, or stop — plus the single next action that follows from it.

File extension.rnd.md
When to useA bounded investigation is needed to answer a question before deciding or building
Required sectionsResearch 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 investigating
  • accepted — recommendation adopted, proceed or refine
  • rejected — 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.

An actionable plan with phased tasks and acceptance criteria.

File extension.plan.md
When to useAn implementation plan with tasks is formed
Required sectionsGoal, Tasks (phased), Acceptance Criteria, Dependencies

Captures where requirements come from — market, business, and users. Documents flow naturally: MRD (market landscape) -> BRD (business justification) -> URD (user needs).

Market analysis covering TAM/SAM/SOM, competitive landscape, market needs, and timing.

File extension.mrd.md
When to useMarket analysis is needed before proposing a solution
Required sectionsMarket Overview, TAM/SAM/SOM, Competitive Landscape, Market Needs, Timing

Business justification with objectives, ROI, stakeholders, budget, and constraints.

File extension.brd.md
When to useBusiness justification and organizational impact need documenting
Required sectionsObjectives, ROI, Stakeholders, Budget, Constraints

User needs captured through personas, journeys, usability requirements, and acceptance criteria.

File extension.urd.md
When to useUser needs, personas, and journeys need capturing during discovery
Required sectionsPersonas, User Journeys, Usability Requirements, Acceptance Criteria

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 referenceISO/IEC/IEEE 29148:2018 §9.3
When to useBusiness requirements need formalizing into ISO-structured specification
Required sectionsMission, 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 referenceISO/IEC/IEEE 29148:2018 §9.4
When to useStakeholder requirements need structuring per class with ConOps
Required sectionsStakeholder 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 referenceISO/IEC/IEEE 29148:2018 §9.5
When to useThe whole system boundary, interfaces, and verification need specifying
Required sectionsSystem 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 referenceISO/IEC/IEEE 29148:2018 §9.6
When to useDetailed software requirements need per-function/per-endpoint specification
Required sectionsFunctional Requirements, Interface Requirements, Verification Matrix
TrackDocumentsBest For
Product (simple)prdIndividual features, small teams, rapid prototyping, internal tools
Sources (discovery)mrd -> brd -> urdProduct teams doing discovery, stakeholder alignment, business analysis
ISO (decomposition)brs -> strs -> syrs -> srsRegulated 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 the implements relation

Decisions, standards, and reference material.

Records a decision that has been made.

File extension.adr.md
When to useA technical decision is made or finalized
Required sectionsContext, Decision, Alternatives Considered, Consequences
---
title: Use PostgreSQL as Primary Database
status: accepted
---
## Context
We need a relational database with strong ACID guarantees...
## Decision
Use 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 changes

Proposes a significant change for team review.

File extension.rfc.md
When to useA significant change is being proposed
Required sectionsSummary, Motivation, Detailed Design, Drawbacks, Alternatives

Imperative statements that the team must follow.

File extension.rule.md
When to useA team standard or required behavior is established
Required sectionsRule statements, Rationale, Examples (Good/Bad), Enforcement
---
title: API Error Response Format
status: accepted
---
## Rule
1. ALL API errors MUST return a JSON body with `code`, `message`, and `request_id`
2. Error codes MUST use UPPER_SNAKE_CASE
3. HTTP status codes MUST match the error semantics (404 for not found, etc.)
4. Stack traces MUST NOT be included in production responses
## Rationale
Consistent error format enables clients to handle errors programmatically...
## Examples
### Good
...
### Bad
...

How-to instructions for completing a specific task.

File extension.guide.md
When to useStep-by-step instructions need to be documented
Required sectionsPrerequisites, Steps (numbered), Verification, Common Issues

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 useA normative contract with behavior, constraints, and conformance criteria is being formalized
Required sectionsPurpose & Scope, Surface, Normative Behavior, Constraints & Invariants, Failure Behavior, Conformance
---
title: Webhook Delivery Contract
status: accepted
---
## Purpose & Scope
This specification is normative for webhook delivery — how the system pushes
event payloads to subscriber endpoints.
Depended on by: subscriber integrations and the delivery worker.
Out of scope: the webhook management API (registration, listing, deletion).
## Surface
What 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 Behavior
1. 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 Behavior
1. 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.
## Conformance
An implementation conforms when it satisfies all MUST requirements, all
invariants, and all failure rules above.

Non-behavioral reference material — registries, glossaries, lookup tables, component lists.

File extension.doc.md
When to useNon-behavioral reference material like registries, glossaries, or lookup tables needs documenting
Required sectionsOverview, Content sections, Examples

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.

A proven workflow for a recurring implementation task.

File extension.task-type.md
When to useA proven workflow for a recurring task is documented
Required sectionsWhat, When to Use, Steps, Example, Things to Watch Out For

Documents how and why a coding convention or pattern changed.

File extension.cpat.md
When to useA coding pattern or convention has deliberately changed
Required sectionsWhat Changed, Why, Before, After, Scope
---
title: Switch from Callbacks to Async/Await
status: accepted
---
## What Changed
All asynchronous code now uses async/await instead of callbacks.
## Why
Callbacks led to deeply nested code and inconsistent error handling...
## Before
\`\`\`javascript
getUser(id, (err, user) => {
if (err) return handleError(err);
getOrders(user.id, (err, orders) => { ... });
});
\`\`\`
## After
\`\`\`javascript
const user = await getUser(id);
const orders = await getOrders(user.id);
\`\`\`
## Scope
All files in `src/services/` and `src/handlers/`.