Commit Graph

111 Commits

Author SHA1 Message Date
simone afe4274de9 docs(18-02): complete plan — analytics consolidated into admin dashboard 2026-06-19 12:09:54 +02:00
simone c00ec25e48 docs(18-01): complete plan — remove forecast and manual quote builder routes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 12:09:17 +02:00
simone b3670d164b docs(phase-18): create phase plan — cleanup & consolidamento
3 piani in 2 wave: 18-01 (rimozioni Forecast+QuoteBuilder),
18-02 (fusione analytics→dashboard), 18-03 (CLEAN-04 verify + build check).
ROADMAP.md aggiornato con plan list Phase 18.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 11:51:03 +02:00
simone 10a390239a docs: reset milestone v2.2 "Sales Loop"
Strategic reset after articulating the real sales flow (piano in
.claude/plans/glittery-sprouting-pudding.md). v2.1 delivered Offer Studio
(Phase 11+12) + CRM Attio (Phase 14); residual phases re-scoped:

- Phase 13 (Servizi Attivi) → frozen (touches post-sale portal, kept as-is)
- Phase 15 (Dashboard Revenue) → dropped (analytics merges into dashboard)
- Phase 16/17 (Proposal AI) → re-scoped into v2.2 with transcripts added

New milestone v2.2 = sales loop, Phase 18→22 (R1→R5):
- R1 Cleanup: remove forecast + manual quote builder, merge analytics into dashboard
- R2 Pipeline CRM Kanban (Pipedrive-style)
- R3 Knowledge Base (dated call transcripts per lead/client)
- R4 AI agent (admin picks offer, Claude personalizes proposal from transcripts)
- R5 Public /preventivo/[slug] page + email

New requirements: CLEAN-01..04, PIPE-01/02, KB-01/02, AI-01/02, PUB-01/02/03.
Updated ROADMAP, REQUIREMENTS, STATE, PROJECT. No code changed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 11:37:08 +02:00
simone 56f9fd1d07 docs(phase-12): complete phase execution
Phase 12 (Offer Editor: Tier A/B/C, Tag & Prezzo Pubblico) fully executed
and verified. All 5 plans complete, build gate passed, 5/5 requirements
confirmed in codebase (OFFER-11, OFFER-15, OFFER-16, OFFER-17, OFFER-18).

- 12-REVIEW.md: 0 critical, 6 warnings, 4 info (advisory, non-blocking)
- 12-VERIFICATION.md: all requirements PASS
- REQUIREMENTS.md: OFFER-11/15/16/17/18 → Complete
- STATE.md: advanced to Phase 13 as next

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 17:24:19 +02:00
simone 9a74e5ccfa docs(phase-12): update tracking after wave 4
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 10:31:07 +02:00
simone 791a6e64b1 chore: merge executor worktree (worktree-agent-a44f854f45ac76582) 2026-06-15 10:28:07 +02:00
simone a486d27a2b docs(12-04): append self-check results to plan summary 2026-06-15 10:26:58 +02:00
simone ca3712612f docs(12-04): add plan summary for offer list page redesign 2026-06-15 10:26:38 +02:00
simone b7203c3da2 docs(12-05): complete offer editor detail page plan
- Add 12-05-SUMMARY.md documenting OfferEditorClient + edit route
2026-06-15 10:26:24 +02:00
simone e46607d217 docs(phase-12): update tracking after wave 3
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 10:19:52 +02:00
simone 8bdc854a6a docs(12-03): complete offer editor query layer & server actions plan
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-15 10:18:46 +02:00
simone e2d6e97168 docs(phase-12): update tracking after wave 2 checkpoint
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 09:50:23 +02:00
simone d4c89b4170 docs(12-02): apply migration 0008 to production (blocking checkpoint complete)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 09:50:23 +02:00
simone b8f14fad4d docs(phase-12): update tracking after wave 1
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 21:22:37 +02:00
simone b80f0563b8 docs(12-01): fix markdown lint formatting in summary
- Add blank lines around headings and lists per MD022/MD032
2026-06-14 21:21:37 +02:00
simone bfc99329c5 docs(12-01): complete offer tier schema foundation plan
- Add 12-01-SUMMARY.md documenting additive schema extension, migration 0008, and push script
2026-06-14 21:20:28 +02:00
simone 1414c3e95c docs(12): finalize wave resequencing in plans and tracking
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 21:15:09 +02:00
simone 640f986967 docs(12): create phase plan
Re-scoped Offer Editor (Tier A/B/C, Tag & Prezzo Pubblico) per 2026-06-14
user decision: 5-plan wave structure (schema migration -> prod apply
checkpoint -> query/action layer -> list + detail editor UI), OFFER-12
CSV/Notion import deferred.
2026-06-14 21:00:32 +02:00
simone 9bff7623da docs: move CRM Attio-style requirements to Validated (Phase 14)
PROJECT.md: CRM-08..12 moved from Active to Validated in v2.1,
referencing Phase 14 completion.
2026-06-14 15:27:07 +02:00
simone fa5672025f docs(14): mark phase complete, advance roadmap to Phase 15
phase complete 14: ROADMAP plans/progress, STATE position (Phase 15
next, blocked on user mockup), REQUIREMENTS CRM-08..12 -> Complete.
2026-06-14 15:22:40 +02:00
simone 2c227f4ef1 docs(14): add code review report and phase verification (passed)
14-REVIEW.md: 0 critical, 6 warnings, 3 info (standard depth, 11 files).
14-VERIFICATION.md: 5/5 success criteria verified after closing the
SC5/CRM-12 generate_new dead-branch gap.
2026-06-14 15:20:08 +02:00
simone 2a02ca8fbf docs(14-02): add plan summary for LeadTable Attio rewrite 2026-06-14 13:24:47 +02:00
simone 39bd1ce2eb chore: merge executor worktree (worktree-agent-aaf61d7161f7818a0)
# Conflicts:
#	.planning/phases/14-crm-attio-style-fix/deferred-items.md
2026-06-14 12:51:37 +02:00
simone 3c53672754 docs(14-03): append self-check results to plan summary 2026-06-14 12:49:41 +02:00
simone 6b51403404 docs(14-03): complete CRM residual bug fixes plan
Summary for 14-03: FollowUpWidget Italian translation (CRM-10), LeadForm typed useForm (CRM-11) + shared FormField generic fix, SendQuoteModal dead branch removal (CRM-12)
2026-06-14 12:48:53 +02:00
simone a495d84511 fix(14-03): remove dead onSubmit branch in SendQuoteModal (CRM-12)
- Remove unreachable if (tab === "new") branch in onSubmit - the new-tab button has its own onClick navigation and never triggers form submit
- Escape unescaped double quotes in JSX text (react/no-unescaped-entities)
- generate_new field left as-is per plan (optional cleanup, out of scope)
- Log pre-existing useForm<any>/onSubmit(data: any) no-explicit-any lint errors to deferred-items.md (out of scope: fixing requires resolving a zodResolver/Resolver generic incompatibility with assignQuoteSchema's optional/default fields)
2026-06-14 12:46:55 +02:00
simone f21f13909d docs(14-01): append self-check results to SUMMARY
- Verified created/modified files exist and task commits are present
  in git history
2026-06-14 12:44:19 +02:00
simone d1acfe9127 docs(14-01): complete lead data-layer foundation plan
- SUMMARY documents getLeadsWithTags/getLeadFieldOptions and
  updateLeadField/addLeadTag/removeLeadTag/renameLeadTag additions
- Logs 2 pre-existing lint issues (deferred-items.md) unrelated to
  this plan's changes
2026-06-14 12:43:21 +02:00
simone 7d98b27e75 feat(14-01): add updateLeadField and lead tag CRUD server actions
- requireAdmin() guard (mirrors catalog/actions.ts pattern), throws
  "Non autorizzato" before any DB access
- updateLeadField: EDITABLE_FIELDS allowlist, name/status validated
  server-side (LEAD_STAGES.includes), nullable fields cleared on empty
- addLeadTag/removeLeadTag/renameLeadTag: polymorphic tags table scoped
  to entity_type="leads" (LEADS_TAG_ENTITY), never touches
  entity_type="services" rows
- All four actions call revalidatePath for /admin/leads (+ detail page
  where a single leadId applies)
- Log pre-existing lint issues (unrelated to this task) to
  deferred-items.md per scope-boundary rule
2026-06-14 12:41:36 +02:00
simone f5309345b9 docs(14): annotate plan waves and update milestone progress
Wave-dependency annotations for Phase 14 (14-01/14-03 wave 1, 14-02 wave 2)
and corrected v2.1 progress tracking (4/7 plans, current focus → Phase 14).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-14 12:30:38 +02:00
simone d115465240 docs(14): create phase plan
Plan Phase 14 (CRM Attio-style & Fix) into 3 waves: data-layer
foundation (query helpers + server actions), LeadTable raw-table
rewrite with inline edit/tags, and isolated bug fixes for CRM-10/11/12.
2026-06-14 12:09:45 +02:00
simone 89adf7a1d4 docs(14): UI design contract for CRM Attio-style redesign
UI-SPEC approved (5/6 PASS, 1 non-blocking flag on focal point).
Locks reuse of Phase 11 primitives (EditableCell, OptionSelect,
OptionMultiSelect) for the leads table, plus scope for the four
CRM bug fixes (i18n, type-safety, dead code).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-14 11:23:28 +02:00
simone 8d62207ccb docs(phase-11): complete phase — OFFER-13 migration applied to prod DB, all validators passed
Tags table + legacy consolidation applied via SSH tunnel to Coolify Postgres.
Both validators: ALL CHECKS PASSED. Protected tables (clients/projects/payments/phases) unchanged.
Phase 11 verification: passed (OFFER-07/08/09/10/13 all Complete).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 20:31:20 +02:00
simone 1e4f917b51 docs(phase-11): add code review + verification (code-complete, DB migration pending)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 16:35:02 +02:00
simone 0387805041 docs(11-04): complete catalog database-view plan
- Mark OFFER-10 complete (REQUIREMENTS.md) — client-side search delivered
- STATE.md: position advanced to Phase 11 plans 1-4 all executed (92%), session/decisions/metrics updated
- 11-04-SUMMARY.md: append self-check results
2026-06-13 16:05:13 +02:00
simone 9bc1e43738 docs(11-04): add plan summary and log unused createService action
- 11-04-SUMMARY.md documents ServiceTable database-view rewrite + CatalogSearch
- deferred-items.md: log now-unused createService/serviceSchema in actions.ts (item 6)
2026-06-13 16:03:10 +02:00
simone e424653ece docs(11-03): complete EditableCell + TagMultiSelect plan
- add 11-03-SUMMARY.md documenting EditableCell/TagMultiSelect delivery
  and the react-hooks lint-rule fix (Rule 1 deviation)
- update STATE.md position (3 of 4 -> 4 of 4), progress 86% -> 89%,
  performance metrics, and decisions log
- log gsd-sdk unavailability and OFFER-07/08 status timing as deferred
  items for Phase 11
2026-06-13 15:56:06 +02:00
simone 62d5e97f39 docs(11-02): complete catalog query layer + server actions plan
- SUMMARY.md for Plan 02 (ServiceWithTags + 4 new server actions)
- STATE.md: advance to Plan 3/4, record metrics and decision
- REQUIREMENTS.md: mark OFFER-07/08/09 backend foundation complete
2026-06-13 15:47:07 +02:00
simone a447494dde docs(11-01): complete plan 1 — tags schema + consolidation scripts, DB-execution gated
- Advance STATE.md to plan 2/4, record metrics/decisions/blocker for 11-01
- Fix Status/Progress fields regressed by state advance-plan (status was
  reset to "Ready to execute" / 0% despite phase being mid-execution)
- Note .planning/ROADMAP.md is an empty PLACEHOLDER (pre-existing v2.1
  planning gap) — roadmap update-plan-progress is a no-op until populated
2026-06-13 15:35:18 +02:00
simone afe789c415 docs(11-01): add execution summary and deferred items log
Documents Phase 11 Plan 1 outcome: tags table schema + migration scripts
complete and committed; DB-execution steps (push migration, run legacy
consolidation, run tag-assignment + validators) blocked by network/SSH
access gate to 178.104.27.55:54321 (firewalled, SSH-only per project
memory). Logs pre-existing drizzle-kit migration tooling drift and the
stale quote_items<->service_catalog JOIN as deferred non-blocking items.
2026-06-13 15:30:03 +02:00
simone d1b1047368 docs(11): create phase plan — 4 plans, 4 waves
Catalog Database-View UX & Legacy Consolidation (OFFER-07/08/09/10/13)
- 11-01: tags table + polymorphic junction + additive legacy migration
- 11-02: getAllServices tag join + inline-edit/tag/quick-add server actions
- 11-03: EditableCell + TagMultiSelect components
- 11-04: database-view ServiceTable + client-side search

Verified by gsd-plan-checker (VERIFICATION PASSED).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 15:07:17 +02:00
simone 03898f2a59 docs(planning): v2.1 milestone setup + Phase 11 context/patterns
- Archive v2.0 phases (07-10) under .planning/milestones/
- v2.1 REQUIREMENTS/ROADMAP (Phases 11-17: Offer Studio + Proposal AI)
- DESIGN-SYSTEM.md (database-view UI contract for Phases 11-14)
- Phase 11 CONTEXT, DISCUSSION-LOG, PATTERNS

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 15:07:06 +02:00
simone 857af5c182 docs(handoff): triage user feedback — lead detail bug fixed, tab restructuring decisions, Attio as CRM UX benchmark
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 22:14:31 +02:00
simone 810a53816d docs(handoff): new direction — Offer Studio + Proposal AI, decisions and next-session plan
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 21:20:51 +02:00
simone feff48e5e1 docs(handoff): CRM pages live-verified; next session = fix design/functional/structural issues before Phase 11
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 21:57:34 +02:00
simone 0a4dd932bc docs(state): Phase 10 redo complete — root cause was unapplied prod migrations 0001-0005
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 21:00:28 +02:00
simone 008a43469d feat(10-redo-C): CRM leads module — schema, services, UI (Phase 10 redo)
Stage C of staged Phase 10 redo. Restores dangling phase10-wip work:
- schema.ts: leads expansion + activities/reminders tables + relations
- lead-service.ts / lead-validators.ts service layer
- /admin/leads list + detail + actions, LeadTable/LeadDetail/LeadForm
- LogActivityModal, SendQuoteModal, FollowUpWidget on dashboard
- migration 0005 (applied to prod DB in Stage B, along with
  previously-missing 0001/0003/0004 — root cause of all post-deploy
  500s: prod DB had no migrations applied since 0000)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 20:58:14 +02:00
simone 0bca8a6c4d docs(state): Phase 9 Plan 3 execution complete — public quote page live
State changes:
- Progress: 5/8 plans complete (62.5%)
- Phase 09 Plan 03: DONE (30 minutes)
- Multistep wizard, rate limiting, immutable acceptance all implemented

Roadmap changes:
- Phase 9 execution summary: 3/3 plans complete
- Phase 7-9 now 6/11 total v2.0 plans DONE
- Ready for Phase 10 (CRM) and Phase 11 (Auto-provisioning)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-11 07:41:06 +02:00
simone bf0695901f docs(09-03): phase 9 plan 3 execution summary — public quote page complete
- 3 tasks completed (rate limiting, components, page/actions)
- 9 files created, 1 file modified
- Public /quote/[token] route with multistep wizard (3 steps)
- Rate limiting: 3 views/min per IP via proxy middleware
- Immutable quote acceptance with optional email/notes capture
- quote_items never exposed; only accepted_total and phase summary visible
- All threat model mitigations in place
- npm run build: PASS (0 TypeScript errors)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-11 07:40:02 +02:00