Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 08:37:27 +08:00
commit 37774aa937
131 changed files with 31137 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
---
name: ln-321-guide-creator
description: Creates minimal guides (6 sections, ~300-500 words) for reusable patterns. Auto-research via MCP Ref/Context7. Returns guide path for linking.
---
# Guide Creator
Produces pattern guides with sources and patterns table when a new reusable approach is found.
## Purpose & Scope
- Auto-research best practices for a named pattern; cite versions/dates.
- Generate 6-section guide: SCOPE tags, Principle, Our Implementation, Patterns table (Do/Don't/When), Sources, Related + Last Updated.
- Validate against documentation standards; save to `docs/reference/guides/NN-pattern.md`; return path.
## When to Use
- Pattern is missing in `docs/reference/guides/` or Task/Story Technical Notes reference an undocumented pattern.
- Need a concise “how to implement” reference (not ADR/decision, not API manual).
## Workflow (concise)
1) **Research:** MCP Ref + Context7 for official docs and framework usage; extract principle, 2-3 do/don'ts, versions/dates.
2) **Generate:** Fill 6 sections with patterns table; no code snippets; 300-500 words; language per Story/Task.
3) **Validate:** Ensure SCOPE tags, sources dated, patterns table, no ADR-style rationale, POSIX ending, maintenance/Last Updated; auto-fix standards if needed.
4) **Save:** Confirm, write `docs/reference/guides/NN-pattern-name.md` (NN = next number), optionally update `docs/reference/README.md` if placeholder exists; return path.
## Critical Rules
- Cite official sources with versions/dates (>=2025 or version-specific).
- No code snippets or ADR rationale; keep neutral instructional tone.
- One pattern per guide; include Do/Don't/When table.
- Preserve language (EN/RU) from request.
## Definition of Done
- Research done (Ref + Context7) with principle and sources extracted.
- Guide generated with all 6 sections and patterns table; no placeholders.
- Standards check passed/auto-fixed (SCOPE, maintenance, POSIX).
- Saved to guides with correct numbering; path returned; README updated if placeholder present.
## Reference Files
- Template/reference: `ln-321-guide-creator/references/guide_template.md`
- Standards (if present): `docs/DOCUMENTATION_STANDARDS.md`
---
Version: 6.0.0 (Condensed flow and rules)
Last Updated: 2025-11-26

View File

@@ -0,0 +1,60 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ln-321-guide-creator - State Diagram</title>
<script src="https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js"></script>
<link rel="stylesheet" href="../shared/css/diagram.css">
</head>
<body>
<div class="container">
<header>
<h1>📚 ln-321-guide-creator</h1>
<p class="subtitle">Guide Creator - State Diagram</p>
</header>
<div class="info-box">
<h3>📋 Overview</h3>
<ul>
<li><strong>Purpose:</strong> Research and create minimal project guides (6 sections, 300-500 words)</li>
<li><strong>AUTO-RESEARCH:</strong> Automated via MCP Ref + Context7 (NO manual questions)</li>
<li><strong>Output:</strong> Returns guide path for linking in Story Technical Notes</li>
</ul>
</div>
<div class="diagram-container">
<div class="mermaid">
graph TD
Start([Start: Create Guide]) --> Phase0[Phase 0: Research & Discovery<br/>AUTO-RESEARCH automated]
subgraph Research [Automated Research]
R1[Search library docs<br/>MCP Ref + Context7]
R1 --> R2[Search framework patterns<br/>Best practices]
R2 --> R3[Analyze findings<br/>Extract principle]
end
Phase0 --> R1
R3 --> Phase1
Phase1[Phase 1: Pattern Analysis]
Phase1 --> Phase2[Phase 2: Generation<br/>6 sections 300-500 words<br/>NO ADR concepts]
Phase2 --> Phase3[Phase 3: Confirmation<br/>Save to docs/guides/<br/>Return path]
Phase3 --> UserConfirm{Confirm?}
UserConfirm -->|Yes| Save[Save guide file]
UserConfirm -->|No| Phase2
Save --> End([End])
classDef discovery fill:#E3F2FD,stroke:#1976D2,stroke-width:2px
classDef processing fill:#FFF9C4,stroke:#F57C00,stroke-width:2px
classDef decision fill:#FFE0B2,stroke:#E64A19,stroke-width:2px
classDef action fill:#C8E6C9,stroke:#388E3C,stroke-width:2px
class Phase0,R1,R2,R3 discovery
class Phase1,Phase2 processing
class UserConfirm decision
class Phase3,Save action
</div>
</div>
<footer>
<p>ln-321-guide-creator | AUTO-RESEARCH: MCP Ref + Context7 + WebSearch | NO ADR concepts</p>
</footer>
</div>
<script>
mermaid.initialize({ startOnLoad: true, theme: 'default', flowchart: { useMaxWidth: true, htmlLabels: true, curve: 'basis' } });
</script>
</body>
</html>

View File

@@ -0,0 +1,43 @@
# [Pattern Name]
<!-- SCOPE: Pattern documentation ONLY. Contains principle (industry standard), implementation (project-specific), code structure patterns (DO/DON'T), sources. -->
<!-- DO NOT add here: Architectural decisions → ADR, Implementation code → Task descriptions, Multiple patterns → Separate guides, Requirements → Requirements.md, API specs → api_spec.md -->
## Principle
{{PRINCIPLE}}
(1-2 sentences describing the core industry best practice with version/date citation)
## Our Implementation
{{OUR_IMPLEMENTATION}}
(1 paragraph: how we apply this pattern in our project context, which layers/components affected, key integration points)
## Patterns
| Do This ✅ | Don't Do This ❌ | When to Use |
|-----------|------------------|-------------|
| {{PATTERN_1_DO}} | {{PATTERN_1_DONT}} | {{PATTERN_1_WHEN}} |
| {{PATTERN_2_DO}} | {{PATTERN_2_DONT}} | {{PATTERN_2_WHEN}} |
| {{PATTERN_3_DO}} | {{PATTERN_3_DONT}} | {{PATTERN_3_WHEN}} |
## Sources
- {{SOURCE_1}}
- {{SOURCE_2}}
- Internal: [Architecture.md](../project/architecture.md)
## Related
**ADRs:** {{RELATED_ADRS}}
**Guides:** {{RELATED_GUIDES}}
---
**Last Updated:** {{DATE}}
---
**Guide Template Version:** 4.0.0 (Minimal Format)
**Template Last Updated:** 2025-01-31