baldart 3.6.2
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 +599 -0
- package/README.md +566 -0
- package/VERSION +1 -0
- package/bin/baldart.js +143 -0
- package/framework/.claude/agents/REGISTRY.md +169 -0
- package/framework/.claude/agents/api-perf-cost-auditor.md +291 -0
- package/framework/.claude/agents/code-reviewer.md +350 -0
- package/framework/.claude/agents/codebase-architect.md +391 -0
- package/framework/.claude/agents/coder.md +291 -0
- package/framework/.claude/agents/deep-human-insight.md +198 -0
- package/framework/.claude/agents/doc-reviewer.md +440 -0
- package/framework/.claude/agents/email-deliverability-architect.md +193 -0
- package/framework/.claude/agents/hybrid-ml-architect.md +285 -0
- package/framework/.claude/agents/hyper-gamification-designer.md +149 -0
- package/framework/.claude/agents/legal-counsel-gdpr.md +179 -0
- package/framework/.claude/agents/marketing-conversion-strategist.md +162 -0
- package/framework/.claude/agents/motion-expert.md +108 -0
- package/framework/.claude/agents/onboarding-architect-lead.md +230 -0
- package/framework/.claude/agents/plan-auditor.md +546 -0
- package/framework/.claude/agents/prd-card-writer.md +372 -0
- package/framework/.claude/agents/prd.md +744 -0
- package/framework/.claude/agents/qa-sentinel.md +305 -0
- package/framework/.claude/agents/remotion-animator-orchestrator.md +218 -0
- package/framework/.claude/agents/security-reviewer.md +276 -0
- package/framework/.claude/agents/senior-researcher.md +175 -0
- package/framework/.claude/agents/seo-analytics-strategist.md +156 -0
- package/framework/.claude/agents/skill-improver.md +61 -0
- package/framework/.claude/agents/ui-expert.md +191 -0
- package/framework/.claude/agents/visual-designer.md +190 -0
- package/framework/.claude/agents/website-orchestrator.md +118 -0
- package/framework/.claude/agents/wiki-curator.md +145 -0
- package/framework/.claude/commands/baldart-push.md +15 -0
- package/framework/.claude/commands/check.md +237 -0
- package/framework/.claude/commands/codexreview.md +203 -0
- package/framework/.claude/commands/design-review.md +11 -0
- package/framework/.claude/commands/issue-review.md +34 -0
- package/framework/.claude/commands/new.md +331 -0
- package/framework/.claude/commands/qa.md +257 -0
- package/framework/.claude/hooks/framework-edit-gate.js +208 -0
- package/framework/.claude/hooks/lint-before-commit.sh.template +66 -0
- package/framework/.claude/settings.local.json.example +32 -0
- package/framework/.claude/skills/api-design-principles/SKILL.md +567 -0
- package/framework/.claude/skills/api-design-principles/assets/api-design-checklist.md +155 -0
- package/framework/.claude/skills/api-design-principles/assets/rest-api-template.py +182 -0
- package/framework/.claude/skills/api-design-principles/references/graphql-schema-design.md +583 -0
- package/framework/.claude/skills/api-design-principles/references/rest-best-practices.md +408 -0
- package/framework/.claude/skills/baldart-push/SKILL.md +222 -0
- package/framework/.claude/skills/bug/SKILL.md +200 -0
- package/framework/.claude/skills/bug/references/logging-patterns.md +174 -0
- package/framework/.claude/skills/capture/SKILL.md +125 -0
- package/framework/.claude/skills/capture/references/synthesis-template.md +42 -0
- package/framework/.claude/skills/context-primer/SKILL.md +189 -0
- package/framework/.claude/skills/copywriting/SKILL.md +273 -0
- package/framework/.claude/skills/copywriting/references/copy-frameworks.md +338 -0
- package/framework/.claude/skills/copywriting/references/natural-transitions.md +252 -0
- package/framework/.claude/skills/doc-writing-for-rag/SKILL.md +119 -0
- package/framework/.claude/skills/doc-writing-for-rag/references/before-after-examples.md +291 -0
- package/framework/.claude/skills/doc-writing-for-rag/references/compact-templates.md +183 -0
- package/framework/.claude/skills/doc-writing-for-rag/references/frontmatter-minimal.md +112 -0
- package/framework/.claude/skills/doc-writing-for-rag/references/line-count-targets.md +110 -0
- package/framework/.claude/skills/doc-writing-for-rag/references/schemas-and-errors.md +129 -0
- package/framework/.claude/skills/find-skills/SKILL.md +133 -0
- package/framework/.claude/skills/frontend-design/LICENSE.txt +177 -0
- package/framework/.claude/skills/frontend-design/SKILL.md +84 -0
- package/framework/.claude/skills/gamification-design/SKILL.md +130 -0
- package/framework/.claude/skills/issue-review/SKILL.md +45 -0
- package/framework/.claude/skills/kie-ai/SKILL.md +262 -0
- package/framework/.claude/skills/kie-ai/references/models-catalog.md +272 -0
- package/framework/.claude/skills/kie-ai/scripts/kie_api.sh +209 -0
- package/framework/.claude/skills/kie-ai/scripts/remove_greenscreen.py +69 -0
- package/framework/.claude/skills/kie-ai/scripts/setup_api_key.sh +77 -0
- package/framework/.claude/skills/motion-design/LICENSE +21 -0
- package/framework/.claude/skills/motion-design/README.md +82 -0
- package/framework/.claude/skills/motion-design/SKILL.md +336 -0
- package/framework/.claude/skills/motion-design/director/choreography.md +93 -0
- package/framework/.claude/skills/motion-design/director/context-adaptation.md +83 -0
- package/framework/.claude/skills/motion-design/director/core-philosophy.md +53 -0
- package/framework/.claude/skills/motion-design/director/decision-framework.md +91 -0
- package/framework/.claude/skills/motion-design/director/disney-principles.md +102 -0
- package/framework/.claude/skills/motion-design/director/emotion-mapping.md +71 -0
- package/framework/.claude/skills/motion-design/director/motion-personality.md +89 -0
- package/framework/.claude/skills/motion-design/director/narrative-structure.md +62 -0
- package/framework/.claude/skills/motion-design/patterns/ambient-continuous.md +81 -0
- package/framework/.claude/skills/motion-design/patterns/entrance-exit.md +82 -0
- package/framework/.claude/skills/motion-design/patterns/multi-element.md +69 -0
- package/framework/.claude/skills/motion-design/patterns/state-feedback.md +96 -0
- package/framework/.claude/skills/motion-design/reference/property-selection.md +95 -0
- package/framework/.claude/skills/motion-design/reference/quality-checklist.md +67 -0
- package/framework/.claude/skills/motion-design/reference/timing-easing-tables.md +106 -0
- package/framework/.claude/skills/motion-design/reference/troubleshooting.md +73 -0
- package/framework/.claude/skills/new/SKILL.md +1687 -0
- package/framework/.claude/skills/playwright-skill/API_REFERENCE.md +652 -0
- package/framework/.claude/skills/playwright-skill/SKILL.md +157 -0
- package/framework/.claude/skills/playwright-skill/package.json +26 -0
- package/framework/.claude/skills/prd/SKILL.md +228 -0
- package/framework/.claude/skills/prd/assets/card-template.yml +232 -0
- package/framework/.claude/skills/prd/assets/epic-template.yml +190 -0
- package/framework/.claude/skills/prd/assets/prd-template.md +230 -0
- package/framework/.claude/skills/prd/assets/state-template.md +78 -0
- package/framework/.claude/skills/prd/references/api-perf-gate.md +152 -0
- package/framework/.claude/skills/prd/references/audit-phase.md +478 -0
- package/framework/.claude/skills/prd/references/backlog-phase.md +145 -0
- package/framework/.claude/skills/prd/references/discovery-phase.md +359 -0
- package/framework/.claude/skills/prd/references/impact-analysis.md +233 -0
- package/framework/.claude/skills/prd/references/prd-add-phase.md +214 -0
- package/framework/.claude/skills/prd/references/prd-writing-phase.md +145 -0
- package/framework/.claude/skills/prd/references/research-phase.md +216 -0
- package/framework/.claude/skills/prd/references/ui-design-phase.md +61 -0
- package/framework/.claude/skills/prd/references/validation-phase.md +72 -0
- package/framework/.claude/skills/prd-add/SKILL.md +222 -0
- package/framework/.claude/skills/prd-add/references/impact-analysis.md +233 -0
- package/framework/.claude/skills/remotion-best-practices/SKILL.md +48 -0
- package/framework/.claude/skills/remotion-best-practices/rules/3d.md +86 -0
- package/framework/.claude/skills/remotion-best-practices/rules/animations.md +29 -0
- package/framework/.claude/skills/remotion-best-practices/rules/assets/charts-bar-chart.tsx +173 -0
- package/framework/.claude/skills/remotion-best-practices/rules/assets/text-animations-typewriter.tsx +100 -0
- package/framework/.claude/skills/remotion-best-practices/rules/assets/text-animations-word-highlight.tsx +108 -0
- package/framework/.claude/skills/remotion-best-practices/rules/assets.md +78 -0
- package/framework/.claude/skills/remotion-best-practices/rules/audio.md +169 -0
- package/framework/.claude/skills/remotion-best-practices/rules/calculate-metadata.md +104 -0
- package/framework/.claude/skills/remotion-best-practices/rules/can-decode.md +75 -0
- package/framework/.claude/skills/remotion-best-practices/rules/charts.md +58 -0
- package/framework/.claude/skills/remotion-best-practices/rules/compositions.md +141 -0
- package/framework/.claude/skills/remotion-best-practices/rules/display-captions.md +184 -0
- package/framework/.claude/skills/remotion-best-practices/rules/extract-frames.md +229 -0
- package/framework/.claude/skills/remotion-best-practices/rules/fonts.md +152 -0
- package/framework/.claude/skills/remotion-best-practices/rules/get-audio-duration.md +58 -0
- package/framework/.claude/skills/remotion-best-practices/rules/get-video-dimensions.md +68 -0
- package/framework/.claude/skills/remotion-best-practices/rules/get-video-duration.md +58 -0
- package/framework/.claude/skills/remotion-best-practices/rules/gifs.md +141 -0
- package/framework/.claude/skills/remotion-best-practices/rules/images.md +130 -0
- package/framework/.claude/skills/remotion-best-practices/rules/import-srt-captions.md +69 -0
- package/framework/.claude/skills/remotion-best-practices/rules/light-leaks.md +73 -0
- package/framework/.claude/skills/remotion-best-practices/rules/lottie.md +67 -0
- package/framework/.claude/skills/remotion-best-practices/rules/maps.md +401 -0
- package/framework/.claude/skills/remotion-best-practices/rules/measuring-dom-nodes.md +34 -0
- package/framework/.claude/skills/remotion-best-practices/rules/measuring-text.md +143 -0
- package/framework/.claude/skills/remotion-best-practices/rules/parameters.md +98 -0
- package/framework/.claude/skills/remotion-best-practices/rules/sequencing.md +118 -0
- package/framework/.claude/skills/remotion-best-practices/rules/subtitles.md +36 -0
- package/framework/.claude/skills/remotion-best-practices/rules/tailwind.md +11 -0
- package/framework/.claude/skills/remotion-best-practices/rules/text-animations.md +20 -0
- package/framework/.claude/skills/remotion-best-practices/rules/timing.md +179 -0
- package/framework/.claude/skills/remotion-best-practices/rules/transcribe-captions.md +70 -0
- package/framework/.claude/skills/remotion-best-practices/rules/transitions.md +197 -0
- package/framework/.claude/skills/remotion-best-practices/rules/transparent-videos.md +106 -0
- package/framework/.claude/skills/remotion-best-practices/rules/trimming.md +52 -0
- package/framework/.claude/skills/remotion-best-practices/rules/videos.md +171 -0
- package/framework/.claude/skills/seo-audit/SKILL.md +394 -0
- package/framework/.claude/skills/seo-audit/references/aeo-geo-patterns.md +279 -0
- package/framework/.claude/skills/seo-audit/references/ai-writing-detection.md +190 -0
- package/framework/.claude/skills/simplify/SKILL.md +137 -0
- package/framework/.claude/skills/skill-creator/LICENSE.txt +202 -0
- package/framework/.claude/skills/skill-creator/SKILL.md +356 -0
- package/framework/.claude/skills/skill-creator/references/output-patterns.md +82 -0
- package/framework/.claude/skills/skill-creator/references/workflows.md +28 -0
- package/framework/.claude/skills/skill-creator/scripts/init_skill.py +303 -0
- package/framework/.claude/skills/skill-creator/scripts/package_skill.py +110 -0
- package/framework/.claude/skills/skill-creator/scripts/quick_validate.py +95 -0
- package/framework/.claude/skills/ui-design/SKILL.md +199 -0
- package/framework/.claude/skills/ui-design/references/component-discovery.md +54 -0
- package/framework/.claude/skills/ui-design/references/evaluation.md +171 -0
- package/framework/.claude/skills/ui-design/references/generation.md +109 -0
- package/framework/.claude/skills/ui-design/references/inventory.md +59 -0
- package/framework/.claude/skills/webapp-testing/LICENSE.txt +202 -0
- package/framework/.claude/skills/webapp-testing/SKILL.md +123 -0
- package/framework/.claude/skills/webapp-testing/examples/console_logging.py +35 -0
- package/framework/.claude/skills/webapp-testing/examples/element_discovery.py +40 -0
- package/framework/.claude/skills/webapp-testing/examples/static_html_automation.py +33 -0
- package/framework/.claude/skills/webapp-testing/scripts/with_server.py +106 -0
- package/framework/.claude/skills/worktree-manager/SKILL.md +680 -0
- package/framework/AGENTS.md +240 -0
- package/framework/agents/api-contracts.md +137 -0
- package/framework/agents/architecture.md +145 -0
- package/framework/agents/coding-standards.md +148 -0
- package/framework/agents/data-model.md +110 -0
- package/framework/agents/deployment-protocol.md +232 -0
- package/framework/agents/design-review.md +172 -0
- package/framework/agents/env-reference.md +171 -0
- package/framework/agents/github-issue-subagent.md +252 -0
- package/framework/agents/index.md +261 -0
- package/framework/agents/llm-wiki-methodology.md +216 -0
- package/framework/agents/maintenance-protocol.md +305 -0
- package/framework/agents/observability.md +162 -0
- package/framework/agents/performance.md +155 -0
- package/framework/agents/project-context.md +145 -0
- package/framework/agents/runbook.md +208 -0
- package/framework/agents/security.md +168 -0
- package/framework/agents/skills-mapping.md +286 -0
- package/framework/agents/testing.md +111 -0
- package/framework/agents/workflows.md +215 -0
- package/framework/docs/PROJECT-CONFIGURATION.md +336 -0
- package/framework/docs/references/brand-guidelines.md +170 -0
- package/framework/docs/references/ui-guidelines.template.md +182 -0
- package/framework/routines/code-review.routine.yml +46 -0
- package/framework/routines/doc-review.routine.yml +45 -0
- package/framework/routines/ds-drift.routine.yml +52 -0
- package/framework/routines/full-sweep.routine.yml +51 -0
- package/framework/routines/index.yml +70 -0
- package/framework/routines/skill-improve.routine.yml +50 -0
- package/framework/routines/wiki-review.routine.yml +45 -0
- package/framework/templates/baldart.config.template.yml +113 -0
- package/framework/templates/breaking-change-checklist.md +484 -0
- package/framework/templates/feature-card.template.yml +125 -0
- package/framework/templates/overlays/README.md +44 -0
- package/framework/templates/overlays/copywriting.fidelity-example.md +62 -0
- package/framework/templates/overlays/ui-design.fidelity-example.md +75 -0
- package/framework/templates/skill-project-context.snippet.md +19 -0
- package/framework/templates/spec.template.md +208 -0
- package/package.json +51 -0
- package/src/commands/add.js +229 -0
- package/src/commands/configure.js +385 -0
- package/src/commands/doctor.js +486 -0
- package/src/commands/migrate.js +185 -0
- package/src/commands/push.js +0 -0
- package/src/commands/routines.js +269 -0
- package/src/commands/status.js +130 -0
- package/src/commands/update.js +419 -0
- package/src/commands/version.js +88 -0
- package/src/utils/contamination.js +400 -0
- package/src/utils/git.js +181 -0
- package/src/utils/hooks.js +152 -0
- package/src/utils/routine-adapters/claude-code-cloud.js +78 -0
- package/src/utils/routine-adapters/cron.js +138 -0
- package/src/utils/routine-adapters/github-actions.js +141 -0
- package/src/utils/routine-adapters/index.js +21 -0
- package/src/utils/routines.js +166 -0
- package/src/utils/state.js +143 -0
- package/src/utils/symlinks.js +425 -0
- package/src/utils/ui.js +133 -0
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# /prd-add — Change Request Phase
|
|
2
|
+
|
|
3
|
+
Add a new requirement to an existing PRD session. Uses the ICIAS protocol
|
|
4
|
+
(Impact-Confidence-Artifact Stakes) to determine which phases and artifacts
|
|
5
|
+
need revision, then executes only the affected ones.
|
|
6
|
+
|
|
7
|
+
## Trigger modes
|
|
8
|
+
|
|
9
|
+
### 1. Manual invocation
|
|
10
|
+
|
|
11
|
+
User types `/prd-add <description>` or `/prd-add` (then describes the change).
|
|
12
|
+
|
|
13
|
+
### 2. Auto-trigger from /prd discovery
|
|
14
|
+
|
|
15
|
+
During `/prd` Step 2 (Discovery Question Loop), if the user's answer reveals
|
|
16
|
+
a new sub-feature or structural requirement NOT covered by the original feature
|
|
17
|
+
description, the `/prd` skill invokes `/prd-add` automatically.
|
|
18
|
+
|
|
19
|
+
Detection signal: the user's answer introduces NEW entities (endpoints, collections,
|
|
20
|
+
pages, roles, flows) that were not part of the original feature scope.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Execution model
|
|
25
|
+
|
|
26
|
+
Sequential, single-turn analysis + selective multi-turn re-execution.
|
|
27
|
+
|
|
28
|
+
| Step | Phase | Description |
|
|
29
|
+
|------|-------|-------------|
|
|
30
|
+
| 0 | Session Locate | Find active PRD state file |
|
|
31
|
+
| 1 | Intake | Capture and classify change request |
|
|
32
|
+
| 2 | Impact Analysis | ICIAS protocol (3 phases) |
|
|
33
|
+
| 3 | Verdict | Present impact matrix, ask confirmation |
|
|
34
|
+
| 4 | Selective Execution | Re-run only PATCH/REDO phases |
|
|
35
|
+
| 5 | Delta Commit | Commit changes with `[PRD-ADD]` prefix |
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Hard rules
|
|
40
|
+
|
|
41
|
+
1. NEVER start from scratch. Always build on the existing PRD session.
|
|
42
|
+
2. Read the state file and PRD before any analysis.
|
|
43
|
+
3. Follow ICIAS protocol exactly — read [impact-analysis.md](impact-analysis.md).
|
|
44
|
+
4. Present verdict BEFORE executing changes. Wait for user confirmation.
|
|
45
|
+
5. When re-running phases, follow the SAME reference files as `/prd` (discovery-phase.md, etc.).
|
|
46
|
+
6. Update the state file with a `## Change Requests` section tracking all CR history.
|
|
47
|
+
7. Commit with format: `[PRD-ADD] <slug>: <brief CR description>`
|
|
48
|
+
8. **Every message MUST end with the CR Progress Bar.**
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Step 0 — Session Locate
|
|
53
|
+
|
|
54
|
+
1. List `${paths.prd_dir}/sessions/` for state files.
|
|
55
|
+
2. If exactly ONE active session (status != `completed`): use it.
|
|
56
|
+
3. If multiple active sessions: ask user which one.
|
|
57
|
+
4. If zero sessions: inform user, suggest `/prd` instead.
|
|
58
|
+
5. Read the state file AND the PRD document (if exists).
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Step 1 — Intake
|
|
63
|
+
|
|
64
|
+
1. If change description provided as argument: use it.
|
|
65
|
+
2. If not: ask the user to describe the change.
|
|
66
|
+
|
|
67
|
+
**Classify the change type** (from CIA literature):
|
|
68
|
+
|
|
69
|
+
- **Addition**: new entity (endpoint, collection, page, role, flow)
|
|
70
|
+
- **Modification**: change to existing entity (new field, changed behavior)
|
|
71
|
+
- **Deletion**: removal of planned entity
|
|
72
|
+
|
|
73
|
+
Record in state file under `## Change Requests`:
|
|
74
|
+
|
|
75
|
+
```markdown
|
|
76
|
+
### CR-N: <title>
|
|
77
|
+
- Type: Addition | Modification | Deletion
|
|
78
|
+
- Description: <user's description verbatim>
|
|
79
|
+
- Date: YYYY-MM-DD
|
|
80
|
+
- Status: analyzing
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Immediately proceed to Step 2.**
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Step 2 — Impact Analysis (ICIAS Protocol)
|
|
88
|
+
|
|
89
|
+
**Read [impact-analysis.md](impact-analysis.md) for the full protocol.**
|
|
90
|
+
|
|
91
|
+
Quick summary — 3 phases executed in sequence:
|
|
92
|
+
|
|
93
|
+
### Phase 1: Semantic Scan
|
|
94
|
+
|
|
95
|
+
Evaluate each of the 10 dimensions against the change request.
|
|
96
|
+
For each dimension, assign an initial impact assessment (0=none, 1-3=depth).
|
|
97
|
+
|
|
98
|
+
### Phase 2: Structural Propagation
|
|
99
|
+
|
|
100
|
+
Apply the coupling matrix to find transitive impacts.
|
|
101
|
+
Max 2 hops, confidence degrades per hop.
|
|
102
|
+
|
|
103
|
+
### Phase 3: ICIAS Scoring
|
|
104
|
+
|
|
105
|
+
For each impacted dimension: `Score = I x C x A`
|
|
106
|
+
|
|
107
|
+
- I = Impact depth (1=cosmetic, 2=logic, 3=structural)
|
|
108
|
+
- C = Confidence (1=inferred, 2=probable, 3=certain)
|
|
109
|
+
- A = Artifact Stakes (pre-assigned per dimension)
|
|
110
|
+
|
|
111
|
+
Classify: **SKIP** (score <= 3), **PATCH** (4-9), **REDO** (>= 10)
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Step 3 — Verdict
|
|
116
|
+
|
|
117
|
+
Present the impact matrix to the user:
|
|
118
|
+
|
|
119
|
+
```text
|
|
120
|
+
### Impact Analysis — CR-N: <title>
|
|
121
|
+
|
|
122
|
+
| # | Dimension | Direct | Cascade | I | C | A | Score | Verdict |
|
|
123
|
+
|---|-----------|--------|---------|---|---|---|-------|---------|
|
|
124
|
+
| D1 | Target users | - | - | 0 | - | 1 | 0 | SKIP |
|
|
125
|
+
| D2 | User journey | yes | - | 2 | 3 | 2 | 12 | REDO |
|
|
126
|
+
| D3 | Data model | - | D4->D3 | 1 | 2 | 3 | 6 | PATCH |
|
|
127
|
+
| ... | ... | ... | ... | ... | ... | ... | ... | ... |
|
|
128
|
+
|
|
129
|
+
**Fasi da rieseguire:**
|
|
130
|
+
- Discovery: PATCH (D2, D4 da aggiornare)
|
|
131
|
+
- UI Design: REDO (nuovo flow)
|
|
132
|
+
- PRD: PATCH (sezioni 4, 6, 9)
|
|
133
|
+
- Backlog Cards: PATCH (nuove cards + update esistenti)
|
|
134
|
+
|
|
135
|
+
Vuoi procedere con questa analisi?
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**STOP.** Wait for user confirmation.
|
|
139
|
+
|
|
140
|
+
If user disagrees with any verdict, adjust manually and re-present.
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Step 4 — Selective Execution
|
|
145
|
+
|
|
146
|
+
Execute ONLY phases with PATCH or REDO verdict, in original phase order.
|
|
147
|
+
|
|
148
|
+
### For Discovery dimensions (PATCH/REDO)
|
|
149
|
+
|
|
150
|
+
- **PATCH**: Run `codebase-architect` on affected dimensions only.
|
|
151
|
+
Update state file checklist entries. No user questions unless ambiguous.
|
|
152
|
+
- **REDO**: Full re-discovery for that dimension (same as /prd Step 2 loop
|
|
153
|
+
but scoped to affected dimensions only). May require user questions.
|
|
154
|
+
|
|
155
|
+
### For UI Design (PATCH/REDO)
|
|
156
|
+
|
|
157
|
+
- **PATCH**: Describe changes needed to existing design.html. Ask user
|
|
158
|
+
if they want a full design refresh or text-only update to PRD.
|
|
159
|
+
- **REDO**: Re-run full UI Design phase (Steps 3a-3d from /prd).
|
|
160
|
+
|
|
161
|
+
### For PRD (PATCH/REDO)
|
|
162
|
+
|
|
163
|
+
- **PATCH**: Edit specific PRD sections. Add/modify user stories, API
|
|
164
|
+
contracts, data model, acceptance criteria as needed. Preserve
|
|
165
|
+
unchanged sections verbatim.
|
|
166
|
+
- **REDO**: Rewrite major PRD sections (rare — only when change
|
|
167
|
+
fundamentally alters the feature).
|
|
168
|
+
|
|
169
|
+
### For Backlog Cards (PATCH/REDO)
|
|
170
|
+
|
|
171
|
+
- **PATCH**: Create new cards for new work. Update `depends_on` in
|
|
172
|
+
existing cards if dependencies changed. Do NOT rewrite existing cards
|
|
173
|
+
unless acceptance criteria changed.
|
|
174
|
+
- **REDO**: Regenerate affected cards via `prd-card-writer` agent.
|
|
175
|
+
Preserve cards that are unaffected.
|
|
176
|
+
|
|
177
|
+
### For ISA (always re-scan if any PATCH/REDO exists)
|
|
178
|
+
|
|
179
|
+
Run a delta ISA scan focused on the new requirement. Merge new
|
|
180
|
+
touchpoints into existing ISA table. Assign new ISA-N IDs.
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## Step 5 — Delta Commit
|
|
185
|
+
|
|
186
|
+
1. Update state file:
|
|
187
|
+
- CR status: `applied`
|
|
188
|
+
- Update comprehension checklist with changes
|
|
189
|
+
- Update `## Change Requests` with summary of what was done
|
|
190
|
+
2. Re-run API Performance Gate (Step 4.5) if API/data model changed.
|
|
191
|
+
3. Stage ONLY modified files (explicit names).
|
|
192
|
+
4. Commit: `[PRD-ADD] <slug>: <CR description>`
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## CR Progress Bar — mandatory on every message
|
|
197
|
+
|
|
198
|
+
```text
|
|
199
|
+
---
|
|
200
|
+
Change Request: <slug> — CR-N
|
|
201
|
+
|
|
202
|
+
| # | Fase | Verdict | Stato |
|
|
203
|
+
|---|------|---------|-------|
|
|
204
|
+
| 1 | Intake | - | pending/done |
|
|
205
|
+
| 2 | Impact Analysis | - | pending/running/done |
|
|
206
|
+
| 3 | Verdict & conferma | - | pending/running/done |
|
|
207
|
+
| 4a | Discovery (delta) | SKIP/PATCH/REDO | pending/running/done/skipped |
|
|
208
|
+
| 4b | UI Design (delta) | SKIP/PATCH/REDO | pending/running/done/skipped |
|
|
209
|
+
| 4c | PRD (delta) | SKIP/PATCH/REDO | pending/running/done/skipped |
|
|
210
|
+
| 4d | Backlog Cards (delta) | SKIP/PATCH/REDO | pending/running/done/skipped |
|
|
211
|
+
| 5 | Delta Commit | - | pending/done |
|
|
212
|
+
|
|
213
|
+
Prossimo passo: <what happens next>
|
|
214
|
+
```
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# PRD Writing Phase (Step 4)
|
|
2
|
+
|
|
3
|
+
**Precondition:** Discovery complete. UI Design complete or skipped.
|
|
4
|
+
|
|
5
|
+
Mark task 3 as `in_progress`.
|
|
6
|
+
|
|
7
|
+
## Write PRD
|
|
8
|
+
|
|
9
|
+
1. Create directory `docs/prd/<slug>/` if it doesn't exist.
|
|
10
|
+
2. **Obsidian spec note (if present):** if the state file contains `## Obsidian Spec Note`,
|
|
11
|
+
add a row to the Canonical Sources table in the PRD:
|
|
12
|
+
`| Obsidian spec | [[Note Name]] |`
|
|
13
|
+
This preserves traceability from the user's original spec note to the final PRD.
|
|
14
|
+
3. **Resolve canonical sources** before writing:
|
|
15
|
+
- Read `${paths.references_dir}/ssot-registry.md` to identify the macro feature and any
|
|
16
|
+
existing canonical docs.
|
|
17
|
+
- Read `docs/guides/linking-protocol-rollout-v1.md` for the Canonical Ownership Matrix.
|
|
18
|
+
- Identify which existing PRDs, ADRs, reference docs, or backlog cards are canonical
|
|
19
|
+
for this feature area.
|
|
20
|
+
3. **Incorporate research findings** (if `## Research Findings` in state file is populated):
|
|
21
|
+
- Reference best practices in data model, API, and architecture decisions.
|
|
22
|
+
- Cite sources in PRD rationale sections.
|
|
23
|
+
- Add anti-patterns from research to "Edge cases and failure modes" table.
|
|
24
|
+
- If regulatory findings exist: add a dedicated "Compliance Requirements" section.
|
|
25
|
+
- Include a "Research-Informed Decisions" subsection listing decisions influenced
|
|
26
|
+
by research, with brief rationale and source reference.
|
|
27
|
+
3.5. **Schema Verification Gate (MANDATORY if feature touches Firestore)**
|
|
28
|
+
|
|
29
|
+
If any of the following apply: new Firestore collection, modified fields, compound queries,
|
|
30
|
+
or reading/writing existing documents — run this gate before writing Section 3 (Data Model).
|
|
31
|
+
|
|
32
|
+
**Procedure:**
|
|
33
|
+
1. Identify every collection the feature uses or modifies.
|
|
34
|
+
2. For each collection: read `${paths.references_dir}/field-registry.json` → find the collection key.
|
|
35
|
+
3. Build a `## Schema Verification` section in the PRD (see template below).
|
|
36
|
+
4. Mark each field: `✅ existing` | `🆕 new` | `❌ NOT FOUND`.
|
|
37
|
+
5. **GATE**: if ANY field is `❌ NOT FOUND` and NOT marked as `🆕 new`:
|
|
38
|
+
- STOP — do not advance to Section 5 (backlog cards).
|
|
39
|
+
- Ask the user: "Is `fieldName` in collection `collectionName` a new field or a naming error?"
|
|
40
|
+
- If new: add full schema definition in PRD Section 3 and mark `🆕`.
|
|
41
|
+
- If error: correct the name.
|
|
42
|
+
|
|
43
|
+
**Template `## Schema Verification`** (insert after PRD Acceptance Criteria section):
|
|
44
|
+
|
|
45
|
+
```markdown
|
|
46
|
+
## Schema Verification
|
|
47
|
+
> Source: field-registry.json — verificato il {YYYY-MM-DD}
|
|
48
|
+
> Complessità stimata: HIGH | MEDIUM | LOW
|
|
49
|
+
|
|
50
|
+
### Collection: {collectionName}
|
|
51
|
+
|
|
52
|
+
| Field | Type | Status | Note |
|
|
53
|
+
|-------|------|--------|------|
|
|
54
|
+
| `fieldName` | string | ✅ existing | — |
|
|
55
|
+
| `newField` | string | 🆕 new | schema in Section 3 |
|
|
56
|
+
| `~~oldField~~` | — | ❌ NOT FOUND | correggi nome |
|
|
57
|
+
|
|
58
|
+
### Blocchi aperti
|
|
59
|
+
- (nessuno) — oppure lista dei ❌ con azione richiesta
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Nota**: `id`, `createdAt`, `updatedAt` sono universali — non richiedono verifica.
|
|
63
|
+
|
|
64
|
+
4. Write `docs/prd/<slug>/PRD.md` using the template from `assets/prd-template.md`.
|
|
65
|
+
|
|
66
|
+
### PRD sections checklist
|
|
67
|
+
|
|
68
|
+
Every PRD MUST include these sections (remove only when genuinely N/A):
|
|
69
|
+
|
|
70
|
+
- Problem statement
|
|
71
|
+
- Ratio strategica (Section 1b — from `## Business Rationale` in state file)
|
|
72
|
+
- Goals / non-goals
|
|
73
|
+
- Personas
|
|
74
|
+
- User stories
|
|
75
|
+
- Data model (TypeScript interfaces, Firestore schema changes, validation rules, **Firestore Composite Indexes table** — MANDATORY if any compound query exists)
|
|
76
|
+
- API contract changes (endpoints, request/response, validation)
|
|
77
|
+
- UI specifications (if applicable — MUST derive from `## UI Element Inventory` in
|
|
78
|
+
state file; include the full inventory table verbatim, reference `design.html` path,
|
|
79
|
+
and map each UI element to the requirement it satisfies)
|
|
80
|
+
- i18n specification (dictionary keys, locale files)
|
|
81
|
+
- Acceptance criteria (grouped by area: Merchant, Customer, API, i18n)
|
|
82
|
+
- Edge cases and failure modes (table format)
|
|
83
|
+
- Out of scope
|
|
84
|
+
- Dependencies (table with type and status)
|
|
85
|
+
- Pipeline touchpoints (implementation summary table)
|
|
86
|
+
- Integration Surface Map (ISA) — from discovery dimension 9: every existing-code
|
|
87
|
+
touchpoint that must reference the new feature, with risk levels and card mapping.
|
|
88
|
+
Every ISA entry MUST map to at least one backlog card.
|
|
89
|
+
- Canonical Sources (macro feature, requirements owner, refs)
|
|
90
|
+
- Implementation References (exact file paths with relevance)
|
|
91
|
+
- Documentation Impact — which reference docs, indexes, registry entries, or ADRs
|
|
92
|
+
need follow-up updates. Flag ADR-worthy decisions: DB schema changes, API contract
|
|
93
|
+
changes, new external dependencies, auth changes.
|
|
94
|
+
- Backlog Links — epic/card links (placeholders if cards not yet created)
|
|
95
|
+
- Open questions (only genuine unresolved items)
|
|
96
|
+
|
|
97
|
+
### Navigation and freshness pass
|
|
98
|
+
|
|
99
|
+
Before presenting the PRD:
|
|
100
|
+
|
|
101
|
+
- Verify canonical sources resolve through ssot-registry or valid backlog links.
|
|
102
|
+
- Flag any `REGISTRY_GAP` (feature not yet in ssot-registry).
|
|
103
|
+
- Flag stale shared-hub markers if `Last updated` conflicts with `git log -1`.
|
|
104
|
+
- Remove temp/local/absolute paths from canonical sections.
|
|
105
|
+
|
|
106
|
+
## Step 4.5 — API Performance Gate
|
|
107
|
+
|
|
108
|
+
**Precondition:** PRD written (Step 4 complete).
|
|
109
|
+
|
|
110
|
+
Before presenting the PRD to the user, run the API Performance Gate to catch
|
|
111
|
+
cost and performance anti-patterns while they are still cheap to fix.
|
|
112
|
+
|
|
113
|
+
**Read [api-perf-gate.md](api-perf-gate.md) for the full 5-gate protocol.**
|
|
114
|
+
|
|
115
|
+
### Quick procedure
|
|
116
|
+
|
|
117
|
+
1. **Gate 5 (Text Scan)** — ALWAYS runs. Scan the PRD for keyword red flags
|
|
118
|
+
(unbounded reads, N+1, fan-out, real-time listeners, etc.).
|
|
119
|
+
2. **If Gate 5 matches OR PRD has API/data model sections** → run Gates 1-4
|
|
120
|
+
(Data Model, Query & Index, Serverless, Caching).
|
|
121
|
+
3. **If no matches AND no API/data sections** → skip with note in state file.
|
|
122
|
+
4. For each finding:
|
|
123
|
+
- CRITICAL/HIGH: edit the PRD directly (add NFR, modify API contract, add
|
|
124
|
+
edge case) before the user sees it.
|
|
125
|
+
- MEDIUM: add to edge cases table.
|
|
126
|
+
- LOW: note in state file only.
|
|
127
|
+
5. If CRITICAL findings were resolved, add a `### Performance-Informed Decisions`
|
|
128
|
+
subsection to the PRD.
|
|
129
|
+
6. Update state file: `## API Performance Gate` with findings count.
|
|
130
|
+
|
|
131
|
+
**Gate:** all CRITICAL findings resolved in PRD.
|
|
132
|
+
|
|
133
|
+
## Present and Confirm
|
|
134
|
+
|
|
135
|
+
1. Update state file `## Confirmed Specs` with FR/NFR lists.
|
|
136
|
+
2. Present structured summary to user: all FR + NFR + visual specs.
|
|
137
|
+
3. If API Performance Gate ran, include a brief summary:
|
|
138
|
+
`**Performance Gate**: N findings integrati nel PRD (X critical risolti, Y high come NFR).`
|
|
139
|
+
|
|
140
|
+
**STOP.** Wait for user confirmation. If user requests changes, edit PRD.md and
|
|
141
|
+
re-present. Do NOT proceed to backlog cards without explicit user approval.
|
|
142
|
+
|
|
143
|
+
**Gate:** explicit user confirmation of specs.
|
|
144
|
+
|
|
145
|
+
Mark task 3 as `completed`. Update state file status to `cards-writing`.
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
# Research Phase (Step 2.5)
|
|
2
|
+
|
|
3
|
+
Optional phase between Discovery and UI Design. Launches `senior-researcher`
|
|
4
|
+
agent to gather best practices, architectural patterns, or regulatory guidance
|
|
5
|
+
for complex/novel features.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Trigger Evaluation
|
|
10
|
+
|
|
11
|
+
Evaluate research need when comprehension reaches **~75%** (6/8 non-test
|
|
12
|
+
dimensions covered). This allows background research to run while the last
|
|
13
|
+
discovery questions are being asked.
|
|
14
|
+
|
|
15
|
+
### Complexity Signals
|
|
16
|
+
|
|
17
|
+
Scan discovery answers and codebase-architect findings for these signals:
|
|
18
|
+
|
|
19
|
+
| # | Signal | Example |
|
|
20
|
+
|---|--------|---------|
|
|
21
|
+
| S1 | Algorithm/pattern not in codebase | Recommendation engine, ranking algorithm, scoring system, ML pipeline |
|
|
22
|
+
| S2 | Regulatory/compliance requirement | GDPR consent, PCI-DSS, accessibility WCAG, food allergen regulations |
|
|
23
|
+
| S3 | External service/API never integrated | New payment provider, new SMS gateway, new OCR service |
|
|
24
|
+
| S4 | UX pattern not in the app | Drag-and-drop, real-time collaboration, complex data visualization |
|
|
25
|
+
| S5 | User explicitly signaled uncertainty | "non so come", "best practice", "come fanno gli altri", "devo capire" |
|
|
26
|
+
| S6 | Architecture decision with multiple valid approaches | Polling vs WebSocket, CQRS vs simple CRUD, edge vs server |
|
|
27
|
+
|
|
28
|
+
### Confidence Classification
|
|
29
|
+
|
|
30
|
+
| Confidence | Condition | Action |
|
|
31
|
+
|------------|-----------|--------|
|
|
32
|
+
| **ALTA** | 2+ signals match, OR S2 (regulatory) matches alone, OR S5 (user uncertainty) matches alone | Launch research **in background immediately** — no user prompt |
|
|
33
|
+
| **MEDIA** | Exactly 1 non-S2/S5 signal matches | Ask user at discovery exit |
|
|
34
|
+
| **NESSUNA** | No signals match | Skip research, proceed to next phase |
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Research Execution
|
|
39
|
+
|
|
40
|
+
### HIGH Confidence — Background Auto-Launch
|
|
41
|
+
|
|
42
|
+
Trigger as soon as confidence is HIGH (typically at ~75% comprehension).
|
|
43
|
+
|
|
44
|
+
1. **Identify research topics** from the matching signals. Formulate 1-3
|
|
45
|
+
specific research questions. Examples:
|
|
46
|
+
- S1: "Best practices for implementing [pattern] in a Next.js/Firestore stack"
|
|
47
|
+
- S2: "Regulatory requirements for [topic] in Italy/EU, implementation checklist"
|
|
48
|
+
- S3: "Integration patterns for [service], comparison of approaches, gotchas"
|
|
49
|
+
- S4: "UX best practices for [pattern], accessibility considerations, mobile"
|
|
50
|
+
- S6: "Trade-offs of [approach A] vs [approach B] for [use case]"
|
|
51
|
+
|
|
52
|
+
2. **Launch `senior-researcher` agent in background:**
|
|
53
|
+
```
|
|
54
|
+
Agent(
|
|
55
|
+
subagent_type: "senior-researcher",
|
|
56
|
+
run_in_background: true,
|
|
57
|
+
name: "prd-researcher",
|
|
58
|
+
prompt: "Research the following topics for a PRD we're writing for feature
|
|
59
|
+
'<slug>'. Context: <1-2 line feature summary>.
|
|
60
|
+
|
|
61
|
+
Research questions:
|
|
62
|
+
1. <question>
|
|
63
|
+
2. <question>
|
|
64
|
+
|
|
65
|
+
For each topic, provide:
|
|
66
|
+
- Summary of best practices (with sources)
|
|
67
|
+
- Recommended approach for our stack (Next.js 16, Firestore, Firebase Auth)
|
|
68
|
+
- Key gotchas or anti-patterns to avoid
|
|
69
|
+
- If applicable: regulatory checklist or compliance requirements
|
|
70
|
+
|
|
71
|
+
Output a structured report. Be concise but thorough."
|
|
72
|
+
)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
3. **Continue discovery** — do NOT wait for the researcher. Ask remaining
|
|
76
|
+
questions normally. The researcher runs in parallel.
|
|
77
|
+
|
|
78
|
+
4. **Log in state file** under `## Research`:
|
|
79
|
+
```
|
|
80
|
+
Research: LAUNCHED (background)
|
|
81
|
+
Confidence: ALTA
|
|
82
|
+
Signals: S1 (pattern X), S5 (user said "non so come")
|
|
83
|
+
Topics: [list]
|
|
84
|
+
Status: in-progress
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
5. **At discovery exit**, check if researcher has returned:
|
|
88
|
+
- **Returned**: process findings (see "Processing Findings" below)
|
|
89
|
+
- **Not returned yet**: inform user, wait for result before proceeding
|
|
90
|
+
```
|
|
91
|
+
Discovery completata. La ricerca sulle best practice e ancora in corso,
|
|
92
|
+
aspetto i risultati prima di procedere.
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### MEDIUM Confidence — Ask User
|
|
96
|
+
|
|
97
|
+
At discovery exit (comprehension >= 99%), before proceeding to next phase:
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
### Ricerca Best Practice
|
|
101
|
+
|
|
102
|
+
La feature tocca **<matched signal description>**, un'area dove una ricerca
|
|
103
|
+
sulle best practice potrebbe migliorare la qualita del PRD.
|
|
104
|
+
|
|
105
|
+
Vuoi che lanci una ricerca su:
|
|
106
|
+
- <topic 1>
|
|
107
|
+
- <topic 2>
|
|
108
|
+
|
|
109
|
+
Questo aggiunge ~2-3 minuti ma produce decisioni piu informate.
|
|
110
|
+
|
|
111
|
+
**A)** Si, lancia la ricerca <- consigliato
|
|
112
|
+
**B)** No, procedi direttamente
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**STOP.** Wait for user response.
|
|
116
|
+
|
|
117
|
+
- If **A**: launch `senior-researcher` in **foreground** (user is waiting).
|
|
118
|
+
Log in state file. Process findings when returned.
|
|
119
|
+
- If **B**: mark research as "skipped" in state file. Proceed to next phase.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Processing Findings
|
|
124
|
+
|
|
125
|
+
When `senior-researcher` returns:
|
|
126
|
+
|
|
127
|
+
1. **Store findings** in state file under `## Research Findings`:
|
|
128
|
+
```
|
|
129
|
+
## Research Findings
|
|
130
|
+
|
|
131
|
+
Source: senior-researcher agent (<date>)
|
|
132
|
+
Topics researched: [list]
|
|
133
|
+
|
|
134
|
+
### Topic 1: <title>
|
|
135
|
+
**Best practice**: <summary>
|
|
136
|
+
**Recommended approach**: <for our stack>
|
|
137
|
+
**Gotchas**: <anti-patterns to avoid>
|
|
138
|
+
**Sources**: <references>
|
|
139
|
+
|
|
140
|
+
### Topic 2: <title>
|
|
141
|
+
...
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
2. **Evaluate if findings reveal gaps** in the discovery:
|
|
145
|
+
- Do the findings introduce new dimensions or considerations NOT covered
|
|
146
|
+
by existing discovery answers?
|
|
147
|
+
- Do the findings contradict or significantly nuance any user decisions?
|
|
148
|
+
- Do the findings require new data model fields, API endpoints, or UI
|
|
149
|
+
elements not previously discussed?
|
|
150
|
+
|
|
151
|
+
3. **If gaps exist — extend discovery:**
|
|
152
|
+
Present research-driven follow-up questions to the user. Use the same
|
|
153
|
+
discovery question format (one question, STOP, wait):
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
### Domanda Extra (da ricerca) — <topic>
|
|
157
|
+
|
|
158
|
+
La ricerca ha evidenziato che [finding summary].
|
|
159
|
+
Questo impatta la nostra feature perche [impact].
|
|
160
|
+
|
|
161
|
+
[Question to resolve the gap]
|
|
162
|
+
|
|
163
|
+
**Raccomandazione**: **[Option]** (basata sulla ricerca)
|
|
164
|
+
> [Rationale from research findings]
|
|
165
|
+
|
|
166
|
+
**Alternative**:
|
|
167
|
+
- **A)** [Research-recommended] <- consigliato (da ricerca)
|
|
168
|
+
- **B)** [Alternative]
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
**STOP.** Wait for user response. Update discovery log and state file.
|
|
172
|
+
Repeat for each gap. These extra questions do NOT count toward the
|
|
173
|
+
original 9 dimensions — they are logged separately as "research-driven".
|
|
174
|
+
|
|
175
|
+
4. **If no gaps**: summarize findings briefly and proceed.
|
|
176
|
+
```
|
|
177
|
+
La ricerca conferma l'approccio emerso dalla discovery. Punti chiave:
|
|
178
|
+
- [key finding 1]
|
|
179
|
+
- [key finding 2]
|
|
180
|
+
|
|
181
|
+
Procedo alla fase successiva.
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## State File Updates
|
|
187
|
+
|
|
188
|
+
The research phase adds/updates these sections in the state file:
|
|
189
|
+
|
|
190
|
+
```markdown
|
|
191
|
+
## Research
|
|
192
|
+
|
|
193
|
+
Confidence: ALTA | MEDIA | NESSUNA
|
|
194
|
+
Signals: [matched signals]
|
|
195
|
+
Status: launched | in-progress | completed | skipped
|
|
196
|
+
Topics: [research questions]
|
|
197
|
+
|
|
198
|
+
## Research Findings
|
|
199
|
+
|
|
200
|
+
[populated when researcher returns — see format above]
|
|
201
|
+
|
|
202
|
+
## Research-Driven Discovery
|
|
203
|
+
|
|
204
|
+
[any follow-up questions/answers triggered by findings]
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## Integration with PRD Writing
|
|
210
|
+
|
|
211
|
+
During Step 4 (PRD Writing), if `## Research Findings` is populated:
|
|
212
|
+
|
|
213
|
+
- Reference findings in relevant PRD sections (data model, API, edge cases)
|
|
214
|
+
- Cite best practices in the "Rationale" or "Design Decisions" sections
|
|
215
|
+
- Include anti-patterns in the "Edge cases and failure modes" table
|
|
216
|
+
- If regulatory: add compliance checklist as a dedicated PRD section
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# UI Design Phase (Step 3)
|
|
2
|
+
|
|
3
|
+
Skip entirely if UI impact dimension is N/A. Proceed to PRD Writing Phase.
|
|
4
|
+
|
|
5
|
+
Mark task 2 as `in_progress`.
|
|
6
|
+
|
|
7
|
+
## Delegation to `ui-design` Skill
|
|
8
|
+
|
|
9
|
+
This phase delegates ALL design work to the `ui-design` skill. Do NOT duplicate
|
|
10
|
+
the design workflow here — invoke the skill and follow its output.
|
|
11
|
+
|
|
12
|
+
### How to invoke
|
|
13
|
+
|
|
14
|
+
Use the `Skill` tool: `Skill(ui-design)`
|
|
15
|
+
|
|
16
|
+
The skill handles the full pipeline:
|
|
17
|
+
|
|
18
|
+
| PRD Step | ui-design Skill Step | What happens |
|
|
19
|
+
|----------|---------------------|--------------|
|
|
20
|
+
| 3a — UI Context Analysis | Steps A + B | Component discovery, context screenshots, codebase analysis |
|
|
21
|
+
| 3b — 3 Design Options | Steps C + D + E | Generate 3 HTML mockups, evaluate with separate agent, open in Safari |
|
|
22
|
+
| 3c — Design Iteration | Step F | User feedback loop with re-evaluation |
|
|
23
|
+
| 3d — Save & Inventory | Step G | Save design.html, extract UI Element Inventory |
|
|
24
|
+
|
|
25
|
+
### What to pass to the skill
|
|
26
|
+
|
|
27
|
+
When invoking `ui-design`, ensure it has access to:
|
|
28
|
+
|
|
29
|
+
- Feature description (from state file `## Feature Description`)
|
|
30
|
+
- All discovery answers relevant to UI (from state file `## Discovery Log`)
|
|
31
|
+
- The `<slug>` for file naming
|
|
32
|
+
- Existing component matches (from registry lookup below)
|
|
33
|
+
|
|
34
|
+
### Component Registry Lookup (before design)
|
|
35
|
+
|
|
36
|
+
Before invoking `ui-design`:
|
|
37
|
+
|
|
38
|
+
1. Read `${paths.references_dir}/component-registry.md`.
|
|
39
|
+
2. From feature description, identify UI elements likely needed (tables, forms, modals, etc.).
|
|
40
|
+
3. Match against registry. Pass results to `ui-design`:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
### Existing Components (from component-registry.md)
|
|
44
|
+
REUSE — already exist:
|
|
45
|
+
- [Component] — [path] — [notes]
|
|
46
|
+
|
|
47
|
+
MISSING — no match found:
|
|
48
|
+
- [element description]
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
This prevents designing new components when 450+ reusable ones already exist.
|
|
52
|
+
|
|
53
|
+
### Gates (same as before)
|
|
54
|
+
|
|
55
|
+
- **After Step 3b:** all 3 polished options open in Safari AND screenshots shown inline.
|
|
56
|
+
**STOP.** Wait for user to choose.
|
|
57
|
+
- **After Step 3c:** explicit user approval ("confermo", "va bene", "ok").
|
|
58
|
+
- **After Step 3d:** `docs/prd/<slug>/design.html` exists AND `## UI Element Inventory`
|
|
59
|
+
is populated in the state file with at least 3 elements.
|
|
60
|
+
|
|
61
|
+
Mark task 2 as `completed`. Update state file status to `specs-confirmed`.
|