@massa-ai/cursor-plugin 1.55.0 → 1.57.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 (66) hide show
  1. package/.cursor-plugin/plugin.json +1 -1
  2. package/install.sh +9 -7
  3. package/package.json +1 -1
  4. package/skills/agents/architecture-specialist/SKILL.md +1 -1
  5. package/skills/agents/audit-specialist/SKILL.md +1 -1
  6. package/skills/agents/builder/SKILL.md +1 -1
  7. package/skills/agents/context-curator/SKILL.md +1 -1
  8. package/skills/agents/designer/SKILL.md +1 -1
  9. package/skills/agents/documentation-agent/SKILL.md +1 -1
  10. package/skills/agents/furps-analyst/SKILL.md +1 -1
  11. package/skills/agents/investigator/SKILL.md +1 -1
  12. package/skills/agents/judge/SKILL.md +1 -1
  13. package/skills/agents/meta-judge/SKILL.md +1 -1
  14. package/skills/agents/mobile-specialist/SKILL.md +1 -1
  15. package/skills/agents/navigator/SKILL.md +1 -1
  16. package/skills/agents/plan-critic/SKILL.md +1 -1
  17. package/skills/agents/planner/SKILL.md +1 -1
  18. package/skills/agents/requirements-analyst/SKILL.md +1 -1
  19. package/skills/agents/reviewer/SKILL.md +1 -1
  20. package/skills/agents/test-engineer/SKILL.md +1 -1
  21. package/skills/agents/verification-agent/SKILL.md +1 -1
  22. package/skills/bootstrap/SKILL.md +74 -0
  23. package/skills/massa-ai/SKILL.md +2 -1
  24. package/skills/massa-ai/references/agent-orchestration.md +41 -4
  25. package/skills/massa-ai/references/audit-scope.md +1 -1
  26. package/skills/massa-ai/references/code-annotation.md +16 -1
  27. package/skills/massa-ai/references/code-quality-lens.md +107 -0
  28. package/skills/massa-ai/references/code-reuse-scan.md +0 -1
  29. package/skills/massa-ai/references/implementation-delivery.md +6 -3
  30. package/skills/massa-ai/references/naming-standards.md +12 -7
  31. package/skills/massa-ai/references/skill-architect/authoring-principles.md +37 -0
  32. package/skills/massa-ai/references/verification-ladder.md +2 -0
  33. package/skills/massa-ai/scripts/check_commit.ts +4 -1
  34. package/skills/massa-ai/scripts/ensure_worktree.ts +311 -0
  35. package/skills/massa-ai/scripts/resolve_scope.ts +263 -0
  36. package/skills/massa-ai/scripts/size_change.ts +227 -0
  37. package/skills/massa-ai/workflows/architecture/architecture-audit.md +1 -15
  38. package/skills/massa-ai/workflows/architecture/architecture-fix.md +1 -8
  39. package/skills/massa-ai/workflows/bugs/bugs-audit.md +1 -13
  40. package/skills/massa-ai/workflows/bugs/bugs-fix.md +1 -9
  41. package/skills/massa-ai/workflows/code-quality/code-quality-audit.md +3 -34
  42. package/skills/massa-ai/workflows/code-quality/code-quality-fix.md +3 -17
  43. package/skills/massa-ai/workflows/commit.md +6 -6
  44. package/skills/massa-ai/workflows/debug.md +2 -9
  45. package/skills/massa-ai/workflows/design.md +0 -6
  46. package/skills/massa-ai/workflows/exploration.md +0 -1
  47. package/skills/massa-ai/workflows/feature.md +2 -15
  48. package/skills/massa-ai/workflows/general.md +1 -16
  49. package/skills/massa-ai/workflows/implementation/implementation-audit.md +0 -1
  50. package/skills/massa-ai/workflows/implementation/implementation-fix.md +1 -15
  51. package/skills/massa-ai/workflows/judge-with-debate.md +0 -2
  52. package/skills/massa-ai/workflows/maestro/maestro-fix.md +1 -8
  53. package/skills/massa-ai/workflows/mobile-figma/mobile-figma-audit.md +0 -6
  54. package/skills/massa-ai/workflows/mobile-figma/mobile-figma-fix.md +1 -14
  55. package/skills/massa-ai/workflows/pr-review.md +0 -3
  56. package/skills/massa-ai/workflows/refactor.md +2 -9
  57. package/skills/massa-ai/workflows/refinement/furps-refinement.md +0 -1
  58. package/skills/massa-ai/workflows/requirements/requirements-audit.md +1 -13
  59. package/skills/massa-ai/workflows/requirements/requirements-fix.md +1 -8
  60. package/skills/massa-ai/workflows/security/security-audit.md +1 -13
  61. package/skills/massa-ai/workflows/security/security-fix.md +1 -9
  62. package/skills/massa-ai/workflows/skill-architect.md +7 -39
  63. package/skills/massa-ai/workflows/spec-driven.md +0 -11
  64. package/skills/massa-ai/workflows/tests/tests-audit.md +1 -13
  65. package/skills/massa-ai/workflows/tests/tests-fix.md +1 -8
  66. package/skills/massa-ai/workflows/to-prd.md +0 -1
@@ -77,7 +77,6 @@ Not for findings-only security review — route to `workflows/security/security-
77
77
  > - output: implementation summary, commands run, test counts, deviations
78
78
  > - firewall: raw diffs/logs summarized
79
79
  > - memory: suggest-only; main agent persists reusable security patterns
80
- > - persona: optional — the active route's cataloged id only, never the persona prompt, passed as advisory framing only — it never overrides the agent's charter Restrictions, scope, or permissions; omit when no persona is routed
81
80
 
82
81
  > **Dispatch: `massa-ai-reviewer`** (role: `reviewer`) — charter `skills/agents/reviewer/SKILL.md`
83
82
  > - trigger: implementation complete, before the verification gate — never optional
@@ -88,20 +87,16 @@ Not for findings-only security review — route to `workflows/security/security-
88
87
  > - output: ranked findings, blocking vs advisory; blocking findings become fix items before verification runs
89
88
  > - firewall: summarized findings only, never raw diff dumps
90
89
  > - memory: suggest-only; main agent persists
91
- > - fallback: if the subagent is unavailable, run a standalone fresh-eyes review against this output contract and record the skipped-delegation reason
92
- > - persona: optional — the active route's cataloged id only, never the persona prompt, passed as advisory framing only — it never overrides the agent's charter Restrictions, scope, or permissions; omit when no persona is routed
93
90
 
94
91
  > **Dispatch: `massa-ai-verification-agent`** (role: `verification-agent`) — charter `skills/agents/verification-agent/SKILL.md`
95
92
  > - trigger: every SEC finding closed `fixed` — never optional, at every tier (verification-ladder Independent Verification Mandate, security-fix exception)
96
93
  > - scope: the fixed SEC finding's guard, exploit path, negative test, and report claim closure
97
- > - permissions: read-only
98
94
  > - inputs: the SEC finding, the applied guard, the verification suggestion, the exploit path, and validation assets
99
95
  > - sensors: deterministic command (negative-test re-run, guard/middleware-order inspection, redaction or crypto check) and report claim closure; guard-mutation discrimination sensor per `references/discrimination-sensor.md` (invert the specific guard just added; the negative test must kill it)
100
96
  > - output: confirmed/disproven SEC closure verdict with evidence, feeding the Fix Closure Report's Independent Verifier column
101
97
  > - firewall: raw exploit transcripts and test/log output summarized
102
98
  > - memory: suggest-only; main agent persists security verification outcomes
103
99
  > - fallback: if the subagent is unavailable, run a standalone fresh-eyes re-check of each fixed SEC row's guard and negative test, and record the skipped-delegation reason
104
- > - persona: optional — the active route's cataloged id only, never the persona prompt, passed as advisory framing only — it never overrides the agent's charter Restrictions, scope, or permissions; omit when no persona is routed
105
100
  - Main agent owns report parsing, prioritization, memory writes, final synthesis, and Evidence Gate.
106
101
 
107
102
  11. Verify each completed finding:
@@ -111,7 +106,7 @@ Not for findings-only security review — route to `workflows/security/security-
111
106
  - A finding cannot be marked `fixed` when a target-relevant command or artifact check exists but was not attempted; if verification cannot run, mark it `blocked`, `deferred`, or `skipped` with an allowed skipped-check reason.
112
107
  - Run the report's verification suggestion when available.
113
108
  - At Standard+ size or high/critical severity, run the guard-mutation discrimination sensor per `references/discrimination-sensor.md`: invert the specific guard just added and confirm the negative test kills it; a surviving mutant marks the finding's Closure Matrix row `blocked` and records the `surviving_mutant` lessons signal even when the exploit-path test is green.
114
- - The fix→re-verify cycle is capped per `references/verification-ladder.md`'s Bounded Fix→Re-verify Loop at 3 iterations; that counter is separate from the two-consecutive-failed-fixes breaker into `references/root-cause-scripts.md` named in this file's preamble, which fires inside a single edit iteration and neither consumes nor resets the loop count.
109
+ - The fix→re-verify cycle is capped per `references/verification-ladder.md`'s Bounded Fix→Re-verify Loop at 3 iterations.
115
110
  - Run targeted tests for negative and positive paths, plus lint/type/build checks relevant to touched files.
116
111
  - Inspect logs/config/errors when the finding involves data exposure.
117
112
  - Record command/artifact, result, skipped reason or `none`, highest Verification Ladder level reached, validation assets protected, and residual risk.
@@ -131,6 +126,3 @@ User asks: "Use security-fix to fix latest audit findings for user routes."
131
126
  3. Fix critical/high exploit paths first.
132
127
  4. Add negative tests for denied access, invalid input, or redacted output.
133
128
  5. Run deterministic tests and report residual security risk.
134
-
135
- <!-- validator anchors: every SEC finding closed `fixed` — never optional, at every tier | guard-mutation discrimination sensor | Fix Closure Report Contract | security-fix-closure | consult it before working the finding | append any newly discovered security hotspot | Urgency does not expand delivery authorization | Bounded Fix→Re-verify Loop | graceful degradation preserved -->
136
-
@@ -15,28 +15,7 @@ You are a senior skill architect. Your job is to guide users through building th
15
15
 
16
16
  Load `references/project-context.md` (intake sweep) before the first substantive read.
17
17
 
18
- ## Core Philosophy
19
-
20
- 1. **Understand before building.** Never generate a SKILL.md until you've completed Discovery and Architecture phases. A bad skill is worse than no skill — it triggers incorrectly, gives inconsistent results, and erodes trust.
21
-
22
- 2. **Progressive disclosure is everything.** The three-level system (frontmatter → SKILL.md body → linked files) exists for a reason: token economy. A bloated skill degrades performance for every conversation it loads into.
23
-
24
- 3. **Composability over completeness.** Skills coexist with other skills. Never assume yours is the only one loaded. Be a good neighbor.
25
-
26
- 4. **Specificity beats verbosity.** One precise instruction outperforms three paragraphs of vague guidance. Code beats prose for deterministic checks.
27
-
28
- 5. **Skills are for agents, not humans.** No README.md inside the skill folder. No onboarding documentation. Write for an LLM that needs clear, actionable instructions.
29
-
30
- ---
31
-
32
- ## Workflow Overview
33
-
34
- ```
35
- DISCOVERY → ARCHITECTURE → CRAFT → VALIDATE → DELIVER
36
- ```
37
-
38
- Move through phases sequentially. Never skip Discovery. Each phase has
39
- explicit exit criteria before you advance.
18
+ Read `references/skill-architect/authoring-principles.md` once before Phase 1: it carries the five design principles this workflow applies, the phase sequence, and the conversation style to hold throughout.
40
19
 
41
20
  ---
42
21
 
@@ -271,7 +250,7 @@ Consult `references/skill-architect/examples.md` for the full anti-pattern list.
271
250
  ### 4.1 — Structural Validation
272
251
 
273
252
  Run the full checklist from `references/skill-architect/quality-checklist.md` and execute
274
- `bun scripts/validate_skill.ts <skill-folder>` against the generated skill to check:
253
+ `bun skills/massa-ai/scripts/validate_skill.ts <skill-folder>` against the generated skill to check:
275
254
 
276
255
  - SKILL.md exists with correct casing
277
256
  - Frontmatter has required fields with correct format
@@ -281,7 +260,7 @@ Run the full checklist from `references/skill-architect/quality-checklist.md` an
281
260
  - Description includes trigger phrases
282
261
 
283
262
  IF the script cannot run (no code-execution tool available) THEN skip
284
- `scripts/validate_skill.ts` and run the
263
+ `skills/massa-ai/scripts/validate_skill.ts` and run the
285
264
  `references/skill-architect/quality-checklist.md` checklist manually instead.
286
265
 
287
266
  ### 4.2 — Trigger Testing
@@ -335,7 +314,7 @@ Create the final skill folder structure in the project's skills directory.
335
314
 
336
315
  ### 5.2 — Present
337
316
 
338
- Use `present_files` to share the packaged skill. Include a brief summary:
317
+ Present the created file tree (every path written, relative to the skill folder) and a brief summary:
339
318
 
340
319
  - What the skill does
341
320
  - How to install it in the user's preferred AI agent or IDE
@@ -347,25 +326,14 @@ Suggest:
347
326
 
348
327
  - Test with the suggested phrases
349
328
  - If results aren't right, bring the conversation back and iterate
350
- - For formal evaluation, use the `skill-creator` skill's eval and benchmark modes
329
+ - For a formal re-check after edits, re-run Phase 4 against the changed skill
351
330
 
352
331
  ---
353
332
 
354
- ## Conversation Style
355
-
356
- - Ask questions one area at a time — don't dump all Discovery questions at once
357
- - Give concrete suggestions the user can react to ("Would something like X work?")
358
- - If the user provides a vague request, propose a specific interpretation and ask
359
- if it matches their intent
360
- - If the conversation already contains a workflow (user says "turn this into a
361
- skill"), extract what you can from history FIRST, then fill gaps with questions
362
- - Match the user's technical level — explain terms if they seem non-technical
363
- - Be direct about tradeoffs: if a design choice has a downside, say so
364
-
365
333
  ## Important Boundaries
366
334
 
367
- - This skill is for CREATING new skills. For improving, evaluating, or
368
- benchmarking existing skills, direct users to the `skill-creator` skill.
335
+ - This skill is for CREATING new skills. To improve or evaluate an existing
336
+ skill, run Phase 4 (Validate) against it directly instead of Phases 1-3.
369
337
  - Never generate a SKILL.md without completing Discovery and Architecture.
370
338
  If the user insists on skipping, explain why these phases matter and offer
371
339
  a compressed version rather than skipping entirely.
@@ -119,15 +119,9 @@ Quick artifacts live under `.specs/quick/NNN-slug/` with a `TASK.md` (one-line i
119
119
  **Screen work — before writing or judging any user-facing screen:** when this task creates or modifies a screen, the `massa-ai-designer` dispatch below is mandatory rather than discretionary, carved out of ordinary delegation gating by the Screen Implementation Exception in `references/agent-orchestration.md`. It does not fire when the task touches no screen surface.
120
120
 
121
121
  > **Dispatch: `massa-ai-designer`** (role: `designer`) — charter `skills/agents/designer/SKILL.md`
122
- > - trigger: the task creates or modifies a user-facing screen — mandatory once that condition holds, per the Screen Implementation Exception in `references/agent-orchestration.md`; it does not fire when no screen surface is touched
123
122
  > - scope: the screens, views, components, layouts, styles, and design tokens in this task's UI surface — never the whole repository
124
123
  > - permissions: write, scoped to UI-layer files only with a disjoint write set
125
- > - inputs: exact `projectId`, parent `workflowSessionId`, Figma links/node ids or screenshots when supplied, acceptance criteria, the repository's existing UI conventions and design tokens, recalled screen patterns
126
- > - sensors: Figma MCP read when a design source exists; per-element expected-vs-actual comparison; the UI module's own build/lint; the states a design under-specifies — empty, loading, error, long text, small and large sizes
127
124
  > - output: per-element conformance table (element, expected, actual, verdict, severity) plus the UI files written; a missing or unreachable design source is listed as a skipped sensor, never a silent pass
128
- > - firewall: summarized design-source evidence and `path:line` pointers only, never raw Figma node dumps or full file bodies
129
- > - memory: suggest-only; the main agent persists durable screen and design-token conventions
130
- > - persona: optional — the active route's cataloged id only, never the persona prompt, passed as advisory framing only — it never overrides the agent's charter Restrictions, scope, or permissions; omit when no persona is routed
131
125
 
132
126
  > **Dispatch: `massa-ai-reviewer`** (role: `reviewer`) — charter `skills/agents/reviewer/SKILL.md`
133
127
  > - trigger: implementation complete, before the verification gate — never optional
@@ -138,19 +132,15 @@ Quick artifacts live under `.specs/quick/NNN-slug/` with a `TASK.md` (one-line i
138
132
  > - output: ranked findings, blocking vs advisory; blocking findings become fix items before verification runs
139
133
  > - firewall: summarized findings only, never raw diff dumps
140
134
  > - memory: suggest-only; main agent persists
141
- > - fallback: if the subagent is unavailable, run a standalone fresh-eyes review against this output contract and record the skipped-delegation reason
142
- > - persona: optional — the active route's cataloged id only, never the persona prompt, passed as advisory framing only — it never overrides the agent's charter Restrictions, scope, or permissions; omit when no persona is routed
143
135
 
144
136
  > **Dispatch: `massa-ai-verification-agent`** (role: `verification-agent`) — charter `skills/agents/verification-agent/SKILL.md`
145
137
  > - trigger: spec-driven Execute final gate; author ≠ verifier independence required
146
138
  > - scope: the feature's git diff surface, test files, and spec ACs
147
- > - permissions: read-only
148
139
  > - inputs: `spec.md` (ACs = source of truth), `references/spec-driven/validate.md` as operating checklist, commit range, test files in scope
149
140
  > - sensors: (1) spec-anchored outcome check — each test's asserted value matches the spec-defined expected outcome; (2) discrimination sensor — injects behavior-level faults in scratch state, confirms tests kill them, discards mutations; surviving mutants become fix tasks
150
141
  > - output: `.specs/features/<slug>/validation.md` (PASS/FAIL, per-AC evidence, sensor result, diff range); compact verdict + ranked gap list; gaps become fix tasks
151
142
  > - firewall: raw diffs/logs/test output summarized; mutations run in scratch state only
152
143
  > - memory: suggest-only; main agent persists validation outcomes
153
- > - persona: optional — the active route's cataloged id only, never the persona prompt, passed as advisory framing only — it never overrides the agent's charter Restrictions, scope, or permissions; omit when no persona is routed
154
144
 
155
145
  - The verification-agent re-derives coverage independently using evidence-or-zero and does not inherit the author's mental model.
156
146
  - The fix → re-verify loop is bounded by the Bounded Fix→Re-verify Loop rule in `references/verification-ladder.md` (cap reached → `Blocked`).
@@ -228,4 +218,3 @@ User asks: "Specify offline draft sync, design it, create tasks, implement it, a
228
218
  4. Include Tasks because execution has dependency complexity.
229
219
  5. Execute one approved task at a time.
230
220
  6. Finish Execute with independent validation, including the discrimination sensor, then write `validation.md`.
231
- <!-- validator anchors: .specs/ files | current repository source and approved .specs/ artifacts override stale memory | .specs/ directory missing | 3 verification iterations -->
@@ -39,18 +39,7 @@ Five gates, five distinct error classes. A green gate elsewhere never substitute
39
39
  - `references/agent-orchestration.md` only for large scopes, explicit parallel/subagent requests, PR subagent invocation, or independent verification of high-impact findings
40
40
  3. `recall` -> load testing conventions, mock boundaries, prior flaky tests, known regressions, project constraints, reusable verification recipes, and accepted test exceptions for the target area.
41
41
  - Apply the Memory Freshness Gate from `references/audit-scope.md`; recalled exceptions are leads, not proof.
42
- 4. Establish the investigation scope before proceeding:
43
- - Modified files scope: use when the user says modified files, changed files, current changes, uncommitted changes, staged changes, or unstaged changes.
44
- - Explicit files/globs scope: use when the user names files, directories, or globs.
45
- - Commit range scope: use when the user provides commits/ranges or asks for commits made by me, my branch commits, or test gaps introduced by branch commits.
46
- - Branch comparison scope: use when the user names base/head branches, refs, or a branch diff.
47
- - Codebase area scope: use when the user names a path, module, package, feature area, test suite, or glob.
48
- - Symbol/class/function scope: use when the user names public classes, functions, APIs, handlers, or exported surfaces.
49
- - Feature/flow scope: use when the user names a runtime flow, user journey, or feature area.
50
- - Whole-repo scope: use only when the user explicitly asks for a whole-repo tests audit.
51
- - Implementation parent scope: use only when `workflows/implementation/implementation-audit.md` invokes this workflow with a concrete implementation scope packet.
52
- - If the target focus is missing, vague, or too broad, ask for a concrete target from the supported scope types in `references/audit-scope.md`.
53
- - Build the shared scope packet from `references/audit-scope.md` and carry it into the report.
42
+ 4. Establish the investigation scope: select the scope type and build the shared scope packet per `references/audit-scope.md`, which owns the supported scope types, the ask-when-vague rule, and the packet fields. Carry the packet into the report.
54
43
  5. Resolve the selected branch's mechanics (modified files, commit range, codebase area, explicit-files/branch/symbol/feature/whole-repo, or implementation parent scope) per `references/audit-scope.md` (Lens Audit Scope Resolution Procedure, Tests row of Per-Lens Scope Deltas).
55
44
  6. Investigation pass. Dispatch `audit-specialist` per `references/agent-orchestration.md` when the scope justifies an isolated read-only subagent:
56
45
 
@@ -63,7 +52,6 @@ Five gates, five distinct error classes. A green gate elsewhere never substitute
63
52
  > - output: findings with missing/weak coverage type, location, evidence, regression risk, severity, simplest test direction, deterministic sensor, verification suggestion
64
53
  > - firewall: raw diffs/logs/search output summarized, not returned raw
65
54
  > - memory: suggest-only; main agent persists reusable testing patterns
66
- > - persona: optional — the active route's cataloged id only, never the persona prompt, passed as advisory framing only — it never overrides the agent's charter Restrictions, scope, or permissions; omit when no persona is routed
67
55
 
68
56
  - Map changed or targeted behavior to existing tests, fixtures, mocks, and deterministic harnesses.
69
57
  - Variation check: flag tests exercising only the single fixture example where input bounds or parameters can vary — hardcoded-example brittleness the unit gate cannot see.
@@ -77,20 +77,16 @@ Not for findings-only test coverage, assertion quality, fixture health, flakines
77
77
  > - output: ranked findings, blocking vs advisory; blocking findings become fix items before verification runs
78
78
  > - firewall: summarized findings only, never raw diff dumps
79
79
  > - memory: suggest-only; main agent persists
80
- > - fallback: if the subagent is unavailable, run a standalone fresh-eyes review against this output contract and record the skipped-delegation reason
81
- > - persona: optional — the active route's cataloged id only, never the persona prompt, passed as advisory framing only — it never overrides the agent's charter Restrictions, scope, or permissions; omit when no persona is routed
82
80
 
83
81
  > **Dispatch: `massa-ai-verification-agent`** (role: `verification-agent`) — charter `skills/agents/verification-agent/SKILL.md`
84
82
  > - trigger: mandatory per the verification-ladder's Independent Verification Mandate for any TST finding closed at Standard+/Spec-driven size or high/critical severity; at Quick size the subagent hop is skipped and the standalone fresh-eyes assertion re-check below runs instead
85
83
  > - scope: the fixed TST finding's assertion strength, fixture/mock boundary, coverage-execution-map row, and report claim closure
86
- > - permissions: read-only
87
84
  > - inputs: the finding, the applied test change, the coverage execution map row, the verification command, and validation assets
88
85
  > - sensors: deterministic command (focused test run, assertion inspection, fixture-not-weakened check) against the coverage execution map row; discrimination sensor per `references/discrimination-sensor.md` (mutate the new/repaired test's subject; the test must kill it)
89
86
  > - output: confirmed/disproven TST closure verdict with assertion evidence
90
87
  > - firewall: raw test output/logs summarized
91
88
  > - memory: suggest-only; main agent persists tests-closure verification outcomes
92
89
  > - fallback: if the subagent is unavailable, run a standalone fresh-eyes re-check of each TST closure row's assertion evidence and record the skipped-delegation reason
93
- > - persona: optional — the active route's cataloged id only, never the persona prompt, passed as advisory framing only — it never overrides the agent's charter Restrictions, scope, or permissions; omit when no persona is routed
94
90
 
95
91
  10. Use strict harness sensors:
96
92
  - Never rely on AI subjective evaluation.
@@ -103,7 +99,7 @@ Not for findings-only test coverage, assertion quality, fixture health, flakines
103
99
  - Record command/artifact, result, skipped reason or `none`, highest Verification Ladder level reached, validation assets protected, and residual risk.
104
100
  - Sequence the TST proof in two passes, in order: first reproduce the coverage execution map's `expected failure before fix` row red (the pre-fix run proves the assertion can fail); only then, at Standard+/Spec-driven size or high/critical severity, run the discrimination sensor from `references/discrimination-sensor.md` as the post-fix kill-check against the new/repaired test's subject code — Quick focused-assertion findings are exempt from the sensor pass but never from the pre-fix red check.
105
101
  - A surviving mutant means the TST claim is unproven: close that finding's row `blocked` rather than `fixed` and emit the `surviving_mutant` lessons signal via the recording command above.
106
- - The fix→re-verify cycle is capped per `references/verification-ladder.md`'s Bounded Fix→Re-verify Loop (3 verification iterations, then `Blocked` with evidence preserved). That cap is a distinct counter from the "two consecutive failed fixes" breaker in the preamble above, which escalates a single stuck iteration to `references/root-cause-scripts.md` and neither consumes nor resets this cap.
102
+ - The fix→re-verify cycle is capped per `references/verification-ladder.md`'s Bounded Fix→Re-verify Loop (3 verification iterations, then `Blocked` with evidence preserved).
107
103
  11. Use agent orchestration only when it improves signal — except the verification-agent dispatch above, which `references/agent-orchestration.md`'s Independent Verification Exception mandates for TST closures at the sizes/severities its trigger names, regardless of signal improvement. Dispatch per `references/agent-orchestration.md`:
108
104
 
109
105
  > **Dispatch: `massa-ai-builder`** (role: `builder`) — charter `skills/agents/builder/SKILL.md`
@@ -115,7 +111,6 @@ Not for findings-only test coverage, assertion quality, fixture health, flakines
115
111
  > - output: implementation summary, test counts, commands run, deviations
116
112
  > - firewall: raw test output/logs summarized
117
113
  > - memory: suggest-only; main agent persists reusable testing patterns
118
- > - persona: optional — the active route's cataloged id only, never the persona prompt, passed as advisory framing only — it never overrides the agent's charter Restrictions, scope, or permissions; omit when no persona is routed
119
114
  - Main agent owns report parsing, prioritization, memory writes, final synthesis, and Evidence Gate.
120
115
  12. Close out with the Fix Closure Report:
121
116
  - The coverage execution map from step 6, now filled in through step 10's discrimination sensor result column, is the pre-edit draft of the Closure Matrix — carry its rows forward rather than re-deriving them.
@@ -135,5 +130,3 @@ User asks: "Use tests-fix to fix latest audit findings for report scheduling."
135
130
  3. Map each finding to missing coverage, weak assertions, fixture drift, flakiness, or missing sensor work.
136
131
  4. Add or repair deterministic tests without weakening validation assets.
137
132
  5. Run focused tests and report broader skipped checks when needed.
138
-
139
- <!-- validator anchors: references/discrimination-sensor.md | references/knowledge-verification-chain.md | references/brownfield-mapping.md (Minimum Bar's TESTING.md only) | Independent Verification Exception | mandatory per the verification-ladder's Independent Verification Mandate for any TST finding | discrimination sensor per references/discrimination-sensor.md (mutate the new/repaired test's subject; the test must kill it) | Sequence the TST proof in two passes | surviving_mutant lessons signal | Bounded Fix→Re-verify Loop | Fix Closure Report Contract | audits/tests/<YYYY-MM-DD tests-fix-closure>.md | bun skills/massa-ai/scripts/check_fix_closure.ts <closure.md> --family tests | graceful degradation preserved -->
@@ -187,4 +187,3 @@ To-PRD is done when every requirement has an ID, acceptance criteria are testabl
187
187
  - **Code analysis:** Use massa-ai tools first (`list_projects`, `search`, `project_map`, `optimized_context`) before `ast-grep`/`rg`/`grep` for the explore step. Current source overrides a stale index or memory (source-precedence rule).
188
188
  - **Memory:** Persist verified outcomes worth reusing with `remember`, tagging `project:<id>`, `session:<id>`, `workflow:to-prd`, `entity:<slug>`, `memory:working|episodic|semantic|procedural`.
189
189
  - **Validation:** Evidence-or-zero. Every requirement resolved and assumption logged is checked against current source.
190
- <!-- validator anchors: references/project-context.md | read-only workflow | no implementation-delivery/code-annotation/root-cause-scripts | no Isolation Gate | no Reuse Scan -->