xiaohongshu
xiaohongshu
ln-120-reference-docs-creator
Creates reference documentation structure + smart documents (ADRs/Guides/Manuals) based on TECH_STACK. Only creates justified documents (nontrivial technology choices). L2 Worker in ln-100-documents-pipeline.
Full skill instructions
This skill creates the reference documentation structure (docs/reference/) and smart documents (ADRs, Guides, Manuals) based on project's TECH_STACK. Documents are created only when justified (nontrivial technology choices with alternatives).
This skill is a L2 WORKER invoked by ln-100-documents-pipeline orchestrator.
This skill should be used directly when:
From ln-100 (via ln-110 Context Store):
{
"context_store": {
"PROJECT_NAME": "my-project",
"TECH_STACK": {
"frontend": "React 18",
"backend": "Express 4.18",
"database": "PostgreSQL 15",
"orm": "Prisma 5.0",
"auth": "JWT",
"cache": "Redis 7"
},
"DEPENDENCIES": [...],
"flags": { "hasBackend": true, "hasDatabase": true, "hasFrontend": true }
}
}
TECH_STACK is used for smart document creation in Phase 2.
The skill follows a 4-phase workflow: CREATE STRUCTURE → SMART DOCUMENT CREATION → VALIDATE STRUCTURE → VALIDATE CONTENT. Phase 2 creates documents only for justified technology choices.
Objective: Establish reference documentation directories and README hub.
Process:
1.1 Check & create directories:
docs/reference/adrs/ exists → create if missingdocs/reference/guides/ exists → create if missingdocs/reference/manuals/ exists → create if missingdocs/reference/research/ exists → create if missing1.2 Check & create README:
docs/reference/README.md existsln-112-reference-docs-creator/references/reference_readme_template.md → docs/reference/README.md{{VERSION}} — "1.0.0"{{DATE}} — current date (YYYY-MM-DD){{ADR_LIST}} — kept as placeholder (filled in Phase 4){{GUIDE_LIST}} — kept as placeholder (filled in Phase 4){{MANUAL_LIST}} — kept as placeholder (filled in Phase 4)1.3 Output:
docs/reference/
├── README.md # Created or existing
├── adrs/ # Empty, ready for ADRs
├── guides/ # Empty, ready for guides
├── manuals/ # Empty, ready for manuals
└── research/ # Empty, ready for research documents
Objective: Create ADRs, Guides, and Manuals for justified technology choices. Skip trivial/obvious selections.
2.1 Check Context Store:
context_store provided → skip Phase 2, proceed to Phase 3TECH_STACK in context_store → skip Phase 2, proceed to Phase 32.2 Load Justification Rules:
references/tech_justification_rules.md2.3 Analyze TECH_STACK for ADRs:
For each category in TECH_STACK (frontend, backend, database, orm, auth, cache):
Check if justified (from justification rules):
frontend: Justified if React/Vue/Angular/Svelte (multiple options exist)backend: Justified if Express/Fastify/NestJS/Koa (multiple options exist)database: Justified if PostgreSQL/MySQL/MongoDB (multiple options exist)auth: Justified if JWT/OAuth/Session (decision required)orm: Justified if Prisma/TypeORM/Sequelize (multiple options exist)cache: Justified if Redis/Memcached (decision required)Skip if trivial:
Create ADR if justified:
adr-NNN-{category}.mdshared/templates/adr_template.mdmcp__context7__resolve-library-id(technology)docs/reference/adrs/adr-NNN-{category}.mdSkip if not justified:
2.4 Analyze TECH_STACK for Guides:
For each technology with complex configuration:
Check if justified:
Create Guide if justified:
NN-{technology-slug}-patterns.mdshared/templates/guide_template.mdmcp__Ref__ref_search_documentation("{technology} patterns 2025")docs/reference/guides/NN-{technology}-patterns.mdSkip if standard usage:
2.5 Analyze TECH_STACK for Manuals:
For each package with complex API:
Check if justified:
Create Manual if justified:
shared/templates/manual_template.mdmcp__context7__get-library-docs(topic: "API")docs/reference/manuals/{package}-{version}.mdSkip if trivial API:
2.6 Report Smart Creation:
✅ Smart Document Creation complete:
- ADRs created: [count] (justified: frontend, backend, database)
- ADRs skipped: [count] (trivial: cache=in-memory)
- Guides created: [count]
- Guides skipped: [count]
- Manuals created: [count]
- Manuals skipped: [count]
Objective: Ensure reference/README.md complies with structural requirements and auto-fix violations.
Process:
2.1 Check SCOPE tag:
docs/reference/README.md (first 5 lines)<!-- SCOPE: ... --> tag<!-- SCOPE: Reference documentation hub (ADRs, Guides, Manuals) with links to subdirectories -->scope_tag_added = True2.2 Check required sections:
references/questions.md## [Section Name] header exists## [Section Name]
{{PLACEHOLDER}}
missing_sections += 12.3 Check Maintenance section:
## Maintenance header## Maintenance
**Last Updated:** [current date]
**Update Triggers:**
- New ADRs added to adrs/ directory
- New guides added to guides/ directory
- New manuals added to manuals/ directory
**Verification:**
- [ ] All ADR links in registry are valid
- [ ] All guide links in registry are valid
- [ ] All manual links in registry are valid
- [ ] Placeholders {{ADR_LIST}}, {{GUIDE_LIST}}, {{MANUAL_LIST}} synced with files
maintenance_added = True2.4 Check POSIX file endings:
posix_fixed = True2.5 Report validation:
✅ Structure validation complete:
- SCOPE tag: [added/present]
- Missing sections: [count] sections added
- Maintenance section: [added/present]
- POSIX endings: [fixed/compliant]
Objective: Ensure each section answers its questions with meaningful content and populate registries from auto-discovery (including documents created in Phase 2).
Process:
4.1 Load validation spec:
references/questions.md4.2 Validate sections (parametric loop):
Define section parameters:
sections = [
{
"name": "Architecture Decision Records (ADRs)",
"question": "Where are architecture decisions documented?",
"directory": "docs/reference/adrs/",
"placeholder": "{{ADR_LIST}}",
"glob_pattern": "docs/reference/adrs/*.md",
"heuristics": [
"Contains link: [ADRs](adrs/) or [adrs](adrs/)",
"Mentions 'Architecture Decision Record' or 'ADR'",
"Has placeholder {{ADR_LIST}} or actual list",
"Length > 30 words"
]
},
{
"name": "Project Guides",
"question": "Where are reusable project patterns documented?",
"directory": "docs/reference/guides/",
"placeholder": "{{GUIDE_LIST}}",
"glob_pattern": "docs/reference/guides/*.md",
"heuristics": [
"Contains link: [Guides](guides/) or [guides](guides/)",
"Has placeholder {{GUIDE_LIST}} or actual list",
"Length > 20 words"
]
},
{
"name": "Package Manuals",
"question": "Where are third-party package references documented?",
"directory": "docs/reference/manuals/",
"placeholder": "{{MANUAL_LIST}}",
"glob_pattern": "docs/reference/manuals/*.md",
"heuristics": [
"Contains link: [Manuals](manuals/) or [manuals](manuals/)",
"Has placeholder {{MANUAL_LIST}} or actual list",
"Length > 20 words"
]
},
{
"name": "Research",
"question": "Where are research/investigation documents stored?",
"directory": "docs/reference/research/",
"placeholder": "{{RESEARCH_LIST}}",
"glob_pattern": "docs/reference/research/*.md",
"heuristics": [
"Contains link: [Research](research/) or [research](research/)",
"Has placeholder {{RESEARCH_LIST}} or actual list",
"Length > 20 words"
]
}
]
For each section in sections:
Read section content:
Check if content answers question:
Auto-discovery (if content invalid or placeholder present):
- [ADR-001: Frontend Framework](adrs/adr-001-frontend-framework.md)
- [02-Repository Pattern](guides/02-repository-pattern.md)
- [Axios 1.6](manuals/axios-1.6.md)
sections_populated += 1placeholders_kept += 1Skip external API calls:
4.3 Report content validation:
✅ Content validation complete:
- Sections checked: 4
- Populated from auto-discovery: [count]
- Placeholders kept (no files): [count]
- Already valid: [count]
docs/
└── reference/
├── README.md # Reference hub with registries
├── adrs/ # Empty or with ADR files
├── guides/ # Empty or with guide files
├── manuals/ # Empty or with manual files
└── research/ # Empty or with research files
Reference README Template:
references/reference_readme_template.md (v2.0.0) - Reference hub with:
Document Templates (for Phase 2 Smart Creation):
shared/templates/adr_template.md - Nygard ADR format (7 sections)shared/templates/guide_template.md - Pattern documentation (Do/Don't/When)shared/templates/manual_template.md - API reference formatshared/templates/research_template.md - Research/Spike documentationJustification Rules:
references/tech_justification_rules.md - Mapping: category → create/skip conditionsValidation Specification:
references/questions.md (v2.0) - Question-driven validation:
Guides document patterns, NOT implementations:
<!-- NO_CODE_EXAMPLES: ... --> tag - FOLLOW ITTables (Do/Don't/When) > ASCII diagrams > Lists > Text
Invoked by: ln-110-documents-pipeline orchestrator
Requires:
docs/ directory (created by ln-111-project-docs-creator)Creates:
docs/reference/ directory structure with README hubBefore completing work, verify ALL checkpoints:
✅ Phase 1 - Structure Created:
docs/reference/ directory existsdocs/reference/adrs/ directory existsdocs/reference/guides/ directory existsdocs/reference/manuals/ directory existsdocs/reference/research/ directory existsdocs/reference/README.md exists (created or existing)✅ Phase 2 - Smart Documents Created (if Context Store provided):
✅ Phase 3 - Structure Validated:
✅ Phase 4 - Content Validated:
✅ Reporting:
Standards:
Language: English only
Version: 8.2.0 (Added Stack Adaptation and Format Priority rules) Last Updated: 2025-01-12
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience