@ia-ccun/code-agent-cli 0.0.15 → 0.0.16

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 (75) hide show
  1. package/bin/cli.js +153 -84
  2. package/config/agent/extensions/working-msg.ts +33 -8
  3. package/config/agent/models.json +41 -11
  4. package/config/agent/prompts/code-simplifier.md +52 -0
  5. package/config/agent/skills/brainstorming/SKILL.md +165 -0
  6. package/config/agent/skills/brainstorming/scripts/frame-template.html +214 -0
  7. package/config/agent/skills/brainstorming/scripts/helper.js +88 -0
  8. package/config/agent/skills/brainstorming/scripts/server.cjs +338 -0
  9. package/config/agent/skills/brainstorming/scripts/start-server.sh +153 -0
  10. package/config/agent/skills/brainstorming/scripts/stop-server.sh +55 -0
  11. package/config/agent/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  12. package/config/agent/skills/brainstorming/visual-companion.md +286 -0
  13. package/config/agent/skills/dispatching-parallel-agents/SKILL.md +183 -0
  14. package/config/agent/skills/executing-plans/SKILL.md +71 -0
  15. package/config/agent/skills/finishing-a-development-branch/SKILL.md +201 -0
  16. package/config/agent/skills/owasp-security/SKILL.md +537 -0
  17. package/config/agent/skills/receiving-code-review/SKILL.md +214 -0
  18. package/config/agent/skills/requesting-code-review/SKILL.md +106 -0
  19. package/config/agent/skills/requesting-code-review/code-reviewer.md +146 -0
  20. package/config/agent/skills/skill-creator/SKILL.md +337 -213
  21. package/config/agent/skills/skill-creator/agents/analyzer.md +274 -0
  22. package/config/agent/skills/skill-creator/agents/comparator.md +202 -0
  23. package/config/agent/skills/skill-creator/agents/grader.md +223 -0
  24. package/config/agent/skills/skill-creator/assets/eval_review.html +146 -0
  25. package/config/agent/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  26. package/config/agent/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  27. package/config/agent/skills/skill-creator/references/schemas.md +430 -0
  28. package/config/agent/skills/skill-creator/scripts/__init__.py +0 -0
  29. package/config/agent/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  30. package/config/agent/skills/skill-creator/scripts/generate_report.py +326 -0
  31. package/config/agent/skills/skill-creator/scripts/improve_description.py +248 -0
  32. package/config/agent/skills/skill-creator/scripts/package_skill.py +33 -7
  33. package/config/agent/skills/skill-creator/scripts/quick_validate.py +11 -3
  34. package/config/agent/skills/skill-creator/scripts/run_eval.py +310 -0
  35. package/config/agent/skills/skill-creator/scripts/run_loop.py +332 -0
  36. package/config/agent/skills/skill-creator/scripts/utils.py +47 -0
  37. package/config/agent/skills/subagent-driven-development/SKILL.md +278 -0
  38. package/config/agent/skills/subagent-driven-development/code-quality-reviewer-prompt.md +26 -0
  39. package/config/agent/skills/subagent-driven-development/implementer-prompt.md +113 -0
  40. package/config/agent/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
  41. package/config/agent/skills/systematic-debugging/CREATION-LOG.md +119 -0
  42. package/config/agent/skills/systematic-debugging/SKILL.md +297 -0
  43. package/config/agent/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  44. package/config/agent/skills/systematic-debugging/condition-based-waiting.md +115 -0
  45. package/config/agent/skills/systematic-debugging/defense-in-depth.md +122 -0
  46. package/config/agent/skills/systematic-debugging/find-polluter.sh +63 -0
  47. package/config/agent/skills/systematic-debugging/root-cause-tracing.md +169 -0
  48. package/config/agent/skills/systematic-debugging/test-academic.md +14 -0
  49. package/config/agent/skills/systematic-debugging/test-pressure-1.md +58 -0
  50. package/config/agent/skills/systematic-debugging/test-pressure-2.md +68 -0
  51. package/config/agent/skills/systematic-debugging/test-pressure-3.md +69 -0
  52. package/config/agent/skills/test-driven-development/SKILL.md +372 -0
  53. package/config/agent/skills/test-driven-development/testing-anti-patterns.md +299 -0
  54. package/config/agent/skills/using-git-worktrees/SKILL.md +219 -0
  55. package/config/agent/skills/using-superpowers/SKILL.md +116 -0
  56. package/config/agent/skills/using-superpowers/references/codex-tools.md +25 -0
  57. package/config/agent/skills/using-superpowers/references/gemini-tools.md +33 -0
  58. package/config/agent/skills/verification-before-completion/SKILL.md +140 -0
  59. package/config/agent/skills/writing-plans/SKILL.md +146 -0
  60. package/config/agent/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
  61. package/config/agent/skills/writing-skills/SKILL.md +667 -0
  62. package/config/agent/skills/writing-skills/anthropic-best-practices.md +1150 -0
  63. package/config/agent/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
  64. package/config/agent/skills/writing-skills/graphviz-conventions.dot +172 -0
  65. package/config/agent/skills/writing-skills/persuasion-principles.md +187 -0
  66. package/config/agent/skills/writing-skills/render-graphs.js +168 -0
  67. package/config/agent/skills/writing-skills/testing-skills-with-subagents.md +384 -0
  68. package/package.json +14 -7
  69. package/scripts/postinstall.js +4 -18
  70. package/config/agent/skills/github/SKILL.md +0 -47
  71. package/config/agent/skills/owasp/SKILL.md +0 -169
  72. package/config/agent/skills/pua/SKILL.md +0 -364
  73. package/config/agent/skills/skill-creator/references/output-patterns.md +0 -82
  74. package/config/agent/skills/skill-creator/references/workflows.md +0 -28
  75. package/config/agent/skills/skill-creator/scripts/init_skill.py +0 -303
@@ -0,0 +1,214 @@
1
+ ---
2
+ name: receiving-code-review
3
+ author: xujianjiang
4
+ description: Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation
5
+ ---
6
+
7
+ # Code Review Reception
8
+
9
+ ## Overview
10
+
11
+ Code review requires technical evaluation, not emotional performance.
12
+
13
+ **Core principle:** Verify before implementing. Ask before assuming. Technical correctness over social comfort.
14
+
15
+ ## The Response Pattern
16
+
17
+ ```
18
+ WHEN receiving code review feedback:
19
+
20
+ 1. READ: Complete feedback without reacting
21
+ 2. UNDERSTAND: Restate requirement in own words (or ask)
22
+ 3. VERIFY: Check against codebase reality
23
+ 4. EVALUATE: Technically sound for THIS codebase?
24
+ 5. RESPOND: Technical acknowledgment or reasoned pushback
25
+ 6. IMPLEMENT: One item at a time, test each
26
+ ```
27
+
28
+ ## Forbidden Responses
29
+
30
+ **NEVER:**
31
+ - "You're absolutely right!" (explicit CLAUDE.md violation)
32
+ - "Great point!" / "Excellent feedback!" (performative)
33
+ - "Let me implement that now" (before verification)
34
+
35
+ **INSTEAD:**
36
+ - Restate the technical requirement
37
+ - Ask clarifying questions
38
+ - Push back with technical reasoning if wrong
39
+ - Just start working (actions > words)
40
+
41
+ ## Handling Unclear Feedback
42
+
43
+ ```
44
+ IF any item is unclear:
45
+ STOP - do not implement anything yet
46
+ ASK for clarification on unclear items
47
+
48
+ WHY: Items may be related. Partial understanding = wrong implementation.
49
+ ```
50
+
51
+ **Example:**
52
+ ```
53
+ your human partner: "Fix 1-6"
54
+ You understand 1,2,3,6. Unclear on 4,5.
55
+
56
+ ❌ WRONG: Implement 1,2,3,6 now, ask about 4,5 later
57
+ ✅ RIGHT: "I understand items 1,2,3,6. Need clarification on 4 and 5 before proceeding."
58
+ ```
59
+
60
+ ## Source-Specific Handling
61
+
62
+ ### From your human partner
63
+ - **Trusted** - implement after understanding
64
+ - **Still ask** if scope unclear
65
+ - **No performative agreement**
66
+ - **Skip to action** or technical acknowledgment
67
+
68
+ ### From External Reviewers
69
+ ```
70
+ BEFORE implementing:
71
+ 1. Check: Technically correct for THIS codebase?
72
+ 2. Check: Breaks existing functionality?
73
+ 3. Check: Reason for current implementation?
74
+ 4. Check: Works on all platforms/versions?
75
+ 5. Check: Does reviewer understand full context?
76
+
77
+ IF suggestion seems wrong:
78
+ Push back with technical reasoning
79
+
80
+ IF can't easily verify:
81
+ Say so: "I can't verify this without [X]. Should I [investigate/ask/proceed]?"
82
+
83
+ IF conflicts with your human partner's prior decisions:
84
+ Stop and discuss with your human partner first
85
+ ```
86
+
87
+ **your human partner's rule:** "External feedback - be skeptical, but check carefully"
88
+
89
+ ## YAGNI Check for "Professional" Features
90
+
91
+ ```
92
+ IF reviewer suggests "implementing properly":
93
+ grep codebase for actual usage
94
+
95
+ IF unused: "This endpoint isn't called. Remove it (YAGNI)?"
96
+ IF used: Then implement properly
97
+ ```
98
+
99
+ **your human partner's rule:** "You and reviewer both report to me. If we don't need this feature, don't add it."
100
+
101
+ ## Implementation Order
102
+
103
+ ```
104
+ FOR multi-item feedback:
105
+ 1. Clarify anything unclear FIRST
106
+ 2. Then implement in this order:
107
+ - Blocking issues (breaks, security)
108
+ - Simple fixes (typos, imports)
109
+ - Complex fixes (refactoring, logic)
110
+ 3. Test each fix individually
111
+ 4. Verify no regressions
112
+ ```
113
+
114
+ ## When To Push Back
115
+
116
+ Push back when:
117
+ - Suggestion breaks existing functionality
118
+ - Reviewer lacks full context
119
+ - Violates YAGNI (unused feature)
120
+ - Technically incorrect for this stack
121
+ - Legacy/compatibility reasons exist
122
+ - Conflicts with your human partner's architectural decisions
123
+
124
+ **How to push back:**
125
+ - Use technical reasoning, not defensiveness
126
+ - Ask specific questions
127
+ - Reference working tests/code
128
+ - Involve your human partner if architectural
129
+
130
+ **Signal if uncomfortable pushing back out loud:** "Strange things are afoot at the Circle K"
131
+
132
+ ## Acknowledging Correct Feedback
133
+
134
+ When feedback IS correct:
135
+ ```
136
+ ✅ "Fixed. [Brief description of what changed]"
137
+ ✅ "Good catch - [specific issue]. Fixed in [location]."
138
+ ✅ [Just fix it and show in the code]
139
+
140
+ ❌ "You're absolutely right!"
141
+ ❌ "Great point!"
142
+ ❌ "Thanks for catching that!"
143
+ ❌ "Thanks for [anything]"
144
+ ❌ ANY gratitude expression
145
+ ```
146
+
147
+ **Why no thanks:** Actions speak. Just fix it. The code itself shows you heard the feedback.
148
+
149
+ **If you catch yourself about to write "Thanks":** DELETE IT. State the fix instead.
150
+
151
+ ## Gracefully Correcting Your Pushback
152
+
153
+ If you pushed back and were wrong:
154
+ ```
155
+ ✅ "You were right - I checked [X] and it does [Y]. Implementing now."
156
+ ✅ "Verified this and you're correct. My initial understanding was wrong because [reason]. Fixing."
157
+
158
+ ❌ Long apology
159
+ ❌ Defending why you pushed back
160
+ ❌ Over-explaining
161
+ ```
162
+
163
+ State the correction factually and move on.
164
+
165
+ ## Common Mistakes
166
+
167
+ | Mistake | Fix |
168
+ |---------|-----|
169
+ | Performative agreement | State requirement or just act |
170
+ | Blind implementation | Verify against codebase first |
171
+ | Batch without testing | One at a time, test each |
172
+ | Assuming reviewer is right | Check if breaks things |
173
+ | Avoiding pushback | Technical correctness > comfort |
174
+ | Partial implementation | Clarify all items first |
175
+ | Can't verify, proceed anyway | State limitation, ask for direction |
176
+
177
+ ## Real Examples
178
+
179
+ **Performative Agreement (Bad):**
180
+ ```
181
+ Reviewer: "Remove legacy code"
182
+ ❌ "You're absolutely right! Let me remove that..."
183
+ ```
184
+
185
+ **Technical Verification (Good):**
186
+ ```
187
+ Reviewer: "Remove legacy code"
188
+ ✅ "Checking... build target is 10.15+, this API needs 13+. Need legacy for backward compat. Current impl has wrong bundle ID - fix it or drop pre-13 support?"
189
+ ```
190
+
191
+ **YAGNI (Good):**
192
+ ```
193
+ Reviewer: "Implement proper metrics tracking with database, date filters, CSV export"
194
+ ✅ "Grepped codebase - nothing calls this endpoint. Remove it (YAGNI)? Or is there usage I'm missing?"
195
+ ```
196
+
197
+ **Unclear Item (Good):**
198
+ ```
199
+ your human partner: "Fix items 1-6"
200
+ You understand 1,2,3,6. Unclear on 4,5.
201
+ ✅ "Understand 1,2,3,6. Need clarification on 4 and 5 before implementing."
202
+ ```
203
+
204
+ ## GitHub Thread Replies
205
+
206
+ When replying to inline review comments on GitHub, reply in the comment thread (`gh api repos/{owner}/{repo}/pulls/{pr}/comments/{id}/replies`), not as a top-level PR comment.
207
+
208
+ ## The Bottom Line
209
+
210
+ **External feedback = suggestions to evaluate, not orders to follow.**
211
+
212
+ Verify. Question. Then implement.
213
+
214
+ No performative agreement. Technical rigor always.
@@ -0,0 +1,106 @@
1
+ ---
2
+ name: requesting-code-review
3
+ author: xujianjiang
4
+ description: Use when completing tasks, implementing major features, or before merging to verify work meets requirements
5
+ ---
6
+
7
+ # Requesting Code Review
8
+
9
+ Dispatch superpowers:code-reviewer subagent to catch issues before they cascade. The reviewer gets precisely crafted context for evaluation — never your session's history. This keeps the reviewer focused on the work product, not your thought process, and preserves your own context for continued work.
10
+
11
+ **Core principle:** Review early, review often.
12
+
13
+ ## When to Request Review
14
+
15
+ **Mandatory:**
16
+ - After each task in subagent-driven development
17
+ - After completing major feature
18
+ - Before merge to main
19
+
20
+ **Optional but valuable:**
21
+ - When stuck (fresh perspective)
22
+ - Before refactoring (baseline check)
23
+ - After fixing complex bug
24
+
25
+ ## How to Request
26
+
27
+ **1. Get git SHAs:**
28
+ ```bash
29
+ BASE_SHA=$(git rev-parse HEAD~1) # or origin/main
30
+ HEAD_SHA=$(git rev-parse HEAD)
31
+ ```
32
+
33
+ **2. Dispatch code-reviewer subagent:**
34
+
35
+ Use Task tool with superpowers:code-reviewer type, fill template at `code-reviewer.md`
36
+
37
+ **Placeholders:**
38
+ - `{WHAT_WAS_IMPLEMENTED}` - What you just built
39
+ - `{PLAN_OR_REQUIREMENTS}` - What it should do
40
+ - `{BASE_SHA}` - Starting commit
41
+ - `{HEAD_SHA}` - Ending commit
42
+ - `{DESCRIPTION}` - Brief summary
43
+
44
+ **3. Act on feedback:**
45
+ - Fix Critical issues immediately
46
+ - Fix Important issues before proceeding
47
+ - Note Minor issues for later
48
+ - Push back if reviewer is wrong (with reasoning)
49
+
50
+ ## Example
51
+
52
+ ```
53
+ [Just completed Task 2: Add verification function]
54
+
55
+ You: Let me request code review before proceeding.
56
+
57
+ BASE_SHA=$(git log --oneline | grep "Task 1" | head -1 | awk '{print $1}')
58
+ HEAD_SHA=$(git rev-parse HEAD)
59
+
60
+ [Dispatch superpowers:code-reviewer subagent]
61
+ WHAT_WAS_IMPLEMENTED: Verification and repair functions for conversation index
62
+ PLAN_OR_REQUIREMENTS: Task 2 from docs/superpowers/plans/deployment-plan.md
63
+ BASE_SHA: a7981ec
64
+ HEAD_SHA: 3df7661
65
+ DESCRIPTION: Added verifyIndex() and repairIndex() with 4 issue types
66
+
67
+ [Subagent returns]:
68
+ Strengths: Clean architecture, real tests
69
+ Issues:
70
+ Important: Missing progress indicators
71
+ Minor: Magic number (100) for reporting interval
72
+ Assessment: Ready to proceed
73
+
74
+ You: [Fix progress indicators]
75
+ [Continue to Task 3]
76
+ ```
77
+
78
+ ## Integration with Workflows
79
+
80
+ **Subagent-Driven Development:**
81
+ - Review after EACH task
82
+ - Catch issues before they compound
83
+ - Fix before moving to next task
84
+
85
+ **Executing Plans:**
86
+ - Review after each batch (3 tasks)
87
+ - Get feedback, apply, continue
88
+
89
+ **Ad-Hoc Development:**
90
+ - Review before merge
91
+ - Review when stuck
92
+
93
+ ## Red Flags
94
+
95
+ **Never:**
96
+ - Skip review because "it's simple"
97
+ - Ignore Critical issues
98
+ - Proceed with unfixed Important issues
99
+ - Argue with valid technical feedback
100
+
101
+ **If reviewer wrong:**
102
+ - Push back with technical reasoning
103
+ - Show code/tests that prove it works
104
+ - Request clarification
105
+
106
+ See template at: requesting-code-review/code-reviewer.md
@@ -0,0 +1,146 @@
1
+ # Code Review Agent
2
+
3
+ You are reviewing code changes for production readiness.
4
+
5
+ **Your task:**
6
+ 1. Review {WHAT_WAS_IMPLEMENTED}
7
+ 2. Compare against {PLAN_OR_REQUIREMENTS}
8
+ 3. Check code quality, architecture, testing
9
+ 4. Categorize issues by severity
10
+ 5. Assess production readiness
11
+
12
+ ## What Was Implemented
13
+
14
+ {DESCRIPTION}
15
+
16
+ ## Requirements/Plan
17
+
18
+ {PLAN_REFERENCE}
19
+
20
+ ## Git Range to Review
21
+
22
+ **Base:** {BASE_SHA}
23
+ **Head:** {HEAD_SHA}
24
+
25
+ ```bash
26
+ git diff --stat {BASE_SHA}..{HEAD_SHA}
27
+ git diff {BASE_SHA}..{HEAD_SHA}
28
+ ```
29
+
30
+ ## Review Checklist
31
+
32
+ **Code Quality:**
33
+ - Clean separation of concerns?
34
+ - Proper error handling?
35
+ - Type safety (if applicable)?
36
+ - DRY principle followed?
37
+ - Edge cases handled?
38
+
39
+ **Architecture:**
40
+ - Sound design decisions?
41
+ - Scalability considerations?
42
+ - Performance implications?
43
+ - Security concerns?
44
+
45
+ **Testing:**
46
+ - Tests actually test logic (not mocks)?
47
+ - Edge cases covered?
48
+ - Integration tests where needed?
49
+ - All tests passing?
50
+
51
+ **Requirements:**
52
+ - All plan requirements met?
53
+ - Implementation matches spec?
54
+ - No scope creep?
55
+ - Breaking changes documented?
56
+
57
+ **Production Readiness:**
58
+ - Migration strategy (if schema changes)?
59
+ - Backward compatibility considered?
60
+ - Documentation complete?
61
+ - No obvious bugs?
62
+
63
+ ## Output Format
64
+
65
+ ### Strengths
66
+ [What's well done? Be specific.]
67
+
68
+ ### Issues
69
+
70
+ #### Critical (Must Fix)
71
+ [Bugs, security issues, data loss risks, broken functionality]
72
+
73
+ #### Important (Should Fix)
74
+ [Architecture problems, missing features, poor error handling, test gaps]
75
+
76
+ #### Minor (Nice to Have)
77
+ [Code style, optimization opportunities, documentation improvements]
78
+
79
+ **For each issue:**
80
+ - File:line reference
81
+ - What's wrong
82
+ - Why it matters
83
+ - How to fix (if not obvious)
84
+
85
+ ### Recommendations
86
+ [Improvements for code quality, architecture, or process]
87
+
88
+ ### Assessment
89
+
90
+ **Ready to merge?** [Yes/No/With fixes]
91
+
92
+ **Reasoning:** [Technical assessment in 1-2 sentences]
93
+
94
+ ## Critical Rules
95
+
96
+ **DO:**
97
+ - Categorize by actual severity (not everything is Critical)
98
+ - Be specific (file:line, not vague)
99
+ - Explain WHY issues matter
100
+ - Acknowledge strengths
101
+ - Give clear verdict
102
+
103
+ **DON'T:**
104
+ - Say "looks good" without checking
105
+ - Mark nitpicks as Critical
106
+ - Give feedback on code you didn't review
107
+ - Be vague ("improve error handling")
108
+ - Avoid giving a clear verdict
109
+
110
+ ## Example Output
111
+
112
+ ```
113
+ ### Strengths
114
+ - Clean database schema with proper migrations (db.ts:15-42)
115
+ - Comprehensive test coverage (18 tests, all edge cases)
116
+ - Good error handling with fallbacks (summarizer.ts:85-92)
117
+
118
+ ### Issues
119
+
120
+ #### Important
121
+ 1. **Missing help text in CLI wrapper**
122
+ - File: index-conversations:1-31
123
+ - Issue: No --help flag, users won't discover --concurrency
124
+ - Fix: Add --help case with usage examples
125
+
126
+ 2. **Date validation missing**
127
+ - File: search.ts:25-27
128
+ - Issue: Invalid dates silently return no results
129
+ - Fix: Validate ISO format, throw error with example
130
+
131
+ #### Minor
132
+ 1. **Progress indicators**
133
+ - File: indexer.ts:130
134
+ - Issue: No "X of Y" counter for long operations
135
+ - Impact: Users don't know how long to wait
136
+
137
+ ### Recommendations
138
+ - Add progress reporting for user experience
139
+ - Consider config file for excluded projects (portability)
140
+
141
+ ### Assessment
142
+
143
+ **Ready to merge: With fixes**
144
+
145
+ **Reasoning:** Core implementation is solid with good architecture and tests. Important issues (help text, date validation) are easily fixed and don't affect core functionality.
146
+ ```