@schilling.mark.a/software-methodology 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/copilot-instructions.md +106 -0
- package/LICENSE +21 -0
- package/README.md +174 -0
- package/atdd-workflow/SKILL.md +117 -0
- package/atdd-workflow/references/green-phase.md +38 -0
- package/atdd-workflow/references/red-phase.md +62 -0
- package/atdd-workflow/references/refactor-phase.md +75 -0
- package/bdd-specification/SKILL.md +88 -0
- package/bdd-specification/references/example-mapping.md +105 -0
- package/bdd-specification/references/gherkin-patterns.md +214 -0
- package/cicd-pipeline/SKILL.md +64 -0
- package/cicd-pipeline/references/deployment-rollback.md +176 -0
- package/cicd-pipeline/references/environment-promotion.md +159 -0
- package/cicd-pipeline/references/pipeline-stages.md +198 -0
- package/clean-code/SKILL.md +77 -0
- package/clean-code/references/behavioral-patterns.md +329 -0
- package/clean-code/references/creational-patterns.md +197 -0
- package/clean-code/references/enterprise-patterns.md +334 -0
- package/clean-code/references/solid.md +230 -0
- package/clean-code/references/structural-patterns.md +238 -0
- package/continuous-improvement/SKILL.md +69 -0
- package/continuous-improvement/references/measurement.md +133 -0
- package/continuous-improvement/references/process-update.md +118 -0
- package/continuous-improvement/references/root-cause-analysis.md +144 -0
- package/dist/atdd-workflow.skill +0 -0
- package/dist/bdd-specification.skill +0 -0
- package/dist/cicd-pipeline.skill +0 -0
- package/dist/clean-code.skill +0 -0
- package/dist/continuous-improvement.skill +0 -0
- package/dist/green-implementation.skill +0 -0
- package/dist/product-strategy.skill +0 -0
- package/dist/story-mapping.skill +0 -0
- package/dist/ui-design-system.skill +0 -0
- package/dist/ui-design-workflow.skill +0 -0
- package/dist/ux-design.skill +0 -0
- package/dist/ux-research.skill +0 -0
- package/docs/INTEGRATION.md +229 -0
- package/docs/QUICKSTART.md +126 -0
- package/docs/SHARING.md +828 -0
- package/docs/SKILLS.md +296 -0
- package/green-implementation/SKILL.md +155 -0
- package/green-implementation/references/angular-patterns.md +239 -0
- package/green-implementation/references/common-rejections.md +180 -0
- package/green-implementation/references/playwright-patterns.md +321 -0
- package/green-implementation/references/rxjs-patterns.md +161 -0
- package/package.json +57 -0
- package/product-strategy/SKILL.md +71 -0
- package/product-strategy/references/business-model-canvas.md +199 -0
- package/product-strategy/references/canvas-alignment.md +108 -0
- package/product-strategy/references/value-proposition-canvas.md +159 -0
- package/project-templates/context.md.template +56 -0
- package/project-templates/test-strategy.md.template +87 -0
- package/story-mapping/SKILL.md +104 -0
- package/story-mapping/references/backbone.md +66 -0
- package/story-mapping/references/release-planning.md +92 -0
- package/story-mapping/references/task-template.md +78 -0
- package/story-mapping/references/walking-skeleton.md +63 -0
- package/ui-design-system/SKILL.md +48 -0
- package/ui-design-system/references/accessibility.md +134 -0
- package/ui-design-system/references/components.md +257 -0
- package/ui-design-system/references/design-tokens.md +209 -0
- package/ui-design-system/references/layout.md +136 -0
- package/ui-design-system/references/typography.md +114 -0
- package/ui-design-workflow/SKILL.md +90 -0
- package/ui-design-workflow/references/acceptance-targets.md +144 -0
- package/ui-design-workflow/references/component-selection.md +108 -0
- package/ui-design-workflow/references/scenario-to-ui.md +151 -0
- package/ui-design-workflow/references/screen-flows.md +116 -0
- package/ux-design/SKILL.md +75 -0
- package/ux-design/references/information-architecture.md +144 -0
- package/ux-design/references/interaction-patterns.md +141 -0
- package/ux-design/references/onboarding.md +159 -0
- package/ux-design/references/usability-evaluation.md +132 -0
- package/ux-research/SKILL.md +75 -0
- package/ux-research/references/journey-mapping.md +168 -0
- package/ux-research/references/mental-models.md +106 -0
- package/ux-research/references/personas.md +102 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Software Methodology Skills for GitHub Copilot
|
|
2
|
+
|
|
3
|
+
This repository contains a comprehensive software development methodology — from product strategy through production deployment. As GitHub Copilot, you can help developers apply these skills effectively.
|
|
4
|
+
|
|
5
|
+
## Available Skills
|
|
6
|
+
|
|
7
|
+
This methodology consists of 11 skills that form a development chain:
|
|
8
|
+
|
|
9
|
+
1. **product-strategy** — Business Model Canvas and Value Proposition Canvas (foundation — run first)
|
|
10
|
+
2. **ux-research** — Personas, mental models, and user journey maps
|
|
11
|
+
3. **story-mapping** — Organizing user activities and tasks into backbone and releases
|
|
12
|
+
4. **bdd-specification** — Writing Gherkin specifications via example mapping
|
|
13
|
+
5. **ux-design** — Information architecture, interaction patterns, usability evaluation, onboarding
|
|
14
|
+
6. **ui-design-workflow** — Screen flows, component selection, acceptance targets
|
|
15
|
+
7. **ui-design-system** — Design tokens, typography, layout, components, accessibility (reference skill)
|
|
16
|
+
8. **atdd-workflow** — RED-GREEN-REFACTOR implementation driven by acceptance tests
|
|
17
|
+
9. **clean-code** — SOLID principles and design patterns (reference skill)
|
|
18
|
+
10. **cicd-pipeline** — Pipeline stages, environment promotion, deployment and rollback
|
|
19
|
+
11. **continuous-improvement** — Measurement, root cause analysis, process updates (feeds back upstream)
|
|
20
|
+
|
|
21
|
+
## How to Use These Skills with Copilot
|
|
22
|
+
|
|
23
|
+
### When suggesting code or architecture:
|
|
24
|
+
|
|
25
|
+
1. **Check for business context first**: Look for `/docs/business-model-canvas.md` and `/docs/value-proposition-canvas.md`
|
|
26
|
+
2. **Understand user needs**: Reference `/docs/personas/` and `/docs/user-journey-maps/`
|
|
27
|
+
3. **Follow the ubiquitous language**: Check `/docs/ubiquitous-language.md` for domain terms
|
|
28
|
+
4. **Align with test strategy**: Read `/docs/test-strategy.md` before suggesting test code
|
|
29
|
+
5. **Apply clean code principles**: Reference `clean-code/references/` for SOLID principles and design patterns
|
|
30
|
+
|
|
31
|
+
### When the developer asks about methodology:
|
|
32
|
+
|
|
33
|
+
Point them to the relevant skill's `SKILL.md` file:
|
|
34
|
+
- Product strategy questions → `product-strategy/SKILL.md`
|
|
35
|
+
- Testing approach → `atdd-workflow/SKILL.md`
|
|
36
|
+
- Design patterns → `clean-code/SKILL.md`
|
|
37
|
+
- CI/CD setup → `cicd-pipeline/SKILL.md`
|
|
38
|
+
|
|
39
|
+
### When writing code:
|
|
40
|
+
|
|
41
|
+
1. **Use the test-first approach**: Reference `atdd-workflow/SKILL.md` for the RED-GREEN-REFACTOR cycle
|
|
42
|
+
2. **Follow clean code patterns**: Consult `clean-code/references/solid.md` and pattern files
|
|
43
|
+
3. **Match existing architecture**: Look for project structure in `/docs/architecture.md` or similar
|
|
44
|
+
4. **Respect the test strategy**: Use test commands and patterns from `/docs/test-strategy.md`
|
|
45
|
+
|
|
46
|
+
### Integration Points
|
|
47
|
+
|
|
48
|
+
The skills read from and write to specific files:
|
|
49
|
+
|
|
50
|
+
- **Business context**: `/docs/business-model-canvas.md`, `/docs/value-proposition-canvas.md`
|
|
51
|
+
- **User research**: `/docs/personas/`, `/docs/mental-models/`, `/docs/user-journey-maps/`
|
|
52
|
+
- **Planning**: `/docs/story-map/backbone.md`, `/docs/story-map/releases/*.md`
|
|
53
|
+
- **Specifications**: `/features/*.feature` (Gherkin format)
|
|
54
|
+
- **Tests**: Location defined in `/docs/test-strategy.md`
|
|
55
|
+
- **Design**: `/docs/design-system/`, `/docs/screen-flows/`
|
|
56
|
+
|
|
57
|
+
## Skill Details
|
|
58
|
+
|
|
59
|
+
Each skill has:
|
|
60
|
+
- **SKILL.md** — Entry point defining when to use it and what it produces
|
|
61
|
+
- **references/** — Detailed guidance documents loaded on demand
|
|
62
|
+
|
|
63
|
+
For example:
|
|
64
|
+
- `clean-code/SKILL.md` — Routes to the appropriate design pattern
|
|
65
|
+
- `clean-code/references/solid.md` — Detailed SOLID principles
|
|
66
|
+
- `clean-code/references/structural-patterns.md` — Structural patterns reference
|
|
67
|
+
|
|
68
|
+
## Suggesting Next Steps
|
|
69
|
+
|
|
70
|
+
When a developer completes work in one area, suggest the logical next skill:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
product-strategy → ux-research → story-mapping → bdd-specification →
|
|
74
|
+
ux-design → ui-design-workflow → atdd-workflow → cicd-pipeline →
|
|
75
|
+
continuous-improvement (feeds back to any upstream skill)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Reference skills** (consulted during other steps):
|
|
79
|
+
- `ui-design-system` — Used during `ui-design-workflow`
|
|
80
|
+
- `clean-code` — Used during `atdd-workflow` GREEN and REFACTOR phases
|
|
81
|
+
|
|
82
|
+
## Examples
|
|
83
|
+
|
|
84
|
+
**Developer asks**: "How should I structure this user service?"
|
|
85
|
+
|
|
86
|
+
**Copilot response**:
|
|
87
|
+
1. Check `/docs/value-proposition-canvas.md` for user-related jobs and pains
|
|
88
|
+
2. Reference `clean-code/references/solid.md` for Single Responsibility Principle
|
|
89
|
+
3. Look at `atdd-workflow/SKILL.md` for the test-driven approach
|
|
90
|
+
4. Suggest a clean architecture with domain, application, and infrastructure layers
|
|
91
|
+
|
|
92
|
+
**Developer asks**: "What tests should I write?"
|
|
93
|
+
|
|
94
|
+
**Copilot response**:
|
|
95
|
+
1. Read `/docs/test-strategy.md` for project-specific test commands
|
|
96
|
+
2. Reference `atdd-workflow/SKILL.md` for RED-GREEN-REFACTOR workflow
|
|
97
|
+
3. Check `/features/*.feature` files for related Gherkin scenarios
|
|
98
|
+
4. Suggest acceptance tests first, then unit tests for edge cases
|
|
99
|
+
|
|
100
|
+
## Important Reminders
|
|
101
|
+
|
|
102
|
+
- **Always start with business value**: Reference the VPC before suggesting features
|
|
103
|
+
- **Test-first development**: RED phase before GREEN phase (see `atdd-workflow/SKILL.md`)
|
|
104
|
+
- **Use ubiquitous language**: Domain terms from `/docs/ubiquitous-language.md`
|
|
105
|
+
- **Patterns over code**: Suggest patterns from `clean-code/references/` before generating code
|
|
106
|
+
- **Incremental delivery**: Align with release plan in `/docs/story-map/releases/`
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mark Schilling
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# software-methodology
|
|
2
|
+
|
|
3
|
+
A comprehensive software development methodology from product strategy through production deployment. Eleven skills, each with a clear scope and a defined position in the chain. Together they form a closed loop: the last skill (continuous-improvement) feeds findings back into any skill upstream.
|
|
4
|
+
|
|
5
|
+
**Works with:** Claude Code, GitHub Copilot, VS Code, and other AI coding assistants.
|
|
6
|
+
|
|
7
|
+
**Quick Start:** See [`docs/QUICKSTART.md`](docs/QUICKSTART.md) | **Skills Index:** [`docs/SKILLS.md`](docs/SKILLS.md) | **Sharing Guide:** [`docs/SHARING.md`](docs/SHARING.md)
|
|
8
|
+
|
|
9
|
+
## The Chain
|
|
10
|
+
|
|
11
|
+
Skills execute in this order. Two skills (marked with `*`) are references consulted during other steps rather than executed sequentially.
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
product-strategy → Business Model Canvas and Value Proposition Canvas
|
|
15
|
+
ux-research → Personas, mental models, user journey maps
|
|
16
|
+
story-mapping → Backbone activities, tasks, release sequencing
|
|
17
|
+
bdd-specification → Gherkin feature files via example mapping
|
|
18
|
+
ux-design → Information architecture, interaction patterns, usability evaluation, onboarding
|
|
19
|
+
ui-design-workflow → Screen flows, component selection, acceptance targets
|
|
20
|
+
ui-design-system * → Design tokens, typography, layout, components, accessibility
|
|
21
|
+
atdd-workflow → RED-GREEN-REFACTOR implementation driven by acceptance tests
|
|
22
|
+
clean-code * → SOLID principles and design patterns
|
|
23
|
+
cicd-pipeline → Pipeline stages, environment promotion, deployment and rollback
|
|
24
|
+
continuous-improvement → Measurement, root cause analysis, process updates (feeds back upstream)
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
`ui-design-system` is consulted by `ui-design-workflow`. `clean-code` is consulted by `atdd-workflow` during GREEN and REFACTOR phases.
|
|
28
|
+
|
|
29
|
+
## Repo Structure
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
software-methodology/
|
|
33
|
+
├── dist/ ← Packaged .skill files (these are what you deploy)
|
|
34
|
+
│ ├── product-strategy.skill
|
|
35
|
+
│ ├── ux-research.skill
|
|
36
|
+
│ └── ...
|
|
37
|
+
├── product-strategy/ ← Source for each skill
|
|
38
|
+
│ ├── SKILL.md ← Entry point: triggers, workflow, decision routing
|
|
39
|
+
│ └── references/ ← Detail files, loaded on demand
|
|
40
|
+
│ ├── business-model-canvas.md
|
|
41
|
+
│ └── ...
|
|
42
|
+
├── ux-research/
|
|
43
|
+
├── story-mapping/
|
|
44
|
+
├── ...
|
|
45
|
+
└── project-templates/ ← Starting templates for new projects
|
|
46
|
+
├── context.md.template ← The file Claude Code reads at session start
|
|
47
|
+
└── test-strategy.md.template
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
`.skill` files are zip archives with a different extension — that is the format Claude expects. They will appear empty or opaque in most file browsers and editors. If you need to inspect the contents of one, rename it to `.zip` and extract it, or run `unzip -l <file>.skill` to list its contents. The human-readable source for every skill lives in the named directories alongside `dist/` — that is where you read and edit.
|
|
51
|
+
|
|
52
|
+
Each skill follows the same internal structure. `SKILL.md` is the entry point — it defines when the skill runs, routes to the relevant reference file, and stays under ~75 lines. All detail lives in `references/`. This keeps each skill's cognitive load low: Claude reads `SKILL.md`, then loads only the one reference it needs.
|
|
53
|
+
|
|
54
|
+
## Usage
|
|
55
|
+
|
|
56
|
+
The methodology supports multiple AI coding assistants. Choose the approach that fits your workflow:
|
|
57
|
+
|
|
58
|
+
### Using with Claude Code
|
|
59
|
+
|
|
60
|
+
**1. Deploy the skills.**
|
|
61
|
+
|
|
62
|
+
Copy the `.skill` files from `dist/` into your project's skill directory:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
/mnt/skills/user/product-strategy.skill
|
|
66
|
+
/mnt/skills/user/ux-research.skill
|
|
67
|
+
/mnt/skills/user/story-mapping.skill
|
|
68
|
+
...
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**2. Bootstrap your project.**
|
|
72
|
+
|
|
73
|
+
Create two files in your project's `/docs/` directory from the templates in `project-templates/`:
|
|
74
|
+
|
|
75
|
+
- `context.md` — tells Claude Code which skills are available and where to find project documents. Fill in the project-specific sections (name, tech stack, architecture).
|
|
76
|
+
- `test-strategy.md` — defines the testing tools, commands, and coverage thresholds for your project. atdd-workflow and cicd-pipeline both read this.
|
|
77
|
+
|
|
78
|
+
**3. Start with product-strategy.**
|
|
79
|
+
|
|
80
|
+
Before any other skill runs, create the Business Model Canvas and Value Proposition Canvas. Every downstream skill reads from these. Nothing else can start without them.
|
|
81
|
+
|
|
82
|
+
**4. Follow the chain.**
|
|
83
|
+
|
|
84
|
+
Each skill's `SKILL.md` tells you what to read before starting and what it produces. The chain is the workflow. Run skills in order for a new product. Jump to the relevant skill when iterating on an existing one.
|
|
85
|
+
|
|
86
|
+
### Using with GitHub Copilot / VS Code
|
|
87
|
+
|
|
88
|
+
**1. Clone or reference this repository.**
|
|
89
|
+
|
|
90
|
+
Add this repository as a submodule or reference in your project:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# As a submodule
|
|
94
|
+
git submodule add https://github.com/MarkSchilling/software-methodology.git methodology
|
|
95
|
+
|
|
96
|
+
# Or clone separately
|
|
97
|
+
git clone https://github.com/MarkSchilling/software-methodology.git
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**2. GitHub Copilot reads the instructions automatically.**
|
|
101
|
+
|
|
102
|
+
The `.github/copilot-instructions.md` file tells Copilot how to use the skills. Copilot will:
|
|
103
|
+
- Suggest which skill applies to your current task
|
|
104
|
+
- Reference the appropriate `SKILL.md` and reference files
|
|
105
|
+
- Guide you through the methodology chain
|
|
106
|
+
|
|
107
|
+
**3. Use the Skills Index for navigation.**
|
|
108
|
+
|
|
109
|
+
Open [`docs/SKILLS.md`](docs/SKILLS.md) for a complete index with links to all skills and their references. This provides quick navigation to any skill's documentation.
|
|
110
|
+
|
|
111
|
+
**4. Optional: Open the workspace in VS Code.**
|
|
112
|
+
|
|
113
|
+
For enhanced navigation with folder organization:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
code .vscode/software-methodology.code-workspace
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
This opens a multi-folder workspace with each skill organized and labeled with emojis for easy identification.
|
|
120
|
+
|
|
121
|
+
**5. Ask Copilot for methodology guidance.**
|
|
122
|
+
|
|
123
|
+
In VS Code or GitHub, ask Copilot questions like:
|
|
124
|
+
- "Which skill should I use for writing feature specifications?"
|
|
125
|
+
- "How do I implement the RED-GREEN-REFACTOR cycle?"
|
|
126
|
+
- "What design patterns should I consider?"
|
|
127
|
+
|
|
128
|
+
Copilot will reference the appropriate skill files and guide you through the process.
|
|
129
|
+
|
|
130
|
+
### General Workflow (All Tools)
|
|
131
|
+
|
|
132
|
+
1. **Start with product-strategy** — Create Business Model Canvas and Value Proposition Canvas
|
|
133
|
+
2. **Follow the chain** — Each skill's `SKILL.md` defines prerequisites and outputs
|
|
134
|
+
3. **Use reference skills** — `ui-design-system` and `clean-code` are consulted during other steps
|
|
135
|
+
4. **Close the loop** — `continuous-improvement` feeds insights back to upstream skills
|
|
136
|
+
|
|
137
|
+
## Contributing
|
|
138
|
+
|
|
139
|
+
**Editing a skill:** Edit the source directory (e.g., `product-strategy/references/business-model-canvas.md`). Never edit `.skill` files in `dist/` directly — they are build outputs.
|
|
140
|
+
|
|
141
|
+
**Repackaging after an edit:**
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
python3 /mnt/skills/examples/skill-creator/scripts/package_skill.py <skill-dir> dist/
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Example:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
python3 /mnt/skills/examples/skill-creator/scripts/package_skill.py product-strategy/ dist/
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
The packager validates the skill structure before producing the `.skill` file. If validation fails, it will tell you what is wrong.
|
|
154
|
+
|
|
155
|
+
**Adding a new skill:** Follow the same pattern as existing skills. Run the init script to scaffold:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
python3 /mnt/skills/examples/skill-creator/scripts/init_skill.py <skill-name> --path .
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Then write `SKILL.md` and populate `references/`. The `SKILL.md` should define: when this skill triggers, what it produces, and how it connects to the rest of the chain. Keep `SKILL.md` under ~75 lines. Put all detail in references.
|
|
162
|
+
|
|
163
|
+
**Process updates from continuous-improvement:** When continuous-improvement identifies a gap in a skill, the fix is an edit to that skill's source. Commit it the same way as any other change. The validation criterion from the root cause analysis goes in the commit message.
|
|
164
|
+
|
|
165
|
+
## Sharing and Distribution
|
|
166
|
+
|
|
167
|
+
Want to share these skills with your team, organization, or community? See the **[Sharing Guide](docs/SHARING.md)** for comprehensive recommendations on:
|
|
168
|
+
|
|
169
|
+
- **Distribution channels** — GitHub, NPM, PyPI, VS Code extensions, documentation sites, Docker
|
|
170
|
+
- **Target audiences** — Individual developers, teams, enterprises, consultants, students
|
|
171
|
+
- **Use case examples** — Quick starts, team adoption, enterprise standardization, training
|
|
172
|
+
- **Community contribution** — How to report issues, suggest improvements, and submit changes
|
|
173
|
+
|
|
174
|
+
The methodology is designed to be shared and adapted. Choose the distribution method that fits your needs.
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: atdd-workflow
|
|
3
|
+
description: ATDD Red-Green-Refactor workflow for implementing features driven by acceptance tests. Use when implementing any feature, when a story map task is referenced, when the user says "implement", "build feature", or "write code for scenario". Requires bdd-specification and story-mapping skills to be available. Reads project context from docs/ and features/ directories. Produces tests and implementation following outside-in acceptance test driven development.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ATDD Red-Green-Refactor Workflow
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Implements features outside-in: acceptance test first, then unit tests and production code in tight Red-Green-Refactor cycles until the acceptance test passes. Connects business value all the way through to working, tested code.
|
|
11
|
+
|
|
12
|
+
## Before Starting — Read Context
|
|
13
|
+
|
|
14
|
+
Read these files in order before any implementation:
|
|
15
|
+
|
|
16
|
+
1. `/docs/test-strategy.md` — testing tools and commands (CRITICAL: all test commands come from here)
|
|
17
|
+
2. `/docs/story-map/user-tasks/[task-id].md` — the specific task being implemented
|
|
18
|
+
3. `/features/[domain]/[feature].feature` — the Gherkin scenarios (use bdd-specification skill if these don't exist yet)
|
|
19
|
+
4. `/docs/ubiquitous-language.md` — domain terminology
|
|
20
|
+
5. `/docs/value-proposition-canvas.md` — business context
|
|
21
|
+
6. `/docs/business-model-canvas.md` — broader business context
|
|
22
|
+
|
|
23
|
+
## Workflow Decision
|
|
24
|
+
|
|
25
|
+
**Feature file exists with scenarios?** → Follow "Implementation Workflow" below
|
|
26
|
+
**No feature file yet?** → Use story-mapping skill to identify the task, then bdd-specification skill to write scenarios, then return here
|
|
27
|
+
|
|
28
|
+
## Implementation Workflow
|
|
29
|
+
|
|
30
|
+
### 🔴 Phase 1: RED
|
|
31
|
+
|
|
32
|
+
Detailed phase rules and patterns: see `references/red-phase.md`
|
|
33
|
+
|
|
34
|
+
1. **Acceptance Test (Outer Loop)**
|
|
35
|
+
- Read Gherkin scenario from `/features/[domain]/[feature].feature`
|
|
36
|
+
- Identify test framework from `/docs/test-strategy.md`
|
|
37
|
+
- Create acceptance test in `/tests/acceptance/[domain]/`
|
|
38
|
+
- Create test helpers in `/tests/helpers/` if needed
|
|
39
|
+
- Run acceptance test → **MUST FAIL**
|
|
40
|
+
- Verify failure is for the expected reason
|
|
41
|
+
|
|
42
|
+
2. **Unit Test (Inner Loop)**
|
|
43
|
+
- Identify the next smallest behavior needed
|
|
44
|
+
- Write unit test in `/tests/unit/[domain]/`
|
|
45
|
+
- Run unit test → **MUST FAIL**
|
|
46
|
+
- Verify error message is clear and meaningful
|
|
47
|
+
|
|
48
|
+
### 🟢 Phase 2: GREEN
|
|
49
|
+
|
|
50
|
+
Detailed phase rules and patterns: see `references/green-phase.md`
|
|
51
|
+
|
|
52
|
+
1. Write **minimum** code to make the current failing test pass
|
|
53
|
+
2. Hard-code values if that makes the test pass — refactor handles design later
|
|
54
|
+
3. Use ubiquitous language in all naming
|
|
55
|
+
4. Run test → **MUST PASS**
|
|
56
|
+
|
|
57
|
+
### ♻️ Phase 3: REFACTOR
|
|
58
|
+
|
|
59
|
+
Detailed phase rules and patterns: see `references/refactor-phase.md`
|
|
60
|
+
|
|
61
|
+
1. Remove duplication
|
|
62
|
+
2. Improve naming with ubiquitous language
|
|
63
|
+
3. Extract methods/classes for clarity
|
|
64
|
+
4. Apply SOLID principles
|
|
65
|
+
5. Refactor test code too — extract helpers, consolidate fixtures
|
|
66
|
+
6. Run **ALL** tests → **MUST STAY GREEN**
|
|
67
|
+
7. Commit when green
|
|
68
|
+
|
|
69
|
+
### Cycle
|
|
70
|
+
|
|
71
|
+
Repeat RED → GREEN → REFACTOR until the acceptance test passes. Then move to next scenario.
|
|
72
|
+
|
|
73
|
+
## File Structure
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
tests/
|
|
77
|
+
├── acceptance/[domain]/ ← Outer loop tests (from Gherkin scenarios)
|
|
78
|
+
├── unit/[domain]/ ← Inner loop tests (one per behavior)
|
|
79
|
+
├── fixtures/ ← Shared test data
|
|
80
|
+
└── helpers/ ← Page objects, builders, test utilities
|
|
81
|
+
src/
|
|
82
|
+
└── [architecture per docs/test-strategy.md]
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Commit Convention
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
🔴 RED: Add failing test for [behavior]
|
|
89
|
+
🟢 GREEN: Make [test name] pass with minimal code
|
|
90
|
+
♻️ REFACTOR: [what improved] — all tests green
|
|
91
|
+
✅ COMPLETE: [Feature name] - [Story Map Task ID]
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Completion Checklist
|
|
95
|
+
|
|
96
|
+
- [ ] All acceptance tests pass
|
|
97
|
+
- [ ] All unit tests pass
|
|
98
|
+
- [ ] Coverage >90% (verify with coverage command from test-strategy.md)
|
|
99
|
+
- [ ] No duplication
|
|
100
|
+
- [ ] Ubiquitous language consistent throughout
|
|
101
|
+
- [ ] `/docs/story-map/user-tasks/[task-id].md` status updated
|
|
102
|
+
- [ ] `/docs/traceability-matrix.md` updated
|
|
103
|
+
|
|
104
|
+
## Integration
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
story-mapping → identifies task and acceptance criteria
|
|
108
|
+
↓
|
|
109
|
+
bdd-specification → writes Gherkin feature file
|
|
110
|
+
↓
|
|
111
|
+
atdd-workflow (this skill) → implements with RED-GREEN-REFACTOR
|
|
112
|
+
↓ (during GREEN and REFACTOR)
|
|
113
|
+
clean-code → applies design principles and patterns
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
During GREEN: consult clean-code only if a SOLID violation blocks the next test cycle.
|
|
117
|
+
During REFACTOR: use clean-code's decision tree to identify which principle or pattern applies, then load only the relevant reference.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# GREEN Phase — Make It Pass
|
|
2
|
+
|
|
3
|
+
## Rules
|
|
4
|
+
|
|
5
|
+
- Write ONLY enough code to make the current failing test pass
|
|
6
|
+
- Do NOT add functionality that no test requires
|
|
7
|
+
- Hard-coding is acceptable here — that is what REFACTOR fixes
|
|
8
|
+
- Use ubiquitous language in naming even at this stage
|
|
9
|
+
- One test green at a time — do not jump ahead
|
|
10
|
+
|
|
11
|
+
## Discipline
|
|
12
|
+
|
|
13
|
+
The temptation in GREEN is to write "proper" code immediately. Resist it. The purpose of GREEN is to establish that the test works correctly and that your implementation path is viable. REFACTOR is where design happens.
|
|
14
|
+
|
|
15
|
+
**Valid GREEN implementations:**
|
|
16
|
+
|
|
17
|
+
- Returning a hard-coded value that satisfies the assertion
|
|
18
|
+
- Stubbing a method to return expected output
|
|
19
|
+
- Writing a minimal class with only the method being tested
|
|
20
|
+
- Copying logic from another place if it makes the test pass
|
|
21
|
+
|
|
22
|
+
**Invalid GREEN behaviors:**
|
|
23
|
+
|
|
24
|
+
- Adding methods no test calls
|
|
25
|
+
- Implementing edge cases no test covers
|
|
26
|
+
- Optimizing performance
|
|
27
|
+
- Abstracting for future flexibility
|
|
28
|
+
|
|
29
|
+
## Verification
|
|
30
|
+
|
|
31
|
+
After writing code:
|
|
32
|
+
1. Run the specific failing test — it must now PASS
|
|
33
|
+
2. Run all other tests — they must still pass
|
|
34
|
+
3. If other tests broke, your GREEN code has a side effect — fix it before proceeding to REFACTOR
|
|
35
|
+
|
|
36
|
+
## When GREEN Is Harder Than Expected
|
|
37
|
+
|
|
38
|
+
If writing minimal code to pass is difficult, the unit test is probably too large. Go back to RED and break it into a smaller unit test that targets a single, smaller behavior.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# RED Phase — Write Failing Tests
|
|
2
|
+
|
|
3
|
+
## Rules
|
|
4
|
+
|
|
5
|
+
- NEVER write production code before the test fails
|
|
6
|
+
- Test must fail for the **expected** reason — if it fails for the wrong reason, fix the test first
|
|
7
|
+
- One failing test at a time
|
|
8
|
+
- Use ubiquitous language from `/docs/ubiquitous-language.md` in all test descriptions
|
|
9
|
+
|
|
10
|
+
## Acceptance Test (Outer Loop)
|
|
11
|
+
|
|
12
|
+
The acceptance test is the target. Everything else exists to make it pass.
|
|
13
|
+
|
|
14
|
+
**Map Gherkin steps to test actions:**
|
|
15
|
+
|
|
16
|
+
| Gherkin | Test Pattern |
|
|
17
|
+
|---------|-------------|
|
|
18
|
+
| Given [state] | Arrange — set up preconditions |
|
|
19
|
+
| When [action] | Act — perform the user action |
|
|
20
|
+
| Then [outcome] | Assert — verify observable result |
|
|
21
|
+
| And [additional] | Additional assert or arrange step |
|
|
22
|
+
|
|
23
|
+
**Test helper patterns to use:**
|
|
24
|
+
|
|
25
|
+
- **Page Object** — encapsulates all interactions with a single page/screen
|
|
26
|
+
- **Builder** — fluent interface for constructing complex test objects
|
|
27
|
+
- **Factory** — creates valid domain objects with sensible defaults, override as needed
|
|
28
|
+
|
|
29
|
+
Place helpers in `/tests/helpers/`, fixtures in `/tests/fixtures/`.
|
|
30
|
+
|
|
31
|
+
**Verifying the failure:**
|
|
32
|
+
- Error message should point clearly to what's missing
|
|
33
|
+
- If test fails during setup rather than assertion, the test is poorly structured — refactor the test before proceeding
|
|
34
|
+
|
|
35
|
+
## Unit Test (Inner Loop)
|
|
36
|
+
|
|
37
|
+
Pick the next smallest behavior the acceptance test needs. Write exactly one unit test for it.
|
|
38
|
+
|
|
39
|
+
**Identify the next behavior by asking:**
|
|
40
|
+
- What does the acceptance test need that doesn't exist?
|
|
41
|
+
- What is the smallest piece of that?
|
|
42
|
+
|
|
43
|
+
**Example progression for "Create invoice":**
|
|
44
|
+
1. Unit test: Invoice can be instantiated
|
|
45
|
+
2. Unit test: Invoice accepts a line item
|
|
46
|
+
3. Unit test: Invoice calculates total from line items
|
|
47
|
+
4. Unit test: Invoice generates a unique number
|
|
48
|
+
5. (continue until acceptance test passes)
|
|
49
|
+
|
|
50
|
+
**Arrange-Act-Assert pattern:**
|
|
51
|
+
```
|
|
52
|
+
Arrange: Set up the object/state under test
|
|
53
|
+
Act: Call the method or trigger the behavior
|
|
54
|
+
Assert: Verify the expected outcome
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Common Mistakes
|
|
58
|
+
|
|
59
|
+
- Writing the unit test for behavior that isn't needed yet (YAGNI)
|
|
60
|
+
- Making the test pass by accident — verify it fails first
|
|
61
|
+
- Testing implementation details instead of behavior
|
|
62
|
+
- Writing too many assertions in a single test — one behavior per test
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# REFACTOR Phase — Improve Design
|
|
2
|
+
|
|
3
|
+
## Rules
|
|
4
|
+
|
|
5
|
+
- NEVER change observable behavior — only internal structure
|
|
6
|
+
- Tests must remain GREEN throughout the entire refactor
|
|
7
|
+
- Run tests after every small change
|
|
8
|
+
- Refactor both production code AND test code
|
|
9
|
+
- Commit frequently — each commit must be green
|
|
10
|
+
|
|
11
|
+
## What to Refactor
|
|
12
|
+
|
|
13
|
+
### Production Code
|
|
14
|
+
- **Remove duplication** — if the same logic appears twice, extract it
|
|
15
|
+
- **Improve naming** — use terms from `/docs/ubiquitous-language.md`
|
|
16
|
+
- **Extract methods** — a method should do one thing
|
|
17
|
+
- **Extract classes** — group related state and behavior
|
|
18
|
+
- **Apply SOLID:**
|
|
19
|
+
- Single Responsibility: one reason to change
|
|
20
|
+
- Open/Closed: extend without modifying
|
|
21
|
+
- Liskov: subtypes substitute for base types
|
|
22
|
+
- Interface Segregation: small, focused interfaces
|
|
23
|
+
- Dependency Inversion: depend on abstractions
|
|
24
|
+
|
|
25
|
+
### Test Code
|
|
26
|
+
- **Extract common setup** into beforeEach/fixtures
|
|
27
|
+
- **Extract repeated assertions** into helper methods
|
|
28
|
+
- **Consolidate test data** into `/tests/fixtures/`
|
|
29
|
+
- **Improve test names** — should read as a specification
|
|
30
|
+
- **Remove dead test code** — unused helpers or fixtures
|
|
31
|
+
|
|
32
|
+
## Refactoring Patterns
|
|
33
|
+
|
|
34
|
+
### Replace Hard-Coded Value
|
|
35
|
+
```
|
|
36
|
+
Before: return 1000
|
|
37
|
+
After: return this.lineItems.reduce((sum, item) => sum + item.amount, 0)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Extract Method
|
|
41
|
+
```
|
|
42
|
+
Before: 20 lines of logic inline
|
|
43
|
+
After: calculateTotal() called from the original location
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Extract Value Object
|
|
47
|
+
```
|
|
48
|
+
Before: amount stored as number (1000)
|
|
49
|
+
After: amount stored as Money value object with currency and formatting
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Extract Strategy
|
|
53
|
+
```
|
|
54
|
+
Before: if/else chain for tax calculation rules
|
|
55
|
+
After: TaxCalculator interface, concrete strategy per rule
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## When to Stop Refactoring
|
|
59
|
+
|
|
60
|
+
Stop when:
|
|
61
|
+
- Code is readable without comments
|
|
62
|
+
- No duplication remains
|
|
63
|
+
- Methods are small and focused
|
|
64
|
+
- Names match ubiquitous language
|
|
65
|
+
- Design supports the next likely change without modification
|
|
66
|
+
|
|
67
|
+
Do NOT refactor speculatively for changes that haven't been required yet.
|
|
68
|
+
|
|
69
|
+
## Recovery
|
|
70
|
+
|
|
71
|
+
If refactoring breaks tests and you can't see why:
|
|
72
|
+
1. Revert to last green commit
|
|
73
|
+
2. Make a smaller refactoring step
|
|
74
|
+
3. Run tests
|
|
75
|
+
4. Repeat
|