cc-codeconductor 0.4.2 → 0.5.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 (172) hide show
  1. package/README.md +75 -4
  2. package/dist/index.js +2698 -230
  3. package/package.json +1 -1
  4. package/presets/agy/skills/evaluation/SKILL.md +6 -0
  5. package/presets/agy/skills/openspec/SKILL.md +32 -0
  6. package/presets/agy/workflows/cc-openspec.md +62 -0
  7. package/presets/agy/workflows/cc-pipeline.md +69 -0
  8. package/presets/agy/workflows/cc-scorecard.md +17 -0
  9. package/presets/claude/commands/cc/openspec.md +144 -0
  10. package/presets/claude/commands/cc/review.md +13 -2
  11. package/presets/claude/commands/cc/scorecard.md +65 -0
  12. package/presets/claude/skills/evaluation/SKILL.md +42 -0
  13. package/presets/claude/skills/openspec/SKILL.md +54 -0
  14. package/presets/codex/AGENTS.md +57 -0
  15. package/presets/cursor/.cursorignore +15 -0
  16. package/presets/cursor/AGENTS.md +504 -0
  17. package/presets/cursor/agents/architect.md +211 -0
  18. package/presets/cursor/agents/complexity-auditor.md +76 -0
  19. package/presets/cursor/agents/contract-builder.md +75 -0
  20. package/presets/cursor/agents/docs.md +180 -0
  21. package/presets/cursor/agents/goal-planner.md +71 -0
  22. package/presets/cursor/agents/implementer.md +161 -0
  23. package/presets/cursor/agents/orchestrator.md +377 -0
  24. package/presets/cursor/agents/repo-explorer.md +100 -0
  25. package/presets/cursor/agents/reviewer.md +237 -0
  26. package/presets/cursor/agents/security-reviewer.md +113 -0
  27. package/presets/cursor/agents/task-coach.md +145 -0
  28. package/presets/cursor/agents/tester.md +241 -0
  29. package/presets/cursor/commands/cc/api-contract.md +58 -0
  30. package/presets/cursor/commands/cc/db-migration.md +58 -0
  31. package/presets/cursor/commands/cc/feature.md +115 -0
  32. package/presets/cursor/commands/cc/fix.md +121 -0
  33. package/presets/cursor/commands/cc/openspec.md +144 -0
  34. package/presets/cursor/commands/cc/pagespeed.md +103 -0
  35. package/presets/cursor/commands/cc/refactor.md +148 -0
  36. package/presets/cursor/commands/cc/review.md +137 -0
  37. package/presets/cursor/commands/cc/scorecard.md +65 -0
  38. package/presets/cursor/commands/cc/tdd-cycle.md +226 -0
  39. package/presets/cursor/commands/cc/test-plan.md +138 -0
  40. package/presets/cursor/rules/behavioral-discipline.mdc +14 -0
  41. package/presets/cursor/rules/context-budget.mdc +12 -0
  42. package/presets/cursor/rules/orchestration.mdc +12 -0
  43. package/presets/cursor/rules/yagni-stdlib.mdc +11 -0
  44. package/presets/cursor/skills/android/SKILL.md +122 -0
  45. package/presets/cursor/skills/api-versioning/SKILL.md +394 -0
  46. package/presets/cursor/skills/astro/SKILL.md +322 -0
  47. package/presets/cursor/skills/auth-token-inspector/SKILL.md +33 -0
  48. package/presets/cursor/skills/code-review/SKILL.md +208 -0
  49. package/presets/cursor/skills/conductor-setup/SKILL.md +127 -0
  50. package/presets/cursor/skills/django-orm/SKILL.md +463 -0
  51. package/presets/cursor/skills/django-testing/SKILL.md +417 -0
  52. package/presets/cursor/skills/django-uv/SKILL.md +409 -0
  53. package/presets/cursor/skills/drizzle-schema-architect/SKILL.md +54 -0
  54. package/presets/cursor/skills/evaluation/SKILL.md +8 -0
  55. package/presets/cursor/skills/fastapi-pydantic-strict/SKILL.md +46 -0
  56. package/presets/cursor/skills/find-skills/SKILL.md +144 -0
  57. package/presets/cursor/skills/jpa-nplusone-detector/SKILL.md +49 -0
  58. package/presets/cursor/skills/jpa-postgres/SKILL.md +626 -0
  59. package/presets/cursor/skills/laravel-specialist/SKILL.md +267 -0
  60. package/presets/cursor/skills/laravel-specialist/references/eloquent.md +351 -0
  61. package/presets/cursor/skills/laravel-specialist/references/livewire.md +512 -0
  62. package/presets/cursor/skills/laravel-specialist/references/queues.md +423 -0
  63. package/presets/cursor/skills/laravel-specialist/references/routing.md +362 -0
  64. package/presets/cursor/skills/laravel-specialist/references/testing.md +522 -0
  65. package/presets/cursor/skills/livewire-alpine-bridge/SKILL.md +39 -0
  66. package/presets/cursor/skills/multi-agent-orchestration/README.md +144 -0
  67. package/presets/cursor/skills/multi-agent-orchestration/SKILL.md +579 -0
  68. package/presets/cursor/skills/multi-agent-orchestration/examples/framework_implementations.py +362 -0
  69. package/presets/cursor/skills/multi-agent-orchestration/examples/orchestration_patterns.py +411 -0
  70. package/presets/cursor/skills/multi-agent-orchestration/scripts/agent_communication.py +334 -0
  71. package/presets/cursor/skills/multi-agent-orchestration/scripts/benchmarking.py +341 -0
  72. package/presets/cursor/skills/multi-agent-orchestration/scripts/workflow_management.py +334 -0
  73. package/presets/cursor/skills/nextjs-typescript/SKILL.md +394 -0
  74. package/presets/cursor/skills/openspec/SKILL.md +52 -0
  75. package/presets/cursor/skills/pagespeed-insights/SKILL.md +445 -0
  76. package/presets/cursor/skills/pagespeed-insights/reference.md +50 -0
  77. package/presets/cursor/skills/pagespeed-perf/SKILL.md +281 -0
  78. package/presets/cursor/skills/php-pro/SKILL.md +210 -0
  79. package/presets/cursor/skills/php-pro/references/async-patterns.md +412 -0
  80. package/presets/cursor/skills/php-pro/references/laravel-patterns.md +377 -0
  81. package/presets/cursor/skills/php-pro/references/modern-php-features.md +323 -0
  82. package/presets/cursor/skills/php-pro/references/symfony-patterns.md +466 -0
  83. package/presets/cursor/skills/php-pro/references/testing-quality.md +466 -0
  84. package/presets/cursor/skills/python/SKILL.md +613 -0
  85. package/presets/cursor/skills/python-django-stack/SKILL.md +500 -0
  86. package/presets/cursor/skills/python-fastapi-stack/SKILL.md +464 -0
  87. package/presets/cursor/skills/security/SKILL.md +384 -0
  88. package/presets/cursor/skills/seo-analytics-injector/SKILL.md +44 -0
  89. package/presets/cursor/skills/spring-auth-auditor/SKILL.md +33 -0
  90. package/presets/cursor/skills/spring-boot-feature/SKILL.md +566 -0
  91. package/presets/cursor/skills/spring-boot-kotlin/SKILL.md +408 -0
  92. package/presets/cursor/skills/spring-boot-testing-strategy/SKILL.md +479 -0
  93. package/presets/cursor/skills/sqlalchemy/SKILL.md +473 -0
  94. package/presets/cursor/skills/tailwind-responsive-auditor/SKILL.md +32 -0
  95. package/presets/cursor/skills/tdd-mutation-tester/SKILL.md +28 -0
  96. package/presets/cursor/skills/testing-tdd/SKILL.md +592 -0
  97. package/presets/cursor/skills/workflow-orchestration-patterns/SKILL.md +98 -0
  98. package/presets/cursor/skills/workflow-orchestration-patterns/references/details.md +223 -0
  99. package/presets/laravel-tall/agents/architect.md +8 -0
  100. package/presets/laravel-tall/agents/implementer.md +12 -0
  101. package/presets/laravel-tall/laravel-tall.yml +38 -0
  102. package/presets/opencode/agents/architect.md +153 -61
  103. package/presets/opencode/agents/complexity-auditor.md +1 -0
  104. package/presets/opencode/agents/contract-builder.md +93 -0
  105. package/presets/opencode/agents/docs.md +125 -40
  106. package/presets/opencode/agents/goal-planner.md +82 -0
  107. package/presets/opencode/agents/implementer.md +107 -38
  108. package/presets/opencode/agents/orchestrator.md +90 -71
  109. package/presets/opencode/agents/repo-explorer.md +1 -2
  110. package/presets/opencode/agents/reviewer.md +164 -75
  111. package/presets/opencode/agents/security-reviewer.md +129 -0
  112. package/presets/opencode/agents/task-coach.md +110 -59
  113. package/presets/opencode/agents/tester.md +1 -2
  114. package/presets/opencode/commands/cc-openspec.md +61 -0
  115. package/presets/opencode/commands/cc-scorecard.md +16 -0
  116. package/presets/opencode/prompts/v0.4.0/architect.md +221 -0
  117. package/presets/opencode/prompts/v0.4.0/complexity-auditor.md +89 -0
  118. package/presets/opencode/prompts/v0.4.0/docs.md +189 -0
  119. package/presets/opencode/prompts/v0.4.0/implementer.md +162 -0
  120. package/presets/opencode/prompts/v0.4.0/orchestrator.md +348 -0
  121. package/presets/opencode/prompts/v0.4.0/repo-explorer.md +110 -0
  122. package/presets/opencode/prompts/v0.4.0/reviewer.md +225 -0
  123. package/presets/opencode/prompts/v0.4.0/task-coach.md +155 -0
  124. package/presets/opencode/prompts/v0.4.0/tester.md +251 -0
  125. package/presets/opencode/prompts/v0.5.0/architect.md +222 -0
  126. package/presets/opencode/prompts/v0.5.0/complexity-auditor.md +91 -0
  127. package/presets/opencode/prompts/v0.5.0/contract-builder.md +84 -0
  128. package/presets/opencode/prompts/v0.5.0/docs.md +190 -0
  129. package/presets/opencode/prompts/v0.5.0/goal-planner.md +80 -0
  130. package/presets/opencode/prompts/v0.5.0/implementer.md +171 -0
  131. package/presets/opencode/prompts/v0.5.0/orchestrator.md +388 -0
  132. package/presets/opencode/prompts/v0.5.0/repo-explorer.md +111 -0
  133. package/presets/opencode/prompts/v0.5.0/reviewer.md +248 -0
  134. package/presets/opencode/prompts/v0.5.0/security-reviewer.md +123 -0
  135. package/presets/opencode/prompts/v0.5.0/task-coach.md +156 -0
  136. package/presets/opencode/prompts/v0.5.0/tester.md +252 -0
  137. package/presets/opencode/skills/auth-token-inspector/SKILL.md +31 -0
  138. package/presets/opencode/skills/drizzle-schema-architect/SKILL.md +51 -0
  139. package/presets/opencode/skills/evaluation/SKILL.md +6 -0
  140. package/presets/opencode/skills/fastapi-pydantic-strict/SKILL.md +44 -0
  141. package/presets/opencode/skills/jpa-nplusone-detector/SKILL.md +46 -0
  142. package/presets/opencode/skills/livewire-alpine-bridge/SKILL.md +36 -0
  143. package/presets/opencode/skills/openspec/SKILL.md +50 -0
  144. package/presets/opencode/skills/seo-analytics-injector/SKILL.md +44 -0
  145. package/presets/opencode/skills/spring-auth-auditor/SKILL.md +30 -0
  146. package/presets/opencode/skills/tailwind-responsive-auditor/SKILL.md +30 -0
  147. package/presets/opencode/skills/tdd-mutation-tester/SKILL.md +28 -0
  148. package/presets/python-data-api/agents/architect.md +8 -0
  149. package/presets/python-data-api/agents/implementer.md +9 -0
  150. package/presets/python-data-api/python-data-api.yml +37 -0
  151. package/presets/spring-kotlin-jpa/agents/architect.md +8 -0
  152. package/presets/spring-kotlin-jpa/agents/implementer.md +9 -0
  153. package/presets/spring-kotlin-jpa/spring-kotlin-jpa.yml +38 -0
  154. package/presets/templates/BACKLOG.md +33 -0
  155. package/presets/templates/execution-profile.yml +6 -0
  156. package/presets/templates/model-comparison.md +11 -0
  157. package/presets/templates/regression-checklist.yml +10 -0
  158. package/presets/ts-next-drizzle/agents/architect.md +8 -0
  159. package/presets/ts-next-drizzle/agents/implementer.md +10 -0
  160. package/presets/ts-next-drizzle/ts-next-drizzle.yml +41 -0
  161. package/src/presets/manifests/agy.yml +2 -2
  162. package/src/presets/manifests/claude.yml +2 -2
  163. package/src/presets/manifests/codex.yml +2 -2
  164. package/src/presets/manifests/cursor.yml +19 -3
  165. package/src/presets/manifests/gemini.yml +2 -2
  166. package/src/presets/manifests/opencode.yml +2 -2
  167. package/src/presets/models/agy.yml +21 -0
  168. package/src/presets/models/claude.yml +18 -0
  169. package/src/presets/models/codex.yml +18 -0
  170. package/src/presets/models/cursor.yml +39 -9
  171. package/src/presets/models/gemini.yml +18 -0
  172. package/src/presets/models/opencode.yml +18 -0
@@ -0,0 +1,226 @@
1
+ ---
2
+ description: >-
3
+ [cc: alias] Run a structured Red-Green-Refactor TDD cycle — write a failing
4
+ test first, implement the minimum code to pass it, then refactor with the
5
+ suite green.
6
+ ---
7
+
8
+ # TDD Cycle — Red → Green → Refactor
9
+
10
+ Scope: $ARGUMENTS
11
+
12
+ Describe what behavior you want to implement. Include:
13
+
14
+ - The function, method, or feature to implement
15
+ - The expected behavior (inputs and outputs, or acceptance criteria)
16
+ - Any known constraints or edge cases
17
+ - Relevant files or modules (if known)
18
+
19
+ ---
20
+
21
+ ## Before you begin — mandatory pre-check
22
+
23
+ This command enforces strict TDD discipline. The three phases are sequential and
24
+ non-negotiable:
25
+
26
+ 1. **RED** — a failing test exists before any implementation code is written
27
+ 2. **GREEN** — the minimum implementation to make the test pass (no more)
28
+ 3. **REFACTOR** — clean up the code while keeping all tests green
29
+
30
+ Do not write implementation code during RED. Do not refactor during GREEN.
31
+ Mixing phases invalidates the cycle.
32
+
33
+ ---
34
+
35
+ ## Phase 1 — RED (Tester role)
36
+
37
+ Invoke the `tester` subagent via the Task tool.
38
+
39
+ ### 1a — Scope clarification
40
+
41
+ Before writing any test, confirm:
42
+
43
+ - What is the unit of behavior being tested? (function, method, endpoint, domain
44
+ rule)
45
+ - What are the inputs and expected outputs?
46
+ - What are the failure cases?
47
+
48
+ If the scope is ambiguous, ask one clarifying question and wait for the answer.
49
+
50
+ ### 1b — Write the failing test
51
+
52
+ Write a test that:
53
+
54
+ - Targets exactly the behavior described in the scope
55
+ - Fails for the right reason (not a compile error, not a missing dependency —
56
+ the logic does not exist yet)
57
+ - Has a name that describes the behavior: `given_X_when_Y_then_Z` or equivalent
58
+ in the project's test naming convention
59
+ - Covers at minimum: one happy path, one edge case, one failure case
60
+
61
+ Do not write the implementation. Do not make the test pass by any means other
62
+ than the implementation that will follow in Phase 2.
63
+
64
+ ### 1c — Run the test suite and confirm RED
65
+
66
+ Run the test suite. The new test must fail. Existing tests must pass.
67
+
68
+ If the new test passes without implementation, the test is wrong. Fix the test
69
+ before continuing.
70
+
71
+ **RED Phase Report:**
72
+
73
+ ```
74
+ ## RED Phase Report
75
+
76
+ **Test file**: [path/to/test/file]
77
+ **Tests written**:
78
+ - [test name] — [what it verifies]
79
+
80
+ **Suite result**: [X passing, Y failing]
81
+ **New test status**: FAIL ✓
82
+ **Failure reason**: [quoted error or assertion message]
83
+ **Existing tests**: [all passing | N failing — list]
84
+ ```
85
+
86
+ **STOP. Show the RED Phase Report. Do not proceed to GREEN without
87
+ confirmation.**
88
+
89
+ ---
90
+
91
+ ## Phase 2 — GREEN (Implementer role)
92
+
93
+ Invoke the `implementer` subagent via the Task tool.
94
+
95
+ ### 2a — Read the failing test before writing any code
96
+
97
+ Understand exactly what the test asserts. Write only the code that satisfies
98
+ that assertion. Nothing more.
99
+
100
+ ### 2b — Implement the minimum
101
+
102
+ Rules for GREEN phase:
103
+
104
+ - Write the smallest amount of code that makes the failing test pass
105
+ - Do not add features not tested
106
+ - Do not clean up or restructure existing code — that is Refactor's job
107
+ - Do not add new tests — that is another RED cycle
108
+ - Hardcoding a return value is acceptable if it makes the test pass (the
109
+ Refactor phase will generalize it)
110
+
111
+ ### 2c — Run the test suite and confirm GREEN
112
+
113
+ Run the test suite. The new test must pass. All previously passing tests must
114
+ still pass.
115
+
116
+ If any previously passing test now fails, you introduced a regression. Fix it
117
+ before continuing.
118
+
119
+ **GREEN Phase Report:**
120
+
121
+ ```
122
+ ## GREEN Phase Report
123
+
124
+ **Files changed**:
125
+ - [path/to/file] — [what was added, one sentence]
126
+
127
+ **Implementation approach**: [one sentence — what the code does]
128
+ **Suite result**: [X passing, Y failing]
129
+ **New test status**: PASS ✓
130
+ **Regressions**: [none | list failing tests]
131
+ ```
132
+
133
+ **STOP. Show the GREEN Phase Report. Do not proceed to REFACTOR without
134
+ confirmation.**
135
+
136
+ ---
137
+
138
+ ## Phase 3 — REFACTOR (Implementer role, then Reviewer role)
139
+
140
+ Invoke the `implementer` subagent via the Task tool.
141
+
142
+ ### 3a — Assess what needs cleaning
143
+
144
+ Before touching any code, identify:
145
+
146
+ - Duplication introduced during GREEN
147
+ - Names that do not clearly express intent
148
+ - Abstractions that belong in a separate function or module
149
+ - Logic that is hardcoded and should be generalized
150
+
151
+ Do not invent improvements. Only address what is directly in the implementation
152
+ written in Phase 2.
153
+
154
+ ### 3b — Refactor
155
+
156
+ Rules for REFACTOR phase:
157
+
158
+ - All tests must remain GREEN throughout — run the suite after each change
159
+ - Do not add new behavior
160
+ - Do not add new tests (if you discover untested behavior, note it for a new RED
161
+ cycle)
162
+ - Do not change function signatures unless the original was clearly wrong
163
+
164
+ ### 3c — Run the test suite and confirm GREEN after refactor
165
+
166
+ The full suite must pass. If any test fails during refactor, undo the last
167
+ change and investigate.
168
+
169
+ ### 3d — Review (Reviewer role)
170
+
171
+ Invoke the `reviewer` subagent via the Task tool.
172
+
173
+ Review only the refactored code against these axes:
174
+
175
+ | Axis | What to check |
176
+ | ------------- | --------------------------------------------------------------- |
177
+ | Scope | Did the refactor change any behavior? |
178
+ | Correctness | Does the logic still satisfy the original test intent? |
179
+ | Architecture | Does the code follow existing project patterns? |
180
+ | Test coverage | Are all written tests still meaningful (not trivially passing)? |
181
+
182
+ Produce a Review Report. CRITICAL findings block completion.
183
+
184
+ **REFACTOR Phase Report:**
185
+
186
+ ```
187
+ ## REFACTOR Phase Report
188
+
189
+ **Changes made**:
190
+ - [path/to/file] — [what was cleaned up]
191
+
192
+ **Suite result**: [X passing, Y failing]
193
+ **Behavioral changes**: none (refactor only)
194
+
195
+ ### Review findings
196
+ **CRITICAL**: (none) | [list]
197
+ **WARNING**: (none) | [list]
198
+ **SUGGESTION**: (none) | [list]
199
+
200
+ **Verdict**: approved | approved with warnings | blocked
201
+ ```
202
+
203
+ ---
204
+
205
+ ## Completion
206
+
207
+ The TDD cycle is complete when:
208
+
209
+ - RED: at least one failing test was written and confirmed failing
210
+ - GREEN: the minimum implementation makes the test pass
211
+ - REFACTOR: the code is clean, all tests pass, no CRITICAL review findings
212
+
213
+ **Final Summary:**
214
+
215
+ ```
216
+ ## TDD Cycle Summary
217
+
218
+ **Behavior implemented**: [one sentence]
219
+ **Tests written**: [count] — [list test names]
220
+ **Files changed**: [list]
221
+ **Suite result**: [X passing, Y failing]
222
+ **Cycle status**: complete | blocked (reason)
223
+ ```
224
+
225
+ If the behavior requires additional test cases, start a new `/tdd-cycle` with
226
+ the next scenario. One cycle = one behavior.
@@ -0,0 +1,138 @@
1
+ ---
2
+ description: >-
3
+ [cc: alias] Generate a structured test plan for a feature or module — covers
4
+ unit, integration, contract, and edge cases without writing implementation code.
5
+ ---
6
+
7
+ # Test Plan Workflow
8
+
9
+ Scope: $ARGUMENTS
10
+
11
+ Specify what to plan tests for. Examples:
12
+
13
+ - A feature name: `user authentication`
14
+ - A module or file path: `src/orders/OrderService.kt`
15
+ - A Task Card title: `Add paginated product listing endpoint`
16
+ - A PR or branch: `feature/payment-retry`
17
+
18
+ If $ARGUMENTS is empty, describe the scope in your next message before
19
+ proceeding.
20
+
21
+ ---
22
+
23
+ ## Step 1 — Scope confirmation
24
+
25
+ Before generating the test plan, confirm the scope is well-defined.
26
+
27
+ A valid scope includes:
28
+
29
+ - The behavior or module under test
30
+ - The acceptance criteria or expected behavior (from the Task Card if available)
31
+ - Known edge cases or failure modes
32
+
33
+ If the scope is vague (e.g., "test the whole service"), ask one clarifying
34
+ question and wait for the answer.
35
+
36
+ ---
37
+
38
+ ## Step 2 — Test plan generation (Tester role, planning mode)
39
+
40
+ Invoke the `tester` subagent via the Task tool.
41
+
42
+ Produce a test plan document — not test code. The plan will be used as input
43
+ when tests are actually written.
44
+
45
+ Cover the following layers:
46
+
47
+ **Unit tests**
48
+
49
+ - Individual functions or methods in isolation
50
+ - One test per behavior, not per method
51
+ - Input/output contracts, null handling, type coercion
52
+
53
+ **Integration tests**
54
+
55
+ - Interactions between two or more components
56
+ - Database read/write cycles (if applicable)
57
+ - External service boundaries (mocked or stubbed)
58
+
59
+ **Contract tests**
60
+
61
+ - API endpoint contracts: request shape, response shape, status codes
62
+ - Event schema contracts (if event-driven components are in scope)
63
+
64
+ **Edge cases**
65
+
66
+ - Empty inputs, boundary values, max/min limits
67
+ - Concurrent access (if shared state is involved)
68
+ - Failure paths: what happens when a dependency is unavailable
69
+
70
+ **Regression cases**
71
+
72
+ - Known past bugs that must not recur (include reference if available)
73
+
74
+ ---
75
+
76
+ ## Step 3 — Test Plan format
77
+
78
+ Produce the plan in this format:
79
+
80
+ ```markdown
81
+ ## Test Plan — [Scope Name]
82
+
83
+ ### Scope
84
+ [What is being tested and why]
85
+
86
+ ### Unit Tests
87
+ | Test ID | Target | Scenario | Expected Result |
88
+ | ------- | ------ | -------- | --------------- |
89
+ | U-001 | ... | ... | ... |
90
+
91
+ ### Integration Tests
92
+ | Test ID | Components | Scenario | Expected Result |
93
+ | ------- | ---------- | -------- | --------------- |
94
+ | I-001 | ... | ... | ... |
95
+
96
+ ### Contract Tests
97
+ | Test ID | Endpoint/Event | Property | Expected Value |
98
+ | ------- | -------------- | -------- | -------------- |
99
+ | C-001 | ... | ... | ... |
100
+
101
+ ### Edge Cases
102
+ | Test ID | Input/Condition | Expected Behavior |
103
+ | ------- | --------------- | ----------------- |
104
+ | E-001 | ... | ... |
105
+
106
+ ### Regression Cases
107
+ | Test ID | Reference | Scenario | Must Not Happen |
108
+ | ------- | --------- | -------- | --------------- |
109
+ | R-001 | ... | ... | ... |
110
+
111
+ ### Coverage Targets
112
+ - Minimum unit coverage: [% or "all acceptance criteria covered"]
113
+ - Integration scenarios: [count]
114
+ - Contract validations: [count]
115
+
116
+ ### Out of Scope
117
+ [What this test plan explicitly does not cover and why]
118
+ ```
119
+
120
+ ---
121
+
122
+ ## Step 4 — Human review
123
+
124
+ Show the Test Plan before any tests are written. The Test Plan is an artifact
125
+ for review and approval.
126
+
127
+ Writing test code is a separate action — run `/feature` or add a test task to
128
+ implement from this plan.
129
+
130
+ ---
131
+
132
+ ## Completion
133
+
134
+ Deliver the complete Test Plan document. Save it as
135
+ `docs/test-plans/[scope-slug].md` if requested.
136
+
137
+ This command produces a plan, not test files. No production code and no test
138
+ code is written during this command.
@@ -0,0 +1,14 @@
1
+ ---
2
+ description: Behavioral discipline for all code changes — think before coding, simplicity first, surgical changes, goal-driven execution.
3
+ globs: "**/*"
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # Behavioral Discipline
8
+
9
+ 1. **Think Before Coding** — State assumptions explicitly. If uncertain, ask.
10
+ 2. **Simplicity First** — Minimum code that solves the problem. No speculative abstractions.
11
+ 3. **Surgical Changes** — Touch only what you must. Match existing style.
12
+ 4. **Goal-Driven Execution** — Define verifiable success criteria. Loop until verified.
13
+
14
+ See @AGENTS.md for full routing policy and agent contracts.
@@ -0,0 +1,12 @@
1
+ ---
2
+ description: Context budget and token optimization — use when conversation is long or switching tasks.
3
+ alwaysApply: false
4
+ ---
5
+
6
+ # Context Budget
7
+
8
+ - Execute `/clear` when switching to an unrelated task type.
9
+ - Use `/summarize` or `/compress` before re-delegating with large context.
10
+ - Delegate verbose exploration to background subagents (`repo-explorer`).
11
+ - Prefer `@filename` references over pasting full file contents.
12
+ - Respect `.cursorignore` — do not read excluded paths unless explicitly required.
@@ -0,0 +1,12 @@
1
+ ---
2
+ description: Cursor subagent orchestration patterns — multitask, parallel delegation, model tiers.
3
+ alwaysApply: false
4
+ ---
5
+
6
+ # Orchestration Patterns
7
+
8
+ - Use `/multitask` for independent parallel steps (review + docs).
9
+ - Invoke subagents via Task tool: `orchestrator`, `architect`, `implementer`, `tester`, `reviewer`, `security-reviewer`, `complexity-auditor`, `docs`, `task-coach`, `repo-explorer`.
10
+ - High-risk routes: `architect` → `implementer` → `tester` → `security-reviewer` → `reviewer`.
11
+ - Run `repo-explorer` as background subagent for codebase mapping.
12
+ - See `.cursor/agents/orchestrator.md` for full routing table.
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: YAGNI and stdlib-first constraints for source code changes.
3
+ globs: "src/**"
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # YAGNI and Stdlib-First
8
+
9
+ - Do not build features or abstractions not explicitly requested.
10
+ - Prefer the language standard library over third-party packages.
11
+ - Every line must solve a problem that exists now.
@@ -0,0 +1,122 @@
1
+ ---
2
+ id: android
3
+ version: 1.0.0
4
+ name: Android + Kotlin (Jetpack Compose & Media3)
5
+ description: >
6
+ Provides expert knowledge for building modern native Android apps using Kotlin, Jetpack Compose, Material Design 3, MVI architecture, Hilt dependency injection, and Media3/ExoPlayer.
7
+
8
+ user-invokable: true
9
+ license: MIT
10
+ metadata:
11
+ author: lgzarturo
12
+ category: mobile
13
+
14
+ compatibility:
15
+ tools: [claude, codex, gemini, agy, opencode]
16
+ stacks:
17
+ languages: [kotlin, java]
18
+ frameworks: [android]
19
+
20
+ risk:
21
+ level: medium
22
+ can_execute_shell: true
23
+ can_modify_files: true
24
+ requires_network: false
25
+
26
+ inputs: []
27
+
28
+ outputs: []
29
+
30
+ quality:
31
+ reviewed_by: codeconductor-core
32
+ version: 0.1.0
33
+ paths:
34
+ - "**/*.kt"
35
+ - "**/AndroidManifest.xml"
36
+ ---
37
+
38
+ # Android + Kotlin (Jetpack Compose & Media3)
39
+
40
+ This playbook defines the architecture, UI design system, performance guidelines, and testing strategy for native Android applications.
41
+
42
+ ---
43
+
44
+ ## 1. Lead Architect & Modularization
45
+
46
+ ### Architecture (MVI / MVVM with Clean Architecture)
47
+ - Prefer **MVI (Model-View-Intent)** for state management. Ensure a strict unidirectional data flow:
48
+ - **UiState**: Single source of truth for the UI state.
49
+ - **UiIntent**: Actions initiated by the user or system.
50
+ - **UiEffect**: One-time events (navigation, toasts, snackbars).
51
+ - Separate the project into clean logical modules:
52
+ - `app`: Application entry point, launcher activity, global dependency injection configuration.
53
+ - `core`: Shared resources, network layer, media playback logic (ExoPlayer/Media3), storage.
54
+ - `feature`: Individual business features (isolated and independent of other features).
55
+
56
+ ### Dependency Injection (Hilt)
57
+ - Annotate the Application class with `@HiltAndroidApp`.
58
+ - Annotate Activities and Fragments with `@AndroidEntryPoint`.
59
+ - Use constructor injection for ViewModels with `@HiltViewModel`.
60
+
61
+ ---
62
+
63
+ ## 2. Jetpack Compose UI/UX
64
+
65
+ ### Recomposition & State Management
66
+ - Consume `StateFlow` from ViewModels safely using `collectAsStateWithLifecycle()` to respect the activity lifecycle.
67
+ - Keep data models immutable. Mark configuration classes with `@Immutable` or `@Stable` to prevent redundant recompositions.
68
+ - Use `contentType` and `key` in `LazyColumn` and `LazyRow` to optimize item recycling and rendering performance.
69
+ - Avoid fixed hardcoded margins. Apply `WindowInsets` to support modern edge-to-edge screens.
70
+
71
+ ---
72
+
73
+ ## 3. Performance & Multimedia (Media3 / ExoPlayer)
74
+
75
+ ### Playback & Services
76
+ - Run `ExoPlayer` / `Media3` inside a robust `Foreground Service` (using `MediaSessionService`) to ensure playback continues when the app is in the background.
77
+ - Clean up resources: release player instances in `onDestroy` or when the service is stopped.
78
+ - Control wake locks strictly to avoid draining the user's battery when playback is paused.
79
+
80
+ ### Kotlin Coroutines & Threading
81
+ - Always inject `CoroutineDispatcher` instances instead of hardcoding them:
82
+ - `Dispatchers.IO`: Database access, network operations, file reading.
83
+ - `Dispatchers.Default`: CPU-intensive operations (parsing JSON, filtering large lists).
84
+ - `Dispatchers.Main`: UI modifications and light interactions.
85
+
86
+ ### R8 & Resource Optimization
87
+ - Enable shrinking and obfuscation in production builds:
88
+ - `isMinifyEnabled = true`
89
+ - `isShrinkResources = true`
90
+ - Convert all static images to the modern `WebP` format to minimize the application binary size.
91
+
92
+ ---
93
+
94
+ ## 4. Quality Assurance & Automated Testing
95
+
96
+ ### Unit Testing
97
+ - Use JUnit 5 and MockK for mocking dependencies.
98
+ - Test ViewModels and Reducers by asserting StateFlow updates. Use `Turbine` to easily test Kotlin Flows.
99
+ - Mock all multimedia/ExoPlayer components to avoid loading actual audio/video resources in unit tests.
100
+
101
+ ### UI Testing
102
+ - Create UI tests using Compose test rules: `createComposeRule()` or `createAndroidComposeRule<MainActivity>()`.
103
+ - Assert correct rendering, visibility states, and user interactions without executing real network calls.
104
+
105
+ ---
106
+
107
+ ## 5. Key Gradle & ADB Commands
108
+
109
+ Use these commands for building, checking code style, running tests, and profiling performance:
110
+
111
+ | Command | Action |
112
+ | ------- | ------ |
113
+ | `./gradlew init` | Initialize a new Gradle project structure. |
114
+ | `./gradlew app:dependencies` | List all dependencies of the application module. |
115
+ | `./gradlew assembleDebug` | Validate compilation and generate debug APK. |
116
+ | `./gradlew ktlintCheck` | Run KtLint check to enforce Kotlin style guidelines. |
117
+ | `./gradlew lintDebug` | Run Android Lint tool to inspect code quality and UI issues. |
118
+ | `./gradlew testDebugUnitTest` | Run unit tests for debug build variant. |
119
+ | `./gradlew connectedAndroidTest` | Run instrumented UI tests on connected emulator or device. |
120
+ | `./gradlew assembleRelease` | Generate release build variant with R8 optimizations. |
121
+ | `adb shell dumpsys batterystats` | Profile system battery consumption metrics. |
122
+ | `adb shell am dumpheap <package> heap.hprof` | Dump application heap memory file for profiling. |