buildwithjpegg 1.0.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.
Files changed (64) hide show
  1. package/.claude-plugin/marketplace.json +18 -0
  2. package/.claude-plugin/plugin.json +12 -0
  3. package/.codex/INSTALL.md +67 -0
  4. package/.opencode/INSTALL.md +118 -0
  5. package/.opencode/plugins/buildwithjpegg.js +95 -0
  6. package/LICENSE +24 -0
  7. package/README.md +134 -0
  8. package/RELEASE-NOTES.md +7 -0
  9. package/agents/code-reviewer.md +48 -0
  10. package/commands/evaluate.md +6 -0
  11. package/commands/run-build.md +6 -0
  12. package/commands/write-blueprint.md +6 -0
  13. package/hooks/hooks.json +16 -0
  14. package/hooks/run-hook.cmd +43 -0
  15. package/hooks/session-start.sh +46 -0
  16. package/lib/skills-core.js +208 -0
  17. package/package.json +39 -0
  18. package/rules/conventions.md +22 -0
  19. package/rules/git.md +18 -0
  20. package/rules/mcp-servers.md +28 -0
  21. package/rules/platform.md +10 -0
  22. package/rules/stack.md +29 -0
  23. package/rules/testing.md +18 -0
  24. package/rules/ui-ux.md +151 -0
  25. package/rules/workflow.md +48 -0
  26. package/skills/auto-release/SKILL.md +176 -0
  27. package/skills/blueprint/SKILL.md +116 -0
  28. package/skills/build/SKILL.md +84 -0
  29. package/skills/ci-loop/SKILL.md +98 -0
  30. package/skills/craft-skill/SKILL.md +655 -0
  31. package/skills/craft-skill/anthropic-best-practices.md +1150 -0
  32. package/skills/craft-skill/examples/CLAUDE_MD_TESTING.md +189 -0
  33. package/skills/craft-skill/graphviz-conventions.dot +172 -0
  34. package/skills/craft-skill/persuasion-principles.md +187 -0
  35. package/skills/craft-skill/render-graphs.js +168 -0
  36. package/skills/craft-skill/testing-skills-with-subagents.md +384 -0
  37. package/skills/delegate/SKILL.md +242 -0
  38. package/skills/delegate/code-quality-reviewer-prompt.md +20 -0
  39. package/skills/delegate/implementer-prompt.md +78 -0
  40. package/skills/delegate/spec-reviewer-prompt.md +61 -0
  41. package/skills/draft-prs/SKILL.md +132 -0
  42. package/skills/evaluate/SKILL.md +96 -0
  43. package/skills/fan-out/SKILL.md +180 -0
  44. package/skills/handle-review/SKILL.md +213 -0
  45. package/skills/onboard/SKILL.md +95 -0
  46. package/skills/pr-stack/SKILL.md +112 -0
  47. package/skills/pre-ship/SKILL.md +139 -0
  48. package/skills/root-cause/CREATION-LOG.md +119 -0
  49. package/skills/root-cause/SKILL.md +296 -0
  50. package/skills/root-cause/condition-based-waiting-example.ts +158 -0
  51. package/skills/root-cause/condition-based-waiting.md +115 -0
  52. package/skills/root-cause/defense-in-depth.md +122 -0
  53. package/skills/root-cause/find-polluter.sh +63 -0
  54. package/skills/root-cause/root-cause-tracing.md +169 -0
  55. package/skills/root-cause/test-academic.md +14 -0
  56. package/skills/root-cause/test-pressure-1.md +58 -0
  57. package/skills/root-cause/test-pressure-2.md +68 -0
  58. package/skills/root-cause/test-pressure-3.md +69 -0
  59. package/skills/seek-review/SKILL.md +105 -0
  60. package/skills/seek-review/code-reviewer.md +146 -0
  61. package/skills/test-first/SKILL.md +371 -0
  62. package/skills/test-first/testing-anti-patterns.md +299 -0
  63. package/skills/worktree/SKILL.md +218 -0
  64. package/skills/wrap-up/SKILL.md +200 -0
@@ -0,0 +1,218 @@
1
+ ---
2
+ name: worktree
3
+ description: Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
4
+ ---
5
+
6
+ # Using Git Worktrees
7
+
8
+ ## Overview
9
+
10
+ Git worktrees create isolated workspaces sharing the same repository, allowing work on multiple branches simultaneously without switching.
11
+
12
+ **Core principle:** Systematic directory selection + safety verification = reliable isolation.
13
+
14
+ **Announce at start:** "I'm using the worktree skill to set up an isolated workspace."
15
+
16
+ ## Directory Selection Process
17
+
18
+ Follow this priority order:
19
+
20
+ ### 1. Check Existing Directories
21
+
22
+ ```bash
23
+ # Check in priority order
24
+ ls -d .worktrees 2>/dev/null # Preferred (hidden)
25
+ ls -d worktrees 2>/dev/null # Alternative
26
+ ```
27
+
28
+ **If found:** Use that directory. If both exist, `.worktrees` wins.
29
+
30
+ ### 2. Check CLAUDE.md
31
+
32
+ ```bash
33
+ grep -i "worktree.*director" CLAUDE.md 2>/dev/null
34
+ ```
35
+
36
+ **If preference specified:** Use it without asking.
37
+
38
+ ### 3. Ask User
39
+
40
+ If no directory exists and no CLAUDE.md preference:
41
+
42
+ ```
43
+ No worktree directory found. Where should I create worktrees?
44
+
45
+ 1. .worktrees/ (project-local, hidden)
46
+ 2. ~/.config/buildwithjpegg/worktrees/<project-name>/ (global location)
47
+
48
+ Which would you prefer?
49
+ ```
50
+
51
+ ## Safety Verification
52
+
53
+ ### For Project-Local Directories (.worktrees or worktrees)
54
+
55
+ **MUST verify directory is ignored before creating worktree:**
56
+
57
+ ```bash
58
+ # Check if directory is ignored (respects local, global, and system gitignore)
59
+ git check-ignore -q .worktrees 2>/dev/null || git check-ignore -q worktrees 2>/dev/null
60
+ ```
61
+
62
+ **If NOT ignored:**
63
+
64
+ Per Jesse's rule "Fix broken things immediately":
65
+ 1. Add appropriate line to .gitignore
66
+ 2. Commit the change
67
+ 3. Proceed with worktree creation
68
+
69
+ **Why critical:** Prevents accidentally committing worktree contents to repository.
70
+
71
+ ### For Global Directory (~/.config/buildwithjpegg/worktrees)
72
+
73
+ No .gitignore verification needed - outside project entirely.
74
+
75
+ ## Creation Steps
76
+
77
+ ### 1. Detect Project Name
78
+
79
+ ```bash
80
+ project=$(basename "$(git rev-parse --show-toplevel)")
81
+ ```
82
+
83
+ ### 2. Create Worktree
84
+
85
+ ```bash
86
+ # Determine full path
87
+ case $LOCATION in
88
+ .worktrees|worktrees)
89
+ path="$LOCATION/$BRANCH_NAME"
90
+ ;;
91
+ ~/.config/buildwithjpegg/worktrees/*)
92
+ path="~/.config/buildwithjpegg/worktrees/$project/$BRANCH_NAME"
93
+ ;;
94
+ esac
95
+
96
+ # Create worktree with new branch
97
+ git worktree add "$path" -b "$BRANCH_NAME"
98
+ cd "$path"
99
+ ```
100
+
101
+ ### 3. Run Project Setup
102
+
103
+ Auto-detect and run appropriate setup:
104
+
105
+ ```bash
106
+ # Node.js
107
+ if [ -f package.json ]; then npm install; fi
108
+
109
+ # Rust
110
+ if [ -f Cargo.toml ]; then cargo build; fi
111
+
112
+ # Python
113
+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
114
+ if [ -f pyproject.toml ]; then poetry install; fi
115
+
116
+ # Go
117
+ if [ -f go.mod ]; then go mod download; fi
118
+ ```
119
+
120
+ ### 4. Verify Clean Baseline
121
+
122
+ Run tests to ensure worktree starts clean:
123
+
124
+ ```bash
125
+ # Examples - use project-appropriate command
126
+ npm test
127
+ cargo test
128
+ pytest
129
+ go test ./...
130
+ ```
131
+
132
+ **If tests fail:** Report failures, ask whether to proceed or investigate.
133
+
134
+ **If tests pass:** Report ready.
135
+
136
+ ### 5. Report Location
137
+
138
+ ```
139
+ Worktree ready at <full-path>
140
+ Tests passing (<N> tests, 0 failures)
141
+ Ready to implement <feature-name>
142
+ ```
143
+
144
+ ## Quick Reference
145
+
146
+ | Situation | Action |
147
+ |-|-|
148
+ | `.worktrees/` exists | Use it (verify ignored) |
149
+ | `worktrees/` exists | Use it (verify ignored) |
150
+ | Both exist | Use `.worktrees/` |
151
+ | Neither exists | Check CLAUDE.md -> Ask user |
152
+ | Directory not ignored | Add to .gitignore + commit |
153
+ | Tests fail during baseline | Report failures + ask |
154
+ | No package.json/Cargo.toml | Skip dependency install |
155
+
156
+ ## Common Mistakes
157
+
158
+ ### Skipping ignore verification
159
+
160
+ - **Problem:** Worktree contents get tracked, pollute git status
161
+ - **Fix:** Always use `git check-ignore` before creating project-local worktree
162
+
163
+ ### Assuming directory location
164
+
165
+ - **Problem:** Creates inconsistency, violates project conventions
166
+ - **Fix:** Follow priority: existing > CLAUDE.md > ask
167
+
168
+ ### Proceeding with failing tests
169
+
170
+ - **Problem:** Can't distinguish new bugs from pre-existing issues
171
+ - **Fix:** Report failures, get explicit permission to proceed
172
+
173
+ ### Hardcoding setup commands
174
+
175
+ - **Problem:** Breaks on projects using different tools
176
+ - **Fix:** Auto-detect from project files (package.json, etc.)
177
+
178
+ ## Example Workflow
179
+
180
+ ```
181
+ You: I'm using the worktree skill to set up an isolated workspace.
182
+
183
+ [Check .worktrees/ - exists]
184
+ [Verify ignored - git check-ignore confirms .worktrees/ is ignored]
185
+ [Create worktree: git worktree add .worktrees/auth -b feature/auth]
186
+ [Run npm install]
187
+ [Run npm test - 47 passing]
188
+
189
+ Worktree ready at /Users/jesse/myproject/.worktrees/auth
190
+ Tests passing (47 tests, 0 failures)
191
+ Ready to implement auth feature
192
+ ```
193
+
194
+ ## Red Flags
195
+
196
+ **Never:**
197
+ - Create worktree without verifying it's ignored (project-local)
198
+ - Skip baseline test verification
199
+ - Proceed with failing tests without asking
200
+ - Assume directory location when ambiguous
201
+ - Skip CLAUDE.md check
202
+
203
+ **Always:**
204
+ - Follow directory priority: existing > CLAUDE.md > ask
205
+ - Verify directory is ignored for project-local
206
+ - Auto-detect and run project setup
207
+ - Verify clean test baseline
208
+
209
+ ## Integration
210
+
211
+ **Called by:**
212
+ - **evaluate** (Phase 4) - REQUIRED when design is approved and implementation follows
213
+ - **delegate** - REQUIRED before executing any tasks
214
+ - **build** - REQUIRED before executing any tasks
215
+ - Any skill needing isolated workspace
216
+
217
+ **Pairs with:**
218
+ - **wrap-up** - REQUIRED for cleanup after work complete
@@ -0,0 +1,200 @@
1
+ ---
2
+ name: wrap-up
3
+ description: Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
4
+ ---
5
+
6
+ # Finishing a Development Branch
7
+
8
+ ## Overview
9
+
10
+ Guide completion of development work by presenting clear options and handling chosen workflow.
11
+
12
+ **Core principle:** Verify tests -> Present options -> Execute choice -> Clean up.
13
+
14
+ **Announce at start:** "I'm using the wrap-up skill to complete this work."
15
+
16
+ ## The Process
17
+
18
+ ### Step 1: Verify Tests
19
+
20
+ **Before presenting options, verify tests pass:**
21
+
22
+ ```bash
23
+ # Run project's test suite
24
+ npm test / cargo test / pytest / go test ./...
25
+ ```
26
+
27
+ **If tests fail:**
28
+ ```
29
+ Tests failing (<N> failures). Must fix before completing:
30
+
31
+ [Show failures]
32
+
33
+ Cannot proceed with merge/PR until tests pass.
34
+ ```
35
+
36
+ Stop. Don't proceed to Step 2.
37
+
38
+ **If tests pass:** Continue to Step 2.
39
+
40
+ ### Step 2: Determine Base Branch
41
+
42
+ ```bash
43
+ # Try common base branches
44
+ git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null
45
+ ```
46
+
47
+ Or ask: "This branch split from main - is that correct?"
48
+
49
+ ### Step 3: Present Options
50
+
51
+ Present exactly these 4 options:
52
+
53
+ ```
54
+ Implementation complete. What would you like to do?
55
+
56
+ 1. Merge back to <base-branch> locally
57
+ 2. Push and create a Pull Request
58
+ 3. Keep the branch as-is (I'll handle it later)
59
+ 4. Discard this work
60
+
61
+ Which option?
62
+ ```
63
+
64
+ **Don't add explanation** - keep options concise.
65
+
66
+ ### Step 4: Execute Choice
67
+
68
+ #### Option 1: Merge Locally
69
+
70
+ ```bash
71
+ # Switch to base branch
72
+ git checkout <base-branch>
73
+
74
+ # Pull latest
75
+ git pull
76
+
77
+ # Merge feature branch
78
+ git merge <feature-branch>
79
+
80
+ # Verify tests on merged result
81
+ <test command>
82
+
83
+ # If tests pass
84
+ git branch -d <feature-branch>
85
+ ```
86
+
87
+ Then: Cleanup worktree (Step 5)
88
+
89
+ #### Option 2: Push and Create PR
90
+
91
+ ```bash
92
+ # Push branch
93
+ git push -u origin <feature-branch>
94
+
95
+ # Create PR
96
+ gh pr create --title "<title>" --body "$(cat <<'EOF'
97
+ ## Summary
98
+ <2-3 bullets of what changed>
99
+
100
+ ## Test Plan
101
+ - [ ] <verification steps>
102
+ EOF
103
+ )"
104
+ ```
105
+
106
+ Then: Cleanup worktree (Step 5)
107
+
108
+ #### Option 3: Keep As-Is
109
+
110
+ Report: "Keeping branch <name>. Worktree preserved at <path>."
111
+
112
+ **Don't cleanup worktree.**
113
+
114
+ #### Option 4: Discard
115
+
116
+ **Confirm first:**
117
+ ```
118
+ This will permanently delete:
119
+ - Branch <name>
120
+ - All commits: <commit-list>
121
+ - Worktree at <path>
122
+
123
+ Type 'discard' to confirm.
124
+ ```
125
+
126
+ Wait for exact confirmation.
127
+
128
+ If confirmed:
129
+ ```bash
130
+ git checkout <base-branch>
131
+ git branch -D <feature-branch>
132
+ ```
133
+
134
+ Then: Cleanup worktree (Step 5)
135
+
136
+ ### Step 5: Cleanup Worktree
137
+
138
+ **For Options 1, 2, 4:**
139
+
140
+ Check if in worktree:
141
+ ```bash
142
+ git worktree list | grep $(git branch --show-current)
143
+ ```
144
+
145
+ If yes:
146
+ ```bash
147
+ git worktree remove <worktree-path>
148
+ ```
149
+
150
+ **For Option 3:** Keep worktree.
151
+
152
+ ## Quick Reference
153
+
154
+ | Option | Merge | Push | Keep Worktree | Cleanup Branch |
155
+ |-|-|-|-|-|
156
+ | 1. Merge locally | yes | - | - | yes |
157
+ | 2. Create PR | - | yes | yes | - |
158
+ | 3. Keep as-is | - | - | yes | - |
159
+ | 4. Discard | - | - | - | yes (force) |
160
+
161
+ ## Common Mistakes
162
+
163
+ **Skipping test verification**
164
+ - **Problem:** Merge broken code, create failing PR
165
+ - **Fix:** Always verify tests before offering options
166
+
167
+ **Open-ended questions**
168
+ - **Problem:** "What should I do next?" -> ambiguous
169
+ - **Fix:** Present exactly 4 structured options
170
+
171
+ **Automatic worktree cleanup**
172
+ - **Problem:** Remove worktree when might need it (Option 2, 3)
173
+ - **Fix:** Only cleanup for Options 1 and 4
174
+
175
+ **No confirmation for discard**
176
+ - **Problem:** Accidentally delete work
177
+ - **Fix:** Require typed "discard" confirmation
178
+
179
+ ## Red Flags
180
+
181
+ **Never:**
182
+ - Proceed with failing tests
183
+ - Merge without verifying tests on result
184
+ - Delete work without confirmation
185
+ - Force-push without explicit request
186
+
187
+ **Always:**
188
+ - Verify tests before offering options
189
+ - Present exactly 4 options
190
+ - Get typed confirmation for Option 4
191
+ - Clean up worktree for Options 1 & 4 only
192
+
193
+ ## Integration
194
+
195
+ **Called by:**
196
+ - **delegate** (Step 7) - After all tasks complete
197
+ - **build** (Step 5) - After all batches complete
198
+
199
+ **Pairs with:**
200
+ - **worktree** - Cleans up worktree created by that skill