@massa-ai/claude-plugin 1.61.0 → 1.63.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.
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +2 -4
- package/agent-profiles/balanced/code-explorer.md +92 -0
- package/agent-profiles/balanced/code-reviewer.md +105 -0
- package/agent-profiles/balanced/designer.md +72 -0
- package/agent-profiles/balanced/judge.md +88 -0
- package/agent-profiles/balanced/product-manager.md +96 -0
- package/{agents/massa-ai-builder.md → agent-profiles/balanced/senior-engineer.md} +5 -5
- package/agent-profiles/balanced/test-engineer.md +65 -0
- package/agent-profiles/cheap/code-explorer.md +92 -0
- package/agent-profiles/cheap/code-reviewer.md +105 -0
- package/agent-profiles/cheap/designer.md +72 -0
- package/agent-profiles/cheap/judge.md +88 -0
- package/agent-profiles/cheap/product-manager.md +96 -0
- package/agent-profiles/cheap/{massa-ai-builder.md → senior-engineer.md} +5 -5
- package/agent-profiles/cheap/test-engineer.md +65 -0
- package/agent-profiles/heavy/code-explorer.md +92 -0
- package/agent-profiles/heavy/code-reviewer.md +105 -0
- package/agent-profiles/heavy/designer.md +72 -0
- package/agent-profiles/heavy/judge.md +88 -0
- package/agent-profiles/heavy/product-manager.md +96 -0
- package/agent-profiles/heavy/{massa-ai-builder.md → senior-engineer.md} +5 -5
- package/agent-profiles/heavy/test-engineer.md +65 -0
- package/agent-profiles/home/code-explorer.md +92 -0
- package/agent-profiles/home/code-reviewer.md +105 -0
- package/agent-profiles/home/designer.md +72 -0
- package/agent-profiles/home/judge.md +88 -0
- package/agent-profiles/home/product-manager.md +96 -0
- package/agent-profiles/{balanced/massa-ai-builder.md → home/senior-engineer.md} +5 -5
- package/agent-profiles/home/test-engineer.md +65 -0
- package/agent-profiles/work/code-explorer.md +92 -0
- package/agent-profiles/work/code-reviewer.md +105 -0
- package/agent-profiles/work/designer.md +72 -0
- package/agent-profiles/work/judge.md +88 -0
- package/agent-profiles/work/product-manager.md +96 -0
- package/agent-profiles/work/{massa-ai-builder.md → senior-engineer.md} +5 -5
- package/agent-profiles/work/test-engineer.md +65 -0
- package/agents/code-explorer.md +92 -0
- package/agents/code-reviewer.md +105 -0
- package/agents/designer.md +72 -0
- package/agents/judge.md +88 -0
- package/agents/product-manager.md +96 -0
- package/{agent-profiles/home/massa-ai-builder.md → agents/senior-engineer.md} +5 -5
- package/agents/test-engineer.md +65 -0
- package/commands/{adr.md → create-adr.md} +3 -3
- package/commands/{to-prd.md → create-prd.md} +3 -3
- package/commands/{rfc.md → create-rfc.md} +3 -3
- package/commands/{tdd.md → create-tdd.md} +3 -3
- package/commands/{ticket.md → create-ticket.md} +3 -3
- package/commands/{discovery.md → product-discovery.md} +3 -3
- package/hooks/massa-ai-hook.ts +4 -4
- package/install.sh +116 -38
- package/package.json +1 -1
- package/skills/agents/code-explorer/SKILL.md +93 -0
- package/skills/agents/code-reviewer/SKILL.md +106 -0
- package/skills/agents/designer/SKILL.md +35 -31
- package/skills/agents/judge/SKILL.md +54 -63
- package/skills/agents/product-manager/SKILL.md +97 -0
- package/skills/agents/{builder → senior-engineer}/SKILL.md +5 -6
- package/skills/agents/test-engineer/SKILL.md +28 -29
- package/skills/bootstrap/SKILL.md +4 -5
- package/skills/massa-ai/SKILL.md +73 -219
- package/skills/massa-ai/references/agent-modes/designer/audit.md +22 -0
- package/skills/massa-ai/references/agent-modes/designer/implement.md +29 -0
- package/skills/massa-ai/references/agent-modes/designer/trace.md +41 -0
- package/skills/massa-ai/references/agent-modes/judge/plan-critique-full.md +13 -0
- package/skills/massa-ai/references/agent-modes/judge/plan-critique-lite.md +13 -0
- package/skills/massa-ai/references/agent-modes/judge/scorer.md +31 -0
- package/skills/massa-ai/references/agent-modes/judge/spec-author.md +28 -0
- package/skills/massa-ai/references/agent-modes/test-engineer/audit.md +17 -0
- package/skills/massa-ai/references/agent-modes/test-engineer/fix.md +14 -0
- package/skills/massa-ai/references/agent-orchestration.md +63 -58
- package/skills/massa-ai/references/audit-report-io.md +8 -87
- package/skills/massa-ai/references/code-reuse-scan.md +1 -1
- package/skills/massa-ai/references/{adr-authoring.md → create-adr.md} +3 -3
- package/skills/massa-ai/references/{rfc → create-rfc}/discovery-and-sizing.md +1 -1
- package/skills/massa-ai/references/{tdd → create-tdd}/calibrated-examples.md +3 -3
- package/skills/massa-ai/references/{tdd → create-tdd}/discovery-and-sizing.md +1 -1
- package/skills/massa-ai/references/{tdd → create-tdd}/quality-and-lifecycle.md +1 -1
- package/skills/massa-ai/references/{ticket → create-ticket}/intake-and-sources.md +1 -1
- package/skills/massa-ai/references/figma-pre-analysis.md +1 -1
- package/skills/massa-ai/references/furps/analyst-role.md +3 -3
- package/skills/massa-ai/references/furps/checklist.md +2 -2
- package/skills/massa-ai/references/furps/intake.md +7 -7
- package/skills/massa-ai/references/hook-enforcement.md +4 -8
- package/skills/massa-ai/references/implementation-delivery.md +2 -2
- package/skills/massa-ai/references/knowledge-verification-chain.md +0 -1
- package/skills/massa-ai/references/mobile-context.md +2 -5
- package/skills/massa-ai/references/pr-task-fix.md +1 -1
- package/skills/massa-ai/references/spec-driven/specify.md +1 -1
- package/skills/massa-ai/references/spec-driven/sub-agents.md +4 -3
- package/skills/massa-ai/references/spec-driven/validate.md +1 -1
- package/skills/massa-ai/references/subagent-design.md +7 -9
- package/skills/massa-ai/references/verification-ladder.md +2 -2
- package/skills/massa-ai/scripts/validate_audit_report.ts +3 -8
- package/skills/massa-ai/workflows/architecture/architecture-audit.md +4 -5
- package/skills/massa-ai/workflows/architecture/architecture-fix.md +6 -7
- package/skills/massa-ai/workflows/bugs/bugs-audit.md +2 -3
- package/skills/massa-ai/workflows/bugs/bugs-fix.md +5 -6
- package/skills/massa-ai/workflows/code-quality/code-quality-audit.md +2 -3
- package/skills/massa-ai/workflows/code-quality/code-quality-fix.md +5 -6
- package/skills/massa-ai/workflows/commit.md +3 -3
- package/skills/massa-ai/workflows/{adr.md → create-adr.md} +10 -10
- package/skills/massa-ai/workflows/{to-prd.md → create-prd.md} +4 -4
- package/skills/massa-ai/workflows/{rfc.md → create-rfc.md} +6 -6
- package/skills/massa-ai/workflows/{tdd.md → create-tdd.md} +11 -11
- package/skills/massa-ai/workflows/{ticket.md → create-ticket.md} +5 -5
- package/skills/massa-ai/workflows/debug.md +5 -6
- package/skills/massa-ai/workflows/design.md +2 -2
- package/skills/massa-ai/workflows/exploration.md +2 -2
- package/skills/massa-ai/workflows/feature.md +6 -7
- package/skills/massa-ai/workflows/implementation/implementation-audit.md +22 -3
- package/skills/massa-ai/workflows/implementation/implementation-fix.md +7 -8
- package/skills/massa-ai/workflows/judge-with-debate.md +14 -14
- package/skills/massa-ai/workflows/mobile-figma/mobile-figma-audit.md +2 -2
- package/skills/massa-ai/workflows/mobile-figma/mobile-figma-fix.md +11 -12
- package/skills/massa-ai/workflows/pr-review.md +32 -14
- package/skills/massa-ai/workflows/{discovery.md → product-discovery.md} +12 -12
- package/skills/massa-ai/workflows/refactor.md +5 -6
- package/skills/massa-ai/workflows/refinement/furps-refinement.md +7 -7
- package/skills/massa-ai/workflows/requirements/requirements-audit.md +2 -2
- package/skills/massa-ai/workflows/requirements/requirements-fix.md +6 -7
- package/skills/massa-ai/workflows/security/security-audit.md +2 -3
- package/skills/massa-ai/workflows/security/security-fix.md +4 -5
- package/skills/massa-ai/workflows/spec-driven.md +21 -12
- package/skills/massa-ai/workflows/tests/tests-audit.md +2 -2
- package/skills/massa-ai/workflows/tests/tests-fix.md +17 -7
- package/skills/massa-ai/workflows/the-fool.md +7 -7
- package/agent-profiles/balanced/massa-ai-architecture-specialist.md +0 -63
- package/agent-profiles/balanced/massa-ai-audit-specialist.md +0 -80
- package/agent-profiles/balanced/massa-ai-context-curator.md +0 -65
- package/agent-profiles/balanced/massa-ai-designer.md +0 -67
- package/agent-profiles/balanced/massa-ai-documentation-agent.md +0 -62
- package/agent-profiles/balanced/massa-ai-furps-analyst.md +0 -69
- package/agent-profiles/balanced/massa-ai-investigator.md +0 -66
- package/agent-profiles/balanced/massa-ai-judge.md +0 -96
- package/agent-profiles/balanced/massa-ai-meta-judge.md +0 -85
- package/agent-profiles/balanced/massa-ai-mobile-specialist.md +0 -80
- package/agent-profiles/balanced/massa-ai-navigator.md +0 -73
- package/agent-profiles/balanced/massa-ai-plan-critic.md +0 -88
- package/agent-profiles/balanced/massa-ai-planner.md +0 -63
- package/agent-profiles/balanced/massa-ai-requirements-analyst.md +0 -62
- package/agent-profiles/balanced/massa-ai-reviewer.md +0 -64
- package/agent-profiles/balanced/massa-ai-test-engineer.md +0 -64
- package/agent-profiles/balanced/massa-ai-verification-agent.md +0 -63
- package/agent-profiles/cheap/massa-ai-architecture-specialist.md +0 -63
- package/agent-profiles/cheap/massa-ai-audit-specialist.md +0 -80
- package/agent-profiles/cheap/massa-ai-context-curator.md +0 -65
- package/agent-profiles/cheap/massa-ai-designer.md +0 -67
- package/agent-profiles/cheap/massa-ai-documentation-agent.md +0 -62
- package/agent-profiles/cheap/massa-ai-furps-analyst.md +0 -69
- package/agent-profiles/cheap/massa-ai-investigator.md +0 -66
- package/agent-profiles/cheap/massa-ai-judge.md +0 -96
- package/agent-profiles/cheap/massa-ai-meta-judge.md +0 -85
- package/agent-profiles/cheap/massa-ai-mobile-specialist.md +0 -80
- package/agent-profiles/cheap/massa-ai-navigator.md +0 -73
- package/agent-profiles/cheap/massa-ai-plan-critic.md +0 -88
- package/agent-profiles/cheap/massa-ai-planner.md +0 -63
- package/agent-profiles/cheap/massa-ai-requirements-analyst.md +0 -62
- package/agent-profiles/cheap/massa-ai-reviewer.md +0 -64
- package/agent-profiles/cheap/massa-ai-test-engineer.md +0 -64
- package/agent-profiles/cheap/massa-ai-verification-agent.md +0 -63
- package/agent-profiles/heavy/massa-ai-architecture-specialist.md +0 -63
- package/agent-profiles/heavy/massa-ai-audit-specialist.md +0 -80
- package/agent-profiles/heavy/massa-ai-context-curator.md +0 -65
- package/agent-profiles/heavy/massa-ai-designer.md +0 -67
- package/agent-profiles/heavy/massa-ai-documentation-agent.md +0 -62
- package/agent-profiles/heavy/massa-ai-furps-analyst.md +0 -69
- package/agent-profiles/heavy/massa-ai-investigator.md +0 -66
- package/agent-profiles/heavy/massa-ai-judge.md +0 -96
- package/agent-profiles/heavy/massa-ai-meta-judge.md +0 -85
- package/agent-profiles/heavy/massa-ai-mobile-specialist.md +0 -80
- package/agent-profiles/heavy/massa-ai-navigator.md +0 -73
- package/agent-profiles/heavy/massa-ai-plan-critic.md +0 -88
- package/agent-profiles/heavy/massa-ai-planner.md +0 -63
- package/agent-profiles/heavy/massa-ai-requirements-analyst.md +0 -62
- package/agent-profiles/heavy/massa-ai-reviewer.md +0 -64
- package/agent-profiles/heavy/massa-ai-test-engineer.md +0 -64
- package/agent-profiles/heavy/massa-ai-verification-agent.md +0 -63
- package/agent-profiles/home/massa-ai-architecture-specialist.md +0 -63
- package/agent-profiles/home/massa-ai-audit-specialist.md +0 -80
- package/agent-profiles/home/massa-ai-context-curator.md +0 -65
- package/agent-profiles/home/massa-ai-designer.md +0 -67
- package/agent-profiles/home/massa-ai-documentation-agent.md +0 -62
- package/agent-profiles/home/massa-ai-furps-analyst.md +0 -69
- package/agent-profiles/home/massa-ai-investigator.md +0 -66
- package/agent-profiles/home/massa-ai-judge.md +0 -96
- package/agent-profiles/home/massa-ai-meta-judge.md +0 -85
- package/agent-profiles/home/massa-ai-mobile-specialist.md +0 -80
- package/agent-profiles/home/massa-ai-navigator.md +0 -73
- package/agent-profiles/home/massa-ai-plan-critic.md +0 -88
- package/agent-profiles/home/massa-ai-planner.md +0 -63
- package/agent-profiles/home/massa-ai-requirements-analyst.md +0 -62
- package/agent-profiles/home/massa-ai-reviewer.md +0 -64
- package/agent-profiles/home/massa-ai-test-engineer.md +0 -64
- package/agent-profiles/home/massa-ai-verification-agent.md +0 -63
- package/agent-profiles/work/massa-ai-architecture-specialist.md +0 -63
- package/agent-profiles/work/massa-ai-audit-specialist.md +0 -80
- package/agent-profiles/work/massa-ai-context-curator.md +0 -65
- package/agent-profiles/work/massa-ai-designer.md +0 -67
- package/agent-profiles/work/massa-ai-documentation-agent.md +0 -62
- package/agent-profiles/work/massa-ai-furps-analyst.md +0 -69
- package/agent-profiles/work/massa-ai-investigator.md +0 -66
- package/agent-profiles/work/massa-ai-judge.md +0 -96
- package/agent-profiles/work/massa-ai-meta-judge.md +0 -85
- package/agent-profiles/work/massa-ai-mobile-specialist.md +0 -80
- package/agent-profiles/work/massa-ai-navigator.md +0 -73
- package/agent-profiles/work/massa-ai-plan-critic.md +0 -88
- package/agent-profiles/work/massa-ai-planner.md +0 -63
- package/agent-profiles/work/massa-ai-requirements-analyst.md +0 -62
- package/agent-profiles/work/massa-ai-reviewer.md +0 -64
- package/agent-profiles/work/massa-ai-test-engineer.md +0 -64
- package/agent-profiles/work/massa-ai-verification-agent.md +0 -63
- package/agents/massa-ai-architecture-specialist.md +0 -63
- package/agents/massa-ai-audit-specialist.md +0 -80
- package/agents/massa-ai-context-curator.md +0 -65
- package/agents/massa-ai-designer.md +0 -67
- package/agents/massa-ai-documentation-agent.md +0 -62
- package/agents/massa-ai-furps-analyst.md +0 -69
- package/agents/massa-ai-investigator.md +0 -66
- package/agents/massa-ai-judge.md +0 -96
- package/agents/massa-ai-meta-judge.md +0 -85
- package/agents/massa-ai-mobile-specialist.md +0 -80
- package/agents/massa-ai-navigator.md +0 -73
- package/agents/massa-ai-plan-critic.md +0 -88
- package/agents/massa-ai-planner.md +0 -63
- package/agents/massa-ai-requirements-analyst.md +0 -62
- package/agents/massa-ai-reviewer.md +0 -64
- package/agents/massa-ai-test-engineer.md +0 -64
- package/agents/massa-ai-verification-agent.md +0 -63
- package/commands/general.md +0 -14
- package/commands/maestro-audit.md +0 -14
- package/commands/maestro-fix.md +0 -14
- package/commands/maestro.md +0 -14
- package/skills/agents/architecture-specialist/SKILL.md +0 -66
- package/skills/agents/audit-specialist/SKILL.md +0 -83
- package/skills/agents/context-curator/SKILL.md +0 -68
- package/skills/agents/documentation-agent/SKILL.md +0 -66
- package/skills/agents/furps-analyst/SKILL.md +0 -71
- package/skills/agents/investigator/SKILL.md +0 -69
- package/skills/agents/meta-judge/SKILL.md +0 -87
- package/skills/agents/mobile-specialist/SKILL.md +0 -83
- package/skills/agents/navigator/SKILL.md +0 -76
- package/skills/agents/plan-critic/SKILL.md +0 -90
- package/skills/agents/planner/SKILL.md +0 -66
- package/skills/agents/requirements-analyst/SKILL.md +0 -65
- package/skills/agents/reviewer/SKILL.md +0 -67
- package/skills/agents/verification-agent/SKILL.md +0 -66
- package/skills/massa-ai/personas/README.md +0 -35
- package/skills/massa-ai/personas/ai-native-nodejs-cli-architect.md +0 -47
- package/skills/massa-ai/personas/catalog.json +0 -7
- package/skills/massa-ai/personas/context-skill-harness-engineer-architect.md +0 -47
- package/skills/massa-ai/personas/product-manager.md +0 -65
- package/skills/massa-ai/personas/senior-mobile-engineer.md +0 -46
- package/skills/massa-ai/personas/senior-mobile-qa-automation-engineer.md +0 -51
- package/skills/massa-ai/personas/signals/ai-native-nodejs-cli-architect.json +0 -20
- package/skills/massa-ai/personas/signals/context-skill-harness-engineer-architect.json +0 -20
- package/skills/massa-ai/personas/signals/product-manager.json +0 -21
- package/skills/massa-ai/personas/signals/senior-mobile-engineer.json +0 -18
- package/skills/massa-ai/personas/signals/senior-mobile-qa-automation-engineer.json +0 -18
- package/skills/massa-ai/references/maestro/artifacts-reports.md +0 -69
- package/skills/massa-ai/references/maestro/cli-device.md +0 -65
- package/skills/massa-ai/references/maestro/cloud.md +0 -69
- package/skills/massa-ai/references/maestro/config-env-output.md +0 -76
- package/skills/massa-ai/references/maestro/fact-ledger.md +0 -73
- package/skills/massa-ai/references/maestro/js-scripting.md +0 -70
- package/skills/massa-ai/references/maestro/mcp.md +0 -59
- package/skills/massa-ai/references/maestro/patterns.md +0 -102
- package/skills/massa-ai/references/maestro/selectors.md +0 -91
- package/skills/massa-ai/references/maestro/workspace-execution.md +0 -81
- package/skills/massa-ai/references/maestro/yaml-commands.md +0 -203
- package/skills/massa-ai/references/maestro.md +0 -31
- package/skills/massa-ai/workflows/general.md +0 -88
- package/skills/massa-ai/workflows/maestro/maestro-audit.md +0 -64
- package/skills/massa-ai/workflows/maestro/maestro-fix.md +0 -111
- package/skills/massa-ai/workflows/maestro/maestro.md +0 -80
- package/skills/persona-router/SKILL.md +0 -52
- package/skills/persona-router/references/routing-details.md +0 -98
- package/skills/profile/SKILL.md +0 -39
- /package/skills/massa-ai/references/{rfc → create-rfc}/ATTRIBUTION.md +0 -0
- /package/skills/massa-ai/references/{rfc → create-rfc}/document-contract.md +0 -0
- /package/skills/massa-ai/references/{rfc → create-rfc}/quality-and-lifecycle.md +0 -0
- /package/skills/massa-ai/references/{tdd → create-tdd}/document-contract.md +0 -0
- /package/skills/massa-ai/references/{ticket → create-ticket}/atlassian-fix.md +0 -0
- /package/skills/massa-ai/references/{ticket → create-ticket}/templates-and-quality.md +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "Use this workflow to draft, review, create, or resume creation of Jira Epics, issues, or sub-tasks through Atlassian MCP, the only tracker and mutation path. — explicit massa-ai 'ticket' workflow"
|
|
2
|
+
description: "Use this workflow to draft, review, create, or resume creation of Jira Epics, issues, or sub-tasks through Atlassian MCP, the only tracker and mutation path. — explicit massa-ai 'create-ticket' workflow"
|
|
3
3
|
argument-hint: "[task description]"
|
|
4
4
|
---
|
|
5
5
|
<!-- massa-ai:generated workflow-command -->
|
|
6
6
|
|
|
7
|
-
Explicit massa-ai workflow invocation: `ticket`.
|
|
7
|
+
Explicit massa-ai workflow invocation: `create-ticket`.
|
|
8
8
|
|
|
9
9
|
Load the massa-ai router skill if not already loaded (dedupe guard), then
|
|
10
|
-
route to workflow `ticket` under routing precedence 1 (explicit route) —
|
|
10
|
+
route to workflow `create-ticket` under routing precedence 1 (explicit route) —
|
|
11
11
|
do not reclassify. Pass the following as the task description; if empty,
|
|
12
12
|
the workflow's own intake gathers it.
|
|
13
13
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "Product discovery and brainstorming workflow — act as a sharp product thinking partner to explore problem spaces, generate and stress-test ideas, and spar on strategy before anything is spec-ready, ending with a mandatory offer to synthesize the conversation into a PRD via the
|
|
2
|
+
description: "Product discovery and brainstorming workflow — act as a sharp product thinking partner to explore problem spaces, generate and stress-test ideas, and spar on strategy before anything is spec-ready, ending with a mandatory offer to synthesize the conversation into a PRD via the create-prd workflow. Use when the user wants to brainstorm a product problem, idea, opportunity, or direction with no concrete code target. Do NOT use for codebase understanding (exploration), converting a finished discussion into a PRD (create-prd), or any implementation work. — explicit massa-ai 'product-discovery' workflow"
|
|
3
3
|
argument-hint: "[task description]"
|
|
4
4
|
---
|
|
5
5
|
<!-- massa-ai:generated workflow-command -->
|
|
6
6
|
|
|
7
|
-
Explicit massa-ai workflow invocation: `discovery`.
|
|
7
|
+
Explicit massa-ai workflow invocation: `product-discovery`.
|
|
8
8
|
|
|
9
9
|
Load the massa-ai router skill if not already loaded (dedupe guard), then
|
|
10
|
-
route to workflow `discovery` under routing precedence 1 (explicit route) —
|
|
10
|
+
route to workflow `product-discovery` under routing precedence 1 (explicit route) —
|
|
11
11
|
do not reclassify. Pass the following as the task description; if empty,
|
|
12
12
|
the workflow's own intake gathers it.
|
|
13
13
|
|
package/hooks/massa-ai-hook.ts
CHANGED
|
@@ -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
|
|
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", "
|
|
256
|
+
const activeModel = readModelLine(path.join(pluginRoot, "agents", "code-reviewer.md"));
|
|
257
257
|
const variantModel = readModelLine(
|
|
258
|
-
path.join(pluginRoot, "agent-profiles", profile, "
|
|
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:
|
|
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
|
@@ -350,7 +350,7 @@ NODE
|
|
|
350
350
|
# ── Skills bundling (PDO-08, 09 / D3 two-writer ownership) ──────────────────
|
|
351
351
|
# scripts/install-skills.sh remains the single writer once it has already
|
|
352
352
|
# claimed this platform (skillsOwner: "repo" in the shared install-state.json).
|
|
353
|
-
# This plugin installs its bundled massa-ai/
|
|
353
|
+
# This plugin installs its bundled massa-ai/bootstrap skills into the
|
|
354
354
|
# SAME harness skills directory (~/.claude/skills, not this plugin's cache)
|
|
355
355
|
# only when that has not happened, mirroring the MCP single-writer precedent
|
|
356
356
|
# (test-mcp-single-writer.sh). A repo checkout's own --apply always takes
|
|
@@ -374,6 +374,44 @@ try {
|
|
|
374
374
|
NODE
|
|
375
375
|
}
|
|
376
376
|
|
|
377
|
+
# C4: line 1 is the enumerated owner ("plugin" | "none" — never the raw
|
|
378
|
+
# recorded value, so a hostile multi-line skillsOwner cannot smuggle a name
|
|
379
|
+
# into the list); every further line is a harness skill this plugin recorded
|
|
380
|
+
# as installed and no longer ships. The recorded list is the ownership proof,
|
|
381
|
+
# so an unrecorded directory of the same name is never touched.
|
|
382
|
+
plugin_skills_record() {
|
|
383
|
+
local runner="$1"
|
|
384
|
+
"$runner" - "$HARNESS_STATE_FILE" "$HARNESS_HOST" <<'NODE'
|
|
385
|
+
const fs = require("fs");
|
|
386
|
+
const [, , file, host] = process.argv;
|
|
387
|
+
try {
|
|
388
|
+
const data = JSON.parse(fs.readFileSync(file, "utf8"));
|
|
389
|
+
const rec = data && data.platforms && data.platforms[host];
|
|
390
|
+
const owned = !!rec && rec.skillsOwner === "plugin";
|
|
391
|
+
const current = ["massa-ai", "bootstrap"];
|
|
392
|
+
const retired = owned && Array.isArray(rec.skills)
|
|
393
|
+
? rec.skills.filter((s) => typeof s === "string" && /^[a-z0-9][a-z0-9-]*$/.test(s) && !current.includes(s))
|
|
394
|
+
: [];
|
|
395
|
+
process.stdout.write([owned ? "plugin" : "none", ...retired].join("\n"));
|
|
396
|
+
} catch {
|
|
397
|
+
process.stdout.write("none");
|
|
398
|
+
}
|
|
399
|
+
NODE
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
# Removes every retired name in a plugin_skills_record output. The subshell
|
|
403
|
+
# body scopes `set -f` and a newline-only IFS, so no name is ever
|
|
404
|
+
# glob-expanded or split on a space.
|
|
405
|
+
remove_retired_skills() (
|
|
406
|
+
set -f
|
|
407
|
+
IFS=$'\n'
|
|
408
|
+
state_retired_skills="$(printf '%s\n' "$1" | sed 1d)"
|
|
409
|
+
for name in $state_retired_skills; do
|
|
410
|
+
rm -rf "$HARNESS_SKILLS_DIR/$name"
|
|
411
|
+
vecho " - removed retired harness skill $HARNESS_SKILLS_DIR/$name"
|
|
412
|
+
done
|
|
413
|
+
)
|
|
414
|
+
|
|
377
415
|
install_bundled_skills() {
|
|
378
416
|
local runner=""
|
|
379
417
|
if command -v node &>/dev/null; then runner="node"
|
|
@@ -389,7 +427,7 @@ install_bundled_skills() {
|
|
|
389
427
|
fi
|
|
390
428
|
|
|
391
429
|
local installed=0 name src dest
|
|
392
|
-
for name in massa-ai
|
|
430
|
+
for name in massa-ai bootstrap; do
|
|
393
431
|
src="$SCRIPT_DIR/skills/$name"
|
|
394
432
|
[[ -d "$src" ]] || continue
|
|
395
433
|
dest="$HARNESS_SKILLS_DIR/$name"
|
|
@@ -404,6 +442,11 @@ install_bundled_skills() {
|
|
|
404
442
|
done
|
|
405
443
|
vecho " + ${installed} harness skills installed to $HARNESS_SKILLS_DIR (plugin-owned)"
|
|
406
444
|
|
|
445
|
+
# C4: retired skills go BEFORE the record is rewritten — the recorded list
|
|
446
|
+
# is the only ownership proof, so a removal that fails (set -e aborts here)
|
|
447
|
+
# leaves it in place for the next run to retry.
|
|
448
|
+
remove_retired_skills "$(plugin_skills_record "$runner")"
|
|
449
|
+
|
|
407
450
|
"$runner" - "$HARNESS_STATE_FILE" "$HARNESS_HOST" "$TARGET" <<'NODE'
|
|
408
451
|
const fs = require("fs");
|
|
409
452
|
const path = require("path");
|
|
@@ -418,7 +461,8 @@ if (typeof data.platforms !== "object" || data.platforms === null || Array.isArr
|
|
|
418
461
|
}
|
|
419
462
|
data.version = 2;
|
|
420
463
|
const prev = data.platforms[host];
|
|
421
|
-
|
|
464
|
+
const current = ["massa-ai", "bootstrap"];
|
|
465
|
+
data.platforms[host] = { root, skillsOwner: "plugin", skills: current };
|
|
422
466
|
// The whole-record replace must not drop fields a previous successful install
|
|
423
467
|
// wrote (R2) — re-attach them. modelProfile (T10, MPS-03 round-trip
|
|
424
468
|
// obligation) is engine-owned; installRoute is installer-owned but written by
|
|
@@ -448,26 +492,16 @@ uninstall_bundled_skills() {
|
|
|
448
492
|
else return 0
|
|
449
493
|
fi
|
|
450
494
|
|
|
451
|
-
#
|
|
452
|
-
#
|
|
453
|
-
local
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
const [, , file, host] = process.argv;
|
|
457
|
-
try {
|
|
458
|
-
const data = JSON.parse(fs.readFileSync(file, "utf8"));
|
|
459
|
-
const rec = data && data.platforms && data.platforms[host];
|
|
460
|
-
process.stdout.write(rec ? String(rec.skillsOwner) : "none");
|
|
461
|
-
} catch {
|
|
462
|
-
process.stdout.write("none");
|
|
463
|
-
}
|
|
464
|
-
NODE
|
|
465
|
-
)"
|
|
466
|
-
[[ "$raw_owner" == "plugin" ]] && {
|
|
495
|
+
# Line 1 of the record is the enumerated owner; uninstall only ever acts on
|
|
496
|
+
# an exact "plugin" record.
|
|
497
|
+
local record
|
|
498
|
+
record="$(plugin_skills_record "$runner")"
|
|
499
|
+
[[ "${record%%$'\n'*}" == "plugin" ]] && {
|
|
467
500
|
local name
|
|
468
|
-
for name in massa-ai
|
|
501
|
+
for name in massa-ai bootstrap; do
|
|
469
502
|
rm -rf "$HARNESS_SKILLS_DIR/$name"
|
|
470
503
|
done
|
|
504
|
+
remove_retired_skills "$record"
|
|
471
505
|
rmdir "$HARNESS_SKILLS_DIR" 2>/dev/null || true
|
|
472
506
|
echo " - removed plugin-owned harness skills from $HARNESS_SKILLS_DIR"
|
|
473
507
|
}
|
|
@@ -678,16 +712,20 @@ apply_recorded_profile_after_update() {
|
|
|
678
712
|
return 0
|
|
679
713
|
fi
|
|
680
714
|
mkdir -p "$install_path/agents"
|
|
681
|
-
for f in "$variant_dir/"
|
|
715
|
+
for f in "$variant_dir/"*.md; do
|
|
682
716
|
[[ -f "$f" ]] || continue
|
|
683
717
|
name="$(basename "$f")"
|
|
718
|
+
if [[ -e "$install_path/agents/$name" || -L "$install_path/agents/$name" ]] && ! is_owned_agent "$install_path/agents/$name"; then
|
|
719
|
+
echo " ⚠ $install_path/agents/$name exists and is not massa-ai-owned — skipped" >&2
|
|
720
|
+
continue
|
|
721
|
+
fi
|
|
684
722
|
cp "$f" "$install_path/agents/$name"
|
|
685
723
|
copied=$((copied + 1))
|
|
686
724
|
done
|
|
687
725
|
if [[ "$copied" -gt 0 ]]; then
|
|
688
726
|
vecho " ↷ re-applied recorded model profile '$profile' (${copied} files) to $install_path/agents"
|
|
689
727
|
else
|
|
690
|
-
vecho " ↷ recorded model profile '$profile' variant directory has no
|
|
728
|
+
vecho " ↷ recorded model profile '$profile' variant directory has no agent files — nothing to re-apply"
|
|
691
729
|
fi
|
|
692
730
|
}
|
|
693
731
|
|
|
@@ -827,13 +865,49 @@ remove_file_route_artifacts() {
|
|
|
827
865
|
done
|
|
828
866
|
fi
|
|
829
867
|
if [[ -d "$TARGET/agents" ]]; then
|
|
830
|
-
for src in "$TARGET/agents/"
|
|
831
|
-
|
|
868
|
+
for src in "$TARGET/agents/"*.md; do
|
|
869
|
+
is_owned_agent "$src" || continue
|
|
832
870
|
rm -f "$src"
|
|
833
871
|
done
|
|
834
872
|
fi
|
|
835
873
|
}
|
|
836
874
|
|
|
875
|
+
# >>> massa-ai agent ownership predicates >>>
|
|
876
|
+
# Byte-identical in every plugin installer and scripts/lib/installer-shared.sh
|
|
877
|
+
# (plugin tarballs cannot source repo-only libs); the TS twin is
|
|
878
|
+
# packages/shared/src/profile-switch/ownership.ts, and
|
|
879
|
+
# scripts/__tests__/agent-ownership-parity.test.ts holds all copies and both
|
|
880
|
+
# languages to identical verdicts. Ownership is a content marker, never a
|
|
881
|
+
# filename; the legacy rule lets an upgrade prune the pre-rename
|
|
882
|
+
# massa-ai-<name> files — exact names only, never an open massa-ai-* glob.
|
|
883
|
+
MASSA_AI_OWNED_MARKER_MD='<!-- massa-ai-owned: true -->'
|
|
884
|
+
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 "
|
|
885
|
+
is_legacy_agent() {
|
|
886
|
+
local b="${1##*/}"
|
|
887
|
+
b="${b%.*}"
|
|
888
|
+
[[ "$b" == massa-ai-* && "$MASSA_AI_LEGACY_AGENT_NAMES" == *" ${b#massa-ai-} "* ]]
|
|
889
|
+
}
|
|
890
|
+
has_owned_marker() {
|
|
891
|
+
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
|
|
892
|
+
}
|
|
893
|
+
is_owned_agent() {
|
|
894
|
+
[[ -f "$1" && ! -L "$1" ]] || return 1
|
|
895
|
+
is_legacy_agent "$1" || has_owned_marker "$1"
|
|
896
|
+
}
|
|
897
|
+
is_owned_agent_toml() {
|
|
898
|
+
[[ -f "$1" && ! -L "$1" ]] || return 1
|
|
899
|
+
[[ "$(head -n1 "$1")" == "# massa-ai-owned" ]]
|
|
900
|
+
}
|
|
901
|
+
is_owned_agent_link() {
|
|
902
|
+
[[ -L "$1" ]] || return 1
|
|
903
|
+
is_legacy_agent "$1" && return 0
|
|
904
|
+
local b="${1##*/}" t
|
|
905
|
+
t="$(readlink "$1")"
|
|
906
|
+
[[ "$t" == */opencode-plugin/agents/"$b" || "$t" == */plugins/massa-ai/agent-profiles/*/"$b" ]] && return 0
|
|
907
|
+
[[ -f "$1" ]] && has_owned_marker "$1"
|
|
908
|
+
}
|
|
909
|
+
# <<< massa-ai agent ownership predicates <<<
|
|
910
|
+
|
|
837
911
|
# ── Uninstall ───────────────────────────────────────────────────────────────
|
|
838
912
|
if [[ "$UNINSTALL" -eq 1 ]]; then
|
|
839
913
|
echo "Uninstalling massa-ai Claude Code plugin (scope: $SCOPE)..."
|
|
@@ -856,15 +930,15 @@ if [[ "$UNINSTALL" -eq 1 ]]; then
|
|
|
856
930
|
done
|
|
857
931
|
echo " - removed massa-ai-* commands from $TARGET/commands/"
|
|
858
932
|
fi
|
|
859
|
-
# Remove every massa-ai-owned subagent specialist
|
|
860
|
-
#
|
|
861
|
-
#
|
|
933
|
+
# Remove every massa-ai-owned subagent specialist: the body marker, or a
|
|
934
|
+
# legacy massa-ai-<name> file (is_owned_agent). A user's own agent, even
|
|
935
|
+
# one named like a massa-ai agent, is untouched.
|
|
862
936
|
if [[ -d "$TARGET/agents" ]]; then
|
|
863
|
-
for src in "$TARGET/agents/"
|
|
864
|
-
|
|
937
|
+
for src in "$TARGET/agents/"*.md; do
|
|
938
|
+
is_owned_agent "$src" || continue
|
|
865
939
|
rm -f "$src"
|
|
866
940
|
done
|
|
867
|
-
echo " - removed massa-ai
|
|
941
|
+
echo " - removed massa-ai-owned subagent specialists from $TARGET/agents/"
|
|
868
942
|
fi
|
|
869
943
|
echo ""
|
|
870
944
|
echo "Done. User hooks, keys, and non-massa-ai agents preserved."
|
|
@@ -892,7 +966,7 @@ if [[ "$PLUGIN_ROUTE" -eq 1 ]]; then
|
|
|
892
966
|
for src in "$SCRIPT_DIR/commands/"*.md; do
|
|
893
967
|
[[ -f "$src" ]] && command_count=$((command_count + 1))
|
|
894
968
|
done
|
|
895
|
-
for src in "$SCRIPT_DIR/agents/"
|
|
969
|
+
for src in "$SCRIPT_DIR/agents/"*.md; do
|
|
896
970
|
[[ -f "$src" ]] && specialist_count=$((specialist_count + 1))
|
|
897
971
|
done
|
|
898
972
|
remove_file_route_artifacts
|
|
@@ -925,8 +999,8 @@ else
|
|
|
925
999
|
vecho " - removed retired command $(basename "$f")"
|
|
926
1000
|
done
|
|
927
1001
|
|
|
928
|
-
# Subagent specialists (generated from skills/agents/*/SKILL.md
|
|
929
|
-
#
|
|
1002
|
+
# Subagent specialists (generated from skills/agents/*/SKILL.md). Each carries the body ownership marker used by prune and
|
|
1003
|
+
# uninstall; a same-named file the user owns is skipped, never overwritten.
|
|
930
1004
|
#
|
|
931
1005
|
# Model-profile re-apply (T8, MPS-04): if a switch previously recorded a
|
|
932
1006
|
# profile for this host, and the bundle ships that profile's variant, the
|
|
@@ -951,9 +1025,13 @@ else
|
|
|
951
1025
|
fi
|
|
952
1026
|
fi
|
|
953
1027
|
|
|
954
|
-
for src in "$ACTIVE_AGENTS_SRC/"
|
|
1028
|
+
for src in "$ACTIVE_AGENTS_SRC/"*.md; do
|
|
955
1029
|
[[ -f "$src" ]] || continue
|
|
956
1030
|
name="$(basename "$src")"
|
|
1031
|
+
if [[ -e "$TARGET/agents/$name" || -L "$TARGET/agents/$name" ]] && ! is_owned_agent "$TARGET/agents/$name"; then
|
|
1032
|
+
echo " ⚠ $TARGET/agents/$name exists and is not massa-ai-owned — skipped" >&2
|
|
1033
|
+
continue
|
|
1034
|
+
fi
|
|
957
1035
|
cp "$src" "$TARGET/agents/$name"
|
|
958
1036
|
vecho " + $name"
|
|
959
1037
|
specialist_count=$((specialist_count + 1))
|
|
@@ -966,10 +1044,10 @@ else
|
|
|
966
1044
|
# model-profile variant) no longer ships. Never prune-then-copy — an
|
|
967
1045
|
# interrupted run must never leave the user with fewer agents than before.
|
|
968
1046
|
# Removal population is the destination directory (D2); ownership test is
|
|
969
|
-
#
|
|
970
|
-
for f in "$TARGET/agents/"
|
|
971
|
-
[[ -f "$f" ]] || continue
|
|
1047
|
+
# is_owned_agent — so legacy massa-ai-<name> files are pruned on upgrade.
|
|
1048
|
+
for f in "$TARGET/agents/"*.md; do
|
|
972
1049
|
[[ -f "$ACTIVE_AGENTS_SRC/$(basename "$f")" ]] && continue
|
|
1050
|
+
is_owned_agent "$f" || continue
|
|
973
1051
|
rm -f "$f"
|
|
974
1052
|
vecho " - removed retired specialist $(basename "$f")"
|
|
975
1053
|
done
|
|
@@ -977,7 +1055,7 @@ else
|
|
|
977
1055
|
install_variant_tree
|
|
978
1056
|
fi
|
|
979
1057
|
|
|
980
|
-
# Skills bundling (PDO-08, 09): install massa-ai/
|
|
1058
|
+
# Skills bundling (PDO-08, 09): install massa-ai/bootstrap into the
|
|
981
1059
|
# shared harness skills directory, unless scripts/install-skills.sh already
|
|
982
1060
|
# owns it for this platform.
|
|
983
1061
|
vecho ""
|
package/package.json
CHANGED
|
@@ -0,0 +1,93 @@
|
|
|
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. 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 `trace`; a missing `mode` defaults to `trace`.
|
|
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`: `trace` (the sole mode, and the default when `mode` is omitted).
|
|
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: `trace`
|
|
47
|
+
Index-first answer for a single orientation question, and source-first investigation for work that spans files or modules, or when the index is absent or stale.
|
|
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, plus files and symbols inspected
|
|
58
|
+
- Evidence: `path:line` pointers, command results, source locations
|
|
59
|
+
- Findings: a compact, cited answer, self-contained because it is the sole result the parent sees; architecture summary, flow trace, dependency map, impact estimate
|
|
60
|
+
- Risks and skipped checks: index staleness, zero-result searches, unresolved symbols
|
|
61
|
+
- Exact next step
|
|
62
|
+
|
|
63
|
+
## Invocation
|
|
64
|
+
### Use when
|
|
65
|
+
- A workflow needs to understand existing code before planning or implementing.
|
|
66
|
+
- The question is "where is X", "how does Y work", "who calls Z", or any orientation question about an indexed codebase.
|
|
67
|
+
- The scope touches >10 files, >500 LOC, or >2 modules, or the user asks for investigation or impact analysis.
|
|
68
|
+
- Verbose investigation would exceed Context Firewall thresholds.
|
|
69
|
+
|
|
70
|
+
### Do not use when
|
|
71
|
+
- The answer is a one-liner already in context.
|
|
72
|
+
- The task needs code changes, review, or planning.
|
|
73
|
+
- The task needs unresolved user intent.
|
|
74
|
+
- The work is tightly coupled without a clear owner.
|
|
75
|
+
|
|
76
|
+
## massa-ai Integration
|
|
77
|
+
- Retrieval order: `list_projects` freshness -> `project_map` -> `search(summary)` -> `search(enriched)` -> symbol tools -> `read_file` -> focused shell fallback.
|
|
78
|
+
- 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.
|
|
79
|
+
- 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.
|
|
80
|
+
- Context Firewall: summarize search output, logs, and source reads; return only `path:line` pointers and findings.
|
|
81
|
+
- Verification Ladder: static checks (grep, search) and file-integrity; no behavioral changes.
|
|
82
|
+
- Massa-ai Memory: suggest durable navigation, architecture, or dependency facts only when reusable; the main agent persists.
|
|
83
|
+
- Synapse: own ephemeral session per `references/synapse-policy.md`; pass `synapseSessionId` on every `search`.
|
|
84
|
+
- 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`.
|
|
85
|
+
|
|
86
|
+
## Validation Sensors
|
|
87
|
+
- Every claim carries a `path:line` or symbol pointer.
|
|
88
|
+
- Index-derived claims carry freshness evidence, or are labeled reduced-confidence.
|
|
89
|
+
- Dependency references confirmed via `get_references` or equivalent.
|
|
90
|
+
- No files modified (read-only enforced).
|
|
91
|
+
|
|
92
|
+
## Memory Boundary
|
|
93
|
+
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,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-reviewer
|
|
3
|
+
description: Read-only verification and audit agent. 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, performance, or diff lens — diff review after a senior-engineer completes a task and before the verification gate. 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: verify that a task meets its acceptance criteria, or audit a target through one lens — including a diff review via the `diff` lens — 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: `verify` or `audit`.
|
|
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); `audit` mode writes nothing.
|
|
25
|
+
- Missing or unknown `mode` (or, in `audit` mode, a missing or unknown `lens`): return `Blocked` naming the valid modes `verify`, `audit` (and lenses `bugs`, `architecture`, `security`, `code-quality`, `performance`, `diff`).
|
|
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`: `verify` | `audit` (required).
|
|
32
|
+
- `lens`: `audit` mode only — one of `bugs | architecture | security | code-quality | performance | diff` (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: `verify`
|
|
41
|
+
Independent verification (author ≠ verifier): the mandatory final gate before a task or finding is claimed complete.
|
|
42
|
+
|
|
43
|
+
- Validate outputs against the acceptance criteria.
|
|
44
|
+
- Choose the verification level (static, file-integrity, behavioral, higher-order), cheapest sufficient evidence first.
|
|
45
|
+
- Execute the verification checklist and detect incomplete work.
|
|
46
|
+
- 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.
|
|
47
|
+
- Confirm validation assets (tests, specs, fixtures) were not weakened.
|
|
48
|
+
- A docs-only task with no behavioral sensors is verified at the file-integrity level only.
|
|
49
|
+
|
|
50
|
+
Output:
|
|
51
|
+
- Status: Complete | Partial | Blocked
|
|
52
|
+
- Scope: files and criteria checked
|
|
53
|
+
- Evidence: command results, artifact inspection, source locations
|
|
54
|
+
- Findings: PASS/FAIL per criterion, gap list, and the highest ladder level reached
|
|
55
|
+
- Risks and skipped checks (with reasons)
|
|
56
|
+
- Exact next step
|
|
57
|
+
|
|
58
|
+
### Mode: `audit`
|
|
59
|
+
Findings-only audit through one lens.
|
|
60
|
+
|
|
61
|
+
| Lens | Focus | Per-lens references |
|
|
62
|
+
|---|---|---|
|
|
63
|
+
| `bugs` | Bug discovery: null paths, error handling, race conditions, logic errors | `workflows/bugs/bugs-audit.md` |
|
|
64
|
+
| `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` |
|
|
65
|
+
| `security` | Security, privacy, auth, validation, secret handling | `workflows/security/security-audit.md` |
|
|
66
|
+
| `code-quality` | SOLID, Clean Code, KISS, YAGNI, DRY, maintainability | `workflows/code-quality/code-quality-audit.md` |
|
|
67
|
+
| `performance` | Performance hotspots, allocation, latency, throughput | Domain-specific; no fixed reference |
|
|
68
|
+
| `diff` | Correctness bugs, regressions against existing behavior, code smells, maintainability issues, missing edge cases introduced by a diff | No fixed reference |
|
|
69
|
+
|
|
70
|
+
`bugs`, `architecture`, `security`, `code-quality`, and `performance` share `references/audit-scope.md` (scope rules) and `references/audit-report-io.md` (report format); their findings follow the project audit-report format. `diff` findings are ranked and marked blocking vs advisory, and are returned in chat with no saved report — the diff review after a senior-engineer completes a task and before the verification gate. No fix actions are taken in any lens.
|
|
71
|
+
|
|
72
|
+
Output:
|
|
73
|
+
- Status: Complete | Partial | Blocked
|
|
74
|
+
- Scope: area audited + lens used (for `diff`, the files and lines reviewed)
|
|
75
|
+
- Evidence: `path:line` pointers, static-check results, source locations
|
|
76
|
+
- Findings: ranked list (severity, location, problem, suggestion) — project audit-report format for `bugs`/`architecture`/`security`/`code-quality`/`performance`; for `diff`, ranked list of issues (severity, location, problem, fix), marked blocking vs advisory, returned in chat with no saved report
|
|
77
|
+
- Risks and skipped checks
|
|
78
|
+
- Exact next step
|
|
79
|
+
|
|
80
|
+
## Invocation
|
|
81
|
+
### Use when
|
|
82
|
+
- A senior-engineer has completed a task and the workflow needs a diff review, or a PR or branch needs review before merge (`audit`, `lens: diff`).
|
|
83
|
+
- The mandatory verification gate must run, or the workflow needs author ≠ verifier verification (`verify`).
|
|
84
|
+
- A workflow needs a findings-only audit through any lens, including architecture guidance, or a high/critical finding needs independent verification (`audit`).
|
|
85
|
+
|
|
86
|
+
### Do not use when
|
|
87
|
+
- No diff, implementation, or concrete target exists yet.
|
|
88
|
+
- `lens: architecture` only: the work is a single-file fix with no architectural surface.
|
|
89
|
+
- The task needs a fix (route to the matching `*-fix` workflow or `senior-engineer`).
|
|
90
|
+
- The lens is ambiguous (ask the user to pick one), or it is the `requirements` or `tests` lens.
|
|
91
|
+
|
|
92
|
+
## massa-ai Integration
|
|
93
|
+
- Context Firewall: summarize diffs, command output, and source reads; return findings and PASS/FAIL evidence, not raw diffs or logs.
|
|
94
|
+
- 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`.
|
|
95
|
+
- 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.
|
|
96
|
+
- Synapse: own ephemeral session when an audit pass spans multiple modules with repeated searches.
|
|
97
|
+
- 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`, plus the per-lens references above.
|
|
98
|
+
|
|
99
|
+
## Validation Sensors
|
|
100
|
+
- Every finding has a `path:line` or metric pointer.
|
|
101
|
+
- `audit`: static checks (lint, typecheck) run when available; findings cite source evidence, not opinion; findings follow `references/audit-report-io.md` for `bugs`/`architecture`/`security`/`code-quality`/`performance`, severity follows the lens rubric, no fix actions taken; `diff` findings are ranked and marked blocking vs advisory.
|
|
102
|
+
- `verify`: every acceptance criterion has a PASS/FAIL verdict with evidence; skipped checks have a concrete reason; the highest ladder level reached is reported.
|
|
103
|
+
- No files modified outside the `verify` carve-out: `audit` writes nothing; `verify` writes only the feature's `validation.md` and scratch mutation state outside the real working tree.
|
|
104
|
+
|
|
105
|
+
## Memory Boundary
|
|
106
|
+
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`).
|