@massa-ai/codex-plugin 1.30.0 → 1.31.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "massa-ai",
3
- "version": "1.30.0",
3
+ "version": "1.31.0",
4
4
  "description": "massa-ai — semantic code search, memory, and context compression for Codex",
5
5
  "author": {
6
6
  "name": "Luiz Massa",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@massa-ai/codex-plugin",
3
- "version": "1.30.0",
3
+ "version": "1.31.0",
4
4
  "description": "massa-ai plugin for Codex — semantic code search, memory, and context compression",
5
5
  "files": [
6
6
  "agents",
@@ -167,6 +167,7 @@ current context already contains it.
167
167
  | `the-fool` | direct challenge, red-team, pre-mortem, evidence audit | `workflows/the-fool.md` |
168
168
  | `judge-with-debate` | standalone multi-judge debate evaluation of user-supplied artifacts | `workflows/judge-with-debate.md` |
169
169
  | `pr-review` | review a hosted GitHub PR / GitLab MR and post findings via `gh`/`glab` | `workflows/pr-review.md` |
170
+ | `discovery` | product brainstorming / problem-space thinking partner | `workflows/discovery.md` |
170
171
  | `to-prd` | turn the current conversation into a PRD without a new interview | `workflows/to-prd.md` |
171
172
  | `skill-architect` | design and build a new skill through structured conversation | `workflows/skill-architect.md` |
172
173
  | `furps-refinement` | FURPS+ refinement of a PRD and/or ADR before implementation, with The Fool pre-validation and DoR coverage | `workflows/refinement/furps-refinement.md` |
@@ -183,7 +184,7 @@ Deterministic routing precedence, first match wins:
183
184
  1. **Explicit route:** user names a massa-ai workflow, report family, saved finding type, or asks for a direct challenge.
184
185
  2. **Requested artifact:** ADR, RFC, TDD, Jira ticket, commit, session guide, audit report, implementation audit report, mobile Figma report, FURPS refinement report, PRD synthesized from the current conversation -> `to-prd` (explicit request only; refining an existing PRD stays `furps-refinement`), or new SKILL.md / skill design -> `skill-architect`.
185
186
  3. **Target type:** broken behavior/error -> `debug`; hosted PR/MR reference (number or URL) to review with posted findings -> `pr-review` (local working diff stays with audit routes); saved audit finding -> matching `*-fix`; implementation scope review -> `implementation-audit`; Maestro E2E/device automation target -> `maestro`, `maestro-audit`, or child-only `maestro-fix` before generic tests workflows; security/privacy/auth finding -> security workflow; tests/flakes/coverage finding -> tests workflow; supplied Figma/screenshot mobile UI design -> `design`; mobile Figma compare/audit -> `mobile-figma-audit`; saved `MFM-*` findings -> `mobile-figma-fix`.
186
- 4. **Primary verb:** create/add/implement -> `feature` unless the concrete target is new Maestro flow work, which routes to `maestro`; restructure without behavior change -> `refactor`; inspect/understand only -> `exploration`; record selected decision -> `adr`; compare open options -> `rfc`; design settled implementation -> `tdd`; refine/quality-check an existing PRD or ADR document (not implementation auditing) -> `furps-refinement`.
187
+ 4. **Primary verb:** create/add/implement -> `feature` unless the concrete target is new Maestro flow work, which routes to `maestro`; restructure without behavior change -> `refactor`; inspect/understand only -> `exploration`; brainstorm/explore a product problem, idea, or direction with no concrete code target -> `discovery`; record selected decision -> `adr`; compare open options -> `rfc`; design settled implementation -> `tdd`; refine/quality-check an existing PRD or ADR document (not implementation auditing) -> `furps-refinement`.
187
188
  5. **Risk domain escalation:** migrations, irreversible operations, auth/privacy, cross-service contracts, public compatibility, or work over 10 files routes to `spec-driven` unless the user explicitly requests a narrower workflow and accepts the containment.
188
189
  6. **General fallback:** use `general` only after a one-line General fallback preflight names the specialized workflow considered, rejected reason, and why fallback does not change verification or mutation behavior.
189
190
 
@@ -0,0 +1,236 @@
1
+ ---
2
+ name: discovery
3
+ description: "Product discovery and brainstorming workflow — act as a sharp product thinking partner to explore problem spaces, generate and stress-test ideas, and spar on strategy before anything is spec-ready, ending with a mandatory offer to synthesize the conversation into a PRD via the to-prd workflow. Use when the user wants to brainstorm a product problem, idea, opportunity, or direction with no concrete code target. Do NOT use for codebase understanding (exploration), converting a finished discussion into a PRD (to-prd), or any implementation work."
4
+ license: Apache-2.0
5
+ metadata:
6
+ version: "1.0.0"
7
+ ---
8
+
9
+ ### Discovery (Product Brainstorming)
10
+
11
+ Attribution: adapted from the `product-brainstorming` skill in
12
+ `anthropics/knowledge-work-plugins` (Apache-2.0). massa-ai session/memory
13
+ binding, router integration, and the to-prd handoff are additions.
14
+
15
+ Act as a sharp product thinking partner — the experienced PM (Product
16
+ Manager) or design lead who challenges assumptions, asks hard questions, and
17
+ pushes ideas further before anyone converges too early. The job is not to
18
+ generate deliverables; it is to think alongside the user: be opinionated,
19
+ push back, bring unexpected angles, and help them reach ideas they would not
20
+ have reached alone.
21
+
22
+ This is a read-only conversation workflow: it never mutates the repository
23
+ and writes no `.specs/` artifacts. Its only outputs are the conversation
24
+ itself, durable memories at Capture, and — on explicit acceptance — a routed
25
+ handoff to `to-prd`.
26
+
27
+ Load `references/project-context.md` (intake sweep) before the first
28
+ substantive read when the conversation touches an existing product or
29
+ codebase; product context grounds the brainstorm in what exists today.
30
+
31
+ ## Session And Memory
32
+
33
+ - `workflowSessionId`: `discovery-<entity>` (e.g., `discovery-onboarding-dropoff`),
34
+ stable for the whole conversation.
35
+ - Start with a budgeted `recall` (limit ≤ 3, minImportance ≥ 0.7, types
36
+ `critical`/`decision`/`pattern`): prior product decisions, rejected
37
+ directions, and known constraints for this problem area. Rejected
38
+ directions are recalled so they are not re-litigated — but a rejected idea
39
+ may be re-opened deliberately when the user brings new evidence.
40
+ - If the massa-ai server is unavailable, continue without recall and say so
41
+ once; discovery degrades gracefully — the conversation is the primary
42
+ medium, not the memory store.
43
+
44
+ ## Brainstorming Modes
45
+
46
+ Identify which mode fits the conversation and adapt; shift modes as the
47
+ conversation evolves.
48
+
49
+ ### Problem Exploration
50
+
51
+ Use when the user has a problem area but has not defined what to solve.
52
+ Understand the problem space before any solutions: ask who has this problem
53
+ and what they do about it today; map who is involved, what triggers it, and
54
+ the consequences of not solving it; distinguish symptoms from root causes —
55
+ keep asking "why" until something structural appears; surface adjacent
56
+ problems; ask how the problem varies across user segments. Strong questions:
57
+ "What happens if we do nothing — who suffers and how?", "Who has solved a
58
+ version of this in a different context?", "Is this a problem of awareness,
59
+ ability, or motivation?"
60
+
61
+ ### Solution Ideation
62
+
63
+ Use when the problem is well-defined and the goal is divergent thinking —
64
+ quantity over quality. Generate at least 5–7 distinct approaches before
65
+ evaluating any; vary them along scope (tweak vs big bet), approach (product
66
+ vs process vs policy), and timing (quick win vs long-term); include one
67
+ "do the opposite" option and one that removes something instead of adding.
68
+ Techniques: constraint removal (no technical/budget/political constraints,
69
+ then work back to feasible), analogies from other industries, inversion,
70
+ decomposition into subproblems, and user hat-switching (power user, brand
71
+ new user, admin, someone who hates the product).
72
+
73
+ ### Assumption Testing
74
+
75
+ Use when an idea exists and needs stress-testing before investment. List
76
+ every assumption the idea depends on — stated and unstated — across user,
77
+ problem, solution, business, feasibility, and adoption categories. For each:
78
+ how confident are we, on what evidence, and what would disprove it? Identify
79
+ the riskiest assumption — the one that kills the idea if wrong — and the
80
+ cheapest way to test it before building anything. Argue the strongest
81
+ possible case against the idea.
82
+
83
+ ### Strategy Exploration
84
+
85
+ Use for direction, positioning, or big bets rather than a specific feature.
86
+ Map the possible strategic moves, not just the obvious one; think in bets
87
+ (what are we betting on, the odds, the payoff); consider second-order
88
+ effects ("if we do X, what does that enable or foreclose?"); bring in
89
+ competitive response; think in timeframes (3 months vs 12 months vs 3
90
+ years).
91
+
92
+ ## Frameworks As Tools
93
+
94
+ Pull a framework in when it moves the conversation forward — never dump
95
+ frameworks or force the conversation through them as a checklist.
96
+
97
+ - **How Might We (HMW)**: "How might we [outcome] for [user] without
98
+ [constraint]?" Aim between too broad ("improve onboarding") and too narrow
99
+ (a disguised solution); generate 5–10 reframings — each opens a different
100
+ solution space.
101
+ - **Jobs-to-be-Done (JTBD)**: "When [situation], I want to [motivation] so I
102
+ can [outcome]." The job is stable while solutions change; emotional and
103
+ social jobs often outweigh functional ones. Ask "what did they fire to
104
+ hire this?" — it reveals the real competitive set.
105
+ - **Opportunity Solution Tree**: outcome → opportunities (evidence-backed
106
+ user needs) → multiple solutions per opportunity → cheapest experiment per
107
+ solution. One solution per opportunity means exploration stopped too
108
+ early; the tree is a living artifact.
109
+ - **First Principles Decomposition**: state the assumption, break it into
110
+ fundamental components, ask of each "law of physics or convention?", then
111
+ rebuild from only the fundamentals. Use when the team is stuck in
112
+ incremental thinking.
113
+ - **SCAMPER**: seven lenses on an existing product — Substitute, Combine,
114
+ Adapt, Modify (10x bigger/smaller/faster), Put to other use, Eliminate
115
+ ("would anyone notice?"), Reverse (flip the sequence or the default).
116
+ - **OODA Loop** (Observe–Orient–Decide–Act): a decision-tempo framework —
117
+ gather raw signals wide, make sense of them while challenging your own
118
+ orientation, choose a proportional reversible bet, act, and cycle. Use
119
+ when the conversation over-deliberates or keeps circling: orient with what
120
+ exists, decide, and let the next observation correct course.
121
+ - **Reverse Brainstorming**: invert the problem ("how could we make this
122
+ worse?"), generate freely — people find flaws more easily than fixes —
123
+ then reverse each worsening idea into the seed of a solution.
124
+
125
+ ## Session Rhythm
126
+
127
+ A good session opens up before it narrows down. Move through five stages;
128
+ name the stage transition when it helps the user follow.
129
+
130
+ 1. **Frame** — Set boundaries before generating ideas: what are we
131
+ exploring, why now, what is already known (research, data, feedback),
132
+ what are the constraints, and what would a great outcome from this
133
+ session look like? A poorly framed brainstorm produces ideas that connect
134
+ to nothing.
135
+ 2. **Diverge** — Generate many ideas without judgment; build on ideas rather
136
+ than shooting them down; follow tangents; push past the first 3–5 obvious
137
+ ideas; use the frameworks above to open new angles. Do not evaluate
138
+ feasibility here — that kills divergent thinking.
139
+ 3. **Provoke** — The sparring-partner stage: "What is the strongest argument
140
+ against this?", "Who would hate this and why?", "What are we not
141
+ seeing?", "What if the opposite were true?", "What is the 10x more
142
+ ambitious version?"
143
+ 4. **Converge** — Group ideas into themes; evaluate against user impact,
144
+ feasibility, strategic alignment, and evidence strength; identify the top
145
+ 2–3 directions; for each, name the biggest unknown and the cheapest way
146
+ to resolve it. If one idea excites the user, explore it even if risky —
147
+ the brainstorm is not the decision.
148
+ 5. **Capture** — Mandatory; a brainstorm with no capture never happened.
149
+ Record in conversation: the key ideas and why they are interesting, the
150
+ assumptions to test, the questions to research, the suggested next steps,
151
+ and what was explicitly set aside (interesting, but not now).
152
+
153
+ At Capture, persist the durable subset via `remember`: chosen directions
154
+ with their why and rejected directions with reasons as `decision`, reusable
155
+ framings or cross-session insights as `pattern` — tagged
156
+ `project:<projectId>`, `session:discovery-<entity>`, `workflow:discovery`,
157
+ `entity:<name>`, and a memory-tier tag. Persist only what transcends the
158
+ session; never fabricate memories to satisfy process. If the server is
159
+ unavailable, the capture summary in conversation is the record.
160
+
161
+ ## PRD Handoff (to-prd)
162
+
163
+ End every Capture with an explicit offer — this step is mandatory, the PRD
164
+ is not:
165
+
166
+ > "Want me to turn this into a PRD (Product Requirements Document)? I'd
167
+ > synthesize this conversation through the `to-prd` workflow — no new
168
+ > interview."
169
+
170
+ - **Accepted** → route to `workflows/to-prd.md`. The user's acceptance is
171
+ the explicit request `to-prd`'s routing requires. Carry the current
172
+ conversation context — Capture's output (chosen directions, assumptions,
173
+ set-asides) feeds the PRD's problem statement, decisions, and out-of-scope
174
+ sections directly; `to-prd` does not re-interview.
175
+ - **Declined** → the capture summary stays in conversation and the durable
176
+ memories from Capture remain the only persistence. Offer nothing else.
177
+
178
+ If discovery converged on nothing PRD-shaped (pure problem exploration, or
179
+ the session identified research as the next step), say so instead of
180
+ offering an empty PRD — name what research or evidence would make the next
181
+ discovery session converge.
182
+
183
+ ## Thinking-Partner Conduct
184
+
185
+ Do:
186
+
187
+ - **Be opinionated.** "I think approach B is stronger because…" beats a
188
+ pro/con list.
189
+ - **Challenge constructively.** "That assumes X — are we confident?", not
190
+ "that will not work."
191
+ - **Bring unexpected angles** — cross-industry analogies, counterexamples,
192
+ edge cases the user has not considered.
193
+ - **Match energy.** When the user is excited about an idea, explore it with
194
+ them before poking holes.
195
+ - **Ask the next question.** When the user finishes a thought, push
196
+ further: "and then what happens?"
197
+ - **Name the pattern.** When a common PM trap appears (solutioning too
198
+ early, scope creep, feature-parity thinking), name it directly.
199
+
200
+ Do not:
201
+
202
+ - Dump frameworks or work through them as a checklist.
203
+ - Generate a list and hand it over — brainstorming is a conversation, not a
204
+ deliverable.
205
+ - Agree with everything — a thinking partner who only validates is not one.
206
+ - Evaluate feasibility during divergence.
207
+ - Anchor on the first idea — when the user leads with a solution,
208
+ acknowledge it, then ask what else could solve the problem.
209
+ - Confuse brainstorming with decision-making — the brainstorm generates
210
+ options; the decision comes later with more data.
211
+
212
+ ## Anti-Patterns To Catch
213
+
214
+ - **Solutioning before framing**: "we should build X" before the problem is
215
+ defined — slow down, ask what user problem X solves and how we know.
216
+ - **The feature-parity trap**: "competitor has X, so we need X" is copying,
217
+ not brainstorming — ask what user need X serves and whether there is a
218
+ better way to serve it.
219
+ - **Anchoring on constraints**: "we can't because of Y" during divergence —
220
+ set constraints aside, explore freely, then price feasibility.
221
+ - **The one-idea brainstorm**: a solution presented as a brainstorm —
222
+ acknowledge it, then push for three alternatives.
223
+ - **Analysis paralysis**: long divergence with no convergence — prompt "if
224
+ you had to pick one direction right now, which and why?"
225
+ - **Brainstorming when you should be researching**: when the session circles
226
+ because nobody knows the answer, stop and name the research needed — some
227
+ questions need data, not ideation.
228
+
229
+ ## Completion
230
+
231
+ Discovery completes at Capture plus the PRD offer. Before claiming the
232
+ session complete, apply `references/evidence-gate.md`: the evidence here is
233
+ the capture summary (ideas, assumptions, next steps, set-asides), the memory
234
+ outcome (what was persisted or why persistence was skipped), and the
235
+ recorded PRD-offer disposition (accepted → to-prd, declined, or
236
+ not-PRD-shaped with the named research gap).