@wipal/agent-team 1.0.3 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/commands/skills/discover.md +127 -0
- package/.claude/commands/skills/install.md +225 -0
- package/.claude/commands/skills/review.md +234 -0
- package/.claude/commands/utils/learn.md +142 -0
- package/.claude/commands/utils/retrospect.md +62 -0
- package/.claude/commands/utils/switch.md +113 -0
- package/.claude/commands/utils/sync.md +183 -0
- package/.claude/rules/common/general-rules.md +6 -0
- package/.claude/rules/role-rules/dev-be-rules.md +241 -0
- package/.claude/rules/role-rules/dev-fe-rules.md +76 -0
- package/.claude/skills/SKILL-INDEX.md +24 -5
- package/.claude/skills/core/knowledge-graph/SKILL.md +214 -0
- package/.claude/skills/core/sequential-thinking/SKILL.md +112 -0
- package/.claude/skills/core/sequential-thinking/references/advanced.md +122 -0
- package/.claude/skills/core/sequential-thinking/references/examples.md +274 -0
- package/.claude/skills/domain/architecture/c4-architecture/SKILL.md +314 -0
- package/.claude/skills/domain/architecture/c4-architecture/references/advanced-patterns.md +552 -0
- package/.claude/skills/domain/architecture/c4-architecture/references/c4-syntax.md +492 -0
- package/.claude/skills/domain/architecture/c4-architecture/references/common-mistakes.md +437 -0
- package/.claude/skills/domain/architecture/mermaid-diagrams/SKILL.md +238 -0
- package/.claude/skills/domain/architecture/mermaid-diagrams/references/advanced-features.md +556 -0
- package/.claude/skills/domain/architecture/mermaid-diagrams/references/architecture-diagrams.md +192 -0
- package/.claude/skills/domain/architecture/mermaid-diagrams/references/c4-diagrams.md +410 -0
- package/.claude/skills/domain/architecture/mermaid-diagrams/references/class-diagrams.md +361 -0
- package/.claude/skills/domain/architecture/mermaid-diagrams/references/erd-diagrams.md +510 -0
- package/.claude/skills/domain/architecture/mermaid-diagrams/references/flowcharts.md +450 -0
- package/.claude/skills/domain/architecture/mermaid-diagrams/references/sequence-diagrams.md +394 -0
- package/.claude/skills/domain/backend/testing-be/SKILL.md +121 -17
- package/.claude/skills/domain/design/design-system/SKILL.md +169 -0
- package/.claude/skills/domain/design/html-css-output/SKILL.md +253 -0
- package/.claude/skills/domain/design/mockup-creation/SKILL.md +230 -0
- package/.claude/skills/domain/design/responsive-design/SKILL.md +207 -0
- package/.claude/skills/domain/design/ui-design/SKILL.md +124 -0
- package/.claude/skills/domain/frontend/testing-fe/SKILL.md +143 -38
- package/.claude/skills/domain/frontend/ui-ux-pro-max/README.md +45 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/SKILL.md +404 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/charts.csv +26 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/colors.csv +97 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/icons.csv +101 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/landing.csv +31 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/products.csv +97 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/styles.csv +68 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/typography.csv +58 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/scripts/core.py +253 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/.claude/skills/domain/frontend/ui-ux-pro-max/scripts/search.py +114 -0
- package/.claude/skills/domain/product/requirements-clarity/SKILL.md +340 -0
- package/.claude/skills/skills-registry.yaml +103 -8
- package/README.md +107 -33
- package/README.npm.md +252 -0
- package/TUTORIAL.md +256 -0
- package/bin/agent-team.js +26 -7
- package/config/roles.yaml +107 -0
- package/docs/01-architecture.md +699 -0
- package/docs/02-setup-guide.md +634 -0
- package/docs/03-skills-guide.md +628 -0
- package/docs/04-workflows.md +792 -0
- package/docs/05-model-strategy.md +550 -0
- package/docs/06-extend-guide.md +1226 -0
- package/docs/07-quick-reference.md +578 -0
- package/docs/08-skills-discovery.md +342 -0
- package/docs/README.md +134 -0
- package/docs/rqm.md +560 -0
- package/package.json +10 -4
- package/scripts/postinstall.js +46 -0
- package/src/commands/add.js +131 -67
- package/src/commands/init.js +419 -9
- package/src/commands/list.js +20 -16
- package/src/commands/projects.js +127 -0
- package/src/commands/setup-hooks.js +261 -0
- package/src/index.js +0 -1
- package/src/utils/file-utils.js +147 -50
- package/src/utils/global-registry.js +224 -0
- package/templates/CLAUDE.md.tmpl +128 -20
- package/templates/MEMORY.md.tmpl +119 -0
- package/templates/agent.md.tmpl +205 -0
- package/templates/code/nestjs-controller.ts.tmpl +49 -0
- package/templates/code/nestjs-dto.ts.tmpl +63 -0
- package/templates/code/nestjs-service.ts.tmpl +45 -0
- package/templates/code/react-component.tsx.tmpl +24 -0
- package/templates/code/react-hook.ts.tmpl +54 -0
- package/templates/code/test.spec.ts.tmpl +50 -0
- package/templates/code/vue-component.vue.tmpl +49 -0
- package/templates/code/vue-composable.ts.tmpl +54 -0
- package/templates/knowledge.md.tmpl +152 -17
- package/templates/meeting-notes.md.tmpl +110 -0
- package/templates/memory/hooks.memory.json +50 -0
- package/templates/memory/settings.memory.json +16 -0
- package/templates/reports/bug-report.md.tmpl +164 -0
- package/templates/reports/code-review.md.tmpl +201 -0
- package/templates/reports/sprint-report.md.tmpl +218 -0
- package/templates/roles/ba.md +53 -0
- package/templates/roles/designer.md +82 -0
- package/templates/roles/dev-be.md +49 -0
- package/templates/roles/dev-fe.md +49 -0
- package/templates/roles/devops.md +53 -0
- package/templates/roles/pm.md +49 -0
- package/templates/roles/qa.md +53 -0
- package/templates/roles/sa.md +49 -0
- package/templates/roles/tech-lead.md +132 -0
- package/templates/skills/memory/memory-status.md +78 -0
- package/templates/skills/memory/recall.md +160 -0
- package/templates/skills/memory/reflect.md +168 -0
- package/templates/skills/memory/remember.md +105 -0
- package/templates/tasks/lessons.md.tmpl +77 -0
- package/templates/tasks/todo.md.tmpl +53 -0
- package/src/commands/switch.js +0 -53
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: learn
|
|
3
|
+
description: Quickly capture a learning or pattern
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Learn Command
|
|
7
|
+
|
|
8
|
+
## Usage
|
|
9
|
+
```
|
|
10
|
+
/learn <type> <content>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Types
|
|
14
|
+
|
|
15
|
+
| Type | Description | Example |
|
|
16
|
+
|------|-------------|---------|
|
|
17
|
+
| `pattern` | A reusable pattern to remember | `/learn pattern Always use useCallback for handlers passed to children` |
|
|
18
|
+
| `pitfall` | Something to avoid | `/learn pitfall Don't use useEffect for derived state` |
|
|
19
|
+
| `rule` | A rule to follow | `/learn rule Always check Context7 before using new APIs` |
|
|
20
|
+
| `tip` | A helpful tip | `/learn tip Use React DevTools Profiler for performance issues` |
|
|
21
|
+
| `correction` | Something you were corrected on | `/learn correction User said to always handle loading states` |
|
|
22
|
+
|
|
23
|
+
## Examples
|
|
24
|
+
|
|
25
|
+
### Capture a pattern
|
|
26
|
+
```
|
|
27
|
+
/learn pattern Repository pattern with Prisma
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Output:
|
|
31
|
+
```
|
|
32
|
+
✅ Pattern captured
|
|
33
|
+
|
|
34
|
+
**Pattern:** Repository pattern with Prisma
|
|
35
|
+
**Added to:** knowledge.md
|
|
36
|
+
|
|
37
|
+
Would you like to add a code example? [y/n]
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Capture a pitfall
|
|
41
|
+
```
|
|
42
|
+
/learn pitfall N+1 queries in OrderService.getOrders
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Output:
|
|
46
|
+
```
|
|
47
|
+
✅ Pitfall captured
|
|
48
|
+
|
|
49
|
+
**Pitfall:** N+1 queries in OrderService.getOrders
|
|
50
|
+
**Added to:** knowledge.md
|
|
51
|
+
**Lesson:** Use Prisma include for relations instead of separate queries
|
|
52
|
+
|
|
53
|
+
Example fix:
|
|
54
|
+
```typescript
|
|
55
|
+
// ❌ Bad
|
|
56
|
+
for (const order of orders) {
|
|
57
|
+
order.items = await this.getItems(order.id);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// ✅ Good
|
|
61
|
+
const orders = await this.prisma.order.findMany({
|
|
62
|
+
include: { items: true }
|
|
63
|
+
});
|
|
64
|
+
```
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Capture a correction
|
|
68
|
+
```
|
|
69
|
+
/learn correction User corrected: Always add loading state for async operations
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Output:
|
|
73
|
+
```
|
|
74
|
+
✅ Correction captured
|
|
75
|
+
|
|
76
|
+
**Correction:** Always add loading state for async operations
|
|
77
|
+
**Added to:** lessons.md
|
|
78
|
+
**Rule generated:** "Add loading state before any async operation"
|
|
79
|
+
|
|
80
|
+
This rule will be applied in future tasks.
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Quick Capture
|
|
84
|
+
|
|
85
|
+
For quick capture without type:
|
|
86
|
+
```
|
|
87
|
+
/learn Always validate user input on the server side
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Output:
|
|
91
|
+
```
|
|
92
|
+
What type is this?
|
|
93
|
+
1. Pattern
|
|
94
|
+
2. Pitfall
|
|
95
|
+
3. Rule
|
|
96
|
+
4. Tip
|
|
97
|
+
|
|
98
|
+
Select [1-4]:
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Reviewing Learnings
|
|
102
|
+
|
|
103
|
+
To see all captured learnings:
|
|
104
|
+
```
|
|
105
|
+
/learn --review
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Output:
|
|
109
|
+
```
|
|
110
|
+
📚 Learnings for: current-agent
|
|
111
|
+
|
|
112
|
+
## Patterns (5)
|
|
113
|
+
1. Repository pattern with Prisma
|
|
114
|
+
2. Form validation with Zod + react-hook-form
|
|
115
|
+
3. Error handling with custom exceptions
|
|
116
|
+
...
|
|
117
|
+
|
|
118
|
+
## Pitfalls (3)
|
|
119
|
+
1. N+1 queries
|
|
120
|
+
2. Missing loading states
|
|
121
|
+
...
|
|
122
|
+
|
|
123
|
+
## Rules (4)
|
|
124
|
+
1. Always check Context7 first
|
|
125
|
+
2. Handle loading/error states
|
|
126
|
+
...
|
|
127
|
+
|
|
128
|
+
## Recent Corrections (2)
|
|
129
|
+
1. 2025-02-25: Add loading state for async
|
|
130
|
+
2. 2025-02-24: Use proper TypeScript types
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
Total: 14 learnings
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Integration
|
|
137
|
+
|
|
138
|
+
Learnings are:
|
|
139
|
+
- Stored in `knowledge.md`
|
|
140
|
+
- Synced via `/sync` command
|
|
141
|
+
- Reviewed at session start
|
|
142
|
+
- Promoted to skills over time
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: retrospect
|
|
3
|
+
description: Run self-learning retrospect on current session
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Retrospect Command
|
|
7
|
+
|
|
8
|
+
## Usage
|
|
9
|
+
```
|
|
10
|
+
/retrospect [options]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Options
|
|
14
|
+
- `--deep` - Deep analysis of all changes
|
|
15
|
+
- `--agent <name>` - Retrospect for specific agent
|
|
16
|
+
- `--all` - Run for all agents
|
|
17
|
+
|
|
18
|
+
## What It Does
|
|
19
|
+
|
|
20
|
+
1. **Analyzes** changes made in session
|
|
21
|
+
2. **Extracts** patterns and learnings
|
|
22
|
+
3. **Updates** knowledge.md
|
|
23
|
+
4. **Updates** lessons.md
|
|
24
|
+
5. **Suggests** rule updates
|
|
25
|
+
|
|
26
|
+
## Output
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
═══════════════════════════════════════════════════════════════
|
|
30
|
+
🧠 RETROSPECT: Session Analysis
|
|
31
|
+
═══════════════════════════════════════════════════════════════
|
|
32
|
+
|
|
33
|
+
📊 Session Summary:
|
|
34
|
+
- Files changed: 5
|
|
35
|
+
- Lines added: 234
|
|
36
|
+
- Lines removed: 45
|
|
37
|
+
|
|
38
|
+
✅ Patterns Found:
|
|
39
|
+
1. Repository Pattern used correctly
|
|
40
|
+
2. DTO validation with Zod
|
|
41
|
+
3. Error handling with custom exceptions
|
|
42
|
+
|
|
43
|
+
⚠️ Anti-patterns Detected:
|
|
44
|
+
1. N+1 query in getOrders() - Fixed
|
|
45
|
+
2. Missing loading state - Added
|
|
46
|
+
|
|
47
|
+
📝 Knowledge Updates:
|
|
48
|
+
- Added: Repository Pattern example
|
|
49
|
+
- Added: Error handling pattern
|
|
50
|
+
- Updated: Testing approach
|
|
51
|
+
|
|
52
|
+
📄 Files Updated:
|
|
53
|
+
- knowledge.md (2 additions)
|
|
54
|
+
- lessons.md (1 lesson)
|
|
55
|
+
|
|
56
|
+
Approve changes? [y/n]:
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Integration
|
|
60
|
+
- Works with `retrospect-work` skill
|
|
61
|
+
- Updates agent's knowledge base
|
|
62
|
+
- Can sync to related agents
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: switch
|
|
3
|
+
description: Switch to a different agent role
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Switch Agent Command
|
|
7
|
+
|
|
8
|
+
## Usage
|
|
9
|
+
```
|
|
10
|
+
/switch <agent-name>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## What It Does
|
|
14
|
+
|
|
15
|
+
Switches the current conversation to use a different agent configuration.
|
|
16
|
+
|
|
17
|
+
1. **Reads** the target agent's CLAUDE.md
|
|
18
|
+
2. **Loads** the agent's knowledge base
|
|
19
|
+
3. **Applies** role-specific rules
|
|
20
|
+
4. **Prepares** context for the new role
|
|
21
|
+
|
|
22
|
+
## Examples
|
|
23
|
+
|
|
24
|
+
### Switch to frontend developer
|
|
25
|
+
```
|
|
26
|
+
/switch fe-payment
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Output:
|
|
30
|
+
```
|
|
31
|
+
✅ Switched to agent: fe-payment
|
|
32
|
+
Role: Frontend Developer
|
|
33
|
+
Variants: react, tailwind, zustand
|
|
34
|
+
|
|
35
|
+
Available skills:
|
|
36
|
+
- frontend-design
|
|
37
|
+
- react-patterns
|
|
38
|
+
- git-automation
|
|
39
|
+
- code-review
|
|
40
|
+
|
|
41
|
+
Ready to work on frontend tasks!
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Switch to backend developer
|
|
45
|
+
```
|
|
46
|
+
/switch auth-api
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Output:
|
|
50
|
+
```
|
|
51
|
+
✅ Switched to agent: auth-api
|
|
52
|
+
Role: Backend Developer
|
|
53
|
+
Variants: nestjs, prisma, postgresql
|
|
54
|
+
|
|
55
|
+
Available skills:
|
|
56
|
+
- api-design
|
|
57
|
+
- nestjs-patterns
|
|
58
|
+
- database-design
|
|
59
|
+
- security
|
|
60
|
+
|
|
61
|
+
Ready to work on backend tasks!
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Switch to tech lead
|
|
65
|
+
```
|
|
66
|
+
/switch lead
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Output:
|
|
70
|
+
```
|
|
71
|
+
✅ Switched to agent: lead
|
|
72
|
+
Role: Technical Lead
|
|
73
|
+
Model: Claude Opus 4 (with thinking mode)
|
|
74
|
+
|
|
75
|
+
Responsibilities:
|
|
76
|
+
- Architecture decisions
|
|
77
|
+
- Code review
|
|
78
|
+
- Technical strategy
|
|
79
|
+
|
|
80
|
+
Ready to review and guide!
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Listing Available Agents
|
|
84
|
+
|
|
85
|
+
If you don't know the agent name:
|
|
86
|
+
```
|
|
87
|
+
/switch
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Output:
|
|
91
|
+
```
|
|
92
|
+
Available agents:
|
|
93
|
+
|
|
94
|
+
┌─────────────────┬─────────┬──────────────────────────────┐
|
|
95
|
+
│ Agent │ Role │ Variants │
|
|
96
|
+
├─────────────────┼─────────┼──────────────────────────────┤
|
|
97
|
+
│ fe-payment │ dev-fe │ react, tailwind, zustand │
|
|
98
|
+
│ fe-admin │ dev-fe │ vue, tailwind, pinia │
|
|
99
|
+
│ auth-api │ dev-be │ nestjs, prisma │
|
|
100
|
+
│ lead │ tech-lead│ - │
|
|
101
|
+
│ tester │ qa │ playwright │
|
|
102
|
+
└─────────────────┴─────────┴──────────────────────────────┘
|
|
103
|
+
|
|
104
|
+
Usage: /switch <agent-name>
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## After Switching
|
|
108
|
+
|
|
109
|
+
The agent will:
|
|
110
|
+
- Load role-specific knowledge
|
|
111
|
+
- Apply relevant rules
|
|
112
|
+
- Be ready for tasks in that domain
|
|
113
|
+
- Remember previous context when switching back
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sync
|
|
3
|
+
description: Sync knowledge between agents
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Sync Command
|
|
7
|
+
|
|
8
|
+
## Usage
|
|
9
|
+
```
|
|
10
|
+
/sync <from-agent> <to-agent>
|
|
11
|
+
/sync <from-agent> --to-role <role>
|
|
12
|
+
/sync --all
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
| Option | Description |
|
|
18
|
+
|--------|-------------|
|
|
19
|
+
| `<from-agent>` | Source agent to sync from |
|
|
20
|
+
| `<to-agent>` | Target agent to sync to |
|
|
21
|
+
| `--to-role <role>` | Sync to all agents of the same role |
|
|
22
|
+
| `--all` | Sync across all agents |
|
|
23
|
+
| `--patterns` | Only sync patterns |
|
|
24
|
+
| `--pitfalls` | Only sync pitfalls |
|
|
25
|
+
| `--rules` | Only sync rules |
|
|
26
|
+
|
|
27
|
+
## Examples
|
|
28
|
+
|
|
29
|
+
### Sync between two agents
|
|
30
|
+
```
|
|
31
|
+
/sync payment-fe admin-fe
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Output:
|
|
35
|
+
```
|
|
36
|
+
═══════════════════════════════════════════════════════════════
|
|
37
|
+
🔄 SYNCING KNOWLEDGE
|
|
38
|
+
═══════════════════════════════════════════════════════════════
|
|
39
|
+
|
|
40
|
+
From: payment-fe (dev-fe + react)
|
|
41
|
+
To: admin-fe (dev-fe + vue)
|
|
42
|
+
|
|
43
|
+
📚 Patterns to sync:
|
|
44
|
+
1. Form validation with Zod
|
|
45
|
+
2. Error handling pattern
|
|
46
|
+
3. API response format
|
|
47
|
+
|
|
48
|
+
⚠️ Pitfalls to sync:
|
|
49
|
+
1. N+1 queries in user list
|
|
50
|
+
|
|
51
|
+
📝 Syncing...
|
|
52
|
+
✅ Added 3 patterns to admin-fe
|
|
53
|
+
✅ Added 1 pitfall to admin-fe
|
|
54
|
+
|
|
55
|
+
Sync complete? [y/n]:
|
|
56
|
+
═══════════════════════════════════════════════════════════════
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Sync to all agents of same role
|
|
60
|
+
```
|
|
61
|
+
/sync payment-fe --to-role dev-fe
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Output:
|
|
65
|
+
```
|
|
66
|
+
═══════════════════════════════════════════════════════════════
|
|
67
|
+
🔄 SYNCING KNOWLEDGE TO ROLE: dev-fe
|
|
68
|
+
═══════════════════════════════════════════════════════════════
|
|
69
|
+
|
|
70
|
+
From: payment-fe
|
|
71
|
+
|
|
72
|
+
Target agents:
|
|
73
|
+
├── admin-fe (will receive 3 patterns)
|
|
74
|
+
├── dashboard-fe (will receive 3 patterns)
|
|
75
|
+
└── settings-fe (will receive 3 patterns)
|
|
76
|
+
|
|
77
|
+
Patterns to sync:
|
|
78
|
+
1. Form validation with Zod
|
|
79
|
+
2. Error handling pattern
|
|
80
|
+
3. API response format
|
|
81
|
+
|
|
82
|
+
Sync to all 3 agents? [y/n]:
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Sync only patterns
|
|
86
|
+
```
|
|
87
|
+
/sync payment-fe admin-fe --patterns
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Sync across all agents
|
|
91
|
+
```
|
|
92
|
+
/sync --all
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Output:
|
|
96
|
+
```
|
|
97
|
+
═══════════════════════════════════════════════════════════════
|
|
98
|
+
🔄 SYNCING ACROSS ALL AGENTS
|
|
99
|
+
═══════════════════════════════════════════════════════════════
|
|
100
|
+
|
|
101
|
+
Analyzing knowledge bases...
|
|
102
|
+
|
|
103
|
+
📚 Universal Patterns (apply to all):
|
|
104
|
+
1. Always handle loading states
|
|
105
|
+
2. Always handle error states
|
|
106
|
+
3. Use Context7 before implementing
|
|
107
|
+
|
|
108
|
+
🔧 Role-Specific Patterns (sync within roles):
|
|
109
|
+
- dev-fe: 5 patterns shared
|
|
110
|
+
- dev-be: 4 patterns shared
|
|
111
|
+
|
|
112
|
+
Sync universal patterns to all agents? [y/n]:
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## What Gets Synced
|
|
116
|
+
|
|
117
|
+
### Patterns
|
|
118
|
+
Reusable code patterns and approaches
|
|
119
|
+
```markdown
|
|
120
|
+
## Pattern: Form Validation with Zod
|
|
121
|
+
Use Zod schemas for type-safe validation...
|
|
122
|
+
|
|
123
|
+
**Code:**
|
|
124
|
+
\`\`\`typescript
|
|
125
|
+
const schema = z.object({...});
|
|
126
|
+
\`\`\`
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Pitfalls
|
|
130
|
+
Common mistakes to avoid
|
|
131
|
+
```markdown
|
|
132
|
+
## Pitfall: N+1 Queries
|
|
133
|
+
Avoid fetching related data in loops...
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Rules
|
|
137
|
+
Learned rules from corrections
|
|
138
|
+
```markdown
|
|
139
|
+
## Rule: Always Check Context7
|
|
140
|
+
Before using any API, check Context7 for latest docs...
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## What Doesn't Get Synced
|
|
144
|
+
|
|
145
|
+
- Project-specific context
|
|
146
|
+
- Sensitive information
|
|
147
|
+
- Temporary notes
|
|
148
|
+
- User corrections (only lessons extracted)
|
|
149
|
+
|
|
150
|
+
## Sync Strategy
|
|
151
|
+
|
|
152
|
+
### When to Sync
|
|
153
|
+
- After completing a feature with reusable patterns
|
|
154
|
+
- After fixing a bug that could affect other agents
|
|
155
|
+
- After learning a new best practice
|
|
156
|
+
- At end of day/week
|
|
157
|
+
|
|
158
|
+
### What to Sync
|
|
159
|
+
| Type | Sync Across Roles | Sync Within Role |
|
|
160
|
+
|------|-------------------|------------------|
|
|
161
|
+
| Patterns | Universal only | All |
|
|
162
|
+
| Pitfalls | Universal only | All |
|
|
163
|
+
| Rules | All | All |
|
|
164
|
+
| Context | Never | Never |
|
|
165
|
+
|
|
166
|
+
## Integration
|
|
167
|
+
|
|
168
|
+
Sync works with:
|
|
169
|
+
- `/retrospect` - Extract patterns before syncing
|
|
170
|
+
- `/learn` - Add new patterns to sync
|
|
171
|
+
- `./agent.sh sync` - CLI version
|
|
172
|
+
|
|
173
|
+
## CLI Equivalent
|
|
174
|
+
```bash
|
|
175
|
+
# Sync between agents
|
|
176
|
+
./agent.sh sync payment-fe admin-fe
|
|
177
|
+
|
|
178
|
+
# Sync to role
|
|
179
|
+
./agent.sh sync payment-fe --to-role dev-fe
|
|
180
|
+
|
|
181
|
+
# Sync all
|
|
182
|
+
./agent.sh sync --all
|
|
183
|
+
```
|
|
@@ -67,6 +67,12 @@
|
|
|
67
67
|
- Don't refactor unrelated code
|
|
68
68
|
- Keep PRs focused
|
|
69
69
|
|
|
70
|
+
### Demand Elegance (Balanced)
|
|
71
|
+
- For non-trivial changes: pause and ask "is there a more elegant way?"
|
|
72
|
+
- If a fix feels hacky: "Knowing everything I know now, implement the elegant solution"
|
|
73
|
+
- Skip this for simple, obvious fixes - don't over-engineer
|
|
74
|
+
- Challenge your own work before presenting it
|
|
75
|
+
|
|
70
76
|
---
|
|
71
77
|
|
|
72
78
|
## Verification Protocol
|