home / skills / mduongvandinh / skills-java-spring / spring-openspec
This skill enables spec-driven Spring Boot development by aligning on OpenSpec requirements before coding, improving consistency and delivery.
npx playbooks add skill mduongvandinh/skills-java-spring --skill spring-openspecReview the files below or copy the command above to add this skill to your agents.
---
name: spring-openspec
version: 1.0.0
description: |
Spec-First Development with OpenSpec for Spring Boot.
Align on specifications before implementation begins.
triggers:
- "new feature"
- "spec first"
- "openspec"
- "specification"
- "proposal"
---
# OpenSpec - Spec-Driven Development
## Workflow
```
┌──────────────────────────────────────────────────────────────┐
│ OPENSPEC WORKFLOW │
│ │
│ ┌──────────┐ ┌──────────┐ ┌───────────┐ ┌────────┐│
│ │ PROPOSAL │───→│ REVIEW │───→│ IMPLEMENT │───→│ARCHIVE ││
│ │ │ │ │ │ │ │ ││
│ │ Draft │ │ Align │ │ Code │ │ Merge ││
│ │ Specs │ │ Together │ │ Tasks │ │ Specs ││
│ └──────────┘ └──────────┘ └───────────┘ └────────┘│
└──────────────────────────────────────────────────────────────┘
```
## Directory Structure
```
openspec/
├── AGENTS.md # Instructions for AI assistants
├── specs/ # Authoritative specifications
│ ├── auth/
│ ├── user/
│ └── order/
└── changes/ # Proposed modifications
└── feature-xxx/
├── proposal.md
├── tasks.md
└── spec-delta.md
```
## Commands
| Command | Description |
|---------|-------------|
| `/openspec-proposal <name>` | Create new proposal |
| `/openspec-review` | Review and align |
| `/openspec-implement <name>` | Implement from spec |
| `/openspec-archive <name>` | Archive completed feature |
## Proposal Template
```markdown
# Proposal: Feature Name
## Objective
What we want to achieve.
## Scope
- Item 1
- Item 2
## Out of Scope
- Not included
## Success Criteria
- Criterion 1
- Criterion 2
## Dependencies
- Dependency 1
```
## Spec Template
```markdown
# Feature Specification
## API Endpoint
POST /api/v1/resource
...
## Business Rules
1. Rule 1
2. Rule 2
## Data Model
@Entity...
## Sequence Diagram
Client -> Controller -> Service -> Repository
```
## Reference in Code
```java
/**
* Service description.
*
* @spec openspec/specs/feature/spec-name.md
*/
@Service
public class MyService {
// Implementation
}
```
This skill enables spec-first development for Spring Boot projects using OpenSpec. It helps teams create, review, implement, and archive authoritative API and feature specifications before writing code. The workflow integrates proposals, reviews, implementation tasks, and archival steps to keep specs and code aligned.
The skill organizes specifications in a dedicated specs directory and tracks proposed changes in a changes area. Commands create proposals, trigger reviews, scaffold implementation tasks, and archive completed features. It also provides templates for proposals and full feature specifications so developers and AI agents reference the authoritative source while implementing code in Java Spring.
How do I start a new feature proposal?
Use the proposal command to create a new proposal file and fill the template with objective, scope, and success criteria.
Where should I put authoritative API definitions?
Store them in the specs directory and reference the spec path in service code comments so implementation traces back to the spec.