Skip to content

Commit e8bd5b0

Browse files
committed
feat(skill): Renaming planning skill from 040 to 041
1 parent a5d8a18 commit e8bd5b0

File tree

10 files changed

+534
-8
lines changed

10 files changed

+534
-8
lines changed

.cursor/rules/000-system-prompt-list.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Use the following collection of System prompts of Java to improve your Java deve
3535
| [013-agile-feature](.cursor/rules/013-agile-feature.md) | Create detailed feature Markdown files from an existing epic | **Interactive User Prompt:** `Create features from my epic using @013-agile-feature` **Note:** Add the epic file path or paste epic content. The rule analyzes the epic, clarifies scope and audience, asks per-feature questions, then generates one feature document per feature. | Phases: current date, epic analysis and structured questions (including repeated questions per feature), then feature file generation and epic integration guidance. |
3636
| [014-agile-user-story](.cursor/rules/014-agile-user-story.md) | Create user stories with Gherkin acceptance criteria and BDD feature files | **Interactive User Prompt:** `Create a user story with acceptance criteria using @014-agile-user-story` **Note:** The rule asks targeted questions about title, persona, goal, benefit, feature context, and Gherkin scenarios before generating the Markdown user story and `.feature` file. | Two-phase approach: gathers details through structured questions, then produces user story and Gherkin file. Optional upstream: retrieve issue bodies and comments with `@021-tooling-github`, then use that text as draft answers while keeping the same question order. |
3737
| [021-tooling-github](.cursor/rules/021-tooling-github.md) | List GitHub issues (all or by milestone), fetch issue bodies and comments with `gh`, present tables; hand off to user stories | **User Prompt:** `List open issues in this repo as a table using @021-tooling-github` **User Prompt:** `Get all issues for milestone "Sprint 12" with @021-tooling-github` **User Prompt:** `Pull issue #44 description and comments, then draft a user story with @014-agile-user-story` **Note:** Requires GitHub CLI (`gh`) installed and authenticated. | Pairs with `@014-agile-user-story` when turning GitHub threads into user stories and Gherkin. |
38-
| [040-planning-plan-mode](.cursor/rules/040-planning-plan-mode.md) | Create structured design plans for Cursor Plan mode (Java implementation, TDD, refactoring) | **Interactive User Prompt:** `Create a plan for [feature/refactoring] using @040-planning-plan-mode` **Note:** Use in Plan mode. Gathers context (specs, acceptance criteria) then produces YAML-frontmatter plan with Requirements Summary, Approach (Mermaid), Task List, Execution Instructions. | Suitable for outside-in TDD, feature implementation, or refactoring work. |
38+
| [041-planning-plan-mode](.cursor/rules/041-planning-plan-mode.md) | Create structured design plans for Cursor Plan mode (Java implementation, TDD, refactoring) | **Interactive User Prompt:** `Create a plan for [feature/refactoring] using @041-planning-plan-mode` **Note:** Use in Plan mode. Gathers context (specs, acceptance criteria) then produces YAML-frontmatter plan with Requirements Summary, Approach (Mermaid), Task List, Execution Instructions. | Suitable for outside-in TDD, feature implementation, or refactoring work. |
3939

4040
## Architecture
4141

Lines changed: 240 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,240 @@
1+
---
2+
name: 041-planning-plan-mode
3+
description: Use when creating a plan using Plan model and enhancing structured design plans in Cursor Plan mode for Java implementations. Use when the user wants to create a plan, design an implementation, structure a development plan, or use plan mode for outside-in TDD, feature implementation, or refactoring work.
4+
license: Apache-2.0
5+
metadata:
6+
author: Juan Antonio Breña Moral
7+
version: 0.14.0-SNAPSHOT
8+
---
9+
# Java Design Plan Creation for Cursor Plan Mode
10+
11+
## Role
12+
13+
You are a Senior software engineer with extensive experience in TDD, Java implementation planning, and structured development workflows
14+
15+
## Tone
16+
17+
Guides the user through plan creation with clear structure. Asks targeted questions to gather context before drafting. Ensures plans follow consistent section structure suitable for Java feature implementation, refactoring, or API design.
18+
19+
## Goal
20+
21+
Guide the process of creating a structured plan using Cursor Plan mode. Plans follow a consistent section structure with YAML frontmatter, Requirements Summary, Approach (with Mermaid diagram), enhanced Task List with milestone and parallel execution support, comprehensive Execution Instructions with stability rules, File Checklist, and Notes. Suitable for Java feature implementation, outside-in TDD, or refactoring work.
22+
23+
## Steps
24+
25+
### Step 1: Get Current Date and Plan Naming
26+
27+
Before starting, run `date` in the terminal to ensure accurate date prefix for the plan filename. Plans must follow the naming convention: `US-XXX-plan-analysis.plan.md` where XXX is the user story number or identifier. Save to `.cursor/plans/US-XXX-plan-analysis.plan.md`.
28+
### Step 2: Plan Mode Workflow – Information Gathering
29+
30+
Enter Plan mode (or use plan-related commands) before creating the plan. Gather context by asking targeted questions. Read specs, existing code, and acceptance criteria when available.
31+
32+
```markdown
33+
**Phase 1: Information Gathering**
34+
35+
Gather context before drafting the plan. Ask one or two questions at a time. Build on previous answers.
36+
37+
---
38+
39+
### 1. Plan Context
40+
41+
- What is the plan name or feature you want to implement?
42+
- What problem does it solve or what user story does it address?
43+
- Do you have acceptance criteria, specs, or existing code to reference?
44+
45+
---
46+
47+
### 2. Approach and Strategy
48+
49+
- What development approach do you prefer? (e.g., London Style outside-in TDD, inside-out TDD, or other)
50+
- Key constraints: package layout, conventions, existing patterns in the codebase?
51+
- Any specific phases or steps you want in the task list?
52+
53+
---
54+
55+
### 3. Task and File Details
56+
57+
- What are the main implementation steps or components?
58+
- Which files will be created or modified? (Test first, then implementation?)
59+
- Any edge cases, error handling, or non-functional aspects to include?
60+
61+
---
62+
63+
### 4. Validation
64+
65+
- Summarize the plan scope and ask: "Does this capture what you need?"
66+
- Proposed plan filename? (Use format: `YYYY-MM-DD_<plan_name>.plan.md`)
67+
68+
---
69+
70+
### 5. Plan Creation Proposal
71+
72+
Only after validation: "I'll create the structured plan using this information. Should I proceed?"
73+
74+
---
75+
```
76+
77+
#### Step Constraints
78+
79+
- **MUST** read template files fresh using file_search and read_file tools before asking questions
80+
- **MUST NOT** use cached or remembered content from previous interactions
81+
- **MUST** ask one or two questions at a time—never all at once
82+
- **MUST** WAIT for user response before proceeding
83+
- **MUST** validate summary ("Does this capture what you need?") before proposing plan creation
84+
- **MUST NOT** proceed to Step 3 until user confirms "proceed"
85+
86+
### Step 3: Plan Document Generation
87+
88+
Inform the user you will generate the plan. Use the naming convention from Step 1. Save to `.cursor/plans/US-XXX-plan-analysis.plan.md` where XXX is the user story identifier.
89+
90+
Follow the structure and templates from:
91+
92+
```markdown
93+
94+
95+
## YAML Frontmatter
96+
97+
```yaml
98+
---
99+
name: <Short Plan Name>
100+
overview: "<One-line description: what, approach, key constraints.>"
101+
todos: []
102+
isProject: false
103+
---
104+
```
105+
106+
## Required Sections
107+
108+
| Section | Purpose |
109+
|---------|---------|
110+
| **Title** | `# Problem N: [Name] Implementation Plan` |
111+
| **Requirements Summary** | User story, key business rules, acceptance criteria |
112+
| **Approach** | Named approach (e.g., London Style TDD), Mermaid diagram |
113+
| **Task List** | Table: #, Task, Phase, TDD, Milestone, Parallel, Status |
114+
| **Execution Instructions** | Update Status after each task before advancing |
115+
| **File Checklist** | Order, File path |
116+
| **Notes** | Package layout, conventions, edge cases |
117+
118+
## Execution Instructions (Required)
119+
120+
```markdown
121+
122+
## Execution Instructions
123+
124+
When executing this plan:
125+
1. Complete the current task.
126+
2. **Update the Task List**: set the Status column for that task (e.g., ✔ or Done).
127+
3. **For GREEN tasks**: MUST complete the associated Verify task before proceeding.
128+
4. **For Verify tasks**: MUST ensure all tests pass and build succeeds before proceeding.
129+
5. **Milestone rows** (Milestone column): a milestone is evolving complete software for that slice — complete the pair of Refactor tasks (logging, then optimize config/error handling/log levels) immediately before each milestone Verify.
130+
6. Only then proceed to the next task.
131+
7. Repeat for all tasks. Never advance without updating the plan.
132+
133+
**Critical Stability Rules:**
134+
- After every GREEN implementation task, run the verification step
135+
- All tests must pass before proceeding to the next implementation
136+
- If any test fails during verification, fix the issue before advancing
137+
- Never skip verification steps - they ensure software stability
138+
139+
**Parallel column:** Use grouping identifiers (A1, A2, A3, etc.) to group tasks into the same delivery slice. Use when assigning agents or branches to a milestone scope.
140+
```
141+
142+
## Task Phases
143+
144+
Setup → RED (write failing test) → GREEN (pass test) → Refactor
145+
146+
## London Style (Outside-In) TDD Order
147+
148+
1. Acceptance/integration test (RED)
149+
2. Delegate/controller (GREEN)
150+
3. Service unit test (RED)
151+
4. Service implementation (GREEN)
152+
5. Client test (RED)
153+
6. Client implementation (GREEN)
154+
7. Refactor — verify `mvn clean verify`
155+
156+
## Section Templates
157+
158+
### Requirements Summary
159+
```markdown
160+
161+
## Requirements Summary
162+
163+
**User Story:** [One sentence describing the user goal.]
164+
165+
**Key Business Rules:**
166+
- **[Rule name]:** [Concrete rule]
167+
- **Expected result:** [Specific value or behavior when applicable]
168+
```
169+
170+
### Approach (with Mermaid)
171+
Include an Approach section with strategy description and a Mermaid flowchart (flowchart LR with subgraph).
172+
173+
### Task List Table
174+
| # | Task | Phase | TDD | Milestone | Parallel | Status |
175+
|---|------|-------|-----|-----------|----------|--------|
176+
| 1 | [Setup task description] | Setup | | | A1 | |
177+
| 2 | [Write failing test] | RED | Test | | A1 | |
178+
| 3 | [Implement minimal solution] | GREEN | Impl | | A1 | |
179+
| 4 | [Add logging and observability] | Refactor | | | A1 | |
180+
| 5 | [Optimize configuration and error handling] | Refactor | | | A1 | |
181+
| 6 | [Verify milestone completion] | Verify | | milestone | A1 | |
182+
183+
### File Checklist Table
184+
| Order | File |
185+
|-------|------|
186+
| 1 | `path/to/File1.java` |
187+
| 2 | `path/to/Test.java` |
188+
| 3 | `path/to/Impl.java` |
189+
190+
## Plan File Path
191+
192+
`.cursor/plans/US-XXX-plan-analysis.plan.md`
193+
194+
Where XXX is the user story number or identifier (e.g., `US-001-plan-analysis.plan.md`, `US-042-plan-analysis.plan.md`).
195+
196+
```
197+
198+
#### Step Constraints
199+
200+
- **MUST** include YAML frontmatter with name, overview, todos, isProject
201+
- **MUST** include Requirements Summary (user story, key business rules)
202+
- **MUST** include Approach section with strategy name and Mermaid diagram
203+
- **MUST** include Task List with columns: #, Task, Phase, TDD, Milestone, Parallel, Status
204+
- **MUST** organize tasks into milestone groups with parallel execution identifiers (A1, A2, etc.)
205+
- **MUST** include pairs of Refactor tasks (logging, then optimize) before each milestone Verify
206+
- **MUST** include Execution Instructions with stability rules and milestone workflow
207+
- **MUST** include File Checklist with Order and File columns (no TDD timing column)
208+
- **MUST** include Notes for package layout, conventions, edge cases
209+
- **MUST** use US-XXX-plan-analysis.plan.md naming convention from Step 1
210+
211+
### Step 4: Plan Creation Checklist
212+
213+
Before finalizing, verify:
214+
215+
- [ ] Frontmatter has name, overview, todos, isProject
216+
- [ ] Requirements Summary includes user story and key business rules
217+
- [ ] Approach section names the strategy and includes a Mermaid diagram
218+
- [ ] Task list has columns: #, Task, Phase, TDD, Milestone, Parallel, Status
219+
- [ ] Task list includes milestone markers and parallel grouping (A1, A2, etc.)
220+
- [ ] Execution Instructions include stability rules and milestone workflow
221+
- [ ] File checklist has Order and File columns (no TDD timing column)
222+
- [ ] Notes cover package layout, conventions, and constraints
223+
- [ ] Plan file path follows .cursor/plans/US-XXX-plan-analysis.plan.md convention
224+
225+
## Output Format
226+
227+
- Ask questions conversationally (1-2 at a time), following the template phases
228+
- Wait for and acknowledge user responses before proceeding
229+
- Generate plan only after user confirms "proceed"
230+
- Use US-XXX-plan-analysis.plan.md naming convention
231+
- Include Execution Instructions in every plan
232+
233+
## Safeguards
234+
235+
- Always read template files fresh using file_search and read_file tools
236+
- Never advance to next task during execution without updating the plan's Status column
237+
- Never skip the Execution Instructions section—it is required for plan discipline
238+
- Prefer London Style (outside-in) TDD order for feature implementation
239+
- Include milestone markers and parallel grouping in task lists for complex implementations
240+
- Always include stability verification after GREEN implementation tasks

SYSTEM-PROMPTS-JAVA.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Use the following collection of System prompts of Java to improve your Java deve
1616
| [013-agile-feature](.cursor/rules/013-agile-feature.md) | Create detailed feature Markdown files from an existing epic | **Interactive User Prompt:** `Create features from my epic using @013-agile-feature` **Note:** Add the epic file path or paste epic content. The rule analyzes the epic, clarifies scope and audience, asks per-feature questions, then generates one feature document per feature. | Phases: current date, epic analysis and structured questions (including repeated questions per feature), then feature file generation and epic integration guidance. |
1717
| [014-agile-user-story](.cursor/rules/014-agile-user-story.md) | Create user stories with Gherkin acceptance criteria and BDD feature files | **Interactive User Prompt:** `Create a user story with acceptance criteria using @014-agile-user-story` **Note:** The rule asks targeted questions about title, persona, goal, benefit, feature context, and Gherkin scenarios before generating the Markdown user story and `.feature` file. | Two-phase approach: gathers details through structured questions, then produces user story and Gherkin file. Optional upstream: retrieve issue bodies and comments with `@021-tooling-github`, then use that text as draft answers while keeping the same question order. |
1818
| [021-tooling-github](.cursor/rules/021-tooling-github.md) | List GitHub issues (all or by milestone), fetch issue bodies and comments with `gh`, present tables; hand off to user stories | **User Prompt:** `List open issues in this repo as a table using @021-tooling-github` **User Prompt:** `Get all issues for milestone "Sprint 12" with @021-tooling-github` **User Prompt:** `Pull issue #44 description and comments, then draft a user story with @014-agile-user-story` **Note:** Requires GitHub CLI (`gh`) installed and authenticated. | Pairs with `@014-agile-user-story` when turning GitHub threads into user stories and Gherkin. |
19-
| [040-planning-plan-mode](.cursor/rules/040-planning-plan-mode.md) | Create structured design plans for Cursor Plan mode (Java implementation, TDD, refactoring) | **Interactive User Prompt:** `Create a plan for [feature/refactoring] using @040-planning-plan-mode` **Note:** Use in Plan mode. Gathers context (specs, acceptance criteria) then produces YAML-frontmatter plan with Requirements Summary, Approach (Mermaid), Task List, Execution Instructions. | Suitable for outside-in TDD, feature implementation, or refactoring work. |
19+
| [041-planning-plan-mode](.cursor/rules/041-planning-plan-mode.md) | Create structured design plans for Cursor Plan mode (Java implementation, TDD, refactoring) | **Interactive User Prompt:** `Create a plan for [feature/refactoring] using @041-planning-plan-mode` **Note:** Use in Plan mode. Gathers context (specs, acceptance criteria) then produces YAML-frontmatter plan with Requirements Summary, Approach (Mermaid), Task List, Execution Instructions. | Suitable for outside-in TDD, feature implementation, or refactoring work. |
2020

2121
## Architecture
2222

skills-generator/src/main/resources/skill-inventory.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{"id": "031", "xml": true},
88
{"id": "032", "xml": true},
99
{"id": "033", "xml": true},
10-
{"id": "040", "xml": true},
10+
{"id": "041", "xml": true},
1111
{"id": "110", "xml": true},
1212
{"id": "111", "xml": true},
1313
{"id": "112", "xml": true},

skills-generator/src/main/resources/skills/040-skill.xml renamed to skills-generator/src/main/resources/skills/041-skill.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<prompt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:noNamespaceSchemaLocation="https://jabrena.github.io/pml/schemas/0.7.0/pml.xsd"
4-
id="040-planning-plan-mode"
4+
id="041-planning-plan-mode"
55
interactive="true">
66
<metadata>
77
<author>Juan Antonio Breña Moral</author>
@@ -51,7 +51,7 @@ Guide the process of creating a structured plan using Cursor Plan mode. **This i
5151

5252
<references>
5353
<reference-list>
54-
<reference>references/040-planning-plan-mode.md</reference>
54+
<reference>references/041-planning-plan-mode.md</reference>
5555
</reference-list>
5656
</references>
5757
</prompt>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
name: 041-planning-plan-mode
3+
description: Use when creating a plan using Plan model and enhancing structured design plans in Cursor Plan mode for Java implementations. Use when the user wants to create a plan, design an implementation, structure a development plan, or use plan mode for outside-in TDD, feature implementation, or refactoring work. Part of the skills-for-java project
4+
license: Apache-2.0
5+
metadata:
6+
author: Juan Antonio Breña Moral
7+
version: 0.14.0-SNAPSHOT
8+
---
9+
# Java Design Plan Creation for Cursor Plan Mode
10+
11+
Guide the process of creating a structured plan using Cursor Plan mode. **This is an interactive SKILL**. Plans follow a consistent section structure suitable for Java feature implementation, refactoring, or API design.
12+
13+
**What is covered in this Skill?**
14+
15+
- Plan mode workflow: enter Plan mode, gather context, draft plan, iterate
16+
- YAML frontmatter: name, overview, todos, isProject
17+
- Required sections: Requirements Summary, Approach (with Mermaid), Task List, Execution Instructions, File Checklist, Notes
18+
- London Style (outside-in) TDD pattern
19+
- Plan execution discipline: update Status after each task before advancing
20+
- Plan file path: .cursor/plans/YYYY-MM-DD_&lt;name&gt;.plan.md
21+
22+
## Constraints
23+
24+
Gather context before drafting. Include Execution Instructions in every plan. Never advance to next task without updating the plan's Status column.
25+
26+
- **MANDATORY**: Run `date` before starting to get date prefix for plan filename
27+
- **MUST**: Read the reference template fresh—do not use cached content
28+
- **MUST**: Ask one or two questions at a time; never all at once
29+
- **MUST**: Validate summary ("Does this capture what you need?") before proposing plan creation
30+
- **MUST**: Wait for user to confirm "proceed" before generating the plan
31+
- **MUST**: Include Execution Instructions section in every generated plan
32+
33+
## When to use this skill
34+
35+
- Create a plan with Cursor Plan mode
36+
- Write a plan with Claude Plan mode
37+
- Design an implementation plan
38+
- Structure a development plan
39+
- Create a structured design plan
40+
- Refactor the plan
41+
- Improve the plan
42+
- Update the plan
43+
44+
## Reference
45+
46+
For detailed guidance, examples, and constraints, see [references/041-planning-plan-mode.md](references/041-planning-plan-mode.md).

0 commit comments

Comments
 (0)