@massa-ai/cursor-plugin 1.22.0 → 1.24.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/.cursor-plugin/plugin.json +1 -1
- package/package.json +1 -1
- package/skills/massa-ai/SKILL.md +9 -0
- package/skills/massa-ai/references/agent-orchestration.md +51 -10
- package/skills/massa-ai/references/context-firewall.md +2 -1
- package/skills/massa-ai/references/figma-pre-analysis.md +69 -0
- package/skills/massa-ai/references/implementation-delivery.md +14 -0
- package/skills/massa-ai/references/mobile-context.md +19 -0
- package/skills/massa-ai/references/mobile-diagnosis.md +1 -1
- package/skills/massa-ai/references/spec-driven/sub-agents.md +22 -0
- package/skills/massa-ai/references/subagent-design.md +18 -13
- package/skills/massa-ai/workflows/design.md +1 -1
- package/skills/massa-ai/workflows/feature.md +1 -1
- package/skills/massa-ai/workflows/judge-with-debate.md +33 -2
- package/skills/massa-ai/workflows/mobile-figma/mobile-figma-audit.md +1 -0
- package/skills/massa-ai/workflows/mobile-figma/mobile-figma-fix.md +1 -0
- package/skills/massa-ai/workflows/refinement/furps-refinement.md +15 -2
- package/skills/massa-ai/workflows/spec-driven.md +3 -3
package/package.json
CHANGED
package/skills/massa-ai/SKILL.md
CHANGED
|
@@ -60,6 +60,14 @@ Before reading any massa-ai file:
|
|
|
60
60
|
- Persist only durable, useful knowledge. Do not fabricate memories to satisfy
|
|
61
61
|
process. Use `memory_update` to correct stale memories and `memory_delete`
|
|
62
62
|
to remove obsolete ones.
|
|
63
|
+
- Expand every word abbreviation on first use in user-facing output — e.g.
|
|
64
|
+
"PR (Pull Request)", "AC (Acceptance Criteria)", "KMP (Kotlin Multiplatform)"
|
|
65
|
+
— including workflow-specific shorthands and finding-ID families.
|
|
66
|
+
- Use one uniform vocabulary for separating batches of work in every workflow:
|
|
67
|
+
a **Task** is the atomic unit; a **Phase** is an ordered group of Tasks.
|
|
68
|
+
Report a phase's size as `1 Phase = X Tasks` and a plan's total as
|
|
69
|
+
`Y Phases = Z Tasks`. Do not substitute synonyms such as batch, wave, stage,
|
|
70
|
+
or chunk for these units in agent prose.
|
|
63
71
|
- Emit concise user-facing status updates at meaningful workflow boundaries
|
|
64
72
|
when the Conversation Feedback Policy is active.
|
|
65
73
|
- Verify, don't assume: every factual claim that drives a decision is
|
|
@@ -275,6 +283,7 @@ Load only when a selected workflow asks for them:
|
|
|
275
283
|
- `references/debug-diagnosis-loop.md`
|
|
276
284
|
- `references/mobile-context.md`
|
|
277
285
|
- `references/mobile-diagnosis.md`
|
|
286
|
+
- `references/figma-pre-analysis.md`
|
|
278
287
|
- `references/mobile-figma-matcher/`
|
|
279
288
|
- `references/lessons.md`
|
|
280
289
|
- `references/naming-standards.md`
|
|
@@ -19,6 +19,32 @@ The main agent is the orchestrator. It owns:
|
|
|
19
19
|
|
|
20
20
|
Subagents do bounded work only. Do not delegate everything.
|
|
21
21
|
|
|
22
|
+
## Orchestrator Working Memory
|
|
23
|
+
|
|
24
|
+
Tokens are spent once; context shapes every decision that follows. The orchestrator's
|
|
25
|
+
working memory is the asset every rule below protects — delegation exists to keep
|
|
26
|
+
disposable reasoning out of the main thread, not only to parallelize.
|
|
27
|
+
|
|
28
|
+
- **Never poll a running subagent for status, and never ingest a subagent's raw
|
|
29
|
+
transcript, JSONL, or intermediate reasoning — running or completed.** The
|
|
30
|
+
orchestrator consumes only the subagent's returned output contract (its completion
|
|
31
|
+
result). When lifecycle visibility helps the user, report the dispatch itself via
|
|
32
|
+
conversation-feedback labels, not by fetching agent state.
|
|
33
|
+
- **Wave cap: dispatch at most 4 concurrent subagents.** Before planning 5 or more,
|
|
34
|
+
run and record a consolidation check — can any two planned agents be merged? — then
|
|
35
|
+
dispatch in waves of at most 4. Fixed protocols smaller than the cap (e.g. a
|
|
36
|
+
3-judge panel) are unaffected.
|
|
37
|
+
- **Cognitive locality:** overlapping file/module ownership or a shared knowledge
|
|
38
|
+
domain between planned subagents — read-only agents included — is a consolidation signal:
|
|
39
|
+
consolidate into one agent before spawning. Two agents independently reconstructing
|
|
40
|
+
the same mental model is waste; one agent holding it once is the cheaper and more
|
|
41
|
+
coherent shape.
|
|
42
|
+
- **Git safety for concurrent work:** no repository-wide git operations (`git stash`,
|
|
43
|
+
`git checkout`/`git switch` of shared state, `git reset`, `git clean`) inside any
|
|
44
|
+
concurrently-dispatched subagent's scope. Concurrent writers require disjoint git
|
|
45
|
+
worktrees. The Verifier's scratch-worktree discrimination sensor keeps its own
|
|
46
|
+
stricter isolation rules.
|
|
47
|
+
|
|
22
48
|
## Delegation Gates
|
|
23
49
|
|
|
24
50
|
Delegate only when all base requirements are true and at least one dispatch trigger is true.
|
|
@@ -107,19 +133,27 @@ only, never a dispatch target.
|
|
|
107
133
|
|
|
108
134
|
## Capability Packet
|
|
109
135
|
|
|
136
|
+
**This section is the sole canonical Capability Packet definition.** `references/subagent-design.md` and the root `skills/AGENTS.md` registry defer to or mirror this list; `scripts/__tests__/capability-packet-parity.test.ts` fails when the `skills/AGENTS.md` mirror diverges. Bespoke packets (judge panel, FURPS analyst, phase-batch worker) are declared specializations that map onto these fields in their own workflow files.
|
|
137
|
+
|
|
138
|
+
**A subagent inherits nothing from the parent session** — no skills, no personas, no loaded references, no conversation history. Everything the subagent needs is named explicitly in the packet, including the exact reference file paths it must read itself.
|
|
139
|
+
|
|
110
140
|
When dispatching a subagent, send a compact capability packet rather than a loose instruction. Include:
|
|
111
141
|
|
|
112
|
-
- role
|
|
113
|
-
-
|
|
114
|
-
-
|
|
115
|
-
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
-
|
|
120
|
-
-
|
|
142
|
+
- `role`: the role name from the Agent Table of `skills/AGENTS.md`
|
|
143
|
+
- `purpose`: one sentence tied to this workflow
|
|
144
|
+
- `trigger`: why delegation is justified now
|
|
145
|
+
- `scope`: exact files, modules, diff, report finding, task IDs, or artifact
|
|
146
|
+
- `permissions`: read-only or write with disjoint ownership
|
|
147
|
+
- `inputs`: recalled facts, source pointers, constraints, and exclusions
|
|
148
|
+
- `sensors`: expected commands or concrete checks
|
|
149
|
+
- `output`: the exact output contract
|
|
150
|
+
- `firewall`: raw logs, diffs, snapshots, reports, or research that must be summarized
|
|
151
|
+
- `memory`: whether the subagent may suggest memories and who persists them
|
|
121
152
|
- `persona`: optional. The cataloged persona id in effect for the parent conversation, passed as advisory framing only — it never overrides the agent's charter Restrictions, scope, or permissions. Pass the id alone, never the persona prompt.
|
|
122
|
-
-
|
|
153
|
+
- `next_use`: what the main agent will do with the result
|
|
154
|
+
- `lens`: conditional — `audit-specialist` dispatches only. One of `bugs | architecture | security | requirements | code-quality | performance`.
|
|
155
|
+
|
|
156
|
+
The named dispatch block that workflows embed (the quoted block whose header carries the prefixed agent name and role) is the block projection of this packet: `role` and `purpose` live in the block's header line, and `next_use` defaults to "the main agent synthesizes and continues the workflow" when absent. The remaining eight fields — `trigger, scope, permissions, inputs, sensors, output, firewall, memory` — appear as the block's body lines. The optional `persona` field appears there too.
|
|
123
157
|
|
|
124
158
|
## Prompt Contract
|
|
125
159
|
|
|
@@ -154,6 +188,11 @@ Subagents must summarize verbose research, logs, snapshots, diffs, search output
|
|
|
154
188
|
and transcripts. The main agent should receive only evidence, findings, risk,
|
|
155
189
|
skipped checks, memory suggestions when allowed, and the next step, not raw dumps.
|
|
156
190
|
|
|
191
|
+
**Default return bound: at most 40 lines of returned chat text.** A dispatch block's
|
|
192
|
+
`output:` field may override the bound with a stated reason. When a dispatch writes a
|
|
193
|
+
persisted report file, the chat return is the compact verdict only — never the file
|
|
194
|
+
body (dual-channel rule).
|
|
195
|
+
|
|
157
196
|
## Conversation Feedback
|
|
158
197
|
|
|
159
198
|
Use `references/conversation-feedback.md` when subagent lifecycle visibility would help the user understand what is running. Keep status updates to 1-2 human-readable lines.
|
|
@@ -222,6 +261,8 @@ For delegated tasks that expect repeated searches:
|
|
|
222
261
|
|
|
223
262
|
## Guardrails
|
|
224
263
|
|
|
264
|
+
- No polling, no transcripts: never poll a running subagent and never ingest its
|
|
265
|
+
transcript or intermediate reasoning — see Orchestrator Working Memory.
|
|
225
266
|
- No self-evaluation: claims need deterministic sensors or concrete source evidence.
|
|
226
267
|
- No hidden scope expansion: subagents must not improve adjacent code.
|
|
227
268
|
- No context dragging: send only task-specific source pointers and constraints, and receive compact summaries only.
|
|
@@ -29,6 +29,7 @@ Apply the firewall before bringing any of these raw artifacts into the main cont
|
|
|
29
29
|
- Source, docs, logs, CSV, or reports over 200 lines or 20 KB.
|
|
30
30
|
- Search, grep, MCP, or external research output over 50 hits.
|
|
31
31
|
- Generated audit reports, screenshots, browser snapshots, crash/device logs, or raw NotebookLM/web research dumps.
|
|
32
|
+
- Running or completed subagent transcripts, JSONL session files, and intermediate agent reasoning — these never enter the main context at all; consume only the returned output contract.
|
|
32
33
|
- Any subagent output, tool transcript, or diff where only counts, paths, representative snippets, or failing cases are needed for the next decision.
|
|
33
34
|
|
|
34
35
|
## Tool Output Discipline
|
|
@@ -53,7 +54,7 @@ The main agent receives only:
|
|
|
53
54
|
- risks and skipped checks
|
|
54
55
|
- exact next step
|
|
55
56
|
|
|
56
|
-
Subagents should not return raw dumps. The main agent still owns memory recall, persistence, synthesis, and the final Evidence Gate.
|
|
57
|
+
Subagents should not return raw dumps. Never poll a running subagent for status and never read a subagent transcript — the returned output contract is the only channel back into the main context (canonical rules: `references/agent-orchestration.md`, Orchestrator Working Memory). The main agent still owns memory recall, persistence, synthesis, and the final Evidence Gate.
|
|
57
58
|
|
|
58
59
|
## Persistence Boundary
|
|
59
60
|
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Figma Pre-Analysis And Sequential Retrieval
|
|
2
|
+
|
|
3
|
+
Load this reference whenever a workflow receives one or more Figma links, node
|
|
4
|
+
IDs, or a readable desktop selection as a design source — the Figma audit/fix
|
|
5
|
+
family (`mobile-figma-audit`, `mobile-figma-fix`), `design`, and the
|
|
6
|
+
design-source gates of implementation workflows (`feature`, `spec-driven`).
|
|
7
|
+
This reference owns the orchestration protocol only; Figma Evidence Packet
|
|
8
|
+
field contracts stay in `references/mobile-figma-matcher/core.md`.
|
|
9
|
+
|
|
10
|
+
The protocol is the single normative copy. Workflows point here; they do not
|
|
11
|
+
restate it.
|
|
12
|
+
|
|
13
|
+
## Why Two Stages
|
|
14
|
+
|
|
15
|
+
Full Figma extraction on unscoped links overloads one context with mixed
|
|
16
|
+
screens, buries feature boundaries, and makes evidence non-attributable. A
|
|
17
|
+
cheap pre-analysis pass first maps what the links contain, so each retrieval
|
|
18
|
+
pass reads one coherent slice.
|
|
19
|
+
|
|
20
|
+
## Stage 1 — Pre-Analysis (always first, exactly one subagent)
|
|
21
|
+
|
|
22
|
+
Dispatch one read-only subagent (investigator-class; Figma MCP — Model Context
|
|
23
|
+
Protocol — access, no repository mutation) over the user-provided Figma links.
|
|
24
|
+
Its job is understanding, **not** extraction:
|
|
25
|
+
|
|
26
|
+
- Summarize composition: pages, screens, frames, component sets, shared tokens.
|
|
27
|
+
- Summarize product context: what the screens are for, the features they serve,
|
|
28
|
+
and the user flows connecting them.
|
|
29
|
+
- It does not build Figma Evidence Packet fields, does not resolve variables or
|
|
30
|
+
exact geometry, and does not compare against source code.
|
|
31
|
+
|
|
32
|
+
Its output is a compact packet:
|
|
33
|
+
|
|
34
|
+
1. **Context summary** — screens/features/flows in prose, sized for the main
|
|
35
|
+
agent's context budget.
|
|
36
|
+
2. **Partition proposal** — how many retrieval subagents should read which
|
|
37
|
+
links/nodes/screen groups, partitioned by:
|
|
38
|
+
- **Size:** each slice must fit one subagent's context comfortably.
|
|
39
|
+
- **Coupling:** screens sharing tokens, components, or a design system
|
|
40
|
+
section stay in one slice.
|
|
41
|
+
- **Feature flow:** one user flow per slice when possible, so evidence
|
|
42
|
+
stays attributable to a feature.
|
|
43
|
+
A single small screen legitimately yields a one-slice proposal.
|
|
44
|
+
|
|
45
|
+
The main agent reviews the proposal, adjusts slice boundaries if project
|
|
46
|
+
knowledge contradicts them, and records the final partition before Stage 2.
|
|
47
|
+
|
|
48
|
+
## Stage 2 — Sequential Retrieval (N subagents, one at a time)
|
|
49
|
+
|
|
50
|
+
The main agent orchestrates the retrieval subagents **strictly sequentially —
|
|
51
|
+
never in parallel**. For each slice, in the recorded order:
|
|
52
|
+
|
|
53
|
+
1. Dispatch one read-only retrieval subagent scoped to that slice's
|
|
54
|
+
links/nodes, carrying the Stage 1 context summary and the slice's purpose.
|
|
55
|
+
2. Wait for completion; fold its output into the workflow's Figma Evidence
|
|
56
|
+
Packet (or Screenshot Context Packet rows) before dispatching the next.
|
|
57
|
+
3. Let each completed slice inform the next dispatch prompt — resolved shared
|
|
58
|
+
tokens, discovered variants, and naming conventions carry forward.
|
|
59
|
+
|
|
60
|
+
Sequential dispatch is a hard rule, not a tuning choice: it respects Figma MCP
|
|
61
|
+
session/rate limits, and it is what lets slice N+1 reuse what slice N learned.
|
|
62
|
+
Retrieval subagents never spawn further subagents.
|
|
63
|
+
|
|
64
|
+
## Fallback
|
|
65
|
+
|
|
66
|
+
If subagent spawning is unavailable (forbidden, plugin missing, unknown agent
|
|
67
|
+
type), run both stages inline in the main agent in the same order — pre-analysis
|
|
68
|
+
summary first, then per-slice retrieval — and record the skipped delegation
|
|
69
|
+
with its reason. Do not skip Stage 1 because delegation is unavailable.
|
|
@@ -90,6 +90,18 @@ title: `[SA-100] Phase 1: search facade split`. The per-task commit prefixes on
|
|
|
90
90
|
the branch are owned by `workflows/commit.md`; this stage owns only the PR-level
|
|
91
91
|
phase prefix. Non-phased work keeps the existing PR title behavior unchanged.
|
|
92
92
|
|
|
93
|
+
### Stages 3–7 — the PR description stays current
|
|
94
|
+
|
|
95
|
+
The PR description is a living artifact, not a creation-time snapshot. After
|
|
96
|
+
**every push requested while the PR exists** — repair iterations, follow-up
|
|
97
|
+
tasks, review-requested changes — update the PR description with
|
|
98
|
+
`gh pr edit <number> --body <b>` so it reflects the branch's current commit
|
|
99
|
+
set, scope, and evidence **before** returning to Watch. The description must be
|
|
100
|
+
current before the merge decision is requested; a merge may never be proposed
|
|
101
|
+
over a description that describes an older state of the branch. When generated
|
|
102
|
+
or bundled files are regenerated alongside source edits, the description names
|
|
103
|
+
that blast radius explicitly so reviewers do not undercount the diff.
|
|
104
|
+
|
|
93
105
|
### Stage 7 — merge is never automatic
|
|
94
106
|
|
|
95
107
|
Do not run `gh pr merge` without explicit user approval given in the current
|
|
@@ -126,6 +138,8 @@ silently did not run is worse than one that loudly failed.
|
|
|
126
138
|
- Merging because CI passed. CI passing is the precondition for asking, not the
|
|
127
139
|
approval itself.
|
|
128
140
|
- Reporting "done" while the branch is unpushed.
|
|
141
|
+
- Proposing or performing a merge while the PR description still describes an
|
|
142
|
+
older commit set — update it after each requested push, before merging.
|
|
129
143
|
|
|
130
144
|
## Completion Evidence
|
|
131
145
|
|
|
@@ -76,6 +76,25 @@ For design, mobile Figma audit, or mobile Figma fix, load `references/mobile-fig
|
|
|
76
76
|
|
|
77
77
|
Never rely on model self-evaluation. If device access, signing, credentials, provisioning, or hardware is unavailable, state the missing dependency and use the strongest available artifact or static proof.
|
|
78
78
|
|
|
79
|
+
## Compose Screen Previews
|
|
80
|
+
|
|
81
|
+
In every implementation workflow, when the target surface is Android Jetpack
|
|
82
|
+
Compose or KMP (Kotlin Multiplatform) Compose Multiplatform, every created or
|
|
83
|
+
updated screen-level composable ships with `@Preview` composables in the same
|
|
84
|
+
change:
|
|
85
|
+
|
|
86
|
+
- Cover the representative states the change touches (default content, loading,
|
|
87
|
+
error, and empty where they exist), using preview parameter providers when
|
|
88
|
+
the project already uses them.
|
|
89
|
+
- Follow the project's existing preview conventions (naming, placement,
|
|
90
|
+
multipreview annotations, theme wrappers) rather than inventing new ones.
|
|
91
|
+
- Previews are validation assets: never delete or weaken an existing preview to
|
|
92
|
+
make a change compile, and treat a screen edit that leaves its previews stale
|
|
93
|
+
as incomplete work.
|
|
94
|
+
- On KMP, place previews in the source set where the project renders them
|
|
95
|
+
(commonMain multiplatform previews or per-platform preview hosts), matching
|
|
96
|
+
established project layout.
|
|
97
|
+
|
|
79
98
|
## Tests Lens
|
|
80
99
|
|
|
81
100
|
When auditing or executing test work, check mobile-specific coverage for:
|
|
@@ -4,7 +4,7 @@ Use this reference when `workflows/debug.md` handles broken behavior involving K
|
|
|
4
4
|
|
|
5
5
|
This extends `references/debug-diagnosis-loop.md`. Do not use it instead of the general debug loop.
|
|
6
6
|
|
|
7
|
-
For non-debug mobile feature, refactor, tests, or security work, keep the intent-specific workflow and load `references/mobile-context.md` instead. Use `references/mobile-context.md` from Debug only when shared mobile vocabulary or non-bug parity/security/test framing is needed.
|
|
7
|
+
For non-debug mobile feature, refactor, tests, or security work, keep the intent-specific workflow and load `references/mobile-context.md` instead. Use `references/mobile-context.md` from Debug only when shared mobile vocabulary or non-bug parity/security/test framing is needed — and always when a fix creates or updates a Compose screen, because its Compose Screen Previews rule (`@Preview` coverage) applies to debug-path edits too.
|
|
8
8
|
|
|
9
9
|
## Mobile Intake
|
|
10
10
|
|
|
@@ -55,6 +55,16 @@ Batches run strictly sequentially: a batch never starts until the previous batch
|
|
|
55
55
|
- `references/spec-driven/coding-principles.md`
|
|
56
56
|
- Relevant `spec.md`, `context.md`, and `design.md` sections for the feature (not all specs)
|
|
57
57
|
|
|
58
|
+
This worker payload is a specialization of the canonical Capability Packet in
|
|
59
|
+
`references/agent-orchestration.md`: the task definitions and spec/design sections are
|
|
60
|
+
its `scope` + `inputs`, the Gate Check Commands are its `sensors`, the structured
|
|
61
|
+
return contract below is its `output`, and write permission is scoped to the batch's
|
|
62
|
+
disjoint task files. Workers inherit nothing from the parent session — every needed
|
|
63
|
+
reference is listed above by path. Inside a worker, repository-wide git operations
|
|
64
|
+
(`git stash`, shared-state `git checkout`/`switch`, `git reset`, `git clean`) are
|
|
65
|
+
prohibited; the only git surface a worker touches is the defined task cycle's atomic
|
|
66
|
+
commits in the feature worktree.
|
|
67
|
+
|
|
58
68
|
**What a batch worker does:**
|
|
59
69
|
|
|
60
70
|
Executes ALL tasks in its assigned batch **in order** — finishing every task in one phase before starting the next phase in the batch — following the `references/spec-driven/execute.md` cycle for each task (implement → gate → atomic commit). It does NOT spawn further sub-agents. After completing all tasks in the batch, the worker reports a **compact summary** to the orchestrator using the structured return contract:
|
|
@@ -76,6 +86,12 @@ No raw logs, no full test output — only the above fields keep the main context
|
|
|
76
86
|
|
|
77
87
|
**No nesting:** Batch workers execute their tasks themselves. They never spawn sub-sub-agents. Execution is strictly sequential within and across batches — there is no intra-phase or intra-batch parallelism.
|
|
78
88
|
|
|
89
|
+
**Orchestrator context discipline:** the orchestrator consumes only the compact
|
|
90
|
+
summary above. It must never read a worker's transcript, JSONL, or intermediate
|
|
91
|
+
reasoning, and must never poll a running worker for status — the summary at batch
|
|
92
|
+
completion is the only channel back (see `references/agent-orchestration.md`,
|
|
93
|
+
Orchestrator Working Memory).
|
|
94
|
+
|
|
79
95
|
## Delegation Activity Table
|
|
80
96
|
|
|
81
97
|
The batching trigger above governs **when** batch workers are offered. This table governs **what** may be delegated at all. Delegation is activity-scoped, not blanket.
|
|
@@ -118,6 +134,12 @@ Delegated work returns through the compact summary contract above. Planning, tas
|
|
|
118
134
|
- The test files in scope
|
|
119
135
|
- `references/spec-driven/validate.md` as its operating checklist
|
|
120
136
|
|
|
137
|
+
This payload is a specialization of the canonical Capability Packet
|
|
138
|
+
(`references/agent-orchestration.md`): spec + diff + tests are its `scope`/`inputs`,
|
|
139
|
+
`validate.md` is its `sensors` source, the compact verdict + `validation.md` report
|
|
140
|
+
below are its dual-channel `output`, and `permissions` are read-only outside the
|
|
141
|
+
scratch sensor state.
|
|
142
|
+
|
|
121
143
|
**What the Verifier does (full process in `validate.md`):**
|
|
122
144
|
|
|
123
145
|
1. **Spec-anchored coverage check** — re-derives coverage evidence-or-zero: every AC traced to `file:line` + assertion expression. For each covered criterion, confirms the test's asserted value matches the **spec-defined expected outcome** (not just that an assertion exists). Where the spec does not define a precise outcome, flags a **spec-precision gap** rather than passing silently.
|
|
@@ -91,19 +91,24 @@ Memory boundary:
|
|
|
91
91
|
|
|
92
92
|
## Capability Packet
|
|
93
93
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
-
|
|
102
|
-
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
-
|
|
94
|
+
**The packet field list lives in one place: `references/agent-orchestration.md`,
|
|
95
|
+
§Capability Packet.** Do not restate it here — a second copy is what let the field
|
|
96
|
+
sets drift into three diverging shapes before the canonical section existed. When a
|
|
97
|
+
workflow dispatches a reusable role, send that canonical packet rather than a loose
|
|
98
|
+
instruction.
|
|
99
|
+
|
|
100
|
+
The one field this reference still names on its own is `persona`, because a
|
|
101
|
+
persona-agent-boundary guard (`.specs/features/persona-agent-boundary/spec.md`)
|
|
102
|
+
checks its clause byte-for-byte in every packet-defining file, this one included:
|
|
103
|
+
|
|
104
|
+
`persona`: optional. The cataloged persona id in effect for the parent conversation, passed as advisory framing only — it never overrides the agent's charter Restrictions, scope, or permissions. Pass the id alone, never the persona prompt.
|
|
105
|
+
|
|
106
|
+
Design-time additions this reference owns: a new role's charter must be expressible
|
|
107
|
+
as that packet (if a role needs fields the canonical list cannot carry, the role is
|
|
108
|
+
mis-scoped — split it or fix the charter, do not grow a bespoke packet silently), and
|
|
109
|
+
any deliberate bespoke specialization (judge panel, FURPS analyst, phase-batch
|
|
110
|
+
worker) must declare itself a specialization in its own workflow file and map its
|
|
111
|
+
fields onto the canonical ones from `agent-orchestration.md`.
|
|
107
112
|
|
|
108
113
|
## Quality Checklist
|
|
109
114
|
|
|
@@ -9,7 +9,7 @@ Before the first repository mutation, load `references/implementation-delivery.m
|
|
|
9
9
|
Do not use this workflow for Flutter, React Native, web UI, generic Figma exploration, variable-only queries, or MCP troubleshooting.
|
|
10
10
|
|
|
11
11
|
1. Resolve/reuse `workflowSessionId`: `design-[entity]`.
|
|
12
|
-
2. Load `references/mobile-figma-matcher/repository-detection.md`, `references/mobile-figma-matcher/core.md`, `references/mobile-context.md`, `references/codebase-investigation.md`, and `references/verification-ladder.md`. Load `references/context-firewall.md` before large design/runtime artifacts and `references/synapse-policy.md` when repeated massa-ai searches are expected.
|
|
12
|
+
2. Load `references/mobile-figma-matcher/repository-detection.md`, `references/mobile-figma-matcher/core.md`, `references/mobile-context.md`, `references/codebase-investigation.md`, and `references/verification-ladder.md`. 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.
|
|
13
13
|
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.
|
|
14
14
|
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 only when target ownership, runtime platforms, platform-frame mappings, or screenshot authority remain ambiguous after source inspection.
|
|
15
15
|
5. Build the immutable Target Surface Packet before loading stack guidance. Classify each selected surface and load only its contracts:
|
|
@@ -22,7 +22,7 @@ Before the first repository mutation, load `references/implementation-delivery.m
|
|
|
22
22
|
- Ask for one or more Figma links, node IDs, a readable desktop selection, supplied screenshots, or explicit `none`.
|
|
23
23
|
- Do not ask for clear backend, CLI, docs, infrastructure, or non-UI work.
|
|
24
24
|
- Treat `none` as a first-class answer. Record `Figma Source: none by user choice` and do not re-ask unless the mobile UI scope changes.
|
|
25
|
-
- If Figma sources or screenshots are supplied for supported Android, iOS, or KMP Compose Multiplatform UI implementation/update work, keep this workflow as the parent and invoke `workflows/design.md` for the affected UI slice.
|
|
25
|
+
- If Figma sources or screenshots are supplied for supported Android, iOS, or KMP Compose Multiplatform UI implementation/update work, keep this workflow as the parent and invoke `workflows/design.md` for the affected UI slice. When Figma links or node IDs are supplied, load `references/figma-pre-analysis.md` and run its two-stage sequential retrieval protocol before consuming the design evidence.
|
|
26
26
|
- Preserve mobile Figma routing by intent: compare/audit wording uses `workflows/mobile-figma/mobile-figma-audit.md`; saved `MFM-*` findings use `workflows/mobile-figma/mobile-figma-fix.md`.
|
|
27
27
|
- If Figma sources are supplied for unsupported targets such as Flutter, React Native, web, desktop, or generic design exploration, do not run mobile Figma. Record that the Figma source is outside mobile Figma scope and continue the normal feature workflow.
|
|
28
28
|
- Figma defines visible design intent and represented variants only. Screenshots are context-only unless paired with structured Figma evidence; do not claim exact Figma parity, tokens, variables, or dimensions from screenshots alone. Product behavior not represented by the design source still requires a separate requirements source.
|
|
@@ -63,6 +63,21 @@ the capability, per-slot diversity activates automatically with no harness edit.
|
|
|
63
63
|
Dispatch `massa-ai-meta-judge` (read-only) with the task description, artifact type, context,
|
|
64
64
|
and artifact paths. Model request: `kimi-k3` (see Step 0.5).
|
|
65
65
|
|
|
66
|
+
> **Dispatch: `massa-ai-meta-judge`** (role: `meta-judge`) — charter `skills/agents/meta-judge/SKILL.md`
|
|
67
|
+
> - trigger: judge-with-debate Step 1; runs exactly once per evaluation
|
|
68
|
+
> - scope: the artifact under evaluation (paths supplied), task description, artifact type
|
|
69
|
+
> - permissions: read-only
|
|
70
|
+
> - inputs: task description, artifact type, context, artifact paths, model request per Step 0.5; inherits nothing — every needed path is named here
|
|
71
|
+
> - sensors: two-stage validation below (syntactic YAML, weights sum 1.0 ± 0.001, semantic shape)
|
|
72
|
+
> - output: the evaluation-specification YAML, returned verbatim for all rounds; nothing else
|
|
73
|
+
> - firewall: no artifact body quotes beyond what the rubric anchors need; no raw dumps
|
|
74
|
+
> - memory: suggest-only; main agent persists
|
|
75
|
+
> - persona: optional — the active route's cataloged id only, never the persona prompt, passed as advisory framing only — it never overrides the agent's charter Restrictions, scope, or permissions; omit when no persona is routed
|
|
76
|
+
|
|
77
|
+
This packet is a specialization of the canonical Capability Packet
|
|
78
|
+
(`references/agent-orchestration.md`): the spec YAML is its `output` contract; the
|
|
79
|
+
two-stage validation is its `sensors`.
|
|
80
|
+
|
|
66
81
|
Validate the returned evaluation specification in two stages, in order; a retry names the
|
|
67
82
|
**first failed check** and nothing else:
|
|
68
83
|
|
|
@@ -83,8 +98,24 @@ then `🤖 [Agent Done]` or `🤖 [Agent Blocked]` with the one-line reason.
|
|
|
83
98
|
|
|
84
99
|
Dispatch three `massa-ai-judge` agents **in parallel** (round 0), one per judge number, each
|
|
85
100
|
with: the verbatim specification YAML, task description, artifact paths, its own report path,
|
|
86
|
-
`round: 0`, and its model request (Step 0.5).
|
|
87
|
-
`
|
|
101
|
+
`round: 0`, and its model request (Step 0.5). The fixed panel of 3 sits inside the wave cap of
|
|
102
|
+
4 concurrent subagents (`references/agent-orchestration.md`, Orchestrator Working Memory).
|
|
103
|
+
Each judge writes its own `audits/judge/<...> judge-N.md` per the report contract and returns
|
|
104
|
+
the reply block:
|
|
105
|
+
|
|
106
|
+
> **Dispatch: `massa-ai-judge`** (role: `judge`) — charter `skills/agents/judge/SKILL.md` — 3 per panel, rounds 0..3
|
|
107
|
+
> - trigger: judge-with-debate Steps 2 and 4; panel of exactly 3, never more
|
|
108
|
+
> - scope: the artifact under evaluation, the verbatim specification YAML, own report path; debate rounds add all three report paths as peer paths and `round: R`
|
|
109
|
+
> - permissions: read-only except appending to its own judge-N report file
|
|
110
|
+
> - inputs: verbatim spec YAML, task description, artifact paths, own report path, round number, model request; debate rounds add peer report paths; inherits nothing — judges read peer reports from the filesystem paths supplied
|
|
111
|
+
> - sensors: reply-block shape below (malformed or missing `scores` counts as `contest`; same judge malformed twice → Blocked)
|
|
112
|
+
> - output: the YAML reply block below (strengths/weaknesses capped at ≤3 items); report file is the persisted channel — dual-channel rule, the chat return never carries the report body
|
|
113
|
+
> - firewall: quoted evidence snippets only; no artifact or peer-report dumps in the reply
|
|
114
|
+
> - memory: suggest-only; main agent persists
|
|
115
|
+
> - persona: optional — the active route's cataloged id only, never the persona prompt, passed as advisory framing only — it never overrides the agent's charter Restrictions, scope, or permissions; omit when no persona is routed
|
|
116
|
+
|
|
117
|
+
This packet is a specialization of the canonical Capability Packet
|
|
118
|
+
(`references/agent-orchestration.md`); the per-round additions are its `inputs` deltas.
|
|
88
119
|
|
|
89
120
|
```yaml
|
|
90
121
|
status: Complete | Partial | Blocked
|
|
@@ -10,6 +10,7 @@ Do not edit code. Route direct design implementation to `design`. Do not use thi
|
|
|
10
10
|
2. Load shared references:
|
|
11
11
|
- `references/mobile-figma-matcher/repository-detection.md` before platform guidance.
|
|
12
12
|
- `references/mobile-figma-matcher/core.md` for Figma, assets, mapping, comparison, Maestro, and claim contracts.
|
|
13
|
+
- `references/figma-pre-analysis.md` when Figma links or node IDs are provided — run its two-stage sequential retrieval protocol before Figma extraction.
|
|
13
14
|
- `references/mobile-context.md` for mobile boundaries, parity, and verification context.
|
|
14
15
|
- `references/audit-scope.md` for target resolution and freshness.
|
|
15
16
|
- `references/audit-report-io.md` before producing the report.
|
|
@@ -12,6 +12,7 @@ Do not execute from chat summaries, screenshots alone, remembered findings, or a
|
|
|
12
12
|
2. Load shared references:
|
|
13
13
|
- `references/mobile-figma-matcher/repository-detection.md` before platform guidance.
|
|
14
14
|
- `references/mobile-figma-matcher/core.md` for Figma, assets, mapping, Maestro, matrix, and claim contracts.
|
|
15
|
+
- `references/figma-pre-analysis.md` when the findings span multiple Figma links or nodes — run its two-stage sequential retrieval protocol for the re-read.
|
|
15
16
|
- `references/lessons.md` to load confirmed project lessons
|
|
16
17
|
- `references/mobile-context.md` for mobile boundary and verification guidance.
|
|
17
18
|
- `references/audit-report-io.md` before any source or validation-asset edit.
|
|
@@ -33,7 +33,20 @@ This workflow is findings-only. Do not edit the PRD/ADR unless the user separate
|
|
|
33
33
|
- Dispatch six `massa-ai-furps-analyst` sub-agents: F, U, R, P, S, X (X = FURPS+ Extensions).
|
|
34
34
|
- Each receives its `checklist.md` section, the bounded document packet, the DoR, and the Fool summary.
|
|
35
35
|
- Each returns per check-item status (`covered|partial|missing|unclear`), `FR-<letter>-<N>` findings, and contributions to Open Questions / Suggestions / Insights / Risks / DoR-gaps.
|
|
36
|
-
-
|
|
36
|
+
- Dispatch the six dimensions in waves of at most 4 concurrent analysts (e.g. 4 then 2), per the wave cap in `references/agent-orchestration.md` (Orchestrator Working Memory). Dimension analyses are order-independent, so wave order does not matter. Each gets its own ephemeral Synapse session only if it performs >=2 searches.
|
|
37
|
+
|
|
38
|
+
> **Dispatch: `massa-ai-furps-analyst`** (role: `furps-analyst`) — charter `skills/agents/furps-analyst/SKILL.md` — 6 dispatches, one per dimension, waves of ≤4
|
|
39
|
+
> - trigger: furps-refinement step 5; one analyst per FURPS+ dimension (F, U, R, P, S, X)
|
|
40
|
+
> - scope: exactly one dimension's `checklist.md` section against the bounded document packet
|
|
41
|
+
> - permissions: read-only
|
|
42
|
+
> - inputs: the dimension's checklist section, bounded document packet, DoR, Fool summary; inherits nothing — the packet names every artifact
|
|
43
|
+
> - sensors: per check-item status must be one of `covered|partial|missing|unclear`; findings carry `FR-<letter>-<N>` IDs
|
|
44
|
+
> - output: per check-item statuses, findings, and Open Questions / Suggestions / Insights / Risks / DoR-gap contributions — compact structured return, no document quotes beyond evidence snippets
|
|
45
|
+
> - firewall: document bodies summarized; no raw section dumps in the return
|
|
46
|
+
> - memory: suggest-only; main agent persists
|
|
47
|
+
> - persona: optional — the active route's cataloged id only, never the persona prompt, passed as advisory framing only — it never overrides the agent's charter Restrictions, scope, or permissions; omit when no persona is routed
|
|
48
|
+
|
|
49
|
+
This packet is a specialization of the canonical Capability Packet (`references/agent-orchestration.md`); the per-dimension checklist section is its `scope` delta.
|
|
37
50
|
6. Synthesis (main):
|
|
38
51
|
- Collect the six dimension analyses and the Fool summary.
|
|
39
52
|
- Deduplicate, cross-check, and reconcile cross-dimension concerns (e.g., error flows span F3+R2+U1; components span F2+S2).
|
|
@@ -55,7 +68,7 @@ This workflow is findings-only. Do not edit the PRD/ADR unless the user separate
|
|
|
55
68
|
| Sub-agent spawning unavailable | Run dimensions sequentially in the main agent; record the skipped-delegation reason |
|
|
56
69
|
| DoR not supplied | Use the built-in fallback; mark DoR-gaps explicitly |
|
|
57
70
|
| Document too large | context-firewall: section summaries plus pointers to sub-agents |
|
|
58
|
-
|
|
|
71
|
+
| Host concurrency cap tighter than the wave cap of 4 | Smaller waves; preserve order-independence |
|
|
59
72
|
|
|
60
73
|
## Examples
|
|
61
74
|
|
|
@@ -40,7 +40,7 @@ Complexity determines depth, not a fixed pipeline. Assess scope first, apply onl
|
|
|
40
40
|
| Large | >10 tasks OR multi-component feature | Full spec + requirement IDs | Architecture + components | Full breakdown + deps | Implement + verify per task |
|
|
41
41
|
| Complex | Ambiguity or new domain (unfamiliar vocabulary, no prior pattern) | Full spec + discuss gray areas | Research + architecture | Breakdown + phase plan | Implement + interactive UAT |
|
|
42
42
|
|
|
43
|
-
A "
|
|
43
|
+
A "Phase" is an ordered group of Tasks sharing a dependency boundary or a checkpoint commit — it is 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
44
|
|
|
45
45
|
- Specify and Execute are always required.
|
|
46
46
|
- Design is skipped when straightforward (no architectural decisions, no new patterns).
|
|
@@ -85,7 +85,7 @@ Quick artifacts live under `.specs/quick/NNN-slug/` with a `TASK.md` (one-line i
|
|
|
85
85
|
3. Run `Specify` with `references/spec-driven/specify.md`.
|
|
86
86
|
- Capture stable requirement IDs, testable acceptance criteria, edge cases, and explicit out-of-scope items.
|
|
87
87
|
- 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, load `references/mobile-context.md` and run the optional design-source gate: ask for one or more Figma links, node IDs, a readable desktop selection, supplied screenshots, or explicit `none`; record `Figma Source: none by user choice` when declined. Screenshots are context-only unless paired with structured Figma evidence. For unsupported targets, record the source as outside mobile Figma scope and do not run mobile Figma.
|
|
88
|
+
- For Android, iOS, or KMP Compose Multiplatform UI work, load `references/mobile-context.md` and run the optional design-source gate: ask for one or more Figma links, node IDs, a readable desktop selection, supplied screenshots, or explicit `none`; record `Figma Source: none by user choice` when declined. When Figma links or node IDs are supplied, load `references/figma-pre-analysis.md` and run its two-stage sequential retrieval protocol before consuming the design evidence. Screenshots are context-only unless paired with structured Figma evidence. For unsupported targets, record the source as outside mobile Figma scope and do not run mobile Figma.
|
|
89
89
|
- Apply the Requirement Closure Gate: every open requirement question is resolved with the user or recorded as an accepted assumption before execution begins.
|
|
90
90
|
4. Decide whether `Design` is required. If yes, run `references/spec-driven/design.md`; 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
91
|
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).
|
|
@@ -94,7 +94,7 @@ Quick artifacts live under `.specs/quick/NNN-slug/` with a `TASK.md` (one-line i
|
|
|
94
94
|
- 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
95
|
- Use the Test Coverage Matrix and Gate Check Commands from `tasks.md`, or state their inline equivalents when Tasks was skipped.
|
|
96
96
|
- 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
|
|
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). Offer-then-confirm — never auto-spawn; the user must accept before any sub-agent is dispatched. One worker per Phase group (~7 Tasks, whole Phases): each worker executes all its Tasks in order (implement → gate → atomic commit), then reports a compact summary (Tasks done, commit hashes, test counts, deviations). Workers never spawn further sub-agents.
|
|
98
98
|
- Implement one atomic step or approved task at a time.
|
|
99
99
|
- For long-running task sequences, create a checkpoint via `create_checkpoint` at task boundaries with `taskId`, `description`, `progressPercent`, `currentStep`, `nextAction`, `fileChanges`, and `checkpointType: "manual"` so progress is resumable after interruption.
|
|
100
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.
|