@massa-ai/codex-plugin 1.26.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-judge.toml +3 -6
- package/agent-profiles/balanced/massa-ai-meta-judge.toml +2 -5
- package/agent-profiles/balanced/massa-ai-navigator.toml +1 -1
- package/agent-profiles/cheap/massa-ai-judge.toml +3 -6
- package/agent-profiles/cheap/massa-ai-meta-judge.toml +2 -5
- package/agent-profiles/cheap/massa-ai-navigator.toml +1 -1
- package/agent-profiles/heavy/massa-ai-judge.toml +3 -6
- package/agent-profiles/heavy/massa-ai-meta-judge.toml +2 -5
- package/agent-profiles/heavy/massa-ai-navigator.toml +1 -1
- package/agent-profiles/home/massa-ai-judge.toml +3 -6
- package/agent-profiles/home/massa-ai-meta-judge.toml +2 -5
- package/agent-profiles/home/massa-ai-navigator.toml +1 -1
- package/agent-profiles/work/massa-ai-judge.toml +3 -6
- package/agent-profiles/work/massa-ai-meta-judge.toml +2 -5
- package/agent-profiles/work/massa-ai-navigator.toml +1 -1
- 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/package.json +1 -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
|
@@ -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
|
-
|
|
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
|
-
|
|
13
|
+
Load `references/project-context.md` (intake sweep) before the first substantive read.
|
|
6
14
|
|
|
7
|
-
|
|
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
|
-
|
|
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.
|
|
36
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
11
|
+
Execute fixes from a requirements audit markdown report only.
|
|
4
12
|
|
|
5
|
-
|
|
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`
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
13
|
+
Load `references/project-context.md` (intake sweep) before the first substantive read.
|
|
6
14
|
|
|
7
|
-
|
|
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
|
-
|
|
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.
|
|
35
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
11
|
+
Execute fixes from a security audit markdown report only.
|
|
4
12
|
|
|
5
|
-
|
|
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`
|
|
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
|
-
|
|
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
|
|
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.
|
|
@@ -1,10 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec-driven
|
|
3
|
+
description: "Use this workflow for explicit spec-driven requests and broad, ambiguous, migration-heavy, or cross-boundary delivery needing requirements-through-verification control."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
version: "1.1.0"
|
|
7
|
+
---
|
|
8
|
+
|
|
1
9
|
### Spec-Driven
|
|
2
10
|
|
|
3
|
-
Use
|
|
11
|
+
Use for explicit spec-driven requests and broad, ambiguous, migration-heavy, cross-boundary, public-contract, or long-running delivery that needs requirements-through-verification control. Ordinary localized fixes and clear small features stay in `debug`, `feature`, `refactor`, or `general` unless the user explicitly requests this workflow.
|
|
4
12
|
|
|
5
|
-
|
|
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`
|
|
15
|
+
Before the first repository mutation, load `references/implementation-delivery.md` (delivery chain: worktree, atomic commits, PR, CI watch, merge gate), `references/code-annotation.md` (doc blocks, rationale, test coverage), and `references/repo-rules-discovery.md` (enforce the target repo's own `.claude/`/`.cursor/` and module/test conventions). After two consecutive failed fixes on one symptom, stop editing and load `references/root-cause-scripts.md`.
|
|
8
16
|
|
|
9
17
|
## TLC v3 Flow
|
|
10
18
|
|
|
@@ -40,7 +48,7 @@ Complexity determines depth, not a fixed pipeline. Assess scope first, apply onl
|
|
|
40
48
|
| Large | >10 tasks OR multi-component feature | Full spec + requirement IDs | Architecture + components | Full breakdown + deps | Implement + verify per task |
|
|
41
49
|
| Complex | Ambiguity or new domain (unfamiliar vocabulary, no prior pattern) | Full spec + discuss gray areas | Research + architecture | Breakdown + phase plan | Implement + interactive UAT |
|
|
42
50
|
|
|
43
|
-
A "Phase" is an ordered group of Tasks sharing a dependency boundary or a checkpoint commit —
|
|
51
|
+
A "Phase" is an ordered group of Tasks sharing a dependency boundary or a checkpoint commit — distinct from a single Task or atomic step. Report sizing in the uniform vocabulary: `1 Phase = X Tasks`; the whole plan is `Y Phases = Z Tasks`. The sub-agent offer fires when a formal `tasks.md` has more than 3 Tasks — packing itself still uses ~7-Task Phase groups; a 4–8-Task feature is offered as a single Phase-group worker.
|
|
44
52
|
|
|
45
53
|
- Specify and Execute are always required.
|
|
46
54
|
- Design is skipped when straightforward (no architectural decisions, no new patterns).
|
|
@@ -50,7 +58,7 @@ A "Phase" is an ordered group of Tasks sharing a dependency boundary or a checkp
|
|
|
50
58
|
|
|
51
59
|
## Quick Mode Guardrails
|
|
52
60
|
|
|
53
|
-
Quick mode is the Small/auto-sized path: a single change touching **max 3 files** with no new dependency and no design decision.
|
|
61
|
+
Quick mode is the Small/auto-sized path: a single change touching **max 3 files** with no new dependency and no design decision. Fast lane, not a parallel pipeline — it still closes requirements and runs the Execute gate.
|
|
54
62
|
|
|
55
63
|
Enter Quick mode only when **all** hold:
|
|
56
64
|
|
|
@@ -74,7 +82,7 @@ Quick artifacts live under `.specs/quick/NNN-slug/` with a `TASK.md` (one-line i
|
|
|
74
82
|
2. Restore context before planning:
|
|
75
83
|
- `recall` for exact-session continuity, durable decisions, rejected approaches, patterns, blockers, and handoffs.
|
|
76
84
|
- Load `references/spec-driven/artifact-store.md` before reading or writing feature registry, state, handoff, phase artifacts, validation reports, or lessons.
|
|
77
|
-
- Load `references/synapse-policy.md` when two or more related searches are expected.
|
|
85
|
+
- Load `references/synapse-policy.md` when two or more related searches are expected. For multi-search investigations, run the Synapse task envelope per that reference: `synapse_task_begin` before the first search, `synapse_prefetch` on deep file open, `synapse_task_end` at completion (both `task` calls require an existing `synapse_session` id).
|
|
78
86
|
- Load `references/context-firewall.md` before broad source inspection, generated reports, external research, or verbose tool output.
|
|
79
87
|
- Keep the loaded context budget under the `references/spec-driven/context-limits.md` target; summarize or narrow before loading bulky artifacts.
|
|
80
88
|
- Use `references/spec-driven/code-analysis.md` when source inspection needs structural search or tool fallback.
|
|
@@ -85,19 +93,18 @@ Quick artifacts live under `.specs/quick/NNN-slug/` with a `TASK.md` (one-line i
|
|
|
85
93
|
3. Run `Specify` with `references/spec-driven/specify.md`.
|
|
86
94
|
- Capture stable requirement IDs, testable acceptance criteria, edge cases, and explicit out-of-scope items.
|
|
87
95
|
- Run `references/spec-driven/discuss.md` inside Specify when gray areas, implicit requirements, persistence/state, external calls, auth, payments, concurrency, or state transitions affect behavior.
|
|
88
|
-
- For Android, iOS, or KMP Compose Multiplatform UI work,
|
|
96
|
+
- For Android, iOS, or KMP Compose Multiplatform UI work, run the optional design-source intake gate from `references/mobile-context.md` (Design-Source Intake Gate).
|
|
89
97
|
- Apply the Requirement Closure Gate: every open requirement question is resolved with the user or recorded as an accepted assumption before execution begins.
|
|
90
|
-
4. Decide whether `Design` is required. If yes, run `references/spec-driven/design.md
|
|
98
|
+
4. Decide whether `Design` is required. If yes, run `references/spec-driven/design.md`, including its deterministic validation before presenting `design.md` for confirmation; if no, record why the skip is valid. When Design is skipped and a design concern appears later, stop and create `design.md` before continuing.
|
|
91
99
|
5. Decide whether `Tasks` is required. If yes, run `references/spec-driven/tasks.md`; if no, list the inline atomic execution steps before editing. If the inline list reveals more than 5 steps or complex dependencies, stop and create `tasks.md` — the Tasks phase was wrongly skipped (safety valve).
|
|
92
100
|
6. Run `Execute` with `references/spec-driven/execute.md`.
|
|
93
101
|
- Load `references/spec-driven/coding-principles.md` before implementation.
|
|
94
102
|
- Run repo-rules discovery from `references/repo-rules-discovery.md` before the first repository mutation: record the harness sources loaded (or `repo-rules: none present`), and implement so every new or changed file conforms to the target repo's module layout, unit-test location, and testing-area conventions. A repo rule wins over a skill default for placement and gate commands; record any deviation with an explicit reason. Never fabricate rules or create `.claude/`/`.cursor/` directories the repo lacks.
|
|
95
103
|
- Use the Test Coverage Matrix and Gate Check Commands from `tasks.md`, or state their inline equivalents when Tasks was skipped.
|
|
96
104
|
- Ask the MCP and skill question in Tasks or inline Execute when tool choice can change correctness or verification.
|
|
97
|
-
- If a formal `tasks.md` has more than 3 Tasks, present the sub-agent offer from `references/spec-driven/sub-agents.md` before starting Execute — even when packing yields a single Phase group (a 4–8-Task feature is offered as one Phase-group worker).
|
|
105
|
+
- If a formal `tasks.md` has more than 3 Tasks, present the sub-agent offer from `references/spec-driven/sub-agents.md` before starting Execute — even when packing yields a single Phase group (a 4–8-Task feature is offered as one Phase-group worker).
|
|
98
106
|
- Implement one atomic step or approved task at a time.
|
|
99
|
-
- For long-running task sequences,
|
|
100
|
-
- If resuming after interruption, call `list_checkpoints` with the `taskId` and `restore_checkpoint` to recover task state before continuing. If `create_checkpoint` is unavailable (e.g. `task_checkpoints` table missing), continue with `.specs/` artifact state as the fallback.
|
|
107
|
+
- For long-running task sequences, use the checkpoint mechanism in `references/spec-driven/execute.md` (Pause / End of Session) so progress is resumable after interruption.
|
|
101
108
|
- Use per-task commits when the environment and user permissions allow commits; otherwise record the skipped reason.
|
|
102
109
|
- Keep validation assets protected.
|
|
103
110
|
- Update logical feature artifacts in `.specs/features/<slug>/` and `.specs/project/STATE.md` after meaningful progress.
|
|
@@ -117,7 +124,7 @@ Quick artifacts live under `.specs/quick/NNN-slug/` with a `TASK.md` (one-line i
|
|
|
117
124
|
- The verification-agent re-derives coverage independently using evidence-or-zero and does not inherit the author's mental model.
|
|
118
125
|
- The fix → re-verify loop is capped at 3 iterations before escalating to `Blocked`.
|
|
119
126
|
- Distill lesson signals through `references/lessons.md` when validation produces grounded reusable failures.
|
|
120
|
-
7. Before the delivery chain's Propose stage (PR creation), write and commit `.specs/project/STATE.md`, `.specs/HANDOFF.md`, and `.specs/project/FEATURES.json` on the branch — not merely "after meaningful progress" during Execute, but committed before `gh pr create`. **Deterministic backing (run it, do not eyeball it):** `bun skills/massa-ai/scripts/check_specs_delivered.ts <feature> [--root .]` — a non-zero exit blocks Propose (see `references/implementation-delivery.md` stage 3.5 and GATE-02). If no code-execution tool is available, run the same checks by reading the artifact (graceful degradation preserved). Record
|
|
127
|
+
7. Before the delivery chain's Propose stage (PR creation), write and commit `.specs/project/STATE.md`, `.specs/HANDOFF.md`, and `.specs/project/FEATURES.json` on the branch — not merely "after meaningful progress" during Execute, but committed before `gh pr create`. **Deterministic backing (run it, do not eyeball it):** `bun skills/massa-ai/scripts/check_specs_delivered.ts <feature> [--root .]` — a non-zero exit blocks Propose (see `references/implementation-delivery.md` stage 3.5 and GATE-02). If no code-execution tool is available, run the same checks by reading the artifact (graceful degradation preserved). Record decisions, blockers, handoff, and completion evidence per `references/spec-driven/memory.md`'s write triggers.
|
|
121
128
|
8. When the user splits planning and implementation across clean chats, resume from the canonical `.specs/` artifacts — `.specs/project/STATE.md`, `.specs/project/FEATURES.json`, `.specs/HANDOFF.md`, and the feature's phase files. This workflow owns the spec phase contracts on both sides of the split; there is no separate save/load procedure.
|
|
122
129
|
9. Complete the configured Plan Challenge Gate for non-trivial plans and complete `references/evidence-gate.md` before claiming completion.
|
|
123
130
|
|
|
@@ -166,17 +173,7 @@ Step 5: Flag as uncertain → "I'm not certain about X — here's my reasoning,
|
|
|
166
173
|
|
|
167
174
|
## Brownfield Onboarding — 7-Doc Codebase Mapping
|
|
168
175
|
|
|
169
|
-
When the spec-driven work targets a codebase the agent has not yet mapped (brownfield, new repo, or cold project), derive
|
|
170
|
-
|
|
171
|
-
| Doc | Derives | Feeds |
|
|
172
|
-
| --- | --- | --- |
|
|
173
|
-
| `STACK.md` | languages, runtimes, frameworks, key libraries | Design constraints, verification commands |
|
|
174
|
-
| `ARCHITECTURE.md` | layers, modules, boundaries, data flow | Design, risk surface |
|
|
175
|
-
| `CONVENTIONS.md` | naming, file layout, commit/test conventions | Tasks, Execute |
|
|
176
|
-
| `STRUCTURE.md` | directory map, where new code goes | Tasks, file placement |
|
|
177
|
-
| `TESTING.md` | test runner, how to run gates, coverage tooling | Gate Check Commands, verification recipe |
|
|
178
|
-
| `INTEGRATIONS.md` | external services, APIs, contracts, auth | Discuss, risk escalation |
|
|
179
|
-
| `CONCERNS.md` | known risks, tech debt, migration landmines, security/privacy hotspots | Risk-domain escalation, validation focus |
|
|
176
|
+
When the spec-driven work targets a codebase the agent has not yet mapped (brownfield, new repo, or cold project), derive the 7-doc codebase map from `references/spec-driven/brownfield-mapping.md` before Specify closes — not busywork, each doc feeds a downstream phase.
|
|
180
177
|
|
|
181
178
|
Minimum bar: derive at least **`CONCERNS.md`** (risk surface — drives risk-domain escalation and validation focus) and **`TESTING.md`** (gate derivation — exact commands the Execute gate will run). If time or access is constrained, these two are non-negotiable; the other five are derived as the work needs them. Record the map under `.specs/features/<slug>/` (or the project onboarding dir) and confirm it against current source, not memory or external summaries.
|
|
182
179
|
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tdd
|
|
3
|
+
description: "Use this workflow to write a Technical Design Document once one product direction is selected and no unresolved API, data, security, or rollout decision blocks implementation."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
version: "1.1.0"
|
|
7
|
+
---
|
|
8
|
+
|
|
1
9
|
### TDD (Technical Design Document)
|
|
2
10
|
|
|
3
|
-
Use
|
|
11
|
+
Use when the readiness checklist is true: one product direction is selected, a named requirements source exists, and no unresolved API, data, security/privacy, migration, rollout, or public compatibility decision blocks implementation design. Route unresolved proposals or competing directions to `workflows/rfc.md`, isolated finalized architecture decisions to `workflows/adr.md`, and broad requirements-to-delivery work to `workflows/spec-driven.md`.
|
|
4
12
|
|
|
5
|
-
|
|
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: tests-audit
|
|
3
|
+
description: "Findings-only audit of test coverage, regression protection, assertion quality, fixture reliability, and missing deterministic sensors in a concrete target."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
version: "1.1.0"
|
|
7
|
+
---
|
|
8
|
+
|
|
1
9
|
### Tests Audit
|
|
2
10
|
|
|
3
|
-
|
|
11
|
+
Findings-only audit of test coverage, regression protection, assertion quality, fixture reliability, and missing deterministic sensors, 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
|
-
|
|
13
|
+
Load `references/project-context.md` (intake sweep) before the first substantive read.
|
|
6
14
|
|
|
7
|
-
|
|
15
|
+
Not to write, run, or fix test findings as the main task — route to `workflows/tests/tests-fix.md`. Not for generic correctness, security, architecture, code quality, or requirements findings — route to the dedicated workflows.
|
|
8
16
|
|
|
9
|
-
|
|
17
|
+
Findings-only: do not edit code unless the user separately asks for fixes.
|
|
10
18
|
|
|
11
19
|
1. Resolve/reuse `workflowSessionId`: `test-audit-[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.
|
|
35
|
-
|
|
36
|
-
- Include untracked non-generated source, test, fixture, schema, config, and docs files only when they can affect runtime, validation, or test behavior.
|
|
37
|
-
- Exclude deleted files unless their deletion can break test coverage, imports, exports, routing, migrations, config, tests, or packaging.
|
|
38
|
-
- Exclude generated, dependency, build, log, cache, temporary, and secret paths per repo rules.
|
|
39
|
-
- Inspect diffs first, then tests and surrounding code needed to understand regression risk.
|
|
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 tests, fixtures, config, schemas, and prior bug patterns 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 production entry points, tests, fixtures, mocks, test commands, and coverage-sensitive 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, behavior contracts, tests, fixtures, mocks, and test commands only as needed.
|
|
54
|
-
- For feature/flow targets, map changed or targeted behavior to existing tests and deterministic harnesses.
|
|
55
|
-
- If whole-repo scope is requested, map major test surfaces first and report skipped depth checks rather than implying exhaustive coverage.
|
|
56
|
-
9. For implementation parent scope:
|
|
57
|
-
- Accept the exact scope packet from `implementation-audit`; do not broaden beyond resolved files, nearby tests, fixtures, config, and callers needed to verify regression protection.
|
|
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, Tests 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
|
|
@@ -74,17 +58,17 @@ This workflow is findings-only. Do not edit code unless the user separately asks
|
|
|
74
58
|
- For mobile scopes, check KMP shared and platform-specific `actual` tests, Android/iOS harnesses, native bridge payload coverage, permissions, lifecycle, offline sync, deep links, push/background flows, UI snapshots/screenshots, device-matrix assumptions, and platform parity claims from `references/mobile-context.md`.
|
|
75
59
|
- Check weak assertions, tests that only assert implementation details, fixture drift, nondeterminism, hidden network/time/filesystem dependencies, skipped tests, and weakened snapshots.
|
|
76
60
|
- For each candidate finding, record the concrete claim, source evidence, impacted behavior, likely regression path, provisional severity, and what would disprove it.
|
|
77
|
-
|
|
61
|
+
7. False-positive pass:
|
|
78
62
|
- Try to disprove every candidate before reporting it.
|
|
79
63
|
- Check existing unit, integration, e2e, contract, snapshot, fixture, and harness coverage; also check framework-generated coverage and accepted exceptions.
|
|
80
64
|
- If a deterministic test command is cheap and in scope, run it as a sensor; if not, report the skipped command and reason.
|
|
81
65
|
- Drop candidates disproven by evidence, downgrade candidates with partial mitigation, and mark low-confidence findings explicitly.
|
|
82
|
-
|
|
66
|
+
8. Severity rules (apply the countable threshold first, then the qualitative clause):
|
|
83
67
|
- `critical`: missing or broken tests around data loss, auth/privacy, migration, deployment-blocking, irreversible corruption risk, OR >10 affected files; otherwise use the qualitative clause below.
|
|
84
68
|
- `high`: missing or weak tests around a core flow, public contract, persistence behavior, validation, security boundary, or severe regression risk.
|
|
85
69
|
- `medium`: missing edge-flow coverage, flaky or nondeterministic test risk, fixture drift, weak assertions, or missing regression coverage around changed logic (<=10 affected files).
|
|
86
70
|
- `low`: minor coverage gap, low-impact assertion hardening, incomplete evidence, or weakly supported concern.
|
|
87
|
-
|
|
71
|
+
9. Final report:
|
|
88
72
|
- Findings first, ordered by severity: `critical`, `high`, `medium`, `low`.
|
|
89
73
|
- Each finding must use `TST-<N>` and include the canonical fields from `references/audit-report-io.md`: severity, confidence, file/line, evidence, impacted behavior, regression risk, simplest test direction, deterministic sensor, and verification suggestion.
|
|
90
74
|
- If no test audit findings are found, say that clearly and list scope checked plus skipped checks.
|
|
@@ -93,11 +77,11 @@ This workflow is findings-only. Do not edit code unless the user separately asks
|
|
|
93
77
|
- Include the Verification/Test Fidelity Checklist from `references/audit-report-io.md`; tie every `TST-*` 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
78
|
- For direct top-level invocation, use the Plan Mode save rule and canonical report contract from `references/audit-report-io.md` for `audits/tests/<YYYY-MM-DD tests-audit>.md`.
|
|
95
79
|
- For implementation audit child invocation, return compact findings to the parent unless the parent explicitly requests saved audit artifacts.
|
|
96
|
-
|
|
80
|
+
10. Persist only durable knowledge:
|
|
97
81
|
- Do not persist one-off findings.
|
|
98
82
|
- Persist repeated test gap patterns, project-specific testing conventions, accepted exceptions, flaky-test patterns, or reusable verification recipes after scoring with the Importance Calibration System.
|
|
99
83
|
- Use required tags: `project:<projectId>`, `session:<workflowSessionId>`, `workflow:tests-audit`, `entity:<entity>`, and one `memory:<tier>` tag.
|
|
100
|
-
|
|
84
|
+
11. Complete the Evidence Gate from `references/evidence-gate.md`.
|
|
101
85
|
|
|
102
86
|
## Examples
|
|
103
87
|
|
|
@@ -1,12 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tests-fix
|
|
3
|
+
description: "Executes fixes from a saved tests audit report; not for findings-only coverage review or generic test-writing work without an audit report."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
version: "1.1.0"
|
|
7
|
+
---
|
|
8
|
+
|
|
1
9
|
### Tests Fix
|
|
2
10
|
|
|
3
|
-
|
|
11
|
+
Execute fixes from a tests audit markdown report only.
|
|
4
12
|
|
|
5
|
-
|
|
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`
|
|
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
|
-
|
|
17
|
+
Not for findings-only test coverage, assertion quality, fixture health, flakiness, or regression-risk review — route to `workflows/tests/tests-audit.md`. Not for generic "write some tests" work without an audit report — route broad test planning through the relevant feature, debug, refactor, or spec-driven workflow.
|
|
10
18
|
|
|
11
19
|
1. Resolve/reuse `workflowSessionId`: `tests-fix-[entity]`
|
|
12
20
|
2. Load shared references:
|
|
@@ -24,7 +32,7 @@ Do not use this workflow for findings-only test coverage, assertion quality, fix
|
|
|
24
32
|
- If the user asks for "latest" or gives no path, require a concrete target focus first; do not run the latest tests report against an unspecified target.
|
|
25
33
|
- Select the latest `audits/tests/<YYYY-MM-DD tests-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
|
|
35
|
+
- Validate the report deterministically: `bun skills/massa-ai/scripts/validate_audit_report.ts <path> --family tests` (`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 test findings:
|
|
29
37
|
- Keep findings with concrete `Location`, `Evidence`, impacted behavior, regression risk, `Simplest Test Direction`, `Deterministic Sensor`, 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.
|
|
@@ -1,10 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: the-fool
|
|
3
|
+
description: "Use this workflow for direct requests to challenge ideas, plans, decisions, or evidence, and as the configured post-plan challenge gate after other workflows construct a plan."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
version: "1.1.0"
|
|
7
|
+
---
|
|
8
|
+
|
|
1
9
|
### The Fool
|
|
2
10
|
|
|
3
|
-
Use
|
|
11
|
+
Use for direct requests to challenge ideas, plans, decisions, proposals, architectures, evidence, or assumptions. Also use as the configured post-plan challenge gate after other massa-ai workflows construct a plan.
|
|
4
12
|
|
|
5
|
-
|
|
13
|
+
Load `references/project-context.md` (intake sweep) before the first substantive read.
|
|
6
14
|
|
|
7
|
-
|
|
15
|
+
Not to build the initial plan, make the decision, or execute implementation work. It critiques and strengthens existing thinking.
|
|
8
16
|
|
|
9
17
|
## Configuration
|
|
10
18
|
|