@massa-ai/codex-plugin 1.25.0 → 1.27.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/.codex-plugin/plugin.json +1 -1
- package/agent-profiles/balanced/massa-ai-architecture-specialist.toml +62 -0
- package/agent-profiles/balanced/massa-ai-audit-specialist.toml +78 -0
- package/agent-profiles/balanced/massa-ai-builder.toml +64 -0
- package/agent-profiles/balanced/massa-ai-context-curator.toml +64 -0
- package/agent-profiles/balanced/massa-ai-documentation-agent.toml +62 -0
- package/agent-profiles/balanced/massa-ai-furps-analyst.toml +68 -0
- package/agent-profiles/balanced/massa-ai-investigator.toml +65 -0
- package/agent-profiles/balanced/massa-ai-judge.toml +96 -0
- package/agent-profiles/balanced/massa-ai-meta-judge.toml +83 -0
- package/agent-profiles/balanced/massa-ai-mobile-specialist.toml +79 -0
- package/agent-profiles/balanced/massa-ai-navigator.toml +72 -0
- package/agent-profiles/balanced/massa-ai-plan-critic.toml +87 -0
- package/agent-profiles/balanced/massa-ai-planner.toml +62 -0
- package/agent-profiles/balanced/massa-ai-requirements-analyst.toml +61 -0
- package/agent-profiles/balanced/massa-ai-reviewer.toml +63 -0
- package/agent-profiles/balanced/massa-ai-test-engineer.toml +63 -0
- package/agent-profiles/balanced/massa-ai-verification-agent.toml +62 -0
- package/agent-profiles/cheap/massa-ai-architecture-specialist.toml +62 -0
- package/agent-profiles/cheap/massa-ai-audit-specialist.toml +78 -0
- package/agent-profiles/cheap/massa-ai-builder.toml +64 -0
- package/agent-profiles/cheap/massa-ai-context-curator.toml +64 -0
- package/agent-profiles/cheap/massa-ai-documentation-agent.toml +62 -0
- package/agent-profiles/cheap/massa-ai-furps-analyst.toml +68 -0
- package/agent-profiles/cheap/massa-ai-investigator.toml +65 -0
- package/agent-profiles/cheap/massa-ai-judge.toml +96 -0
- package/agent-profiles/cheap/massa-ai-meta-judge.toml +83 -0
- package/agent-profiles/cheap/massa-ai-mobile-specialist.toml +79 -0
- package/agent-profiles/cheap/massa-ai-navigator.toml +72 -0
- package/agent-profiles/cheap/massa-ai-plan-critic.toml +87 -0
- package/agent-profiles/cheap/massa-ai-planner.toml +62 -0
- package/agent-profiles/cheap/massa-ai-requirements-analyst.toml +61 -0
- package/agent-profiles/cheap/massa-ai-reviewer.toml +63 -0
- package/agent-profiles/cheap/massa-ai-test-engineer.toml +63 -0
- package/agent-profiles/cheap/massa-ai-verification-agent.toml +62 -0
- package/agent-profiles/heavy/massa-ai-architecture-specialist.toml +62 -0
- package/agent-profiles/heavy/massa-ai-audit-specialist.toml +78 -0
- package/agent-profiles/heavy/massa-ai-builder.toml +64 -0
- package/agent-profiles/heavy/massa-ai-context-curator.toml +64 -0
- package/agent-profiles/heavy/massa-ai-documentation-agent.toml +62 -0
- package/agent-profiles/heavy/massa-ai-furps-analyst.toml +68 -0
- package/agent-profiles/heavy/massa-ai-investigator.toml +65 -0
- package/agent-profiles/heavy/massa-ai-judge.toml +96 -0
- package/agent-profiles/heavy/massa-ai-meta-judge.toml +83 -0
- package/agent-profiles/heavy/massa-ai-mobile-specialist.toml +79 -0
- package/agent-profiles/heavy/massa-ai-navigator.toml +72 -0
- package/agent-profiles/heavy/massa-ai-plan-critic.toml +87 -0
- package/agent-profiles/heavy/massa-ai-planner.toml +62 -0
- package/agent-profiles/heavy/massa-ai-requirements-analyst.toml +61 -0
- package/agent-profiles/heavy/massa-ai-reviewer.toml +63 -0
- package/agent-profiles/heavy/massa-ai-test-engineer.toml +63 -0
- package/agent-profiles/heavy/massa-ai-verification-agent.toml +62 -0
- package/agent-profiles/home/massa-ai-architecture-specialist.toml +62 -0
- package/agent-profiles/home/massa-ai-audit-specialist.toml +78 -0
- package/agent-profiles/home/massa-ai-builder.toml +64 -0
- package/agent-profiles/home/massa-ai-context-curator.toml +64 -0
- package/agent-profiles/home/massa-ai-documentation-agent.toml +62 -0
- package/agent-profiles/home/massa-ai-furps-analyst.toml +68 -0
- package/agent-profiles/home/massa-ai-investigator.toml +65 -0
- package/agent-profiles/home/massa-ai-judge.toml +96 -0
- package/agent-profiles/home/massa-ai-meta-judge.toml +83 -0
- package/agent-profiles/home/massa-ai-mobile-specialist.toml +79 -0
- package/agent-profiles/home/massa-ai-navigator.toml +72 -0
- package/agent-profiles/home/massa-ai-plan-critic.toml +87 -0
- package/agent-profiles/home/massa-ai-planner.toml +62 -0
- package/agent-profiles/home/massa-ai-requirements-analyst.toml +61 -0
- package/agent-profiles/home/massa-ai-reviewer.toml +63 -0
- package/agent-profiles/home/massa-ai-test-engineer.toml +63 -0
- package/agent-profiles/home/massa-ai-verification-agent.toml +62 -0
- package/agent-profiles/work/massa-ai-architecture-specialist.toml +62 -0
- package/agent-profiles/work/massa-ai-audit-specialist.toml +78 -0
- package/agent-profiles/work/massa-ai-builder.toml +64 -0
- package/agent-profiles/work/massa-ai-context-curator.toml +64 -0
- package/agent-profiles/work/massa-ai-documentation-agent.toml +62 -0
- package/agent-profiles/work/massa-ai-furps-analyst.toml +68 -0
- package/agent-profiles/work/massa-ai-investigator.toml +65 -0
- package/agent-profiles/work/massa-ai-judge.toml +96 -0
- package/agent-profiles/work/massa-ai-meta-judge.toml +83 -0
- package/agent-profiles/work/massa-ai-mobile-specialist.toml +79 -0
- package/agent-profiles/work/massa-ai-navigator.toml +72 -0
- package/agent-profiles/work/massa-ai-plan-critic.toml +87 -0
- package/agent-profiles/work/massa-ai-planner.toml +62 -0
- package/agent-profiles/work/massa-ai-requirements-analyst.toml +61 -0
- package/agent-profiles/work/massa-ai-reviewer.toml +63 -0
- package/agent-profiles/work/massa-ai-test-engineer.toml +63 -0
- package/agent-profiles/work/massa-ai-verification-agent.toml +62 -0
- package/agents/massa-ai-judge.toml +3 -6
- package/agents/massa-ai-meta-judge.toml +2 -5
- package/agents/massa-ai-navigator.toml +1 -1
- package/install.sh +103 -8
- package/package.json +2 -1
- package/skills/agents/judge/SKILL.md +4 -7
- package/skills/agents/meta-judge/SKILL.md +3 -6
- package/skills/agents/navigator/SKILL.md +2 -2
- package/skills/massa-ai/SKILL.md +1 -16
- package/skills/massa-ai/references/adr-authoring.md +3 -3
- package/skills/massa-ai/references/agent-orchestration.md +17 -2
- package/skills/massa-ai/references/architecture-coupling-lens.md +1 -1
- package/skills/massa-ai/references/architecture-deepening-lens.md +1 -1
- package/skills/massa-ai/references/architecture-domain-lens.md +1 -1
- package/skills/massa-ai/references/architecture-lenses.md +1 -1
- package/skills/massa-ai/references/audit-report-io.md +32 -2
- package/skills/massa-ai/references/audit-scope.md +22 -1
- package/skills/massa-ai/references/code-annotation.md +5 -5
- package/skills/massa-ai/references/codebase-investigation.md +1 -1
- package/skills/massa-ai/references/context-firewall.md +2 -1
- package/skills/massa-ai/references/conversation-feedback.md +1 -1
- package/skills/massa-ai/references/debug-diagnosis-loop.md +1 -1
- package/skills/massa-ai/references/decision-engine.md +1 -1
- package/skills/massa-ai/references/evidence-gate.md +1 -1
- package/skills/massa-ai/references/figma-pre-analysis.md +3 -3
- package/skills/massa-ai/references/furps/analyst-role.md +1 -1
- package/skills/massa-ai/references/furps/checklist.md +1 -1
- package/skills/massa-ai/references/furps/intake.md +1 -1
- package/skills/massa-ai/references/furps/report-contract.md +1 -1
- package/skills/massa-ai/references/graceful-degradation.md +22 -0
- package/skills/massa-ai/references/hook-enforcement.md +3 -3
- package/skills/massa-ai/references/implementation-delivery.md +4 -4
- package/skills/massa-ai/references/installation.md +1 -1
- package/skills/massa-ai/references/lessons.md +2 -2
- package/skills/massa-ai/references/maestro/artifacts-reports.md +1 -1
- package/skills/massa-ai/references/maestro/cli-device.md +1 -1
- package/skills/massa-ai/references/maestro/cloud.md +1 -1
- package/skills/massa-ai/references/maestro/config-env-output.md +1 -1
- package/skills/massa-ai/references/maestro/fact-ledger.md +1 -1
- package/skills/massa-ai/references/maestro/js-scripting.md +1 -1
- package/skills/massa-ai/references/maestro/mcp.md +1 -1
- package/skills/massa-ai/references/maestro/patterns.md +1 -1
- package/skills/massa-ai/references/maestro/selectors.md +1 -1
- package/skills/massa-ai/references/maestro/workspace-execution.md +1 -1
- package/skills/massa-ai/references/maestro/yaml-commands.md +1 -1
- package/skills/massa-ai/references/maestro.md +1 -1
- package/skills/massa-ai/references/mcp-tools.md +2 -2
- package/skills/massa-ai/references/memory-policy.md +2 -2
- package/skills/massa-ai/references/mobile-context.md +9 -5
- package/skills/massa-ai/references/mobile-diagnosis.md +2 -2
- package/skills/massa-ai/references/mobile-figma-matcher/android-compose.md +1 -1
- package/skills/massa-ai/references/mobile-figma-matcher/android-views.md +1 -1
- package/skills/massa-ai/references/mobile-figma-matcher/core.md +1 -1
- package/skills/massa-ai/references/mobile-figma-matcher/ios-swiftui.md +1 -1
- package/skills/massa-ai/references/mobile-figma-matcher/ios-uikit.md +1 -1
- package/skills/massa-ai/references/mobile-figma-matcher/kmp-compose-multiplatform.md +1 -1
- package/skills/massa-ai/references/mobile-figma-matcher/repository-detection.md +1 -1
- package/skills/massa-ai/references/naming-standards.md +1 -1
- package/skills/massa-ai/references/pr-task-fix.md +2 -2
- package/skills/massa-ai/references/project-context.md +2 -2
- package/skills/massa-ai/references/repo-rules-discovery.md +4 -4
- package/skills/massa-ai/references/rfc/discovery-and-sizing.md +1 -1
- package/skills/massa-ai/references/rfc/document-contract.md +1 -1
- package/skills/massa-ai/references/rfc/quality-and-lifecycle.md +1 -1
- package/skills/massa-ai/references/root-cause-scripts.md +2 -2
- package/skills/massa-ai/references/sonarqube-mcp.md +73 -0
- package/skills/massa-ai/references/spec-driven/artifact-store.md +1 -1
- package/skills/massa-ai/references/spec-driven/brownfield-mapping.md +16 -0
- package/skills/massa-ai/references/spec-driven/code-analysis.md +1 -1
- package/skills/massa-ai/references/spec-driven/coding-principles.md +1 -1
- package/skills/massa-ai/references/spec-driven/context-limits.md +1 -1
- package/skills/massa-ai/references/spec-driven/design.md +22 -1
- package/skills/massa-ai/references/spec-driven/discuss.md +1 -1
- package/skills/massa-ai/references/spec-driven/execute.md +3 -1
- package/skills/massa-ai/references/spec-driven/memory.md +1 -1
- package/skills/massa-ai/references/spec-driven/specify.md +3 -3
- package/skills/massa-ai/references/spec-driven/sub-agents.md +1 -1
- package/skills/massa-ai/references/spec-driven/tasks.md +1 -1
- package/skills/massa-ai/references/spec-driven/validate.md +1 -1
- package/skills/massa-ai/references/subagent-design.md +4 -4
- package/skills/massa-ai/references/synapse-policy.md +1 -1
- package/skills/massa-ai/references/tdd/calibrated-examples.md +1 -1
- package/skills/massa-ai/references/tdd/discovery-and-sizing.md +1 -1
- package/skills/massa-ai/references/tdd/document-contract.md +1 -1
- package/skills/massa-ai/references/tdd/quality-and-lifecycle.md +1 -1
- package/skills/massa-ai/references/the-fool/cognitive-bias-inventory.md +1 -1
- package/skills/massa-ai/references/the-fool/dialectic-synthesis.md +1 -1
- package/skills/massa-ai/references/the-fool/evidence-audit.md +1 -1
- package/skills/massa-ai/references/the-fool/pre-mortem-analysis.md +1 -1
- package/skills/massa-ai/references/the-fool/red-team-adversarial.md +1 -1
- package/skills/massa-ai/references/the-fool/socratic-questioning.md +1 -1
- package/skills/massa-ai/references/ticket/atlassian-fix.md +1 -1
- package/skills/massa-ai/references/ticket/intake-and-sources.md +1 -1
- package/skills/massa-ai/references/ticket/templates-and-quality.md +1 -1
- package/skills/massa-ai/references/verification-ladder.md +1 -1
- package/skills/massa-ai/scripts/validate_audit_report.ts +382 -0
- package/skills/massa-ai/scripts/validate_design.ts +264 -0
- package/skills/massa-ai/workflows/adr.md +16 -8
- package/skills/massa-ai/workflows/architecture/architecture-audit.md +23 -40
- package/skills/massa-ai/workflows/architecture/architecture-fix.md +14 -6
- package/skills/massa-ai/workflows/bugs/bugs-audit.md +19 -35
- package/skills/massa-ai/workflows/bugs/bugs-fix.md +13 -5
- package/skills/massa-ai/workflows/code-quality/code-quality-audit.md +25 -41
- package/skills/massa-ai/workflows/code-quality/code-quality-fix.md +13 -5
- package/skills/massa-ai/workflows/commit.md +13 -5
- package/skills/massa-ai/workflows/debug.md +11 -3
- package/skills/massa-ai/workflows/design.md +15 -7
- package/skills/massa-ai/workflows/exploration.md +12 -4
- package/skills/massa-ai/workflows/feature.md +14 -13
- package/skills/massa-ai/workflows/general.md +13 -8
- package/skills/massa-ai/workflows/implementation/implementation-audit.md +15 -15
- package/skills/massa-ai/workflows/implementation/implementation-fix.md +13 -5
- package/skills/massa-ai/workflows/judge-with-debate.md +12 -4
- package/skills/massa-ai/workflows/long-session.md +10 -2
- package/skills/massa-ai/workflows/maestro/maestro-audit.md +11 -3
- package/skills/massa-ai/workflows/maestro/maestro-fix.md +12 -4
- package/skills/massa-ai/workflows/maestro/maestro.md +12 -4
- package/skills/massa-ai/workflows/mobile-figma/mobile-figma-audit.md +11 -3
- package/skills/massa-ai/workflows/mobile-figma/mobile-figma-fix.md +12 -4
- package/skills/massa-ai/workflows/onboarding.md +10 -2
- package/skills/massa-ai/workflows/refactor.md +12 -4
- package/skills/massa-ai/workflows/refinement/furps-refinement.md +12 -4
- package/skills/massa-ai/workflows/requirements/requirements-audit.md +19 -36
- package/skills/massa-ai/workflows/requirements/requirements-fix.md +13 -5
- package/skills/massa-ai/workflows/rfc.md +10 -2
- package/skills/massa-ai/workflows/security/security-audit.md +19 -35
- package/skills/massa-ai/workflows/security/security-fix.md +13 -5
- package/skills/massa-ai/workflows/spec-driven.md +20 -23
- package/skills/massa-ai/workflows/tdd.md +10 -2
- package/skills/massa-ai/workflows/tests/tests-audit.md +19 -35
- package/skills/massa-ai/workflows/tests/tests-fix.md +13 -5
- package/skills/massa-ai/workflows/the-fool.md +11 -3
- package/skills/massa-ai/workflows/ticket.md +10 -2
- package/skills/profile/SKILL.md +39 -0
package/install.sh
CHANGED
|
@@ -78,6 +78,12 @@ PLUGIN_DIR="$CODEX_DIR/plugins/massa-ai"
|
|
|
78
78
|
HOOKS_JSON="$CODEX_DIR/hooks.json"
|
|
79
79
|
AGENTS_DIR="$CODEX_DIR/agents"
|
|
80
80
|
|
|
81
|
+
# Model-profile variant tree (T8, design Component 3 / MPS-04). Source is the
|
|
82
|
+
# bundle's per-profile agent-profiles/<p>/ (sibling of agents/, A5); dest is
|
|
83
|
+
# the engine's own host path table: $CODEX_DIR/massa-ai/agent-profiles/<p>/.
|
|
84
|
+
VARIANTS_SRC="$SCRIPT_DIR/agent-profiles"
|
|
85
|
+
VARIANTS_DEST="$CODEX_DIR/massa-ai/agent-profiles"
|
|
86
|
+
|
|
81
87
|
# Array-append merge (F5 mitigation): for each of the 6 events, append the
|
|
82
88
|
# massa-ai hook entry to the event's array if no entry with
|
|
83
89
|
# _massaAiOwned: true already exists. Backup before first write. Uses node
|
|
@@ -299,10 +305,22 @@ if (typeof data.platforms !== "object" || data.platforms === null || Array.isArr
|
|
|
299
305
|
data.version = 2;
|
|
300
306
|
const prev = data.platforms[host];
|
|
301
307
|
data.platforms[host] = { root, skillsOwner: "plugin", skills: ["massa-ai", "persona-router"] };
|
|
302
|
-
// The whole-record replace must not drop
|
|
303
|
-
//
|
|
304
|
-
|
|
305
|
-
|
|
308
|
+
// The whole-record replace must not drop fields a previous successful install
|
|
309
|
+
// wrote (R2) — re-attach them. modelProfile (T10, MPS-03 round-trip
|
|
310
|
+
// obligation) is engine-owned; installRoute is installer-owned but written by
|
|
311
|
+
// a LATER step of this same install (record_plugin_version) — both must
|
|
312
|
+
// survive this earlier whole-record replace or a switched profile / recorded
|
|
313
|
+
// route silently vanishes on the next skills-bundling pass.
|
|
314
|
+
if (prev && typeof prev === "object" && !Array.isArray(prev)) {
|
|
315
|
+
if (prev.plugin && typeof prev.plugin === "object") {
|
|
316
|
+
data.platforms[host].plugin = prev.plugin;
|
|
317
|
+
}
|
|
318
|
+
if (prev.modelProfile && typeof prev.modelProfile === "object") {
|
|
319
|
+
data.platforms[host].modelProfile = prev.modelProfile;
|
|
320
|
+
}
|
|
321
|
+
if (typeof prev.installRoute === "string") {
|
|
322
|
+
data.platforms[host].installRoute = prev.installRoute;
|
|
323
|
+
}
|
|
306
324
|
}
|
|
307
325
|
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
308
326
|
fs.writeFileSync(file, JSON.stringify(data, null, 2) + "\n");
|
|
@@ -376,18 +394,27 @@ record_plugin_version() {
|
|
|
376
394
|
return 0
|
|
377
395
|
fi
|
|
378
396
|
|
|
379
|
-
local version installed_at
|
|
397
|
+
local version installed_at route
|
|
380
398
|
version="$(sed -n 's/.*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' "$SCRIPT_DIR/package.json" | head -n 1)"
|
|
381
399
|
installed_at="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
|
400
|
+
# installRoute (T8, design F1): installer-owned, engine-read-only. Unlike
|
|
401
|
+
# Claude, Codex's plugin/marketplace registration (register_codex_plugin) is
|
|
402
|
+
# ADDITIVE — it only affects /plugins visibility. The agent TOML files
|
|
403
|
+
# always land in $AGENTS_DIR regardless of whether that registration
|
|
404
|
+
# succeeds (see the unconditional copy loop below), so Codex has no
|
|
405
|
+
# "read in place, no local files" mode the way Claude's marketplace route
|
|
406
|
+
# does — installRoute is unconditionally "file" here, reflecting the one
|
|
407
|
+
# install shape Codex agents ever take. Written on EVERY install path.
|
|
408
|
+
route="file"
|
|
382
409
|
|
|
383
410
|
# Tolerant of a corrupt/missing state file (rewrites a minimal valid one —
|
|
384
411
|
# AC-8). A record-write failure warns but never fails the install: the next
|
|
385
412
|
# run treats the host as unknown-version and reinstalls.
|
|
386
|
-
"$runner" - "$HARNESS_STATE_FILE" "$HARNESS_HOST" "$CODEX_DIR" "$version" "$installed_at" <<'NODE' || \
|
|
413
|
+
"$runner" - "$HARNESS_STATE_FILE" "$HARNESS_HOST" "$CODEX_DIR" "$version" "$installed_at" "$route" <<'NODE' || \
|
|
387
414
|
echo " ⚠ could not record the plugin version — next run will reinstall (unknown version)" >&2
|
|
388
415
|
const fs = require("fs");
|
|
389
416
|
const path = require("path");
|
|
390
|
-
const [, , file, host, root, version, installedAt] = process.argv;
|
|
417
|
+
const [, , file, host, root, version, installedAt, installRoute] = process.argv;
|
|
391
418
|
let data = { version: 2, platforms: {} };
|
|
392
419
|
try {
|
|
393
420
|
const existing = JSON.parse(fs.readFileSync(file, "utf8"));
|
|
@@ -404,12 +431,54 @@ const rec =
|
|
|
404
431
|
? data.platforms[host]
|
|
405
432
|
: { root, skillsOwner: "plugin", skills: [] };
|
|
406
433
|
rec.plugin = { version, installedAt };
|
|
434
|
+
// installRoute is installer-owned (like plugin above); modelProfile is NEVER
|
|
435
|
+
// written here — the switch engine (packages/shared/src/profile-switch/) is
|
|
436
|
+
// its sole writer, and this installer only ever reads it (see
|
|
437
|
+
// apply_recorded_profile below).
|
|
438
|
+
rec.installRoute = installRoute;
|
|
407
439
|
data.platforms[host] = rec;
|
|
408
440
|
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
409
441
|
fs.writeFileSync(file, JSON.stringify(data, null, 2) + "\n");
|
|
410
442
|
NODE
|
|
411
443
|
}
|
|
412
444
|
|
|
445
|
+
# ── Model-profile variant tree + recorded-profile re-apply (T8, MPS-04) ─────
|
|
446
|
+
# Read-side only: this installer never writes platforms[host].modelProfile —
|
|
447
|
+
# see the comment above record_plugin_version's NODE block. It only (a)
|
|
448
|
+
# refreshes the on-disk variant tree so an offline switch has files to copy
|
|
449
|
+
# from, and (b) re-applies a previously recorded profile's active agent set on
|
|
450
|
+
# install/upgrade, so a plugin upgrade never silently reverts a switched
|
|
451
|
+
# profile back to the shipped default.
|
|
452
|
+
install_variant_tree() {
|
|
453
|
+
[[ -d "$VARIANTS_SRC" ]] || return 0
|
|
454
|
+
rm -rf "$VARIANTS_DEST"
|
|
455
|
+
mkdir -p "$VARIANTS_DEST"
|
|
456
|
+
cp -R "$VARIANTS_SRC/." "$VARIANTS_DEST/"
|
|
457
|
+
vecho " + model-profile variant tree refreshed at $VARIANTS_DEST"
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
# Prints the recorded profile name (platforms[codex].modelProfile.profile), or
|
|
461
|
+
# an empty string when unset/unreadable. Never throws — a corrupt or missing
|
|
462
|
+
# state file just means "no recorded profile", not an install failure.
|
|
463
|
+
recorded_profile() {
|
|
464
|
+
local runner="$1"
|
|
465
|
+
"$runner" - "$HARNESS_STATE_FILE" "$HARNESS_HOST" <<'NODE'
|
|
466
|
+
const fs = require("fs");
|
|
467
|
+
const [, , file, host] = process.argv;
|
|
468
|
+
try {
|
|
469
|
+
const data = JSON.parse(fs.readFileSync(file, "utf8"));
|
|
470
|
+
const rec = data && data.platforms && data.platforms[host];
|
|
471
|
+
const profile =
|
|
472
|
+
rec && rec.modelProfile && typeof rec.modelProfile.profile === "string"
|
|
473
|
+
? rec.modelProfile.profile
|
|
474
|
+
: "";
|
|
475
|
+
process.stdout.write(profile);
|
|
476
|
+
} catch {
|
|
477
|
+
process.stdout.write("");
|
|
478
|
+
}
|
|
479
|
+
NODE
|
|
480
|
+
}
|
|
481
|
+
|
|
413
482
|
# ── Plugin-registry registration (delegated to the codex CLI) ───────────────
|
|
414
483
|
# The CLI owns config.toml's [marketplaces.*] / [plugins."x@y"] tables and the
|
|
415
484
|
# plugins/cache layout, so it is the only supported way to reach /plugins.
|
|
@@ -551,9 +620,33 @@ vecho " + 6 massa-ai hook events wired (array-append, user hooks preserved)"
|
|
|
551
620
|
# plugin dir — Codex custom agents load from the config-root agents/ dir, not
|
|
552
621
|
# the plugin dir). Each file carries a "# massa-ai-owned" top comment for
|
|
553
622
|
# scoped uninstall (R3: shared agents dir, user agents preserved).
|
|
623
|
+
#
|
|
624
|
+
# Model-profile re-apply (T8, MPS-04): if a switch previously recorded a
|
|
625
|
+
# profile for this host, and the bundle ships that profile's variant, the
|
|
626
|
+
# ACTIVE set comes from agent-profiles/<profile>/ instead of the shipped
|
|
627
|
+
# default — an upgrade must never silently revert a switched profile.
|
|
628
|
+
# Recorded-but-missing-from-bundle is a loud fallback to the default, never a
|
|
629
|
+
# silent one.
|
|
554
630
|
mkdir -p "$AGENTS_DIR"
|
|
631
|
+
ACTIVE_AGENTS_SRC="$SCRIPT_DIR/agents"
|
|
632
|
+
json_runner=""
|
|
633
|
+
if command -v node &>/dev/null; then json_runner="node"
|
|
634
|
+
elif command -v bun &>/dev/null; then json_runner="bun"
|
|
635
|
+
fi
|
|
636
|
+
if [[ -n "$json_runner" ]]; then
|
|
637
|
+
RECORDED_PROFILE="$(recorded_profile "$json_runner")"
|
|
638
|
+
if [[ -n "$RECORDED_PROFILE" ]]; then
|
|
639
|
+
if [[ -d "$VARIANTS_SRC/$RECORDED_PROFILE" ]]; then
|
|
640
|
+
ACTIVE_AGENTS_SRC="$VARIANTS_SRC/$RECORDED_PROFILE"
|
|
641
|
+
echo " ↷ re-applying recorded model profile '$RECORDED_PROFILE'"
|
|
642
|
+
else
|
|
643
|
+
echo " ⚠ recorded model profile '$RECORDED_PROFILE' is not in this bundle — falling back to the default profile" >&2
|
|
644
|
+
fi
|
|
645
|
+
fi
|
|
646
|
+
fi
|
|
647
|
+
|
|
555
648
|
specialist_count=0
|
|
556
|
-
for src in "$
|
|
649
|
+
for src in "$ACTIVE_AGENTS_SRC/"massa-ai-*.toml; do
|
|
557
650
|
[[ -f "$src" ]] || continue
|
|
558
651
|
name="$(basename "$src")"
|
|
559
652
|
cp "$src" "$AGENTS_DIR/$name"
|
|
@@ -562,6 +655,8 @@ for src in "$SCRIPT_DIR/agents/"massa-ai-*.toml; do
|
|
|
562
655
|
done
|
|
563
656
|
vecho " + ${specialist_count} subagent specialists (generated from skills/agents/*/SKILL.md)"
|
|
564
657
|
|
|
658
|
+
install_variant_tree
|
|
659
|
+
|
|
565
660
|
# Skills bundling (PDO-08, 09): install massa-ai/persona-router into the
|
|
566
661
|
# shared harness skills directory, unless scripts/install-skills.sh already
|
|
567
662
|
# owns it for this platform.
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@massa-ai/codex-plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.27.0",
|
|
4
4
|
"description": "massa-ai plugin for Codex — semantic code search, memory, and context compression",
|
|
5
5
|
"files": [
|
|
6
6
|
"agents",
|
|
7
|
+
"agent-profiles",
|
|
7
8
|
"hooks",
|
|
8
9
|
"skills",
|
|
9
10
|
"install.sh",
|
|
@@ -4,7 +4,7 @@ description: Read-only debate-panel evaluator for judge-with-debate. Score an ar
|
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
6
|
author: S1LV4, luizgmassa
|
|
7
|
-
version: "1.
|
|
7
|
+
version: "1.1.0"
|
|
8
8
|
model_tier: deep
|
|
9
9
|
permission: read-only
|
|
10
10
|
---
|
|
@@ -83,12 +83,9 @@ next_step: <string>
|
|
|
83
83
|
- References: `references/agent-orchestration.md`, `references/audit-report-io.md` (Judge With Debate Report Contracts).
|
|
84
84
|
|
|
85
85
|
## Model Hint
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
the single source for the current slot assignments, not this file. When dispatch-time selection
|
|
90
|
-
is unavailable, every slot runs the charter default and the orchestrator records
|
|
91
|
-
`DIVERSITY DEGRADED` per the workflow contract.
|
|
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.
|
|
92
89
|
|
|
93
90
|
## Validation Sensors
|
|
94
91
|
- Every criterion score carries an exact quotation from the artifact.
|
|
@@ -4,7 +4,7 @@ description: Read-only evaluation-specification author for judge-with-debate. Ge
|
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
6
|
author: S1LV4, luizgmassa
|
|
7
|
-
version: "1.
|
|
7
|
+
version: "1.1.0"
|
|
8
8
|
model_tier: deep
|
|
9
9
|
permission: read-only
|
|
10
10
|
---
|
|
@@ -74,11 +74,8 @@ overall: weighted-mean
|
|
|
74
74
|
- References: `references/agent-orchestration.md`, `references/audit-report-io.md` (Judge With Debate Report Contracts).
|
|
75
75
|
|
|
76
76
|
## Model Hint
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
model for this slot at dispatch time on hosts that support it — `workflows/judge-with-debate.md`
|
|
80
|
-
is the single source for the current assignment, not this file. When dispatch-time selection is
|
|
81
|
-
unavailable, the orchestrator records a diversity warning per the workflow contract.
|
|
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.
|
|
82
79
|
|
|
83
80
|
## Validation Sensors
|
|
84
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.
|
|
@@ -4,7 +4,7 @@ description: Code exploration specialist that leverages the massa-ai semantic in
|
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
6
|
author: S1LV4, luizgmassa
|
|
7
|
-
version: "1.
|
|
7
|
+
version: "1.1.0"
|
|
8
8
|
model_tier: deep
|
|
9
9
|
permission: read-only
|
|
10
10
|
tools: mcp-index
|
|
@@ -16,7 +16,7 @@ metadata:
|
|
|
16
16
|
Answer codebase questions through the massa-ai semantic index, reading files only once the index has narrowed the target to one to three of them.
|
|
17
17
|
|
|
18
18
|
## Core Principle
|
|
19
|
-
The user's codebase is **already indexed** by massa-ai. The first move on any question is to query the index, not
|
|
19
|
+
The user's codebase is **already indexed** by massa-ai. The first move on any question is to query the index, not read files blindly — file reads are expensive in context; massa-ai index queries are not.
|
|
20
20
|
|
|
21
21
|
## Responsibilities
|
|
22
22
|
- Resolve the current project: run `pwd`, match the basename against `list_projects`.
|
package/skills/massa-ai/SKILL.md
CHANGED
|
@@ -312,22 +312,7 @@ Load only when a selected workflow asks for them:
|
|
|
312
312
|
|
|
313
313
|
## Graceful Degradation
|
|
314
314
|
|
|
315
|
-
|
|
316
|
-
|---|---|
|
|
317
|
-
| `recall` empty | Continue as cold start; do not invent memory. |
|
|
318
|
-
| massa-ai server unavailable | Fall back to focused shell/file reads; keep session concept. |
|
|
319
|
-
| Synapse unavailable | Continue with stateless search. |
|
|
320
|
-
| Synapse prime/access mismatch | Use verified REST fallback or skip that optional step. |
|
|
321
|
-
| index incomplete or stale | Use recall; skip search-dependent steps until ready. Graph tools (`trace_path`, `impact_analysis`, `get_architecture`) fall back to `search`/`get_references`; record reduced retrieval confidence. |
|
|
322
|
-
| no meaningful memory | Say memory was intentionally skipped. |
|
|
323
|
-
| memory write fails | Continue and report the unpersisted insight. |
|
|
324
|
-
| `create_checkpoint` unavailable | Continue with `.specs/` artifact state as fallback. |
|
|
325
|
-
| `handoff_begin` unavailable (`HANDOFFS_ENABLED=false`) | Fall back to `remember` + `.specs/` writes; record skipped handoff-table write. |
|
|
326
|
-
| `bootstrap` unavailable | Proceed with manual `remember` calls. |
|
|
327
|
-
| `compact_snapshot` unavailable | Continue with `compress` + `remember`; record skipped snapshot. |
|
|
328
|
-
| code execution (`execute`/`execute_file`/`batch_execute`) unavailable | Load file into context instead; note the local-dev-only trust model still applies. |
|
|
329
|
-
| `fetch_and_index` unavailable | Use native web fetch + manual indexing or skip external content. |
|
|
330
|
-
| feedback reference unavailable | Continue without feedback lines; do not block the workflow. |
|
|
315
|
+
On any tool/index/MCP failure (server unavailable, index incomplete, Synapse unavailable, `create_checkpoint`/`handoff_begin`/`bootstrap`/`compact_snapshot`/`execute`/`fetch_and_index` unavailable), load and follow `references/graceful-degradation.md` instead of blocking.
|
|
331
316
|
|
|
332
317
|
## Completion
|
|
333
318
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ADR Authoring
|
|
2
2
|
|
|
3
|
-
Use
|
|
3
|
+
Use from `workflows/adr.md`. Defines how massa-ai creates Architecture Decision Records without delegating orchestration to another ADR skill.
|
|
4
4
|
|
|
5
5
|
## Core Rule
|
|
6
6
|
|
|
@@ -15,9 +15,9 @@ Route matrix:
|
|
|
15
15
|
| Direction is selected and implementation architecture/contracts/rollout need a blueprint | TDD |
|
|
16
16
|
| Requirements, design, tasks, and execution all need staged approval | Spec-driven |
|
|
17
17
|
|
|
18
|
-
Source relevance requires the source to name at least one target, constraint, risk, dependency, public contract, rejected option, decision owner, or rollout/rollback consequence for this ADR. Sources
|
|
18
|
+
Source relevance requires the source to name at least one target, constraint, risk, dependency, public contract, rejected option, decision owner, or rollout/rollback consequence for this ADR. Sources providing only style or adjacent context are examples, not facts.
|
|
19
19
|
|
|
20
|
-
Do not guess
|
|
20
|
+
Do not guess — missing source facts become questions, source gaps, or a workflow route change.
|
|
21
21
|
|
|
22
22
|
## Source Order
|
|
23
23
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Agent Orchestration
|
|
2
2
|
|
|
3
|
-
Use
|
|
3
|
+
Use when a workflow benefits from isolated context, parallel work, or independent verification.
|
|
4
4
|
|
|
5
5
|
Load `references/context-firewall.md` first when the delegated work may involve verbose logs, snapshots, generated reports, external research, or broad source inspection.
|
|
6
6
|
|
|
@@ -23,7 +23,7 @@ Subagents do bounded work only. Do not delegate everything.
|
|
|
23
23
|
|
|
24
24
|
Tokens are spent once; context shapes every decision that follows. The orchestrator's
|
|
25
25
|
working memory is the asset every rule below protects — delegation exists to keep
|
|
26
|
-
disposable reasoning out of the main thread, not
|
|
26
|
+
disposable reasoning out of the main thread, not just to parallelize.
|
|
27
27
|
|
|
28
28
|
- **Never poll a running subagent for status, and never ingest a subagent's raw
|
|
29
29
|
transcript, JSONL, or intermediate reasoning — running or completed.** The
|
|
@@ -98,6 +98,21 @@ installed, spawning forbidden by platform policy, or the host returns an unknown
|
|
|
98
98
|
delegated scope locally against the same output contract, and report the skipped
|
|
99
99
|
delegation with its reason in the Evidence Gate.
|
|
100
100
|
|
|
101
|
+
## Model Diversity Fallback
|
|
102
|
+
|
|
103
|
+
Applies to any charter whose `metadata.model_tier` is a fallback and whose
|
|
104
|
+
dispatching workflow additionally requests per-invocation model diversity at
|
|
105
|
+
dispatch time (e.g. `judge` — 3 parallel slots; `meta-judge` — one slot).
|
|
106
|
+
|
|
107
|
+
- The charter's `metadata.model_tier` is the fallback every host runs when
|
|
108
|
+
dispatch-time model selection is unavailable.
|
|
109
|
+
- The dispatching workflow (e.g. `workflows/judge-with-debate.md`) is the
|
|
110
|
+
single source for the current slot/model assignment, not the charter file.
|
|
111
|
+
- When dispatch-time selection is unavailable, every affected slot runs the
|
|
112
|
+
charter default, and the orchestrator records `DIVERSITY DEGRADED`
|
|
113
|
+
(multi-slot) or an equivalent diversity warning (single-slot) per the
|
|
114
|
+
dispatching workflow's own contract.
|
|
115
|
+
|
|
101
116
|
## Roles
|
|
102
117
|
|
|
103
118
|
Use the role names in prompts and memory tags; use the host agent names to
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Architecture Coupling Lens
|
|
2
2
|
|
|
3
|
-
Use
|
|
3
|
+
Use when an architecture audit or execution task needs dependency health, dependency direction, integration cost, or coupling reduction.
|
|
4
4
|
|
|
5
5
|
## Contents
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Architecture Deepening Lens
|
|
2
2
|
|
|
3
|
-
Use
|
|
3
|
+
Use when an architecture audit or execution task needs module depth, seams, adapters, testability, locality, or AI-navigability analysis.
|
|
4
4
|
|
|
5
5
|
## Contents
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Architecture Domain Lens
|
|
2
2
|
|
|
3
|
-
Use
|
|
3
|
+
Use when an architecture audit or execution task needs domain boundaries, bounded contexts, subdomain classification, ubiquitous language, or cohesion analysis.
|
|
4
4
|
|
|
5
5
|
## Contents
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Architecture Lenses
|
|
2
2
|
|
|
3
|
-
Use
|
|
3
|
+
Use for architecture audits, architecture-focused reviews, and refactor planning. Shared index and vocabulary guard; load the detail references only when a workflow needs that lens:
|
|
4
4
|
|
|
5
5
|
- `references/architecture-domain-lens.md` for bounded contexts, ubiquitous language, subdomain classification, cohesion, and integration patterns.
|
|
6
6
|
- `references/architecture-coupling-lens.md` for dependency graphs, strength/distance/volatility, dependency direction, and contract health.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Audit Report I/O
|
|
2
2
|
|
|
3
|
-
Use
|
|
3
|
+
Use from audit workflows before writing reports and from execution workflows before report-driven changes.
|
|
4
4
|
|
|
5
5
|
## Report Paths
|
|
6
6
|
|
|
@@ -557,10 +557,40 @@ Before editing:
|
|
|
557
557
|
|
|
558
558
|
- Verify workflow, project, target, target focus, scope, base/head, and resolved files match the current request.
|
|
559
559
|
- Reinspect each finding's current location and evidence. Stop or re-audit when schema v2 drift rules invalidate any selected finding.
|
|
560
|
-
- Verify every finding has common and workflow-specific fields plus the correct ID form.
|
|
560
|
+
- Verify every finding has common and workflow-specific fields plus the correct ID form (deterministic backing below).
|
|
561
561
|
- For implementation reports, require source-qualified IDs and child-lens fields.
|
|
562
562
|
- For mobile Figma reports, re-read the Figma node and reject stale design/source/configuration evidence.
|
|
563
563
|
- Ignore ruled-out candidates, skipped checks, no-finding summaries, `NOT EVALUATED` rows, constraint deviations, and low-confidence suspects unless the user explicitly changes scope after revalidation.
|
|
564
564
|
- Build verification from report suggestions plus current project sensors.
|
|
565
565
|
|
|
566
566
|
Do not execute from chat summaries, inline comments, screenshots alone, or remembered audit content. The saved markdown report is the source of truth.
|
|
567
|
+
|
|
568
|
+
## Deterministic Validation
|
|
569
|
+
|
|
570
|
+
`skills/massa-ai/scripts/validate_audit_report.ts` replaces the model-run
|
|
571
|
+
metadata/ID checklist with a scripted check, run before any `*-fix` workflow
|
|
572
|
+
edits code:
|
|
573
|
+
|
|
574
|
+
```bash
|
|
575
|
+
bun skills/massa-ai/scripts/validate_audit_report.ts <path-to-report.md> --family <family>
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
`--family` is one of `architecture`, `bugs`, `code-quality`, `security`,
|
|
579
|
+
`requirements`, `tests`, `maestro`, `mobile-figma`, or `implementation`
|
|
580
|
+
(auto-detected from the report's `Workflow:` field when omitted). It checks:
|
|
581
|
+
|
|
582
|
+
- required freshness-header metadata fields for that family (common fields
|
|
583
|
+
plus family-specific extras — `Requirements Source` for single-lens and
|
|
584
|
+
implementation reports; `Scenario Source`/`Maestro CLI`/`Device/Emulator
|
|
585
|
+
Readiness` for Maestro; the mobile Figma identity fields for Mobile Figma)
|
|
586
|
+
- finding-ID format (`PREFIX-N`, or `<Area>/<PREFIX>-N` for the
|
|
587
|
+
implementation composite family)
|
|
588
|
+
- Area<->Prefix table membership for implementation reports (rejects an
|
|
589
|
+
unrecognized Area, a mismatched Area/Prefix pair, and any raw `SONAR-*`
|
|
590
|
+
executable ID)
|
|
591
|
+
- finding-ID uniqueness and gap-free per-prefix/per-area sequencing
|
|
592
|
+
|
|
593
|
+
A non-zero exit blocks editing. The script does **not** re-check drift
|
|
594
|
+
against current source, table-structure presence (Target Surface Matrix,
|
|
595
|
+
Maestro Run Matrix, etc.), or Figma-node freshness — those stay a manual
|
|
596
|
+
step per the "Before editing" list above.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Audit Scope
|
|
2
2
|
|
|
3
|
-
Use
|
|
3
|
+
Use from audit workflows, implementation audit, bug finder, mobile Figma, and execution workflows before inspecting changed code or selecting an audit report.
|
|
4
4
|
|
|
5
5
|
## Scope Packets
|
|
6
6
|
|
|
@@ -64,6 +64,27 @@ Use the smallest scope type that matches the user's target:
|
|
|
64
64
|
- Feature/flow: map entry points through main transformations and side effects; ask for a narrower flow when the feature spans too many unrelated surfaces.
|
|
65
65
|
- Implementation parent scope: accept the exact packet supplied by `workflows/implementation/implementation-audit.md`, including PR diff when that is the selected scope type; child lenses must not broaden it without parent approval.
|
|
66
66
|
|
|
67
|
+
## Lens Audit Scope Resolution Procedure
|
|
68
|
+
|
|
69
|
+
Use this procedure in `bugs-audit`, `architecture-audit`, `code-quality-audit`, `requirements-audit`, `security-audit`, and `tests-audit` once each workflow's own step 4 has selected one of the 5 resolution branches below from its trigger list (modified files, commit range, codebase area, explicit-files/globs/branch-comparison/symbol/feature/whole-repo, or implementation-parent scope). This is the single home for the mechanical resolution steps; each lens workflow keeps only its branch-name trigger list and a pointer here.
|
|
70
|
+
|
|
71
|
+
- **Modified files**: include staged and unstaged tracked files from the working tree, plus untracked non-generated source/test/fixture/schema/config/docs files only when they can affect the lens's evidence (see Per-Lens Scope Deltas for the exact affect-scope and deleted-file-breakage wording per lens). Exclude generated, dependency, build, log, cache, temporary, and secret paths per repo rules. Inspect diffs first, then only the surrounding evidence the lens needs.
|
|
72
|
+
- **Commit range**: use the user-supplied explicit commits/range when given. For "commits made by me", resolve author identity from `git config user.email`, falling back to `git config user.name` when empty, and review only branch-unique commits by that identity. For branch-relative commit scopes, resolve the base with `Branch, Commit, And PR Diff Resolution` below. Ask the user for any missing range/identity/base before proceeding. Inspect the changed files and diffs from those commits, then the lens-specific evidence named in Per-Lens Scope Deltas.
|
|
73
|
+
- **Codebase area**: require a concrete path, module, package, feature area, or glob; ask when missing. Follow `references/codebase-investigation.md`'s retrieval order to find the lens-specific targets in Per-Lens Scope Deltas. Map only top-level modules first and recommend a narrower pass when scope is broad.
|
|
74
|
+
- **Explicit files/globs, branch comparison, symbol/class/function, feature/flow, or explicitly requested whole-repo scope**: resolve the target here and record the resolution method, base/head when relevant, resolved files, exclusions, requirements source when applicable, and freshness timestamp. For symbol/class/function targets, inspect definitions, references, callers, tests, and config plus the lens's extra targets, only as needed to verify a candidate finding. For feature/flow targets, map entry points through the lens-specific transformations named in Per-Lens Scope Deltas. For whole-repo scope, map the lens's first-pass surface (Per-Lens Scope Deltas) and report skipped-depth checks rather than implying exhaustive coverage.
|
|
75
|
+
- **Implementation parent scope**: accept the exact scope packet from `implementation-audit`; do not broaden beyond resolved files, surrounding code, and the lens-specific evidence in Per-Lens Scope Deltas needed to verify the lens's claim. Return compact lens findings to the parent implementation audit; do not write broad project memories unless explicitly assigned.
|
|
76
|
+
|
|
77
|
+
### Per-Lens Scope Deltas
|
|
78
|
+
|
|
79
|
+
| Lens (workflow) | Commit-range trigger phrase | Modified-files affect-scope + deleted-file breakage extras | Codebase-area retrieval targets | Symbol/class/function extra targets | Feature/flow mapping focus | Whole-repo first pass | Implementation-parent extra evidence |
|
|
80
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
81
|
+
| Architecture (`architecture-audit`) | architecture issues introduced by branch commits | architecture contracts or module boundaries; deletion also breaks architecture contracts | target modules, entry points, exported surfaces, references, semantic hotspots, tests, adjacent config | exported surfaces, references, dependency direction, callers, tests, ADRs | entry points through main transformations, contracts, side effects | top-level modules | exported surfaces, references, config, tests, ADRs |
|
|
82
|
+
| Bugs (`bugs-audit`) | bugs introduced by branch commits | runtime or validation behavior; deletion breaks imports, exports, routing, migrations, config, tests, or packaging | entry points, public API, tests, adjacent config | callers, callees, tests, contracts, config | input -> transformation -> output through the named flow | high-risk entry points | callers, callees, tests, config, migrations, schemas, public contracts |
|
|
83
|
+
| Code Quality (`code-quality-audit`) | quality issues introduced by branch commits | maintainability, validation behavior, or public contracts; deletion breaks imports, exports, routing, migrations, config, tests, or packaging | target modules, semantic hotspots, public API, tests, adjacent config | references, call sites, tests, current usage evidence | main code path only as far as needed for maintainability/overengineering | sampled/top-level coverage | public API, tests, config, project patterns |
|
|
84
|
+
| Requirements (`requirements-audit`) | requirement drift introduced by branch commits | required behavior; deletion also breaks required behavior or documentation contracts | entry points, public API, tests, config, docs, acceptance criteria | call paths, public contracts, tests, config, docs, requirement links | expected behavior from the requirements source to implementation, tests, docs, contracts | top-level requirement areas | public contracts, tests, config, docs, requirements |
|
|
85
|
+
| Security (`security-audit`) | security issues introduced by branch commits | runtime or validation behavior; deletion also breaks secrets handling or policy enforcement | entry points, trust boundaries, policy checks, validators, tests, adjacent config | call paths, trust boundaries, validators, policies, tests, config, schemas | untrusted input, identity, authorization, validation, persistence, side effects, logs | major trust boundaries | called auth/validation helpers, config, schemas, tests |
|
|
86
|
+
| Tests (`tests-audit`) | test gaps introduced by branch commits | runtime, validation, or test behavior; deletion also breaks test coverage | production entry points, tests, fixtures, mocks, test commands, coverage-sensitive config | call paths, behavior contracts, tests, fixtures, mocks, test commands | changed or targeted behavior mapped to existing tests and deterministic harnesses | major test surfaces | nearby tests, fixtures, config, callers |
|
|
87
|
+
|
|
67
88
|
## Branch, Commit, And PR Diff Resolution
|
|
68
89
|
|
|
69
90
|
Use this order:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Code Annotation And Test Coverage
|
|
2
2
|
|
|
3
|
-
Use
|
|
4
|
-
source.
|
|
3
|
+
Use in every implementation workflow, before writing or editing
|
|
4
|
+
source. Defines the three things every created or updated unit of code owes
|
|
5
5
|
the next reader: an API doc block, a rationale comment, and a test.
|
|
6
6
|
|
|
7
7
|
## Principle
|
|
@@ -46,7 +46,7 @@ Rules:
|
|
|
46
46
|
|
|
47
47
|
## 2. Rationale Comment
|
|
48
48
|
|
|
49
|
-
Doc blocks describe the contract
|
|
49
|
+
Doc blocks describe the contract, not why the code changed. Add
|
|
50
50
|
a rationale block once at the changed unit — the class, the method, or the
|
|
51
51
|
enclosing block — not on every line.
|
|
52
52
|
|
|
@@ -108,8 +108,8 @@ Rules:
|
|
|
108
108
|
|
|
109
109
|
Data models and anemic domain models carry state, not behavior. A unit test
|
|
110
110
|
that constructs them and asserts their own getters, setters, fields, or
|
|
111
|
-
constructor defaults mirrors the implementation and cannot detect
|
|
112
|
-
model is wrong —
|
|
111
|
+
constructor defaults mirrors the implementation and cannot detect the
|
|
112
|
+
model is wrong — the "test that mirrors the code" anti-pattern from the
|
|
113
113
|
rule above. **Do not write unit tests for these kinds:**
|
|
114
114
|
|
|
115
115
|
- **Data models** — persistence-layer entities: ORM-mapped classes, database
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Context Firewall
|
|
2
2
|
|
|
3
|
-
Use
|
|
3
|
+
Use before loading raw artifacts >200 lines, >20 KB, >50 search hits, generated reports, logs, screenshots, browser snapshots, CSVs, external research, or any source batch likely to exceed the next decision's needs.
|
|
4
4
|
|
|
5
5
|
## Principle
|
|
6
6
|
|
|
@@ -56,6 +56,7 @@ The main agent receives only:
|
|
|
56
56
|
|
|
57
57
|
Subagents should not return raw dumps. Never poll a running subagent for status and never read a subagent transcript — the returned output contract is the only channel back into the main context (canonical rules: `references/agent-orchestration.md`, Orchestrator Working Memory). The main agent still owns memory recall, persistence, synthesis, and the final Evidence Gate.
|
|
58
58
|
|
|
59
|
+
|
|
59
60
|
## Persistence Boundary
|
|
60
61
|
|
|
61
62
|
`massa-ai` remains the canonical memory layer for massa-ai workflows. Do not introduce `.notebook/`, SQLite, generated state files, or new persistence systems unless a separate workflow explicitly requires them.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Conversation Feedback
|
|
2
2
|
|
|
3
|
-
Use
|
|
3
|
+
Use when a massa-ai workflow needs chat-visible status updates for routing, loading, memory, NotebookLM, subagents, divergences, errors, verification, or completion.
|
|
4
4
|
|
|
5
5
|
## Principle
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Decision Engine Reference
|
|
2
2
|
|
|
3
|
-
Load
|
|
3
|
+
Load when scoring memories, making a trade-off decision, or debugging with
|
|
4
4
|
prior attempts. Do not load for simple edits where no memory write or design
|
|
5
5
|
decision is needed.
|
|
6
6
|
|
|
@@ -18,7 +18,7 @@ A completion report must include:
|
|
|
18
18
|
|
|
19
19
|
Completion reports must also state that tests, specs, fixtures, snapshots,
|
|
20
20
|
schemas, public contracts, and validator checks were not weakened unless the
|
|
21
|
-
user explicitly requested
|
|
21
|
+
user explicitly requested it.
|
|
22
22
|
|
|
23
23
|
## Acceptable Evidence
|
|
24
24
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Figma Pre-Analysis And Sequential Retrieval
|
|
2
2
|
|
|
3
|
-
Load
|
|
3
|
+
Load whenever a workflow receives one or more Figma links, node
|
|
4
4
|
IDs, or a readable desktop selection as a design source — the Figma audit/fix
|
|
5
5
|
family (`mobile-figma-audit`, `mobile-figma-fix`), `design`, and the
|
|
6
6
|
design-source gates of implementation workflows (`feature`, `spec-driven`).
|
|
@@ -14,14 +14,14 @@ restate it.
|
|
|
14
14
|
|
|
15
15
|
Full Figma extraction on unscoped links overloads one context with mixed
|
|
16
16
|
screens, buries feature boundaries, and makes evidence non-attributable. A
|
|
17
|
-
cheap pre-analysis pass
|
|
17
|
+
cheap pre-analysis pass maps what the links contain first, so each retrieval
|
|
18
18
|
pass reads one coherent slice.
|
|
19
19
|
|
|
20
20
|
## Stage 1 — Pre-Analysis (always first, exactly one subagent)
|
|
21
21
|
|
|
22
22
|
Dispatch one read-only subagent (investigator-class; Figma MCP — Model Context
|
|
23
23
|
Protocol — access, no repository mutation) over the user-provided Figma links.
|
|
24
|
-
Its job
|
|
24
|
+
Its job: understanding, **not** extraction:
|
|
25
25
|
|
|
26
26
|
- Summarize composition: pages, screens, frames, component sets, shared tokens.
|
|
27
27
|
- Summarize product context: what the screens are for, the features they serve,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Reusable sub-agent role for `workflows/refinement/furps-refinement.md`. Charter follows `references/subagent-design.md`. Registered in `references/agent-orchestration.md`.
|
|
4
4
|
|
|
5
|
-
Purpose: analyze exactly one FURPS+ dimension (F, U, R, P, S, or X) of a PRD/ADR against its checklist section
|
|
5
|
+
Purpose: analyze exactly one FURPS+ dimension (F, U, R, P, S, or X) of a PRD/ADR against its checklist section, returning structured refinement findings.
|
|
6
6
|
|
|
7
7
|
Trigger description:
|
|
8
8
|
- Use when the `furps-refinement` workflow fans out per-dimension analysis and needs isolated context plus independent verification per dimension.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# FURPS+ Refinement Checklist
|
|
2
2
|
|
|
3
|
-
Use
|
|
3
|
+
Use from `workflows/refinement/furps-refinement.md` when analyzing a PRD and/or ADR against the FURPS+ quality model. One `furps-analyst` sub-agent loads only its assigned dimension section; the main agent loads the full file only when synthesizing or when no dimension split is used.
|
|
4
4
|
|
|
5
5
|
## Source
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# FURPS+ Refinement Intake & Sub-agent Packet Contract
|
|
2
2
|
|
|
3
|
-
Use
|
|
3
|
+
Use from `workflows/refinement/furps-refinement.md` during intake and before dispatching sub-agents. Defines source detection, DoR sourcing, the context-firewall, the bounded document packet, and the sub-agent packet contracts.
|
|
4
4
|
|
|
5
5
|
## Source-type detection
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# FURPS+ Refinement Report Contract
|
|
2
2
|
|
|
3
|
-
Use
|
|
3
|
+
Use from `workflows/refinement/furps-refinement.md` before writing the final report. Extends the shared `references/audit-report-io.md` single-lens contract with FURPS-specific sections and the required refinement outputs (open questions, suggestions, insights, risks, DoR coverage gaps).
|
|
4
4
|
|
|
5
5
|
## Report path
|
|
6
6
|
|