get-shit-specd 0.2.0 → 0.4.1
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/README.md +6 -0
- package/claude/agents/gss-contract-architect.md +82 -0
- package/claude/agents/gss-spec-checker.md +11 -0
- package/claude/commands/gss/contracts.md +59 -0
- package/claude/commands/gss/help.md +5 -1
- package/claude/get-shit-specd/VERSION +1 -1
- package/claude/get-shit-specd/templates/contracts.md +108 -0
- package/claude/get-shit-specd/templates/handoff-to-gsd.md +3 -0
- package/claude/get-shit-specd/templates/scope.md +38 -6
- package/claude/get-shit-specd/workflows/contracts.md +113 -0
- package/claude/get-shit-specd/workflows/create-spec.md +15 -1
- package/claude/get-shit-specd/workflows/handoff.md +34 -2
- package/claude/get-shit-specd/workflows/review-spec.md +2 -0
- package/examples/SPEC-003-watermarking-service/01-SCOPE.md +20 -0
- package/package.json +3 -3
- /package/bin/{gss.ts → gss} +0 -0
package/README.md
CHANGED
|
@@ -140,6 +140,12 @@ bunx get-shit-specd update
|
|
|
140
140
|
|
|
141
141
|
This updates GSS files while preserving your `spec-config.json`.
|
|
142
142
|
|
|
143
|
+
## Acknowledgments
|
|
144
|
+
|
|
145
|
+
GSS was heavily influenced by [get-shit-done (GSD)](https://github.com/glittercowboy/get-shit-done), an execution-focused workflow for Claude Code. Where GSD excels at **building** (phases, plans, atomic commits), GSS focuses on what comes **before** — ensuring you spec the right thing before you build it.
|
|
146
|
+
|
|
147
|
+
They're designed to work together: GSS specs feed into GSD phases.
|
|
148
|
+
|
|
143
149
|
## License
|
|
144
150
|
|
|
145
151
|
MIT
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# gss-contract-architect
|
|
2
|
+
|
|
3
|
+
Role: Analyze multiple specs to extract shared contracts and file ownership boundaries for parallel development.
|
|
4
|
+
|
|
5
|
+
## Input
|
|
6
|
+
You receive:
|
|
7
|
+
- Implementation Surface sections from all Ready/Handed Off specs
|
|
8
|
+
- Project context: existing types, design tokens, routes, and component inventory from the codebase
|
|
9
|
+
- List of spec IDs being coordinated
|
|
10
|
+
|
|
11
|
+
## Process
|
|
12
|
+
|
|
13
|
+
### 1. Catalog All Surfaces
|
|
14
|
+
For each spec, extract:
|
|
15
|
+
- Files created (exclusive ownership)
|
|
16
|
+
- Files modified (shared — coordination needed)
|
|
17
|
+
- Types consumed and created
|
|
18
|
+
- Tokens referenced
|
|
19
|
+
- Routes added
|
|
20
|
+
- Components consumed and created
|
|
21
|
+
|
|
22
|
+
### 2. Detect Conflicts
|
|
23
|
+
Check for:
|
|
24
|
+
- **File creation conflicts:** Two specs creating the same file → CONFLICT
|
|
25
|
+
- **Type name collisions:** Two specs defining the same type → CONFLICT
|
|
26
|
+
- **Route collisions:** Overlapping route patterns → CONFLICT
|
|
27
|
+
- **Component name collisions:** Two specs creating same component → CONFLICT
|
|
28
|
+
|
|
29
|
+
### 3. Map Dependencies
|
|
30
|
+
Identify directional dependencies:
|
|
31
|
+
- Spec A creates type `Deck`, Spec B consumes type `Deck` → B depends on A
|
|
32
|
+
- Spec A creates `<CardGrid>`, Spec B uses `<CardGrid>` → B depends on A
|
|
33
|
+
|
|
34
|
+
This informs dispatch order: dependency providers should start first or their contracts must be defined upfront.
|
|
35
|
+
|
|
36
|
+
### 4. Define Type Contracts
|
|
37
|
+
For each shared type:
|
|
38
|
+
```typescript
|
|
39
|
+
// Owner: SPEC-001 | Consumers: SPEC-002, SPEC-003
|
|
40
|
+
interface Deck {
|
|
41
|
+
id: string;
|
|
42
|
+
name: string;
|
|
43
|
+
cards: Card[];
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Use existing codebase types as the starting point. Flag any spec that redefines an existing type.
|
|
48
|
+
|
|
49
|
+
### 5. Define Component API Contracts
|
|
50
|
+
For each shared component:
|
|
51
|
+
```typescript
|
|
52
|
+
// Owner: SPEC-001 | Consumers: SPEC-002
|
|
53
|
+
interface CardGridProps {
|
|
54
|
+
cards: Card[];
|
|
55
|
+
columns?: number;
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 6. Build File Ownership Matrix
|
|
60
|
+
Every file mentioned across all specs gets exactly one classification:
|
|
61
|
+
- **Exclusive:** Created by one spec, untouched by others
|
|
62
|
+
- **Shared-modify:** Modified by multiple specs (list all)
|
|
63
|
+
- **Conflict:** Created by multiple specs (must resolve)
|
|
64
|
+
|
|
65
|
+
### 7. Generate Dispatch Guidance
|
|
66
|
+
For each spec, output:
|
|
67
|
+
- Suggested branch name
|
|
68
|
+
- Files this spec owns exclusively
|
|
69
|
+
- Shared files needing merge coordination
|
|
70
|
+
- Contract dependencies (types/components this spec consumes from others)
|
|
71
|
+
- Recommended dispatch order based on dependency graph
|
|
72
|
+
|
|
73
|
+
## Output Format
|
|
74
|
+
Write CONTRACTS.md using the contracts template with all sections populated.
|
|
75
|
+
|
|
76
|
+
## Key Rules
|
|
77
|
+
- Every created file MUST have exactly one owner spec
|
|
78
|
+
- Modified files are NOT exclusive — list all specs that touch them
|
|
79
|
+
- Type names MUST be consistent across specs (flag mismatches)
|
|
80
|
+
- Token references must match codebase tokens (flag unknown tokens as NEW)
|
|
81
|
+
- When in doubt, flag as a conflict — false positives are cheaper than merge failures
|
|
82
|
+
- Be specific: use exact file paths, type names, and prop definitions
|
|
@@ -52,6 +52,17 @@ Based on tier:
|
|
|
52
52
|
- Scan for vague language: "works", "properly", "correctly", "valid"
|
|
53
53
|
- WARN for each instance (suggest specific replacement)
|
|
54
54
|
|
|
55
|
+
### Implementation Surface Completeness
|
|
56
|
+
Based on tier:
|
|
57
|
+
- Micro: Skip (not applicable)
|
|
58
|
+
- Standard: WARN if Implementation Surface section is missing or empty
|
|
59
|
+
- Full: FAIL if Implementation Surface section is missing or empty
|
|
60
|
+
|
|
61
|
+
When present, check:
|
|
62
|
+
- At least one file in "Files Created"
|
|
63
|
+
- Shared Surfaces section filled (or explicitly "None")
|
|
64
|
+
- File paths look plausible (not just placeholders like "TBD" for Full tier)
|
|
65
|
+
|
|
55
66
|
### Synthesizer Issues
|
|
56
67
|
- If synthesizer ran, any FAIL items block Ready
|
|
57
68
|
- WARN items are advisory
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gss:contracts
|
|
3
|
+
description: Extract shared contracts from Ready specs for parallel development
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Read
|
|
6
|
+
- Glob
|
|
7
|
+
- Grep
|
|
8
|
+
- Task
|
|
9
|
+
- Write
|
|
10
|
+
---
|
|
11
|
+
<objective>
|
|
12
|
+
Read all Ready specs, identify shared surfaces (types, tokens, routes, components, files), and generate CONTRACTS.md with ownership boundaries for parallel agent dispatch.
|
|
13
|
+
</objective>
|
|
14
|
+
|
|
15
|
+
<process>
|
|
16
|
+
|
|
17
|
+
<step name="find_specs">
|
|
18
|
+
Read .planning/specs/ directory.
|
|
19
|
+
Collect all specs with status Ready or Handed Off (check STATE.md in each).
|
|
20
|
+
If fewer than 2 specs found, report: "Contracts require at least 2 Ready specs. Found {{count}}." and stop.
|
|
21
|
+
</step>
|
|
22
|
+
|
|
23
|
+
<step name="collect_surfaces">
|
|
24
|
+
For each qualifying spec, read 01-SCOPE.md and extract the Implementation Surface section:
|
|
25
|
+
- Files Created
|
|
26
|
+
- Files Modified
|
|
27
|
+
- Shared Surfaces (types, tokens, routes, components)
|
|
28
|
+
|
|
29
|
+
If a spec lacks an Implementation Surface section, WARN and skip it.
|
|
30
|
+
</step>
|
|
31
|
+
|
|
32
|
+
<step name="spawn_contract_architect">
|
|
33
|
+
Spawn the gss-contract-architect agent with:
|
|
34
|
+
- All collected Implementation Surface data
|
|
35
|
+
- Project context (existing types, tokens, routes from codebase)
|
|
36
|
+
- List of spec IDs being coordinated
|
|
37
|
+
|
|
38
|
+
The agent analyzes overlaps, detects conflicts, and drafts CONTRACTS.md.
|
|
39
|
+
|
|
40
|
+
Use Task tool:
|
|
41
|
+
subagent_type: "general-purpose"
|
|
42
|
+
prompt: Include gss-contract-architect agent instructions + collected surfaces
|
|
43
|
+
model: "sonnet"
|
|
44
|
+
</step>
|
|
45
|
+
|
|
46
|
+
<step name="write_contracts">
|
|
47
|
+
Write the agent's output to .planning/CONTRACTS.md.
|
|
48
|
+
If CONTRACTS.md already exists, archive the previous version as CONTRACTS.prev.md.
|
|
49
|
+
</step>
|
|
50
|
+
|
|
51
|
+
<step name="report">
|
|
52
|
+
Present summary to user:
|
|
53
|
+
- Number of specs analyzed
|
|
54
|
+
- Shared surfaces found
|
|
55
|
+
- Conflicts detected (if any)
|
|
56
|
+
- File ownership matrix overview
|
|
57
|
+
</step>
|
|
58
|
+
|
|
59
|
+
</process>
|
|
@@ -28,6 +28,9 @@ GSS is a spec workflow that produces outcome-focused specs. Specs define WHAT mu
|
|
|
28
28
|
- `/gss:review-spec` — Red-team a spec for ambiguity and missing states
|
|
29
29
|
- `/gss:handoff` — Generate requirements mapping for engineering
|
|
30
30
|
|
|
31
|
+
### Coordination
|
|
32
|
+
- `/gss:contracts` — Extract shared contracts from Ready specs for parallel development
|
|
33
|
+
|
|
31
34
|
### Status
|
|
32
35
|
- `/gss:progress` — Show all specs and their status (Draft/Review/Ready)
|
|
33
36
|
|
|
@@ -37,7 +40,8 @@ GSS is a spec workflow that produces outcome-focused specs. Specs define WHAT mu
|
|
|
37
40
|
1. /gss:setup ← First time only
|
|
38
41
|
2. /gss:new-spec ← Create spec with intake questions
|
|
39
42
|
3. /gss:review-spec ← Red-team for gaps
|
|
40
|
-
4. /gss:
|
|
43
|
+
4. /gss:contracts ← Extract shared contracts (when 2+ specs Ready)
|
|
44
|
+
5. /gss:handoff ← Generate engineering requirements
|
|
41
45
|
```
|
|
42
46
|
|
|
43
47
|
## Spec Tiers
|
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.3.0
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Contracts
|
|
2
|
+
|
|
3
|
+
> Auto-generated by `/gss:contracts` — do not edit manually.
|
|
4
|
+
> Re-run `/gss:contracts` after spec changes to refresh.
|
|
5
|
+
|
|
6
|
+
**Specs analyzed:** {{SPEC_LIST}}
|
|
7
|
+
**Generated:** {{DATE}}
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Type Contracts
|
|
12
|
+
|
|
13
|
+
Shared type definitions that multiple specs depend on. Owner spec defines the type; consumer specs import it.
|
|
14
|
+
|
|
15
|
+
| Type | Owner | Consumers | Status |
|
|
16
|
+
|------|-------|-----------|--------|
|
|
17
|
+
| {{TYPE_NAME}} | {{OWNER_SPEC}} | {{CONSUMER_SPECS}} | {{Stable/New/Conflict}} |
|
|
18
|
+
|
|
19
|
+
### Definitions
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
// {{TYPE_NAME}} — Owner: {{OWNER_SPEC}}
|
|
23
|
+
// Consumers: {{CONSUMER_SPECS}}
|
|
24
|
+
{{TYPE_DEFINITION}}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Token Contracts
|
|
30
|
+
|
|
31
|
+
Design tokens referenced across specs. Tokens must exist in the codebase or be flagged as new.
|
|
32
|
+
|
|
33
|
+
| Token | Referenced By | Status |
|
|
34
|
+
|-------|--------------|--------|
|
|
35
|
+
| {{TOKEN_NAME}} | {{SPEC_LIST}} | {{Exists/New}} |
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Route Contracts
|
|
40
|
+
|
|
41
|
+
Full route map with ownership. Each route has exactly one owner spec.
|
|
42
|
+
|
|
43
|
+
| Route | Owner | Method | Purpose |
|
|
44
|
+
|-------|-------|--------|---------|
|
|
45
|
+
| {{ROUTE_PATTERN}} | {{OWNER_SPEC}} | {{GET/POST/etc}} | {{DESCRIPTION}} |
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Component API Contracts
|
|
50
|
+
|
|
51
|
+
Shared components with agreed-upon props interfaces.
|
|
52
|
+
|
|
53
|
+
| Component | Owner | Consumers |
|
|
54
|
+
|-----------|-------|-----------|
|
|
55
|
+
| {{COMPONENT_NAME}} | {{OWNER_SPEC}} | {{CONSUMER_SPECS}} |
|
|
56
|
+
|
|
57
|
+
### Props Interfaces
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
// {{COMPONENT_NAME}} — Owner: {{OWNER_SPEC}}
|
|
61
|
+
// Consumers: {{CONSUMER_SPECS}}
|
|
62
|
+
{{PROPS_INTERFACE}}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## File Ownership Matrix
|
|
68
|
+
|
|
69
|
+
Every file referenced across specs, classified by ownership.
|
|
70
|
+
|
|
71
|
+
### Exclusive (one spec creates, no others touch)
|
|
72
|
+
|
|
73
|
+
| File | Owner |
|
|
74
|
+
|------|-------|
|
|
75
|
+
| {{FILE_PATH}} | {{OWNER_SPEC}} |
|
|
76
|
+
|
|
77
|
+
### Shared (modified by multiple specs — coordinate merges)
|
|
78
|
+
|
|
79
|
+
| File | Modified By |
|
|
80
|
+
|------|-------------|
|
|
81
|
+
| {{FILE_PATH}} | {{SPEC_LIST}} |
|
|
82
|
+
|
|
83
|
+
### Conflicts (created by multiple specs — MUST resolve before dispatch)
|
|
84
|
+
|
|
85
|
+
| File | Claimed By | Resolution |
|
|
86
|
+
|------|-----------|------------|
|
|
87
|
+
| {{FILE_PATH}} | {{SPEC_LIST}} | {{PENDING/RESOLVED: description}} |
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Dispatch Guidance
|
|
92
|
+
|
|
93
|
+
Recommended dispatch order based on dependency graph.
|
|
94
|
+
|
|
95
|
+
### Wave 1 (no dependencies — start immediately)
|
|
96
|
+
- **{{SPEC_ID}}:** {{BRANCH_NAME}} — owns {{FILE_COUNT}} files, no contract dependencies
|
|
97
|
+
|
|
98
|
+
### Wave 2 (depends on Wave 1 contracts)
|
|
99
|
+
- **{{SPEC_ID}}:** {{BRANCH_NAME}} — depends on {{DEPENDENCY_LIST}} from Wave 1
|
|
100
|
+
|
|
101
|
+
### Per-Spec Summary
|
|
102
|
+
|
|
103
|
+
#### {{SPEC_ID}}: {{SPEC_NAME}}
|
|
104
|
+
- **Branch:** `feature/{{SLUG}}`
|
|
105
|
+
- **Exclusive files:** {{FILE_LIST}}
|
|
106
|
+
- **Shared files:** {{FILE_LIST}}
|
|
107
|
+
- **Consumes:** {{TYPE/COMPONENT_LIST}} from {{OTHER_SPECS}}
|
|
108
|
+
- **Provides:** {{TYPE/COMPONENT_LIST}} to {{OTHER_SPECS}}
|
|
@@ -10,8 +10,11 @@ Translate a Ready spec into engineering-facing requirements. Engineering owns im
|
|
|
10
10
|
|
|
11
11
|
## Outputs
|
|
12
12
|
- Requirement IDs mapped to acceptance scenarios
|
|
13
|
+
- **Traceability matrix** (REQ → Acceptance → Spec section)
|
|
13
14
|
- Risk notes and open questions
|
|
14
15
|
- Success criteria summary
|
|
16
|
+
- **Implementation Surface** (from SCOPE: files created/modified, shared types, tokens, routes, components)
|
|
17
|
+
- **Contract dependencies** (from CONTRACTS.md if it exists: types/components this spec consumes from others)
|
|
15
18
|
|
|
16
19
|
## Principles
|
|
17
20
|
- **WHAT, not HOW**: Define outcomes, not implementation
|
|
@@ -1,25 +1,57 @@
|
|
|
1
1
|
# Scope
|
|
2
2
|
|
|
3
|
-
## In
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
## In Scope (v1 Outcomes)
|
|
4
|
+
|
|
5
|
+
Requirements use stable IDs: `REQ-{SPEC_ID}-{PRIORITY}-{SEQ}`
|
|
6
|
+
|
|
7
|
+
### P0 — Must Have
|
|
8
|
+
|
|
9
|
+
- **REQ-{{SPEC_ID}}-P0-01:** {{P0_ITEM_1}}
|
|
10
|
+
- **REQ-{{SPEC_ID}}-P0-02:** {{P0_ITEM_2}}
|
|
11
|
+
|
|
12
|
+
### P1 — Should Have
|
|
13
|
+
|
|
14
|
+
- **REQ-{{SPEC_ID}}-P1-01:** {{P1_ITEM_1}}
|
|
15
|
+
|
|
16
|
+
### P2 — Nice to Have
|
|
17
|
+
|
|
18
|
+
- **REQ-{{SPEC_ID}}-P2-01:** {{P2_ITEM_1}}
|
|
19
|
+
|
|
20
|
+
## Out of Scope
|
|
6
21
|
|
|
7
|
-
## Out of scope
|
|
8
22
|
- {{OUT_SCOPE_1}}
|
|
9
23
|
- {{OUT_SCOPE_2}}
|
|
10
24
|
|
|
11
25
|
## Dependencies
|
|
26
|
+
|
|
12
27
|
- {{DEP_1}}
|
|
13
28
|
|
|
14
|
-
## Rollout
|
|
29
|
+
## Rollout Considerations
|
|
15
30
|
|
|
16
31
|
What matters for rollout (engineering determines approach):
|
|
17
32
|
- Gradual exposure needed: {{GRADUAL_YN}}
|
|
18
33
|
- Backout requirement: {{BACKOUT_NEED}}
|
|
19
34
|
- Data migration scope: {{MIGRATION_SCOPE}}
|
|
20
35
|
|
|
21
|
-
## Non-
|
|
36
|
+
## Non-Functional Requirements
|
|
37
|
+
|
|
22
38
|
- Performance: {{PERF}}
|
|
23
39
|
- Accessibility: {{A11Y}}
|
|
24
40
|
- Security/privacy: {{SECURITY}}
|
|
25
41
|
- Observability: {{OBS}}
|
|
42
|
+
|
|
43
|
+
## Implementation Surface
|
|
44
|
+
|
|
45
|
+
### Files Created (owned exclusively by this spec)
|
|
46
|
+
- {{NEW_FILE_1}}
|
|
47
|
+
|
|
48
|
+
### Files Modified (shared — coordinate with other specs)
|
|
49
|
+
- {{MOD_FILE_1}}
|
|
50
|
+
|
|
51
|
+
### Shared Surfaces
|
|
52
|
+
- **Types consumed:** {{TYPES_THIS_SPEC_DEPENDS_ON}}
|
|
53
|
+
- **Types created:** {{TYPES_THIS_SPEC_INTRODUCES}}
|
|
54
|
+
- **Design tokens used:** {{TOKENS}}
|
|
55
|
+
- **Routes added:** {{ROUTES}}
|
|
56
|
+
- **Components consumed:** {{COMPONENTS_USED_FROM_ELSEWHERE}}
|
|
57
|
+
- **Components created:** {{COMPONENTS_INTRODUCED}}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Analyze multiple Ready specs to extract shared contracts and file ownership for parallel development.
|
|
3
|
+
Produces .planning/CONTRACTS.md consumed by handoff and agent dispatch.
|
|
4
|
+
|
|
5
|
+
This workflow prevents merge conflicts, duplicated types, and integration failures when multiple features are developed in parallel.
|
|
6
|
+
</purpose>
|
|
7
|
+
|
|
8
|
+
<process>
|
|
9
|
+
|
|
10
|
+
<step name="discover_specs">
|
|
11
|
+
Read .planning/specs/ directory.
|
|
12
|
+
For each spec folder, read STATE.md and filter to status: Ready or Handed Off.
|
|
13
|
+
|
|
14
|
+
If 0-1 qualifying specs:
|
|
15
|
+
- Output: "Contracts extraction requires 2+ Ready specs. Skipping."
|
|
16
|
+
- Exit gracefully (this is not an error).
|
|
17
|
+
</step>
|
|
18
|
+
|
|
19
|
+
<step name="extract_surfaces">
|
|
20
|
+
For each qualifying spec, read 01-SCOPE.md.
|
|
21
|
+
Extract the Implementation Surface section into structured data:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
{
|
|
25
|
+
"spec_id": "SPEC-001",
|
|
26
|
+
"files_created": ["app/components/hero.tsx", ...],
|
|
27
|
+
"files_modified": ["app/root.tsx", "app/app.css", ...],
|
|
28
|
+
"types_consumed": ["Deck", "Card"],
|
|
29
|
+
"types_created": ["HeroProps"],
|
|
30
|
+
"tokens_used": ["brand-gold", "surface-primary"],
|
|
31
|
+
"routes_added": ["/deck/:id"],
|
|
32
|
+
"components_consumed": ["Footer", "Layout"],
|
|
33
|
+
"components_created": ["Hero", "CardGrid"]
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
If a spec has no Implementation Surface, record a warning but continue.
|
|
38
|
+
</step>
|
|
39
|
+
|
|
40
|
+
<step name="detect_overlaps">
|
|
41
|
+
Compare all extracted surfaces:
|
|
42
|
+
|
|
43
|
+
**File conflicts:**
|
|
44
|
+
- Two specs creating the same file → CONFLICT (must resolve before dispatch)
|
|
45
|
+
- Two specs modifying the same file → SHARED (needs coordination, not blocking)
|
|
46
|
+
|
|
47
|
+
**Type conflicts:**
|
|
48
|
+
- Same type name created by two specs → CONFLICT
|
|
49
|
+
- Same type consumed and created → dependency (note direction)
|
|
50
|
+
|
|
51
|
+
**Route conflicts:**
|
|
52
|
+
- Overlapping route patterns → CONFLICT
|
|
53
|
+
|
|
54
|
+
**Token gaps:**
|
|
55
|
+
- Token referenced but not in codebase → NEW (flag for creation)
|
|
56
|
+
</step>
|
|
57
|
+
|
|
58
|
+
<step name="build_ownership_matrix">
|
|
59
|
+
For each file across all specs:
|
|
60
|
+
|
|
61
|
+
| File | Owner Spec | Also Modified By | Action |
|
|
62
|
+
|------|-----------|-----------------|--------|
|
|
63
|
+
| app/components/hero.tsx | SPEC-001 | — | Exclusive |
|
|
64
|
+
| app/root.tsx | — | SPEC-001, SPEC-002 | Coordinate |
|
|
65
|
+
|
|
66
|
+
Rules:
|
|
67
|
+
- Created files have exactly one owner
|
|
68
|
+
- Modified files list all specs that touch them
|
|
69
|
+
- Conflicts require resolution before dispatch
|
|
70
|
+
</step>
|
|
71
|
+
|
|
72
|
+
<step name="generate_type_contracts">
|
|
73
|
+
For shared types (consumed by one spec, created by another):
|
|
74
|
+
- Define the interface with field names and types
|
|
75
|
+
- Note which spec owns the definition
|
|
76
|
+
- Note which specs depend on it
|
|
77
|
+
|
|
78
|
+
These become the "API boundary" between parallel work streams.
|
|
79
|
+
</step>
|
|
80
|
+
|
|
81
|
+
<step name="generate_component_contracts">
|
|
82
|
+
For shared components (created by one spec, consumed by another):
|
|
83
|
+
- Define the props interface
|
|
84
|
+
- Note the owner spec
|
|
85
|
+
- Note consumer specs
|
|
86
|
+
|
|
87
|
+
This ensures component APIs are agreed upon before parallel coding starts.
|
|
88
|
+
</step>
|
|
89
|
+
|
|
90
|
+
<step name="write_contracts_md">
|
|
91
|
+
Write .planning/CONTRACTS.md using the contracts template.
|
|
92
|
+
|
|
93
|
+
Sections:
|
|
94
|
+
1. Type Contracts
|
|
95
|
+
2. Token Contracts
|
|
96
|
+
3. Route Contracts
|
|
97
|
+
4. Component API Contracts
|
|
98
|
+
5. File Ownership Matrix
|
|
99
|
+
6. Conflict Warnings
|
|
100
|
+
|
|
101
|
+
If .planning/CONTRACTS.md already exists, rename to CONTRACTS.prev.md first.
|
|
102
|
+
</step>
|
|
103
|
+
|
|
104
|
+
<step name="summarize">
|
|
105
|
+
Report:
|
|
106
|
+
- Specs analyzed: {{count}}
|
|
107
|
+
- Shared types: {{count}} ({{conflict_count}} conflicts)
|
|
108
|
+
- Shared files: {{count}} modified by multiple specs
|
|
109
|
+
- Routes: {{count}} total ({{conflict_count}} conflicts)
|
|
110
|
+
- Blocking conflicts: {{count}} (must resolve before dispatch)
|
|
111
|
+
</step>
|
|
112
|
+
|
|
113
|
+
</process>
|
|
@@ -67,7 +67,21 @@ Record unknowns as assumptions + open questions.
|
|
|
67
67
|
<step name="write_brief_and_scope">
|
|
68
68
|
Main flow writes:
|
|
69
69
|
- 00-BRIEF.md (problem, JTBD, goal, constraints, risks)
|
|
70
|
-
- 01-SCOPE.md (in/out with priorities, dependencies, NFRs)
|
|
70
|
+
- 01-SCOPE.md (in/out with priorities, dependencies, NFRs, Implementation Surface)
|
|
71
|
+
|
|
72
|
+
**Requirement ID Convention:**
|
|
73
|
+
Generate stable IDs at spec time using format: `REQ-{SPEC_ID}-{PRIORITY}-{SEQ}`
|
|
74
|
+
- Example: REQ-001-P0-01, REQ-001-P1-02
|
|
75
|
+
- IDs remain stable across spec revisions
|
|
76
|
+
- Enables traceability from spec → handoff → implementation
|
|
77
|
+
|
|
78
|
+
**Implementation Surface:**
|
|
79
|
+
After writing in-scope items, fill the Implementation Surface section:
|
|
80
|
+
- Identify likely files to create (new components, routes, utilities)
|
|
81
|
+
- Identify files to modify (existing layouts, route config, shared types)
|
|
82
|
+
- List shared surfaces: types consumed/created, tokens, routes, components
|
|
83
|
+
- If exact file paths are unknown, infer from feature description and project structure
|
|
84
|
+
- Mark unknowns as "TBD" — the /gss:contracts step refines these later
|
|
71
85
|
|
|
72
86
|
These require intake context, so main flow handles them.
|
|
73
87
|
</step>
|
|
@@ -14,10 +14,26 @@ Read:
|
|
|
14
14
|
</step>
|
|
15
15
|
|
|
16
16
|
<step name="map_requirements">
|
|
17
|
-
|
|
17
|
+
Use requirement IDs from SCOPE (REQ-{SPEC_ID}-{PRIORITY}-{SEQ}).
|
|
18
|
+
Map each requirement to its acceptance scenarios from 04-ACCEPTANCE.md.
|
|
18
19
|
Requirements describe OUTCOMES, not tasks.
|
|
19
20
|
</step>
|
|
20
21
|
|
|
22
|
+
<step name="generate_traceability_matrix">
|
|
23
|
+
Create a traceability matrix linking:
|
|
24
|
+
- Requirement ID → Acceptance scenario numbers → Spec source file:section
|
|
25
|
+
|
|
26
|
+
Example format:
|
|
27
|
+
| REQ ID | Acceptance Scenarios | Source |
|
|
28
|
+
|--------|---------------------|--------|
|
|
29
|
+
| REQ-001-P0-01 | 1.1.1, 1.1.2, 1.1.3 | 01-SCOPE.md#email-signup |
|
|
30
|
+
|
|
31
|
+
This enables:
|
|
32
|
+
- Coverage verification (every REQ has acceptance criteria)
|
|
33
|
+
- Change impact analysis (which acceptance scenarios if REQ changes)
|
|
34
|
+
- Engineering trace-back to product intent
|
|
35
|
+
</step>
|
|
36
|
+
|
|
21
37
|
<step name="summarize_context">
|
|
22
38
|
Extract from BRIEF:
|
|
23
39
|
- Problem statement (why this matters)
|
|
@@ -32,12 +48,28 @@ List:
|
|
|
32
48
|
- Dependencies on other work
|
|
33
49
|
</step>
|
|
34
50
|
|
|
51
|
+
<step name="surface_implementation">
|
|
52
|
+
Extract from 01-SCOPE.md Implementation Surface section:
|
|
53
|
+
- Files created (exclusive ownership)
|
|
54
|
+
- Files modified (shared)
|
|
55
|
+
- Shared surfaces (types, tokens, routes, components)
|
|
56
|
+
|
|
57
|
+
If .planning/CONTRACTS.md exists:
|
|
58
|
+
- Read contracts relevant to this spec
|
|
59
|
+
- List contract dependencies (types/components this spec consumes from others)
|
|
60
|
+
- List contracts this spec provides to others
|
|
61
|
+
- Include suggested branch name and dispatch order from CONTRACTS.md
|
|
62
|
+
</step>
|
|
63
|
+
|
|
35
64
|
<step name="write_handoff">
|
|
36
65
|
Write HANDOFF.md with:
|
|
37
66
|
- Requirements mapped to acceptance scenarios
|
|
38
67
|
- Problem context and success criteria
|
|
39
68
|
- Risks and open questions
|
|
40
|
-
-
|
|
69
|
+
- Implementation Surface (files, types, tokens, routes, components)
|
|
70
|
+
- Contract dependencies (if CONTRACTS.md exists)
|
|
71
|
+
- Dispatch section: suggested branch name, owned files, contract dependencies
|
|
72
|
+
- NO engineering tasks, phases, or technical approach decisions
|
|
41
73
|
</step>
|
|
42
74
|
|
|
43
75
|
</process>
|
|
@@ -17,6 +17,8 @@ Find:
|
|
|
17
17
|
- acceptance that cannot be objectively verified
|
|
18
18
|
- data/UX mismatches
|
|
19
19
|
- analytics gaps
|
|
20
|
+
- missing Implementation Surface (no files created/modified listed)
|
|
21
|
+
- file ownership conflicts with other specs in .planning/specs/ (check their Implementation Surfaces)
|
|
20
22
|
</step>
|
|
21
23
|
|
|
22
24
|
<step name="patch_or_questions">
|
|
@@ -44,3 +44,23 @@
|
|
|
44
44
|
| Security | Clean URLs require purchase validation; long-lived (24h+) after purchase — customers "own" their images |
|
|
45
45
|
| Accessibility | Watermark text not conveyed to screen readers (decorative) |
|
|
46
46
|
| Observability | Success/failure rates visible, alert on >5% failure rate |
|
|
47
|
+
|
|
48
|
+
## Implementation Surface
|
|
49
|
+
|
|
50
|
+
### Files Created (owned exclusively by this spec)
|
|
51
|
+
- lib/watermark.ts
|
|
52
|
+
- lib/storage/dual-store.ts
|
|
53
|
+
- functions/inngest/watermark-step.ts
|
|
54
|
+
|
|
55
|
+
### Files Modified (shared — coordinate with other specs)
|
|
56
|
+
- functions/inngest/face-swap.ts
|
|
57
|
+
- lib/storage/r2.ts
|
|
58
|
+
- app/api/cards/[id]/route.ts
|
|
59
|
+
|
|
60
|
+
### Shared Surfaces
|
|
61
|
+
- **Types consumed:** Card, Deck, R2Object
|
|
62
|
+
- **Types created:** WatermarkConfig, DualStoreResult
|
|
63
|
+
- **Design tokens used:** None (backend service)
|
|
64
|
+
- **Routes added:** None (modifies existing card route)
|
|
65
|
+
- **Components consumed:** None (backend service)
|
|
66
|
+
- **Components created:** None (backend service)
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "get-shit-specd",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Spec-first development workflow for Claude Code. Transform vague ideas into engineering-ready specs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"gss": "./bin/gss
|
|
8
|
-
"get-shit-specd": "./bin/gss
|
|
7
|
+
"gss": "./bin/gss",
|
|
8
|
+
"get-shit-specd": "./bin/gss"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"typecheck": "bun --bun tsc --noEmit"
|
/package/bin/{gss.ts → gss}
RENAMED
|
File without changes
|