@massa-ai/cursor-plugin 1.60.0 → 1.61.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 (36) hide show
  1. package/.cursor-plugin/plugin.json +1 -1
  2. package/agent-profiles/balanced/massa-ai-judge.md +3 -3
  3. package/agent-profiles/balanced/massa-ai-meta-judge.md +3 -2
  4. package/agent-profiles/cheap/massa-ai-judge.md +3 -3
  5. package/agent-profiles/cheap/massa-ai-meta-judge.md +3 -2
  6. package/agent-profiles/heavy/massa-ai-judge.md +3 -3
  7. package/agent-profiles/heavy/massa-ai-meta-judge.md +3 -2
  8. package/agent-profiles/home/massa-ai-judge.md +3 -3
  9. package/agent-profiles/home/massa-ai-meta-judge.md +3 -2
  10. package/agent-profiles/work/massa-ai-judge.md +3 -3
  11. package/agent-profiles/work/massa-ai-meta-judge.md +3 -2
  12. package/agents/massa-ai-judge.md +3 -3
  13. package/agents/massa-ai-meta-judge.md +3 -2
  14. package/hooks/massa-ai-hook +98 -0
  15. package/package.json +1 -1
  16. package/skills/agents/architecture-specialist/SKILL.md +0 -1
  17. package/skills/agents/audit-specialist/SKILL.md +0 -1
  18. package/skills/agents/builder/SKILL.md +0 -1
  19. package/skills/agents/context-curator/SKILL.md +0 -1
  20. package/skills/agents/designer/SKILL.md +0 -1
  21. package/skills/agents/documentation-agent/SKILL.md +0 -1
  22. package/skills/agents/furps-analyst/SKILL.md +0 -1
  23. package/skills/agents/investigator/SKILL.md +0 -1
  24. package/skills/agents/judge/SKILL.md +3 -4
  25. package/skills/agents/meta-judge/SKILL.md +3 -3
  26. package/skills/agents/mobile-specialist/SKILL.md +0 -1
  27. package/skills/agents/navigator/SKILL.md +0 -1
  28. package/skills/agents/plan-critic/SKILL.md +0 -1
  29. package/skills/agents/planner/SKILL.md +0 -1
  30. package/skills/agents/requirements-analyst/SKILL.md +0 -1
  31. package/skills/agents/reviewer/SKILL.md +0 -1
  32. package/skills/agents/test-engineer/SKILL.md +0 -1
  33. package/skills/agents/verification-agent/SKILL.md +0 -1
  34. package/skills/massa-ai/references/agent-orchestration.md +13 -14
  35. package/skills/massa-ai/references/spec-driven/sub-agents.md +3 -3
  36. package/skills/massa-ai/references/synapse-policy.md +2 -2
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "massa-ai",
3
- "version": "1.60.0",
3
+ "version": "1.61.0",
4
4
  "description": "massa-ai — semantic code search, memory, and context compression for Cursor"
5
5
  }
@@ -77,9 +77,9 @@ next_step: <string>
77
77
  - References (paths relative to the `massa-ai` skill directory): `references/agent-orchestration.md`, `references/audit-report-io.md` (Judge With Debate Report Contracts).
78
78
 
79
79
  ## Model Hint
80
- See `references/agent-orchestration.md` (Model Diversity Fallback): `metadata.model_tier`
81
- (`deep`) is the per-slot fallback; `workflows/judge-with-debate.md` owns the live slot
82
- assignments.
80
+ See `references/agent-orchestration.md` (Model Diversity Fallback): `judge` carries no
81
+ per-agent override in `skills/model-profiles.json`, so the active profile's host default is
82
+ the per-slot fallback; `workflows/judge-with-debate.md` owns the live slot assignments.
83
83
 
84
84
  ## Validation Sensors
85
85
  - Every criterion score carries an exact quotation from the artifact.
@@ -69,8 +69,9 @@ overall: weighted-mean
69
69
  - References (paths relative to the `massa-ai` skill directory): `references/agent-orchestration.md`, `references/audit-report-io.md` (Judge With Debate Report Contracts).
70
70
 
71
71
  ## Model Hint
72
- See `references/agent-orchestration.md` (Model Diversity Fallback): `metadata.model_tier`
73
- (`deep`) is the fallback; `workflows/judge-with-debate.md` owns the live model assignment.
72
+ See `references/agent-orchestration.md` (Model Diversity Fallback): `meta-judge` carries no
73
+ per-agent override in `skills/model-profiles.json`, so the active profile's host default is
74
+ the fallback; `workflows/judge-with-debate.md` owns the live model assignment.
74
75
 
75
76
  ## Validation Sensors
76
77
  - Output parses as YAML; weights sum to 1.0 (±0.001); every criterion carries id, name, weight, scale (min 1, max 5), rubric anchors for 1/3/5, and a non-empty checklist.
@@ -77,9 +77,9 @@ next_step: <string>
77
77
  - References (paths relative to the `massa-ai` skill directory): `references/agent-orchestration.md`, `references/audit-report-io.md` (Judge With Debate Report Contracts).
78
78
 
79
79
  ## Model Hint
80
- See `references/agent-orchestration.md` (Model Diversity Fallback): `metadata.model_tier`
81
- (`deep`) is the per-slot fallback; `workflows/judge-with-debate.md` owns the live slot
82
- assignments.
80
+ See `references/agent-orchestration.md` (Model Diversity Fallback): `judge` carries no
81
+ per-agent override in `skills/model-profiles.json`, so the active profile's host default is
82
+ the per-slot fallback; `workflows/judge-with-debate.md` owns the live slot assignments.
83
83
 
84
84
  ## Validation Sensors
85
85
  - Every criterion score carries an exact quotation from the artifact.
@@ -69,8 +69,9 @@ overall: weighted-mean
69
69
  - References (paths relative to the `massa-ai` skill directory): `references/agent-orchestration.md`, `references/audit-report-io.md` (Judge With Debate Report Contracts).
70
70
 
71
71
  ## Model Hint
72
- See `references/agent-orchestration.md` (Model Diversity Fallback): `metadata.model_tier`
73
- (`deep`) is the fallback; `workflows/judge-with-debate.md` owns the live model assignment.
72
+ See `references/agent-orchestration.md` (Model Diversity Fallback): `meta-judge` carries no
73
+ per-agent override in `skills/model-profiles.json`, so the active profile's host default is
74
+ the fallback; `workflows/judge-with-debate.md` owns the live model assignment.
74
75
 
75
76
  ## Validation Sensors
76
77
  - Output parses as YAML; weights sum to 1.0 (±0.001); every criterion carries id, name, weight, scale (min 1, max 5), rubric anchors for 1/3/5, and a non-empty checklist.
@@ -77,9 +77,9 @@ next_step: <string>
77
77
  - References (paths relative to the `massa-ai` skill directory): `references/agent-orchestration.md`, `references/audit-report-io.md` (Judge With Debate Report Contracts).
78
78
 
79
79
  ## Model Hint
80
- See `references/agent-orchestration.md` (Model Diversity Fallback): `metadata.model_tier`
81
- (`deep`) is the per-slot fallback; `workflows/judge-with-debate.md` owns the live slot
82
- assignments.
80
+ See `references/agent-orchestration.md` (Model Diversity Fallback): `judge` carries no
81
+ per-agent override in `skills/model-profiles.json`, so the active profile's host default is
82
+ the per-slot fallback; `workflows/judge-with-debate.md` owns the live slot assignments.
83
83
 
84
84
  ## Validation Sensors
85
85
  - Every criterion score carries an exact quotation from the artifact.
@@ -69,8 +69,9 @@ overall: weighted-mean
69
69
  - References (paths relative to the `massa-ai` skill directory): `references/agent-orchestration.md`, `references/audit-report-io.md` (Judge With Debate Report Contracts).
70
70
 
71
71
  ## Model Hint
72
- See `references/agent-orchestration.md` (Model Diversity Fallback): `metadata.model_tier`
73
- (`deep`) is the fallback; `workflows/judge-with-debate.md` owns the live model assignment.
72
+ See `references/agent-orchestration.md` (Model Diversity Fallback): `meta-judge` carries no
73
+ per-agent override in `skills/model-profiles.json`, so the active profile's host default is
74
+ the fallback; `workflows/judge-with-debate.md` owns the live model assignment.
74
75
 
75
76
  ## Validation Sensors
76
77
  - Output parses as YAML; weights sum to 1.0 (±0.001); every criterion carries id, name, weight, scale (min 1, max 5), rubric anchors for 1/3/5, and a non-empty checklist.
@@ -77,9 +77,9 @@ next_step: <string>
77
77
  - References (paths relative to the `massa-ai` skill directory): `references/agent-orchestration.md`, `references/audit-report-io.md` (Judge With Debate Report Contracts).
78
78
 
79
79
  ## Model Hint
80
- See `references/agent-orchestration.md` (Model Diversity Fallback): `metadata.model_tier`
81
- (`deep`) is the per-slot fallback; `workflows/judge-with-debate.md` owns the live slot
82
- assignments.
80
+ See `references/agent-orchestration.md` (Model Diversity Fallback): `judge` carries no
81
+ per-agent override in `skills/model-profiles.json`, so the active profile's host default is
82
+ the per-slot fallback; `workflows/judge-with-debate.md` owns the live slot assignments.
83
83
 
84
84
  ## Validation Sensors
85
85
  - Every criterion score carries an exact quotation from the artifact.
@@ -69,8 +69,9 @@ overall: weighted-mean
69
69
  - References (paths relative to the `massa-ai` skill directory): `references/agent-orchestration.md`, `references/audit-report-io.md` (Judge With Debate Report Contracts).
70
70
 
71
71
  ## Model Hint
72
- See `references/agent-orchestration.md` (Model Diversity Fallback): `metadata.model_tier`
73
- (`deep`) is the fallback; `workflows/judge-with-debate.md` owns the live model assignment.
72
+ See `references/agent-orchestration.md` (Model Diversity Fallback): `meta-judge` carries no
73
+ per-agent override in `skills/model-profiles.json`, so the active profile's host default is
74
+ the fallback; `workflows/judge-with-debate.md` owns the live model assignment.
74
75
 
75
76
  ## Validation Sensors
76
77
  - Output parses as YAML; weights sum to 1.0 (±0.001); every criterion carries id, name, weight, scale (min 1, max 5), rubric anchors for 1/3/5, and a non-empty checklist.
@@ -77,9 +77,9 @@ next_step: <string>
77
77
  - References (paths relative to the `massa-ai` skill directory): `references/agent-orchestration.md`, `references/audit-report-io.md` (Judge With Debate Report Contracts).
78
78
 
79
79
  ## Model Hint
80
- See `references/agent-orchestration.md` (Model Diversity Fallback): `metadata.model_tier`
81
- (`deep`) is the per-slot fallback; `workflows/judge-with-debate.md` owns the live slot
82
- assignments.
80
+ See `references/agent-orchestration.md` (Model Diversity Fallback): `judge` carries no
81
+ per-agent override in `skills/model-profiles.json`, so the active profile's host default is
82
+ the per-slot fallback; `workflows/judge-with-debate.md` owns the live slot assignments.
83
83
 
84
84
  ## Validation Sensors
85
85
  - Every criterion score carries an exact quotation from the artifact.
@@ -69,8 +69,9 @@ overall: weighted-mean
69
69
  - References (paths relative to the `massa-ai` skill directory): `references/agent-orchestration.md`, `references/audit-report-io.md` (Judge With Debate Report Contracts).
70
70
 
71
71
  ## Model Hint
72
- See `references/agent-orchestration.md` (Model Diversity Fallback): `metadata.model_tier`
73
- (`deep`) is the fallback; `workflows/judge-with-debate.md` owns the live model assignment.
72
+ See `references/agent-orchestration.md` (Model Diversity Fallback): `meta-judge` carries no
73
+ per-agent override in `skills/model-profiles.json`, so the active profile's host default is
74
+ the fallback; `workflows/judge-with-debate.md` owns the live model assignment.
74
75
 
75
76
  ## Validation Sensors
76
77
  - Output parses as YAML; weights sum to 1.0 (±0.001); every criterion carries id, name, weight, scale (min 1, max 5), rubric anchors for 1/3/5, and a non-empty checklist.
@@ -77,9 +77,9 @@ next_step: <string>
77
77
  - References (paths relative to the `massa-ai` skill directory): `references/agent-orchestration.md`, `references/audit-report-io.md` (Judge With Debate Report Contracts).
78
78
 
79
79
  ## Model Hint
80
- See `references/agent-orchestration.md` (Model Diversity Fallback): `metadata.model_tier`
81
- (`deep`) is the per-slot fallback; `workflows/judge-with-debate.md` owns the live slot
82
- assignments.
80
+ See `references/agent-orchestration.md` (Model Diversity Fallback): `judge` carries no
81
+ per-agent override in `skills/model-profiles.json`, so the active profile's host default is
82
+ the per-slot fallback; `workflows/judge-with-debate.md` owns the live slot assignments.
83
83
 
84
84
  ## Validation Sensors
85
85
  - Every criterion score carries an exact quotation from the artifact.
@@ -69,8 +69,9 @@ overall: weighted-mean
69
69
  - References (paths relative to the `massa-ai` skill directory): `references/agent-orchestration.md`, `references/audit-report-io.md` (Judge With Debate Report Contracts).
70
70
 
71
71
  ## Model Hint
72
- See `references/agent-orchestration.md` (Model Diversity Fallback): `metadata.model_tier`
73
- (`deep`) is the fallback; `workflows/judge-with-debate.md` owns the live model assignment.
72
+ See `references/agent-orchestration.md` (Model Diversity Fallback): `meta-judge` carries no
73
+ per-agent override in `skills/model-profiles.json`, so the active profile's host default is
74
+ the fallback; `workflows/judge-with-debate.md` owns the live model assignment.
74
75
 
75
76
  ## Validation Sensors
76
77
  - Output parses as YAML; weights sum to 1.0 (±0.001); every criterion carries id, name, weight, scale (min 1, max 5), rubric anchors for 1/3/5, and a non-empty checklist.
@@ -187,6 +187,93 @@ export function resolveHookApiKey(): string {
187
187
  return "";
188
188
  }
189
189
 
190
+ // ── Session-start drift line (agent-runtime-drift T06) ─────────────────────
191
+
192
+ /** Same XDG resolution as getHookConfigPath — duplicated for the same
193
+ * dependency-freeze reason, pinned by tests on both sides. */
194
+ export function getInstallStatePath(): string {
195
+ const xdg = process.env.XDG_CONFIG_HOME;
196
+ const base = xdg && xdg.trim() ? xdg : path.join(homedir(), ".config");
197
+ return path.join(base, "massa-ai", "install-state.json");
198
+ }
199
+
200
+ function readJsonAt(filePath: string): Record<string, unknown> | null {
201
+ try {
202
+ const parsed = JSON.parse(readFileSync(filePath, "utf8"));
203
+ return parsed && typeof parsed === "object" && !Array.isArray(parsed)
204
+ ? (parsed as Record<string, unknown>)
205
+ : null;
206
+ } catch {
207
+ return null;
208
+ }
209
+ }
210
+
211
+ /**
212
+ * Pinned one-key read (`^model:`) — deliberately NOT the shared frontmatter
213
+ * parser: this binary's dependency freeze (see getHookConfigPath) forbids
214
+ * importing @massa-ai/shared. The cross-side test pins this regex against the
215
+ * shared parser's output (spec INV B3), so the writer and this reader cannot
216
+ * silently disagree about what `model:` means.
217
+ */
218
+ function readModelLine(filePath: string): string | null {
219
+ try {
220
+ const match = /^model:\s*(.+)\r?$/m.exec(readFileSync(filePath, "utf8"));
221
+ const value = match?.[1]?.trim();
222
+ return value ? value.replace(/^["']|["']$/g, "") : null;
223
+ } catch {
224
+ return null;
225
+ }
226
+ }
227
+
228
+ /**
229
+ * The ≤2-line session-start drift report (agent-runtime-drift): version
230
+ * drift (live bundle vs recorded state), agent drift (active investigator
231
+ * model vs the recorded profile's variant), and the host env override that
232
+ * nullifies every per-agent model at runtime. Null when every recording
233
+ * agrees — silent when healthy. Read-only (INV5); every failure degrades to
234
+ * fewer lines, never a throw. The fix path is the existing profile switch,
235
+ * never the hook.
236
+ */
237
+ export function buildSessionStartDoctorLine(
238
+ pluginRoot: string,
239
+ env: Readonly<Record<string, string | undefined>>,
240
+ ): string | null {
241
+ const lines: string[] = [];
242
+
243
+ const sourceVersion = readJsonAt(path.join(pluginRoot, ".claude-plugin", "plugin.json"))?.version;
244
+ const state = readJsonAt(getInstallStatePath());
245
+ const platforms = state?.platforms as Record<string, Record<string, unknown>> | undefined;
246
+ const claude = platforms?.claude;
247
+ const stateVersion = claude?.plugin?.version;
248
+ if (typeof sourceVersion === "string" && typeof stateVersion === "string" && sourceVersion !== stateVersion) {
249
+ lines.push(
250
+ `[massa-ai] version drift: live bundle ${sourceVersion} vs recorded ${stateVersion} — update the plugin or re-run the installer`,
251
+ );
252
+ }
253
+
254
+ const profile = claude?.modelProfile?.profile;
255
+ if (typeof profile === "string" && profile) {
256
+ const activeModel = readModelLine(path.join(pluginRoot, "agents", "massa-ai-investigator.md"));
257
+ const variantModel = readModelLine(
258
+ path.join(pluginRoot, "agent-profiles", profile, "massa-ai-investigator.md"),
259
+ );
260
+ if (activeModel && variantModel && activeModel !== variantModel) {
261
+ lines.push(
262
+ `[massa-ai] agent drift: investigator ${activeModel} vs ${profile} variant ${variantModel} — re-run the profile switch`,
263
+ );
264
+ }
265
+ }
266
+
267
+ const override = env.CLAUDE_CODE_SUBAGENT_MODEL;
268
+ if (typeof override === "string" && override.trim()) {
269
+ lines.push(
270
+ `[massa-ai] CLAUDE_CODE_SUBAGENT_MODEL=${override.trim()} overrides every per-agent model at runtime`,
271
+ );
272
+ }
273
+
274
+ return lines.length ? lines.slice(0, 2).join("\n") : null;
275
+ }
276
+
190
277
  // ── POST helper ─────────────────────────────────────────────────────────────
191
278
 
192
279
  export function postObservation(
@@ -299,6 +386,17 @@ export async function main(stdinInput?: string): Promise<void> {
299
386
 
300
387
  const projectId = resolveProjectId(sessionId, cwd);
301
388
 
389
+ // agent-runtime-drift (T06): session-start prints a bounded drift line when
390
+ // the recordings disagree (read-only, silent when healthy — INV5).
391
+ if (subcommand === "session-start") {
392
+ try {
393
+ const doctorLine = buildSessionStartDoctorLine(path.resolve(import.meta.dirname, ".."), process.env);
394
+ if (doctorLine) process.stdout.write(doctorLine + "\n");
395
+ } catch {
396
+ // silent-degrade: drift reporting must never block the agent
397
+ }
398
+ }
399
+
302
400
  const baseUrl = process.env.MASSA_AI_API_BASE || "http://localhost:3333";
303
401
  const hookUrl = `${baseUrl}/api/v1/hook`;
304
402
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@massa-ai/cursor-plugin",
3
- "version": "1.60.0",
3
+ "version": "1.61.0",
4
4
  "description": "massa-ai plugin for Cursor — semantic code search, memory, and context compression",
5
5
  "files": [
6
6
  "agents",
@@ -5,7 +5,6 @@ license: MIT
5
5
  metadata:
6
6
  author: Luiz Massa
7
7
  version: "1.0.0"
8
- model_tier: deep
9
8
  permission: read-only
10
9
  ---
11
10
 
@@ -5,7 +5,6 @@ license: MIT
5
5
  metadata:
6
6
  author: Luiz Massa
7
7
  version: "1.0.0"
8
- model_tier: deep
9
8
  permission: read-only
10
9
  ---
11
10
 
@@ -5,7 +5,6 @@ license: MIT
5
5
  metadata:
6
6
  author: Luiz Massa
7
7
  version: "1.0.0"
8
- model_tier: standard
9
8
  permission: write
10
9
  ---
11
10
 
@@ -5,7 +5,6 @@ license: MIT
5
5
  metadata:
6
6
  author: Luiz Massa
7
7
  version: "1.0.0"
8
- model_tier: deep
9
8
  permission: read-only
10
9
  ---
11
10
 
@@ -5,7 +5,6 @@ license: MIT
5
5
  metadata:
6
6
  author: Luiz Massa
7
7
  version: "1.0.0"
8
- model_tier: standard
9
8
  permission: write
10
9
  ---
11
10
 
@@ -5,7 +5,6 @@ license: MIT
5
5
  metadata:
6
6
  author: Luiz Massa
7
7
  version: "1.0.0"
8
- model_tier: light
9
8
  permission: write
10
9
  ---
11
10
 
@@ -5,7 +5,6 @@ license: MIT
5
5
  metadata:
6
6
  author: Luiz Massa
7
7
  version: "1.0.0"
8
- model_tier: deep
9
8
  permission: read-only
10
9
  ---
11
10
 
@@ -5,7 +5,6 @@ license: MIT
5
5
  metadata:
6
6
  author: Luiz Massa
7
7
  version: "1.0.0"
8
- model_tier: deep
9
8
  permission: read-only
10
9
  ---
11
10
 
@@ -5,7 +5,6 @@ license: MIT
5
5
  metadata:
6
6
  author: Luiz Massa
7
7
  version: "1.2.0"
8
- model_tier: deep
9
8
  permission: write
10
9
  ---
11
10
 
@@ -83,9 +82,9 @@ next_step: <string>
83
82
  - References (paths relative to the `massa-ai` skill directory): `references/agent-orchestration.md`, `references/audit-report-io.md` (Judge With Debate Report Contracts).
84
83
 
85
84
  ## Model Hint
86
- See `references/agent-orchestration.md` (Model Diversity Fallback): `metadata.model_tier`
87
- (`deep`) is the per-slot fallback; `workflows/judge-with-debate.md` owns the live slot
88
- assignments.
85
+ See `references/agent-orchestration.md` (Model Diversity Fallback): `judge` carries no
86
+ per-agent override in `skills/model-profiles.json`, so the active profile's host default is
87
+ the per-slot fallback; `workflows/judge-with-debate.md` owns the live slot assignments.
89
88
 
90
89
  ## Validation Sensors
91
90
  - Every criterion score carries an exact quotation from the artifact.
@@ -5,7 +5,6 @@ license: MIT
5
5
  metadata:
6
6
  author: Luiz Massa
7
7
  version: "1.1.0"
8
- model_tier: deep
9
8
  permission: read-only
10
9
  ---
11
10
 
@@ -74,8 +73,9 @@ overall: weighted-mean
74
73
  - References (paths relative to the `massa-ai` skill directory): `references/agent-orchestration.md`, `references/audit-report-io.md` (Judge With Debate Report Contracts).
75
74
 
76
75
  ## Model Hint
77
- See `references/agent-orchestration.md` (Model Diversity Fallback): `metadata.model_tier`
78
- (`deep`) is the fallback; `workflows/judge-with-debate.md` owns the live model assignment.
76
+ See `references/agent-orchestration.md` (Model Diversity Fallback): `meta-judge` carries no
77
+ per-agent override in `skills/model-profiles.json`, so the active profile's host default is
78
+ the fallback; `workflows/judge-with-debate.md` owns the live model assignment.
79
79
 
80
80
  ## Validation Sensors
81
81
  - Output parses as YAML; weights sum to 1.0 (±0.001); every criterion carries id, name, weight, scale (min 1, max 5), rubric anchors for 1/3/5, and a non-empty checklist.
@@ -5,7 +5,6 @@ license: MIT
5
5
  metadata:
6
6
  author: Luiz Massa
7
7
  version: "1.0.0"
8
- model_tier: deep
9
8
  permission: read-only
10
9
  ---
11
10
 
@@ -5,7 +5,6 @@ license: MIT
5
5
  metadata:
6
6
  author: Luiz Massa
7
7
  version: "1.1.0"
8
- model_tier: deep
9
8
  permission: read-only
10
9
  tools: mcp-index
11
10
  ---
@@ -5,7 +5,6 @@ license: MIT
5
5
  metadata:
6
6
  author: Luiz Massa
7
7
  version: "1.0.0"
8
- model_tier: deep
9
8
  permission: read-only
10
9
  ---
11
10
 
@@ -5,7 +5,6 @@ license: MIT
5
5
  metadata:
6
6
  author: Luiz Massa
7
7
  version: "1.0.0"
8
- model_tier: deep
9
8
  permission: read-only
10
9
  ---
11
10
 
@@ -5,7 +5,6 @@ license: MIT
5
5
  metadata:
6
6
  author: Luiz Massa
7
7
  version: "1.0.0"
8
- model_tier: deep
9
8
  permission: read-only
10
9
  ---
11
10
 
@@ -5,7 +5,6 @@ license: MIT
5
5
  metadata:
6
6
  author: Luiz Massa
7
7
  version: "1.0.0"
8
- model_tier: deep
9
8
  permission: read-only
10
9
  ---
11
10
 
@@ -5,7 +5,6 @@ license: MIT
5
5
  metadata:
6
6
  author: Luiz Massa
7
7
  version: "1.0.0"
8
- model_tier: standard
9
8
  permission: write
10
9
  ---
11
10
 
@@ -5,7 +5,6 @@ license: MIT
5
5
  metadata:
6
6
  author: Luiz Massa
7
7
  version: "1.0.0"
8
- model_tier: deep
9
8
  permission: read-only
10
9
  ---
11
10
 
@@ -117,18 +117,17 @@ delegation with its reason in the Evidence Gate.
117
117
 
118
118
  ## Model Diversity Fallback
119
119
 
120
- Applies to any charter whose `metadata.model_tier` is a fallback and whose
121
- dispatching workflow additionally requests per-invocation model diversity at
122
- dispatch time (e.g. `judge` — 3 parallel slots; `meta-judge` — one slot).
123
-
124
- - The charter's `metadata.model_tier` is the fallback every host runs when
125
- dispatch-time model selection is unavailable.
126
- - The dispatching workflow (e.g. `workflows/judge-with-debate.md`) is the
127
- single source for the current slot/model assignment, not the charter file.
128
- - When dispatch-time selection is unavailable, every affected slot runs the
129
- charter default, and the orchestrator records `DIVERSITY DEGRADED`
130
- (multi-slot) or an equivalent diversity warning (single-slot) per the
131
- dispatching workflow's own contract.
120
+ Applies to any charter whose dispatching workflow requests per-invocation model diversity
121
+ at dispatch time (e.g. `judge` — 3 parallel slots; `meta-judge` one slot).
122
+
123
+ - Read-only agents (judge, meta-judge, audit-specialist, navigator, and others) carry no
124
+ per-agent model override in the profile and resolve to the profile's per-tool default.
125
+ By convention, the default is the profile's strongest model.
126
+ - The dispatching workflow (e.g. `workflows/judge-with-debate.md`) is the single source
127
+ for the current slot/model assignment, not the charter file.
128
+ - When dispatch-time selection is unavailable, every affected slot runs the profile default,
129
+ and the orchestrator records `DIVERSITY DEGRADED` (multi-slot) or an equivalent diversity
130
+ warning (single-slot) per the dispatching workflow's own contract.
132
131
 
133
132
  ## Roles
134
133
 
@@ -303,7 +302,7 @@ like every other dispatch.
303
302
  ```md
304
303
  🤖 [Agent Started] Investigator — model opus, effort high. Scope: the four emitters.
305
304
  🤖 [Agent Started] Designer — model/effort unknown (no installed agent file at
306
- ~/.claude/plugins/cache/massa-ai/massa-ai/1.48.0/agents/massa-ai-designer.md). Dispatching anyway.
305
+ <liveRoot>/agents/massa-ai-designer.md). Dispatching anyway.
307
306
  ```
308
307
 
309
308
  That second line is a measured case, not a hypothetical: on a machine with plugin
@@ -316,7 +315,7 @@ this table so the two cannot drift silently:
316
315
 
317
316
  | Host | Installed agents directory | Glob | Model / effort keys |
318
317
  | --- | --- | --- | --- |
319
- | Claude — marketplace route | `<marketplaceRoot>/agents` a *versioned* bundle root, e.g. `~/.claude/plugins/cache/massa-ai/massa-ai/1.48.0/agents` | `massa-ai-*.md` | `model:` / `effort:` |
318
+ | Claude — marketplace route | `<marketplaceRoot>/agents`, where `<marketplaceRoot>` is `resolveClaudeMarketplaceInstall`'s live root: for a **directory-source** marketplace the host loads the plugin LIVE from the source bundle — e.g. `<repo>/apps/claude-plugin/agents`; for any other kind it is the *versioned* cache snapshot, e.g. `~/.claude/plugins/cache/massa-ai/massa-ai/1.48.0/agents` (a stale-able snapshot — never hardcode it; read `profile_list`'s `liveRoot`) | `massa-ai-*.md` | `model:` / `effort:` |
320
319
  | Claude — file route | `~/.claude/agents` | `massa-ai-*.md` | `model:` / `effort:` |
321
320
  | Codex | `~/.codex/agents` | `massa-ai-*.toml` | `model` / `model_reasoning_effort` |
322
321
  | OpenCode | `~/.config/opencode/agents` | `massa-ai-*.md` | `model:` / `reasoningEffort:` |
@@ -178,7 +178,7 @@ When sub-agents are unavailable (a single agent executing the full feature), use
178
178
 
179
179
  **Applies only if the harness can assign a model per sub-agent.** If it cannot, ignore this section and run everything on the default model — the workflow is correct either way. The point is to spend high-reasoning capacity where ambiguity and consequence are high, and a faster tier where the work is mechanical, instead of paying top-tier cost uniformly.
180
180
 
181
- massa-ai resolves the actual model per agent through `metadata.model_tier` (`light` / `standard` / `deep`) in each sub-agent's charter (`skills/agents/<name>/SKILL.md`), combined with the host and the active profile in `skills/model-profiles.json` (see `CLAUDE.md` § Agent-harness surface). This section maps role/work characteristics onto that mechanism — it is not a separate free-floating table.
181
+ massa-ai resolves the actual model per agent through the active profile in `skills/model-profiles.json` (see `CLAUDE.md` § Agent-harness surface). Most agents use the profile's per-tool default; some carry per-agent overrides. This section maps role/work characteristics onto that decision framework — it is not a separate free-floating table.
182
182
 
183
183
  Judge the tier by the work in front of the role, not by the role's title:
184
184
 
@@ -195,7 +195,7 @@ Judge the tier by the work in front of the role, not by the role's title:
195
195
  **Rules of thumb:**
196
196
 
197
197
  - When unsure, size up, not down. An under-powered worker on ambiguous logic produces gaps the Verifier then has to catch — more expensive than paying for reasoning once.
198
- - **The Verifier always runs on the deepest tier** — per project rule, `skills/agents/verification-agent/SKILL.md` pins `metadata.model_tier: deep`, structurally, not just as advisory guidance here. A weak Verifier defeats the author ≠ verifier gate.
199
- - **Read-only specialists always run on the deepest tier** — this generalizes the Verifier rule: every findings-only or investigation-only charter (`permission: read-only`) pins `metadata.model_tier: deep` structurally, because there is no later implementation pass to catch what a weaker read-only pass missed.
198
+ - **The Verifier always runs on the deepest tier** — in built-in profiles, the verification-agent carries no per-agent override and resolves to the profile's strongest model. A weak Verifier defeats the author ≠ verifier gate.
199
+ - **Read-only specialists always run on the deepest tier** — this generalizes the Verifier rule: in built-in profiles, every findings-only or investigation-only charter (`permission: read-only`) carries no per-agent override and resolves to the profile's strongest model, because there is no later implementation pass to catch what a weaker read-only pass missed. **Accepted risk:** user overlays via the Web UI Model Catalog can choose a weaker default; the UI help text documents this convention.
200
200
  - Set the tier per batch, from that batch's phases. A feature can mix tiers across batches.
201
201
  - Outside the Verifier's and read-only specialists' structural pins, this table is advisory metadata only — no gate, commit, or verification step depends on it.
@@ -44,7 +44,7 @@ Config knobs (env, read by the server, not by the agent):
44
44
  |---|---|---|
45
45
  | `SYNAPSE_ENABLED` | `true` | Master kill switch; `false` bypasses the whole pipeline, and `search` behaves statelessly even when a `sessionId` is passed. |
46
46
  | `SYNAPSE_ATTENTION_ENABLED` | `false` | Multi-signal attention re-ranker. **Off by default** — do not attribute re-ranking to Synapse unless it is on. |
47
- | `LOG_LEVEL` | `info` | `debug` emits one pipeline log line per query (see Reading Pipeline Output). |
47
+ | `MASSA_AI_LOG_LEVEL` | `info` | `debug` emits one pipeline log line per query (see Reading Pipeline Output). |
48
48
 
49
49
  ## MCP-First Lifecycle
50
50
 
@@ -103,7 +103,7 @@ optional. REST prefetch requires `filePath` and may include `symbols`, `chains`,
103
103
 
104
104
  ## Reading Pipeline Output
105
105
 
106
- With `LOG_LEVEL=debug`, the server emits one structured line per Synapse-scoped
106
+ With `MASSA_AI_LOG_LEVEL=debug`, the server emits one structured line per Synapse-scoped
107
107
  query. Use it to decide whether Synapse is helping or whether the query needs
108
108
  refining — not as evidence about the codebase.
109
109