@massa-ai/codex-plugin 1.60.1 → 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 (269) hide show
  1. package/.codex-plugin/plugin.json +1 -1
  2. package/README.md +1 -1
  3. package/{agents/massa-ai-builder.toml → agent-profiles/balanced/builder.toml} +3 -4
  4. package/agent-profiles/balanced/code-explorer.toml +101 -0
  5. package/agent-profiles/balanced/code-reviewer.toml +133 -0
  6. package/agent-profiles/balanced/{massa-ai-designer.toml → designer.toml} +34 -17
  7. package/agent-profiles/balanced/judge.toml +147 -0
  8. package/agent-profiles/balanced/product-manager.toml +107 -0
  9. package/agent-profiles/balanced/test-engineer.toml +100 -0
  10. package/agent-profiles/cheap/{massa-ai-builder.toml → builder.toml} +3 -4
  11. package/agent-profiles/cheap/code-explorer.toml +101 -0
  12. package/agent-profiles/cheap/code-reviewer.toml +133 -0
  13. package/agent-profiles/cheap/{massa-ai-designer.toml → designer.toml} +34 -17
  14. package/agent-profiles/cheap/judge.toml +147 -0
  15. package/agent-profiles/cheap/product-manager.toml +107 -0
  16. package/agent-profiles/cheap/test-engineer.toml +100 -0
  17. package/agent-profiles/{work/massa-ai-builder.toml → heavy/builder.toml} +3 -4
  18. package/agent-profiles/heavy/code-explorer.toml +101 -0
  19. package/agent-profiles/heavy/code-reviewer.toml +133 -0
  20. package/agent-profiles/{work/massa-ai-designer.toml → heavy/designer.toml} +34 -17
  21. package/agent-profiles/heavy/judge.toml +147 -0
  22. package/agent-profiles/heavy/product-manager.toml +107 -0
  23. package/agent-profiles/heavy/test-engineer.toml +100 -0
  24. package/agent-profiles/home/{massa-ai-builder.toml → builder.toml} +3 -4
  25. package/agent-profiles/home/code-explorer.toml +101 -0
  26. package/agent-profiles/home/code-reviewer.toml +133 -0
  27. package/{agents/massa-ai-designer.toml → agent-profiles/home/designer.toml} +34 -17
  28. package/agent-profiles/home/judge.toml +147 -0
  29. package/agent-profiles/home/product-manager.toml +107 -0
  30. package/agent-profiles/home/test-engineer.toml +100 -0
  31. package/agent-profiles/{heavy/massa-ai-builder.toml → work/builder.toml} +3 -4
  32. package/agent-profiles/work/code-explorer.toml +101 -0
  33. package/agent-profiles/work/code-reviewer.toml +133 -0
  34. package/agent-profiles/{heavy/massa-ai-designer.toml → work/designer.toml} +34 -17
  35. package/agent-profiles/work/judge.toml +147 -0
  36. package/agent-profiles/work/product-manager.toml +107 -0
  37. package/agent-profiles/work/test-engineer.toml +100 -0
  38. package/{agent-profiles/balanced/massa-ai-builder.toml → agents/builder.toml} +3 -4
  39. package/agents/code-explorer.toml +101 -0
  40. package/agents/code-reviewer.toml +133 -0
  41. package/{agent-profiles/home/massa-ai-designer.toml → agents/designer.toml} +34 -17
  42. package/agents/judge.toml +147 -0
  43. package/agents/product-manager.toml +107 -0
  44. package/agents/test-engineer.toml +100 -0
  45. package/hooks/massa-ai-hook +4 -4
  46. package/install.sh +98 -24
  47. package/package.json +1 -1
  48. package/skills/agents/builder/SKILL.md +3 -5
  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 -18
  52. package/skills/agents/judge/SKILL.md +101 -51
  53. package/skills/agents/product-manager/SKILL.md +110 -0
  54. package/skills/agents/test-engineer/SKILL.md +57 -23
  55. package/skills/bootstrap/SKILL.md +4 -5
  56. package/skills/{adr.md → create-adr.md} +3 -3
  57. package/skills/{to-prd.md → create-prd.md} +3 -3
  58. package/skills/{rfc.md → create-rfc.md} +3 -3
  59. package/skills/{tdd.md → create-tdd.md} +3 -3
  60. package/skills/{ticket.md → create-ticket.md} +3 -3
  61. package/skills/massa-ai/SKILL.md +26 -29
  62. package/skills/massa-ai/references/agent-orchestration.md +69 -66
  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 +5 -5
  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/synapse-policy.md +2 -2
  84. package/skills/massa-ai/references/verification-ladder.md +2 -2
  85. package/skills/massa-ai/scripts/validate_audit_report.ts +3 -8
  86. package/skills/massa-ai/workflows/architecture/architecture-audit.md +4 -5
  87. package/skills/massa-ai/workflows/architecture/architecture-fix.md +5 -6
  88. package/skills/massa-ai/workflows/bugs/bugs-audit.md +2 -3
  89. package/skills/massa-ai/workflows/bugs/bugs-fix.md +4 -5
  90. package/skills/massa-ai/workflows/code-quality/code-quality-audit.md +2 -3
  91. package/skills/massa-ai/workflows/code-quality/code-quality-fix.md +4 -5
  92. package/skills/massa-ai/workflows/commit.md +3 -3
  93. package/skills/massa-ai/workflows/{adr.md → create-adr.md} +10 -10
  94. package/skills/massa-ai/workflows/{to-prd.md → create-prd.md} +4 -4
  95. package/skills/massa-ai/workflows/{rfc.md → create-rfc.md} +6 -6
  96. package/skills/massa-ai/workflows/{tdd.md → create-tdd.md} +11 -11
  97. package/skills/massa-ai/workflows/{ticket.md → create-ticket.md} +5 -5
  98. package/skills/massa-ai/workflows/debug.md +4 -5
  99. package/skills/massa-ai/workflows/design.md +2 -2
  100. package/skills/massa-ai/workflows/exploration.md +2 -2
  101. package/skills/massa-ai/workflows/feature.md +5 -6
  102. package/skills/massa-ai/workflows/implementation/implementation-audit.md +22 -3
  103. package/skills/massa-ai/workflows/implementation/implementation-fix.md +6 -7
  104. package/skills/massa-ai/workflows/judge-with-debate.md +14 -14
  105. package/skills/massa-ai/workflows/mobile-figma/mobile-figma-audit.md +2 -2
  106. package/skills/massa-ai/workflows/mobile-figma/mobile-figma-fix.md +10 -11
  107. package/skills/massa-ai/workflows/pr-review.md +31 -13
  108. package/skills/massa-ai/workflows/{discovery.md → product-discovery.md} +12 -12
  109. package/skills/massa-ai/workflows/refactor.md +4 -5
  110. package/skills/massa-ai/workflows/refinement/furps-refinement.md +7 -7
  111. package/skills/massa-ai/workflows/requirements/requirements-audit.md +2 -2
  112. package/skills/massa-ai/workflows/requirements/requirements-fix.md +5 -6
  113. package/skills/massa-ai/workflows/security/security-audit.md +2 -3
  114. package/skills/massa-ai/workflows/security/security-fix.md +3 -4
  115. package/skills/massa-ai/workflows/spec-driven.md +9 -10
  116. package/skills/massa-ai/workflows/tests/tests-audit.md +2 -2
  117. package/skills/massa-ai/workflows/tests/tests-fix.md +16 -6
  118. package/skills/massa-ai/workflows/the-fool.md +7 -7
  119. package/skills/{discovery.md → product-discovery.md} +3 -3
  120. package/agent-profiles/balanced/massa-ai-architecture-specialist.toml +0 -62
  121. package/agent-profiles/balanced/massa-ai-audit-specialist.toml +0 -79
  122. package/agent-profiles/balanced/massa-ai-context-curator.toml +0 -64
  123. package/agent-profiles/balanced/massa-ai-documentation-agent.toml +0 -62
  124. package/agent-profiles/balanced/massa-ai-furps-analyst.toml +0 -68
  125. package/agent-profiles/balanced/massa-ai-investigator.toml +0 -65
  126. package/agent-profiles/balanced/massa-ai-judge.toml +0 -96
  127. package/agent-profiles/balanced/massa-ai-meta-judge.toml +0 -83
  128. package/agent-profiles/balanced/massa-ai-mobile-specialist.toml +0 -79
  129. package/agent-profiles/balanced/massa-ai-navigator.toml +0 -72
  130. package/agent-profiles/balanced/massa-ai-plan-critic.toml +0 -87
  131. package/agent-profiles/balanced/massa-ai-planner.toml +0 -62
  132. package/agent-profiles/balanced/massa-ai-requirements-analyst.toml +0 -61
  133. package/agent-profiles/balanced/massa-ai-reviewer.toml +0 -63
  134. package/agent-profiles/balanced/massa-ai-test-engineer.toml +0 -64
  135. package/agent-profiles/balanced/massa-ai-verification-agent.toml +0 -62
  136. package/agent-profiles/cheap/massa-ai-architecture-specialist.toml +0 -62
  137. package/agent-profiles/cheap/massa-ai-audit-specialist.toml +0 -79
  138. package/agent-profiles/cheap/massa-ai-context-curator.toml +0 -64
  139. package/agent-profiles/cheap/massa-ai-documentation-agent.toml +0 -62
  140. package/agent-profiles/cheap/massa-ai-furps-analyst.toml +0 -68
  141. package/agent-profiles/cheap/massa-ai-investigator.toml +0 -65
  142. package/agent-profiles/cheap/massa-ai-judge.toml +0 -96
  143. package/agent-profiles/cheap/massa-ai-meta-judge.toml +0 -83
  144. package/agent-profiles/cheap/massa-ai-mobile-specialist.toml +0 -79
  145. package/agent-profiles/cheap/massa-ai-navigator.toml +0 -72
  146. package/agent-profiles/cheap/massa-ai-plan-critic.toml +0 -87
  147. package/agent-profiles/cheap/massa-ai-planner.toml +0 -62
  148. package/agent-profiles/cheap/massa-ai-requirements-analyst.toml +0 -61
  149. package/agent-profiles/cheap/massa-ai-reviewer.toml +0 -63
  150. package/agent-profiles/cheap/massa-ai-test-engineer.toml +0 -64
  151. package/agent-profiles/cheap/massa-ai-verification-agent.toml +0 -62
  152. package/agent-profiles/heavy/massa-ai-architecture-specialist.toml +0 -62
  153. package/agent-profiles/heavy/massa-ai-audit-specialist.toml +0 -79
  154. package/agent-profiles/heavy/massa-ai-context-curator.toml +0 -64
  155. package/agent-profiles/heavy/massa-ai-documentation-agent.toml +0 -62
  156. package/agent-profiles/heavy/massa-ai-furps-analyst.toml +0 -68
  157. package/agent-profiles/heavy/massa-ai-investigator.toml +0 -65
  158. package/agent-profiles/heavy/massa-ai-judge.toml +0 -96
  159. package/agent-profiles/heavy/massa-ai-meta-judge.toml +0 -83
  160. package/agent-profiles/heavy/massa-ai-mobile-specialist.toml +0 -79
  161. package/agent-profiles/heavy/massa-ai-navigator.toml +0 -72
  162. package/agent-profiles/heavy/massa-ai-plan-critic.toml +0 -87
  163. package/agent-profiles/heavy/massa-ai-planner.toml +0 -62
  164. package/agent-profiles/heavy/massa-ai-requirements-analyst.toml +0 -61
  165. package/agent-profiles/heavy/massa-ai-reviewer.toml +0 -63
  166. package/agent-profiles/heavy/massa-ai-test-engineer.toml +0 -64
  167. package/agent-profiles/heavy/massa-ai-verification-agent.toml +0 -62
  168. package/agent-profiles/home/massa-ai-architecture-specialist.toml +0 -62
  169. package/agent-profiles/home/massa-ai-audit-specialist.toml +0 -79
  170. package/agent-profiles/home/massa-ai-context-curator.toml +0 -64
  171. package/agent-profiles/home/massa-ai-documentation-agent.toml +0 -62
  172. package/agent-profiles/home/massa-ai-furps-analyst.toml +0 -68
  173. package/agent-profiles/home/massa-ai-investigator.toml +0 -65
  174. package/agent-profiles/home/massa-ai-judge.toml +0 -96
  175. package/agent-profiles/home/massa-ai-meta-judge.toml +0 -83
  176. package/agent-profiles/home/massa-ai-mobile-specialist.toml +0 -79
  177. package/agent-profiles/home/massa-ai-navigator.toml +0 -72
  178. package/agent-profiles/home/massa-ai-plan-critic.toml +0 -87
  179. package/agent-profiles/home/massa-ai-planner.toml +0 -62
  180. package/agent-profiles/home/massa-ai-requirements-analyst.toml +0 -61
  181. package/agent-profiles/home/massa-ai-reviewer.toml +0 -63
  182. package/agent-profiles/home/massa-ai-test-engineer.toml +0 -64
  183. package/agent-profiles/home/massa-ai-verification-agent.toml +0 -62
  184. package/agent-profiles/work/massa-ai-architecture-specialist.toml +0 -62
  185. package/agent-profiles/work/massa-ai-audit-specialist.toml +0 -79
  186. package/agent-profiles/work/massa-ai-context-curator.toml +0 -64
  187. package/agent-profiles/work/massa-ai-documentation-agent.toml +0 -62
  188. package/agent-profiles/work/massa-ai-furps-analyst.toml +0 -68
  189. package/agent-profiles/work/massa-ai-investigator.toml +0 -65
  190. package/agent-profiles/work/massa-ai-judge.toml +0 -96
  191. package/agent-profiles/work/massa-ai-meta-judge.toml +0 -83
  192. package/agent-profiles/work/massa-ai-mobile-specialist.toml +0 -79
  193. package/agent-profiles/work/massa-ai-navigator.toml +0 -72
  194. package/agent-profiles/work/massa-ai-plan-critic.toml +0 -87
  195. package/agent-profiles/work/massa-ai-planner.toml +0 -62
  196. package/agent-profiles/work/massa-ai-requirements-analyst.toml +0 -61
  197. package/agent-profiles/work/massa-ai-reviewer.toml +0 -63
  198. package/agent-profiles/work/massa-ai-test-engineer.toml +0 -64
  199. package/agent-profiles/work/massa-ai-verification-agent.toml +0 -62
  200. package/agents/massa-ai-architecture-specialist.toml +0 -62
  201. package/agents/massa-ai-audit-specialist.toml +0 -79
  202. package/agents/massa-ai-context-curator.toml +0 -64
  203. package/agents/massa-ai-documentation-agent.toml +0 -62
  204. package/agents/massa-ai-furps-analyst.toml +0 -68
  205. package/agents/massa-ai-investigator.toml +0 -65
  206. package/agents/massa-ai-judge.toml +0 -96
  207. package/agents/massa-ai-meta-judge.toml +0 -83
  208. package/agents/massa-ai-mobile-specialist.toml +0 -79
  209. package/agents/massa-ai-navigator.toml +0 -72
  210. package/agents/massa-ai-plan-critic.toml +0 -87
  211. package/agents/massa-ai-planner.toml +0 -62
  212. package/agents/massa-ai-requirements-analyst.toml +0 -61
  213. package/agents/massa-ai-reviewer.toml +0 -63
  214. package/agents/massa-ai-test-engineer.toml +0 -64
  215. package/agents/massa-ai-verification-agent.toml +0 -62
  216. package/skills/agents/architecture-specialist/SKILL.md +0 -67
  217. package/skills/agents/audit-specialist/SKILL.md +0 -84
  218. package/skills/agents/context-curator/SKILL.md +0 -69
  219. package/skills/agents/documentation-agent/SKILL.md +0 -67
  220. package/skills/agents/furps-analyst/SKILL.md +0 -72
  221. package/skills/agents/investigator/SKILL.md +0 -70
  222. package/skills/agents/meta-judge/SKILL.md +0 -87
  223. package/skills/agents/mobile-specialist/SKILL.md +0 -84
  224. package/skills/agents/navigator/SKILL.md +0 -77
  225. package/skills/agents/plan-critic/SKILL.md +0 -91
  226. package/skills/agents/planner/SKILL.md +0 -67
  227. package/skills/agents/requirements-analyst/SKILL.md +0 -66
  228. package/skills/agents/reviewer/SKILL.md +0 -68
  229. package/skills/agents/verification-agent/SKILL.md +0 -67
  230. package/skills/general.md +0 -14
  231. package/skills/maestro-audit.md +0 -14
  232. package/skills/maestro-fix.md +0 -14
  233. package/skills/maestro.md +0 -14
  234. package/skills/massa-ai/personas/README.md +0 -35
  235. package/skills/massa-ai/personas/ai-native-nodejs-cli-architect.md +0 -47
  236. package/skills/massa-ai/personas/catalog.json +0 -7
  237. package/skills/massa-ai/personas/context-skill-harness-engineer-architect.md +0 -47
  238. package/skills/massa-ai/personas/product-manager.md +0 -65
  239. package/skills/massa-ai/personas/senior-mobile-engineer.md +0 -46
  240. package/skills/massa-ai/personas/senior-mobile-qa-automation-engineer.md +0 -51
  241. package/skills/massa-ai/personas/signals/ai-native-nodejs-cli-architect.json +0 -20
  242. package/skills/massa-ai/personas/signals/context-skill-harness-engineer-architect.json +0 -20
  243. package/skills/massa-ai/personas/signals/product-manager.json +0 -21
  244. package/skills/massa-ai/personas/signals/senior-mobile-engineer.json +0 -18
  245. package/skills/massa-ai/personas/signals/senior-mobile-qa-automation-engineer.json +0 -18
  246. package/skills/massa-ai/references/maestro/artifacts-reports.md +0 -69
  247. package/skills/massa-ai/references/maestro/cli-device.md +0 -65
  248. package/skills/massa-ai/references/maestro/cloud.md +0 -69
  249. package/skills/massa-ai/references/maestro/config-env-output.md +0 -76
  250. package/skills/massa-ai/references/maestro/fact-ledger.md +0 -73
  251. package/skills/massa-ai/references/maestro/js-scripting.md +0 -70
  252. package/skills/massa-ai/references/maestro/mcp.md +0 -59
  253. package/skills/massa-ai/references/maestro/patterns.md +0 -102
  254. package/skills/massa-ai/references/maestro/selectors.md +0 -91
  255. package/skills/massa-ai/references/maestro/workspace-execution.md +0 -81
  256. package/skills/massa-ai/references/maestro/yaml-commands.md +0 -203
  257. package/skills/massa-ai/references/maestro.md +0 -31
  258. package/skills/massa-ai/workflows/general.md +0 -88
  259. package/skills/massa-ai/workflows/maestro/maestro-audit.md +0 -64
  260. package/skills/massa-ai/workflows/maestro/maestro-fix.md +0 -111
  261. package/skills/massa-ai/workflows/maestro/maestro.md +0 -80
  262. package/skills/persona-router/SKILL.md +0 -52
  263. package/skills/persona-router/references/routing-details.md +0 -98
  264. /package/skills/massa-ai/references/{rfc → create-rfc}/ATTRIBUTION.md +0 -0
  265. /package/skills/massa-ai/references/{rfc → create-rfc}/document-contract.md +0 -0
  266. /package/skills/massa-ai/references/{rfc → create-rfc}/quality-and-lifecycle.md +0 -0
  267. /package/skills/massa-ai/references/{tdd → create-tdd}/document-contract.md +0 -0
  268. /package/skills/massa-ai/references/{ticket → create-ticket}/atlassian-fix.md +0 -0
  269. /package/skills/massa-ai/references/{ticket → create-ticket}/templates-and-quality.md +0 -0
@@ -0,0 +1,107 @@
1
+ # massa-ai-owned
2
+ name = "product-manager"
3
+ description = "Read-only requirements and product-quality agent. Analyze one FURPS+ dimension of a PRD or ADR, detect ambiguity, missing requirements, contradictions, implicit requirements, and uncovered scenarios before implementation, and run the findings-only requirements audit lens. Mode is selected by the capability packet (furps, requirements, or audit). Never implements, never writes files, never mutates Atlassian issues."
4
+ model = "gpt-5.6-sol"
5
+ model_reasoning_effort = "high"
6
+ sandbox_mode = "read-only"
7
+ developer_instructions = """# Product Manager Agent Skill
8
+
9
+ ## Mission
10
+ Hold requirements to a clear, complete, and consistent standard before and after implementation: refine a PRD or ADR one FURPS+ dimension at a time, surface gaps in a requirement set, and audit whether a target matches its stated requirements without out-of-scope drift.
11
+
12
+ ## Responsibilities
13
+ - Run exactly one mode per dispatch, selected by the packet `mode` field: `furps`, `requirements`, or `audit`.
14
+ - Cite a requirement ID, spec section, or quoted document passage for every finding.
15
+ - Never silently drop a requirement; flag every gap for user acceptance or record it as an assumption.
16
+
17
+ ## Restrictions
18
+ - Missing or unknown `mode`: return `Blocked` naming the valid modes `furps`, `requirements`, `audit`.
19
+ - Never implement, never write files, never mutate Atlassian issues, never write memory.
20
+ - Never return raw document dumps.
21
+ - In `furps` mode, never analyze a dimension other than the assigned one; flag cross-dimension gaps instead of expanding into them.
22
+ - Do not use this role for plan critique (use `judge` in `plan-critique` mode) or for code-correctness claims (use `code-explorer` or `code-reviewer`).
23
+ - Never load the `massa-ai` router skill; the dispatching workflow owns routing.
24
+
25
+ ## Inputs
26
+ - `mode`: `furps` | `requirements` | `audit` (required).
27
+ - `lens`: `audit` mode only — one of `requirements` (the single lens this charter runs; optional).
28
+ - `dimension`: `furps` mode only — the assigned FURPS+ letter (F, U, R, P, S, or X) and its checklist section.
29
+ - `document` / `scope`: the bounded document packet (sections or summaries, DoR state, recalled facts, Fool summary), the requirement set or spec under analysis, or the audit target.
30
+ - `inputs`: recalled facts, domain constraints, existing specs, existing audit reports.
31
+ - `identifiers`: exact `projectId`, parent `workflowSessionId`, child session tag, workflow name.
32
+ - `exclusions`: other dimensions and sibling-workflow targets.
33
+ - `synapseSessionId`: own ephemeral Synapse session only when the mode expects >= 2 `search` calls (per `references/synapse-policy.md`).
34
+
35
+ ## Modes
36
+
37
+ ### Mode: `furps`
38
+ Per-dimension FURPS+ refinement of a PRD and/or ADR, fanned out one dispatch per dimension by `furps-refinement`.
39
+
40
+ - Confirm the assigned dimension and refuse work outside it.
41
+ - Locate evidence for every check item in the dimension's `references/furps/checklist.md` section, or confirm its absence.
42
+ - Assign a status per check item: `covered` | `partial` | `missing` | `unclear`.
43
+ - Produce `FR-<letter>-<N>` findings for every `missing`/`unclear` item, and for `partial` items when the gap is non-trivial.
44
+
45
+ Output:
46
+ - Status: Complete | Partial | Blocked
47
+ - Scope checked: dimension plus the check items evaluated
48
+ - Evidence: quote plus section ID per check item
49
+ - Findings: `FR-<letter>-<N>` with severity, confidence, status, impact, simplest fix direction, verification suggestion
50
+ - Contributions: open questions / suggestions / insights / risks / DoR gaps
51
+ - Risks and skipped checks
52
+ - Exact next step
53
+
54
+ ### Mode: `requirements`
55
+ Requirements analysis before implementation, typically during the Specify phase.
56
+
57
+ - Detect ambiguous requirements, missing requirements, and contradictions between requirements.
58
+ - Infer implicit requirements (persistence, external calls, auth, payments, concurrency, state transitions).
59
+ - Identify uncovered edge-case scenarios.
60
+
61
+ Output:
62
+ - Status: Complete | Partial | Blocked
63
+ - Scope: requirements analyzed
64
+ - Evidence: requirement IDs, spec citations
65
+ - Findings: ambiguity list, gap list, contradiction list, implicit-requirement list, uncovered-scenario list
66
+ - Risks and skipped checks
67
+ - Exact next step
68
+
69
+ ### Mode: `audit`
70
+ Findings-only requirements lens: whether a concrete target matches its stated requirements, acceptance criteria, and scope, without out-of-scope drift. Shares `references/audit-scope.md` (scope rules) and `references/audit-report-io.md` (report format) with every audit lens; per-lens reference `workflows/requirements/requirements-audit.md`. No fix actions are taken.
71
+
72
+ Output:
73
+ - Status: Complete | Partial | Blocked
74
+ - Scope: area audited + requirements lens
75
+ - Evidence: requirement IDs or spec citations paired with `path:line` pointers
76
+ - Findings: ranked list (severity, location, problem, suggestion) in the project audit-report format
77
+ - Risks and skipped checks
78
+ - Exact next step
79
+
80
+ ## Invocation
81
+ ### Use when
82
+ - The `furps-refinement` workflow fans out per-dimension analysis and needs isolated context per dimension (`furps`).
83
+ - A workflow is in the Specify phase and gray areas exist, the work touches persistence, external calls, auth, payments, concurrency, or state transitions, or the user asks for a gap analysis (`requirements`).
84
+ - A workflow needs a findings-only requirements audit of an implementation target (`audit`).
85
+
86
+ ### Do not use when
87
+ - Requirements are already closed and accepted, or the work is a trivial fix with no requirement surface.
88
+ - The task needs full conversation history or requires writes.
89
+ - The task needs a fix (route to `requirements-fix` or `builder`).
90
+
91
+ ## massa-ai Integration
92
+ - Context Firewall: summarize the document or spec; return evidence and findings only, never the source text.
93
+ - Verification Ladder: static evidence checks only — source-location proof per claim, absent-claim detection per `missing`, spec citation per finding.
94
+ - Massa-ai Memory: suggest durable memories only for a reusable refinement pattern or an implicit requirement accepted as a long-lived assumption; the main agent persists after synthesis.
95
+ - Synapse: own ephemeral session when >= 2 searches are expected, per `references/synapse-policy.md`.
96
+ - References (paths relative to the `massa-ai` skill directory): `references/furps/checklist.md`, `references/furps/report-contract.md`, `references/furps/intake.md`, `references/spec-driven/specify.md`, `references/audit-scope.md`, `references/audit-report-io.md`, `references/agent-orchestration.md`.
97
+
98
+ ## Validation Sensors
99
+ - Source-location proof (quote plus section, requirement ID, or spec citation) for every claim.
100
+ - Absent-claim detection for every `missing` claim.
101
+ - Every implicit requirement is flagged for user acceptance or recorded as an assumption; no requirement is silently dropped.
102
+ - No self-evaluation: every finding ties to a concrete check item, requirement, or document evidence.
103
+ - No files modified (read-only enforced).
104
+
105
+ ## Memory Boundary
106
+ Suggest durable memories only for reusable refinement patterns or implicit requirements accepted as long-lived assumptions. The main agent persists. Do not persist the analysis itself (it lives in `.specs/` or the report).
107
+ """
@@ -0,0 +1,100 @@
1
+ # massa-ai-owned
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 = "gpt-5.6-terra"
5
+ model_reasoning_effort = "high"
6
+ sandbox_mode = "workspace-write"
7
+ developer_instructions = """# 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
@@ -295,7 +295,7 @@ NODE
295
295
  # ── Skills bundling (PDO-08, 09 / D3 two-writer ownership) ──────────────────
296
296
  # scripts/install-skills.sh remains the single writer once it has already
297
297
  # claimed this platform (skillsOwner: "repo" in the shared install-state.json).
298
- # This plugin installs its bundled massa-ai/persona-router skills into the
298
+ # This plugin installs its bundled massa-ai/profile/bootstrap skills into the
299
299
  # SAME harness skills directory ($CODEX_DIR/skills — NOT $PLUGIN_DIR/skills,
300
300
  # which is Codex's own marketplace-plugin skill cache, a separate mechanism)
301
301
  # only when that has not happened, mirroring the MCP single-writer precedent
@@ -320,6 +320,44 @@ try {
320
320
  NODE
321
321
  }
322
322
 
323
+ # C4: line 1 is the enumerated owner ("plugin" | "none" — never the raw
324
+ # recorded value, so a hostile multi-line skillsOwner cannot smuggle a name
325
+ # into the list); every further line is a harness skill this plugin recorded
326
+ # as installed and no longer ships. The recorded list is the ownership proof,
327
+ # so an unrecorded directory of the same name is never touched.
328
+ plugin_skills_record() {
329
+ local runner="$1"
330
+ "$runner" - "$HARNESS_STATE_FILE" "$HARNESS_HOST" <<'NODE'
331
+ const fs = require("fs");
332
+ const [, , file, host] = process.argv;
333
+ try {
334
+ const data = JSON.parse(fs.readFileSync(file, "utf8"));
335
+ const rec = data && data.platforms && data.platforms[host];
336
+ const owned = !!rec && rec.skillsOwner === "plugin";
337
+ const current = ["massa-ai", "profile", "bootstrap"];
338
+ const retired = owned && Array.isArray(rec.skills)
339
+ ? rec.skills.filter((s) => typeof s === "string" && /^[a-z0-9][a-z0-9-]*$/.test(s) && !current.includes(s))
340
+ : [];
341
+ process.stdout.write([owned ? "plugin" : "none", ...retired].join("\n"));
342
+ } catch {
343
+ process.stdout.write("none");
344
+ }
345
+ NODE
346
+ }
347
+
348
+ # Removes every retired name in a plugin_skills_record output. The subshell
349
+ # body scopes `set -f` and a newline-only IFS, so no name is ever
350
+ # glob-expanded or split on a space.
351
+ remove_retired_skills() (
352
+ set -f
353
+ IFS=$'\n'
354
+ state_retired_skills="$(printf '%s\n' "$1" | sed 1d)"
355
+ for name in $state_retired_skills; do
356
+ rm -rf "$HARNESS_SKILLS_DIR/$name"
357
+ vecho " - removed retired harness skill $HARNESS_SKILLS_DIR/$name"
358
+ done
359
+ )
360
+
323
361
  install_bundled_skills() {
324
362
  local runner=""
325
363
  if command -v node &>/dev/null; then runner="node"
@@ -335,7 +373,7 @@ install_bundled_skills() {
335
373
  fi
336
374
 
337
375
  local installed=0 name src dest
338
- for name in massa-ai persona-router profile bootstrap; do
376
+ for name in massa-ai profile bootstrap; do
339
377
  src="$SCRIPT_DIR/skills/$name"
340
378
  [[ -d "$src" ]] || continue
341
379
  dest="$HARNESS_SKILLS_DIR/$name"
@@ -350,6 +388,11 @@ install_bundled_skills() {
350
388
  done
351
389
  vecho " + ${installed} harness skills installed to $HARNESS_SKILLS_DIR (plugin-owned)"
352
390
 
391
+ # C4: retired skills go BEFORE the record is rewritten — the recorded list
392
+ # is the only ownership proof, so a removal that fails (set -e aborts here)
393
+ # leaves it in place for the next run to retry.
394
+ remove_retired_skills "$(plugin_skills_record "$runner")"
395
+
353
396
  "$runner" - "$HARNESS_STATE_FILE" "$HARNESS_HOST" "$CODEX_DIR" <<'NODE'
354
397
  const fs = require("fs");
355
398
  const path = require("path");
@@ -364,7 +407,8 @@ if (typeof data.platforms !== "object" || data.platforms === null || Array.isArr
364
407
  }
365
408
  data.version = 2;
366
409
  const prev = data.platforms[host];
367
- data.platforms[host] = { root, skillsOwner: "plugin", skills: ["massa-ai", "persona-router", "profile", "bootstrap"] };
410
+ const current = ["massa-ai", "profile", "bootstrap"];
411
+ data.platforms[host] = { root, skillsOwner: "plugin", skills: current };
368
412
  // The whole-record replace must not drop fields a previous successful install
369
413
  // wrote (R2) — re-attach them. modelProfile (T10, MPS-03 round-trip
370
414
  // obligation) is engine-owned; installRoute is installer-owned but written by
@@ -394,24 +438,16 @@ uninstall_bundled_skills() {
394
438
  else return 0
395
439
  fi
396
440
 
397
- local raw_owner
398
- raw_owner="$("$runner" - "$HARNESS_STATE_FILE" "$HARNESS_HOST" <<'NODE'
399
- const fs = require("fs");
400
- const [, , file, host] = process.argv;
401
- try {
402
- const data = JSON.parse(fs.readFileSync(file, "utf8"));
403
- const rec = data && data.platforms && data.platforms[host];
404
- process.stdout.write(rec ? String(rec.skillsOwner) : "none");
405
- } catch {
406
- process.stdout.write("none");
407
- }
408
- NODE
409
- )"
410
- [[ "$raw_owner" == "plugin" ]] && {
441
+ # Line 1 of the record is the enumerated owner; uninstall only ever acts on
442
+ # an exact "plugin" record.
443
+ local record
444
+ record="$(plugin_skills_record "$runner")"
445
+ [[ "${record%%$'\n'*}" == "plugin" ]] && {
411
446
  local name
412
- for name in massa-ai persona-router profile bootstrap; do
447
+ for name in massa-ai profile bootstrap; do
413
448
  rm -rf "$HARNESS_SKILLS_DIR/$name"
414
449
  done
450
+ remove_retired_skills "$record"
415
451
  rmdir "$HARNESS_SKILLS_DIR" 2>/dev/null || true
416
452
  echo " - removed plugin-owned harness skills from $HARNESS_SKILLS_DIR"
417
453
  }
@@ -588,6 +624,42 @@ unregister_codex_plugin() {
588
624
  CODEX_HOME="$CODEX_CLI_HOME" codex plugin marketplace remove "$CODEX_MARKETPLACE" </dev/null >/dev/null 2>&1 || true
589
625
  }
590
626
 
627
+ # >>> massa-ai agent ownership predicates >>>
628
+ # Byte-identical in every plugin installer and scripts/lib/installer-shared.sh
629
+ # (plugin tarballs cannot source repo-only libs); the TS twin is
630
+ # packages/shared/src/profile-switch/ownership.ts, and
631
+ # scripts/__tests__/agent-ownership-parity.test.ts holds all copies and both
632
+ # languages to identical verdicts. Ownership is a content marker, never a
633
+ # filename; the legacy rule lets an upgrade prune the pre-rename
634
+ # massa-ai-<name> files — exact names only, never an open massa-ai-* glob.
635
+ MASSA_AI_OWNED_MARKER_MD='<!-- massa-ai-owned: true -->'
636
+ 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 "
637
+ is_legacy_agent() {
638
+ local b="${1##*/}"
639
+ b="${b%.*}"
640
+ [[ "$b" == massa-ai-* && "$MASSA_AI_LEGACY_AGENT_NAMES" == *" ${b#massa-ai-} "* ]]
641
+ }
642
+ has_owned_marker() {
643
+ 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
644
+ }
645
+ is_owned_agent() {
646
+ [[ -f "$1" && ! -L "$1" ]] || return 1
647
+ is_legacy_agent "$1" || has_owned_marker "$1"
648
+ }
649
+ is_owned_agent_toml() {
650
+ [[ -f "$1" && ! -L "$1" ]] || return 1
651
+ [[ "$(head -n1 "$1")" == "# massa-ai-owned" ]]
652
+ }
653
+ is_owned_agent_link() {
654
+ [[ -L "$1" ]] || return 1
655
+ is_legacy_agent "$1" && return 0
656
+ local b="${1##*/}" t
657
+ t="$(readlink "$1")"
658
+ [[ "$t" == */opencode-plugin/agents/"$b" || "$t" == */plugins/massa-ai/agent-profiles/*/"$b" ]] && return 0
659
+ [[ -f "$1" ]] && has_owned_marker "$1"
660
+ }
661
+ # <<< massa-ai agent ownership predicates <<<
662
+
591
663
  # ── Uninstall ───────────────────────────────────────────────────────────────
592
664
  if [[ "$UNINSTALL" -eq 1 ]]; then
593
665
  echo "Uninstalling massa-ai Codex plugin (scope: $SCOPE)..."
@@ -608,8 +680,7 @@ if [[ "$UNINSTALL" -eq 1 ]]; then
608
680
  if [[ -d "$AGENTS_DIR" ]]; then
609
681
  removed=0
610
682
  for f in "$AGENTS_DIR/"*.toml; do
611
- [[ -f "$f" ]] || continue
612
- if head -n1 "$f" | grep -q "^# massa-ai-owned$"; then
683
+ if is_owned_agent_toml "$f"; then
613
684
  rm -f "$f"
614
685
  removed=$((removed + 1))
615
686
  fi
@@ -706,9 +777,13 @@ if [[ -n "$json_runner" ]]; then
706
777
  fi
707
778
 
708
779
  specialist_count=0
709
- for src in "$ACTIVE_AGENTS_SRC/"massa-ai-*.toml; do
780
+ for src in "$ACTIVE_AGENTS_SRC/"*.toml; do
710
781
  [[ -f "$src" ]] || continue
711
782
  name="$(basename "$src")"
783
+ if [[ -e "$AGENTS_DIR/$name" || -L "$AGENTS_DIR/$name" ]] && ! is_owned_agent_toml "$AGENTS_DIR/$name"; then
784
+ echo " ⚠ $AGENTS_DIR/$name exists and is not massa-ai-owned — skipped" >&2
785
+ continue
786
+ fi
712
787
  cp "$src" "$AGENTS_DIR/$name"
713
788
  vecho " + $name"
714
789
  specialist_count=$((specialist_count + 1))
@@ -733,10 +808,9 @@ vecho " + ${specialist_count} subagent specialists (generated from skills/agent
733
808
  # (AC-02.3, AC-02.5).
734
809
  pruned=0
735
810
  for f in "$AGENTS_DIR/"*.toml; do
736
- [[ -f "$f" ]] || continue
737
- head -n1 "$f" | grep -q "^# massa-ai-owned$" || continue # ownership test (D3)
738
811
  base="$(basename "$f")"
739
812
  [[ -f "$ACTIVE_AGENTS_SRC/$base" ]] && continue # keep-list: still shipped
813
+ is_owned_agent_toml "$f" || continue # ownership test (D3)
740
814
  rm -f "$f"
741
815
  pruned=$((pruned + 1))
742
816
  done
@@ -746,7 +820,7 @@ fi
746
820
 
747
821
  install_variant_tree
748
822
 
749
- # Skills bundling (PDO-08, 09): install massa-ai/persona-router into the
823
+ # Skills bundling (PDO-08, 09): install massa-ai/profile/bootstrap into the
750
824
  # shared harness skills directory, unless scripts/install-skills.sh already
751
825
  # owns it for this platform.
752
826
  vecho ""
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@massa-ai/codex-plugin",
3
- "version": "1.60.1",
3
+ "version": "1.62.0",
4
4
  "description": "massa-ai plugin for Codex — semantic code search, memory, and context compression",
5
5
  "files": [
6
6
  "agents",
@@ -4,8 +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"
8
- model_tier: standard
7
+ version: "1.1.0"
9
8
  permission: write
10
9
  ---
11
10
 
@@ -25,8 +24,7 @@ Implement an approved plan or task by modifying source code with a disjoint writ
25
24
  - Never perform reviews.
26
25
  - Never generate implementation plans.
27
26
  - Never write outside the assigned disjoint write set.
28
- - Never load the `massa-ai` or `persona-router` routers, and never open a `personas/` prompt file; the dispatching workflow owns routing and persona selection.
29
- - 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.
30
28
 
31
29
  ## Inputs
32
30
  - `scope`: exact files and modules to modify (disjoint write set).
@@ -51,7 +49,7 @@ Implement an approved plan or task by modifying source code with a disjoint writ
51
49
  ### Do not use when
52
50
  - No plan or task is approved.
53
51
  - The write set overlaps another active agent.
54
- - 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).
55
53
 
56
54
  ## massa-ai Integration
57
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.