@massa-ai/claude-plugin 1.63.1 → 1.64.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 (43) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/agent-profiles/balanced/code-explorer.md +1 -1
  3. package/agent-profiles/cheap/code-explorer.md +1 -1
  4. package/agent-profiles/heavy/code-explorer.md +1 -1
  5. package/agent-profiles/home/code-explorer.md +1 -1
  6. package/agent-profiles/work/code-explorer.md +1 -1
  7. package/agents/code-explorer.md +1 -1
  8. package/commands/the-fool.md +1 -1
  9. package/package.json +1 -1
  10. package/skills/agents/code-explorer/SKILL.md +1 -1
  11. package/skills/bootstrap/SKILL.md +6 -6
  12. package/skills/massa-ai/SKILL.md +9 -8
  13. package/skills/massa-ai/references/agent-orchestration.md +7 -10
  14. package/skills/massa-ai/references/architecture-lenses.md +1 -21
  15. package/skills/massa-ai/references/artifact-persistence.md +2 -0
  16. package/skills/massa-ai/references/codebase-investigation.md +29 -9
  17. package/skills/massa-ai/references/conversation-feedback.md +18 -38
  18. package/skills/massa-ai/references/create-rfc/quality-and-lifecycle.md +1 -1
  19. package/skills/massa-ai/references/create-tdd/quality-and-lifecycle.md +1 -1
  20. package/skills/massa-ai/references/decision-engine.md +4 -8
  21. package/skills/massa-ai/references/design-implementation.md +27 -26
  22. package/skills/massa-ai/references/lessons.md +13 -20
  23. package/skills/massa-ai/references/mcp-tools.md +11 -24
  24. package/skills/massa-ai/references/mobile-figma-matcher/repository-detection.md +13 -1
  25. package/skills/massa-ai/references/pr-task-fix.md +5 -13
  26. package/skills/massa-ai/references/spec-driven/code-analysis.md +10 -7
  27. package/skills/massa-ai/references/spec-driven/coding-principles.md +14 -49
  28. package/skills/massa-ai/references/spec-driven/memory.md +6 -15
  29. package/skills/massa-ai/references/spec-driven/tasks.md +1 -1
  30. package/skills/massa-ai/references/spec-driven/validate.md +2 -2
  31. package/skills/massa-ai/references/synapse-policy.md +3 -4
  32. package/skills/massa-ai/workflows/create-adr.md +1 -1
  33. package/skills/massa-ai/workflows/create-rfc.md +1 -1
  34. package/skills/massa-ai/workflows/create-tdd.md +1 -1
  35. package/skills/massa-ai/workflows/design.md +1 -1
  36. package/skills/massa-ai/workflows/exploration.md +2 -4
  37. package/skills/massa-ai/workflows/refactor.md +1 -1
  38. package/skills/massa-ai/workflows/refinement/furps-refinement.md +1 -1
  39. package/skills/massa-ai/workflows/spec-driven.md +3 -3
  40. package/skills/massa-ai/workflows/the-fool.md +16 -19
  41. package/skills/massa-ai/references/furps/analyst-role.md +0 -49
  42. package/skills/massa-ai/references/hook-enforcement.md +0 -133
  43. package/skills/massa-ai/references/spec-driven/lessons.md +0 -5
@@ -148,32 +148,19 @@ depends on exact content.
148
148
 
149
149
  ## Retrieval Order
150
150
 
151
- 1. `list_projects` or equivalent index metadata to verify project ID,
152
- path, status, and `lastIndexedAt` before treating indexed context as current.
153
- 2. `project_map` for general architecture orientation when the index is fresh for the current repository path and worktree state.
154
- 3. `get_architecture` for architecture-specific deep maps (packages, routes, hotspots, communities, cycles) when the index is fresh.
155
- 4. `search(responseMode="summary", maxResults=10)` for broad discovery.
156
- 5. `search(responseMode="enriched", maxResults=3)` for targeted deep reads with `fileImports`, `parentSymbol`, and chunk navigation metadata; raise to `maxResults=5` only when 4-5 exact files, symbols, or report finding IDs are already named.
157
- 6. Symbol tools (`search_definitions`, `get_references`, `go_to_definition`) and `read_file` for exact source evidence.
158
- 7. `symbol_snippet` for raw code snippets by file + line range.
159
- 8. `trace_path` for typed-edge BFS call/data-flow path tracing (fresh index only).
160
- 9. `impact_analysis` for git-diff centrality-ranked impact (fresh index only).
161
- 10. `optimized_context` for compact synthesized context when available.
162
- 11. Focused `rg`/file reads when massa-ai is unavailable, stale, incomplete, or misses obvious local truth.
163
-
164
- Do not use `full` or `enriched` for broad whole-project sweeps. Attempt REST fallback exactly once after a documented MCP schema, adapter, or missing-operation failure; if REST also fails, continue with MCP/local fallback and record the skipped reason.
165
-
166
- Graph tools (`trace_path`, `impact_analysis`, `get_architecture`) only count as
167
- evidence when the index is fresh for the current repository path and
168
- commit/worktree state. When the index is stale, incomplete, missing the target
169
- path, or older than relevant local changes, fall back to `search`/`get_references`
170
- and record the reduced retrieval confidence.
151
+ The ordered retrieval list is owned by `references/codebase-investigation.md`
152
+ §Source Order — follow it end to end; it is not restated here. This section
153
+ is the MCP parameter/budget schema delta for tools in that order:
154
+
155
+ - `list_projects`: verify project ID, path, status, and `lastIndexedAt` before treating indexed context as current.
156
+ - `search(responseMode="summary", maxResults=10)` for broad discovery; `search(responseMode="enriched", maxResults=3)` for targeted deep reads with `fileImports`, `parentSymbol`, and chunk navigation metadata; raise to `maxResults=5` only when 4-5 exact files, symbols, or report finding IDs are already named. Do not use `full` or `enriched` for broad whole-project sweeps.
157
+ - `symbol_snippet`: raw code snippets by exact file + line range (see the Capability Matrix above for required fields).
158
+ - Graph tools (`trace_path`, `impact_analysis`, `get_architecture`) only count as evidence when the index is fresh for the current repository path and commit/worktree state; when stale, incomplete, missing the target path, or older than relevant local changes, fall back to `search`/`get_references` and record the reduced retrieval confidence.
159
+ - Attempt REST fallback exactly once after a documented MCP schema, adapter, or missing-operation failure; if REST also fails, continue with MCP/local fallback and record the skipped reason.
171
160
 
172
161
  Project maps, search hits, and optimized context are discovery leads until
173
- confirmed against source files read in the current session or returned with
174
- freshness evidence for the current worktree. When index status is stale,
175
- incomplete, missing the target path, or older than relevant local changes, use
176
- focused source reads as proof and record the reduced retrieval confidence.
162
+ confirmed against source — see `references/codebase-investigation.md`
163
+ §Source Order for the canonical statement of that rule.
177
164
 
178
165
  ## Common MCP Calls
179
166
 
@@ -25,7 +25,19 @@ Excluded Surfaces: <found but out of scope, with reason>
25
25
  2. Locate candidate modules using build configuration, manifests/projects, source sets, and ownership boundaries.
26
26
  3. Classify each target surface using at least one build/configuration signal and one source/resource signal when available.
27
27
  4. Map each selected surface to its Figma node. A single node may map to several surfaces; separate platform frames require explicit mappings.
28
- 5. Load only the references required by selected surface IDs.
28
+ 5. Load only the Matcher Contracts references required by selected surface IDs.
29
+
30
+ ## Matcher Contracts
31
+
32
+ Load only the contract file for each classified surface:
33
+
34
+ - Android Views XML -> `references/mobile-figma-matcher/android-views.md`.
35
+ - Android Jetpack Compose -> `references/mobile-figma-matcher/android-compose.md`.
36
+ - iOS UIKit -> `references/mobile-figma-matcher/ios-uikit.md`.
37
+ - iOS SwiftUI -> `references/mobile-figma-matcher/ios-swiftui.md`.
38
+ - Shared KMP Compose Multiplatform -> `references/mobile-figma-matcher/kmp-compose-multiplatform.md`
39
+ plus native contracts only for selected native source sets, hosts,
40
+ wrappers, or runtime targets.
29
41
 
30
42
  ## Stack Signals
31
43
 
@@ -12,24 +12,16 @@ Use ADR/TDD input as implementation context, not as permission to bypass the act
12
12
 
13
13
  ## PR Task Grouping
14
14
 
15
- Decompose work into reviewable PR groups before editing. Reuse the TDD task-planning contract:
16
-
17
- - Prefer Small PRs: `1-200 LOC / 1-3 files`, with a practical sweet spot under `50-100 LOC`.
18
- - Use Medium PRs: `201-500 LOC / 3-10 files` only when splitting further would break buildability, testability, UI coherence, or implementation dependency order.
19
- - Treat Large PRs: `500+ LOC / 10+ files` as exceptions requiring a split, stacked PR, feature-flag, or containment rationale before execution.
15
+ Decompose work into reviewable PR groups before editing. Reuse the TDD
16
+ task-planning contract in `references/create-tdd/document-contract.md`
17
+ §Implementation Task Table for the PR-size bands (Small/Medium/Large) and the
18
+ layer order (Data, then Domain, then Presentation/Navigation, mapped to
19
+ repository terms when boundaries differ).
20
20
 
21
21
  Every PR group must be independently buildable and testable. It must not leave an intermediate state that breaks tests, UI, migrations, public contracts, required runtime behavior, or the active workflow's verification recipe.
22
22
 
23
23
  If a group is too large, split it into two or more groups. If tasks are too small, merge related small work only when the merged group remains independent, reviewable, buildable, and testable.
24
24
 
25
- Order non-breaking groups by layer when applicable:
26
-
27
- 1. `Data`: DTOs, DAOs, data sources, repositories, analytics, persistence, and data-layer interfaces.
28
- 2. `Domain`: use cases, models, mappers, configs, exceptions, monitoring, and business rules.
29
- 3. `Presentation/Navigation`: screens, views, view models, actions, states, routes, and navigation.
30
-
31
- When the target project uses different boundaries, map these labels to the closest repository terms and state the mapping before execution.
32
-
33
25
  ## Commit Per Group
34
26
 
35
27
  For each PR group:
@@ -6,13 +6,16 @@ Use when Specify, Design, Tasks, Execute, or Validate needs source inspection or
6
6
 
7
7
  ## Tool Priority
8
8
 
9
- Use graceful degradation, starting from massa-ai indexed tooling and falling back to structural, then text, search:
10
-
11
- 1. `list_projects` (or equivalent index metadata) before indexed reads, to verify project ID, path, status, and freshness.
12
- 2. `search` (or indexed symbol reads) when available and fresh for the current repository path and worktree state. Prefer `search_definitions`, `get_references`, or `optimized_context` for symbol- and reference-shaped queries.
13
- 3. `sg` / ast-grep for structural pattern-based search when installed.
14
- 4. `rg` (ripgrep) for fast context-aware text and file search.
15
- 5. `grep` or direct file reads as the final, always-available fallback.
9
+ Use graceful degradation: base retrieval sequence is
10
+ `references/codebase-investigation.md` §Source Order — that file owns the
11
+ ordered list; do not restate it here. Prefer `search_definitions`,
12
+ `get_references`, or `optimized_context` for symbol- and reference-shaped
13
+ queries within that sequence.
14
+
15
+ Spec-driven code analysis adds one tier between semantic/symbol search and
16
+ the shell fallback: try `sg` / ast-grep for structural pattern-based search
17
+ when installed, then fall back to `rg` (ripgrep), then `grep` or direct file
18
+ reads as the final, always-available fallback.
16
19
 
17
20
  ## Freshness And Source Precedence
18
21
 
@@ -4,6 +4,11 @@ Use before writing or changing implementation, tests, fixtures, validation asset
4
4
 
5
5
  Behavioral bias, not checklist. Read before every implementation.
6
6
 
7
+ General coding behavior — thinking before coding, simplicity, surgical
8
+ changes, and goal-driven execution — is owned by `references/coding-guidelines.md`
9
+ §1-4; read it before every implementation. This file keeps only what is
10
+ unique to spec-driven Execute.
11
+
7
12
  ---
8
13
 
9
14
  ## Pre-Implementation Statement
@@ -18,34 +23,16 @@ Artifact-store evidence: active artifact key, version, and checksum after write
18
23
 
19
24
  ---
20
25
 
21
- ## Before Coding
22
-
23
- - State assumptions explicitly. If uncertain, ask.
24
- - Multiple interpretations exist? Present all—don't pick silently.
25
- - Simpler approach exists? Say so. Push back when warranted.
26
- - Something unclear? Stop. Name what's confusing. Ask.
27
- - User's approach seems wrong? Disagree honestly. Don't be sycophantic.
28
-
29
- ---
30
-
31
- ## During Implementation
32
-
33
- ### Simplicity
34
-
35
- - No features beyond what was asked
36
- - No abstractions for single-use code
37
- - No "flexibility" or "configurability" not requested
38
- - No error handling for impossible scenarios
39
- - 200 lines that could be 50? Rewrite it.
26
+ ## Spec-Driven Rules
40
27
 
41
- ### Surgical Changes
28
+ Content here has no equivalent in `references/coding-guidelines.md` — general
29
+ before-coding, simplicity, surgical-changes, and goal-driven guidance lives
30
+ there instead.
42
31
 
43
- - Don't "improve" adjacent code, comments, or formatting
44
- - Don't refactor things that aren't broken
45
- - Match existing style, even if you'd do differently
46
- - Unrelated dead code noticed? Mention it—don't delete it
47
- - Remove ONLY imports/variables/functions YOUR changes orphaned
48
- - Don't remove pre-existing dead code unless asked
32
+ - Implement the simplest complete change that satisfies the approved requirement.
33
+ - Touch only listed files unless a new requirement or design decision forces a return to Specify or Design.
34
+ - Derive tests from acceptance criteria and spec-defined outcomes, not from current implementation.
35
+ - Re-run the task gate after any code or validation-asset change.
49
36
 
50
37
  ### Test Integrity
51
38
 
@@ -53,32 +40,10 @@ Artifact-store evidence: active artifact key, version, and checksum after write
53
40
  - NEVER delete a test to reduce failure count
54
41
  - NEVER use the test framework's skip/disable/pending mechanism to bypass a failing test
55
42
  - NEVER modify a task's tests afterward to make the implementation pass
43
+ - Do not weaken tests, specs, fixtures, snapshots, schemas, or checks to make work pass.
56
44
  - If a test is genuinely wrong, STOP and confirm with the user before changing it
57
45
  - Tests are the spec — implementation conforms to tests, not the other way around
58
46
 
59
- ### Goal-Driven
60
-
61
- - Transform vague tasks into verifiable goals
62
- - Multi-step work? State brief plan with verify checkpoints
63
- - Every changed line must trace directly to user's request
64
-
65
- ### Rules
66
-
67
- - Implement the simplest complete change that satisfies the approved requirement.
68
- - Touch only listed files unless a new requirement or design decision forces a return to Specify or Design.
69
- - Match existing style and local helpers.
70
- - Do not add speculative flexibility, broad refactors, or unrelated cleanup.
71
- - Do not weaken tests, specs, fixtures, snapshots, schemas, or checks to make work pass.
72
- - Derive tests from acceptance criteria and spec-defined outcomes, not from current implementation.
73
- - Re-run the task gate after any code or validation-asset change.
74
-
75
- ---
76
-
77
- ## After Each Change
78
-
79
- Ask: "Would senior engineer call this overcomplicated?"
80
- If yes → simplify before proceeding.
81
-
82
47
  ---
83
48
 
84
49
  ## Writing Voice (specs, ADRs, reports, commits, summaries)
@@ -2,24 +2,15 @@
2
2
 
3
3
  Use when recording decisions, progress, blockers, handoff, or completion evidence for a spec-driven feature.
4
4
 
5
- This memory layer is split across two artifacts with distinct lifecycles. Each has its own write triggers; writes are always section-scoped — never whole-file overwrites.
6
-
7
- - `.specs/project/STATE.md` owns project-level **Decisions** (append-only) plus current objective, progress, blockers, verification evidence, changed files, and exact next step.
8
- - `.specs/HANDOFF.md` owns the local **Handoff** snapshot (replace-on-pause).
9
- - `.specs/project/FEATURES.json` owns the feature registry: `active_feature`, status, dependencies, and completion evidence.
10
- - `.specs/features/<slug>/` owns approved feature artifacts.
11
- - Use `references/spec-driven/artifact-store.md` for artifact read/write operations.
5
+ This memory layer is split across two artifacts with distinct lifecycles (see Artifact State below). Each has its own write triggers; writes are always section-scoped — never whole-file overwrites. Use `references/spec-driven/artifact-store.md` for artifact read/write operations.
12
6
 
13
7
  ## STATE Precedence Chain
14
8
 
15
- When sources conflict, resolve in this strict order — first match wins, lower sources never override higher:
16
-
17
- 1. **Fresh user instruction** — the live user's explicit direction for the current decision.
18
- 2. **Approved `.specs/` artifact** — the current `spec.md`/`design.md`/`tasks.md` approved for the active feature.
19
- 3. **STATE / HANDOFF** — `.specs/project/STATE.md` and `.specs/HANDOFF.md` position and decision logs.
20
- 4. **massa-ai memory** — durable cross-session recall; context until confirmed against current source.
21
-
22
- massa-ai memory and external summaries are discovery, not authority. If a higher source is silent, the next source decides; if a lower source contradicts a higher one, the higher source wins and the lower one is corrected. Record the resolution in STATE so the chain stays auditable. `references/spec-driven/artifact-store.md` mirrors this chain for artifact reads.
9
+ Canonical chain, ordering, and silent/contradicting-source resolution rules:
10
+ `references/artifact-persistence.md` STATE Precedence Chain. For spec-driven,
11
+ the "approved `.specs/` artifact" link is the current `spec.md`/`design.md`/
12
+ `tasks.md` approved for the active feature, and the "STATE/HANDOFF" link is
13
+ `.specs/project/STATE.md` and `.specs/HANDOFF.md`.
23
14
 
24
15
  ---
25
16
 
@@ -503,7 +503,7 @@ When Tasks runs, always generate these sections before listing implementation ta
503
503
 
504
504
  Before sampling tests manually, prefer massa-ai tooling to read the codebase:
505
505
 
506
- 1. **Code analysis priority.** Run `list_projects`, then `project_map` and `search` / `optimized_context` to discover test files, test config, and layer structure BEFORE falling back to `ast-grep` / `rg` / `grep`. If the index is stale or missing, current source always overrides the index or a stored memory; reindex only when freshness blocks the decision.
506
+ 1. **Code analysis priority.** Discover test files, test config, and layer structure through the massa-ai index first, in the order of `references/codebase-investigation.md` §Source Order (plus the `ast-grep` tier in `references/spec-driven/code-analysis.md` §Tool Priority), BEFORE falling back to `ast-grep` / `rg` / `grep`. If the index is stale or missing, current source always overrides the index or a stored memory; reindex only when freshness blocks the decision.
507
507
  2. **Durable memory.** Tag confirmed planning artifacts with `remember` using `project:<id>`, `session:<id>`, `workflow:spec-driven`, `entity:<slug>`, and `memory:working|episodic|semantic|procedural`.
508
508
  3. **Validation: evidence-or-zero.** Every coverage claim and gate command must be confirmed against current source. No evidence → no claim.
509
509
 
@@ -164,7 +164,7 @@ For mobile or UI features, follow the [references/mobile-context.md](../mobile-c
164
164
 
165
165
  For each issue found during UAT or from the Verifier:
166
166
 
167
- 1. **Diagnose** — Analyze the codebase to find root cause. Prefer massa-ai code-analysis tools first (search, optimized_context) for symbol and dependency location; fall back to ast-grep/rg/grep when the index is stale or unavailable. Current source overrides stale index/memory.
167
+ 1. **Diagnose** — Analyze the codebase to find root cause, following `references/spec-driven/code-analysis.md` §Tool Priority for search order. Current source overrides stale index/memory.
168
168
  2. **Create fix task** — Write a task definition with:
169
169
  - What: The specific fix
170
170
  - Where: File paths
@@ -187,7 +187,7 @@ After all checks complete, the Verifier MUST:
187
187
 
188
188
  ### 10. Distill Lessons (MANDATORY when validation.md has signal)
189
189
 
190
- This is the closing action of validation — not a separate phase. Immediately after the report is written, turn its grounded failures into reusable, project-local guidance by following [references/lessons.md](../lessons.md) and the stub at [references/spec-driven/lessons.md](lessons.md). In short: for each surviving mutant, spec-precision gap, failed/uncovered AC, or `// SPEC_DEVIATION`, record one terse general lesson via:
190
+ This is the closing action of validation — not a separate phase. Immediately after the report is written, turn its grounded failures into reusable, project-local guidance by following [references/lessons.md](../lessons.md). In short: for each surviving mutant, spec-precision gap, failed/uncovered AC, or `// SPEC_DEVIATION`, record one terse general lesson via:
191
191
 
192
192
  ```bash
193
193
  bun skills/massa-ai/scripts/lessons.ts --root . add --feature <slug> --signal "<signal>" --source "<source>" --text "<lesson>" --scope "<scope>"
@@ -23,11 +23,10 @@ resumed handoff reuses `workflowSessionId` and opens a fresh Synapse session.
23
23
  - Major focus shift: update task context through REST when available; otherwise
24
24
  create a fresh Synapse session and let the prior session expire.
25
25
 
26
- Default search budget inside a Synapse session:
26
+ Default search budget inside a Synapse session follows
27
+ `references/mcp-tools.md` §Retrieval Order; this file does not restate the
28
+ numbers.
27
29
 
28
- - Summary discovery: `responseMode="summary"`, `maxResults=10`.
29
- - Targeted deep reads: `responseMode="enriched"`, `maxResults=3`.
30
- - Expanded deep reads: `maxResults=5` only when 4-5 exact files, symbols, or report finding IDs are already named.
31
30
  - Do not use Synapse for a single recall, project map, exact file read, or one symbol lookup.
32
31
 
33
32
  Server-side bounds that constrain the budget:
@@ -32,7 +32,7 @@ Load `references/project-context.md` (intake sweep) before the first substantive
32
32
  - If an RFC is needed but absent and the user does not know the missing context, assume the decision is not made and route to `workflows/create-rfc.md`.
33
33
  - Require a source-backed or user-confirmed title, date, status, context, decision, consequences, links, and supersession status before drafting.
34
34
  6. Draft the ADR using the project's template when available; otherwise use the format selected via `references/create-adr.md`'s fallback questions. Tie claims to source confidence: confirmed, user-provided, recalled, inferred, or unresolved.
35
- 7. Run the configured Plan Challenge Gate before saving. ADR decisions require the full gate under the default policy (`create-adr` is named in the full-gate set of the canonical Plan Challenge Policy); revise valid critical or high findings before the record is written, especially a decision presented without its rejected alternatives, consequences stated only as benefits, an unstated assumption the decision depends on, and status quo or sunk-cost bias in the framing. A challenge that invalidates the decision means the decision is not final — route to `workflows/create-rfc.md` rather than recording it.
35
+ 7. Run the Plan Challenge Gate before saving. ADR decisions require the full gate (`create-adr` is in the full-gate set of `SKILL.md` §Plan Challenge Gate); revise valid critical or high findings before the record is written, especially a decision presented without its rejected alternatives, consequences stated only as benefits, an unstated assumption the decision depends on, and status quo or sunk-cost bias in the framing. A challenge that invalidates the decision means the decision is not final — route to `workflows/create-rfc.md` rather than recording it.
36
36
  8. Save the generated ADR using the selected output target:
37
37
  - Default: write to the project's standard ADR directory in Default mode. In Plan Mode, propose the path and content without writing.
38
38
  - Confluence: when requested and a parent page link is provided, write a child page through Atlassian MCP and report the resulting page link.
@@ -34,7 +34,7 @@ Load `references/project-context.md` (intake sweep) before the first substantive
34
34
  6. Choose the artifact path from an explicit user path or established project convention. Otherwise default to `docs/rfc/<entity>.md`.
35
35
  - If the target exists, update it only when the user explicitly requested an update; otherwise ask before overwriting.
36
36
  - When file mutation is unavailable or the user requested plan-only output, present the complete draft and intended path without writing.
37
- 7. Run the full configured Plan Challenge Gate. Preserve all required RFC fields while revising valid critical or high findings, especially one-sided options, unsupported claims, hidden assumptions, status quo bias, weak cost estimates, and criteria chosen to justify a predetermined conclusion.
37
+ 7. Run the full Plan Challenge Gate. Preserve all required RFC fields while revising valid critical or high findings, especially one-sided options, unsupported claims, hidden assumptions, status quo bias, weak cost estimates, and criteria chosen to justify a predetermined conclusion.
38
38
  8. Load `references/create-rfc/quality-and-lifecycle.md`, validate every required behavior, and resolve blocking gaps. Keep unresolved facts explicit instead of silently removing mandatory fields.
39
39
  9. Save the proposal with status `NOT STARTED` or `IN PROGRESS`. Set `COMPLETE` and fill the Outcome section only when an explicit human decision or authoritative project record is available.
40
40
  10. Persist proposal state after recall, deduplication, and scoring:
@@ -48,7 +48,7 @@ Load `references/project-context.md` (intake sweep) before the first substantive
48
48
  6. Choose the artifact path from an explicit user path or an existing project convention. Otherwise default to `docs/design/<entity>.md`.
49
49
  - If the target exists, treat the request as an update only when the user explicitly requested one; otherwise ask before overwriting it.
50
50
  - When file mutation is unavailable or the user requested plan-only output, present the complete draft and intended path without writing.
51
- 7. Run the configured Plan Challenge Gate. TDD plans require the full gate under the default policy; revise valid critical or high findings before finalization.
51
+ 7. Run the Plan Challenge Gate. TDD plans require the full gate; revise valid critical or high findings before finalization.
52
52
  8. Load `references/create-tdd/quality-and-lifecycle.md`, validate the document, and resolve blocking gaps. Keep non-blocking unknowns explicit with owners or decision points when known.
53
53
  9. If the implementation task table is stable and validated, discover whether Atlassian MCP has readable Jira project metadata and issue-creation capability.
54
54
  - If Atlassian MCP is unavailable or read-only, leave the table's `Jira Key` values as `Unavailable` and report that ticket creation was skipped.
@@ -24,7 +24,7 @@ Not for Flutter, React Native, web UI, generic Figma exploration, variable-only
24
24
  2. Load `references/mobile-figma-matcher/repository-detection.md`, `references/mobile-figma-matcher/core.md`, `references/mobile-context.md`, `references/codebase-investigation.md`, `references/verification-ladder.md`, and `references/naming-standards.md` (before introducing or renaming identifiers, screens, components, attributes, or implementation-facing names — English-conversion rule applies). When Figma links or node IDs are provided, load `references/figma-pre-analysis.md` and run its two-stage sequential retrieval protocol before building the Figma Evidence Packet. Load `references/context-firewall.md` before large design/runtime artifacts and `references/synapse-policy.md` when repeated massa-ai searches are expected.
25
25
  3. `recall` -> load current component conventions, design-system rules, approved platform/accessibility deviations, prior Figma mappings, asset pipelines, and reusable render recipes. Memory is context, not proof.
26
26
  4. Require a concrete feature/module target plus at least one design source: readable Figma node/selection or supplied screenshots. Resolve required visual and interactive states plus a requirements source for behavior not represented in the design source. Ask whenever target ownership, runtime platforms, platform-frame mappings, screenshot authority, or any other important decision remains ambiguous or in doubt after source inspection.
27
- 5. Follow `references/design-implementation.md` for the Target Surface Packet, the Figma Evidence / Screenshot Context Packet, the Design-To-Code Mapping Matrix, sizing and the verification recipe, coherent-slice implementation rules, per-slice verification, completion criteria, and the completion report — the single normative copy of this direction set, shared with `spec-driven`/`feature` under Figma ingestion.
27
+ 5. Follow `references/design-implementation.md` for the Target Surface Packet, the Figma Evidence / Screenshot Context Packet, the Design-To-Code Mapping Matrix, sizing and the verification recipe, coherent-slice implementation rules, per-slice verification, completion criteria, and the completion report — the single normative copy of this direction set, shared with `spec-driven`/`feature` under Figma ingestion. Once the Design-To-Code Mapping Matrix exists and before the first edit or `designer` dispatch, run the full Plan Challenge Gate (`SKILL.md` §Plan Challenge Gate) on the slice plan.
28
28
  6. Persist only durable token/component mappings, approved deviations, source-set ownership rules, asset-pipeline rules, or reusable render recipes after Importance Calibration. Use `workflow:design` and required project/session/entity/memory tags.
29
29
  7. Complete `references/evidence-gate.md`. Model visual judgment alone cannot satisfy completion.
30
30
 
@@ -58,14 +58,12 @@ When researching or resolving any technical question during exploration, follow
58
58
  > - scope: the exploration target — symbols, files, routes, commands, docs, or runtime artifacts to inspect
59
59
  > - permissions: read-only
60
60
  > - inputs: objective, scope, explicit out-of-scope areas, constraints, recalled facts, and the closest entry point
61
- > - sensors: progressive disclosure (project map → summary search → enriched search → symbol/file tools → optimized context → focused shell); per-step `verify:` criterion
61
+ > - sensors: retrieval order per `references/codebase-investigation.md` §Source Order; per-step `verify:` criterion
62
62
  > - output: entry points, core flow, dependencies, data ownership, relevant contracts, exact evidence pointers (path, symbol, line), confirmed facts vs inferences
63
63
  > - firewall: raw logs, snapshots, generated reports, and broad search output summarized, not returned raw
64
64
  > - memory: suggest-only; main agent persists durable discoveries
65
65
 
66
- - Follow the shared retrieval order: project map, summary search, targeted
67
- enriched search, symbol/file tools, optimized context, then focused shell
68
- fallback.
66
+ - Follow the shared retrieval order in `references/codebase-investigation.md` §Source Order.
69
67
  - When external documentation, API references, or web content is needed to answer the question, call `fetch_and_index` with `url` (or `requests`[]) to fetch, convert HTML→markdown or extract JSON key-paths, and index the result into the searchable store so it can be retrieved later via `search`. SSRF-guarded, TTL-cached.
70
68
  - Follow imports, calls, ownership boundaries, and data paths from entry point outward.
71
69
  - For behavior questions, trace input -> transformation -> output.
@@ -87,7 +87,7 @@ Before the first repository mutation, load `references/implementation-delivery.m
87
87
 
88
88
  - The fix→re-verify cycle for a PR group is capped by the Bounded Fix→Re-verify Loop's 3-iteration limit in `references/verification-ladder.md` (cap reached → `Blocked`).
89
89
 
90
- 13. Run the configured Plan Challenge Gate on the refactor plan before the first behavior-preserving edit. Low-risk refactor plans use the Plan Challenge lite gate first; full The Fool is reserved for explicit challenge, high-risk domains, plans touching more than 5 files/classes/modules, or lite escalation. Revise valid critical or high findings — for a refactor the assumption most worth challenging is that the existing tests actually pin the behavior being preserved.
90
+ 13. Run the Plan Challenge Gate on the refactor plan before the first behavior-preserving edit. Low-risk refactor plans use the Plan Challenge lite gate first; full The Fool is reserved for explicit challenge, high-risk domains, plans touching more than 5 files/classes/modules, or lite escalation. Revise valid critical or high findings — for a refactor the assumption most worth challenging is that the existing tests actually pin the behavior being preserved.
91
91
  14. Complete the Evidence Gate from `references/evidence-gate.md`
92
92
 
93
93
  ## Failure Handling
@@ -21,7 +21,7 @@ Findings-only: do not edit the PRD/ADR unless the user separately asks.
21
21
  - `references/furps/intake.md` before intake and sub-agent dispatch
22
22
  - `references/furps/checklist.md` for the per-dimension check items
23
23
  - `references/furps/report-contract.md` before writing the report
24
- - `references/furps/analyst-role.md` and `skills/agents/product-manager/SKILL.md` before dispatching `product-manager` in `furps` mode
24
+ - `skills/agents/product-manager/SKILL.md` before dispatching `product-manager` in `furps` mode
25
25
  - `references/agent-orchestration.md` and `references/context-firewall.md` before dispatch
26
26
  - `references/audit-report-io.md` before writing the final report
27
27
  - `references/synapse-policy.md` when repeated massa-ai searches are expected
@@ -156,7 +156,7 @@ Quick artifacts live under `.specs/quick/NNN-slug/` with a `TASK.md` (one-line i
156
156
  - Distill lesson signals through `references/lessons.md` when validation produces grounded reusable failures.
157
157
  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.
158
158
  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.
159
- 9. Complete the configured Plan Challenge Gate for non-trivial plans and complete `references/evidence-gate.md` before claiming completion.
159
+ 9. Complete the Plan Challenge Gate for non-trivial plans and complete `references/evidence-gate.md` before claiming completion.
160
160
 
161
161
  ## Artifact Ownership
162
162
 
@@ -210,8 +210,8 @@ Memory:
210
210
  | Record decision, project-level decision | `references/spec-driven/memory.md` |
211
211
  | Pause work, end session, I need to stop | `references/spec-driven/memory.md` |
212
212
  | Resume work, continue, pick up where we left off | `references/spec-driven/memory.md` |
213
- | Load lessons, what have we learned, apply past lessons | `references/spec-driven/lessons.md` |
214
- | Record lesson, distill lessons (auto-runs after validation) | `references/spec-driven/lessons.md` |
213
+ | Load lessons, what have we learned, apply past lessons | `references/lessons.md` |
214
+ | Record lesson, distill lessons (auto-runs after validation) | `references/lessons.md` |
215
215
 
216
216
  ## Output Behavior
217
217
 
@@ -1,6 +1,6 @@
1
1
  ---
2
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."
3
+ description: "Use this workflow for direct requests to challenge ideas, plans, decisions, or evidence, and as the post-plan challenge gate after other workflows construct a plan."
4
4
  license: MIT
5
5
  metadata:
6
6
  version: "1.1.0"
@@ -8,7 +8,7 @@ metadata:
8
8
 
9
9
  ### The Fool
10
10
 
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.
11
+ Use for direct requests to challenge ideas, plans, decisions, proposals, architectures, evidence, or assumptions. Also use as the post-plan challenge gate after other massa-ai workflows construct a plan.
12
12
 
13
13
  Load `references/project-context.md` (intake sweep) before the first substantive read.
14
14
 
@@ -16,12 +16,13 @@ Not to build the initial plan, make the decision, or execute implementation work
16
16
 
17
17
  ## Configuration
18
18
 
19
- Read the canonical **Plan Challenge Policy** from the installed `AGENTS.md`
20
- bootstrap block (`<!-- massa-ai:bootstrap -->`), whose single source is
21
- `skills/AGENTS.md` in the product repo. If that
22
- file is unavailable, use the deterministic runtime fallback: run the lite gate
23
- with `pre_mortem` mode (do not judgment-select the gate or mode), and revise
24
- the parent plan when critical or high findings are valid.
19
+ The gate is fixed behavior, defined once in `SKILL.md` §Plan Challenge Gate
20
+ (which workflows run lite or full, and what escalates). There is no policy file
21
+ to read: the mode is always auto-selected, and valid `critical` or `high`
22
+ findings always revise the parent plan. The gate runs where a workflow carries a
23
+ Plan Challenge step — the workflows named in those Lite and Full bullets; the
24
+ risk and size triggers escalate a plan inside them to full, and a direct
25
+ challenge request runs it anywhere.
25
26
 
26
27
  User prompt overrides take precedence for the current turn only, such as "skip the Fool gate", "use red-team mode", or "append critique without revising the plan".
27
28
 
@@ -34,18 +35,17 @@ User prompt overrides take precedence for the current turn only, such as "skip t
34
35
  2. `recall` -> load prior decisions, rejected approaches, constraints, accepted risks, and relevant evidence for the target entity.
35
36
  3. Require a concrete proposed plan before critique. If there is no plan, return to the parent workflow and construct the plan first. After a concrete plan exists, always attempt a `judge` subagent in `plan-critique` mode (it writes nothing in that mode) when subagent tooling is available. If that agent is unavailable, follow the no-agent fallback in `references/agent-orchestration.md` (Name Resolution): run the critique locally against the same output contract and report the skipped delegation.
36
37
  4. Resolve gate depth:
37
- - Post-plan lite gate: keep parent identifiers and dispatch a bounded lite checklist packet without loading The Fool mode references.
38
+ - Post-plan lite gate: keep parent identifiers and dispatch the bounded packet the Lite bullet of `SKILL.md` §Plan Challenge Gate defines, without loading The Fool mode references.
38
39
  - Post-plan full gate or direct challenge: continue to mode selection and full critique.
39
40
  - Direct challenge requests use `workflowSessionId=fool-[entity]`; post-plan gates keep the parent identifiers and send only a bounded packet.
40
41
  5. Lite `judge` `plan-critique` packet:
41
- - Inputs: proposed plan, scope, constraints, parent workflow, compact recalled facts/evidence, known risks, verification recipe, context-firewall limits, and lite checklist.
42
+ - Inputs: proposed plan, scope, constraints, parent workflow, compact recalled facts/evidence, known risks, verification recipe, context-firewall limits, and that Lite bullet's checklist (failing assumption, falsifying check, risk/size check).
42
43
  - Output must include the strongest low-risk challenges plus `escalate_to_full: true|false` and reason.
43
- - If `escalate_to_full: false`, synthesize the lite critique, revise or accept risk according to policy, and complete the gate without loading The Fool mode references.
44
+ - If `escalate_to_full: false`, synthesize the lite critique, revise the plan for each challenge judged valid or record the accepted risk, and complete the gate without loading The Fool mode references.
44
45
  - If `escalate_to_full: true`, the main agent selects full mode, loads the relevant references, and dispatches a full `judge` `plan-critique` pass.
45
46
  6. Select The Fool mode for full gates:
46
- - `mode: auto`: read `references/the-fool/mode-selection-guide.md` and choose the best mode from plan content and domain.
47
- - `mode: ask`: ask the user only when interactive input is available; otherwise fall back to `auto` and report the fallback.
48
- - Concrete mode values map to The Fool references: `pre_mortem`, `red_team`, `evidence_audit`, `socratic`, or `dialectic`.
47
+ - Read `references/the-fool/mode-selection-guide.md` and choose the best mode from plan content and domain, unless the user named a mode for this turn.
48
+ - Mode values map to The Fool references: `pre_mortem`, `red_team`, `evidence_audit`, `socratic`, or `dialectic`.
49
49
  - Mode reference map:
50
50
  - `pre_mortem` -> `references/the-fool/pre-mortem-analysis.md`
51
51
  - `red_team` -> `references/the-fool/red-team-adversarial.md`
@@ -69,10 +69,7 @@ User prompt overrides take precedence for the current turn only, such as "skip t
69
69
  - required revision or accepted-risk framing
70
70
  - confidence impact
71
71
  - exact next step
72
- 10. Synthesize using `references/decision-engine.md`:
73
- - `serious_findings: revise_plan`: revise valid `critical` or `high` findings before presenting the final plan.
74
- - `serious_findings: append_critique`: keep the plan and attach the critique for user decision.
75
- - `serious_findings: warn_only`: mention serious risks briefly without restructuring the plan.
72
+ 10. Synthesize using `references/decision-engine.md`: revise valid `critical` or `high` findings before presenting the final plan. Only a user override for the current turn keeps the plan unchanged and attaches the critique for user decision instead.
76
73
  11. Persist only durable outcomes after recall and scoring:
77
74
  - accepted architecture constraints, rejected approaches, durable risk decisions, or reusable critique patterns
78
75
  - required tags: `project:<projectId>`, `session:<workflowSessionId>`, `workflow:the-fool` or parent workflow for post-plan gates, `entity:<entity>`, and one `memory:<tier>`
@@ -87,4 +84,4 @@ When used as a gate, the final user-facing plan should not expose raw subagent c
87
84
  Plan Challenge: ran The Fool in pre-mortem mode; revised verification and rollout risks before finalizing.
88
85
  ```
89
86
 
90
- If the gate is skipped, state why only when it affects confidence, user expectation, or configured behavior.
87
+ If the gate is skipped, state why only when it affects confidence or user expectation.
@@ -1,49 +0,0 @@
1
- # Role: product-manager (`furps` mode)
2
-
3
- Reusable sub-agent role for `workflows/refinement/furps-refinement.md`. Charter follows `references/subagent-design.md`. Registered in `references/agent-orchestration.md`.
4
-
5
- Purpose: analyze exactly one FURPS+ dimension (F, U, R, P, S, or X) of a PRD/ADR against its checklist section, returning structured refinement findings.
6
-
7
- Trigger description:
8
- - Use when the `furps-refinement` workflow fans out per-dimension analysis and needs isolated context plus independent verification per dimension.
9
- - Do not use when the work is a one-off local check, needs full conversation history, requires writes, or overlaps another role (use `judge` in `plan-critique` mode for The Fool, `code-explorer`/`code-reviewer` for code claims).
10
-
11
- Permissions:
12
- - Default: read-only.
13
- - No write access. No Atlassian mutation. No memory writes — suggest only.
14
-
15
- Context inputs:
16
- - exact `projectId`
17
- - exact parent `workflowSessionId` and a child session tag; an ephemeral Synapse session only if the role performs >=2 `search` calls
18
- - workflow name (`furps-refinement`) and role name (`product-manager`, `mode: furps`)
19
- - assigned dimension letter and its `references/furps/checklist.md` section
20
- - bounded document packet (sections/summaries, DoR, recalled facts, Fool summary)
21
- - exclusions: other dimensions (flag, do not expand), sibling-workflow targets
22
- - allowed tools: read-only file, read-only MCP, `search`
23
- - context-firewall limits: summarize the document; return evidence/findings only
24
-
25
- Process:
26
- 1. Confirm the assigned dimension and refusal conditions (do not analyze other dimensions; do not write files).
27
- 2. For each check item in the dimension's section, locate evidence in the document (quote plus section) or confirm absence.
28
- 3. Assign status: `covered` | `partial` | `missing` | `unclear`.
29
- 4. Produce `FR-<letter>-<N>` findings for every `missing`/`unclear` item and for `partial` items when the gap is non-trivial.
30
- 5. Tag each finding's contribution to Open Questions / Suggestions / Insights / Risks / DoR-gaps.
31
- 6. Return compact findings — no raw document dumps.
32
-
33
- Output contract:
34
- - Status: Complete | Partial | Blocked
35
- - Scope checked: dimension plus check items evaluated
36
- - Evidence: quotes/section IDs per check item
37
- - Findings: `FR-<letter>-<N>` with severity, confidence, status, impact, simplest fix direction, verification suggestion
38
- - Contributions: open questions / suggestions / insights / risks / DoR-gaps
39
- - Risks and skipped checks
40
- - Exact next step
41
-
42
- Validation sensors:
43
- - source-location proof (quote plus section) for every `covered`/`partial` claim
44
- - absent-claim detection for every `missing` claim
45
- - no self-evaluation: every finding ties to a concrete check item and document evidence
46
-
47
- Memory boundary:
48
- - Suggest durable memories only when a reusable refinement pattern is discovered.
49
- - Do not persist broad project memory. The main agent persists after synthesis.