@massa-ai/cursor-plugin 1.61.0 → 1.62.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 (276) hide show
  1. package/.cursor-plugin/plugin.json +1 -1
  2. package/README.md +2 -2
  3. package/agent-profiles/{heavy/massa-ai-builder.md → balanced/builder.md} +4 -4
  4. package/agent-profiles/balanced/code-explorer.md +102 -0
  5. package/agent-profiles/balanced/code-reviewer.md +134 -0
  6. package/agent-profiles/balanced/designer.md +84 -0
  7. package/agent-profiles/balanced/judge.md +147 -0
  8. package/agent-profiles/balanced/product-manager.md +108 -0
  9. package/agent-profiles/balanced/test-engineer.md +100 -0
  10. package/agent-profiles/cheap/{massa-ai-builder.md → builder.md} +4 -4
  11. package/agent-profiles/cheap/code-explorer.md +102 -0
  12. package/agent-profiles/cheap/code-reviewer.md +134 -0
  13. package/agent-profiles/cheap/designer.md +84 -0
  14. package/agent-profiles/cheap/judge.md +147 -0
  15. package/agent-profiles/cheap/product-manager.md +108 -0
  16. package/agent-profiles/cheap/test-engineer.md +100 -0
  17. package/agent-profiles/{balanced/massa-ai-builder.md → heavy/builder.md} +4 -4
  18. package/agent-profiles/heavy/code-explorer.md +102 -0
  19. package/agent-profiles/heavy/code-reviewer.md +134 -0
  20. package/agent-profiles/heavy/designer.md +84 -0
  21. package/agent-profiles/heavy/judge.md +147 -0
  22. package/agent-profiles/heavy/product-manager.md +108 -0
  23. package/agent-profiles/heavy/test-engineer.md +100 -0
  24. package/agent-profiles/home/{massa-ai-builder.md → builder.md} +4 -4
  25. package/agent-profiles/home/code-explorer.md +102 -0
  26. package/agent-profiles/home/code-reviewer.md +134 -0
  27. package/agent-profiles/home/designer.md +84 -0
  28. package/agent-profiles/home/judge.md +147 -0
  29. package/agent-profiles/home/product-manager.md +108 -0
  30. package/agent-profiles/home/test-engineer.md +100 -0
  31. package/agent-profiles/work/builder.md +63 -0
  32. package/agent-profiles/work/code-explorer.md +102 -0
  33. package/agent-profiles/work/code-reviewer.md +134 -0
  34. package/agent-profiles/work/designer.md +84 -0
  35. package/agent-profiles/work/judge.md +147 -0
  36. package/agent-profiles/work/product-manager.md +108 -0
  37. package/agent-profiles/work/test-engineer.md +100 -0
  38. package/agents/builder.md +63 -0
  39. package/agents/code-explorer.md +102 -0
  40. package/agents/code-reviewer.md +134 -0
  41. package/agents/designer.md +84 -0
  42. package/agents/judge.md +147 -0
  43. package/agents/product-manager.md +108 -0
  44. package/agents/test-engineer.md +100 -0
  45. package/hooks/massa-ai-hook +4 -4
  46. package/install.sh +110 -33
  47. package/package.json +1 -1
  48. package/skills/agents/builder/SKILL.md +3 -4
  49. package/skills/agents/code-explorer/SKILL.md +104 -0
  50. package/skills/agents/code-reviewer/SKILL.md +136 -0
  51. package/skills/agents/designer/SKILL.md +34 -17
  52. package/skills/agents/judge/SKILL.md +99 -48
  53. package/skills/agents/product-manager/SKILL.md +110 -0
  54. package/skills/agents/test-engineer/SKILL.md +57 -22
  55. package/skills/bootstrap/SKILL.md +4 -5
  56. package/skills/{adr → create-adr}/SKILL.md +3 -3
  57. package/skills/{to-prd → create-prd}/SKILL.md +3 -3
  58. package/skills/{rfc → create-rfc}/SKILL.md +3 -3
  59. package/skills/{tdd → create-tdd}/SKILL.md +3 -3
  60. package/skills/{ticket → create-ticket}/SKILL.md +3 -3
  61. package/skills/massa-ai/SKILL.md +26 -29
  62. package/skills/massa-ai/references/agent-orchestration.md +62 -58
  63. package/skills/massa-ai/references/audit-report-io.md +8 -87
  64. package/skills/massa-ai/references/code-reuse-scan.md +1 -1
  65. package/skills/massa-ai/references/{adr-authoring.md → create-adr.md} +3 -3
  66. package/skills/massa-ai/references/{rfc → create-rfc}/discovery-and-sizing.md +1 -1
  67. package/skills/massa-ai/references/{tdd → create-tdd}/calibrated-examples.md +3 -3
  68. package/skills/massa-ai/references/{tdd → create-tdd}/discovery-and-sizing.md +1 -1
  69. package/skills/massa-ai/references/{tdd → create-tdd}/quality-and-lifecycle.md +1 -1
  70. package/skills/massa-ai/references/{ticket → create-ticket}/intake-and-sources.md +1 -1
  71. package/skills/massa-ai/references/figma-pre-analysis.md +1 -1
  72. package/skills/massa-ai/references/furps/analyst-role.md +3 -3
  73. package/skills/massa-ai/references/furps/checklist.md +2 -2
  74. package/skills/massa-ai/references/furps/intake.md +7 -7
  75. package/skills/massa-ai/references/hook-enforcement.md +4 -8
  76. package/skills/massa-ai/references/implementation-delivery.md +2 -2
  77. package/skills/massa-ai/references/knowledge-verification-chain.md +0 -1
  78. package/skills/massa-ai/references/mobile-context.md +2 -5
  79. package/skills/massa-ai/references/pr-task-fix.md +1 -1
  80. package/skills/massa-ai/references/spec-driven/sub-agents.md +3 -3
  81. package/skills/massa-ai/references/spec-driven/validate.md +1 -1
  82. package/skills/massa-ai/references/subagent-design.md +6 -9
  83. package/skills/massa-ai/references/verification-ladder.md +2 -2
  84. package/skills/massa-ai/scripts/validate_audit_report.ts +3 -8
  85. package/skills/massa-ai/workflows/architecture/architecture-audit.md +4 -5
  86. package/skills/massa-ai/workflows/architecture/architecture-fix.md +5 -6
  87. package/skills/massa-ai/workflows/bugs/bugs-audit.md +2 -3
  88. package/skills/massa-ai/workflows/bugs/bugs-fix.md +4 -5
  89. package/skills/massa-ai/workflows/code-quality/code-quality-audit.md +2 -3
  90. package/skills/massa-ai/workflows/code-quality/code-quality-fix.md +4 -5
  91. package/skills/massa-ai/workflows/commit.md +3 -3
  92. package/skills/massa-ai/workflows/{adr.md → create-adr.md} +10 -10
  93. package/skills/massa-ai/workflows/{to-prd.md → create-prd.md} +4 -4
  94. package/skills/massa-ai/workflows/{rfc.md → create-rfc.md} +6 -6
  95. package/skills/massa-ai/workflows/{tdd.md → create-tdd.md} +11 -11
  96. package/skills/massa-ai/workflows/{ticket.md → create-ticket.md} +5 -5
  97. package/skills/massa-ai/workflows/debug.md +4 -5
  98. package/skills/massa-ai/workflows/design.md +2 -2
  99. package/skills/massa-ai/workflows/exploration.md +2 -2
  100. package/skills/massa-ai/workflows/feature.md +5 -6
  101. package/skills/massa-ai/workflows/implementation/implementation-audit.md +22 -3
  102. package/skills/massa-ai/workflows/implementation/implementation-fix.md +6 -7
  103. package/skills/massa-ai/workflows/judge-with-debate.md +14 -14
  104. package/skills/massa-ai/workflows/mobile-figma/mobile-figma-audit.md +2 -2
  105. package/skills/massa-ai/workflows/mobile-figma/mobile-figma-fix.md +10 -11
  106. package/skills/massa-ai/workflows/pr-review.md +31 -13
  107. package/skills/massa-ai/workflows/{discovery.md → product-discovery.md} +12 -12
  108. package/skills/massa-ai/workflows/refactor.md +4 -5
  109. package/skills/massa-ai/workflows/refinement/furps-refinement.md +7 -7
  110. package/skills/massa-ai/workflows/requirements/requirements-audit.md +2 -2
  111. package/skills/massa-ai/workflows/requirements/requirements-fix.md +5 -6
  112. package/skills/massa-ai/workflows/security/security-audit.md +2 -3
  113. package/skills/massa-ai/workflows/security/security-fix.md +3 -4
  114. package/skills/massa-ai/workflows/spec-driven.md +9 -10
  115. package/skills/massa-ai/workflows/tests/tests-audit.md +2 -2
  116. package/skills/massa-ai/workflows/tests/tests-fix.md +16 -6
  117. package/skills/massa-ai/workflows/the-fool.md +7 -7
  118. package/skills/{discovery → product-discovery}/SKILL.md +3 -3
  119. package/agent-profiles/balanced/massa-ai-architecture-specialist.md +0 -62
  120. package/agent-profiles/balanced/massa-ai-audit-specialist.md +0 -79
  121. package/agent-profiles/balanced/massa-ai-context-curator.md +0 -64
  122. package/agent-profiles/balanced/massa-ai-designer.md +0 -66
  123. package/agent-profiles/balanced/massa-ai-documentation-agent.md +0 -61
  124. package/agent-profiles/balanced/massa-ai-furps-analyst.md +0 -68
  125. package/agent-profiles/balanced/massa-ai-investigator.md +0 -65
  126. package/agent-profiles/balanced/massa-ai-judge.md +0 -95
  127. package/agent-profiles/balanced/massa-ai-meta-judge.md +0 -84
  128. package/agent-profiles/balanced/massa-ai-mobile-specialist.md +0 -79
  129. package/agent-profiles/balanced/massa-ai-navigator.md +0 -72
  130. package/agent-profiles/balanced/massa-ai-plan-critic.md +0 -87
  131. package/agent-profiles/balanced/massa-ai-planner.md +0 -62
  132. package/agent-profiles/balanced/massa-ai-requirements-analyst.md +0 -61
  133. package/agent-profiles/balanced/massa-ai-reviewer.md +0 -63
  134. package/agent-profiles/balanced/massa-ai-test-engineer.md +0 -63
  135. package/agent-profiles/balanced/massa-ai-verification-agent.md +0 -62
  136. package/agent-profiles/cheap/massa-ai-architecture-specialist.md +0 -62
  137. package/agent-profiles/cheap/massa-ai-audit-specialist.md +0 -79
  138. package/agent-profiles/cheap/massa-ai-context-curator.md +0 -64
  139. package/agent-profiles/cheap/massa-ai-designer.md +0 -66
  140. package/agent-profiles/cheap/massa-ai-documentation-agent.md +0 -61
  141. package/agent-profiles/cheap/massa-ai-furps-analyst.md +0 -68
  142. package/agent-profiles/cheap/massa-ai-investigator.md +0 -65
  143. package/agent-profiles/cheap/massa-ai-judge.md +0 -95
  144. package/agent-profiles/cheap/massa-ai-meta-judge.md +0 -84
  145. package/agent-profiles/cheap/massa-ai-mobile-specialist.md +0 -79
  146. package/agent-profiles/cheap/massa-ai-navigator.md +0 -72
  147. package/agent-profiles/cheap/massa-ai-plan-critic.md +0 -87
  148. package/agent-profiles/cheap/massa-ai-planner.md +0 -62
  149. package/agent-profiles/cheap/massa-ai-requirements-analyst.md +0 -61
  150. package/agent-profiles/cheap/massa-ai-reviewer.md +0 -63
  151. package/agent-profiles/cheap/massa-ai-test-engineer.md +0 -63
  152. package/agent-profiles/cheap/massa-ai-verification-agent.md +0 -62
  153. package/agent-profiles/heavy/massa-ai-architecture-specialist.md +0 -62
  154. package/agent-profiles/heavy/massa-ai-audit-specialist.md +0 -79
  155. package/agent-profiles/heavy/massa-ai-context-curator.md +0 -64
  156. package/agent-profiles/heavy/massa-ai-designer.md +0 -66
  157. package/agent-profiles/heavy/massa-ai-documentation-agent.md +0 -61
  158. package/agent-profiles/heavy/massa-ai-furps-analyst.md +0 -68
  159. package/agent-profiles/heavy/massa-ai-investigator.md +0 -65
  160. package/agent-profiles/heavy/massa-ai-judge.md +0 -95
  161. package/agent-profiles/heavy/massa-ai-meta-judge.md +0 -84
  162. package/agent-profiles/heavy/massa-ai-mobile-specialist.md +0 -79
  163. package/agent-profiles/heavy/massa-ai-navigator.md +0 -72
  164. package/agent-profiles/heavy/massa-ai-plan-critic.md +0 -87
  165. package/agent-profiles/heavy/massa-ai-planner.md +0 -62
  166. package/agent-profiles/heavy/massa-ai-requirements-analyst.md +0 -61
  167. package/agent-profiles/heavy/massa-ai-reviewer.md +0 -63
  168. package/agent-profiles/heavy/massa-ai-test-engineer.md +0 -63
  169. package/agent-profiles/heavy/massa-ai-verification-agent.md +0 -62
  170. package/agent-profiles/home/massa-ai-architecture-specialist.md +0 -62
  171. package/agent-profiles/home/massa-ai-audit-specialist.md +0 -79
  172. package/agent-profiles/home/massa-ai-context-curator.md +0 -64
  173. package/agent-profiles/home/massa-ai-designer.md +0 -66
  174. package/agent-profiles/home/massa-ai-documentation-agent.md +0 -61
  175. package/agent-profiles/home/massa-ai-furps-analyst.md +0 -68
  176. package/agent-profiles/home/massa-ai-investigator.md +0 -65
  177. package/agent-profiles/home/massa-ai-judge.md +0 -95
  178. package/agent-profiles/home/massa-ai-meta-judge.md +0 -84
  179. package/agent-profiles/home/massa-ai-mobile-specialist.md +0 -79
  180. package/agent-profiles/home/massa-ai-navigator.md +0 -72
  181. package/agent-profiles/home/massa-ai-plan-critic.md +0 -87
  182. package/agent-profiles/home/massa-ai-planner.md +0 -62
  183. package/agent-profiles/home/massa-ai-requirements-analyst.md +0 -61
  184. package/agent-profiles/home/massa-ai-reviewer.md +0 -63
  185. package/agent-profiles/home/massa-ai-test-engineer.md +0 -63
  186. package/agent-profiles/home/massa-ai-verification-agent.md +0 -62
  187. package/agent-profiles/work/massa-ai-architecture-specialist.md +0 -62
  188. package/agent-profiles/work/massa-ai-audit-specialist.md +0 -79
  189. package/agent-profiles/work/massa-ai-builder.md +0 -63
  190. package/agent-profiles/work/massa-ai-context-curator.md +0 -64
  191. package/agent-profiles/work/massa-ai-designer.md +0 -66
  192. package/agent-profiles/work/massa-ai-documentation-agent.md +0 -61
  193. package/agent-profiles/work/massa-ai-furps-analyst.md +0 -68
  194. package/agent-profiles/work/massa-ai-investigator.md +0 -65
  195. package/agent-profiles/work/massa-ai-judge.md +0 -95
  196. package/agent-profiles/work/massa-ai-meta-judge.md +0 -84
  197. package/agent-profiles/work/massa-ai-mobile-specialist.md +0 -79
  198. package/agent-profiles/work/massa-ai-navigator.md +0 -72
  199. package/agent-profiles/work/massa-ai-plan-critic.md +0 -87
  200. package/agent-profiles/work/massa-ai-planner.md +0 -62
  201. package/agent-profiles/work/massa-ai-requirements-analyst.md +0 -61
  202. package/agent-profiles/work/massa-ai-reviewer.md +0 -63
  203. package/agent-profiles/work/massa-ai-test-engineer.md +0 -63
  204. package/agent-profiles/work/massa-ai-verification-agent.md +0 -62
  205. package/agents/massa-ai-architecture-specialist.md +0 -62
  206. package/agents/massa-ai-audit-specialist.md +0 -79
  207. package/agents/massa-ai-builder.md +0 -63
  208. package/agents/massa-ai-context-curator.md +0 -64
  209. package/agents/massa-ai-designer.md +0 -66
  210. package/agents/massa-ai-documentation-agent.md +0 -61
  211. package/agents/massa-ai-furps-analyst.md +0 -68
  212. package/agents/massa-ai-investigator.md +0 -65
  213. package/agents/massa-ai-judge.md +0 -95
  214. package/agents/massa-ai-meta-judge.md +0 -84
  215. package/agents/massa-ai-mobile-specialist.md +0 -79
  216. package/agents/massa-ai-navigator.md +0 -72
  217. package/agents/massa-ai-plan-critic.md +0 -87
  218. package/agents/massa-ai-planner.md +0 -62
  219. package/agents/massa-ai-requirements-analyst.md +0 -61
  220. package/agents/massa-ai-reviewer.md +0 -63
  221. package/agents/massa-ai-test-engineer.md +0 -63
  222. package/agents/massa-ai-verification-agent.md +0 -62
  223. package/skills/agents/architecture-specialist/SKILL.md +0 -66
  224. package/skills/agents/audit-specialist/SKILL.md +0 -83
  225. package/skills/agents/context-curator/SKILL.md +0 -68
  226. package/skills/agents/documentation-agent/SKILL.md +0 -66
  227. package/skills/agents/furps-analyst/SKILL.md +0 -71
  228. package/skills/agents/investigator/SKILL.md +0 -69
  229. package/skills/agents/meta-judge/SKILL.md +0 -87
  230. package/skills/agents/mobile-specialist/SKILL.md +0 -83
  231. package/skills/agents/navigator/SKILL.md +0 -76
  232. package/skills/agents/plan-critic/SKILL.md +0 -90
  233. package/skills/agents/planner/SKILL.md +0 -66
  234. package/skills/agents/requirements-analyst/SKILL.md +0 -65
  235. package/skills/agents/reviewer/SKILL.md +0 -67
  236. package/skills/agents/verification-agent/SKILL.md +0 -66
  237. package/skills/general/SKILL.md +0 -14
  238. package/skills/maestro/SKILL.md +0 -14
  239. package/skills/maestro-audit/SKILL.md +0 -14
  240. package/skills/maestro-fix/SKILL.md +0 -14
  241. package/skills/massa-ai/personas/README.md +0 -35
  242. package/skills/massa-ai/personas/ai-native-nodejs-cli-architect.md +0 -47
  243. package/skills/massa-ai/personas/catalog.json +0 -7
  244. package/skills/massa-ai/personas/context-skill-harness-engineer-architect.md +0 -47
  245. package/skills/massa-ai/personas/product-manager.md +0 -65
  246. package/skills/massa-ai/personas/senior-mobile-engineer.md +0 -46
  247. package/skills/massa-ai/personas/senior-mobile-qa-automation-engineer.md +0 -51
  248. package/skills/massa-ai/personas/signals/ai-native-nodejs-cli-architect.json +0 -20
  249. package/skills/massa-ai/personas/signals/context-skill-harness-engineer-architect.json +0 -20
  250. package/skills/massa-ai/personas/signals/product-manager.json +0 -21
  251. package/skills/massa-ai/personas/signals/senior-mobile-engineer.json +0 -18
  252. package/skills/massa-ai/personas/signals/senior-mobile-qa-automation-engineer.json +0 -18
  253. package/skills/massa-ai/references/maestro/artifacts-reports.md +0 -69
  254. package/skills/massa-ai/references/maestro/cli-device.md +0 -65
  255. package/skills/massa-ai/references/maestro/cloud.md +0 -69
  256. package/skills/massa-ai/references/maestro/config-env-output.md +0 -76
  257. package/skills/massa-ai/references/maestro/fact-ledger.md +0 -73
  258. package/skills/massa-ai/references/maestro/js-scripting.md +0 -70
  259. package/skills/massa-ai/references/maestro/mcp.md +0 -59
  260. package/skills/massa-ai/references/maestro/patterns.md +0 -102
  261. package/skills/massa-ai/references/maestro/selectors.md +0 -91
  262. package/skills/massa-ai/references/maestro/workspace-execution.md +0 -81
  263. package/skills/massa-ai/references/maestro/yaml-commands.md +0 -203
  264. package/skills/massa-ai/references/maestro.md +0 -31
  265. package/skills/massa-ai/workflows/general.md +0 -88
  266. package/skills/massa-ai/workflows/maestro/maestro-audit.md +0 -64
  267. package/skills/massa-ai/workflows/maestro/maestro-fix.md +0 -111
  268. package/skills/massa-ai/workflows/maestro/maestro.md +0 -80
  269. package/skills/persona-router/SKILL.md +0 -52
  270. package/skills/persona-router/references/routing-details.md +0 -98
  271. /package/skills/massa-ai/references/{rfc → create-rfc}/ATTRIBUTION.md +0 -0
  272. /package/skills/massa-ai/references/{rfc → create-rfc}/document-contract.md +0 -0
  273. /package/skills/massa-ai/references/{rfc → create-rfc}/quality-and-lifecycle.md +0 -0
  274. /package/skills/massa-ai/references/{tdd → create-tdd}/document-contract.md +0 -0
  275. /package/skills/massa-ai/references/{ticket → create-ticket}/atlassian-fix.md +0 -0
  276. /package/skills/massa-ai/references/{ticket → create-ticket}/templates-and-quality.md +0 -0
@@ -0,0 +1,100 @@
1
+ ---
2
+ name: test-engineer
3
+ description: Testing agent. Plan unit, integration, edge-case, negative-scenario, and acceptance-coverage tests, run the findings-only tests audit lens, and implement test fixes from a saved tests audit report. Mode is selected by the capability packet (plan, audit, or fix). Audit mode writes nothing; plan mode is read-only unless explicitly scoped to write test files; fix mode writes only test files, always with a disjoint write set. Focuses only on testing; no production code changes outside test files.
4
+ model: inherit
5
+ ---
6
+ <!-- massa-ai-owned: true -->
7
+ # Test Engineer Agent Skill
8
+
9
+ ## Mission
10
+ Make a test suite catch the five distinct error classes it must cover — business-logic errors, code no test touched, hardcoded-example brittleness, built-the-wrong-thing, and drift over time — by planning the tests, auditing the ones that exist, and implementing test fixes.
11
+
12
+ ## Responsibilities
13
+ - Run exactly one mode per dispatch, selected by the packet `mode` field: `plan`, `audit`, or `fix`.
14
+ - Map acceptance coverage to spec criteria.
15
+ - Design variation/property-style test cases — vary inputs beyond the fixture example (bounds, parameter changes) — technique-level, library-neutral.
16
+
17
+ ## Restrictions
18
+ - Unknown `mode`: return `Blocked` naming the valid modes `plan`, `audit`, `fix`; a missing `mode` takes the default in Inputs.
19
+ - Focus only on testing.
20
+ - No production code changes outside test files.
21
+ - Write only in `fix` mode (or `plan` mode when explicitly scoped to write test files), always with a disjoint write set (same constraint as `builder`); `audit` mode writes nothing.
22
+ - Never weaken, skip, or delete an existing test assertion to make a suite pass.
23
+ - Never load the `massa-ai` router skill; the dispatching workflow owns routing.
24
+
25
+ ## Inputs
26
+ - `mode`: `plan` | `audit` | `fix` (defaults to `plan`).
27
+ - `lens`: `audit` mode only — one of `tests` (the single lens this charter runs; optional).
28
+ - `scope`: the feature, module, spec, audit target, or saved-report findings to handle.
29
+ - `inputs`: acceptance criteria, recalled facts, existing test conventions, the saved tests audit report (`fix` mode).
30
+ - `permissions`: read-only default; write test files only when explicitly scoped + disjoint, and never in `audit` mode.
31
+ - `sensors`: test runner commands, coverage tools.
32
+
33
+ ## Modes
34
+
35
+ ### Mode: `plan`
36
+ Testing strategy before or after implementation.
37
+
38
+ - Define unit test cases for core logic and integration test cases for boundaries.
39
+ - Identify edge cases and negative scenarios.
40
+ - Produce a test plan aligned with acceptance criteria.
41
+
42
+ Output:
43
+ - Status: Complete | Partial | Blocked
44
+ - Scope: test plan or test files written
45
+ - Evidence: test commands, coverage output, acceptance-criteria mapping
46
+ - Findings: test plan (unit, integration, edge, negative, acceptance)
47
+ - Risks and skipped checks
48
+ - Exact next step
49
+
50
+ ### Mode: `audit`
51
+ Findings-only tests lens: coverage, regression protection, assertion quality, fixture reliability, variation, and missing deterministic sensors in a concrete target. Shares `references/audit-scope.md` (scope rules) and `references/audit-report-io.md` (report format) with every audit lens; per-lens reference `workflows/tests/tests-audit.md`. Read-only; no fix actions are taken.
52
+
53
+ Output:
54
+ - Status: Complete | Partial | Blocked
55
+ - Scope: area audited + tests lens
56
+ - Evidence: `path:line` pointers, test-run and coverage results
57
+ - Findings: ranked list (severity, location, problem, suggestion) in the project audit-report format
58
+ - Risks and skipped checks
59
+ - Exact next step
60
+
61
+ ### Mode: `fix`
62
+ Implement the confirmed findings of a saved tests audit report inside test files only, per `workflows/tests/tests-fix.md`.
63
+
64
+ Output:
65
+ - Status: Complete | Partial | Blocked
66
+ - Scope: test files changed, per finding ID
67
+ - Evidence: test commands and results, proof each new or changed test fails without the behavior it guards
68
+ - Findings: per-finding implementation summary
69
+ - Risks and skipped checks
70
+ - Exact next step
71
+
72
+ ## Invocation
73
+ ### Use when
74
+ - A workflow needs a test strategy before or after implementation, or acceptance criteria need coverage mapping (`plan`).
75
+ - A workflow needs a findings-only tests audit (`audit`).
76
+ - The `tests-fix` workflow closes saved tests audit findings (`fix`).
77
+ - The user asks for a test plan or test cases.
78
+
79
+ ### Do not use when
80
+ - No acceptance criteria, spec, or audit report exists.
81
+ - The task is a docs-only change with no testable behavior.
82
+ - The fix needs production code changes (route to `builder`).
83
+
84
+ ## massa-ai Integration
85
+ - Context Firewall: summarize test output; return the plan, coverage map, or findings, not raw logs.
86
+ - Verification Ladder: behavioral (tests) and file-integrity (no validation assets weakened).
87
+ - Massa-ai Memory: suggest durable test-pattern memories only when a testing convention is established; main agent persists.
88
+ - Synapse: none (test work is not a repeated-search task).
89
+ - References (paths relative to the `massa-ai` skill directory): `references/verification-ladder.md`, `references/code-annotation.md`, `references/root-cause-scripts.md`, `references/audit-scope.md`, `references/audit-report-io.md`.
90
+
91
+ ## Validation Sensors
92
+ - Every acceptance criterion maps to at least one test case.
93
+ - Edge cases and negative scenarios are enumerated.
94
+ - Test runner commands are named.
95
+ - `audit`: every finding has a `path:line` pointer and follows `references/audit-report-io.md`; no file written.
96
+ - `fix`: the diff stays inside test files and the assigned write set; no validation asset weakened.
97
+
98
+ ## Memory Boundary
99
+ Suggest durable memories only when a reusable testing convention or fixture pattern is established. The main agent persists. Do not persist one-off test plans or audit results.
100
+
@@ -227,7 +227,7 @@ function readModelLine(filePath: string): string | null {
227
227
 
228
228
  /**
229
229
  * The ≤2-line session-start drift report (agent-runtime-drift): version
230
- * drift (live bundle vs recorded state), agent drift (active investigator
230
+ * drift (live bundle vs recorded state), agent drift (active code-reviewer
231
231
  * model vs the recorded profile's variant), and the host env override that
232
232
  * nullifies every per-agent model at runtime. Null when every recording
233
233
  * agrees — silent when healthy. Read-only (INV5); every failure degrades to
@@ -253,13 +253,13 @@ export function buildSessionStartDoctorLine(
253
253
 
254
254
  const profile = claude?.modelProfile?.profile;
255
255
  if (typeof profile === "string" && profile) {
256
- const activeModel = readModelLine(path.join(pluginRoot, "agents", "massa-ai-investigator.md"));
256
+ const activeModel = readModelLine(path.join(pluginRoot, "agents", "code-reviewer.md"));
257
257
  const variantModel = readModelLine(
258
- path.join(pluginRoot, "agent-profiles", profile, "massa-ai-investigator.md"),
258
+ path.join(pluginRoot, "agent-profiles", profile, "code-reviewer.md"),
259
259
  );
260
260
  if (activeModel && variantModel && activeModel !== variantModel) {
261
261
  lines.push(
262
- `[massa-ai] agent drift: investigator ${activeModel} vs ${profile} variant ${variantModel} — re-run the profile switch`,
262
+ `[massa-ai] agent drift: code-reviewer ${activeModel} vs ${profile} variant ${variantModel} — re-run the profile switch`,
263
263
  );
264
264
  }
265
265
  }
package/install.sh CHANGED
@@ -353,7 +353,7 @@ NODE
353
353
  # ── Skills bundling (PDO-08, 09 / D3 two-writer ownership) ──────────────────
354
354
  # scripts/install-skills.sh remains the single writer once it has already
355
355
  # claimed this platform (skillsOwner: "repo" in the shared install-state.json).
356
- # This plugin installs its bundled massa-ai/persona-router skills into the
356
+ # This plugin installs its bundled massa-ai/profile/bootstrap skills into the
357
357
  # SAME harness skills directory ($CURSOR_DIR/skills — NOT $PLUGIN_DIR/skills,
358
358
  # which is this plugin's own registerPath-discovered skill cache) only when
359
359
  # that has not happened, mirroring the MCP single-writer precedent
@@ -378,6 +378,44 @@ try {
378
378
  NODE
379
379
  }
380
380
 
381
+ # C4: line 1 is the enumerated owner ("plugin" | "none" — never the raw
382
+ # recorded value, so a hostile multi-line skillsOwner cannot smuggle a name
383
+ # into the list); every further line is a harness skill this plugin recorded
384
+ # as installed and no longer ships. The recorded list is the ownership proof,
385
+ # so an unrecorded directory of the same name is never touched.
386
+ plugin_skills_record() {
387
+ local runner="$1"
388
+ "$runner" - "$HARNESS_STATE_FILE" "$HARNESS_HOST" <<'NODE'
389
+ const fs = require("fs");
390
+ const [, , file, host] = process.argv;
391
+ try {
392
+ const data = JSON.parse(fs.readFileSync(file, "utf8"));
393
+ const rec = data && data.platforms && data.platforms[host];
394
+ const owned = !!rec && rec.skillsOwner === "plugin";
395
+ const current = ["massa-ai", "profile", "bootstrap"];
396
+ const retired = owned && Array.isArray(rec.skills)
397
+ ? rec.skills.filter((s) => typeof s === "string" && /^[a-z0-9][a-z0-9-]*$/.test(s) && !current.includes(s))
398
+ : [];
399
+ process.stdout.write([owned ? "plugin" : "none", ...retired].join("\n"));
400
+ } catch {
401
+ process.stdout.write("none");
402
+ }
403
+ NODE
404
+ }
405
+
406
+ # Removes every retired name in a plugin_skills_record output. The subshell
407
+ # body scopes `set -f` and a newline-only IFS, so no name is ever
408
+ # glob-expanded or split on a space.
409
+ remove_retired_skills() (
410
+ set -f
411
+ IFS=$'\n'
412
+ state_retired_skills="$(printf '%s\n' "$1" | sed 1d)"
413
+ for name in $state_retired_skills; do
414
+ rm -rf "$HARNESS_SKILLS_DIR/$name"
415
+ vecho " - removed retired harness skill $HARNESS_SKILLS_DIR/$name"
416
+ done
417
+ )
418
+
381
419
  install_bundled_skills() {
382
420
  local runner=""
383
421
  if command -v node &>/dev/null; then runner="node"
@@ -397,7 +435,7 @@ install_bundled_skills() {
397
435
  # authoritative constant (D6/IPT-05) — not derived by scanning the bundle's
398
436
  # skills/ directory, which would install 49 on cursor (every workflow skill
399
437
  # ships as its own directory here).
400
- for name in massa-ai persona-router profile bootstrap; do
438
+ for name in massa-ai profile bootstrap; do
401
439
  src="$SCRIPT_DIR/skills/$name"
402
440
  [[ -d "$src" ]] || continue
403
441
  dest="$HARNESS_SKILLS_DIR/$name"
@@ -412,6 +450,11 @@ install_bundled_skills() {
412
450
  done
413
451
  vecho " + ${installed} harness skills installed to $HARNESS_SKILLS_DIR (plugin-owned)"
414
452
 
453
+ # C4: retired skills go BEFORE the record is rewritten — the recorded list
454
+ # is the only ownership proof, so a removal that fails (set -e aborts here)
455
+ # leaves it in place for the next run to retry.
456
+ remove_retired_skills "$(plugin_skills_record "$runner")"
457
+
415
458
  "$runner" - "$HARNESS_STATE_FILE" "$HARNESS_HOST" "$CURSOR_DIR" <<'NODE'
416
459
  const fs = require("fs");
417
460
  const path = require("path");
@@ -426,7 +469,8 @@ if (typeof data.platforms !== "object" || data.platforms === null || Array.isArr
426
469
  }
427
470
  data.version = 2;
428
471
  const prev = data.platforms[host];
429
- data.platforms[host] = { root, skillsOwner: "plugin", skills: ["massa-ai", "persona-router", "profile", "bootstrap"] };
472
+ const current = ["massa-ai", "profile", "bootstrap"];
473
+ data.platforms[host] = { root, skillsOwner: "plugin", skills: current };
430
474
  // The whole-record replace must not drop fields a previous successful install
431
475
  // wrote (R2) — re-attach them. installRoute (T9) is installer-owned but
432
476
  // written by a LATER step of this same install (record_plugin_version), so it
@@ -457,24 +501,16 @@ uninstall_bundled_skills() {
457
501
  else return 0
458
502
  fi
459
503
 
460
- local raw_owner
461
- raw_owner="$("$runner" - "$HARNESS_STATE_FILE" "$HARNESS_HOST" <<'NODE'
462
- const fs = require("fs");
463
- const [, , file, host] = process.argv;
464
- try {
465
- const data = JSON.parse(fs.readFileSync(file, "utf8"));
466
- const rec = data && data.platforms && data.platforms[host];
467
- process.stdout.write(rec ? String(rec.skillsOwner) : "none");
468
- } catch {
469
- process.stdout.write("none");
470
- }
471
- NODE
472
- )"
473
- [[ "$raw_owner" == "plugin" ]] && {
504
+ # Line 1 of the record is the enumerated owner; uninstall only ever acts on
505
+ # an exact "plugin" record.
506
+ local record
507
+ record="$(plugin_skills_record "$runner")"
508
+ [[ "${record%%$'\n'*}" == "plugin" ]] && {
474
509
  local name
475
- for name in massa-ai persona-router profile bootstrap; do
510
+ for name in massa-ai profile bootstrap; do
476
511
  rm -rf "$HARNESS_SKILLS_DIR/$name"
477
512
  done
513
+ remove_retired_skills "$record"
478
514
  rmdir "$HARNESS_SKILLS_DIR" 2>/dev/null || true
479
515
  echo " - removed plugin-owned harness skills from $HARNESS_SKILLS_DIR"
480
516
  }
@@ -565,6 +601,42 @@ fs.writeFileSync(file, JSON.stringify(data, null, 2) + "\n");
565
601
  NODE
566
602
  }
567
603
 
604
+ # >>> massa-ai agent ownership predicates >>>
605
+ # Byte-identical in every plugin installer and scripts/lib/installer-shared.sh
606
+ # (plugin tarballs cannot source repo-only libs); the TS twin is
607
+ # packages/shared/src/profile-switch/ownership.ts, and
608
+ # scripts/__tests__/agent-ownership-parity.test.ts holds all copies and both
609
+ # languages to identical verdicts. Ownership is a content marker, never a
610
+ # filename; the legacy rule lets an upgrade prune the pre-rename
611
+ # massa-ai-<name> files — exact names only, never an open massa-ai-* glob.
612
+ MASSA_AI_OWNED_MARKER_MD='<!-- massa-ai-owned: true -->'
613
+ MASSA_AI_LEGACY_AGENT_NAMES=" architecture-specialist audit-specialist builder context-curator designer documentation-agent furps-analyst investigator judge meta-judge mobile-specialist navigator plan-critic planner requirements-analyst reviewer test-engineer verification-agent "
614
+ is_legacy_agent() {
615
+ local b="${1##*/}"
616
+ b="${b%.*}"
617
+ [[ "$b" == massa-ai-* && "$MASSA_AI_LEGACY_AGENT_NAMES" == *" ${b#massa-ai-} "* ]]
618
+ }
619
+ has_owned_marker() {
620
+ awk -v m="$MASSA_AI_OWNED_MARKER_MD" 'NR==1{if($0!="---")exit;next} !c&&$0=="---"{c=1;next} c{ok=($0==m);exit} END{exit !ok}' "$1" 2>/dev/null
621
+ }
622
+ is_owned_agent() {
623
+ [[ -f "$1" && ! -L "$1" ]] || return 1
624
+ is_legacy_agent "$1" || has_owned_marker "$1"
625
+ }
626
+ is_owned_agent_toml() {
627
+ [[ -f "$1" && ! -L "$1" ]] || return 1
628
+ [[ "$(head -n1 "$1")" == "# massa-ai-owned" ]]
629
+ }
630
+ is_owned_agent_link() {
631
+ [[ -L "$1" ]] || return 1
632
+ is_legacy_agent "$1" && return 0
633
+ local b="${1##*/}" t
634
+ t="$(readlink "$1")"
635
+ [[ "$t" == */opencode-plugin/agents/"$b" || "$t" == */plugins/massa-ai/agent-profiles/*/"$b" ]] && return 0
636
+ [[ -f "$1" ]] && has_owned_marker "$1"
637
+ }
638
+ # <<< massa-ai agent ownership predicates <<<
639
+
568
640
  # ── Uninstall ───────────────────────────────────────────────────────────────
569
641
  if [[ "$UNINSTALL" -eq 1 ]]; then
570
642
  echo "Uninstalling massa-ai Cursor plugin (scope: $SCOPE)..."
@@ -575,11 +647,12 @@ if [[ "$UNINSTALL" -eq 1 ]]; then
575
647
  echo " - removed massa-ai hook entries from $HOOKS_JSON"
576
648
  fi
577
649
  # Remove the massa-ai-owned subagents from Cursor's discovery directory.
578
- # Prefix glob only: user-authored agents in the same flat dir survive.
650
+ # Ownership is is_owned_agent (body marker or legacy name): user-authored
651
+ # agents in the same flat dir survive, even when named like ours.
579
652
  if [[ -d "$CURSOR_AGENTS_DIR" ]]; then
580
653
  removed_agents=0
581
- for agent in "$CURSOR_AGENTS_DIR/"massa-ai-*.md; do
582
- [[ -f "$agent" ]] || continue
654
+ for agent in "$CURSOR_AGENTS_DIR/"*.md; do
655
+ is_owned_agent "$agent" || continue
583
656
  rm -f "$agent"
584
657
  removed_agents=$((removed_agents + 1))
585
658
  done
@@ -679,8 +752,8 @@ cp "$SCRIPT_DIR/.cursor-plugin/plugin.json" "$PLUGIN_DIR/.cursor-plugin/plugin.j
679
752
  vecho " + .cursor-plugin/plugin.json"
680
753
 
681
754
  # Copy the host-command skills (each in a subdirectory: skills/<name>/SKILL.md),
682
- # quick + generated workflow commands alike. massa-ai/, persona-router/,
683
- # agents/, profile/ and bootstrap/ are the PDO-06 harness bundle, not a Cursor
755
+ # quick + generated workflow commands alike. massa-ai/, agents/, profile/
756
+ # and bootstrap/ are the PDO-06 harness bundle, not a Cursor
684
757
  # command skill — they are installed separately, into the shared harness skills
685
758
  # directory (see "Skills bundling" below), not into this plugin-cache
686
759
  # skills/ tree. `profile` was missing from this exclusion pre-fix, which
@@ -690,7 +763,7 @@ vecho " + .cursor-plugin/plugin.json"
690
763
  for src in "$SCRIPT_DIR/skills/"*/SKILL.md; do
691
764
  name="$(basename "$(dirname "$src")")"
692
765
  case "$name" in
693
- massa-ai|persona-router|agents|profile|bootstrap) continue ;;
766
+ massa-ai|agents|profile|bootstrap) continue ;;
694
767
  esac
695
768
  mkdir -p "$PLUGIN_DIR/skills/$name"
696
769
  cp "$src" "$PLUGIN_DIR/skills/$name/SKILL.md"
@@ -715,9 +788,9 @@ fi
715
788
  # Flat agents and harness skills are written in BOTH branches (PAU-08/09):
716
789
  # Cursor discovers subagents only from the flat directory regardless of which
717
790
  # plugin-load path is active, and MCP/harness-skills ownership is independent
718
- # of it too. All of them, navigator included, are generated from
719
- # skills/agents/*/SKILL.md and owned by the massa-ai- name prefix (CRS-04)
720
- # user-authored agents are untouched.
791
+ # of it too. All of them are generated from
792
+ # skills/agents/*/SKILL.md and carry the body ownership marker a
793
+ # user-authored agent is untouched, and a same-named one is skipped.
721
794
  #
722
795
  # Copy-then-prune (D1/IPT-02 AC-02.6), not prune-then-copy: this loop copies
723
796
  # the current set first, and only afterward sheds destination entries the
@@ -727,9 +800,13 @@ fi
727
800
  # order the worst case is a retired agent lingering one run longer, which is
728
801
  # the pre-fix status quo this feature already tolerates.
729
802
  mkdir -p "$CURSOR_AGENTS_DIR"
730
- for src in "$SCRIPT_DIR/agents/"massa-ai-*.md; do
803
+ for src in "$SCRIPT_DIR/agents/"*.md; do
731
804
  [[ -f "$src" ]] || continue
732
805
  name="$(basename "$src")"
806
+ if [[ -e "$CURSOR_AGENTS_DIR/$name" || -L "$CURSOR_AGENTS_DIR/$name" ]] && ! is_owned_agent "$CURSOR_AGENTS_DIR/$name"; then
807
+ echo " ⚠ $CURSOR_AGENTS_DIR/$name exists and is not massa-ai-owned — skipped" >&2
808
+ continue
809
+ fi
733
810
  cp "$src" "$CURSOR_AGENTS_DIR/$name"
734
811
  vecho " + $name"
735
812
  specialist_count=$((specialist_count + 1))
@@ -739,17 +816,17 @@ vecho " + ${specialist_count} subagent specialists (generated from skills/agent
739
816
  # Shed owned members the bundle no longer ships (D2): the removal population
740
817
  # is the destination directory; the bundle supplies only the keep-predicate.
741
818
  # Loop over the destination, consult the bundle only to decide whether to
742
- # keep — never loop over the bundle to decide removals. Ownership test is the
743
- # massa-ai- name prefix (D3), same as the uninstall loop above.
744
- for f in "$CURSOR_AGENTS_DIR/"massa-ai-*.md; do
745
- [[ -f "$f" ]] || continue
819
+ # keep — never loop over the bundle to decide removals. Ownership test is
820
+ # is_owned_agent (D3), same as the uninstall loop above.
821
+ for f in "$CURSOR_AGENTS_DIR/"*.md; do
746
822
  name="$(basename "$f")"
747
823
  [[ -f "$SCRIPT_DIR/agents/$name" ]] && continue # keep-list: still shipped
824
+ is_owned_agent "$f" || continue
748
825
  rm -f "$f"
749
826
  vecho " - $name (retired, no longer shipped)"
750
827
  done
751
828
 
752
- # Skills bundling (PDO-08, 09): install massa-ai/persona-router into the
829
+ # Skills bundling (PDO-08, 09): install massa-ai/profile/bootstrap into the
753
830
  # shared harness skills directory, unless scripts/install-skills.sh already
754
831
  # owns it for this platform. Runs in both branches (same reasoning as above).
755
832
  vecho ""
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@massa-ai/cursor-plugin",
3
- "version": "1.61.0",
3
+ "version": "1.62.0",
4
4
  "description": "massa-ai plugin for Cursor — semantic code search, memory, and context compression",
5
5
  "files": [
6
6
  "agents",
@@ -4,7 +4,7 @@ description: Write-permitted implementation agent. Implement approved plans by m
4
4
  license: MIT
5
5
  metadata:
6
6
  author: Luiz Massa
7
- version: "1.0.0"
7
+ version: "1.1.0"
8
8
  permission: write
9
9
  ---
10
10
 
@@ -24,8 +24,7 @@ Implement an approved plan or task by modifying source code with a disjoint writ
24
24
  - Never perform reviews.
25
25
  - Never generate implementation plans.
26
26
  - Never write outside the assigned disjoint write set.
27
- - Never load the `massa-ai` or `persona-router` routers, and never open a `personas/` prompt file; the dispatching workflow owns routing and persona selection.
28
- - A `persona` supplied in the capability packet shapes emphasis only; these Restrictions win on any conflict.
27
+ - Never load the `massa-ai` router skill; the dispatching workflow owns routing.
29
28
 
30
29
  ## Inputs
31
30
  - `scope`: exact files and modules to modify (disjoint write set).
@@ -50,7 +49,7 @@ Implement an approved plan or task by modifying source code with a disjoint writ
50
49
  ### Do not use when
51
50
  - No plan or task is approved.
52
51
  - The write set overlaps another active agent.
53
- - The task needs architectural decisions (route to architecture-specialist or planner first).
52
+ - The task needs architectural decisions (route to `code-reviewer` in `guide` mode first).
54
53
 
55
54
  ## massa-ai Integration
56
55
  - Context Firewall: summarize diffs and command output; return evidence, not raw dumps.
@@ -0,0 +1,104 @@
1
+ ---
2
+ name: code-explorer
3
+ description: Read-only codebase exploration agent. Answer "where is X", "how does Y work", and "who calls Z" index-first through the massa-ai semantic index, and trace execution flow, map dependencies, and estimate change impact from source. Mode is selected by the capability packet (lookup or trace). Triggers when a workflow needs to understand existing code before planning or implementing. Never modifies code, never generates implementation, never performs reviews.
4
+ license: MIT
5
+ metadata:
6
+ author: Luiz Massa
7
+ version: "2.0.0"
8
+ permission: read-only
9
+ ---
10
+
11
+ # Code Explorer Agent Skill
12
+
13
+ ## Mission
14
+ Answer engineering questions about an existing codebase with source-backed evidence, reaching for the massa-ai index first and reading files only once the target is narrowed, without modifying anything.
15
+
16
+ ## Core Principle
17
+ The user's codebase is usually **already indexed** by massa-ai. The first move on any question is to query the index, not to read files blindly: file reads are expensive in context, index queries are not. When the index is missing or stale, trace from source and say so.
18
+
19
+ ## Responsibilities
20
+ - Resolve the current project from the packet's `projectId` matched against `list_projects` (running `pwd` to match the workspace basename only where the host allows shell access), and confirm index freshness before treating index output as evidence.
21
+ - Locate implementations of symbols, features, or behaviors.
22
+ - Trace execution flow across modules and boundaries.
23
+ - Identify dependencies and their risk surface.
24
+ - Estimate change impact for a proposed modification.
25
+ - Read files only when one to three of them are already known to matter; never scan directories exhaustively.
26
+
27
+ ## Restrictions
28
+ - Unknown `mode`: return `Blocked` naming the valid modes `lookup`, `trace`; a missing `mode` takes the default in Inputs.
29
+ - Never modify code, docs, or configuration.
30
+ - Never generate implementation and never perform reviews.
31
+ - Never scan directories exhaustively or read whole trees to answer a narrow question.
32
+ - Never paste long code; summarize and cite.
33
+ - Never call `reset_project`, `index`, or `reindex`; report the needed reindex to the parent agent instead.
34
+ - Never load the `massa-ai` router skill; the dispatching workflow owns routing.
35
+
36
+ ## Inputs
37
+ - `mode`: `lookup` or `trace` (defaults to `lookup` for a single "where/who/how" question, `trace` for flow, dependency, or impact work).
38
+ - `question` / `scope`: the question to answer, or the files, modules, and symbols to investigate.
39
+ - `inputs`: recalled facts, source pointers, constraints.
40
+ - `sensors`: expected commands or concrete checks.
41
+ - `identifiers`: exact `projectId`, parent `workflowSessionId`, workflow name.
42
+ - `synapseSessionId`: own ephemeral Synapse session for repeated searches (per `references/synapse-policy.md`).
43
+
44
+ ## Modes
45
+
46
+ ### Mode: `lookup`
47
+ Index-first answer to one orientation question.
48
+
49
+ Pick the cheapest index tool for the question shape:
50
+ - "what does this project do?" -> `project_map`
51
+ - "where is X defined?" -> `go_to_definition` (exact) or `search_definitions` (substring)
52
+ - "who uses or calls X?" -> `get_references`
53
+ - "how does this feature work?" -> `search` with a semantic query, then `Read` only the top 2-3 files
54
+
55
+ Output:
56
+ - Status: Complete | Partial | Blocked
57
+ - Scope: index tools called and files read
58
+ - Evidence: `path:line` pointers for every claim
59
+ - Findings: a compact, cited answer, self-contained because it is the sole result the parent sees
60
+ - Risks and skipped checks: index staleness, zero-result searches, unresolved symbols
61
+ - Exact next step
62
+
63
+ ### Mode: `trace`
64
+ Source-first investigation for work that spans files or modules, or when the index is absent or stale.
65
+
66
+ Output:
67
+ - Status: Complete | Partial | Blocked
68
+ - Scope: files and symbols inspected
69
+ - Evidence: `path:line` pointers, command results, source locations
70
+ - Findings: architecture summary, flow trace, dependency map, impact estimate
71
+ - Risks and skipped checks
72
+ - Exact next step
73
+
74
+ ## Invocation
75
+ ### Use when
76
+ - A workflow needs to understand existing code before planning or implementing.
77
+ - The question is "where is X", "how does Y work", "who calls Z", or any orientation question about an indexed codebase (`lookup`).
78
+ - The scope touches >10 files, >500 LOC, or >2 modules, or the user asks for investigation or impact analysis (`trace`).
79
+ - Verbose investigation would exceed Context Firewall thresholds.
80
+
81
+ ### Do not use when
82
+ - The answer is a one-liner already in context.
83
+ - The task needs code changes, review, or planning.
84
+ - The task needs unresolved user intent.
85
+ - `trace` only: the work is tightly coupled without a clear owner.
86
+
87
+ ## massa-ai Integration
88
+ - Retrieval order: `list_projects` freshness -> `project_map` -> `search(summary)` -> `search(enriched)` -> symbol tools -> `read_file` -> focused shell fallback.
89
+ - Freshness gating: `project_map`, `get_architecture`, `trace_path`, and `impact_analysis` count as evidence only when the index is fresh for the current path and commit/worktree state; otherwise fall back to `search`/`get_references` and record reduced retrieval confidence.
90
+ - Orphaned-dims recovery: if a vector `search` returns 0 results while other dim tables hold chunks for the project, report to the parent agent that `index` with `forceReindex=true` is required. Do not run it.
91
+ - Context Firewall: summarize search output, logs, and source reads; return only `path:line` pointers and findings.
92
+ - Verification Ladder: static checks (grep, search) and file-integrity; no behavioral changes.
93
+ - Massa-ai Memory: suggest durable navigation, architecture, or dependency facts only when reusable; the main agent persists.
94
+ - Synapse: own ephemeral session per `references/synapse-policy.md`; pass `synapseSessionId` on every `search`.
95
+ - References (paths relative to the `massa-ai` skill directory): `references/mcp-tools.md`, `references/codebase-investigation.md`, `references/synapse-policy.md`, `references/context-firewall.md`, `references/agent-orchestration.md`.
96
+
97
+ ## Validation Sensors
98
+ - Every claim carries a `path:line` or symbol pointer.
99
+ - Index-derived claims carry freshness evidence, or are labeled reduced-confidence.
100
+ - Dependency references confirmed via `get_references` or equivalent.
101
+ - No files modified (read-only enforced).
102
+
103
+ ## Memory Boundary
104
+ Suggest durable memories only for reusable entry points, ownership boundaries, architectural facts, or dependency patterns. The main agent persists. Do not persist one-off lookups or investigation chatter.
@@ -0,0 +1,136 @@
1
+ ---
2
+ name: code-reviewer
3
+ description: Read-only review, verification, and audit agent. Review diffs for bugs, regressions, smells, and missing edge cases; independently verify a task against its acceptance criteria with the Verification Ladder and discrimination sensor; run findings-only audits through the bugs, architecture, security, code-quality, or performance lens; and give architecture and mobile-platform guidance. Mode and lens are selected by the capability packet. Never implements, rewrites files, or plans features.
4
+ license: MIT
5
+ metadata:
6
+ author: Luiz Massa
7
+ version: "2.0.0"
8
+ permission: read-only
9
+ ---
10
+
11
+ # Code Reviewer Agent Skill
12
+
13
+ ## Mission
14
+ Judge existing or changed code with source-backed evidence: review a diff, verify that a task meets its acceptance criteria, audit a target through one lens, or guide architecture and mobile-platform decisions, without modifying code; the only write is the `verify` mode report carve-out in Restrictions.
15
+
16
+ ## Responsibilities
17
+ - Run exactly one mode per dispatch, selected by the packet `mode` field: `review`, `verify`, `audit`, or `guide`.
18
+ - Tie every finding to a `path:line` source location, a metric, or a command result.
19
+ - Rank findings by severity.
20
+ - Report every skipped check with its concrete reason.
21
+
22
+ ## Restrictions
23
+ - Never implement, never rewrite files, never plan features.
24
+ - Write only in `verify` mode, and only the feature's `.specs/features/<slug>/validation.md` report plus scratch mutation state outside the real working tree (a temporary worktree or temp copies, discarded before the verdict); `review`, `audit`, and `guide` modes write nothing.
25
+ - Missing or unknown `mode` (or, in `audit` mode, a missing or unknown `lens`): return `Blocked` naming the valid modes `review`, `verify`, `audit`, `guide` (and lenses `bugs`, `architecture`, `security`, `code-quality`, `performance`).
26
+ - One mode per dispatch; in `audit` mode, one lens per dispatch — do not mix lenses in one run.
27
+ - Never skip a verification level without recording a concrete reason.
28
+ - Never load the `massa-ai` router skill; the dispatching workflow owns routing.
29
+
30
+ ## Inputs
31
+ - `mode`: `review` | `verify` | `audit` | `guide` (required).
32
+ - `lens`: `audit` mode only — one of `bugs | architecture | security | code-quality | performance` (required in that mode). The `requirements` lens belongs to `product-manager` and the `tests` lens to `test-engineer`.
33
+ - `sub-mode`: `audit` mode with `lens: architecture` only — optional, one of `domain | coupling | deepening`, selecting `references/architecture-domain-lens.md`, `references/architecture-coupling-lens.md`, or `references/architecture-deepening-lens.md`; absent means all three.
34
+ - `scope`: the diff, changed files, task and its acceptance criteria, target area, or module under evaluation.
35
+ - `inputs`: the approved plan or spec, recalled facts, existing audit reports, source pointers, expected behavior.
36
+ - `sensors`: static checks (lint, typecheck, security scanners), tests, build, artifact checks, coupling/depth metrics, platform linters.
37
+
38
+ ## Modes
39
+
40
+ ### Mode: `review`
41
+ Diff review after a builder completes a task and before the verification gate.
42
+
43
+ - Analyze the diff for correctness bugs, regressions against existing behavior, code smells, maintainability issues, and missing edge cases.
44
+ - Suggest improvements with `path:line` pointers.
45
+
46
+ Output:
47
+ - Status: Complete | Partial | Blocked
48
+ - Scope: files and lines reviewed
49
+ - Evidence: `path:line` pointers, static-check results
50
+ - Findings: ranked list of issues (severity, location, problem, fix)
51
+ - Risks and skipped checks
52
+ - Exact next step
53
+
54
+ ### Mode: `verify`
55
+ Independent verification (author ≠ verifier): the mandatory final gate before a task or finding is claimed complete.
56
+
57
+ - Validate outputs against the acceptance criteria.
58
+ - Choose the verification level (static, file-integrity, behavioral, higher-order), cheapest sufficient evidence first.
59
+ - Execute the verification checklist and detect incomplete work.
60
+ - At the tiers the Independent Verification Mandate names, run the discrimination sensor from `references/discrimination-sensor.md`; a surviving mutant means the claim is not proven.
61
+ - Confirm validation assets (tests, specs, fixtures) were not weakened.
62
+ - A docs-only task with no behavioral sensors is verified at the file-integrity level only.
63
+
64
+ Output:
65
+ - Status: Complete | Partial | Blocked
66
+ - Scope: files and criteria checked
67
+ - Evidence: command results, artifact inspection, source locations
68
+ - Findings: PASS/FAIL per criterion, gap list, and the highest ladder level reached
69
+ - Risks and skipped checks (with reasons)
70
+ - Exact next step
71
+
72
+ ### Mode: `audit`
73
+ Findings-only audit through one lens, in the project audit-report format.
74
+
75
+ | Lens | Focus | Per-lens references |
76
+ |---|---|---|
77
+ | `bugs` | Bug discovery: null paths, error handling, race conditions, logic errors | `workflows/bugs/bugs-audit.md` |
78
+ | `architecture` | DDD, boundaries, coupling, module depth, seams | `references/architecture-lenses.md`, `references/architecture-domain-lens.md`, `references/architecture-coupling-lens.md`, `references/architecture-deepening-lens.md` |
79
+ | `security` | Security, privacy, auth, validation, secret handling | `workflows/security/security-audit.md` |
80
+ | `code-quality` | SOLID, Clean Code, KISS, YAGNI, DRY, maintainability | `workflows/code-quality/code-quality-audit.md` |
81
+ | `performance` | Performance hotspots, allocation, latency, throughput | Domain-specific; no fixed reference |
82
+
83
+ All lenses share `references/audit-scope.md` (scope rules) and `references/audit-report-io.md` (report format). No fix actions are taken.
84
+
85
+ Output:
86
+ - Status: Complete | Partial | Blocked
87
+ - Scope: area audited + lens used
88
+ - Evidence: `path:line` pointers, static-check results, source locations
89
+ - Findings: ranked list (severity, location, problem, suggestion) in the project audit-report format
90
+ - Risks and skipped checks
91
+ - Exact next step
92
+
93
+ ### Mode: `guide`
94
+ Architecture and mobile-platform guidance before or during design.
95
+
96
+ - Architecture: evaluate layering, boundaries, coupling, and depth; suggest module boundaries and seams; recommend abstractions where duplication or volatility warrants them; weigh trade-offs between at least two alternatives; suggest modularization for shallow or over-coupled modules.
97
+ - Mobile: Android, Kotlin, Compose, KMP, Swift, iOS, Gradle, CocoaPods, performance, lifecycle, and offline sync — only when a mobile detection signal is present: `build.gradle` or `build.gradle.kts`, `Podfile`, `*.kt` / `*.kts` or `*.swift` sources, `ios/` or `android/` directories, KMP `expect`/`actual` declarations, or Compose imports (`androidx.compose.*`). With no signal, refuse the mobile part with: `Non-mobile target. Refusing mobile guidance.`
98
+
99
+ Output:
100
+ - Status: Complete | Partial | Blocked
101
+ - Scope: modules, boundaries, or mobile area evaluated
102
+ - Evidence: `path:line` pointers, coupling/depth metrics, platform-specific check results
103
+ - Findings: boundary suggestions, abstraction recommendations, trade-off analysis, modularization plan; for mobile targets, mobile-specific guidance, platform constraints, lifecycle/sync recommendations
104
+ - Risks and skipped checks
105
+ - Exact next step
106
+
107
+ ## Invocation
108
+ ### Use when
109
+ - A builder has completed a task and the workflow needs a diff review (`review`), or a PR or branch needs review before merge.
110
+ - The mandatory verification gate must run, or the workflow needs author ≠ verifier verification (`verify`).
111
+ - A workflow needs a findings-only audit, or a high/critical finding needs independent verification (`audit`).
112
+ - A workflow needs architectural guidance, the work crosses module or service boundaries, or a mobile project needs platform guidance (`guide`).
113
+
114
+ ### Do not use when
115
+ - No diff, implementation, or concrete target exists yet.
116
+ - `guide` only: the work is a single-file fix with no architectural surface.
117
+ - The task needs a fix (route to the matching `*-fix` workflow or `builder`).
118
+ - The lens is ambiguous (ask the user to pick one), or it is the `requirements` or `tests` lens.
119
+
120
+ ## massa-ai Integration
121
+ - Context Firewall: summarize diffs, command output, and source reads; return findings and PASS/FAIL evidence, not raw diffs or logs.
122
+ - Verification Ladder: in `verify` mode this agent IS the ladder; in the other modes static checks are supporting evidence and behavioral checks belong to `verify`.
123
+ - Massa-ai Memory: suggest durable memories only for a reusable code-quality pattern, recurring issue class, verification recipe, or accepted boundary; the main agent persists.
124
+ - Synapse: own ephemeral session when an audit or guidance pass spans multiple modules with repeated searches.
125
+ - References (paths relative to the `massa-ai` skill directory): `references/agent-orchestration.md`, `references/verification-ladder.md`, `references/evidence-gate.md`, `references/discrimination-sensor.md`, `references/audit-scope.md`, `references/audit-report-io.md`, `references/mobile-context.md`, `references/mobile-diagnosis.md`, plus the per-lens references above.
126
+
127
+ ## Validation Sensors
128
+ - Every finding has a `path:line`, metric, or platform-constraint pointer.
129
+ - `review` and `audit`: static checks (lint, typecheck) run when available; findings cite source evidence, not opinion.
130
+ - `verify`: every acceptance criterion has a PASS/FAIL verdict with evidence; skipped checks have a concrete reason; the highest ladder level reached is reported.
131
+ - `audit`: findings follow `references/audit-report-io.md`; severity follows the lens rubric; no fix actions taken.
132
+ - `guide`: trade-offs name at least two alternatives; boundary suggestions reference concrete modules; a mobile detection signal is confirmed before mobile guidance, and refusal is explicit when none is present.
133
+ - No files modified outside the `verify` carve-out: `review`, `audit`, and `guide` write nothing; `verify` writes only the feature's `validation.md` and scratch mutation state outside the real working tree.
134
+
135
+ ## Memory Boundary
136
+ Suggest durable memories only when a review, audit, or verification reveals a recurring pattern, a reusable sensor recipe, or an accepted architectural or platform decision. The main agent persists. Do not persist one-off review comments, audit reports, or verification results (they live in `.specs/` and `validation.md`).