block/builderbot/anchors
Claude Code and agent skill by block/builderbot
- community
Checking that the SKILL.md file is still in the repository.
Requirements-driven development framework. Use when setting up product/engineering requirements documents, checking traceability between requirements and code, verifying document consistency, or working on code in a repo that contains ANCHORS.md files (load the skill to understand the requirements context before making changes).
Install
npx vskill@latest install block/builderbot/anchorsSKILL.md
The same SKILL.md was published earlier as block/builderbot/anchors.
anchors
A skill for managing ANCHORS requirements-driven development documents.
ANCHORS keeps product requirements, engineering requirements, testing strategy, dependency constraints, and implementation in a consistent, traceable hierarchy.
The ANCHORS Framework
Documents
A module's ANCHORS document set consists of up to four documents plus a marker file:
| Document | Purpose | Requirement IDs | |
|---|---|---|---|
| ANCHORS.md | Module marker. YAML frontmatter with prefix field. | — | |
| PRODUCT.md | Product requirements — user-facing behavior, workflows, experience. Source of truth. | P-* | |
| ERD.md | Engineering requirements — technical design, interfaces, constraints. Derived from PRODUCT.md. | E-* | |
| TESTING.md | Testing strategy — pyramid, coverage invariants, requirement-to-test-layer mapping. Defines how requirements are verified. | — | |
| DEPENDENCIES.md | External dependencies — what the environment must provide because the system cannot supply it. | D-DEP-* |
All four documents are part of the framework. TESTING.md and DEPENDENCIES.md participate in the truth hierarchy and have defined disagreement rules.
Modes
ANCHORS operates in one of two modes:
- Embedded (default): Docs live alongside the code they describe. Requirement IDs are tagged inline in source code and tests. Check searches the local codebase for traceability. This is the standard mode.
- Detached: Docs live separately from the code they describe. The target codebase is never modified. Traceability uses
→forward references in ERD.md pointing to code locations in the target codebase. Detached mode works whether the docs are in the same repo (in-repo detached) or in a completely separate repo (external detached).
Mode is set explicitly: if ANCHORS.md frontmatter contains mode: detached, the module is detached. Otherwise it's embedded.
ANCHORS.md frontmatter — embedded mode:
ANCHORS.md frontmatter — detached mode (in-repo):
ANCHORS.md frontmatter — detached mode (external repo):
mode—detachedor omitted. Whendetached, the target code is never modified and ERD.md uses→forward references instead of inline code tags.repo— target codebase (GitHub URL or local path). Only used in detached mode when the code is in a different repo. Omit for in-repo detached.ref— branch, tag, or SHA to track (defaults tomain). Only meaningful withrepo.path— subdirectory to scope research and traceability. In-repo detached (norepo): relative to the ANCHORS.md file, like embedded mode. External detached (withrepo): relative to the target repo root. Defaults to.(in-repo) or/(external).
Truth Hierarchy
Disagreement Rules
- Implementation vs tests → implementation is probably wrong
- Tests vs PRD/ERD → tests are wrong (fix the tests, or update the documents first if the requirement changed)
- TESTING.md vs PRD/ERD → TESTING.md is wrong (update the testing strategy to match the requirements)
- ERD vs PRD → ERD is wrong (PRD is authoritative)
- DEPENDENCIES.md vs ERD → check which is correct (ERD may include requirements for the system to manage something that DEPENDENCIES.md lists as external — resolve which is current)
Rules
- PRODUCT.md is authoritative. If there is a conflict between documents, PRODUCT.md wins.
- ERD.md must fully satisfy PRODUCT.md. Every product requirement should have corresponding engineering requirements that cover it.
- All implementation must meet both PRD and ERD requirements. Do not implement against only one document.
- Keep documents consistent. When changing a requirement or adding a new feature, update PRODUCT.md first, then ERD.md to reflect it (and link back), then update TESTING.md's coverage mapping table so every new or changed requirement has a test-layer assignment. Always verify the TESTING.md table reflects the current scope — even when a row already exists for the feature area, it may need updating to cover new requirements.
- Do not add requirements to ERD.md that contradict or extend PRODUCT.md without updating PRODUCT.md first. The PRD drives the ERD, not the other way around.
- Tests are truthier than implementation, but documents are truthier than tests. If the implementation diverges from the tests, the implementation is assumed buggy. If the tests diverge from the PRD or ERD, the tests are wrong. Fix the code to match the tests; fix the tests to match the documents; update the documents first if the requirement has genuinely changed.
- Every P-\* and E-\* requirement must have test coverage. See TESTING.md for coverage invariants and the requirement-to-test-layer mapping. A requirement without a corresponding test is a coverage gap that must be addressed.
Requirement ID Conventions
PRODUCT.md — P- prefix with section-scoped slugs:
ERD.md — E- prefix with backlink to the product requirement it satisfies:
Every E-* requirement must have a ← backlink. This is how the check tracks coverage.
ERD.md (detached mode) — E- prefix with backlink and → forward references to code locations in the target repo:
The → line lists file:symbol pairs wrapped in backticks, comma-separated. File paths are relative to the resolved target directory (the path directory, however it was resolved — see Modes section). Forward references replace inline code tags — in detached mode, the target code is never modified.
DEPENDENCIES.md — D-DEP- prefix:
Coverage Invariants
TESTING.md defines the project-specific test strategy. These invariants apply universally:
- Every requirement has a test. Every P- and E- must be covered by at least one test.
- Contract boundaries are tested from both sides. Parsers (reading) and builders (writing) are both tested.
- Trust boundaries are tested end-to-end. Human-approval vs. automatic actions each need an E2E test.
- Every public API surface has a test. Happy path and error path.
- Recovery paths are tested. At integration layer or above.
- Every interface has its production implementation verified. Test doubles don't mask missing real implementations.
Code Traceability
Tag functions and tests with requirement IDs. Augment comments, never replace them.
Rules:
- One tag per function, not per line
- Keep existing descriptive comments — the tag is an addition
- Natural prose is fine:
// Per E-AUTH-SESSION, tokens expire after 24 hours - Skip self-explanatory code, boilerplate, and standard library calls
- Tag test functions too — every test file that verifies a requirement must carry the relevant E-/P- ID
Monorepo Support
ANCHORS supports arbitrary module nesting. A directory is an ANCHORS module if it contains an ANCHORS.md file with a prefix frontmatter field:
Prefixes must be unique across the repo. Within a module, PRODUCT.md/ERD.md links are relative. Cross-module references use relative paths:
Not every module needs all four documents. Pure infrastructure modules might only have ERD.md tracing to another module's PRODUCT.md. TESTING.md can be per-module or shared.
Routing
This skill is invoked as /anchors with optional arguments.
Parse the args to determine the mode:
| User types | Mode | |
|---|---|---|
/anchors (no args) | Interactive — use AskUserQuestion to ask "Setup or check?" (see below) | |
/anchors setup | Setup — determine target path (see below) | |
/anchors setup path/to/dir | Setup — use the given path | |
/anchors check | Check | |
/anchors embed | Embed — convert detached module to embedded (see below) | |
/anchors embed path/to/dir | Embed — convert the detached module at the given path |
Any other args → tell the user the available modes (setup, check, embed).
Interactive mode prompt: When invoked with no args, first check whether any ANCHORS.md files exist in the repo (glob for **/ANCHORS.md excluding node_modules, vendor, .git, build output). Then use AskUserQuestion:
- Question: "What would you like to do?"
- Header: "Mode"
- If ANCHORS modules already exist, present Check first (recommended):
- Check — "Check traceability and consistency across modules (Recommended)"
- Setup — "Scaffold ANCHORS documents in a new directory"
- Embed — "Convert a detached module to embedded mode" (only show if any module has
mode: detached) - If no ANCHORS modules exist, present Setup first (recommended):
- Setup — "Scaffold ANCHORS documents in a directory (Recommended)"
- Check — "Check traceability and consistency across modules"
Setup Mode
Set up a complete ANCHORS document set for a project or module. Setup produces fully populated documents — real requirements, real engineering specs, a real testing strategy — not empty templates. A full setup (not "Skip existing") should produce a document set that passes an immediate check.
Setup uses the anchors CLI for deterministic steps (skill installation, scaffolding) and the LLM for research and content population.
Determine the target path
- If a path was given as an argument, use it.
- If no path was given, check whether the current working directory already has an
ANCHORS.md.
- No → use the current working directory.
- Yes → use
AskUserQuestionto ask for a path: - Question: "This directory already has ANCHORS.md. Where should the new module be set up?"
- Header: "Path"
- Options: suggest 2-3 likely subdirectories based on the repo structure (e.g.,
src/,services/,packages/). The user can always pick "Other" to type a custom path.
Steps
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingapps/penpal/.claude/skills/anchors/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/block/builderbot/anchors)