# PRD Session: {{slug}}
Created: {{YYYY-MM-DD HH:MM}}
Status: discovery   # discovery | mockups-pending-input | research-in-progress | pending-external-handoff | ui-design | writing | specs-confirmed | backlog | audit | validation | committing | completed | done
stats_enabled: {{true if invoked with -stats/--stats, else false}}

## Worktree
- path: {{absolute worktree path returned by worktree-manager nw-docs}}
- main_path: {{absolute path of the MAIN repo checkout ($MAIN) — persisted at Step 1 so finalization (validation-phase Step 7.5) never references an undefined var}}
- trunk_branch: {{resolved git.trunk_branch (autodetected from origin/HEAD when the config key is absent)}}
- branch: prd/{{slug}}
- kind: docs
- created_at: {{ISO-8601 UTC}}
- merge_commit: (pending — populated by validation-phase Step 7 after mw-docs)

## Obsidian Spec Note

<!-- Populated by discovery-phase.md Step 1 point 2 ONLY when the user passed an
     Obsidian note as the documental starting point. When no note was given, leave
     status: none and both back-reference writes are skipped. -->
wikilink: none        # [[Note Name]] form — feeds PRD Canonical Sources row
path: none            # absolute fs path of the note — target of the back-reference writeback
status: none          # none | detected | provisional-written | back-reference-written
                      # detected → provisional snippet written at Step 1.2 (provisional-written)
                      # → upgraded to the full payload at Step 7.6 (back-reference-written)

## Feature Description
{{user's description verbatim}}

## Business Rationale

### Perché adesso, perché questo
(pending)

### Segnale cliente / mercato
(pending)

### Impatto di business atteso
(pending)

### Allineamento strategico
(pending)

### Alternative considerate
(pending)

## Comprehension Checklist
| Dimension | Status | Source | Detail |
|---|---|---|---|
| Business rationale | - | | |
| Target users | - | | |
| User journey | - | | |
| Data model impact | - | | |
| API impact | - | | |
| UI impact | - | | |
| Permissions/roles | - | | |
| Edge cases | - | | |
| Rollout/migration | - | | |
| Integration surface | - | | |
| Test strategy | - | | |

Comprehension: 0% (0/11)

## Discovery Log

## Discovery Cursor

<!-- Scope-expansion position for resume (see discovery-phase.md Step 0 resume table). -->
cursor: 0            # index of the last-processed discovery dimension/sub-feature
comprehension: 0.0   # last computed comprehension fraction (0.0–1.0)

## Research

Confidence: pending
Signals: pending
Status: pending      # pending | research-in-progress | done | failed | timed-out
Topics: pending

## Research Findings

## Research-Driven Discovery

## Integration Surface Map

| # | Category | Existing File | Action Required | Risk | Card |
|---|----------|--------------|-----------------|------|------|

## Test Plan

E2E evaluation: pending
E2E needed: pending
Persona: pending
Credentials: pending
Scenarios: pending

## UI Design

mockups.status: pending           # none | requested | provided | partial | pending_external
mockups.format: pending           # chat-images | local-paths | local-archive | mixed
mockups.original_paths: []        # user-provided paths, chat://image-N, or archive://<rel-path>
mockups.canonical_paths: []       # mockups/<file> after copy

mockups.archive:                  # populated only when format includes local-archive OR a Claude-Design bundle directory
  local_zip_path: pending         # abs path of the .zip the user gave us (n/a when kind: directory)
  kind: pending                   # zip | directory
  extracted_dir: pending          # abs path of _archive/extracted/ (zip) or the user dir (directory)
  truncated: false                # true when candidate list capped at 200
  candidates: []                  # see discovery-phase.md § 1.6.4b step b-c
  bundle_kind: pending            # zip | directory | claude-design | generic (set by step b2 A0)
  canvas_ref: pending             # chosen feature canvas *.html (claude-design only)
  canvas_candidates: []           # [{ file, title, slot_count, score, anchor_confidence }]
  discarded: []                   # [{ path, reason }] reason: other-feature-canvas | support-asset | upload | unrelated

mockups.canvas_render:            # populated only when step b2 A5 ran (claude-design + render)
  served_port: pending            # http-server port used for the render
  rendered_slots: []              # [{ slot_id, png }]
  render_status: pending          # ok | partial | failed | skipped

mockup_analysis.screens: []       # see discovery-phase.md § Mockup analysis schema
mockup_analysis.user_flow: []
mockup_analysis.design_system_alignment:
  status: pending                 # aligned | violations | not-applicable
  violations: []

step_3_mode: pending              # full | hybrid | skipped | mockup-only
design.html_path: pending         # path | n/a (mockup-only)

screens_in_scope: []              # [{ name, slot_id, screen_id, canvas_ref, covered_by_mockups: bool, generated_in_step_3b: bool }]
                                  # slot_id/screen_id/canvas_ref set only for claude-design bundles (enable exact join in ui-design-phase Hybrid routing)

ui_inventory: []                  # populated by Step 3d

## API Performance Gate

<!-- Populated by api-perf-gate.md (Step 4.5) / api-perf-cost-auditor. Machine-readable
     so the card-level audit (audit-phase Step 6) can read prior gate verdicts. -->
status: pending      # pending | pass | warn | block
findings: []         # [{ gate, severity, summary, resolved: bool }]

## Semantic Overrides

<!-- Populated by ICIAS impact-analysis (impact-analysis.md) when a semantic override
     adjusts a cascade-derived dimension impact. Each entry records the precedence
     decision so it is auditable rather than silently applied. -->
overrides: []        # [{ dimension, cascade_value, override_value, rationale }]

## Confirmed Specs

## Backlog Cards

## Change Requests

<!-- Populated by /prd-add when scope expansion is detected -->

## Validation
