capture-specs

Plan devbook chapter updates by comparing implementations and tests against existing specifications.

Updated Sep 2, 2026
One-click install
npx skills add https://github.com/JSdotNet/devbook --skill capture-specs-jsdotnet
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: capture-specs
Source: https://github.com/JSdotNet/devbook/tree/main/plugins/devbook/skills/capture-specs
Command: npx skills add https://github.com/JSdotNet/devbook --skill capture-specs-jsdotnet

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) components.

What problem does it solve? Code often ships without matching documentation, leaving devbook chapters missing, thin, or stale. This Skill reads an implementation and its tests, then produces a capture plan describing exactly what the chapter should say — without writing any files itself. ## Core Features & Use Cases - Six chapter kinds: Covers aggregates, domain services, features, feature flags/settings, arc42 building blocks, and design component guidelines, each with its own reading and drafting rules. - Evidence-based drafting: Extracts invariants from unit tests and requirements from e2e tests (and the running product for features), drafting SHALL sentences with scenario cases and test references. - Verdict-driven workflow: Reports aligned, code-ahead, spec-ahead, conflict, or unresolved per chapter, stopping or handing off to other flows when planning is not appropriate. - Use Case: A domain event was added to an aggregate but never documented. Run this Skill against the aggregate's chapter to receive a Markdown capture plan with ADDED/MODIFIED/REMOVED deltas ready for human review. ## Quick Start Ask the assistant to capture specs for the Order aggregate in the sales bounded context and produce a capture plan for its missing domain chapter.

Frequently Asked Questions about capture-specs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I document code that was built without a specification?▼

Run capture-specs against the code type or chapter target. It reads the implementation and its tests, drafts invariants and requirements as a delta plan, and delivers it as a Markdown artifact for a person to carry into the chapter.

What chapter types can be captured from code?▼

Six kinds are supported: aggregates with their entities, value objects, enums and domain events, domain services, features and sub-features, feature flags and settings, arc42 building blocks, and design component guidelines. One kind and one target per run.

Does capture-specs write or edit devbook chapters?▼

No. It writes nothing — no chapter, source, or test file. It delivers only a capture plan as a Markdown artifact; applying the plan to a chapter is a human decision made through the folder's flow.

What counts as evidence when capturing specs from code?▼

Only code that executes and tests that pass count as evidence. Comments, TODOs, docstrings, and disabled tests are explicitly excluded. Unit tests establish invariants; e2e tests and the running product establish requirements.

When should I not use capture-specs?▼

Do not use it to implement an agreed but unbuilt chapter — that belongs to apply-change — or to check drift without planning a chapter, which is verify-change. It also stops on draft or deprecated chapters, conflicts, and unresolved counterparts.