5-phase-workflow 1.9.1 → 1.9.3
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 +23 -1
- package/bin/install.js +2 -0
- package/bin/sync-agents.js +639 -0
- package/package.json +1 -1
- package/src/commands/5/address-review-findings.md +94 -31
- package/src/commands/5/analyze-feature.md +159 -0
- package/src/commands/5/plan-feature.md +29 -39
- package/src/commands/5/plan-implementation.md +2 -2
- package/src/commands/5/synchronize-agents.md +60 -0
- package/src/templates/workflow/FEATURE-SPEC.md +60 -95
|
@@ -1,135 +1,100 @@
|
|
|
1
1
|
<!-- TEMPLATE RULES:
|
|
2
|
-
-
|
|
3
|
-
-
|
|
4
|
-
- Entity definitions
|
|
5
|
-
- Acceptance criteria describe observable behavior
|
|
6
|
-
-
|
|
7
|
-
-
|
|
8
|
-
- Mermaid diagrams describe WHAT happens, not HOW it is implemented
|
|
2
|
+
- Write naturally
|
|
3
|
+
- Reference existing classes, modules, and patterns by name for precision
|
|
4
|
+
- Entity definitions include field names and domain types
|
|
5
|
+
- Acceptance criteria describe observable behavior
|
|
6
|
+
- No code blocks, no pseudo-code, no class hierarchy designs
|
|
7
|
+
- Delete any OPTIONAL section that doesn't add value for this feature
|
|
9
8
|
-->
|
|
10
9
|
|
|
11
10
|
# Feature: {TICKET-ID} - {Title}
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
{TICKET-ID}
|
|
12
|
+
**Ticket:** {TICKET-ID}
|
|
15
13
|
|
|
16
|
-
##
|
|
17
|
-
{1-2 sentence overview: what capability is being added and who benefits}
|
|
14
|
+
## Overview
|
|
18
15
|
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
{What is the problem or gap, and what capability is being added? Write this as a short narrative
|
|
17
|
+
that covers who is affected, why the change matters, and what the end result looks like.}
|
|
21
18
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
Delete this entire section if the feature is simple enough to understand without diagrams.
|
|
25
|
-
Use whichever diagram types are relevant — you don't need all of them. -->
|
|
19
|
+
<!-- OPTIONAL: Include mermaid diagrams only when they add clarity.
|
|
20
|
+
Delete this section for simple features. Use whichever diagram type fits. -->
|
|
26
21
|
|
|
27
|
-
<!-- Process Flow — use when the feature involves a multi-step process or state transitions -->
|
|
28
22
|
```mermaid
|
|
29
23
|
flowchart TD
|
|
30
|
-
A[
|
|
31
|
-
B --> C
|
|
32
|
-
C -->|Yes| D[Outcome 1]
|
|
33
|
-
C -->|No| E[Outcome 2]
|
|
24
|
+
A[Current state] --> B[Change]
|
|
25
|
+
B --> C[New capability]
|
|
34
26
|
```
|
|
35
27
|
|
|
36
|
-
|
|
37
|
-
```mermaid
|
|
38
|
-
erDiagram
|
|
39
|
-
ENTITY-A ||--o{ ENTITY-B : "relationship"
|
|
40
|
-
ENTITY-B }|--|| ENTITY-C : "relationship"
|
|
41
|
-
```
|
|
28
|
+
## What Changes
|
|
42
29
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
actor User
|
|
47
|
-
participant ComponentA
|
|
48
|
-
participant ComponentB
|
|
49
|
-
User->>ComponentA: action
|
|
50
|
-
ComponentA->>ComponentB: interaction
|
|
51
|
-
ComponentB-->>User: result
|
|
52
|
-
```
|
|
30
|
+
{Describe what the feature does in natural, flowing prose. Name existing classes, modules, and patterns
|
|
31
|
+
where relevant. Group by logical concern, not by module layer. Each subsection should tell the reader
|
|
32
|
+
what happens and which parts of the codebase are involved.}
|
|
53
33
|
|
|
54
|
-
|
|
34
|
+
### {Logical concern 1, e.g., "New data model"}
|
|
55
35
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
- ...
|
|
36
|
+
{Describe the change. Name affected modules and classes. If a new entity is introduced, describe its
|
|
37
|
+
fields and types in a table:}
|
|
59
38
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
39
|
+
| Field | Type | Required | Description |
|
|
40
|
+
|-------|------|----------|-------------|
|
|
41
|
+
| ... | ... | ... | ... |
|
|
63
42
|
|
|
64
|
-
|
|
65
|
-
- {Business rules that limit the solution space}
|
|
66
|
-
- {Technical boundaries from existing architecture}
|
|
67
|
-
- {Timeline or resource limitations}
|
|
43
|
+
### {Logical concern 2, e.g., "CRUD operations"}
|
|
68
44
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
- **{component/module-2}** - {What changes here}
|
|
72
|
-
- **{component/module-3}** - {What changes here}
|
|
73
|
-
- ...
|
|
45
|
+
{Describe the behavior. Reference existing patterns to follow, e.g.,
|
|
46
|
+
"Follow the same approach as the UserService update flow."}
|
|
74
47
|
|
|
75
|
-
|
|
48
|
+
### {Logical concern 3, e.g., "API exposure"}
|
|
76
49
|
|
|
77
|
-
|
|
78
|
-
<!-- Describe the data CONCEPT, not the implementation. No TypeScript, no SQL. -->
|
|
79
|
-
| Field | Type | Required | Description |
|
|
80
|
-
|-------|------|----------|-------------|
|
|
81
|
-
| id | {Entity}Id | Yes | Unique identifier |
|
|
82
|
-
| name | String | Yes | Entity name |
|
|
83
|
-
| ... | ... | ... | ... |
|
|
50
|
+
{Describe what gets exposed and how.}
|
|
84
51
|
|
|
85
52
|
### Business Rules
|
|
53
|
+
|
|
86
54
|
- {Rule 1}
|
|
87
55
|
- {Rule 2}
|
|
88
|
-
- ...
|
|
89
56
|
|
|
90
|
-
##
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
57
|
+
## Existing Patterns to Follow
|
|
58
|
+
|
|
59
|
+
{List concrete patterns from the codebase that the implementation should mirror.
|
|
60
|
+
These are high-value pointers for Phase 2 -- be specific.}
|
|
61
|
+
|
|
62
|
+
- **{Pattern name}** -- {where it lives and what to reuse from it}
|
|
94
63
|
- ...
|
|
95
64
|
|
|
96
|
-
##
|
|
65
|
+
## Constraints
|
|
66
|
+
|
|
67
|
+
- {Business rules that limit the solution space}
|
|
68
|
+
- {Technical boundaries from existing architecture}
|
|
69
|
+
|
|
70
|
+
## Scope
|
|
71
|
+
|
|
72
|
+
**In scope:**
|
|
73
|
+
- {What is included}
|
|
97
74
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
**Cons:** {Drawbacks}
|
|
101
|
-
**Decision:** Rejected because {reason}
|
|
75
|
+
**Out of scope:**
|
|
76
|
+
- {What is explicitly excluded and why}
|
|
102
77
|
|
|
103
|
-
|
|
104
|
-
**Pros:** {Benefits}
|
|
105
|
-
**Cons:** {Drawbacks}
|
|
106
|
-
**Decision:** Rejected because {reason}
|
|
78
|
+
## Acceptance Criteria
|
|
107
79
|
|
|
108
|
-
|
|
109
|
-
|
|
80
|
+
- [ ] {Observable behavior that proves a requirement is met}
|
|
81
|
+
- [ ] ...
|
|
110
82
|
|
|
111
83
|
## Decisions
|
|
112
84
|
|
|
113
|
-
<!--
|
|
114
|
-
Tag each with exactly one of: [DECIDED], [FLEXIBLE], [DEFERRED]
|
|
115
|
-
- [DECIDED]: Locked — Phase 2 planner and Phase 3 agents MUST honor exactly
|
|
116
|
-
- [FLEXIBLE]: Claude's discretion — planner chooses the best approach
|
|
117
|
-
- [DEFERRED]: Out of scope — planner MUST NOT include in the plan
|
|
118
|
-
-->
|
|
85
|
+
<!-- Tag each: [DECIDED] = locked, [FLEXIBLE] = planner chooses, [DEFERRED] = not in this iteration -->
|
|
119
86
|
|
|
120
|
-
|
|
121
|
-
**
|
|
122
|
-
**
|
|
87
|
+
- **{Topic}:** {What was decided and why} **[DECIDED]**
|
|
88
|
+
- **{Topic}:** {General direction, planner chooses specifics} **[FLEXIBLE]**
|
|
89
|
+
- **{Topic}:** {Not addressing now -- reason} **[DEFERRED]**
|
|
123
90
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
**Decision:** {General direction, implementer chooses specifics} **[FLEXIBLE]**
|
|
91
|
+
<!-- OPTIONAL: Only include if alternatives were genuinely discussed and the reasoning matters -->
|
|
92
|
+
## Alternatives Considered
|
|
127
93
|
|
|
128
|
-
|
|
129
|
-
**
|
|
130
|
-
**Decision:** {Not addressing now — reason} **[DEFERRED]**
|
|
94
|
+
- **{Alternative}:** Rejected because {reason}
|
|
95
|
+
- **{Chosen approach}:** Selected because {reason}
|
|
131
96
|
|
|
132
97
|
## Next Steps
|
|
133
|
-
|
|
134
|
-
1. Run `/clear` to reset context
|
|
98
|
+
|
|
99
|
+
1. Run `/clear` to reset context (optional)
|
|
135
100
|
2. Run `/5:plan-implementation {TICKET-ID}-{description}`
|