docs-to-types

Converts approved domain documentation into typed architecture with seams, adapters, and dependency rules.

2|2|Updated Dec 23, 2017
One-click install
npx skills add https://github.com/xriu/dotfiles --skill docs-to-types-xriu
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: docs-to-types
Source: https://github.com/xriu/dotfiles/tree/main/home/.skills/docs-to-types
Command: npx skills add https://github.com/xriu/dotfiles --skill docs-to-types-xriu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams often capture domain decisions in CONTEXT.md glossaries, ADRs, and grill-with-docs notes, but that knowledge stays in prose instead of being enforced by the type system and module graph. This Skill codifies approved documentation into compiling typed architecture before any business behavior is written. ## Core Features & Use Cases - Fact extraction and ambiguity gating: Builds a fact table from CONTEXT.md, ADRs, and grill notes, then asks one concrete question whenever docs and code conflict on naming or structure. - Typed architecture generation: Produces domain types, discriminated unions, smart constructors, service seams, typed error families, production/test adapter slots, and call stacks following project conventions. - Dependency enforcement: Adds architecture tests, lint rules, or import-boundary checks so module dependency direction is mechanically verified. - Use Case: After a grill-with-docs session clarifies a link catalog domain, use this Skill to generate the LinkCatalog service seam, branded slug types, memory and Durable Object adapters, and import-boundary checks — while explicitly leaving business logic unimplemented. ## Quick Start Ask the assistant to convert the approved CONTEXT.md and ADR decisions for a domain into typed architecture with seams, adapters, and dependency checks, without implementing business behavior.

Frequently Asked Questions about docs-to-types

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

FAQPage Schema
How do I turn domain documentation into TypeScript types?▼

Extract architecture facts from CONTEXT.md, ADRs, and approved grill notes into a fact table, then codify them as domain types, discriminated unions, smart constructors, and service seams. This Skill automates that workflow while excluding business behavior.

When should I use docs-to-types in a project workflow?▼

Use it after a grill-with-docs session has produced approved context and before writing the first TDD slice. If no context docs or ADRs exist, it stops and recommends running grill-with-docs first.

Does docs-to-types implement business logic or persistence?▼

No. It deliberately excludes business workflows, real persistence queries, network calls, and HTTP handler logic. Production stubs fail with typed NotImplemented errors, and only memory or no-op adapters are provided for typechecking.

What happens when documentation and code use conflicting terms?▼

The Skill applies an ambiguity gate: it asks one concrete question and waits for an answer. For example, if CONTEXT.md says Operator but code says User and Actor, it asks which term is canonical before generating types.

How are module dependency rules enforced after generating types?▼

It adds the lightest available mechanism such as import-boundary lint rules, dependency-cruiser config, or focused import-scan tests. These checks verify rules like handlers depending on service seams rather than stores directly.