@wipal/agent-team 1.0.4 → 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.
Files changed (124) hide show
  1. package/.claude/commands/skills/discover.md +127 -0
  2. package/.claude/commands/skills/install.md +225 -0
  3. package/.claude/commands/skills/review.md +234 -0
  4. package/.claude/commands/utils/learn.md +142 -0
  5. package/.claude/commands/utils/retrospect.md +62 -0
  6. package/.claude/commands/utils/switch.md +113 -0
  7. package/.claude/commands/utils/sync.md +183 -0
  8. package/.claude/rules/common/general-rules.md +6 -0
  9. package/.claude/rules/role-rules/dev-be-rules.md +241 -0
  10. package/.claude/rules/role-rules/dev-fe-rules.md +76 -0
  11. package/.claude/skills/SKILL-INDEX.md +24 -5
  12. package/.claude/skills/core/knowledge-graph/SKILL.md +214 -0
  13. package/.claude/skills/core/sequential-thinking/SKILL.md +112 -0
  14. package/.claude/skills/core/sequential-thinking/references/advanced.md +122 -0
  15. package/.claude/skills/core/sequential-thinking/references/examples.md +274 -0
  16. package/.claude/skills/domain/architecture/c4-architecture/SKILL.md +314 -0
  17. package/.claude/skills/domain/architecture/c4-architecture/references/advanced-patterns.md +552 -0
  18. package/.claude/skills/domain/architecture/c4-architecture/references/c4-syntax.md +492 -0
  19. package/.claude/skills/domain/architecture/c4-architecture/references/common-mistakes.md +437 -0
  20. package/.claude/skills/domain/architecture/mermaid-diagrams/SKILL.md +238 -0
  21. package/.claude/skills/domain/architecture/mermaid-diagrams/references/advanced-features.md +556 -0
  22. package/.claude/skills/domain/architecture/mermaid-diagrams/references/architecture-diagrams.md +192 -0
  23. package/.claude/skills/domain/architecture/mermaid-diagrams/references/c4-diagrams.md +410 -0
  24. package/.claude/skills/domain/architecture/mermaid-diagrams/references/class-diagrams.md +361 -0
  25. package/.claude/skills/domain/architecture/mermaid-diagrams/references/erd-diagrams.md +510 -0
  26. package/.claude/skills/domain/architecture/mermaid-diagrams/references/flowcharts.md +450 -0
  27. package/.claude/skills/domain/architecture/mermaid-diagrams/references/sequence-diagrams.md +394 -0
  28. package/.claude/skills/domain/backend/testing-be/SKILL.md +121 -17
  29. package/.claude/skills/domain/design/design-system/SKILL.md +169 -0
  30. package/.claude/skills/domain/design/html-css-output/SKILL.md +253 -0
  31. package/.claude/skills/domain/design/mockup-creation/SKILL.md +230 -0
  32. package/.claude/skills/domain/design/responsive-design/SKILL.md +207 -0
  33. package/.claude/skills/domain/design/ui-design/SKILL.md +124 -0
  34. package/.claude/skills/domain/frontend/testing-fe/SKILL.md +143 -38
  35. package/.claude/skills/domain/frontend/ui-ux-pro-max/README.md +45 -0
  36. package/.claude/skills/domain/frontend/ui-ux-pro-max/SKILL.md +404 -0
  37. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/charts.csv +26 -0
  38. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/colors.csv +97 -0
  39. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/icons.csv +101 -0
  40. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/landing.csv +31 -0
  41. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/products.csv +97 -0
  42. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/react-performance.csv +45 -0
  43. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/astro.csv +54 -0
  44. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  45. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  46. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  47. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  48. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  49. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  50. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  51. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/react.csv +54 -0
  52. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  53. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  54. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  55. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  56. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/styles.csv +68 -0
  57. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/typography.csv +58 -0
  58. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  59. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  60. package/.claude/skills/domain/frontend/ui-ux-pro-max/data/web-interface.csv +31 -0
  61. package/.claude/skills/domain/frontend/ui-ux-pro-max/scripts/core.py +253 -0
  62. package/.claude/skills/domain/frontend/ui-ux-pro-max/scripts/design_system.py +1067 -0
  63. package/.claude/skills/domain/frontend/ui-ux-pro-max/scripts/search.py +114 -0
  64. package/.claude/skills/domain/product/requirements-clarity/SKILL.md +340 -0
  65. package/.claude/skills/skills-registry.yaml +103 -8
  66. package/README.md +107 -33
  67. package/README.npm.md +252 -0
  68. package/TUTORIAL.md +256 -0
  69. package/bin/agent-team.js +26 -7
  70. package/config/roles.yaml +107 -0
  71. package/docs/01-architecture.md +699 -0
  72. package/docs/02-setup-guide.md +634 -0
  73. package/docs/03-skills-guide.md +628 -0
  74. package/docs/04-workflows.md +792 -0
  75. package/docs/05-model-strategy.md +550 -0
  76. package/docs/06-extend-guide.md +1226 -0
  77. package/docs/07-quick-reference.md +578 -0
  78. package/docs/08-skills-discovery.md +342 -0
  79. package/docs/README.md +134 -0
  80. package/docs/rqm.md +560 -0
  81. package/package.json +9 -3
  82. package/scripts/postinstall.js +46 -0
  83. package/src/commands/add.js +131 -67
  84. package/src/commands/init.js +419 -9
  85. package/src/commands/list.js +20 -16
  86. package/src/commands/projects.js +127 -0
  87. package/src/commands/setup-hooks.js +261 -0
  88. package/src/index.js +0 -1
  89. package/src/utils/file-utils.js +147 -50
  90. package/src/utils/global-registry.js +224 -0
  91. package/templates/CLAUDE.md.tmpl +128 -20
  92. package/templates/MEMORY.md.tmpl +119 -0
  93. package/templates/agent.md.tmpl +205 -0
  94. package/templates/code/nestjs-controller.ts.tmpl +49 -0
  95. package/templates/code/nestjs-dto.ts.tmpl +63 -0
  96. package/templates/code/nestjs-service.ts.tmpl +45 -0
  97. package/templates/code/react-component.tsx.tmpl +24 -0
  98. package/templates/code/react-hook.ts.tmpl +54 -0
  99. package/templates/code/test.spec.ts.tmpl +50 -0
  100. package/templates/code/vue-component.vue.tmpl +49 -0
  101. package/templates/code/vue-composable.ts.tmpl +54 -0
  102. package/templates/knowledge.md.tmpl +152 -17
  103. package/templates/meeting-notes.md.tmpl +110 -0
  104. package/templates/memory/hooks.memory.json +50 -0
  105. package/templates/memory/settings.memory.json +16 -0
  106. package/templates/reports/bug-report.md.tmpl +164 -0
  107. package/templates/reports/code-review.md.tmpl +201 -0
  108. package/templates/reports/sprint-report.md.tmpl +218 -0
  109. package/templates/roles/ba.md +53 -0
  110. package/templates/roles/designer.md +82 -0
  111. package/templates/roles/dev-be.md +49 -0
  112. package/templates/roles/dev-fe.md +49 -0
  113. package/templates/roles/devops.md +53 -0
  114. package/templates/roles/pm.md +49 -0
  115. package/templates/roles/qa.md +53 -0
  116. package/templates/roles/sa.md +49 -0
  117. package/templates/roles/tech-lead.md +132 -0
  118. package/templates/skills/memory/memory-status.md +78 -0
  119. package/templates/skills/memory/recall.md +160 -0
  120. package/templates/skills/memory/reflect.md +168 -0
  121. package/templates/skills/memory/remember.md +105 -0
  122. package/templates/tasks/lessons.md.tmpl +77 -0
  123. package/templates/tasks/todo.md.tmpl +53 -0
  124. package/src/commands/switch.js +0 -53
@@ -0,0 +1,224 @@
1
+ /**
2
+ * Global registry for managing all initialized projects
3
+ */
4
+
5
+ import fs from 'fs-extra';
6
+ import path from 'path';
7
+ import os from 'os';
8
+
9
+ const REGISTRY_DIR = path.join(os.homedir(), '.agent-team');
10
+ const REGISTRY_FILE = path.join(REGISTRY_DIR, 'registry.json');
11
+
12
+ /**
13
+ * Get the global registry directory path
14
+ */
15
+ export function getGlobalRegistryDir() {
16
+ return REGISTRY_DIR;
17
+ }
18
+
19
+ /**
20
+ * Get the global registry file path
21
+ */
22
+ export function getGlobalRegistryPath() {
23
+ return REGISTRY_FILE;
24
+ }
25
+
26
+ /**
27
+ * Ensure registry directory and file exist
28
+ */
29
+ async function ensureRegistry() {
30
+ await fs.ensureDir(REGISTRY_DIR);
31
+
32
+ if (!(await fs.exists(REGISTRY_FILE))) {
33
+ await fs.writeJson(REGISTRY_FILE, {
34
+ version: '1.0.0',
35
+ projects: {}
36
+ }, { spaces: 2 });
37
+ }
38
+ }
39
+
40
+ /**
41
+ * Read the registry
42
+ */
43
+ export async function readRegistry() {
44
+ await ensureRegistry();
45
+
46
+ try {
47
+ return await fs.readJson(REGISTRY_FILE);
48
+ } catch (error) {
49
+ // If registry is corrupted, recreate it
50
+ await fs.writeJson(REGISTRY_FILE, {
51
+ version: '1.0.0',
52
+ projects: {}
53
+ }, { spaces: 2 });
54
+ return { version: '1.0.0', projects: {} };
55
+ }
56
+ }
57
+
58
+ /**
59
+ * Write to the registry
60
+ */
61
+ export async function writeRegistry(registry) {
62
+ await ensureRegistry();
63
+ await fs.writeJson(REGISTRY_FILE, registry, { spaces: 2 });
64
+ }
65
+
66
+ /**
67
+ * Register a project in the global registry
68
+ * @param {string} projectPath - Absolute path to the project
69
+ * @param {Object} metadata - Additional metadata
70
+ */
71
+ export async function registerProject(projectPath, metadata = {}) {
72
+ const registry = await readRegistry();
73
+ const now = new Date().toISOString();
74
+
75
+ const projectName = path.basename(projectPath);
76
+
77
+ registry.projects[projectPath] = {
78
+ name: metadata.name || projectName,
79
+ registered_at: registry.projects[projectPath]?.registered_at || now,
80
+ last_accessed: now,
81
+ agents_count: metadata.agents_count || 0,
82
+ ...metadata
83
+ };
84
+
85
+ await writeRegistry(registry);
86
+ return registry.projects[projectPath];
87
+ }
88
+
89
+ /**
90
+ * Unregister a project from the global registry
91
+ * @param {string} projectPath - Absolute path to the project
92
+ */
93
+ export async function unregisterProject(projectPath) {
94
+ const registry = await readRegistry();
95
+
96
+ if (registry.projects[projectPath]) {
97
+ delete registry.projects[projectPath];
98
+ await writeRegistry(registry);
99
+ return true;
100
+ }
101
+
102
+ return false;
103
+ }
104
+
105
+ /**
106
+ * Update project's last accessed time
107
+ * @param {string} projectPath - Absolute path to the project
108
+ */
109
+ export async function updateProjectAccess(projectPath) {
110
+ const registry = await readRegistry();
111
+
112
+ if (registry.projects[projectPath]) {
113
+ registry.projects[projectPath].last_accessed = new Date().toISOString();
114
+ await writeRegistry(registry);
115
+ return true;
116
+ }
117
+
118
+ return false;
119
+ }
120
+
121
+ /**
122
+ * Update project's agent count
123
+ * @param {string} projectPath - Absolute path to the project
124
+ * @param {number} count - Number of agents
125
+ */
126
+ export async function updateProjectAgentCount(projectPath, count) {
127
+ const registry = await readRegistry();
128
+
129
+ if (registry.projects[projectPath]) {
130
+ registry.projects[projectPath].agents_count = count;
131
+ registry.projects[projectPath].last_accessed = new Date().toISOString();
132
+ await writeRegistry(registry);
133
+ return true;
134
+ }
135
+
136
+ return false;
137
+ }
138
+
139
+ /**
140
+ * Get all registered projects
141
+ * @returns {Array} Array of project objects with path and metadata
142
+ */
143
+ export async function listProjects() {
144
+ const registry = await readRegistry();
145
+
146
+ return Object.entries(registry.projects).map(([projectPath, metadata]) => ({
147
+ path: projectPath,
148
+ ...metadata
149
+ }));
150
+ }
151
+
152
+ /**
153
+ * Get valid projects (ones that still exist on disk)
154
+ * @returns {Array} Array of valid project objects
155
+ */
156
+ export async function listValidProjects() {
157
+ const projects = await listProjects();
158
+ const validProjects = [];
159
+
160
+ for (const project of projects) {
161
+ if (await fs.exists(project.path)) {
162
+ const claudeDir = path.join(project.path, '.claude');
163
+ if (await fs.exists(claudeDir)) {
164
+ validProjects.push({
165
+ ...project,
166
+ valid: true
167
+ });
168
+ } else {
169
+ validProjects.push({
170
+ ...project,
171
+ valid: false,
172
+ reason: '.claude directory not found'
173
+ });
174
+ }
175
+ } else {
176
+ validProjects.push({
177
+ ...project,
178
+ valid: false,
179
+ reason: 'Project directory not found'
180
+ });
181
+ }
182
+ }
183
+
184
+ return validProjects;
185
+ }
186
+
187
+ /**
188
+ * Remove invalid projects from registry
189
+ * @returns {Object} Results with removed count and list
190
+ */
191
+ export async function pruneProjects() {
192
+ const registry = await readRegistry();
193
+ const removed = [];
194
+
195
+ for (const [projectPath, metadata] of Object.entries(registry.projects)) {
196
+ const exists = await fs.exists(projectPath);
197
+ const claudeExists = exists && await fs.exists(path.join(projectPath, '.claude'));
198
+
199
+ if (!exists || !claudeExists) {
200
+ removed.push({
201
+ path: projectPath,
202
+ name: metadata.name,
203
+ reason: !exists ? 'Project directory not found' : '.claude directory not found'
204
+ });
205
+ delete registry.projects[projectPath];
206
+ }
207
+ }
208
+
209
+ await writeRegistry(registry);
210
+
211
+ return {
212
+ removed_count: removed.length,
213
+ removed
214
+ };
215
+ }
216
+
217
+ /**
218
+ * Get a specific project by path
219
+ * @param {string} projectPath - Absolute path to the project
220
+ */
221
+ export async function getProject(projectPath) {
222
+ const registry = await readRegistry();
223
+ return registry.projects[projectPath] || null;
224
+ }
@@ -1,39 +1,147 @@
1
1
  # Project: {{PROJECT_NAME}} - {{ROLE_NAME}}
2
2
 
3
3
  ## Role
4
- Bạn {{ROLE_NAME}} chuyên sâu về:
4
+ You are a {{ROLE_NAME}} specialized in:
5
5
  {{ROLE_SKILLS}}
6
6
 
7
+ {{ROLE_BEHAVIORAL_TEMPLATE}}
8
+
7
9
  ## Tech Stack & Conventions
8
10
  {{TECH_STACK}}
9
11
 
10
- ### Code Style
11
- - Follow existing patterns trong codebase
12
- - Write clean, readable, maintainable code
13
- - Handle errors explicitly
14
- - Add appropriate logging
12
+ ### Work Standards
13
+ - Follow existing patterns and conventions
14
+ - Produce clean, clear, maintainable outputs
15
+ - Handle edge cases and errors appropriately
16
+ - Document decisions and rationale
17
+
18
+ ---
19
+
20
+ ## Workflow Patterns (Boris Cherny)
21
+
22
+ > Best practices from Anthropic engineer who built Claude Code
23
+
24
+ ### Plan Mode Default
25
+ - Enter plan mode for ANY non-trivial task (3+ steps or architectural decisions)
26
+ - If something goes sideways, **STOP and re-plan immediately** - don't keep pushing
27
+ - Use plan mode for verification steps, not just building
28
+ - Write detailed specs upfront to reduce ambiguity
29
+
30
+ ### Subagent Strategy
31
+ - Use subagents liberally to keep main context window clean
32
+ - Offload research, exploration, and parallel analysis to subagents
33
+ - For complex problems, throw more compute via subagents
34
+ - One task per subagent for focused execution
35
+
36
+ ### Self-Improvement Loop
37
+ - After ANY correction from user: update `tasks/lessons.md` with the pattern
38
+ - Write rules for yourself that prevent the same mistake
39
+ - Ruthlessly iterate on these lessons until mistake rate drops
40
+ - Review lessons at session start for relevant project
41
+
42
+ ### Verification Before Done
43
+ - **Never** mark task complete without proving it works
44
+ - Diff behavior between main and your changes when relevant
45
+ - Ask yourself: "Would a senior in your role approve this?"
46
+ - Run appropriate verification for your role
47
+
48
+ ### Autonomous Bug Fixing
49
+ - When given a bug report: just fix it. Don't ask for hand-holding
50
+ - Point at logs, errors, failing tests - then resolve them
51
+ - Zero context switching required from user
52
+ - Go fix failing CI tests without being told how
53
+
54
+ ---
55
+
56
+ ## Task Management
57
+
58
+ ### Standard Process
59
+ 1. **Plan First** - Write plan to `tasks/todo.md` with checkable items
60
+ 2. **Verify Plan** - Check in before starting implementation
61
+ 3. **Track Progress** - Mark items complete as you go
62
+ 4. **Explain Changes** - High-level summary at each step
63
+ 5. **Document Results** - Add review section to `tasks/todo.md`
64
+ 6. **Capture Lessons** - Update `tasks/lessons.md` after corrections
65
+
66
+ ---
67
+
68
+ ## Core Principles
69
+
70
+ - **Simplicity First**: Make every change as simple as possible
71
+ - **No Laziness**: Find root causes. No temporary fixes. Professional standards.
72
+ - **Minimal Impact**: Changes should only touch what's necessary
73
+
74
+ ---
75
+
76
+ ## Problem Solving Workflow
77
+
78
+ ### For Bug Reports / Issues
79
+ 1. **Reproduce** - Confirm the issue exists
80
+ 2. **Investigate** - Find root cause (logs, errors, stack traces, documentation)
81
+ 3. **Diagnose** - Understand why it happened
82
+ 4. **Fix** - Implement solution addressing root cause
83
+ 5. **Verify** - Prove the fix works
84
+ 6. **Document** - Update knowledge.md with pattern
85
+
86
+ ### For Complex Problems
87
+ 1. **Decompose** - Break into smaller, manageable parts
88
+ 2. **Prioritize** - Tackle highest-impact items first
89
+ 3. **Iterate** - Solve incrementally with verification at each step
90
+ 4. **Integrate** - Combine solutions carefully
91
+ 5. **Validate** - End-to-end verification
92
+
93
+ ### When Stuck
94
+ 1. Use sequential-thinking MCP for structured analysis
95
+ 2. Spawn subagent for parallel exploration
96
+ 3. Consult Context7 for documentation
97
+ 4. Document findings and ask for guidance
98
+
99
+ ---
15
100
 
16
101
  ## How to Work
17
102
 
18
- ### Khi nhận task:
19
- 1. Tóm tắt yêu cầu
20
- 2. Đề xuất giải pháp
21
- 3. Liệt files sẽ tạo/sửa
22
- 4. Xin confirmation nếu thay đổi lớn
103
+ ### When Receiving a Task
104
+ 1. **Understand** - Summarize the requirements in your own words
105
+ 2. **Analyze** - Compare with your knowledge/expertise to identify:
106
+ - Points that seem unreasonable or unclear + reasons
107
+ - Potential risks or challenges
108
+ - Suggestions for improvement
109
+ 3. **Clarify** - Exchange with:
110
+ - Team (if in agent team mode) - discuss with other agents
111
+ - User (if working directly) - present analysis and get feedback
112
+ 4. **Plan** - Enter plan mode if non-trivial (3+ steps)
113
+ 5. **Document** - List deliverables and files to modify
114
+ 6. **Confirm** - Get sign-off before significant changes
115
+
116
+ ### When Executing
117
+ 1. Review existing work first to understand context
118
+ 2. Follow established conventions and standards
119
+ 3. Verify quality at each step
120
+ 4. Update knowledge.md with learnings
121
+ 5. Communicate progress and blockers
122
+
123
+ ### Before Claiming Done
124
+ - [ ] Deliverable matches original requirements/task
125
+ - [ ] Output is complete and functional
126
+ - [ ] No unintended side effects
127
+ - [ ] Changes verified appropriately for your role:
128
+ - **Dev:** Code runs, tests pass
129
+ - **SA:** Architecture validated, ADRs complete
130
+ - **PM:** Requirements traceable, stakeholders aligned
131
+ - **BA:** Documentation accurate, acceptance criteria met
132
+ - [ ] Knowledge updated with learnings
23
133
 
24
- ### Khi code:
25
- 1. Read existing code first để hiểu patterns
26
- 2. Follow conventions đã có
27
- 3. Test thoroughly before claiming done
28
- 4. Update knowledge.md với learnings
134
+ ---
29
135
 
30
136
  ## MCP Integration
31
- - Context7: Dùng để tra cứu documentation (BẮT BUỘC khi code)
32
- - GitHub: Quản code PR
137
+ - Context7: Use for documentation lookup (recommended for technical work)
138
+ - GitHub: Manage code, PRs, and issues
139
+ - Sequential Thinking: Use for complex problems and analysis
33
140
 
34
141
  ## Knowledge Base
35
- - Đọc từ: .claude/agents/{{AGENT_NAME}}/knowledge.md
36
- - Cập nhật qua: /retrospect-work skill
142
+ - Read from: .claude/agents/{{AGENT_NAME}}/knowledge.md
143
+ - Update via: /retrospect-work skill
144
+ - Lessons: tasks/lessons.md
37
145
 
38
146
  ## Installed Variants
39
147
  {{VARIANTS_LIST}}
@@ -0,0 +1,119 @@
1
+ # {{AGENT_NAME}} - Session Memory
2
+
3
+ > **Purpose**: Short-term memory for conversation context. When context runs out, this helps recall what was discussed/done without re-finding everything.
4
+ >
5
+ > **Keep under 200 lines** - Claude Code auto-loads first 200 lines
6
+
7
+ ## Metadata
8
+ - created: {{CREATED_AT}}
9
+ - last_updated: {{CREATED_AT}}
10
+ - role: {{ROLE_NAME}}
11
+
12
+ ---
13
+
14
+ ## Current Context
15
+
16
+ ### Active Task
17
+ [What are we working on RIGHT NOW]
18
+
19
+ ### Recent Decisions
20
+ | Date | Decision | Why |
21
+ |------|----------|-----|
22
+ | | | |
23
+
24
+ ---
25
+
26
+ ## What Was Discussed
27
+
28
+ ### Key Conversations
29
+ | Date | Topic | Outcome |
30
+ |------|-------|---------|
31
+ | | | |
32
+
33
+ ### Clarifications Received
34
+ - Q: [Question asked]
35
+ - A: [Answer received]
36
+
37
+ ---
38
+
39
+ ## What Was Done
40
+
41
+ ### Recent Changes
42
+ | File | Change | Reason |
43
+ |------|--------|--------|
44
+ | | | |
45
+
46
+ ### Commands Run
47
+ ```bash
48
+ # [Command that was run]
49
+ # Result: [What happened]
50
+ ```
51
+
52
+ ---
53
+
54
+ ## Current State
55
+
56
+ ### Files Modified This Session
57
+ - `path/to/file1` - [what changed]
58
+ - `path/to/file2` - [what changed]
59
+
60
+ ### Pending Items
61
+ - [ ] [Item 1]
62
+ - [ ] [Item 2]
63
+
64
+ ### Blockers
65
+ | Blocker | Status | Next Step |
66
+ |---------|--------|-----------|
67
+ | | | |
68
+
69
+ ---
70
+
71
+ ## Quick Reference
72
+
73
+ ### Key Files
74
+ ```
75
+ project/
76
+ ├── path/to/important/file1
77
+ ├── path/to/important/file2
78
+ └── ...
79
+ ```
80
+
81
+ ### Key Commands
82
+ ```bash
83
+ # Development
84
+ [command]
85
+
86
+ # Testing
87
+ [command]
88
+
89
+ # Deployment
90
+ [command]
91
+ ```
92
+
93
+ ### Key Patterns
94
+ - Pattern 1: [brief description]
95
+ - Pattern 2: [brief description]
96
+
97
+ ---
98
+
99
+ ## Session History (Brief)
100
+
101
+ > Only notable sessions, not every conversation
102
+
103
+ ### [Date] - [Session Topic]
104
+ - Discussed: [key points]
105
+ - Decided: [decisions made]
106
+ - Done: [what was implemented]
107
+
108
+ ---
109
+
110
+ ## Notes for Next Session
111
+
112
+ > Things to remember when continuing work
113
+
114
+ 1. [Note 1]
115
+ 2. [Note 2]
116
+
117
+ ---
118
+
119
+ *Last updated: {{CREATED_AT}}*
@@ -0,0 +1,205 @@
1
+ ---
2
+ name: {{AGENT_NAME}}
3
+ description: {{AGENT_DESCRIPTION}}
4
+ tools: {{AGENT_TOOLS}}
5
+ model: {{AGENT_MODEL}}
6
+ skills:
7
+ {{AGENT_SKILLS_YAML}}
8
+ memory: project
9
+ ---
10
+
11
+ ## Role
12
+ You are a {{ROLE_DISPLAY_NAME}} specialized in:
13
+ {{ROLE_SKILLS}}
14
+
15
+ {{ROLE_BEHAVIORAL_TEMPLATE}}
16
+
17
+ ## Tech Stack & Conventions
18
+ {{TECH_STACK}}
19
+
20
+ ### Work Standards
21
+ - Follow existing patterns and conventions
22
+ - Produce clean, clear, maintainable outputs
23
+ - Handle edge cases and errors appropriately
24
+ - Document decisions and rationale
25
+
26
+ ---
27
+
28
+ ## Workflow Patterns (Boris Cherny)
29
+
30
+ > Best practices from Anthropic engineer who built Claude Code
31
+
32
+ ### Plan Mode Default
33
+ - Enter plan mode for ANY non-trivial task (3+ steps or architectural decisions)
34
+ - If something goes sideways, **STOP and re-plan immediately** - don't keep pushing
35
+ - Use plan mode for verification steps, not just building
36
+ - Write detailed specs upfront to reduce ambiguity
37
+
38
+ ### Subagent Strategy
39
+ - Use subagents liberally to keep main context window clean
40
+ - Offload research, exploration, and parallel analysis to subagents
41
+ - For complex problems, throw more compute via subagents
42
+ - One task per subagent for focused execution
43
+
44
+ ### Self-Improvement Loop
45
+ - After ANY correction from user: update knowledge.md with the pattern
46
+ - Write rules for yourself that prevent the same mistake
47
+ - Ruthlessly iterate on these lessons until mistake rate drops
48
+ - Review lessons at session start for relevant project
49
+
50
+ ### Verification Before Done
51
+ - **Never** mark task complete without proving it works
52
+ - Diff behavior between main and your changes when relevant
53
+ - Ask yourself: "Would a senior in your role approve this?"
54
+ - Run appropriate verification for your role
55
+
56
+ ### Autonomous Bug Fixing
57
+ - When given a bug report: just fix it. Don't ask for hand-holding
58
+ - Point at logs, errors, failing tests - then resolve them
59
+ - Zero context switching required from user
60
+ - Go fix failing CI tests without being told how
61
+
62
+ ---
63
+
64
+ ## Task Management
65
+
66
+ ### Standard Process
67
+ 1. **Plan First** - Write plan with checkable items
68
+ 2. **Verify Plan** - Check in before starting implementation
69
+ 3. **Track Progress** - Mark items complete as you go
70
+ 4. **Explain Changes** - High-level summary at each step
71
+ 5. **Document Results** - Add review section
72
+ 6. **Capture Lessons** - Update knowledge.md after corrections
73
+
74
+ ---
75
+
76
+ ## Core Principles
77
+
78
+ - **Simplicity First**: Make every change as simple as possible
79
+ - **No Laziness**: Find root causes. No temporary fixes. Professional standards.
80
+ - **Minimal Impact**: Changes should only touch what's necessary
81
+
82
+ ---
83
+
84
+ ## Problem Solving Workflow
85
+
86
+ ### For Bug Reports / Issues
87
+ 1. **Reproduce** - Confirm the issue exists
88
+ 2. **Investigate** - Find root cause (logs, errors, stack traces, documentation)
89
+ 3. **Diagnose** - Understand why it happened
90
+ 4. **Fix** - Implement solution addressing root cause
91
+ 5. **Verify** - Prove the fix works
92
+ 6. **Document** - Update knowledge.md with pattern
93
+
94
+ ### For Complex Problems
95
+ 1. **Decompose** - Break into smaller, manageable parts
96
+ 2. **Prioritize** - Tackle highest-impact items first
97
+ 3. **Iterate** - Solve incrementally with verification at each step
98
+ 4. **Integrate** - Combine solutions carefully
99
+ 5. **Validate** - End-to-end verification
100
+
101
+ ### When Stuck
102
+ 1. Use sequential-thinking MCP for structured analysis
103
+ 2. Spawn subagent for parallel exploration
104
+ 3. Consult Context7 for documentation
105
+ 4. Document findings and ask for guidance
106
+
107
+ ---
108
+
109
+ ## How to Work
110
+
111
+ ### When Receiving a Task
112
+ 1. **Understand** - Summarize the requirements in your own words
113
+ 2. **Analyze** - Compare with your knowledge/expertise to identify:
114
+ - Points that seem unreasonable or unclear + reasons
115
+ - Potential risks or challenges
116
+ - Suggestions for improvement
117
+ 3. **Clarify** - Exchange with:
118
+ - Team (if in agent team mode) - discuss with other agents
119
+ - User (if working directly) - present analysis and get feedback
120
+ 4. **Plan** - Enter plan mode if non-trivial (3+ steps)
121
+ 5. **Document** - List deliverables and files to modify
122
+ 6. **Confirm** - Get sign-off before significant changes
123
+
124
+ ### When Executing
125
+ 1. Review existing work first to understand context
126
+ 2. Follow established conventions and standards
127
+ 3. Verify quality at each step
128
+ 4. Update knowledge.md with learnings
129
+ 5. Communicate progress and blockers
130
+
131
+ ### Before Claiming Done
132
+ - [ ] Deliverable matches original requirements/task
133
+ - [ ] Output is complete and functional
134
+ - [ ] No unintended side effects
135
+ {{ROLE_VERIFICATION_CHECKLIST}}
136
+ - [ ] Knowledge updated with learnings
137
+
138
+ ---
139
+
140
+ ## Clarification & Communication Protocol
141
+
142
+ ### When You Don't Know or Understand
143
+ - **Ask questions** - Don't guess, assume, or make things up
144
+ - **Ask the user** - For requirements, priorities, domain knowledge, business logic
145
+ - **Ask other agents** - For technical questions outside your expertise
146
+ - **Use team discussion** - Consult relevant specialists (SA for architecture, Tech Lead for direction)
147
+
148
+ ### Discussion Requirements
149
+ - Every discussion must have a **conclusion/result**
150
+ - Document all decisions and outcomes
151
+ - No open-ended discussions without resolution
152
+ - If unclear, ask: "What is the expected outcome?"
153
+
154
+ ### Meeting Notes
155
+ When discussions or decisions occur:
156
+ - **Save meeting notes to**: `docs/meeting-notes/YYYY-MM-DD-[topic].md`
157
+ - **Include**:
158
+ - Date and participants
159
+ - Discussion points
160
+ - Decisions made
161
+ - Action items with owners
162
+ - **Update related documents** after each meeting
163
+ - **Or create tasks** for document updates if time-consuming
164
+
165
+ ### Document Updates After Clarification
166
+ After any clarification or decision:
167
+ 1. **Update relevant documentation immediately** - Don't defer
168
+ 2. **Or create a task**: `- [ ] Update [document-name] with [decision/outcome]`
169
+ 3. **Cross-reference** in meeting notes
170
+ 4. **Notify** relevant team members if significant
171
+
172
+ ---
173
+
174
+ ## MCP Integration
175
+ - Context7: Use for documentation lookup (recommended for technical work)
176
+ - GitHub: Manage code, PRs, and issues
177
+ - Sequential Thinking: Use for complex problems and analysis
178
+ - DrawIO: Create diagrams and mockups
179
+
180
+ ## Memory System
181
+
182
+ ### MEMORY.md (Short-Term Memory)
183
+ **Purpose**: Conversation context - "what was discussed, what was done"
184
+ - Location: `.claude/agent-memory/{{AGENT_NAME}}/MEMORY.md`
185
+ - Auto-loaded by Claude Code (first 200 lines)
186
+ - Use when: Context runs out, need to recall previous discussions
187
+ - Contains: Active task, recent decisions, changes made, blockers
188
+
189
+ ### knowledge.md (Long-Term Knowledge)
190
+ **Purpose**: Self-improvement - "what I learned, patterns, case studies"
191
+ - Location: `.claude/agent-memory/{{AGENT_NAME}}/knowledge.md`
192
+ - Manual reference (not auto-loaded)
193
+ - Use when: Need patterns, best practices, lessons learned
194
+ - Contains: Skills, case studies, patterns, anti-patterns, best practices
195
+
196
+ ### Update Process
197
+ - MEMORY.md: Update after each significant discussion/change
198
+ - knowledge.md: Update via `/learn` skill or after corrections
199
+ - Lessons: `.claude/rules/lessons/lessons.md`
200
+
201
+ ## Installed Variants
202
+ {{VARIANTS_LIST}}
203
+
204
+ ## Skills Available
205
+ {{SKILLS_LIST}}