claude-dev-env 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 (215) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +219 -0
  3. package/agents/agent-writer.md +157 -0
  4. package/agents/clasp-deployment-orchestrator.md +609 -0
  5. package/agents/clean-coder.md +295 -0
  6. package/agents/code-quality-agent.md +40 -0
  7. package/agents/code-standards-agent.md +93 -0
  8. package/agents/config-centralizer.md +686 -0
  9. package/agents/config-extraction-agent.md +225 -0
  10. package/agents/doc-orchestrator.md +47 -0
  11. package/agents/docs-agent.md +112 -0
  12. package/agents/docx-agent.md +211 -0
  13. package/agents/git-commit-crafter.md +100 -0
  14. package/agents/magic-value-eliminator-agent.md +72 -0
  15. package/agents/mandatory-agent-workflow-agent.md +88 -0
  16. package/agents/parallel-workflow-coordinator.md +779 -0
  17. package/agents/pdf-agent.md +302 -0
  18. package/agents/plan-executor.md +226 -0
  19. package/agents/pr-description-writer.md +87 -0
  20. package/agents/project-context-loader.md +238 -0
  21. package/agents/project-docs-analyzer.md +54 -0
  22. package/agents/project-structure-organizer-agent.md +72 -0
  23. package/agents/readability-review-agent.md +76 -0
  24. package/agents/refactoring-specialist.md +69 -0
  25. package/agents/right-sized-engineer.md +129 -0
  26. package/agents/session-continuity-manager.md +53 -0
  27. package/agents/skill-to-agent-converter.md +371 -0
  28. package/agents/skill-writer-agent.md +470 -0
  29. package/agents/stub-detector-agent.md +140 -0
  30. package/agents/tdd-test-writer.md +62 -0
  31. package/agents/test-data-builder.md +68 -0
  32. package/agents/tooling-builder.md +78 -0
  33. package/agents/user-docs-writer.md +67 -0
  34. package/agents/validation-expert.md +71 -0
  35. package/agents/workflow-visual-documenter.md +82 -0
  36. package/agents/xlsx-agent.md +169 -0
  37. package/bin/install.mjs +256 -0
  38. package/commands/commit.md +28 -0
  39. package/commands/docupdate.md +322 -0
  40. package/commands/implement.md +102 -0
  41. package/commands/initialize.md +91 -0
  42. package/commands/plan.md +63 -0
  43. package/commands/pr-comments.md +47 -0
  44. package/commands/readability-review.md +20 -0
  45. package/commands/review-plan.md +7 -0
  46. package/commands/right-size.md +15 -0
  47. package/commands/stubcheck.md +89 -0
  48. package/commands/sum.md +30 -0
  49. package/docs/CODE_RULES.md +186 -0
  50. package/docs/DJANGO_PATTERNS.md +80 -0
  51. package/docs/REACT_PATTERNS.md +185 -0
  52. package/docs/TEST_QUALITY.md +104 -0
  53. package/hooks/advisory/migration-safety-advisor.py +49 -0
  54. package/hooks/advisory/refactor-guard.py +205 -0
  55. package/hooks/blocking/block-main-commit.py +168 -0
  56. package/hooks/blocking/code-rules-enforcer.py +549 -0
  57. package/hooks/blocking/destructive-command-blocker.py +107 -0
  58. package/hooks/blocking/docker-settings-guard.py +44 -0
  59. package/hooks/blocking/hedging-language-blocker.py +130 -0
  60. package/hooks/blocking/parallel-task-blocker.py +69 -0
  61. package/hooks/blocking/pr-description-enforcer.py +87 -0
  62. package/hooks/blocking/pyautogui-scroll-blocker.py +74 -0
  63. package/hooks/blocking/sensitive-file-protector.py +70 -0
  64. package/hooks/blocking/tdd-enforcer.py +62 -0
  65. package/hooks/blocking/test-preflight-check.py +343 -0
  66. package/hooks/blocking/write-existing-file-blocker.py +63 -0
  67. package/hooks/git-hooks/post-commit.py +103 -0
  68. package/hooks/github-action/test_workflow.py +33 -0
  69. package/hooks/hooks.json +246 -0
  70. package/hooks/lifecycle/config-change-guard.py +84 -0
  71. package/hooks/lifecycle/session-end-cleanup.py +59 -0
  72. package/hooks/notification/attention-needed-notify.py +63 -0
  73. package/hooks/notification/claude-notification-handler.py +59 -0
  74. package/hooks/notification/notification_utils.py +206 -0
  75. package/hooks/rewrite-plugin-paths.py +116 -0
  76. package/hooks/session/bulk-edit-reminder.py +30 -0
  77. package/hooks/session/code-rules-reminder.py +97 -0
  78. package/hooks/session/compact-context-reinject.py +39 -0
  79. package/hooks/session/hook-structure-context.py +140 -0
  80. package/hooks/session/plugin-data-dir-cleanup.py +39 -0
  81. package/hooks/validation/code-style-validator.py +145 -0
  82. package/hooks/validation/e2e-test-validator.py +142 -0
  83. package/hooks/validation/hook-format-validator.py +66 -0
  84. package/hooks/validation/mypy_validator.py +180 -0
  85. package/hooks/validators/README.md +125 -0
  86. package/hooks/validators/VALIDATION_REPORT.md +287 -0
  87. package/hooks/validators/__init__.py +19 -0
  88. package/hooks/validators/abbreviation_checks.py +82 -0
  89. package/hooks/validators/code_quality_checks.py +133 -0
  90. package/hooks/validators/comment_checks.py +188 -0
  91. package/hooks/validators/file_structure_checks.py +182 -0
  92. package/hooks/validators/git_checks.py +107 -0
  93. package/hooks/validators/health_check.py +214 -0
  94. package/hooks/validators/magic_value_checks.py +81 -0
  95. package/hooks/validators/mypy_integration.py +52 -0
  96. package/hooks/validators/output_formatter.py +266 -0
  97. package/hooks/validators/pr_reference_checks.py +72 -0
  98. package/hooks/validators/python_antipattern_checks.py +110 -0
  99. package/hooks/validators/python_style_checks.py +364 -0
  100. package/hooks/validators/react_checks.py +90 -0
  101. package/hooks/validators/ruff_integration.py +80 -0
  102. package/hooks/validators/run_all_validators.py +772 -0
  103. package/hooks/validators/security_checks.py +135 -0
  104. package/hooks/validators/test_abbreviation_checks.py +76 -0
  105. package/hooks/validators/test_bad.tsx +7 -0
  106. package/hooks/validators/test_code_quality_checks.py +129 -0
  107. package/hooks/validators/test_file_structure_checks.py +307 -0
  108. package/hooks/validators/test_files/01_basic_component.tsx +10 -0
  109. package/hooks/validators/test_files/02_component_without_react.tsx +10 -0
  110. package/hooks/validators/test_files/03_pure_component.tsx +10 -0
  111. package/hooks/validators/test_files/04_pure_component_import.tsx +10 -0
  112. package/hooks/validators/test_files/05_typescript_generics.tsx +14 -0
  113. package/hooks/validators/test_files/06_typescript_two_generics.tsx +18 -0
  114. package/hooks/validators/test_files/07_multiline_declaration.tsx +11 -0
  115. package/hooks/validators/test_files/08_error_boundary_valid.tsx +14 -0
  116. package/hooks/validators/test_files/09_error_boundary_with_other_class.tsx +20 -0
  117. package/hooks/validators/test_files/10_inheritance_chain.tsx +16 -0
  118. package/hooks/validators/test_files/11_ts_file.ts +10 -0
  119. package/hooks/validators/test_files/12_non_react_class.tsx +14 -0
  120. package/hooks/validators/test_files/13_functional_component.tsx +8 -0
  121. package/hooks/validators/test_files/14_indented_class.tsx +13 -0
  122. package/hooks/validators/test_files/15_getDerivedStateFromError.tsx +14 -0
  123. package/hooks/validators/test_files/16_mixed_components.tsx +20 -0
  124. package/hooks/validators/test_files/EXECUTIVE_SUMMARY.md +175 -0
  125. package/hooks/validators/test_files/TEST_RESULTS_TABLE.txt +60 -0
  126. package/hooks/validators/test_files/VALIDATION_REPORT.md +201 -0
  127. package/hooks/validators/test_files/async_views.py +23 -0
  128. package/hooks/validators/test_files/async_with_imports.py +14 -0
  129. package/hooks/validators/test_files/bad_inline_imports.py +37 -0
  130. package/hooks/validators/test_files/management/commands/cmd_01_no_debug_check.py +10 -0
  131. package/hooks/validators/test_files/management/commands/cmd_02_proper_debug_check.py +14 -0
  132. package/hooks/validators/test_files/management/commands/cmd_03_debug_check_with_return.py +14 -0
  133. package/hooks/validators/test_files/management/commands/cmd_04_imported_DEBUG.py +14 -0
  134. package/hooks/validators/test_files/management/commands/cmd_05_debug_check_in_helper.py +16 -0
  135. package/hooks/validators/test_files/management/commands/cmd_06_debug_check_late.py +22 -0
  136. package/hooks/validators/test_files/management/commands/cmd_07_positive_debug_check.py +15 -0
  137. package/hooks/validators/test_files/management/commands/cmd_08_debug_with_and.py +14 -0
  138. package/hooks/validators/test_files/not_management_command.py +10 -0
  139. package/hooks/validators/test_files/skip_decorators/test_01_simple_skip.py +8 -0
  140. package/hooks/validators/test_files/skip_decorators/test_02_pytest_skipif.py +8 -0
  141. package/hooks/validators/test_files/skip_decorators/test_03_unittest_skipIf.py +8 -0
  142. package/hooks/validators/test_files/skip_decorators/test_04_skip_with_parens.py +8 -0
  143. package/hooks/validators/test_files/skip_decorators/test_05_xfail.py +7 -0
  144. package/hooks/validators/test_files/skip_decorators/test_06_custom_skip.py +11 -0
  145. package/hooks/validators/test_files/skip_decorators/test_07_capital_Skip.py +8 -0
  146. package/hooks/validators/test_files/skip_decorators/test_08_skipUnless.py +7 -0
  147. package/hooks/validators/test_files/skip_decorators/test_09_pytest_mark_skip_simple.py +7 -0
  148. package/hooks/validators/test_files/test_async_functions.py +45 -0
  149. package/hooks/validators/test_files/test_purecomponent/PureComponentExample.tsx +7 -0
  150. package/hooks/validators/test_files/test_purecomponent/ReactPureComponentExample.tsx +7 -0
  151. package/hooks/validators/test_git_checks.py +295 -0
  152. package/hooks/validators/test_good.tsx +5 -0
  153. package/hooks/validators/test_health_check.py +57 -0
  154. package/hooks/validators/test_magic_value_checks.py +63 -0
  155. package/hooks/validators/test_mypy_integration.py +27 -0
  156. package/hooks/validators/test_output_formatter.py +150 -0
  157. package/hooks/validators/test_pr_reference_checks.py +41 -0
  158. package/hooks/validators/test_python_antipattern_checks.py +113 -0
  159. package/hooks/validators/test_python_style_checks.py +439 -0
  160. package/hooks/validators/test_react_checks.py +213 -0
  161. package/hooks/validators/test_results.txt +25 -0
  162. package/hooks/validators/test_ruff_integration.py +27 -0
  163. package/hooks/validators/test_run_all_validators.py +228 -0
  164. package/hooks/validators/test_run_all_validators_integration.py +48 -0
  165. package/hooks/validators/test_safety_checks.py +243 -0
  166. package/hooks/validators/test_security_checks.py +105 -0
  167. package/hooks/validators/test_test_safety_checks.py +321 -0
  168. package/hooks/validators/test_todo_checks.py +39 -0
  169. package/hooks/validators/test_type_safety_checks.py +85 -0
  170. package/hooks/validators/test_useless_test_checks.py +55 -0
  171. package/hooks/validators/test_validator_base.py +26 -0
  172. package/hooks/validators/test_verify_paths.py +34 -0
  173. package/hooks/validators/todo_checks.py +59 -0
  174. package/hooks/validators/type_safety_checks.py +101 -0
  175. package/hooks/validators/useless_test_checks.py +92 -0
  176. package/hooks/validators/validator_base.py +19 -0
  177. package/hooks/validators/verify_paths.py +57 -0
  178. package/hooks/workflow/auto-formatter.py +114 -0
  179. package/hooks/workflow/investigation-tracker-reset.py +46 -0
  180. package/package.json +30 -0
  181. package/rules/agent-spawn-protocol.md +47 -0
  182. package/rules/cleanup-temp-files.md +27 -0
  183. package/rules/code-reviews.md +11 -0
  184. package/rules/code-standards.md +43 -0
  185. package/rules/conservative-action.md +20 -0
  186. package/rules/context7.md +12 -0
  187. package/rules/explore-thoroughly.md +27 -0
  188. package/rules/git-workflow.md +42 -0
  189. package/rules/parallel-tools.md +23 -0
  190. package/rules/research-mode.md +23 -0
  191. package/rules/right-sized-engineering.md +28 -0
  192. package/rules/tdd.md +7 -0
  193. package/rules/testing.md +12 -0
  194. package/skills/agent-prompt/SKILL.md +102 -0
  195. package/skills/anthropic-plan/SKILL.md +107 -0
  196. package/skills/everything-search/SKILL.md +144 -0
  197. package/skills/ingest/SKILL.md +40 -0
  198. package/skills/npm-creator/SKILL.md +183 -0
  199. package/skills/pr-review-responder/EXAMPLES.md +590 -0
  200. package/skills/pr-review-responder/PRINCIPLES.md +539 -0
  201. package/skills/pr-review-responder/README.md +209 -0
  202. package/skills/pr-review-responder/SKILL.md +202 -0
  203. package/skills/pr-review-responder/TESTING.md +407 -0
  204. package/skills/pr-review-responder/scripts/respond_to_reviews.py +376 -0
  205. package/skills/pr-review-responder/update_skill.py +297 -0
  206. package/skills/prompt-generator/REFERENCE.md +150 -0
  207. package/skills/prompt-generator/SKILL.md +154 -0
  208. package/skills/readability-review/SKILL.md +127 -0
  209. package/skills/recall/SKILL.md +27 -0
  210. package/skills/remember/SKILL.md +63 -0
  211. package/skills/rule-audit/SKILL.md +307 -0
  212. package/skills/rule-creator/SKILL.md +150 -0
  213. package/skills/skill-writer/REFERENCE.md +246 -0
  214. package/skills/skill-writer/SKILL.md +270 -0
  215. package/skills/tdd-team/SKILL.md +128 -0
@@ -0,0 +1,102 @@
1
+ ---
2
+ description: Provide full implementation context to right-sized engineer in XML format
3
+ allowed-tools: Task, Read, Grep, Glob
4
+ ---
5
+
6
+ **Implementation with Full Context - XML-Structured Guidance**
7
+
8
+ Launch a clean-coder agent with COMPREHENSIVE implementation context provided in structured XML format.
9
+
10
+ ## Process:
11
+
12
+ 1. **Gather Complete Context** - Analyze the codebase to understand:
13
+ - Existing patterns and conventions
14
+ - Available dependencies and libraries
15
+ - Testing approaches and frameworks
16
+ - File organization and naming conventions
17
+
18
+ 2. **Structure the Implementation Request in XML**:
19
+ ```xml
20
+ <implementation-context>
21
+ <requirements>
22
+ <user-request>Exact user requirements</user-request>
23
+ <acceptance-criteria>What defines success</acceptance-criteria>
24
+ <constraints>Any limitations or must-haves</constraints>
25
+ </requirements>
26
+
27
+ <project-context>
28
+ <codebase-patterns>
29
+ <pattern>Existing patterns found in codebase</pattern>
30
+ <conventions>Naming and style conventions observed</conventions>
31
+ <architecture>Current architectural approach</architecture>
32
+ </codebase-patterns>
33
+ <dependencies>
34
+ <available>List of available libraries/frameworks</available>
35
+ <avoid>Libraries NOT to use</avoid>
36
+ </dependencies>
37
+ <testing-approach>
38
+ <framework>Testing framework in use</framework>
39
+ <patterns>Test file patterns and locations</patterns>
40
+ </testing-approach>
41
+ </project-context>
42
+
43
+ <implementation-plan>
44
+ <approach>High-level approach to implementation</approach>
45
+ <steps>
46
+ <step priority="1">First implementation step</step>
47
+ <step priority="2">Second implementation step</step>
48
+ <!-- Additional steps as needed -->
49
+ </steps>
50
+ <test-strategy>
51
+ <tdd-requirement>MANDATORY: Write failing tests first</tdd-requirement>
52
+ <coverage>Expected test coverage approach</coverage>
53
+ </test-strategy>
54
+ </implementation-plan>
55
+
56
+ <engineering-principles>
57
+ <must-follow>
58
+ <principle>TDD - No production code without failing test</principle>
59
+ <principle>Follow existing patterns exactly</principle>
60
+ <principle>Use available utilities - no reinventing</principle>
61
+ <principle>Small, focused functions</principle>
62
+ <principle>Proper error handling</principle>
63
+ </must-follow>
64
+ <avoid>
65
+ <anti-pattern>Over-engineering for current scale</anti-pattern>
66
+ <anti-pattern>Breaking existing conventions</anti-pattern>
67
+ <anti-pattern>Copy-paste programming</anti-pattern>
68
+ <anti-pattern>Magic numbers/strings</anti-pattern>
69
+ </avoid>
70
+ </engineering-principles>
71
+
72
+ <success-criteria>
73
+ <criterion>All tests pass</criterion>
74
+ <criterion>Follows existing patterns</criterion>
75
+ <criterion>No linting/type errors</criterion>
76
+ <criterion>Maintains backward compatibility</criterion>
77
+ </success-criteria>
78
+ </implementation-context>
79
+ ```
80
+
81
+ 3. **Provide to Agent with Clear Instructions**:
82
+ - "ULTRATHINK through this implementation"
83
+ - "Follow TDD strictly - write tests FIRST"
84
+ - "Match existing patterns EXACTLY"
85
+ - "Use the XML context to understand all requirements and constraints"
86
+
87
+ 4. **Agent Should**:
88
+ - Parse the XML context thoroughly
89
+ - Implement following TDD (Red-Green-Refactor)
90
+ - Match existing codebase patterns
91
+ - Use available utilities and libraries
92
+ - Apply right-sized engineering principles
93
+ - Validate against success criteria
94
+
95
+ **CRITICAL REQUIREMENTS**:
96
+ - Provide COMPLETE context - incomplete context leads to wrong implementations
97
+ - Ensure XML is well-formed and comprehensive
98
+ - Include concrete examples from existing code
99
+ - Specify exact file locations and patterns
100
+ - Make constraints and requirements crystal clear
101
+
102
+ This ensures the implementation agent has everything needed to deliver a solution that integrates seamlessly with the existing codebase while following best practices.
@@ -0,0 +1,91 @@
1
+ # Initialize Session
2
+
3
+ You are starting a new task. Before proceeding, you MUST read and internalize the critical protocols from CLAUDE.md.
4
+
5
+ ## MANDATORY PROTOCOL REVIEW
6
+
7
+ Read CLAUDE.md now and focus on:
8
+
9
+ ### 1. AGENT-FIRST WORKFLOW (CRITICAL)
10
+
11
+ **BEFORE RESPONDING TO ANY USER MESSAGE:**
12
+ - ☐ What is the user asking for?
13
+ - ☐ Does ANY agent match this request?
14
+ - ☐ If yes → INVOKE THE AGENT via Task tool
15
+ - ☐ If no agent matches → Proceed with skills/direct implementation
16
+
17
+ **Agent Decision Tree:**
18
+ - Automation work → check available agents for automation patterns
19
+ - Web App Development → check available agents for framework-specific patterns
20
+ - Configuration/Architecture → config-extraction-agent, parallel-workflow-coordinator
21
+
22
+ **Never skip agent check to "save time" or because request "seems simple"**
23
+
24
+ ### 2. SKILLS WORKFLOW (CRITICAL)
25
+
26
+ **Before ANY task:**
27
+ - ☐ List available skills in your mind
28
+ - ☐ Does ANY skill match this request?
29
+ - ☐ If yes → Use Skill tool to read and run it
30
+ - ☐ Announce which skill you're using
31
+ - ☐ Follow the skill exactly
32
+
33
+ **Mandatory skills to remember:**
34
+ - `code-standards` - For ALL code generation, planning, implementation
35
+ - `superpowers:test-driven-development` - For ANY feature/bugfix
36
+ - `superpowers:brainstorming` - BEFORE coding on design tasks
37
+ - `superpowers:systematic-debugging` - For bugs/failures
38
+ - `superpowers:verification-before-completion` - Before claiming work is done
39
+
40
+ ### 3. TDD IS NON-NEGOTIABLE
41
+
42
+ **Red-Green-Refactor:**
43
+ 1. **Red**: Write failing test FIRST. NO production code.
44
+ 2. **Green**: MINIMUM code to pass test only.
45
+ 3. **Refactor**: Assess improvements after green.
46
+
47
+ **If writing production code without failing test, STOP immediately.**
48
+
49
+ ### 4. CODE STANDARDS (ENFORCED)
50
+
51
+ - No `Any` types - Use Union/Optional/generics
52
+ - No `# type: ignore` without justification
53
+ - All imports at top
54
+ - No files in project root
55
+ - Immutable data (frozen dataclasses)
56
+ - Small functions (5-15 lines, max 30)
57
+ - Max 2 nesting levels
58
+ - No comments (self-documenting code)
59
+ - No Unicode in print/debug (Windows compatibility)
60
+
61
+ ### 5. RIGHT-SIZED ENGINEERING
62
+
63
+ **Always Do:**
64
+ - Extract constants and configuration
65
+ - Create reusable functions
66
+ - DRY from the start
67
+ - Single responsibility
68
+
69
+ **Never Do (Solo Scale):**
70
+ - Abstract base classes for single implementations
71
+ - Dependency injection frameworks
72
+ - Complex patterns
73
+ - Over-abstracted interfaces
74
+
75
+ ## Common Rationalizations That Mean Failure
76
+
77
+ If you think:
78
+ - "This is too simple" → WRONG. Check agents/skills.
79
+ - "Let me just implement quickly" → WRONG. Check agents/skills first.
80
+ - "I'll gather context first" → WRONG. Agents/skills tell you HOW.
81
+ - "This doesn't need formal process" → WRONG. Process prevents mistakes.
82
+
83
+ ## NOW PROCEED
84
+
85
+ You have reviewed the critical protocols. Apply them to the current task.
86
+
87
+ **Remember:**
88
+ 1. Check agents FIRST
89
+ 2. Check skills SECOND
90
+ 3. Follow TDD ALWAYS
91
+ 4. Build it right, but build it simple
@@ -0,0 +1,63 @@
1
+ Plan a feature with full validation workflow.
2
+
3
+ > **MANDATORY:** Load `~/.claude/docs/CODE_RULES.md` for all code standards.
4
+
5
+ ## Workflow (MANDATORY - NO SKIPPING STEPS)
6
+
7
+ ### Phase 1: Design
8
+ 1. **Invoke `plan` skill** - Discover configs, design through dialogue
9
+
10
+ ### Phase 2: Plan
11
+ 2. **Invoke `write-plan` skill** - Create detailed TDD implementation plan (CODE_RULES.md compliant)
12
+ 3. **Invoke `review-plan` skill** - Validate plan against CODE_RULES.md standards
13
+ 4. **Fix violations** - If review-plan finds issues, fix before proceeding
14
+
15
+ ### Phase 3: Approval (NEW PRs only)
16
+ 5. **Invoke `plan-checkpoint` skill** - Generate summary gist for reviewer approval
17
+ 6. **Wait for approval** - Do not proceed until approved
18
+
19
+ ### Phase 4: Execute
20
+ 7. **Invoke `plan-executor` agent** - Execute with full standards enforcement
21
+ 8. **Invoke `readability-review` skill** - Validate written code against CODE_RULES.md
22
+
23
+ ### Phase 5: Commit & Review
24
+ 9. **Invoke `/commit`** - Create atomic commits
25
+ 10. **Invoke `pre-push-review` skill** - MANDATORY pre-push review
26
+ 11. **Push branch** - Push to GitHub (NO PR yet)
27
+ 12. **Wait for commit review** - User reviews on GitHub
28
+ 13. **Create PR** - Only after user approves commit
29
+
30
+ ## Key Rules
31
+
32
+ - NEVER offer execution until review-plan passes with ZERO violations
33
+ - For NEW PRs: wait for reviewer approval on checkpoint before implementing
34
+ - For PR REVIEW FIXES: skip checkpoint, proceed directly to execution
35
+ - NEVER push until pre-push-review passes
36
+ - NEVER create PR until user explicitly approves pushed commit
37
+
38
+ ## Skills & Agents Reference
39
+
40
+ | Step | Tool | Purpose |
41
+ |------|------|---------|
42
+ | Design | `plan` skill | Collaborative design with config discovery |
43
+ | Write | `write-plan` skill | TDD plan with CODE_RULES.md compliance |
44
+ | Review Plan | `review-plan` skill | Validate plan against standards |
45
+ | Execute | `plan-executor` agent | Implement with standards enforcement |
46
+ | Review Code | `readability-review` skill | Validate code before commit |
47
+
48
+ ## Standards Reference
49
+
50
+ All code quality standards are in `~/.claude/docs/CODE_RULES.md`:
51
+ - Self-documenting code (no comments)
52
+ - Centralized configs (reuse existing)
53
+ - No magic values
54
+ - No abbreviations
55
+ - Complete type hints
56
+ - All imports shown
57
+
58
+ ## Usage
59
+
60
+ ```
61
+ /plan add user authentication
62
+ /plan refactor the payment system
63
+ ```
@@ -0,0 +1,47 @@
1
+ ---
2
+ description: Fetch and display all comments from a GitHub PR (fetches comments from the current repo)
3
+ ---
4
+
5
+ You are an AI assistant integrated into a git-based version control system. Your task is to fetch and display comments from a GitHub pull request.
6
+
7
+ **CRITICAL: Detect the repository from the current git remote (upstream preferred, then origin).**
8
+
9
+ Follow these steps:
10
+
11
+ 1. Detect `{owner}/{repo}` from `gh repo view --json nameWithOwner -q .nameWithOwner`
12
+ 2. Extract PR number from the argument (e.g., "PR44" → 44, "44" → 44)
13
+ 3. Use `gh api repos/{owner}/{repo}/issues/{number}/comments` to get PR-level comments
14
+ 4. Use `gh api repos/{owner}/{repo}/pulls/{number}/comments` to get inline review comments
15
+ 5. Use `gh api repos/{owner}/{repo}/pulls/{number}/reviews` to get review summaries
16
+ 6. Parse and format all comments in chronological order
17
+ 7. Return ONLY the formatted comments, with no additional text
18
+
19
+ Format the comments as:
20
+
21
+ ## Comments
22
+
23
+ ### PR-level Comments
24
+
25
+ [For each issue comment:]
26
+ - @author (timestamp):
27
+ > quoted comment text
28
+
29
+ ### Review: @reviewer [action] (timestamp)
30
+
31
+ [Review summary if present]
32
+
33
+ [For each inline code comment:]
34
+ - @author file.ts#line:
35
+ ```diff
36
+ [diff_hunk from the API response]
37
+ ```
38
+ > quoted comment text
39
+
40
+ If there are no comments, return "No comments found."
41
+
42
+ Remember:
43
+ 1. Only show the actual comments, no explanatory text
44
+ 2. Include PR-level comments, review summaries, and inline code review comments
45
+ 3. Preserve chronological order
46
+ 4. Show the file and line number context for inline code review comments
47
+ 5. Detect {owner}/{repo} dynamically from the current git remote
@@ -0,0 +1,20 @@
1
+ ---
2
+ description: "8-dimension readability review: scores and FIXES code to 160/160. Also handles paste-rewrite via arguments."
3
+ allowed-tools: Task, Read, Edit, Grep, Glob
4
+ ---
5
+
6
+ Launch the readability-review agent to review and fix code readability.
7
+
8
+ ## Steps
9
+
10
+ 1. Launch a `readability-review-agent` via the Task tool
11
+ 2. The agent will: load its rubric → discover target code → read it → score every function → FIX anything below 16/20 → report
12
+
13
+ ## User Arguments
14
+
15
+ If the user provided arguments: $ARGUMENTS
16
+
17
+ - If arguments contain **pasted code**: locate the code in the codebase (Grep for a unique line), read the full file, score it against all 8 dimensions, rewrite to 160/160, and apply via Edit tool
18
+ - If arguments contain a **file path**: review only that file
19
+ - If arguments contain **"score-only"**: skip the fix phase and just report scores
20
+ - If **no arguments**: review all changed files in the session (via `git diff --name-only`)
@@ -0,0 +1,7 @@
1
+ Review the current plan against code standards.
2
+
3
+ MANDATORY: Spawn a `readability-review-agent` via Task tool to perform the review. NEVER review inline in the main conversation.
4
+
5
+ 1. Identify plan files in `.planning/phases/` or `docs/plans/`
6
+ 2. Spawn `readability-review-agent` with full review instructions from the `review-plan` skill
7
+ 3. Report the agent's verdict back to the user
@@ -0,0 +1,15 @@
1
+ ---
2
+ description: Prevent over/under-engineering
3
+ allowed-tools: Task
4
+ ---
5
+
6
+ Launch the clean-coder agent to review code for appropriate engineering practices.
7
+
8
+ The agent will evaluate whether abstractions, patterns, and practices match the actual needs of the project, ensuring code is neither over-engineered nor under-engineered for its current scale and purpose.
9
+
10
+ The review will identify:
11
+ - **Over-engineering**: Abstract classes with single implementations, unnecessary interfaces, complex patterns where simple functions would suffice
12
+ - **Under-engineering**: Hardcoded values, magic numbers/strings, copy-pasted code, missing error handling
13
+ - **Good examples**: Appropriate constant extraction, well-scoped functions, clear error handling, simple maintainable solutions
14
+
15
+ The goal is to build it right, but build it simple - applying good engineering principles at the appropriate scale for the project.
@@ -0,0 +1,89 @@
1
+ ---
2
+ description: Detect and fix stub implementations in code and plans with agent/skill recommendations
3
+ allowed-tools: Read, Grep, Glob, Skill
4
+ ---
5
+
6
+ Execute comprehensive stub detection using the stub-detector skill to identify incomplete implementations and recommend appropriate solutions.
7
+
8
+ ## Process
9
+
10
+ 1. **Invoke stub-detector skill** to scan current project
11
+ 2. Identify all stubs in:
12
+ - Python code (pass, NotImplementedError, TODO comments)
13
+ - Plan documents (incomplete steps, TBD markers)
14
+ - Configuration (placeholder values)
15
+ 3. Classify by severity (CRITICAL/HIGH/MEDIUM/LOW)
16
+ 4. Recommend specific agents or skills based on:
17
+ - Project type (Web Automation, Django, etc.)
18
+ - Stub category (config, automation, business logic)
19
+ - Available implementations (check for existing solutions first)
20
+ 5. Present actionable report with:
21
+ - file:line references for each stub
22
+ - Severity and impact assessment
23
+ - Specific recommendations with rationale
24
+ - Batch operation opportunities
25
+ 6. Offer immediate actions to fix CRITICAL stubs
26
+
27
+ ## Stub Detection Patterns
28
+
29
+ **Code stubs to find:**
30
+ ```
31
+ pass statements
32
+ NotImplementedError
33
+ TODO/FIXME/HACK comments
34
+ Empty functions with only docstrings
35
+ Placeholder returns (return None when type suggests otherwise)
36
+ ```
37
+
38
+ **Documentation stubs to find:**
39
+ ```
40
+ [TODO] or [TBD] markers
41
+ "To be implemented" sections
42
+ Incomplete step descriptions
43
+ Placeholder text in plans
44
+ Missing details in implementation guides
45
+ ```
46
+
47
+ ## Agent/Skill Recommendation Logic
48
+
49
+ **Web Automation stubs →**
50
+ - Automation: automation-agent or automation skill
51
+ - Google Sheets: sheets orchestrator agent
52
+ - Config issues: config-extraction-agent or config-extraction skill
53
+
54
+ **Web framework stubs →**
55
+ - Models/views/forms: domain-specific agent
56
+ - Business logic: domain-specific agent
57
+ - Domain features: domain-specific agent
58
+
59
+ **General stubs →**
60
+ - Follow TDD workflow from CLAUDE.md
61
+ - Follow CODE_RULES.md standards (via clean-coder agent)
62
+ - Check for existing shared utilities first
63
+
64
+ ## Output Format
65
+
66
+ Provide a clear summary report showing:
67
+ - Total stubs found with severity breakdown
68
+ - Grouped by category for batch processing
69
+ - Specific recommendations for each stub
70
+ - Immediate action options for user
71
+
72
+ Example:
73
+ ```
74
+ Found 7 stubs (3 CRITICAL, 2 HIGH, 2 MEDIUM)
75
+
76
+ [CRITICAL] services/file_processor.py:45
77
+ Incomplete matching logic
78
+ → Recommendation: Use FileProcessor (already available)
79
+ → Action: Refactor to use shared utility
80
+
81
+ [HIGH] tests/test_integration.py:234
82
+ Missing integration test
83
+ → Recommendation: Follow TDD workflow
84
+ → Agent: tdd-test-writer
85
+
86
+ Would you like me to fix CRITICAL stubs now?
87
+ ```
88
+
89
+ **IMPORTANT:** Always check if solutions already exist (like we just implemented FileProcessor) before recommending new development.
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: sum
3
+ description: Generate a formatted session summary for quick pickup in new sessions
4
+ ---
5
+
6
+ Provide a nicely formatted summary of where we are leaving off in this session.
7
+
8
+ Use this format with proper line breaks:
9
+
10
+ ```
11
+ ---
12
+
13
+ **Session Summary: [Project/Task Name]**
14
+
15
+ **Status:** [Current state - e.g., Complete, In Progress, Blocked]
16
+
17
+ **Commits:** (if any)
18
+ - `hash` - Description
19
+
20
+ **What's Done:**
21
+ - Item 1
22
+ - Item 2
23
+
24
+ **Next Step:**
25
+ [Single clear next action]
26
+
27
+ ---
28
+ ```
29
+
30
+ Keep it concise but readable. Focus on actionable context, not history.
@@ -0,0 +1,186 @@
1
+ # Code Rules Reference
2
+
3
+ Compact reference for agents. Hook-enforced rules marked with ⚡.
4
+
5
+ ---
6
+
7
+ ## COMMENT PRESERVATION (ABSOLUTE RULE)
8
+
9
+ **NEVER remove existing comments.** If you are not adding or removing code on a line, do not touch its comments.
10
+
11
+ - Existing comments are SACRED — never delete, rewrite, or "clean up" existing comments
12
+ - New inline comments are not needed — write self-documenting code instead
13
+ - Docstrings for new files/methods/classes are allowed
14
+ - The hook enforces BOTH directions: blocks new inline comments AND blocks deletion of existing comments
15
+
16
+ **Scope:** Only evaluate comments on lines YOU are actively changing. If code is untouched, its comments are untouched.
17
+
18
+ ---
19
+
20
+ ## CORE PRINCIPLES
21
+
22
+ ### Self-Documenting Code
23
+ New code explains itself through naming. Do not add new inline comments — use descriptive names instead. Docstrings on functions/methods/classes are allowed.
24
+
25
+ > **Full readability standard:** `~/.claude/skills/readability-review/SKILL.md` — 8-dimension rubric (naming, SRP, abstraction, control flow, domain language, call sites, state clarity, visual rhythm). Run `/check` for parallel team review or `/readability-review` standalone.
26
+
27
+ ### Centralized Configuration
28
+ One source of truth. Every constant lives in ONE place (`config/`).
29
+
30
+ ### Reuse Before Create
31
+ Search first. Import second. Create last.
32
+
33
+ ### Encapsulation Enables Cleaner Naming
34
+ Expose constants via helper functions: `isMaxLevel(level)` > `level >= MAXIMUM_LEVEL`
35
+
36
+ ---
37
+
38
+ ## ⚡ HOOK-ENFORCED RULES
39
+
40
+ These rules are automatically enforced by `code-rules-enforcer.py`. Violations block Write/Edit.
41
+
42
+ | Rule | What's Checked |
43
+ |------|----------------|
44
+ | No NEW comments | `#` / `//` in new code only (existing comments NEVER removed; shebangs, type:, noqa, eslint, docstrings exempt) |
45
+ | Imports at top | No `import` inside function bodies |
46
+ | Logging format args | No `log_*(f"...")` - use `log_*("...", arg)` |
47
+ | File line count | Max 400 lines per file |
48
+ | Magic values | No literals in function bodies (0, 1, -1 exempt). Includes string templates — if you strip the interpolations from an f-string and the remaining literal text is structural (paths, URLs, patterns), those fragments are magic values that belong in config |
49
+ | Constants location | No `UPPER_SNAKE =` outside `config/` |
50
+
51
+ ---
52
+
53
+ ## 3. REUSE CONSTANTS (DRY CONFIG)
54
+
55
+ **Before writing ANY constant:**
56
+
57
+ ```bash
58
+ # Find config files
59
+ # Search your project for existing config files before creating new ones
60
+
61
+ # Search for value
62
+ grep -r "VALUE" config/
63
+ ```
64
+
65
+ **Decision tree:**
66
+ 1. Search exact value → Found? → IMPORT IT
67
+ 2. Search semantic match → Found? → USE EXISTING NAME
68
+ 3. Config file exists? → ADD TO EXISTING
69
+ 4. Create new (rare)
70
+
71
+ ---
72
+
73
+ ## 4. CONFIG LOCATIONS
74
+
75
+ | Constant Type | Location |
76
+ |---------------|----------|
77
+ | Timeouts, delays, retries | `config/timing.py` |
78
+ | Ports, URLs, thresholds | `config/constants.py` |
79
+ | CSS selectors | `config/selectors.py` |
80
+
81
+ ---
82
+
83
+ ## 5. NO ABBREVIATIONS
84
+
85
+ Full words only. No mental translation.
86
+
87
+ | Bad | Good |
88
+ |-----|------|
89
+ | `ctx`, `cfg`, `msg` | `context`, `configuration`, `message` |
90
+ | `btn`, `idx`, `cnt` | `button`, `index`, `count` |
91
+ | `tmp`, `elem`, `val` | `temporary_value`, `element`, `value` |
92
+
93
+ **Exception:** `i`, `j`, `k` in loops; `e` for exception.
94
+
95
+ **Extended naming rules** (from readability-review rubric):
96
+ - Loop vars: `each_order`, `each_user` (prefix `each_`)
97
+ - Booleans: `is_valid`, `has_permission`, `should_retry` (prefix `is_`/`has_`/`should_`/`can_`)
98
+ - Collections: `all_orders`, `all_users` (prefix `all_`)
99
+ - Maps: `price_by_product`, `user_by_id` (pattern `X_by_Y`)
100
+ - Preposition params: `from_path=`, `to=`, `into=`
101
+ - **Banned names:** `result`, `data`, `output`, `response`, `value`, `item`, `temp`
102
+ - **Banned prefixes:** `handle`, `process`, `manage`, `do`
103
+
104
+ ---
105
+
106
+ ## 6. COMPLETE TYPE HINTS
107
+
108
+ ```python
109
+ def function_name(
110
+ parameter: str,
111
+ optional: Optional[str] = None,
112
+ ) -> ReturnType:
113
+ ```
114
+
115
+ - ALL parameters typed
116
+ - ALL returns typed
117
+ - No `Any` type
118
+ - No `# type: ignore`
119
+
120
+ *(Also enforced by mypy_validator.py hook)*
121
+
122
+ ---
123
+
124
+ ## 7. RIGHT-SIZED ENGINEERING
125
+
126
+ **Simple > Clever. Functions > Classes. Concrete > Abstract.**
127
+
128
+ Never: ABC for single impl, DI frameworks, factory for single type
129
+ Always: Functions when no state, concrete classes, simple imports
130
+
131
+ ---
132
+
133
+ ## 8. TDD PROCESS
134
+
135
+ 1. **RED** - Failing test first
136
+ 2. **GREEN** - Minimum code to pass
137
+ 3. **REFACTOR** - Only if valuable
138
+
139
+ ---
140
+
141
+ ## 9. SELF-CONTAINED COMPONENTS
142
+
143
+ Components own their complete feature. Parents just render `<Child />`.
144
+
145
+ Child handles: state, modals, overlays, toasts
146
+ Parent knows: nothing about child's internals
147
+
148
+ ---
149
+
150
+ ## 10. NO REDUNDANT DATA FETCHES
151
+
152
+ If you already have data, don't fetch again.
153
+
154
+ ```typescript
155
+ // BAD
156
+ const profile = await getProfile();
157
+ const localProfile = await db.profile.first(); // same data!
158
+
159
+ // GOOD
160
+ const profile = await db.profile.first();
161
+ // ... use profile throughout ...
162
+ ```
163
+
164
+ ---
165
+
166
+ ## QUICK CHECKLIST
167
+
168
+ ```
169
+ Before ANY code:
170
+ [ ] Searched existing configs?
171
+ [ ] Importing from centralized config?
172
+
173
+ Hook will enforce:
174
+ [⚡] No NEW comments (existing comments NEVER removed)
175
+ [⚡] No magic values
176
+ [⚡] Imports at top
177
+ [⚡] Logging format args
178
+ [⚡] File under 400 lines
179
+ [⚡] Constants in config/
180
+
181
+ Manual check:
182
+ [ ] No abbreviations?
183
+ [ ] Complete type hints?
184
+ [ ] Self-contained components?
185
+ [ ] Readability: /check or /readability-review
186
+ ```