codingbuddy-rules 4.4.0 → 5.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 (122) hide show
  1. package/.ai-rules/adapters/antigravity.md +6 -6
  2. package/.ai-rules/adapters/claude-code.md +107 -4
  3. package/.ai-rules/adapters/codex.md +5 -5
  4. package/.ai-rules/adapters/cursor.md +2 -2
  5. package/.ai-rules/adapters/kiro.md +8 -8
  6. package/.ai-rules/adapters/opencode.md +7 -7
  7. package/.ai-rules/adapters/q.md +2 -2
  8. package/.ai-rules/agents/README.md +66 -16
  9. package/.ai-rules/agents/accessibility-specialist.json +2 -1
  10. package/.ai-rules/agents/act-mode.json +2 -1
  11. package/.ai-rules/agents/agent-architect.json +8 -7
  12. package/.ai-rules/agents/ai-ml-engineer.json +1 -0
  13. package/.ai-rules/agents/architecture-specialist.json +1 -0
  14. package/.ai-rules/agents/auto-mode.json +4 -2
  15. package/.ai-rules/agents/backend-developer.json +1 -0
  16. package/.ai-rules/agents/code-quality-specialist.json +1 -0
  17. package/.ai-rules/agents/code-reviewer.json +65 -64
  18. package/.ai-rules/agents/data-engineer.json +8 -7
  19. package/.ai-rules/agents/data-scientist.json +10 -9
  20. package/.ai-rules/agents/devops-engineer.json +1 -0
  21. package/.ai-rules/agents/documentation-specialist.json +1 -0
  22. package/.ai-rules/agents/eval-mode.json +20 -19
  23. package/.ai-rules/agents/event-architecture-specialist.json +1 -0
  24. package/.ai-rules/agents/frontend-developer.json +1 -0
  25. package/.ai-rules/agents/i18n-specialist.json +2 -1
  26. package/.ai-rules/agents/integration-specialist.json +1 -0
  27. package/.ai-rules/agents/migration-specialist.json +1 -0
  28. package/.ai-rules/agents/mobile-developer.json +8 -7
  29. package/.ai-rules/agents/observability-specialist.json +1 -0
  30. package/.ai-rules/agents/parallel-orchestrator.json +346 -0
  31. package/.ai-rules/agents/performance-specialist.json +1 -0
  32. package/.ai-rules/agents/plan-mode.json +3 -1
  33. package/.ai-rules/agents/plan-reviewer.json +208 -0
  34. package/.ai-rules/agents/platform-engineer.json +1 -0
  35. package/.ai-rules/agents/security-engineer.json +9 -8
  36. package/.ai-rules/agents/security-specialist.json +2 -1
  37. package/.ai-rules/agents/seo-specialist.json +1 -0
  38. package/.ai-rules/agents/software-engineer.json +1 -0
  39. package/.ai-rules/agents/solution-architect.json +11 -10
  40. package/.ai-rules/agents/systems-developer.json +9 -8
  41. package/.ai-rules/agents/technical-planner.json +11 -10
  42. package/.ai-rules/agents/test-engineer.json +7 -6
  43. package/.ai-rules/agents/test-strategy-specialist.json +1 -0
  44. package/.ai-rules/agents/tooling-engineer.json +4 -3
  45. package/.ai-rules/agents/ui-ux-designer.json +1 -0
  46. package/.ai-rules/keyword-modes.json +4 -4
  47. package/.ai-rules/rules/clarification-guide.md +14 -14
  48. package/.ai-rules/rules/core.md +90 -1
  49. package/.ai-rules/rules/parallel-execution.md +217 -0
  50. package/.ai-rules/skills/README.md +23 -1
  51. package/.ai-rules/skills/agent-design/SKILL.md +5 -0
  52. package/.ai-rules/skills/agent-design/examples/agent-template.json +58 -0
  53. package/.ai-rules/skills/agent-design/references/expertise-guidelines.md +112 -0
  54. package/.ai-rules/skills/agent-discussion/SKILL.md +199 -0
  55. package/.ai-rules/skills/agent-discussion-panel/SKILL.md +448 -0
  56. package/.ai-rules/skills/api-design/SKILL.md +5 -0
  57. package/.ai-rules/skills/api-design/examples/error-response.json +159 -0
  58. package/.ai-rules/skills/api-design/examples/openapi-template.yaml +393 -0
  59. package/.ai-rules/skills/build-fix/SKILL.md +234 -0
  60. package/.ai-rules/skills/code-explanation/SKILL.md +4 -0
  61. package/.ai-rules/skills/context-management/SKILL.md +1 -0
  62. package/.ai-rules/skills/cost-budget/SKILL.md +348 -0
  63. package/.ai-rules/skills/cross-repo-issues/SKILL.md +257 -0
  64. package/.ai-rules/skills/database-migration/SKILL.md +1 -0
  65. package/.ai-rules/skills/deepsearch/SKILL.md +214 -0
  66. package/.ai-rules/skills/deployment-checklist/SKILL.md +1 -0
  67. package/.ai-rules/skills/error-analysis/SKILL.md +1 -0
  68. package/.ai-rules/skills/finishing-a-development-branch/SKILL.md +281 -0
  69. package/.ai-rules/skills/frontend-design/SKILL.md +5 -0
  70. package/.ai-rules/skills/frontend-design/examples/component-template.tsx +203 -0
  71. package/.ai-rules/skills/frontend-design/references/css-patterns.md +243 -0
  72. package/.ai-rules/skills/git-master/SKILL.md +358 -0
  73. package/.ai-rules/skills/incident-response/SKILL.md +1 -0
  74. package/.ai-rules/skills/legacy-modernization/SKILL.md +1 -0
  75. package/.ai-rules/skills/mcp-builder/SKILL.md +7 -0
  76. package/.ai-rules/skills/mcp-builder/examples/resource-example.ts +233 -0
  77. package/.ai-rules/skills/mcp-builder/examples/tool-example.ts +203 -0
  78. package/.ai-rules/skills/mcp-builder/references/protocol-spec.md +215 -0
  79. package/.ai-rules/skills/performance-optimization/SKILL.md +3 -0
  80. package/.ai-rules/skills/plan-and-review/SKILL.md +115 -0
  81. package/.ai-rules/skills/pr-all-in-one/SKILL.md +15 -13
  82. package/.ai-rules/skills/pr-all-in-one/configuration-guide.md +7 -7
  83. package/.ai-rules/skills/pr-all-in-one/pr-templates.md +10 -10
  84. package/.ai-rules/skills/pr-review/SKILL.md +4 -0
  85. package/.ai-rules/skills/receiving-code-review/SKILL.md +347 -0
  86. package/.ai-rules/skills/refactoring/SKILL.md +1 -0
  87. package/.ai-rules/skills/requesting-code-review/SKILL.md +348 -0
  88. package/.ai-rules/skills/rule-authoring/SKILL.md +5 -0
  89. package/.ai-rules/skills/rule-authoring/examples/rule-template.md +142 -0
  90. package/.ai-rules/skills/rule-authoring/examples/trigger-patterns.md +126 -0
  91. package/.ai-rules/skills/security-audit/SKILL.md +4 -0
  92. package/.ai-rules/skills/skill-creator/SKILL.md +461 -0
  93. package/.ai-rules/skills/skill-creator/agents/analyzer.md +206 -0
  94. package/.ai-rules/skills/skill-creator/agents/comparator.md +167 -0
  95. package/.ai-rules/skills/skill-creator/agents/grader.md +152 -0
  96. package/.ai-rules/skills/skill-creator/assets/eval_review.html +289 -0
  97. package/.ai-rules/skills/skill-creator/assets/skill-template.md +43 -0
  98. package/.ai-rules/skills/skill-creator/eval-viewer/generate_review.py +496 -0
  99. package/.ai-rules/skills/skill-creator/references/frontmatter-guide.md +632 -0
  100. package/.ai-rules/skills/skill-creator/references/multi-tool-compat.md +480 -0
  101. package/.ai-rules/skills/skill-creator/references/schemas.md +784 -0
  102. package/.ai-rules/skills/skill-creator/scripts/aggregate_benchmark.py +302 -0
  103. package/.ai-rules/skills/skill-creator/scripts/init_skill.sh +196 -0
  104. package/.ai-rules/skills/skill-creator/scripts/run_loop.py +327 -0
  105. package/.ai-rules/skills/systematic-debugging/SKILL.md +1 -0
  106. package/.ai-rules/skills/tech-debt/SKILL.md +1 -0
  107. package/.ai-rules/skills/test-coverage-gate/SKILL.md +303 -0
  108. package/.ai-rules/skills/tmux-master/SKILL.md +491 -0
  109. package/.ai-rules/skills/using-git-worktrees/SKILL.md +368 -0
  110. package/.ai-rules/skills/verification-before-completion/SKILL.md +234 -0
  111. package/.ai-rules/skills/widget-slot-architecture/SKILL.md +6 -0
  112. package/.ai-rules/skills/widget-slot-architecture/examples/parallel-route-setup.tsx +206 -0
  113. package/.ai-rules/skills/widget-slot-architecture/examples/widget-component.tsx +250 -0
  114. package/.ai-rules/skills/writing-plans/SKILL.md +78 -0
  115. package/bin/cli.js +178 -0
  116. package/lib/init/detect-stack.js +148 -0
  117. package/lib/init/generate-config.js +31 -0
  118. package/lib/init/index.js +86 -0
  119. package/lib/init/prompt.js +60 -0
  120. package/lib/init/scaffold.js +67 -0
  121. package/lib/init/suggest-agent.js +46 -0
  122. package/package.json +10 -2
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "Software Engineer",
3
3
  "description": "General-purpose implementation engineer — any language, any domain, TDD-first",
4
+ "color": "#1ABC9C",
4
5
  "role": {
5
6
  "title": "Senior Software Engineer",
6
7
  "type": "primary",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "Solution Architect",
3
3
  "description": "High-level system design and architecture planning specialist",
4
+ "color": "#4A90D9",
4
5
  "role": {
5
6
  "title": "Solution Architect",
6
7
  "type": "primary",
@@ -39,22 +40,22 @@
39
40
  "activation": {
40
41
  "trigger": "When high-level architecture design or system design is needed",
41
42
  "explicit_patterns": [
42
- "아키텍처 설계",
43
- "시스템 설계",
44
43
  "architecture design",
45
44
  "system design",
46
- "기술 선택",
45
+ "architecture design",
46
+ "system design",
47
47
  "technology selection",
48
- "설계 검토",
48
+ "technology selection",
49
+ "design review",
49
50
  "design review",
50
- "solution-architect"
51
+ "as solution-architect"
51
52
  ],
52
53
  "intent_patterns": [
53
- "아키텍처|architecture",
54
- "시스템\\s*설계|system\\s*design",
55
- "전체\\s*구조|overall\\s*structure",
56
- "기술\\s*스택|tech\\s*stack",
57
- "설계\\s*방향|design\\s*direction"
54
+ "architecture",
55
+ "system\\s*design",
56
+ "overall\\s*structure",
57
+ "tech\\s*stack",
58
+ "design\\s*direction"
58
59
  ],
59
60
  "mandatory_checklist": {
60
61
  "🔴 brainstorming_first": {
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "Systems Developer",
3
3
  "description": "Primary Agent for systems programming, low-level optimization, native code development, and performance-critical implementations",
4
+ "color": "#D35400",
4
5
  "role": {
5
6
  "title": "Systems Developer",
6
7
  "type": "primary",
@@ -32,14 +33,14 @@
32
33
  "activation": {
33
34
  "trigger": "When user requests Rust/C/C++ implementation, FFI bindings, memory management, embedded systems, WASM, or low-level performance optimization",
34
35
  "explicit_patterns": [
35
- "systems-developer",
36
- "Rust로 구현",
37
- "C++ 최적화",
38
- "FFI 바인딩",
39
- "메모리 관리",
40
- "임베디드 개발",
41
- "WASM 구현",
42
- "저수준 구현"
36
+ "as systems-developer",
37
+ "implement in Rust",
38
+ "C++ optimization",
39
+ "FFI binding",
40
+ "memory management",
41
+ "embedded development",
42
+ "WASM implementation",
43
+ "low-level implementation"
43
44
  ],
44
45
  "mandatory_checklist": {
45
46
  "🔴 memory_safety": {
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "Technical Planner",
3
3
  "description": "Low-level implementation planning with TDD and bite-sized tasks",
4
+ "color": "#7B68EE",
4
5
  "role": {
5
6
  "title": "Technical Planner",
6
7
  "type": "primary",
@@ -49,22 +50,22 @@
49
50
  "activation": {
50
51
  "trigger": "When detailed implementation planning with TDD is needed",
51
52
  "explicit_patterns": [
52
- "구현 계획",
53
53
  "implementation plan",
54
- "태스크 분해",
54
+ "implementation plan",
55
+ "task breakdown",
55
56
  "task breakdown",
56
- "작업 계획",
57
57
  "work plan",
58
- "TDD 계획",
58
+ "work plan",
59
+ "TDD plan",
59
60
  "TDD plan",
60
- "technical-planner"
61
+ "as technical-planner"
61
62
  ],
62
63
  "intent_patterns": [
63
- "구현\\s*계획|implementation\\s*plan",
64
- "작업\\s*분해|task\\s*breakdown",
65
- "단계별|step.?by.?step",
66
- "TDD|테스트\\s*먼저|test.?first",
67
- "bite.?sized|작은\\s*단위"
64
+ "implementation\\s*plan",
65
+ "task\\s*breakdown",
66
+ "step.?by.?step",
67
+ "TDD|test.?first",
68
+ "bite.?sized"
68
69
  ],
69
70
  "mandatory_checklist": {
70
71
  "🔴 writing_plans_skill": {
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "Test Engineer",
3
3
  "description": "Primary Agent for TDD cycle execution, test writing, and coverage improvement across all test types",
4
+ "color": "#F39C12",
4
5
  "role": {
5
6
  "title": "Test Engineer",
6
7
  "type": "primary",
@@ -28,13 +29,13 @@
28
29
  "activation": {
29
30
  "trigger": "When user requests test writing, TDD implementation, coverage improvement, or test strategy",
30
31
  "explicit_patterns": [
31
- "테스트 코드 작성",
32
- "단위 테스트",
32
+ "write test code",
33
33
  "unit test",
34
- "TDD로",
35
- "test-engineer로",
36
- "e2e 테스트",
37
- "커버리지 개선",
34
+ "unit test",
35
+ "with TDD",
36
+ "as test-engineer",
37
+ "e2e test",
38
+ "coverage improvement",
38
39
  "coverage improvement"
39
40
  ],
40
41
  "mandatory_checklist": {
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "Test Strategy Specialist",
3
3
  "description": "Test strategy expert for Planning, Implementation, and Evaluation modes - unified specialist for TDD vs Test-After decisions, test coverage planning, and test quality assessment",
4
+ "color": "#F1C40F",
4
5
  "role": {
5
6
  "title": "Test Strategy Engineer",
6
7
  "expertise": [
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "Tooling Engineer",
3
3
  "description": "Project configuration, build tools, and development environment specialist",
4
+ "color": "#95A5A6",
4
5
  "role": {
5
6
  "title": "Tooling Engineer",
6
7
  "type": "primary",
@@ -27,7 +28,7 @@
27
28
  "activation": {
28
29
  "trigger": "When user works with config files, build tools, or development environment setup",
29
30
  "explicit_patterns": [
30
- "설정 파일",
31
+ "config file",
31
32
  "config file",
32
33
  "tsconfig",
33
34
  "eslint",
@@ -36,9 +37,9 @@
36
37
  "vite.config",
37
38
  "next.config",
38
39
  "webpack",
39
- "빌드 설정",
40
40
  "build config",
41
- "tooling-engineer로"
41
+ "build config",
42
+ "as tooling-engineer"
42
43
  ],
43
44
  "mandatory_checklist": {
44
45
  "schema_compliance": {
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "UI/UX Designer",
3
3
  "description": "UI/UX design specialist based on universal design principles and UX best practices - focuses on aesthetics, usability, and user experience rather than specific design system implementations",
4
+ "color": "#E91E63",
4
5
  "role": {
5
6
  "title": "UI/UX Design Specialist",
6
7
  "expertise": [
@@ -2,7 +2,7 @@
2
2
  "modes": {
3
3
  "PLAN": {
4
4
  "description": "Task planning and design phase",
5
- "instructions": "설계 우선 접근. TDD 관점에서 테스트 케이스 먼저 정의. 구현 아키텍처 검토. 📝 완료 docs/codingbuddy/plan/ PLAN 문서 작성 권장 (./docs/codingbuddy/scripts/new-doc.sh plan <slug>).",
5
+ "instructions": "Design-first approach. Define test cases first from a TDD perspective. Review architecture before implementation. 📝 After completion, creating a PLAN document in docs/codingbuddy/plan/ is recommended (./docs/codingbuddy/scripts/new-doc.sh plan <slug>).",
6
6
  "rules": ["rules/core.md", "rules/augmented-coding.md"],
7
7
  "agent": "plan-mode",
8
8
  "delegates_to": "frontend-developer",
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "ACT": {
19
19
  "description": "Actual task execution phase",
20
- "instructions": "Red-Green-Refactor 사이클 준수. 최소 구현 점진적 개선. 품질 기준 충족 확인. 📝 완료 docs/codingbuddy/act/ ACT 문서 작성 권장 (./docs/codingbuddy/scripts/new-doc.sh act <slug>).",
20
+ "instructions": "Follow the Red-Green-Refactor cycle. Implement minimally first, then improve incrementally. Verify quality standards are met. 📝 After completion, creating an ACT document in docs/codingbuddy/act/ is recommended (./docs/codingbuddy/scripts/new-doc.sh act <slug>).",
21
21
  "rules": ["rules/core.md", "rules/project.md", "rules/augmented-coding.md"],
22
22
  "agent": "act-mode",
23
23
  "delegates_to": "frontend-developer",
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "EVAL": {
32
32
  "description": "Result review and assessment phase",
33
- "instructions": "코드 품질 검토. SOLID 원칙 준수 확인. 테스트 커버리지 점검. 개선점 제안. 📝 완료 docs/codingbuddy/eval/ EVAL 문서 작성 권장 (./docs/codingbuddy/scripts/new-doc.sh eval <slug>).",
33
+ "instructions": "Review code quality. Verify SOLID principles compliance. Check test coverage. Suggest improvements. 📝 After completion, creating an EVAL document in docs/codingbuddy/eval/ is recommended (./docs/codingbuddy/scripts/new-doc.sh eval <slug>).",
34
34
  "rules": ["rules/core.md", "rules/augmented-coding.md"],
35
35
  "agent": "eval-mode",
36
36
  "delegates_to": "code-reviewer",
@@ -47,7 +47,7 @@
47
47
  },
48
48
  "AUTO": {
49
49
  "description": "Autonomous execution mode",
50
- "instructions": "PLAN → ACT → EVAL 사이클 자동 실행. Critical/High 이슈가 0 때까지 반복. (세션 문서는 PLAN/ACT/EVAL 단계에서 작성됨)",
50
+ "instructions": "Automatically execute the PLAN → ACT → EVAL cycle. Repeat until Critical/High issues reach 0. (Session documents are created at each PLAN/ACT/EVAL phase)",
51
51
  "rules": ["rules/core.md", "rules/project.md", "rules/augmented-coding.md"],
52
52
  "agent": "auto-mode",
53
53
  "delegates_to": "frontend-developer",
@@ -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)
@@ -546,7 +591,8 @@ To preserve this implementation session for future reference:
546
591
  - All implementations must follow the Primary Developer Agent's code quality checklist
547
592
  - Respond in the language specified in the agent's communication.language setting
548
593
  - Execute one step at a time, verify tests after each step
549
- - Stop and return to PLAN if blockers encountered
594
+ - On recoverable errors (file not found, command failure, path issues), try alternatives immediately
595
+ - Only return to PLAN on unrecoverable blockers (missing dependencies, architectural conflicts)
550
596
 
551
597
  **Verification:**
552
598
  - Agent name should appear as `## Agent : [Primary Developer Agent Name]` in response
@@ -563,6 +609,48 @@ To preserve this implementation session for future reference:
563
609
 
564
610
  ---
565
611
 
612
+ ### Error Recovery (ACT mode)
613
+
614
+ - On recoverable errors (file not found, command failure, path issues), try alternatives immediately
615
+ - Do not wait for user confirmation on recoverable errors — recover immediately
616
+ - Only report to user on unrecoverable errors (auth failure, critical data loss risk)
617
+ - Never break the workflow on error — try alternatives and continue
618
+
619
+ ### Path Safety (monorepo)
620
+
621
+ - Always verify current directory (pwd) or use absolute paths before git add/commit
622
+ - In monorepo subdirectories, use git -C "$REPO_ROOT" flag for git commands
623
+ - After using cd, ensure relative paths are not double-applied in subsequent commands
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
+
652
+ ---
653
+
566
654
  ### Eval Mode
567
655
 
568
656
  **Important:**
@@ -867,6 +955,7 @@ To preserve this evaluation session for future reference:
867
955
  - User initiates with `AUTO` keyword and the system handles the entire workflow
868
956
  - Continues iterating until quality targets are achieved or maximum iterations reached
869
957
  - Best for tasks where iterative refinement is expected
958
+ - For parallel task execution within AUTO mode, see [parallel-execution.md](parallel-execution.md)
870
959
 
871
960
  **Trigger:**
872
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)