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.
- package/LICENSE +21 -0
- package/README.md +219 -0
- package/agents/agent-writer.md +157 -0
- package/agents/clasp-deployment-orchestrator.md +609 -0
- package/agents/clean-coder.md +295 -0
- package/agents/code-quality-agent.md +40 -0
- package/agents/code-standards-agent.md +93 -0
- package/agents/config-centralizer.md +686 -0
- package/agents/config-extraction-agent.md +225 -0
- package/agents/doc-orchestrator.md +47 -0
- package/agents/docs-agent.md +112 -0
- package/agents/docx-agent.md +211 -0
- package/agents/git-commit-crafter.md +100 -0
- package/agents/magic-value-eliminator-agent.md +72 -0
- package/agents/mandatory-agent-workflow-agent.md +88 -0
- package/agents/parallel-workflow-coordinator.md +779 -0
- package/agents/pdf-agent.md +302 -0
- package/agents/plan-executor.md +226 -0
- package/agents/pr-description-writer.md +87 -0
- package/agents/project-context-loader.md +238 -0
- package/agents/project-docs-analyzer.md +54 -0
- package/agents/project-structure-organizer-agent.md +72 -0
- package/agents/readability-review-agent.md +76 -0
- package/agents/refactoring-specialist.md +69 -0
- package/agents/right-sized-engineer.md +129 -0
- package/agents/session-continuity-manager.md +53 -0
- package/agents/skill-to-agent-converter.md +371 -0
- package/agents/skill-writer-agent.md +470 -0
- package/agents/stub-detector-agent.md +140 -0
- package/agents/tdd-test-writer.md +62 -0
- package/agents/test-data-builder.md +68 -0
- package/agents/tooling-builder.md +78 -0
- package/agents/user-docs-writer.md +67 -0
- package/agents/validation-expert.md +71 -0
- package/agents/workflow-visual-documenter.md +82 -0
- package/agents/xlsx-agent.md +169 -0
- package/bin/install.mjs +256 -0
- package/commands/commit.md +28 -0
- package/commands/docupdate.md +322 -0
- package/commands/implement.md +102 -0
- package/commands/initialize.md +91 -0
- package/commands/plan.md +63 -0
- package/commands/pr-comments.md +47 -0
- package/commands/readability-review.md +20 -0
- package/commands/review-plan.md +7 -0
- package/commands/right-size.md +15 -0
- package/commands/stubcheck.md +89 -0
- package/commands/sum.md +30 -0
- package/docs/CODE_RULES.md +186 -0
- package/docs/DJANGO_PATTERNS.md +80 -0
- package/docs/REACT_PATTERNS.md +185 -0
- package/docs/TEST_QUALITY.md +104 -0
- package/hooks/advisory/migration-safety-advisor.py +49 -0
- package/hooks/advisory/refactor-guard.py +205 -0
- package/hooks/blocking/block-main-commit.py +168 -0
- package/hooks/blocking/code-rules-enforcer.py +549 -0
- package/hooks/blocking/destructive-command-blocker.py +107 -0
- package/hooks/blocking/docker-settings-guard.py +44 -0
- package/hooks/blocking/hedging-language-blocker.py +130 -0
- package/hooks/blocking/parallel-task-blocker.py +69 -0
- package/hooks/blocking/pr-description-enforcer.py +87 -0
- package/hooks/blocking/pyautogui-scroll-blocker.py +74 -0
- package/hooks/blocking/sensitive-file-protector.py +70 -0
- package/hooks/blocking/tdd-enforcer.py +62 -0
- package/hooks/blocking/test-preflight-check.py +343 -0
- package/hooks/blocking/write-existing-file-blocker.py +63 -0
- package/hooks/git-hooks/post-commit.py +103 -0
- package/hooks/github-action/test_workflow.py +33 -0
- package/hooks/hooks.json +246 -0
- package/hooks/lifecycle/config-change-guard.py +84 -0
- package/hooks/lifecycle/session-end-cleanup.py +59 -0
- package/hooks/notification/attention-needed-notify.py +63 -0
- package/hooks/notification/claude-notification-handler.py +59 -0
- package/hooks/notification/notification_utils.py +206 -0
- package/hooks/rewrite-plugin-paths.py +116 -0
- package/hooks/session/bulk-edit-reminder.py +30 -0
- package/hooks/session/code-rules-reminder.py +97 -0
- package/hooks/session/compact-context-reinject.py +39 -0
- package/hooks/session/hook-structure-context.py +140 -0
- package/hooks/session/plugin-data-dir-cleanup.py +39 -0
- package/hooks/validation/code-style-validator.py +145 -0
- package/hooks/validation/e2e-test-validator.py +142 -0
- package/hooks/validation/hook-format-validator.py +66 -0
- package/hooks/validation/mypy_validator.py +180 -0
- package/hooks/validators/README.md +125 -0
- package/hooks/validators/VALIDATION_REPORT.md +287 -0
- package/hooks/validators/__init__.py +19 -0
- package/hooks/validators/abbreviation_checks.py +82 -0
- package/hooks/validators/code_quality_checks.py +133 -0
- package/hooks/validators/comment_checks.py +188 -0
- package/hooks/validators/file_structure_checks.py +182 -0
- package/hooks/validators/git_checks.py +107 -0
- package/hooks/validators/health_check.py +214 -0
- package/hooks/validators/magic_value_checks.py +81 -0
- package/hooks/validators/mypy_integration.py +52 -0
- package/hooks/validators/output_formatter.py +266 -0
- package/hooks/validators/pr_reference_checks.py +72 -0
- package/hooks/validators/python_antipattern_checks.py +110 -0
- package/hooks/validators/python_style_checks.py +364 -0
- package/hooks/validators/react_checks.py +90 -0
- package/hooks/validators/ruff_integration.py +80 -0
- package/hooks/validators/run_all_validators.py +772 -0
- package/hooks/validators/security_checks.py +135 -0
- package/hooks/validators/test_abbreviation_checks.py +76 -0
- package/hooks/validators/test_bad.tsx +7 -0
- package/hooks/validators/test_code_quality_checks.py +129 -0
- package/hooks/validators/test_file_structure_checks.py +307 -0
- package/hooks/validators/test_files/01_basic_component.tsx +10 -0
- package/hooks/validators/test_files/02_component_without_react.tsx +10 -0
- package/hooks/validators/test_files/03_pure_component.tsx +10 -0
- package/hooks/validators/test_files/04_pure_component_import.tsx +10 -0
- package/hooks/validators/test_files/05_typescript_generics.tsx +14 -0
- package/hooks/validators/test_files/06_typescript_two_generics.tsx +18 -0
- package/hooks/validators/test_files/07_multiline_declaration.tsx +11 -0
- package/hooks/validators/test_files/08_error_boundary_valid.tsx +14 -0
- package/hooks/validators/test_files/09_error_boundary_with_other_class.tsx +20 -0
- package/hooks/validators/test_files/10_inheritance_chain.tsx +16 -0
- package/hooks/validators/test_files/11_ts_file.ts +10 -0
- package/hooks/validators/test_files/12_non_react_class.tsx +14 -0
- package/hooks/validators/test_files/13_functional_component.tsx +8 -0
- package/hooks/validators/test_files/14_indented_class.tsx +13 -0
- package/hooks/validators/test_files/15_getDerivedStateFromError.tsx +14 -0
- package/hooks/validators/test_files/16_mixed_components.tsx +20 -0
- package/hooks/validators/test_files/EXECUTIVE_SUMMARY.md +175 -0
- package/hooks/validators/test_files/TEST_RESULTS_TABLE.txt +60 -0
- package/hooks/validators/test_files/VALIDATION_REPORT.md +201 -0
- package/hooks/validators/test_files/async_views.py +23 -0
- package/hooks/validators/test_files/async_with_imports.py +14 -0
- package/hooks/validators/test_files/bad_inline_imports.py +37 -0
- package/hooks/validators/test_files/management/commands/cmd_01_no_debug_check.py +10 -0
- package/hooks/validators/test_files/management/commands/cmd_02_proper_debug_check.py +14 -0
- package/hooks/validators/test_files/management/commands/cmd_03_debug_check_with_return.py +14 -0
- package/hooks/validators/test_files/management/commands/cmd_04_imported_DEBUG.py +14 -0
- package/hooks/validators/test_files/management/commands/cmd_05_debug_check_in_helper.py +16 -0
- package/hooks/validators/test_files/management/commands/cmd_06_debug_check_late.py +22 -0
- package/hooks/validators/test_files/management/commands/cmd_07_positive_debug_check.py +15 -0
- package/hooks/validators/test_files/management/commands/cmd_08_debug_with_and.py +14 -0
- package/hooks/validators/test_files/not_management_command.py +10 -0
- package/hooks/validators/test_files/skip_decorators/test_01_simple_skip.py +8 -0
- package/hooks/validators/test_files/skip_decorators/test_02_pytest_skipif.py +8 -0
- package/hooks/validators/test_files/skip_decorators/test_03_unittest_skipIf.py +8 -0
- package/hooks/validators/test_files/skip_decorators/test_04_skip_with_parens.py +8 -0
- package/hooks/validators/test_files/skip_decorators/test_05_xfail.py +7 -0
- package/hooks/validators/test_files/skip_decorators/test_06_custom_skip.py +11 -0
- package/hooks/validators/test_files/skip_decorators/test_07_capital_Skip.py +8 -0
- package/hooks/validators/test_files/skip_decorators/test_08_skipUnless.py +7 -0
- package/hooks/validators/test_files/skip_decorators/test_09_pytest_mark_skip_simple.py +7 -0
- package/hooks/validators/test_files/test_async_functions.py +45 -0
- package/hooks/validators/test_files/test_purecomponent/PureComponentExample.tsx +7 -0
- package/hooks/validators/test_files/test_purecomponent/ReactPureComponentExample.tsx +7 -0
- package/hooks/validators/test_git_checks.py +295 -0
- package/hooks/validators/test_good.tsx +5 -0
- package/hooks/validators/test_health_check.py +57 -0
- package/hooks/validators/test_magic_value_checks.py +63 -0
- package/hooks/validators/test_mypy_integration.py +27 -0
- package/hooks/validators/test_output_formatter.py +150 -0
- package/hooks/validators/test_pr_reference_checks.py +41 -0
- package/hooks/validators/test_python_antipattern_checks.py +113 -0
- package/hooks/validators/test_python_style_checks.py +439 -0
- package/hooks/validators/test_react_checks.py +213 -0
- package/hooks/validators/test_results.txt +25 -0
- package/hooks/validators/test_ruff_integration.py +27 -0
- package/hooks/validators/test_run_all_validators.py +228 -0
- package/hooks/validators/test_run_all_validators_integration.py +48 -0
- package/hooks/validators/test_safety_checks.py +243 -0
- package/hooks/validators/test_security_checks.py +105 -0
- package/hooks/validators/test_test_safety_checks.py +321 -0
- package/hooks/validators/test_todo_checks.py +39 -0
- package/hooks/validators/test_type_safety_checks.py +85 -0
- package/hooks/validators/test_useless_test_checks.py +55 -0
- package/hooks/validators/test_validator_base.py +26 -0
- package/hooks/validators/test_verify_paths.py +34 -0
- package/hooks/validators/todo_checks.py +59 -0
- package/hooks/validators/type_safety_checks.py +101 -0
- package/hooks/validators/useless_test_checks.py +92 -0
- package/hooks/validators/validator_base.py +19 -0
- package/hooks/validators/verify_paths.py +57 -0
- package/hooks/workflow/auto-formatter.py +114 -0
- package/hooks/workflow/investigation-tracker-reset.py +46 -0
- package/package.json +30 -0
- package/rules/agent-spawn-protocol.md +47 -0
- package/rules/cleanup-temp-files.md +27 -0
- package/rules/code-reviews.md +11 -0
- package/rules/code-standards.md +43 -0
- package/rules/conservative-action.md +20 -0
- package/rules/context7.md +12 -0
- package/rules/explore-thoroughly.md +27 -0
- package/rules/git-workflow.md +42 -0
- package/rules/parallel-tools.md +23 -0
- package/rules/research-mode.md +23 -0
- package/rules/right-sized-engineering.md +28 -0
- package/rules/tdd.md +7 -0
- package/rules/testing.md +12 -0
- package/skills/agent-prompt/SKILL.md +102 -0
- package/skills/anthropic-plan/SKILL.md +107 -0
- package/skills/everything-search/SKILL.md +144 -0
- package/skills/ingest/SKILL.md +40 -0
- package/skills/npm-creator/SKILL.md +183 -0
- package/skills/pr-review-responder/EXAMPLES.md +590 -0
- package/skills/pr-review-responder/PRINCIPLES.md +539 -0
- package/skills/pr-review-responder/README.md +209 -0
- package/skills/pr-review-responder/SKILL.md +202 -0
- package/skills/pr-review-responder/TESTING.md +407 -0
- package/skills/pr-review-responder/scripts/respond_to_reviews.py +376 -0
- package/skills/pr-review-responder/update_skill.py +297 -0
- package/skills/prompt-generator/REFERENCE.md +150 -0
- package/skills/prompt-generator/SKILL.md +154 -0
- package/skills/readability-review/SKILL.md +127 -0
- package/skills/recall/SKILL.md +27 -0
- package/skills/remember/SKILL.md +63 -0
- package/skills/rule-audit/SKILL.md +307 -0
- package/skills/rule-creator/SKILL.md +150 -0
- package/skills/skill-writer/REFERENCE.md +246 -0
- package/skills/skill-writer/SKILL.md +270 -0
- package/skills/tdd-team/SKILL.md +128 -0
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-writer
|
|
3
|
+
description: Guide users through creating Agent Skills for Codex. Use when the user wants to create, write, author, or design a new Skill, or needs help with SKILL.md files, frontmatter, or skill structure.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Writing Skills
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Create well-structured Agent Skills for Codex that follow superpowers patterns and validation requirements.
|
|
11
|
+
|
|
12
|
+
**Core principle:** Skills encode expertise. A good skill prevents the same mistake from happening twice.
|
|
13
|
+
|
|
14
|
+
**Announce at start:** "I'm using the skill-writer skill to create a new skill."
|
|
15
|
+
|
|
16
|
+
**Context:** Skills complement agents. Skills are invoked inline; agents run as subprocesses. Use skills for workflows that need conversation context.
|
|
17
|
+
|
|
18
|
+
## The Process
|
|
19
|
+
|
|
20
|
+
### Step 1: Understand the Need
|
|
21
|
+
|
|
22
|
+
Ask clarifying questions (one at a time):
|
|
23
|
+
|
|
24
|
+
1. What specific capability should this Skill provide?
|
|
25
|
+
2. When should Codex use this Skill?
|
|
26
|
+
3. Is this critical (must follow exactly) or advisory (adapt to context)?
|
|
27
|
+
4. Does this fit in an existing workflow pipeline?
|
|
28
|
+
|
|
29
|
+
**Keep it focused:** One Skill = one capability
|
|
30
|
+
- Good: "PDF form filling", "plan review", "TDD enforcement"
|
|
31
|
+
- Too broad: "Document processing", "code quality"
|
|
32
|
+
|
|
33
|
+
### Step 2: Choose Format
|
|
34
|
+
|
|
35
|
+
**CRITICAL DECISION:** Advisory vs Superpowers format.
|
|
36
|
+
|
|
37
|
+
| Format | When to Use | Key Signals |
|
|
38
|
+
|--------|-------------|-------------|
|
|
39
|
+
| **Superpowers** | Rules that MUST be followed | Production failures if violated, anti-patterns to block, non-negotiable workflows |
|
|
40
|
+
| **Advisory** | Helpful guidance | Best practices, tips, adaptable to context |
|
|
41
|
+
|
|
42
|
+
**If in doubt:** If you're tempted to say "should" instead of "MUST", it's advisory.
|
|
43
|
+
|
|
44
|
+
### Step 3: Choose Location
|
|
45
|
+
|
|
46
|
+
**Personal Skills** (`~/.Codex/skills/`):
|
|
47
|
+
- Individual workflows
|
|
48
|
+
- Experimental skills
|
|
49
|
+
|
|
50
|
+
**Project Skills** (`.Codex/skills/`):
|
|
51
|
+
- Team conventions
|
|
52
|
+
- Project-specific expertise
|
|
53
|
+
- Committed to git
|
|
54
|
+
|
|
55
|
+
### Step 4: Write Frontmatter
|
|
56
|
+
|
|
57
|
+
```yaml
|
|
58
|
+
---
|
|
59
|
+
name: skill-name
|
|
60
|
+
description: [What it does] + [When to use it] + [Trigger phrases]
|
|
61
|
+
---
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Name rules:**
|
|
65
|
+
- Lowercase, hyphens only, max 64 chars
|
|
66
|
+
- Must match directory name
|
|
67
|
+
|
|
68
|
+
**Description formula:** `[What] + [When] + [Triggers]`
|
|
69
|
+
|
|
70
|
+
```yaml
|
|
71
|
+
# Good
|
|
72
|
+
description: Review implementation plans against AGENTS.md standards. Use after writing-plans and before executing-plans to validate TDD compliance and right-sized engineering.
|
|
73
|
+
|
|
74
|
+
# Bad
|
|
75
|
+
description: Helps with plans
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Step 5: Write Content
|
|
79
|
+
|
|
80
|
+
#### Superpowers Format Structure
|
|
81
|
+
|
|
82
|
+
```markdown
|
|
83
|
+
# Skill Name
|
|
84
|
+
|
|
85
|
+
## Overview
|
|
86
|
+
|
|
87
|
+
Brief description.
|
|
88
|
+
|
|
89
|
+
**Core principle:** [One sentence that captures the essential insight]
|
|
90
|
+
|
|
91
|
+
**Announce at start:** "I'm using the [skill] skill to [purpose]."
|
|
92
|
+
|
|
93
|
+
**Context:** [Where this fits in the workflow pipeline]
|
|
94
|
+
|
|
95
|
+
## The Process
|
|
96
|
+
|
|
97
|
+
### Step 1: [First Action]
|
|
98
|
+
[Narrative instructions, not verbose checklists]
|
|
99
|
+
|
|
100
|
+
### Step 2: [Second Action]
|
|
101
|
+
[Continue with clear steps]
|
|
102
|
+
|
|
103
|
+
## Output Format
|
|
104
|
+
|
|
105
|
+
[What the skill produces - be specific]
|
|
106
|
+
|
|
107
|
+
## After Completion
|
|
108
|
+
|
|
109
|
+
[What happens next - reference sub-skills if applicable]
|
|
110
|
+
|
|
111
|
+
**If [condition]:**
|
|
112
|
+
- [Action]
|
|
113
|
+
- **REQUIRED SUB-SKILL:** Use [skill-name]
|
|
114
|
+
|
|
115
|
+
## Red Flags - STOP
|
|
116
|
+
|
|
117
|
+
[List signals that mean something is wrong]
|
|
118
|
+
|
|
119
|
+
- [Red flag 1]
|
|
120
|
+
- [Red flag 2]
|
|
121
|
+
|
|
122
|
+
## Rationalization Prevention
|
|
123
|
+
|
|
124
|
+
| Excuse | Reality |
|
|
125
|
+
|--------|---------|
|
|
126
|
+
| "[Common shortcut]" | [Why it fails] |
|
|
127
|
+
| "[Another excuse]" | [Why it fails] |
|
|
128
|
+
|
|
129
|
+
## Remember
|
|
130
|
+
|
|
131
|
+
- [Key point 1]
|
|
132
|
+
- [Key point 2]
|
|
133
|
+
- [Key point 3]
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
#### Advisory Format Structure
|
|
137
|
+
|
|
138
|
+
```markdown
|
|
139
|
+
# Skill Name
|
|
140
|
+
|
|
141
|
+
## Overview
|
|
142
|
+
|
|
143
|
+
Brief description of what this Skill does.
|
|
144
|
+
|
|
145
|
+
**Announce at start:** "I'm using the [skill] skill."
|
|
146
|
+
|
|
147
|
+
## Instructions
|
|
148
|
+
|
|
149
|
+
Step-by-step guidance:
|
|
150
|
+
1. First step
|
|
151
|
+
2. Second step
|
|
152
|
+
3. Handle edge cases
|
|
153
|
+
|
|
154
|
+
## Examples
|
|
155
|
+
|
|
156
|
+
Concrete usage examples.
|
|
157
|
+
|
|
158
|
+
## Best practices
|
|
159
|
+
|
|
160
|
+
- Key conventions
|
|
161
|
+
- Common pitfalls
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
#### Ironclad Format (Critical Rules)
|
|
165
|
+
|
|
166
|
+
For skills where violations cause production failures:
|
|
167
|
+
|
|
168
|
+
```markdown
|
|
169
|
+
<EXTREMELY_IMPORTANT>
|
|
170
|
+
# Skill Name
|
|
171
|
+
|
|
172
|
+
**This skill is MANDATORY for [context].**
|
|
173
|
+
|
|
174
|
+
IF you are [doing task], YOU DO NOT HAVE A CHOICE. YOU MUST FOLLOW THIS SKILL.
|
|
175
|
+
|
|
176
|
+
## MANDATORY FIRST RESPONSE PROTOCOL
|
|
177
|
+
|
|
178
|
+
Before doing ANYTHING:
|
|
179
|
+
|
|
180
|
+
1. [ ] [First verification]
|
|
181
|
+
2. [ ] [Second verification]
|
|
182
|
+
3. [ ] [Third verification]
|
|
183
|
+
|
|
184
|
+
**Responding WITHOUT completing this checklist = automatic failure.**
|
|
185
|
+
|
|
186
|
+
## Critical Rules - NO EXCEPTIONS
|
|
187
|
+
|
|
188
|
+
### Rule 1: [Rule Name]
|
|
189
|
+
|
|
190
|
+
**NEVER [forbidden action].**
|
|
191
|
+
|
|
192
|
+
- [ ] FORBIDDEN: [specific example]
|
|
193
|
+
- [x] REQUIRED: [correct approach]
|
|
194
|
+
|
|
195
|
+
**WHY:** [Production consequence]
|
|
196
|
+
|
|
197
|
+
## Common Rationalizations That Mean You're About To Fail
|
|
198
|
+
|
|
199
|
+
- **"[Excuse 1]"** -> WRONG. [Reality]
|
|
200
|
+
- **"[Excuse 2]"** -> WRONG. [Reality]
|
|
201
|
+
|
|
202
|
+
</EXTREMELY_IMPORTANT>
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Implementation Guide
|
|
207
|
+
|
|
208
|
+
[Supporting material outside the critical wrapper]
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Step 6: Validate
|
|
212
|
+
|
|
213
|
+
**Structure:**
|
|
214
|
+
- [ ] SKILL.md in correct location
|
|
215
|
+
- [ ] Directory name matches `name` field
|
|
216
|
+
- [ ] Valid YAML frontmatter
|
|
217
|
+
|
|
218
|
+
**Content (Superpowers format):**
|
|
219
|
+
- [ ] Has Overview with Core principle
|
|
220
|
+
- [ ] Has "Announce at start"
|
|
221
|
+
- [ ] Has Context (pipeline placement)
|
|
222
|
+
- [ ] Steps are narrative, not verbose checklists
|
|
223
|
+
- [ ] Has Red Flags section
|
|
224
|
+
- [ ] Has Rationalization Prevention table
|
|
225
|
+
- [ ] Has Remember section
|
|
226
|
+
- [ ] References sub-skills where appropriate
|
|
227
|
+
|
|
228
|
+
**Content (Ironclad format):**
|
|
229
|
+
- [ ] `<EXTREMELY_IMPORTANT>` wrapper
|
|
230
|
+
- [ ] Absolute language ("MUST", "NEVER", "NO EXCEPTIONS")
|
|
231
|
+
- [ ] Checkbox protocol
|
|
232
|
+
- [ ] WHY explanations with consequences
|
|
233
|
+
- [ ] Rationalizations are specific, not generic
|
|
234
|
+
|
|
235
|
+
### Step 7: Test
|
|
236
|
+
|
|
237
|
+
1. Restart Codex to load the skill
|
|
238
|
+
2. Ask questions that should trigger it
|
|
239
|
+
3. Verify activation and behavior
|
|
240
|
+
|
|
241
|
+
## Red Flags - STOP
|
|
242
|
+
|
|
243
|
+
- Skill is too broad ("handles documents")
|
|
244
|
+
- No clear trigger phrases in description
|
|
245
|
+
- Steps say "consider" or "might" in Ironclad format
|
|
246
|
+
- No workflow context (where does this fit?)
|
|
247
|
+
- Rationalizations are generic ("I'll do it later")
|
|
248
|
+
- Missing WHY explanations for rules
|
|
249
|
+
|
|
250
|
+
## Rationalization Prevention
|
|
251
|
+
|
|
252
|
+
| Excuse | Reality |
|
|
253
|
+
|--------|---------|
|
|
254
|
+
| "This skill is simple, doesn't need structure" | Simple skills become complex. Structure prevents drift. |
|
|
255
|
+
| "I'll add the rationalization section later" | Later never comes. Add it now. |
|
|
256
|
+
| "Nobody will try to shortcut this" | Developers always shortcut. Block it proactively. |
|
|
257
|
+
| "The description is good enough" | Vague descriptions mean skill never activates. |
|
|
258
|
+
| "Advisory format is fine for critical rules" | Critical rules need Ironclad format or they get ignored. |
|
|
259
|
+
|
|
260
|
+
## Remember
|
|
261
|
+
|
|
262
|
+
- **Core principle first** - captures the essential insight
|
|
263
|
+
- **Announce at start** - makes skill usage visible
|
|
264
|
+
- **Context placement** - skills fit in pipelines
|
|
265
|
+
- **Red flags** - catch problems early
|
|
266
|
+
- **Rationalizations** - block shortcuts proactively
|
|
267
|
+
- **Sub-skill references** - connect to related workflows
|
|
268
|
+
- One skill = one capability
|
|
269
|
+
- Specific triggers in description
|
|
270
|
+
- Test activation before shipping
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tdd-team
|
|
3
|
+
description: "Spawn an orchestrated TDD agent team (planner, tester, implementer, validator) to build features or fix bugs via Red-Green-Refactor. Use when the user says /tdd-team, 'TDD team', 'agent team for this', 'have a team build this', or describes a non-trivial implementation task they want done with test-driven development and parallel agents. Also triggers on 'agentically', 'orchestrated team', or 'planner implementer tester validator'."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# TDD Team
|
|
7
|
+
|
|
8
|
+
Spawn an orchestrated team of 4 agents that implements a feature or fix using strict Test-Driven Development: Plan -> RED (failing tests) -> GREEN (minimum code to pass) -> Validate.
|
|
9
|
+
|
|
10
|
+
## When to use
|
|
11
|
+
|
|
12
|
+
- Non-trivial features requiring 3+ files changed
|
|
13
|
+
- Bug fixes where the fix needs tests proving the bug exists first
|
|
14
|
+
- Any task where the user says "TDD" and "team" or "agentically"
|
|
15
|
+
|
|
16
|
+
## Arguments
|
|
17
|
+
|
|
18
|
+
The full task description follows the command. Example:
|
|
19
|
+
```
|
|
20
|
+
/tdd-team fix proportional split distribution when item prices exceed order total
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Workflow
|
|
24
|
+
|
|
25
|
+
### Phase 1: Setup
|
|
26
|
+
|
|
27
|
+
1. **Create team** via TeamCreate with a name derived from the task (kebab-case, max 30 chars)
|
|
28
|
+
2. **Create tasks** with dependencies:
|
|
29
|
+
- #1 PLAN — blocked by nothing
|
|
30
|
+
- #2-N RED — blocked by #1
|
|
31
|
+
- #N+1 GREEN — blocked by all RED tasks
|
|
32
|
+
- #LAST VALIDATE — blocked by GREEN task
|
|
33
|
+
3. **Spawn 4 agents** (all at once for parallel startup):
|
|
34
|
+
- `planner` (team-lead) — reads code, designs the approach, defines file ownership so agents work independently, and messages teammates with clear assignments
|
|
35
|
+
- `tester` (team-implementer) — writes failing tests that define the expected behavior before implementation exists, establishing the contract the code must satisfy
|
|
36
|
+
- `implementer` (team-implementer) — writes the minimum production code to satisfy the test contracts, keeping scope tight to keep all behavior tested
|
|
37
|
+
- `validator` (team-reviewer) — runs the full test suite to catch regressions across files, and verifies the feature works end-to-end
|
|
38
|
+
|
|
39
|
+
### Phase 2: Orchestrate
|
|
40
|
+
|
|
41
|
+
As the team lead, your job is to:
|
|
42
|
+
- **Nudge blocked agents** when upstream tasks complete (send messages)
|
|
43
|
+
- **Shutdown idle agents** when all their tasks are done (send shutdown_request)
|
|
44
|
+
- **Report progress** to the user at milestones (plan done, tests written, implementation done, validation complete)
|
|
45
|
+
- **Fix coordination issues** (e.g., tester waiting for planner who already finished)
|
|
46
|
+
|
|
47
|
+
### Phase 3: Cleanup
|
|
48
|
+
|
|
49
|
+
After validator reports success:
|
|
50
|
+
1. Shutdown all remaining agents
|
|
51
|
+
2. Clean up any temporary files, scripts, or helper files created during iteration
|
|
52
|
+
3. Delete the team via TeamDelete
|
|
53
|
+
4. Run `python -m pytest tests/ -q` to confirm final count
|
|
54
|
+
5. Commit with descriptive message
|
|
55
|
+
6. Report summary to user
|
|
56
|
+
|
|
57
|
+
## Agent Prompts
|
|
58
|
+
|
|
59
|
+
Each agent receives a structured prompt containing:
|
|
60
|
+
|
|
61
|
+
### Common context (all agents get this)
|
|
62
|
+
- The task description from the user
|
|
63
|
+
- Working directory path
|
|
64
|
+
- Code rules reminder: no magic values, no abbreviations, complete type hints, no new inline comments, imports at top, constants in config/
|
|
65
|
+
- Collaboration guidance: flag ambiguity or uncertainty to teammates and use [PLACEHOLDER] for values you have not verified. Your role contributes to a specific phase of the TDD cycle — the separation between phases is what makes TDD effective.
|
|
66
|
+
- Anti-test-fixation: write general solutions that work for all valid inputs, not just the specific test cases. Tests verify correctness -- they do not define the solution. If a test seems incorrect, flag it rather than working around it.
|
|
67
|
+
- Commit-and-execute: choose an approach and commit to it. Avoid revisiting decisions unless new information directly contradicts your reasoning. Course-correct later if needed.
|
|
68
|
+
|
|
69
|
+
### Planner-specific
|
|
70
|
+
- Read the relevant source files before designing
|
|
71
|
+
- Design the implementation with function signatures and return types
|
|
72
|
+
- Define file ownership boundaries (tester owns test files, implementer owns production files)
|
|
73
|
+
- Create the task breakdown with specific test cases to write
|
|
74
|
+
- Mark task complete and message teammates with assignments
|
|
75
|
+
- If the scope is unclear or requirements are ambiguous, flag this to the orchestrator and propose assumptions for confirmation
|
|
76
|
+
- Commit to an approach and communicate it clearly to teammates -- avoid revisiting architectural decisions unless implementation reveals a fundamental problem
|
|
77
|
+
|
|
78
|
+
### Tester-specific
|
|
79
|
+
- Wait for planner to complete (check TaskList)
|
|
80
|
+
- Write FAILING tests that reproduce the desired behavior
|
|
81
|
+
- Use existing test patterns from the project (read test files first)
|
|
82
|
+
- Mock external calls, use patch.dict for env vars
|
|
83
|
+
- Tests must FAIL before implementation — that's the point
|
|
84
|
+
- Mark each task complete, check TaskList for next work
|
|
85
|
+
- If a test case from the plan is ambiguous about expected behavior, ask the planner for clarification — a clear test is the most valuable deliverable
|
|
86
|
+
|
|
87
|
+
### Implementer-specific
|
|
88
|
+
- Wait for tester to complete (check TaskList)
|
|
89
|
+
- Read the failing tests to understand expected behavior
|
|
90
|
+
- Write MINIMUM code to make tests pass — no extras
|
|
91
|
+
- Run the specific test file to verify green
|
|
92
|
+
- Mark task complete, check TaskList for next work
|
|
93
|
+
- Write general solutions that work for all valid inputs -- never hard-code values or create implementations that only satisfy specific test assertions
|
|
94
|
+
- If a failing test seems to test the wrong behavior or has a bug in the test itself, flag it to the validator for review
|
|
95
|
+
|
|
96
|
+
### Validator-specific
|
|
97
|
+
- Wait for implementer to complete (check TaskList)
|
|
98
|
+
- Run full test suite (`python -m pytest tests/ -q`)
|
|
99
|
+
- Fix test regressions from the new code (e.g., unmocked new functions in existing tests)
|
|
100
|
+
- Verify new functions exist and are wired correctly
|
|
101
|
+
- Verify the implementation fully captures the planner's design (all planned functions exist, signatures match, edge cases covered)
|
|
102
|
+
- Verify the implementation follows project code rules (centralized config, complete type hints, full-word naming, self-documenting code)
|
|
103
|
+
- Report: test count, pass/fail, regressions found and fixed, plan coverage assessment, code rules compliance
|
|
104
|
+
- If regressions trace to a design issue, report the root cause to the orchestrator for a targeted follow-up task
|
|
105
|
+
|
|
106
|
+
## Task Sizing
|
|
107
|
+
|
|
108
|
+
The planner decides how many RED tasks to create based on the scope:
|
|
109
|
+
- **Small fix** (1 function): 1 RED task, 1 GREEN task
|
|
110
|
+
- **Medium feature** (2-3 functions): 2-3 RED tasks (can be parallel), 1-2 GREEN tasks
|
|
111
|
+
- **Large feature** (4+ functions across files): 3-5 RED tasks, 2-3 GREEN tasks with dependencies
|
|
112
|
+
|
|
113
|
+
## Error Recovery
|
|
114
|
+
|
|
115
|
+
- If tester writes tests that import non-existent constants, that's expected (RED phase)
|
|
116
|
+
- If implementer's code breaks existing tests, validator fixes the regressions
|
|
117
|
+
- If validator finds issues, create a new fix task and assign to implementer
|
|
118
|
+
- If an agent goes idle repeatedly without progress, send a message with specific instructions
|
|
119
|
+
- When encountering obstacles, use standard tools and approaches -- do not create helper scripts or workarounds to bypass problems; flag the issue for resolution
|
|
120
|
+
|
|
121
|
+
## Ownership Boundaries
|
|
122
|
+
|
|
123
|
+
Each agent owns its phase — this separation ensures the TDD cycle produces reliable results:
|
|
124
|
+
|
|
125
|
+
- The tester writes tests; the implementer writes production code. This separation ensures tests define behavior independently of implementation.
|
|
126
|
+
- Failing tests exist before any production code. This is the core of TDD — the test proves the requirement, then the code satisfies it.
|
|
127
|
+
- The validator runs after implementation. It catches regressions across files that are invisible to agents working on individual files.
|
|
128
|
+
- Shut down agents after their tasks complete. Idle agents consume context; active agents produce value.
|