@massa-ai/cursor-plugin 1.26.0 → 1.29.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 (156) hide show
  1. package/.cursor-plugin/plugin.json +1 -1
  2. package/agent-profiles/balanced/massa-ai-judge.md +4 -8
  3. package/agent-profiles/balanced/massa-ai-meta-judge.md +2 -5
  4. package/agent-profiles/balanced/massa-ai-navigator.md +1 -1
  5. package/agent-profiles/cheap/massa-ai-judge.md +4 -8
  6. package/agent-profiles/cheap/massa-ai-meta-judge.md +2 -5
  7. package/agent-profiles/cheap/massa-ai-navigator.md +1 -1
  8. package/agent-profiles/heavy/massa-ai-judge.md +4 -8
  9. package/agent-profiles/heavy/massa-ai-meta-judge.md +2 -5
  10. package/agent-profiles/heavy/massa-ai-navigator.md +1 -1
  11. package/agent-profiles/home/massa-ai-judge.md +4 -8
  12. package/agent-profiles/home/massa-ai-meta-judge.md +2 -5
  13. package/agent-profiles/home/massa-ai-navigator.md +1 -1
  14. package/agent-profiles/work/massa-ai-judge.md +4 -8
  15. package/agent-profiles/work/massa-ai-meta-judge.md +2 -5
  16. package/agent-profiles/work/massa-ai-navigator.md +1 -1
  17. package/agents/massa-ai-judge.md +4 -8
  18. package/agents/massa-ai-meta-judge.md +2 -5
  19. package/agents/massa-ai-navigator.md +1 -1
  20. package/install.sh +35 -0
  21. package/package.json +1 -1
  22. package/skills/agents/judge/SKILL.md +6 -9
  23. package/skills/agents/meta-judge/SKILL.md +3 -6
  24. package/skills/agents/navigator/SKILL.md +2 -2
  25. package/skills/massa-ai/SKILL.md +6 -17
  26. package/skills/massa-ai/references/adr-authoring.md +3 -3
  27. package/skills/massa-ai/references/agent-orchestration.md +18 -3
  28. package/skills/massa-ai/references/architecture-coupling-lens.md +1 -1
  29. package/skills/massa-ai/references/architecture-deepening-lens.md +1 -1
  30. package/skills/massa-ai/references/architecture-domain-lens.md +1 -1
  31. package/skills/massa-ai/references/architecture-lenses.md +1 -1
  32. package/skills/massa-ai/references/audit-report-io.md +32 -2
  33. package/skills/massa-ai/references/audit-scope.md +22 -1
  34. package/skills/massa-ai/references/code-annotation.md +5 -5
  35. package/skills/massa-ai/references/codebase-investigation.md +1 -1
  36. package/skills/massa-ai/references/coding-guidelines.md +67 -0
  37. package/skills/massa-ai/references/context-firewall.md +2 -1
  38. package/skills/massa-ai/references/conversation-feedback.md +1 -1
  39. package/skills/massa-ai/references/debug-diagnosis-loop.md +1 -1
  40. package/skills/massa-ai/references/decision-engine.md +1 -1
  41. package/skills/massa-ai/references/evidence-gate.md +1 -1
  42. package/skills/massa-ai/references/figma-pre-analysis.md +3 -3
  43. package/skills/massa-ai/references/furps/analyst-role.md +1 -1
  44. package/skills/massa-ai/references/furps/checklist.md +1 -1
  45. package/skills/massa-ai/references/furps/intake.md +1 -1
  46. package/skills/massa-ai/references/furps/report-contract.md +1 -1
  47. package/skills/massa-ai/references/graceful-degradation.md +22 -0
  48. package/skills/massa-ai/references/hook-enforcement.md +3 -3
  49. package/skills/massa-ai/references/implementation-delivery.md +4 -4
  50. package/skills/massa-ai/references/installation.md +1 -1
  51. package/skills/massa-ai/references/lessons.md +2 -2
  52. package/skills/massa-ai/references/maestro/artifacts-reports.md +1 -1
  53. package/skills/massa-ai/references/maestro/cli-device.md +1 -1
  54. package/skills/massa-ai/references/maestro/cloud.md +1 -1
  55. package/skills/massa-ai/references/maestro/config-env-output.md +1 -1
  56. package/skills/massa-ai/references/maestro/fact-ledger.md +1 -1
  57. package/skills/massa-ai/references/maestro/js-scripting.md +1 -1
  58. package/skills/massa-ai/references/maestro/mcp.md +1 -1
  59. package/skills/massa-ai/references/maestro/patterns.md +1 -1
  60. package/skills/massa-ai/references/maestro/selectors.md +1 -1
  61. package/skills/massa-ai/references/maestro/workspace-execution.md +1 -1
  62. package/skills/massa-ai/references/maestro/yaml-commands.md +1 -1
  63. package/skills/massa-ai/references/maestro.md +1 -1
  64. package/skills/massa-ai/references/mcp-tools.md +2 -2
  65. package/skills/massa-ai/references/memory-policy.md +2 -2
  66. package/skills/massa-ai/references/mobile-context.md +9 -5
  67. package/skills/massa-ai/references/mobile-diagnosis.md +2 -2
  68. package/skills/massa-ai/references/mobile-figma-matcher/android-compose.md +1 -1
  69. package/skills/massa-ai/references/mobile-figma-matcher/android-views.md +1 -1
  70. package/skills/massa-ai/references/mobile-figma-matcher/core.md +1 -1
  71. package/skills/massa-ai/references/mobile-figma-matcher/ios-swiftui.md +1 -1
  72. package/skills/massa-ai/references/mobile-figma-matcher/ios-uikit.md +1 -1
  73. package/skills/massa-ai/references/mobile-figma-matcher/kmp-compose-multiplatform.md +1 -1
  74. package/skills/massa-ai/references/mobile-figma-matcher/repository-detection.md +1 -1
  75. package/skills/massa-ai/references/naming-standards.md +1 -1
  76. package/skills/massa-ai/references/pr-task-fix.md +2 -2
  77. package/skills/massa-ai/references/project-context.md +2 -2
  78. package/skills/massa-ai/references/repo-rules-discovery.md +4 -4
  79. package/skills/massa-ai/references/rfc/discovery-and-sizing.md +1 -1
  80. package/skills/massa-ai/references/rfc/document-contract.md +1 -1
  81. package/skills/massa-ai/references/rfc/quality-and-lifecycle.md +1 -1
  82. package/skills/massa-ai/references/root-cause-scripts.md +2 -2
  83. package/skills/massa-ai/references/skill-architect/examples.md +256 -0
  84. package/skills/massa-ai/references/skill-architect/patterns.md +317 -0
  85. package/skills/massa-ai/references/skill-architect/quality-checklist.md +70 -0
  86. package/skills/massa-ai/references/sonarqube-mcp.md +73 -0
  87. package/skills/massa-ai/references/spec-driven/artifact-store.md +1 -1
  88. package/skills/massa-ai/references/spec-driven/brownfield-mapping.md +16 -0
  89. package/skills/massa-ai/references/spec-driven/code-analysis.md +1 -1
  90. package/skills/massa-ai/references/spec-driven/coding-principles.md +1 -1
  91. package/skills/massa-ai/references/spec-driven/context-limits.md +1 -1
  92. package/skills/massa-ai/references/spec-driven/design.md +22 -1
  93. package/skills/massa-ai/references/spec-driven/discuss.md +1 -1
  94. package/skills/massa-ai/references/spec-driven/execute.md +3 -1
  95. package/skills/massa-ai/references/spec-driven/memory.md +1 -1
  96. package/skills/massa-ai/references/spec-driven/specify.md +3 -3
  97. package/skills/massa-ai/references/spec-driven/sub-agents.md +1 -1
  98. package/skills/massa-ai/references/spec-driven/tasks.md +1 -1
  99. package/skills/massa-ai/references/spec-driven/validate.md +1 -1
  100. package/skills/massa-ai/references/subagent-design.md +4 -4
  101. package/skills/massa-ai/references/synapse-policy.md +1 -1
  102. package/skills/massa-ai/references/tdd/calibrated-examples.md +1 -1
  103. package/skills/massa-ai/references/tdd/discovery-and-sizing.md +1 -1
  104. package/skills/massa-ai/references/tdd/document-contract.md +1 -1
  105. package/skills/massa-ai/references/tdd/quality-and-lifecycle.md +1 -1
  106. package/skills/massa-ai/references/the-fool/cognitive-bias-inventory.md +1 -1
  107. package/skills/massa-ai/references/the-fool/dialectic-synthesis.md +1 -1
  108. package/skills/massa-ai/references/the-fool/evidence-audit.md +1 -1
  109. package/skills/massa-ai/references/the-fool/pre-mortem-analysis.md +1 -1
  110. package/skills/massa-ai/references/the-fool/red-team-adversarial.md +1 -1
  111. package/skills/massa-ai/references/the-fool/socratic-questioning.md +1 -1
  112. package/skills/massa-ai/references/ticket/atlassian-fix.md +1 -1
  113. package/skills/massa-ai/references/ticket/intake-and-sources.md +1 -1
  114. package/skills/massa-ai/references/ticket/templates-and-quality.md +1 -1
  115. package/skills/massa-ai/references/verification-ladder.md +1 -1
  116. package/skills/massa-ai/scripts/validate_audit_report.ts +382 -0
  117. package/skills/massa-ai/scripts/validate_design.ts +264 -0
  118. package/skills/massa-ai/scripts/validate_skill.ts +364 -0
  119. package/skills/massa-ai/workflows/adr.md +16 -8
  120. package/skills/massa-ai/workflows/architecture/architecture-audit.md +23 -40
  121. package/skills/massa-ai/workflows/architecture/architecture-fix.md +14 -6
  122. package/skills/massa-ai/workflows/bugs/bugs-audit.md +19 -35
  123. package/skills/massa-ai/workflows/bugs/bugs-fix.md +13 -5
  124. package/skills/massa-ai/workflows/code-quality/code-quality-audit.md +25 -41
  125. package/skills/massa-ai/workflows/code-quality/code-quality-fix.md +13 -5
  126. package/skills/massa-ai/workflows/commit.md +13 -5
  127. package/skills/massa-ai/workflows/debug.md +11 -3
  128. package/skills/massa-ai/workflows/design.md +15 -7
  129. package/skills/massa-ai/workflows/exploration.md +12 -4
  130. package/skills/massa-ai/workflows/feature.md +14 -13
  131. package/skills/massa-ai/workflows/general.md +13 -8
  132. package/skills/massa-ai/workflows/implementation/implementation-audit.md +15 -15
  133. package/skills/massa-ai/workflows/implementation/implementation-fix.md +13 -5
  134. package/skills/massa-ai/workflows/judge-with-debate.md +12 -4
  135. package/skills/massa-ai/workflows/long-session.md +10 -2
  136. package/skills/massa-ai/workflows/maestro/maestro-audit.md +11 -3
  137. package/skills/massa-ai/workflows/maestro/maestro-fix.md +12 -4
  138. package/skills/massa-ai/workflows/maestro/maestro.md +12 -4
  139. package/skills/massa-ai/workflows/mobile-figma/mobile-figma-audit.md +11 -3
  140. package/skills/massa-ai/workflows/mobile-figma/mobile-figma-fix.md +12 -4
  141. package/skills/massa-ai/workflows/onboarding.md +10 -2
  142. package/skills/massa-ai/workflows/refactor.md +12 -4
  143. package/skills/massa-ai/workflows/refinement/furps-refinement.md +12 -4
  144. package/skills/massa-ai/workflows/requirements/requirements-audit.md +19 -36
  145. package/skills/massa-ai/workflows/requirements/requirements-fix.md +13 -5
  146. package/skills/massa-ai/workflows/rfc.md +10 -2
  147. package/skills/massa-ai/workflows/security/security-audit.md +19 -35
  148. package/skills/massa-ai/workflows/security/security-fix.md +13 -5
  149. package/skills/massa-ai/workflows/skill-architect.md +393 -0
  150. package/skills/massa-ai/workflows/spec-driven.md +20 -23
  151. package/skills/massa-ai/workflows/tdd.md +10 -2
  152. package/skills/massa-ai/workflows/tests/tests-audit.md +19 -35
  153. package/skills/massa-ai/workflows/tests/tests-fix.md +13 -5
  154. package/skills/massa-ai/workflows/the-fool.md +11 -3
  155. package/skills/massa-ai/workflows/ticket.md +10 -2
  156. package/skills/massa-ai/workflows/to-prd.md +81 -0
@@ -1,12 +1,20 @@
1
+ ---
2
+ name: requirements-audit
3
+ description: "Findings-only review of whether a concrete target matches stated requirements without out-of-scope drift; routes correctness, security, and quality findings elsewhere."
4
+ license: MIT
5
+ metadata:
6
+ version: "1.1.0"
7
+ ---
8
+
1
9
  ### Requirements Audit
2
10
 
3
- Use this workflow for findings-only review of whether a concrete target matches stated requirements without out-of-scope drift. Accepted targets include modified files, explicit files/globs, commit ranges, branch comparisons, modules/packages, symbols/classes/functions, feature/runtime flows, explicitly requested whole-repo scope, or an implementation scope packet supplied by `workflows/implementation/implementation-audit.md`.
11
+ Findings-only review of whether a concrete target matches stated requirements without out-of-scope drift. Accepted targets include modified files, explicit files/globs, commit ranges, branch comparisons, modules/packages, symbols/classes/functions, feature/runtime flows, explicitly requested whole-repo scope, or an implementation scope packet supplied by `workflows/implementation/implementation-audit.md`.
4
12
 
5
- Before the first substantive read, load `references/project-context.md` and run the project-context intake sweep for this repository.
13
+ Load `references/project-context.md` (intake sweep) before the first substantive read.
6
14
 
7
- Do not use this workflow for generic correctness bugs, security findings, architecture findings, code quality findings, or test coverage findings. Route correctness bugs to `workflows/bugs/bugs-audit.md` and route the other categories to their dedicated workflows.
15
+ Not for generic correctness bugs, security findings, architecture findings, code quality findings, or test coverage findings. Route correctness bugs to `workflows/bugs/bugs-audit.md` and route the other categories to their dedicated workflows.
8
16
 
9
- This workflow is findings-only. Do not edit code unless the user separately asks for fixes.
17
+ Findings-only: do not edit code unless the user separately asks for fixes.
10
18
 
11
19
  1. Resolve/reuse `workflowSessionId`: `requirements-[entity]`
12
20
  2. Load shared references:
@@ -32,33 +40,8 @@ This workflow is findings-only. Do not edit code unless the user separately asks
32
40
  - 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`.
33
41
  - If requirements source is missing after checking the prompt, PR description, task file, spec, issue text, and repo docs, ask for the requirements source before proceeding.
34
42
  - Build the shared scope packet from `references/audit-scope.md` and carry it into the report.
35
- 5. For modified files scope:
36
- - Include staged and unstaged tracked files from the working tree.
37
- - Include untracked non-generated source, test, fixture, schema, config, and docs files only when they can affect required behavior.
38
- - Exclude deleted files unless their deletion can break required behavior, imports, exports, routing, migrations, config, tests, packaging, or documentation contracts.
39
- - Exclude generated, dependency, build, log, cache, temporary, and secret paths per repo rules.
40
- - Inspect diffs first, then only the surrounding code needed to compare implementation against requirements.
41
- 6. For commit range scope:
42
- - If the user supplied explicit commits or a revision range, use that exact range.
43
- - If the user asked for commits made by me, resolve author identity from `git config user.email`; if empty, use `git config user.name`.
44
- - For branch-relative commit scopes, resolve the branch base from the upstream merge-base first, then fall back in order to `origin/main`, `origin/master`, `main`, and `master`.
45
- - If the user asked for commits made by me, review branch-unique commits authored by the resolved identity.
46
- - If no explicit range, required author identity, or branch base can be resolved, ask the user for the missing value before proceeding.
47
- - Inspect changed files and diffs from those commits, then requirements sources, callers, tests, config, schemas, and docs only as needed.
48
- 7. For codebase area scope:
49
- - Require a concrete path, module, package, feature area, or glob.
50
- - If the target area is missing, ask for it before proceeding.
51
- - Follow the shared retrieval order from `references/codebase-investigation.md` to find entry points, public API, tests, config, docs, and acceptance criteria.
52
- 8. For explicit files/globs, branch comparison, symbol/class/function, feature/flow, or explicitly requested whole-repo scope:
53
- - Resolve the target with `references/audit-scope.md` and record the resolution method, base/head when relevant, resolved files, exclusions, requirements source, and freshness timestamp.
54
- - For symbol/class/function targets, inspect definitions, call paths, public contracts, tests, config, docs, and requirement links only as needed.
55
- - For feature/flow targets, map expected behavior from the requirements source to implementation, tests, docs, and public contracts.
56
- - If whole-repo scope is requested, map top-level requirement areas first and report skipped depth checks rather than implying exhaustive coverage.
57
- 9. For implementation parent scope:
58
- - Accept the exact scope packet and requirement source from `implementation-audit`.
59
- - Do not broaden beyond resolved files, surrounding code, public contracts, tests, config, docs, and requirements needed to verify a claim.
60
- - Return compact findings to the parent implementation audit; do not write broad project memories unless explicitly assigned.
61
- 10. Investigation pass. Dispatch `audit-specialist` per `references/agent-orchestration.md` when the scope justifies an isolated read-only subagent:
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, Requirements row of Per-Lens Scope Deltas). Implementation parent scope additionally carries the requirement source from `implementation-audit`.
44
+ 6. Investigation pass. Dispatch `audit-specialist` per `references/agent-orchestration.md` when the scope justifies an isolated read-only subagent:
62
45
 
63
46
  > **Dispatch: `massa-ai-audit-specialist`** (role: `audit-specialist`) — charter `skills/agents/audit-specialist/SKILL.md`
64
47
  > - trigger: large scope, explicit parallel/subagent request, PR subagent invocation, or independent verification of high-impact finding
@@ -75,16 +58,16 @@ This workflow is findings-only. Do not edit code unless the user separately asks
75
58
  - Compare implementation and tests against each checklist item.
76
59
  - Prioritize missing requirements, contradicted requirements, out-of-scope behavior, changed public contracts, compatibility breaks, incomplete edge cases, and docs or tests that misrepresent delivered behavior.
77
60
  - For each candidate finding, record the concrete claim, source evidence, affected requirement, impacted flow, provisional severity, and what would disprove it.
78
- 11. False-positive pass:
61
+ 7. False-positive pass:
79
62
  - Try to disprove every candidate before reporting it.
80
63
  - Check requirement wording, accepted scope changes, ADRs, feature flags, compatibility notes, tests, docs, call paths, and user-provided constraints.
81
64
  - Drop candidates disproven by evidence, downgrade candidates with partial mitigation, and mark low-confidence findings explicitly.
82
- 12. Severity rules (apply the countable threshold first, then the qualitative clause):
65
+ 8. Severity rules (apply the countable threshold first, then the qualitative clause):
83
66
  - `critical`: implementation violates a mandatory requirement in a way that blocks release, causes data loss, breaks auth/privacy, OR affects >10 files; otherwise use the qualitative clause below.
84
67
  - `high`: missing or contradictory core requirement, significant out-of-scope behavior, public contract break, or major compatibility regression.
85
68
  - `medium`: incomplete edge-case requirement, unclear acceptance gap, recoverable behavior mismatch (<=10 affected files), missing required docs/test coverage around a requirement, or scoped regression.
86
69
  - `low`: minor requirement ambiguity, wording mismatch, low-impact out-of-scope behavior, incomplete evidence, or weakly supported concern.
87
- 13. Final report:
70
+ 9. Final report:
88
71
  - Findings first, ordered by severity: `critical`, `high`, `medium`, `low`.
89
72
  - Each finding must use `REQ-<N>` and include the canonical fields from `references/audit-report-io.md`: severity, confidence, requirement source, requirement ID or quote, requirement gap type, file/line, evidence, impact, simplest fix direction, and verification suggestion.
90
73
  - If no requirements findings are found, say that clearly and list scope checked, requirement source used, and skipped checks.
@@ -93,11 +76,11 @@ This workflow is findings-only. Do not edit code unless the user separately asks
93
76
  - Include the Verification/Test Fidelity Checklist from `references/audit-report-io.md`; tie every `REQ-*` finding or no-finding claim to deterministic sensors, commands/artifacts, results, validation assets, or skipped-check reasons. Model judgment alone cannot satisfy verification/testing all-clear.
94
77
  - For direct top-level invocation, use the Plan Mode save rule and canonical report contract from `references/audit-report-io.md` for `audits/requirements/<YYYY-MM-DD requirements-audit>.md`.
95
78
  - For implementation audit child invocation, return compact findings to the parent unless the parent explicitly requests saved audit artifacts.
96
- 14. Persist only durable knowledge:
79
+ 10. Persist only durable knowledge:
97
80
  - Do not persist one-off findings.
98
81
  - Persist durable requirements decisions, accepted scope constraints, repeated requirement-drift patterns, or reusable verification recipes after scoring with the Importance Calibration System.
99
82
  - Use required tags: `project:<projectId>`, `session:<workflowSessionId>`, `workflow:requirements-audit`, `entity:<entity>`, and one `memory:<tier>` tag.
100
- 15. Complete the Evidence Gate from `references/evidence-gate.md`.
83
+ 11. Complete the Evidence Gate from `references/evidence-gate.md`.
101
84
 
102
85
  ## Examples
103
86
 
@@ -1,12 +1,20 @@
1
+ ---
2
+ name: requirements-fix
3
+ description: "Executes fixes from a saved requirements audit report; not for findings-only review or broad feature design when acceptance criteria are missing."
4
+ license: MIT
5
+ metadata:
6
+ version: "1.1.0"
7
+ ---
8
+
1
9
  ### Requirements Fix
2
10
 
3
- Use this workflow only to execute fixes from a requirements audit markdown report.
11
+ Execute fixes from a requirements audit markdown report only.
4
12
 
5
- Before the first substantive read, load `references/project-context.md` and run the project-context intake sweep for this repository.
13
+ Load `references/project-context.md` (intake sweep) before the first substantive read.
6
14
 
7
- Before the first repository mutation, load `references/implementation-delivery.md` for worktree isolation, atomic commits, PR creation, CI watch, and the merge gate, and `references/code-annotation.md` for doc blocks, rationale comments, and test coverage on every created or updated unit. If two consecutive fix attempts fail on the same symptom, stop editing and load `references/root-cause-scripts.md`.
15
+ Before the first repository mutation, load `references/implementation-delivery.md` (delivery chain: worktree, atomic commits, PR, CI watch, merge gate) and `references/code-annotation.md` (doc blocks, rationale, test coverage). After two consecutive failed fixes on one symptom, stop editing and load `references/root-cause-scripts.md`.
8
16
 
9
- Do not use this workflow for findings-only requirements review; route that to `workflows/requirements/requirements-audit.md`. Do not use it for broad feature design when acceptance criteria are missing; route that to `workflows/spec-driven.md`.
17
+ Not for findings-only requirements review — route to `workflows/requirements/requirements-audit.md`. Not for broad feature design when acceptance criteria are missing — route to `workflows/spec-driven.md`.
10
18
 
11
19
  1. Resolve/reuse `workflowSessionId`: `requirements-fix-[entity]`
12
20
  2. Load shared references:
@@ -23,7 +31,7 @@ Do not use this workflow for findings-only requirements review; route that to `w
23
31
  - If the user asks for "latest" or gives no path, require a concrete target focus first; do not run the latest requirements report against an unspecified target.
24
32
  - Select the latest `audits/requirements/<YYYY-MM-DD requirements-audit>.md` only after target focus is known, using `references/audit-report-io.md`.
25
33
  - Stop if no report exists; do not infer findings from conversation history.
26
- - Validate the report with `references/audit-report-io.md`: workflow, `ProjectId`, `Target`, `Target Focus`, scope, git base/head, required fields, `REQ-` IDs, requirement source, resolved files or material scope evidence, and current file/line evidence. Stop on invalid, stale, target-drifted, or ambiguous reports before editing.
34
+ - Validate the report deterministically: `bun skills/massa-ai/scripts/validate_audit_report.ts <path> --family requirements` (`references/audit-report-io.md`, Deterministic Validation, checks `Requirements Source` too); non-zero exit blocks editing. Also confirm resolved files or material scope evidence and current file/line evidence; stop on stale, target-drifted, or ambiguous reports.
27
35
  5. Extract actionable findings:
28
36
  - Keep findings with concrete `Requirement Source`, `Requirement ID or Quote`, `Requirement Gap Type`, `Location`, `Evidence`, `Impact`, `Simplest Fix Direction`, and `Verification Suggestion`.
29
37
  - Ignore ruled-out candidates and no-finding sections.
@@ -1,8 +1,16 @@
1
+ ---
2
+ name: rfc
3
+ description: "Use this workflow when a significant technical, process, product, vendor, tool, or policy decision is still open and stakeholders need a structured proposal before committing."
4
+ license: MIT
5
+ metadata:
6
+ version: "1.1.0"
7
+ ---
8
+
1
9
  ### RFC (Request for Comments)
2
10
 
3
- Use this workflow when a significant technical, process, product, vendor, tool, or policy decision is still open and stakeholders need a structured proposal before committing to a direction. Route a finalized architecture decision to `workflows/adr.md`, settled implementation design to `workflows/tdd.md`, and broad requirements-through-delivery work to `workflows/spec-driven.md`.
11
+ Use when a significant technical, process, product, vendor, tool, or policy decision is still open and stakeholders need a structured proposal before committing to a direction. Route a finalized architecture decision to `workflows/adr.md`, settled implementation design to `workflows/tdd.md`, and broad requirements-through-delivery work to `workflows/spec-driven.md`.
4
12
 
5
- Before the first substantive read, load `references/project-context.md` and run the project-context intake sweep for this repository.
13
+ Load `references/project-context.md` (intake sweep) before the first substantive read.
6
14
 
7
15
  ## Workflow
8
16
 
@@ -1,12 +1,20 @@
1
+ ---
2
+ name: security-audit
3
+ description: "Findings-only security review workflow for a concrete target; routes generic correctness bugs and other audit categories to their dedicated workflows."
4
+ license: MIT
5
+ metadata:
6
+ version: "1.1.0"
7
+ ---
8
+
1
9
  ### Security Audit
2
10
 
3
- Use this workflow for findings-only security review in a concrete target: modified files, explicit files/globs, commit ranges, branch comparisons, modules/packages, symbols/classes/functions, feature/runtime flows, explicitly requested whole-repo scope, or an implementation scope packet supplied by `workflows/implementation/implementation-audit.md`.
11
+ Findings-only security review scoped to a concrete target: modified files, explicit files/globs, commit ranges, branch comparisons, modules/packages, symbols/classes/functions, feature/runtime flows, explicitly requested whole-repo scope, or an implementation scope packet supplied by `workflows/implementation/implementation-audit.md`.
4
12
 
5
- Before the first substantive read, load `references/project-context.md` and run the project-context intake sweep for this repository.
13
+ Load `references/project-context.md` (intake sweep) before the first substantive read.
6
14
 
7
- Do not use this workflow for generic correctness bugs; route those to `workflows/bugs/bugs-audit.md`. Do not use it for broad architecture, code quality, requirements, or test coverage audits; route those to their dedicated workflows.
15
+ Not for generic correctness bugs — route to `workflows/bugs/bugs-audit.md`. Not for broad architecture, code quality, requirements, or test coverage audits — route to their dedicated workflows.
8
16
 
9
- This workflow is findings-only. Do not edit code unless the user separately asks for fixes.
17
+ Findings-only: do not edit code unless the user separately asks for fixes.
10
18
 
11
19
  1. Resolve/reuse `workflowSessionId`: `security-[entity]`
12
20
  2. Load shared references:
@@ -31,32 +39,8 @@ This workflow is findings-only. Do not edit code unless the user separately asks
31
39
  - Implementation parent scope: use only when `workflows/implementation/implementation-audit.md` invokes this workflow with a concrete implementation scope packet.
32
40
  - 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`.
33
41
  - Build the shared scope packet from `references/audit-scope.md` and carry it into the report.
34
- 5. For modified files scope:
35
- - Include staged and unstaged tracked files from the working tree.
36
- - Include untracked non-generated source, test, fixture, schema, config, and docs files only when they can affect runtime or validation behavior.
37
- - Exclude deleted files unless their deletion can break imports, exports, routing, migrations, config, tests, packaging, secrets handling, or policy enforcement.
38
- - Exclude generated, dependency, build, log, cache, temporary, and secret paths per repo rules.
39
- - Inspect diffs first, then only the surrounding code needed to understand security behavior.
40
- 6. For commit range scope:
41
- - If the user supplied explicit commits or a revision range, use that exact range.
42
- - If the user asked for commits made by me, resolve author identity from `git config user.email`; if empty, use `git config user.name`.
43
- - For branch-relative commit scopes, resolve the branch base from the upstream merge-base first, then fall back in order to `origin/main`, `origin/master`, `main`, and `master`.
44
- - If the user asked for commits made by me, review branch-unique commits authored by the resolved identity.
45
- - If no explicit range, required author identity, or branch base can be resolved, ask the user for the missing value before proceeding.
46
- - Inspect changed files and diffs from those commits, then auth boundaries, callers, tests, config, schemas, and policy definitions only as needed.
47
- 7. For codebase area scope:
48
- - Require a concrete path, module, package, feature area, or glob.
49
- - If the target area is missing, ask for it before proceeding.
50
- - Follow the shared retrieval order from `references/codebase-investigation.md` to find entry points, trust boundaries, policy checks, validators, tests, and adjacent config.
51
- 8. For explicit files/globs, branch comparison, symbol/class/function, feature/flow, or explicitly requested whole-repo scope:
52
- - Resolve the target with `references/audit-scope.md` and record the resolution method, base/head when relevant, resolved files, exclusions, and freshness timestamp.
53
- - For symbol/class/function targets, inspect definitions, call paths, trust boundaries, validators, policies, tests, config, and schemas only as needed.
54
- - For feature/flow targets, trace untrusted input, identity, authorization, validation, persistence, side effects, and logs through the named flow.
55
- - If whole-repo scope is requested, map major trust boundaries first and report skipped depth checks rather than implying exhaustive review.
56
- 9. For implementation parent scope:
57
- - Accept the exact scope packet from `implementation-audit`; do not broaden beyond resolved files, surrounding code, called auth/validation helpers, config, schemas, and tests needed to verify a security claim.
58
- - Return compact findings to the parent implementation audit; do not write broad project memories unless explicitly assigned.
59
- 10. Investigation pass. Dispatch `audit-specialist` per `references/agent-orchestration.md` when the scope justifies an isolated read-only subagent:
42
+ 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, Security row of Per-Lens Scope Deltas).
43
+ 6. Investigation pass. Dispatch `audit-specialist` per `references/agent-orchestration.md` when the scope justifies an isolated read-only subagent:
60
44
 
61
45
  > **Dispatch: `massa-ai-audit-specialist`** (role: `audit-specialist`) — charter `skills/agents/audit-specialist/SKILL.md`
62
46
  > - trigger: large scope, explicit parallel/subagent request, PR subagent invocation, or independent verification of high-impact finding
@@ -73,17 +57,17 @@ This workflow is findings-only. Do not edit code unless the user separately asks
73
57
  - Check authn/authz, object ownership, tenant isolation, input validation, output encoding, secret handling, cryptography use, SSRF/path traversal/injection risks, logging privacy, dependency/config exposure, and security-sensitive tests.
74
58
  - For mobile scopes, check secure storage/keychain/keystore use, permission states, deep links and auth guards, push token handling, biometrics, local DB/cache and offline queues, logs/crash reports/screenshots, native bridge payload trust, and backend-mobile contract skew from `references/mobile-context.md`.
75
59
  - For each candidate finding, record the concrete claim, source evidence, impacted asset or boundary, likely trigger, provisional severity, and what would disprove it.
76
- 11. False-positive pass:
60
+ 7. False-positive pass:
77
61
  - Try to disprove every candidate before reporting it.
78
62
  - Check guards, framework defaults, policy layers, middleware order, type checks, tests, feature flags, call paths, existing invariants, ADRs, and accepted exceptions.
79
63
  - Use official docs or web research only when current external API, framework, or security behavior matters.
80
64
  - Drop candidates disproven by evidence, downgrade candidates with partial mitigation, and mark low-confidence findings explicitly.
81
- 12. Severity rules (apply the countable threshold first, then the qualitative clause):
65
+ 8. Severity rules (apply the countable threshold first, then the qualitative clause):
82
66
  - `critical`: likely auth bypass, privilege escalation, data exfiltration, secret exposure, remote code execution, tenant break, irreversible data corruption, OR affects >10 files; otherwise use the qualitative clause below.
83
67
  - `high`: likely missing authorization, injection risk, sensitive data leak, broken security boundary, unsafe deserialization, or severe config exposure.
84
68
  - `medium`: real edge-flow security bug, incomplete validation, privacy leak with limited scope (<=10 affected files), weak cryptographic/config practice with plausible exploitation, or meaningful test gap around security logic.
85
69
  - `low`: defensive hardening opportunity, low-impact information exposure, incomplete evidence, or weakly supported concern.
86
- 13. Final report:
70
+ 9. Final report:
87
71
  - Findings first, ordered by severity: `critical`, `high`, `medium`, `low`.
88
72
  - Each finding must use `SEC-<N>` and include the canonical fields from `references/audit-report-io.md`: severity, confidence, file/line, evidence, security boundary, asset, trigger or exploit path, negative test direction, simplest fix direction, and verification suggestion.
89
73
  - If no security findings are found, say that clearly and list scope checked plus skipped checks.
@@ -92,11 +76,11 @@ This workflow is findings-only. Do not edit code unless the user separately asks
92
76
  - Include the Verification/Test Fidelity Checklist from `references/audit-report-io.md`; tie every `SEC-*` finding or no-finding claim to deterministic sensors, commands/artifacts, results, validation assets, or skipped-check reasons. Model judgment alone cannot satisfy verification/testing all-clear.
93
77
  - For direct top-level invocation, use the Plan Mode save rule and canonical report contract from `references/audit-report-io.md` for `audits/security/<YYYY-MM-DD security-audit>.md`.
94
78
  - For implementation audit child invocation, return compact findings to the parent unless the parent explicitly requests saved audit artifacts.
95
- 14. Persist only durable knowledge:
79
+ 10. Persist only durable knowledge:
96
80
  - Do not persist one-off findings.
97
81
  - Persist repeated security patterns, project-specific security boundaries, accepted exceptions, or reusable verification recipes after scoring with the Importance Calibration System.
98
82
  - Use required tags: `project:<projectId>`, `session:<workflowSessionId>`, `workflow:security-audit`, `entity:<entity>`, and one `memory:<tier>` tag.
99
- 15. Complete the Evidence Gate from `references/evidence-gate.md`.
83
+ 11. Complete the Evidence Gate from `references/evidence-gate.md`.
100
84
 
101
85
  ## Examples
102
86
 
@@ -1,12 +1,20 @@
1
+ ---
2
+ name: security-fix
3
+ description: "Executes fixes from a saved security audit report; not for findings-only security review or generic correctness fixes outside an exploitable path."
4
+ license: MIT
5
+ metadata:
6
+ version: "1.1.0"
7
+ ---
8
+
1
9
  ### Security Fix
2
10
 
3
- Use this workflow only to execute fixes from a security audit markdown report.
11
+ Execute fixes from a security audit markdown report only.
4
12
 
5
- Before the first substantive read, load `references/project-context.md` and run the project-context intake sweep for this repository.
13
+ Load `references/project-context.md` (intake sweep) before the first substantive read.
6
14
 
7
- Before the first repository mutation, load `references/implementation-delivery.md` for worktree isolation, atomic commits, PR creation, CI watch, and the merge gate, and `references/code-annotation.md` for doc blocks, rationale comments, and test coverage on every created or updated unit. If two consecutive fix attempts fail on the same symptom, stop editing and load `references/root-cause-scripts.md`.
15
+ Before the first repository mutation, load `references/implementation-delivery.md` (delivery chain: worktree, atomic commits, PR, CI watch, merge gate) and `references/code-annotation.md` (doc blocks, rationale, test coverage). After two consecutive failed fixes on one symptom, stop editing and load `references/root-cause-scripts.md`.
8
16
 
9
- Do not use this workflow for findings-only security review; route that to `workflows/security/security-audit.md`. Do not use it for generic correctness fixes unless the security report identifies the correctness issue as part of an exploitable path.
17
+ Not for findings-only security review — route to `workflows/security/security-audit.md`. Not for generic correctness fixes unless the security report identifies the correctness issue as part of an exploitable path.
10
18
 
11
19
  1. Resolve/reuse `workflowSessionId`: `security-fix-[entity]`
12
20
  2. Load shared references:
@@ -24,7 +32,7 @@ Do not use this workflow for findings-only security review; route that to `workf
24
32
  - If the user asks for "latest" or gives no path, require a concrete target focus first; do not run the latest security report against an unspecified target.
25
33
  - Select the latest `audits/security/<YYYY-MM-DD security-audit>.md` only after target focus is known, using `references/audit-report-io.md`.
26
34
  - Stop if no report exists; do not infer findings from conversation history.
27
- - Validate the report with `references/audit-report-io.md`: workflow, `ProjectId`, `Target`, `Target Focus`, scope, git base/head, required fields, `SEC-` IDs, resolved files or material scope evidence, and current file/line evidence. Stop on invalid, stale, target-drifted, or ambiguous reports before editing.
35
+ - Validate the report deterministically: `bun skills/massa-ai/scripts/validate_audit_report.ts <path> --family security` (`references/audit-report-io.md`, Deterministic Validation); non-zero exit blocks editing. Also confirm resolved files or material scope evidence and current file/line evidence; stop on stale, target-drifted, or ambiguous reports.
28
36
  5. Extract actionable findings:
29
37
  - Keep findings with concrete `Security Boundary`, `Asset`, `Location`, `Evidence`, exploit path or trigger, `Negative Test Direction`, `Simplest Fix Direction`, and `Verification Suggestion`.
30
38
  - Ignore ruled-out candidates, no-finding sections, and low-confidence hardening ideas unless the user explicitly asks to include them.