claudepod 1.2.2 → 1.3.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/.devcontainer/CHANGELOG.md +179 -50
- package/.devcontainer/CLAUDE.md +24 -7
- package/.devcontainer/README.md +2 -0
- package/.devcontainer/config/main-system-prompt.md +357 -81
- package/.devcontainer/config/settings.json +6 -3
- package/.devcontainer/devcontainer.json +17 -5
- package/.devcontainer/features/agent-browser/README.md +65 -0
- package/.devcontainer/features/agent-browser/devcontainer-feature.json +23 -0
- package/.devcontainer/features/agent-browser/install.sh +72 -0
- package/.devcontainer/features/lsp-servers/devcontainer-feature.json +8 -2
- package/.devcontainer/features/lsp-servers/install.sh +25 -1
- package/.devcontainer/features/notify-hook/README.md +86 -0
- package/.devcontainer/features/notify-hook/devcontainer-feature.json +23 -0
- package/.devcontainer/features/notify-hook/install.sh +38 -0
- package/.devcontainer/plugins/devs-marketplace/.claude-plugin/marketplace.json +99 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/auto-formatter/.claude-plugin/plugin.json +7 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/auto-formatter/hooks/hooks.json +17 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/auto-formatter/scripts/format-file.py +101 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/auto-linter/.claude-plugin/plugin.json +7 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/auto-linter/hooks/hooks.json +17 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/auto-linter/scripts/lint-file.py +137 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/claudepod-lsp/.claude-plugin/plugin.json +7 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/dangerous-command-blocker/.claude-plugin/plugin.json +7 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/dangerous-command-blocker/hooks/hooks.json +17 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/dangerous-command-blocker/scripts/block-dangerous.py +110 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/notify-hook/.claude-plugin/plugin.json +7 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/notify-hook/hooks/hooks.json +16 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/planning-reminder/.claude-plugin/plugin.json +7 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/planning-reminder/hooks/hooks.json +17 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/.claude-plugin/plugin.json +7 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/hooks/hooks.json +17 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/scripts/guard-protected.py +108 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/.claude-plugin/commands/ticket:create-pr.md +337 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/.claude-plugin/commands/ticket:new.md +166 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/.claude-plugin/commands/ticket:review-commit.md +290 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/.claude-plugin/commands/ticket:work.md +257 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/.claude-plugin/plugin.json +8 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/.claude-plugin/system-prompt.md +184 -0
- package/.devcontainer/scripts/setup-aliases.sh +41 -13
- package/.devcontainer/scripts/setup-plugins.sh +35 -13
- package/.devcontainer/scripts/setup.sh +1 -3
- package/README.md +37 -0
- package/package.json +1 -2
- package/setup.js +14 -6
- package/.devcontainer/scripts/setup-lsp.sh +0 -20
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Thorough code review, verify requirements met, commit with detailed message
|
|
3
|
+
disable-model-invocation: true
|
|
4
|
+
allowed-tools: Bash(gh:*), Bash(git:*), Read, Grep, Glob, AskUserQuestion
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /ticket:review-commit - Review and Commit Changes
|
|
8
|
+
|
|
9
|
+
Thorough review, verify requirements, commit with detailed message.
|
|
10
|
+
|
|
11
|
+
## Prerequisites
|
|
12
|
+
|
|
13
|
+
Must have active ticket context from `/ticket:work`. If not set, prompt for ticket number.
|
|
14
|
+
|
|
15
|
+
## Process
|
|
16
|
+
|
|
17
|
+
### Phase 1: Gather Context
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# Get changes
|
|
21
|
+
git status
|
|
22
|
+
git diff HEAD
|
|
23
|
+
git diff --staged
|
|
24
|
+
|
|
25
|
+
# Get ticket
|
|
26
|
+
gh issue view $TICKET --json number,title,body
|
|
27
|
+
|
|
28
|
+
# Discover project rules
|
|
29
|
+
ls -la CLAUDE.md .claude/CLAUDE.md CLAUDE.local.md 2>/dev/null
|
|
30
|
+
ls -la .claude/rules/*.md 2>/dev/null
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Phase 2: Conduct Full Review
|
|
34
|
+
|
|
35
|
+
Review ALL changes with file:line references.
|
|
36
|
+
|
|
37
|
+
#### Security Review
|
|
38
|
+
|
|
39
|
+
| Check | Look For |
|
|
40
|
+
|-------|----------|
|
|
41
|
+
| Secrets | API keys, passwords, tokens, connection strings in code |
|
|
42
|
+
| Injection | SQL injection, command injection, XSS, CSRF |
|
|
43
|
+
| Auth/Authz | Missing auth checks, privilege escalation paths |
|
|
44
|
+
| Data Exposure | PII in logs, sensitive data in error messages |
|
|
45
|
+
| Dependencies | New dependencies with known vulnerabilities |
|
|
46
|
+
| Input Validation | Unvalidated user input, missing sanitization |
|
|
47
|
+
|
|
48
|
+
#### Project Rules Adherence
|
|
49
|
+
|
|
50
|
+
Check compliance with project-specific rules:
|
|
51
|
+
|
|
52
|
+
1. **Discover rules**:
|
|
53
|
+
- Read `CLAUDE.md` or `.claude/CLAUDE.md` if present
|
|
54
|
+
- Read all files in `.claude/rules/*.md`
|
|
55
|
+
- Check `CLAUDE.local.md` for user-specific rules
|
|
56
|
+
|
|
57
|
+
2. **Review for compliance**:
|
|
58
|
+
- Check if changes violate any stated rules
|
|
59
|
+
- Note architectural patterns that should be followed
|
|
60
|
+
- Flag deviations from documented conventions
|
|
61
|
+
|
|
62
|
+
| Rule Source | Compliance | Notes |
|
|
63
|
+
|-------------|------------|-------|
|
|
64
|
+
| CLAUDE.md | OK / VIOLATION | [specifics] |
|
|
65
|
+
| rules/[name].md | OK / VIOLATION | [specifics] |
|
|
66
|
+
|
|
67
|
+
**Common checks**:
|
|
68
|
+
- Code organization matches documented patterns
|
|
69
|
+
- Naming conventions followed
|
|
70
|
+
- Required abstractions used
|
|
71
|
+
- Forbidden patterns avoided
|
|
72
|
+
|
|
73
|
+
#### Code Quality Review
|
|
74
|
+
|
|
75
|
+
| Check | Look For |
|
|
76
|
+
|-------|----------|
|
|
77
|
+
| Complexity | Nesting depth > 3, high cyclomatic complexity |
|
|
78
|
+
| Duplication | Copy-paste code, extractable shared logic |
|
|
79
|
+
| Naming | Unclear names, inconsistent conventions |
|
|
80
|
+
| Error Handling | Missing boundaries, generic catches, no recovery |
|
|
81
|
+
| SOLID Violations | God classes, tight coupling, leaky abstractions |
|
|
82
|
+
| Dead Code | Unreachable code, unused imports/variables |
|
|
83
|
+
|
|
84
|
+
#### Architecture Review
|
|
85
|
+
|
|
86
|
+
| Check | Look For |
|
|
87
|
+
|-------|----------|
|
|
88
|
+
| Pattern Compliance | Deviations from established patterns |
|
|
89
|
+
| Coupling | Inappropriate dependencies, circular imports |
|
|
90
|
+
| API Contracts | Breaking changes, missing versioning |
|
|
91
|
+
| Cohesion | Mixed responsibilities, scattered logic |
|
|
92
|
+
|
|
93
|
+
#### Test Review
|
|
94
|
+
|
|
95
|
+
**Note**: If user opted out of tests during `/ticket:work`, skip this section entirely.
|
|
96
|
+
|
|
97
|
+
Evaluate against testing standards (not coverage metrics):
|
|
98
|
+
|
|
99
|
+
| Check | Assess |
|
|
100
|
+
|-------|--------|
|
|
101
|
+
| Behavior Coverage | Are key behaviors tested? (not line count) |
|
|
102
|
+
| Test Quality | Do tests verify outcomes, not implementation? |
|
|
103
|
+
| Brittleness | Any tests that will break on refactor? |
|
|
104
|
+
| Over-testing | Trivial code with unnecessary tests? |
|
|
105
|
+
| Under-testing | Critical paths without tests? |
|
|
106
|
+
|
|
107
|
+
**AI testing pitfalls to flag**:
|
|
108
|
+
- Tests for trivial getters/setters
|
|
109
|
+
- Excessive edge cases (>5 per function)
|
|
110
|
+
- Tests asserting on implementation details
|
|
111
|
+
- Over-mocked tests that verify nothing
|
|
112
|
+
|
|
113
|
+
#### Requirements Verification
|
|
114
|
+
|
|
115
|
+
Cross-reference each EARS requirement from ticket:
|
|
116
|
+
|
|
117
|
+
```markdown
|
|
118
|
+
| Requirement | Status | Evidence |
|
|
119
|
+
|-------------|--------|----------|
|
|
120
|
+
| [REQ text] | SATISFIED / PARTIAL / NOT ADDRESSED | [file:line or explanation] |
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Phase 3: Present Findings
|
|
124
|
+
|
|
125
|
+
Present ALL findings organized by category:
|
|
126
|
+
|
|
127
|
+
```markdown
|
|
128
|
+
## Review Findings
|
|
129
|
+
|
|
130
|
+
### Security
|
|
131
|
+
**Critical**
|
|
132
|
+
- [Finding with file:line]
|
|
133
|
+
|
|
134
|
+
**High**
|
|
135
|
+
- [Finding with file:line]
|
|
136
|
+
|
|
137
|
+
**Medium/Low**
|
|
138
|
+
- [Finding with file:line]
|
|
139
|
+
|
|
140
|
+
### Project Rules
|
|
141
|
+
- [Rule violation with file:line and rule reference]
|
|
142
|
+
|
|
143
|
+
### Code Quality
|
|
144
|
+
- [Finding with file:line]
|
|
145
|
+
|
|
146
|
+
### Architecture
|
|
147
|
+
- [Finding with file:line]
|
|
148
|
+
|
|
149
|
+
### Test Issues (if applicable)
|
|
150
|
+
- [Finding description]
|
|
151
|
+
|
|
152
|
+
### Requirements Status
|
|
153
|
+
| Requirement | Status | Evidence |
|
|
154
|
+
|-------------|--------|----------|
|
|
155
|
+
| ... | ... | ... |
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Phase 4: User Decisions
|
|
159
|
+
|
|
160
|
+
Use AskUserQuestion to batch decisions:
|
|
161
|
+
|
|
162
|
+
```
|
|
163
|
+
For each category of findings, select handling:
|
|
164
|
+
- FIX: Address before commit
|
|
165
|
+
- ISSUE: Create GitHub issue for later
|
|
166
|
+
- IGNORE: Acknowledge and proceed
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Allow multi-select within categories.
|
|
170
|
+
|
|
171
|
+
### Phase 5: Create Issues (if selected)
|
|
172
|
+
|
|
173
|
+
For findings marked ISSUE:
|
|
174
|
+
|
|
175
|
+
1. Group by category
|
|
176
|
+
2. Create single issue per category:
|
|
177
|
+
|
|
178
|
+
```markdown
|
|
179
|
+
## [Category] Findings from #[TICKET]
|
|
180
|
+
|
|
181
|
+
**Source**: Branch `[branch]`, commit `[hash]`
|
|
182
|
+
**Related Ticket**: #[TICKET]
|
|
183
|
+
|
|
184
|
+
### Findings
|
|
185
|
+
|
|
186
|
+
- [ ] [Finding 1] - `file:line`
|
|
187
|
+
- [ ] [Finding 2] - `file:line`
|
|
188
|
+
|
|
189
|
+
### Context
|
|
190
|
+
|
|
191
|
+
[Brief context about what was being implemented]
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
gh issue create --title "[Category] findings from #[TICKET]" --body "..."
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Link issues in response.
|
|
199
|
+
|
|
200
|
+
### Phase 6: Fix Selected Items
|
|
201
|
+
|
|
202
|
+
Address all items marked FIX.
|
|
203
|
+
|
|
204
|
+
### Phase 7: Draft Commit Message
|
|
205
|
+
|
|
206
|
+
```markdown
|
|
207
|
+
<type>(<scope>): <summary>
|
|
208
|
+
|
|
209
|
+
<Business context>
|
|
210
|
+
- [Requirement addressed]
|
|
211
|
+
- [User-facing change]
|
|
212
|
+
|
|
213
|
+
<Technical changes>
|
|
214
|
+
- [File/component changed]
|
|
215
|
+
- [Pattern used]
|
|
216
|
+
|
|
217
|
+
<Review findings>
|
|
218
|
+
- Addressed: [list]
|
|
219
|
+
- Deferred to #[issue]: [list]
|
|
220
|
+
- Acknowledged: [list]
|
|
221
|
+
|
|
222
|
+
Closes #[TICKET] (if completing all requirements)
|
|
223
|
+
Refs #[TICKET] (if partial)
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Types: feat, fix, refactor, test, docs, chore
|
|
227
|
+
|
|
228
|
+
### Phase 8: User Sign-Off
|
|
229
|
+
|
|
230
|
+
Present commit message for approval. Allow edits.
|
|
231
|
+
|
|
232
|
+
### Phase 9: Execute
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
git add [files]
|
|
236
|
+
git commit -m "$(cat <<'EOF'
|
|
237
|
+
[approved message]
|
|
238
|
+
EOF
|
|
239
|
+
)"
|
|
240
|
+
git push
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### Phase 10: Post to Issue
|
|
244
|
+
|
|
245
|
+
Single batched comment:
|
|
246
|
+
|
|
247
|
+
```markdown
|
|
248
|
+
## Commit Summary
|
|
249
|
+
|
|
250
|
+
**Commit**: [hash] on branch `[branch]`
|
|
251
|
+
|
|
252
|
+
### Requirements Status
|
|
253
|
+
| Requirement | Status |
|
|
254
|
+
|-------------|--------|
|
|
255
|
+
| ... | ... |
|
|
256
|
+
|
|
257
|
+
### Review Findings Addressed
|
|
258
|
+
- [Finding]: [Resolution]
|
|
259
|
+
|
|
260
|
+
### Project Rules Compliance
|
|
261
|
+
- [Rule source]: [Status]
|
|
262
|
+
|
|
263
|
+
### Issues Created
|
|
264
|
+
- #[N]: [Category] findings
|
|
265
|
+
|
|
266
|
+
### Deferred (User Approved)
|
|
267
|
+
- [Item]: Reason
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
*Reviewed and committed by Claude.*
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
## Rules
|
|
274
|
+
|
|
275
|
+
- **NEVER defer** without EXPRESS user approval
|
|
276
|
+
- **All findings** need file:line references
|
|
277
|
+
- **User MUST approve** commit message
|
|
278
|
+
- **Group issues** by category, link to original ticket
|
|
279
|
+
- **Batch** all GitHub operations
|
|
280
|
+
- Present findings FIRST, then get decisions
|
|
281
|
+
- Fix selected items BEFORE drafting commit
|
|
282
|
+
- **Check project rules** (CLAUDE.md, .claude/rules/*.md)
|
|
283
|
+
- **Respect test preferences** from planning phase
|
|
284
|
+
|
|
285
|
+
## Finding Severity Guide
|
|
286
|
+
|
|
287
|
+
**Critical**: Security vulnerability, data loss risk, breaking production
|
|
288
|
+
**High**: Significant bug, major pattern violation, auth issue
|
|
289
|
+
**Medium**: Code smell, minor bug, missing validation
|
|
290
|
+
**Low**: Style issue, minor optimization, documentation gap
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Retrieve ticket, create technical implementation plan, post to GitHub issue
|
|
3
|
+
argument-hint: [ticket-number]
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
allowed-tools: Bash(gh:*), Bash(git:*), Read, Grep, Glob, AskUserQuestion
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /ticket:work - Implementation Planning
|
|
9
|
+
|
|
10
|
+
Retrieve ticket, convert business requirements to technical plan, post to issue.
|
|
11
|
+
|
|
12
|
+
## Input
|
|
13
|
+
|
|
14
|
+
`$ARGUMENTS` - Ticket identifier (e.g., `#123`, `123`, or issue URL)
|
|
15
|
+
|
|
16
|
+
## Process
|
|
17
|
+
|
|
18
|
+
### Phase 1: Retrieve and Parse Ticket
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
gh issue view $1 --json number,title,body,labels,comments
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Parse ticket structure:
|
|
25
|
+
- Original Request (if present)
|
|
26
|
+
- Overview
|
|
27
|
+
- Requirements (by system/component)
|
|
28
|
+
- Technical Questions
|
|
29
|
+
- Acceptance Criteria
|
|
30
|
+
|
|
31
|
+
Track ticket number in context for subsequent commands.
|
|
32
|
+
|
|
33
|
+
### Phase 2: Launch Plan Subagent
|
|
34
|
+
|
|
35
|
+
Use Plan subagent to:
|
|
36
|
+
|
|
37
|
+
1. **Explore Codebase**
|
|
38
|
+
- Find related code/patterns
|
|
39
|
+
- Identify existing abstractions to use
|
|
40
|
+
- Map dependencies
|
|
41
|
+
- Discover project structure and conventions
|
|
42
|
+
|
|
43
|
+
2. **Resolve Technical Questions**
|
|
44
|
+
- Explore codebase first
|
|
45
|
+
- Only ask user if ambiguity persists after exploration
|
|
46
|
+
- Document all decisions
|
|
47
|
+
|
|
48
|
+
3. **Convert Requirements to Technical Spec**
|
|
49
|
+
|
|
50
|
+
For each EARS requirement, specify:
|
|
51
|
+
- Files to modify/create
|
|
52
|
+
- Components/classes affected
|
|
53
|
+
- Dependencies required
|
|
54
|
+
- Tests to write (if applicable - see Phase 3)
|
|
55
|
+
|
|
56
|
+
4. **Build Implementation Plan**
|
|
57
|
+
|
|
58
|
+
Structure as phases:
|
|
59
|
+
```markdown
|
|
60
|
+
## Technical Plan
|
|
61
|
+
|
|
62
|
+
### Prerequisites
|
|
63
|
+
- [ ] [Dependencies, setup, migrations needed]
|
|
64
|
+
|
|
65
|
+
### Phase 1: [Descriptive Name]
|
|
66
|
+
**Requirements Addressed**: [REQ-1, REQ-2]
|
|
67
|
+
|
|
68
|
+
Files:
|
|
69
|
+
- `path/to/file.ext` - [What changes]
|
|
70
|
+
|
|
71
|
+
Implementation:
|
|
72
|
+
1. [Step with detail]
|
|
73
|
+
2. [Step with detail]
|
|
74
|
+
|
|
75
|
+
Tests: (if applicable)
|
|
76
|
+
- `test_file.ext::test_name` - [What it verifies]
|
|
77
|
+
|
|
78
|
+
### Phase 2: [Descriptive Name]
|
|
79
|
+
...
|
|
80
|
+
|
|
81
|
+
### Verification Checklist
|
|
82
|
+
- [ ] [Acceptance criteria mapped to verification method]
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Phase 3: User Review and Test Preference
|
|
86
|
+
|
|
87
|
+
1. Present full plan to user
|
|
88
|
+
2. Get explicit approval before proceeding
|
|
89
|
+
|
|
90
|
+
**Test Preference** - Before finalizing plan, confirm testing approach:
|
|
91
|
+
|
|
92
|
+
Use AskUserQuestion to ask:
|
|
93
|
+
- What test coverage does the user want? (full, minimal, none)
|
|
94
|
+
- Are there existing test patterns to follow?
|
|
95
|
+
- Any specific scenarios that MUST be tested?
|
|
96
|
+
|
|
97
|
+
If user says "no tests" or "skip tests":
|
|
98
|
+
- Respect this and exclude test tasks from plan
|
|
99
|
+
- Note in plan: "Tests: Skipped per user preference"
|
|
100
|
+
|
|
101
|
+
If user wants tests:
|
|
102
|
+
- Follow testing_standards from system prompt
|
|
103
|
+
- Propose specific scenarios, not vague coverage
|
|
104
|
+
- Estimate count: "2-3 unit tests for validation, 1 integration test"
|
|
105
|
+
|
|
106
|
+
3. Allow modifications to plan
|
|
107
|
+
|
|
108
|
+
### Phase 4: Post to GitHub Issue
|
|
109
|
+
|
|
110
|
+
Create single batched comment:
|
|
111
|
+
|
|
112
|
+
```markdown
|
|
113
|
+
## Implementation Plan
|
|
114
|
+
|
|
115
|
+
[Technical plan from above]
|
|
116
|
+
|
|
117
|
+
## Decisions Made
|
|
118
|
+
|
|
119
|
+
| Decision | Rationale |
|
|
120
|
+
|----------|-----------|
|
|
121
|
+
| [Choice] | [Why] |
|
|
122
|
+
|
|
123
|
+
## Resolved Questions
|
|
124
|
+
|
|
125
|
+
- **Q**: [Original question from ticket]
|
|
126
|
+
**A**: [Resolution and rationale]
|
|
127
|
+
|
|
128
|
+
## Test Approach
|
|
129
|
+
|
|
130
|
+
[Full / Minimal / Skipped] - [Brief rationale]
|
|
131
|
+
[If applicable: specific test scenarios planned]
|
|
132
|
+
|
|
133
|
+
## Assumptions
|
|
134
|
+
|
|
135
|
+
[NONE without express user approval - list any that were approved]
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
*Plan generated by Claude. Implementation tracked in subsequent commits.*
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Post via:
|
|
142
|
+
```bash
|
|
143
|
+
gh issue comment $TICKET --body "$(cat <<'EOF'
|
|
144
|
+
[plan content]
|
|
145
|
+
EOF
|
|
146
|
+
)"
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Rules
|
|
150
|
+
|
|
151
|
+
- **Use Plan subagent** for all exploration and plan generation
|
|
152
|
+
- **NEVER defer** without EXPRESS user approval
|
|
153
|
+
- **NEVER mark out-of-scope** without EXPRESS user approval
|
|
154
|
+
- **All decisions** → documented in issue comment
|
|
155
|
+
- **All resolved questions** → documented in issue comment
|
|
156
|
+
- **No assumptions** without user approval
|
|
157
|
+
- **Track ticket** in context for `/ticket:review-commit` and `/ticket:create-pr`
|
|
158
|
+
- **Respect test preferences** - if user says no tests, don't add them
|
|
159
|
+
|
|
160
|
+
## Context Tracking
|
|
161
|
+
|
|
162
|
+
After successful planning, maintain in context:
|
|
163
|
+
- Current ticket number
|
|
164
|
+
- Ticket title
|
|
165
|
+
- Key requirements (for commit/PR reference)
|
|
166
|
+
- Test preference (full/minimal/none)
|
|
167
|
+
|
|
168
|
+
Support multiple tickets per session - each `/ticket:work` adds to tracked tickets.
|
|
169
|
+
|
|
170
|
+
## Example Plan Comment
|
|
171
|
+
|
|
172
|
+
```markdown
|
|
173
|
+
## Implementation Plan
|
|
174
|
+
|
|
175
|
+
### Prerequisites
|
|
176
|
+
- [ ] None required
|
|
177
|
+
|
|
178
|
+
### Phase 1: Data Layer - Status Field
|
|
179
|
+
**Requirements Addressed**: API REQ-1, REQ-2
|
|
180
|
+
|
|
181
|
+
Files:
|
|
182
|
+
- `src/models/character.py` - Add `is_enabled` field with default True
|
|
183
|
+
- `src/repositories/character_repo.py` - Update queries to handle enabled filter
|
|
184
|
+
- `src/services/character_service.py` - Add toggle method, publish event
|
|
185
|
+
|
|
186
|
+
Implementation:
|
|
187
|
+
1. Add `is_enabled: bool = True` to Character model
|
|
188
|
+
2. Generate migration for new column
|
|
189
|
+
3. Update repository with optional enabled filter
|
|
190
|
+
4. Add `toggle_enabled()` service method with event publishing
|
|
191
|
+
|
|
192
|
+
Tests:
|
|
193
|
+
- `tests/test_character_service.py::test_toggle_enabled_publishes_event`
|
|
194
|
+
- `tests/test_character_service.py::test_toggle_updates_database`
|
|
195
|
+
|
|
196
|
+
### Phase 2: Bot Integration - Proxy Check
|
|
197
|
+
**Requirements Addressed**: Bot REQ-1, REQ-2
|
|
198
|
+
|
|
199
|
+
Files:
|
|
200
|
+
- `src/bot/proxy_handler.py` - Check enabled before proxying
|
|
201
|
+
|
|
202
|
+
Implementation:
|
|
203
|
+
1. Update `should_proxy()` to check `character.is_enabled`
|
|
204
|
+
2. Return early if disabled (no proxy, no error)
|
|
205
|
+
|
|
206
|
+
Tests:
|
|
207
|
+
- `tests/test_proxy_handler.py::test_disabled_character_not_proxied`
|
|
208
|
+
|
|
209
|
+
### Phase 3: Dashboard - Toggle UI
|
|
210
|
+
**Requirements Addressed**: Dashboard REQ-1, REQ-2
|
|
211
|
+
|
|
212
|
+
Files:
|
|
213
|
+
- `src/components/CharacterCard.tsx` - Add toggle switch
|
|
214
|
+
- `src/api/characters.ts` - Add toggle endpoint call
|
|
215
|
+
|
|
216
|
+
Implementation:
|
|
217
|
+
1. Add Switch component to character card header
|
|
218
|
+
2. Implement optimistic update with error rollback
|
|
219
|
+
|
|
220
|
+
Tests: Manual verification (UI component)
|
|
221
|
+
|
|
222
|
+
### Verification Checklist
|
|
223
|
+
- [ ] Migration runs successfully
|
|
224
|
+
- [ ] Disabled character not proxied
|
|
225
|
+
- [ ] Toggle persists after restart
|
|
226
|
+
- [ ] Dashboard shows correct status
|
|
227
|
+
- [ ] Event published on toggle
|
|
228
|
+
|
|
229
|
+
## Decisions Made
|
|
230
|
+
|
|
231
|
+
| Decision | Rationale |
|
|
232
|
+
|----------|-----------|
|
|
233
|
+
| Default `is_enabled=True` | Existing characters should continue working |
|
|
234
|
+
| Keep in autocomplete | Disabled ≠ hidden, user may want to re-enable |
|
|
235
|
+
| Optimistic UI update | Better UX, rollback handles errors |
|
|
236
|
+
|
|
237
|
+
## Resolved Questions
|
|
238
|
+
|
|
239
|
+
- **Q**: Should disabled characters appear differently in autocomplete?
|
|
240
|
+
**A**: Yes - show with "(disabled)" suffix, keep selectable for re-enabling.
|
|
241
|
+
|
|
242
|
+
- **Q**: Default enabled status for new characters?
|
|
243
|
+
**A**: True - matches user expectation that created characters work immediately.
|
|
244
|
+
|
|
245
|
+
## Test Approach
|
|
246
|
+
|
|
247
|
+
Minimal - Unit tests for service logic, manual verification for UI.
|
|
248
|
+
- 3 unit tests for toggle/proxy behavior
|
|
249
|
+
- Manual test for dashboard toggle
|
|
250
|
+
|
|
251
|
+
## Assumptions
|
|
252
|
+
|
|
253
|
+
None - all decisions confirmed with user.
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
*Plan generated by Claude. Implementation tracked in subsequent commits.*
|
|
257
|
+
```
|