claude-code-orchestrator-kit 1.0.0

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.
Files changed (130) hide show
  1. package/.claude/agents/database/workers/api-builder.md +155 -0
  2. package/.claude/agents/database/workers/database-architect.md +193 -0
  3. package/.claude/agents/database/workers/supabase-auditor.md +1070 -0
  4. package/.claude/agents/development/workers/code-reviewer.md +968 -0
  5. package/.claude/agents/development/workers/cost-calculator-specialist.md +683 -0
  6. package/.claude/agents/development/workers/llm-service-specialist.md +999 -0
  7. package/.claude/agents/development/workers/skill-builder-v2.md +480 -0
  8. package/.claude/agents/development/workers/typescript-types-specialist.md +649 -0
  9. package/.claude/agents/development/workers/utility-builder.md +582 -0
  10. package/.claude/agents/documentation/workers/technical-writer.md +152 -0
  11. package/.claude/agents/frontend/workers/fullstack-nextjs-specialist.md +206 -0
  12. package/.claude/agents/frontend/workers/visual-effects-creator.md +159 -0
  13. package/.claude/agents/health/orchestrators/bug-orchestrator.md +1045 -0
  14. package/.claude/agents/health/orchestrators/dead-code-orchestrator.md +1045 -0
  15. package/.claude/agents/health/orchestrators/dependency-orchestrator.md +1045 -0
  16. package/.claude/agents/health/orchestrators/security-orchestrator.md +1045 -0
  17. package/.claude/agents/health/workers/bug-fixer.md +525 -0
  18. package/.claude/agents/health/workers/bug-hunter.md +649 -0
  19. package/.claude/agents/health/workers/dead-code-hunter.md +446 -0
  20. package/.claude/agents/health/workers/dead-code-remover.md +437 -0
  21. package/.claude/agents/health/workers/dependency-auditor.md +379 -0
  22. package/.claude/agents/health/workers/dependency-updater.md +436 -0
  23. package/.claude/agents/health/workers/security-scanner.md +700 -0
  24. package/.claude/agents/health/workers/vulnerability-fixer.md +524 -0
  25. package/.claude/agents/infrastructure/workers/infrastructure-specialist.md +156 -0
  26. package/.claude/agents/infrastructure/workers/orchestration-logic-specialist.md +1260 -0
  27. package/.claude/agents/infrastructure/workers/qdrant-specialist.md +503 -0
  28. package/.claude/agents/infrastructure/workers/quality-validator-specialist.md +984 -0
  29. package/.claude/agents/meta/workers/meta-agent-v3.md +503 -0
  30. package/.claude/agents/research/workers/problem-investigator.md +507 -0
  31. package/.claude/agents/research/workers/research-specialist.md +423 -0
  32. package/.claude/agents/testing/workers/accessibility-tester.md +813 -0
  33. package/.claude/agents/testing/workers/integration-tester.md +188 -0
  34. package/.claude/agents/testing/workers/mobile-fixes-implementer.md +252 -0
  35. package/.claude/agents/testing/workers/mobile-responsiveness-tester.md +180 -0
  36. package/.claude/agents/testing/workers/performance-optimizer.md +262 -0
  37. package/.claude/agents/testing/workers/test-writer.md +800 -0
  38. package/.claude/commands/health-bugs.md +297 -0
  39. package/.claude/commands/health-cleanup.md +297 -0
  40. package/.claude/commands/health-deps.md +297 -0
  41. package/.claude/commands/health-metrics.md +747 -0
  42. package/.claude/commands/health-security.md +297 -0
  43. package/.claude/commands/push.md +21 -0
  44. package/.claude/commands/speckit.analyze.md +184 -0
  45. package/.claude/commands/speckit.checklist.md +294 -0
  46. package/.claude/commands/speckit.clarify.md +178 -0
  47. package/.claude/commands/speckit.constitution.md +78 -0
  48. package/.claude/commands/speckit.implement.md +182 -0
  49. package/.claude/commands/speckit.plan.md +87 -0
  50. package/.claude/commands/speckit.specify.md +250 -0
  51. package/.claude/commands/speckit.tasks.md +137 -0
  52. package/.claude/commands/translate-doc.md +95 -0
  53. package/.claude/commands/worktree-cleanup.md +382 -0
  54. package/.claude/commands/worktree-create.md +287 -0
  55. package/.claude/commands/worktree-list.md +239 -0
  56. package/.claude/commands/worktree-remove.md +339 -0
  57. package/.claude/schemas/base-plan.schema.json +82 -0
  58. package/.claude/schemas/bug-plan.schema.json +71 -0
  59. package/.claude/schemas/dead-code-plan.schema.json +71 -0
  60. package/.claude/schemas/dependency-plan.schema.json +74 -0
  61. package/.claude/schemas/security-plan.schema.json +71 -0
  62. package/.claude/scripts/gates/check-bundle-size.sh +47 -0
  63. package/.claude/scripts/gates/check-coverage.sh +67 -0
  64. package/.claude/scripts/gates/check-security.sh +46 -0
  65. package/.claude/scripts/release.sh +740 -0
  66. package/.claude/settings.local.json +21 -0
  67. package/.claude/settings.local.json.example +20 -0
  68. package/.claude/skills/calculate-priority-score/SKILL.md +229 -0
  69. package/.claude/skills/calculate-priority-score/scoring-matrix.json +83 -0
  70. package/.claude/skills/extract-version/SKILL.md +228 -0
  71. package/.claude/skills/format-commit-message/SKILL.md +189 -0
  72. package/.claude/skills/format-commit-message/template.md +64 -0
  73. package/.claude/skills/format-markdown-table/SKILL.md +202 -0
  74. package/.claude/skills/format-markdown-table/examples.md +84 -0
  75. package/.claude/skills/format-todo-list/SKILL.md +222 -0
  76. package/.claude/skills/format-todo-list/template.json +30 -0
  77. package/.claude/skills/generate-changelog/SKILL.md +258 -0
  78. package/.claude/skills/generate-changelog/commit-mapping.json +47 -0
  79. package/.claude/skills/generate-report-header/SKILL.md +228 -0
  80. package/.claude/skills/generate-report-header/template.md +66 -0
  81. package/.claude/skills/parse-error-logs/SKILL.md +286 -0
  82. package/.claude/skills/parse-error-logs/patterns.json +26 -0
  83. package/.claude/skills/parse-git-status/SKILL.md +164 -0
  84. package/.claude/skills/parse-package-json/SKILL.md +151 -0
  85. package/.claude/skills/parse-package-json/schema.json +43 -0
  86. package/.claude/skills/render-template/SKILL.md +245 -0
  87. package/.claude/skills/rollback-changes/SKILL.md +582 -0
  88. package/.claude/skills/rollback-changes/changes-log-schema.json +101 -0
  89. package/.claude/skills/run-quality-gate/SKILL.md +404 -0
  90. package/.claude/skills/run-quality-gate/gate-mappings.json +97 -0
  91. package/.claude/skills/validate-plan-file/SKILL.md +327 -0
  92. package/.claude/skills/validate-plan-file/schema.json +35 -0
  93. package/.claude/skills/validate-report-file/SKILL.md +256 -0
  94. package/.claude/skills/validate-report-file/schema.json +67 -0
  95. package/.env.example +49 -0
  96. package/.github/BRANCH_PROTECTION.md +137 -0
  97. package/.github/workflows/build.yml +70 -0
  98. package/.github/workflows/claude-code-review.yml +255 -0
  99. package/.github/workflows/claude.yml +79 -0
  100. package/.github/workflows/deploy-staging.yml +90 -0
  101. package/.github/workflows/test.yml +104 -0
  102. package/.gitignore +116 -0
  103. package/CLAUDE.md +137 -0
  104. package/LICENSE +72 -0
  105. package/README.md +1098 -0
  106. package/docs/ARCHITECTURE.md +746 -0
  107. package/docs/Agents Ecosystem/AGENT-ORCHESTRATION.md +568 -0
  108. package/docs/Agents Ecosystem/AI-AGENT-ECOSYSTEM-README.md +658 -0
  109. package/docs/Agents Ecosystem/ARCHITECTURE.md +606 -0
  110. package/docs/Agents Ecosystem/QUALITY-GATES-SPECIFICATION.md +1315 -0
  111. package/docs/Agents Ecosystem/REPORT-TEMPLATE-STANDARD.md +1324 -0
  112. package/docs/Agents Ecosystem/spec-kit-comprehensive-updates.md +478 -0
  113. package/docs/FAQ.md +572 -0
  114. package/docs/MIGRATION-GUIDE.md +542 -0
  115. package/docs/PERFORMANCE-OPTIMIZATION.md +494 -0
  116. package/docs/ROADMAP.md +439 -0
  117. package/docs/TUTORIAL-CUSTOM-AGENTS.md +2041 -0
  118. package/docs/USE-CASES.md +706 -0
  119. package/index.js +96 -0
  120. package/mcp/.mcp.base.json +21 -0
  121. package/mcp/.mcp.frontend.json +29 -0
  122. package/mcp/.mcp.full.json +67 -0
  123. package/mcp/.mcp.local.example.json +7 -0
  124. package/mcp/.mcp.local.json +7 -0
  125. package/mcp/.mcp.n8n.json +45 -0
  126. package/mcp/.mcp.supabase-full.json +35 -0
  127. package/mcp/.mcp.supabase-only.json +28 -0
  128. package/package.json +78 -0
  129. package/postinstall.js +71 -0
  130. package/switch-mcp.sh +101 -0
@@ -0,0 +1,327 @@
1
+ ---
2
+ name: validate-plan-file
3
+ description: Validate that orchestrator plan files conform to expected JSON schema. Use before workers read plan files or after orchestrators create them to ensure proper structure and required fields.
4
+ allowed-tools: Read
5
+ ---
6
+
7
+ # Validate Plan File
8
+
9
+ Validate orchestrator plan files to ensure they conform to the expected schema before workers process them.
10
+
11
+ ## When to Use
12
+
13
+ - Before workers read plan files
14
+ - After orchestrators create plan files
15
+ - When debugging plan file issues
16
+ - In quality gates validation
17
+
18
+ ## Instructions
19
+
20
+ ### Step 1: Read Plan File
21
+
22
+ Use Read tool to load the plan file.
23
+
24
+ **Expected Input**:
25
+ - `file_path`: Path to plan file (e.g., `.bug-detection-plan.json`, `.security-scan-plan.json`)
26
+
27
+ **Tools Used**: Read
28
+
29
+ ### Step 2: Determine Schema
30
+
31
+ Map file name pattern to appropriate JSON schema.
32
+
33
+ **Schema Mapping**:
34
+ - `.bug-*-plan.json` → `.claude/schemas/bug-plan.schema.json`
35
+ - `.security-*-plan.json` → `.claude/schemas/security-plan.schema.json`
36
+ - `.dead-code-*-plan.json` → `.claude/schemas/dead-code-plan.schema.json`
37
+ - `.dependency-*-plan.json` → `.claude/schemas/dependency-plan.schema.json`
38
+ - `.version-*-plan.json` → base schema (version update workflow)
39
+
40
+ **New Naming Convention** (standardized):
41
+ - Bug workflow: `.bug-detection-plan.json`, `.bug-fixing-plan.json`, `.bug-verification-plan.json`
42
+ - Security workflow: `.security-scan-plan.json`, `.security-remediation-plan.json`, `.security-verification-plan.json`
43
+ - Dead code workflow: `.dead-code-detection-plan.json`, `.dead-code-cleanup-plan.json`, `.dead-code-verification-plan.json`
44
+ - Dependency workflow: `.dependency-audit-plan.json`, `.dependency-update-plan.json`, `.dependency-verification-plan.json`
45
+
46
+ ### Step 3: Load and Parse JSON Schema
47
+
48
+ Use Read tool to load the appropriate schema file from `.claude/schemas/`.
49
+
50
+ **Tools Used**: Read
51
+
52
+ ### Step 4: Validate JSON Against Schema
53
+
54
+ Validate the plan file content against the loaded JSON schema.
55
+
56
+ **Base Schema Validation** (all plan files):
57
+ - `workflow`: String (required, e.g., "bug-management", "security-audit")
58
+ - `phase`: String (required, e.g., "detection", "fixing", "verification")
59
+ - `phaseNumber`: Integer (optional, for sequencing)
60
+ - `config`: Object (required, domain-specific configuration)
61
+ - `validation`: Object (required, with `required` array of validation criteria)
62
+ - `nextAgent`: String (optional, agent to invoke next)
63
+ - `timestamp`: String (optional, ISO-8601 format)
64
+ - `metadata`: Object (optional, with `createdBy`, `iteration`, `maxIterations`)
65
+
66
+ **Domain-Specific Validation**:
67
+
68
+ **Bug Plans**:
69
+ - `config.priority`: "critical"|"high"|"medium"|"low"|"all" (required)
70
+ - `config.categories`: Array of bug types (optional)
71
+ - `config.maxBugsPerRun`: Integer (optional, default 50)
72
+ - `config.verifyOnly`: Boolean (optional, default false)
73
+
74
+ **Security Plans**:
75
+ - `config.severity`: "critical"|"high"|"medium"|"low"|"all" (required)
76
+ - `config.categories`: Array of vulnerability types (optional)
77
+ - `config.maxVulnsPerRun`: Integer (optional, default 25)
78
+ - `config.skipSupabaseRLS`: Boolean (optional, default false)
79
+
80
+ **Dead Code Plans**:
81
+ - `config.type`: "critical"|"high"|"medium"|"low"|"all" (required)
82
+ - `config.categories`: Array of dead code types (optional)
83
+ - `config.maxItemsPerRun`: Integer (optional, default 100)
84
+ - `config.safeMode`: Boolean (optional, default true)
85
+
86
+ **Dependency Plans**:
87
+ - `config.category`: "security"|"unused"|"outdated"|"all" (required)
88
+ - `config.severity`: "critical"|"high"|"medium"|"low"|"all" (optional)
89
+ - `config.maxUpdatesPerRun`: Integer (optional, default 10)
90
+ - `config.updateStrategy`: "one-at-a-time"|"batch-compatible"|"all" (optional)
91
+
92
+ ### Step 5: Return Validation Result
93
+
94
+ Return detailed validation result with errors/warnings.
95
+
96
+ **Expected Output**:
97
+ ```json
98
+ {
99
+ "valid": true,
100
+ "file": ".bug-detection-plan.json",
101
+ "errors": [],
102
+ "warnings": [],
103
+ "schema": "bug-plan",
104
+ "schemaPath": ".claude/schemas/bug-plan.schema.json"
105
+ }
106
+ ```
107
+
108
+ ## Error Handling
109
+
110
+ - **File Not Found**: Return error with file path
111
+ - **Invalid JSON**: Return parsing error with line number if possible
112
+ - **Schema File Not Found**: Return error if schema file missing
113
+ - **Missing Required Fields**: List all missing fields from JSON schema validation
114
+ - **Invalid Field Types**: Describe type mismatches (e.g., expected string, got number)
115
+ - **Invalid Enum Values**: Report when value not in allowed enum list
116
+ - **Schema Mismatch**: Warn if file doesn't match expected schema pattern
117
+ - **Validation Array Errors**: Report missing or invalid validation criteria
118
+
119
+ ## Examples
120
+
121
+ ### Example 1: Valid Bug Detection Plan
122
+
123
+ **Input**:
124
+ ```
125
+ file_path: .bug-detection-plan.json
126
+ ```
127
+
128
+ **Content**:
129
+ ```json
130
+ {
131
+ "workflow": "bug-management",
132
+ "phase": "detection",
133
+ "phaseNumber": 1,
134
+ "config": {
135
+ "priority": "all",
136
+ "categories": ["type-errors", "runtime-errors"],
137
+ "maxBugsPerRun": 50
138
+ },
139
+ "validation": {
140
+ "required": ["report-exists", "type-check"],
141
+ "optional": ["tests"]
142
+ },
143
+ "nextAgent": "bug-hunter",
144
+ "timestamp": "2025-10-18T14:00:00Z",
145
+ "metadata": {
146
+ "createdBy": "bug-orchestrator",
147
+ "iteration": 1,
148
+ "maxIterations": 3
149
+ }
150
+ }
151
+ ```
152
+
153
+ **Output**:
154
+ ```json
155
+ {
156
+ "valid": true,
157
+ "file": ".bug-detection-plan.json",
158
+ "errors": [],
159
+ "warnings": [],
160
+ "schema": "bug-plan",
161
+ "schemaPath": ".claude/schemas/bug-plan.schema.json"
162
+ }
163
+ ```
164
+
165
+ ### Example 2: Missing Required Field
166
+
167
+ **Input**:
168
+ ```
169
+ file_path: .security-scan-plan.json
170
+ ```
171
+
172
+ **Content**:
173
+ ```json
174
+ {
175
+ "workflow": "security-audit",
176
+ "phase": "scan",
177
+ "config": {
178
+ "categories": ["sql-injection"]
179
+ },
180
+ "validation": {
181
+ "required": ["report-exists"]
182
+ }
183
+ }
184
+ ```
185
+
186
+ **Output**:
187
+ ```json
188
+ {
189
+ "valid": false,
190
+ "file": ".security-scan-plan.json",
191
+ "errors": [
192
+ "Missing required property: config.severity",
193
+ "Schema validation failed at /config/severity: required property missing"
194
+ ],
195
+ "warnings": [],
196
+ "schema": "security-plan",
197
+ "schemaPath": ".claude/schemas/security-plan.schema.json"
198
+ }
199
+ ```
200
+
201
+ ### Example 3: Invalid Enum Value
202
+
203
+ **Input**:
204
+ ```
205
+ file_path: .dependency-audit-plan.json
206
+ ```
207
+
208
+ **Content**:
209
+ ```json
210
+ {
211
+ "workflow": "dependency-management",
212
+ "phase": "audit",
213
+ "config": {
214
+ "category": "deprecated",
215
+ "severity": "critical"
216
+ },
217
+ "validation": {
218
+ "required": ["report-exists", "lockfile-valid"]
219
+ },
220
+ "nextAgent": "dependency-auditor"
221
+ }
222
+ ```
223
+
224
+ **Output**:
225
+ ```json
226
+ {
227
+ "valid": false,
228
+ "file": ".dependency-audit-plan.json",
229
+ "errors": [
230
+ "Invalid enum value at /config/category: 'deprecated' not in allowed values ['security', 'unused', 'outdated', 'all']"
231
+ ],
232
+ "warnings": [],
233
+ "schema": "dependency-plan",
234
+ "schemaPath": ".claude/schemas/dependency-plan.schema.json"
235
+ }
236
+ ```
237
+
238
+ ### Example 4: Workflow/Phase Mismatch
239
+
240
+ **Input**:
241
+ ```
242
+ file_path: .bug-fixing-plan.json
243
+ ```
244
+
245
+ **Content**:
246
+ ```json
247
+ {
248
+ "workflow": "security-audit",
249
+ "phase": "fixing",
250
+ "config": {
251
+ "priority": "critical"
252
+ },
253
+ "validation": {
254
+ "required": ["type-check"]
255
+ }
256
+ }
257
+ ```
258
+
259
+ **Output**:
260
+ ```json
261
+ {
262
+ "valid": false,
263
+ "file": ".bug-fixing-plan.json",
264
+ "errors": [
265
+ "Schema mismatch: file pattern suggests 'bug-plan' schema but workflow field is 'security-audit'",
266
+ "Invalid enum value at /phase: 'fixing' not in allowed values ['detection', 'fixing', 'verification'] for bug-plan"
267
+ ],
268
+ "warnings": [
269
+ "Consider renaming file to match workflow: .security-remediation-plan.json"
270
+ ],
271
+ "schema": "bug-plan",
272
+ "schemaPath": ".claude/schemas/bug-plan.schema.json"
273
+ }
274
+ ```
275
+
276
+ ## Validation
277
+
278
+ - [ ] Validates all required fields present
279
+ - [ ] Checks field types correctly (string, number, boolean, array, object)
280
+ - [ ] Validates enum values against allowed lists
281
+ - [ ] Identifies schema based on file name pattern
282
+ - [ ] Returns clear error messages with JSON paths
283
+ - [ ] Handles malformed JSON gracefully
284
+ - [ ] Validates domain-specific fields (priority, severity, category)
285
+ - [ ] Checks workflow/phase consistency
286
+ - [ ] Validates validation criteria arrays (required/optional)
287
+ - [ ] Handles schema file loading errors
288
+
289
+ ## Supporting Files
290
+
291
+ Located in `.claude/schemas/`:
292
+ - `base-plan.schema.json`: Base schema for all plan files
293
+ - `bug-plan.schema.json`: Bug management workflow schema
294
+ - `security-plan.schema.json`: Security audit workflow schema
295
+ - `dead-code-plan.schema.json`: Dead code cleanup workflow schema
296
+ - `dependency-plan.schema.json`: Dependency management workflow schema
297
+
298
+ ## Integration with Orchestrators
299
+
300
+ All orchestrators should use this Skill after creating plan files:
301
+
302
+ ```markdown
303
+ ## Step 3: Create Plan File
304
+
305
+ 1. Write plan to `.{domain}-{phase}-plan.json`
306
+ 2. Use validate-plan-file Skill to verify:
307
+ - Input: file_path = ".{domain}-{phase}-plan.json"
308
+ - Check result.valid === true
309
+ - If errors exist, fix plan file and retry
310
+ 3. Only signal readiness after validation passes
311
+ ```
312
+
313
+ ## Notes
314
+
315
+ **JSON Schema Validation**: This Skill performs full JSON Schema Draft-07 validation including:
316
+ - Type checking (string, number, boolean, array, object)
317
+ - Required properties
318
+ - Enum constraints
319
+ - Pattern matching
320
+ - Nested object validation (allOf, $ref)
321
+ - Array item validation
322
+
323
+ **File Naming Convention**: Plan files must follow pattern `.{domain}-{phase}-plan.json` where:
324
+ - `{domain}`: bug|security|dead-code|dependency
325
+ - `{phase}`: detection|fixing|verification (bugs), scan|remediation|verification (security), etc.
326
+
327
+ **Schema References**: Uses JSON Schema `$ref` for base schema inheritance. All domain schemas extend `base-plan.schema.json`.
@@ -0,0 +1,35 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Plan File Base Schema",
4
+ "type": "object",
5
+ "required": ["phase", "config"],
6
+ "properties": {
7
+ "phase": {
8
+ "type": "number",
9
+ "minimum": 0
10
+ },
11
+ "config": {
12
+ "type": "object"
13
+ },
14
+ "validation": {
15
+ "type": "object",
16
+ "properties": {
17
+ "required": {
18
+ "type": "array",
19
+ "items": { "type": "string" }
20
+ },
21
+ "optional": {
22
+ "type": "array",
23
+ "items": { "type": "string" }
24
+ }
25
+ }
26
+ },
27
+ "nextAgent": {
28
+ "type": "string"
29
+ },
30
+ "metadata": {
31
+ "type": "object"
32
+ }
33
+ },
34
+ "additionalProperties": true
35
+ }
@@ -0,0 +1,256 @@
1
+ ---
2
+ name: validate-report-file
3
+ description: Validate that worker-generated reports have all required sections and proper formatting. Use in quality gates, for report completeness checking, or when debugging missing report sections.
4
+ allowed-tools: Read
5
+ ---
6
+
7
+ # Validate Report File
8
+
9
+ Validate agent-generated report files for completeness and proper structure.
10
+
11
+ ## When to Use
12
+
13
+ - Quality gate validation after worker completion
14
+ - Debugging missing report sections
15
+ - Ensuring report consistency
16
+ - Pre-submission validation
17
+
18
+ ## Instructions
19
+
20
+ ### Step 1: Read Report File
21
+
22
+ Use Read tool to load report file.
23
+
24
+ **Expected Input**:
25
+ - `file_path`: Path to report file (e.g., `bug-hunting-report.md`)
26
+
27
+ **Tools Used**: Read
28
+
29
+ ### Step 2: Check Required Sections
30
+
31
+ Verify all required sections are present.
32
+
33
+ **Required Sections**:
34
+ 1. **Header** with metadata:
35
+ - Title (# Report Type Report: Version)
36
+ - Generated timestamp
37
+ - Status indicator (✅/⚠️/❌)
38
+ - Version identifier
39
+
40
+ 2. **Executive Summary**:
41
+ - ## Executive Summary heading
42
+ - Key metrics and findings
43
+
44
+ 3. **Detailed Findings**:
45
+ - Varies by report type
46
+ - Must have at least one detail section
47
+
48
+ 4. **Validation Results**:
49
+ - ## Validation Results heading
50
+ - Build/type-check status
51
+ - Overall validation status
52
+
53
+ 5. **Next Steps**:
54
+ - ## Next Steps heading
55
+ - Action items or recommendations
56
+
57
+ ### Step 3: Validate Format
58
+
59
+ Check formatting and structure.
60
+
61
+ **Format Rules**:
62
+ - Title must be H1 (single #)
63
+ - Section headers must be H2 (##)
64
+ - Status must include emoji (✅/⚠️/❌)
65
+ - Code blocks must use proper markdown
66
+ - Lists must be properly formatted
67
+
68
+ ### Step 4: Check Status Consistency
69
+
70
+ Verify status indicators are consistent.
71
+
72
+ **Consistency Checks**:
73
+ - Header status matches validation status
74
+ - If status is "failed", validation should show failures
75
+ - If status is "success", validation should show passes
76
+
77
+ ### Step 5: Return Validation Result
78
+
79
+ Return detailed validation result.
80
+
81
+ **Expected Output**:
82
+ ```json
83
+ {
84
+ "valid": true,
85
+ "file": "bug-hunting-report.md",
86
+ "sections": {
87
+ "header": true,
88
+ "executiveSummary": true,
89
+ "detailedFindings": true,
90
+ "validationResults": true,
91
+ "nextSteps": true
92
+ },
93
+ "warnings": [],
94
+ "errors": []
95
+ }
96
+ ```
97
+
98
+ ## Error Handling
99
+
100
+ - **File Not Found**: Return error with file path
101
+ - **Missing Sections**: List all missing required sections
102
+ - **Invalid Format**: Describe format issues
103
+ - **Inconsistent Status**: Warn about status mismatches
104
+
105
+ ## Examples
106
+
107
+ ### Example 1: Valid Report
108
+
109
+ **Input**:
110
+ ```
111
+ file_path: bug-hunting-report.md
112
+ ```
113
+
114
+ **File Content**:
115
+ ```markdown
116
+ # Bug Hunting Report: 2025-10-17
117
+
118
+ **Generated**: 2025-10-17 14:30:00 UTC
119
+ **Status**: ✅ success
120
+
121
+ ---
122
+
123
+ ## Executive Summary
124
+
125
+ Found 23 bugs across 147 files.
126
+
127
+ ## Detailed Findings
128
+
129
+ ### Critical (3)
130
+ - Bug 1
131
+ - Bug 2
132
+ - Bug 3
133
+
134
+ ## Validation Results
135
+
136
+ - Type-check: ✅ PASSED
137
+ - Build: ✅ PASSED
138
+
139
+ **Overall**: ✅ PASSED
140
+
141
+ ## Next Steps
142
+
143
+ 1. Review critical bugs
144
+ 2. Schedule fixes
145
+ ```
146
+
147
+ **Output**:
148
+ ```json
149
+ {
150
+ "valid": true,
151
+ "file": "bug-hunting-report.md",
152
+ "sections": {
153
+ "header": true,
154
+ "executiveSummary": true,
155
+ "detailedFindings": true,
156
+ "validationResults": true,
157
+ "nextSteps": true
158
+ },
159
+ "warnings": [],
160
+ "errors": []
161
+ }
162
+ ```
163
+
164
+ ### Example 2: Missing Sections
165
+
166
+ **Input**:
167
+ ```
168
+ file_path: incomplete-report.md
169
+ ```
170
+
171
+ **File Content**:
172
+ ```markdown
173
+ # Bug Report
174
+
175
+ Some bugs found.
176
+ ```
177
+
178
+ **Output**:
179
+ ```json
180
+ {
181
+ "valid": false,
182
+ "file": "incomplete-report.md",
183
+ "sections": {
184
+ "header": false,
185
+ "executiveSummary": false,
186
+ "detailedFindings": false,
187
+ "validationResults": false,
188
+ "nextSteps": false
189
+ },
190
+ "warnings": [],
191
+ "errors": [
192
+ "Missing header metadata (Generated, Status, Version)",
193
+ "Missing section: Executive Summary",
194
+ "Missing section: Detailed Findings",
195
+ "Missing section: Validation Results",
196
+ "Missing section: Next Steps"
197
+ ]
198
+ }
199
+ ```
200
+
201
+ ### Example 3: Inconsistent Status
202
+
203
+ **Input**:
204
+ ```
205
+ file_path: inconsistent-report.md
206
+ ```
207
+
208
+ **File Content**:
209
+ ```markdown
210
+ # Bug Report: 2025-10-17
211
+
212
+ **Status**: ✅ success
213
+
214
+ ## Executive Summary
215
+
216
+ Failed to scan files.
217
+
218
+ ## Validation Results
219
+
220
+ **Overall**: ❌ FAILED
221
+ ```
222
+
223
+ **Output**:
224
+ ```json
225
+ {
226
+ "valid": false,
227
+ "file": "inconsistent-report.md",
228
+ "sections": {
229
+ "header": true,
230
+ "executiveSummary": true,
231
+ "detailedFindings": false,
232
+ "validationResults": true,
233
+ "nextSteps": false
234
+ },
235
+ "warnings": [
236
+ "Status inconsistency: Header shows success (✅) but validation shows failed (❌)"
237
+ ],
238
+ "errors": [
239
+ "Missing section: Detailed Findings",
240
+ "Missing section: Next Steps"
241
+ ]
242
+ }
243
+ ```
244
+
245
+ ## Validation
246
+
247
+ - [ ] Checks all required sections present
248
+ - [ ] Validates header metadata
249
+ - [ ] Verifies status consistency
250
+ - [ ] Detects format issues
251
+ - [ ] Returns clear error messages
252
+ - [ ] Handles missing files gracefully
253
+
254
+ ## Supporting Files
255
+
256
+ - `schema.json`: Report structure schema (see Supporting Files section)
@@ -0,0 +1,67 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Report File Schema",
4
+ "type": "object",
5
+ "required": ["header", "executiveSummary", "validationResults", "nextSteps"],
6
+ "properties": {
7
+ "header": {
8
+ "type": "object",
9
+ "required": ["title", "generated", "status", "version"],
10
+ "properties": {
11
+ "title": {
12
+ "type": "string",
13
+ "pattern": "^# .+ Report: .+"
14
+ },
15
+ "generated": {
16
+ "type": "string"
17
+ },
18
+ "status": {
19
+ "type": "string",
20
+ "enum": ["✅ success", "⚠️ partial", "❌ failed", "🔄 in_progress"]
21
+ },
22
+ "version": {
23
+ "type": "string"
24
+ }
25
+ }
26
+ },
27
+ "executiveSummary": {
28
+ "type": "object",
29
+ "required": ["heading", "content"],
30
+ "properties": {
31
+ "heading": {
32
+ "const": "## Executive Summary"
33
+ },
34
+ "content": {
35
+ "type": "string",
36
+ "minLength": 10
37
+ }
38
+ }
39
+ },
40
+ "validationResults": {
41
+ "type": "object",
42
+ "required": ["heading", "overall"],
43
+ "properties": {
44
+ "heading": {
45
+ "const": "## Validation Results"
46
+ },
47
+ "overall": {
48
+ "type": "string",
49
+ "enum": ["✅ PASSED", "⚠️ PARTIAL", "❌ FAILED"]
50
+ }
51
+ }
52
+ },
53
+ "nextSteps": {
54
+ "type": "object",
55
+ "required": ["heading", "items"],
56
+ "properties": {
57
+ "heading": {
58
+ "const": "## Next Steps"
59
+ },
60
+ "items": {
61
+ "type": "array",
62
+ "minItems": 1
63
+ }
64
+ }
65
+ }
66
+ }
67
+ }