A rigorous, traceability-first system that generates five interconnected architectural documents (blueprint.md, requirements.md, design.md, tasks.md, and validation.md) with complete...
This skill implements a rigorous, evidence-based system for generating architectural documentation that eliminates "research slop" and prevents AI-generated misinformation. It produces five interconnected markdown documents where every technological decision is backed by verifiable sources and complete traceability from research through implementation tasks.
Core Principle: Every claim must be supported by evidence. No AI-generated "facts" without verification.
Use this skill when users request:
The quality of architectural specifications is directly proportional to the clarity of upfront goals and boundaries.
Clear Business Objectives
Specific Constraints and Boundaries
Scope Definition
Context and Background
"I need to architect a customer support ticket system for a mid-sized SaaS company.
The system must handle 10,000 tickets/month, integrate with our existing Salesforce CRM,
and comply with GDPR requirements. We need email integration, knowledge base search,
and reporting dashboards. Please do NOT include live chat or phone support features.
Our team specializes in Python/React and we need this deployed on AWS."
Why This Works:
Follow the five-phase process in sequence:
GOAL: To produce a technology proposal where every claim is supported by verifiable, browsed sources, thereby eliminating "research slop" and grounding the architecture in factual evidence.
CRITICAL: This phase prevents AI-generated misinformation that could lead to serious professional consequences. You MUST complete this phase with proper verification before proceeding.
WebSearch tool to gather a list of potential sources relevant to the user's request.WebFetch tool on the URLs returned by the search. You MUST NOT rely on search snippets alone. You must read the content of the pages to confirm the information.[cite:INDEX] citation corresponding to the browsed source. This creates an auditable trail from claim to evidence.Analyze User Request
Execute Research with Verification
WebSearch to find relevant sources for domain architecture patternsWebFetch to browse and verify each source's contentSynthesize Evidence-Based Recommendations
# Verifiable Research and Technology Proposal
## 1. Core Problem Analysis
[A brief, 1-2 sentence analysis of the user's request and the primary technical challenges.]
## 2. Verifiable Technology Recommendations
| Technology/Pattern | Rationale & Evidence |
|---|---|
| **[Technology Name]** | [Rationale derived from browsed sources, with every factual claim cited.] |
| **[Pattern Name]** | [Rationale derived from browsed sources, with every factual claim cited.] |
## 3. Browsed Sources
- [1] [URL of browsed source 1]
- [2] [URL of browsed source 2]
- [...]
Citation Requirements:
[cite:INDEX] citationExample of Proper Citation: "Node.js excels at real-time applications due to its event-driven, non-blocking I/O model [cite:1]. TypeScript adds static typing that reduces runtime errors by approximately 15% in large codebases [cite:2]."
Approval Gate: "Research complete. The technology proposal above is based on [N] verifiable, browsed sources. Every claim is cited and traceable to evidence. Proceed to define the architectural blueprint?"
PREREQUISITE: Approval of the technology stack GOAL: To establish a high-level map of the system, its components, interactions, and boundaries
CRITICAL SUCCESS FACTORS:
STRICT TEMPLATE:
# Architectural Blueprint
## 1. Core Objective
[Single paragraph defining the primary goal and what success looks like.]
## 2. System Scope and Boundaries
### In Scope
- [Specific feature 1 that WILL be built]
- [Specific capability 2 that WILL be implemented]
- [Integration 1 that WILL be supported]
### Out of Scope
- [Feature 1 that will NOT be built - prevents scope creep]
- [External system 1 that will NOT be integrated]
- [Technology 1 that will NOT be used]
## 3. Core System Components
| Component Name | Single Responsibility |
|---|---|
| **[ComponentName1]** | [One clear, focused responsibility - what this component DOES] |
| **[ComponentName2]** | [One clear, focused responsibility - what this component DOES] |
| **[ComponentName3]** | [One clear, focused responsibility - what this component DOES] |
## 4. High-Level Data Flow
```mermaid
graph TD
A[External Input/User] --> B[ComponentName1]
B --> C[ComponentName2]
C --> D[ComponentName3]
D --> E[External Output/Result]
%% Style components for clarity
style ComponentName1 fill:#e1f5fe
style ComponentName2 fill:#f3e5f5
style ComponentName3 fill:#e8f5e8
**Quality Gates**:
- Are component responsibilities clear and non-overlapping?
- Does the data flow diagram show the complete journey from input to output?
- Are all integration points clearly specified with protocols?
- Are in/out scope boundaries unambiguous?
**Approval Gate**: "Architectural blueprint complete with clear component mapping, data flow visualization, and integration points. The component names defined here will be used consistently across all documents. Proceed to generate requirements?"
### Phase 2: Requirements Generation (requirements.md)
**PREREQUISITE**: Approval of the blueprint
**RULE**: All `[System Component]` placeholders MUST use the exact component names from the blueprint
**STRICT TEMPLATE**:
```markdown
# Requirements Document
[Introduction and Glossary...]
## Requirements
### Requirement 1: [Feature Name]
#### Acceptance Criteria
1. WHEN [trigger], THE **[ComponentName1]** SHALL [specific, testable behavior].
Approval Gate: "Requirements documented with [N] requirements and [M] acceptance criteria, each assigned to a specific component. Proceed to detailed design?"
PREREQUISITE: Approval of requirements GOAL: To elaborate on the blueprint with detailed specifications for each component
STRICT TEMPLATE:
# Design Document
[Overview, Principles...]
## Component Specifications
#### Component: [ComponentName1]
**Purpose**: [Responsibility from blueprint]
**Location**: `path/to/component.py`
**Interface**: [Code block with methods and requirement references, e.g., `Implements Req 1.1`]
Approval Gate: "Detailed design complete. All components from the blueprint have been specified. Proceed to generate implementation tasks?"
PREREQUISITE: Approval of the design GOAL: To create a granular, actionable implementation plan
STRICT TEMPLATE:
# Implementation Plan
- [ ] 1. Implement the [ComponentName1]
- [ ] 1.1 [Specific action, e.g., "Create class in file.py"]
- [ ] 1.2 [Specific action, e.g., "Implement method_x()"]
- _Requirements: 1.1, 1.2, 2.3_
Approval Gate: "Implementation plan created with [N] tasks. Proceed to final validation?"
PREREQUISITE: Generation of all previous documents GOAL: To perform a final, automated check that guarantees complete traceability from requirements to implementation tasks
STRICT TEMPLATE:
# Validation Report
## 1. Requirements to Tasks Traceability Matrix
| Requirement | Acceptance Criterion | Implementing Task(s) | Status |
|---|---|---|---|
| 1. [Name] | 1.1 | Task 2, Task 5 | Covered |
| | 1.2 | Task 2, Task 3 | Covered |
| ... | ... | ... | ... |
| X. [Name] | X.Y | Task Z | Covered |
## 2. Coverage Analysis
### Summary
- **Total Acceptance Criteria**: [M]
- **Criteria Covered by Tasks**: [M]
- **Coverage Percentage**: 100%
### Detailed Status
- **Covered Criteria**: A list of all X.Y references that are successfully mapped to at least one task.
- **Missing Criteria**: A list of any X.Y references from `requirements.md` that were NOT found in any task's `_Requirements_` tag. **This list must be empty to pass validation.**
- **Invalid References**: A list of any task references (e.g., `_Requirements: 9.9_`) that do not correspond to a real acceptance criterion. **This list must be empty to pass validation.**
## 3. Final Validation
All [M] acceptance criteria are fully traced to implementation tasks. The plan is validated and ready for execution.
Final Approval Gate: "Validation complete. Traceability matrix confirms 100% coverage. Type 'execute' to begin implementation."
When conducting research in Phase 0:
WebSearch with specific queries about:The validation phase ensures:
scripts/traceability_validator.py - Python script for automated validationreferences/document_templates.md - Detailed templates and examplesassets/sample_outputs/ - Example of complete specification documentsEach phase must be completed and approved before proceeding to the next phase. The final validation confirms 100% traceability and coverage.