@houseofwolvesllc/claude-scrum-skill 1.8.1 → 2.1.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.
@@ -40,6 +40,43 @@ As Claude Code, your task is to transform the user's rough prompt into a compreh
40
40
  - Add code examples if they help illustrate requirements
41
41
  - Structure the document with clear headings and subheadings
42
42
 
43
+ ## Design Passes (Baseline, Domain & Patterns)
44
+
45
+ Before finalizing, run these passes so the spec is grounded in the project's
46
+ engineering standards. They shape the spec at **design time**; implementation-time
47
+ enforcement is `/project-orchestrate`'s job.
48
+
49
+ 6. **Engineering baseline.** Read `../shared/references/ENGINEERING_BASELINE.md`
50
+ (Clean Code, Test-Driven Development, the simple-design Arbitration Rule). The
51
+ spec must assume this baseline: acceptance criteria assume tests-first
52
+ (red-green-refactor), and every proposed design assumes the Arbitration Rule
53
+ — the simplest thing that works, no anticipatory abstraction.
54
+
55
+ 7. **Strategic domain pass (DDD).** For each epic, capture the domain's
56
+ **ubiquitous language** and **classify its subdomain** as one of `core`,
57
+ `supporting`, or `generic`:
58
+ - `core` — the complex business heart with real invariants; warrants tactical
59
+ domain modeling.
60
+ - `supporting` — necessary but not differentiating.
61
+ - `generic` — CRUD, plumbing, off-the-shelf concerns.
62
+
63
+ Record the classification on each epic (see the JSON sibling below). It is the
64
+ single authoritative source `/project-orchestrate` reads to decide which epics
65
+ receive situational guidance — so classify carefully and do **not** expect
66
+ downstream skills to re-derive it. For `core` epics, sketch candidate
67
+ aggregates, entities vs. value objects, and where key business rules live,
68
+ consistent with the `domain-modeling` skill.
69
+
70
+ 8. **Pattern-naming pass (GoF), candidate only.** Identify axes of *expected
71
+ variation* and, where one is real, name a **candidate** Gang of Four pattern.
72
+ Every named pattern MUST follow this form and stay non-binding:
73
+
74
+ > `Pattern — because <real axis of variation>; revisit at build (may collapse
75
+ > to a function or simpler form if the variation does not materialize)`.
76
+
77
+ Do not name patterns speculatively or for CRUD/generic work. A spec is not a
78
+ pattern shopping list — naming records a justified hypothesis, not a mandate.
79
+
43
80
  ## Filename Convention
44
81
 
45
82
  Read the specs output path from `../shared/config.json` (key: `paths.specs`,
@@ -47,6 +84,36 @@ default: `.claude-scrum-skill/specs`).
47
84
 
48
85
  Save the output spec to `<specs-path>/YYYYMMDD_hhmmss_{name}.md` where the timestamp is in YYYYMMDD*hhmmss format in **US Pacific Time (PST/PDT)** and `{name}` is a snake_case name that succinctly describes the feature or project. To get the current Pacific time, run `TZ='America/Los_Angeles' date '+%Y%m%d*%H%M%S'` via the Bash tool.
49
86
 
87
+ ### Schema-Validated Sibling Output (v2.0.0+)
88
+
89
+ In addition to the markdown spec document, write a sibling JSON file at `<specs-path>/YYYYMMDD_hhmmss_{name}.spec.json` conforming to `SpecSchema` (`<skills-root>/_workflows/schemas/SpecSchema.json`). Required fields:
90
+
91
+ ```json
92
+ {
93
+ "title": "<spec title>",
94
+ "overview": "<one-paragraph overview>",
95
+ "objectives": {
96
+ "primary": ["..."],
97
+ "secondary": ["..."]
98
+ },
99
+ "epics": [
100
+ {
101
+ "name": "<epic name>",
102
+ "slug": "<kebab-case>",
103
+ "description": "<one-paragraph>",
104
+ "subdomain": "core | supporting | generic",
105
+ "depends_on": [],
106
+ "shared_design_concerns": [],
107
+ "slice": { "start_line": 0, "end_line": 0 }
108
+ }
109
+ ],
110
+ "dependencies": ["..."],
111
+ "design_concerns": ["..."]
112
+ }
113
+ ```
114
+
115
+ The JSON sibling lets downstream skills (`/project-scaffold` especially) consume the spec via schema-validated direct access rather than re-parsing the markdown. Both files MUST be produced; the markdown remains the human-readable canonical document.
116
+
50
117
  ## Guidelines for Success
51
118
 
52
119
  1. **Be Specific**: Avoid vague requirements; provide concrete details.
@@ -0,0 +1,154 @@
1
+ # Engineering Baseline
2
+
3
+ > The universal engineering standard for all work this skill suite drives.
4
+ > `project-spec` reads it at design time; `project-orchestrate` reads it and
5
+ > **injects it into every subagent it spawns** at implementation time. It
6
+ > applies across the board, to every story and every file, regardless of domain.
7
+ >
8
+ > This is the **baseline layer**. The **situational layer** — Gang of Four
9
+ > design patterns (`design-patterns`) and tactical Domain-Driven Design
10
+ > (`domain-modeling`) — sits on top of it and is composed in only when the work
11
+ > warrants it (see each skill). When the situational layer fires, it remains
12
+ > **subordinate to the Arbitration Rule below**.
13
+
14
+ ---
15
+
16
+ ## The Arbitration Rule (read this first)
17
+
18
+ **Simple design is the default. Abstractions, design patterns, and domain layers
19
+ are responses to demonstrated complexity — duplication, repeated change in one
20
+ place, or essential domain rules — never anticipatory architecture. Arrive at
21
+ patterns by refactoring toward them, not by designing to them.**
22
+
23
+ Every pattern, every layer, every abstraction must justify itself against this
24
+ rule. Three similar lines beat a premature abstraction. When in doubt, write the
25
+ simplest thing that works and let duplication or change-pressure tell you when to
26
+ extract.
27
+
28
+ ---
29
+
30
+ ## Clean Code
31
+
32
+ ### Naming
33
+ > Martin's standard: a good name answers the big questions — why the thing exists,
34
+ > what it does, and how it's used. If a name needs a comment to explain it, the
35
+ > name has failed.
36
+
37
+ - Names reveal intent. If a name needs a comment, the name is wrong.
38
+ - Class names are nouns; method names are verbs.
39
+ - One word per concept, used consistently across the codebase.
40
+ - Name length matches scope. Short names for short scopes; full descriptive
41
+ names for wide ones.
42
+ - Don't encode type or scope into names (no Hungarian notation, no `m_`).
43
+ - Names describe side effects. A function that creates-if-absent is not a getter.
44
+
45
+ ### Functions
46
+ > Martin's rules: functions should be small — and then smaller. Each should do one
47
+ > thing, do it well, and do it only.
48
+
49
+ - Small. One thing. One level of abstraction per function body.
50
+ - Stepdown rule: high-level functions first, helpers below — readable top to
51
+ bottom like a newspaper.
52
+ - Minimize arguments. Zero–two normal, three suspect, more → pass an object.
53
+ - No flag (boolean) arguments — split into two functions.
54
+ - No hidden side effects. Command-query separation: change state or return a
55
+ value, not both.
56
+ - Don't return null and don't pass null. Return an empty collection, an Optional,
57
+ or throw.
58
+
59
+ ### Comments
60
+ > Martin's view: a comment is a way of compensating for failing to express the
61
+ > intent in code. Prefer rewriting the code over explaining it with a comment.
62
+
63
+ - The best comment is the one made unnecessary by clear code.
64
+ - Delete commented-out code; version control remembers.
65
+ - A necessary comment explains **why**, not **what**.
66
+ - TODOs carry a ticket number or removal date.
67
+
68
+ ### Formatting
69
+ - Related code stays vertically close; declare variables near first use.
70
+ - Keep lines readable without horizontal scrolling (~100 chars).
71
+ - Blank lines separate concepts; none between tightly coupled statements.
72
+ - Team/project formatting rules override personal preference.
73
+
74
+ ### Objects and Data
75
+ - Objects hide data and expose behavior; data structures expose data and have no
76
+ behavior. Don't make hybrids.
77
+ - Law of Demeter: don't reach through chains (`a.getB().getC().do()`).
78
+ - Prefer polymorphism over `switch`/`if-else` chains on type.
79
+
80
+ ### Error Handling
81
+ > Martin's guidance: prefer exceptions over return codes for error signaling.
82
+
83
+ - Exceptions, not return codes. Write try-catch-finally first for fallible code.
84
+ - Provide context: what operation failed and what state was expected.
85
+ - Define exception types by how the caller handles them.
86
+
87
+ ### Boundaries
88
+ - Wrap third-party APIs behind your own interfaces; don't let library types leak
89
+ across module boundaries.
90
+
91
+ ### Classes
92
+ - Single Responsibility: one reason to change.
93
+ - High cohesion: most methods use most fields.
94
+ - Open-Closed: extend without modifying working code.
95
+ - Dependency Inversion: depend on abstractions, not concretions.
96
+
97
+ ### Smells — fix on sight
98
+ Dead code; commented-out code; functions with >3 arguments; magic
99
+ numbers/strings; base classes referencing derivatives; feature envy; inconsistent
100
+ conventions; hidden temporal coupling; artificial coupling; negative conditionals
101
+ (`!isNotReady()` → `isReady()`).
102
+
103
+ ### The Boy Scout Rule
104
+ > The Boy Scout Rule (Martin, adapting the scouting maxim): always leave the code
105
+ > a little cleaner than you found it.
106
+
107
+ Leave every file cleaner than you found it. Every commit. No exceptions.
108
+
109
+ ---
110
+
111
+ ## Test-Driven Development
112
+
113
+ TDD is universal here — it governs how code comes into being, not just whether
114
+ tests exist.
115
+
116
+ ### The discipline
117
+ - **Red → Green → Refactor** — Beck's rhythm. *Red:* write a small test that fails
118
+ (it may not even compile yet). *Green:* make it pass as quickly as possible.
119
+ *Refactor:* remove the duplication you created getting there. Always in that
120
+ order — make it work, then make it clean.
121
+ - **Three laws** (Robert C. Martin's formulation of the same discipline): (1)
122
+ write a failing test before production code; (2) write only enough test to fail;
123
+ (3) write only enough production code to pass.
124
+ - **Small steps** — Beck's techniques. When a step is hard, take a smaller one:
125
+ *Fake It* (return a constant) to get to green, then *Triangulate* to the real
126
+ implementation.
127
+
128
+ ### What good tests look like
129
+ - Tests describe behavior, not implementation. Test names are assertions
130
+ ("computes pace when duration is edited"), not "test case 1".
131
+ - One concept per test (not necessarily one assert — one idea).
132
+ - **F.I.R.S.T.**: Fast, Independent, Repeatable, Self-validating, Timely.
133
+ - Test boundary conditions and cluster tests near known bugs.
134
+ - Tests are first-class code: clean, readable, well-named, colocated with source.
135
+
136
+ ### Emergence (simple design, in priority order)
137
+ 1. All tests pass. Untested code is unfinished code.
138
+ 2. No duplication. Every piece of knowledge has one authoritative representation.
139
+ 3. Code is expressive. The reader understands intent without asking the author.
140
+ 4. Minimal classes and methods. Don't create abstractions you don't need yet.
141
+
142
+ ---
143
+
144
+ ## How this baseline is applied
145
+
146
+ - **`project-spec` (design time):** specs are written to satisfy this baseline.
147
+ Acceptance criteria assume tests-first; designs assume the Arbitration Rule.
148
+ - **`project-orchestrate` (implementation time):** this document is injected,
149
+ verbatim or by reference, into every implementation, review, and hardening
150
+ subagent prompt. Subagents follow it in addition to the project's own
151
+ `CLAUDE.md` (project rules win on direct conflict).
152
+ - **Order of precedence:** project `CLAUDE.md` > this baseline > situational
153
+ guidance (`design-patterns`, `domain-modeling`). The situational layer never
154
+ overrides the Arbitration Rule.