analyzthis_design 2.3.0 → 2.4.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/HOW-TO-USE.md +2 -1
- package/README.md +39 -7
- package/dist/HOW-TO-USE.md +2 -1
- package/dist/README.md +39 -7
- package/dist/bin/cli.js +22 -4
- package/dist/lib/chunk-run.js +2 -0
- package/dist/lib/install.js +53 -0
- package/dist/lib/knowledge.js +49 -18
- package/dist/lib/mcp-server.js +206 -75
- package/dist/lib/orchestrator/run.js +5 -0
- package/dist/lib/session.js +33 -2
- package/dist/skills/anuj/SKILL.md +7 -0
- package/dist/skills/arjun/SKILL.md +5 -263
- package/dist/skills/arjun/references/lens.md +265 -0
- package/dist/skills/kavi/SKILL.md +7 -0
- package/dist/skills/knowledge-bank/SKILL.md +14 -116770
- package/dist/skills/meera/SKILL.md +7 -0
- package/dist/skills/noor/SKILL.md +7 -0
- package/dist/skills/persona-orchestrator/SKILL.md +5 -195
- package/dist/skills/persona-orchestrator/references/lens.md +197 -0
- package/dist/skills/priya/SKILL.md +7 -0
- package/dist/skills/raj/SKILL.md +7 -0
- package/dist/skills/receipt/SKILL.md +17 -0
- package/dist/skills/ux-story-gate/SKILL.md +5 -338
- package/dist/skills/ux-story-gate/references/lens.md +340 -0
- package/dist/skills/zara/SKILL.md +7 -0
- package/package.json +1 -1
- package/skills/anuj/SKILL.md +7 -0
- package/skills/arjun/SKILL.md +5 -263
- package/skills/arjun/references/lens.md +265 -0
- package/skills/kavi/SKILL.md +7 -0
- package/skills/knowledge-bank/SKILL.md +14 -116770
- package/skills/meera/SKILL.md +7 -0
- package/skills/noor/SKILL.md +7 -0
- package/skills/persona-orchestrator/SKILL.md +5 -195
- package/skills/persona-orchestrator/references/lens.md +197 -0
- package/skills/priya/SKILL.md +7 -0
- package/skills/raj/SKILL.md +7 -0
- package/skills/receipt/SKILL.md +17 -0
- package/skills/ux-story-gate/SKILL.md +5 -338
- package/skills/ux-story-gate/references/lens.md +340 -0
- package/skills/zara/SKILL.md +7 -0
|
@@ -20,6 +20,13 @@ You are Meera. Ex-revenue/sales, thinks in retention, ARR, and GTM levers. Numbe
|
|
|
20
20
|
|
|
21
21
|
**Assess-only:** if the user asked to assess/propose/critique rather than build/implement/ship, stop at the business impact block — do not edit code.
|
|
22
22
|
|
|
23
|
+
|
|
24
|
+
## Lite output (default)
|
|
25
|
+
|
|
26
|
+
Verdict or one moment. Top three fixes (or one delight). One evidence line.
|
|
27
|
+
Use the full output schema below only if the user says expand.
|
|
28
|
+
You cannot know host tokens. Do not invent a dollar figure.
|
|
29
|
+
|
|
23
30
|
## Lens
|
|
24
31
|
|
|
25
32
|
1. **Primary metric impact** — does this move the north-star metric (retention, activation, ARR, conversion)?
|
|
@@ -21,6 +21,13 @@ You are Noor. 7 years IA for SaaS products across fintech, workflow automation,
|
|
|
21
21
|
|
|
22
22
|
**Assess-only:** if the user asked to assess/propose/critique rather than build/implement/ship, stop at the concept — do not edit code.
|
|
23
23
|
|
|
24
|
+
|
|
25
|
+
## Lite output (default)
|
|
26
|
+
|
|
27
|
+
Verdict or one moment. Top three fixes (or one delight). One evidence line.
|
|
28
|
+
Use the full output schema below only if the user says expand.
|
|
29
|
+
You cannot know host tokens. Do not invent a dollar figure.
|
|
30
|
+
|
|
24
31
|
## Non-negotiables
|
|
25
32
|
|
|
26
33
|
- **Information hierarchy is declared before anything else.** Every screen has a ranked order of what matters most — primary action, then primary data, then secondary context, then rarely-needed config. This ranking is the ground truth other personas check their own lens against (Anuj checks density against it, Meera checks business-critical info against it, Arjun checks visual weight against it).
|
|
@@ -21,200 +21,10 @@ When you detect these signals — `wireframe`, `mockup`, `new screen`, `design f
|
|
|
21
21
|
|
|
22
22
|
---
|
|
23
23
|
|
|
24
|
-
##
|
|
24
|
+
## Lite output (default)
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
Verdict or one moment. Top three fixes (or one delight). One evidence line.
|
|
27
|
+
Expand the full schema only if the user says expand.
|
|
28
|
+
Call retrieve for the rest of this skill (kind=skill). You cannot know host tokens. Do not invent a dollar figure.
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
- If no session exists: run `npx analyzthis_design session init` to create one, then proceed to Step 1.
|
|
30
|
-
|
|
31
|
-
Load `agents/session-schema.json` to know the exact shape you're reading and writing.
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## Step 1 — Run ux-story-gate intake (Phases 0 – 1.5)
|
|
36
|
-
|
|
37
|
-
Read `skills/ux-story-gate/SKILL.md` and run:
|
|
38
|
-
- Phase 0 (PRD discovery) — skip re-deriving anything already present in session state
|
|
39
|
-
- Phase 0.5 (DS/Figma discovery) — populate `ds_checklist` and `figma_node`
|
|
40
|
-
- Phase 1 (task map intake gate) — populate `task_map`
|
|
41
|
-
- Phase 1.5 (MoE router) — populate `routing_decision`
|
|
42
|
-
|
|
43
|
-
Persist all four outputs to session state before moving on. Do not proceed to Step 2 until Phase 1's gate condition is satisfied (a confirmed task map exists).
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Step 2 — Select the execution graph (MoE subset is the default)
|
|
48
|
-
|
|
49
|
-
Read `agents/router.json` and `agents/chain.json`.
|
|
50
|
-
|
|
51
|
-
**Default budget is 1–2 experts.** Only run the full `default_chain` (Arjun → Meera → Priya → Zara) when one of these is explicitly true:
|
|
52
|
-
- The routing decision's `problem_type` is `full_screen_review`, OR
|
|
53
|
-
- The user explicitly asked for a "full critique", "full review", "design-critic", or "run all personas"
|
|
54
|
-
|
|
55
|
-
Otherwise:
|
|
56
|
-
- **Narrower problem type:** run only the expert(s) listed in the matching `agents/router.json` rule's `route_to`, in the order their `chain_position` implies. Never include a persona listed under that rule's `never_route_to`.
|
|
57
|
-
- **Ideation / concept-generation ask:** use `ideation_chain` from `agents/chain.json` instead (Meera → Noor + Anuj → Arjun → Zara → Priya; Raj on stalemate only), matching `skills/ux-ideator/SKILL.md`.
|
|
58
|
-
|
|
59
|
-
**Early DS exit (before running the chain):** if `ds_checklist` has any item marked "at risk" from Phase 0.5, and the ask is not itself a DS/brand remediation ask, stop the graph at the DS Gate remediation path — run only DS Gate checks + Arjun in `arjun_color_system_only` scope. Do not run Meera, Priya, or Zara until the DS Gate clears, unless the user explicitly overrides with "run everything anyway."
|
|
60
|
-
|
|
61
|
-
**Parallel execution:** check each persona's manifest for `parallel_safe_with`. If two selected experts list each other there (e.g. Meera and Priya), run them independently — do not require one's output before starting the other. Only sequence experts that actually need a prior handoff.
|
|
62
|
-
|
|
63
|
-
Announce the selected graph and why it's smaller than the full chain, one line: *"Running [chain name] with [persona list] (budget: N) — excluding [excluded personas] per the router. Full chain not run because [reason]."*
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
|
|
67
|
-
## Step 3 — Execute adversarial deliberation (v1.19)
|
|
68
|
-
|
|
69
|
-
Read `deliberation-protocol` from your host skills dir (sibling preferred), e.g. `~/.cursor/skills/deliberation-protocol/SKILL.md`, `~/.claude/skills/deliberation-protocol/SKILL.md`, `~/.grok/skills/deliberation-protocol/SKILL.md`, `~/.agents/skills/deliberation-protocol/SKILL.md`, or legacy `~/.claude/commands/deliberation-protocol.md` **first**. Personas **debate** — they do not pass generic handoff documents.
|
|
70
|
-
|
|
71
|
-
**Preferred (CLI):** `npx analyzthis_design run --task "..." [--full] [--satisfaction 0.4] [--max-rounds 3]` — enforces parallel groups, objection rounds, Raj escalation, and writes `deliberation.round_log` to session.
|
|
72
|
-
|
|
73
|
-
**Chat workflow** when not using CLI:
|
|
74
|
-
|
|
75
|
-
1. Build **context pack** from session: `task_map`, `ds_checklist`, `information_hierarchy`, knowledge bank excerpts
|
|
76
|
-
2. Run **deliberation groups** from `agents/chain.json` → `deliberation_groups` (critique / ideation / lite)
|
|
77
|
-
3. **Review mode (rounds 0..N-1):** each persona reads prior outputs, raises grounded objections, asks contextual questions. Default `accepts_prior: false`. Output deliberation JSON block per `agents/deliberation-schema.json`
|
|
78
|
-
4. **Parallel pairs:** Noor∥Anuj, Meera∥Priya — critique each other's claims in the same round
|
|
79
|
-
5. **Produce mode (final round):** full output schema only after objections resolve or Raj rules
|
|
80
|
-
6. After each persona: append to `persona_outputs`, update `digest.prior_scores`, append to `deliberation.round_log`
|
|
81
|
-
7. **Raj** on stalemate: 2+ blocking objections, repeated claims, or round >= `escalate_to_raj_after_round`
|
|
82
|
-
|
|
83
|
-
Forbidden in review rounds: generic handoff lines without citing a specific prior claim; rewriting full wireframes/critiques before deliberation closes.
|
|
84
|
-
|
|
85
|
-
For reference data: `npx analyzthis_design retrieve --file <csv> --column <col> --keywords <a,b>`
|
|
86
|
-
|
|
87
|
-
Legacy sequential mode: `npx analyzthis_design run --no-deliberate` or skip deliberation-protocol in chat (not recommended).
|
|
88
|
-
|
|
89
|
-
---
|
|
90
|
-
|
|
91
|
-
## Step 4 — Hard gates
|
|
92
|
-
|
|
93
|
-
Run in this order, after the chain completes:
|
|
94
|
-
|
|
95
|
-
1. **DS Gate** — re-check the DS Token Checklist from Phase 0.5. If any item is still "at risk," this blocks a SHIP verdict regardless of composite score.
|
|
96
|
-
2. **Information Hierarchy Gate** — read `skills/design-critic/SKILL.md`'s Information Hierarchy Gate section and run it against Arjun's Visual Hierarchy grade and Meera's Hierarchy check (only if both ran).
|
|
97
|
-
3. **Verify Gate** — run `ux-story-gate` Phase 4.5 (browser automation) against the primary task. Record `verify_results` in session state.
|
|
98
|
-
|
|
99
|
-
Any gate failure is inserted into the Top 3 actionable changes automatically, same as the Information Hierarchy Gate rule in `design-critic`.
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
## Step 5 — Synthesize verdict
|
|
104
|
-
|
|
105
|
-
Produce the Task × Finding table (format from `ux-story-gate` Phase 5) or the Composite Score block (format from `design-critic` Phase 5), depending on which graph ran. Include:
|
|
106
|
-
|
|
107
|
-
```
|
|
108
|
-
## Orchestrator Run Summary
|
|
109
|
-
Graph: [default_chain / ideation_chain / MoE subset: persona list]
|
|
110
|
-
Experts run: [N] (budget) — [persona list]
|
|
111
|
-
DS Gate: [PASS / FAIL — item(s) at risk]
|
|
112
|
-
Hierarchy Gate: [PASS / FAIL]
|
|
113
|
-
Verify Gate: [pass / fail / not_run]
|
|
114
|
-
Verdict: [SHIP / REVISE / BLOCK]
|
|
115
|
-
Mode: [assess_only / build_approved]
|
|
116
|
-
Est. tokens: [input/output estimate — see metrics in session state]
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
Update `session-state.json` (`metrics`): `llm_calls`, `experts_run`, `input_tokens_est`, `output_tokens_est`, `cache_hits`, `mode`.
|
|
120
|
-
|
|
121
|
-
If any gate failed or the verdict is BLOCK, escalate to Raj per `design-critic`'s BLOCK escalation rules.
|
|
122
|
-
|
|
123
|
-
**Delta re-evaluation (mandatory on any follow-up after REVISE):** when the user applies changes and asks for a re-check, do NOT re-run the full graph. Read `session-state.json`'s prior `persona_outputs` and Top 3 actionable changes, then run only the persona(s) assigned to those Top 3 items, per `skills/design-critic/SKILL.md`'s Re-evaluation Protocol. Update only the affected `digest.prior_scores` entries and re-check the Information Hierarchy Gate. This is not optional — re-running the full chain on every follow-up is the token-waste failure this system exists to prevent.
|
|
124
|
-
|
|
125
|
-
---
|
|
126
|
-
|
|
127
|
-
## Step 6 — Respect assess-only mode
|
|
128
|
-
|
|
129
|
-
Run `ux-story-gate` Phase 5.5. If `mode: assess_only`, stop here — do not write or edit code. If `mode: build_approved`, proceed to implement the P0/P1 fixes named in the synthesis.
|
|
130
|
-
|
|
131
|
-
---
|
|
132
|
-
|
|
133
|
-
## Step 6.5 — Capture user corrections and outcomes (v1.16 / v1.21)
|
|
134
|
-
|
|
135
|
-
When the user is **unhappy** with a persona's output or **rewrites/corrects** it, record that signal so future training can learn from mistakes:
|
|
136
|
-
|
|
137
|
-
```bash
|
|
138
|
-
npx analyzthis_design feedback record --persona arjun --rating 2 \
|
|
139
|
-
--comment "What was wrong" \
|
|
140
|
-
--correction "What they wanted instead" \
|
|
141
|
-
--tags wrong_hierarchy,invented_tokens
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
Or in one step when rejecting:
|
|
145
|
-
|
|
146
|
-
```bash
|
|
147
|
-
npx analyzthis_design session accept --persona arjun --reject \
|
|
148
|
-
--comment "..." --correction "..." --rating 2 --tags off_brief
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
Suggest this when the user says things like *"that's not what I meant,"* *"use our tokens,"* or *"the hierarchy is wrong."* Tags hint: `wrong_hierarchy`, `invented_tokens`, `missed_ds`, `too_verbose`, `bad_ia`, `off_brief`.
|
|
152
|
-
|
|
153
|
-
List or export later: `feedback list`, `feedback export --persona arjun --all`.
|
|
154
|
-
|
|
155
|
-
**Track whether the advice actually shipped.** After the user implements changes, confirm the outcome so the evolution loop can learn:
|
|
156
|
-
|
|
157
|
-
```bash
|
|
158
|
-
npx analyzthis_design outcome --confirm --persona arjun --result shipped
|
|
159
|
-
# or: revised, blocked_correctly, missed
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
**Default execution is chunked (v2.0).** `npx analyzthis_design run --task "..."` now uses a frontier planner + cheap chunk models. Use `/run-unchunked` or `npx analyzthis_design run-unchunked` only when you explicitly want the legacy single-pass deliberation chain.
|
|
163
|
-
|
|
164
|
-
**Set visual direction with the team.** Use `/mood-board` when the user wants references and a team-deliberated direction:
|
|
165
|
-
|
|
166
|
-
```bash
|
|
167
|
-
npx analyzthis_design moodboard create --task "B2B fintech dashboard, trustworthy, high-contrast" --auto
|
|
168
|
-
npx analyzthis_design moodboard critique --board <boardId>
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
References are tagged, design-system patterns are pulled, and Arjun/Meera/Priya/Zara/Noor deliberate with Honeycomb scoring until consensus.
|
|
172
|
-
|
|
173
|
-
**Evolve the team.** Periodically (e.g., weekly), run:
|
|
174
|
-
|
|
175
|
-
```bash
|
|
176
|
-
npx analyzthis_design evolve --extract --dry-run # preview proposed patches
|
|
177
|
-
npx analyzthis_design evolve --extract # write patch files for review
|
|
178
|
-
npx analyzthis_design evolve --apply <patchId> --dry-run # preview a patch
|
|
179
|
-
npx analyzthis_design evolve --apply <patchId> # apply after review
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
This harvests accepted outputs + confirmed outcomes, extracts lessons into `~/.analyzthis_design/lessons/`, and proposes patches to:
|
|
183
|
-
- persona SKILL.md / cards (new canonical failure patterns),
|
|
184
|
-
- `skills/design-reference/*.csv` rows (new product-type guidance),
|
|
185
|
-
- `agents/router.json` rules (task_type → best-performing expert).
|
|
186
|
-
|
|
187
|
-
Patches are **dry-run by default** and require human review before apply.
|
|
188
|
-
|
|
189
|
-
**Share with maintainers (opt-in):** after recording, suggest `npx analyzthis_design feedback submit --yes` so anonymized corrections help improve personas for everyone. Preview first with `--dry-run`.
|
|
190
|
-
|
|
191
|
-
---
|
|
192
|
-
|
|
193
|
-
## What this skill is not
|
|
194
|
-
|
|
195
|
-
- **Not a persona.** It has no design opinion — it routes to the ones that do.
|
|
196
|
-
- **Not a replacement for `ux-story-gate` or `design-critic`.** It calls them; it doesn't duplicate their logic.
|
|
197
|
-
- **Not a code generator by default.** Respects assess-only mode like every other skill in this system.
|
|
198
|
-
|
|
199
|
-
---
|
|
200
|
-
|
|
201
|
-
## Files this depends on
|
|
202
|
-
|
|
203
|
-
- `agents/router.json` — MoE routing rules
|
|
204
|
-
- `agents/chain.json` — default and ideation chains, deliberation_groups, gate ordering, token caps
|
|
205
|
-
- `agents/deliberation-schema.json` — objection/satisfaction output contract
|
|
206
|
-
- `deliberation-protocol` skill — adversarial review rules (v1.19); host path e.g. `~/.claude/skills/deliberation-protocol/SKILL.md`
|
|
207
|
-
- `agents/session-schema.json` — session state shape, including `digest` and `metrics`
|
|
208
|
-
- `agents/manifests/*.json` — per-persona allowed/forbidden jobs, hard gates, `system_card`, `tier`, `max_output_tokens`
|
|
209
|
-
- `agents/cards/*.md` — short persona system prompts used by default instead of full SKILL.md
|
|
210
|
-
- `skills/ux-story-gate/SKILL.md` — intake phases 0 – 1.5, 4.5, 5.5
|
|
211
|
-
- `skills/design-critic/SKILL.md` — chain handoff format, Information Hierarchy Gate, BLOCK escalation, Re-evaluation Protocol
|
|
212
|
-
- `npx analyzthis_design session init|show|reset` — session state CLI
|
|
213
|
-
- `npx analyzthis_design research --url|--query` — writes `web-context.md` into the session; also load this file alongside the knowledge bank before Step 1. In Cursor/Claude, if the CLI research stub is empty, use WebSearch/WebFetch/Figma MCP and append the result to the same `web-context.md` path.
|
|
214
|
-
|
|
215
|
-
## Efficiency defaults
|
|
216
|
-
|
|
217
|
-
- Default to the **MoE subset**, not the full chain — see Step 2.
|
|
218
|
-
- Default to **cards + lite schema**, not full SKILL.md + deep schema — see Step 3.
|
|
219
|
-
- Default to **delta re-evaluation** on follow-ups, not a full re-run — see Step 5.
|
|
220
|
-
- Skip Phase 4.5 browser verify when `mode: assess_only` and no running URL is available; record `verify_results.primary_task: "not_run"` rather than skipping silently.
|
|
30
|
+
Retrieve the full lens: `analyzthis_retrieve` kind=skill file=persona-orchestrator (or `npx analyzthis_design retrieve` after MCP).
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
## Step 0 — Load session state
|
|
2
|
+
|
|
3
|
+
Run (or instruct the host to run) `npx analyzthis_design session show`.
|
|
4
|
+
|
|
5
|
+
- If a session already exists for this project: read it. Do not re-ask the user for a task map, DS tokens, or routing decision that's already recorded — this is the fix for the "Ask/Agent double spend" failure where context gets re-derived every turn.
|
|
6
|
+
- If no session exists: run `npx analyzthis_design session init` to create one, then proceed to Step 1.
|
|
7
|
+
|
|
8
|
+
Load `agents/session-schema.json` to know the exact shape you're reading and writing.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Step 1 — Run ux-story-gate intake (Phases 0 – 1.5)
|
|
13
|
+
|
|
14
|
+
Read `skills/ux-story-gate/SKILL.md` and run:
|
|
15
|
+
- Phase 0 (PRD discovery) — skip re-deriving anything already present in session state
|
|
16
|
+
- Phase 0.5 (DS/Figma discovery) — populate `ds_checklist` and `figma_node`
|
|
17
|
+
- Phase 1 (task map intake gate) — populate `task_map`
|
|
18
|
+
- Phase 1.5 (MoE router) — populate `routing_decision`
|
|
19
|
+
|
|
20
|
+
Persist all four outputs to session state before moving on. Do not proceed to Step 2 until Phase 1's gate condition is satisfied (a confirmed task map exists).
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Step 2 — Select the execution graph (MoE subset is the default)
|
|
25
|
+
|
|
26
|
+
Read `agents/router.json` and `agents/chain.json`.
|
|
27
|
+
|
|
28
|
+
**Default budget is 1–2 experts.** Only run the full `default_chain` (Arjun → Meera → Priya → Zara) when one of these is explicitly true:
|
|
29
|
+
- The routing decision's `problem_type` is `full_screen_review`, OR
|
|
30
|
+
- The user explicitly asked for a "full critique", "full review", "design-critic", or "run all personas"
|
|
31
|
+
|
|
32
|
+
Otherwise:
|
|
33
|
+
- **Narrower problem type:** run only the expert(s) listed in the matching `agents/router.json` rule's `route_to`, in the order their `chain_position` implies. Never include a persona listed under that rule's `never_route_to`.
|
|
34
|
+
- **Ideation / concept-generation ask:** use `ideation_chain` from `agents/chain.json` instead (Meera → Noor + Anuj → Arjun → Zara → Priya; Raj on stalemate only), matching `skills/ux-ideator/SKILL.md`.
|
|
35
|
+
|
|
36
|
+
**Early DS exit (before running the chain):** if `ds_checklist` has any item marked "at risk" from Phase 0.5, and the ask is not itself a DS/brand remediation ask, stop the graph at the DS Gate remediation path — run only DS Gate checks + Arjun in `arjun_color_system_only` scope. Do not run Meera, Priya, or Zara until the DS Gate clears, unless the user explicitly overrides with "run everything anyway."
|
|
37
|
+
|
|
38
|
+
**Parallel execution:** check each persona's manifest for `parallel_safe_with`. If two selected experts list each other there (e.g. Meera and Priya), run them independently — do not require one's output before starting the other. Only sequence experts that actually need a prior handoff.
|
|
39
|
+
|
|
40
|
+
Announce the selected graph and why it's smaller than the full chain, one line: *"Running [chain name] with [persona list] (budget: N) — excluding [excluded personas] per the router. Full chain not run because [reason]."*
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Step 3 — Execute adversarial deliberation (v1.19)
|
|
45
|
+
|
|
46
|
+
Read `deliberation-protocol` from your host skills dir (sibling preferred), e.g. `~/.cursor/skills/deliberation-protocol/SKILL.md`, `~/.claude/skills/deliberation-protocol/SKILL.md`, `~/.grok/skills/deliberation-protocol/SKILL.md`, `~/.agents/skills/deliberation-protocol/SKILL.md`, or legacy `~/.claude/commands/deliberation-protocol.md` **first**. Personas **debate** — they do not pass generic handoff documents.
|
|
47
|
+
|
|
48
|
+
**Preferred (CLI):** `npx analyzthis_design run --task "..." [--full] [--satisfaction 0.4] [--max-rounds 3]` — enforces parallel groups, objection rounds, Raj escalation, and writes `deliberation.round_log` to session.
|
|
49
|
+
|
|
50
|
+
**Chat workflow** when not using CLI:
|
|
51
|
+
|
|
52
|
+
1. Build **context pack** from session: `task_map`, `ds_checklist`, `information_hierarchy`, knowledge bank excerpts
|
|
53
|
+
2. Run **deliberation groups** from `agents/chain.json` → `deliberation_groups` (critique / ideation / lite)
|
|
54
|
+
3. **Review mode (rounds 0..N-1):** each persona reads prior outputs, raises grounded objections, asks contextual questions. Default `accepts_prior: false`. Output deliberation JSON block per `agents/deliberation-schema.json`
|
|
55
|
+
4. **Parallel pairs:** Noor∥Anuj, Meera∥Priya — critique each other's claims in the same round
|
|
56
|
+
5. **Produce mode (final round):** full output schema only after objections resolve or Raj rules
|
|
57
|
+
6. After each persona: append to `persona_outputs`, update `digest.prior_scores`, append to `deliberation.round_log`
|
|
58
|
+
7. **Raj** on stalemate: 2+ blocking objections, repeated claims, or round >= `escalate_to_raj_after_round`
|
|
59
|
+
|
|
60
|
+
Forbidden in review rounds: generic handoff lines without citing a specific prior claim; rewriting full wireframes/critiques before deliberation closes.
|
|
61
|
+
|
|
62
|
+
For reference data: `npx analyzthis_design retrieve --file <csv> --column <col> --keywords <a,b>`
|
|
63
|
+
|
|
64
|
+
Legacy sequential mode: `npx analyzthis_design run --no-deliberate` or skip deliberation-protocol in chat (not recommended).
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Step 4 — Hard gates
|
|
69
|
+
|
|
70
|
+
Run in this order, after the chain completes:
|
|
71
|
+
|
|
72
|
+
1. **DS Gate** — re-check the DS Token Checklist from Phase 0.5. If any item is still "at risk," this blocks a SHIP verdict regardless of composite score.
|
|
73
|
+
2. **Information Hierarchy Gate** — read `skills/design-critic/SKILL.md`'s Information Hierarchy Gate section and run it against Arjun's Visual Hierarchy grade and Meera's Hierarchy check (only if both ran).
|
|
74
|
+
3. **Verify Gate** — run `ux-story-gate` Phase 4.5 (browser automation) against the primary task. Record `verify_results` in session state.
|
|
75
|
+
|
|
76
|
+
Any gate failure is inserted into the Top 3 actionable changes automatically, same as the Information Hierarchy Gate rule in `design-critic`.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Step 5 — Synthesize verdict
|
|
81
|
+
|
|
82
|
+
Produce the Task × Finding table (format from `ux-story-gate` Phase 5) or the Composite Score block (format from `design-critic` Phase 5), depending on which graph ran. Include:
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
## Orchestrator Run Summary
|
|
86
|
+
Graph: [default_chain / ideation_chain / MoE subset: persona list]
|
|
87
|
+
Experts run: [N] (budget) — [persona list]
|
|
88
|
+
DS Gate: [PASS / FAIL — item(s) at risk]
|
|
89
|
+
Hierarchy Gate: [PASS / FAIL]
|
|
90
|
+
Verify Gate: [pass / fail / not_run]
|
|
91
|
+
Verdict: [SHIP / REVISE / BLOCK]
|
|
92
|
+
Mode: [assess_only / build_approved]
|
|
93
|
+
Est. tokens: [input/output estimate — see metrics in session state]
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Update `session-state.json` (`metrics`): `llm_calls`, `experts_run`, `input_tokens_est`, `output_tokens_est`, `cache_hits`, `mode`.
|
|
97
|
+
|
|
98
|
+
If any gate failed or the verdict is BLOCK, escalate to Raj per `design-critic`'s BLOCK escalation rules.
|
|
99
|
+
|
|
100
|
+
**Delta re-evaluation (mandatory on any follow-up after REVISE):** when the user applies changes and asks for a re-check, do NOT re-run the full graph. Read `session-state.json`'s prior `persona_outputs` and Top 3 actionable changes, then run only the persona(s) assigned to those Top 3 items, per `skills/design-critic/SKILL.md`'s Re-evaluation Protocol. Update only the affected `digest.prior_scores` entries and re-check the Information Hierarchy Gate. This is not optional — re-running the full chain on every follow-up is the token-waste failure this system exists to prevent.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Step 6 — Respect assess-only mode
|
|
105
|
+
|
|
106
|
+
Run `ux-story-gate` Phase 5.5. If `mode: assess_only`, stop here — do not write or edit code. If `mode: build_approved`, proceed to implement the P0/P1 fixes named in the synthesis.
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Step 6.5 — Capture user corrections and outcomes (v1.16 / v1.21)
|
|
111
|
+
|
|
112
|
+
When the user is **unhappy** with a persona's output or **rewrites/corrects** it, record that signal so future training can learn from mistakes:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
npx analyzthis_design feedback record --persona arjun --rating 2 \
|
|
116
|
+
--comment "What was wrong" \
|
|
117
|
+
--correction "What they wanted instead" \
|
|
118
|
+
--tags wrong_hierarchy,invented_tokens
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Or in one step when rejecting:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
npx analyzthis_design session accept --persona arjun --reject \
|
|
125
|
+
--comment "..." --correction "..." --rating 2 --tags off_brief
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Suggest this when the user says things like *"that's not what I meant,"* *"use our tokens,"* or *"the hierarchy is wrong."* Tags hint: `wrong_hierarchy`, `invented_tokens`, `missed_ds`, `too_verbose`, `bad_ia`, `off_brief`.
|
|
129
|
+
|
|
130
|
+
List or export later: `feedback list`, `feedback export --persona arjun --all`.
|
|
131
|
+
|
|
132
|
+
**Track whether the advice actually shipped.** After the user implements changes, confirm the outcome so the evolution loop can learn:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
npx analyzthis_design outcome --confirm --persona arjun --result shipped
|
|
136
|
+
# or: revised, blocked_correctly, missed
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**Default execution is chunked (v2.0).** `npx analyzthis_design run --task "..."` now uses a frontier planner + cheap chunk models. Use `/run-unchunked` or `npx analyzthis_design run-unchunked` only when you explicitly want the legacy single-pass deliberation chain.
|
|
140
|
+
|
|
141
|
+
**Set visual direction with the team.** Use `/mood-board` when the user wants references and a team-deliberated direction:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
npx analyzthis_design moodboard create --task "B2B fintech dashboard, trustworthy, high-contrast" --auto
|
|
145
|
+
npx analyzthis_design moodboard critique --board <boardId>
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
References are tagged, design-system patterns are pulled, and Arjun/Meera/Priya/Zara/Noor deliberate with Honeycomb scoring until consensus.
|
|
149
|
+
|
|
150
|
+
**Evolve the team.** Periodically (e.g., weekly), run:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
npx analyzthis_design evolve --extract --dry-run # preview proposed patches
|
|
154
|
+
npx analyzthis_design evolve --extract # write patch files for review
|
|
155
|
+
npx analyzthis_design evolve --apply <patchId> --dry-run # preview a patch
|
|
156
|
+
npx analyzthis_design evolve --apply <patchId> # apply after review
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
This harvests accepted outputs + confirmed outcomes, extracts lessons into `~/.analyzthis_design/lessons/`, and proposes patches to:
|
|
160
|
+
- persona SKILL.md / cards (new canonical failure patterns),
|
|
161
|
+
- `skills/design-reference/*.csv` rows (new product-type guidance),
|
|
162
|
+
- `agents/router.json` rules (task_type → best-performing expert).
|
|
163
|
+
|
|
164
|
+
Patches are **dry-run by default** and require human review before apply.
|
|
165
|
+
|
|
166
|
+
**Share with maintainers (opt-in):** after recording, suggest `npx analyzthis_design feedback submit --yes` so anonymized corrections help improve personas for everyone. Preview first with `--dry-run`.
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## What this skill is not
|
|
171
|
+
|
|
172
|
+
- **Not a persona.** It has no design opinion — it routes to the ones that do.
|
|
173
|
+
- **Not a replacement for `ux-story-gate` or `design-critic`.** It calls them; it doesn't duplicate their logic.
|
|
174
|
+
- **Not a code generator by default.** Respects assess-only mode like every other skill in this system.
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Files this depends on
|
|
179
|
+
|
|
180
|
+
- `agents/router.json` — MoE routing rules
|
|
181
|
+
- `agents/chain.json` — default and ideation chains, deliberation_groups, gate ordering, token caps
|
|
182
|
+
- `agents/deliberation-schema.json` — objection/satisfaction output contract
|
|
183
|
+
- `deliberation-protocol` skill — adversarial review rules (v1.19); host path e.g. `~/.claude/skills/deliberation-protocol/SKILL.md`
|
|
184
|
+
- `agents/session-schema.json` — session state shape, including `digest` and `metrics`
|
|
185
|
+
- `agents/manifests/*.json` — per-persona allowed/forbidden jobs, hard gates, `system_card`, `tier`, `max_output_tokens`
|
|
186
|
+
- `agents/cards/*.md` — short persona system prompts used by default instead of full SKILL.md
|
|
187
|
+
- `skills/ux-story-gate/SKILL.md` — intake phases 0 – 1.5, 4.5, 5.5
|
|
188
|
+
- `skills/design-critic/SKILL.md` — chain handoff format, Information Hierarchy Gate, BLOCK escalation, Re-evaluation Protocol
|
|
189
|
+
- `npx analyzthis_design session init|show|reset` — session state CLI
|
|
190
|
+
- `npx analyzthis_design research --url|--query` — writes `web-context.md` into the session; also load this file alongside the knowledge bank before Step 1. In Cursor/Claude, if the CLI research stub is empty, use WebSearch/WebFetch/Figma MCP and append the result to the same `web-context.md` path.
|
|
191
|
+
|
|
192
|
+
## Efficiency defaults
|
|
193
|
+
|
|
194
|
+
- Default to the **MoE subset**, not the full chain — see Step 2.
|
|
195
|
+
- Default to **cards + lite schema**, not full SKILL.md + deep schema — see Step 3.
|
|
196
|
+
- Default to **delta re-evaluation** on follow-ups, not a full re-run — see Step 5.
|
|
197
|
+
- Skip Phase 4.5 browser verify when `mode: assess_only` and no running URL is available; record `verify_results.primary_task: "not_run"` rather than skipping silently.
|
|
@@ -20,6 +20,13 @@ You are Priya. Senior full-stack engineer, 8+ years in complex SaaS. Blunt, prec
|
|
|
20
20
|
|
|
21
21
|
**Assess-only:** if the user asked to assess/propose/critique rather than build/implement/ship, stop at the feasibility analysis — do not edit code.
|
|
22
22
|
|
|
23
|
+
|
|
24
|
+
## Lite output (default)
|
|
25
|
+
|
|
26
|
+
Verdict or one moment. Top three fixes (or one delight). One evidence line.
|
|
27
|
+
Use the full output schema below only if the user says expand.
|
|
28
|
+
You cannot know host tokens. Do not invent a dollar figure.
|
|
29
|
+
|
|
23
30
|
## Lens
|
|
24
31
|
|
|
25
32
|
1. **Technical complexity** — CRUD vs state machine vs new infrastructure
|
package/dist/skills/raj/SKILL.md
CHANGED
|
@@ -22,6 +22,13 @@ You are Raj. 10+ years product strategy across SaaS, marketplace, and workflow a
|
|
|
22
22
|
|
|
23
23
|
**Assess-only:** if the user asked to assess/propose/critique rather than build/implement/ship, stop at the arbitration verdict — do not edit code.
|
|
24
24
|
|
|
25
|
+
|
|
26
|
+
## Lite output (default)
|
|
27
|
+
|
|
28
|
+
Verdict or one moment. Top three fixes (or one delight). One evidence line.
|
|
29
|
+
Use the full output schema below only if the user says expand.
|
|
30
|
+
You cannot know host tokens. Do not invent a dollar figure.
|
|
31
|
+
|
|
25
32
|
## When to activate (Stalemate Protocol)
|
|
26
33
|
|
|
27
34
|
ONLY when one of these conditions is met:
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: receipt
|
|
3
|
+
description: Show inferred token spend for this project's last slash and MCP turns. Not a bill. Use after a critique when you want to see tokens-per-verdict.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Receipt
|
|
8
|
+
|
|
9
|
+
You cannot know Claude’s real usage from slash alone. Do not invent a dollar figure.
|
|
10
|
+
|
|
11
|
+
## What to do
|
|
12
|
+
|
|
13
|
+
1. Run `npx analyzthis_design receipt` in this project, or call the MCP tool `analyzthis_receipt`.
|
|
14
|
+
2. Report the printed inferred tokens and tokens-per-verdict exactly.
|
|
15
|
+
3. Label them **inferred**, never verified, never a monthly dollar.
|
|
16
|
+
|
|
17
|
+
If there is no session yet: `npx analyzthis_design session init`, then run a critique, then receipt.
|