Pdd generate spec

From wonderslife/pdd-skills · View interactive version

Pdd generate spec is an AI agent skill from the GitHub repository wonderslife/pdd-skills. Generate development specifications and acceptance criteria based on feature point matrix. Invoke this Skill when users want to generate technical specifications for feature points. 支持中文触发:生成开发规格、生成规格、规格设计、验收标准、PDD规格生成。

How to use this skill

Skill file

Specification Generation - Generate development specifications and acceptance criteria based on feature points

Input: Feature Point Matrix (feature-matrix.md)

Output:


Version History

| Version | Date | Changes |

|-----|------|---------|

| 2.1 | 2026-03-22 | Added document system specifications, PDD implementation specification references |

| 2.0 | 2026-03-21 | Added architect consultation process |

| 1.0 | Early | Initial version |


1. Skill Integration

1.1 Architect Consultation

During the specification generation process, architect skills can be invoked as needed:

| Architect Skill | Invocation Timing | Service Content |

|-----------|---------|---------|

| system-architect | Technology selection, system architecture | Technology stack recommendations, architecture decisions, system structure |

| software-architect | Module division, interface design | Module boundaries, interface specifications, design patterns |

1.2 Invocation Conditions

Must invoke system-architect:

Must invoke software-architect:


2. Process Steps

Step 1: Read Feature Point Matrix

Read the feature point list and details from dev-specs/feature-matrix.md.

Step 2: Determine Technology Stack

Determine the technology stack based on project configuration:

Architecture Consultation (As Needed):

If new technology selection is involved, invoke system-architect for recommendations.

Step 3: Module Design

Analyze the modules to which feature points belong:

Architecture Consultation (As Needed):

If module boundaries are unclear, invoke software-architect for recommendations.

Step 4: Generate Specifications for Each Feature Point

Process feature points in priority order:

a. Analyze Feature Point Requirements

b. Design Interfaces

Interface Naming Conventions:

| Operation Type | Interface Path | Request Method |

|----------|----------|----------|

| List Query | /api/{module}/list | GET |

| Detail Query | /api/{module}/{id} | GET |

| Create | /api/{module} | POST |

| Update | /api/{module} | PUT |

| Delete | /api/{module}/{id} | DELETE |

| Approval Operation | /api/{module}/approve | POST |

| Reject Operation | /api/{module}/reject | POST |

| Terminate Operation | /api/{module}/terminate | POST |

c. Design Data Model

Data model naming conventions:

| Type | Naming Convention | Example |

|------|----------|------|

| Entity Class | {BusinessName} | TransferApplication |

| Primary Key | id | id |

| Creation Time | createTime | createTime |

| Update Time | updateTime | updateTime |

| Creator | createBy | createBy |

| Updater | updateBy | updateBy |

| Status | status | status |

| Delete Flag | delFlag | delFlag |

d. Design Business Logic

Architecture Consultation (As Needed):

If business logic is complex, invoke software-architect for design recommendations.

e. Design Test Cases

Step 5: Generate Development Specification Document

Output to dev-specs/FP-{sequence}/spec.md:

# {Feature Point Name} Development Specification

## Document Information
| Item | Content |
|------|------|
| Specification ID | SPEC-{ModuleNumber}-{FeaturePointSequence} |
| Related Feature Point | FP-XXX-NNN |

## Interface Definition
### Interface 1: {Interface Name}
- Interface Path: `/api/xxx`
- Request Method: POST
- Request Parameters: [...]
- Response Structure: {...}
- Error Codes: [...]

## Data Model
### Entity: {Entity Name}
| Field Name | Type | Required | Description |

## Business Logic
### Processing Flow
### Validation Rules
### State Transitions

## Test Cases
### Positive Scenarios
### Exception Scenarios
### Boundary Conditions

Step 6: Generate Acceptance Criteria Document

Output to dev-specs/FP-{sequence}/checklist.md:

# {Feature Point Name} Acceptance Criteria

## Document Information
| Item | Content |
|------|------|
| Acceptance Criteria ID | AC-{ModuleNumber}-{FeaturePointSequence} |

## Business Acceptance
| No. | Acceptance Scenario | Expected Result | Verification Method | Status |

## Technical Acceptance
| No. | Acceptance Item | Standard | Status |

## Integration Acceptance
| No. | Acceptance Item | Verification Method | Status |

Step 7: Generate Code Framework (Optional)

For P0 feature points, generate code framework:


3. Architecture Consultation Process

pdd-generate-spec starts
    │
    ├─► Identify technology selection needs
    │       │
    │       ▼
    │   system-architect consultation
    │       │
    │       ▼
    │   Return technology stack recommendations
    │
    ├─► Identify module design needs
    │       │
    │       ▼
    │   software-architect consultation
    │       │
    │       ▼
    │   Return module boundary recommendations
    │
    └─► Continue generating specifications

3.1 system-architect Invocation Example

Trigger Condition: Need to introduce new technology stack
Invoke: system-architect
Input:
  - Feature Requirements: Message push functionality
  - Constraints: Need to support multi-channel push
  - Existing Technology Stack: Spring Boot

Return:
  - Technology selection recommendations
  - Architecture Decision Record (ADR)
  - Project structure recommendations

3.2 software-architect Invocation Example

Trigger Condition: Unclear module boundaries
Invoke: software-architect
Input:
  - Feature Requirements: Transfer application and approval module
  - Existing Modules: Asset management base module
  - Complexity: High

Return:
  - Module division plan
  - Interface boundary definition
  - Design pattern recommendations

4. Guardrails


5. Collaboration with Other Skills

| Collaborative Skill | Collaboration Method | Input Data | Expected Output |

|---------|---------|---------|---------|

| system-architect | Consultation | Technical requirements, constraints | Technology selection, architecture decisions |

| software-architect | Consultation | Module requirements, interface design | Module division, interface specifications |

| pdd-implement-feature | Sequential | spec.md, checklist.md | Code implementation |

| pdd-code-reviewer | Sequential | Code + specifications | Review report |


6. Document System Specifications

This Skill follows the PDD framework document system specifications.

6.1 Output Documents

| Document Type | File Name | Core Content |

|---------|--------|---------|

| Development Specification | spec.md | Interface design, data model, business logic, technical implementation |

| Acceptance Criteria | checklist.md | Acceptance items, acceptance conditions, acceptance methods |

6.2 Naming Conventions

dev-specs/FP-{ModuleNumber}-{Sequence}/
├── spec.md
└── checklist.md

6.3 Version Management


7. PDD Implementation Specification Reference

This Skill follows the PDD framework implementation specifications, see pdd-framework-design.md Chapter 9.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.