block/builderbot/anchors

Claude Code and agent skill by block/builderbot

Trust tier 3
  • community
Source check pending

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/anchors

SKILL.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:

DocumentPurposeRequirement IDs
ANCHORS.mdModule marker. YAML frontmatter with prefix field.—
PRODUCT.mdProduct requirements — user-facing behavior, workflows, experience. Source of truth.P-*
ERD.mdEngineering requirements — technical design, interfaces, constraints. Derived from PRODUCT.md.E-*
TESTING.mdTesting strategy — pyramid, coverage invariants, requirement-to-test-layer mapping. Defines how requirements are verified.—
DEPENDENCIES.mdExternal 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:

yaml
---
prefix: AUTH
---

ANCHORS.md frontmatter — detached mode (in-repo):

yaml
---
prefix: PENPAL
mode: detached
path: ..
---

ANCHORS.md frontmatter — detached mode (external repo):

yaml
---
prefix: AUTH
mode: detached
repo: github.com/org/auth-service
ref: main
path: src/auth
---
  • mode — detached or omitted. When detached, 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 to main). Only meaningful with repo.
  • path — subdirectory to scope research and traceability. In-repo detached (no repo): relative to the ANCHORS.md file, like embedded mode. External detached (with repo): relative to the target repo root. Defaults to . (in-repo) or / (external).
Truth Hierarchy
PRODUCT.md (source of truth — defines correct behavior)
↓ derives
ERD.md (technical requirements — must fully satisfy the PRD)
↓ constrains
DEPENDENCIES.md (external prerequisites — what the environment must provide)
TESTING.md (testing strategy — covers both PRODUCT.md and ERD.md)
↓ executed as
Tests (executable specification — truthier than implementation)
↓ validated against
Implementation (must satisfy all of the above)
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
  1. PRODUCT.md is authoritative. If there is a conflict between documents, PRODUCT.md wins.
  2. ERD.md must fully satisfy PRODUCT.md. Every product requirement should have corresponding engineering requirements that cover it.
  3. All implementation must meet both PRD and ERD requirements. Do not implement against only one document.
  4. 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.
  5. 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.
  6. 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.
  7. 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:

markdown
-<a id="P-AUTH-LOGIN"></a>**P-AUTH-LOGIN**: Users can log in with email and password.

ERD.md — E- prefix with backlink to the product requirement it satisfies:

markdown
-<a id="E-AUTH-SESSION"></a>**E-AUTH-SESSION**: Sessions use signed JWTs with 24-hour expiry.
← [P-AUTH-LOGIN](PRODUCT.md#P-AUTH-LOGIN)

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:

markdown
-<a id="E-AUTH-SESSION"></a>**E-AUTH-SESSION**: Sessions use signed JWTs with 24-hour expiry.
← [P-AUTH-LOGIN](PRODUCT.md#P-AUTH-LOGIN)
→ `src/auth/session.go:NewSession`, `src/auth/middleware.go:ValidateToken`

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:

markdown
### D-DEP-POSTGRES: PostgreSQL
-**Used by:** API server
-**Where it runs:** All environments
-**Why external:** Stateful service, cannot be bundled
Coverage Invariants

TESTING.md defines the project-specific test strategy. These invariants apply universally:

  1. Every requirement has a test. Every P- and E- must be covered by at least one test.
  2. Contract boundaries are tested from both sides. Parsers (reading) and builders (writing) are both tested.
  3. Trust boundaries are tested end-to-end. Human-approval vs. automatic actions each need an E2E test.
  4. Every public API surface has a test. Happy path and error path.
  5. Recovery paths are tested. At integration layer or above.
  6. 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.

go
// BuildStartCommand builds the argument list for starting the process.
// E-CLI-START: construct CLI start invocation with config flags.
func BuildStartCommand(req StartRequest) []string {
go
// TestSessionExpiry verifies that expired sessions are rejected.
// E-AUTH-SESSION: sessions expire after the configured TTL.
func TestSessionExpiry(t *testing.T) {

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:

yaml
---
prefix: PAY-CHECKOUT
---

Prefixes must be unique across the repo. Within a module, PRODUCT.md/ERD.md links are relative. Cross-module references use relative paths:

markdown
← [P-PAY-CHECKOUT-CART](../checkout/PRODUCT.md#P-PAY-CHECKOUT-CART)

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 typesMode
/anchors (no args)Interactive — use AskUserQuestion to ask "Setup or check?" (see below)
/anchors setupSetup — determine target path (see below)
/anchors setup path/to/dirSetup — use the given path
/anchors checkCheck
/anchors embedEmbed — convert detached module to embedded (see below)
/anchors embed path/to/dirEmbed — 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
  1. If a path was given as an argument, use it.
  2. If no path was given, check whether the current working directory already has an ANCHORS.md.
  • No → use the current working directory.
  • Yes → use AskUserQuestion to 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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/block/builderbot/anchors/badge)](https://verified-skill.com/skills/block/builderbot/anchors)

Something wrong with this skill or its page? Tell us.