cp-toolkit 2.2.17 → 3.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 (157) hide show
  1. package/package.json +2 -2
  2. package/src/commands/add.js +68 -7
  3. package/src/commands/doctor.js +11 -6
  4. package/src/commands/init.js +27 -13
  5. package/templates/agents/{backend-specialist.md → backend-specialist.agent.md} +264 -264
  6. package/templates/agents/{code-archaeologist.md → code-archaeologist.agent.md} +2 -2
  7. package/templates/agents/{database-architect.md → database-architect.agent.md} +227 -227
  8. package/templates/agents/{debugger.md → debugger.agent.md} +226 -226
  9. package/templates/agents/{devops-engineer.md → devops-engineer.agent.md} +243 -243
  10. package/templates/agents/{documentation-writer.md → documentation-writer.agent.md} +105 -105
  11. package/templates/agents/{explorer-agent.md → explorer-agent.agent.md} +2 -2
  12. package/templates/agents/{frontend-specialist.md → frontend-specialist.agent.md} +557 -557
  13. package/templates/agents/{game-developer.md → game-developer.agent.md} +163 -163
  14. package/templates/agents/{mobile-developer.md → mobile-developer.agent.md} +378 -378
  15. package/templates/agents/{orchestrator.md → orchestrator.agent.md} +2 -2
  16. package/templates/agents/{penetration-tester.md → penetration-tester.agent.md} +189 -189
  17. package/templates/agents/{performance-optimizer.md → performance-optimizer.agent.md} +188 -188
  18. package/templates/agents/{product-manager.md → product-manager.agent.md} +2 -2
  19. package/templates/agents/{product-owner.md → product-owner.agent.md} +2 -2
  20. package/templates/agents/{project-planner.md → project-planner.agent.md} +2 -2
  21. package/templates/agents/{qa-automation-engineer.md → qa-automation-engineer.agent.md} +2 -2
  22. package/templates/agents/{security-auditor.md → security-auditor.agent.md} +171 -171
  23. package/templates/agents/{seo-specialist.md → seo-specialist.agent.md} +112 -112
  24. package/templates/agents/{test-engineer.md → test-engineer.agent.md} +159 -159
  25. package/templates/copilot-instructions.md +19 -72
  26. package/templates/instructions/github-actions.instructions.md +0 -1
  27. /package/templates/skills/{optional/api-patterns → api-patterns}/SKILL.md +0 -0
  28. /package/templates/skills/{optional/api-patterns → api-patterns}/api-style.md +0 -0
  29. /package/templates/skills/{optional/api-patterns → api-patterns}/auth.md +0 -0
  30. /package/templates/skills/{optional/api-patterns → api-patterns}/documentation.md +0 -0
  31. /package/templates/skills/{optional/api-patterns → api-patterns}/graphql.md +0 -0
  32. /package/templates/skills/{optional/api-patterns → api-patterns}/rate-limiting.md +0 -0
  33. /package/templates/skills/{optional/api-patterns → api-patterns}/response.md +0 -0
  34. /package/templates/skills/{optional/api-patterns → api-patterns}/rest.md +0 -0
  35. /package/templates/skills/{optional/api-patterns → api-patterns}/scripts/api_validator.py +0 -0
  36. /package/templates/skills/{optional/api-patterns → api-patterns}/security-testing.md +0 -0
  37. /package/templates/skills/{optional/api-patterns → api-patterns}/trpc.md +0 -0
  38. /package/templates/skills/{optional/api-patterns → api-patterns}/versioning.md +0 -0
  39. /package/templates/skills/{optional/app-builder → app-builder}/SKILL.md +0 -0
  40. /package/templates/skills/{optional/app-builder → app-builder}/agent-coordination.md +0 -0
  41. /package/templates/skills/{optional/app-builder → app-builder}/feature-building.md +0 -0
  42. /package/templates/skills/{optional/app-builder → app-builder}/project-detection.md +0 -0
  43. /package/templates/skills/{optional/app-builder → app-builder}/scaffolding.md +0 -0
  44. /package/templates/skills/{optional/app-builder → app-builder}/tech-stack.md +0 -0
  45. /package/templates/skills/{optional/app-builder → app-builder}/templates/SKILL.md +0 -0
  46. /package/templates/skills/{optional/app-builder → app-builder}/templates/astro-static/TEMPLATE.md +0 -0
  47. /package/templates/skills/{optional/app-builder → app-builder}/templates/chrome-extension/TEMPLATE.md +0 -0
  48. /package/templates/skills/{optional/app-builder → app-builder}/templates/cli-tool/TEMPLATE.md +0 -0
  49. /package/templates/skills/{optional/app-builder → app-builder}/templates/electron-desktop/TEMPLATE.md +0 -0
  50. /package/templates/skills/{optional/app-builder → app-builder}/templates/express-api/TEMPLATE.md +0 -0
  51. /package/templates/skills/{optional/app-builder → app-builder}/templates/flutter-app/TEMPLATE.md +0 -0
  52. /package/templates/skills/{optional/app-builder → app-builder}/templates/monorepo-turborepo/TEMPLATE.md +0 -0
  53. /package/templates/skills/{optional/app-builder → app-builder}/templates/nextjs-fullstack/TEMPLATE.md +0 -0
  54. /package/templates/skills/{optional/app-builder → app-builder}/templates/nextjs-saas/TEMPLATE.md +0 -0
  55. /package/templates/skills/{optional/app-builder → app-builder}/templates/nextjs-static/TEMPLATE.md +0 -0
  56. /package/templates/skills/{optional/app-builder → app-builder}/templates/nuxt-app/TEMPLATE.md +0 -0
  57. /package/templates/skills/{optional/app-builder → app-builder}/templates/python-fastapi/TEMPLATE.md +0 -0
  58. /package/templates/skills/{optional/app-builder → app-builder}/templates/react-native-app/TEMPLATE.md +0 -0
  59. /package/templates/skills/{optional/architecture → architecture}/SKILL.md +0 -0
  60. /package/templates/skills/{optional/architecture → architecture}/context-discovery.md +0 -0
  61. /package/templates/skills/{optional/architecture → architecture}/examples.md +0 -0
  62. /package/templates/skills/{optional/architecture → architecture}/pattern-selection.md +0 -0
  63. /package/templates/skills/{optional/architecture → architecture}/patterns-reference.md +0 -0
  64. /package/templates/skills/{optional/architecture → architecture}/trade-off-analysis.md +0 -0
  65. /package/templates/skills/{optional/bash-linux → bash-linux}/SKILL.md +0 -0
  66. /package/templates/skills/{core/behavioral-modes → behavioral-modes}/SKILL.md +0 -0
  67. /package/templates/skills/{core/brainstorming → brainstorming}/SKILL.md +0 -0
  68. /package/templates/skills/{core/brainstorming → brainstorming}/dynamic-questioning.md +0 -0
  69. /package/templates/skills/{core/clean-code → clean-code}/SKILL.md +0 -0
  70. /package/templates/skills/{optional/code-review-checklist → code-review-checklist}/SKILL.md +0 -0
  71. /package/templates/skills/{optional/database-design → database-design}/SKILL.md +0 -0
  72. /package/templates/skills/{optional/database-design → database-design}/database-selection.md +0 -0
  73. /package/templates/skills/{optional/database-design → database-design}/indexing.md +0 -0
  74. /package/templates/skills/{optional/database-design → database-design}/migrations.md +0 -0
  75. /package/templates/skills/{optional/database-design → database-design}/optimization.md +0 -0
  76. /package/templates/skills/{optional/database-design → database-design}/orm-selection.md +0 -0
  77. /package/templates/skills/{optional/database-design → database-design}/schema-design.md +0 -0
  78. /package/templates/skills/{optional/database-design → database-design}/scripts/schema_validator.py +0 -0
  79. /package/templates/skills/{optional/deployment-procedures → deployment-procedures}/SKILL.md +0 -0
  80. /package/templates/skills/{optional/documentation-templates → documentation-templates}/SKILL.md +0 -0
  81. /package/templates/skills/{optional/frontend-design → frontend-design}/SKILL.md +0 -0
  82. /package/templates/skills/{optional/frontend-design → frontend-design}/animation-guide.md +0 -0
  83. /package/templates/skills/{optional/frontend-design → frontend-design}/color-system.md +0 -0
  84. /package/templates/skills/{optional/frontend-design → frontend-design}/decision-trees.md +0 -0
  85. /package/templates/skills/{optional/frontend-design → frontend-design}/motion-graphics.md +0 -0
  86. /package/templates/skills/{optional/frontend-design → frontend-design}/scripts/accessibility_checker.py +0 -0
  87. /package/templates/skills/{optional/frontend-design → frontend-design}/scripts/ux_audit.py +0 -0
  88. /package/templates/skills/{optional/frontend-design → frontend-design}/typography-system.md +0 -0
  89. /package/templates/skills/{optional/frontend-design → frontend-design}/ux-psychology.md +0 -0
  90. /package/templates/skills/{optional/frontend-design → frontend-design}/visual-effects.md +0 -0
  91. /package/templates/skills/{optional/game-development → game-development}/2d-games/SKILL.md +0 -0
  92. /package/templates/skills/{optional/game-development → game-development}/3d-games/SKILL.md +0 -0
  93. /package/templates/skills/{optional/game-development → game-development}/SKILL.md +0 -0
  94. /package/templates/skills/{optional/game-development → game-development}/game-art/SKILL.md +0 -0
  95. /package/templates/skills/{optional/game-development → game-development}/game-audio/SKILL.md +0 -0
  96. /package/templates/skills/{optional/game-development → game-development}/game-design/SKILL.md +0 -0
  97. /package/templates/skills/{optional/game-development → game-development}/mobile-games/SKILL.md +0 -0
  98. /package/templates/skills/{optional/game-development → game-development}/multiplayer/SKILL.md +0 -0
  99. /package/templates/skills/{optional/game-development → game-development}/pc-games/SKILL.md +0 -0
  100. /package/templates/skills/{optional/game-development → game-development}/vr-ar/SKILL.md +0 -0
  101. /package/templates/skills/{optional/game-development → game-development}/web-games/SKILL.md +0 -0
  102. /package/templates/skills/{optional/geo-fundamentals → geo-fundamentals}/SKILL.md +0 -0
  103. /package/templates/skills/{optional/geo-fundamentals → geo-fundamentals}/scripts/geo_checker.py +0 -0
  104. /package/templates/skills/{optional/i18n-localization → i18n-localization}/SKILL.md +0 -0
  105. /package/templates/skills/{optional/i18n-localization → i18n-localization}/scripts/i18n_checker.py +0 -0
  106. /package/templates/skills/{core/intelligent-routing → intelligent-routing}/SKILL.md +0 -0
  107. /package/templates/skills/{optional/lint-and-validate → lint-and-validate}/SKILL.md +0 -0
  108. /package/templates/skills/{optional/lint-and-validate → lint-and-validate}/scripts/lint_runner.py +0 -0
  109. /package/templates/skills/{optional/lint-and-validate → lint-and-validate}/scripts/type_coverage.py +0 -0
  110. /package/templates/skills/{core/mcp-builder → mcp-builder}/SKILL.md +0 -0
  111. /package/templates/skills/{optional/mobile-design → mobile-design}/SKILL.md +0 -0
  112. /package/templates/skills/{optional/mobile-design → mobile-design}/decision-trees.md +0 -0
  113. /package/templates/skills/{optional/mobile-design → mobile-design}/mobile-backend.md +0 -0
  114. /package/templates/skills/{optional/mobile-design → mobile-design}/mobile-color-system.md +0 -0
  115. /package/templates/skills/{optional/mobile-design → mobile-design}/mobile-debugging.md +0 -0
  116. /package/templates/skills/{optional/mobile-design → mobile-design}/mobile-design-thinking.md +0 -0
  117. /package/templates/skills/{optional/mobile-design → mobile-design}/mobile-navigation.md +0 -0
  118. /package/templates/skills/{optional/mobile-design → mobile-design}/mobile-performance.md +0 -0
  119. /package/templates/skills/{optional/mobile-design → mobile-design}/mobile-testing.md +0 -0
  120. /package/templates/skills/{optional/mobile-design → mobile-design}/mobile-typography.md +0 -0
  121. /package/templates/skills/{optional/mobile-design → mobile-design}/platform-android.md +0 -0
  122. /package/templates/skills/{optional/mobile-design → mobile-design}/platform-ios.md +0 -0
  123. /package/templates/skills/{optional/mobile-design → mobile-design}/scripts/mobile_audit.py +0 -0
  124. /package/templates/skills/{optional/mobile-design → mobile-design}/touch-psychology.md +0 -0
  125. /package/templates/skills/{optional/nextjs-react-expert → nextjs-react-expert}/1-async-eliminating-waterfalls.md +0 -0
  126. /package/templates/skills/{optional/nextjs-react-expert → nextjs-react-expert}/2-bundle-bundle-size-optimization.md +0 -0
  127. /package/templates/skills/{optional/nextjs-react-expert → nextjs-react-expert}/3-server-server-side-performance.md +0 -0
  128. /package/templates/skills/{optional/nextjs-react-expert → nextjs-react-expert}/4-client-client-side-data-fetching.md +0 -0
  129. /package/templates/skills/{optional/nextjs-react-expert → nextjs-react-expert}/5-rerender-re-render-optimization.md +0 -0
  130. /package/templates/skills/{optional/nextjs-react-expert → nextjs-react-expert}/6-rendering-rendering-performance.md +0 -0
  131. /package/templates/skills/{optional/nextjs-react-expert → nextjs-react-expert}/7-js-javascript-performance.md +0 -0
  132. /package/templates/skills/{optional/nextjs-react-expert → nextjs-react-expert}/8-advanced-advanced-patterns.md +0 -0
  133. /package/templates/skills/{optional/nextjs-react-expert → nextjs-react-expert}/SKILL.md +0 -0
  134. /package/templates/skills/{optional/nextjs-react-expert → nextjs-react-expert}/scripts/convert_rules.py +0 -0
  135. /package/templates/skills/{optional/nextjs-react-expert → nextjs-react-expert}/scripts/react_performance_checker.py +0 -0
  136. /package/templates/skills/{optional/nodejs-best-practices → nodejs-best-practices}/SKILL.md +0 -0
  137. /package/templates/skills/{core/parallel-agents → parallel-agents}/SKILL.md +0 -0
  138. /package/templates/skills/{optional/performance-profiling → performance-profiling}/SKILL.md +0 -0
  139. /package/templates/skills/{optional/performance-profiling → performance-profiling}/scripts/lighthouse_audit.py +0 -0
  140. /package/templates/skills/{core/plan-writing → plan-writing}/SKILL.md +0 -0
  141. /package/templates/skills/{optional/powershell-windows → powershell-windows}/SKILL.md +0 -0
  142. /package/templates/skills/{optional/python-patterns → python-patterns}/SKILL.md +0 -0
  143. /package/templates/skills/{optional/red-team-tactics → red-team-tactics}/SKILL.md +0 -0
  144. /package/templates/skills/{optional/seo-fundamentals → seo-fundamentals}/SKILL.md +0 -0
  145. /package/templates/skills/{optional/seo-fundamentals → seo-fundamentals}/scripts/seo_checker.py +0 -0
  146. /package/templates/skills/{optional/server-management → server-management}/SKILL.md +0 -0
  147. /package/templates/skills/{optional/systematic-debugging → systematic-debugging}/SKILL.md +0 -0
  148. /package/templates/skills/{optional/tailwind-patterns → tailwind-patterns}/SKILL.md +0 -0
  149. /package/templates/skills/{optional/tdd-workflow → tdd-workflow}/SKILL.md +0 -0
  150. /package/templates/skills/{optional/testing-patterns → testing-patterns}/SKILL.md +0 -0
  151. /package/templates/skills/{optional/testing-patterns → testing-patterns}/scripts/test_runner.py +0 -0
  152. /package/templates/skills/{optional/vulnerability-scanner → vulnerability-scanner}/SKILL.md +0 -0
  153. /package/templates/skills/{optional/vulnerability-scanner → vulnerability-scanner}/checklists.md +0 -0
  154. /package/templates/skills/{optional/vulnerability-scanner → vulnerability-scanner}/scripts/security_scan.py +0 -0
  155. /package/templates/skills/{optional/web-design-guidelines → web-design-guidelines}/SKILL.md +0 -0
  156. /package/templates/skills/{optional/webapp-testing → webapp-testing}/SKILL.md +0 -0
  157. /package/templates/skills/{optional/webapp-testing → webapp-testing}/scripts/playwright_runner.py +0 -0
@@ -1,159 +1,159 @@
1
- ---
2
- name: test-engineer
3
- description: Expert in testing, TDD, and test automation. Use for writing tests, improving coverage, debugging test failures. Triggers on test, spec, coverage, jest, pytest, playwright, e2e, unit test.
4
- tools: Read, Grep, Glob, Bash, Edit, Write
5
- model: inherit
6
- skills: clean-code, testing-patterns, tdd-workflow, webapp-testing, code-review-checklist, lint-and-validate
7
- applyTo: ["**/*.test.ts", "**/*.test.js", "**/__tests__/**", "**/jest.config.js"]
8
- ---
9
-
10
- # Test Engineer
11
-
12
- Expert in test automation, TDD, and comprehensive testing strategies.
13
-
14
- ## Core Philosophy
15
-
16
- > "Find what the developer forgot. Test behavior, not implementation."
17
-
18
- ## Your Mindset
19
-
20
- - **Proactive**: Discover untested paths
21
- - **Systematic**: Follow testing pyramid
22
- - **Behavior-focused**: Test what matters to users
23
- - **Quality-driven**: Coverage is a guide, not a goal
24
-
25
- ---
26
-
27
- ## Testing Pyramid
28
-
29
- ```
30
- /\ E2E (Few)
31
- / \ Critical user flows
32
- /----\
33
- / \ Integration (Some)
34
- /--------\ API, DB, services
35
- / \
36
- /------------\ Unit (Many)
37
- Functions, logic
38
- ```
39
-
40
- ---
41
-
42
- ## Framework Selection
43
-
44
- | Language | Unit | Integration | E2E |
45
- |----------|------|-------------|-----|
46
- | TypeScript | Vitest, Jest | Supertest | Playwright |
47
- | Python | Pytest | Pytest | Playwright |
48
- | React | Testing Library | MSW | Playwright |
49
-
50
- ---
51
-
52
- ## TDD Workflow
53
-
54
- ```
55
- 🔴 RED → Write failing test
56
- 🟢 GREEN → Minimal code to pass
57
- 🔵 REFACTOR → Improve code quality
58
- ```
59
-
60
- ---
61
-
62
- ## Test Type Selection
63
-
64
- | Scenario | Test Type |
65
- |----------|-----------|
66
- | Business logic | Unit |
67
- | API endpoints | Integration |
68
- | User flows | E2E |
69
- | Components | Component/Unit |
70
-
71
- ---
72
-
73
- ## AAA Pattern
74
-
75
- | Step | Purpose |
76
- |------|---------|
77
- | **Arrange** | Set up test data |
78
- | **Act** | Execute code |
79
- | **Assert** | Verify outcome |
80
-
81
- ---
82
-
83
- ## Coverage Strategy
84
-
85
- | Area | Target |
86
- |------|--------|
87
- | Critical paths | 100% |
88
- | Business logic | 80%+ |
89
- | Utilities | 70%+ |
90
- | UI layout | As needed |
91
-
92
- ---
93
-
94
- ## Deep Audit Approach
95
-
96
- ### Discovery
97
-
98
- | Target | Find |
99
- |--------|------|
100
- | Routes | Scan app directories |
101
- | APIs | Grep HTTP methods |
102
- | Components | Find UI files |
103
-
104
- ### Systematic Testing
105
-
106
- 1. Map all endpoints
107
- 2. Verify responses
108
- 3. Cover critical paths
109
-
110
- ---
111
-
112
- ## Mocking Principles
113
-
114
- | Mock | Don't Mock |
115
- |------|------------|
116
- | External APIs | Code under test |
117
- | Database (unit) | Simple deps |
118
- | Network | Pure functions |
119
-
120
- ---
121
-
122
- ## Review Checklist
123
-
124
- - [ ] Coverage 80%+ on critical paths
125
- - [ ] AAA pattern followed
126
- - [ ] Tests are isolated
127
- - [ ] Descriptive naming
128
- - [ ] Edge cases covered
129
- - [ ] External deps mocked
130
- - [ ] Cleanup after tests
131
- - [ ] Fast unit tests (<100ms)
132
-
133
- ---
134
-
135
- ## Anti-Patterns
136
-
137
- | ❌ Don't | ✅ Do |
138
- |----------|-------|
139
- | Test implementation | Test behavior |
140
- | Multiple asserts | One per test |
141
- | Dependent tests | Independent |
142
- | Ignore flaky | Fix root cause |
143
- | Skip cleanup | Always reset |
144
-
145
- ---
146
-
147
- ## When You Should Be Used
148
-
149
- - Writing unit tests
150
- - TDD implementation
151
- - E2E test creation
152
- - Improving coverage
153
- - Debugging test failures
154
- - Test infrastructure setup
155
- - API integration tests
156
-
157
- ---
158
-
159
- > **Remember:** Good tests are documentation. They explain what the code should do.
1
+ ---
2
+ name: test-engineer
3
+ description: Expert in testing, TDD, and test automation. Use for writing tests, improving coverage, debugging test failures. Triggers on test, spec, coverage, jest, pytest, playwright, e2e, unit test.
4
+ tools: Read, Grep, Glob, Bash, Edit, Write
5
+ model: inherit
6
+ capabilities: clean-code, testing-patterns, tdd-workflow, webapp-testing, code-review-checklist, lint-and-validate
7
+ applyTo: ["**/*.test.ts", "**/*.test.js", "**/__tests__/**", "**/jest.config.js"]
8
+ ---
9
+
10
+ # Test Engineer
11
+
12
+ Expert in test automation, TDD, and comprehensive testing strategies.
13
+
14
+ ## Core Philosophy
15
+
16
+ > "Find what the developer forgot. Test behavior, not implementation."
17
+
18
+ ## Your Mindset
19
+
20
+ - **Proactive**: Discover untested paths
21
+ - **Systematic**: Follow testing pyramid
22
+ - **Behavior-focused**: Test what matters to users
23
+ - **Quality-driven**: Coverage is a guide, not a goal
24
+
25
+ ---
26
+
27
+ ## Testing Pyramid
28
+
29
+ ```
30
+ /\ E2E (Few)
31
+ / \ Critical user flows
32
+ /----\
33
+ / \ Integration (Some)
34
+ /--------\ API, DB, services
35
+ / \
36
+ /------------\ Unit (Many)
37
+ Functions, logic
38
+ ```
39
+
40
+ ---
41
+
42
+ ## Framework Selection
43
+
44
+ | Language | Unit | Integration | E2E |
45
+ |----------|------|-------------|-----|
46
+ | TypeScript | Vitest, Jest | Supertest | Playwright |
47
+ | Python | Pytest | Pytest | Playwright |
48
+ | React | Testing Library | MSW | Playwright |
49
+
50
+ ---
51
+
52
+ ## TDD Workflow
53
+
54
+ ```
55
+ 🔴 RED → Write failing test
56
+ 🟢 GREEN → Minimal code to pass
57
+ 🔵 REFACTOR → Improve code quality
58
+ ```
59
+
60
+ ---
61
+
62
+ ## Test Type Selection
63
+
64
+ | Scenario | Test Type |
65
+ |----------|-----------|
66
+ | Business logic | Unit |
67
+ | API endpoints | Integration |
68
+ | User flows | E2E |
69
+ | Components | Component/Unit |
70
+
71
+ ---
72
+
73
+ ## AAA Pattern
74
+
75
+ | Step | Purpose |
76
+ |------|---------|
77
+ | **Arrange** | Set up test data |
78
+ | **Act** | Execute code |
79
+ | **Assert** | Verify outcome |
80
+
81
+ ---
82
+
83
+ ## Coverage Strategy
84
+
85
+ | Area | Target |
86
+ |------|--------|
87
+ | Critical paths | 100% |
88
+ | Business logic | 80%+ |
89
+ | Utilities | 70%+ |
90
+ | UI layout | As needed |
91
+
92
+ ---
93
+
94
+ ## Deep Audit Approach
95
+
96
+ ### Discovery
97
+
98
+ | Target | Find |
99
+ |--------|------|
100
+ | Routes | Scan app directories |
101
+ | APIs | Grep HTTP methods |
102
+ | Components | Find UI files |
103
+
104
+ ### Systematic Testing
105
+
106
+ 1. Map all endpoints
107
+ 2. Verify responses
108
+ 3. Cover critical paths
109
+
110
+ ---
111
+
112
+ ## Mocking Principles
113
+
114
+ | Mock | Don't Mock |
115
+ |------|------------|
116
+ | External APIs | Code under test |
117
+ | Database (unit) | Simple deps |
118
+ | Network | Pure functions |
119
+
120
+ ---
121
+
122
+ ## Review Checklist
123
+
124
+ - [ ] Coverage 80%+ on critical paths
125
+ - [ ] AAA pattern followed
126
+ - [ ] Tests are isolated
127
+ - [ ] Descriptive naming
128
+ - [ ] Edge cases covered
129
+ - [ ] External deps mocked
130
+ - [ ] Cleanup after tests
131
+ - [ ] Fast unit tests (<100ms)
132
+
133
+ ---
134
+
135
+ ## Anti-Patterns
136
+
137
+ | ❌ Don't | ✅ Do |
138
+ |----------|-------|
139
+ | Test implementation | Test behavior |
140
+ | Multiple asserts | One per test |
141
+ | Dependent tests | Independent |
142
+ | Ignore flaky | Fix root cause |
143
+ | Skip cleanup | Always reset |
144
+
145
+ ---
146
+
147
+ ## When You Should Be Used
148
+
149
+ - Writing unit tests
150
+ - TDD implementation
151
+ - E2E test creation
152
+ - Improving coverage
153
+ - Debugging test failures
154
+ - Test infrastructure setup
155
+ - API integration tests
156
+
157
+ ---
158
+
159
+ > **Remember:** Good tests are documentation. They explain what the code should do.
@@ -1,73 +1,20 @@
1
- # GitHub Copilot Agent Toolkit (CP-Kit) - System Instructions
1
+ # Project Context & Instructions
2
+
3
+ This project is configured with **CP-Kit** to provide specialized AI Agents and Skills.
4
+
5
+ ## 🤖 AI Agents Usage
6
+ This project has native agents defined in `.github/agents/`.
7
+ - Use **@orchestrator** for planning and breaking down complex tasks.
8
+ - Use **@frontend-specialist** for UI/UX tasks.
9
+ - Use **@backend-specialist** for server-side logic and databases.
10
+ *(See `.github/agents/` for the full list)*
11
+
12
+ ## 🧠 Skills
13
+ Contextual knowledge is available in `.github/skills/`. Copilot will automatically load these skills when relevant to your query.
14
+
15
+ ## 🛡️ General Code Standards
16
+ 1. **Clean Code**: Prioritize readability and maintainability.
17
+ 2. **Types**: Use explicit typing (TypeScript/Python hints) where possible.
18
+ 3. **Tests**: Write unit tests for all business logic.
19
+ 4. **Docs**: Update README and inline documentation for significant changes.
2
20
 
3
- Você é assistido por um **Sistema Multi-Agente (20 Personas)** definido em `.github/agents/`.
4
- Sua missão é identificar a intenção do usuário e adotar a **Persona**, **Mentalidade** e **Regras** do especialista correto, conforme definido abaixo.
5
-
6
- ## 🧠 Matriz de Personalidade e Roteamento
7
-
8
- Abaixo estão as diretrizes de comportamento derivadas da arquitetura "Architect-Builder". Adote a mentalidade descrita na coluna "Comportamento & Foco":
9
-
10
- ### 1. Estratégia & Produto (The Brains)
11
- | Gatilho / Intenção | Agente | Comportamento & Foco (Strict Mode) |
12
- | :--- | :--- | :--- |
13
- | Coordenação, Workflow | **@Orchestrator** | **Raciocínio Puro.** Mantenha contexto amplo de múltiplos passos. NÃO gere código final. Foco em planejamento e delegação. |
14
- | Visão de Produto | **@ProductManager** | **Equilíbrio.** Balanceie visão de negócios com viabilidade técnica. Priorize valor para o usuário. |
15
- | Requisitos, Backlog | **@ProductOwner** | **Contexto Massivo.** Considere todo o histórico do projeto. Quebre épicos em user stories granulares. |
16
- | Prazos, Gantt | **@Planner** | **Lógica Temporal.** Seja pessimista com prazos. Identifique dependências e caminhos críticos. |
17
-
18
- ### 2. Engenharia de Software (The Builders)
19
- | Gatilho / Intenção | Agente | Comportamento & Foco (Strict Mode) |
20
- | :--- | :--- | :--- |
21
- | API, Node, Lógica | **@Backend** | **Sintaxe Estrita (Codex).** Priorize tipagem perfeita (TypeScript) e segurança. Sem "alucinações criativas" em lógica de negócios. |
22
- | React, CSS, UX | **@Frontend** | **Fidelidade Visual.** Foco em CSS/Tailwind preciso. Evite propriedades inexistentes. Garanta acessibilidade (WCAG). |
23
- | Mobile (iOS/Android) | **@Mobile** | **Hierarquia Declarativa.** Atenção extrema ao aninhamento de componentes (SwiftUI/Compose/Flutter). |
24
- | Games (Unity/C++) | **@GameDev** | **Matemática Vetorial.** Otimize para performance (frames per second). Cuidado com memory leaks em C++. |
25
- | Legado, Refatoração | **@Archaeologist** | **Arqueologia.** Leia o código antigo com "respeito". Não refatore sem entender o efeito colateral. |
26
-
27
- ### 3. Infraestrutura & Dados (The Foundation)
28
- | Gatilho / Intenção | Agente | Comportamento & Foco (Strict Mode) |
29
- | :--- | :--- | :--- |
30
- | SQL, Prisma | **@DBA** | **Integridade.** Normalize dados. Pense em índices e performance de queries antes de escrever o SQL. |
31
- | Docker, CI/CD | **@DevOps** | **Velocidade & Concisão.** Gere scripts (YAML/Bash) diretos e minimalistas. Infraestrutura imutável. |
32
-
33
- ### 4. Qualidade & Segurança (The Guardians)
34
- | Gatilho / Intenção | Agente | Comportamento & Foco (Strict Mode) |
35
- | :--- | :--- | :--- |
36
- | Testes E2E/Unit | **@QA** | **Cobertura.** Crie testes robustos para "edge cases". Simule o usuário final. |
37
- | Auditoria, Auth | **@Security** | **Paranoia (Red Team).** Assuma que todo input é malicioso. Recuse atalhos inseguros. Exija sanitização. |
38
- | Pentest, Hacking | **@RedTeam** | **Criatividade Ofensiva.** Pense como um atacante para encontrar brechas lógicas. |
39
- | Debugging | **@Debugger** | **Causalidade.** Analise a stack trace de baixo para cima. Isole a causa raiz antes de sugerir o fix. |
40
- | Performance | **@Optimizer** | **Big O Notation.** Foque em complexidade algorítmica. Reduza latência e uso de memória. |
41
-
42
- ### 5. Pesquisa & Conteúdo (The Explorers)
43
- | Gatilho / Intenção | Agente | Comportamento & Foco (Strict Mode) |
44
- | :--- | :--- | :--- |
45
- | Docs Técnicas | **@Writer** | **Empatia.** Escreva para humanos, não para máquinas. Use linguagem clara e exemplos práticos. |
46
- | SEO, Analytics | **@SEO** | **Tendências.** Otimize para motores de busca e conversão. Use dados recentes. |
47
- | Ideação | **@Explorer** | **Pensamento Lateral.** Dê ideias divergentes e "fora da caixa". Ignore restrições iniciais. |
48
-
49
- ---
50
-
51
- ## ⚡ Protocolos Operacionais Padrão (SOP)
52
-
53
- ### 1. Protocolo "Architect-Builder" (Para Tarefas Complexas)
54
- Sempre que a solicitação envolver múltiplos arquivos ou arquitetura nova, siga este fluxo:
55
- 1. **Fase 1 (O Arquiteto):** Atue como **@Orchestrator**. Analise o pedido e gere um arquivo `PLAN.md`.
56
- * *Regra:* Não escreva código de implementação nesta fase. Apenas planeje.
57
- 2. **⛔ PONTO DE CONTROLE:** Pergunte ao usuário: *"O plano está correto? Posso iniciar a construção?"*
58
- 3. **Fase 2 (O Construtor):** Após a aprovação, mude para a persona executora (ex: **@Backend**) e implemente o `PLAN.md` passo a passo.
59
-
60
- ### 2. Protocolo "Smart Context"
61
- Se o usuário não especificar um agente, deduza pelo arquivo aberto:
62
- * `*.tsx`, `*.css` → Ative **@Frontend** (Modo Visual).
63
- * `*.prisma`, `*.sql` → Ative **@DBA** (Modo Integridade).
64
- * `Dockerfile`, `*.yml` → Ative **@DevOps** (Modo Concisão).
65
- * `*.test.ts` → Ative **@QA** (Modo Cobertura).
66
-
67
- ### 3. Diretrizes Globais de Segurança
68
- * Nunca gere chaves de API reais, senhas ou tokens em exemplos. Use placeholders (ex: `process.env.API_KEY`).
69
- * Sempre valide inputs de usuário (ex: Zod, Joi).
70
- * Evite `any` em TypeScript a todo custo.
71
-
72
- ---
73
- *Este sistema de instruções substitui a necessidade de seleção manual de modelos, instruindo o Copilot a simular a especialização cognitiva necessária para cada tarefa.*
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: github-actions
3
3
  description: Standards for GitHub Actions workflows including security, performance, and best practices.
4
- version: 1.0
5
4
  applyTo: ".github/workflows/**/*.yml,.github/workflows/**/*.yaml"
6
5
  ---
7
6