English | Русский
This step-by-step guide will help you create your first spec atom using the Atomic Spec methodology.
To work with Atomic Spec you only need two tools:
- Text editor — any editor that supports Markdown (VS Code, Sublime Text, vim, etc.)
- Git — for versioning atoms and moving through the pipeline
No special frameworks, generators, or CLI utilities are required. The methodology operates at the level of files and conventions.
Create a root directory for specifications in your project:
mkdir -p specs/
Recommended structure:
specs/
domain-a/
SPEC-001.md
SPEC-002.md
domain-b/
SPEC-010.md
Each domain gets its own subdirectory. The directory name corresponds to the Bounded Context of your domain.
Copy the atom template file into the appropriate directory:
cp templates/atom-template.md specs/domain-a/SPEC-001.md
Or create the file manually with the following structure:
---
id: SPEC-001
type: feature
title: ""
parent: null
children: []
supersedes: null
see-also: []
emits: []
consumes: []
actors: []
tags: []
open-questions: []
status: draft
implementation: none
verification: none
owners:
analyst: ""
developer: ""
tester: ""
created: YYYY-MM-DD
updated: YYYY-MM-DD
---
## Intent
## Domain Rules
## Acceptance Criteria
## Decision Matrix (DMT)
## Constraints
## Open Questions
## Decision LogThe Analyst role is first in the pipeline. You fill in the following sections:
Fill in the metadata in the YAML block:
id— unique identifier (e.g.,SPEC-001)type— atom type (feature,rule,constraint,event,model)title— short name in business-friendly languageactors— who participates in the scenario (e.g.,[Buyer, System])emits/consumes— events that this atom produces or consumesstatus: draft— initial status
Describe the essence of the atom in 1-3 sentences. No technical details. Business meaning only.
## Intent
The buyer can cancel an order within 30 minutes of placing it,
provided the order has not yet been handed off to delivery. Upon
cancellation, funds are returned to the original payment method.List the domain rules. Each rule has a unique ID and a description of the violation consequence.
## Domain Rules
- **DR-001**: Cancellation is only possible in status `placed` or `confirmed`.
Violation: the system rejects the request with error `ORDER_NOT_CANCELLABLE`.
- **DR-002**: The cancellation window is 30 minutes from the `order.placed` event.
Violation: the system rejects the request with error `CANCELLATION_WINDOW_EXPIRED`.Write at least one Gherkin scenario. Scenarios must be technology-neutral.
## Acceptance Criteria
**AC-001**: Successful order cancellation
Given an order in status "placed" created 10 minutes ago
When the Buyer requests order cancellation
Then the order transitions to status "cancelled"
And funds are returned to the original payment method
**AC-002**: Cancellation after window expiration
Given an order in status "placed" created 40 minutes ago
When the Buyer requests order cancellation
Then the system rejects the request with error "CANCELLATION_WINDOW_EXPIRED"Specify non-functional requirements: performance, security, idempotency, etc.
Record open questions. Blocking questions must be closed before passing the gate.
Gate A is the checkpoint between the Analyst and the Developer. Make sure that:
- Intent is filled in (1-3 sentences, no technical details)
- There is at least one domain rule with an ID and a violation consequence
- At least one Gherkin scenario is written
- Actors are specified in the frontmatter and in the AC
- Events (emits/consumes) are filled in
- Intent and Domain Rules contain no technical decisions
- All blocking Open Questions are closed
- The change type is specified
- For every happy-path there is at least one negative AC
Create a PR with the branch spec/SPEC-001 and go through review.
After passing Gate A, the Developer:
- Fills in the Tech Spec, Platform API, and Implementation Notes sections
- Writes the implementation code
- Passes Gate B
After passing Gate B, the Tester:
- Fills in the Test Plan and Platform Tests sections
- Builds the Coverage Matrix (AC -> Test Case -> DR)
- Verifies that all AC and DR are covered by tests
- Passes Gate C
After passing Gate C the atom is considered complete: status: active, implementation: done, verification: passed.