codingbuddy-rules 5.3.0 → 5.4.1
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 +2 -0
- package/.ai-rules/adapters/claude-code.md +170 -0
- package/.ai-rules/adapters/codex.md +2 -0
- package/.ai-rules/adapters/cursor.md +2 -0
- package/.ai-rules/adapters/kiro.md +2 -0
- package/.ai-rules/adapters/opencode.md +14 -8
- package/.ai-rules/adapters/q.md +2 -0
- package/.ai-rules/adapters/windsurf.md +2 -0
- package/.ai-rules/agents/README.md +6 -4
- package/.ai-rules/agents/act-mode.json +1 -1
- package/.ai-rules/agents/auto-mode.json +13 -8
- package/.ai-rules/agents/plan-mode.json +13 -8
- package/.ai-rules/rules/core.md +34 -21
- package/.ai-rules/rules/parallel-execution.md +27 -0
- package/.ai-rules/rules/pr-review-cycle.md +272 -0
- package/.ai-rules/rules/severity-classification.md +214 -0
- package/.ai-rules/skills/incident-response/severity-classification.md +17 -141
- package/.ai-rules/skills/pr-review/SKILL.md +2 -0
- package/lib/init/scaffold.js +4 -0
- package/package.json +2 -1
|
@@ -593,6 +593,8 @@ When AUTO keyword is detected, Antigravity calls `parse_mode` MCP tool which ret
|
|
|
593
593
|
- Success: `Critical = 0 AND High = 0`
|
|
594
594
|
- Failure: Max iterations reached (default: 3)
|
|
595
595
|
|
|
596
|
+
> **Severity and review-cycle canonical sources:** The `Critical`/`High` levels above are the **Code Review Severity** scale defined in [`../rules/severity-classification.md`](../rules/severity-classification.md#code-review-severity). The PR approval loop (CI gate → review → fix → re-review → approve) is specified in [`../rules/pr-review-cycle.md`](../rules/pr-review-cycle.md). Follow those canonical sources rather than re-deriving severity or approval criteria from this adapter.
|
|
597
|
+
|
|
596
598
|
### Configuration
|
|
597
599
|
|
|
598
600
|
Configure in `codingbuddy.config.json`:
|
|
@@ -577,6 +577,28 @@ SubAgent dispatch (outer)
|
|
|
577
577
|
→ Collect results via TaskOutput
|
|
578
578
|
```
|
|
579
579
|
|
|
580
|
+
**Example 3: TaskMaestro (outer) + SubAgent (inner, within worker)**
|
|
581
|
+
|
|
582
|
+
```
|
|
583
|
+
TaskMaestro session (outer, conductor)
|
|
584
|
+
├── Pane 1: Worker for Issue #101 (auth feature)
|
|
585
|
+
│ ├── Explore subAgent → researches existing auth patterns
|
|
586
|
+
│ ├── Plan subAgent → drafts TDD test plan
|
|
587
|
+
│ ├── [Worker writes code directly in its own worktree]
|
|
588
|
+
│ └── [Worker commits, pushes, creates PR, writes RESULT.json]
|
|
589
|
+
├── Pane 2: Worker for Issue #102 (dashboard UI)
|
|
590
|
+
│ └── Worker uses sub-agents for component research
|
|
591
|
+
│ (no cross-pane interference because each worker owns its worktree)
|
|
592
|
+
└── Pane 3: Review Agent (from review cycle protocol)
|
|
593
|
+
└── EVAL mode reviewer for completed PRs
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
This is the **recommended pattern for complex worker tasks** where parallel research or context protection would benefit the worker. The conductor still uses TaskMaestro for the outer dispatch — only the worker's internal orchestration uses sub-agents.
|
|
597
|
+
|
|
598
|
+
**Key invariant:** Sub-agents dispatched by a worker operate inside that worker's git worktree. Cross-pane file conflicts are impossible because each pane's worker owns its own isolated worktree.
|
|
599
|
+
|
|
600
|
+
See [`../rules/parallel-execution.md`](../rules/parallel-execution.md) "Conductor vs Worker Context" section for the authoritative rule.
|
|
601
|
+
|
|
580
602
|
### Execution Strategy Selection (MANDATORY)
|
|
581
603
|
|
|
582
604
|
When `parse_mode` returns `availableStrategies`, select the **outer transport** strategy:
|
|
@@ -770,6 +792,8 @@ AUTO implement user authentication with JWT
|
|
|
770
792
|
- **Success**: `Critical = 0 AND High = 0` severity issues
|
|
771
793
|
- **Failure**: Max iterations reached (default: 3, configurable via `auto.maxIterations`)
|
|
772
794
|
|
|
795
|
+
> **Severity and review-cycle canonical sources:** The `Critical`/`High` levels above are the **Code Review Severity** scale defined in [`../rules/severity-classification.md`](../rules/severity-classification.md#code-review-severity). The approval loop Claude Code runs over a PR (CI gate → review → fix → re-review → approve) is specified in [`../rules/pr-review-cycle.md`](../rules/pr-review-cycle.md). Follow those canonical sources rather than re-deriving severity or approval criteria from this adapter.
|
|
796
|
+
|
|
773
797
|
### Configuration
|
|
774
798
|
|
|
775
799
|
Configure AUTO mode in `codingbuddy.config.json`:
|
|
@@ -818,3 +842,149 @@ module.exports = {
|
|
|
818
842
|
| Iterations | Single pass per mode | Multiple cycles until quality met |
|
|
819
843
|
| Exit | User decides completion | Quality criteria or max iterations |
|
|
820
844
|
| Intervention | Required for each step | Only when requested or on failure |
|
|
845
|
+
|
|
846
|
+
## EVAL Review Agent Prompt Template
|
|
847
|
+
|
|
848
|
+
Canonical template for review agents that evaluate PRs in EVAL mode. Use this when a conductor, review pane, or solo workflow needs to generate a structured review prompt.
|
|
849
|
+
|
|
850
|
+
### When to Use
|
|
851
|
+
|
|
852
|
+
- **Conductor review**: The conductor generates this prompt for itself or a dedicated review pane
|
|
853
|
+
- **TaskMaestro review pane**: The review agent receives this prompt as its `TASK.md`
|
|
854
|
+
- **Solo workflow**: A developer enters EVAL mode to review their own PR before requesting human review
|
|
855
|
+
|
|
856
|
+
### Template
|
|
857
|
+
|
|
858
|
+
The review agent prompt follows this structure:
|
|
859
|
+
|
|
860
|
+
```
|
|
861
|
+
EVAL: review PR #<PR_NUMBER> for issue #<ISSUE_NUMBER>
|
|
862
|
+
|
|
863
|
+
Review the PR against the linked issue's acceptance criteria.
|
|
864
|
+
Use review_pr MCP tool, dispatch recommended specialists, and follow pr-review-cycle.md protocol.
|
|
865
|
+
Approve only when Critical = 0 AND High = 0.
|
|
866
|
+
```
|
|
867
|
+
|
|
868
|
+
### Step-by-Step Execution
|
|
869
|
+
|
|
870
|
+
When the review agent receives the prompt above, it MUST execute these steps in order:
|
|
871
|
+
|
|
872
|
+
#### 1. Enter EVAL Mode
|
|
873
|
+
|
|
874
|
+
```typescript
|
|
875
|
+
const result = await parse_mode({
|
|
876
|
+
prompt: "EVAL: review PR #<PR_NUMBER> for issue #<ISSUE_NUMBER>"
|
|
877
|
+
});
|
|
878
|
+
```
|
|
879
|
+
|
|
880
|
+
This returns:
|
|
881
|
+
- `mode: "EVAL"` with code-reviewer as primary agent
|
|
882
|
+
- `parallelAgentsRecommendation` with EVAL-mode specialists
|
|
883
|
+
- `dispatchReady` (if auto-dispatch is enabled)
|
|
884
|
+
|
|
885
|
+
#### 2. Fetch Structured Review Data
|
|
886
|
+
|
|
887
|
+
```typescript
|
|
888
|
+
const reviewData = await review_pr({
|
|
889
|
+
pr_number: <PR_NUMBER>,
|
|
890
|
+
issue_number: <ISSUE_NUMBER> // optional, for spec compliance
|
|
891
|
+
});
|
|
892
|
+
```
|
|
893
|
+
|
|
894
|
+
The `review_pr` tool returns:
|
|
895
|
+
- PR metadata (title, author, base/head branches)
|
|
896
|
+
- Diff summary and changed files list
|
|
897
|
+
- Auto-generated checklists for changed file domains
|
|
898
|
+
- Recommended specialist agents based on file patterns
|
|
899
|
+
|
|
900
|
+
#### 3. Dispatch Recommended Specialists
|
|
901
|
+
|
|
902
|
+
Use the specialists from `parse_mode` or `review_pr` response:
|
|
903
|
+
|
|
904
|
+
```typescript
|
|
905
|
+
// Option A: Auto-dispatch from parse_mode (preferred)
|
|
906
|
+
if (result.dispatchReady?.parallelAgents) {
|
|
907
|
+
for (const agent of result.dispatchReady.parallelAgents) {
|
|
908
|
+
Agent({
|
|
909
|
+
subagent_type: agent.dispatchParams.subagent_type,
|
|
910
|
+
prompt: agent.dispatchParams.prompt,
|
|
911
|
+
description: agent.dispatchParams.description,
|
|
912
|
+
run_in_background: true,
|
|
913
|
+
});
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
// Option B: Manual dispatch from review_pr recommendations
|
|
918
|
+
const dispatch = await dispatch_agents({
|
|
919
|
+
mode: "EVAL",
|
|
920
|
+
specialists: reviewData.recommendedSpecialists,
|
|
921
|
+
taskDescription: `Review PR #${prNumber}`,
|
|
922
|
+
targetFiles: reviewData.changedFiles,
|
|
923
|
+
});
|
|
924
|
+
```
|
|
925
|
+
|
|
926
|
+
Typical EVAL-mode specialists: `security-specialist`, `accessibility-specialist`, `performance-specialist`, `code-quality-specialist`.
|
|
927
|
+
|
|
928
|
+
#### 4. Collect and Classify Findings
|
|
929
|
+
|
|
930
|
+
Collect all specialist results and classify each finding using the [Code Review Severity](../rules/severity-classification.md#code-review-severity) scale:
|
|
931
|
+
|
|
932
|
+
| Severity | Meaning | Merge Gate |
|
|
933
|
+
|----------|---------|------------|
|
|
934
|
+
| `critical` | Blocks approval, must fix | BLOCKED |
|
|
935
|
+
| `high` | Should fix before merge | BLOCKED (unless explicitly deferred) |
|
|
936
|
+
| `medium` | Worth addressing, does not gate merge | APPROVED with comments |
|
|
937
|
+
| `low` | Style/polish suggestions | APPROVED |
|
|
938
|
+
|
|
939
|
+
#### 5. Write the Review
|
|
940
|
+
|
|
941
|
+
Post the structured review on the PR:
|
|
942
|
+
|
|
943
|
+
```bash
|
|
944
|
+
gh pr review <PR_NUMBER> --comment --body "<structured review>"
|
|
945
|
+
```
|
|
946
|
+
|
|
947
|
+
Review body format (per [`pr-review-cycle.md`](../rules/pr-review-cycle.md)):
|
|
948
|
+
|
|
949
|
+
```markdown
|
|
950
|
+
## Review: [APPROVE | CHANGES_REQUESTED]
|
|
951
|
+
### CI Status: [PASS | FAIL]
|
|
952
|
+
### Issues Found:
|
|
953
|
+
- [critical]: <description> — <file:line>
|
|
954
|
+
- [high]: <description> — <file:line>
|
|
955
|
+
- [medium]: <description> — <file:line>
|
|
956
|
+
### Recommendation: [APPROVE | REQUEST_CHANGES]
|
|
957
|
+
```
|
|
958
|
+
|
|
959
|
+
#### 6. Approval Gate
|
|
960
|
+
|
|
961
|
+
Follow the approval criteria from [`pr-review-cycle.md`](../rules/pr-review-cycle.md):
|
|
962
|
+
|
|
963
|
+
- **Approve** when: CI green, Critical = 0, High = 0 (or explicitly deferred with ticket)
|
|
964
|
+
- **Request changes** when: any Critical or High finding remains unresolved
|
|
965
|
+
|
|
966
|
+
```bash
|
|
967
|
+
# Approve (when reviewer is not the PR author)
|
|
968
|
+
gh pr review <PR_NUMBER> --approve --body "LGTM - all review comments addressed"
|
|
969
|
+
|
|
970
|
+
# Request changes
|
|
971
|
+
gh pr review <PR_NUMBER> --request-changes --body "<structured review>"
|
|
972
|
+
```
|
|
973
|
+
|
|
974
|
+
### Complete Prompt Example
|
|
975
|
+
|
|
976
|
+
For a conductor generating a review agent task:
|
|
977
|
+
|
|
978
|
+
```markdown
|
|
979
|
+
EVAL: review PR #42 for issue #40
|
|
980
|
+
|
|
981
|
+
Review the PR against the linked issue's acceptance criteria.
|
|
982
|
+
Use review_pr MCP tool, dispatch recommended specialists, and follow pr-review-cycle.md protocol.
|
|
983
|
+
Approve only when Critical = 0 AND High = 0.
|
|
984
|
+
```
|
|
985
|
+
|
|
986
|
+
### Canonical References
|
|
987
|
+
|
|
988
|
+
- **Severity scale**: [`severity-classification.md`](../rules/severity-classification.md#code-review-severity) — Critical/High/Medium/Low definitions
|
|
989
|
+
- **Review protocol**: [`pr-review-cycle.md`](../rules/pr-review-cycle.md) — CI gate, review steps, approval criteria, commit hygiene
|
|
990
|
+
- **MCP tool**: `review_pr(pr_number, issue_number?, timeout?)` — structured PR review data
|
|
@@ -619,6 +619,8 @@ AUTO implement user authentication with JWT
|
|
|
619
619
|
- Success: `Critical = 0 AND High = 0`
|
|
620
620
|
- Failure: Max iterations reached (default: 3)
|
|
621
621
|
|
|
622
|
+
> **Severity and review-cycle canonical sources:** The `Critical`/`High` levels above are the **Code Review Severity** scale defined in [`../rules/severity-classification.md`](../rules/severity-classification.md#code-review-severity). The PR approval loop (CI gate → review → fix → re-review → approve) is specified in [`../rules/pr-review-cycle.md`](../rules/pr-review-cycle.md). Follow those canonical sources rather than re-deriving severity or approval criteria from this adapter.
|
|
623
|
+
|
|
622
624
|
### Copilot Integration
|
|
623
625
|
|
|
624
626
|
When using GitHub Copilot Chat with AUTO mode:
|
|
@@ -429,6 +429,8 @@ When AUTO keyword is detected, Cursor calls `parse_mode` MCP tool which returns
|
|
|
429
429
|
- Success: `Critical = 0 AND High = 0`
|
|
430
430
|
- Failure: Max iterations reached (default: 3)
|
|
431
431
|
|
|
432
|
+
> **Severity and review-cycle canonical sources:** The `Critical`/`High` levels above are the **Code Review Severity** scale defined in [`../rules/severity-classification.md`](../rules/severity-classification.md#code-review-severity). The PR approval loop (CI gate → review → fix → re-review → approve) is specified in [`../rules/pr-review-cycle.md`](../rules/pr-review-cycle.md). Follow those canonical sources rather than re-deriving severity or approval criteria from this adapter.
|
|
433
|
+
|
|
432
434
|
### Configuration
|
|
433
435
|
|
|
434
436
|
Configure in `codingbuddy.config.json`:
|
|
@@ -552,6 +552,8 @@ When AUTO keyword is detected, Kiro calls `parse_mode` MCP tool which returns AU
|
|
|
552
552
|
- Success: `Critical = 0 AND High = 0`
|
|
553
553
|
- Failure: Max iterations reached (default: 3)
|
|
554
554
|
|
|
555
|
+
> **Severity and review-cycle canonical sources:** The `Critical`/`High` levels above are the **Code Review Severity** scale defined in [`../rules/severity-classification.md`](../rules/severity-classification.md#code-review-severity). The PR approval loop (CI gate → review → fix → re-review → approve) is specified in [`../rules/pr-review-cycle.md`](../rules/pr-review-cycle.md). Follow those canonical sources rather than re-deriving severity or approval criteria from this adapter.
|
|
556
|
+
|
|
555
557
|
### Configuration
|
|
556
558
|
|
|
557
559
|
Configure in `codingbuddy.config.json`:
|
|
@@ -145,11 +145,13 @@ Update your configuration file (`.opencode.json` or `crush.json`):
|
|
|
145
145
|
|
|
146
146
|
| Codingbuddy Agent | OpenCode Agent | Purpose |
|
|
147
147
|
|------------------|----------------|---------|
|
|
148
|
-
| **plan-mode.json** | `plan-mode` | PLAN mode workflow (delegates to
|
|
149
|
-
| **act-mode.json** | `act-mode` | ACT mode workflow (delegates to
|
|
148
|
+
| **plan-mode.json** | `plan-mode` | PLAN mode workflow (delegates to solution-architect or technical-planner based on task complexity) |
|
|
149
|
+
| **act-mode.json** | `act-mode` | ACT mode workflow (delegates to software-engineer or domain specialist per ACT resolution rules) |
|
|
150
150
|
| **eval-mode.json** | `eval-mode` | EVAL mode workflow (delegates to code-reviewer) |
|
|
151
151
|
| **auto-mode.json** | N/A (keyword-triggered) | AUTO mode workflow (autonomous PLAN→ACT→EVAL cycle) |
|
|
152
|
-
| **
|
|
152
|
+
| **solution-architect.json** | N/A (delegate) | PLAN mode system-level design and architecture |
|
|
153
|
+
| **technical-planner.json** | N/A (delegate) | PLAN mode implementation-level TDD planning |
|
|
154
|
+
| **frontend-developer.json** | N/A (delegate) | ACT mode implementation for frontend projects |
|
|
153
155
|
| **backend-developer.json** | `backend` | Backend development (Node.js, Python, Go, Java, Rust) |
|
|
154
156
|
| **code-reviewer.json** | N/A (delegate) | Code quality evaluation implementation |
|
|
155
157
|
| **architecture-specialist.json** | `architect` | Architecture and design patterns |
|
|
@@ -162,7 +164,7 @@ Update your configuration file (`.opencode.json` or `crush.json`):
|
|
|
162
164
|
|
|
163
165
|
- **Mode Agents** (`plan-mode`, `act-mode`, `eval-mode`, `auto-mode`): Workflow orchestrators that delegate to appropriate implementation agents
|
|
164
166
|
- **Specialist Agents** (`architect`, `security`, etc.): Domain-specific expertise for specialized tasks
|
|
165
|
-
- **Delegate Agents
|
|
167
|
+
- **Delegate Agents**: PLAN mode delegates to `solution-architect` or `technical-planner`; ACT mode delegates to `software-engineer` or a domain specialist (e.g., `frontend-developer`, `backend-developer`); EVAL mode delegates to `code-reviewer`
|
|
166
168
|
|
|
167
169
|
### 3. MCP Server Integration
|
|
168
170
|
|
|
@@ -292,15 +294,17 @@ The `parse_mode` tool now returns additional Mode Agent information and dynamic
|
|
|
292
294
|
"language": "en",
|
|
293
295
|
"languageInstruction": "Always respond in English.",
|
|
294
296
|
"agent": "plan-mode",
|
|
295
|
-
"delegates_to": "
|
|
297
|
+
"delegates_to": "solution-architect",
|
|
296
298
|
"delegate_agent_info": {
|
|
297
|
-
"name": "
|
|
298
|
-
"description": "
|
|
299
|
-
"expertise": ["
|
|
299
|
+
"name": "Solution Architect",
|
|
300
|
+
"description": "High-level system design and architecture planning specialist",
|
|
301
|
+
"expertise": ["System Architecture", "Technology Selection", "Integration Patterns", "Scalability Planning"]
|
|
300
302
|
}
|
|
301
303
|
}
|
|
302
304
|
```
|
|
303
305
|
|
|
306
|
+
> **Note:** `delegates_to` is resolved dynamically based on prompt intent. System-level design prompts resolve to `solution-architect`; implementation-level planning prompts resolve to `technical-planner`.
|
|
307
|
+
|
|
304
308
|
**New Fields:**
|
|
305
309
|
- `language`: Language code from codingbuddy.config.json
|
|
306
310
|
- `languageInstruction`: Formatted instruction text for AI assistants (🆕)
|
|
@@ -774,6 +778,8 @@ AUTO Build a new user authentication feature
|
|
|
774
778
|
- Success: `Critical = 0 AND High = 0`
|
|
775
779
|
- Failure: Max iterations reached (default: 3)
|
|
776
780
|
|
|
781
|
+
> **Severity and review-cycle canonical sources:** The `Critical`/`High` levels above are the **Code Review Severity** scale defined in [`../rules/severity-classification.md`](../rules/severity-classification.md#code-review-severity). The PR approval loop (CI gate → review → fix → re-review → approve) is specified in [`../rules/pr-review-cycle.md`](../rules/pr-review-cycle.md). Follow those canonical sources rather than re-deriving severity or approval criteria from this adapter.
|
|
782
|
+
|
|
777
783
|
### OpenCode Agent Integration
|
|
778
784
|
|
|
779
785
|
AUTO mode describes an autonomous PLAN→ACT→EVAL cycle. However, agent switching behavior differs by platform:
|
package/.ai-rules/adapters/q.md
CHANGED
|
@@ -198,6 +198,8 @@ AUTO create a new Lambda function
|
|
|
198
198
|
- Success: `Critical = 0 AND High = 0`
|
|
199
199
|
- Failure: Max iterations reached (default: 3)
|
|
200
200
|
|
|
201
|
+
> **Severity and review-cycle canonical sources:** The `Critical`/`High` levels above are the **Code Review Severity** scale defined in [`../rules/severity-classification.md`](../rules/severity-classification.md#code-review-severity). The PR approval loop (CI gate → review → fix → re-review → approve) is specified in [`../rules/pr-review-cycle.md`](../rules/pr-review-cycle.md). Follow those canonical sources rather than re-deriving severity or approval criteria from this adapter.
|
|
202
|
+
|
|
201
203
|
### AWS Integration with AUTO Mode
|
|
202
204
|
|
|
203
205
|
Amazon Q's AWS expertise complements AUTO mode:
|
|
@@ -299,6 +299,8 @@ Use the `AUTO` keyword at the start of your message:
|
|
|
299
299
|
- Success: `Critical = 0 AND High = 0`
|
|
300
300
|
- Failure: Max iterations reached (default: 3)
|
|
301
301
|
|
|
302
|
+
> **Severity and review-cycle canonical sources:** The `Critical`/`High` levels above are the **Code Review Severity** scale defined in [`../rules/severity-classification.md`](../rules/severity-classification.md#code-review-severity). The PR approval loop (CI gate → review → fix → re-review → approve) is specified in [`../rules/pr-review-cycle.md`](../rules/pr-review-cycle.md). Follow those canonical sources rather than re-deriving severity or approval criteria from this adapter.
|
|
303
|
+
|
|
302
304
|
### Configuration
|
|
303
305
|
|
|
304
306
|
Configure in `codingbuddy.config.json`:
|
|
@@ -342,7 +342,7 @@ This ensures Mode Agents appear first in agent selection interfaces.
|
|
|
342
342
|
Mode Agents handle workflow orchestration and delegate to implementation experts:
|
|
343
343
|
|
|
344
344
|
- **Plan Mode** (`plan-mode.json`): Analysis and planning (delegates to primary developer)
|
|
345
|
-
- **Act Mode** (`act-mode.json`): Implementation execution (delegates to
|
|
345
|
+
- **Act Mode** (`act-mode.json`): Implementation execution (delegates to software-engineer or a domain specialist)
|
|
346
346
|
- **Eval Mode** (`eval-mode.json`): Quality evaluation (delegates to code reviewer)
|
|
347
347
|
- **Auto Mode** (`auto-mode.json`): Autonomous PLAN→ACT→EVAL cycle until quality achieved (Critical=0, High=0)
|
|
348
348
|
|
|
@@ -350,9 +350,11 @@ Mode Agents handle workflow orchestration and delegate to implementation experts
|
|
|
350
350
|
|
|
351
351
|
These agents are automatically activated via Mode Agent delegation:
|
|
352
352
|
|
|
353
|
-
- **
|
|
354
|
-
-
|
|
355
|
-
-
|
|
353
|
+
- **Planning Agents**: Activated by plan-mode (resolved by intent)
|
|
354
|
+
- `solution-architect.json`: System-level design (new features, architecture decisions, technology selection)
|
|
355
|
+
- `technical-planner.json`: Implementation-level planning (bite-sized TDD tasks with exact file paths)
|
|
356
|
+
- **Implementation Agent**: Activated by act-mode (resolved by intent / project config)
|
|
357
|
+
- Example: `frontend-developer.json` (React/Next.js projects), `backend-developer.json`, `mobile-developer.json`, or the language-agnostic `software-engineer.json`
|
|
356
358
|
- **Code Reviewer** (`code-reviewer.json`): Activated by eval-mode
|
|
357
359
|
|
|
358
360
|
### Domain Specialists
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"title": "Act Mode Agent",
|
|
7
7
|
"type": "utility",
|
|
8
8
|
"mode": "ACT",
|
|
9
|
-
"purpose": "Mode Agent - delegates to
|
|
9
|
+
"purpose": "Mode Agent - delegates to the resolved implementation agent (software-engineer by default, domain specialist when selected)",
|
|
10
10
|
"expertise": [
|
|
11
11
|
"TDD cycle execution (Red → Green → Refactor)",
|
|
12
12
|
"Code quality standards compliance",
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"title": "Auto Mode Agent",
|
|
7
7
|
"type": "utility",
|
|
8
8
|
"mode": "AUTO",
|
|
9
|
-
"purpose": "Mode Agent - autonomously cycles through PLAN → ACT → EVAL, delegates to
|
|
9
|
+
"purpose": "Mode Agent - autonomously cycles through PLAN → ACT → EVAL, delegates to planning agents (Solution Architect or Technical Planner) during PLAN phase and to the resolved implementation agent during ACT phase",
|
|
10
10
|
"expertise": [
|
|
11
11
|
"Autonomous PLAN → ACT → EVAL cycle execution",
|
|
12
12
|
"Quality-driven iteration (Critical/High issue elimination)",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"Multi-dimensional code quality evaluation",
|
|
15
15
|
"Self-correcting development workflow"
|
|
16
16
|
],
|
|
17
|
-
"delegates_to": "
|
|
17
|
+
"delegates_to": "technical-planner",
|
|
18
18
|
"responsibilities": [
|
|
19
19
|
"Execute autonomous PLAN → ACT → EVAL cycles until quality targets met",
|
|
20
20
|
"PLAN phase: Analyze requirements, define TDD test cases, review architecture",
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"verification_key": "mode_indicator"
|
|
45
45
|
},
|
|
46
46
|
"🔴 agent_indicator": {
|
|
47
|
-
"rule": "MUST print '## Agent :
|
|
47
|
+
"rule": "MUST print '## Agent : [Selected Agent Name]' — during PLAN phase a planning agent (Solution Architect or Technical Planner), during ACT phase the resolved implementation agent (Software Engineer or domain specialist)",
|
|
48
48
|
"verification_key": "agent_indicator"
|
|
49
49
|
},
|
|
50
50
|
"🔴 delegate_activation": {
|
|
51
|
-
"rule": "MUST activate delegate agent
|
|
51
|
+
"rule": "MUST activate the appropriate delegate agent framework per phase — solution-architect or technical-planner for PLAN; software-engineer or domain specialist for ACT; code-reviewer for EVAL",
|
|
52
52
|
"verification_key": "delegate_activation"
|
|
53
53
|
},
|
|
54
54
|
"🔴 autonomous_cycle": {
|
|
@@ -87,9 +87,14 @@
|
|
|
87
87
|
}
|
|
88
88
|
},
|
|
89
89
|
"delegate_agent": {
|
|
90
|
-
"primary": "
|
|
91
|
-
"description": "
|
|
92
|
-
"
|
|
90
|
+
"primary": "technical-planner",
|
|
91
|
+
"description": "AUTO mode delegates per phase. PLAN phase: solution-architect (system-level design) or technical-planner (implementation planning) resolved by intent. ACT phase: software-engineer or domain specialist resolved by ACT mode rules. EVAL phase: code-reviewer.",
|
|
92
|
+
"per_phase": {
|
|
93
|
+
"plan": "solution-architect or technical-planner (resolved from prompt intent)",
|
|
94
|
+
"act": "software-engineer or domain specialist (resolved per ACT mode rules)",
|
|
95
|
+
"eval": "code-reviewer"
|
|
96
|
+
},
|
|
97
|
+
"integration": "Applies each phase's designated agent workflow — planning via architect/planner, implementation via implementation agent, evaluation via code reviewer"
|
|
93
98
|
},
|
|
94
99
|
"communication": {
|
|
95
100
|
"style": "Autonomous execution with clear iteration and phase progress reporting",
|
|
@@ -98,7 +103,7 @@
|
|
|
98
103
|
"verification_guide": {
|
|
99
104
|
"mode_compliance": [
|
|
100
105
|
"✅ Verify '# Mode: AUTO [Iteration N]' is displayed",
|
|
101
|
-
"✅ Verify '## Agent :
|
|
106
|
+
"✅ Verify '## Agent : [Selected Agent Name]' is displayed per phase (planning agent during PLAN, implementation agent during ACT, code-reviewer during EVAL)",
|
|
102
107
|
"✅ Verify response in configured language",
|
|
103
108
|
"✅ Verify autonomous PLAN → ACT → EVAL cycle execution",
|
|
104
109
|
"✅ Verify iteration tracking with quality metrics",
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"title": "Plan Mode Agent",
|
|
8
8
|
"type": "utility",
|
|
9
9
|
"mode": "PLAN",
|
|
10
|
-
"purpose": "Mode Agent - delegates to
|
|
10
|
+
"purpose": "Mode Agent - delegates to Solution Architect or Technical Planner based on task complexity",
|
|
11
11
|
"expertise": [
|
|
12
12
|
"Work planning",
|
|
13
13
|
"TDD-oriented design",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"Todo list creation",
|
|
16
16
|
"Requirements analysis"
|
|
17
17
|
],
|
|
18
|
-
"delegates_to": "
|
|
18
|
+
"delegates_to": "technical-planner",
|
|
19
19
|
"responsibilities": [
|
|
20
20
|
"Analyze and clarify user requirements",
|
|
21
21
|
"Prioritize test case definition from TDD perspective",
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"verification_key": "mode_indicator"
|
|
45
45
|
},
|
|
46
46
|
"🔴 agent_indicator": {
|
|
47
|
-
"rule": "MUST print '## Agent :
|
|
47
|
+
"rule": "MUST print '## Agent : [Selected Planning Agent Name]' (e.g., '## Agent : Solution Architect' for system-level design, '## Agent : Technical Planner' for implementation-level plans — actual name depends on task complexity resolution)",
|
|
48
48
|
"verification_key": "agent_indicator"
|
|
49
49
|
},
|
|
50
50
|
"🔴 delegate_activation": {
|
|
51
|
-
"rule": "MUST activate delegate agent (
|
|
51
|
+
"rule": "MUST activate delegate agent (solution-architect or technical-planner) framework for detailed planning",
|
|
52
52
|
"verification_key": "delegate_activation"
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -72,9 +72,14 @@
|
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
74
|
"delegate_agent": {
|
|
75
|
-
"primary": "
|
|
76
|
-
"description": "
|
|
77
|
-
"
|
|
75
|
+
"primary": "technical-planner",
|
|
76
|
+
"description": "PLAN mode selects planning agent dynamically. Resolution order: explicit request > intent pattern (architecture/design → solution-architect; implementation plan/TDD → technical-planner) > default: technical-planner",
|
|
77
|
+
"resolution_order": [
|
|
78
|
+
"1. Explicit agent request in prompt (e.g., 'as solution-architect')",
|
|
79
|
+
"2. Intent pattern matching (architecture/system design → solution-architect; implementation plan/TDD/bite-sized tasks → technical-planner)",
|
|
80
|
+
"3. Default: technical-planner"
|
|
81
|
+
],
|
|
82
|
+
"integration": "Applies Solution Architect's design workflow for system-level tasks or Technical Planner's TDD planning workflow for implementation-level tasks"
|
|
78
83
|
},
|
|
79
84
|
"communication": {
|
|
80
85
|
"style": "Systematic approach focused on planning",
|
|
@@ -83,7 +88,7 @@
|
|
|
83
88
|
"verification_guide": {
|
|
84
89
|
"mode_compliance": [
|
|
85
90
|
"✅ Verify '# Mode: PLAN' is displayed",
|
|
86
|
-
"✅ Verify '## Agent :
|
|
91
|
+
"✅ Verify '## Agent : [Selected Planning Agent Name]' (e.g., Solution Architect or Technical Planner) is displayed",
|
|
87
92
|
"✅ Verify response in configured language",
|
|
88
93
|
"✅ Verify todo list created with todo_write tool",
|
|
89
94
|
"✅ Verify all todo items created in pending status",
|
package/.ai-rules/rules/core.md
CHANGED
|
@@ -87,9 +87,11 @@ feat(auth): add token validation with session management
|
|
|
87
87
|
- After creating plan, user can type `ACT` to execute
|
|
88
88
|
|
|
89
89
|
**🔴 Agent Activation (STRICT):**
|
|
90
|
-
- When in PLAN mode, **
|
|
91
|
-
-
|
|
92
|
-
-
|
|
90
|
+
- When in PLAN mode, either **Solution Architect** (`.ai-rules/agents/solution-architect.json`) or **Technical Planner** (`.ai-rules/agents/technical-planner.json`) **MUST** be automatically activated based on task complexity
|
|
91
|
+
- Use **Solution Architect** for system-level design (new features, architecture decisions, technology selection)
|
|
92
|
+
- Use **Technical Planner** for implementation-level planning (bite-sized TDD tasks with exact file paths)
|
|
93
|
+
- The selected Planning Agent's workflow framework and all mandatory requirements MUST be followed
|
|
94
|
+
- See `.ai-rules/agents/solution-architect.json` and `.ai-rules/agents/technical-planner.json` for complete planning frameworks
|
|
93
95
|
|
|
94
96
|
**Purpose:**
|
|
95
97
|
Create actionable implementation plans following TDD and augmented coding principles
|
|
@@ -219,15 +221,15 @@ See `.ai-rules/rules/clarification-guide.md` for detailed question guidelines.
|
|
|
219
221
|
|
|
220
222
|
---
|
|
221
223
|
|
|
222
|
-
**What PLAN does (
|
|
224
|
+
**What PLAN does (via Solution Architect or Technical Planner):**
|
|
223
225
|
|
|
224
|
-
1. **Analyze Requirements** (via
|
|
226
|
+
1. **Analyze Requirements** (via selected Planning Agent)
|
|
225
227
|
- Understand user requirements
|
|
226
228
|
- Identify core logic vs presentation components
|
|
227
229
|
- Determine TDD (test-first) vs Test-After approach
|
|
228
|
-
- 🔴 **Required**: Follow
|
|
230
|
+
- 🔴 **Required**: Follow the selected Planning Agent's workflow framework (Solution Architect for system-level design, Technical Planner for implementation-level plans)
|
|
229
231
|
|
|
230
|
-
2. **Plan Implementation** (via
|
|
232
|
+
2. **Plan Implementation** (via selected Planning Agent workflow)
|
|
231
233
|
- 🔴 TDD for core logic (business logic, utilities, data access layers)
|
|
232
234
|
- 🔴 Test-After for presentation (UI components, views)
|
|
233
235
|
- Define file structure (types, constants, utils)
|
|
@@ -235,7 +237,7 @@ See `.ai-rules/rules/clarification-guide.md` for detailed question guidelines.
|
|
|
235
237
|
- Consider framework-specific component patterns
|
|
236
238
|
- 🔴 **Required**: Reference Planning Specialist Agents for comprehensive planning (Architecture, Test Strategy, Performance, Security, Accessibility, SEO, Design System, Documentation, Code Quality)
|
|
237
239
|
|
|
238
|
-
3. **Output Structured PLAN** (via
|
|
240
|
+
3. **Output Structured PLAN** (via selected Planning Agent)
|
|
239
241
|
- Step-by-step implementation plan
|
|
240
242
|
- Clear task breakdown
|
|
241
243
|
- File naming conventions
|
|
@@ -243,10 +245,10 @@ See `.ai-rules/rules/clarification-guide.md` for detailed question guidelines.
|
|
|
243
245
|
- Type safety requirements
|
|
244
246
|
- 🔴 **Required**: Create todo list using `todo_write` tool for all implementation steps
|
|
245
247
|
|
|
246
|
-
**Output Format (via
|
|
248
|
+
**Output Format (via selected Planning Agent):**
|
|
247
249
|
```
|
|
248
250
|
# Mode: PLAN
|
|
249
|
-
## Agent : [
|
|
251
|
+
## Agent : [Solution Architect | Technical Planner]
|
|
250
252
|
|
|
251
253
|
## 📋 Plan Overview
|
|
252
254
|
[High-level summary of what will be implemented]
|
|
@@ -405,7 +407,7 @@ To preserve this planning session for future reference:
|
|
|
405
407
|
```
|
|
406
408
|
|
|
407
409
|
**🔴 Required:**
|
|
408
|
-
- All plans must follow the
|
|
410
|
+
- All plans must follow the selected Planning Agent's workflow framework (Solution Architect for system-level design, Technical Planner for implementation-level plans)
|
|
409
411
|
- Respond in the language specified in the agent's communication.language setting
|
|
410
412
|
- Follow framework-specific component patterns as defined in project configuration
|
|
411
413
|
- 🔴 **MUST use `todo_write` tool** to create todo list for all implementation steps
|
|
@@ -415,11 +417,11 @@ To preserve this planning session for future reference:
|
|
|
415
417
|
- Confidence levels: 🟢 High (0.8+), 🟡 Medium (0.5-0.79), 🔴 Low (<0.5)
|
|
416
418
|
|
|
417
419
|
**Verification:**
|
|
418
|
-
- Agent name should appear as `## Agent : [
|
|
420
|
+
- Agent name should appear as `## Agent : [Solution Architect | Technical Planner]` in response
|
|
419
421
|
- Mode indicator `# Mode: PLAN` should be first line
|
|
420
422
|
- Plan should include structured sections: Plan Overview, Structured Reasoning (COMPLEX only), Todo List (created with todo_write), Implementation Steps, Planning Specialist sections (when applicable), Risk Assessment, File Structure, Quality Checklist
|
|
421
423
|
- Todo list must be created using `todo_write` tool before outputting plan
|
|
422
|
-
- All mandatory checklist items from the
|
|
424
|
+
- All mandatory checklist items from the selected Planning Agent should be considered during planning
|
|
423
425
|
- Planning Specialist Agents should be referenced when planning respective areas (Architecture, Test Strategy, Performance, Security, Accessibility, SEO, Design System, Documentation, Code Quality)
|
|
424
426
|
- **SRP Verification (COMPLEX tasks):**
|
|
425
427
|
- Structured Reasoning section must be present
|
|
@@ -1020,7 +1022,8 @@ Autonomous iterative development - automatically cycling through planning, imple
|
|
|
1020
1022
|
| `auto.maxIterations` | 3 | 1-10 | Maximum PLAN→ACT→EVAL cycles before forced exit |
|
|
1021
1023
|
|
|
1022
1024
|
**🔴 Agent Activation (STRICT):**
|
|
1023
|
-
- When AUTO mode is triggered, **
|
|
1025
|
+
- When AUTO mode is triggered, the PLAN phase **MUST** activate **Solution Architect** (`.ai-rules/agents/solution-architect.json`) or **Technical Planner** (`.ai-rules/agents/technical-planner.json`) based on task complexity
|
|
1026
|
+
- During the ACT phase, the resolved implementation agent (e.g., **Software Engineer** `.ai-rules/agents/software-engineer.json` or a domain specialist) **MUST** be automatically activated per ACT mode resolution rules
|
|
1024
1027
|
- During EVAL phase, **Code Reviewer Agent** (`.ai-rules/agents/code-reviewer.json`) **MUST** be automatically activated
|
|
1025
1028
|
- The respective Agent's workflow framework and all mandatory requirements MUST be followed
|
|
1026
1029
|
- See `.ai-rules/agents/` for complete agent frameworks
|
|
@@ -1118,8 +1121,8 @@ Attempted Approaches:
|
|
|
1118
1121
|
| Time efficiency | Optimized for quality | Optimized for control |
|
|
1119
1122
|
|
|
1120
1123
|
**🔴 Required:**
|
|
1121
|
-
- All PLAN phases must follow the
|
|
1122
|
-
- All ACT phases must follow the
|
|
1124
|
+
- All PLAN phases must follow the selected Planning Agent's workflow framework (Solution Architect or Technical Planner)
|
|
1125
|
+
- All ACT phases must follow the resolved implementation agent's code quality checklist (Software Engineer or domain specialist)
|
|
1123
1126
|
- All EVAL phases must follow the Code Reviewer Agent's evaluation framework
|
|
1124
1127
|
- Respond in the language specified in the agent's communication.language setting
|
|
1125
1128
|
- Continue iterating automatically until exit conditions are met (Critical = 0 AND High = 0)
|
|
@@ -1159,9 +1162,19 @@ Key principles:
|
|
|
1159
1162
|
|
|
1160
1163
|
Specialized agents available in `.ai-rules/agents/` directory:
|
|
1161
1164
|
|
|
1165
|
+
**Solution Architect** (`.ai-rules/agents/solution-architect.json`)
|
|
1166
|
+
- **Expertise**: System-level architecture, technology selection, integration patterns, scalability planning
|
|
1167
|
+
- **Use when**: 🔴 **STRICT**: In PLAN mode for system-level design tasks (new features, architecture decisions, technology selection); activated automatically via intent pattern resolution
|
|
1168
|
+
- **Key traits**: Brainstorm-first, multiple options with trade-offs, incremental validation
|
|
1169
|
+
|
|
1170
|
+
**Technical Planner** (`.ai-rules/agents/technical-planner.json`)
|
|
1171
|
+
- **Expertise**: Implementation planning, TDD strategy, task decomposition, bite-sized tasks with exact file paths
|
|
1172
|
+
- **Use when**: 🔴 **STRICT**: In PLAN mode for implementation-level planning (TDD task sequences, concrete code changes); activated automatically via intent pattern resolution
|
|
1173
|
+
- **Key traits**: TDD-first, complete-code plans (no placeholders), exact file paths, Red-Green-Refactor-Commit structure
|
|
1174
|
+
|
|
1162
1175
|
**Frontend Developer** (`.ai-rules/agents/frontend-developer.json`)
|
|
1163
1176
|
- **Expertise**: Frontend frameworks, component architecture, TDD, design system
|
|
1164
|
-
- **Use when**: 🔴 **STRICT**:
|
|
1177
|
+
- **Use when**: 🔴 **STRICT**: In ACT mode for frontend projects, this Agent is activated as the resolved implementation agent
|
|
1165
1178
|
- **Key traits**: Framework best practices, design system priority, accessibility focused
|
|
1166
1179
|
|
|
1167
1180
|
**Code Reviewer** (`.ai-rules/agents/code-reviewer.json`)
|
|
@@ -1185,7 +1198,7 @@ Specialized agents available in `.ai-rules/agents/` directory:
|
|
|
1185
1198
|
- **Expertise**: SOLID principles, DRY, complexity analysis, design patterns
|
|
1186
1199
|
- **Use when**: Code quality framework is referenced within PLAN/ACT/EVAL modes for comprehensive code quality planning/implementation/evaluation
|
|
1187
1200
|
- **Key traits**: SOLID-focused, DRY enforcement, complexity analysis, design pattern expertise
|
|
1188
|
-
- **Integration**:
|
|
1201
|
+
- **Integration**: Planning Agents (Solution Architect, Technical Planner) utilize Code Quality Specialist modes.planning during PLAN mode; the resolved implementation agent utilizes modes.implementation during ACT mode. Code Reviewer Agent utilizes Code Quality Specialist modes.evaluation during EVAL mode code quality assessment
|
|
1189
1202
|
|
|
1190
1203
|
**Architecture Specialist** (`.ai-rules/agents/architecture-specialist.json`)
|
|
1191
1204
|
- **Expertise**: Layer boundaries, dependency direction, type safety, pure/impure separation
|
|
@@ -1345,8 +1358,8 @@ Specialized agents available in `.ai-rules/agents/` directory:
|
|
|
1345
1358
|
**Code Quality Specialist** (`@.ai-rules/agents/code-quality-specialist.json`)
|
|
1346
1359
|
|
|
1347
1360
|
✅ **Use for (Integrated with PLAN/ACT/EVAL):**
|
|
1348
|
-
- Code quality planning is automatically included in PLAN mode via
|
|
1349
|
-
- Code quality implementation verification is automatically included in ACT mode via
|
|
1361
|
+
- Code quality planning is automatically included in PLAN mode via the selected Planning Agent (Solution Architect or Technical Planner) (modes.planning)
|
|
1362
|
+
- Code quality implementation verification is automatically included in ACT mode via the resolved implementation agent (Software Engineer or domain specialist) (modes.implementation)
|
|
1350
1363
|
- Code quality assessment is automatically included in EVAL mode via Code Reviewer Agent (modes.evaluation)
|
|
1351
1364
|
- SOLID principles planning/verification/review
|
|
1352
1365
|
- DRY strategy planning/verification/review
|
|
@@ -1357,7 +1370,7 @@ Specialized agents available in `.ai-rules/agents/` directory:
|
|
|
1357
1370
|
- Code quality planning is part of PLAN mode mandatory perspectives
|
|
1358
1371
|
- Code quality implementation verification is part of ACT mode mandatory perspectives
|
|
1359
1372
|
- Code quality evaluation is part of EVAL mode mandatory perspectives
|
|
1360
|
-
-
|
|
1373
|
+
- Planning Agents (Solution Architect, Technical Planner) reference Code Quality Specialist modes.planning during PLAN mode; the resolved implementation agent references modes.implementation during ACT mode
|
|
1361
1374
|
- Code Reviewer Agent references Code Quality Specialist modes.evaluation during EVAL mode
|
|
1362
1375
|
- Reference SOLID principles, DRY, complexity metrics
|
|
1363
1376
|
- Provide specific planning/verification/review recommendations
|