@pennyfarthing/core 7.6.0 → 7.7.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/README.md +109 -201
- package/package.json +1 -1
- package/packages/core/dist/cli/commands/doctor.d.ts.map +1 -1
- package/packages/core/dist/cli/commands/doctor.js +91 -0
- package/packages/core/dist/cli/commands/doctor.js.map +1 -1
- package/packages/core/dist/cli/commands/init.js +31 -0
- package/packages/core/dist/cli/commands/init.js.map +1 -1
- package/packages/core/dist/cli/commands/update.js +31 -0
- package/packages/core/dist/cli/commands/update.js.map +1 -1
- package/pennyfarthing-dist/agents/architect.md +48 -53
- package/pennyfarthing-dist/agents/dev.md +74 -164
- package/pennyfarthing-dist/agents/devops.md +44 -39
- package/pennyfarthing-dist/agents/handoff.md +46 -23
- package/pennyfarthing-dist/agents/orchestrator.md +84 -255
- package/pennyfarthing-dist/agents/pm.md +40 -50
- package/pennyfarthing-dist/agents/reviewer-preflight.md +58 -26
- package/pennyfarthing-dist/agents/reviewer.md +107 -298
- package/pennyfarthing-dist/agents/sm-file-summary.md +51 -30
- package/pennyfarthing-dist/agents/sm-finish.md +59 -38
- package/pennyfarthing-dist/agents/sm-handoff.md +40 -33
- package/pennyfarthing-dist/agents/sm-setup.md +89 -47
- package/pennyfarthing-dist/agents/sm.md +171 -558
- package/pennyfarthing-dist/agents/tea.md +77 -146
- package/pennyfarthing-dist/agents/tech-writer.md +43 -24
- package/pennyfarthing-dist/agents/testing-runner.md +73 -30
- package/pennyfarthing-dist/agents/ux-designer.md +39 -25
- package/pennyfarthing-dist/agents/workflow-status-check.md +34 -16
- package/pennyfarthing-dist/commands/benchmark.md +19 -1
- package/pennyfarthing-dist/commands/continue-session.md +1 -1
- package/pennyfarthing-dist/commands/solo.md +5 -0
- package/pennyfarthing-dist/commands/theme-maker.md +5 -5
- package/pennyfarthing-dist/commands/work.md +1 -1
- package/pennyfarthing-dist/guides/XML-TAGS.md +179 -0
- package/pennyfarthing-dist/guides/agent-behavior.md +37 -2
- package/pennyfarthing-dist/guides/agent-tag-taxonomy.md +432 -0
- package/pennyfarthing-dist/guides/patterns/approval-gates-pattern.md +27 -7
- package/pennyfarthing-dist/guides/scale-levels.md +114 -0
- package/pennyfarthing-dist/personas/themes/gilligans-island.yaml +2 -2
- package/pennyfarthing-dist/personas/themes/star-trek-tos.yaml +1 -1
- package/pennyfarthing-dist/scripts/core/agent-session.sh +13 -7
- package/pennyfarthing-dist/scripts/core/check-context.sh +25 -8
- package/pennyfarthing-dist/scripts/core/prime.sh +57 -32
- package/pennyfarthing-dist/scripts/git/create-feature-branches.sh +45 -4
- package/pennyfarthing-dist/scripts/git/git-status-all.sh +32 -7
- package/pennyfarthing-dist/scripts/hooks/bell-mode-hook.sh +30 -11
- package/pennyfarthing-dist/scripts/hooks/pre-commit.sh +80 -23
- package/pennyfarthing-dist/scripts/hooks/question-reflector-check.mjs +393 -0
- package/pennyfarthing-dist/scripts/hooks/question-reflector-check.sh +20 -0
- package/pennyfarthing-dist/scripts/hooks/question_reflector_check.py +402 -0
- package/pennyfarthing-dist/scripts/hooks/session-stop.sh +7 -0
- package/pennyfarthing-dist/scripts/hooks/tests/question-reflector.test.mjs +545 -0
- package/pennyfarthing-dist/scripts/hooks/welcome-hook.sh +94 -0
- package/pennyfarthing-dist/scripts/jira/jira-claim-story.sh +10 -152
- package/pennyfarthing-dist/scripts/jira/jira-sync-story.sh +14 -4
- package/pennyfarthing-dist/scripts/jira/jira-sync.sh +12 -4
- package/pennyfarthing-dist/scripts/jira/sync-epic-jira.sh +11 -99
- package/pennyfarthing-dist/scripts/lib/common.sh +55 -0
- package/pennyfarthing-dist/scripts/maintenance/sidecar-health.sh +97 -0
- package/pennyfarthing-dist/scripts/misc/deploy.sh +13 -1
- package/pennyfarthing-dist/scripts/misc/statusline.sh +27 -22
- package/pennyfarthing-dist/scripts/story/create-story.sh +14 -154
- package/pennyfarthing-dist/scripts/story/size-story.sh +12 -192
- package/pennyfarthing-dist/scripts/story/story-template.sh +12 -156
- package/pennyfarthing-dist/scripts/test/ground-truth-judge.py +24 -93
- package/pennyfarthing-dist/scripts/test/swebench-judge.py +33 -59
- package/pennyfarthing-dist/scripts/validation/validate-agent-schema.sh +575 -0
- package/pennyfarthing-dist/scripts/workflow/check.py +502 -0
- package/pennyfarthing-dist/skills/skill-registry.yaml +52 -16
- package/pennyfarthing-dist/skills/sprint/skill.md +1 -1
- package/pennyfarthing-dist/templates/settings.local.json.template +11 -0
|
@@ -1,159 +1,19 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
2
|
-
#
|
|
3
|
-
# Usage: create-story.sh <epic-id> <title> <points> [options]
|
|
1
|
+
#!/usr/bin/env zsh
|
|
2
|
+
# Generate a story YAML block for adding to sprint
|
|
3
|
+
# Usage: create-story.sh <epic-id> "<title>" <points> [options]
|
|
4
4
|
# --type bug|feature|refactor|chore Story type (default: feature)
|
|
5
|
-
# --workflow <name> Workflow override
|
|
5
|
+
# --workflow <name> Workflow override
|
|
6
6
|
# --priority P0|P1|P2|P3 Priority (default: P2)
|
|
7
|
-
#
|
|
8
|
-
#
|
|
7
|
+
#
|
|
8
|
+
# Thin wrapper that delegates to Python CLI:
|
|
9
|
+
# python -m pennyfarthing_scripts.story create <epic-id> "<title>" <points> [options]
|
|
9
10
|
|
|
10
|
-
set -
|
|
11
|
+
set -e
|
|
11
12
|
|
|
12
|
-
#
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
REPOS=""
|
|
17
|
-
CREATE_JIRA=false
|
|
13
|
+
# Source common functions for Python discovery
|
|
14
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
15
|
+
PARENT_DIR="$(dirname "$SCRIPT_DIR")"
|
|
16
|
+
source "${PARENT_DIR}/lib/common.sh"
|
|
18
17
|
|
|
19
|
-
#
|
|
20
|
-
|
|
21
|
-
TITLE=""
|
|
22
|
-
POINTS=""
|
|
23
|
-
|
|
24
|
-
while [[ $# -gt 0 ]]; do
|
|
25
|
-
case "$1" in
|
|
26
|
-
--type)
|
|
27
|
-
TYPE="$2"
|
|
28
|
-
shift 2
|
|
29
|
-
;;
|
|
30
|
-
--workflow)
|
|
31
|
-
WORKFLOW="$2"
|
|
32
|
-
shift 2
|
|
33
|
-
;;
|
|
34
|
-
--priority)
|
|
35
|
-
PRIORITY="$2"
|
|
36
|
-
shift 2
|
|
37
|
-
;;
|
|
38
|
-
--repos)
|
|
39
|
-
REPOS="$2"
|
|
40
|
-
shift 2
|
|
41
|
-
;;
|
|
42
|
-
--jira)
|
|
43
|
-
CREATE_JIRA=true
|
|
44
|
-
shift
|
|
45
|
-
;;
|
|
46
|
-
*)
|
|
47
|
-
if [[ -z "$EPIC_ID" ]]; then
|
|
48
|
-
EPIC_ID="$1"
|
|
49
|
-
elif [[ -z "$TITLE" ]]; then
|
|
50
|
-
TITLE="$1"
|
|
51
|
-
elif [[ -z "$POINTS" ]]; then
|
|
52
|
-
POINTS="$1"
|
|
53
|
-
fi
|
|
54
|
-
shift
|
|
55
|
-
;;
|
|
56
|
-
esac
|
|
57
|
-
done
|
|
58
|
-
|
|
59
|
-
# Validate required args
|
|
60
|
-
if [[ -z "$EPIC_ID" ]] || [[ -z "$TITLE" ]] || [[ -z "$POINTS" ]]; then
|
|
61
|
-
cat << 'EOF'
|
|
62
|
-
Usage: create-story.sh <epic-id> "<title>" <points> [options]
|
|
63
|
-
|
|
64
|
-
Arguments:
|
|
65
|
-
epic-id Parent epic (e.g., PROJ-1234)
|
|
66
|
-
title Story title (quoted)
|
|
67
|
-
points Story points (1, 2, 3, 5, 8)
|
|
68
|
-
|
|
69
|
-
Options:
|
|
70
|
-
--type bug|feature|refactor|chore Story type (default: feature)
|
|
71
|
-
--workflow <name> Override auto-workflow
|
|
72
|
-
--priority P0|P1|P2|P3 Priority (default: P2)
|
|
73
|
-
--repos <name> Affected repos
|
|
74
|
-
--jira Also show Jira create command
|
|
75
|
-
|
|
76
|
-
Examples:
|
|
77
|
-
create-story.sh PROJ-1234 "Add error handling" 3
|
|
78
|
-
create-story.sh PROJ-1234 "Fix typo" 1 --type chore
|
|
79
|
-
create-story.sh PROJ-1234 "New feature" 5 --jira
|
|
80
|
-
EOF
|
|
81
|
-
exit 1
|
|
82
|
-
fi
|
|
83
|
-
|
|
84
|
-
# Auto-determine workflow if not set
|
|
85
|
-
if [[ -z "$WORKFLOW" ]]; then
|
|
86
|
-
case "$POINTS" in
|
|
87
|
-
1|2)
|
|
88
|
-
if [[ "$TYPE" == "chore" ]] || [[ "$TYPE" == "bug" ]]; then
|
|
89
|
-
WORKFLOW="trivial"
|
|
90
|
-
else
|
|
91
|
-
WORKFLOW="tdd"
|
|
92
|
-
fi
|
|
93
|
-
;;
|
|
94
|
-
*)
|
|
95
|
-
WORKFLOW="tdd"
|
|
96
|
-
;;
|
|
97
|
-
esac
|
|
98
|
-
fi
|
|
99
|
-
|
|
100
|
-
# Generate story ID placeholder
|
|
101
|
-
STORY_ID="PROJ-XXXXX"
|
|
102
|
-
|
|
103
|
-
# Output YAML block
|
|
104
|
-
echo "# Add this to sprint/current-sprint.yaml under epic $EPIC_ID:"
|
|
105
|
-
echo ""
|
|
106
|
-
echo " - id: $STORY_ID"
|
|
107
|
-
echo " title: \"$TITLE\""
|
|
108
|
-
echo " points: $POINTS"
|
|
109
|
-
echo " priority: $PRIORITY"
|
|
110
|
-
echo " status: backlog"
|
|
111
|
-
if [[ -n "$REPOS" ]]; then
|
|
112
|
-
echo " repos: $REPOS"
|
|
113
|
-
fi
|
|
114
|
-
echo " workflow: $WORKFLOW"
|
|
115
|
-
|
|
116
|
-
# Add type-specific fields
|
|
117
|
-
case "$TYPE" in
|
|
118
|
-
bug)
|
|
119
|
-
cat << 'EOF'
|
|
120
|
-
acceptance_criteria:
|
|
121
|
-
- Bug no longer occurs
|
|
122
|
-
- Regression test added
|
|
123
|
-
- Related code audited for same issue
|
|
124
|
-
EOF
|
|
125
|
-
;;
|
|
126
|
-
feature)
|
|
127
|
-
cat << 'EOF'
|
|
128
|
-
acceptance_criteria:
|
|
129
|
-
- Feature works as specified
|
|
130
|
-
- Tests cover happy path and edge cases
|
|
131
|
-
- Error handling implemented
|
|
132
|
-
EOF
|
|
133
|
-
;;
|
|
134
|
-
refactor)
|
|
135
|
-
cat << 'EOF'
|
|
136
|
-
acceptance_criteria:
|
|
137
|
-
- All existing tests pass
|
|
138
|
-
- No behavior changes
|
|
139
|
-
- Code follows new pattern
|
|
140
|
-
EOF
|
|
141
|
-
;;
|
|
142
|
-
chore)
|
|
143
|
-
cat << 'EOF'
|
|
144
|
-
acceptance_criteria:
|
|
145
|
-
- Task completed
|
|
146
|
-
- No regressions introduced
|
|
147
|
-
EOF
|
|
148
|
-
;;
|
|
149
|
-
esac
|
|
150
|
-
|
|
151
|
-
echo ""
|
|
152
|
-
echo "---"
|
|
153
|
-
echo "Type: $TYPE | Workflow: $WORKFLOW | Points: $POINTS"
|
|
154
|
-
|
|
155
|
-
if [[ "$CREATE_JIRA" == "true" ]]; then
|
|
156
|
-
echo ""
|
|
157
|
-
echo "To create in Jira:"
|
|
158
|
-
echo " jira issue create -t Story -s \"$TITLE\" -P <PROJECT> --parent $EPIC_ID --custom story-points=$POINTS"
|
|
159
|
-
fi
|
|
18
|
+
# Delegate to Python CLI
|
|
19
|
+
run_python_module story create "$@"
|
|
@@ -1,198 +1,18 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
2
|
-
#
|
|
1
|
+
#!/usr/bin/env zsh
|
|
2
|
+
# Display story sizing guidelines
|
|
3
3
|
# Usage: size-story.sh [points]
|
|
4
4
|
# No args: Show all sizing guidelines
|
|
5
5
|
# points: Show specific guidance for that point value
|
|
6
|
+
#
|
|
7
|
+
# Thin wrapper that delegates to Python CLI:
|
|
8
|
+
# python -m pennyfarthing_scripts.story size [points]
|
|
6
9
|
|
|
7
|
-
set -
|
|
10
|
+
set -e
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
# Source common functions for Python discovery
|
|
13
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
14
|
+
PARENT_DIR="$(dirname "$SCRIPT_DIR")"
|
|
15
|
+
source "${PARENT_DIR}/lib/common.sh"
|
|
10
16
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
# Story Sizing Guidelines
|
|
14
|
-
|
|
15
|
-
| Points | Scale | Complexity | Testing |
|
|
16
|
-
|--------|-------|------------|---------|
|
|
17
|
-
| 1-2 | Trivial | Single file, config | Minimal/none |
|
|
18
|
-
| 3 | Small | Few files, single component | Some tests |
|
|
19
|
-
| 5 | Medium | Multiple files, cross-layer | Comprehensive |
|
|
20
|
-
| 8 | Large | Significant scope, cross-repo | Extensive |
|
|
21
|
-
| 13+ | Epic | **SPLIT THIS** | N/A |
|
|
22
|
-
|
|
23
|
-
## 1-2 Points (Trivial)
|
|
24
|
-
- Single file change
|
|
25
|
-
- Config update
|
|
26
|
-
- Simple bug fix
|
|
27
|
-
- Minimal or no new tests needed
|
|
28
|
-
|
|
29
|
-
## 3 Points (Small)
|
|
30
|
-
- Few files changed
|
|
31
|
-
- Single component/handler
|
|
32
|
-
- Straightforward implementation
|
|
33
|
-
- Some tests needed
|
|
34
|
-
|
|
35
|
-
## 5 Points (Medium)
|
|
36
|
-
- Multiple files across layers
|
|
37
|
-
- New feature component
|
|
38
|
-
- API + UI changes
|
|
39
|
-
- Comprehensive tests
|
|
40
|
-
|
|
41
|
-
## 8 Points (Large)
|
|
42
|
-
- Significant feature
|
|
43
|
-
- Multiple components
|
|
44
|
-
- Database changes possible
|
|
45
|
-
- Cross-repo coordination
|
|
46
|
-
|
|
47
|
-
## 13+ Points (Epic-level)
|
|
48
|
-
- **SPLIT THIS STORY**
|
|
49
|
-
- Too complex for single story
|
|
50
|
-
- Multiple unknowns
|
|
51
|
-
- Break into 3-5 smaller stories
|
|
52
|
-
EOF
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
print_specific() {
|
|
56
|
-
local pts="$1"
|
|
57
|
-
case "$pts" in
|
|
58
|
-
1|2)
|
|
59
|
-
cat << 'EOF'
|
|
60
|
-
## 1-2 Points (Trivial)
|
|
61
|
-
|
|
62
|
-
**Characteristics:**
|
|
63
|
-
- Single file change
|
|
64
|
-
- Config update
|
|
65
|
-
- Simple bug fix
|
|
66
|
-
- Minimal or no new tests needed
|
|
67
|
-
|
|
68
|
-
**Examples:**
|
|
69
|
-
- Fix typo in documentation
|
|
70
|
-
- Update environment variable
|
|
71
|
-
- Add missing import
|
|
72
|
-
- Simple CSS adjustment
|
|
73
|
-
|
|
74
|
-
**YAML:**
|
|
75
|
-
```yaml
|
|
76
|
-
- id: PROJ-XXXXX
|
|
77
|
-
title: "Fix typo in README"
|
|
78
|
-
points: 1
|
|
79
|
-
workflow: trivial
|
|
80
|
-
```
|
|
81
|
-
EOF
|
|
82
|
-
;;
|
|
83
|
-
3)
|
|
84
|
-
cat << 'EOF'
|
|
85
|
-
## 3 Points (Small)
|
|
86
|
-
|
|
87
|
-
**Characteristics:**
|
|
88
|
-
- Few files changed
|
|
89
|
-
- Single component/handler
|
|
90
|
-
- Straightforward implementation
|
|
91
|
-
- Some tests needed
|
|
92
|
-
|
|
93
|
-
**Examples:**
|
|
94
|
-
- Add validation to existing endpoint
|
|
95
|
-
- Fix bug with tests
|
|
96
|
-
- Add new utility function
|
|
97
|
-
|
|
98
|
-
**YAML:**
|
|
99
|
-
```yaml
|
|
100
|
-
- id: PROJ-XXXXX
|
|
101
|
-
title: "Add input validation"
|
|
102
|
-
points: 3
|
|
103
|
-
workflow: tdd
|
|
104
|
-
```
|
|
105
|
-
EOF
|
|
106
|
-
;;
|
|
107
|
-
5)
|
|
108
|
-
cat << 'EOF'
|
|
109
|
-
## 5 Points (Medium)
|
|
110
|
-
|
|
111
|
-
**Characteristics:**
|
|
112
|
-
- Multiple files across layers
|
|
113
|
-
- New feature component
|
|
114
|
-
- API + UI changes
|
|
115
|
-
- Comprehensive tests
|
|
116
|
-
|
|
117
|
-
**Examples:**
|
|
118
|
-
- New admin page
|
|
119
|
-
- New API endpoint with tests
|
|
120
|
-
- Refactor with behavioral tests
|
|
121
|
-
|
|
122
|
-
**YAML:**
|
|
123
|
-
```yaml
|
|
124
|
-
- id: PROJ-XXXXX
|
|
125
|
-
title: "Add settings page"
|
|
126
|
-
points: 5
|
|
127
|
-
workflow: tdd
|
|
128
|
-
```
|
|
129
|
-
EOF
|
|
130
|
-
;;
|
|
131
|
-
8)
|
|
132
|
-
cat << 'EOF'
|
|
133
|
-
## 8 Points (Large)
|
|
134
|
-
|
|
135
|
-
**Characteristics:**
|
|
136
|
-
- Significant feature
|
|
137
|
-
- Multiple components
|
|
138
|
-
- Database changes possible
|
|
139
|
-
- Cross-repo coordination
|
|
140
|
-
|
|
141
|
-
**Examples:**
|
|
142
|
-
- New integration
|
|
143
|
-
- Major refactor
|
|
144
|
-
- New subsystem
|
|
145
|
-
|
|
146
|
-
**YAML:**
|
|
147
|
-
```yaml
|
|
148
|
-
- id: PROJ-XXXXX
|
|
149
|
-
title: "Add notification system"
|
|
150
|
-
points: 8
|
|
151
|
-
workflow: tdd
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
**Consider:** Can this be split into 2-3 smaller stories?
|
|
155
|
-
EOF
|
|
156
|
-
;;
|
|
157
|
-
13|21|*)
|
|
158
|
-
if [[ "$pts" -ge 13 ]]; then
|
|
159
|
-
cat << 'EOF'
|
|
160
|
-
## 13+ Points - TOO LARGE
|
|
161
|
-
|
|
162
|
-
**This story should be SPLIT.**
|
|
163
|
-
|
|
164
|
-
Stories over 8 points have:
|
|
165
|
-
- Multiple unknowns
|
|
166
|
-
- High risk of scope creep
|
|
167
|
-
- Difficult to estimate accurately
|
|
168
|
-
- Hard to review in one PR
|
|
169
|
-
|
|
170
|
-
**Action:** Break into 3-5 smaller stories:
|
|
171
|
-
1. Identify distinct deliverables
|
|
172
|
-
2. Create a story per deliverable
|
|
173
|
-
3. Size each story 3-5 points
|
|
174
|
-
4. Link stories to parent epic
|
|
175
|
-
|
|
176
|
-
**Example split:**
|
|
177
|
-
```
|
|
178
|
-
Epic: User Dashboard (13 pts total)
|
|
179
|
-
├── Story 1: Dashboard layout (3 pts)
|
|
180
|
-
├── Story 2: User stats API (5 pts)
|
|
181
|
-
├── Story 3: Activity feed (3 pts)
|
|
182
|
-
└── Story 4: Export feature (2 pts)
|
|
183
|
-
```
|
|
184
|
-
EOF
|
|
185
|
-
else
|
|
186
|
-
echo "Unknown point value: $pts"
|
|
187
|
-
echo "Valid values: 1, 2, 3, 5, 8, 13+"
|
|
188
|
-
exit 1
|
|
189
|
-
fi
|
|
190
|
-
;;
|
|
191
|
-
esac
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
if [[ -z "$POINTS" ]]; then
|
|
195
|
-
print_all
|
|
196
|
-
else
|
|
197
|
-
print_specific "$POINTS"
|
|
198
|
-
fi
|
|
17
|
+
# Delegate to Python CLI
|
|
18
|
+
run_python_module story size "$@"
|
|
@@ -1,162 +1,18 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
2
|
-
#
|
|
1
|
+
#!/usr/bin/env zsh
|
|
2
|
+
# Show story templates by type
|
|
3
3
|
# Usage: story-template.sh [bug|feature|refactor|chore]
|
|
4
4
|
# No args: Show all templates
|
|
5
5
|
# type: Show specific template
|
|
6
|
+
#
|
|
7
|
+
# Thin wrapper that delegates to Python CLI:
|
|
8
|
+
# python -m pennyfarthing_scripts.story template [type]
|
|
6
9
|
|
|
7
|
-
set -
|
|
10
|
+
set -e
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
# Source common functions for Python discovery
|
|
13
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
14
|
+
PARENT_DIR="$(dirname "$SCRIPT_DIR")"
|
|
15
|
+
source "${PARENT_DIR}/lib/common.sh"
|
|
10
16
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## Bug Fix Story Template
|
|
14
|
-
|
|
15
|
-
```yaml
|
|
16
|
-
- id: PROJ-XXXXX
|
|
17
|
-
title: "[Component] Bug description"
|
|
18
|
-
description: |
|
|
19
|
-
**Symptom:** What user sees
|
|
20
|
-
**Error:** Error message or behavior
|
|
21
|
-
**Affected:** Pages/endpoints impacted
|
|
22
|
-
points: 2-3
|
|
23
|
-
priority: P1
|
|
24
|
-
status: backlog
|
|
25
|
-
workflow: tdd
|
|
26
|
-
acceptance_criteria:
|
|
27
|
-
- Bug no longer occurs under [conditions]
|
|
28
|
-
- Regression test added covering the bug
|
|
29
|
-
- Related code audited for same issue
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
**Sizing hints:**
|
|
33
|
-
- Simple fix with clear cause: 2 pts
|
|
34
|
-
- Investigation needed: 3 pts
|
|
35
|
-
- Multiple components affected: 5 pts
|
|
36
|
-
EOF
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
print_feature() {
|
|
40
|
-
cat << 'EOF'
|
|
41
|
-
## Feature Story Template
|
|
42
|
-
|
|
43
|
-
```yaml
|
|
44
|
-
- id: PROJ-XXXXX
|
|
45
|
-
title: "[Action verb] [what] for [who/where]"
|
|
46
|
-
description: |
|
|
47
|
-
User can [action] to [benefit].
|
|
48
|
-
[Additional context if needed]
|
|
49
|
-
points: 3-8
|
|
50
|
-
priority: P2
|
|
51
|
-
status: backlog
|
|
52
|
-
workflow: tdd
|
|
53
|
-
acceptance_criteria:
|
|
54
|
-
- Feature works as specified
|
|
55
|
-
- UI matches design (if applicable)
|
|
56
|
-
- API documented (if applicable)
|
|
57
|
-
- Tests cover happy path and edge cases
|
|
58
|
-
- Error handling implemented
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
**Sizing hints:**
|
|
62
|
-
- Single component: 3 pts
|
|
63
|
-
- API + UI: 5 pts
|
|
64
|
-
- Cross-repo/complex: 8 pts
|
|
65
|
-
EOF
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
print_refactor() {
|
|
69
|
-
cat << 'EOF'
|
|
70
|
-
## Refactor Story Template
|
|
71
|
-
|
|
72
|
-
```yaml
|
|
73
|
-
- id: PROJ-XXXXX
|
|
74
|
-
title: "Refactor [component] to [improvement]"
|
|
75
|
-
description: |
|
|
76
|
-
Current: [what exists now]
|
|
77
|
-
Target: [what it should become]
|
|
78
|
-
Why: [reason for change]
|
|
79
|
-
points: 3-5
|
|
80
|
-
priority: P2
|
|
81
|
-
status: backlog
|
|
82
|
-
workflow: tdd
|
|
83
|
-
acceptance_criteria:
|
|
84
|
-
- All existing tests pass
|
|
85
|
-
- No behavior changes (unless explicitly scoped)
|
|
86
|
-
- Code follows new pattern
|
|
87
|
-
- Documentation updated
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
**Sizing hints:**
|
|
91
|
-
- Extract/rename: 2-3 pts
|
|
92
|
-
- Restructure module: 5 pts
|
|
93
|
-
- Architecture change: 8 pts (consider splitting)
|
|
94
|
-
EOF
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
print_chore() {
|
|
98
|
-
cat << 'EOF'
|
|
99
|
-
## Chore Story Template
|
|
100
|
-
|
|
101
|
-
```yaml
|
|
102
|
-
- id: PROJ-XXXXX
|
|
103
|
-
title: "[Action] [what]"
|
|
104
|
-
description: |
|
|
105
|
-
[What needs to be done and why]
|
|
106
|
-
points: 1-2
|
|
107
|
-
priority: P2
|
|
108
|
-
status: backlog
|
|
109
|
-
workflow: trivial
|
|
110
|
-
acceptance_criteria:
|
|
111
|
-
- Task completed
|
|
112
|
-
- No regressions introduced
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
**Examples:**
|
|
116
|
-
- Update dependencies
|
|
117
|
-
- Fix typo in docs
|
|
118
|
-
- Remove dead code
|
|
119
|
-
- Update config values
|
|
120
|
-
|
|
121
|
-
**Note:** Chores typically use a lightweight workflow.
|
|
122
|
-
EOF
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
print_all() {
|
|
126
|
-
cat << 'EOF'
|
|
127
|
-
# Story Templates
|
|
128
|
-
|
|
129
|
-
Use these templates when adding stories to sprint YAML.
|
|
130
|
-
|
|
131
|
-
EOF
|
|
132
|
-
print_bug
|
|
133
|
-
echo ""
|
|
134
|
-
print_feature
|
|
135
|
-
echo ""
|
|
136
|
-
print_refactor
|
|
137
|
-
echo ""
|
|
138
|
-
print_chore
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
case "$TYPE" in
|
|
142
|
-
bug)
|
|
143
|
-
print_bug
|
|
144
|
-
;;
|
|
145
|
-
feature)
|
|
146
|
-
print_feature
|
|
147
|
-
;;
|
|
148
|
-
refactor)
|
|
149
|
-
print_refactor
|
|
150
|
-
;;
|
|
151
|
-
chore)
|
|
152
|
-
print_chore
|
|
153
|
-
;;
|
|
154
|
-
"")
|
|
155
|
-
print_all
|
|
156
|
-
;;
|
|
157
|
-
*)
|
|
158
|
-
echo "Unknown type: $TYPE"
|
|
159
|
-
echo "Valid types: bug, feature, refactor, chore"
|
|
160
|
-
exit 1
|
|
161
|
-
;;
|
|
162
|
-
esac
|
|
17
|
+
# Delegate to Python CLI
|
|
18
|
+
run_python_module story template "$@"
|