Skip to content

Document Types

Archcore has 10 document types organized into 3 layers. Each type has a template with required sections that the CLI generates automatically.

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

Descriptive reference material — tables, registries, explanations.

File extension.doc.md
When to useReference information, registries, or lookup tables need documenting
Required sectionsOverview, Content sections, Examples

Where the product and project are heading.

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

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

Patterns learned from doing the work.

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/`.

QuestionUse
We made a technical decisionadr
We’re proposing a change for reviewrfc
We need to establish a standardrule
We need how-to instructionsguide
We need reference/lookup infodoc
We’re defining product requirementsprd
We have a concept to captureidea
We need to plan implementation tasksplan
We have a repeatable workflowtask-type
A coding convention changedcpat