baldart 5.0.1 → 5.2.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/CHANGELOG.md +157 -0
- package/README.md +6 -6
- package/VERSION +1 -1
- package/framework/.claude/agents/CHANGELOG.md +90 -0
- package/framework/.claude/agents/REGISTRY.md +5 -5
- package/framework/.claude/agents/coder.md +3 -3
- package/framework/.claude/agents/remotion-animator-orchestrator.md +4 -3
- package/framework/.claude/agents/senior-researcher.md +166 -151
- package/framework/.claude/agents/ui-expert.md +4 -10
- package/framework/.claude/agents/ui-quality-critic.md +27 -11
- package/framework/.claude/skills/design-system-init/CHANGELOG.md +5 -0
- package/framework/.claude/skills/design-system-init/SKILL.md +2 -2
- package/framework/.claude/skills/e2e-review/CHANGELOG.md +5 -0
- package/framework/.claude/skills/e2e-review/SKILL.md +2 -2
- package/framework/.claude/skills/frontend-design/CHANGELOG.md +20 -0
- package/framework/.claude/skills/frontend-design/SKILL.md +39 -216
- package/framework/.claude/skills/gamification-design/CHANGELOG.md +5 -0
- package/framework/.claude/skills/gamification-design/SKILL.md +2 -2
- package/framework/.claude/skills/prd/CHANGELOG.md +16 -0
- package/framework/.claude/skills/prd/SKILL.md +1 -1
- package/framework/.claude/skills/prd/references/discovery-phase.md +5 -1
- package/framework/.claude/skills/prd/references/research-phase.md +32 -12
- package/framework/.claude/skills/research/CHANGELOG.md +9 -0
- package/framework/.claude/skills/research/SKILL.md +94 -0
- package/framework/.claude/skills/research/assets/report-compare.template.md +50 -0
- package/framework/.claude/skills/research/assets/report-decision.template.md +42 -0
- package/framework/.claude/skills/research/assets/report-deep.template.md +61 -0
- package/framework/.claude/skills/research/assets/report-regulatory.template.md +44 -0
- package/framework/.claude/skills/research/references/playbook.md +112 -0
- package/framework/.claude/skills/research/scripts/rebuild-research-index.mjs +77 -0
- package/framework/.claude/skills/ui-design/CHANGELOG.md +60 -1
- package/framework/.claude/skills/ui-design/SKILL.md +127 -75
- package/framework/.claude/skills/ui-design/references/anti-slop.md +106 -0
- package/framework/.claude/skills/ui-design/references/craft-standards.md +259 -0
- package/framework/.claude/skills/ui-design/references/design-brief.md +92 -0
- package/framework/.claude/skills/ui-design/references/design-directions.md +188 -0
- package/framework/.claude/skills/ui-design/references/evaluation.md +125 -165
- package/framework/.claude/skills/ui-design/references/generation.md +125 -92
- package/framework/.claude/skills/ui-design/references/inventory.md +9 -2
- package/framework/.claude/skills/ui-design/scripts/craft-check.mjs +248 -0
- package/framework/agents/component-manifest-schema.md +1 -1
- package/framework/agents/design-system-protocol.md +6 -6
- package/framework/agents/index.md +3 -0
- package/framework/agents/research-protocol.md +228 -0
- package/framework/agents/skills-mapping.md +42 -23
- package/framework/docs/PROJECT-CONFIGURATION.md +28 -5
- package/framework/templates/baldart.config.template.yml +6 -0
- package/framework/templates/research-index.template.md +13 -0
- package/framework/templates/research-sources.CHANGELOG.md +14 -0
- package/framework/templates/research-sources.template.md +31 -0
- package/package.json +1 -1
- package/src/commands/configure.js +27 -1
- package/src/commands/doctor.js +82 -0
- package/src/commands/update.js +48 -1
- package/src/utils/__tests__/classify-divergence.test.js +42 -0
- package/src/utils/git.js +45 -9
- package/src/utils/research-library.js +92 -0
- package/src/utils/symlinks.js +3 -0
|
@@ -1,221 +1,44 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: frontend-design
|
|
3
|
-
effort:
|
|
4
|
-
version:
|
|
5
|
-
description:
|
|
3
|
+
effort: low
|
|
4
|
+
version: 2.0.0
|
|
5
|
+
description: "ROUTER (retired generator, since framework v5.2.0). Historically triggered for building web components, pages, dashboards, landing pages, HTML/CSS layouts, or styling/beautifying any web UI — those triggers still land here, and this skill immediately routes them to the right BALDART surface: /ui-design (design, mockups, prototyping, restyling), /ui-implement (approved mockup → code), the ui-expert agent (direct in-code UI work). Do not follow this skill for design guidance; its design intelligence moved to ui-design/references/ (craft-standards, anti-slop, design-directions)."
|
|
6
6
|
license: Complete terms in LICENSE.txt
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
## Frontend Aesthetics Guidelines
|
|
46
|
-
|
|
47
|
-
Focus on:
|
|
48
|
-
- **Typography**: Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics; unexpected, characterful font choices. Pair a distinctive display font with a refined body font.
|
|
49
|
-
- **Color & Theme**: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes.
|
|
50
|
-
- **Motion**: Use animations for effects and micro-interactions. Prioritize CSS-only solutions for HTML. Use Motion library for React when available. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions. Use scroll-triggering and hover states that surprise.
|
|
51
|
-
- **Spatial Composition**: Unexpected layouts. Asymmetry. Overlap. Diagonal flow. Grid-breaking elements. Generous negative space OR controlled density.
|
|
52
|
-
- **Backgrounds & Visual Details**: Create atmosphere and depth rather than defaulting to solid colors. Add contextual effects and textures that match the overall aesthetic. Apply creative forms like gradient meshes, noise textures, geometric patterns, layered transparencies, dramatic shadows, decorative borders, custom cursors, and grain overlays.
|
|
53
|
-
|
|
54
|
-
NEVER use generic AI-generated aesthetics like overused font families (Inter, Roboto, Arial, system fonts), cliched color schemes (particularly purple gradients on white backgrounds), predictable layouts and component patterns, and cookie-cutter design that lacks context-specific character.
|
|
55
|
-
|
|
56
|
-
Interpret creatively and make unexpected choices that feel genuinely designed for the context. No design should be the same. Vary between light and dark themes, different fonts, different aesthetics. NEVER converge on common choices (Space Grotesk, for example) across generations.
|
|
57
|
-
|
|
58
|
-
**IMPORTANT**: Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate code with extensive animations and effects. Minimalist or refined designs need restraint, precision, and careful attention to spacing, typography, and subtle details. Elegance comes from executing the vision well.
|
|
59
|
-
|
|
60
|
-
Remember: Claude is capable of extraordinary creative work. Don't hold back, show what can truly be created when thinking outside the box and committing fully to a distinctive vision.
|
|
61
|
-
|
|
62
|
-
## MANDATORY Pre-Work Read (project design-system override)
|
|
63
|
-
|
|
64
|
-
The registry-first cascade below is the consumer view of the SSOT in
|
|
65
|
-
[`framework/agents/design-system-protocol.md`](../../../agents/design-system-protocol.md).
|
|
66
|
-
When the cascade rules diverge between this file and the protocol module,
|
|
67
|
-
the protocol module wins.
|
|
68
|
-
|
|
69
|
-
When operating inside a repo that ships a design-system SSOT, the generic
|
|
70
|
-
creative guidance above is BLOCKED by the project design-system until the
|
|
71
|
-
reads below are complete. MANDATORY pre-work reads (skipping any of them is
|
|
72
|
-
a protocol violation when the docs exist):
|
|
73
|
-
|
|
74
|
-
1. **MANDATORY / BLOCKING** — `${paths.design_system}/INDEX.md`. Authoritative component index + Canonical Authority Matrix. Discover existing primitives there BEFORE inventing new ones.
|
|
75
|
-
2. **MANDATORY / BLOCKING** — `${paths.design_system}/tokens-reference.md`. Human-readable token contract (colors, spacing, radius, shadows, typography). Never hardcode hex colors, shadow pixel tuples, or border widths not defined in the design-system doc.
|
|
76
|
-
3. **MANDATORY** — `${paths.design_system}/components/<Name>.md` for every primitive in scope, and `${paths.design_system}/patterns/*.md` (overlays, theming, animations, platform quirks) for the pattern involved.
|
|
77
|
-
4. **MANDATORY / BLOCKING** — `${paths.ui_guidelines}`. Brand philosophy, aesthetic rules, SVG rules, accessibility constraints.
|
|
78
|
-
5. **MANDATORY for generated marketing illustrations/videos** — `the project's illustration-motion pattern doc (listed in `.baldart/overlays/frontend-design.md` if present)` (if your project has one). Canonical illustration language, product-variant vocabulary, and surgical element-by-element video prompt contract.
|
|
79
|
-
|
|
80
|
-
Non-negotiable constraints typical of mature design-system SSOTs (adapt to your project):
|
|
81
|
-
|
|
82
|
-
- Token consumption: only via the project's design-token mechanism (e.g. CSS custom properties, Tailwind theme, Stitches tokens). Never hardcode values outside this contract.
|
|
83
|
-
- **Themed-surface text/bg pairing rule (MANDATORY / BLOCKING)** when the design-system defines a primary theme color: any text rendered over the themed primary background MUST pair with the project's theme-primary-text token (e.g. `text-[var(--theme-primary-text,#000)]` on `bg-[var(--theme-primary)]`).
|
|
84
|
-
- Do NOT create new overlay systems if the project already catalogs an overlay decision tree — pick from the existing options.
|
|
85
|
-
- **Chart library (MANDATORY / BLOCKING)** when the project standardizes a chart stack: use only the approved library and the project's wrappers, never call the underlying chart library from feature code. Banned libraries (typical): `chart.js`, `echarts`, `victory`, `visx`, `d3` standalone, `observable-plot`, `tremor`. Exceptions require an ADR.
|
|
86
|
-
|
|
87
|
-
Within those bounds, creative choices (typography nuance, composition, motion intensity) are welcome — but the design-system token contract and themed-surface pairing are non-negotiable.
|
|
88
|
-
|
|
89
|
-
---
|
|
90
|
-
|
|
91
|
-
## Performance Gates (Core Web Vitals 2026)
|
|
92
|
-
|
|
93
|
-
Production-grade frontend is not just "looks good" — it ships within the CWV
|
|
94
|
-
thresholds. Every page / component / route MUST be designed against these
|
|
95
|
-
budgets, not retrofitted after Lighthouse complains.
|
|
96
|
-
|
|
97
|
-
### Thresholds (p75, CrUX dataset)
|
|
98
|
-
|
|
99
|
-
| Metric | Good | Poor | What it measures |
|
|
100
|
-
|---|---|---|---|
|
|
101
|
-
| **LCP** | ≤ 2.5s | > 4.0s | Largest Contentful Paint — usually the hero image or H1 |
|
|
102
|
-
| **INP** | ≤ 200ms | > 500ms | Interaction to Next Paint — replaced FID in Mar 2024 |
|
|
103
|
-
| **CLS** | ≤ 0.1 | > 0.25 | Cumulative Layout Shift |
|
|
104
|
-
| TTFB | ≤ 0.8s | > 1.8s | Subset of LCP (~40% of budget) |
|
|
105
|
-
| FCP | ≤ 1.8s | > 3.0s | Diagnostic only |
|
|
106
|
-
|
|
107
|
-
A page passes CWV when all three (LCP/INP/CLS) are *good* at p75. INP is the
|
|
108
|
-
hardest of the three on JS-heavy apps and the most commonly failed (~43% of
|
|
109
|
-
sites globally).
|
|
110
|
-
|
|
111
|
-
### LCP image: the only correct pattern
|
|
112
|
-
|
|
113
|
-
```html
|
|
114
|
-
<!-- in <head> — preload + fetchpriority for the hero -->
|
|
115
|
-
<link rel="preload" as="image"
|
|
116
|
-
href="/hero.avif"
|
|
117
|
-
imagesrcset="/hero-800.avif 800w, /hero-1600.avif 1600w"
|
|
118
|
-
imagesizes="100vw"
|
|
119
|
-
fetchpriority="high">
|
|
120
|
-
|
|
121
|
-
<!-- in body — picture with AVIF/WebP/fallback + explicit dimensions -->
|
|
122
|
-
<picture>
|
|
123
|
-
<source srcset="/hero.avif" type="image/avif">
|
|
124
|
-
<source srcset="/hero.webp" type="image/webp">
|
|
125
|
-
<img src="/hero.jpg" alt="..."
|
|
126
|
-
fetchpriority="high"
|
|
127
|
-
width="1600" height="900">
|
|
128
|
-
</picture>
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
**Never** apply `loading="lazy"` to the LCP image. **Never** render the LCP
|
|
132
|
-
image via client-side JS after hydration — server-render it or preload it.
|
|
133
|
-
|
|
134
|
-
### INP fixes
|
|
135
|
-
|
|
136
|
-
- Break any task > 50ms into `await scheduler.yield()` chunks (Chrome 129+;
|
|
137
|
-
fallback `await new Promise(r => setTimeout(r, 0))`).
|
|
138
|
-
- Debounce input handlers to one frame (~16ms) when they trigger expensive
|
|
139
|
-
recomputes. Throttle scroll/resize to `requestAnimationFrame`.
|
|
140
|
-
- Move CPU-bound work (parsing, transforming, encoding) off the main thread
|
|
141
|
-
with Web Workers when latency matters.
|
|
142
|
-
- Avoid `setInterval` polling for data — use SWR / React Query / TanStack
|
|
143
|
-
Query with stale-while-revalidate.
|
|
144
|
-
|
|
145
|
-
### CLS budget — zero unexpected shift
|
|
146
|
-
|
|
147
|
-
- Every `<img>`, `<iframe>`, `<video>` declares `width` + `height` or
|
|
148
|
-
`aspect-ratio` CSS.
|
|
149
|
-
- Web fonts: `font-display: optional` (no FOIT/FOUT shift, accept fallback
|
|
150
|
-
on first load) OR `size-adjust` + matching `ascent-override` /
|
|
151
|
-
`descent-override` / `line-gap-override` to produce a metric-compatible
|
|
152
|
-
fallback font.
|
|
153
|
-
- Skeleton screens mirror the real layout dimensions exactly — a skeleton
|
|
154
|
-
that's the wrong height *causes* CLS instead of preventing it.
|
|
155
|
-
- Inserted UI (banners, cookie notices, ads) must reserve space upfront via
|
|
156
|
-
`min-height` — never push existing content down post-paint.
|
|
157
|
-
|
|
158
|
-
## Modern CSS (2025–2026)
|
|
159
|
-
|
|
160
|
-
Default to platform features instead of JS shims:
|
|
161
|
-
|
|
162
|
-
- **Container queries** (`@container` + `container-type: inline-size`) —
|
|
163
|
-
default for any component that lives in variable-width contexts (sidebar,
|
|
164
|
-
grid cell, modal). Component decides its own breakpoint, independent of
|
|
165
|
-
viewport. Use viewport-based `@media` only for app-shell-level layout.
|
|
166
|
-
- **`:has()`** — collapse `useState` that exists *only for styling*
|
|
167
|
-
(e.g. label color reacting to input invalid state). Never put business
|
|
168
|
-
logic into `:has()` — only visual reactions to DOM state.
|
|
169
|
-
- **View Transitions API** — `document.startViewTransition()` for SPA
|
|
170
|
-
navigation and `view-transition-name` for shared-element morphs. See
|
|
171
|
-
`motion-design/reference/accessibility-and-modern-apis.md` for the full
|
|
172
|
-
pattern.
|
|
173
|
-
- **Subgrid** — children align to the parent grid without re-declaring
|
|
174
|
-
tracks. Fixes the long-standing "card content alignment across rows"
|
|
175
|
-
problem.
|
|
176
|
-
- **Logical properties** — `margin-inline-start` / `padding-block` instead
|
|
177
|
-
of `margin-left` / `padding-top` whenever the project might add RTL or
|
|
178
|
-
vertical-writing-mode locales. Free i18n with zero overhead.
|
|
179
|
-
- **`color-mix()`** — derive hover / focus / disabled states from semantic
|
|
180
|
-
tokens without inventing new tokens
|
|
181
|
-
(`color-mix(in oklch, var(--color-action-primary) 90%, black)`).
|
|
182
|
-
- **`@scope`** — scope CSS to a subtree without selector specificity wars or
|
|
183
|
-
CSS-in-JS. Useful when migrating off CSS Modules / styled-components.
|
|
184
|
-
|
|
185
|
-
## Form quality (always-on requirements)
|
|
186
|
-
|
|
187
|
-
These apply to every form, every project — they are not "nice to have":
|
|
188
|
-
|
|
189
|
-
- `<label>` associated to input via `htmlFor` / `id` (never wrap-only — fails
|
|
190
|
-
some screen readers).
|
|
191
|
-
- `autocomplete=` filled for every personal-data field
|
|
192
|
-
(`email | tel | given-name | family-name | street-address | postal-code |
|
|
193
|
-
cc-number | one-time-code` …). Required by WCAG 2.1 SC 1.3.5.
|
|
194
|
-
- Validation **on blur**, not on every keystroke. Re-validate on submit.
|
|
195
|
-
- Error messages are **actionable** ("Email manca @ — esempio:
|
|
196
|
-
nome@dominio.it"), never generic ("Invalid input").
|
|
197
|
-
- `aria-invalid` + `aria-describedby` linking the input to its error
|
|
198
|
-
element. Error element has `role="alert"` only when it appears
|
|
199
|
-
dynamically.
|
|
200
|
-
- `inputMode=` set when it differs from `type` (e.g. `type="text"
|
|
201
|
-
inputMode="numeric"` for SMS codes — keeps the field text-shaped but
|
|
202
|
-
triggers the numeric keypad).
|
|
203
|
-
- Paste handling normalizes whitespace and format BEFORE validating
|
|
204
|
-
(cc-number without spaces, tel without separators).
|
|
205
|
-
- Submit button disabled only **after** a failed attempt — never blocked
|
|
206
|
-
pre-emptively; users should be allowed to try and receive feedback.
|
|
207
|
-
|
|
208
|
-
---
|
|
209
|
-
|
|
210
|
-
## Standalone Prototypes and Demos
|
|
211
|
-
|
|
212
|
-
When the task calls for an interactive HTML prototype, animated demo, slide deck, iOS/app mockup, or design exploration **not tied to the project codebase**, the `huashu-design` skill can supplement or replace this skill. It provides:
|
|
213
|
-
- App Prototype shell (AppPhone state manager, tappable, iPhone frame)
|
|
214
|
-
- Tweaks panel for in-page variants
|
|
215
|
-
- Animation export → MP4/GIF (25fps base, 60fps interpolated)
|
|
216
|
-
- 5 flows × 20 design philosophies for design exploration
|
|
217
|
-
- Playwright click-test validation before delivery
|
|
218
|
-
|
|
219
|
-
**`huashu-design` is OPTIONAL** — it is a user-installed skill, not shipped with the framework. If it is not present, proceed with this skill alone and notify the user: "huashu-design not found; continuing with frontend-design only. Install huashu-design for advanced prototype tooling."
|
|
220
|
-
|
|
221
|
-
**Filesystem Rule (ABSOLUTE):** every HTML output/prototype must be written to disk with the `Write` tool BEFORE opening it in a browser or sharing it with the user. Outputting inline code blocks is not sufficient.
|
|
9
|
+
# frontend-design — router (retired generator)
|
|
10
|
+
|
|
11
|
+
Since framework v5.2.0 this skill no longer generates or styles UI. Its
|
|
12
|
+
design intelligence (aesthetic direction, craft rules, anti-slop bans,
|
|
13
|
+
Performance Gates/CWV, Modern CSS, form quality) was superseded and moved to
|
|
14
|
+
the **`ui-design`** skill's references, which are the single SSOT:
|
|
15
|
+
|
|
16
|
+
- `ui-design/references/craft-standards.md` — always-on craft + **Performance
|
|
17
|
+
Gates (CWV 2026)** + Modern CSS + form quality (the sections that used to
|
|
18
|
+
live in this file).
|
|
19
|
+
- `ui-design/references/anti-slop.md` — the anti-generic-AI Tells catalog.
|
|
20
|
+
- `ui-design/references/design-directions.md` — aesthetic directions, font
|
|
21
|
+
and palette discipline.
|
|
22
|
+
|
|
23
|
+
## Route the request (do this instead of proceeding here)
|
|
24
|
+
|
|
25
|
+
| The task is… | Route to |
|
|
26
|
+
|---|---|
|
|
27
|
+
| Designing, prototyping, exploring options, restyling/redesigning a page or component — any *design decision* work | **`/ui-design`** (the local design studio) |
|
|
28
|
+
| Implementing an ALREADY-APPROVED mockup (image / HTML / Claude Design link / `mockups/_src/`) into the codebase | **`/ui-implement`** |
|
|
29
|
+
| A direct in-code UI change with no new design decision (fix a layout, restyle within the existing language, build a specified component) | delegate to the **`ui-expert`** agent per `AGENTS.md` § delegation (registry-first cascade applies) |
|
|
30
|
+
| Motion/animation specs | **`/motion-design`** |
|
|
31
|
+
| A standalone one-off artifact not tied to this project (poster, demo page) | **`/ui-design`** in exploration regime |
|
|
32
|
+
|
|
33
|
+
Announce the reroute in one line (e.g. "frontend-design è stato ritirato a
|
|
34
|
+
router — proseguo con /ui-design") and continue seamlessly with the target
|
|
35
|
+
surface. Do NOT stop to ask permission for the reroute; do NOT apply design
|
|
36
|
+
guidance from any earlier version of this file.
|
|
37
|
+
|
|
38
|
+
## Consumer overlays
|
|
39
|
+
|
|
40
|
+
If this project carries `.baldart/overlays/frontend-design.md` (aesthetic
|
|
41
|
+
mandates, illustration-motion contract), those opinions belong on the design
|
|
42
|
+
studio now — port them to `.baldart/overlays/ui-design.md` (the `/overlay`
|
|
43
|
+
skill scaffolds it). Until ported, honor them when routing lands on
|
|
44
|
+
`/ui-design`.
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Formato: [Keep a Changelog](https://keepachangelog.com/) · [SemVer](https://semver.org/).
|
|
4
4
|
|
|
5
|
+
## 1.0.1 — 2026-07-03
|
|
6
|
+
|
|
7
|
+
- Related Skills: `ui-ux-pro-max` (superseded) sostituito con `ui-design` v2
|
|
8
|
+
(design-directions + craft-standards references). Framework v5.2.0.
|
|
9
|
+
|
|
5
10
|
## 1.0.0 — 2026-07-01
|
|
6
11
|
|
|
7
12
|
- Baseline: versioning per-skill introdotto al framework v4.82.0.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gamification-design
|
|
3
3
|
effort: medium
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
description: Use when designing or analyzing points systems, reward loops, progression mechanics, engagement features, or loyalty programs. Triggers include "points system," "rewards design," "progression," "engagement loop," "battle pass," "loyalty mechanics," "gamification," or "retention hooks." For B2C customer-facing features in this codebase, this skill invokes the hyper-gamification-designer agent.
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -133,7 +133,7 @@ Before invoking the agent, verify you have:
|
|
|
133
133
|
|
|
134
134
|
- `prd-planning`: For full PRD with gamification section
|
|
135
135
|
- `copywriting`: For reward/achievement messaging
|
|
136
|
-
- `ui-
|
|
136
|
+
- `ui-design`: For designing gamification UI (mockups/options; its `references/design-directions.md` + `craft-standards.md` replace the retired `ui-ux-pro-max`)
|
|
137
137
|
|
|
138
138
|
## Project Integration
|
|
139
139
|
|
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
Formato: [Keep a Changelog](https://keepachangelog.com/) · [SemVer](https://semver.org/).
|
|
4
4
|
|
|
5
|
+
## 1.4.0 — 2026-07-03
|
|
6
|
+
|
|
7
|
+
- **Research-profile contract + library (framework v5.1.0)**: Step 2.5 now
|
|
8
|
+
spawns `senior-researcher` with `PROFILE=decision` (`PROFILE=regulatory` on
|
|
9
|
+
signal S2) per `framework/agents/research-protocol.md` — the per-topic,
|
|
10
|
+
recommendation-first contract that matches "Processing Findings"
|
|
11
|
+
byte-for-byte (the old prompt asked for a light format while the agent's
|
|
12
|
+
contract mandated the full §0–§11 report: two conflicting SSOTs, now one).
|
|
13
|
+
/prd PRE-ALLOCATES the output path — the research library
|
|
14
|
+
(`${paths.research_dir}/<category>/RES-<YYYYMMDD>-<slug>.md`) when
|
|
15
|
+
configured, legacy `${paths.prd_dir}` fallback otherwise — and the agent
|
|
16
|
+
ALWAYS writes a file there (`FULL_REUSE` → pointer stub), so the 10-minute
|
|
17
|
+
exit-check poll stays deterministic and prior research is reused instead of
|
|
18
|
+
re-paid. Same token in the discovery-phase background launch (parallel
|
|
19
|
+
location, updated together).
|
|
20
|
+
|
|
5
21
|
## 1.3.0 — 2026-07-02
|
|
6
22
|
|
|
7
23
|
- **Analysis-profile contract (framework v4.94.0)**: the discovery-loop targeted architect question now passes `PROFILE=discovery`, and the Step 2 ISA scan passes `PROFILE=impact` (structural tier primary) — per `framework/agents/analysis-profiles.md`. Prompt semantics otherwise unchanged.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: prd
|
|
3
3
|
effort: high
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.4.0
|
|
5
5
|
description: "Structured PRD creation skill. Use when the user says /prd, 'crea un prd', 'nuova funzionalita', 'pianifica feature', or wants to plan a new feature end-to-end. Also handles /prd-add, 'aggiungi requisito', 'serve anche', 'manca un endpoint' for change requests on active PRD sessions — runs ICIAS impact analysis to determine which phases need SKIP/PATCH/REDO. Produces PRD + UI design + backlog cards, all validated and committed. Multi-turn conversation: asks questions, waits for answers, iterates through discovery, design, spec writing, card creation, and validation phases."
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -972,7 +972,11 @@ source is authoritative — do NOT issue a separate file-read mid-discovery.)
|
|
|
972
972
|
|
|
973
973
|
**SEMANTIC decision:**
|
|
974
974
|
- **2+ signals OR regulatory (S2) OR user uncertainty (S5)** → HIGH confidence
|
|
975
|
-
→ launch `senior-researcher` in **background immediately
|
|
975
|
+
→ launch `senior-researcher` in **background immediately** with
|
|
976
|
+
`PROFILE=decision` (`PROFILE=regulatory` when S2 is the trigger) and the
|
|
977
|
+
pre-allocated output path — spawn prompt + output contract in
|
|
978
|
+
`research-phase.md` § "Research Execution" (do NOT improvise a variant here);
|
|
979
|
+
continue discovery.
|
|
976
980
|
Update progress bar: `Ricerca: 🔍 in corso (background)`.
|
|
977
981
|
- **1 non-critical signal** → MEDIUM confidence → note for later (ask at exit).
|
|
978
982
|
- **No signals** → skip research. Update progress bar: `Ricerca: ⏭️ non necessaria`.
|
|
@@ -78,12 +78,26 @@ Trigger as soon as confidence is HIGH (typically at ~75% comprehension).
|
|
|
78
78
|
> `BACKGROUND_RUN=true` directive so the agent knows to begin research
|
|
79
79
|
> immediately. Add this as the first line of the prompt.
|
|
80
80
|
|
|
81
|
+
> **Profile + output path (v5.1.0)**: the researcher runs `PROFILE=decision`
|
|
82
|
+
> (`PROFILE=regulatory` when signal S2 matched) — the per-topic,
|
|
83
|
+
> recommendation-first contract of `agents/research-protocol.md
|
|
84
|
+
> SECTION=profiles`, which matches "Processing Findings" below byte-for-byte.
|
|
85
|
+
> /prd PRE-ALLOCATES the exact output path so the exit-check poll stays
|
|
86
|
+
> deterministic: when `paths.research_dir` is set, the report lands in the
|
|
87
|
+
> research library — `${paths.research_dir}/<category>/RES-<YYYYMMDD>-<slug>.md`
|
|
88
|
+
> (pick the closest category: architecture | integrations | regulatory |
|
|
89
|
+
> ux-patterns | algorithms | tooling); when the key is missing/empty
|
|
90
|
+
> (consumer not yet reconfigured post-update), fall back to the legacy path
|
|
91
|
+
> `${paths.prd_dir}/<slug>/research-<slug>-<session-id>.md`. Either way the
|
|
92
|
+
> prompt carries ONE known path.
|
|
93
|
+
|
|
81
94
|
```
|
|
82
95
|
Task tool:
|
|
83
96
|
subagent_type: "senior-researcher"
|
|
84
97
|
run_in_background: true
|
|
85
98
|
prompt: |
|
|
86
99
|
BACKGROUND_RUN=true — skip the FIRST MESSAGE TEMPLATE preamble entirely.
|
|
100
|
+
PROFILE=decision (use PROFILE=regulatory when launched off signal S2)
|
|
87
101
|
Begin research immediately without waiting for acknowledgment.
|
|
88
102
|
|
|
89
103
|
Research the following topics for a PRD we're writing for feature
|
|
@@ -99,20 +113,16 @@ Trigger as soon as confidence is HIGH (typically at ~75% comprehension).
|
|
|
99
113
|
1. <question>
|
|
100
114
|
2. <question>
|
|
101
115
|
|
|
102
|
-
For each topic, provide:
|
|
103
|
-
- Summary of best practices (with sources)
|
|
104
|
-
- Recommended approach for the project stack above
|
|
105
|
-
- Key gotchas or anti-patterns to avoid
|
|
106
|
-
- If applicable: regulatory checklist or compliance requirements
|
|
107
|
-
|
|
108
116
|
OUTPUT CONTRACT (mandatory):
|
|
109
117
|
Write your complete research report to the file:
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
118
|
+
<pre-allocated path — library path, or the prd_dir fallback above>
|
|
119
|
+
Log the exact output path as the FIRST line of the report body
|
|
120
|
+
(right after the frontmatter):
|
|
113
121
|
RESEARCH_OUTPUT_PATH: <full path>
|
|
114
|
-
|
|
115
|
-
|
|
122
|
+
ALWAYS write a file at that path — on FULL_REUSE, write the pointer
|
|
123
|
+
stub defined in agents/research-protocol.md SECTION=reuse instead of
|
|
124
|
+
a new report. This path is how the PRD orchestrator will read your
|
|
125
|
+
findings. Be concise but thorough.
|
|
116
126
|
```
|
|
117
127
|
|
|
118
128
|
3. **Continue discovery** — do NOT wait for the researcher. Ask remaining
|
|
@@ -200,6 +210,11 @@ Questo aggiunge qualche minuto ma produce decisioni piu informate.
|
|
|
200
210
|
|
|
201
211
|
When `senior-researcher` returns:
|
|
202
212
|
|
|
213
|
+
0. **Reuse stub?** If the file at the pre-allocated path is a `FULL_REUSE`
|
|
214
|
+
pointer stub (`REUSE: FULL_REUSE -> <path>`), read the pointed report —
|
|
215
|
+
the library already had this research, treat it as an instant completion.
|
|
216
|
+
A `DELTA` report reads normally (it IS the updated research).
|
|
217
|
+
|
|
203
218
|
1. **Store findings** in state file under `## Research Findings`:
|
|
204
219
|
```
|
|
205
220
|
## Research Findings
|
|
@@ -208,15 +223,20 @@ When `senior-researcher` returns:
|
|
|
208
223
|
Topics researched: [list]
|
|
209
224
|
|
|
210
225
|
### Topic 1: <title>
|
|
226
|
+
**Recommended approach**: <for our stack — the report's recommendation line>
|
|
211
227
|
**Best practice**: <summary>
|
|
212
|
-
**Recommended approach**: <for our stack>
|
|
213
228
|
**Gotchas**: <anti-patterns to avoid>
|
|
229
|
+
**Contradictions & Unknowns**: <where evidence disagrees or is missing — or "none">
|
|
214
230
|
**Sources**: <references>
|
|
215
231
|
|
|
216
232
|
### Topic 2: <title>
|
|
217
233
|
...
|
|
218
234
|
```
|
|
219
235
|
|
|
236
|
+
(mirrors the `decision`-profile report structure — recommendation first,
|
|
237
|
+
contradictions never dropped: they are the findings that change a design
|
|
238
|
+
direction.)
|
|
239
|
+
|
|
220
240
|
2. **Evaluate if findings reveal gaps** in the discovery:
|
|
221
241
|
- Do the findings introduce new dimensions or considerations NOT covered
|
|
222
242
|
by existing discovery answers?
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Changelog — research skill
|
|
2
|
+
|
|
3
|
+
## 1.0.0 — 2026-07-03 (framework v5.1.0)
|
|
4
|
+
|
|
5
|
+
- Initial release. Interactive orchestrator over the research library:
|
|
6
|
+
scoping → profile/nature routing → reuse pre-flight → senior-researcher
|
|
7
|
+
launch (parallel fan-out on Claude, sequential on Codex) → filing +
|
|
8
|
+
INDEX ownership → source-matrix growth loop. THIN — all rules live in
|
|
9
|
+
`agents/research-protocol.md`, all report forms in `assets/`.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: research
|
|
3
|
+
effort: medium
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
description: >
|
|
6
|
+
Interactive research orchestrator over the research library. Scopes the
|
|
7
|
+
question with the user, routes it to the right profile (decision / deep /
|
|
8
|
+
compare / regulatory) and source policy by research NATURE (scientific →
|
|
9
|
+
papers; dev → docs+forums; regulatory → normative texts; ux; market), checks
|
|
10
|
+
the library INDEX for reusable prior research BEFORE searching, then launches
|
|
11
|
+
the senior-researcher agent (parallel fan-out for composite questions), files
|
|
12
|
+
the report in ${paths.research_dir} and keeps INDEX.md correct. Closes the
|
|
13
|
+
source-matrix growth loop (SOURCE_MATRIX_CANDIDATE → local SOURCES.md and/or
|
|
14
|
+
upstream BALDART prompt). A THIN orchestrator — cites
|
|
15
|
+
agents/research-protocol.md for every rule, never duplicates it. Use when the
|
|
16
|
+
user says /research, "fai una ricerca", "ricerca best practice", "confronta X
|
|
17
|
+
e Y", "ricerca scientifica su", "è già stato ricercato?", "cosa dice la
|
|
18
|
+
letteratura su". NOT for /prd's embedded research step (prd spawns the agent
|
|
19
|
+
directly) and NOT a replacement for the agent (which stays directly
|
|
20
|
+
spawnable).
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# Research — orchestrated research over the library
|
|
24
|
+
|
|
25
|
+
## Project Context
|
|
26
|
+
|
|
27
|
+
**Reads from baldart.config.yml:** `paths.research_dir` (the library),
|
|
28
|
+
`paths.docs_dir` (degrade target), `stack.*` (stack signature for the
|
|
29
|
+
recommendation binding).
|
|
30
|
+
**Writes:** research reports + INDEX rows under `${paths.research_dir}`;
|
|
31
|
+
optionally `SOURCES.md` `## Local additions`.
|
|
32
|
+
**Gated by features:** none — research is universal.
|
|
33
|
+
**On missing/empty keys:** `paths.research_dir` empty/absent → offer
|
|
34
|
+
`npx baldart configure` (or ask for a path and suggest persisting it); the
|
|
35
|
+
user may decline and run library-less (reports go to `${paths.docs_dir}/`,
|
|
36
|
+
no reuse pre-flight). Never hard-abort.
|
|
37
|
+
Protocol: `framework/agents/project-context.md`.
|
|
38
|
+
|
|
39
|
+
## Effort
|
|
40
|
+
|
|
41
|
+
**Baseline:** `effort: medium` (frontmatter). **Inline override:** pass
|
|
42
|
+
`effort=<low|medium|high|xhigh|max>` anywhere in the invocation to scale
|
|
43
|
+
reasoning depth for this run — detect it once at kickoff and strip the token
|
|
44
|
+
before consuming user input. Level→behavior mapping, parsing contract, and
|
|
45
|
+
precedence caveats: `framework/agents/effort-protocol.md`.
|
|
46
|
+
|
|
47
|
+
## Invocation
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
/research <topic> # scoping → routed research
|
|
51
|
+
/research PROFILE=<decision|deep|compare|regulatory> <topic>
|
|
52
|
+
/research DEPTH=<1..3> <topic> # deep-profile iterative loop
|
|
53
|
+
/research status # library health: INDEX + expiring reports
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Flow
|
|
57
|
+
|
|
58
|
+
THIN orchestration — every rule below is DEFINED in
|
|
59
|
+
`agents/research-protocol.md` (read the cited SECTION only) and every output
|
|
60
|
+
FORM in `assets/`; this skill only sequences them. Full step-by-step detail,
|
|
61
|
+
scoping questions and recovery: `references/playbook.md`.
|
|
62
|
+
|
|
63
|
+
1. **Scoping** — clarify question, research nature and purpose with the user
|
|
64
|
+
(max 3 questions via AskUserQuestion; ZERO when the request is already
|
|
65
|
+
specific). Build the stack signature from `stack.*`.
|
|
66
|
+
2. **Routing** — purpose → `PROFILE=` (`SECTION=profiles`); nature → source
|
|
67
|
+
policy row (`SECTION=sources`). State the routing in one line before
|
|
68
|
+
launching.
|
|
69
|
+
3. **Reuse check** — read `${paths.research_dir}/INDEX.md`, match per
|
|
70
|
+
`SECTION=reuse`. On a hit, present FULL_REUSE / DELTA to the user before
|
|
71
|
+
any new research is paid for.
|
|
72
|
+
4. **Launch** — pre-allocate id + output path (`SECTION=library`) and spawn
|
|
73
|
+
`senior-researcher` with `PROFILE=` (+ `DEPTH=` if given), the stack
|
|
74
|
+
signature, the pre-allocated path, and `FILING=orchestrator` (this skill
|
|
75
|
+
owns the INDEX rows). Composite questions (2+ independent sub-questions) →
|
|
76
|
+
parallel fan-out, one spawn per sub-question, each with its own
|
|
77
|
+
pre-allocated path. **Codex**: no parallel subagent fan-out — spawn
|
|
78
|
+
sequentially by name (`agents/runtime-portability-protocol.md`).
|
|
79
|
+
5. **Filing** — verify each report exists at its pre-allocated path with valid
|
|
80
|
+
frontmatter; append the INDEX rows (serialized, one writer: this skill).
|
|
81
|
+
On any mismatch run `scripts/rebuild-research-index.mjs` to reconcile.
|
|
82
|
+
6. **Matrix loop** — if a report contains `## SOURCE_MATRIX_CANDIDATE`
|
|
83
|
+
(`SECTION=sources`), offer both: (a) apply it now to
|
|
84
|
+
`${paths.research_dir}/SOURCES.md` under `## Local additions`; (b) show the
|
|
85
|
+
ready-to-paste BALDART prompt for upstreaming the change to the framework
|
|
86
|
+
default matrix.
|
|
87
|
+
7. **Return** — recommendation headline + `Report: <path>` (+ reuse decision,
|
|
88
|
+
+ matrix candidate note). The report body stays on disk.
|
|
89
|
+
|
|
90
|
+
## `/research status`
|
|
91
|
+
|
|
92
|
+
Read INDEX.md only: report totals per category, reports past `valid_until`
|
|
93
|
+
(refresh candidates → offer a DELTA run), and any INDEX↔frontmatter drift
|
|
94
|
+
(offer `scripts/rebuild-research-index.mjs`).
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: RES-YYYYMMDD-slug
|
|
3
|
+
title: ""
|
|
4
|
+
category: tooling
|
|
5
|
+
tags: []
|
|
6
|
+
profile: compare
|
|
7
|
+
nature: market
|
|
8
|
+
stack_signature: ""
|
|
9
|
+
date: YYYY-MM-DD
|
|
10
|
+
valid_until: YYYY-MM-DD
|
|
11
|
+
status: current
|
|
12
|
+
questions: []
|
|
13
|
+
sources_count: 0
|
|
14
|
+
related: []
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
RESEARCH_OUTPUT_PATH: <this file's path>
|
|
18
|
+
REUSE: NEW | DELTA -> <prior report path> <!-- a FULL_REUSE run writes the pointer stub (SECTION=reuse), not this template -->
|
|
19
|
+
|
|
20
|
+
# <Title> — <Option A> vs <Option B> [vs <Option C>]
|
|
21
|
+
|
|
22
|
+
## Recommendation
|
|
23
|
+
|
|
24
|
+
<one decisive paragraph, bound to the stack signature; name the runner-up and when it wins instead>
|
|
25
|
+
|
|
26
|
+
## Comparison matrix
|
|
27
|
+
|
|
28
|
+
<!-- Fixed axes; keep ≤ 8 columns — split rows, not columns, when options exceed the width. -->
|
|
29
|
+
|
|
30
|
+
| Axis | <Option A> | <Option B> | <Option C> |
|
|
31
|
+
|---|---|---|---|
|
|
32
|
+
| Performance | | | |
|
|
33
|
+
| Cost | | | |
|
|
34
|
+
| Complexity | | | |
|
|
35
|
+
| Risk | | | |
|
|
36
|
+
| Maturity | | | |
|
|
37
|
+
| Adoption | | | |
|
|
38
|
+
|
|
39
|
+
<!-- Every non-obvious cell claim carries a citation + evidence label. -->
|
|
40
|
+
|
|
41
|
+
## When NOT to use
|
|
42
|
+
|
|
43
|
+
- **<Option A>**: <disqualifying conditions>
|
|
44
|
+
- **<Option B>**: …
|
|
45
|
+
|
|
46
|
+
## Contradictions & Unknowns
|
|
47
|
+
|
|
48
|
+
## Sources
|
|
49
|
+
|
|
50
|
+
- [Source Year] <title> — <url> (<date>) [evidence label]
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: RES-YYYYMMDD-slug
|
|
3
|
+
title: ""
|
|
4
|
+
category: architecture # architecture|integrations|regulatory|ux-patterns|algorithms|tooling
|
|
5
|
+
tags: []
|
|
6
|
+
profile: decision
|
|
7
|
+
nature: dev # scientific|dev|regulatory|ux|market
|
|
8
|
+
stack_signature: ""
|
|
9
|
+
date: YYYY-MM-DD
|
|
10
|
+
valid_until: YYYY-MM-DD # date + category TTL (research-protocol.md SECTION=reuse)
|
|
11
|
+
status: current
|
|
12
|
+
questions: []
|
|
13
|
+
sources_count: 0
|
|
14
|
+
related: []
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
RESEARCH_OUTPUT_PATH: <this file's path>
|
|
18
|
+
REUSE: NEW | DELTA -> <prior report path> <!-- a FULL_REUSE run writes the pointer stub (SECTION=reuse), not this template -->
|
|
19
|
+
|
|
20
|
+
# <Title>
|
|
21
|
+
|
|
22
|
+
<!-- One block per research question. Recommendation FIRST — the reader is
|
|
23
|
+
mid-decision; everything else is supporting material. -->
|
|
24
|
+
|
|
25
|
+
## Topic 1: <question>
|
|
26
|
+
|
|
27
|
+
**Recommendation (for this stack):** <one decisive paragraph — what to do and why, bound to the stack signature>
|
|
28
|
+
|
|
29
|
+
**Best practices:**
|
|
30
|
+
- <practice> [Source Year] [STRONG|MODERATE|WEAK|OPINION]
|
|
31
|
+
|
|
32
|
+
**Gotchas / anti-patterns:**
|
|
33
|
+
- <gotcha and its cost> [Source Year]
|
|
34
|
+
|
|
35
|
+
**Contradictions & Unknowns:** <!-- MANDATORY, even when empty: say "None found — evidence is consistent." -->
|
|
36
|
+
- <where evidence disagrees or is missing, and what would resolve it>
|
|
37
|
+
|
|
38
|
+
**Sources:**
|
|
39
|
+
- [Source Year] <title> — <url> (<date>) [evidence label]
|
|
40
|
+
|
|
41
|
+
## Topic 2: <question>
|
|
42
|
+
…
|