@dedesfr/prompter 0.6.0 → 0.6.1
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/CHANGELOG.md +34 -0
- package/dist/cli/index.js +50 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/api-contract-generator.d.ts +11 -0
- package/dist/commands/api-contract-generator.d.ts.map +1 -0
- package/dist/commands/api-contract-generator.js +97 -0
- package/dist/commands/api-contract-generator.js.map +1 -0
- package/dist/commands/erd-generator.d.ts +11 -0
- package/dist/commands/erd-generator.d.ts.map +1 -0
- package/dist/commands/erd-generator.js +97 -0
- package/dist/commands/erd-generator.js.map +1 -0
- package/dist/commands/fsd-generator.d.ts +11 -0
- package/dist/commands/fsd-generator.d.ts.map +1 -0
- package/dist/commands/fsd-generator.js +97 -0
- package/dist/commands/fsd-generator.js.map +1 -0
- package/dist/commands/tdd-generator.d.ts +11 -0
- package/dist/commands/tdd-generator.d.ts.map +1 -0
- package/dist/commands/tdd-generator.js +97 -0
- package/dist/commands/tdd-generator.js.map +1 -0
- package/dist/commands/tdd-lite-generator.d.ts +11 -0
- package/dist/commands/tdd-lite-generator.d.ts.map +1 -0
- package/dist/commands/tdd-lite-generator.js +97 -0
- package/dist/commands/tdd-lite-generator.js.map +1 -0
- package/dist/commands/wireframe-generator.d.ts +11 -0
- package/dist/commands/wireframe-generator.d.ts.map +1 -0
- package/dist/commands/wireframe-generator.js +97 -0
- package/dist/commands/wireframe-generator.js.map +1 -0
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +36 -0
- package/dist/core/config.js.map +1 -1
- package/dist/core/configurators/slash/antigravity.d.ts.map +1 -1
- package/dist/core/configurators/slash/antigravity.js +14 -2
- package/dist/core/configurators/slash/antigravity.js.map +1 -1
- package/dist/core/configurators/slash/base.js +1 -1
- package/dist/core/configurators/slash/base.js.map +1 -1
- package/dist/core/configurators/slash/claude.d.ts.map +1 -1
- package/dist/core/configurators/slash/claude.js +14 -2
- package/dist/core/configurators/slash/claude.js.map +1 -1
- package/dist/core/configurators/slash/codex.d.ts.map +1 -1
- package/dist/core/configurators/slash/codex.js +14 -2
- package/dist/core/configurators/slash/codex.js.map +1 -1
- package/dist/core/configurators/slash/github-copilot.d.ts.map +1 -1
- package/dist/core/configurators/slash/github-copilot.js +14 -2
- package/dist/core/configurators/slash/github-copilot.js.map +1 -1
- package/dist/core/configurators/slash/kilocode.d.ts.map +1 -1
- package/dist/core/configurators/slash/kilocode.js +14 -2
- package/dist/core/configurators/slash/kilocode.js.map +1 -1
- package/dist/core/configurators/slash/opencode.d.ts.map +1 -1
- package/dist/core/configurators/slash/opencode.js +14 -2
- package/dist/core/configurators/slash/opencode.js.map +1 -1
- package/dist/core/prompt-templates.d.ts +6 -0
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +1278 -1
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/templates/slash-command-templates.d.ts +1 -1
- package/dist/core/templates/slash-command-templates.d.ts.map +1 -1
- package/dist/core/templates/slash-command-templates.js +8 -1
- package/dist/core/templates/slash-command-templates.js.map +1 -1
- package/docs/tasks.md +3 -0
- package/package.json +1 -1
- package/prompt/api-contract-generator.md +234 -0
- package/prompt/erd-generator.md +130 -0
- package/prompt/fsd-generator.md +157 -0
- package/prompt/tdd-generator.md +294 -0
- package/prompt/tdd-lite-generator.md +224 -0
- package/prompt/wireframe-generator.md +219 -0
- package/src/cli/index.ts +56 -2
- package/src/commands/api-contract-generator.ts +118 -0
- package/src/commands/erd-generator.ts +118 -0
- package/src/commands/fsd-generator.ts +118 -0
- package/src/commands/tdd-generator.ts +118 -0
- package/src/commands/tdd-lite-generator.ts +118 -0
- package/src/commands/wireframe-generator.ts +118 -0
- package/src/core/config.ts +36 -0
- package/src/core/configurators/slash/antigravity.ts +14 -2
- package/src/core/configurators/slash/base.ts +1 -1
- package/src/core/configurators/slash/claude.ts +14 -2
- package/src/core/configurators/slash/codex.ts +14 -2
- package/src/core/configurators/slash/github-copilot.ts +14 -2
- package/src/core/configurators/slash/kilocode.ts +14 -2
- package/src/core/configurators/slash/opencode.ts +14 -2
- package/src/core/prompt-templates.ts +1284 -1
- package/src/core/templates/slash-command-templates.ts +17 -2
- package/docs/prompt-template.md +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-templates.js","sourceRoot":"","sources":["../../src/core/prompt-templates.ts"],"names":[],"mappings":"AAAA,yFAAyF;AAEzF,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6CpC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+CnC,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoJ3C,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmMrC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6N3C,CAAC;AAEF,4CAA4C;AAC5C,MAAM,CAAC,MAAM,gBAAgB,GAA2B;IACpD,cAAc,EAAE,qBAAqB;IACrC,wBAAwB,EAAE,+BAA+B;IACzD,aAAa,EAAE,oBAAoB;IACnC,eAAe,EAAE,sBAAsB;IACvC,eAAe,EAAE,sBAAsB;IACvC,qBAAqB,EAAE,4BAA4B;IACnD,eAAe,EAAE,sBAAsB;IACvC,eAAe,EAAE,sBAAsB;IACvC,kBAAkB,EAAE,yBAAyB;IAC7C,eAAe,EAAE,sBAAsB;IACvC,cAAc,EAAE,qBAAqB;IACrC,eAAe,EAAE,sBAAsB;IACvC,oBAAoB,EAAE,2BAA2B;IACjD,qBAAqB,EAAE,4BAA4B;CACtD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type SlashCommandId = 'enhance' | 'prd-generator' | 'prd-agent-generator' | 'product-brief' | 'epic-single' | 'story-single' | 'qa-test-scenario' | 'skill-creator' | 'ai-humanizer';
|
|
1
|
+
export type SlashCommandId = 'enhance' | 'prd-generator' | 'prd-agent-generator' | 'product-brief' | 'epic-single' | 'story-single' | 'qa-test-scenario' | 'skill-creator' | 'ai-humanizer' | 'api-contract-generator' | 'erd-generator' | 'fsd-generator' | 'tdd-generator' | 'tdd-lite-generator' | 'wireframe-generator';
|
|
2
2
|
export declare const slashCommandBodies: Record<SlashCommandId, string>;
|
|
3
3
|
export declare function getSlashCommandBody(id: SlashCommandId): string;
|
|
4
4
|
export declare class TemplateManager {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slash-command-templates.d.ts","sourceRoot":"","sources":["../../../src/core/templates/slash-command-templates.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"slash-command-templates.d.ts","sourceRoot":"","sources":["../../../src/core/templates/slash-command-templates.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,eAAe,GAAG,qBAAqB,GAAG,eAAe,GAAG,aAAa,GAAG,cAAc,GAAG,kBAAkB,GAAG,eAAe,GAAG,cAAc,GAAG,wBAAwB,GAAG,eAAe,GAAG,eAAe,GAAG,eAAe,GAAG,oBAAoB,GAAG,qBAAqB,CAAC;AA0/B5T,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAgB7D,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,cAAc,GAAG,MAAM,CAE9D;AAED,qBAAa,eAAe;IACxB,MAAM,CAAC,mBAAmB,CAAC,EAAE,EAAE,cAAc,GAAG,MAAM;CAGzD"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { API_CONTRACT_GENERATOR_TEMPLATE, ERD_GENERATOR_TEMPLATE, FSD_GENERATOR_TEMPLATE, TDD_GENERATOR_TEMPLATE, TDD_LITE_GENERATOR_TEMPLATE, WIREFRAME_GENERATOR_TEMPLATE } from '../prompt-templates.js';
|
|
1
2
|
const enhanceWorkflow = `## MUST FOLLOW
|
|
2
3
|
- Response Language: {User Request Language}
|
|
3
4
|
|
|
@@ -1014,7 +1015,13 @@ export const slashCommandBodies = {
|
|
|
1014
1015
|
'story-single': storySingleWorkflow,
|
|
1015
1016
|
'qa-test-scenario': qaTestScenarioWorkflow,
|
|
1016
1017
|
'skill-creator': skillCreatorWorkflow,
|
|
1017
|
-
'ai-humanizer': aiHumanizerWorkflow
|
|
1018
|
+
'ai-humanizer': aiHumanizerWorkflow,
|
|
1019
|
+
'api-contract-generator': API_CONTRACT_GENERATOR_TEMPLATE,
|
|
1020
|
+
'erd-generator': ERD_GENERATOR_TEMPLATE,
|
|
1021
|
+
'fsd-generator': FSD_GENERATOR_TEMPLATE,
|
|
1022
|
+
'tdd-generator': TDD_GENERATOR_TEMPLATE,
|
|
1023
|
+
'tdd-lite-generator': TDD_LITE_GENERATOR_TEMPLATE,
|
|
1024
|
+
'wireframe-generator': WIREFRAME_GENERATOR_TEMPLATE
|
|
1018
1025
|
};
|
|
1019
1026
|
export function getSlashCommandBody(id) {
|
|
1020
1027
|
return slashCommandBodies[id];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slash-command-templates.js","sourceRoot":"","sources":["../../../src/core/templates/slash-command-templates.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"slash-command-templates.js","sourceRoot":"","sources":["../../../src/core/templates/slash-command-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,+BAA+B,EAC/B,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,2BAA2B,EAC3B,4BAA4B,EAC/B,MAAM,wBAAwB,CAAC;AAIhC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mEAyC2C,CAAC;AAEpE,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6DA6MgC,CAAC;AAE9D,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6DA8H2B,CAAC;AAE9D,MAAM,kBAAkB,GAAG;;;;;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rC,cAAc,EAAE,mBAAmB;IACnC,wBAAwB,EAAE,+BAA+B;IACzD,eAAe,EAAE,sBAAsB;IACvC,eAAe,EAAE,sBAAsB;IACvC,eAAe,EAAE,sBAAsB;IACvC,oBAAoB,EAAE,2BAA2B;IACjD,qBAAqB,EAAE,4BAA4B;CACtD,CAAC;AAEF,MAAM,UAAU,mBAAmB,CAAC,EAAkB;IAClD,OAAO,kBAAkB,CAAC,EAAE,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,OAAO,eAAe;IACxB,MAAM,CAAC,mBAAmB,CAAC,EAAkB;QACzC,OAAO,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC;CACJ"}
|
package/docs/tasks.md
ADDED
package/package.json
CHANGED
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
# API Contract Generator Prompt
|
|
2
|
+
|
|
3
|
+
# Role & Expertise
|
|
4
|
+
You are a Senior API Architect and Technical Documentation Specialist with extensive experience in RESTful API design, OpenAPI/Swagger specifications, and translating business requirements into precise technical contracts. You have deep expertise in data modeling, HTTP standards, and enterprise integration patterns.
|
|
5
|
+
|
|
6
|
+
# Context
|
|
7
|
+
You will receive a Functional Specification Document (FSD) and an Entity Relationship Diagram (ERD) as inputs. Your task is to synthesize these artifacts into a comprehensive API contract that developers can immediately implement. The API contract must accurately reflect the business logic from the FSD while respecting the data structures defined in the ERD.
|
|
8
|
+
|
|
9
|
+
# Primary Objective
|
|
10
|
+
Generate a complete, production-ready API contract in OpenAPI 3.0+ specification format that:
|
|
11
|
+
- Covers all functional requirements from the FSD
|
|
12
|
+
- Aligns data models with the ERD entities and relationships
|
|
13
|
+
- Follows REST best practices and industry standards
|
|
14
|
+
- Is immediately usable for development and API documentation tools
|
|
15
|
+
|
|
16
|
+
# Process
|
|
17
|
+
|
|
18
|
+
## Phase 1: Analysis
|
|
19
|
+
1. **FSD Extraction**
|
|
20
|
+
- Identify all user stories/use cases
|
|
21
|
+
- Extract business rules and validation requirements
|
|
22
|
+
- Map functional flows to potential API operations
|
|
23
|
+
- Note authentication/authorization requirements
|
|
24
|
+
- Identify error scenarios and edge cases
|
|
25
|
+
|
|
26
|
+
2. **ERD Interpretation**
|
|
27
|
+
- Catalog all entities and their attributes
|
|
28
|
+
- Map data types to API schema types
|
|
29
|
+
- Identify relationships (1:1, 1:N, M:N)
|
|
30
|
+
- Note required vs optional fields
|
|
31
|
+
- Identify unique constraints and keys
|
|
32
|
+
|
|
33
|
+
3. **Cross-Reference Mapping**
|
|
34
|
+
- Link FSD operations to ERD entities
|
|
35
|
+
- Identify CRUD requirements per entity
|
|
36
|
+
- Map business validations to schema constraints
|
|
37
|
+
- Determine resource hierarchies and nesting
|
|
38
|
+
|
|
39
|
+
## Phase 2: API Design
|
|
40
|
+
1. **Resource Modeling**
|
|
41
|
+
- Define REST resources from entities
|
|
42
|
+
- Establish URL hierarchy and naming
|
|
43
|
+
- Determine resource representations (full, summary, reference)
|
|
44
|
+
|
|
45
|
+
2. **Endpoint Definition**
|
|
46
|
+
- Map operations to HTTP methods
|
|
47
|
+
- Define path parameters and query parameters
|
|
48
|
+
- Establish pagination, filtering, sorting patterns
|
|
49
|
+
|
|
50
|
+
3. **Schema Development**
|
|
51
|
+
- Create request/response schemas
|
|
52
|
+
- Define reusable components
|
|
53
|
+
- Establish enum types from domain values
|
|
54
|
+
|
|
55
|
+
4. **Security & Error Handling**
|
|
56
|
+
- Define authentication schemes
|
|
57
|
+
- Create standard error response formats
|
|
58
|
+
- Map business errors to HTTP status codes
|
|
59
|
+
|
|
60
|
+
## Phase 3: Contract Generation
|
|
61
|
+
1. Compile OpenAPI specification
|
|
62
|
+
2. Add comprehensive descriptions
|
|
63
|
+
3. Include request/response examples
|
|
64
|
+
4. Document edge cases and constraints
|
|
65
|
+
|
|
66
|
+
# Input Specifications
|
|
67
|
+
|
|
68
|
+
**Functional Specification Document (FSD):**
|
|
69
|
+
- Business requirements and user stories
|
|
70
|
+
- Functional flows and processes
|
|
71
|
+
- Business rules and validations
|
|
72
|
+
- User roles and permissions
|
|
73
|
+
- Expected system behaviors
|
|
74
|
+
|
|
75
|
+
**Entity Relationship Diagram (ERD):**
|
|
76
|
+
- Entity names and descriptions
|
|
77
|
+
- Attributes with data types
|
|
78
|
+
- Primary and foreign keys
|
|
79
|
+
- Relationship cardinalities
|
|
80
|
+
- Constraints and indexes
|
|
81
|
+
|
|
82
|
+
# Output Requirements
|
|
83
|
+
|
|
84
|
+
**Format:** OpenAPI 3.0+ YAML specification
|
|
85
|
+
|
|
86
|
+
**Required Sections:**
|
|
87
|
+
|
|
88
|
+
yaml
|
|
89
|
+
openapi: 3.0.x
|
|
90
|
+
info:
|
|
91
|
+
title: [API Name]
|
|
92
|
+
description: [Comprehensive API description]
|
|
93
|
+
version: [Version]
|
|
94
|
+
|
|
95
|
+
servers:
|
|
96
|
+
- url: [Base URL patterns]
|
|
97
|
+
|
|
98
|
+
tags:
|
|
99
|
+
- [Logical groupings of endpoints]
|
|
100
|
+
|
|
101
|
+
paths:
|
|
102
|
+
[All endpoints with full specifications]
|
|
103
|
+
|
|
104
|
+
components:
|
|
105
|
+
schemas:
|
|
106
|
+
[All data models derived from ERD]
|
|
107
|
+
parameters:
|
|
108
|
+
[Reusable parameters]
|
|
109
|
+
responses:
|
|
110
|
+
[Standard response definitions]
|
|
111
|
+
securitySchemes:
|
|
112
|
+
[Authentication methods]
|
|
113
|
+
examples:
|
|
114
|
+
[Request/response examples]
|
|
115
|
+
|
|
116
|
+
security:
|
|
117
|
+
[Global security requirements]
|
|
118
|
+
|
|
119
|
+
**Per Endpoint Requirements:**
|
|
120
|
+
- Summary and detailed description
|
|
121
|
+
- Operation ID (for code generation)
|
|
122
|
+
- Tags for grouping
|
|
123
|
+
- All parameters (path, query, header)
|
|
124
|
+
- Request body with schema reference
|
|
125
|
+
- All possible responses (2xx, 4xx, 5xx)
|
|
126
|
+
- Security requirements
|
|
127
|
+
- At least one example per request/response
|
|
128
|
+
|
|
129
|
+
**Schema Requirements:**
|
|
130
|
+
- All properties with types and descriptions
|
|
131
|
+
- Required fields array
|
|
132
|
+
- Validation constraints (minLength, maxLength, pattern, minimum, maximum, enum)
|
|
133
|
+
- Nullable indicators
|
|
134
|
+
- Example values
|
|
135
|
+
|
|
136
|
+
# Quality Standards
|
|
137
|
+
|
|
138
|
+
1. **Completeness**
|
|
139
|
+
- Every FSD requirement maps to at least one endpoint
|
|
140
|
+
- Every ERD entity has corresponding schema(s)
|
|
141
|
+
- All CRUD operations covered where applicable
|
|
142
|
+
|
|
143
|
+
2. **Consistency**
|
|
144
|
+
- Uniform naming conventions (camelCase for properties, kebab-case for URLs)
|
|
145
|
+
- Consistent response structures across endpoints
|
|
146
|
+
- Standard pagination/filtering patterns
|
|
147
|
+
|
|
148
|
+
3. **Accuracy**
|
|
149
|
+
- Data types match ERD definitions
|
|
150
|
+
- Validations reflect business rules
|
|
151
|
+
- Relationships properly represented in nested/linked resources
|
|
152
|
+
|
|
153
|
+
4. **Usability**
|
|
154
|
+
- Clear, actionable descriptions
|
|
155
|
+
- Meaningful examples
|
|
156
|
+
- Logical endpoint organization
|
|
157
|
+
|
|
158
|
+
5. **Standards Compliance**
|
|
159
|
+
- Valid OpenAPI 3.0+ syntax
|
|
160
|
+
- RESTful conventions followed
|
|
161
|
+
- HTTP semantics correctly applied
|
|
162
|
+
|
|
163
|
+
# Special Instructions
|
|
164
|
+
|
|
165
|
+
**Naming Conventions:**
|
|
166
|
+
- Resources: plural nouns (e.g., `/users`, `/orders`)
|
|
167
|
+
- Endpoints: `kebab-case`
|
|
168
|
+
- Schema names: `PascalCase`
|
|
169
|
+
- Properties: `camelCase`
|
|
170
|
+
- Query parameters: `camelCase`
|
|
171
|
+
|
|
172
|
+
**Standard Patterns to Apply:**
|
|
173
|
+
|
|
174
|
+
| Operation | Method | Path Pattern | Success Code |
|
|
175
|
+
|-----------|--------|--------------|--------------|
|
|
176
|
+
| List | GET | /resources | 200 |
|
|
177
|
+
| Get One | GET | /resources/{id} | 200 |
|
|
178
|
+
| Create | POST | /resources | 201 |
|
|
179
|
+
| Full Update | PUT | /resources/{id} | 200 |
|
|
180
|
+
| Partial Update | PATCH | /resources/{id} | 200 |
|
|
181
|
+
| Delete | DELETE | /resources/{id} | 204 |
|
|
182
|
+
|
|
183
|
+
**Pagination Standard:**
|
|
184
|
+
yaml
|
|
185
|
+
parameters:
|
|
186
|
+
- name: page
|
|
187
|
+
in: query
|
|
188
|
+
schema:
|
|
189
|
+
type: integer
|
|
190
|
+
default: 1
|
|
191
|
+
- name: limit
|
|
192
|
+
in: query
|
|
193
|
+
schema:
|
|
194
|
+
type: integer
|
|
195
|
+
default: 20
|
|
196
|
+
maximum: 100
|
|
197
|
+
|
|
198
|
+
**Error Response Standard:**
|
|
199
|
+
yaml
|
|
200
|
+
ErrorResponse:
|
|
201
|
+
type: object
|
|
202
|
+
required:
|
|
203
|
+
- code
|
|
204
|
+
- message
|
|
205
|
+
properties:
|
|
206
|
+
code:
|
|
207
|
+
type: string
|
|
208
|
+
message:
|
|
209
|
+
type: string
|
|
210
|
+
details:
|
|
211
|
+
type: array
|
|
212
|
+
items:
|
|
213
|
+
type: object
|
|
214
|
+
properties:
|
|
215
|
+
field:
|
|
216
|
+
type: string
|
|
217
|
+
issue:
|
|
218
|
+
type: string
|
|
219
|
+
|
|
220
|
+
**Relationship Handling:**
|
|
221
|
+
- 1:1 → Embed or link with reference ID
|
|
222
|
+
- 1:N → Nested collection endpoint or link array
|
|
223
|
+
- M:N → Separate join resource or array of references
|
|
224
|
+
|
|
225
|
+
# Verification Checklist
|
|
226
|
+
|
|
227
|
+
After generating the contract, verify:
|
|
228
|
+
- [ ] All FSD use cases have corresponding endpoints
|
|
229
|
+
- [ ] All ERD entities have schema definitions
|
|
230
|
+
- [ ] All relationships are properly represented
|
|
231
|
+
- [ ] Authentication is defined for protected endpoints
|
|
232
|
+
- [ ] Error responses cover all documented error scenarios
|
|
233
|
+
- [ ] Examples are valid against schemas
|
|
234
|
+
- [ ] Specification validates against OpenAPI 3.0 schema
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Generated Prompt
|
|
2
|
+
|
|
3
|
+
# Role & Expertise
|
|
4
|
+
You are a senior database architect and data modeling specialist with extensive experience in translating business requirements into optimized database designs. You have deep expertise in entity-relationship modeling, normalization theory, and understanding functional specifications across various domains.
|
|
5
|
+
|
|
6
|
+
# Context
|
|
7
|
+
You will receive a Functional Specification Document (FSD) that describes system requirements, business processes, user stories, and feature specifications. Your task is to extract all data entities, their attributes, and relationships to produce a comprehensive Entity Relationship Diagram specification.
|
|
8
|
+
|
|
9
|
+
# Primary Objective
|
|
10
|
+
Analyze the provided FSD and generate a complete ERD specification that accurately captures all data entities, attributes, relationships, and cardinalities required to support the described functionality.
|
|
11
|
+
|
|
12
|
+
# Process
|
|
13
|
+
|
|
14
|
+
## Phase 1: Document Analysis
|
|
15
|
+
1. Read through the entire FSD to understand the system scope
|
|
16
|
+
2. Identify all nouns that represent potential entities (users, products, orders, etc.)
|
|
17
|
+
3. Note all actions and processes that imply relationships between entities
|
|
18
|
+
4. Extract business rules that define constraints and cardinalities
|
|
19
|
+
|
|
20
|
+
## Phase 2: Entity Identification
|
|
21
|
+
1. List all candidate entities from the document
|
|
22
|
+
2. Eliminate duplicates and synonyms (e.g., "customer" and "client" may be the same)
|
|
23
|
+
3. Distinguish between entities and attributes (is it a thing or a property of a thing?)
|
|
24
|
+
4. Identify weak entities that depend on other entities for existence
|
|
25
|
+
|
|
26
|
+
## Phase 3: Attribute Extraction
|
|
27
|
+
1. For each entity, identify all properties mentioned or implied
|
|
28
|
+
2. Determine primary keys (natural or surrogate)
|
|
29
|
+
3. Identify required vs. optional attributes
|
|
30
|
+
4. Note any derived or calculated attributes
|
|
31
|
+
5. Specify data types based on context
|
|
32
|
+
|
|
33
|
+
## Phase 4: Relationship Mapping
|
|
34
|
+
1. Identify all relationships between entities
|
|
35
|
+
2. Determine cardinality for each relationship (1:1, 1:N, M:N)
|
|
36
|
+
3. Identify participation constraints (mandatory vs. optional)
|
|
37
|
+
4. Name relationships with meaningful verbs
|
|
38
|
+
5. Identify any recursive/self-referencing relationships
|
|
39
|
+
|
|
40
|
+
## Phase 5: Normalization Review
|
|
41
|
+
1. Verify entities are in at least 3NF
|
|
42
|
+
2. Check for transitive dependencies
|
|
43
|
+
3. Identify any intentional denormalization with justification
|
|
44
|
+
|
|
45
|
+
# Input Specifications
|
|
46
|
+
- **Document Type:** Functional Specification Document (FSD)
|
|
47
|
+
- **Expected Content:** System overview, user stories, feature descriptions, business rules, workflow descriptions, UI specifications
|
|
48
|
+
- **Format:** Text, markdown, or document content
|
|
49
|
+
|
|
50
|
+
# Output Requirements
|
|
51
|
+
|
|
52
|
+
## Section 1: Entity Catalog
|
|
53
|
+
|
|
54
|
+
| Entity Name | Description | Type | Primary Key |
|
|
55
|
+
|-------------|-------------|------|-------------|
|
|
56
|
+
| [Name] | [Brief description] | [Strong/Weak] | [PK field(s)] |
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
## Section 2: Entity Details
|
|
60
|
+
For each entity:
|
|
61
|
+
|
|
62
|
+
### [Entity Name]
|
|
63
|
+
**Description:** [What this entity represents]
|
|
64
|
+
**Type:** Strong Entity / Weak Entity (dependent on: [parent])
|
|
65
|
+
|
|
66
|
+
**Attributes:**
|
|
67
|
+
| Attribute | Data Type | Constraints | Description |
|
|
68
|
+
|-----------|-----------|-------------|-------------|
|
|
69
|
+
| [name] | [type] | [PK/FK/NOT NULL/UNIQUE] | [description] |
|
|
70
|
+
|
|
71
|
+
**Business Rules:**
|
|
72
|
+
- [Rule 1]
|
|
73
|
+
- [Rule 2]
|
|
74
|
+
|
|
75
|
+
## Section 3: Relationship Specifications
|
|
76
|
+
|
|
77
|
+
| Relationship | Entity A | Entity B | Cardinality | Participation | Description |
|
|
78
|
+
|--------------|----------|----------|-------------|---------------|-------------|
|
|
79
|
+
| [verb phrase] | [Entity] | [Entity] | [1:1/1:N/M:N] | [Total/Partial] | [description] |
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
## Section 4: ERD Notation (Text-Based)
|
|
83
|
+
Provide a PlantUML or Mermaid diagram code that can be rendered:
|
|
84
|
+
|
|
85
|
+
erDiagram
|
|
86
|
+
ENTITY1 ||--o{ ENTITY2 : "relationship"
|
|
87
|
+
ENTITY1 {
|
|
88
|
+
type attribute_name PK
|
|
89
|
+
type attribute_name
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
## Section 5: Design Decisions & Notes
|
|
93
|
+
- Key assumptions made during analysis
|
|
94
|
+
- Alternative modeling options considered
|
|
95
|
+
- Recommendations for implementation
|
|
96
|
+
- Questions or ambiguities requiring clarification
|
|
97
|
+
|
|
98
|
+
# Quality Standards
|
|
99
|
+
- **Completeness:** All entities implied by the FSD must be captured
|
|
100
|
+
- **Accuracy:** Cardinalities must reflect actual business rules
|
|
101
|
+
- **Clarity:** Entity and relationship names must be self-explanatory
|
|
102
|
+
- **Consistency:** Naming conventions must be uniform throughout
|
|
103
|
+
- **Traceability:** Each entity/relationship should trace back to FSD requirements
|
|
104
|
+
|
|
105
|
+
# Naming Conventions
|
|
106
|
+
- **Entities:** PascalCase, singular nouns (e.g., `Customer`, `OrderItem`)
|
|
107
|
+
- **Attributes:** snake_case (e.g., `first_name`, `created_at`)
|
|
108
|
+
- **Relationships:** Descriptive verb phrases (e.g., "places", "contains", "belongs to")
|
|
109
|
+
- **Primary Keys:** `id` or `[entity]_id`
|
|
110
|
+
- **Foreign Keys:** `[referenced_entity]_id`
|
|
111
|
+
|
|
112
|
+
# Special Instructions
|
|
113
|
+
1. If the FSD mentions features without clear data requirements, infer necessary entities
|
|
114
|
+
2. Include audit fields (`created_at`, `updated_at`, `created_by`) for transactional entities
|
|
115
|
+
3. Consider soft delete patterns if deletion is mentioned
|
|
116
|
+
4. Flag any circular dependencies or complex relationships
|
|
117
|
+
5. If user authentication is implied, include standard auth entities (User, Role, Permission)
|
|
118
|
+
6. For any M:N relationships, specify the junction/association entity
|
|
119
|
+
|
|
120
|
+
# Verification Checklist
|
|
121
|
+
After generating the ERD, verify:
|
|
122
|
+
- [ ] Every feature in the FSD can be supported by the data model
|
|
123
|
+
- [ ] All user roles mentioned have corresponding entities or attributes
|
|
124
|
+
- [ ] Workflow states are captured (if applicable)
|
|
125
|
+
- [ ] Reporting requirements can be satisfied by the structure
|
|
126
|
+
- [ ] No orphan entities exist (every entity has at least one relationship)
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
**Now analyze the following Functional Specification Document and generate the complete ERD specification:**
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# Functional Specification Document (FSD) Generator Prompt
|
|
2
|
+
|
|
3
|
+
# Role & Expertise
|
|
4
|
+
You are a Senior Technical Business Analyst and Solutions Architect with 15+ years of experience translating Product Requirements Documents into comprehensive Functional Specification Documents. You excel at bridging business vision and technical implementation.
|
|
5
|
+
|
|
6
|
+
# Context
|
|
7
|
+
You will receive a Product Requirements Document (PRD) that outlines business objectives, user needs, and high-level product vision. Your task is to transform this into a detailed Functional Specification Document that development teams can use to build the product.
|
|
8
|
+
|
|
9
|
+
# Primary Objective
|
|
10
|
+
Generate a complete, implementation-ready Functional Specification Document (FSD) that translates PRD requirements into precise functional specifications, system behaviors, data requirements, and acceptance criteria.
|
|
11
|
+
|
|
12
|
+
# Process
|
|
13
|
+
1. **Analyze the PRD**
|
|
14
|
+
- Extract all business requirements and user stories
|
|
15
|
+
- Identify core features and their priorities
|
|
16
|
+
- Map user personas to functional needs
|
|
17
|
+
- Note any constraints, assumptions, and dependencies
|
|
18
|
+
|
|
19
|
+
2. **Define Functional Requirements**
|
|
20
|
+
- Convert each PRD item into specific, testable functional requirements
|
|
21
|
+
- Assign unique identifiers (FR-XXX format)
|
|
22
|
+
- Establish requirement traceability to PRD sections
|
|
23
|
+
- Define acceptance criteria for each requirement
|
|
24
|
+
|
|
25
|
+
3. **Specify System Behavior**
|
|
26
|
+
- Document user interactions and system responses
|
|
27
|
+
- Define business rules and validation logic
|
|
28
|
+
- Specify error handling and edge cases
|
|
29
|
+
- Detail state transitions where applicable
|
|
30
|
+
|
|
31
|
+
4. **Design Data Specifications**
|
|
32
|
+
- Identify data entities and attributes
|
|
33
|
+
- Define data validation rules
|
|
34
|
+
- Specify data relationships and constraints
|
|
35
|
+
- Document data flow between components
|
|
36
|
+
|
|
37
|
+
5. **Create Interface Specifications**
|
|
38
|
+
- Define UI functional requirements (not visual design)
|
|
39
|
+
- Specify API contracts if applicable
|
|
40
|
+
- Document integration touchpoints
|
|
41
|
+
- Detail reporting/output requirements
|
|
42
|
+
|
|
43
|
+
# Input Specifications
|
|
44
|
+
- Product Requirements Document (PRD) in any text format
|
|
45
|
+
- May include: user stories, epics, acceptance criteria, wireframes descriptions, business rules, constraints
|
|
46
|
+
|
|
47
|
+
# Output Requirements
|
|
48
|
+
|
|
49
|
+
**Format:** Structured FSD document with clear sections and subsections
|
|
50
|
+
**Style:** Technical but accessible; precise language; no ambiguity
|
|
51
|
+
**Requirement Format:** Each requirement must have ID, description, priority, acceptance criteria, and PRD traceability
|
|
52
|
+
|
|
53
|
+
## Required FSD Structure:
|
|
54
|
+
|
|
55
|
+
# Functional Specification Document
|
|
56
|
+
## Document Information
|
|
57
|
+
- Document Title
|
|
58
|
+
- Version
|
|
59
|
+
- Date
|
|
60
|
+
- PRD Reference
|
|
61
|
+
- Author
|
|
62
|
+
- Reviewers/Approvers
|
|
63
|
+
|
|
64
|
+
## 1. Executive Summary
|
|
65
|
+
[Brief overview of what the system will do functionally]
|
|
66
|
+
|
|
67
|
+
## 2. Scope
|
|
68
|
+
### 2.1 In Scope
|
|
69
|
+
[Functional boundaries covered by this FSD]
|
|
70
|
+
### 2.2 Out of Scope
|
|
71
|
+
[Explicitly excluded functionality]
|
|
72
|
+
### 2.3 Assumptions
|
|
73
|
+
[Technical and business assumptions]
|
|
74
|
+
### 2.4 Dependencies
|
|
75
|
+
[External systems, teams, or conditions]
|
|
76
|
+
|
|
77
|
+
## 3. User Roles & Permissions
|
|
78
|
+
| Role | Description | Key Capabilities |
|
|
79
|
+
|------|-------------|------------------|
|
|
80
|
+
[Define each user role and their functional access]
|
|
81
|
+
|
|
82
|
+
## 4. Functional Requirements
|
|
83
|
+
### 4.1 [Feature/Module Name]
|
|
84
|
+
#### FR-001: [Requirement Title]
|
|
85
|
+
- **Description:** [Detailed functional description]
|
|
86
|
+
- **Priority:** [Must Have / Should Have / Could Have / Won't Have]
|
|
87
|
+
- **PRD Reference:** [Section/Item from PRD]
|
|
88
|
+
- **User Story:** As a [role], I want [capability] so that [benefit]
|
|
89
|
+
- **Business Rules:**
|
|
90
|
+
- BR-001: [Rule description]
|
|
91
|
+
- **Acceptance Criteria:**
|
|
92
|
+
- [ ] Given [context], when [action], then [expected result]
|
|
93
|
+
- [ ] [Additional criteria]
|
|
94
|
+
- **Error Handling:**
|
|
95
|
+
- [Error condition] → [System response]
|
|
96
|
+
|
|
97
|
+
[Repeat for each functional requirement]
|
|
98
|
+
|
|
99
|
+
## 5. Business Rules Catalog
|
|
100
|
+
| ID | Rule | Applies To | Validation |
|
|
101
|
+
|----|------|------------|------------|
|
|
102
|
+
[Consolidated list of all business rules]
|
|
103
|
+
|
|
104
|
+
## 6. Data Specifications
|
|
105
|
+
### 6.1 Data Entities
|
|
106
|
+
#### [Entity Name]
|
|
107
|
+
| Field | Type | Required | Validation Rules | Description |
|
|
108
|
+
|-------|------|----------|------------------|-------------|
|
|
109
|
+
|
|
110
|
+
### 6.2 Data Relationships
|
|
111
|
+
[Entity relationship descriptions or diagram notation]
|
|
112
|
+
|
|
113
|
+
### 6.3 Data Validation Rules
|
|
114
|
+
[Comprehensive validation logic]
|
|
115
|
+
|
|
116
|
+
## 7. Interface Specifications
|
|
117
|
+
### 7.1 User Interface Requirements
|
|
118
|
+
[Screen-by-screen functional requirements]
|
|
119
|
+
|
|
120
|
+
### 7.2 API Specifications (if applicable)
|
|
121
|
+
| Endpoint | Method | Input | Output | Business Logic |
|
|
122
|
+
|----------|--------|-------|--------|----------------|
|
|
123
|
+
|
|
124
|
+
### 7.3 Integration Requirements
|
|
125
|
+
[Third-party system integration specifications]
|
|
126
|
+
|
|
127
|
+
## 8. Non-Functional Considerations
|
|
128
|
+
[Performance expectations, security requirements, accessibility needs - as they impact functionality]
|
|
129
|
+
|
|
130
|
+
## 9. Reporting & Analytics Requirements
|
|
131
|
+
[Functional requirements for reports and dashboards]
|
|
132
|
+
|
|
133
|
+
## 10. Traceability Matrix
|
|
134
|
+
| PRD Item | FSD Requirement(s) | Priority |
|
|
135
|
+
|----------|-------------------|----------|
|
|
136
|
+
[Map every PRD item to FSD requirements]
|
|
137
|
+
|
|
138
|
+
## 11. Appendices
|
|
139
|
+
### A. Glossary
|
|
140
|
+
### B. Revision History
|
|
141
|
+
### C. Open Questions/TBD Items
|
|
142
|
+
|
|
143
|
+
# Quality Standards
|
|
144
|
+
- Every PRD requirement must map to at least one functional specification
|
|
145
|
+
- All requirements must be SMART (Specific, Measurable, Achievable, Relevant, Testable)
|
|
146
|
+
- No ambiguous language (avoid "should," "might," "could" - use "shall," "will," "must")
|
|
147
|
+
- Each acceptance criterion must be verifiable by QA
|
|
148
|
+
- Business rules must be atomic and non-contradictory
|
|
149
|
+
- Data specifications must cover all functional requirements
|
|
150
|
+
|
|
151
|
+
# Special Instructions
|
|
152
|
+
- If the PRD is vague on certain aspects, document them in "Open Questions/TBD Items"
|
|
153
|
+
- Infer reasonable technical assumptions where PRD is silent, clearly marking them as assumptions
|
|
154
|
+
- Prioritize requirements using MoSCoW method if not specified in PRD
|
|
155
|
+
- Include negative test scenarios in acceptance criteria (what should NOT happen)
|
|
156
|
+
- Flag any PRD inconsistencies or conflicts you identify
|
|
157
|
+
- Use consistent terminology throughout - define terms in glossary
|