with one click
documentation
Creates concise, behavior-focused documentation for humans and AI. Use after feature implementation OR bug fixes to document HOW THE PRODUCT BEHAVES. NOT a changelog - documents current behavior, not change history.
Creates concise, behavior-focused documentation for humans and AI. Use after feature implementation OR bug fixes to document HOW THE PRODUCT BEHAVES. NOT a changelog - documents current behavior, not change history.
Domain type design and architectural planning for Go code. Use when planning new features, designing self-validating types, preventing primitive obsession, or when refactoring reveals need for new types. Focuses on vertical slice architecture and type safety.
WHEN: User requests Go code work (implement, fix, add, refactor) or mentions @ldd in a Go project. Orchestrates complete workflow (Phases 1-5): design → test → implement → lint → fix → documentation. Auto-triggers parallel quality analysis and iterative fix loop until code is commit-ready.
ADVISORY validation of code against design principles that linters cannot enforce. Loaded by go-code-reviewer agent for design analysis guidance. Also invoked by @refactoring (after pattern application). Can be manually invoked for standalone code review. Categorizes findings as Design Debt, Readability Debt, or Polish Opportunities. Does NOT block commits.
Linter-driven refactoring patterns to reduce complexity and improve code quality. Use when linter fails with complexity issues (cyclomatic, cognitive, maintainability) or when code feels hard to read/maintain. Applies storifying, type extraction, and function extraction patterns.
Use when creating leaf types, after refactoring, during implementation, or when testing advice is needed. Automatically invoked to write tests for new types, or use as testing expert advisor. Covers unit, integration, and system tests with emphasis on in-memory dependencies. Ensures 100% coverage on leaf types with public API testing.
Component and type design for TypeScript + React code. Use when planning new features, designing components and custom hooks, preventing primitive obsession, or when refactoring reveals need for new abstractions. Supports layer-based and hybrid architecture patterns with type safety.
| name | documentation |
| description | Creates concise, behavior-focused documentation for humans and AI. Use after feature implementation OR bug fixes to document HOW THE PRODUCT BEHAVES. NOT a changelog - documents current behavior, not change history. |
| allowed-tools | ["Read","Grep","Glob","Write","Edit"] |
This is NOT a changelog - it's an introduction to current product behavior.
Reference: See reference.md for templates, checklists, and examples.
Behavior Over History: Document what the product DOES, not what changed. When readers come back later, they need to understand current behavior, not archaeology.
Conciseness Over Completeness: A focused doc that gets read beats an exhaustive doc that gets skipped. Document what matters for understanding and usage.
Layered Documentation: Different scopes need different docs. System-level overviews, project guides, feature docs, and code comments each serve distinct purposes. See reference.md for layer definitions.
Documentation IS: Explaining WHY decisions were made, providing context for future changes, showing how pieces fit together, helping both humans and AI understand intent.
Documentation is NOT: A changelog of commits, implementation details without context, API reference without explanation.
<when_to_use> Features: After implementing significant new functionality (may span multiple commits) Bug Fixes: Update existing docs to reflect corrected behavior (don't add "bug fix" sections) Refactors: Only if external behavior or usage patterns changed
NOT for: Individual commits, internal refactors that don't change behavior, changelog entries </when_to_use>
<quick_start>
<step_1_understand_scope>
<step_2_analyze_architecture>
<step_3_choose_documentation_layer> Before writing, decide where each piece of documentation belongs.
Decision Questions:
| Question | If Yes → |
|---|---|
| Does this affect how multiple features interact? | System docs |
| Does this explain project setup, structure, or getting started? | Project docs |
| Does this explain how ONE feature works? | Feature docs |
| Does this explain ONE type/function's purpose? | Code docs |
The Overlap Rule:
Cross-Reference, Don't Duplicate:
docs/auth.md for authentication details"UserID godoc for validation rules"docs/auth.md for architectural context"See reference.md "Choosing Documentation Layer" for detailed decision tree. </step_3_choose_documentation_layer>
<step_4_generate_feature_doc>
Create docs/[feature-name].md using the template in reference.md.
Cover:
For bug fixes: Don't create new docs. Update existing docs to reflect correct behavior. See reference.md "Bug Fix Documentation" guidelines. </step_4_generate_feature_doc>
<step_5_update_code_documentation> Using templates from reference.md:
Code docs should reference feature docs: See docs/[feature].md for detailed architecture
</step_5_update_code_documentation>
<step_6_validate> Run through the checklists in reference.md:
Key questions:
<step_7_manage_size> If documentation grows too large (>500 lines), split into folder structure. See reference.md "Managing Documentation Size" for guidelines. </step_7_manage_size>
<output_format> After generating documentation:
DOCUMENTATION COMPLETE
Feature: [Feature Name]
Generated Artifacts:
- docs/[feature-name].md (created/updated)
- Package godoc updated in [package]/[file].go
- Type documentation for: [list types]
- Testable examples: [list Example_* functions]
Validation:
- [ ] Feature doc checklist passed
- [ ] Code comments checklist passed
- [ ] Quality gates passed
Next Steps:
1. Review docs/[feature-name].md for accuracy
2. Run `go test` to verify testable examples
3. Commit documentation
</output_format>
<success_criteria> Documentation is complete when ALL of the following are true:
Content:
Quality:
Maintainability: