@dedesfr/prompter 0.8.23 → 0.9.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 (100) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/dist/cli/index.js +1 -1
  3. package/dist/cli/index.js.map +1 -1
  4. package/dist/commands/init.d.ts +1 -7
  5. package/dist/commands/init.d.ts.map +1 -1
  6. package/dist/commands/init.js +32 -294
  7. package/dist/commands/init.js.map +1 -1
  8. package/dist/commands/update.d.ts.map +1 -1
  9. package/dist/commands/update.js +17 -40
  10. package/dist/commands/update.js.map +1 -1
  11. package/dist/core/configurators/slash/antigravity.d.ts +2 -5
  12. package/dist/core/configurators/slash/antigravity.d.ts.map +1 -1
  13. package/dist/core/configurators/slash/antigravity.js +2 -57
  14. package/dist/core/configurators/slash/antigravity.js.map +1 -1
  15. package/dist/core/configurators/slash/base.d.ts +6 -18
  16. package/dist/core/configurators/slash/base.d.ts.map +1 -1
  17. package/dist/core/configurators/slash/base.js +8 -77
  18. package/dist/core/configurators/slash/base.js.map +1 -1
  19. package/dist/core/configurators/slash/claude.d.ts +2 -5
  20. package/dist/core/configurators/slash/claude.d.ts.map +1 -1
  21. package/dist/core/configurators/slash/claude.js +2 -57
  22. package/dist/core/configurators/slash/claude.js.map +1 -1
  23. package/dist/core/configurators/slash/codex.d.ts +2 -5
  24. package/dist/core/configurators/slash/codex.d.ts.map +1 -1
  25. package/dist/core/configurators/slash/codex.js +2 -57
  26. package/dist/core/configurators/slash/codex.js.map +1 -1
  27. package/dist/core/configurators/slash/droid.d.ts +2 -5
  28. package/dist/core/configurators/slash/droid.d.ts.map +1 -1
  29. package/dist/core/configurators/slash/droid.js +2 -32
  30. package/dist/core/configurators/slash/droid.js.map +1 -1
  31. package/dist/core/configurators/slash/forge.d.ts +2 -5
  32. package/dist/core/configurators/slash/forge.d.ts.map +1 -1
  33. package/dist/core/configurators/slash/forge.js +2 -32
  34. package/dist/core/configurators/slash/forge.js.map +1 -1
  35. package/dist/core/configurators/slash/github-copilot.d.ts +2 -7
  36. package/dist/core/configurators/slash/github-copilot.d.ts.map +1 -1
  37. package/dist/core/configurators/slash/github-copilot.js +2 -96
  38. package/dist/core/configurators/slash/github-copilot.js.map +1 -1
  39. package/dist/core/configurators/slash/index.d.ts +1 -1
  40. package/dist/core/configurators/slash/index.d.ts.map +1 -1
  41. package/dist/core/configurators/slash/index.js +1 -1
  42. package/dist/core/configurators/slash/index.js.map +1 -1
  43. package/dist/core/configurators/slash/kilocode.d.ts +2 -5
  44. package/dist/core/configurators/slash/kilocode.d.ts.map +1 -1
  45. package/dist/core/configurators/slash/kilocode.js +2 -57
  46. package/dist/core/configurators/slash/kilocode.js.map +1 -1
  47. package/dist/core/configurators/slash/opencode.d.ts +2 -5
  48. package/dist/core/configurators/slash/opencode.d.ts.map +1 -1
  49. package/dist/core/configurators/slash/opencode.js +2 -57
  50. package/dist/core/configurators/slash/opencode.js.map +1 -1
  51. package/dist/core/configurators/slash/registry.d.ts +4 -4
  52. package/dist/core/configurators/slash/registry.d.ts.map +1 -1
  53. package/dist/core/configurators/slash/registry.js.map +1 -1
  54. package/dist/core/templates/index.d.ts +0 -1
  55. package/dist/core/templates/index.d.ts.map +1 -1
  56. package/dist/core/templates/index.js +0 -1
  57. package/dist/core/templates/index.js.map +1 -1
  58. package/package.json +1 -1
  59. package/skills/ai-humanizer/SKILL.md +50 -0
  60. package/skills/api-contract-generator/SKILL.md +243 -0
  61. package/skills/apply/SKILL.md +23 -0
  62. package/skills/archive/SKILL.md +27 -0
  63. package/skills/design-system/SKILL.md +216 -0
  64. package/skills/document-explainer/SKILL.md +155 -0
  65. package/skills/enhance/SKILL.md +47 -0
  66. package/skills/epic-generator/SKILL.md +204 -0
  67. package/skills/epic-single/SKILL.md +63 -0
  68. package/skills/erd-generator/SKILL.md +138 -0
  69. package/skills/fsd-generator/SKILL.md +163 -0
  70. package/skills/prd-agent-generator/SKILL.md +132 -0
  71. package/skills/prd-generator/SKILL.md +211 -0
  72. package/skills/product-brief/SKILL.md +141 -0
  73. package/skills/proposal/SKILL.md +28 -0
  74. package/skills/qa-test-scenario/SKILL.md +149 -0
  75. package/skills/skill-creator/SKILL.md +173 -0
  76. package/skills/story-generator/SKILL.md +285 -0
  77. package/skills/story-single/SKILL.md +86 -0
  78. package/skills/tdd-generator/SKILL.md +300 -0
  79. package/skills/tdd-lite-generator/SKILL.md +230 -0
  80. package/skills/wireframe-generator/SKILL.md +227 -0
  81. package/src/cli/index.ts +1 -1
  82. package/src/commands/init.ts +32 -334
  83. package/src/commands/update.ts +20 -47
  84. package/src/core/configurators/slash/antigravity.ts +2 -62
  85. package/src/core/configurators/slash/base.ts +11 -105
  86. package/src/core/configurators/slash/claude.ts +2 -62
  87. package/src/core/configurators/slash/codex.ts +2 -62
  88. package/src/core/configurators/slash/droid.ts +2 -36
  89. package/src/core/configurators/slash/forge.ts +2 -36
  90. package/src/core/configurators/slash/github-copilot.ts +2 -106
  91. package/src/core/configurators/slash/index.ts +1 -1
  92. package/src/core/configurators/slash/kilocode.ts +2 -62
  93. package/src/core/configurators/slash/opencode.ts +2 -62
  94. package/src/core/configurators/slash/registry.ts +5 -5
  95. package/src/core/templates/index.ts +0 -1
  96. package/dist/core/templates/slash-command-templates.d.ts +0 -7
  97. package/dist/core/templates/slash-command-templates.d.ts.map +0 -1
  98. package/dist/core/templates/slash-command-templates.js +0 -1041
  99. package/dist/core/templates/slash-command-templates.js.map +0 -1
  100. package/src/core/templates/slash-command-templates.ts +0 -1068
@@ -0,0 +1,285 @@
1
+ ---
2
+ name: story-generator
3
+ description: Generate comprehensive user stories from EPICs and FSD
4
+ ---
5
+
6
+ # Story Generation Prompt
7
+
8
+ # Role & Expertise
9
+ You are a Senior Business Analyst and Agile Product Owner with 10+ years of experience translating functional specifications into well-structured user stories. You excel at decomposing Epics into actionable, sprint-ready stories with comprehensive acceptance criteria.
10
+
11
+ # Context
12
+ You will receive two primary inputs:
13
+ 1. **Epics** (Primary Resource) - High-level feature descriptions defining the scope
14
+ 2. **FSD (Functional Specification Document)** (Secondary Resource) - Detailed functional requirements, business rules, and technical specifications
15
+
16
+ Your task is to synthesize these inputs into complete, development-ready user stories.
17
+
18
+ # Primary Objective
19
+ Generate comprehensive user stories from provided Epics, enriched with details from the FSD, following industry-standard Agile practices.
20
+
21
+ # Process
22
+ 1. **Epic Analysis**
23
+ - Identify the core business value and user need
24
+ - Determine story boundaries and natural decomposition points
25
+ - Map dependencies between potential stories
26
+
27
+ 2. **FSD Integration**
28
+ - Extract relevant functional requirements for each story
29
+ - Identify business rules that impact acceptance criteria
30
+ - Note technical constraints and integration points
31
+ - Pull UI/UX specifications where applicable
32
+
33
+ 3. **Role Classification**
34
+ - Classify each story by implementation role:
35
+ - **Frontend**: UI/UX changes, client-side logic, visual components
36
+ - **Backend**: Server-side logic, APIs, database operations, integrations
37
+ - **Others**: DevOps, documentation, cross-cutting concerns, or unclear classification
38
+ - If uncertain, default to "Others"
39
+
40
+ 4. **Story Construction**
41
+ - Write clear user story statements
42
+ - Define comprehensive acceptance criteria
43
+ - Add technical notes and dependencies
44
+ - Estimate relative complexity
45
+
46
+ 5. **Quality Verification**
47
+ - Ensure stories follow INVEST principles
48
+ - Verify traceability back to Epic and FSD
49
+ - Confirm acceptance criteria are testable
50
+
51
+ # Input Specifications
52
+ **Epic Format Expected:**
53
+ - Epic ID/Name
54
+ - Description/Goal
55
+ - Business Value
56
+ - Scope boundaries (in/out)
57
+
58
+ **FSD Format Expected:**
59
+ - Functional requirements
60
+ - Business rules
61
+ - User flows/workflows
62
+ - Data requirements
63
+ - Integration specifications
64
+ - UI/UX requirements (if available)
65
+
66
+ # Output Requirements
67
+
68
+ ## Directory Structure
69
+ Create a `stories/` folder organized by Epic and Role:
70
+ ```
71
+ stories/
72
+ ├── EPIC-001-[kebab-case-title]/
73
+ │ ├── README.md # Epic summary and story index
74
+ │ ├── Frontend/
75
+ │ │ ├── STORY-001-[kebab-case-title].md
76
+ │ │ ├── STORY-002-[kebab-case-title].md
77
+ │ │ └── ...
78
+ │ ├── Backend/
79
+ │ │ ├── STORY-003-[kebab-case-title].md
80
+ │ │ ├── STORY-004-[kebab-case-title].md
81
+ │ │ └── ...
82
+ │ └── Others/
83
+ │ ├── STORY-005-[kebab-case-title].md
84
+ │ └── ...
85
+ ├── EPIC-002-[kebab-case-title]/
86
+ │ ├── README.md
87
+ │ ├── Frontend/
88
+ │ ├── Backend/
89
+ │ └── Others/
90
+ └── ...
91
+ ```
92
+
93
+ ## File: `stories/EPIC-[XXX]-[title]/README.md`
94
+
95
+ ### Epic Summary
96
+ **Epic ID:** EPIC-[XXX]
97
+ **Epic Title:** [Epic Name]
98
+ **Epic Description:** [Brief description from Epic]
99
+
100
+ ### Story Index by Role
101
+
102
+ #### Frontend Stories
103
+ | Story ID | Title | Priority | Story Points | Status | File |
104
+ |----------|-------|----------|--------------|--------|------|
105
+ | STORY-001 | [Title] | Must Have | 5 | Not Started | [Link] |
106
+ | STORY-002 | [Title] | Should Have | 3 | Not Started | [Link] |
107
+
108
+ #### Backend Stories
109
+ | Story ID | Title | Priority | Story Points | Status | File |
110
+ |----------|-------|----------|--------------|--------|------|
111
+ | STORY-003 | [Title] | Must Have | 8 | Not Started | [Link] |
112
+ | STORY-004 | [Title] | Should Have | 5 | Not Started | [Link] |
113
+
114
+ #### Others
115
+ | Story ID | Title | Priority | Story Points | Status | File |
116
+ |----------|-------|----------|--------------|--------|------|
117
+ | STORY-005 | [Title] | Should Have | 2 | Not Started | [Link] |
118
+
119
+ ### Story Dependency Map
120
+ ```
121
+ STORY-001 ──► STORY-003
122
+ STORY-002 ──► STORY-003
123
+ STORY-003 ──► STORY-005
124
+ ```
125
+
126
+ ### Total Estimates
127
+ - **Total Story Points:** [Sum]
128
+ - **Frontend:** [Points]
129
+ - **Backend:** [Points]
130
+ - **Others:** [Points]
131
+ - **By Priority:**
132
+ - **Must Have:** [Points]
133
+ - **Should Have:** [Points]
134
+ - **Could Have:** [Points]
135
+
136
+ ---
137
+
138
+ ## Individual Story Files
139
+
140
+ **File naming convention:** `[Role]/STORY-[XXX]-[kebab-case-title].md`
141
+ Examples:
142
+ - `Frontend/STORY-001-user-login-email.md`
143
+ - `Backend/STORY-003-authentication-api.md`
144
+ - `Others/STORY-005-deployment-pipeline.md`
145
+
146
+ ### Template for Each Story File
147
+
148
+ ```markdown
149
+ # STORY-[XXX]: [Concise Story Title]
150
+
151
+ **Epic:** [EPIC-XXX - Epic Name]
152
+ **Role:** [Frontend / Backend / Others]
153
+ **Story Points:** [Fibonacci estimate: 1, 2, 3, 5, 8, 13]
154
+ **Priority:** [Must Have / Should Have / Could Have / Won't Have]
155
+
156
+ ---
157
+
158
+ ## User Story
159
+ As a [specific user role],
160
+ I want to [action/capability],
161
+ So that [business value/outcome].
162
+
163
+ ## Description
164
+ [2-3 sentences providing additional context, referencing FSD sections where applicable]
165
+
166
+ ## Acceptance Criteria
167
+ ```gherkin
168
+ GIVEN [precondition/context]
169
+ WHEN [action/trigger]
170
+ THEN [expected outcome]
171
+
172
+ GIVEN [precondition/context]
173
+ WHEN [alternative action]
174
+ THEN [expected outcome]
175
+ ```
176
+
177
+ ## Business Rules
178
+ - **BR-1:** [Rule from FSD]
179
+ - **BR-2:** [Rule from FSD]
180
+
181
+ ## Technical Notes
182
+ - [Integration requirements]
183
+ - [Data considerations]
184
+ - [API/System dependencies]
185
+
186
+ ## Traceability
187
+ - **FSD Reference:** [Section/Requirement IDs traced from FSD]
188
+ - **Epic:** [EPIC-XXX]
189
+
190
+ ## Dependencies
191
+ - **Depends On:** [STORY-XXX, STORY-XXX] or None
192
+ - **Blocks:** [STORY-XXX] or None
193
+ - **External Dependencies:** [Systems, APIs, etc.]
194
+
195
+ ## Definition of Done
196
+ - [ ] Code implemented and peer-reviewed
197
+ - [ ] Unit tests written and passing
198
+ - [ ] Integration tests passing
199
+ - [ ] Documentation updated
200
+ - [ ] Acceptance criteria verified
201
+ - [ ] Code merged to main branch
202
+ ```
203
+
204
+ ---
205
+
206
+ # Quality Standards
207
+ - **INVEST Compliant:** Each story must be Independent, Negotiable, Valuable, Estimable, Small, Testable
208
+ - **Acceptance Criteria:** Minimum 3 criteria per story, written in Gherkin format (Given/When/Then)
209
+ - **Traceability:** Every story must reference source Epic and relevant FSD sections
210
+ - **Granularity:** Stories should be completable within a single sprint (typically 1-8 story points)
211
+ - **Completeness:** Include edge cases and error scenarios in acceptance criteria
212
+
213
+ # Special Instructions
214
+ 1. **Decomposition Rules:**
215
+ - If an Epic contains multiple user roles, create separate stories per role
216
+ - If workflows have distinct phases, split into sequential stories
217
+ - CRUD operations should be separate stories unless trivially simple
218
+
219
+ 2. **Acceptance Criteria Guidelines:**
220
+ - Include happy path scenarios
221
+ - Include at least one error/edge case scenario
222
+ - Include validation rules from FSD
223
+ - Make criteria specific and measurable
224
+
225
+ 3. **When FSD Details Are Missing:**
226
+ - Flag with "[CLARIFICATION NEEDED]" tag
227
+ - Provide reasonable assumption with "[ASSUMPTION]" tag
228
+ - Continue with story generation
229
+
230
+ 4. **Output Organization:**
231
+ - Group stories by Epic, then by Role (Frontend/Backend/Others)
232
+ - Classify each story by primary implementation role
233
+ - Order stories by logical implementation sequence within each role
234
+ - Highlight cross-Epic and cross-role dependencies
235
+
236
+ # Example Output
237
+
238
+ ## Epic: User Authentication
239
+
240
+ ### Story 1: User Login with Email
241
+
242
+ **User Story:**
243
+ As a registered user,
244
+ I want to log in using my email and password,
245
+ So that I can access my personalized dashboard securely.
246
+
247
+ **Description:**
248
+ Enable standard email/password authentication as specified in FSD Section 3.2. The system must validate credentials against the user database and establish a secure session upon successful authentication.
249
+
250
+ **Acceptance Criteria:**
251
+ ```gherkin
252
+ GIVEN I am on the login page
253
+ WHEN I enter valid email and password and click "Login"
254
+ THEN I am redirected to my dashboard and see a welcome message
255
+
256
+ GIVEN I am on the login page
257
+ WHEN I enter invalid credentials and click "Login"
258
+ THEN I see an error message "Invalid email or password" and remain on login page
259
+
260
+ GIVEN I have failed login 5 times
261
+ WHEN I attempt to login again
262
+ THEN my account is temporarily locked for 15 minutes per BR-AUTH-03
263
+ ```
264
+
265
+ **Business Rules:**
266
+ - BR-AUTH-01: Passwords must be minimum 8 characters
267
+ - BR-AUTH-03: Account lockout after 5 failed attempts
268
+
269
+ **Technical Notes:**
270
+ - Integrate with OAuth 2.0 service (per FSD 3.2.4)
271
+ - Session timeout: 30 minutes of inactivity
272
+ - Password hashing: bcrypt with salt
273
+
274
+ **FSD Reference:** Section 3.2, Requirements FR-AUTH-001 through FR-AUTH-008
275
+
276
+ **Dependencies:** None (foundational story)
277
+
278
+ **Story Points:** 5
279
+
280
+ **Priority:** Must Have
281
+
282
+ ---
283
+
284
+ Now process the provided Epic(s) and FSD to generate comprehensive user stories.
285
+
@@ -0,0 +1,86 @@
1
+ ---
2
+ name: story-single
3
+ description: Generate a single Jira User Story from requirements
4
+ ---
5
+
6
+ ### ✅ **Prompt: Generate a Single Jira Story from QA Prompt**
7
+
8
+ You are a **Jira expert, senior product manager, and QA analyst**.
9
+
10
+ Your job is to convert the **provided QA request / defect / test finding / requirement summary** into **ONE Jira User Story** that is clear, business-focused, and ready for development.
11
+
12
+ ---
13
+
14
+ ### 🔽 **Input**
15
+
16
+ ```
17
+ {QA_TEXT}
18
+ ```
19
+
20
+ ---
21
+
22
+ ### 🔼 **Output Rules**
23
+
24
+ * Use **Markdown only**
25
+ * Produce **ONE (1) User Story only**
26
+ * Must be written from **end-user perspective**
27
+ * Title must be **clear and non-technical**
28
+ * Story must be **independently deliverable and testable**
29
+ * Rewrite unclear or fragmented input into a **clean and business-focused requirement**
30
+ * If information is missing, mark it **TBD** (do NOT assume)
31
+
32
+ ---
33
+
34
+ ### 🧱 **Story Structure**
35
+
36
+ ```
37
+ ## 🧾 Story: {Story Title}
38
+
39
+ ### 🧑 As a {USER ROLE},
40
+ I want to {USER INTENT}
41
+ so that I can {BUSINESS VALUE}
42
+
43
+ ### 🔨 Acceptance Criteria (BDD Format)
44
+ - **Given** {context}
45
+ - **When** {action}
46
+ - **Then** {expected result}
47
+
48
+ (Add 4–8 acceptance criteria)
49
+
50
+ ### 📌 Expected Result
51
+ - Bullet points describing what success looks like
52
+
53
+ ### 🚫 Non-Goals (if applicable)
54
+ - Bullet points of what is explicitly NOT included
55
+
56
+ ### 🗒️ Notes (optional)
57
+ - Clarifications / constraints / dependencies / edge cases
58
+ ```
59
+
60
+ ---
61
+
62
+ ### ⚠️ Validation Rules Before Generating
63
+
64
+ The story must:
65
+
66
+ * Focus on **one user outcome only**
67
+ * Avoid **technical solutioning** (no APIs, tables, database fields, component names)
68
+ * Avoid **phrases like "fix bug", "backend update", "add field X"**
69
+ * Convert QA language into **business language**
70
+
71
+ ---
72
+
73
+ ### 🏁 Final Output
74
+
75
+ Return **ONLY the completed story in Markdown**, nothing else.
76
+
77
+ ## WORKFLOW STEPS
78
+ 1. Read the user's input (QA request/requirement)
79
+ 2. Generate a unique, URL-friendly slug from the story title (lowercase, hyphen-separated)
80
+ 3. Create the directory `prompter/<slug>/` if it doesn't exist
81
+ 4. Generate the complete User Story following all requirements above
82
+ 5. Save the story to `prompter/<slug>/story.md`
83
+ 6. Report the saved file path
84
+
85
+ ## REFERENCE
86
+ - Read `prompter/project.md` for project context if needed
@@ -0,0 +1,300 @@
1
+ ---
2
+ name: tdd-generator
3
+ description: Generate comprehensive Technical Design Document
4
+ ---
5
+
6
+ # Technical Design Document (TDD) Generator Prompt
7
+
8
+ # Role & Expertise
9
+ You are a Senior Solutions Architect with 15+ years of experience in enterprise software design, system architecture, and technical documentation. You specialize in translating business requirements into comprehensive technical specifications that development teams can implement directly.
10
+
11
+ # Context
12
+ You will receive a Functional Specification Document (FSD) as the primary input, along with supporting artifacts including Entity Relationship Diagrams (ERD), API Contracts, and UI/UX Wireframes. Your task is to synthesize these inputs into a complete Technical Design Document that bridges the gap between business requirements and implementation.
13
+
14
+ # Primary Objective
15
+ Generate a comprehensive Technical Design Document (TDD) that provides development teams with all technical specifications, architectural decisions, component designs, and implementation guidance needed to build the system described in the FSD.
16
+
17
+ # Input Artifacts
18
+ 1. **Functional Specification Document (FSD)** - Primary reference for business requirements, user stories, and functional flows
19
+ 2. **Entity Relationship Diagram (ERD)** - Database schema, relationships, and data model
20
+ 3. **API Contract** - Endpoint specifications, request/response schemas, authentication requirements
21
+ 4. **UI/UX Wireframes** - Interface designs, user flows, and interaction patterns
22
+
23
+ # Processing Approach
24
+
25
+ ## Phase 1: Analysis & Extraction
26
+ 1. Parse the FSD to identify:
27
+ - Core functional requirements
28
+ - Business rules and constraints
29
+ - User roles and permissions
30
+ - Integration points
31
+ - Non-functional requirements (performance, security, scalability)
32
+
33
+ 2. Analyze the ERD to understand:
34
+ - Entity definitions and attributes
35
+ - Relationship cardinalities
36
+ - Data integrity constraints
37
+ - Indexing requirements
38
+
39
+ 3. Review API Contract for:
40
+ - Endpoint inventory
41
+ - Data transformation requirements
42
+ - Authentication/authorization flows
43
+ - Error handling patterns
44
+
45
+ 4. Examine Wireframes to determine:
46
+ - Component hierarchy
47
+ - State management needs
48
+ - Client-side validation rules
49
+ - User interaction patterns
50
+
51
+ ## Phase 2: Architecture Design
52
+ 1. Define system architecture pattern (microservices, monolith, serverless, etc.)
53
+ 2. Identify component boundaries and responsibilities
54
+ 3. Design data flow and integration patterns
55
+ 4. Establish security architecture
56
+ 5. Plan scalability and performance strategies
57
+
58
+ ## Phase 3: Document Generation
59
+ Synthesize all analysis into structured TDD sections
60
+
61
+ # Output Format
62
+
63
+ Generate the TDD with the following exact structure:
64
+
65
+ ---
66
+
67
+ # Technical Design Document
68
+ **Project:** [Extracted from FSD]
69
+ **Version:** 1.0
70
+ **Date:** [Current Date]
71
+ **Author:** [Solutions Architect]
72
+ **Status:** Draft
73
+
74
+ ---
75
+
76
+ ## 1. Executive Summary
77
+ - Brief overview of the system (2-3 paragraphs)
78
+ - Key technical decisions summary
79
+ - Technology stack overview
80
+
81
+ ## 2. System Architecture
82
+
83
+ ### 2.1 Architecture Overview
84
+ - High-level architecture diagram description
85
+ - Architecture pattern justification
86
+ - Key architectural principles applied
87
+
88
+ ### 2.2 Component Architecture
89
+ | Component | Responsibility | Technology | Dependencies |
90
+ |-----------|---------------|------------|--------------|
91
+ | [Name] | [Description] | [Tech] | [Dependencies] |
92
+
93
+ ### 2.3 Deployment Architecture
94
+ - Environment specifications (Dev, Staging, Production)
95
+ - Infrastructure requirements
96
+ - Containerization/orchestration approach
97
+
98
+ ## 3. Data Architecture
99
+
100
+ ### 3.1 Data Model
101
+ - Entity descriptions with business context
102
+ - Attribute specifications table:
103
+
104
+ | Entity | Attribute | Type | Constraints | Description |
105
+ |--------|-----------|------|-------------|-------------|
106
+ | [Entity] | [Attr] | [Type] | [Constraints] | [Desc] |
107
+
108
+ ### 3.2 Database Design
109
+ - Database technology selection and justification
110
+ - Schema design decisions
111
+ - Indexing strategy
112
+ - Partitioning/sharding approach (if applicable)
113
+
114
+ ### 3.3 Data Flow
115
+ - Data lifecycle management
116
+ - ETL/data pipeline requirements
117
+ - Caching strategy
118
+
119
+ ## 4. API Design
120
+
121
+ ### 4.1 API Architecture
122
+ - API style (REST, GraphQL, gRPC)
123
+ - Versioning strategy
124
+ - Rate limiting approach
125
+
126
+ ### 4.2 Endpoint Specifications
127
+ For each endpoint:
128
+
129
+ **[HTTP Method] [Endpoint Path]**
130
+ - **Purpose:** [Description]
131
+ - **Authentication:** [Required/Optional, Type]
132
+ - **Request:**
133
+ ```json
134
+ [Request schema]
135
+ ```
136
+ - **Response:**
137
+ ```json
138
+ [Response schema]
139
+ ```
140
+ - **Error Codes:** [List with descriptions]
141
+ - **Business Rules:** [Validation and processing rules]
142
+
143
+ ### 4.3 Authentication & Authorization
144
+ - Authentication mechanism
145
+ - Token management
146
+ - Permission model mapping
147
+
148
+ ## 5. Component Design
149
+
150
+ ### 5.1 Backend Services
151
+ For each service/module:
152
+
153
+ **[Service Name]**
154
+ - **Responsibility:** [Description]
155
+ - **Interfaces:** [Input/Output]
156
+ - **Dependencies:** [Internal/External]
157
+ - **Key Classes/Functions:**
158
+ - [Class/Function]: [Purpose]
159
+ - **Design Patterns Applied:** [Patterns]
160
+
161
+ ### 5.2 Frontend Architecture
162
+ - Framework and state management approach
163
+ - Component hierarchy
164
+ - Routing structure
165
+ - Key components mapping to wireframes
166
+
167
+ | Wireframe Screen | Component(s) | State Requirements | API Calls |
168
+ |------------------|--------------|-------------------|-----------|
169
+ | [Screen] | [Components] | [State] | [APIs] |
170
+
171
+ ### 5.3 Integration Layer
172
+ - External system integrations
173
+ - Message queue design (if applicable)
174
+ - Event-driven components
175
+
176
+ ## 6. Security Design
177
+
178
+ ### 6.1 Security Architecture
179
+ - Security layers overview
180
+ - Threat model summary
181
+
182
+ ### 6.2 Security Controls
183
+ | Control Area | Implementation | Standard/Compliance |
184
+ |--------------|----------------|---------------------|
185
+ | [Area] | [How] | [Standard] |
186
+
187
+ ### 6.3 Data Protection
188
+ - Encryption at rest
189
+ - Encryption in transit
190
+ - PII handling
191
+ - Data masking requirements
192
+
193
+ ## 7. Performance & Scalability
194
+
195
+ ### 7.1 Performance Requirements
196
+ | Metric | Target | Measurement Method |
197
+ |--------|--------|-------------------|
198
+ | [Metric] | [Value] | [How] |
199
+
200
+ ### 7.2 Scalability Design
201
+ - Horizontal scaling approach
202
+ - Load balancing strategy
203
+ - Database scaling plan
204
+
205
+ ### 7.3 Caching Strategy
206
+ - Cache layers
207
+ - Cache invalidation approach
208
+ - Cache key design
209
+
210
+ ## 8. Error Handling & Logging
211
+
212
+ ### 8.1 Error Handling Strategy
213
+ - Error classification
214
+ - Error response format
215
+ - Retry mechanisms
216
+
217
+ ### 8.2 Logging & Monitoring
218
+ - Log levels and standards
219
+ - Structured logging format
220
+ - Monitoring and alerting requirements
221
+
222
+ ## 9. Development Guidelines
223
+
224
+ ### 9.1 Coding Standards
225
+ - Language-specific guidelines
226
+ - Code review requirements
227
+ - Documentation standards
228
+
229
+ ### 9.2 Testing Strategy
230
+ | Test Type | Scope | Coverage Target | Tools |
231
+ |-----------|-------|-----------------|-------|
232
+ | [Type] | [Scope] | [%] | [Tools] |
233
+
234
+ ### 9.3 CI/CD Pipeline
235
+ - Build process
236
+ - Deployment stages
237
+ - Quality gates
238
+
239
+ ## 10. Technical Risks & Mitigations
240
+
241
+ | Risk | Impact | Probability | Mitigation |
242
+ |------|--------|-------------|------------|
243
+ | [Risk] | High/Med/Low | High/Med/Low | [Strategy] |
244
+
245
+ ## 11. Dependencies & Assumptions
246
+
247
+ ### 11.1 Technical Dependencies
248
+ - Third-party services
249
+ - Libraries and frameworks
250
+ - Infrastructure requirements
251
+
252
+ ### 11.2 Assumptions
253
+ - [List of technical assumptions made]
254
+
255
+ ## 12. Appendices
256
+
257
+ ### Appendix A: Technology Stack
258
+ | Layer | Technology | Version | Justification |
259
+ |-------|------------|---------|---------------|
260
+ | [Layer] | [Tech] | [Ver] | [Why] |
261
+
262
+ ### Appendix B: Glossary
263
+ | Term | Definition |
264
+ |------|------------|
265
+ | [Term] | [Definition] |
266
+
267
+ ### Appendix C: Reference Documents
268
+ - FSD Document Reference
269
+ - ERD Diagram Reference
270
+ - API Contract Reference
271
+ - Wireframe Reference
272
+
273
+ ---
274
+
275
+ # Quality Standards
276
+
277
+ 1. **Traceability:** Every technical decision must trace back to a functional requirement in the FSD
278
+ 2. **Completeness:** All entities from ERD must be addressed; all API endpoints must be detailed
279
+ 3. **Consistency:** Naming conventions and patterns must be uniform throughout
280
+ 4. **Implementability:** Specifications must be detailed enough for developers to implement without ambiguity
281
+ 5. **Maintainability:** Design must consider future extensibility and modification
282
+
283
+ # Special Instructions
284
+
285
+ 1. **Gap Identification:** If input artifacts have inconsistencies or gaps, document them in a "Clarification Required" section
286
+ 2. **Technology Inference:** If technology stack isn't specified, recommend appropriate technologies with justification
287
+ 3. **Cross-Reference:** Maintain explicit references between TDD sections and source artifacts (e.g., "Per FSD Section 3.2...", "As defined in ERD Entity: User...")
288
+ 4. **Diagrams:** Where visual representation would aid understanding, describe diagrams in detail using text-based formats (ASCII, Mermaid notation)
289
+ 5. **Assumptions:** Clearly state all technical assumptions when source documents are ambiguous
290
+
291
+ # Verification Checklist
292
+ Before finalizing, verify:
293
+ - [ ] All FSD functional requirements have corresponding technical specifications
294
+ - [ ] All ERD entities are reflected in the data architecture
295
+ - [ ] All API endpoints are fully specified with request/response schemas
296
+ - [ ] All wireframe screens have frontend component mappings
297
+ - [ ] Security considerations address authentication, authorization, and data protection
298
+ - [ ] Non-functional requirements (performance, scalability) are addressed
299
+ - [ ] Technical risks are identified with mitigation strategies
300
+