Anchors — Official Documentation
A spec-first framework — the spec comes before the code, and stays the truth after it. Keeps a project coherent over time through anchors that guide the work on the way out and confront it on the way back, and cannot lie about the code.
🌟 What is Anchors?
Section titled “🌟 What is Anchors?”If you are new to Anchors, think of it as the immune system and the compass of your codebase.
When you write software with Artificial Intelligence (ChatGPT, Claude, Copilot, etc.), the AI frequently suffers from structural amnesia: with every new session, it forgets architectural decisions made yesterday, silently breaks business rules, and leaves behind orphaned code that no one knows how to verify.
Anchors solves this through three non-negotiable principles:
- Spec-First: The specification is written before any implementation code, and remains the single source of truth afterwards.
- The Unit: No business rule exists without Spec, Feature, Test, and Code bound together by identity codes.
- Automated Gates: Automated quality portals that hold the safety rope before git commit or during CI, preventing regressions and uncontrolled drift.
🧭 Where to Start?
Section titled “🧭 Where to Start?”1. If you want to UNDERSTAND how it works (Core Concepts)
Section titled “1. If you want to UNDERSTAND how it works (Core Concepts)”Read the conceptual guides written plainly for newcomers:
- What is an Anchor? — The climbing metaphor: how anchors point the route, hold the safety rope, and mark the trail.
- The Unit — Why code without a spec or test is immediate technical debt.
- Project Layers — The blueprint: the difference between Governed Layers (business rules) and Recognized Layers (infrastructure/types).
- Traceability & Identity Codes — How concise identity codes (e.g.
AUTH-B01) connect requirements end-to-end. - Gates & Verdicts — The 4 verdict outcomes (
OK,FAIL,WARN,SKIP) and why every gate starts informative. - Maturity & Project Health — The
anchors doctorinspection and how to turn a fragile repo into a fortress.
2. If you are APPLYING Anchors to your code today (Hands-on Workflow)
Section titled “2. If you are APPLYING Anchors to your code today (Hands-on Workflow)”Follow the practical roadmap:
- The CLI — Installing the binary and running your first checks.
- The Workflow — Day-to-day routine from seeding a spec to safe merging.
- The anchors.yaml — The central configuration file of your project.
- Gates Catalog — Search all 95 automated checkers ready to activate.
3. The Complete 7 Pillars Doctrine
Section titled “3. The Complete 7 Pillars Doctrine”For those seeking deep architectural formulation:
- Project Structure — Blueprint layout and boundary enforcement.
- Planning — Seeding future specs and milestone phases.
- Spec — Executable specification discipline.
- Spec Types — Interface, use case, domain service, and architectural specs.
- Traceability — The continuous wiring between requirements and tests.
- Propagation — The change wave that keeps the system coherent.
- Quality — Measured quality theory, mutation scores, and blocking thresholds.