speccrew 0.7.73 → 0.7.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.speccrew/agents/speccrew-feature-designer.md +96 -0
- package/.speccrew/agents/speccrew-product-manager.md +55 -0
- package/.speccrew/agents/speccrew-system-deployer.md +178 -0
- package/.speccrew/agents/speccrew-system-developer.md +177 -0
- package/.speccrew/agents/speccrew-task-worker.md +18 -0
- package/.speccrew/agents/speccrew-team-leader.md +56 -0
- package/.speccrew/agents/speccrew-test-manager.md +167 -0
- package/.speccrew/skills/speccrew-agentflow-manager/SKILL.md +6 -149
- package/.speccrew/skills/speccrew-deploy-build/SKILL.md +2 -59
- package/.speccrew/skills/speccrew-deploy-migrate/SKILL.md +2 -64
- package/.speccrew/skills/speccrew-deploy-smoke-test/SKILL.md +2 -75
- package/.speccrew/skills/speccrew-deploy-startup/SKILL.md +2 -70
- package/.speccrew/skills/speccrew-dev-backend/SKILL.md +2 -381
- package/.speccrew/skills/speccrew-dev-desktop-electron/SKILL.md +2 -369
- package/.speccrew/skills/speccrew-dev-desktop-tauri/SKILL.md +2 -362
- package/.speccrew/skills/speccrew-dev-frontend/SKILL.md +2 -304
- package/.speccrew/skills/speccrew-dev-mobile/SKILL.md +2 -294
- package/.speccrew/skills/speccrew-dev-review-backend/SKILL.md +2 -204
- package/.speccrew/skills/speccrew-dev-review-desktop/SKILL.md +2 -173
- package/.speccrew/skills/speccrew-dev-review-frontend/SKILL.md +2 -169
- package/.speccrew/skills/speccrew-dev-review-mobile/SKILL.md +2 -173
- package/.speccrew/skills/speccrew-fd-api-contract/SKILL.md +2 -251
- package/.speccrew/skills/speccrew-fd-feature-analyze/SKILL.md +2 -254
- package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +2 -748
- package/.speccrew/skills/speccrew-feature-designer-orchestration/SKILL.md +6 -105
- package/.speccrew/skills/speccrew-get-timestamp/SKILL.md +6 -33
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/SKILL.md +3 -138
- package/.speccrew/skills/speccrew-knowledge-bizs-api-graph/SKILL.md +3 -283
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/SKILL.md +3 -1014
- package/.speccrew/skills/speccrew-knowledge-bizs-identify-entries/SKILL.md +4 -343
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/SKILL.md +4 -235
- package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/SKILL.md +6 -72
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/SKILL.md +3 -534
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-graph/SKILL.md +3 -432
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/SKILL.md +4 -391
- package/.speccrew/skills/speccrew-knowledge-graph-query/SKILL.md +3 -98
- package/.speccrew/skills/speccrew-knowledge-graph-write/SKILL.md +3 -92
- package/.speccrew/skills/speccrew-knowledge-module-summarize/SKILL.md +3 -181
- package/.speccrew/skills/speccrew-knowledge-system-summarize/SKILL.md +3 -148
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/SKILL.md +3 -330
- package/.speccrew/skills/speccrew-knowledge-techs-generate/SKILL.md +6 -159
- package/.speccrew/skills/speccrew-knowledge-techs-generate-conventions/SKILL.md +3 -142
- package/.speccrew/skills/speccrew-knowledge-techs-generate-quality/SKILL.md +3 -568
- package/.speccrew/skills/speccrew-knowledge-techs-generate-ui-style/SKILL.md +3 -180
- package/.speccrew/skills/speccrew-knowledge-techs-index/SKILL.md +3 -154
- package/.speccrew/skills/speccrew-knowledge-techs-init/SKILL.md +3 -176
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/SKILL.md +3 -135
- package/.speccrew/skills/speccrew-pm-knowledge-detector/SKILL.md +4 -88
- package/.speccrew/skills/speccrew-pm-module-initializer/SKILL.md +4 -178
- package/.speccrew/skills/speccrew-pm-module-matcher/SKILL.md +3 -102
- package/.speccrew/skills/speccrew-pm-phase0-init/SKILL.md +5 -78
- package/.speccrew/skills/speccrew-pm-phase1-knowledge-check/SKILL.md +5 -85
- package/.speccrew/skills/speccrew-pm-phase2-complexity-assess/SKILL.md +4 -100
- package/.speccrew/skills/speccrew-pm-phase5-subprd-dispatch/SKILL.md +14 -106
- package/.speccrew/skills/speccrew-pm-phase6-verify-confirm/SKILL.md +7 -84
- package/.speccrew/skills/speccrew-pm-requirement-analysis/SKILL.md +6 -66
- package/.speccrew/skills/speccrew-pm-requirement-assess/SKILL.md +4 -96
- package/.speccrew/skills/speccrew-pm-requirement-clarify/SKILL.md +4 -131
- package/.speccrew/skills/speccrew-pm-requirement-model/SKILL.md +6 -79
- package/.speccrew/skills/speccrew-pm-requirement-simple/SKILL.md +4 -76
- package/.speccrew/skills/speccrew-pm-sub-prd-generate/SKILL.md +3 -281
- package/.speccrew/skills/speccrew-product-manager-orchestration/SKILL.md +6 -165
- package/.speccrew/skills/speccrew-system-deployer-orchestration/SKILL.md +6 -79
- package/.speccrew/skills/speccrew-system-designer-orchestration/SKILL.md +2 -35
- package/.speccrew/skills/speccrew-system-developer-orchestration/SKILL.md +6 -98
- package/.speccrew/skills/speccrew-task-worker-execution/SKILL.md +6 -94
- package/.speccrew/skills/speccrew-team-leader-routing/SKILL.md +6 -79
- package/.speccrew/skills/speccrew-test-case-design/SKILL.md +2 -58
- package/.speccrew/skills/speccrew-test-code-gen/SKILL.md +2 -61
- package/.speccrew/skills/speccrew-test-manager-orchestration/SKILL.md +6 -94
- package/.speccrew/skills/speccrew-test-reporter/SKILL.md +2 -102
- package/.speccrew/skills/speccrew-test-runner/SKILL.md +3 -121
- package/package.json +1 -1
- package/workspace-template/docs/rules/agentflow-spec.md +56 -8
|
@@ -4,577 +4,12 @@ description: Quality assurance for generated tech documentation using XML workfl
|
|
|
4
4
|
tools: Read, Write, Glob, Grep, Bash
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
8
|
-
|
|
9
|
-
Perform comprehensive quality checks on generated technology documentation to ensure completeness, consistency, and accuracy using XML workflow blocks.
|
|
10
|
-
|
|
11
|
-
## Role Definition
|
|
12
|
-
|
|
13
|
-
You are a Technical Documentation Quality Assurance Specialist. Your role is to verify that generated tech documentation meets quality standards by performing:
|
|
14
|
-
|
|
15
|
-
- **Completeness Verification**: Ensure all required documents and sections exist
|
|
16
|
-
- **Cross-Validation**: Verify dependencies and references are consistent
|
|
17
|
-
- **Consistency Checks**: Ensure naming conventions and style are uniform
|
|
18
|
-
- **Source Traceability**: Verify all claims are properly sourced
|
|
19
|
-
- **Mermaid Compatibility**: Ensure diagrams render correctly
|
|
20
|
-
|
|
21
|
-
## Trigger Scenarios
|
|
22
|
-
|
|
7
|
+
# Trigger Scenarios
|
|
23
8
|
- "Verify tech documentation quality for {platform}"
|
|
24
9
|
- "Run quality checks on generated docs"
|
|
25
10
|
- "Validate platform tech docs"
|
|
26
|
-
- "Check documentation completeness"
|
|
27
|
-
|
|
28
|
-
## User
|
|
29
|
-
|
|
30
|
-
Worker Agent (speccrew-task-worker)
|
|
31
|
-
|
|
32
|
-
---
|
|
33
11
|
|
|
34
12
|
## AgentFlow Definition
|
|
35
|
-
|
|
36
13
|
<!-- @agentflow: SKILL.xml -->
|
|
37
|
-
|
|
38
|
-
>
|
|
39
|
-
|
|
40
|
-
<!-- ============================================================
|
|
41
|
-
Input Parameters Definition
|
|
42
|
-
============================================================ -->
|
|
43
|
-
<block type="input" id="I1" desc="Quality check input parameters">
|
|
44
|
-
<field name="platform_dir" required="true" type="string" desc="Path to platform's techs directory (e.g., speccrew-workspace/knowledges/techs/{platform_id}/)"/>
|
|
45
|
-
<field name="platform_id" required="true" type="string" desc="Target platform identifier (e.g., web-react, backend-nestjs)"/>
|
|
46
|
-
<field name="platform_type" required="true" type="string" desc="Platform type (web, mobile, backend, desktop)"/>
|
|
47
|
-
<field name="source_path" required="true" type="string" desc="Original source code path for cross-validation"/>
|
|
48
|
-
<field name="analysis_report_path" required="false" type="string" default="{platform_dir}/{platform_id}.analysis.json" desc="Path to analysis.json for reference"/>
|
|
49
|
-
</block>
|
|
50
|
-
|
|
51
|
-
<!-- ============================================================
|
|
52
|
-
Global Continuous Execution Rules
|
|
53
|
-
============================================================ -->
|
|
54
|
-
<block type="rule" id="GLOBAL-R1" level="forbidden" desc="Continuous execution constraints — NEVER violate">
|
|
55
|
-
<field name="text">DO NOT ask user "Should I continue?" or "How would you like to proceed?" between steps</field>
|
|
56
|
-
<field name="text">DO NOT offer options like "Full execution / Sample execution / Pause" — always execute ALL steps to completion</field>
|
|
57
|
-
<field name="text">DO NOT suggest "Let me split this into batches" or "Let's do this in parts" — process ALL items sequentially</field>
|
|
58
|
-
<field name="text">DO NOT pause to list what you plan to do next — just do it</field>
|
|
59
|
-
<field name="text">DO NOT ask for confirmation before generating output files</field>
|
|
60
|
-
<field name="text">ONLY pause at explicit <event action="confirm"> blocks defined in the workflow</field>
|
|
61
|
-
</block>
|
|
62
|
-
|
|
63
|
-
<!-- ============================================================
|
|
64
|
-
Global Technology Stack Constraints
|
|
65
|
-
============================================================ -->
|
|
66
|
-
<block type="rule" id="GLOBAL-R-TECHSTACK" level="forbidden" desc="Technology stack constraints — NEVER violate">
|
|
67
|
-
<field name="text">FORBIDDEN: Python, Ruby, Perl, compiled binaries, or any runtime requiring separate installation</field>
|
|
68
|
-
<field name="text">PERMITTED scripting: PowerShell (Windows) and Bash (Linux/Mac) ONLY</field>
|
|
69
|
-
<field name="text">PERMITTED Node.js: ONLY for existing project scripts</field>
|
|
70
|
-
<field name="text">For JSON validation use: node -e "JSON.parse(require('fs').readFileSync('file.json','utf8'))"</field>
|
|
71
|
-
<field name="text">DO NOT create temporary .py, .rb, .pl, .bat files — use inline commands via run_in_terminal</field>
|
|
72
|
-
</block>
|
|
73
|
-
|
|
74
|
-
<!-- ============================================================
|
|
75
|
-
Pre-completion Validation Rule
|
|
76
|
-
============================================================ -->
|
|
77
|
-
<block type="rule" id="PRE-COMPLETION-R1" level="mandatory" desc="Completion marker validation — MUST verify before writing done marker">
|
|
78
|
-
<field name="text">MUST verify quality-report.json exists before writing quality-done.json marker</field>
|
|
79
|
-
<field name="text">NEVER write completion marker with missing quality report</field>
|
|
80
|
-
</block>
|
|
81
|
-
|
|
82
|
-
<!-- ============================================================
|
|
83
|
-
Step 1: Read Generated Documentation
|
|
84
|
-
============================================================ -->
|
|
85
|
-
<!-- Step 1: Read Generated Documentation -->
|
|
86
|
-
<block type="task" id="S1-B1" action="run-skill" status="pending" desc="Read all generated documentation files">
|
|
87
|
-
<field name="description">Read all generated documentation files in the platform directory</field>
|
|
88
|
-
<field name="required_documents">INDEX.md, tech-stack.md, architecture.md, conventions-design.md, conventions-dev.md, conventions-unit-test.md, conventions-system-test.md, conventions-build.md</field>
|
|
89
|
-
<field name="optional_documents">conventions-data.md (backend OR has_data_layer), ui-style/ui-style-guide.md (frontend)</field>
|
|
90
|
-
<field name="analysis_report">{platform_id}.analysis.json</field>
|
|
91
|
-
<field name="output" var="documents_read"/>
|
|
92
|
-
<field name="record">All files found, File sizes</field>
|
|
93
|
-
</block>
|
|
94
|
-
|
|
95
|
-
<block type="checkpoint" id="CP1" name="documents_read" desc="All documents read">
|
|
96
|
-
<field name="verify" value="${documents_read.count} >= 8"/>
|
|
97
|
-
</block>
|
|
98
|
-
|
|
99
|
-
<!-- ============================================================
|
|
100
|
-
Step 2: Completeness Check
|
|
101
|
-
============================================================ -->
|
|
102
|
-
<block type="task" id="S2-B1" action="run-skill" status="pending" desc="Perform completeness check">
|
|
103
|
-
<field name="description">Verify all expected documents and sections exist</field>
|
|
104
|
-
|
|
105
|
-
<!-- 2.1 Document Existence Check -->
|
|
106
|
-
<!-- document_existence: Check documents based on platform_type -->
|
|
107
|
-
<field name="check">All platforms require: INDEX.md, tech-stack.md, architecture.md, conventions-design.md, conventions-dev.md, conventions-unit-test.md, conventions-system-test.md, conventions-build.md</field>
|
|
108
|
-
<field name="check">Backend platforms additionally require: conventions-data.md</field>
|
|
109
|
-
<field name="check">Web/mobile/desktop platforms additionally require: ui-style/ui-style-guide.md</field>
|
|
110
|
-
|
|
111
|
-
<!-- 2.2 Section Completeness Check -->
|
|
112
|
-
<!-- section_completeness: Verify required sections in each document -->
|
|
113
|
-
<field name="check">INDEX.md must contain: Platform summary, Technology stack overview, Navigation links to all convention documents, Agent usage guide</field>
|
|
114
|
-
<field name="check">tech-stack.md must contain: Overview section, Core Technologies table, Dependencies section (grouped by category), Development Tools section, Configuration Files list</field>
|
|
115
|
-
<field name="check">architecture.md must contain: Component/Module Architecture section, State Management / Dependency Injection section, API Integration / Module Organization section, Styling Approach / Middleware section</field>
|
|
116
|
-
<field name="check">conventions-dev.md must contain: Naming Conventions section, Directory Structure section, Code Style section, Import/Export Patterns section, Pre-Development Checklist section</field>
|
|
117
|
-
<field name="check">conventions-build.md must contain: Build Tool & Configuration section, Environment Management section, Build Profiles & Outputs section</field>
|
|
118
|
-
|
|
119
|
-
<!-- 2.3 Analysis Report Completeness -->
|
|
120
|
-
<!-- analysis_report_completeness: Verify analysis.json structure -->
|
|
121
|
-
<field name="check">{platform_id}.analysis.json must contain: platform_id field, platform_type field, analyzed_at timestamp, topics object with all expected topics, documents_generated array, coverage_summary object</field>
|
|
122
|
-
|
|
123
|
-
<field name="output" var="completeness_result"/>
|
|
124
|
-
</block>
|
|
125
|
-
|
|
126
|
-
<block type="event" id="E2" action="log" level="info" desc="Completeness check result">
|
|
127
|
-
<field name="message">Completeness check: ${completeness_result.documents_found}/${completeness_result.documents_expected} documents, ${completeness_result.sections_passed}/${completeness_result.sections_checked} sections</field>
|
|
128
|
-
</block>
|
|
129
|
-
|
|
130
|
-
<block type="checkpoint" id="CP2" name="completeness_checked" desc="Completeness check complete">
|
|
131
|
-
<field name="verify" value="${completeness_result.status} IN ['passed', 'partial']"/>
|
|
132
|
-
</block>
|
|
133
|
-
|
|
134
|
-
<!-- ============================================================
|
|
135
|
-
Step 3: Cross-Validation
|
|
136
|
-
============================================================ -->
|
|
137
|
-
<block type="task" id="S3-B1" action="run-skill" status="pending" desc="Perform cross-validation">
|
|
138
|
-
<field name="description">Verify information is consistent across documents and with source code</field>
|
|
139
|
-
|
|
140
|
-
<!-- 3.1 Version Consistency Check -->
|
|
141
|
-
<!-- version_consistency: Read {source_path}/package.json and verify versions -->
|
|
142
|
-
<field name="action">Read {source_path}/package.json</field>
|
|
143
|
-
<field name="check">Framework versions match documentation</field>
|
|
144
|
-
<field name="check">Key dependency versions match documentation</field>
|
|
145
|
-
<field name="check">Build tool versions match documentation</field>
|
|
146
|
-
<field name="output" var="version_checks"/>
|
|
147
|
-
|
|
148
|
-
<!-- 3.2 Dependency Reference Consistency -->
|
|
149
|
-
<!-- dependency_consistency: Verify dependencies exist and formats match -->
|
|
150
|
-
<field name="check">Each dependency in tech-stack.md exists in package.json</field>
|
|
151
|
-
<field name="check">Version format is consistent</field>
|
|
152
|
-
<field name="output" var="dependency_checks"/>
|
|
153
|
-
|
|
154
|
-
<!-- 3.3 Cross-Document Reference Check -->
|
|
155
|
-
<!-- cross_document_references: Verify cross-references between documents -->
|
|
156
|
-
<field name="check">INDEX.md links to all other documents</field>
|
|
157
|
-
<field name="check">conventions-design.md references ui-style/ui-style-guide.md (for frontend)</field>
|
|
158
|
-
<field name="check">All documents have consistent platform_id references</field>
|
|
159
|
-
<field name="check">All documents have consistent platform_type references</field>
|
|
160
|
-
<field name="output" var="reference_checks"/>
|
|
161
|
-
|
|
162
|
-
<!-- 3.4 Configuration File Reference Check -->
|
|
163
|
-
<!-- config_file_references: Verify config file paths point to existing files -->
|
|
164
|
-
<field name="check">ESLint config path → file exists</field>
|
|
165
|
-
<field name="check">Prettier config path → file exists</field>
|
|
166
|
-
<field name="check">Build config path → file exists</field>
|
|
167
|
-
<field name="output" var="config_checks"/>
|
|
168
|
-
|
|
169
|
-
<field name="output" var="cross_validation_result"/>
|
|
170
|
-
</block>
|
|
171
|
-
|
|
172
|
-
<block type="event" id="E3" action="log" level="info" desc="Cross-validation result">
|
|
173
|
-
<field name="message">Cross-validation: ${cross_validation_result.version_checks.passed}/${cross_validation_result.version_checks.total} version checks, ${cross_validation_result.reference_checks.passed}/${cross_validation_result.reference_checks.total} reference checks</field>
|
|
174
|
-
</block>
|
|
175
|
-
|
|
176
|
-
<block type="checkpoint" id="CP3" name="cross_validation_complete" desc="Cross-validation complete">
|
|
177
|
-
<field name="verify" value="true"/>
|
|
178
|
-
</block>
|
|
179
|
-
|
|
180
|
-
<!-- ============================================================
|
|
181
|
-
Step 4: Consistency Check
|
|
182
|
-
============================================================ -->
|
|
183
|
-
<block type="task" id="S4-B1" action="run-skill" status="pending" desc="Perform consistency check">
|
|
184
|
-
<field name="description">Verify naming conventions and style are uniform across all documents</field>
|
|
185
|
-
|
|
186
|
-
<!-- 4.1 Naming Convention Consistency -->
|
|
187
|
-
<!-- naming_conventions: Check naming patterns match conventions-dev.md -->
|
|
188
|
-
<field name="check">Component naming (PascalCase vs camelCase) matches conventions-dev.md</field>
|
|
189
|
-
<field name="check">File naming conventions match conventions-dev.md</field>
|
|
190
|
-
<field name="check">Variable naming conventions match conventions-dev.md</field>
|
|
191
|
-
<field name="output" var="naming_issues"/>
|
|
192
|
-
|
|
193
|
-
<!-- 4.2 Platform Terminology Consistency -->
|
|
194
|
-
<!-- terminology_consistency: Verify consistent terminology usage -->
|
|
195
|
-
<field name="check">Platform identifier is consistent (e.g., web-react vs react-web)</field>
|
|
196
|
-
<field name="check">Framework name is consistent (e.g., React vs react)</field>
|
|
197
|
-
<field name="check">Language name is consistent (e.g., TypeScript vs Typescript)</field>
|
|
198
|
-
<field name="output" var="terminology_issues"/>
|
|
199
|
-
|
|
200
|
-
<!-- 4.3 Code Style Consistency -->
|
|
201
|
-
<!-- code_style_consistency: Verify code style matches conventions-dev.md -->
|
|
202
|
-
<field name="check">Quote style matches conventions-dev.md (single vs double)</field>
|
|
203
|
-
<field name="check">Semicolon usage matches conventions-dev.md</field>
|
|
204
|
-
<field name="check">Indentation style matches conventions-dev.md</field>
|
|
205
|
-
<field name="output" var="style_issues"/>
|
|
206
|
-
|
|
207
|
-
<!-- 4.4 UI Reference Consistency (Frontend Platforms) -->
|
|
208
|
-
<block type="gateway" id="G4" mode="guard" test="${platform_type} IN ['web', 'mobile', 'desktop']" desc="Check UI reference for frontend platforms">
|
|
209
|
-
<!-- ui_reference_consistency: Verify UI style references for frontend platforms -->
|
|
210
|
-
<field name="check">conventions-design.md contains reference to ui-style/ui-style-guide.md</field>
|
|
211
|
-
<field name="check">ui_style_analysis_level indicator exists</field>
|
|
212
|
-
<field name="output" var="ui_reference_issues"/>
|
|
213
|
-
</block>
|
|
214
|
-
|
|
215
|
-
<field name="output" var="consistency_result"/>
|
|
216
|
-
</block>
|
|
217
|
-
|
|
218
|
-
<block type="event" id="E4" action="log" level="info" desc="Consistency check result">
|
|
219
|
-
<field name="message">Consistency: ${consistency_result.status} - ${consistency_result.issues.length} issues found</field>
|
|
220
|
-
</block>
|
|
221
|
-
|
|
222
|
-
<block type="checkpoint" id="CP4" name="consistency_checked" desc="Consistency check complete">
|
|
223
|
-
<field name="verify" value="true"/>
|
|
224
|
-
</block>
|
|
225
|
-
|
|
226
|
-
<!-- ============================================================
|
|
227
|
-
Step 5: Source Traceability Check
|
|
228
|
-
============================================================ -->
|
|
229
|
-
<block type="task" id="S5-B1" action="run-skill" status="pending" desc="Perform source traceability check">
|
|
230
|
-
<field name="description">Verify all documents properly cite their sources</field>
|
|
231
|
-
|
|
232
|
-
<!-- 5.1 File Reference Block Check -->
|
|
233
|
-
<!-- file_reference_blocks: For each document, verify file reference blocks -->
|
|
234
|
-
<field name="check">File reference block exists at document beginning</field>
|
|
235
|
-
<field name="check">Contains list of referenced files</field>
|
|
236
|
-
<field name="check">File paths use relative paths (NOT absolute or file://)</field>
|
|
237
|
-
<field name="output" var="cite_block_checks"/>
|
|
238
|
-
|
|
239
|
-
<!-- 5.2 Diagram Source Annotation Check -->
|
|
240
|
-
<!-- diagram_source_annotations: For each Mermaid diagram, verify source annotations -->
|
|
241
|
-
<field name="check">**Diagram Source** annotation exists after diagram</field>
|
|
242
|
-
<field name="check">Source file path is provided</field>
|
|
243
|
-
<field name="check">Path uses relative format</field>
|
|
244
|
-
<field name="output" var="diagram_source_checks"/>
|
|
245
|
-
|
|
246
|
-
<!-- 5.3 Section Source Annotation Check -->
|
|
247
|
-
<!-- section_source_annotations: For each major section, verify source annotations -->
|
|
248
|
-
<field name="check">**Section Source** annotation exists at section end OR generic guidance note is present</field>
|
|
249
|
-
<field name="output" var="section_source_checks"/>
|
|
250
|
-
|
|
251
|
-
<!-- 5.4 Path Format Validation -->
|
|
252
|
-
<!-- path_format_validation: Verify path formats are correct -->
|
|
253
|
-
<field name="check">No paths start with drive letter (e.g., d:/, C:\)</field>
|
|
254
|
-
<field name="check">No paths use file:// protocol</field>
|
|
255
|
-
<field name="check">Correct relative depth used (e.g., ../../../../ for 4 levels)</field>
|
|
256
|
-
<field name="output" var="path_format_issues"/>
|
|
257
|
-
|
|
258
|
-
<field name="output" var="traceability_result"/>
|
|
259
|
-
</block>
|
|
260
|
-
|
|
261
|
-
<block type="event" id="E5" action="log" level="info" desc="Source traceability result">
|
|
262
|
-
<field name="message">Source Traceability: ${traceability_result.documents_with_cite_block}/${traceability_result.documents_total} documents with cite blocks, ${traceability_result.absolute_paths_found} absolute paths, ${traceability_result.file_protocol_found} file:// protocols</field>
|
|
263
|
-
</block>
|
|
264
|
-
|
|
265
|
-
<block type="checkpoint" id="CP5" name="traceability_checked" desc="Source traceability check complete">
|
|
266
|
-
<field name="verify" value="true"/>
|
|
267
|
-
</block>
|
|
268
|
-
|
|
269
|
-
<!-- ============================================================
|
|
270
|
-
Step 6: Mermaid Compatibility Check
|
|
271
|
-
============================================================ -->
|
|
272
|
-
<block type="task" id="S6-B1" action="run-skill" status="pending" desc="Perform Mermaid compatibility check">
|
|
273
|
-
<field name="description">Verify all Mermaid diagrams are compatible with standard rendering</field>
|
|
274
|
-
|
|
275
|
-
<!-- 6.1 Forbidden Elements Check -->
|
|
276
|
-
<!-- forbidden_elements: For each Mermaid diagram, check for forbidden elements -->
|
|
277
|
-
<field name="check">No `style` definitions</field>
|
|
278
|
-
<field name="check">No `direction` keyword</field>
|
|
279
|
-
<field name="check">No HTML tags (e.g., <br/>, <div>)</field>
|
|
280
|
-
<field name="check">No nested subgraphs</field>
|
|
281
|
-
<field name="output" var="forbidden_element_issues"/>
|
|
282
|
-
|
|
283
|
-
<!-- 6.2 Syntax Validation -->
|
|
284
|
-
<!-- syntax_validation: For each Mermaid diagram, verify syntax -->
|
|
285
|
-
<field name="check">Valid diagram type declaration</field>
|
|
286
|
-
<field name="check">Properly closed brackets</field>
|
|
287
|
-
<field name="check">Valid node syntax</field>
|
|
288
|
-
<field name="output" var="syntax_issues"/>
|
|
289
|
-
|
|
290
|
-
<!-- 6.3 Diagram Type Usage -->
|
|
291
|
-
<!-- diagram_type_usage: Verify correct diagram types are used -->
|
|
292
|
-
<field name="check">Use graph TB/LR for structure diagrams</field>
|
|
293
|
-
<field name="check">Use flowchart TD for process diagrams</field>
|
|
294
|
-
<field name="check">Use sequenceDiagram for API diagrams</field>
|
|
295
|
-
<field name="output" var="type_usage_issues"/>
|
|
296
|
-
|
|
297
|
-
<field name="output" var="mermaid_result"/>
|
|
298
|
-
</block>
|
|
299
|
-
|
|
300
|
-
<block type="event" id="E6" action="log" level="info" desc="Mermaid compatibility result">
|
|
301
|
-
<field name="message">Mermaid Compatibility: ${mermaid_result.diagrams_passed}/${mermaid_result.diagrams_checked} diagrams passed, ${mermaid_result.issues.length} issues found</field>
|
|
302
|
-
</block>
|
|
303
|
-
|
|
304
|
-
<block type="checkpoint" id="CP6" name="mermaid_checked" desc="Mermaid compatibility check complete">
|
|
305
|
-
<field name="verify" value="true"/>
|
|
306
|
-
</block>
|
|
307
|
-
|
|
308
|
-
<!-- ============================================================
|
|
309
|
-
Step 7: Generate Quality Report
|
|
310
|
-
============================================================ -->
|
|
311
|
-
<block type="task" id="S7-B1" action="run-script" status="pending" desc="Generate quality report JSON">
|
|
312
|
-
<field name="description">Generate comprehensive quality report in JSON format</field>
|
|
313
|
-
<field name="output_file">{platform_dir}/quality-report.json</field>
|
|
314
|
-
<field name="format">
|
|
315
|
-
{
|
|
316
|
-
"platform_id": "{platform_id}",
|
|
317
|
-
"platform_type": "{platform_type}",
|
|
318
|
-
"checked_at": "{ISO 8601 timestamp}",
|
|
319
|
-
"summary": {
|
|
320
|
-
"total_checks": 35,
|
|
321
|
-
"passed": 32,
|
|
322
|
-
"warnings": 2,
|
|
323
|
-
"failed": 1,
|
|
324
|
-
"quality_score": 91
|
|
325
|
-
},
|
|
326
|
-
"completeness": {
|
|
327
|
-
"status": "passed",
|
|
328
|
-
"documents_expected": 8,
|
|
329
|
-
"documents_found": 8,
|
|
330
|
-
"documents_missing": [],
|
|
331
|
-
"sections_checked": 24,
|
|
332
|
-
"sections_passed": 24
|
|
333
|
-
},
|
|
334
|
-
"cross_validation": {
|
|
335
|
-
"status": "passed",
|
|
336
|
-
"version_checks": { "total": 5, "passed": 5, "mismatches": [] },
|
|
337
|
-
"reference_checks": { "total": 12, "passed": 12, "broken_links": [] }
|
|
338
|
-
},
|
|
339
|
-
"consistency": {
|
|
340
|
-
"status": "warning",
|
|
341
|
-
"naming_issues": [],
|
|
342
|
-
"terminology_issues": [],
|
|
343
|
-
"style_issues": []
|
|
344
|
-
},
|
|
345
|
-
"source_traceability": {
|
|
346
|
-
"status": "passed",
|
|
347
|
-
"documents_with_cite_block": 8,
|
|
348
|
-
"documents_missing_cite_block": 0,
|
|
349
|
-
"absolute_paths_found": 0,
|
|
350
|
-
"file_protocol_found": 0
|
|
351
|
-
},
|
|
352
|
-
"mermaid_compatibility": {
|
|
353
|
-
"status": "failed|passed",
|
|
354
|
-
"diagrams_checked": 5,
|
|
355
|
-
"diagrams_passed": 4,
|
|
356
|
-
"issues": []
|
|
357
|
-
},
|
|
358
|
-
"recommendations": []
|
|
359
|
-
}
|
|
360
|
-
</field>
|
|
361
|
-
<field name="quality_score_calculation">quality_score = (passed / total_checks) * 100; Warnings count as 0.5 towards failed; Critical failures (missing required documents) deduct 10 points each</field>
|
|
362
|
-
<field name="output" var="quality_report"/>
|
|
363
|
-
</block>
|
|
364
|
-
|
|
365
|
-
<block type="checkpoint" id="CP7" name="quality_report_generated" desc="Quality report generated">
|
|
366
|
-
<field name="verify" value="file_exists({platform_dir}/quality-report.json)"/>
|
|
367
|
-
</block>
|
|
368
|
-
|
|
369
|
-
<!-- ============================================================
|
|
370
|
-
Step 8: Write Completion Marker
|
|
371
|
-
============================================================ -->
|
|
372
|
-
<block type="task" id="S8-B1" action="run-script" status="pending" desc="Write completion marker">
|
|
373
|
-
<field name="description">Create completion marker file to signal quality check completion</field>
|
|
374
|
-
<field name="validation">MUST verify quality-report.json exists before writing marker</field>
|
|
375
|
-
<field name="output_file">{platform_dir}/quality-done.json</field>
|
|
376
|
-
<field name="format">
|
|
377
|
-
{
|
|
378
|
-
"platform_id": "{platform_id}",
|
|
379
|
-
"status": "completed",
|
|
380
|
-
"quality_score": {calculated_score},
|
|
381
|
-
"report_path": "quality-report.json",
|
|
382
|
-
"completed_at": "{ISO 8601 timestamp}"
|
|
383
|
-
}
|
|
384
|
-
</field>
|
|
385
|
-
<field name="status_values">completed: Quality check finished successfully; failed: Critical error during quality check</field>
|
|
386
|
-
<field name="output" var="completion_marker"/>
|
|
387
|
-
</block>
|
|
388
|
-
|
|
389
|
-
<block type="event" id="E8" action="log" level="info" desc="Quality check complete">
|
|
390
|
-
<field name="message">Quality check complete for {platform_id}
|
|
391
|
-
- Total Checks: ${quality_report.summary.total_checks}
|
|
392
|
-
- Passed: ${quality_report.summary.passed}
|
|
393
|
-
- Warnings: ${quality_report.summary.warnings}
|
|
394
|
-
- Failed: ${quality_report.summary.failed}
|
|
395
|
-
- Quality Score: ${quality_report.summary.quality_score}%
|
|
396
|
-
|
|
397
|
-
## Status by Category
|
|
398
|
-
- Completeness: ${quality_report.completeness.status}
|
|
399
|
-
- Cross-Validation: ${quality_report.cross_validation.status}
|
|
400
|
-
- Consistency: ${quality_report.consistency.status}
|
|
401
|
-
- Source Traceability: ${quality_report.source_traceability.status}
|
|
402
|
-
- Mermaid Compatibility: ${quality_report.mermaid_compatibility.status}</field>
|
|
403
|
-
</block>
|
|
404
|
-
|
|
405
|
-
<!-- ============================================================
|
|
406
|
-
Output Results
|
|
407
|
-
============================================================ -->
|
|
408
|
-
<block type="output" id="O1" desc="Quality check results">
|
|
409
|
-
<field name="platform_id" from="${platform_id}" type="string"/>
|
|
410
|
-
<field name="status" value="completed"/>
|
|
411
|
-
<field name="quality_score" from="${quality_report.summary.quality_score}" type="number"/>
|
|
412
|
-
<field name="quality_report" from="${platform_dir}/quality-report.json" type="string"/>
|
|
413
|
-
<field name="completion_marker" from="${platform_dir}/quality-done.json" type="string"/>
|
|
414
|
-
<field name="summary">total_checks: ${quality_report.summary.total_checks}, passed: ${quality_report.summary.passed}, warnings: ${quality_report.summary.warnings}, failed: ${quality_report.summary.failed}</field>
|
|
415
|
-
</block>
|
|
416
|
-
|
|
417
|
-
<!-- ============================================================
|
|
418
|
-
Error Handling
|
|
419
|
-
============================================================ -->
|
|
420
|
-
<block type="error-handler" id="EH1" desc="Global error handling">
|
|
421
|
-
<try>
|
|
422
|
-
<!-- Main workflow defined in steps above -->
|
|
423
|
-
</try>
|
|
424
|
-
<catch on="platform_dir_not_found">
|
|
425
|
-
<block type="event" id="EH1-E1" action="log" level="error" desc="Platform directory not found">
|
|
426
|
-
<field name="message">Platform directory not found: {platform_dir}</field>
|
|
427
|
-
</block>
|
|
428
|
-
<block type="output" id="EH1-O1">
|
|
429
|
-
<field name="status" value="failed"/>
|
|
430
|
-
<field name="error" value="Platform directory not found"/>
|
|
431
|
-
</block>
|
|
432
|
-
</catch>
|
|
433
|
-
<catch on="required_document_missing">
|
|
434
|
-
<block type="event" id="EH1-E2" action="log" level="warn" desc="Required document missing">
|
|
435
|
-
<field name="message">Required document missing: {missing_document}</field>
|
|
436
|
-
</block>
|
|
437
|
-
<field name="continue" value="true"/>
|
|
438
|
-
<field name="record_in" value="completeness.documents_missing"/>
|
|
439
|
-
</catch>
|
|
440
|
-
<catch on="analysis_report_missing">
|
|
441
|
-
<block type="event" id="EH1-E3" action="log" level="warn" desc="Analysis report missing">
|
|
442
|
-
<field name="message">Analysis report missing, skipping cross-validation with source</field>
|
|
443
|
-
</block>
|
|
444
|
-
<field name="continue" value="true"/>
|
|
445
|
-
</catch>
|
|
446
|
-
<catch on="mermaid_parsing_error">
|
|
447
|
-
<block type="event" id="EH1-E4" action="log" level="warn" desc="Mermaid parsing error">
|
|
448
|
-
<field name="message">Mermaid parsing error in {diagram_location}</field>
|
|
449
|
-
</block>
|
|
450
|
-
<field name="continue" value="true"/>
|
|
451
|
-
<field name="record_in" value="mermaid_compatibility.issues"/>
|
|
452
|
-
</catch>
|
|
453
|
-
</block>
|
|
454
|
-
|
|
455
|
-
---
|
|
456
|
-
|
|
457
|
-
## Input Parameters
|
|
458
|
-
|
|
459
|
-
| Parameter | Required | Description |
|
|
460
|
-
|-----------|----------|-------------|
|
|
461
|
-
| platform_dir | Yes | Path to platform's techs directory containing generated docs (e.g., `speccrew-workspace/knowledges/techs/{platform_id}/`) |
|
|
462
|
-
| platform_id | Yes | Target platform identifier (e.g., "web-react", "backend-nestjs") |
|
|
463
|
-
| platform_type | Yes | Platform type (web, mobile, backend, desktop) |
|
|
464
|
-
| source_path | Yes | Original source code path for cross-validation |
|
|
465
|
-
| analysis_report_path | No | Path to analysis.json for reference (default: `{platform_dir}/{platform_id}.analysis.json`) |
|
|
466
|
-
|
|
467
|
-
---
|
|
468
|
-
|
|
469
|
-
## Output Files
|
|
470
|
-
|
|
471
|
-
- Quality Report: `{platform_dir}/quality-report.json`
|
|
472
|
-
- Completion Marker: `{platform_dir}/quality-done.json`
|
|
473
|
-
- Console summary of check results
|
|
474
|
-
|
|
475
|
-
---
|
|
476
|
-
|
|
477
|
-
## Quality Thresholds
|
|
478
|
-
|
|
479
|
-
| Score | Status |
|
|
480
|
-
|-------|--------|
|
|
481
|
-
| 90-100 | EXCELLENT |
|
|
482
|
-
| 80-89 | GOOD |
|
|
483
|
-
| 70-79 | ACCEPTABLE |
|
|
484
|
-
| 60-69 | NEEDS_IMPROVEMENT |
|
|
485
|
-
| 0-59 | FAILED |
|
|
486
|
-
|
|
487
|
-
---
|
|
488
|
-
|
|
489
|
-
## Constraints
|
|
490
|
-
|
|
491
|
-
1. **Read-Only Source Access**: Only READ from source_path, never modify
|
|
492
|
-
2. **Relative Paths Only**: All file references must use relative paths
|
|
493
|
-
3. **JSON Output Only**: Quality report must be valid JSON
|
|
494
|
-
4. **Complete All Steps**: Must complete all 8 steps even if early failures are found
|
|
495
|
-
5. **Detailed Issue Reporting**: Include file paths and line numbers for issues when possible
|
|
496
|
-
|
|
497
|
-
---
|
|
498
|
-
|
|
499
|
-
## Error Handling
|
|
500
|
-
|
|
501
|
-
| Error Type | Action |
|
|
502
|
-
|------------|--------|
|
|
503
|
-
| Platform directory not found | Report error, terminate with failed status |
|
|
504
|
-
| Required document missing | Record in completeness check, continue |
|
|
505
|
-
| Analysis report missing | Skip cross-validation with source, continue |
|
|
506
|
-
| Mermaid parsing error | Record in compatibility check, continue |
|
|
507
|
-
|
|
508
|
-
---
|
|
509
|
-
|
|
510
|
-
## Task Completion Report
|
|
511
|
-
|
|
512
|
-
Upon completion, return the following:
|
|
513
|
-
|
|
514
|
-
```
|
|
515
|
-
TASK COMPLETED: speccrew-knowledge-techs-generate-quality
|
|
516
|
-
|
|
517
|
-
## Input Parameters
|
|
518
|
-
- platform_id: {platform_id}
|
|
519
|
-
- platform_dir: {platform_dir}
|
|
520
|
-
- source_path: {source_path}
|
|
521
|
-
|
|
522
|
-
## Quality Summary
|
|
523
|
-
- Total Checks: {total}
|
|
524
|
-
- Passed: {passed}
|
|
525
|
-
- Warnings: {warnings}
|
|
526
|
-
- Failed: {failed}
|
|
527
|
-
- Quality Score: {score}%
|
|
528
|
-
|
|
529
|
-
## Status by Category
|
|
530
|
-
- Completeness: {status}
|
|
531
|
-
- Cross-Validation: {status}
|
|
532
|
-
- Consistency: {status}
|
|
533
|
-
- Source Traceability: {status}
|
|
534
|
-
- Mermaid Compatibility: {status}
|
|
535
|
-
|
|
536
|
-
## Output
|
|
537
|
-
- Quality Report: {platform_dir}/quality-report.json
|
|
538
|
-
|
|
539
|
-
## Recommendations
|
|
540
|
-
{list of recommendations if any}
|
|
541
|
-
```
|
|
542
|
-
|
|
543
|
-
---
|
|
544
|
-
|
|
545
|
-
## Integration Notes
|
|
546
|
-
|
|
547
|
-
This skill is designed to be invoked after `speccrew-knowledge-techs-generate` completes. The quality report can be used by:
|
|
548
|
-
|
|
549
|
-
- `techs-dispatch` to determine if re-generation is needed
|
|
550
|
-
- Development teams to identify documentation issues
|
|
551
|
-
- CI/CD pipelines to enforce documentation quality gates
|
|
552
|
-
|
|
553
|
-
---
|
|
554
|
-
|
|
555
|
-
## CONTINUOUS EXECUTION RULES
|
|
556
|
-
|
|
557
|
-
This skill MUST execute all steps continuously without unnecessary interruptions.
|
|
558
|
-
|
|
559
|
-
### FORBIDDEN Interruptions
|
|
560
|
-
|
|
561
|
-
1. DO NOT ask user "Should I continue?" after completing a step
|
|
562
|
-
2. DO NOT suggest "Let me split this into batches" or "Let's do this in parts"
|
|
563
|
-
3. DO NOT pause to list what you plan to do next — just do it
|
|
564
|
-
4. DO NOT ask for confirmation before generating output files
|
|
565
|
-
5. DO NOT warn about "large number of files" — proceed with generation
|
|
566
|
-
6. DO NOT offer "Should I proceed with the remaining items?"
|
|
567
|
-
7. DO NOT present options like "Full execution / Sample execution / Pause"
|
|
568
|
-
|
|
569
|
-
### When to Pause (ONLY these cases)
|
|
570
|
-
|
|
571
|
-
1. Explicit `<event action="confirm">` blocks in the workflow
|
|
572
|
-
2. Ambiguous requirements that genuinely need clarification
|
|
573
|
-
3. Unrecoverable errors that prevent further progress
|
|
574
|
-
4. Security-sensitive operations (e.g., deleting existing files)
|
|
575
|
-
|
|
576
|
-
### Execution Behavior
|
|
577
|
-
|
|
578
|
-
- When multiple checks need to be performed, execute ALL of them sequentially without asking
|
|
579
|
-
- Continue execution even if individual checks fail — record failures and proceed
|
|
580
|
-
- NEVER voluntarily stop mid-process to ask if user wants to continue
|
|
14
|
+
> **REQUIRED**: Before executing this workflow, read the XML workflow specification: speccrew-workspace/docs/rules/agentflow-spec.md
|
|
15
|
+
> Then read and execute the XML workflow in SKILL.xml block-by-block as the authoritative execution plan.
|