codingbuddy-rules 4.5.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.
- package/.ai-rules/adapters/antigravity.md +6 -6
- package/.ai-rules/adapters/claude-code.md +68 -4
- package/.ai-rules/adapters/codex.md +5 -5
- package/.ai-rules/adapters/cursor.md +2 -2
- package/.ai-rules/adapters/kiro.md +8 -8
- package/.ai-rules/adapters/opencode.md +7 -7
- package/.ai-rules/adapters/q.md +2 -2
- package/.ai-rules/agents/README.md +66 -16
- package/.ai-rules/agents/accessibility-specialist.json +2 -1
- package/.ai-rules/agents/act-mode.json +2 -1
- package/.ai-rules/agents/agent-architect.json +8 -7
- package/.ai-rules/agents/ai-ml-engineer.json +1 -0
- package/.ai-rules/agents/architecture-specialist.json +1 -0
- package/.ai-rules/agents/auto-mode.json +4 -2
- package/.ai-rules/agents/backend-developer.json +1 -0
- package/.ai-rules/agents/code-quality-specialist.json +1 -0
- package/.ai-rules/agents/code-reviewer.json +65 -64
- package/.ai-rules/agents/data-engineer.json +8 -7
- package/.ai-rules/agents/data-scientist.json +10 -9
- package/.ai-rules/agents/devops-engineer.json +1 -0
- package/.ai-rules/agents/documentation-specialist.json +1 -0
- package/.ai-rules/agents/eval-mode.json +20 -19
- package/.ai-rules/agents/event-architecture-specialist.json +1 -0
- package/.ai-rules/agents/frontend-developer.json +1 -0
- package/.ai-rules/agents/i18n-specialist.json +2 -1
- package/.ai-rules/agents/integration-specialist.json +1 -0
- package/.ai-rules/agents/migration-specialist.json +1 -0
- package/.ai-rules/agents/mobile-developer.json +8 -7
- package/.ai-rules/agents/observability-specialist.json +1 -0
- package/.ai-rules/agents/parallel-orchestrator.json +346 -0
- package/.ai-rules/agents/performance-specialist.json +1 -0
- package/.ai-rules/agents/plan-mode.json +3 -1
- package/.ai-rules/agents/plan-reviewer.json +208 -0
- package/.ai-rules/agents/platform-engineer.json +1 -0
- package/.ai-rules/agents/security-engineer.json +9 -8
- package/.ai-rules/agents/security-specialist.json +2 -1
- package/.ai-rules/agents/seo-specialist.json +1 -0
- package/.ai-rules/agents/software-engineer.json +1 -0
- package/.ai-rules/agents/solution-architect.json +11 -10
- package/.ai-rules/agents/systems-developer.json +9 -8
- package/.ai-rules/agents/technical-planner.json +11 -10
- package/.ai-rules/agents/test-engineer.json +7 -6
- package/.ai-rules/agents/test-strategy-specialist.json +1 -0
- package/.ai-rules/agents/tooling-engineer.json +4 -3
- package/.ai-rules/agents/ui-ux-designer.json +1 -0
- package/.ai-rules/keyword-modes.json +4 -4
- package/.ai-rules/rules/clarification-guide.md +14 -14
- package/.ai-rules/rules/core.md +73 -0
- package/.ai-rules/rules/parallel-execution.md +217 -0
- package/.ai-rules/skills/README.md +23 -1
- package/.ai-rules/skills/agent-design/SKILL.md +5 -0
- package/.ai-rules/skills/agent-design/examples/agent-template.json +58 -0
- package/.ai-rules/skills/agent-design/references/expertise-guidelines.md +112 -0
- package/.ai-rules/skills/agent-discussion/SKILL.md +199 -0
- package/.ai-rules/skills/agent-discussion-panel/SKILL.md +448 -0
- package/.ai-rules/skills/api-design/SKILL.md +5 -0
- package/.ai-rules/skills/api-design/examples/error-response.json +159 -0
- package/.ai-rules/skills/api-design/examples/openapi-template.yaml +393 -0
- package/.ai-rules/skills/build-fix/SKILL.md +234 -0
- package/.ai-rules/skills/code-explanation/SKILL.md +4 -0
- package/.ai-rules/skills/context-management/SKILL.md +1 -0
- package/.ai-rules/skills/cost-budget/SKILL.md +348 -0
- package/.ai-rules/skills/cross-repo-issues/SKILL.md +257 -0
- package/.ai-rules/skills/database-migration/SKILL.md +1 -0
- package/.ai-rules/skills/deepsearch/SKILL.md +214 -0
- package/.ai-rules/skills/deployment-checklist/SKILL.md +1 -0
- package/.ai-rules/skills/error-analysis/SKILL.md +1 -0
- package/.ai-rules/skills/finishing-a-development-branch/SKILL.md +281 -0
- package/.ai-rules/skills/frontend-design/SKILL.md +5 -0
- package/.ai-rules/skills/frontend-design/examples/component-template.tsx +203 -0
- package/.ai-rules/skills/frontend-design/references/css-patterns.md +243 -0
- package/.ai-rules/skills/git-master/SKILL.md +358 -0
- package/.ai-rules/skills/incident-response/SKILL.md +1 -0
- package/.ai-rules/skills/legacy-modernization/SKILL.md +1 -0
- package/.ai-rules/skills/mcp-builder/SKILL.md +7 -0
- package/.ai-rules/skills/mcp-builder/examples/resource-example.ts +233 -0
- package/.ai-rules/skills/mcp-builder/examples/tool-example.ts +203 -0
- package/.ai-rules/skills/mcp-builder/references/protocol-spec.md +215 -0
- package/.ai-rules/skills/performance-optimization/SKILL.md +3 -0
- package/.ai-rules/skills/plan-and-review/SKILL.md +115 -0
- package/.ai-rules/skills/pr-all-in-one/SKILL.md +15 -13
- package/.ai-rules/skills/pr-all-in-one/configuration-guide.md +7 -7
- package/.ai-rules/skills/pr-all-in-one/pr-templates.md +10 -10
- package/.ai-rules/skills/pr-review/SKILL.md +4 -0
- package/.ai-rules/skills/receiving-code-review/SKILL.md +347 -0
- package/.ai-rules/skills/refactoring/SKILL.md +1 -0
- package/.ai-rules/skills/requesting-code-review/SKILL.md +348 -0
- package/.ai-rules/skills/rule-authoring/SKILL.md +5 -0
- package/.ai-rules/skills/rule-authoring/examples/rule-template.md +142 -0
- package/.ai-rules/skills/rule-authoring/examples/trigger-patterns.md +126 -0
- package/.ai-rules/skills/security-audit/SKILL.md +4 -0
- package/.ai-rules/skills/skill-creator/SKILL.md +461 -0
- package/.ai-rules/skills/skill-creator/agents/analyzer.md +206 -0
- package/.ai-rules/skills/skill-creator/agents/comparator.md +167 -0
- package/.ai-rules/skills/skill-creator/agents/grader.md +152 -0
- package/.ai-rules/skills/skill-creator/assets/eval_review.html +289 -0
- package/.ai-rules/skills/skill-creator/assets/skill-template.md +43 -0
- package/.ai-rules/skills/skill-creator/eval-viewer/generate_review.py +496 -0
- package/.ai-rules/skills/skill-creator/references/frontmatter-guide.md +632 -0
- package/.ai-rules/skills/skill-creator/references/multi-tool-compat.md +480 -0
- package/.ai-rules/skills/skill-creator/references/schemas.md +784 -0
- package/.ai-rules/skills/skill-creator/scripts/aggregate_benchmark.py +302 -0
- package/.ai-rules/skills/skill-creator/scripts/init_skill.sh +196 -0
- package/.ai-rules/skills/skill-creator/scripts/run_loop.py +327 -0
- package/.ai-rules/skills/systematic-debugging/SKILL.md +1 -0
- package/.ai-rules/skills/tech-debt/SKILL.md +1 -0
- package/.ai-rules/skills/test-coverage-gate/SKILL.md +303 -0
- package/.ai-rules/skills/tmux-master/SKILL.md +491 -0
- package/.ai-rules/skills/using-git-worktrees/SKILL.md +368 -0
- package/.ai-rules/skills/verification-before-completion/SKILL.md +234 -0
- package/.ai-rules/skills/widget-slot-architecture/SKILL.md +6 -0
- package/.ai-rules/skills/widget-slot-architecture/examples/parallel-route-setup.tsx +206 -0
- package/.ai-rules/skills/widget-slot-architecture/examples/widget-component.tsx +250 -0
- package/.ai-rules/skills/writing-plans/SKILL.md +78 -0
- package/bin/cli.js +178 -0
- package/lib/init/detect-stack.js +148 -0
- package/lib/init/generate-config.js +31 -0
- package/lib/init/index.js +86 -0
- package/lib/init/prompt.js +60 -0
- package/lib/init/scaffold.js +67 -0
- package/lib/init/suggest-agent.js +46 -0
- package/package.json +10 -2
|
@@ -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
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
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
|
-
"
|
|
58
|
+
"work plan",
|
|
59
|
+
"TDD plan",
|
|
59
60
|
"TDD plan",
|
|
60
|
-
"technical-planner
|
|
61
|
+
"as technical-planner"
|
|
61
62
|
],
|
|
62
63
|
"intent_patterns": [
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"TDD
|
|
67
|
-
"bite.?sized
|
|
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
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
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
|
-
"
|
|
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": "
|
|
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
|
|
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": "
|
|
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
|
|
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
|
-
###
|
|
101
|
+
### Question 1/3
|
|
102
102
|
|
|
103
|
-
**
|
|
103
|
+
**Clarification needed for [Category]:**
|
|
104
104
|
|
|
105
|
-
[
|
|
105
|
+
[Question adapted to context]
|
|
106
106
|
|
|
107
|
-
- **A)** [
|
|
108
|
-
- **B)** [
|
|
109
|
-
- **C)** [
|
|
107
|
+
- **A)** [Option 1]
|
|
108
|
+
- **B)** [Option 2]
|
|
109
|
+
- **C)** [Option 3]
|
|
110
110
|
|
|
111
|
-
>
|
|
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
|
-
|
|
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"
|
|
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 |
|
package/.ai-rules/rules/core.md
CHANGED
|
@@ -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)
|