Skip to content

Commit cf8966d

Browse files
authored
feat(skills): Improve structure of any SKILL.md with a defined Workflow (#683)
* feat(skills): Improve structure of any SKILL.md with a defined Workflow
1 parent 4eb79f3 commit cf8966d

26 files changed

Lines changed: 561 additions & 23 deletions

File tree

skills-generator/src/main/resources/skill-indexes/030-skill.xml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,8 @@ Generate Architecture Decision Records (ADRs) for Java projects through an inter
1919
- ADR file storage configuration
2020
- Conversational information gathering: context, stakeholders, decision drivers, options with pros/cons, outcome, consequences
2121
- MADR template generation
22-
- Validation with `./mvnw validate` or `mvn validate` before proceeding
2322
]]></goal>
2423

25-
<constraints>
26-
<constraints-description>Before applying any ADR generation, ensure the project validates. If validation fails, stop immediately — do not proceed until all validation errors are resolved.</constraints-description>
27-
<constraint-list>
28-
<constraint>**MANDATORY**: Run `./mvnw validate` or `mvn validate` before applying any ADR generation</constraint>
29-
<constraint>**SAFETY**: If validation fails, stop immediately — do not proceed until all validation errors are resolved</constraint>
30-
<constraint>**BEFORE APPLYING**: Read the reference for detailed good/bad examples, constraints, and safeguards for each ADR generation pattern</constraint>
31-
</constraint-list>
32-
</constraints>
33-
3424
<triggers>
3525
<trigger-list>
3626
<trigger>Generate ADR</trigger>
@@ -53,6 +43,21 @@ Generate Architecture Decision Records (ADRs) for Java projects through an inter
5343
</trigger-list>
5444
</triggers>
5545

46+
<steps>
47+
<step number="1">
48+
<step-title>Read ADR reference and gather context</step-title>
49+
<step-content>Read `references/030-architecture-adr-general.md`, then collect context, stakeholders, decision drivers, options, and trade-offs through conversation.</step-content>
50+
</step>
51+
<step number="2">
52+
<step-title>Synthesize and confirm decision</step-title>
53+
<step-content>Summarize recommended option, rationale, and consequences, and confirm alignment with the user before creating the ADR artifact.</step-content>
54+
</step>
55+
<step number="3">
56+
<step-title>Generate ADR output</step-title>
57+
<step-content>Create a MADR-style ADR document with the final decision, alternatives, consequences, and follow-up actions.</step-content>
58+
</step>
59+
</steps>
60+
5661
<references>
5762
<reference-list>
5863
<reference>references/030-architecture-adr-general.md</reference>

skills-generator/src/main/resources/skill-indexes/031-skill.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,31 @@ Guide stakeholders through a structured conversation to uncover and document tec
4444
</trigger-list>
4545
</triggers>
4646

47+
<steps>
48+
<step number="0">
49+
<step-title>Get current date</step-title>
50+
<step-content>Run `date` before discovery and use it for ADR timestamps.</step-content>
51+
</step>
52+
<step number="1">
53+
<step-title>Read reference and discover surface scope</step-title>
54+
<step-content>Read `references/031-architecture-adr-functional-requirements.md`, infer CLI/API scope from project context, and ask a short clarifying question if unclear.</step-content>
55+
</step>
56+
<step number="2">
57+
<step-title>Run conversational discovery</step-title>
58+
<step-content>Ask one or two questions at a time to capture context, functional requirements, and technical decisions for CLI, REST API, or both.</step-content>
59+
<step-constraints>
60+
<step-constraint-list>
61+
<step-constraint>Never ask all discovery questions at once</step-constraint>
62+
<step-constraint>Validate summary with user before proposing ADR generation</step-constraint>
63+
</step-constraint-list>
64+
</step-constraints>
65+
</step>
66+
<step number="3">
67+
<step-title>Generate ADR after explicit confirmation</step-title>
68+
<step-content>Only after user confirms "proceed", generate the ADR document and provide concise next steps.</step-content>
69+
</step>
70+
</steps>
71+
4772
<references>
4873
<reference-list>
4974
<reference>references/031-architecture-adr-functional-requirements.md</reference>

skills-generator/src/main/resources/skill-indexes/032-skill.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,31 @@ Guide stakeholders through a structured conversation to uncover and document arc
4545
</trigger-list>
4646
</triggers>
4747

48+
<steps>
49+
<step number="0">
50+
<step-title>Get current date</step-title>
51+
<step-content>Run `date` before discovery and use it for ADR timestamps.</step-content>
52+
</step>
53+
<step number="1">
54+
<step-title>Read reference and open with quality challenge</step-title>
55+
<step-content>Read `references/032-architecture-adr-non-functional-requirements.md` and begin with the challenge-first ISO 25010:2023 quality characteristics framing.</step-content>
56+
</step>
57+
<step number="2">
58+
<step-title>Run consultative NFR discovery</step-title>
59+
<step-content>Ask one or two questions at a time to capture drivers, constraints, quality priorities, options, and trade-off preferences tailored to the primary NFR category.</step-content>
60+
<step-constraints>
61+
<step-constraint-list>
62+
<step-constraint>Never ask all discovery questions at once</step-constraint>
63+
<step-constraint>Validate summary with user before proposing ADR generation</step-constraint>
64+
</step-constraint-list>
65+
</step-constraints>
66+
</step>
67+
<step number="3">
68+
<step-title>Generate ADR after explicit confirmation</step-title>
69+
<step-content>Only after user confirms "proceed", create the ADR including measurable Quality Metrics and Success Criteria.</step-content>
70+
</step>
71+
</steps>
72+
4873
<references>
4974
<reference-list>
5075
<reference>references/032-architecture-adr-non-functional-requirements.md</reference>

skills-generator/src/main/resources/skill-indexes/033-skill.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,35 @@ Generate comprehensive Java project diagrams through a modular, step-based inter
4747
</trigger-list>
4848
</triggers>
4949

50+
<steps>
51+
<step number="1">
52+
<step-title>Validate project state</step-title>
53+
<step-content>Run `./mvnw validate` or `mvn validate` before applying any diagram generation.</step-content>
54+
<step-constraints>
55+
<step-constraint-list>
56+
<step-constraint>If validation fails, stop and ask to resolve errors first</step-constraint>
57+
</step-constraint-list>
58+
</step-constraints>
59+
</step>
60+
<step number="2">
61+
<step-title>Read reference and configure diagram scope</step-title>
62+
<step-content>Read `references/033-architecture-diagrams.md`, identify requested diagram types, and confirm output organization strategy (single-file, separate-files, or integrated docs).</step-content>
63+
</step>
64+
<step number="3">
65+
<step-title>Generate PlantUML diagrams</step-title>
66+
<step-content>Create requested diagrams in PlantUML syntax (sequence, class, C4 levels 1-3 only, state machine, ER) using project inputs and context.</step-content>
67+
<step-constraints>
68+
<step-constraint-list>
69+
<step-constraint>Never generate C4 Level 4 (Code) diagrams</step-constraint>
70+
</step-constraint-list>
71+
</step-constraints>
72+
</step>
73+
<step number="4">
74+
<step-title>Validate and finalize outputs</step-title>
75+
<step-content>Check generated diagrams for syntax correctness and consistency with selected scope before final delivery.</step-content>
76+
</step>
77+
</steps>
78+
5079
<references>
5180
<reference-list>
5281
<reference>references/033-architecture-diagrams.md</reference>

skills-generator/src/main/resources/skill-indexes/041-skill.xml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Guide the process of creating a structured plan using Cursor Plan mode. **This i
2121
- Required sections: Requirements Summary, Approach (with Mermaid), Task List, Execution Instructions, File Checklist, Notes
2222
- London Style (outside-in) TDD pattern
2323
- Plan execution discipline: update Status after each task before advancing
24-
- Plan file path: .cursor/plans/YYYY-MM-DD_&lt;name&gt;.plan.md
24+
- Plan storage: ask user for preferred folder and filename convention before creating artifact
2525
]]></goal>
2626

2727
<constraints>
@@ -32,6 +32,7 @@ Guide the process of creating a structured plan using Cursor Plan mode. **This i
3232
<constraint>**MUST**: Ask one or two questions at a time; never all at once</constraint>
3333
<constraint>**MUST**: Validate summary ("Does this capture what you need?") before proposing plan creation</constraint>
3434
<constraint>**MUST**: Wait for user to confirm "proceed" before generating the plan</constraint>
35+
<constraint>**MUST**: Ask the user where they want to store the plan before generating the plan artifact</constraint>
3536
<constraint>**MUST**: Include Execution Instructions section in every generated plan</constraint>
3637
</constraint-list>
3738
</constraints>
@@ -49,6 +50,33 @@ Guide the process of creating a structured plan using Cursor Plan mode. **This i
4950
</trigger-list>
5051
</triggers>
5152

53+
<steps>
54+
<step number="0">
55+
<step-title>Get current date</step-title>
56+
<step-content>Run `date` before planning and use it to derive the plan filename prefix `YYYY-MM-DD`.</step-content>
57+
</step>
58+
<step number="1">
59+
<step-title>Read reference and gather context</step-title>
60+
<step-content>Read `references/041-planning-plan-mode.md` and ask one or two questions at a time to clarify requirements, constraints, and target scope.</step-content>
61+
</step>
62+
<step number="2">
63+
<step-title>Validate summary and confirm proceed</step-title>
64+
<step-content>Summarize understanding, ask "Does this capture what you need?", and wait for explicit "proceed" before creating the plan artifact.</step-content>
65+
</step>
66+
<step number="3">
67+
<step-title>Confirm plan storage location</step-title>
68+
<step-content>Ask where the user wants to store the plan (for example, `.cursor/plans/` or another folder) and confirm the target filename pattern before writing.</step-content>
69+
</step>
70+
<step number="4">
71+
<step-title>Generate structured plan artifact</step-title>
72+
<step-content>Create the plan at the confirmed location using required sections and YAML frontmatter, including Execution Instructions.</step-content>
73+
</step>
74+
<step number="5">
75+
<step-title>Apply execution discipline</step-title>
76+
<step-content>When executing tasks from the plan, update the Status column after each task before moving to the next one.</step-content>
77+
</step>
78+
</steps>
79+
5280
<references>
5381
<reference-list>
5482
<reference>references/041-planning-plan-mode.md</reference>

skills-generator/src/main/resources/skill-indexes/042-skill.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,29 @@ Guide the process of turning an implementation plan (`*.plan.md`) into an OpenSp
5151
</trigger-list>
5252
</triggers>
5353

54+
<steps>
55+
<step number="1">
56+
<step-title>Read and summarize plan input</step-title>
57+
<step-content>Read the provided `*.plan.md`, summarize scope, and identify candidate change-id and affected capabilities.</step-content>
58+
</step>
59+
<step number="2">
60+
<step-title>Check OpenSpec CLI and install gate</step-title>
61+
<step-content>Run `openspec --version`; if missing, provide npm installation guidance for macOS, Linux, and Windows before proceeding.</step-content>
62+
</step>
63+
<step number="3">
64+
<step-title>Initialize or detect OpenSpec project</step-title>
65+
<step-content>From the parent directory containing `openspec/`, run project checks and offer `openspec init` (without `--tools`) when initialization is needed.</step-content>
66+
</step>
67+
<step number="4">
68+
<step-title>Create or update change artifacts</step-title>
69+
<step-content>Explain whether this is a new or existing change, then create/update proposal, design, tasks, and spec deltas using a stable change-id.</step-content>
70+
</step>
71+
<step number="5">
72+
<step-title>Validate and close workflow</step-title>
73+
<step-content>Run `openspec validate --all`; when checklist tasks are complete, guide the user to archive the change with `openspec archive &lt;change-id&gt;`.</step-content>
74+
</step>
75+
</steps>
76+
5477
<references>
5578
<reference-list>
5679
<reference>references/042-planning-openspec.md</reference>

skills-generator/src/main/resources/skill-indexes/043-skill.xml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ Use **`gh`** to work with GitHub issues: **first** run an **interactive** check
3030
<constraint>**FIRST** (after gate): Verify `gh` is available before issuing subcommands</constraint>
3131
<constraint>**TABLES**: Prefer `--json` + markdown pipe tables for issue list summaries</constraint>
3232
<constraint>**THREAD**: For analysis, include body and all comments (or explicitly summarize with omissions noted)</constraint>
33-
<constraint>**014**: For user stories from issues, use `@014-agile-user-story` and align answers with GitHub-sourced text</constraint>
3433
</constraint-list>
3534
</constraints>
3635

@@ -44,6 +43,29 @@ Use **`gh`** to work with GitHub issues: **first** run an **interactive** check
4443
</trigger-list>
4544
</triggers>
4645

46+
<steps>
47+
<step number="1">
48+
<step-title>Run interactive install gate</step-title>
49+
<step-content>Check `gh --version`; if missing, stop and ask whether the user wants installation guidance before any issue operations.</step-content>
50+
</step>
51+
<step number="2">
52+
<step-title>Verify authentication and repository context</step-title>
53+
<step-content>Confirm `gh auth status`, authenticate if needed, and establish target repository context via `--repo` or git remote.</step-content>
54+
</step>
55+
<step number="3">
56+
<step-title>List issues and milestones</step-title>
57+
<step-content>Retrieve issues (optionally by milestone/state) using `gh issue list --json` and present summaries as markdown pipe tables.</step-content>
58+
</step>
59+
<step number="4">
60+
<step-title>Load full thread for analysis</step-title>
61+
<step-content>Read issue body and all comments via `gh issue view --json` or `--comments`, then provide evidence-based analysis.</step-content>
62+
</step>
63+
<step number="5">
64+
<step-title>Chain to user story workflow when requested</step-title>
65+
<step-content>When user asks for user stories and Gherkin from issues, hand off to `@014-agile-user-story` using GitHub-sourced content.</step-content>
66+
</step>
67+
</steps>
68+
4769
<references>
4870
<reference-list>
4971
<reference>references/043-planning-github-issues.md</reference>

skills-generator/src/main/resources/skill-indexes/044-skill.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,29 @@ Use **`jira`** to work with Jira issues: **first** run an **interactive** check
4444
</trigger-list>
4545
</triggers>
4646

47+
<steps>
48+
<step number="1">
49+
<step-title>Run interactive install gate</step-title>
50+
<step-content>Check `jira version`; if missing, stop and ask whether the user wants installation guidance before any issue operations.</step-content>
51+
</step>
52+
<step number="2">
53+
<step-title>Verify Jira CLI configuration</step-title>
54+
<step-content>Ensure Jira CLI is configured (site/account/token flow via CLI prompts) before running private workspace commands.</step-content>
55+
</step>
56+
<step number="3">
57+
<step-title>List issues with optional JQL</step-title>
58+
<step-content>Retrieve issues using basic listing or JQL filters and present summaries as markdown pipe tables.</step-content>
59+
</step>
60+
<step number="4">
61+
<step-title>Load issue details and discussion</step-title>
62+
<step-content>Read full issue descriptions and all comments for analysis, explicitly noting any omissions when summarizing.</step-content>
63+
</step>
64+
<step number="5">
65+
<step-title>Execute core Jira actions when requested</step-title>
66+
<step-content>Support create, assign, transition, and add-comment actions using CLI commands while avoiding secret exposure.</step-content>
67+
</step>
68+
</steps>
69+
4770
<references>
4871
<reference-list>
4972
<reference>references/044-planning-jira.md</reference>

skills-generator/src/main/resources/skill-indexes/110-skill.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,25 @@ Improve Maven POM configuration using industry-standard best practices.
4848
</trigger-list>
4949
</triggers>
5050

51+
<steps>
52+
<step number="1">
53+
<step-title>Validate project before recommendations</step-title>
54+
<step-content>Run `./mvnw validate` or `mvn validate` and stop if validation fails.</step-content>
55+
</step>
56+
<step number="2">
57+
<step-title>Read reference and analyze root POM</step-title>
58+
<step-content>Read `references/110-java-maven-best-practices.md`, then inspect root `pom.xml` structure, dependency management, plugin management, properties, and profiles.</step-content>
59+
</step>
60+
<step number="3">
61+
<step-title>Expand to full module tree when present</step-title>
62+
<step-content>If root has a `&lt;modules&gt;` section, read every child `pom.xml` and evaluate cross-module duplication, centralization opportunities, and version drift.</step-content>
63+
</step>
64+
<step number="4">
65+
<step-title>Provide prioritized best-practice recommendations</step-title>
66+
<step-content>Propose concrete, safe improvements aligned with Maven best practices and full-module findings.</step-content>
67+
</step>
68+
</steps>
69+
5170
<references>
5271
<reference-list>
5372
<reference>references/110-java-maven-best-practices.md</reference>

skills-generator/src/main/resources/skill-indexes/111-skill.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,25 @@ Add essential Maven dependencies that enhance code quality and safety through a
4141
</trigger-list>
4242
</triggers>
4343

44+
<steps>
45+
<step number="1">
46+
<step-title>Validate project before changes</step-title>
47+
<step-content>Run `./mvnw validate` or `mvn validate` and stop if validation fails.</step-content>
48+
</step>
49+
<step number="2">
50+
<step-title>Read dependency reference and ask guided questions</step-title>
51+
<step-content>Read `references/111-java-maven-dependencies.md` and ask one-by-one in strict order: JSpecify, conditional Enhanced Compiler Analysis, VAVR, and ArchUnit.</step-content>
52+
</step>
53+
<step number="3">
54+
<step-title>Add only selected dependencies</step-title>
55+
<step-content>Implement only the dependencies and scopes chosen by the user, preserving existing pom.xml structure.</step-content>
56+
</step>
57+
<step number="4">
58+
<step-title>Report trade-offs and next checks</step-title>
59+
<step-content>Summarize what was added, why, and any recommended follow-up validations or tooling alignment.</step-content>
60+
</step>
61+
</steps>
62+
4463
<references>
4564
<reference-list>
4665
<reference>references/111-java-maven-dependencies.md</reference>

0 commit comments

Comments
 (0)