@wipal/agent-team 1.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.
Files changed (89) hide show
  1. package/.claude/rules/common/general-rules.md +141 -0
  2. package/.claude/rules/lessons/lessons.md +91 -0
  3. package/.claude/rules/role-rules/dev-fe-rules.md +146 -0
  4. package/.claude/rules/role-rules/sa-rules.md +226 -0
  5. package/.claude/skills/SKILL-INDEX.md +299 -0
  6. package/.claude/skills/community/security-validator/SKILL.md +392 -0
  7. package/.claude/skills/core/agent-creation/SKILL.md +338 -0
  8. package/.claude/skills/core/code-review/SKILL.md +154 -0
  9. package/.claude/skills/core/git-automation/SKILL.md +93 -0
  10. package/.claude/skills/core/retrospect-work/SKILL.md +172 -0
  11. package/.claude/skills/domain/architecture/adr-writing/SKILL.md +254 -0
  12. package/.claude/skills/domain/architecture/adr-writing/references/adr-best-practices.md +257 -0
  13. package/.claude/skills/domain/architecture/adr-writing/references/adr-examples.md +246 -0
  14. package/.claude/skills/domain/architecture/adr-writing/references/adr-template.md +160 -0
  15. package/.claude/skills/domain/architecture/architecture-patterns/SKILL.md +316 -0
  16. package/.claude/skills/domain/architecture/architecture-patterns/references/event-driven.md +393 -0
  17. package/.claude/skills/domain/architecture/architecture-patterns/references/microservices.md +315 -0
  18. package/.claude/skills/domain/architecture/architecture-patterns/references/monolith.md +321 -0
  19. package/.claude/skills/domain/architecture/architecture-patterns/references/serverless.md +457 -0
  20. package/.claude/skills/domain/architecture/performance-engineering/SKILL.md +227 -0
  21. package/.claude/skills/domain/architecture/performance-engineering/references/benchmarking.md +336 -0
  22. package/.claude/skills/domain/architecture/performance-engineering/references/caching-strategies.md +284 -0
  23. package/.claude/skills/domain/architecture/performance-engineering/references/optimization.md +298 -0
  24. package/.claude/skills/domain/architecture/security-architecture/SKILL.md +206 -0
  25. package/.claude/skills/domain/architecture/security-architecture/references/auth-patterns.md +209 -0
  26. package/.claude/skills/domain/architecture/security-architecture/references/compliance.md +246 -0
  27. package/.claude/skills/domain/architecture/security-architecture/references/threat-modeling.md +219 -0
  28. package/.claude/skills/domain/architecture/system-design/SKILL.md +227 -0
  29. package/.claude/skills/domain/architecture/system-design/references/distributed-systems.md +231 -0
  30. package/.claude/skills/domain/architecture/system-design/references/resilience.md +344 -0
  31. package/.claude/skills/domain/architecture/system-design/references/scalability.md +303 -0
  32. package/.claude/skills/domain/architecture/tech-selection/SKILL.md +192 -0
  33. package/.claude/skills/domain/architecture/tech-selection/references/build-vs-buy.md +258 -0
  34. package/.claude/skills/domain/architecture/tech-selection/references/evaluation-framework.md +203 -0
  35. package/.claude/skills/domain/architecture/tech-selection/references/tech-radar.md +257 -0
  36. package/.claude/skills/domain/backend/api-design/SKILL.md +121 -0
  37. package/.claude/skills/domain/backend/database-design/SKILL.md +156 -0
  38. package/.claude/skills/domain/backend/performance-be/SKILL.md +210 -0
  39. package/.claude/skills/domain/backend/security/SKILL.md +138 -0
  40. package/.claude/skills/domain/backend/testing-be/SKILL.md +203 -0
  41. package/.claude/skills/domain/devops/ci-cd/SKILL.md +188 -0
  42. package/.claude/skills/domain/devops/containerization/SKILL.md +177 -0
  43. package/.claude/skills/domain/devops/deployment/SKILL.md +198 -0
  44. package/.claude/skills/domain/devops/infrastructure-as-code/SKILL.md +178 -0
  45. package/.claude/skills/domain/devops/monitoring/SKILL.md +163 -0
  46. package/.claude/skills/domain/frontend/accessibility/SKILL.md +179 -0
  47. package/.claude/skills/domain/frontend/frontend-design/SKILL.md +138 -0
  48. package/.claude/skills/domain/frontend/performance-fe/SKILL.md +195 -0
  49. package/.claude/skills/domain/frontend/state-management/SKILL.md +190 -0
  50. package/.claude/skills/domain/frontend/testing-fe/SKILL.md +193 -0
  51. package/.claude/skills/domain/product/requirements-gathering/SKILL.md +136 -0
  52. package/.claude/skills/domain/product/roadmap-planning/SKILL.md +169 -0
  53. package/.claude/skills/domain/product/sprint-planning/SKILL.md +151 -0
  54. package/.claude/skills/domain/product/stakeholder-communication/SKILL.md +162 -0
  55. package/.claude/skills/domain/product/user-stories/SKILL.md +141 -0
  56. package/.claude/skills/domain/quality/bug-reporting/SKILL.md +150 -0
  57. package/.claude/skills/domain/quality/regression-testing/SKILL.md +178 -0
  58. package/.claude/skills/domain/quality/test-automation/SKILL.md +185 -0
  59. package/.claude/skills/domain/quality/test-planning/SKILL.md +177 -0
  60. package/.claude/skills/leadership/code-review-advanced/SKILL.md +167 -0
  61. package/.claude/skills/leadership/mentoring/SKILL.md +151 -0
  62. package/.claude/skills/leadership/technical-debt/SKILL.md +166 -0
  63. package/.claude/skills/leadership/technical-decision/SKILL.md +160 -0
  64. package/.claude/skills/security-reports/.gitkeep +0 -0
  65. package/.claude/skills/skills-registry.yaml +441 -0
  66. package/README.md +232 -0
  67. package/bin/agent-team.js +107 -0
  68. package/package.json +51 -0
  69. package/src/commands/add.js +227 -0
  70. package/src/commands/init.js +136 -0
  71. package/src/commands/list.js +66 -0
  72. package/src/commands/remove.js +71 -0
  73. package/src/commands/switch.js +53 -0
  74. package/src/index.js +11 -0
  75. package/src/interactive/prompts.js +153 -0
  76. package/src/server/api/agents.js +150 -0
  77. package/src/server/api/roles.js +97 -0
  78. package/src/server/api/skills.js +79 -0
  79. package/src/server/index.js +78 -0
  80. package/src/ui/agents.html +174 -0
  81. package/src/ui/css/styles.css +470 -0
  82. package/src/ui/index.html +107 -0
  83. package/src/ui/roles.html +371 -0
  84. package/src/ui/skills.html +332 -0
  85. package/src/utils/file-utils.js +193 -0
  86. package/src/utils/skill-resolver.js +594 -0
  87. package/src/utils/skill-scanner.js +154 -0
  88. package/templates/CLAUDE.md.tmpl +42 -0
  89. package/templates/knowledge.md.tmpl +31 -0
@@ -0,0 +1,154 @@
1
+ /**
2
+ * Skill Scanner - Scan SKILL.md files and parse metadata
3
+ */
4
+
5
+ import fs from 'fs-extra';
6
+ import path from 'path';
7
+ import { glob } from 'glob';
8
+ import yaml from 'js-yaml';
9
+ import { getPackageRoot } from './file-utils.js';
10
+
11
+ /**
12
+ * Parse YAML frontmatter from markdown content
13
+ * @param {string} content - Markdown content with potential frontmatter
14
+ * @returns {Object} - Parsed frontmatter and body
15
+ */
16
+ export function parseFrontmatter(content) {
17
+ const match = content.match(/^---\n([\s\S]*?)\n---\n([\s\S]*)$/);
18
+
19
+ if (!match) {
20
+ return { metadata: {}, body: content };
21
+ }
22
+
23
+ try {
24
+ const metadata = yaml.load(match[1]);
25
+ const body = match[2];
26
+ return { metadata, body };
27
+ } catch (error) {
28
+ console.warn('Failed to parse frontmatter:', error.message);
29
+ return { metadata: {}, body: content };
30
+ }
31
+ }
32
+
33
+ /**
34
+ * Scan all SKILL.md files and extract metadata
35
+ * @param {string} skillsDir - Directory containing skills
36
+ * @returns {Promise<Array>} - Array of skill objects with metadata
37
+ */
38
+ export async function scanSkills(skillsDir = null) {
39
+ if (!skillsDir) {
40
+ skillsDir = path.join(getPackageRoot(), '.claude', 'skills');
41
+ }
42
+
43
+ const skillFiles = await glob('**/SKILL.md', {
44
+ cwd: skillsDir,
45
+ absolute: true
46
+ });
47
+
48
+ const skills = [];
49
+
50
+ for (const file of skillFiles) {
51
+ try {
52
+ const content = await fs.readFile(file, 'utf-8');
53
+ const { metadata, body } = parseFrontmatter(content);
54
+
55
+ // Get relative path from skills directory
56
+ const relativePath = path.relative(skillsDir, path.dirname(file));
57
+ const pathParts = relativePath.split(path.sep);
58
+
59
+ // Determine category from path
60
+ let category = metadata.category || 'unknown';
61
+ if (pathParts.length >= 2) {
62
+ // Path like: core/code-review/SKILL.md -> category = core
63
+ // Path like: domain/frontend/frontend-design/SKILL.md -> category = frontend
64
+ if (pathParts[0] === 'domain' && pathParts.length >= 2) {
65
+ category = metadata.category || pathParts[1];
66
+ } else {
67
+ category = metadata.category || pathParts[0];
68
+ }
69
+ }
70
+
71
+ skills.push({
72
+ name: metadata.name || path.basename(path.dirname(file)),
73
+ path: path.dirname(file),
74
+ relativePath,
75
+ category,
76
+ tags: metadata.tags || [],
77
+ description: metadata.description || '',
78
+ version: metadata.version || '1.0.0',
79
+ depends_on: metadata.depends_on || [],
80
+ recommends: metadata.recommends || [],
81
+ used_by: metadata.used_by || [],
82
+ body
83
+ });
84
+ } catch (error) {
85
+ console.warn(`Failed to scan skill: ${file}`, error.message);
86
+ }
87
+ }
88
+
89
+ return skills;
90
+ }
91
+
92
+ /**
93
+ * Get skills by category
94
+ * @param {Array} skills - Array of skills
95
+ * @param {string} category - Category to filter by
96
+ * @returns {Array} - Filtered skills
97
+ */
98
+ export function getSkillsByCategory(skills, category) {
99
+ return skills.filter(skill =>
100
+ skill.category === category ||
101
+ skill.tags.includes(category)
102
+ );
103
+ }
104
+
105
+ /**
106
+ * Get skills by names
107
+ * @param {Array} skills - Array of skills
108
+ * @param {Array} names - Skill names to filter by
109
+ * @returns {Array} - Filtered skills
110
+ */
111
+ export function getSkillsByNames(skills, names) {
112
+ return skills.filter(skill => names.includes(skill.name));
113
+ }
114
+
115
+ /**
116
+ * Get all unique categories from skills
117
+ * @param {Array} skills - Array of skills
118
+ * @returns {Array} - Unique categories
119
+ */
120
+ export function getCategories(skills) {
121
+ const categories = new Set();
122
+ for (const skill of skills) {
123
+ categories.add(skill.category);
124
+ for (const tag of skill.tags) {
125
+ categories.add(tag);
126
+ }
127
+ }
128
+ return Array.from(categories).sort();
129
+ }
130
+
131
+ /**
132
+ * Cache for scanned skills
133
+ */
134
+ let skillsCache = null;
135
+
136
+ /**
137
+ * Get skills with caching
138
+ * @param {boolean} refresh - Force refresh cache
139
+ * @returns {Promise<Array>} - Array of skills
140
+ */
141
+ export async function getSkills(refresh = false) {
142
+ if (skillsCache && !refresh) {
143
+ return skillsCache;
144
+ }
145
+ skillsCache = await scanSkills();
146
+ return skillsCache;
147
+ }
148
+
149
+ /**
150
+ * Clear skills cache
151
+ */
152
+ export function clearSkillsCache() {
153
+ skillsCache = null;
154
+ }
@@ -0,0 +1,42 @@
1
+ # Project: {{PROJECT_NAME}} - {{ROLE_NAME}}
2
+
3
+ ## Role
4
+ Bạn là {{ROLE_NAME}} chuyên sâu về:
5
+ {{ROLE_SKILLS}}
6
+
7
+ ## Tech Stack & Conventions
8
+ {{TECH_STACK}}
9
+
10
+ ### Code Style
11
+ - Follow existing patterns trong codebase
12
+ - Write clean, readable, maintainable code
13
+ - Handle errors explicitly
14
+ - Add appropriate logging
15
+
16
+ ## How to Work
17
+
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 kê files sẽ tạo/sửa
22
+ 4. Xin confirmation nếu thay đổi lớn
23
+
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
29
+
30
+ ## MCP Integration
31
+ - Context7: Dùng để tra cứu documentation (BẮT BUỘC khi code)
32
+ - GitHub: Quản lý code và PR
33
+
34
+ ## Knowledge Base
35
+ - Đọc từ: .claude/agents/{{AGENT_NAME}}/knowledge.md
36
+ - Cập nhật qua: /retrospect-work skill
37
+
38
+ ## Installed Variants
39
+ {{VARIANTS_LIST}}
40
+
41
+ ## Skills Available
42
+ {{SKILLS_LIST}}
@@ -0,0 +1,31 @@
1
+ # {{AGENT_NAME}} Knowledge Base
2
+
3
+ ## Metadata
4
+ - created: {{CREATED_AT}}
5
+ - last_updated: {{CREATED_AT}}
6
+ - base_role: {{ROLE_NAME}}
7
+
8
+ ## Project Context
9
+ [Project-specific information will be added as you work]
10
+
11
+ ## Learned Patterns
12
+ (Patterns will be added via /retrospect-work)
13
+
14
+ ### Code Patterns
15
+ ```
16
+ // Add patterns you discover here
17
+ ```
18
+
19
+ ### Best Practices
20
+ - [Add best practices you learn]
21
+
22
+ ### Common Pitfalls
23
+ - [Add pitfalls to avoid]
24
+
25
+ ## Feedback Log
26
+ (Feedback will be tracked here)
27
+
28
+ ### {{DATE}}: [Feedback Title]
29
+ - **What happened:**
30
+ - **Lesson learned:**
31
+ - **Action item:**