prd-v06-technical-specification
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "prd-v06-technical-specification" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-7084b435c9ba94e3a8c1a75eaaa653b7b27babed3f926e64611257390a2177b7. Verify the upstream source and version against https://github.com/mattgierhart/PRD-driven-context-engineering before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Used to define implementation contracts (APIs and data models) in the PRD v0.6 architecture phase for developers to build against. Triggers on requests to define APIs, design database schemas, or create data models, or questions like “define API,” “data model,” “database schema,” “API contract,” “technical spec,” “endpoint design,” or “schema design.” Consumes ARC- (architecture), TECH- (build items), UJ- (flows), and SCR- (screens) entries, and outputs API- entries (endpoints) and DBT- entries (data models) to feed v0.7 build execution.
Introduction source: third_party · mattgierhart · 0.0.1 Reference
SkillPi interpretation
- Tasks
- Define implementation contracts (APIs and data models) that developers will build against during PRD v0.6 Architecture. Triggers on requests to define APIs, design database schema, create data models, or when user asks "define APIs", "data model", "database schema", "API contracts", "technical spec", "endpoint design", "schema design". Consumes ARC- (architecture), TECH- (Build items), UJ- (flows), SCR- (screens). Outputs API- entries for endpoints and DBT- entries for data models. Feeds v0.7 Build Execution.
- Inputs and outputs
- Example API- entry:**
- Testing
- Not tested
Browse files
Frontmatter
name: prd-v06-technical-specification
description: Define implementation contracts (APIs and data models) that developers will build against during PRD v0.6 Architecture. Triggers on requests to define APIs, design database schema, create data models, or when user asks "define APIs", "data model", "database schema", "API contracts", "technical spec", "endpoint design", "schema design". Consumes ARC- (architecture), TECH- (Build items), UJ- (flows), SCR- (screens). Outputs API- entries for endpoints and DBT- entries for data models. Feeds v0.7 Build Execution.
context: fork
allowed-tools:
- Read
- Write
- Edit
- Glob
- GrepTechnical Specification
Position in workflow: v0.6 Architecture Design → v0.6 Technical Specification → v0.7 Build Execution
Technical specification defines the contracts developers build against: API endpoints and data models. This is the bridge between architecture and implementation.
Consumes
This skill requires prior work from v0.3-v0.6:
- ARC-* architecture decisions (from v0.6 Architecture Design) — System structure (monolith vs microservices) determines API organization; integration patterns guide webhook/adapter design
- TECH-* Build items (from v0.5 Technical Stack Selection) — Technologies chosen define data model types (PostgreSQL requires relational schema; MongoDB requires document schema)
- UJ-* user journeys (from v0.4 User Journey Mapping) — Journey steps determine API call sequences; value moments determine response contracts
- SCR-* screen entries (from v0.4 Screen Flow Definition) — Screen data requirements determine API response shape; form submissions map to POST/PUT/PATCH endpoints
- BR-* business rules (from v0.3 Commercial Model) — Business constraints enforced in API responses (rate limits, validation rules, field constraints)
This skill assumes v0.6 Architecture Design is complete with ARC- entries providing system structure.
Produces
This skill creates/updates:
- API-* entries (API endpoint contracts) — REST/GraphQL endpoint specifications with request/response shapes, auth requirements, error codes, tied to UJ-/SCR- consumers and DBT- data sources
- DBT-* entries (database schema contracts) — Data model specifications with fields, relationships, indexes, constraints, tied to API- accessors and BR- rules
- Screen-to-API validation matrix — Verification showing every SCR- has supporting API- and every UJ-* step can be completed via API calls
- API-to-Data validation matrix — Verification showing every API- response field maps to DBT- and every DBT- is used by at least one API-
All API- and DBT- entries are implementation contracts (not confidence-based). They are:
- Derivable from upstream IDs (UJ-/SCR-/ARC-/BR-/TECH-)
- Testable (API responses have concrete shape, DBT constraints are verifiable)
- Complete enough for developers to implement without re-research
Example API- entry (from UJ- and SCR-):
API-001: Create Report
Method: POST
Path: /api/reports
Purpose: Create new report from selected data source and template (implements UJ-001 Step 1)
Auth: User
Journey: UJ-001 (Step 1 - Create Report)
Screen: SCR-002 (Report Builder)
Request:
Body:
{
title: string (required) — Report name
templateId: string (required) — Selected template (FEA-008)
dataSourceId: string (required) — Connected data source (FEA-001)
options: { dateRange: { start, end }, filters: [...] }
}
Response:
Success (201):
{
data: { id, title, status: "pending|generating|ready", createdAt }
}
Errors:
- 400: Invalid input — Missing required field
- 403: Forbidden — User doesn't own data source
- 404: Not found — Template or data source not found
- 429: Rate limit exceeded
Business Rules: BR-015 (max 100 reports per user)
Data: DBT-001 (reports table), DBT-002 (data_sources table)
Example DBT- entry (referenced by API- entries):
DBT-001: Reports
Purpose: Stores user-generated reports (entities created by API-001, updated by API-004)
Table: reports
Fields:
- id: uuid — Primary key
- user_id: uuid — Report owner (FK → users) [NOT NULL]
- title: varchar(255) — Display name [NOT NULL]
- status: enum('pending','generating','ready','failed') [NOT NULL]
- created_at: timestamp [NOT NULL, DEFAULT now()]
Relationships:
- belongs_to: users via user_id
- belongs_to: templates via template_id
Indexes:
- user_id — List reports by user (API-003)
- (user_id, created_at DESC) — Recent reports (API-003)
- status — Find pending reports (background job)
Constraints:
- title: NOT NULL, length 1-255
- status: valid enum only
Business Rules: BR-015 (max 100 per user — enforce in API-001)
APIs: API-001 (create), API-002 (get), API-003 (list), API-005 (delete)
Specification Types
| Type | What It Defines | Example |
|---|---|---|
| API- | Endpoint contracts | POST /users, GET /reports/:id |
| DBT- | Data model/schema | Users table, Reports table |
Rule: Every API- should know which DBT- it reads/writes. Every DBT- should know which API- accesses it.
Specification Process
-
Pull ARC- decisions — System structure and boundaries
-
Pull TECH- Build items — What we're implementing
-
Pull UJ- journeys — User flows the API must support
-
Pull SCR- screens — UI data requirements
-
Define API contracts for each endpoint:
- What's the request/response shape?
- What auth is required?
- What errors can occur?
-
Define data models for each entity:
- What fields exist?
- What relationships?
- What constraints?
-
Validate consistency:
- Does every screen have APIs to fetch its data?
- Does every API response map to DBT- fields?
API- Output Template
API-XXX: [Endpoint Name]
Method: [GET | POST | PUT | PATCH | DELETE]
Path: [/resource/{id}/action]
Purpose: [What this endpoint does]
Auth: [Public | User | Admin | Service]
Journey: [UJ-XXX that uses this]
Screen: [SCR-XXX that calls this]
Request:
Headers:
- Authorization: Bearer <token>
- Content-Type: application/json
Params:
- id: string (required) — Resource identifier
Query:
- limit: number (optional, default 20) — Pagination limit
Body:
{
field: type — Description
}
Response:
Success (200/201):
{
data: { ... }
}
Errors:
- 400: Invalid input — [when this occurs]
- 401: Unauthorized — [when this occurs]
- 404: Not found — [when this occurs]
- 500: Server error — [when this occurs]
Business Rules: [BR-XXX enforced here]
Data: [DBT-XXX entities accessed]
Rate Limit: [requests/minute if applicable]
Example API- entry:
API-001: Create Report
Method: POST
Path: /api/reports
Purpose: Create a new report from selected data source and template
Auth: User
Journey: UJ-001 (Step 1 - Create Report)
Screen: SCR-002 (Report Builder)
Request:
Headers:
- Authorization: Bearer <token>
- Content-Type: application/json
Body:
{
title: string (required) — Report name
templateId: string (required) — Selected template
dataSourceId: string (required) — Connected data source
options: {
dateRange: { start: ISO8601, end: ISO8601 }
filters: [{ field: string, operator: string, value: any }]
}
}
Response:
Success (201):
{
data: {
id: string
title: string
status: "pending" | "generating" | "ready"
createdAt: ISO8601
}
}
Errors:
- 400: Invalid input — Missing required field or invalid templateId
- 401: Unauthorized — Invalid or expired token
- 403: Forbidden — User doesn't own data source
- 404: Not found — Template or data source not found
- 429: Too many requests — Rate limit exceeded
Business Rules: BR-015 (max 100 reports per user)
Data: DBT-001 (reports), DBT-002 (data_sources)
Rate Limit: 10 requests/minute
DBT- Output Template
DBT-XXX: [Entity Name]
Purpose: [What this entity represents]
Table: [database_table_name]
Fields:
- id: uuid — Primary key, auto-generated
- [field_name]: [type] — Description [constraints]
- created_at: timestamp — Record creation (auto)
- updated_at: timestamp — Last modification (auto)
Relationships:
- belongs_to: [DBT-YYY] via [foreign_key]
- has_many: [DBT-ZZZ]
Indexes:
- [field_name] — [Query pattern it supports]
Constraints:
- [field]: [UNIQUE | NOT NULL | CHECK expression]
Business Rules: [BR-XXX that affect this entity]
APIs: [API-XXX that read/write this]
Example DBT- entry:
DBT-001: Reports
Purpose: Stores user-generated reports with configuration and status
Table: reports
Fields:
- id: uuid — Primary key
- user_id: uuid — Report owner (FK → users) [NOT NULL]
- title: varchar(255) — Display name [NOT NULL]
- template_id: uuid — Template used (FK → templates) [NOT NULL]
- data_source_id: uuid — Data source (FK → data_sources) [NOT NULL]
- status: enum('pending','generating','ready','failed') — Generation status [NOT NULL, DEFAULT 'pending']
- options: jsonb — Report configuration (date range, filters) [DEFAULT '{}']
- output_url: varchar(500) — Generated report file URL [NULL until ready]
- created_at: timestamp — [NOT NULL, DEFAULT now()]
- updated_at: timestamp — [NOT NULL, DEFAULT now()]
Relationships:
- belongs_to: DBT-010 (users) via user_id
- belongs_to: DBT-002 (templates) via template_id
- belongs_to: DBT-003 (data_sources) via data_source_id
Indexes:
- user_id — List reports by user
- (user_id, created_at DESC) — List recent reports
- status — Find pending reports for processing
Constraints:
- title: NOT NULL, length 1-255
- status: NOT NULL, valid enum value
Business Rules: BR-015 (max 100 reports per user — enforce in API)
APIs: API-001 (create), API-002 (get), API-003 (list), API-005 (delete)
API Design Principles
| Principle | Guidance | Example |
|---|---|---|
| Resource-oriented | URLs are nouns, not verbs | /reports not /createReport |
| Consistent naming | Plural nouns, kebab-case | /data-sources not /dataSource |
| Stateless | No server-side sessions | Auth via token, not cookie session |
| Versioned | Prefix for breaking changes | /v1/reports |
| Documented errors | Clear codes and messages | { error: { code: "LIMIT_EXCEEDED", message: "..." } } |
Data Model Principles
| Principle | Guidance | Example |
|---|---|---|
| Normalized | Avoid redundancy (unless denormalized for performance) | User name in users table, not duplicated |
| Audit trail | created_at, updated_at on all tables | Track when records change |
| Soft delete | deleted_at instead of hard delete (when needed) | Recover deleted data |
| Foreign keys | Enforce referential integrity | user_id → users.id |
| Index strategy | Index fields in WHERE and JOIN | Filter fields, FK columns |
Validation Checklist
Use this to ensure spec completeness:
Screen-to-API Validation
- [ ] Every SCR- screen has APIs to fetch its data
- [ ] Every form submission maps to a POST/PUT/PATCH
- [ ] Every list view has a paginated GET
Journey-to-API Validation
- [ ] Every UJ- step that needs data has an API call
- [ ] API sequence supports journey flow
- [ ] Error states in journey have error responses
API-to-Data Validation
- [ ] Every API- response field maps to DBT- fields
- [ ] Every API- that writes data has a target DBT-
- [ ] Business rules (BR-) enforced in API or DB constraint
Orphan Check
- [ ] No API- without SCR-/UJ- consumer
- [ ] No DBT- table unused by any API-
- [ ] No dead code paths
Anti-Patterns to Avoid
| Anti-Pattern | Signal | Fix |
|---|---|---|
| API/UI mismatch | Screen needs data not in any API | Add API- or modify existing |
| Schema sprawl | 50+ tables for MVP | Consolidate; YAGNI applies |
| Missing constraints | No validation, anything accepted | Add BR- enforcement |
| N+1 queries baked in | API design requires multiple calls for one view | Add compound endpoints |
| No error handling | Only happy path documented | Define all error responses |
| Vague types | data: any |
Specify exact shape |
Quality Gates
Before proceeding to Build Execution:
- [ ] All SCR- screens have supporting API- endpoints
- [ ] All UJ- journeys can be completed via API- calls
- [ ] All API- responses map to DBT- fields
- [ ] All BR- rules enforced in API- or DBT- constraints
- [ ] No orphaned tables or endpoints
- [ ] Error responses documented for all endpoints
Downstream Connections
API- and DBT- entries feed into:
| Consumer | What It Uses | Example |
|---|---|---|
| v0.7 Epic Scoping | API- and DBT- define EPIC scope | EPIC-01 implements API-001–005 |
| v0.7 Test Planning | API- defines test contracts | TEST-001 validates API-001 |
| v0.7 Implementation Loop | API-/DBT- are implementation tasks | Code implements API-001 |
| API Documentation | API- becomes OpenAPI spec | Swagger from API- entries |
Detailed References
- API and data model examples: See
references/examples.md - API- entry template: See
assets/api.md - DBT- entry template: See
assets/dbt.md
Version history
-
v3.2.0
GitHub ↗
Original release notes
## [3.2.0] — 2026-04-01 ### Added - `.claude/rules/` directory with 6 modular rule files (01-session-protocols through 06-cross-agent-communication) — auto-loaded by Claude Code via `alwaysApply: true` frontmatter - `SoT/SoT.LESSONS_LEARNED.md` — new SoT file with LL-XXX prefix for cross-session behavioral corrections and validated patterns - Staleness protocol in `SoT/SoT.UNIQUE_ID_SYSTEM.md` — <30d current, 30-90d review, >90d verify before use - `MEMORY_ARCHIVE.md` for all 4 agents — stores entries promoted to SoT during Phase E harvest - `.claude/hooks/traceability-gate.sh` — PreToolUse hook (Write|Edit) verifies active EPIC before source code writes - `.claude/hooks/sot-sync-reminder.sh` — PostToolUse hook (Write|Edit) reminds agent to update SoT after code writes - EPIC template: coordinator pattern (multi-agent routing table, synthesis checkpoint, self-contained worker prompts) - EPIC template: memory harvest step in Phase E (agent memory → SoT.LESSONS_LEARNED.md) - EPIC template: session ownership/locking with Active Session field (2-hour staleness threshold) - Squad Status dashboard in README.md (agent activity + EPIC status tables) - Cross-agent communication protocol rule (file-based async via SoT cross-references, EPIC observations, session state blockers) - Git-based memory sync: `subagent-memory-save.sh` auto-stages MEMORY.md changes; commit convention `memory({agent}): {summary}` - `context` and `allowed-tools` frontmatter fields added to all 33 skills - `CLAUDE.local.md` added to `.gitignore` for per-developer overrides - Context loading order documented as intentional cache architecture (stable→volatile for prompt cache efficiency) ### Changed - **Agent renamed**: `werk` → `devlab` across all files (AGENT.md, domain-profile.yaml, CHANGELOG, MIGRATION, all cross-references in horizon/studio/metro AGENT.md files) - Agent MEMORY.md simplified from 5-8 complex tables → 4 sections (Feedback, Patterns, Decisions, Handoff Notes) — prior format was never populated - `subagent-memory-save.sh` upgraded from passive `systemMessage` → active `hookSpecificOutput` with `additionalContext` (matches load hook pattern) - CLAUDE.md slimmed from 114 lines → ~30 lines (pointer to `.claude/rules/`) - `settings.json` expanded from 5 hook events → 7 (added PreToolUse, PostToolUse) - HOOK_CONTRACT.md updated with new hooks inventory, git commit conventions, Python dependency note - `domain-profile.yaml` — added LL prefix, agent registry updated (werk → devlab) ### Breaking - **Agent `werk` removed** — renamed to `devlab`. Repos referencing `werk` in EPIC leads, agent routing, or custom hooks must update to `devlab` - **CLAUDE.md content moved** — rules now in `.claude/rules/*.md`. CLAUDE.md is a pointer only. Repos that grep CLAUDE.md for rule content must update to search `.claude/rules/` - **MEMORY.md format changed** — old tables replaced with 4-section format. Repos with populated MEMORY.md files should migrate content into the new sections - **settings.json schema expanded** — PreToolUse and PostToolUse entries added. Repos using `/localize` must re-sync settings.json
-
v3.1.0
GitHub ↗
Original release notes
## [3.1.0] — 2026-03-18 ### Added - `prd-v04-visual-prototype-gate` skill — converts SCR- entries into structured prompts for Google Stitch (or equivalent UI generation tool), captures stakeholder feedback routed back to SoT IDs. Sits between Screen Flow Definition and v0.5 Red Team Review. - `prd-v06-environment-setup` registered in domain-profile.yaml, skills-inventory.md, and DEVLAB agent (skill existed on disk but was missing from all registries) ### Changed - `.claude/domain-profile.yaml` — domain skills list updated (24 → 26 entries) - `.claude/skills/skills-inventory.md` — added Visual Prototype Gate and Environment Setup entries (Quick Nav, stage overview tables, full skill specs) - `.claude/agents/studio/AGENT.md` — added `prd-v04-visual-prototype-gate` to Skills I Invoke - `.claude/agents/devlab/AGENT.md` — added `prd-v06-environment-setup` to Skills I Invoke - `.claude/README.md` — updated v0.4 skill count (3 → 4) and v0.6 skill count (2 → 3) - Skill count: 26 → 28 PRD lifecycle skills + 5 methodology skills
-
v3.0.0
GitHub ↗
Original release notes
## [3.0.0] — 2026-02-12 ### Added - `.claude/VERSION` — single source of truth for template version - `CHANGELOG.md` — structural changes documented per version - `MIGRATION.md` — step-by-step migration guide for derivative repos - `<!-- SECTION: -->` and `<!-- CUSTOMIZABLE: -->` markers in all template files for merge-friendly syncing - `.claude/hooks/HOOK_CONTRACT.md` — universal hook interface specification (language-agnostic) - `.claude/hooks/context-validation.sh` — shell variant of SessionStart hook - `.claude/hooks/context-density-gate.sh` — shell variant of UserPromptSubmit hook - `.claude/hooks/sot-update-trigger.sh` — shell variant of Stop hook - `.claude/domain-profile.yaml` — parameterized ID prefixes, skill taxonomy (core vs domain), agent registry - Dependency manifests in all hook `.md` documentation files - `template_version` frontmatter field in CLAUDE.md, PRD.md, README_template.md, EPIC_TEMPLATE.md, SoT.README.md ### Changed - EPIC template sections: numbered (`## 0. Session State`) → semantic (`## Session State`) - CLAUDE.md: "Section 0" references → "Session State" semantic references - ID Ownership in CLAUDE.md now references `domain-profile.yaml` as canonical registry - `.claude/README.md` updated to reflect actual directory structure (agents, hooks, skills) - Agent files restructured: flat `.claude/agents/DEVLAB.md` → `.claude/agents/devlab/AGENT.md` + `MEMORY.md` ### Breaking - Agent paths changed: `agents/{NAME}.md` → `agents/{name}/AGENT.md` + `agents/{name}/MEMORY.md` - EPIC section headers no longer numbered — scripts referencing "Section 0" must update to "Session State" - See `MIGRATION.md` for complete derivative update checklist
-
v2.0.0
GitHub ↗
Original release notes
## [2.0.0] — 2026-01-12 ### Added - Complete skill library: 26 PRD lifecycle skills (v0.1–v0.9) + 5 methodology skills (ghm-*) (note: count updated to 28 in v3.1.0) - Skill-per-directory structure with SKILL.md + assets/ + references/ - 3 hooks: context-validation, context-density-gate, sot-update-trigger - Hook .md documentation paired with each script - 4 agent definitions: HORIZON, STUDIO, DEVLAB, METRO - 12 SoT files standardized to ~100-150 lines each - EPIC template with 5-phase execution model - Progressive documentation protocol in CLAUDE.md - README_template.md for derivative repos ### Changed - Standardized SoT files to consistent structure with YAML frontmatter - Methodology renamed to "PRD Led Context Engineering"
-
v1.0.0
GitHub ↗
Original release notes
## [1.0.0] — 2025-12-22 ### Added - Initial template structure - CLAUDE.md agent operating guide - PRD.md progressive requirements template - SoT directory with ID-based knowledge graph - EPIC template for execution planning - README.md methodology explainer
Current listing version
0.0.1
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 为PRD v0.6架构阶段提供高价值的API和数据模型定义能力
- 明确桥接架构设计与实施执行,解决开发团队核心痛点
- 输入输出定义清晰,支持端到端的技术规范生成
Highlights
- 触发词覆盖全面,包含多种技术规格相关术语变体
- 边界清晰,输入输出类型定义明确,不易误触或漏触
Areas to improve
-
文档长度超过500行 Reported severity: Minor
主文档内容较长,可能影响可读性和维护性
Recommendation: 考虑将部分内容拆分为引用文件,保持主文档简洁
-
缺少显式的'When to Use'章节 Reported severity: Minor
虽然上下文清晰,但缺少专门的使用场景说明章节
Recommendation: 添加'When to Use'章节明确使用时机和前提条件
Highlights
- 结构完整,包含详细的API和DBT模板
- 提供了验证清单和质量门禁,确保规范完整性
- 包含反模式指南,帮助避免常见设计错误
Highlights
- 工具选择恰当,支持完整的读写和搜索操作
- 流程定义清晰,依赖关系明确,异常处理覆盖全面
- 业务规则执行和数据一致性验证机制完善
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.