codingbuddy-rules 4.5.0 → 5.1.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 (129) hide show
  1. package/.ai-rules/adapters/aider.md +374 -0
  2. package/.ai-rules/adapters/antigravity.md +6 -6
  3. package/.ai-rules/adapters/claude-code.md +68 -4
  4. package/.ai-rules/adapters/codex.md +5 -5
  5. package/.ai-rules/adapters/cursor.md +2 -2
  6. package/.ai-rules/adapters/kiro.md +8 -8
  7. package/.ai-rules/adapters/opencode.md +7 -7
  8. package/.ai-rules/adapters/q.md +2 -2
  9. package/.ai-rules/adapters/windsurf.md +395 -0
  10. package/.ai-rules/agents/README.md +66 -16
  11. package/.ai-rules/agents/accessibility-specialist.json +8 -1
  12. package/.ai-rules/agents/act-mode.json +8 -1
  13. package/.ai-rules/agents/agent-architect.json +14 -7
  14. package/.ai-rules/agents/ai-ml-engineer.json +7 -0
  15. package/.ai-rules/agents/architecture-specialist.json +7 -0
  16. package/.ai-rules/agents/auto-mode.json +10 -2
  17. package/.ai-rules/agents/backend-developer.json +7 -0
  18. package/.ai-rules/agents/code-quality-specialist.json +7 -0
  19. package/.ai-rules/agents/code-reviewer.json +86 -64
  20. package/.ai-rules/agents/data-engineer.json +14 -7
  21. package/.ai-rules/agents/data-scientist.json +16 -9
  22. package/.ai-rules/agents/devops-engineer.json +7 -0
  23. package/.ai-rules/agents/documentation-specialist.json +7 -0
  24. package/.ai-rules/agents/eval-mode.json +30 -19
  25. package/.ai-rules/agents/event-architecture-specialist.json +7 -0
  26. package/.ai-rules/agents/frontend-developer.json +7 -0
  27. package/.ai-rules/agents/i18n-specialist.json +8 -1
  28. package/.ai-rules/agents/integration-specialist.json +7 -0
  29. package/.ai-rules/agents/migration-specialist.json +7 -0
  30. package/.ai-rules/agents/mobile-developer.json +8 -10
  31. package/.ai-rules/agents/observability-specialist.json +7 -0
  32. package/.ai-rules/agents/parallel-orchestrator.json +352 -0
  33. package/.ai-rules/agents/performance-specialist.json +7 -0
  34. package/.ai-rules/agents/plan-mode.json +9 -1
  35. package/.ai-rules/agents/plan-reviewer.json +211 -0
  36. package/.ai-rules/agents/platform-engineer.json +7 -0
  37. package/.ai-rules/agents/security-engineer.json +15 -8
  38. package/.ai-rules/agents/security-specialist.json +8 -1
  39. package/.ai-rules/agents/seo-specialist.json +7 -0
  40. package/.ai-rules/agents/software-engineer.json +7 -0
  41. package/.ai-rules/agents/solution-architect.json +17 -10
  42. package/.ai-rules/agents/systems-developer.json +15 -8
  43. package/.ai-rules/agents/technical-planner.json +17 -10
  44. package/.ai-rules/agents/test-engineer.json +13 -6
  45. package/.ai-rules/agents/test-strategy-specialist.json +7 -0
  46. package/.ai-rules/agents/tooling-engineer.json +10 -3
  47. package/.ai-rules/agents/ui-ux-designer.json +7 -0
  48. package/.ai-rules/keyword-modes.json +4 -4
  49. package/.ai-rules/rules/clarification-guide.md +14 -14
  50. package/.ai-rules/rules/core.md +73 -0
  51. package/.ai-rules/rules/parallel-execution.md +217 -0
  52. package/.ai-rules/schemas/agent.schema.json +38 -0
  53. package/.ai-rules/skills/README.md +29 -1
  54. package/.ai-rules/skills/agent-design/SKILL.md +5 -0
  55. package/.ai-rules/skills/agent-design/examples/agent-template.json +55 -0
  56. package/.ai-rules/skills/agent-design/references/expertise-guidelines.md +112 -0
  57. package/.ai-rules/skills/agent-discussion/SKILL.md +199 -0
  58. package/.ai-rules/skills/agent-discussion-panel/SKILL.md +448 -0
  59. package/.ai-rules/skills/api-design/SKILL.md +5 -0
  60. package/.ai-rules/skills/api-design/examples/error-response.json +159 -0
  61. package/.ai-rules/skills/api-design/examples/openapi-template.yaml +393 -0
  62. package/.ai-rules/skills/build-fix/SKILL.md +234 -0
  63. package/.ai-rules/skills/code-explanation/SKILL.md +4 -0
  64. package/.ai-rules/skills/context-management/SKILL.md +1 -0
  65. package/.ai-rules/skills/cost-budget/SKILL.md +348 -0
  66. package/.ai-rules/skills/cross-repo-issues/SKILL.md +257 -0
  67. package/.ai-rules/skills/database-migration/SKILL.md +1 -0
  68. package/.ai-rules/skills/deepsearch/SKILL.md +214 -0
  69. package/.ai-rules/skills/deployment-checklist/SKILL.md +1 -0
  70. package/.ai-rules/skills/error-analysis/SKILL.md +1 -0
  71. package/.ai-rules/skills/finishing-a-development-branch/SKILL.md +281 -0
  72. package/.ai-rules/skills/frontend-design/SKILL.md +5 -0
  73. package/.ai-rules/skills/frontend-design/examples/component-template.tsx +203 -0
  74. package/.ai-rules/skills/frontend-design/references/css-patterns.md +243 -0
  75. package/.ai-rules/skills/git-master/SKILL.md +358 -0
  76. package/.ai-rules/skills/incident-response/SKILL.md +1 -0
  77. package/.ai-rules/skills/legacy-modernization/SKILL.md +1 -0
  78. package/.ai-rules/skills/mcp-builder/SKILL.md +7 -0
  79. package/.ai-rules/skills/mcp-builder/examples/resource-example.ts +233 -0
  80. package/.ai-rules/skills/mcp-builder/examples/tool-example.ts +198 -0
  81. package/.ai-rules/skills/mcp-builder/references/protocol-spec.md +215 -0
  82. package/.ai-rules/skills/onboard/SKILL.md +150 -0
  83. package/.ai-rules/skills/performance-optimization/SKILL.md +3 -0
  84. package/.ai-rules/skills/plan-and-review/SKILL.md +115 -0
  85. package/.ai-rules/skills/plan-to-issues/SKILL.md +318 -0
  86. package/.ai-rules/skills/pr-all-in-one/SKILL.md +15 -13
  87. package/.ai-rules/skills/pr-all-in-one/configuration-guide.md +7 -7
  88. package/.ai-rules/skills/pr-all-in-one/pr-templates.md +10 -10
  89. package/.ai-rules/skills/pr-review/SKILL.md +4 -0
  90. package/.ai-rules/skills/receiving-code-review/SKILL.md +347 -0
  91. package/.ai-rules/skills/refactoring/SKILL.md +1 -0
  92. package/.ai-rules/skills/requesting-code-review/SKILL.md +348 -0
  93. package/.ai-rules/skills/retrospective/SKILL.md +192 -0
  94. package/.ai-rules/skills/rule-authoring/SKILL.md +5 -0
  95. package/.ai-rules/skills/rule-authoring/examples/rule-template.md +142 -0
  96. package/.ai-rules/skills/rule-authoring/examples/trigger-patterns.md +126 -0
  97. package/.ai-rules/skills/security-audit/SKILL.md +4 -0
  98. package/.ai-rules/skills/ship/SKILL.md +242 -0
  99. package/.ai-rules/skills/skill-creator/SKILL.md +461 -0
  100. package/.ai-rules/skills/skill-creator/agents/analyzer.md +206 -0
  101. package/.ai-rules/skills/skill-creator/agents/comparator.md +167 -0
  102. package/.ai-rules/skills/skill-creator/agents/grader.md +152 -0
  103. package/.ai-rules/skills/skill-creator/assets/eval_review.html +568 -0
  104. package/.ai-rules/skills/skill-creator/assets/skill-template.md +43 -0
  105. package/.ai-rules/skills/skill-creator/eval-viewer/generate_review.py +496 -0
  106. package/.ai-rules/skills/skill-creator/references/frontmatter-guide.md +632 -0
  107. package/.ai-rules/skills/skill-creator/references/multi-tool-compat.md +480 -0
  108. package/.ai-rules/skills/skill-creator/references/schemas.md +784 -0
  109. package/.ai-rules/skills/skill-creator/scripts/aggregate_benchmark.py +302 -0
  110. package/.ai-rules/skills/skill-creator/scripts/init_skill.sh +196 -0
  111. package/.ai-rules/skills/skill-creator/scripts/run_loop.py +327 -0
  112. package/.ai-rules/skills/systematic-debugging/SKILL.md +1 -0
  113. package/.ai-rules/skills/tech-debt/SKILL.md +1 -0
  114. package/.ai-rules/skills/test-coverage-gate/SKILL.md +303 -0
  115. package/.ai-rules/skills/tmux-master/SKILL.md +491 -0
  116. package/.ai-rules/skills/using-git-worktrees/SKILL.md +368 -0
  117. package/.ai-rules/skills/verification-before-completion/SKILL.md +234 -0
  118. package/.ai-rules/skills/widget-slot-architecture/SKILL.md +6 -0
  119. package/.ai-rules/skills/widget-slot-architecture/examples/parallel-route-setup.tsx +206 -0
  120. package/.ai-rules/skills/widget-slot-architecture/examples/widget-component.tsx +250 -0
  121. package/.ai-rules/skills/writing-plans/SKILL.md +78 -0
  122. package/bin/cli.js +170 -0
  123. package/lib/init/detect-stack.js +162 -0
  124. package/lib/init/generate-config.js +31 -0
  125. package/lib/init/index.js +86 -0
  126. package/lib/init/prompt.js +60 -0
  127. package/lib/init/scaffold.js +67 -0
  128. package/lib/init/suggest-agent.js +57 -0
  129. package/package.json +10 -2
@@ -98,32 +98,32 @@ Use these categories as reference when generating questions. Adapt to specific c
98
98
  ```markdown
99
99
  ## Clarification Phase
100
100
 
101
- ### 질문 1/3
101
+ ### Question 1/3
102
102
 
103
- **[카테고리]에 대한 확인이 필요합니다:**
103
+ **Clarification needed for [Category]:**
104
104
 
105
- [컨텍스트에 맞게 조정된 질문]
105
+ [Question adapted to context]
106
106
 
107
- - **A)** [선택지 1]
108
- - **B)** [선택지 2]
109
- - **C)** [선택지 3]
107
+ - **A)** [Option 1]
108
+ - **B)** [Option 2]
109
+ - **C)** [Option 3]
110
110
 
111
- > 답변을 선택해주세요 (A/B/C) 또는 다른 의견이 있으시면 말씀해주세요.
111
+ > Please select your answer (A/B/C) or share your own input.
112
112
  ```
113
113
 
114
114
  ### After All Questions
115
115
 
116
116
  ```markdown
117
- ## 수집된 정보 요약
117
+ ## Collected Information Summary
118
118
 
119
- | 항목 | 결정 사항 |
119
+ | Item | Decision |
120
120
  |------|----------|
121
- | 범위 | [사용자 선택] |
122
- | 우선순위 | [사용자 선택] |
123
- | 제약조건 | [사용자 선택] |
121
+ | Scope | [User's selection] |
122
+ | Priority | [User's selection] |
123
+ | Constraints | [User's selection] |
124
124
  | ... | ... |
125
125
 
126
- 내용이 맞나요? 확인해주시면 PLAN 수립을 시작하겠습니다.
126
+ Does this look correct? Once confirmed, we will proceed with creating the PLAN.
127
127
  ```
128
128
 
129
129
  ---
@@ -132,7 +132,7 @@ Use these categories as reference when generating questions. Adapt to specific c
132
132
 
133
133
  | Situation | Response |
134
134
  |-----------|----------|
135
- | User answers "I'm not sure" / "잘 모르겠어요" | Present default recommendation with rationale, ask for confirmation |
135
+ | User answers "I'm not sure" | Present default recommendation with rationale, ask for confirmation |
136
136
  | User wants to skip a question | Note that AI will use best judgment, continue to next question |
137
137
  | User provides unexpected answer | Acknowledge the input, incorporate into understanding, continue |
138
138
  | User asks to skip all questions | Proceed to PLAN creation, note assumptions made |
@@ -46,6 +46,39 @@ PLAN → (user: ACT) → ACT → PLAN → (user: EVAL) → EVAL → Improved PLA
46
46
 
47
47
  ---
48
48
 
49
+ ### Output Language
50
+
51
+ **Rule:** The `language` setting in `codingbuddy.config.json` controls **communication language only** (conversation, explanations, questions). All generated **artifacts** must always be written in **English**, regardless of the `language` setting.
52
+
53
+ | Category | Language | Examples |
54
+ |----------|----------|----------|
55
+ | **Communication** | `codingbuddy.config.json` `language` setting | Conversation, explanations, status updates, questions |
56
+ | **Artifacts** | Always English | Code, comments, variable names, documentation, commit messages, PR titles/descriptions, branch names, TODO items, error messages in code, log messages, JSDoc/TSDoc, type names |
57
+
58
+ **Why:**
59
+ - Code and documentation in English ensures global readability and collaboration
60
+ - Mixed-language codebases create maintenance burden and hinder onboarding
61
+ - Commit history and PR descriptions must be searchable in a common language
62
+
63
+ **Examples:**
64
+
65
+ ```
66
+ # Communication (follows language setting, e.g., "ko")
67
+ "This function handles user authentication. Let's move on to the next step."
68
+
69
+ # Artifacts (always English)
70
+ /** Validates user authentication token and returns session data. */
71
+ function validateAuthToken(token: string): SessionData { ... }
72
+
73
+ # Commit message (always English)
74
+ feat(auth): add token validation with session management
75
+
76
+ # Code comments (always English)
77
+ // Check token expiration before proceeding
78
+ ```
79
+
80
+ ---
81
+
49
82
  ### Plan Mode
50
83
 
51
84
  **Important:**
@@ -61,6 +94,18 @@ PLAN → (user: ACT) → ACT → PLAN → (user: EVAL) → EVAL → Improved PLA
61
94
  **Purpose:**
62
95
  Create actionable implementation plans following TDD and augmented coding principles
63
96
 
97
+ ### API Assumption Verification (PLAN mode)
98
+
99
+ When a plan references external API fields, schemas, or behaviors:
100
+ 1. **Cite source**: Include the official documentation URL for every API assumption
101
+ 2. **Mark unverified**: Tag any assumption without a verified source as `[UNVERIFIED]`
102
+ 3. **Verify before ACT**: All `[UNVERIFIED]` items must be verified (via WebFetch/WebSearch) before transitioning to ACT mode
103
+ 4. **No fabricated schemas**: Never assume API input/output fields exist without documentation proof
104
+
105
+ Example:
106
+ - ✅ "Hook stdin includes `tool_name` field ([source](https://code.claude.com/docs/en/hooks))"
107
+ - ❌ "Hook stdin includes `session_cost` field" (no source → will cause implementation failure)
108
+
64
109
  ---
65
110
 
66
111
  ### Structured Reasoning Process (SRP)
@@ -577,6 +622,33 @@ To preserve this implementation session for future reference:
577
622
  - In monorepo subdirectories, use git -C "$REPO_ROOT" flag for git commands
578
623
  - After using cd, ensure relative paths are not double-applied in subsequent commands
579
624
 
625
+ ### Working Directory Safety
626
+
627
+ After any operation that changes directory (cd, clone, worktree operations):
628
+
629
+ - Verify current working directory is the project root before running project-scoped commands
630
+ - Use absolute paths for critical operations (version control, CI tools, package managers)
631
+ - If working directory drifted, return immediately: `cd /path/to/project`
632
+ - Never assume the working directory is correct after directory-changing operations
633
+
634
+ ### Skill Invocation Safety
635
+
636
+ Before invoking any skill via a tool:
637
+
638
+ - Check the skill file frontmatter for `disable-model-invocation: true`
639
+ - Skills with this flag cannot be invoked via tool-based invocation
640
+ - Instead, read the skill content and execute the workflow steps directly
641
+ - This applies to all AI assistants, not just specific tool implementations
642
+
643
+ ### Issue Deduplication
644
+
645
+ Before creating any issue in the project tracker:
646
+
647
+ - Search for existing similar issues using relevant keywords (e.g., `gh issue list --search "<keywords>"`)
648
+ - If a duplicate or closely related issue is found, update it instead of creating a new one
649
+ - Track all issues created in the current session to prevent same-session duplicates
650
+ - Include cross-references when creating related but distinct issues
651
+
580
652
  ---
581
653
 
582
654
  ### Eval Mode
@@ -883,6 +955,7 @@ To preserve this evaluation session for future reference:
883
955
  - User initiates with `AUTO` keyword and the system handles the entire workflow
884
956
  - Continues iterating until quality targets are achieved or maximum iterations reached
885
957
  - Best for tasks where iterative refinement is expected
958
+ - For parallel task execution within AUTO mode, see [parallel-execution.md](parallel-execution.md)
886
959
 
887
960
  **Trigger:**
888
961
  - Type `AUTO` to start autonomous execution
@@ -0,0 +1,217 @@
1
+ # Parallel Execution Guidelines
2
+
3
+ Rules for running multiple tasks concurrently using sub-agents, workers, or parallel processes. These rules are tool-agnostic and apply to any AI assistant orchestrating parallel work.
4
+
5
+ ---
6
+
7
+ ## The Iron Rule
8
+
9
+ ```
10
+ ISSUES MODIFYING THE SAME FILES MUST NOT RUN IN THE SAME PARALLEL WAVE
11
+ ```
12
+
13
+ No exceptions. If two tasks touch the same file, they run sequentially in different waves. Violating this rule causes merge conflicts, lost work, and corrupted state.
14
+
15
+ **Why:** Parallel workers operate on isolated copies (e.g., git worktrees, branches). When two workers modify the same file simultaneously, their changes conflict on merge. One worker's changes will be lost or require manual resolution.
16
+
17
+ ---
18
+
19
+ ## Wave Planning
20
+
21
+ Parallel tasks are organized into **waves** — groups of tasks that execute concurrently. Tasks within a wave must be independent; tasks across waves may depend on each other.
22
+
23
+ ### Step 1: File Overlap Matrix
24
+
25
+ Before assigning tasks to waves, build a file overlap matrix. This is **mandatory**, not optional.
26
+
27
+ **Process:**
28
+
29
+ 1. For each task, list all files that will be created or modified
30
+ 2. Compare every pair of tasks for file overlap
31
+ 3. Any overlap means those tasks **cannot** be in the same wave
32
+
33
+ **Example Matrix:**
34
+
35
+ ```
36
+ Task A Task B Task C Task D
37
+ Task A - overlap - -
38
+ Task B overlap - - overlap
39
+ Task C - - - -
40
+ Task D - overlap - -
41
+ ```
42
+
43
+ **Result:** A and B cannot be in the same wave. B and D cannot be in the same wave. C is independent and can go in any wave.
44
+
45
+ ### Step 2: Dependency Analysis
46
+
47
+ Beyond file overlap, check for logical dependencies:
48
+
49
+ - Does Task B require output from Task A? (sequential dependency)
50
+ - Does Task C need a type/interface that Task A creates? (creation dependency)
51
+ - Does Task D modify a function that Task B also calls? (behavioral dependency)
52
+
53
+ Tasks with dependencies must run in later waves than their prerequisites.
54
+
55
+ ### Step 3: Wave Assignment
56
+
57
+ Use a greedy coloring algorithm:
58
+
59
+ ```
60
+ 1. Sort tasks by number of conflicts (most conflicts first)
61
+ 2. For each task:
62
+ a. Find the earliest wave where no conflict exists
63
+ b. Assign the task to that wave
64
+ 3. Result: minimum number of waves
65
+ ```
66
+
67
+ **Example Result:**
68
+
69
+ ```
70
+ Wave 1: Task A, Task C, Task D (no mutual conflicts)
71
+ Wave 2: Task B (conflicts with A and D)
72
+ ```
73
+
74
+ ### Step 4: Wave Ordering
75
+
76
+ Order waves considering:
77
+
78
+ - **Foundation first:** Tasks that create shared types, interfaces, or utilities go in Wave 1
79
+ - **Consumers later:** Tasks that depend on Wave 1 outputs go in Wave 2+
80
+ - **Independent tasks:** Can go in any wave; prefer earlier waves to maximize parallelism
81
+
82
+ ---
83
+
84
+ ## Sub-Agent Parallelization Strategy
85
+
86
+ When dispatching parallel sub-agents (workers), follow these guidelines:
87
+
88
+ ### Worker Isolation
89
+
90
+ Each worker must operate in an isolated environment:
91
+
92
+ - **Separate working copy:** Each worker gets its own git worktree, branch, or directory
93
+ - **No shared mutable state:** Workers must not write to the same files, databases, or caches simultaneously
94
+ - **Independent commits:** Each worker commits to its own branch
95
+
96
+ ### Worker Prompt Design
97
+
98
+ Each worker prompt must include:
99
+
100
+ 1. **Clear scope:** Exactly which files to create or modify
101
+ 2. **Boundary constraints:** Files the worker must NOT touch
102
+ 3. **Context:** Shared types, interfaces, or utilities the worker may read but not modify
103
+ 4. **Success criteria:** How to verify the task is complete
104
+ 5. **Verification command:** A command to run before completing (e.g., tests, lint)
105
+
106
+ ### Merge Strategy
107
+
108
+ After all workers in a wave complete:
109
+
110
+ 1. **Verify each worker's changes:** Run tests and lint on each branch independently
111
+ 2. **Merge sequentially:** Merge each worker's branch into the target branch one at a time
112
+ 3. **Run integration tests:** After all merges, verify the combined changes work together
113
+ 4. **Resolve conflicts immediately:** If a merge conflict occurs, investigate the root cause — it likely indicates a violation of the Iron Rule
114
+
115
+ ---
116
+
117
+ ## Continuous Execution Rule
118
+
119
+ Workers MUST complete all assigned tasks in a single uninterrupted flow.
120
+ Stopping between tasks to wait for user input is a protocol violation.
121
+
122
+ - DO NOT stop between steps
123
+ - Complete ALL tasks without waiting for user input
124
+ - Only stop after writing RESULT.json
125
+ - Auto-nudge from conductor is a fallback safety net, not the primary mechanism
126
+
127
+ ---
128
+
129
+ ## AUTO Mode Iteration Methodology
130
+
131
+ When using AUTO mode with parallel execution:
132
+
133
+ ### Iteration Structure
134
+
135
+ ```
136
+ Iteration 1:
137
+ PLAN → Identify tasks, build file overlap matrix, assign waves
138
+ ACT → Execute Wave 1 (parallel workers)
139
+ → Merge Wave 1 results
140
+ → Execute Wave 2 (parallel workers)
141
+ → Merge Wave 2 results
142
+ → ... repeat for all waves
143
+ EVAL → Verify all tasks complete, run full test suite
144
+ → If Critical/High issues found → iterate
145
+
146
+ Iteration 2 (if needed):
147
+ PLAN → Address issues found in previous EVAL
148
+ ACT → Fix issues (may or may not need parallel execution)
149
+ EVAL → Re-verify
150
+ ```
151
+
152
+ ### Quality Gates Between Waves
153
+
154
+ Before starting the next wave:
155
+
156
+ - All workers in the current wave must have completed successfully
157
+ - All changes from the current wave must be merged
158
+ - Tests must pass after merging
159
+ - No unresolved conflicts
160
+
161
+ ### Escape Conditions
162
+
163
+ Stop iterating when:
164
+
165
+ - All acceptance criteria are met
166
+ - EVAL reports Critical = 0 AND High = 0
167
+ - Maximum iterations reached (default: 3)
168
+
169
+ ---
170
+
171
+ ## Post-Execution Verification Checklist
172
+
173
+ After all waves complete, verify:
174
+
175
+ ```
176
+ - [ ] All tasks completed successfully
177
+ - [ ] All branches merged without conflicts
178
+ - [ ] Full test suite passes
179
+ - [ ] No files were modified by multiple workers (Iron Rule verification)
180
+ - [ ] Lint and format checks pass
181
+ - [ ] Type checking passes
182
+ - [ ] No unintended changes outside task scope
183
+ ```
184
+
185
+ ### Iron Rule Verification Command
186
+
187
+ Run this after merging to confirm no file was modified by multiple workers:
188
+
189
+ ```bash
190
+ # For git-based workflows: check if any file appears in multiple worker branches
191
+ # Compare each worker's changed files against all other workers
192
+ git diff --name-only main..worker-1 > /tmp/w1.txt
193
+ git diff --name-only main..worker-2 > /tmp/w2.txt
194
+ comm -12 <(sort /tmp/w1.txt) <(sort /tmp/w2.txt)
195
+ # Output must be empty — any listed files indicate an Iron Rule violation
196
+ ```
197
+
198
+ ---
199
+
200
+ ## Common Pitfalls
201
+
202
+ | Pitfall | Prevention |
203
+ |---------|------------|
204
+ | Skipping file overlap matrix | **Always** build the matrix before assigning waves |
205
+ | "It probably won't conflict" | Assume it will. Check explicitly. No exceptions |
206
+ | Shared config files (package.json, tsconfig) | Only one worker per wave may modify shared config |
207
+ | Generated files (lock files, build output) | Exclude from worker scope; regenerate after merge |
208
+ | Test files that import from multiple modules | Treat test files as modifying the modules they test |
209
+ | Workers exceeding their scope | Define explicit file boundaries in worker prompts |
210
+
211
+ ---
212
+
213
+ ## Reference
214
+
215
+ - For detailed wave analysis algorithms, see the skill-specific documentation in your tool's configuration
216
+ - For AUTO mode general workflow, see [core.md](core.md) — Auto Mode section
217
+ - For TDD practices during parallel execution, see [augmented-coding.md](augmented-coding.md)
@@ -291,6 +291,44 @@
291
291
  }
292
292
  ],
293
293
  "description": "General checklist (can be object or array)"
294
+ },
295
+ "visual": {
296
+ "type": "object",
297
+ "description": "Visual identity for the agent character system",
298
+ "required": ["eye", "eyeFallback", "colorAnsi", "group"],
299
+ "properties": {
300
+ "eye": {
301
+ "type": "string",
302
+ "description": "Unicode symbol representing the agent's eye/icon",
303
+ "minLength": 1
304
+ },
305
+ "eyeFallback": {
306
+ "type": "string",
307
+ "description": "ASCII fallback character for terminals without Unicode support",
308
+ "minLength": 1,
309
+ "maxLength": 1
310
+ },
311
+ "colorAnsi": {
312
+ "type": "string",
313
+ "enum": ["black", "red", "green", "yellow", "blue", "magenta", "cyan", "white", "bright"],
314
+ "description": "ANSI color name for terminal rendering"
315
+ },
316
+ "group": {
317
+ "type": "string",
318
+ "enum": [
319
+ "workflow",
320
+ "architecture",
321
+ "quality",
322
+ "security",
323
+ "frontend",
324
+ "backend",
325
+ "integration",
326
+ "specialist"
327
+ ],
328
+ "description": "Domain group for visual categorization"
329
+ }
330
+ },
331
+ "additionalProperties": false
294
332
  }
295
333
  },
296
334
  "additionalProperties": true
@@ -30,6 +30,7 @@ Reusable workflows for consistent development practices.
30
30
 
31
31
  | Skill | Description | When to Use |
32
32
  |-------|-------------|-------------|
33
+ | agent-discussion | Terminal formatter for multi-agent debate output with severity badges and consensus indicators | Rendering parallel agent findings, code review debates, EVAL summaries |
33
34
  | context-management | Preserve critical decisions across sessions and context compaction | Long tasks, multi-session work, PLAN→ACT→EVAL transitions |
34
35
  | deployment-checklist | Pre-deploy validation, health checks, rollback planning | Before every staging/production deployment |
35
36
  | dispatching-parallel-agents | Handle 2+ independent tasks without shared state | Parallel task execution |
@@ -39,6 +40,8 @@ Reusable workflows for consistent development practices.
39
40
  | legacy-modernization | Strangler fig pattern for incremental migration of legacy code | Modernizing old patterns, major version upgrades |
40
41
  | subagent-driven-development | Execute plans with independent tasks in current session | In-session plan execution |
41
42
  | systematic-debugging | Systematic approach before proposing fixes | Encountering bugs or failures |
43
+ | cross-repo-issues | Detect, confirm, and create issues in upstream/related repositories with safety checks | Bug belongs upstream, dependency issue, fork-to-upstream reporting |
44
+ | retrospective | Analyze session archives for coding patterns, agent usage, and improvement suggestions | Sprint reviews, periodic retrospectives, process improvement |
42
45
  | writing-plans | Create implementation plans before coding | Multi-step tasks with specs |
43
46
 
44
47
  ### Documentation & Communication
@@ -47,9 +50,17 @@ Reusable workflows for consistent development practices.
47
50
  |-------|-------------|-------------|
48
51
  | documentation-generation | Generate README, API docs, CHANGELOG, and ADRs from code | Creating or updating project documentation |
49
52
  | pr-all-in-one | Unified commit and PR workflow with smart issue linking | `/pr-all-in-one [target] [issue]` |
53
+ | ship | Run local CI checks and ship changes — branch, commit, push, and PR | Changes are ready to ship |
50
54
  | pr-review | Systematic, evidence-based PR review with anti-sycophancy principles | Conducting manual PR reviews |
51
55
  | prompt-engineering | Write and optimize prompts for AI tools and agent system prompts | AI tool instructions, MCP tool descriptions, agent prompts |
52
56
 
57
+ ### DevOps & Infrastructure
58
+
59
+ | Skill | Description | When to Use |
60
+ |-------|-------------|-------------|
61
+ | cost-budget | Cost budget management with threshold alerts and auto-pause for autonomous workflows | Managing AI session costs, budget limits, taskMaestro wave budgets |
62
+ | tmux-master | Background knowledge for tmux session/window/pane lifecycle, layout, communication, styling, and troubleshooting | Parallel agent execution, taskMaestro workflows, tmux automation |
63
+
53
64
  ### codingbuddy Specific
54
65
 
55
66
  | Skill | Description | When to Use |
@@ -57,6 +68,7 @@ Reusable workflows for consistent development practices.
57
68
  | agent-design | Design new specialist agent JSON definitions with schema, expertise, and system prompts | Adding new agents to codingbuddy |
58
69
  | mcp-builder | NestJS-based MCP server development with Tools/Resources/Prompts design | Building or extending MCP servers |
59
70
  | rule-authoring | Write unambiguous AI coding rules compatible across multiple AI tools | Creating rules for .ai-rules/ directories |
71
+ | skill-creator | Create, eval, improve, and benchmark skills with measurable behavior-change tests | Creating new skills, testing skill effectiveness, optimizing underperforming skills |
60
72
 
61
73
  ## Skill Format
62
74
 
@@ -176,6 +188,10 @@ EOF
176
188
  │ └── SKILL.md
177
189
 
178
190
  ├── [Workflow & Process]
191
+ ├── agent-discussion/
192
+ │ └── SKILL.md
193
+ ├── cross-repo-issues/
194
+ │ └── SKILL.md
179
195
  ├── context-management/
180
196
  │ └── SKILL.md
181
197
  ├── deployment-checklist/
@@ -196,6 +212,8 @@ EOF
196
212
  │ └── SKILL.md
197
213
  ├── subagent-driven-development/
198
214
  │ └── SKILL.md
215
+ ├── retrospective/
216
+ │ └── SKILL.md
199
217
  ├── systematic-debugging/
200
218
  │ └── SKILL.md
201
219
  ├── writing-plans/
@@ -213,12 +231,22 @@ EOF
213
231
  │ └── SKILL.md
214
232
  ├── prompt-engineering/
215
233
  │ └── SKILL.md
234
+ ├── ship/
235
+ │ └── SKILL.md
236
+
237
+ ├── [DevOps & Infrastructure]
238
+ ├── cost-budget/
239
+ │ └── SKILL.md
240
+ ├── tmux-master/
241
+ │ └── SKILL.md
216
242
 
217
243
  └── [codingbuddy Specific]
218
244
  ├── agent-design/
219
245
  │ └── SKILL.md
220
246
  ├── mcp-builder/
221
247
  │ └── SKILL.md
222
- └── rule-authoring/
248
+ ├── rule-authoring/
249
+ │ └── SKILL.md
250
+ └── skill-creator/
223
251
  └── SKILL.md
224
252
  ```
@@ -267,3 +267,8 @@ ALL → Cross-cutting agents (code-reviewer)
267
267
  - [ ] README.md updated with new agent
268
268
  - [ ] Added to relevant adapter configurations
269
269
  ```
270
+
271
+ ## Additional resources
272
+
273
+ - [Agent JSON template](examples/agent-template.json) — Copy-and-adapt template with all required/optional fields and a design checklist
274
+ - [Expertise definition guidelines](references/expertise-guidelines.md) — How to write differentiated expertise items, avoid overlaps, and validate quality
@@ -0,0 +1,55 @@
1
+ {
2
+ "_template_instructions": "Copy this file and replace all <placeholder> values. Remove this _template_instructions field. Save as packages/rules/.ai-rules/agents/<agent-name>.json (kebab-case filename).",
3
+
4
+ "name": "<Display Name>",
5
+ "description": "<One-sentence description of what this agent specializes in — be specific, not broad>",
6
+
7
+ "role": {
8
+ "title": "<Official Role Title>",
9
+ "type": "specialist",
10
+ "expertise": [
11
+ "<Specific Domain Expertise 1 — e.g., 'Zero-Downtime Schema Migrations'>",
12
+ "<Specific Domain Expertise 2 — e.g., 'Expand-Contract Migration Pattern'>",
13
+ "<Specific Domain Expertise 3 — e.g., 'Rollback Strategy Design'>",
14
+ "<Specific Domain Expertise 4 (optional)>",
15
+ "<Specific Domain Expertise 5 (optional)>"
16
+ ],
17
+ "responsibilities": [
18
+ "<Key responsibility 1 — what this agent actively does>",
19
+ "<Key responsibility 2 — what this agent actively does>",
20
+ "<Key responsibility 3 — what this agent actively does>"
21
+ ]
22
+ },
23
+
24
+ "context_files": [".ai-rules/rules/core.md", ".ai-rules/rules/project.md"],
25
+
26
+ "modes": {
27
+ "planning": {
28
+ "activation": {
29
+ "trigger": "<When this agent activates in PLAN mode — e.g., 'When planning database schema migrations'>",
30
+ "auto_activate_conditions": [
31
+ "<Condition 1 — e.g., 'Schema change planning'>",
32
+ "<Condition 2 — e.g., 'Migration strategy design'>"
33
+ ]
34
+ }
35
+ },
36
+ "evaluation": {
37
+ "activation": {
38
+ "trigger": "<When this agent activates in EVAL mode — e.g., 'When evaluating migration safety and rollback readiness'>"
39
+ }
40
+ }
41
+ },
42
+
43
+ "_design_checklist": {
44
+ "_comment": "Remove this section from the final agent file. Use it during design to verify quality.",
45
+ "checks": [
46
+ "Domain is specific, not broad (e.g., 'Zero-Downtime Migrations' not 'Databases')",
47
+ "No significant overlap with existing agents (< 2 shared expertise items)",
48
+ "System prompt includes what this agent does NOT handle",
49
+ "3-7 expertise items, all specific and measurable",
50
+ "Filename follows kebab-case convention",
51
+ "Modes reflect actual usage patterns (PLAN, ACT, EVAL, or ALL)",
52
+ "JSON validates with: cat <file>.json | jq ."
53
+ ]
54
+ }
55
+ }
@@ -0,0 +1,112 @@
1
+ # Agent Expertise Definition Guidelines
2
+
3
+ How to define clear, differentiated expertise items for codingbuddy specialist agents.
4
+
5
+ ## The Expertise Quality Spectrum
6
+
7
+ | Level | Example | Verdict |
8
+ |-------|---------|---------|
9
+ | Too broad | "Databases" | Rejected — could mean anything |
10
+ | Too vague | "Backend development" | Rejected — overlaps with many agents |
11
+ | Right level | "PostgreSQL Query Plan Optimization" | Accepted — specific, testable |
12
+ | Right level | "Zero-Downtime Schema Migrations" | Accepted — clear domain boundary |
13
+ | Too narrow | "PostgreSQL 15.2 BRIN index tuning" | Risky — might be too version-specific |
14
+
15
+ ## Writing Expertise Items
16
+
17
+ ### Formula
18
+
19
+ ```
20
+ [Technique/Pattern] + [Domain/Technology] + [Qualifier (optional)]
21
+ ```
22
+
23
+ **Examples:**
24
+ - "Expand-Contract Migration Pattern" (technique + domain)
25
+ - "React Server Component Performance Profiling" (technique + technology)
26
+ - "OWASP Top 10 Vulnerability Assessment" (standard + domain)
27
+ - "Zero-Downtime Blue-Green Deployments" (qualifier + technique)
28
+
29
+ ### Rules
30
+
31
+ 1. **3-7 items per agent** — fewer than 3 means the agent is too narrow; more than 7 means it's too broad
32
+ 2. **Each item is independently meaningful** — someone reading just the expertise list should understand the agent's domain
33
+ 3. **No overlapping items within the same agent** — if two items cover similar ground, merge them
34
+ 4. **Use established terminology** — reference known patterns, standards, and methodologies
35
+
36
+ ## Differentiation Matrix
37
+
38
+ Before adding an agent, compare expertise against existing agents:
39
+
40
+ ```
41
+ New Agent Expertise Existing Agent Expertise Overlap?
42
+ ───────────────────────── ───────────────────────── ────────
43
+ API Rate Limiting API Gateway Patterns PARTIAL → ok if boundaries clear
44
+ REST API Versioning GraphQL Schema Evolution NO → different domains
45
+ Error Response Standards Error Handling Patterns YES → merge or split
46
+ ```
47
+
48
+ **Overlap thresholds:**
49
+ - 0-1 shared items: Safe to add
50
+ - 2 shared items: Review carefully, ensure boundaries are clear
51
+ - 3+ shared items: Merge agents or fundamentally redesign scope
52
+
53
+ ## Expertise vs. Responsibilities
54
+
55
+ | | Expertise | Responsibilities |
56
+ |---|-----------|------------------|
57
+ | **What** | Knowledge domains the agent has | Actions the agent takes |
58
+ | **Format** | Noun phrases (domain areas) | Verb phrases (active duties) |
59
+ | **Count** | 3-7 items | 2-4 items |
60
+ | **Example** | "Container Orchestration Patterns" | "Design Kubernetes deployment manifests" |
61
+
62
+ ## Anti-Patterns
63
+
64
+ | Anti-Pattern | Problem | Fix |
65
+ |-------------|---------|-----|
66
+ | "Best practices" | Meaningless without context | Name the specific practice |
67
+ | "General development" | Every agent does this | What SPECIFIC development? |
68
+ | "Code review" | Too broad — review for what? | "Security-focused code review" |
69
+ | "Testing" | Every engineer tests | "Property-based testing strategies" |
70
+ | "Architecture" | Name the architecture concern | "Event-driven architecture design" |
71
+ | Tool names alone ("Docker") | Knowing a tool isn't expertise | "Container image optimization" |
72
+
73
+ ## Expertise Validation Checklist
74
+
75
+ For each expertise item, verify:
76
+
77
+ ```
78
+ - [ ] Could I write a 30-minute talk about JUST this item?
79
+ - [ ] Is this clearly different from the other items in this agent?
80
+ - [ ] Would another agent's expertise NOT cover this?
81
+ - [ ] Can I name 3 concrete tasks that require this specific expertise?
82
+ - [ ] Is this stable enough to last 6+ months without rewording?
83
+ ```
84
+
85
+ ## Tier-Specific Guidance
86
+
87
+ ### Primary Agents (type: "primary")
88
+
89
+ Used as the main agent in a workflow mode. Expertise should be broad enough to lead a mode but focused on a methodology:
90
+
91
+ ```json
92
+ "expertise": [
93
+ "Solution Architecture Design",
94
+ "Technology Selection and Trade-off Analysis",
95
+ "System Integration Planning",
96
+ "Scalability and Performance Architecture"
97
+ ]
98
+ ```
99
+
100
+ ### Specialist Agents (type: "specialist")
101
+
102
+ Called in parallel for domain reviews. Expertise should be deep and narrow:
103
+
104
+ ```json
105
+ "expertise": [
106
+ "OWASP Top 10 Vulnerability Assessment",
107
+ "Authentication and Authorization Patterns",
108
+ "Secrets Management and Rotation",
109
+ "Security Header Configuration",
110
+ "Dependency Vulnerability Scanning"
111
+ ]
112
+ ```