130 lines
6.2 KiB
HTML
130 lines
6.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>ln-114-project-docs-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-114-project-docs-creator</h1>
|
|
<p class="subtitle">Project Documentation Creator - State Diagram</p>
|
|
</header>
|
|
|
|
<div class="info-box">
|
|
<h3>📋 Workflow Overview</h3>
|
|
<ul>
|
|
<li><strong>Purpose:</strong> Create and validate 7 project docs (requirements, architecture, tech_stack, api_spec, database_schema, design_guidelines, runbook)</li>
|
|
<li><strong>Worker for:</strong> ln-110-documents-pipeline orchestrator</li>
|
|
<li><strong>Phases:</strong> 4 phases (Phase 1 CREATE → Phase 2 Structure Validation → Phase 3 Content Validation → Phase 4 Finalization)</li>
|
|
<li><strong>Validation:</strong> 27 questions with auto-discovery → MCP Ref → user fallback hierarchy</li>
|
|
<li><strong>Auto-Discovery:</strong> package.json, src/ structure, docker-compose.yml, migrations/, .env.example scanning</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="legend">
|
|
<div class="legend-item">
|
|
<div class="legend-color color-action"></div>
|
|
<span>Creation Action</span>
|
|
</div>
|
|
<div class="legend-item">
|
|
<div class="legend-color color-validation"></div>
|
|
<span>Validation</span>
|
|
</div>
|
|
<div class="legend-item">
|
|
<div class="legend-color color-decision"></div>
|
|
<span>Decision Point</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="diagram-container">
|
|
<div class="mermaid">
|
|
graph TD
|
|
Start([Start: Create Project Documentation]) --> Phase1[Phase 1: Create Structure<br/>3-7 files based on project type]
|
|
|
|
Phase1 --> CheckFiles[Check existing files<br/>docs/project/*.md]
|
|
CheckFiles --> DetermineTemplates[Determine conditional templates:<br/>api_spec Backend only<br/>database_schema if DB detected<br/>design_guidelines Frontend only]
|
|
DetermineTemplates --> CreateMissing[Create missing templates from references/]
|
|
|
|
CreateMissing --> Phase2[Phase 2: Validate Structure<br/>Auto-fix violations]
|
|
|
|
Phase2 --> AutoFix[Auto-fix:<br/>SCOPE tags, required sections,<br/>Maintenance sections, POSIX endings]
|
|
|
|
AutoFix --> Phase3[Phase 3: Validate Content<br/>27 questions parametric loop]
|
|
|
|
Phase3 --> ParametricLoop[For each question in questions.md:<br/>Extract section content]
|
|
|
|
ParametricLoop --> CheckHeuristics{Validation<br/>heuristics pass?}
|
|
CheckHeuristics -->|Yes| Valid[Section valid, skip to next question]
|
|
CheckHeuristics -->|No| AutoDiscovery
|
|
|
|
AutoDiscovery[Auto-discovery:<br/>package.json, src/, docker-compose,<br/>migrations/, .env.example]
|
|
AutoDiscovery --> DiscoverySuccess{Discovery<br/>successful?}
|
|
DiscoverySuccess -->|Yes| PopulateDiscovery[Populate section<br/>with discovered data]
|
|
DiscoverySuccess -->|No| MCPRef
|
|
|
|
MCPRef[MCP Ref research:<br/>Framework features, architecture patterns,<br/>library standards, tech comparisons]
|
|
MCPRef --> MCPSuccess{Research<br/>successful?}
|
|
MCPSuccess -->|Yes| PopulateRef[Populate section<br/>with research summary]
|
|
MCPSuccess -->|No| UserFallback[User question fallback:<br/>Ask user to provide content]
|
|
|
|
PopulateDiscovery --> MoreQuestions
|
|
PopulateRef --> MoreQuestions
|
|
UserFallback --> MoreQuestions
|
|
Valid --> MoreQuestions
|
|
|
|
MoreQuestions{More questions<br/>to validate?}
|
|
MoreQuestions -->|Yes| ParametricLoop
|
|
MoreQuestions -->|No| Phase4
|
|
|
|
Phase4[Phase 4: Finalization<br/>Generate summary report]
|
|
Phase4 --> Summary[Display completion summary:<br/>Files created/preserved,<br/>Sections populated auto vs user]
|
|
|
|
Summary --> End([End: ✓ 7 project docs created + validated])
|
|
|
|
%% Styling
|
|
classDef action fill:#C8E6C9,stroke:#388E3C,stroke-width:2px
|
|
classDef validation fill:#FFF9C4,stroke:#F57C00,stroke-width:2px
|
|
classDef decision fill:#FFE0B2,stroke:#E64A19,stroke-width:2px
|
|
|
|
class Phase1,CheckFiles,DetermineTemplates,CreateMissing,AutoFix,PopulateDiscovery,PopulateRef,UserFallback,Summary action
|
|
class Phase2,Phase3,ParametricLoop,AutoDiscovery,MCPRef,Phase4 validation
|
|
class CheckHeuristics,DiscoverySuccess,MCPSuccess,MoreQuestions decision
|
|
</div>
|
|
</div>
|
|
|
|
<div class="info-box">
|
|
<h3>🔑 Key Features</h3>
|
|
<ul>
|
|
<li><strong>Fourth Worker:</strong> Creates project documentation after task management system (ln-110 → ln-111 → ln-112 → ln-113 → ln-114)</li>
|
|
<li><strong>Conditional Templates:</strong> api_spec.md (Backend/Full-stack), database_schema.md (if DB detected), design_guidelines.md (Frontend/Full-stack)</li>
|
|
<li><strong>3-Level Validation Hierarchy:</strong> Auto-discovery (67%) → MCP Ref (18%) → User input (15%) for optimal token efficiency</li>
|
|
<li><strong>Priority-Based Validation:</strong> Critical (requirements, architecture, runbook) → High (tech_stack, api_spec, database_schema) → Medium (design_guidelines)</li>
|
|
<li><strong>Smart Auto-Discovery:</strong> Scans package.json, src/ directory structure, docker-compose.yml, migrations/, .env.example</li>
|
|
<li><strong>Parametric Loop:</strong> 27 questions with validation heuristics, auto-discovery hints, MCP Ref hints</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<footer>
|
|
<p>Generated for ln-114-project-docs-creator skill | Version 12.0.0</p>
|
|
<p>Diagram format: Mermaid.js | Last updated: 2025-11-18</p>
|
|
</footer>
|
|
</div>
|
|
|
|
<script>
|
|
mermaid.initialize({
|
|
startOnLoad: true,
|
|
theme: 'default',
|
|
flowchart: {
|
|
useMaxWidth: true,
|
|
htmlLabels: true,
|
|
curve: 'basis'
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|