Plan Entities

Each entity type has its own status progression, attributes, and conventional sections.

Spec

Specs are source-of-truth design documents. They describe what to build and why.

Statuses: draftreviewacceptedsuperseded | deprecated

AttributeDescription
idRequired. e.g., SPEC-023
statusCurrent status (default: draft)
versionSpec version string, e.g., "2.1"
supersedesID of the spec this replaces
tagsComma-separated labels
{% spec id="SPEC-001" status="draft" tags="auth, security" %}

# Authentication System

Users authenticate via email/password with JWT tokens.

## Requirements

- Email validation on registration
- Password minimum 12 characters
- Token refresh on expiry

{% /spec %}

Specs are freeform — use whatever section headings make sense for the design.

Work

Work items are discrete, implementable tasks. They're the primary unit of progress tracking.

Statuses: draftreadyin-progressreviewdone (also: blocked, pending)

AttributeDescription
idRequired. e.g., WORK-051
statusCurrent status (default: draft)
prioritycritical, high, medium, low (default: medium)
complexitytrivial, simple, moderate, complex, unknown (default: unknown)
assigneePerson or agent working on it
milestoneRelease target name
sourceComma-separated IDs of specs/decisions it implements
tagsComma-separated labels

Conventional sections:

SectionAliasesPurpose
Acceptance CriteriaAC, Criteria, Done WhenCheckable - [ ] items — required for tracking
DependenciesDeps, Blocked By, RequiresEntity references that block this item
ApproachTechnical Notes, Implementation NotesHow to implement
ReferencesRefs, Related, ContextLinks to related entities
Edge CasesExceptions, Corner CasesBoundary conditions
VerificationTest Cases, TestsHow to verify the work
{% work id="WORK-001" status="ready" priority="high" source="SPEC-001" %}

# Implement login flow

Build the login form and connect it to the auth API.

## Acceptance Criteria

- [ ] Login form validates email format
- [ ] Error message shown on invalid credentials
- [ ] Successful login redirects to dashboard
- [ ] JWT token stored in httpOnly cookie

## Dependencies

- WORK-003 — Auth API endpoint must exist

## Approach

Use the existing form component library. JWT handling
via the auth middleware already in place.

{% /work %}

Bug

Bug reports for defects.

Statuses: reportedconfirmedin-progressfixed (also: wontfix, duplicate)

AttributeDescription
idRequired. e.g., BUG-001
statusCurrent status (default: reported)
severitycritical, major, minor, cosmetic (default: major)
assigneePerson fixing it
milestoneFix target
sourceRelated spec/decision IDs
tagsComma-separated labels

Conventional sections:

SectionAliasesPurpose
Steps to ReproduceReproduction, Steps, ReproHow to trigger the bug
ExpectedExpected BehaviourWhat should happen
ActualActual BehaviourWhat actually happens
EnvironmentEnvPlatform/version info
{% bug id="BUG-001" status="confirmed" severity="major" %}

# Login crashes on empty password

## Steps to Reproduce

1. Open login page
2. Enter valid email
3. Leave password empty
4. Click "Sign in"

## Expected

Validation error shown below the password field.

## Actual

Unhandled exception — page crashes with a white screen.

{% /bug %}

Decision

Architecture decision records (ADRs) capture design choices and their rationale.

Statuses: proposedacceptedsuperseded | deprecated

AttributeDescription
idRequired. e.g., ADR-005
statusCurrent status (default: proposed)
dateDate decided (ISO 8601)
supersedesID of the decision this replaces
sourceSpec/entity IDs this decision informs
tagsComma-separated labels

Conventional sections:

SectionAliasesRequired for accepted
ContextBackgroundYes
Options ConsideredOptions, AlternativesNo
DecisionYes
RationaleReasoningNo
ConsequencesImpact, Trade-offsNo
{% decision id="ADR-001" status="accepted" date="2026-03-15" source="SPEC-001" %}

# Use JWT for authentication

## Context

We need stateless authentication for the API. Sessions
require server-side storage which adds operational complexity.

## Options Considered

1. JWT tokens — stateless, widely supported
2. Session cookies — simple but requires session store
3. OAuth2 only — too complex for our initial use case

## Decision

Use JWT with short-lived access tokens (15 min) and
long-lived refresh tokens (7 days) stored in httpOnly cookies.

## Consequences

- No session store needed
- Token revocation requires a deny-list
- Refresh token rotation adds complexity but improves security

{% /decision %}

Milestone

Named release targets that group work items and track progress toward a goal.

Statuses: planningactivecomplete

AttributeDescription
nameRequired. Semver string, e.g., v1.0.0
statusCurrent status (default: planning)
targetTarget date (ISO 8601, aspirational)
{% milestone name="v1.0.0" status="active" target="2026-06-01" %}

# v1.0.0 — Initial Release

- User authentication (login, registration, password reset)
- Core API endpoints
- Admin dashboard
- Documentation site

{% /milestone %}

Assign work items to milestones with the milestone attribute:

npx refrakt plan update WORK-001 --milestone v1.0.0

View milestone progress:

npx refrakt plan status --milestone v1.0.0