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.
- package/.ai-rules/adapters/antigravity.md +6 -6
- package/.ai-rules/adapters/claude-code.md +107 -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 +90 -1
- 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
|
@@ -30,6 +30,7 @@ Reusable workflows for consistent development practices.
|
|
|
30
30
|
|
|
31
31
|
| Skill | Description | When to Use |
|
|
32
32
|
|-------|-------------|-------------|
|
|
33
|
+
| agent-discussion | Terminal formatter for multi-agent debate output with severity badges and consensus indicators | Rendering parallel agent findings, code review debates, EVAL summaries |
|
|
33
34
|
| context-management | Preserve critical decisions across sessions and context compaction | Long tasks, multi-session work, PLANโACTโEVAL transitions |
|
|
34
35
|
| deployment-checklist | Pre-deploy validation, health checks, rollback planning | Before every staging/production deployment |
|
|
35
36
|
| dispatching-parallel-agents | Handle 2+ independent tasks without shared state | Parallel task execution |
|
|
@@ -39,6 +40,7 @@ Reusable workflows for consistent development practices.
|
|
|
39
40
|
| legacy-modernization | Strangler fig pattern for incremental migration of legacy code | Modernizing old patterns, major version upgrades |
|
|
40
41
|
| subagent-driven-development | Execute plans with independent tasks in current session | In-session plan execution |
|
|
41
42
|
| systematic-debugging | Systematic approach before proposing fixes | Encountering bugs or failures |
|
|
43
|
+
| cross-repo-issues | Detect, confirm, and create issues in upstream/related repositories with safety checks | Bug belongs upstream, dependency issue, fork-to-upstream reporting |
|
|
42
44
|
| writing-plans | Create implementation plans before coding | Multi-step tasks with specs |
|
|
43
45
|
|
|
44
46
|
### Documentation & Communication
|
|
@@ -50,6 +52,13 @@ Reusable workflows for consistent development practices.
|
|
|
50
52
|
| pr-review | Systematic, evidence-based PR review with anti-sycophancy principles | Conducting manual PR reviews |
|
|
51
53
|
| prompt-engineering | Write and optimize prompts for AI tools and agent system prompts | AI tool instructions, MCP tool descriptions, agent prompts |
|
|
52
54
|
|
|
55
|
+
### DevOps & Infrastructure
|
|
56
|
+
|
|
57
|
+
| Skill | Description | When to Use |
|
|
58
|
+
|-------|-------------|-------------|
|
|
59
|
+
| cost-budget | Cost budget management with threshold alerts and auto-pause for autonomous workflows | Managing AI session costs, budget limits, taskMaestro wave budgets |
|
|
60
|
+
| tmux-master | Background knowledge for tmux session/window/pane lifecycle, layout, communication, styling, and troubleshooting | Parallel agent execution, taskMaestro workflows, tmux automation |
|
|
61
|
+
|
|
53
62
|
### codingbuddy Specific
|
|
54
63
|
|
|
55
64
|
| Skill | Description | When to Use |
|
|
@@ -57,6 +66,7 @@ Reusable workflows for consistent development practices.
|
|
|
57
66
|
| agent-design | Design new specialist agent JSON definitions with schema, expertise, and system prompts | Adding new agents to codingbuddy |
|
|
58
67
|
| mcp-builder | NestJS-based MCP server development with Tools/Resources/Prompts design | Building or extending MCP servers |
|
|
59
68
|
| rule-authoring | Write unambiguous AI coding rules compatible across multiple AI tools | Creating rules for .ai-rules/ directories |
|
|
69
|
+
| skill-creator | Create, eval, improve, and benchmark skills with measurable behavior-change tests | Creating new skills, testing skill effectiveness, optimizing underperforming skills |
|
|
60
70
|
|
|
61
71
|
## Skill Format
|
|
62
72
|
|
|
@@ -176,6 +186,10 @@ EOF
|
|
|
176
186
|
โ โโโ SKILL.md
|
|
177
187
|
โ
|
|
178
188
|
โโโ [Workflow & Process]
|
|
189
|
+
โโโ agent-discussion/
|
|
190
|
+
โ โโโ SKILL.md
|
|
191
|
+
โโโ cross-repo-issues/
|
|
192
|
+
โ โโโ SKILL.md
|
|
179
193
|
โโโ context-management/
|
|
180
194
|
โ โโโ SKILL.md
|
|
181
195
|
โโโ deployment-checklist/
|
|
@@ -214,11 +228,19 @@ EOF
|
|
|
214
228
|
โโโ prompt-engineering/
|
|
215
229
|
โ โโโ SKILL.md
|
|
216
230
|
โ
|
|
231
|
+
โโโ [DevOps & Infrastructure]
|
|
232
|
+
โโโ cost-budget/
|
|
233
|
+
โ โโโ SKILL.md
|
|
234
|
+
โโโ tmux-master/
|
|
235
|
+
โ โโโ SKILL.md
|
|
236
|
+
โ
|
|
217
237
|
โโโ [codingbuddy Specific]
|
|
218
238
|
โโโ agent-design/
|
|
219
239
|
โ โโโ SKILL.md
|
|
220
240
|
โโโ mcp-builder/
|
|
221
241
|
โ โโโ SKILL.md
|
|
222
|
-
|
|
242
|
+
โโโ rule-authoring/
|
|
243
|
+
โ โโโ SKILL.md
|
|
244
|
+
โโโ skill-creator/
|
|
223
245
|
โโโ SKILL.md
|
|
224
246
|
```
|
|
@@ -267,3 +267,8 @@ ALL โ Cross-cutting agents (code-reviewer)
|
|
|
267
267
|
- [ ] README.md updated with new agent
|
|
268
268
|
- [ ] Added to relevant adapter configurations
|
|
269
269
|
```
|
|
270
|
+
|
|
271
|
+
## Additional resources
|
|
272
|
+
|
|
273
|
+
- [Agent JSON template](examples/agent-template.json) โ Copy-and-adapt template with all required/optional fields and a design checklist
|
|
274
|
+
- [Expertise definition guidelines](references/expertise-guidelines.md) โ How to write differentiated expertise items, avoid overlaps, and validate quality
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_template_instructions": "Copy this file and replace all <placeholder> values. Remove this _template_instructions field. Save as packages/rules/.ai-rules/agents/<agent-name>.json (kebab-case filename).",
|
|
3
|
+
|
|
4
|
+
"name": "<Display Name>",
|
|
5
|
+
"description": "<One-sentence description of what this agent specializes in โ be specific, not broad>",
|
|
6
|
+
|
|
7
|
+
"role": {
|
|
8
|
+
"title": "<Official Role Title>",
|
|
9
|
+
"type": "specialist",
|
|
10
|
+
"expertise": [
|
|
11
|
+
"<Specific Domain Expertise 1 โ e.g., 'Zero-Downtime Schema Migrations'>",
|
|
12
|
+
"<Specific Domain Expertise 2 โ e.g., 'Expand-Contract Migration Pattern'>",
|
|
13
|
+
"<Specific Domain Expertise 3 โ e.g., 'Rollback Strategy Design'>",
|
|
14
|
+
"<Specific Domain Expertise 4 (optional)>",
|
|
15
|
+
"<Specific Domain Expertise 5 (optional)>"
|
|
16
|
+
],
|
|
17
|
+
"responsibilities": [
|
|
18
|
+
"<Key responsibility 1 โ what this agent actively does>",
|
|
19
|
+
"<Key responsibility 2 โ what this agent actively does>",
|
|
20
|
+
"<Key responsibility 3 โ what this agent actively does>"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
"context_files": [
|
|
25
|
+
".ai-rules/rules/core.md",
|
|
26
|
+
".ai-rules/rules/project.md"
|
|
27
|
+
],
|
|
28
|
+
|
|
29
|
+
"modes": {
|
|
30
|
+
"planning": {
|
|
31
|
+
"activation": {
|
|
32
|
+
"trigger": "<When this agent activates in PLAN mode โ e.g., 'When planning database schema migrations'>",
|
|
33
|
+
"auto_activate_conditions": [
|
|
34
|
+
"<Condition 1 โ e.g., 'Schema change planning'>",
|
|
35
|
+
"<Condition 2 โ e.g., 'Migration strategy design'>"
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"evaluation": {
|
|
40
|
+
"activation": {
|
|
41
|
+
"trigger": "<When this agent activates in EVAL mode โ e.g., 'When evaluating migration safety and rollback readiness'>"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
"_design_checklist": {
|
|
47
|
+
"_comment": "Remove this section from the final agent file. Use it during design to verify quality.",
|
|
48
|
+
"checks": [
|
|
49
|
+
"Domain is specific, not broad (e.g., 'Zero-Downtime Migrations' not 'Databases')",
|
|
50
|
+
"No significant overlap with existing agents (< 2 shared expertise items)",
|
|
51
|
+
"System prompt includes what this agent does NOT handle",
|
|
52
|
+
"3-7 expertise items, all specific and measurable",
|
|
53
|
+
"Filename follows kebab-case convention",
|
|
54
|
+
"Modes reflect actual usage patterns (PLAN, ACT, EVAL, or ALL)",
|
|
55
|
+
"JSON validates with: cat <file>.json | jq ."
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Agent Expertise Definition Guidelines
|
|
2
|
+
|
|
3
|
+
How to define clear, differentiated expertise items for codingbuddy specialist agents.
|
|
4
|
+
|
|
5
|
+
## The Expertise Quality Spectrum
|
|
6
|
+
|
|
7
|
+
| Level | Example | Verdict |
|
|
8
|
+
|-------|---------|---------|
|
|
9
|
+
| Too broad | "Databases" | Rejected โ could mean anything |
|
|
10
|
+
| Too vague | "Backend development" | Rejected โ overlaps with many agents |
|
|
11
|
+
| Right level | "PostgreSQL Query Plan Optimization" | Accepted โ specific, testable |
|
|
12
|
+
| Right level | "Zero-Downtime Schema Migrations" | Accepted โ clear domain boundary |
|
|
13
|
+
| Too narrow | "PostgreSQL 15.2 BRIN index tuning" | Risky โ might be too version-specific |
|
|
14
|
+
|
|
15
|
+
## Writing Expertise Items
|
|
16
|
+
|
|
17
|
+
### Formula
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
[Technique/Pattern] + [Domain/Technology] + [Qualifier (optional)]
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Examples:**
|
|
24
|
+
- "Expand-Contract Migration Pattern" (technique + domain)
|
|
25
|
+
- "React Server Component Performance Profiling" (technique + technology)
|
|
26
|
+
- "OWASP Top 10 Vulnerability Assessment" (standard + domain)
|
|
27
|
+
- "Zero-Downtime Blue-Green Deployments" (qualifier + technique)
|
|
28
|
+
|
|
29
|
+
### Rules
|
|
30
|
+
|
|
31
|
+
1. **3-7 items per agent** โ fewer than 3 means the agent is too narrow; more than 7 means it's too broad
|
|
32
|
+
2. **Each item is independently meaningful** โ someone reading just the expertise list should understand the agent's domain
|
|
33
|
+
3. **No overlapping items within the same agent** โ if two items cover similar ground, merge them
|
|
34
|
+
4. **Use established terminology** โ reference known patterns, standards, and methodologies
|
|
35
|
+
|
|
36
|
+
## Differentiation Matrix
|
|
37
|
+
|
|
38
|
+
Before adding an agent, compare expertise against existing agents:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
New Agent Expertise Existing Agent Expertise Overlap?
|
|
42
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโ
|
|
43
|
+
API Rate Limiting API Gateway Patterns PARTIAL โ ok if boundaries clear
|
|
44
|
+
REST API Versioning GraphQL Schema Evolution NO โ different domains
|
|
45
|
+
Error Response Standards Error Handling Patterns YES โ merge or split
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Overlap thresholds:**
|
|
49
|
+
- 0-1 shared items: Safe to add
|
|
50
|
+
- 2 shared items: Review carefully, ensure boundaries are clear
|
|
51
|
+
- 3+ shared items: Merge agents or fundamentally redesign scope
|
|
52
|
+
|
|
53
|
+
## Expertise vs. Responsibilities
|
|
54
|
+
|
|
55
|
+
| | Expertise | Responsibilities |
|
|
56
|
+
|---|-----------|------------------|
|
|
57
|
+
| **What** | Knowledge domains the agent has | Actions the agent takes |
|
|
58
|
+
| **Format** | Noun phrases (domain areas) | Verb phrases (active duties) |
|
|
59
|
+
| **Count** | 3-7 items | 2-4 items |
|
|
60
|
+
| **Example** | "Container Orchestration Patterns" | "Design Kubernetes deployment manifests" |
|
|
61
|
+
|
|
62
|
+
## Anti-Patterns
|
|
63
|
+
|
|
64
|
+
| Anti-Pattern | Problem | Fix |
|
|
65
|
+
|-------------|---------|-----|
|
|
66
|
+
| "Best practices" | Meaningless without context | Name the specific practice |
|
|
67
|
+
| "General development" | Every agent does this | What SPECIFIC development? |
|
|
68
|
+
| "Code review" | Too broad โ review for what? | "Security-focused code review" |
|
|
69
|
+
| "Testing" | Every engineer tests | "Property-based testing strategies" |
|
|
70
|
+
| "Architecture" | Name the architecture concern | "Event-driven architecture design" |
|
|
71
|
+
| Tool names alone ("Docker") | Knowing a tool isn't expertise | "Container image optimization" |
|
|
72
|
+
|
|
73
|
+
## Expertise Validation Checklist
|
|
74
|
+
|
|
75
|
+
For each expertise item, verify:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
- [ ] Could I write a 30-minute talk about JUST this item?
|
|
79
|
+
- [ ] Is this clearly different from the other items in this agent?
|
|
80
|
+
- [ ] Would another agent's expertise NOT cover this?
|
|
81
|
+
- [ ] Can I name 3 concrete tasks that require this specific expertise?
|
|
82
|
+
- [ ] Is this stable enough to last 6+ months without rewording?
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Tier-Specific Guidance
|
|
86
|
+
|
|
87
|
+
### Primary Agents (type: "primary")
|
|
88
|
+
|
|
89
|
+
Used as the main agent in a workflow mode. Expertise should be broad enough to lead a mode but focused on a methodology:
|
|
90
|
+
|
|
91
|
+
```json
|
|
92
|
+
"expertise": [
|
|
93
|
+
"Solution Architecture Design",
|
|
94
|
+
"Technology Selection and Trade-off Analysis",
|
|
95
|
+
"System Integration Planning",
|
|
96
|
+
"Scalability and Performance Architecture"
|
|
97
|
+
]
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Specialist Agents (type: "specialist")
|
|
101
|
+
|
|
102
|
+
Called in parallel for domain reviews. Expertise should be deep and narrow:
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
"expertise": [
|
|
106
|
+
"OWASP Top 10 Vulnerability Assessment",
|
|
107
|
+
"Authentication and Authorization Patterns",
|
|
108
|
+
"Secrets Management and Rotation",
|
|
109
|
+
"Security Header Configuration",
|
|
110
|
+
"Dependency Vulnerability Scanning"
|
|
111
|
+
]
|
|
112
|
+
```
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-discussion
|
|
3
|
+
description: Use when rendering multi-agent debate, discussion, or review output in the terminal. Formats agent opinions with severity badges, colored identifiers, evidence blocks, and consensus indicators using box drawing characters.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Agent Discussion Formatter
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
When multiple specialist agents contribute opinions, findings, or recommendations, raw text output becomes unreadable. This skill defines a structured terminal format that makes agent debates scannable, severity-aware, and action-oriented.
|
|
12
|
+
|
|
13
|
+
**Core principle:** Every agent contribution must be visually distinct, severity-tagged, and traceable to evidence.
|
|
14
|
+
|
|
15
|
+
**Iron Law:**
|
|
16
|
+
```
|
|
17
|
+
NEVER MIX AGENT OUTPUTS INTO UNSTRUCTURED PROSE โ ALWAYS USE THE BOX FORMAT
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## When to Use
|
|
21
|
+
|
|
22
|
+
- Rendering output from parallel specialist agents (security, accessibility, performance, etc.)
|
|
23
|
+
- Displaying code review findings from multiple reviewers
|
|
24
|
+
- Presenting debate/discussion between agents with differing opinions
|
|
25
|
+
- Summarizing consensus or disagreement across agent recommendations
|
|
26
|
+
- EVAL mode consolidated output
|
|
27
|
+
|
|
28
|
+
**Use this ESPECIALLY when:**
|
|
29
|
+
- 3+ agents contribute findings on the same topic
|
|
30
|
+
- Agents disagree and the user needs to see both sides
|
|
31
|
+
- Severity levels vary across findings
|
|
32
|
+
|
|
33
|
+
## When NOT to Use
|
|
34
|
+
|
|
35
|
+
- Single agent output (no debate to format)
|
|
36
|
+
- Non-terminal output (HTML, JSON API responses)
|
|
37
|
+
- Log-style sequential output where ordering matters more than structure
|
|
38
|
+
|
|
39
|
+
## Format Specification
|
|
40
|
+
|
|
41
|
+
### Agent Contribution Block
|
|
42
|
+
|
|
43
|
+
Each agent's finding is rendered in a box with metadata:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
โโ {emoji} {agent-name} โโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
47
|
+
โ {SEVERITY} [{LEVEL}]: {title} โ
|
|
48
|
+
โ {description spanning multiple lines with โ
|
|
49
|
+
โ proper indentation and wrapping} โ
|
|
50
|
+
โ โ
|
|
51
|
+
โ Evidence: {file:line โ code or observation} โ
|
|
52
|
+
โ Recommendation: {actionable next step} โ
|
|
53
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Agent Identifiers
|
|
57
|
+
|
|
58
|
+
Each agent type has a fixed emoji prefix for visual scanning:
|
|
59
|
+
|
|
60
|
+
| Agent | Emoji | Color Hint |
|
|
61
|
+
|-------|-------|------------|
|
|
62
|
+
| security-specialist | `๐` | Red |
|
|
63
|
+
| accessibility-specialist | `โฟ` | Blue |
|
|
64
|
+
| performance-specialist | `โก` | Yellow |
|
|
65
|
+
| code-quality-specialist | `๐` | Green |
|
|
66
|
+
| architecture-specialist | `๐๏ธ` | Purple |
|
|
67
|
+
| test-strategy-specialist | `๐งช` | Cyan |
|
|
68
|
+
| event-architecture-specialist | `๐จ` | Orange |
|
|
69
|
+
| integration-specialist | `๐` | Teal |
|
|
70
|
+
| observability-specialist | `๐` | Gray |
|
|
71
|
+
| migration-specialist | `๐` | Magenta |
|
|
72
|
+
| seo-specialist | `๐` | Lime |
|
|
73
|
+
| ui-ux-design-specialist | `๐จ` | Pink |
|
|
74
|
+
| documentation-specialist | `๐` | White |
|
|
75
|
+
| code-reviewer | `๐` | Indigo |
|
|
76
|
+
|
|
77
|
+
### Severity Badges
|
|
78
|
+
|
|
79
|
+
Severity levels with visual indicators:
|
|
80
|
+
|
|
81
|
+
| Level | Badge | Meaning |
|
|
82
|
+
|-------|-------|---------|
|
|
83
|
+
| CRITICAL | `๐ด CRITICAL` | Must fix before merge โ security vulnerability, data loss risk |
|
|
84
|
+
| HIGH | `๐ HIGH` | Should fix before merge โ significant quality or correctness issue |
|
|
85
|
+
| MEDIUM | `๐ก MEDIUM` | Should fix soon โ maintainability, performance, or minor risk |
|
|
86
|
+
| LOW | `๐ข LOW` | Nice to have โ style, optimization, minor improvement |
|
|
87
|
+
| INFO | `โน๏ธ INFO` | Observation โ no action required, context for the team |
|
|
88
|
+
|
|
89
|
+
### Example: Single Finding
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
โโ ๐ security-specialist โโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
93
|
+
โ ๐ HIGH: SQL injection risk in user input handling โ
|
|
94
|
+
โ โ
|
|
95
|
+
โ Raw string concatenation used to build SQL query โ
|
|
96
|
+
โ without parameterization. User-controlled input โ
|
|
97
|
+
โ flows directly into the query string. โ
|
|
98
|
+
โ โ
|
|
99
|
+
โ Evidence: api/users.ts:42 โ
|
|
100
|
+
โ const q = `SELECT * FROM users WHERE id=${input}` โ
|
|
101
|
+
โ Recommendation: Use parameterized queries โ
|
|
102
|
+
โ const q = `SELECT * FROM users WHERE id=$1` โ
|
|
103
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Example: Multiple Agents on Same Topic
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
โโ ๐ security-specialist โโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
110
|
+
โ ๐ด CRITICAL: Unauthenticated endpoint exposed โ
|
|
111
|
+
โ โ
|
|
112
|
+
โ The /api/admin/users endpoint has no auth guard. โ
|
|
113
|
+
โ Any client can list all user records including PII. โ
|
|
114
|
+
โ โ
|
|
115
|
+
โ Evidence: api/admin/users.ts:12 โ no @UseGuards() โ
|
|
116
|
+
โ Recommendation: Add AuthGuard and RolesGuard โ
|
|
117
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
118
|
+
|
|
119
|
+
โโ ๐ code-quality-specialist โโโโโโโโโโโโโโโโโโโโโโโโ
|
|
120
|
+
โ ๐ก MEDIUM: Missing input validation โ
|
|
121
|
+
โ โ
|
|
122
|
+
โ Query parameters parsed without validation. โ
|
|
123
|
+
โ Unexpected types could cause runtime errors. โ
|
|
124
|
+
โ โ
|
|
125
|
+
โ Evidence: api/admin/users.ts:18 โ raw req.query โ
|
|
126
|
+
โ Recommendation: Add Zod/class-validator schema โ
|
|
127
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Consensus & Disagreement
|
|
131
|
+
|
|
132
|
+
### Consensus Indicator
|
|
133
|
+
|
|
134
|
+
When agents agree, show a consensus block:
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
138
|
+
โ โ
CONSENSUS (3/3 agents agree) โ
|
|
139
|
+
โ โ
|
|
140
|
+
โ Auth guard must be added to /api/admin/* endpoints. โ
|
|
141
|
+
โ Agents: ๐ security, ๐ code-quality, ๐๏ธ architecture โ
|
|
142
|
+
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
|
|
143
|
+
โ Priority: CRITICAL โ unanimously recommended โ
|
|
144
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Disagreement Indicator
|
|
148
|
+
|
|
149
|
+
When agents disagree, show the split:
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
153
|
+
โ โ๏ธ SPLIT OPINION (2 vs 1) โ
|
|
154
|
+
โ โ
|
|
155
|
+
โ Topic: Should we add request-level caching? โ
|
|
156
|
+
โ โ
|
|
157
|
+
โ FOR (2): โ
|
|
158
|
+
โ โก performance โ reduces DB load by ~40% โ
|
|
159
|
+
โ ๐๏ธ architecture โ fits existing cache layer โ
|
|
160
|
+
โ โ
|
|
161
|
+
โ AGAINST (1): โ
|
|
162
|
+
โ ๐ security โ cache invalidation risks stale โ
|
|
163
|
+
โ auth state for permission changes โ
|
|
164
|
+
โ โ
|
|
165
|
+
โ Recommendation: Proceed with cache, add TTL < 60s โ
|
|
166
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## Summary Block
|
|
170
|
+
|
|
171
|
+
At the end of a multi-agent discussion, render a summary:
|
|
172
|
+
|
|
173
|
+
```
|
|
174
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
175
|
+
โ ๐ DISCUSSION SUMMARY โ
|
|
176
|
+
โฃโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโซ
|
|
177
|
+
โ Agents: 4 participated โ
|
|
178
|
+
โ Findings: 7 total โ
|
|
179
|
+
โ ๐ด CRITICAL: 1 โ
|
|
180
|
+
โ ๐ HIGH: 2 โ
|
|
181
|
+
โ ๐ก MEDIUM: 3 โ
|
|
182
|
+
โ ๐ข LOW: 1 โ
|
|
183
|
+
โ Consensus: 2 items agreed โ
|
|
184
|
+
โ Disputes: 1 split opinion โ
|
|
185
|
+
โ โ
|
|
186
|
+
โ Action required: Fix 1 CRITICAL + 2 HIGH before โ
|
|
187
|
+
โ merge. Review 1 split opinion with team. โ
|
|
188
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Rendering Rules
|
|
192
|
+
|
|
193
|
+
1. **Box width** โ Adapt to terminal width, minimum 50 characters
|
|
194
|
+
2. **Text wrapping** โ Wrap long lines inside box boundaries with proper indentation
|
|
195
|
+
3. **Ordering** โ Sort findings by severity: CRITICAL > HIGH > MEDIUM > LOW > INFO
|
|
196
|
+
4. **Grouping** โ Group by topic when multiple agents comment on the same code location
|
|
197
|
+
5. **Deduplication** โ If two agents report the same issue, merge into one block with both agent names
|
|
198
|
+
6. **Evidence format** โ Always include `file:line` reference when available
|
|
199
|
+
7. **Spacing** โ One blank line between agent blocks, two blank lines before consensus/summary blocks
|