Concepts
The Eight Prime Directives
Article IX of the Atomic Spec constitution — the eight non-negotiable rules that turn AI agents from drift-prone collaborators into a governed assembly line.
The following directives are NON-NEGOTIABLE and enforce the “Atomic Traceability” model:
Directive 1: Directory Supremacy
Every feature MUST have:
- An
index.mdentry point (the feature dashboard) - A
traceability.mdmatrix (requirement-to-task mapping)
Violation: Any feature lacking these files is considered incomplete and CANNOT proceed to implementation.
Directive 2: Atomic Injunction
The /atomicspec.tasks command is FORBIDDEN from creating a single tasks.md file.
It MUST create:
specs/[###-feature-name]/
├── index.md # Feature dashboard
├── traceability.md # Requirement-to-task matrix
└── tasks/ # Atomic task directory
├── T-001-[name].md
├── T-002-[name].md
└── ...
Each atomic task file MUST contain:
- ID: Unique task identifier
- Requirement Mapping: Link to FR-XXX from spec.md
- Technical Implementation Detail: Specific code actions
- Verification Command: The exact test/command to verify completion
Directive 3: Context Pinning
During the implementation phase (/atomicspec.implement):
- You are FORBIDDEN from reading the full
plan.md - You may ONLY read:
index.md(for navigation and context)- The specific
T-XXX-[name].mdfile assigned to the current task loop traceability.md(to update status after completion)
Rationale: This prevents context pollution and ensures focused, verifiable execution.
Directive 4: Gate Compliance
You MUST strictly follow the “Gate Criteria” defined in .specify/knowledge/stations/ before transitioning between phases:
| Transition | Required Gates |
|---|---|
| Spec → Plan | Stations 03, 04, 05 gates must pass |
| Plan → Tasks | Stations 06, 07, 08, 12, 13 gates must pass |
| Tasks → Implement | All atomic tasks must have verification commands |
Violation: Proceeding without passing gates is a Constitution violation.
Directive 5: Knowledge Routing (The Map)
If you encounter a technical decision or edge case not covered by the current Task/Plan:
- You MUST read
.specify/knowledge/stations/00-station-map.mdfirst. - Locate the correct Station ID for your problem.
- Read ONLY that specific Station file.
- Apply the rules found there.
Rationale: Do not guess. Do not read random files. Go to the authoritative source.
Directive 6: Human-In-The-Loop Checkpoints
During /atomicspec.plan, the AI MUST pause for user approval at critical decision points:
Phase 0.5 Checkpoint (Tech Stack Review):
After Phase 0 (Research) completes and before Phase 1 (Design) begins:
-
Present all resolved technical decisions in a table format:
- Decisions explicitly from spec (marked “Spec”)
- Decisions assumed by AI (marked “Assumed”)
-
Highlight assumptions that were NOT explicit in the spec but were inferred from:
- Knowledge Station defaults
- Best practices research
- Domain patterns
-
PAUSE and wait for user response:
"proceed"→ Continue to Phase 1 with current decisions"revise: [specifics]"→ Update decisions and re-present checkpoint- Questions → Answer and re-present checkpoint
-
Record approval in plan.md with timestamp
Rationale: Tech stack decisions are expensive to change post-implementation. Explicit user approval prevents rework and ensures alignment.
Violation: Proceeding to Phase 1 without user confirmation is a Constitution violation.
Skip conditions (checkpoint may be abbreviated):
- All Technical Context fields were explicit in spec (no assumptions)
- User passes
--no-reviewflag (expert mode, assumes full responsibility)
Directive 7: Project Defaults Registry (Consistency Enforcement)
The Project Defaults Registry at specs/_defaults/registry.yaml is the single source of truth for project-wide technical decisions.
Scope of “registry-eligible decisions” (v0.2 clarification):
Registry-eligible decisions include not only the fields explicitly enumerated in registry.yaml, but any structural choice that pervades the codebase:
- Containerization (Docker / Compose / Kubernetes / none)
- Deployment target (containerized / serverless / VPS / PaaS / static)
- Monorepo vs. polyrepo layout
- File-structure pattern (feature-folder / layer-folder / domain-driven)
- Framework choice in any layer (backend, frontend, ORM, queue, cache, search, etc.)
- Cross-cutting infrastructure (payment provider, email provider, scheduling, file storage)
- Domain primitives (money representation, identifier exposure, time representation)
- Authentication / authorization model (session / JWT / OAuth2 / RBAC / ABAC / etc.)
- Logging and observability stack (structured logs, metrics, traces, error tracking)
- CI/CD platform and deployment workflow
- Package manager and runtime version pins
- Testing framework (unit / integration / E2E)
Definition of “commit”: writing config or code that encodes the choice (e.g., creating docker-compose.yml, adding a dependency to package.json, importing a framework module), OR recording the choice in plan.md or a task file as a fixed value. Drafting a comment that discusses options is not committing.
When the AI is about to commit to a structural decision absent from the registry, it MUST raise an AskUserQuestion before applying the decision, then offer to register the answer with provenance human or accepted_recommendation. This obligation is independent of the on-entry read step in the Protocol below — it fires whenever a qualifying decision arises, in any phase (/atomicspec.plan, /atomicspec.tasks, /atomicspec.implement). The “Docker-without-asking” failure mode (silently choosing a structural default) is a Directive 7 violation, not an unspecified blind spot.
ALL commands, agents, and phases MUST obey this protocol.
Registry Location:
specs/_defaults/
├── registry.yaml # Source of truth (structured defaults)
├── changelog.md # Audit trail (what/when/why/who)
└── README.md # Documentation
Protocol - On Entry (Before Any Work):
- Read
specs/_defaults/registry.yaml - Filter to relevant sections (backend work →
api,backend,database) - Apply registry values as non-negotiable defaults
Protocol - During Work (Decision Detection):
| Situation | Action |
|---|---|
| Decision EXISTS in registry | Use it. No deviation without HITL approval. |
| Decision NOT in registry (null) | Ask via AskUserQuestion: “Add to project defaults?” |
| Need to DEVIATE from registry | Ask via AskUserQuestion: “Approve deviation?” + document |
Protocol - On Exit (After Phase Completes):
- Scan output for new project-wide decisions
- Prompt user for each: “Add as project default?”
- Update registry.yaml AND changelog.md if approved
Exemption — /atomicspec.constitution:
The /atomicspec.constitution command is formally exempt from the on-entry read step of this Directive. Rationale: the constitution authors the governance values that the registry later enforces — reading the registry before authoring them would be circular. Constitution MAY still write to the registry on exit if the user approves seeding default governance values (e.g., governance.quality_gates, governance.personas).
HITL Requirements for Registry Updates:
Every registry change MUST:
- Go through
AskUserQuestion- no silent updates - Provide clear explanation: what’s changing, why, impact
- Allow user to: Accept / Reject / Provide custom value
- Log in
changelog.mdwith full audit trail:- Changed: old → new
- Why: rationale
- Source: which spec/phase
- Approved by: Human (accept/custom/reject)
Deviation Documentation:
If a spec deviates from registry defaults, it MUST include:
DEVIATION from project-registry:
- Key: [key.path]
- Default: [registry_value]
- This spec uses: [different_value]
- Reason: [justification]
- Approved: Human (YYYY-MM-DD)
Violation: Using a value different from registry without explicit DEVIATION block and HITL approval is a Constitution violation.
Rationale: Prevents inconsistency (e.g., some APIs versioned, some not). Ensures all technical decisions are intentional and traceable.
Directive 8: Self-Contained Tasks (Knowledge Wiring)
Task files generated by /atomicspec.tasks MUST be self-contained. During implementation, Context Pinning (Directive 3) prevents reading plan.md, spec.md, stations, and subagents. Therefore, ALL context must be embedded INTO each task file.
Required Embedded Context Section:
Every task file MUST include an “Embedded Context” section containing:
| Element | Source | When Required |
|---|---|---|
| Project Standards | specs/_defaults/registry.yaml | Always (or note “No registry”) |
| Domain Rules | .specify/subagents/[domain].md OR Station files | When task domain matches |
| API Context | FEATURE_DIR/contracts/*.yaml | When task involves API endpoints |
| Feature Summary | plan.md (extracted during task generation) | Always |
| Gate Criteria | Subagent/Station gate checklists | When domain knowledge exists |
| Structural Decision Triggers (v0.2+) | Directive 7 scope list | When the task may commit to containerization, deployment, framework, infrastructure provider, or domain primitive — so the implementer recognizes the AskUserQuestion trigger under Context Pinning |
Graceful Degradation:
Not all knowledge sources may exist. Handle gracefully:
| Missing Source | Action |
|---|---|
| Registry | Embed: “No registry - using plan.md decisions” + extract patterns from plan.md |
| Subagent | Check for full station file, extract key rules |
| Station | Embed: “No domain knowledge available” |
| Contracts | Skip API Context section |
| Everything | Embed plan.md decisions directly, note limited context |
NEVER fail task generation due to missing knowledge. Always produce tasks with whatever context is available.
Violation: Generating task files WITHOUT an Embedded Context section is a Constitution violation. The implementer must have EVERYTHING needed to complete the task without reading forbidden files.
Rationale: Subagents during /atomicspec.implement are “blind” to stations, subagents, plan.md, and spec.md. Embedding context ensures they follow project patterns instead of guessing.