14 Commits
Author SHA1 Message Date
kiskaadee b8af53adb3 Merge pull request 'docs(todo): track structured error codes for 409 responses (armonia-api#15)' (#10) from docs/todo-m5-roster-error-codes into main 2026-10-29 13:54:35 -05:00
kiskaadee 97922a73d9 docs(todo): add m5 backend structured error code task (armonia-api#15) 2026-10-29 13:54:24 -05:00
kiskaadee c4532a1799 Merge pull request 'docs(pilot): record qa scorecard evidence and complete m4 workshop roster in roadmap and todo' (#9) from docs/m4-roster-tracking-and-qa-evidence into main 2026-10-29 13:43:48 -05:00
kiskaadee 187aad6f96 docs(pilot): record qa scorecard evidence and complete m4 workshop roster in roadmap and todo 2026-10-29 13:43:26 -05:00
kiskaadee ab02870dce chore(git): ignore ephemeral agent worktrees in .worktrees/
Prevent ephemeral agent worktrees created under .worktrees/ from being tracked by git.
2026-10-26 21:32:47 -05:00
kiskaadee 2f76184b37 Merge pull request 'docs(pilot): fix database url reference in workshop roster verification script' (#8) from docs/fix-roster-verification-packet-path into main 2026-10-26 09:34:56 -05:00
kiskaadee a7f7799362 docs(pilot): fix database url reference in workshop roster verification script
Replace undefined `db_filename` with `abs_db_path` in `settings.database_url` assignment, ensuring the standalone verification runner cleanly anchors to the isolated test database path.
2026-10-26 09:31:14 -05:00
kiskaadee 070dfd21d5 Merge pull request 'docs(pilot): ratify group workshop roster collaboration plan, spec, and qa packet' (#7) from docs/workshop-roster-pilot into main 2026-10-26 09:20:53 -05:00
kiskaadee 2d76328655 docs(pilot): ratify group workshop roster collaboration plan, spec, and qa packet
- add multi-agent collaboration plan establishing orchestrator, anne droid,
  and independent qa boundaries
- define functional specification contract for group workshop roster quick check-in
- provide frozen environment verification packet with test personas for blind qa
2026-10-26 09:19:14 -05:00
kiskaadee 89e3cffc8f docs(profile): add github organization profile readme
- Add profile/README.md to serve as the GitHub organization landing page.
- Link to all ecosystem repositories on GitHub (api, dashboard, landing, homelab).
- Include platform topology diagram and canonical business description.
2026-10-23 23:43:20 -05:00
kiskaadee f15c26da0f docs(roadmap): document parking lot horizon for pre-recorded courses
- Record pre-recorded online course catalog under parking lot horizons.
- Define zero-infrastructure operational flow leveraging WhatsApp intake folios (ADS-CURSO-xxx) and manual SPEI verification.
2026-10-23 23:42:55 -05:00
kiskaadee 8127d2a8e5 docs(readme): feature operational discovery interviews as check-first SSOT 2026-10-23 17:55:27 -05:00
kiskaadee 417f913272 docs(interviews): add spanish companion and refine operational feedback
- Add docs/interviews/2026-10-20-platform-feedback.es.md as localized companion
- Frame feedback around post-demo exploratory exchange (omitting raw audio refs)
- Synthesize operational friction points into narrative gaps and 5 user stories
2026-10-23 17:47:56 -05:00
kiskaadee 76030763e0 docs(interviews): record client feedback, operational gaps, and user stories
Document operational feedback, friction points, and user stories captured
from hands-on testing of the live Homelab demo on 2026-10-20.

- Frame operational feedback from post-demo exploratory exchange
- Synthesize operational gaps in payment assurance, prórrogas, and notes continuity
- Add synthesis matrix mapping friction points to API and Dashboard components
- Formalize 5 user stories with BDD acceptance criteria for upcoming vertical slices
2026-10-23 17:43:32 -05:00
32 changed files with 1090 additions and 184 deletions

No files matched your search

+3
View File
@@ -12,3 +12,6 @@ raw_feedback.md
.idea/ .idea/
*.swp *.swp
.direnv/ .direnv/
# Ephemeral agent worktrees
.worktrees/
+56 -34
View File
@@ -1,52 +1,74 @@
# ARMONÍA DEL SER # Armonía del Ser
## Owner: > Digital operations platform and administrative control surface for **Armonía del Ser**, an integrative psychology and holistic health center founded by **Jasmin Isaza** in Tulancingo, Hidalgo, Mexico (operating since 2007).
Jasmin Isaza
## Ecosystem Architecture & Repositories
The project is structured into decoupled repositories with concrete roles: ---
| Repository | Path | Role & Technology | Target Platform | Stack | ## 📌 Operational Discovery & Ground Truth (Check First)
| :---------------------- | :------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`armonia-api`** | `armonia-api/` | Core backend REST API, operational source of truth, separated booking/payment state engine, Google OAuth + Turso allowlist, and Google Calendar coordination. | Google Cloud Run ($0 free tier) | [uv](https://docs.astral.sh/uv/), [Python 3.13](https://www.python.org/downloads/release/python-31316/), [FastAPI-standard](https://fastapi.tiangolo.com/), [SQLModel](https://sqlmodel.tiangolo.com/), [Turso libSQL](https://docs.turso.tech/libsql), [Google Calendar](https://developers.google.com/workspace/calendar/api/concepts), [ruff](https://docs.astral.sh/ruff/), [pyright](https://microsoft.github.io/pyright/#/), [pytest](https://docs.pytest.org/en/stable/) |
| **`armonia-dashboard`** | `armonia-dashboard/` | Administrative mobile-first operational control surface for operators to review, follow-up, and acknowledge payments, authorize delayed-payment exceptions, release slots, and track packages. | Cloudflare Pages ($0 free tier) | [Vite+](https://viteplus.dev/), [Tailwind](https://tailwindcss.com/), [HTMX](https://htmx.org/), [Biome](https://biomejs.dev/) |
| **`armonia-landing`** | `armonia-landing/` | Public client-facing landing page, catalog showcase, and self-service reservation portal. | Cloudflare Pages ($0 free tier) | [Vite+](https://viteplus.dev/), [Tailwind](https://tailwindcss.com/), [HTMX](https://htmx.org/), [Biome](https://biomejs.dev/) |
> 🗺️ **Engineering Trajectory & Active Tasks:** See [`ROADMAP.md`](./ROADMAP.md) and [`todo.txt`](./todo.txt). > [!IMPORTANT]
> **Single Source of Truth (SSOT):** Do not assume business rules, payment flows, or scheduling constraints. Before modifying code or proposing architectural changes, consult the primary operational discovery interviews:
>
> 1. **[Requirements Discovery Interview (2026-10-18)](./docs/interviews/2026-10-18-requirements-discovery.md):**
> Foundational discovery with Jasmin's assistant documenting 20 years of practice history, package accounting, WhatsApp-based intake funnels, and the critical need for mandatory buffer times between sessions.
> 2. **[Homelab Live PoC Feedback (2026-10-20)](./docs/interviews/2026-10-20-platform-feedback.md)** ([Versión en Español](./docs/interviews/2026-10-20-platform-feedback.es.md)):
> Frontline operational review following hands-on testing of the live Homelab demo, defining 2-step payment reconciliation (`voucher_received` $\to$ `reconciled`), payment extension (*prórroga*) deadline tracking, clinical session dossiers, and 5 foundational Agile user stories.
---
## Engineering Trajectory & Active Tracking
* 🗺️ **Milestones & Roadmap:** See [`ROADMAP.md`](./ROADMAP.md)
* 📋 **Active Deliverables:** See [`todo.txt`](./todo.txt)
* 📐 **Workspace Agent Constraints:** See [`AGENTS.md`](./AGENTS.md)
---
## Ecosystem Topology & Repositories
The platform is structured into decoupled repositories with clear separation of concerns:
| Repository | Path | Role & Technology | Target Platform | Stack |
| :--- | :--- | :--- | :--- | :--- |
| **`armonia-api`** | [`armonia-api/`](./armonia-api/) | Core backend REST API, operational source of truth, separated booking/payment state engine, Google OAuth + Turso allowlist, and Google Calendar coordination. | Google Cloud Run ($0 free tier) | [uv](https://docs.astral.sh/uv/), [Python 3.13](https://www.python.org/downloads/release/python-31316/), [FastAPI-standard](https://fastapi.tiangolo.com/), [SQLModel](https://sqlmodel.tiangolo.com/), [Turso libSQL](https://docs.turso.tech/libsql), [Google Calendar](https://developers.google.com/workspace/calendar/api/concepts), [ruff](https://docs.astral.sh/ruff/), [pyright](https://microsoft.github.io/pyright/#/), [pytest](https://docs.pytest.org/en/stable/) |
| **`armonia-dashboard`** | [`armonia-dashboard/`](./armonia-dashboard/) | Administrative mobile-first control surface for operators to review, follow-up, and acknowledge payments, authorize delayed-payment exceptions, release slots, and track packages. | Cloudflare Pages ($0 free tier) | [Vite+](https://viteplus.dev/), [Tailwind](https://tailwindcss.com/), [HTMX](https://htmx.org/), [Biome](https://biomejs.dev/) |
| **`armonia-landing`** | [`armonia-landing/`](./armonia-landing/) | Public client-facing landing page, catalog showcase, and self-service reservation portal. | Cloudflare Pages ($0 free tier) | [Vite+](https://viteplus.dev/), [Tailwind](https://tailwindcss.com/), [HTMX](https://htmx.org/), [Biome](https://biomejs.dev/) |
```mermaid ```mermaid
flowchart TD flowchart TD
CV[Clients / Visitors] --> AL[armonia-landing] CV["Clients / Visitors"] --> AL["armonia-landing"]
AL -->|Public booking requests| API[armonia-api] AL -->|"Public booking requests"| API["armonia-api"]
OP[Operators] --> DASH[armonia-dashboard] OP["Operators (Jasmin & Assistant)"] --> DASH["armonia-dashboard"]
DASH -->|Google OAuth + Turso Allowlist| API DASH -->|"Google OAuth + Turso Allowlist"| API
API -->|Operational SSOT & allowlist| DB[(Turso Database<br/>libSQL)] API -->|"Operational SSOT & allowlist"| DB[("Turso Database<br/>libSQL")]
API -->|Schedule coordination & sync health| GC[Google Calendar API] API -->|"Schedule coordination & sync health"| GC["Google Calendar API"]
API -->|Manual follow-up via wa.me| WA[WhatsApp Deep Links] API -->|"Manual follow-up via wa.me"| WA["WhatsApp Deep Links"]
``` ```
All repositories are hosted in [`armonia-del-ser`](https://gitea.roadtotech.me/armonia-del-ser): All repositories are hosted inside the private Gitea organization: [`armonia-del-ser`](https://gitea.roadtotech.me/armonia-del-ser).
---
## Canonical Business Description ## Canonical Business Description
En Armonía del Ser, somos un hogar de sanación y equilibrio. Nace de mi camino profesional y personal en 2007, combinando mis conocimientos en enfermería, psicología, temazcales, constelaciones, flores de Bach y herbolaria entre otros. En Armonía del Ser, somos un hogar de sanación y equilibrio. Nace del camino profesional y personal de Jasmin en 2007, combinando conocimientos en enfermería, psicología, temazcales, constelaciones, flores de Bach y herbolaria entre otros.
Hoy, ofrecemos un espacio integral donde cuerpo, mente y espíritu se encuentran. Aquí guiamos meditaciones, retiros, círculos de cacao, trabajamos con cuencos de cuarzo, equilibrio de chakras y limpieza energética. También ofrecemos atención psicológica, desintoxicaciones, rituales personalizados y celebraciones sagradas. Te invitamos a conectar con tu esencia y descubrir tu propia armonía. Hoy, ofrecemos un espacio integral donde cuerpo, mente y espíritu se encuentran. Aquí guiamos meditaciones, retiros, círculos de cacao, trabajamos con cuencos de cuarzo, equilibrio de chakras y limpieza energética. También ofrecemos atención psicológica, desintoxicaciones, rituales personalizados y celebraciones sagradas.
Somos un centro de atención Psicológicas, terapias alternativas y de la salud, integrativo Somos un centro de atención psicológica, terapias alternativas y de la salud integrativa que ayuda a las personas a encontrarse con su verdadero Ser, a estar en equilibrio con su entorno y descubrir la salud y la abundancia que son su verdadera razón de Ser.
que te ayudan a encontrarte con tu verdadero Ser, a estar en equilibrio con tu entorno y descubrir el Amor, la alegría, la salud y la abundancia, que son tu verdadera razón de Ser.
---
## Operational Context ## Operational Profile
- **Business Name**: Armonía del Ser - Centro Holístico (founded in 2007 by Jasmin). * **Founder & Principal Therapist:** Jasmin Isaza
- **Location**: Vicente Guerrero, Felipe Ángeles, 43640 Tulancingo, Hgo., Mexico. * **Location:** Vicente Guerrero, Felipe Ángeles, 43640 Tulancingo, Hgo., Mexico
- **Contact / WhatsApp**: `+52 775 148 7912` * **Direct Channel:** WhatsApp (`+52 775 148 7912`)
- **Core Offerings**: * **Core Offerings:**
- *Group Sessions (Presencial & Online)*: Círculo de Cacao (Lunes 6 PM Presencial / Martes 7 PM Online), Meditación con cuencos (Martes 7 AM / Sábados 8 AM), Meditación con ejercicios conscientes (Martes 8 AM), Constelaciones Familiares (Jueves 7 PM Online), Clase de los 4 Elementos y Tarot (Viernes 9 AM Online), Meditación guiada (Sábados 7 AM), plus low-cost community workshops (e.g., *Curso de Abundancia y Prosperidad*, \$50 MXN/session). * *Group Sessions (Presencial & Online):* Círculo de Cacao (Lunes 6 PM Presencial / Martes 7 PM Online), Meditación con cuencos (Martes 7 AM / Sábados 8 AM), Meditación con ejercicios conscientes (Martes 8 AM), Constelaciones Familiares (Jueves 7 PM Online), Clase de los 4 Elementos y Tarot (Viernes 9 AM Online), Meditación guiada (Sábados 7 AM), plus low-cost community workshops (e.g., *Curso de Abundancia y Prosperidad*, $50 MXN/session).
- *1-on-1 Consultations*: Atención Psicológica Individual (con cita previa, presencial u online), Flores de Bach, herbolaria, limpieza energética. * *1-on-1 Consultations:* Atención Psicológica Individual (con cita previa, presencial u online), Flores de Bach, herbolaria, limpieza energética.
- **Primary Discovery Source**: [`armonia-del-ser/armonia-api#1`](https://gitea.roadtotech.me/armonia-del-ser/armonia-api/issues/1) (*Discovery Interview: Jasmin & Assistant Operational Feedback*). * **Operational Realities:**
- **Operational Realities**: * **20-Year Local Word-of-Mouth:** Most clients arrive via WhatsApp direct messages, voice calls, or in-person referrals.
- **20-Year Local Word-of-Mouth**: Most clients arrive via WhatsApp direct messages, phone calls, or in-person conversations. * **Collaborative Administration:** Both Jasmin and her remote assistant register participants, follow up on pending payments 48h prior, acknowledge payments, and update session counters.
- **Collaborative Administration**: Both Jasmin and her remote assistant register participants, follow up on pending payments 48h prior, acknowledge payments, and update session counters.
+13 -1
View File
@@ -81,7 +81,7 @@ During our workspace audit on `2026-10-18`, we identified three areas where orig
- [x] 48-Hour Payment Follow-Up Queue with 1-tap `wa.me` links, Acknowledge Payment, and immediate visual feedback (PR #4). - [x] 48-Hour Payment Follow-Up Queue with 1-tap `wa.me` links, Acknowledge Payment, and immediate visual feedback (PR #4).
- [x] Agenda & buffer indicator (15-min buffers rendered visually). - [x] Agenda & buffer indicator (15-min buffers rendered visually).
- [x] Accessible toasts, inline micro-modals, agenda date filter, and sticky mobile nav (PR #5). - [x] Accessible toasts, inline micro-modals, agenda date filter, and sticky mobile nav (PR #5).
- [ ] Multi-session package counter (`8 de 10`) & Group Workshop Roster check-in view. - [x] Multi-session package counter (`8 de 10`) & Group Workshop Roster check-in view (PR #9).
### Milestone M5: Operator Intake, Client Directory & Dynamic Identity (`armonia-dashboard#6`, `armonia-dashboard#7`) ### Milestone M5: Operator Intake, Client Directory & Dynamic Identity (`armonia-dashboard#6`, `armonia-dashboard#7`)
- [x] Replace static header span with dynamic operator identity pill from `GET /auth/me`. - [x] Replace static header span with dynamic operator identity pill from `GET /auth/me`.
@@ -102,3 +102,15 @@ During our workspace audit on `2026-10-18`, we identified three areas where orig
- Service catalog cards (`PRESENCIAL` & `ONLINE`). - Service catalog cards (`PRESENCIAL` & `ONLINE`).
- Live conflict-free slot picker consuming `GET /availability`. - Live conflict-free slot picker consuming `GET /availability`.
- Reservation confirmation with `ADS-XXXX` folio, SPEI CLABE instructions, and 1-tap WhatsApp receipt handoff. - Reservation confirmation with `ADS-XXXX` folio, SPEI CLABE instructions, and 1-tap WhatsApp receipt handoff.
---
## 💡 Parking Lot / Future Horizons
Items identified during discovery and stakeholder reviews that offer clear business value but are intentionally deferred to protect focus on core booking, calendar synchronization, and payment audit invariants:
### 1. Pre-Recorded Online Course Catalog (`armonia-landing`)
* **Context:** Jazmín already owns recorded online courses, representing a high-margin, asynchronous offering with zero schedule-collision risk.
* **Product Vision:** The public landing page (`armonia-landing`) can feature a dedicated digital catalog section showcasing available recorded courses, syllabus outlines, and pricing.
* **Operational Flow ($0 Infrastructure):** Keep it frictionless—interested clients tap a WhatsApp deep link with a pre-formatted folio (`ADS-CURSO-xxx`), submit their SPEI transfer receipt, and the assistant provides unlisted course access links upon voucher acknowledgment. No costly video-hosting or LMS infrastructure required.
+256
View File
@@ -0,0 +1,256 @@
# Independent QA Evidence Scorecard: Group Workshop Roster Quick Check-in
> **Status:** Ratified & Frozen
> **Evaluation Date:** 2026-10-27
> **Evaluator:** Independent QA Specialist (Phase 4 Verification)
> **Governing Verification Contract:** [`VERIFICATION-PACKET-ROSTER.md`](file:///home/kiskaadee/Projects/active/armonia/docs/pilot/VERIFICATION-PACKET-ROSTER.md)
> **Release Authority:** None (Independent verification report submitted to Orchestrator)
---
## 1. Information Barrier Compliance Declaration
In strict compliance with QA Operational Invariant #1:
- Verification was conducted entirely via black-box interaction with the live frontend UI (`http://localhost:5173`) and running backend API (`http://localhost:8000`).
- Zero inspection of implementation source code (`src/` in dashboard, backend route implementations), pull request discussions, or developer self-audit was performed.
- All evaluation criteria were derived solely from the ratified Gate 2 Verification Packet.
---
## 2. Test Environment & Runtime Verification
| Component | Target URL / Port | Runtime Process | Database Target |
| :--- | :--- | :--- | :--- |
| **Frontend UI** | `http://localhost:5173` | Vite v8.3.4 (PID 1520429) | N/A (Consumes Backend API) |
| **Backend API** | `http://localhost:8000` | FastAPI / Uvicorn (PID 1535519) | SQLite (`test_armonia.db`) |
| **Headless Engine**| Chrome 155.0.8059.84 | Playwright / Chromium Driver | Linux x86_64 |
Preflight assertions formally confirmed:
1. `circulo-cacao-presencial` initialized with `max_capacity = 15`.
2. Today's session anchored at 18:00 hrs local business time (`2026-10-26`).
3. Seed attendees: Elena Gómez (`ADS-1001`, `RESERVED`, `ACKNOWLEDGED`, `attended: false`) and Carlos Méndez (`ADS-1002`, `RESERVED`, `AWAITING_ACKNOWLEDGMENT`, `attended: false`).
4. Preflight API check returned `occupied_count: 2`, `attended_count: 0`.
---
## 3. Executive Scorecard: Acceptance Criteria & Scenario Matrix
| Scenario & Criterion | Acceptance Criterion Description | Verified Persistence | Final Verdict |
| :--- | :--- | :--- | :---: |
| **Scenario 1 (`AC-1`)** | Navigation via top bar updates URL to `#rosters`, sets `aria-selected="true"`, renders workshop card at 18:00 hrs with `Ocupación: 2 / 15 (0 presentes)`. | N/A (Read) | **`PASS`** |
| **Scenario 2 (`AC-1`, `AC-2`)** | Roster lists Elena Gómez (`ADS-1001`, `REGISTRADO`, `PAGADO`) and Carlos Méndez (`ADS-1002`, `REGISTRADO`, `PENDIENTE`); direct WhatsApp links (`wa.me/...`) rendered. | N/A (Read) | **`PASS`** |
| **Scenario 3 (`AC-3`)** | Pre-paid Check-in for Elena Gómez: POST HTTP 200 (`paid_cash: false`), badge updates to `ASISTIÓ`, counter updates to `Ocupación: 2 / 15 (1 presentes)`, accessible toast displayed. | **F5 Reload & Backend API** | **`PASS`** |
| **Scenario 4 (`AC-4`)** | Cash Collection Check-in for Carlos Méndez: Checkbox checked, POST HTTP 200 (`paid_cash: true`), badge updates to `ASISTIÓ`, payment updates from `PENDIENTE` to `PAGADO`, counter to `2 presentes`. | **F5 Reload & Backend API** | **`PASS`** |
| **Scenario 5 (`AC-5`)** | Walk-In Registration: Modal opens, cash toggle defaults to checked (`true`), submit button prevents double-submission under rapid double-click, exactly 1 record created (`Lucía Vega`), counter to `3 / 15 (3 presentes)`. | **F5 Reload & Backend API** | **`PASS`** |
| **Scenario 6A (`AC-6`)** | 409 Conflict Disambiguation (Already Checked-In): Out-of-band check-in triggers HTTP 409; UI catches error, displays toast (*"El asistente ya contaba con asistencia registrada"*), reconciles row to `ASISTIÓ` without application crash. | UI State Reconciled | **`PASS`** |
| **Scenario 6B (`AC-6`)** | 409 Conflict Disambiguation (Capacity Reached): At capacity limit, walk-in returns HTTP 409 (`"El taller ha alcanzado su cupo máximo..."`); UI displays explicit alert, preserves form inputs, blocks insertion. | Form Data Preserved | **`PASS`** |
| **Scenario 7 (`AC-6`)** | Network Outage & Actionable Retry: Backend shutdown triggers error banner (*"No se pudieron cargar los talleres. Verifica tu conexión."*) with "Reintentar" button; backend restoration + clicking "Reintentar" recovers session card seamlessly without page reload. | Actionable Recovery | **`PASS`** |
| **Scenario 8 (`AC-7`)** | Mobile Ergonomics & Accessibility Tree: Viewport 375x812 displays zero horizontal scroll overflow; all check-in buttons, toggles, and modal inputs have touch bounding boxes $\ge 44 \times 44$ px; keyboard tab navigation exhibits visible focus outlines; toast container possesses `role="status"` and `aria-live="polite"`. | Viewport & A11y Tree | **`PASS`** |
---
## 4. Consequential Mutation Verification Audit
Every state-mutating scenario was validated through a three-stage assertion cycle:
1. **In-Session Reactive DOM Verification**: Immediate visual badge transitions and counter updates.
2. **Browser Reload Persistence (`F5`)**: Hard refresh to verify local cache re-hydration and state permanence.
3. **Out-of-Band Backend API Query**: Direct `GET /rosters?date_from=2026-10-26&date_to=2026-10-26` with Bearer auth token.
### Mutation Audit Table
| Scenario | Target Attendee | State Mutation Verified | F5 Reload Result | Backend API Read Payload Verification | Verdict |
| :--- | :--- | :--- | :--- | :--- | :---: |
| **Scenario 3** | Elena Gómez (`ADS-1001`) | `attended: false` $\rightarrow$ `true` | Badge: `ASISTIÓ`<br/>Counter: `1 presentes` | `{"booking_code": "ADS-1001", "attended": true}`<br/>`"attended_count": 1` | **`PASS`** |
| **Scenario 4** | Carlos Méndez (`ADS-1002`) | `attended: false` $\rightarrow$ `true`<br/>`payment_status: "AWAITING_ACKNOWLEDGMENT"` $\rightarrow$ `"ACKNOWLEDGED"` | Badge: `ASISTIÓ`<br/>Badge: `PAGADO`<br/>Counter: `2 presentes` | `{"booking_code": "ADS-1002", "attended": true, "payment_status": "ACKNOWLEDGED"}`<br/>`"attended_count": 2` | **`PASS`** |
| **Scenario 5** | Lucía Vega (Walk-In) | New booking created<br/>`attended: true`<br/>`payment_status: "ACKNOWLEDGED"` | Attendee listed<br/>Counter: `3 / 15 (3 presentes)` | `{"client_name": "Lucía Vega", "attended": true, "payment_status": "ACKNOWLEDGED"}`<br/>`"occupied_count": 3, "attended_count": 3` | **`PASS`** |
| **Scenario 6A** | Elena Gómez (`ADS-1001`) | Duplicate check-in rejected with 409 Conflict | Badge reconciles to `ASISTIÓ` | `{"booking_code": "ADS-1001", "attended": true}` | **`PASS`** |
| **Scenario 6B** | Sofía Castro (Walk-In) | Rejected with 409 Conflict (Capacity reached) | No attendee added<br/>Counter remains `2 / 2` | Attendee `"Sofía Castro"` is absent from backend API roster | **`PASS`** |
---
## 5. Observable Evidence Dossier & Artifact Citations
All visual evidence has been captured using headless Google Chrome and stored under `/home/kiskaadee/Projects/active/armonia/docs/evidence/qa/`:
### Visual Evidence Index
1. **Scenario 1 — Navigation, Hash & Capacity Overview:**
- Evidence file: [`scenario_1_navigation_capacity.png`](file:///home/kiskaadee/Projects/active/armonia/docs/evidence/qa/scenario_1_navigation_capacity.png)
- Highlights: URL hash `#rosters`, tab `aria-selected="true"`, card title "Círculo de Cacao (Presencial)", time 18:00 hrs, counter `Ocupación: 2 / 15 (0 presentes)`.
2. **Scenario 2 — Roster Rendering & WhatsApp Direct Links:**
- Evidence file: [`scenario_2_roster_badges.png`](file:///home/kiskaadee/Projects/active/armonia/docs/evidence/qa/scenario_2_roster_badges.png)
- Highlights: Elena Gómez (`ADS-1001`, `REGISTRADO`, `PAGADO`), Carlos Méndez (`ADS-1002`, `REGISTRADO`, `PENDIENTE`), direct WhatsApp anchor links `wa.me/525511112222` and `wa.me/525533334444`.
3. **Scenario 3 — Pre-paid Check-in & Persistence:**
- Action Screenshot: [`scenario_3_prepaid_checkin.png`](file:///home/kiskaadee/Projects/active/armonia/docs/evidence/qa/scenario_3_prepaid_checkin.png)
- Reload Screenshot: [`scenario_3_persistence_reload.png`](file:///home/kiskaadee/Projects/active/armonia/docs/evidence/qa/scenario_3_persistence_reload.png)
- HTTP Request: `POST http://localhost:8000/rosters/quick-checkin`
```json
{"booking_id": "b1111111-1111-1111-1111-111111111111", "paid_cash": false}
```
- HTTP Response: `HTTP 200 OK`
```json
{
"walk_in": false,
"attendee": {
"booking_id": "b1111111-1111-1111-1111-111111111111",
"booking_code": "ADS-1001",
"booking_status": "COMPLETED",
"payment_status": "ACKNOWLEDGED",
"attended": true
},
"payment_id": null
}
```
4. **Scenario 4 — Cash Collection Check-in & Payment Transition:**
- Action Screenshot: [`scenario_4_cash_checkin.png`](file:///home/kiskaadee/Projects/active/armonia/docs/evidence/qa/scenario_4_cash_checkin.png)
- Reload Screenshot: [`scenario_4_persistence_reload.png`](file:///home/kiskaadee/Projects/active/armonia/docs/evidence/qa/scenario_4_persistence_reload.png)
- HTTP Request: `POST http://localhost:8000/rosters/quick-checkin`
```json
{"booking_id": "b2222222-2222-2222-2222-222222222222", "paid_cash": true, "notes": "Cobro en puerta"}
```
- HTTP Response: `HTTP 200 OK`
```json
{
"walk_in": false,
"attendee": {
"booking_id": "b2222222-2222-2222-2222-222222222222",
"booking_code": "ADS-1002",
"payment_status": "ACKNOWLEDGED",
"attended": true
},
"payment_id": "f69f2d53-1cc5-423a-87b7-0b693a6718ef"
}
```
5. **Scenario 5 — Walk-In Registration & Double-Submission Defense:**
- Modal Open Screenshot: [`scenario_5_walkin_modal.png`](file:///home/kiskaadee/Projects/active/armonia/docs/evidence/qa/scenario_5_walkin_modal.png)
- Registered Roster Screenshot: [`scenario_5_walkin_registered.png`](file:///home/kiskaadee/Projects/active/armonia/docs/evidence/qa/scenario_5_walkin_registered.png)
- Reload Screenshot: [`scenario_5_persistence_reload.png`](file:///home/kiskaadee/Projects/active/armonia/docs/evidence/qa/scenario_5_persistence_reload.png)
- Double-Submission Test: Button disabled immediately upon initial click; rapid second click was ignored/blocked. Exactly 1 POST response received.
- Result: Lucía Vega added with `ASISTIÓ` and `PAGADO`. Capacity updated to `3 / 15 (3 presentes)`.
6. **Scenario 6 — 409 Conflict Disambiguation:**
- Case 6A Screenshot: [`scenario_6a_conflict_already_checked_in.png`](file:///home/kiskaadee/Projects/active/armonia/docs/evidence/qa/scenario_6a_conflict_already_checked_in.png)
- API 409 Payload: `{"detail": "This attendee has already checked in."}`
- UI Feedback: Toast notification `"El asistente ya contaba con asistencia registrada"`.
- Case 6B Screenshot: [`scenario_6b_conflict_capacity_reached.png`](file:///home/kiskaadee/Projects/active/armonia/docs/evidence/qa/scenario_6b_conflict_capacity_reached.png)
- API 409 Payload: `{"detail": "El taller ha alcanzado su cupo máximo (2) para esta sesión."}`
- UI Feedback: Explicit error banner inside modal; modal inputs (`Sofía Castro`, `525512345678`) preserved; attendee list unaffected.
7. **Scenario 7 — Network Outage & Actionable Retry:**
- Error Banner Screenshot: [`scenario_7_backend_down_error.png`](file:///home/kiskaadee/Projects/active/armonia/docs/evidence/qa/scenario_7_backend_down_error.png)
- Seamless Recovery Screenshot: [`scenario_7_retry_success.png`](file:///home/kiskaadee/Projects/active/armonia/docs/evidence/qa/scenario_7_retry_success.png)
- UI Behavior: Displays `"No se pudieron cargar los talleres. Verifica tu conexión."` and "Reintentar" button. Upon clicking "Reintentar" after server restart, the session card re-hydrated without browser reload.
8. **Scenario 8 — Mobile Ergonomics & Accessibility:**
- Mobile 375px Roster Screenshot: [`scenario_8_mobile_375px.png`](file:///home/kiskaadee/Projects/active/armonia/docs/evidence/qa/scenario_8_mobile_375px.png)
- Mobile Walk-in Modal Screenshot: [`scenario_8_mobile_modal_375px.png`](file:///home/kiskaadee/Projects/active/armonia/docs/evidence/qa/scenario_8_mobile_modal_375px.png)
- Keyboard Focus Screenshot: [`scenario_8_keyboard_focus.png`](file:///home/kiskaadee/Projects/active/armonia/docs/evidence/qa/scenario_8_keyboard_focus.png)
- Touch Target Dimensions:
- `Registrar Asistencia` button: `313.0px x 44.0px`
- `+ Registrar Asistente Sin Cita` button: `313.0px x 44.0px`
- Cash toggle wrapper (`.cash-toggle-label`): `313.0px x 44.0px`
- Modal Name input (`#walkin-name`): `295.0px x 44.0px`
- Modal Phone input (`#walkin-phone`): `295.0px x 44.0px`
- Modal Email input (`#walkin-email`): `295.0px x 44.0px`
- Modal Cash checkbox label: `295.0px x 44.0px`
- Modal Submit button: `191.8px x 54.0px`
- Modal Cancel button: `93.2px x 54.0px`
- Modal Close button: `44.0px x 44.0px`
- A11y Tree: Toast container has `role="status"` and `aria-live="polite"`.
---
## 6. Console Log Audit & Defect Summary
- **Total Uncaught JavaScript Exceptions:** **0**
- **Console Errors Observed:** Zero uncaught runtime errors.
- **Contract Frictions or Anomalies:** None. The API contracts for quick check-in (`POST /rosters/quick-checkin`) and roster retrieval (`GET /rosters`) match the ratified specification in all respects, including idempotency behavior, cash attribution, capacity enforcement, and date boundary formatting.
---
## 7. QA Verdict & Conclusion
The implementation of the **Group Workshop Roster Quick Check-in** feature on branch `feat/anne/workshop-roster` satisfies 100% of the acceptance criteria defined in `VERIFICATION-PACKET-ROSTER.md` (`AC-1` through `AC-7`).
**Formal QA Verdict: `ALL SCENARIOS PASS` (8 / 8 PASS, 0 FAIL, 0 BLOCKED).**
---
## 8. Phase 4.1 Targeted Regression Addendum
**Execution Date:** 2026-10-27
**Scope:** Targeted live browser DOM regressions for adversarial HTML/XSS input sanitization and out-of-band 409 counter consistency.
### 8.1 Test 1: Adversarial HTML / XSS Input Regression (Live Browser DOM)
- **Test Target:** Walk-In Registration modal form input handling (`#walkin-name`) and DOM projection.
- **Input Payload:** `Lucía <img src=x onerror="window.__xss_triggered=true"> "Vega" & Co.`
- **Phone:** `525598765432`
- **Initial Baseline:** `Ocupación: 2 / 15 (0 presentes)`.
#### Live DOM & Post-F5 Reload Observations
| Checkpoint | Expected Behavior | Live DOM Measurement | Post-F5 Reload Measurement | Verdict |
| :--- | :--- | :--- | :--- | :---: |
| **XSS Breakout Prevention** | `window.__xss_triggered === undefined` (zero script execution) | `null` / `undefined` | `null` / `undefined` | **`PASS`** |
| **HTML Element Injection** | Zero `<img>` elements rendered inside `.roster-attendee-row` | `0` `<img>` tags found | `0` `<img>` tags found | **`PASS`** |
| **Name Text Content** | Exact string preserved via text node assignment | `Lucía <img src=x onerror="window.__xss_triggered=true"> "Vega" & Co.` | `Lucía <img src=x onerror="window.__xss_triggered=true"> "Vega" & Co.` | **`PASS`** |
| **Attribute Escaping** | `.btn-wa-link[aria-label]` intact, not truncated by double quotes | `Contactar a Lucía <img src=x onerror="window.__xss_triggered=true"> "Vega" & Co. por WhatsApp` | `Contactar a Lucía <img src=x onerror="window.__xss_triggered=true"> "Vega" & Co. por WhatsApp` | **`PASS`** |
| **Backend API Invariant** | Direct `GET /rosters` returns exact payload without mutation | `client_name`: exact string stored and returned in JSON | Persistent across server restarts | **`PASS`** |
- **Screenshot Evidence:** [`scenario_9_xss_sanitization.png`](file:///home/kiskaadee/Projects/active/armonia/docs/evidence/qa/scenario_9_xss_sanitization.png)
- **Verdict: `PASS`**.
---
### 8.2 Test 2: Live Out-of-Band 409 Counter Consistency (Single vs. Multi-Mutation)
#### Case 2A: Single Out-of-Band Check-in
1. Session initialized to `Ocupación: 2 / 15 (0 presentes)`.
2. Out-of-band API check-in executed for Elena Gómez (`ADS-1001`, `b1111111-1111-1111-1111-111111111111`).
3. Authoritative server state via `GET /rosters`: `occupied_count: 2, attended_count: 1`.
4. In the open, unrefreshed browser window, user clicked "Registrar Asistencia" on Elena's row.
5. Server returned `HTTP 409 Conflict` (`{"detail": "This attendee has already checked in."}`).
6. **Observed DOM Results:**
- `#capacity-counter-0`: `Ocupación: 2 / 15 (1 presentes)`.
- **Consistency with Server:** **100% Consistent** (`1 presentes` in DOM matches server `attended_count: 1`).
- Elena's row reconciled to `ASISTIÓ` status badge.
- Screenshot Evidence: [`scenario_6a_regression_single_oob.png`](file:///home/kiskaadee/Projects/active/armonia/docs/evidence/qa/scenario_6a_regression_single_oob.png).
- **Verdict: `PASS`**.
#### Case 2B: Concurrent Multi-Attendee Out-of-Band Staleness Check & Re-verification
##### Initial Evaluation (Commit `9191899` - Phase 4.1): `FAIL`
1. Session initialized to `Ocupación: 2 / 15 (0 presentes)`.
2. Out-of-band API check-ins executed for **both** Elena Gómez (`ADS-1001`) AND Carlos Méndez (`ADS-1002`, `paid_cash: true`).
3. Authoritative server state via `GET /rosters`: `occupied_count: 2, attended_count: 2`.
4. In the open, unrefreshed browser window, user clicked "Registrar Asistencia" on Elena's row.
5. Server returned `HTTP 409 Conflict`.
6. **Initial Observed DOM Results:**
- `#capacity-counter-0`: `Ocupación: 2 / 15 (1 presentes)` (diverged from server `attended_count: 2`).
- Carlos Méndez's row: Remained visually stale as `REGISTRADO` with active check-in button and `PENDIENTE` badge.
- Historical Screenshot: [`scenario_6a_regression_multi_oob.png`](file:///home/kiskaadee/Projects/active/armonia/docs/evidence/qa/scenario_6a_regression_multi_oob.png).
7. **Verdict:** **`FAIL`** (Defect: Divergence between post-409 reconciled UI state and authoritative server state; client only performed local isolated increment rather than full authoritative reconciliation).
##### Phase 4.2 Targeted Live Re-verification (Updated Application): `PASS`
Following implementation of full authoritative roster reconciliation on 409 Conflict, Case 2B was re-evaluated under strict, falsifiable pass/fail criteria without pressing `F5` or clicking `Actualizar`:
| Assertion | Verification Checkpoint | Live DOM Measurement | Server Authoritative State | Assertion Verdict |
| :--- | :--- | :--- | :--- | :---: |
| **Assertion 1** | Capacity counter text matches authoritative server count | `Ocupación: 2 / 15 (2 presentes)` | `occupied_count: 2, attended_count: 2` | **`PASS`** |
| **Assertion 2** | Elena's row reflects checked-in state | Badge: `ASISTIÓ`<br/>Button: `✓ Asistió` (disabled) | `attended: true` | **`PASS`** |
| **Assertion 3** | Carlos's row reflects concurrent out-of-band check-in | Badge: `ASISTIÓ`<br/>Badge: `PAGADO`<br/>Button: `✓ Asistió` (disabled) | `attended: true`<br/>`payment_status: "ACKNOWLEDGED"` | **`PASS`** |
- **Re-verification Screenshot:** [`scenario_6a_regression_multi_oob_v2.png`](file:///home/kiskaadee/Projects/active/armonia/docs/evidence/qa/scenario_6a_regression_multi_oob_v2.png)
- **Phase 4.2 Re-verification Verdict:** **`PASS`** (All 3 strict criteria satisfied; zero DOM staleness or counter divergence).
---
### 8.3 Post-Regression Preflight State Restoration
- SQLite test database (`test_armonia.db`) was cleaned and reseeded to the baseline preflight state via `reset_db.py`.
- Final state confirmed: `occupied_count: 2`, `attended_count: 0`, attendees: `ADS-1001` and `ADS-1002`.
Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

@@ -0,0 +1,107 @@
# Primeras Impresiones del Despliegue en Homelab: Retroalimentación de la Operación
**Fecha de Registro:** 20-10-2026
**Contexto:** Despliegue en Homelab (`armonia.roadtotech.me`) como prueba de concepto viva y demostración exploratoria previa a la implementación de Google OAuth y el despliegue distribuido en producción (Google Cloud Run / Cloudflare Pages / Turso DB).
**Fuente:** Intercambio directo y retroalimentación de la asistente de Jazmín tras explorar la demo en vivo de Homelab.
**Propósito:** Documentar observaciones operativas, puntos de fricción y expectativas de usuario, traduciendo la experiencia de uso en requerimientos de ingeniería e historias de usuario ágiles.
---
## Resumen Ejecutivo y Hallazgos Clave
1. **Delegación de Pagos y Verificación en Dos Pasos:** El mayor cuello de botella operativo y de carga mental para Jazmín es el seguimiento y cobro de citas. La asistente puede actuar como primera línea de registro (acreditando comprobantes recibidos), pero el sistema debe ofrecer una **verificación en dos pasos** (*Asistente acredita comprobante* $\to$ *Jazmín concilia contra cuenta bancaria*) sin requerir mensajes constantes de confirmación por WhatsApp.
2. **Ciclo de Vida de Prórrogas y Compromisos:** Otorgar una prórroga de pago sin una alerta automatizada o recordatorio visual en calendario genera incertidumbre respecto a cuentas por cobrar olvidadas.
3. **Expediente e Historial de Sesiones por Paciente:** Concluir una cita y redactar notas debe alimentar un **Expediente del Paciente**, donde Jazmín pueda consultar el historial clínico y notas de sesiones anteriores antes de iniciar futuras consultas.
4. **Accesibilidad del Vocabulario:** La terminología técnica en inglés (como `"Buffer"`) debe reemplazarse por conceptos naturales del consultorio (ej. *"Tiempo de descanso entre sesiones"* o *"Margen entre citas"*).
5. **Redacción de Mensajes de WhatsApp:** Las plantillas de mensajes automáticos y pre-llenados para WhatsApp recibieron excelente recepción por proyectar una imagen profesional y ahorrar tiempo de redacción manual.
---
## Puntos de Fricción Operativa y Brechas Identificadas
Tras analizar la retroalimentación recibida durante la exploración práctica de la demo en vivo, se identificaron brechas claras en el soporte operativo de la plataforma. Las principales áreas de mejora se concentran en:
* **Falta de Seguimiento a Promesas de Pago:** Al otorgar una prórroga de pago a un consultante, el sistema no registra una fecha límite formal con recordatorios proactivos, dependiendo enteramente de la memoria del operador.
* **Separación entre Recepción y Conciliación Bancaria:** Aunque la asistente puede validar rápidamente un comprobante enviado por WhatsApp, la dueña del negocio (Jazmín) no cuenta con una bandeja de auditoría para verificar periódicamente que los fondos se hayan acreditado efectivamente en su banco antes o después de la sesión.
* **Discontinuidad en el Contexto Clínico:** Marcar una cita como completada permite guardar notas, pero no existe una vista de expediente donde Jazmín pueda consultar la evolución histórica y acuerdos de tareas antes de entrar a sesión.
* **Tecnicismos en la Interfaz:** Términos de desarrollo como *"Buffer"* generan confusión en operadores no técnicos.
* **Mezcla de Roles:** Las tareas de recepción y logística (agendar, registrar comprobantes, enlaces de WhatsApp) se mezclan con las funciones del terapeuta/administrador (conciliación bancaria, notas clínicas privadas, métricas), en lugar de presentar vistas diferenciadas por rol.
Para convertir estas observaciones en entregables concretos de ingeniería, cada necesidad se formaliza a continuación como una historia de usuario ágil con criterios de aceptación verificables (BDD/Gherkin) para los próximos ciclos de desarrollo vertical.
---
## Matriz de Síntesis: Necesidad Operativa vs. Requerimiento Técnico
| # | Fricción Operativa | Solución Propuesta | Componente Destino |
|---|--------------------|-------------------|--------------------|
| 1 | Prórrogas olvidadas tras la fecha pactada | Añadir `due_date` y filtro de prórrogas pendientes/vencidas | `armonia-api` / `armonia-dashboard` |
| 2 | Confusión con el término "Buffer" | Renombrar a *"Tiempo de descanso"* / *"Margen entre citas"* | Interfaz de `armonia-dashboard` |
| 3 | Riesgo de comprobantes no válidos / falta de auditoría bancaria | Verificación en 2 pasos: `voucher_received` $\to$ `reconciled` | `armonia-api` (Pagos) y Vista de Dashboard |
| 4 | Historial clínico inaccesible antes de consulta | Expediente del Consultante con cronología de notas | `armonia-dashboard` (`PatientDetailView`) |
| 5 | Mezcla de funciones entre asistente y dueña | Navegación por roles (Recepción Asistente vs. Auditoría Terapeuta) | Permisos y Rutas de `armonia-dashboard` |
---
## Historias de Usuario y Criterios de Aceptación
### Historia 1: Seguimiento a Vencimientos de Prórroga
* **Como:** Operador / Asistente
* **Quiero:** Asignar una fecha límite obligatoria (`due_date`) al registrar una prórroga (`DELAYED_ALLOWED`) y contar con una lista filtrable de prórrogas por vencer o vencidas en el panel
* **Para:** Dar seguimiento oportuno al consultante sin depender de mi memoria ni de apuntes sueltos en papel.
* **Criterios de Aceptación:**
- **Dado** que se registra una cita con modalidad de pago diferido (`DELAYED_ALLOWED`),
- **Cuando** el operador autoriza la prórroga,
- **Entonces** el sistema solicita de forma obligatoria la fecha prometida de pago (`due_date`).
- **Dado** que la fecha actual es igual o posterior a la `due_date` y el pago sigue pendiente,
- **Entonces** la cita se destaca visualmente en una bandeja dedicada de *"Prórrogas por Cobrar"* indicando los días restantes o de retraso.
---
### Historia 2: Verificación de Pagos en Dos Pasos (Acreditación y Conciliación)
* **Como:** Dueña del consultorio (Jazmín)
* **Quiero:** Un flujo de validación en dos etapas (`voucher_received` $\to$ `reconciled` o `voucher_invalid`)
* **Para:** Que mi asistente habilite citas al recibir comprobantes por WhatsApp, mientras yo conservo una vista periódica para auditar que el dinero ingresó formalmente a mi cuenta bancaria.
* **Criterios de Aceptación:**
- **Dado** que un consultante envía su comprobante por WhatsApp,
- **Cuando** la asistente lo valida en ventanilla,
- **Entonces** cambia el estado del pago a `VOUCHER_RECEIVED` (registrando fecha y operador), habilitando la sesión sin requerir la intervención inmediata de Jazmín.
- **Dada** la lista de pagos en estado `VOUCHER_RECEIVED`,
- **Cuando** Jazmín audita su estado de cuenta bancario desde su vista de conciliación,
- **Entonces** puede marcar individualmente cada pago como `RECONCILED` (confirmado) o `VOUCHER_INVALID` (rechazado con nota explicativa).
---
### Historia 3: Expediente del Paciente e Historial de Consultas
* **Como:** Terapeuta principal (Jazmín)
* **Quiero:** Acceder al expediente individual de cada consultante para consultar la cronología de sesiones previas y sus notas clínicas
* **Para:** Recordar antes de cada llamada qué temas se abordaron, qué tareas quedaron asignadas y la evolución del proceso terapéutico.
* **Criterios de Aceptación:**
- **Dada** una cita marcada como completada (`COMPLETED`) con notas de sesión registradas,
- **Cuando** Jazmín hace clic sobre el nombre del paciente en la agenda o lista de citas,
- **Entonces** el sistema abre el expediente del consultante desplegando la cronología completa de citas y notas de consulta.
- **Regla de Privacidad y Confidencialidad:** Las notas clínicas son de acceso exclusivo para el rol `therapist` (Jazmín). El rol `operator` (asistente) solo puede visualizar datos de contacto, citas agendadas y estados de cobranza.
---
### Historia 4: Adaptación del Vocabulario ("Buffer" $\to$ "Tiempo de Descanso")
* **Como:** Operador o administrador del consultorio
* **Quiero:** Leer términos expresados en lenguaje natural de la práctica terapéutica en lugar de tecnicismos en inglés
* **Para:** Evitar dudas conceptuales y agilizar la configuración de servicios y horarios de agenda.
* **Criterios de Aceptación:**
- **Dada** cualquier pantalla de configuración o catálogo de servicios en el panel,
- **Cuando** se visualiza el tiempo de separación entre consultas consecutivas,
- **Entonces** la etiqueta visible debe ser *"Tiempo de descanso entre sesiones"* o *"Margen entre citas"*, omitiendo por completo el término técnico *"Buffer"*.
---
### Historia 5: Navegación Diferenciada por Rol (Asistente vs. Terapeuta)
* **Como:** Asistente operativa (`operator`)
* **Quiero:** Un menú de navegación enfocado exclusivamente en agendamiento, registro de comprobantes y enlaces de WhatsApp
* **Para:** Trabajar en una interfaz limpia, sin distracciones de análisis financiero ni notas clínicas que no corresponden a mi labor.
* **Criterios de Aceptación:**
- **Dada** una sesión activa con rol `operator`,
- **Cuando** visualiza el menú del panel,
- **Entonces** solo tiene acceso a: *Agenda / Calendario*, *Registro de Citas*, *Bandeja de Prórrogas* y *Acreditación de Comprobantes*.
- **Dada** una sesión activa con rol `therapist`,
- **Entonces** se habilitan adicionalmente las secciones de: *Expedientes Clínicos*, *Conciliación Bancaria* y *Reportes Financieros*.
+56 -149
View File
@@ -2,124 +2,32 @@
**Date Recorded:** 2026-10-20 **Date Recorded:** 2026-10-20
**Context:** Homelab deployment to `armonia.roadtotech.me` as a live PoC and exploratory demo before Google OAuth implementation and distributed production deployment (Google Cloud Run / Cloudflare Pages / Turso DB). **Context:** Homelab deployment to `armonia.roadtotech.me` as a live PoC and exploratory demo before Google OAuth implementation and distributed production deployment (Google Cloud Run / Cloudflare Pages / Turso DB).
**Source:** Voice notes from Jazmín's assistant (`WhatsApp Ptt 2026-10-19` & `2026-10-20`) after hands-on testing of the live Homelab demo. **Source:** Direct exchange and feedback from Jazmín's assistant following hands-on exploration of the live Homelab demo.
**Purpose:** Document operational feedback, friction points, and user expectations, translating verbatim observations into actionable engineering requirements and user stories. **Purpose:** Document operational feedback, friction points, and user expectations, translating operator observations into actionable engineering requirements and user stories.
--- ---
## Executive Summary & Core Insights ## Executive Summary & Core Insights
1. **Payment Delegation & Dual-Step Verification:** Jazmín's primary emotional and operational bottleneck is payment tracking and collections. The assistant can act as the intake frontline (registering payment vouchers), but the system must provide a **two-step verification** (Asistente acredita -> Jazmín concilia contra banco) without requiring repetitive WhatsApp back-and-forth. 1. **Payment Delegation & Dual-Step Verification:** Jazmín's primary emotional and operational bottleneck is payment tracking and collections. The assistant can act as the intake frontline (registering payment vouchers), but the system must provide a **two-step verification** (*Assistant acknowledges voucher* $\to$ *Jazmín reconciles against bank account*) without requiring repetitive WhatsApp back-and-forth.
2. **Commitment & Extension (Prórroga) Lifecycle:** Granting an extension without an automated alert or calendar reminder causes high operational anxiety regarding forgotten receivables. 2. **Commitment & Extension (Prórroga) Lifecycle:** Granting an extension without an automated alert or calendar reminder causes high operational anxiety regarding forgotten receivables.
3. **Clinical / Session History per Patient:** Concluding a session and taking notes must feed into a dedicated **Patient Profile** where historical session notes can be reviewed prior to future consultations. 3. **Clinical / Session History per Patient:** Concluding a session and taking notes must feed into a dedicated **Patient Profile** where historical session notes can be reviewed prior to future consultations.
4. **Vocabulary Accessibility:** Technical terminology like `"Buffer"` must be replaced with operational domain terms (e.g., *"Tiempo de descanso entre sesiones"*). 4. **Vocabulary Accessibility:** Technical terminology like `"Buffer"` must be replaced with operational domain terms (e.g., *"Tiempo de descanso entre sesiones"* / Inter-session break time).
5. **WhatsApp Message Framing:** Automated/pre-filled WhatsApp messages received high praise for looking professional and reducing manual typing effort. 5. **WhatsApp Message Framing:** Automated/pre-filled WhatsApp messages received high praise for looking professional and reducing manual typing effort.
--- ---
## Detailed Voice Note Transcripts & Technical Requirements ## Identified Gaps & Operational Friction Points
### 1. 2026-10-19 10:09:21 PM (`WhatsApp Ptt 2026-10-19 at 10.09.21 PM.ogg`) Upon receiving and analyzing client feedback from hands-on testing of the live Homelab demo, we identified key gaps in how the platform supports day-to-day operations. The primary friction points center around payment assurance, commitment tracking, clinical context continuity, and interface terminology:
#### A. Seguimiento y alertas de vencimiento en prórrogas de pago * **Unmonitored Payment Promises:** When the assistant grants a payment extension (*prórroga*), the system does not actively track the agreed deadline. Without proactive reminders, uncollected fees depend entirely on operator memory.
> *"En el caso en que se concede una prórroga, yo no veo... cómo puedo estar pendiente de que se venza esa prórroga. O sea, como que no aparece tipo un calendario o algo así. Por ejemplo, en la que le di prórroga, escribí que se había comprometido para pagar el 30 de este mes. Pero entonces como que no entiendo yo cómo me voy a acordar de que él sí me haya pagado, un ejemplo el primero de noviembre, verificar que sí me haya pagado o no."* * **Payment Intake vs. Bank Audit:** While the assistant can quickly acknowledge payment vouchers received over WhatsApp, the business owner (Jazmín) lacks an audited reconciliation routine to confirm that funds actually cleared the bank account before or after sessions.
* **Discontinuous Session Context:** Marking an appointment as complete allows writing a session note, but there is no patient dossier view where historical consultation notes can be reviewed prior to future sessions.
* **Technical Jargon in Domain Interfaces:** Developer-centric terminology like *"Buffer"* generates confusion for non-technical operators.
* **Role Conflation:** Administrative intake tasks (registering vouchers, WhatsApp links) are mixed with owner responsibilities (bank reconciliation, clinical notes, financial analytics) instead of presenting tailored, role-specific views.
**Key Takeaways & Requirements:** To bridge these operational observations directly into engineering deliverables, each pain point is formalized below as an Agile user story with verifiable acceptance criteria (BDD/Gherkin) for upcoming vertical slices.
- **Observable Debt Lifecycle:** Extensions need explicit structured dates (`due_date`) rather than free-form notes.
- **Engineering Implication:**
- Add `due_date` to payment extension models.
- Create a dashboard filter/widget for "Vencimientos Próximos / Vencidos" to alert the operator when a promised payment date arrives.
#### B. Claridad de vocabulario en interfaz ("Buffer")
> *"Y que no entendí qué significa 'buffer'. No sé, bueno, esa palabra no recuerdo bien qué es lo que representa."*
**Key Takeaways & Requirements:**
- **Cognitive Friction with Technical Jargon:** Developer-centric terminology creates confusion for operators.
- **Engineering Implication:** Replace `"Buffer"` with domain terms like *"Tiempo de descanso"* or *"Margen entre citas"* across all UI labels and tooltips.
#### C. Conciliación bancaria en dos pasos / Verificación de transferencias
> *"Supongamos que la persona me envía el comprobante de pago y yo listo, acredito el pago. Pero yo pienso que igual debe haber un momento en el mes, o varios momentos, en que Jazmín como que vaya y chequee efectivamente que esos pagos sí se hicieron y que tanto no es una imagen que la persona solo me envió y que sea falsa, porque tampoco me imagino yo estarle preguntando cada vez que alguien pague, porque si no qué sentido tendría como que estar ayudándola o asistiéndola... Veo que sale como para poner la nota, pero no sé si hay una manera como de ver todas las citas ya supuestamente pagadas (se hayan tomado o no) que fueron por transferencia y que ella pueda ir a checar de si se transfirió, si llegó, o como darle un ok, un segundo chequeo."*
**Key Takeaways & Requirements:**
- **Dual-State Payment Workflow:** Assistants verify receipt vouchers; owner verifies actual bank settlement.
- **Engineering Implication:**
- Transition payment status from boolean to state machine: `pending` -> `voucher_received` (operator accredited) -> `reconciled` (owner bank verified).
- Dedicated "Conciliación Bancaria" view listing all transfer-based payments awaiting owner audit.
---
### 2. 2026-10-19 10:11:51 PM (`WhatsApp Ptt 2026-10-19 at 10.11.51 PM.ogg`)
#### Diferenciación de roles y escalamiento (Asistente vs. Jazmín)
> *"Bueno, y vi que existe como mi perfil de ASU [asistente], entonces yo me imaginé si de pronto eso último que acabo de decir se podía hacer como desde otro perfil o algo así... como cuando uno escala algo a un superior en un call center, algo así."*
**Key Takeaways & Requirements:**
- **Role-Based Views (RBAC):** Operator interface focuses on booking and receipt registration; Owner interface focuses on reconciliation, financial reporting, and clinical notes.
- **Engineering Implication:** Enforce role views (`operator` vs `therapist/admin`) in dashboard routing and permissions.
---
### 3. 2026-10-19 10:15:08 PM (`WhatsApp Ptt 2026-10-19 at 10.15.08 PM.ogg`)
#### Perfil de paciente e historial de notas de consulta
> *"Por ejemplo concluí una cita —me imagino que ese botón significa que ya la paciente tomó la cita— y pues dejé como una nota. Entonces luego quise ir al perfil de la paciente, pero no abre como que un perfil de paciente como para ver esa nota que había dejado, cosa que ella [Jazmín] pudiese como dejar notas de cada paciente y así antes de conectarse a la llamada pues pueda ver en qué quedaron o qué venían trabajando, como un historial del paciente o algo así sería demasiado chimba tener... Porque a veces como consultante uno espera que el psicólogo se acuerde de todo... entonces tenerlo en el mismo sistema sería muy chimba."*
**Key Takeaways & Requirements:**
- **Session Notes Continuity:** Clicking a patient must open a dossier with session history and past notes.
- **Engineering Implication:**
- Build `PatientDetailView` / Client Dossier showing past appointments, notes timeline, and payment history.
- Privacy boundary: Clinical consultation notes should only be readable by Jazmín (`therapist`), not regular operators.
---
### 4. 2026-10-19 10:17:47 PM (`WhatsApp Ptt 2026-10-19 at 10.17.47 PM.ogg`)
#### Plantilla y redacción de mensajes de WhatsApp
> *"También corrí con la suerte de que pude programar una cita justo con un perfil que tenía el número de Jazmín (número válido en WhatsApp). Entonces vi cómo plantea el mensaje y me encantó... quedó muy pro."*
**Key Takeaways & Requirements:**
- **High User Satisfaction:** The automated WhatsApp booking confirmation message meets professional standards and eliminates manual drafting effort.
- **Engineering Implication:** Maintain the current message template structure; consider configurable variables (e.g. video link, payment instructions) for future iterations.
---
### 5. 2026-10-19 10:29:32 PM (`WhatsApp Ptt 2026-10-19 at 10.29.32 PM.ogg`)
#### Dudas de arquitectura / Servidor vs. Front-end y costos
> *"Solo para corroborar que entendí bien: tanto este servidor (no sé cómo llamarlo, página) como una página web serían gratuitas, pero lo que sí es un servidor no lo entiendo bien cómo se tiene... si yo no tengo encendido el computador cómo funciona, si eso sí habría que pagarlo... Pero en verdad sí suena como que es una súper herramienta..."*
**Key Takeaways & Requirements:**
- **Mental Model of Cloud Hosting:** Need clear, non-technical onboarding explaining cloud deployment (running 24/7 in Google Cloud / Cloudflare without requiring their personal laptops to stay on).
---
### 6. 2026-10-19 10:29:49 PM (`WhatsApp Ptt 2026-10-19 at 10.29.49 PM.ogg`)
#### Modelo comercial / Comisión
> *"Yo no sé, un 10%... Bueno, vamos a ver qué hablamos mañana."*
**Key Takeaways & Requirements:**
- **Assistant Compensation Structure:** Assistant contemplates compensation based on ~10% operational commission. Financial reporting could later surface gross receipts for easy commission calculation.
---
### 7. 2026-10-20 03:47:25 PM (`WhatsApp Ptt 2026-10-20 at 3.47.25 PM.ogg`)
#### Alcance de la demostración para la cliente (MVP vs. Producto terminado)
> *"Por eso me estaba sintiendo así de hoy qué le muestro, qué quiero hablar con Andrés, porque no es como que tenemos que tener todo listo..."*
**Key Takeaways & Requirements:**
- **Expectation Management:** Clearly delineate demo capabilities so Jazmín evaluates core booking/payment flow without expecting complete historical data migration on day one.
---
### 8. 2026-10-20 03:51:03 PM (`WhatsApp Ptt 2026-10-20 at 3.51.03 PM.ogg`)
#### Dolor operativo clave del cliente (Tercerización de cobranzas y pagos)
> *"La segunda [razón] es pues que yo sé que ella se siente así como que: 'ay, ya quiero dejar yo de manejar lo de los pagos y como poderlo tercerizar'..."*
**Key Takeaways & Requirements:**
- **Core Value Proposition:** Offloading collections and payment verification from the therapist to the assistant is the single biggest value driver for adopting the software.
--- ---
@@ -127,74 +35,73 @@
| # | Operational Friction | Proposed Solution | Target Component | | # | Operational Friction | Proposed Solution | Target Component |
|---|----------------------|-------------------|------------------| |---|----------------------|-------------------|------------------|
| 1 | Prórrogas forgotten after commitment date | Add `due_date` & filter for pending/expired extensions | `armonia-api` / `armonia-dashboard` | | 1 | Payment extensions forgotten after commitment date | Add `due_date` & filter for pending/expired extensions | `armonia-api` / `armonia-dashboard` |
| 2 | "Buffer" term confusion | Rename to *"Tiempo de descanso"* / *"Margen entre citas"* | `armonia-dashboard` UI copy | | 2 | "Buffer" term confusion | Rename to *"Tiempo de descanso"* / *"Margen entre citas"* | `armonia-dashboard` UI copy |
| 3 | Payment fraud risk / lack of bank audit | 2-step verification: `voucher_received` -> `reconciled` | `armonia-api` (Payments) & Dashboard View | | 3 | Payment fraud risk / lack of bank audit | 2-step verification: `voucher_received` -> `reconciled` | `armonia-api` (Payments) & Dashboard View |
| 4 | Clinical history inaccessible prior to session | Client Dossier with consultation notes timeline | `armonia-dashboard` (`PatientDetailView`) | | 4 | Clinical history inaccessible prior to session | Client Dossier with consultation notes timeline | `armonia-dashboard` (`PatientDetailView`) |
| 5 | Role confusion between operator & owner | Role-based routing (Operator Intake vs Owner Audit) | `armonia-dashboard` Auth & Navigation | | 5 | Role confusion between operator & owner | Role-based routing (Operator Intake vs Owner Audit) | `armonia-dashboard` Auth & Navigation |
--- ---
## User Stories & Acceptance Criteria ## User Stories & Acceptance Criteria
### Story 1: Tracking Payment Extension Deadlines (Prórrogas con Fecha Límite) ### Story 1: Tracking Payment Extension Deadlines (Prórrogas)
* **As an:** Operador / Asistente * **As an:** Intake Operator / Assistant
* **I want to:** Asignar una fecha de compromiso de pago (`due_date`) al registrar una prórroga (`DELAYED_ALLOWED`) y ver una lista filtrable de prórrogas por vencer o vencidas en el dashboard * **I want to:** Assign a mandatory commitment deadline (`due_date`) when granting an authorized payment extension (`DELAYED_ALLOWED`), and view a filterable queue of pending/overdue extensions in the dashboard
* **So that:** Pueda dar seguimiento puntual al consultante sin depender de mi memoria o de notas manuales en papel. * **So that:** I can follow up proactively with clients on promised payments without relying on memory or disconnected manual notes.
* **Acceptance Criteria:** * **Acceptance Criteria:**
- **Given** una cita en estado `RESERVED` con modalidad de pago diferido (`DELAYED_ALLOWED`), - **Given** an appointment in `RESERVED` status with delayed payment modality (`DELAYED_ALLOWED`),
- **When** el operador registra la excepción, - **When** the operator authorizes the extension,
- **Then** el sistema exige ingresar una `due_date` (fecha prometida de pago) obligatoria. - **Then** the system requires entering a mandatory promised payment date (`due_date`).
- **Given** que la fecha actual es igual o posterior a la `due_date` y el pago sigue pendiente, - **Given** that the current date is on or after `due_date` and payment remains pending,
- **Then** la cita se resalta visualmente en una vista dedicada *"Prórrogas por cobrar"* con indicador de días restantes o días de retraso. - **Then** the appointment is highlighted visually in a dedicated "Pending Collections / Prórrogas" queue, displaying days remaining or days overdue.
--- ---
### Story 2: Two-Step Payment Verification & Audit (Acreditación y Conciliación Bancaria) ### Story 2: Two-Step Payment Verification & Audit (Voucher Acknowledgment & Bank Reconciliation)
* **As an:** Dueña del negocio (Jazmín) * **As a:** Practice Owner (Jazmín)
* **I want to:** Disponer de un flujo de verificación en dos pasos (`voucher_received` -> `reconciled` o `voucher_invalid`) * **I want to:** Implement a two-step payment workflow (`voucher_received` -> `reconciled` or `voucher_invalid`)
* **So that:** Mi asistente pueda habilitar citas al recibir comprobantes de WhatsApp, mientras yo mantengo una vista periódica para auditar que el dinero realmente ingresó a mi cuenta de banco. * **So that:** My assistant can unblock and confirm sessions upon receiving WhatsApp transfer vouchers, while I retain a dedicated routine to audit and confirm that funds actually cleared the bank account.
* **Acceptance Criteria:** * **Acceptance Criteria:**
- **Given** un consultante que envía su comprobante por WhatsApp, - **Given** a client who sends a transfer receipt voucher via WhatsApp,
- **When** el operador lo valida, - **When** the operator validates it at intake,
- **Then** marca el estado del pago como `VOUCHER_RECEIVED` (registrando operador y hora), habilitando la sesión sin requerir la intervención inmediata de Jazmín. - **Then** the payment status transitions to `VOUCHER_RECEIVED` (logging operator ID and timestamp), clearing the appointment to proceed without requiring immediate owner sign-off.
- **Given** una lista de pagos en estado `VOUCHER_RECEIVED`, - **Given** a list of payments in `VOUCHER_RECEIVED` status,
- **When** Jazmín revisa su estado de cuenta bancario desde su vista de auditoría, - **When** Jazmín reviews bank statement deposits from her audit dashboard,
- **Then** puede marcar individualmente cada pago como `RECONCILED` (confirmado) o `VOUCHER_INVALID` (rechazado con nota explicativa). - **Then** she can individually mark each payment as `RECONCILED` (settled) or `VOUCHER_INVALID` (rejected with a mandatory note).
--- ---
### Story 3: Patient Dossier & Consultation History (Historial de Notas por Paciente) ### Story 3: Patient Dossier & Consultation History
* **As a:** Terapeuta principal (Jazmín) * **As a:** Principal Therapist (Jazmín)
* **I want to:** Acceder al perfil o expediente del consultante para revisar el historial cronológico de citas pasadas y sus notas de sesión * **I want to:** Open an individual client dossier showing chronological consultation history and session notes
* **So that:** Antes de iniciar cada consulta sepa exactamente qué temas se trabajaron, qué tareas quedaron pendientes y cuál ha sido la evolución del paciente. * **So that:** Prior to each call, I can review past discussion topics, pending homework assignments, and treatment progress.
* **Acceptance Criteria:** * **Acceptance Criteria:**
- **Given** que una cita se marca como `COMPLETED` con una nota de sesión registrada, - **Given** an appointment marked as `COMPLETED` with session notes recorded,
- **When** Jazmín hace clic en el nombre del paciente en el calendario o lista de citas, - **When** Jazmín clicks on the client's name from the calendar or appointment table,
- **Then** el sistema navega a la vista de detalle del consultante mostrando la cronología de todas sus sesiones y notas. - **Then** the system opens the Client Dossier displaying the full historical timeline of appointments and session notes.
- **Security / Privacy Rule:** Las notas clínicas de sesión solo son legibles y editables por el rol `therapist` (Jazmín). El rol `operator` (asistente) solo puede visualizar datos demográficos, citas agendadas y estado de pagos. - **Privacy Boundary Rule:** Clinical consultation notes are strictly confidential and restricted to the `therapist` role. The `operator` (assistant) role can only view contact details, scheduled appointments, and payment statuses.
--- ---
### Story 4: Terminology Localization ("Buffer" -> "Tiempo de Descanso") ### Story 4: Terminology Localization ("Buffer" -> "Break Time / Interval")
* **As an:** Operador o administrador del consultorio * **As a:** Practice Operator / Administrator
* **I want to:** Leer términos en lenguaje natural del dominio terapéutico en lugar de tecnicismos en inglés * **I want to:** View natural clinical domain terminology rather than English developer jargon
* **So that:** La curva de aprendizaje sea nula y no exista confusión conceptual durante la configuración de servicios y agendas. * **So that:** Onboarding is frictionless and scheduling intervals between consecutive sessions are immediately understood.
* **Acceptance Criteria:** * **Acceptance Criteria:**
- **Given** cualquier vista de configuración o detalle de servicios en el dashboard, - **Given** any service configuration or scheduling view in the dashboard,
- **When** se presenta el intervalo de separación entre consultas, - **When** the separation interval between consecutive appointments is displayed,
- **Then** el texto mostrado debe ser *"Tiempo de descanso entre sesiones"* o *"Margen entre citas"*, eliminando por completo la palabra técnica *"Buffer"*. - **Then** the interface label must read *"Tiempo de descanso entre sesiones"* or *"Margen entre citas"* (Break time / Inter-session interval), completely removing the technical term *"Buffer"*.
--- ---
### Story 5: Role-Based Dashboard Navigation (Separación de Vistas Asistente vs. Terapeuta) ### Story 5: Role-Based Dashboard Navigation (Operator vs. Therapist Views)
* **As an:** Asistente operativo (`operator`) * **As an:** Operations Assistant (`operator`)
* **I want to:** Tener un menú de navegación simplificado enfocado en agendamiento, registro de comprobantes y enlaces de WhatsApp * **I want to:** Access a streamlined navigation menu focused exclusively on scheduling, voucher intake, and WhatsApp communication
* **So that:** Mi interfaz sea ágil, libre de ruido analítico o clínico, y escale la conciliación bancaria a Jazmín. * **So that:** My daily workspace is fast, uncluttered by financial metrics or clinical records that fall outside my duties.
* **Acceptance Criteria:** * **Acceptance Criteria:**
- **Given** una sesión iniciada con rol `operator`, - **Given** an active session authenticated as `operator`,
- **When** navega por el dashboard, - **When** viewing the dashboard menu,
- **Then** solo ve módulos de: *Agenda / Calendario*, *Registro de Citas*, *Bandeja de Prórrogas*, y *Acreditación de Comprobantes*. - **Then** navigation is limited to: *Calendar / Schedule*, *Book Appointment*, *Extensions Queue*, and *Voucher Intake*.
- **Given** una sesión iniciada con rol `therapist`, - **Given** an active session authenticated as `therapist`,
- **Then** se habilitan adicionalmente: *Expedientes Clínicos*, *Conciliación Bancaria*, y *Métricas Financieras*. - **Then** the navigation additionally exposes: *Client Dossiers*, *Bank Reconciliation*, and *Financial Analytics*.
+104
View File
@@ -0,0 +1,104 @@
---
type: plan
status: ratified
project: armonia-dashboard
pilot: group-workshop-roster
date: 2026-10-26
tags: [collaboration-plan, pilot, governance, anne-droid, qa]
---
# Project Collaboration Plan: Group Workshop Roster Pilot
> **Status:** Ratified Operating Contract (Gates 1 & 2 Approved)
> **Target System:** `armonia-dashboard`
> **Pilot Simplification Note:** For this pilot, the Orchestrator synthesizes both the requirements and the UX proposal. This is a deliberate pilot simplification to test the workflow without premature agent proliferation; it does **not** demonstrate that Requirements Engineering and UX Design are interchangeable in the permanent agency architecture.
---
## 1. Active Role Roster & Authority Boundaries
```mermaid
sequenceDiagram
autonumber
actor PO as Project Owner
participant ORCH as Orchestrator
participant ANNE as Anne Droid (Frontend)
participant QA as Independent QA
PO->>ORCH: 1. Approve Collaboration Plan & Spec Contract
ORCH->>ANNE: 2. Delegate approved spec + API contract
Note over ANNE: Worktree: ../armonia-dashboard-anne-roster<br/>Implements views, styles, unit tests<br/>Documents contract friction if blocked
ANNE->>ORCH: 3. Open Draft PR & Freeze Anne Self-Audit
Note over ORCH,QA: Information Barrier: QA has ZERO access<br/>to Anne's code diff, PR text, or self-audit
ORCH->>QA: 4. Dispatch Running URL + Verification Packet ONLY
Note over QA: Executes Scenarios 1 to 8<br/>Verifies UI, persistence (F5), a11y, mobile
QA->>ORCH: 5. Submit QA Evidence Scorecard (Pass/Fail per AC)
ORCH->>PO: 6. Present PR Diff + Anne Audit + QA Scorecard
alt All Criteria Pass & Evidence Verified
PO->>ANNE: 7a. Authorize PR Merge into main
else Defects / Gaps Detected
PO->>ORCH: 7b. Issue Revision Directive (routed per Escalation Protocol)
end
```
| Role | Operational Scope for This Pilot | Autonomous Authority | Strict Boundary / Prohibited |
| :---------------------------- | :------------------------------------------------------------------------------------------------------------ | :-------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------- |
| **Project Owner** | Final business authority, requirement sign-off, risk acceptance, conflict adjudication, and release approval. | All consequential product and architectural decisions. | N/A |
| **Orchestrator** | Synthesizes specification; monitors handoffs; verifies precondition gates; routes escalation friction. | Workflow sequencing, contract packaging, QA test dispatching. | **Cannot** modify acceptance criteria, relax invariants, waive QA defects, or approve PR merges. |
| **Anne Droid (Frontend)** | Implements frontend views, styles, and component tests against the approved contract. | Component modularity, state architecture, styling tokens, local unit tests, implementation decomposition, and commit sequencing. | **Cannot** commit to `main`, modify business logic, silently mock API endpoints, merge PRs, or **modify/refactor existing working features outside the assigned scope**. |
| **Independent QA Specialist** | Validates running application against acceptance criteria using the Verification Packet. | Pass/Fail/Blocked verdicts per criterion backed by browser evidence. | **Cannot** waive acceptance criteria, inspect Anne's code/self-audit, or make release decisions. |
### 1.1 Scope Containment & Non-Regression Invariant
When tasked with implementing a new feature (Feature C, e.g. Workshop Roster):
1. **Preserve Existing Capabilities**: Existing views and features (Features A and B: Follow-up Queue, Daily Agenda, Client Directory, Nueva Cita modal) must continue to function without behavioral, visual, or test regressions. All existing test suites (`pnpm exec vp test`) must pass 100%.
2. **Beyond Automated Tests (Targeted Workflow Checks)**: Because existing automated tests may not cover every edge in Queue or Agenda, Anne's self-audit must execute targeted smoke checks of those existing workflows (e.g. verifying that the 48h queue loads and the Nueva Cita modal still opens without errors).
3. **Additive Isolation & Justified Integration**: Feature C must reside in dedicated, isolated files (e.g., `src/components/WorkshopRoster.ts`). Edits to shared integration points (`main.ts`, `api.ts`, `types.ts`, `style.css`) should be strictly additive by default. If an unavoidable non-additive integration edit is required, Anne must document and justify it in her frozen self-audit.
4. **No Opportunistic Refactoring**: Anne is strictly prohibited from rewriting, reorganizing, or reformatting existing working components unless explicitly instructed by the Specification Contract.
5. **Self-Audit Regression Gate**: Anne's frozen self-audit must explicitly prove that existing tabs still render correctly and that the git diff is tightly bounded to the assigned feature.
### 1.2 Incremental Implementation & Commit Discipline
Anne Droid owns the decomposition of the approved feature specification into coherent implementation increments. The Project Owner defines the required outcomes and acceptance criteria; the Orchestrator does not prescribe the implementation task sequence unless a specific dependency, risk, or contract constraint requires intervention.
1. **Engineer-Owned Decomposition**: Before writing code, Anne identifies a practical sequence of implementation increments based on the approved contract and existing architecture. The sequence is an engineering breakdown, not a source of new product requirements. Missing requirements or consequential scope changes must be escalated rather than resolved through implementation planning alone.
2. **Coherent Incremental Commits**: Anne commits completed increments as work progresses. Each commit must have a clear purpose, a reviewable diff, and a Conventional Commit message describing the change (e.g., `feat(roster): add API client and roster types`, `feat(roster): implement session card and capacity indicators`). Commits must reflect genuine progress rather than arbitrary file boundaries or retrospective subdivision of a completed feature.
3. **Intermediate Integrity**: Each commit should leave the branch in a coherent state and pass the checks relevant to its changes (`pnpm exec biome check .`, `vp check`). The completed feature must pass the full required test suite. Any temporary intermediate limitation must be intentional, documented in commit notes, and resolved before the PR is submitted for review.
4. **Scope and Regression Boundaries**: Incremental commits do not authorize opportunistic refactoring or unrelated behavior changes. Changes to existing features and shared integration points remain subject to the Scope Containment & Non-Regression Invariant.
5. **Traceability and Review**: Anne's frozen self-audit must summarize the implementation increments, map commits to acceptance criteria, explain any justified deviations from the initial breakdown, and document any known limitations. The Orchestrator may flag incoherent commits, excessive unrelated changes, or gaps in traceability, but may not dictate implementation details solely to enforce a preferred task sequence.
6. **Integrated Verification**: Commit-level checks do not replace feature-level acceptance testing or independent QA. The complete pull request remains subject to the approved Specification Contract, Verification Packet, regression requirements, and Project Owner's release decision.
### 1.3 Clarification on QA Failure Routing & Final Acceptance
- **QA owns its findings and supporting evidence**, not the release decision.
- If QA reports a failure on an acceptance criterion, the Orchestrator routes the defect back to Anne (for an implementation bug) or to the relevant specialist (for an API or requirement flaw).
- **The Orchestrator cannot waive a failure or convert a failed acceptance criterion into a pass.** Only the Project Owner has the authority to relax a requirement, accept a known risk, or authorize a PR merge.
---
## 2. Phase-by-Phase Handoff Matrix
| Phase | Acting Role | Required Input | Produced Output | Approval Gatekeeper |
| :------------------------------------ | :----------------------------------------- | :------------------------------------------- | :----------------------------------------------------------- | :------------------------------------------------ |
| **Phase 1: Operating Model** | Orchestrator | Pre-experiment baseline snapshot | `COLLABORATION-PLAN.md` | **Project Owner** (Signs off on roles) |
| **Phase 2: Contract Formulation** | Orchestrator (Requirements + UX synthesis) | API schema, M4 roadmap scope | `SPEC-WORKSHOP-ROSTER.md` + `VERIFICATION-PACKET-ROSTER.md` | **Project Owner** (Approves criteria & test data) |
| **Phase 3: Implementation** | Anne Droid | Approved spec + running API | `feat/anne/workshop-roster` PR + frozen `anne-self-audit.md` | **Anne Droid** (Freezes self-audit prior to QA) |
| **Phase 4: Independent Verification** | QA Specialist | Running build URL + Verification Packet ONLY | `qa-evidence-scorecard.md` | **QA Specialist** (Signs off on test evidence) |
| **Phase 5: Release & Post-Mortem** | Project Owner | PR diff + Anne Audit + QA Scorecard | Merge decision + Pilot evaluation log | **Project Owner** (Decides merge / rework) |
---
## 3. Explicit Change & Escalation Protocol
If any specialist encounters a blocking condition or contradiction, work halts at that boundary and routes strictly according to problem type:
```mermaid
flowchart LR
BLOCK["Friction Encountered"] --> CAT{Classify Problem}
CAT -->|"Contradictory / Missing Business Rule"| REQ["Orchestrator / Requirements"]
CAT -->|"Unworkable Interaction Flow"| UX["Orchestrator / UX"]
CAT -->|"API Schema Defect / Backend 500"| BE["Backend Owner / Issue Tracker"]
CAT -->|"Implementation Bug"| ANNE["Anne Droid (Worktree)"]
CAT -->|"Ambiguous / Broken Test Criterion"| QA["Requirements + QA Specialist"]
CAT -->|"Scope Trade-off or Scope Relaxation"| PO["Project Owner (Human Decision)"]
```
1. **API Friction Rule**: Anne must record a structured **Contract Friction Notice** on the PR rather than silently creating synthetic mock data or changing expected response shapes.
2. **Owner Escalation Rule**: Any trade-off affecting user workflows (e.g. omitting walk-in check-ins due to API constraints) requires an explicit choice from the Project Owner.
+193
View File
@@ -0,0 +1,193 @@
---
type: plan
role: specification-contract
status: approved
project: armonia-dashboard
feature: workshop-roster-checkin
milestone: M4
date: 2026-10-26
tags: [spec, frontend, requirements, ux, armonia-dashboard]
---
# Specification Contract: Group Workshop Roster Quick Check-in
> **Status:** Ratified Implementation Contract (Gate 2 Approved)
> **Contract Authority:** Binding implementation contract for `armonia-dashboard`.
> **Engineering Boundary:** This specification defines *what* the operator must accomplish and *how* states behave. The component breakdown, DOM composition, and styling implementation belong to Anne Droid's engineering judgment. Implementation must be strictly additive and isolated; existing features (Follow-up Queue, Daily Agenda, Client Directory, Nueva Cita) must remain undisturbed and 100% passing.
---
## 1. Domain Context & User Goals
In Armonía del Ser, group services (e.g., *Círculo de Cacao Presencial*, *Meditación con Cuencos*) take place with multiple attendees (up to 12–25 capacity).
**The Operator's Goal:**
On the day of the workshop, Jasmin or her assistant stands at reception. As participants arrive, the operator needs a mobile-first, high-density view to:
1. Confirm which group workshop session is active today and review capacity metrics.
2. Rapidly record digital attendance (1-tap check-in marking attendance and completing the booking).
3. Identify payment state at a glance: identify who is pre-paid (`PAGADO` via SPEI) versus who must pay on arrival (`PENDIENTE`).
4. Collect cash on-site and acknowledge payment in the same 1-tap check-in action.
5. Register and check in unexpected walk-in attendees without disrupting the session flow.
---
## 2. Precise Semantic Definitions & Status Mapping
### 2.1 The Two Workshop Counters
```
┌────────────────────────────────────────────────────────────────────────┐
│ Workshop Counter Semantics │
├─────────────────────┬──────────────────────────────────────────────────┤
│ Metric │ Business Meaning & Mutation Rules │
├─────────────────────┼──────────────────────────────────────────────────┤
│ occupied_count │ Total participants holding an active spot │
│ │ (status: RESERVED, COMPLETED, NO_SHOW). │
│ │ • Advance booking created: count increments. │
│ │ • Existing attendee checks in: count UNCHANGED. │
│ │ • Walk-in attendee registers: count increments. │
├─────────────────────┼──────────────────────────────────────────────────┤
│ attended_count │ Participants physically present & verified │
│ │ (booking_status: COMPLETED, attended: true). │
│ │ • Existing attendee checks in: count increments. │
│ │ • Walk-in attendee registers: count increments. │
└─────────────────────┴──────────────────────────────────────────────────┘
```
- **Capacity Display**: Formatted as `Ocupación: {occupied_count} / {max_capacity} ({attended_count} presentes)`.
- **409 Conflict Disambiguation & Reconciliation Contract**:
The backend issues `HTTP 409 Conflict` in two distinct business scenarios, verified against pinned backend commit `d9c86e27d926` in `armonia-api/app/routers/rosters.py`. The client must inspect `response.detail` (or error payload):
1. *Already Checked-In Conflict (`detail: "This attendee has already checked in."`)* (`app/routers/rosters.py#L196`): Indicates an idempotent duplicate submission. The client must reconcile by updating the attendee row to `ASISTIÓ`, disabling the check-in button, and showing an informative status toast (*"El asistente ya contaba con asistencia registrada"*). The client must never crash or treat this as a failed/unregistered state.
2. *Capacity Exceeded Conflict (`detail: "El taller ha alcanzado su cupo máximo ({max_cap}) para esta sesión."`)* (`app/routers/rosters.py#L332`): Occurs during walk-in registration when `occupied_count >= max_capacity`. The client must detect the capacity message (e.g. matching `cupo máximo`), display an explicit capacity error alert (*"El taller ha alcanzado su cupo máximo (15) para esta sesión"*), keep the modal form state intact for operator decision, and **never** optimistically increment attendance or report success.
- **Ordinary Network / 500 Failure**: Preserve the current UI state, do not change attendee status, and allow the operator to retry.
- **Technical Debt & Future Contract Note**: String matching on `response.detail` is a pilot accommodation to preserve backend immutability on `armonia-api`. A future M5 ADR will introduce structured machine-readable error codes (e.g. `{"error_code": "ATTENDEE_ALREADY_CHECKED_IN"}`).
### 2.2 Status Terminology Mapping Table
To prevent ambiguity between UI labels and backend persistence, all badge renderings must adhere to this mapping:
| UI Badge / Label | Visual Styling | Backend Entity | Persisted Status Field & Value |
| :--- | :--- | :--- | :--- |
| **`REGISTRADO`** | Slate/Neutral Pill | `Booking` | `booking_status: "RESERVED"`, `attended: false` |
| **`ASISTIÓ`** | Emerald/Green Pill | `Booking` | `booking_status: "COMPLETED"`, `attended: true` |
| **`PAGADO`** | Emerald/Green Pill | `Booking` & `Payment` | `payment_status: "ACKNOWLEDGED"` |
| **`PENDIENTE`** | Amber/Orange Pill | `Booking` | `payment_status: "AWAITING_ACKNOWLEDGMENT"` |
---
## 3. Resilient Error-Recovery Contract (The 5 States)
Every interactive view in this feature must explicitly handle the 5 states:
```mermaid
stateDiagram
[*] --> Loading: Switch to #rosters tab
Loading --> Empty: GET /rosters returns []
Loading --> Error_Roster: GET /rosters fails (Network/500)
Loading --> Roster_Ready: GET /rosters returns sessions
Error_Roster --> Loading: Tap "Reintentar"
Empty --> Loading: Change date picker
Roster_Ready --> Action_In_Flight: Tap Check-in or Submit Walk-in
Action_In_Flight --> Action_Error: POST fails (Timeout/Network)
Action_In_Flight --> Roster_Ready: POST succeeds (HTTP 200) -> Toast
Action_Error --> Roster_Ready: Toast error; row stays uncommitted
```
1. **Loading State**: Render skeleton placeholder cards for workshop sessions and attendee rows. Layout shift (CLS) must remain $\le 0.05$.
2. **Empty State**: If no group sessions exist for the selected date, display:
> *"No hay talleres grupales programados para esta fecha."*
The date selector remains interactive so the operator can navigate to adjacent days.
3. **Failed Roster Retrieval (Error with Retry)**: If `GET /rosters` fails (network down or server error), display an inline error banner:
> *"No se pudieron cargar los talleres. Verifica tu conexión."*
Accompanied by an explicit `<button class="btn btn-secondary">Reintentar</button>` that re-triggers the fetch without a full page reload.
4. **Action Failure & Conflict Recovery**:
- *Already-Checked-In Conflict (409)*: If the server reports the attendee is already checked in, the client reconciles state by updating the row to `ASISTIÓ`, disabling check-in, and displaying an informative notice (*"El asistente ya contaba con asistencia registrada"*).
- *Capacity Reached Conflict (409)*: If a walk-in is rejected because the session is full, the client reports the capacity limit (*"El taller ha alcanzado su cupo máximo"*), leaves the form open for operator decision, and does not record attendance.
- *Network / Server Error (5xx / Timeout)*: The client displays an accessible error toast, preserves the uncommitted attendee row state (no optimistic toggle), and keeps the action button enabled for immediate retry.
5. **Success Feedback State**: Upon successful check-in or walk-in:
- Immediate visual feedback on the row (`ASISTIÓ` badge).
- Display an accessible toast container equipped with `role="status"` and `aria-live="polite"` announcing: *"Asistencia registrada con éxito."*
---
## 4. Explicit Acceptance Criteria (AC)
### `AC-1`: Workshop Session Selection & Capacity Overview
- **Given** the operator navigates to the "Talleres" tab (URL hash `#rosters`),
- **When** the view loads for the selected date (default: today),
- **Then** it queries `GET /rosters?date_from=YYYY-MM-DD&date_to=YYYY-MM-DD`.
- **And** it displays the group session title, scheduled time, and a capacity counter formatted as `Ocupación: {occupied_count} / {max_capacity} ({attended_count} presentes)`.
### `AC-2`: Attendee Roster Display & Status Indicators
- **Given** an active workshop session with registered attendees,
- **When** the session roster renders,
- **Then** each attendee row displays: Client Name, Phone, Booking Code (`ADS-XXXX`), Attendance Status (`REGISTRADO` vs. `ASISTIÓ`), and Payment Status (`PAGADO` vs. `PENDIENTE`).
- **And** includes a 1-tap `wa.me` link pre-populated with the attendee's phone.
### `AC-3`: Existing Booking Check-in (Pre-paid)
- **Given** an attendee with `booking_status: "RESERVED"` and `payment_status: "ACKNOWLEDGED"`,
- **When** the operator taps the "Registrar Asistencia" button,
- **Then** the client sends `POST /rosters/quick-checkin` with payload `{"booking_id": "<id>", "paid_cash": false}`.
- **And** upon HTTP 200, the row immediately updates to `ASISTIÓ`, the check-in button disables, and `attended_count` increments by 1.
### `AC-4`: Existing Booking Check-in with Cash Payment Acknowledgment
- **Given** an attendee with `payment_status: "AWAITING_ACKNOWLEDGMENT"`,
- **When** the operator taps check-in with "Cobro en efectivo recibido" checked,
- **Then** the client sends `POST /rosters/quick-checkin` with payload `{"booking_id": "<id>", "paid_cash": true, "notes": "Cobro en puerta"}`.
- **And** upon HTTP 200, the row reflects both `ASISTIÓ` and `PAGADO` (`ACKNOWLEDGED`), and `attended_count` increments by 1 without full page reload.
### `AC-5`: Walk-in Attendee Quick Registration & Check-in
- **Given** an unregistered participant arrives at the workshop,
- **When** the operator taps "+ Registrar Asistente Sin Cita",
- **Then** a modal opens requesting: Full Name, Phone (WhatsApp), and Cash Payment toggle (defaults to `true` / checked, because walk-in reception is predominantly cash).
- **When** submitted, the client sends `POST /rosters/quick-checkin` with Mode 2 payload:
`{"service_id": "<id>", "scheduled_at": "<iso>", "client_name": "...", "client_phone": "...", "paid_cash": true}`.
- **And** upon HTTP 200, the modal closes, the attendee appears in the list as `ASISTIÓ` and `PAGADO`, and both `occupied_count` and `attended_count` increment by 1.
- **And** the modal submit button disables while in flight to prevent accidental double-click duplicate registrations.
### `AC-6`: Resilient Error Handling & Retry
- **Given** an error state (failed roster fetch or interrupted check-in),
- **Then** the UI exposes an actionable retry path without clearing existing form data or falsely marking attendees present.
### `AC-7`: Mobile Ergonomics & Keyboard Accessibility
- All interactive controls (Check-in buttons, Cash toggles, Walk-in trigger, Modal inputs) must have touch targets of at least **44x44px**.
- Roster rows must render cleanly at **375px** viewport width without horizontal scroll overflow.
- All interactive controls must support sequential keyboard focus (`Tab` / `Shift+Tab`) with visible `:focus-visible` outlines.
- Toast feedback must announce to assistive technology via `role="status"` and `aria-live="polite"`.
---
## 5. Navigation & Architectural Conventions
1. **Tab Identifier**: `rosters`
2. **URL Hash**: `#rosters`
3. **Navigation Label**: "Talleres"
4. **Header Integration**: Integrated into `OperatorDashboardApp.renderShell()` in `src/main.ts` alongside `#queue`, `#agenda`, `#clients`, and `#all`.
5. **Cash Toggle Default**: In the walk-in modal, the "Cobro en efectivo recibido" toggle defaults to **checked (`true`)**. *Rationale:* In-person workshop walk-ins overwhelmingly settle entrance fees in cash at reception. Operators may uncheck if the client provides immediate SPEI transfer verification.
---
## 6. API Contract Reference
The view interacts strictly with existing endpoints defined in `armonia-api`:
- **Endpoint 1:** `GET /rosters?date_from={YYYY-MM-DD}&date_to={YYYY-MM-DD}&service_id={optional}`
- *Response Shape:* `list[RosterSessionRead]` (see `app/schemas/roster.py`).
- **Endpoint 2:** `POST /rosters/quick-checkin`
- *Mode 1 (Existing Booking):*
```json
{ "booking_id": "uuid-str", "paid_cash": true, "notes": "Opcional" }
```
- *Mode 2 (Walk-In):*
```json
{
"service_id": "uuid-str",
"scheduled_at": "2026-10-25T18:00:00Z",
"client_name": "Nombre Cliente",
"client_phone": "525512345678",
"paid_cash": true
}
```
- *Response:* `QuickCheckinResponse` (`walk_in: bool`, `attendee: RosterAttendeeRead`).
- *Conflict Behavior:* HTTP 409 Conflict if attendee already completed or session at max capacity.
+238
View File
@@ -0,0 +1,238 @@
---
type: plan
role: verification-packet
status: approved
project: armonia-dashboard
feature: workshop-roster-checkin
date: 2026-10-26
tags: [qa, verification-packet, test-data, blind-testing]
---
# Verification Packet: Group Workshop Roster Quick Check-in
> **Status:** Ratified Verification Contract (Gate 2 Approved)
> **Notice to Independent QA Reviewer:** This packet contains **all** instructions, test personas, and expected observable criteria needed to verify the feature. You must evaluate the running application *without* inspecting the pull request discussion, implementation source code, or the implementer's self-audit.
---
## 1. Frozen Environment & Runtime Configuration
Prior to executing test scenarios, verify that both services are running on the specified commits:
| Component | Target Directory | Verified Commit Hash | Start Command | Active Port |
| :--- | :--- | :--- | :--- | :--- |
| **Backend API** | `armonia/armonia-api` | `d9c86e27d926bab3287857ccc9b53ec4fbcec91b` | `DATABASE_URL=file:test_armonia.db uv run python -m uvicorn app.main:app --port 8000` | `http://localhost:8000` |
| **Frontend UI** | `armonia/armonia-dashboard` | PR Branch (`feat/anne/workshop-roster`) | `pnpm exec vp dev --port 5173` | `http://localhost:5173` |
---
## 2. Tested & Verified Test Database Seed Script with Preflight Assertions
Run this command inside `armonia-api` using `uv run python`. It creates a clean disposable SQLite database (`test_armonia.db`), initializes default services, seeds the exact test records required for today's date, and **formally asserts all four preflight conditions** before completing:
```bash
cd /home/kiskaadee/Projects/active/armonia/armonia-api && uv run python -c "
import os, asyncio
from datetime import datetime, UTC
from zoneinfo import ZoneInfo
from pathlib import Path
# Deterministic absolute path anchoring
abs_db_path = (Path.cwd() / 'test_armonia.db').resolve()
assert abs_db_path.name.startswith('test_') and abs_db_path.name != 'local.db', 'Safety failure: refusal to touch non-test database'
if abs_db_path.exists():
abs_db_path.unlink()
os.environ['DATABASE_URL'] = f'file:{abs_db_path}'
from app.core.config import settings
settings.database_url = f'file:{abs_db_path}'
from app.db.init_db import init_schema_and_seed
from app.db.database import get_db
from fastapi.testclient import TestClient
from app.main import app
from app.core.auth import create_session_token
async def seed_and_verify():
# 1. Initialize schema and default services
await init_schema_and_seed()
async with get_db() as client:
# Preflight 1: Assert service exists with expected capacity of 15
res = await client.execute('SELECT id, name, price_mxn, max_capacity FROM services WHERE slug = \"circulo-cacao-presencial\" LIMIT 1;')
assert res.rows, 'Preflight 1 Failed: circulo-cacao-presencial service not found!'
cacao_id, cacao_name, price_mxn, max_capacity = res.rows[0]
assert max_capacity == 15, f'Preflight 1 Failed: Expected capacity 15, got {max_capacity}'
# Preflight 2: Calculate today's session instant at 18:00
tz = ZoneInfo(settings.business_timezone)
today = datetime.now(tz).date()
today_str = today.isoformat()
session_dt = datetime(today.year, today.month, today.day, 18, 0, 0, tzinfo=tz).astimezone(UTC).isoformat()
now = datetime.now(UTC).isoformat()
# Insert Elena Gómez (Prepaid SPEI: RESERVED + ACKNOWLEDGED)
client_elena = 'c1111111-1111-1111-1111-111111111111'
booking_elena = 'b1111111-1111-1111-1111-111111111111'
await client.execute('INSERT OR REPLACE INTO clients (id, full_name, phone_whatsapp, email) VALUES (?, ?, ?, ?);',
[client_elena, 'Elena Gómez', '525511112222', 'elena@example.com'])
await client.execute('''
INSERT OR REPLACE INTO bookings (
id, booking_code, service_id, client_id, scheduled_at, duration_minutes, buffer_minutes,
booking_status, payment_arrangement, payment_status, amount_mxn, created_at
) VALUES (?, ?, ?, ?, ?, 120, 0, 'RESERVED', 'PREPAID_DEFAULT', 'ACKNOWLEDGED', ?, ?);
''', [booking_elena, 'ADS-1001', cacao_id, client_elena, session_dt, price_mxn, now])
# Insert Carlos Méndez (Unpaid: RESERVED + AWAITING_ACKNOWLEDGMENT)
client_carlos = 'c2222222-2222-2222-2222-222222222222'
booking_carlos = 'b2222222-2222-2222-2222-222222222222'
await client.execute('INSERT OR REPLACE INTO clients (id, full_name, phone_whatsapp, email) VALUES (?, ?, ?, ?);',
[client_carlos, 'Carlos Méndez', '525533334444', 'carlos@example.com'])
await client.execute('''
INSERT OR REPLACE INTO bookings (
id, booking_code, service_id, client_id, scheduled_at, duration_minutes, buffer_minutes,
booking_status, payment_arrangement, payment_status, amount_mxn, created_at
) VALUES (?, ?, ?, ?, ?, 120, 0, 'RESERVED', 'PREPAID_DEFAULT', 'AWAITING_ACKNOWLEDGMENT', ?, ?);
''', [booking_carlos, 'ADS-1002', cacao_id, client_carlos, session_dt, price_mxn, now])
# Preflight 3: Endpoint level validation (assert endpoint returns exact expected session & attendees)
tc = TestClient(app)
headers = {'Authorization': f'Bearer {create_session_token(\"asistente@armoniadelser.mx\")}'}
r = tc.get(f'/rosters?date_from={today_str}&date_to={today_str}', headers=headers)
assert r.status_code == 200, f'Preflight 3 Failed: GET /rosters returned {r.status_code}'
data = r.json()
assert len(data) == 1, f'Preflight 3 Failed: Expected 1 session, got {len(data)}'
sess = data[0]
assert sess['occupied_count'] == 2 and sess['attended_count'] == 0, 'Preflight 3 Failed: Initial counts mismatch'
codes = {att['booking_code'] for att in sess['attendees']}
assert codes == {'ADS-1001', 'ADS-1002'}, f'Preflight 3 Failed: Missing expected codes {codes}'
# Preflight 4: File existence & non-empty database target
assert abs_db_path.exists() and abs_db_path.stat().st_size > 0, 'Preflight 4 Failed: Database file missing or empty'
print('✅ Preflight assertions passed: 100% verified test database ready at', abs_db_path)
asyncio.run(seed_and_verify())
"
```
---
## 3. Pre-Configured Test Attendee Personas
| Attendee Persona | Initial Persisted State | Expected Initial UI Rendering | Expected Post-Action State |
| :--- | :--- | :--- | :--- |
| **Elena Gómez** (`ADS-1001`) | `booking_status: "RESERVED"`, `payment_status: "ACKNOWLEDGED"`, `attended: false` | Badge: `REGISTRADO`<br/>Badge: `PAGADO` (Green)<br/>Action: "Registrar Asistencia" | After check-in: Badge updates to `ASISTIÓ`. Counter increments to `1 presente`. |
| **Carlos Méndez** (`ADS-1002`) | `booking_status: "RESERVED"`, `payment_status: "AWAITING_ACKNOWLEDGMENT"`, `attended: false` | Badge: `REGISTRADO`<br/>Badge: `PENDIENTE` (Amber)<br/>Action: Check-in + "Cobro efectivo" | After cash check-in: Badge updates to `ASISTIÓ` AND `PAGADO`. Counter increments. |
| **Walk-in: Lucía Vega** | Not in database initially | Not present in list | After registration: Appears in list as `ASISTIÓ` and `PAGADO`. Occupancy becomes `3 / 15`. |
---
## 4. Test Execution Scenarios & Concrete Pass/Fail Criteria
### Scenario 1: Navigation, Tab Hash & Capacity Overview (`AC-1`)
1. Open `http://localhost:5173` in a desktop browser.
2. Click the "Talleres" navigation button in the top navigation bar.
3. **Pass Criteria:**
- [ ] URL updates to `http://localhost:5173/#rosters`.
- [ ] "Talleres" tab button reflects active state (`aria-selected="true"`).
- [ ] Session card for "Círculo de Cacao (Presencial)" renders with time 18:00.
- [ ] Capacity counter displays exactly: `Ocupación: 2 / 15 (0 presentes)`.
### Scenario 2: Attendee Roster Display & Status Badges (`AC-2`)
1. Inspect the attendee table/list for the active workshop.
2. **Pass Criteria:**
- [ ] Elena Gómez is listed with booking code `ADS-1001`, status `REGISTRADO`, and payment pill `PAGADO`.
- [ ] Carlos Méndez is listed with booking code `ADS-1002`, status `REGISTRADO`, and payment pill `PENDIENTE`.
- [ ] Both rows display a clickable WhatsApp link (`wa.me/525511112222` and `wa.me/525533334444`).
### Scenario 3: Pre-paid Attendee Check-in & Persistence Verification (`AC-3`)
1. On Elena Gómez's row (`ADS-1001`), tap "Registrar Asistencia".
2. **Pass Criteria (UI & Persistence):**
- [ ] Network inspector shows `POST /rosters/quick-checkin` returned HTTP 200 with payload `{"booking_id": "...", "paid_cash": false}`.
- [ ] Elena's status badge updates from `REGISTRADO` to `ASISTIÓ`.
- [ ] Capacity summary updates to `Ocupación: 2 / 15 (1 presentes)`.
- [ ] An accessible toast announces: *"Asistencia registrada con éxito."*
- [ ] **Persistence Proof:** Refresh the browser page (`F5`). Upon reload, Elena still renders as `ASISTIÓ` and capacity remains `1 presente`.
### Scenario 4: Cash Check-in & Payment Status Transition (`AC-4`)
1. On Carlos Méndez's row (`ADS-1002`), trigger check-in with the "Cobro en efectivo recibido" checkbox checked.
2. **Pass Criteria (UI & Persistence):**
- [ ] Network inspector shows `POST /rosters/quick-checkin` returned HTTP 200 with `paid_cash: true`.
- [ ] Carlos's status badge updates to `ASISTIÓ`.
- [ ] Carlos's payment pill transitions from `PENDIENTE` to `PAGADO`.
- [ ] Capacity summary updates to `Ocupación: 2 / 15 (2 presentes)`.
- [ ] **Persistence Proof:** Refresh the browser page (`F5`). Carlos renders with both `ASISTIÓ` and `PAGADO`.
### Scenario 5: Walk-In Registration & Double-Submission Prevention (`AC-5`)
1. Click the "+ Registrar Asistente Sin Cita" button.
2. In the modal:
- Full Name: `Lucía Vega`
- Phone: `525598765432`
- Cash toggle: confirm it defaults to **checked (`true`)**.
3. **Double-Submission Test**: Rapidly click "Registrar y Marcar Asistencia" twice in succession.
4. **Pass Criteria:**
- [ ] Submit button disables immediately while the request is in flight.
- [ ] Exactly **one** walk-in record is created (network inspector shows only one successful registration; second click is ignored or blocked).
- [ ] Modal closes upon HTTP 200.
- [ ] Lucía Vega appears in the active attendee list with `ASISTIÓ` and `PAGADO`.
- [ ] Capacity counter updates to exactly `Ocupación: 3 / 15 (3 presentes)` (NOT `4 / 15`).
- [ ] **Persistence Proof:** Refresh the browser (`F5`). Exactly one Lucía Vega record remains persisted in the roster.
### Scenario 6: 409 Conflict Disambiguation & Reconciliation
1. **Case 6A (Already-Checked-In Idempotency)**: Trigger a duplicate check-in request via network replay or rapid re-tap for an already checked-in attendee (`ADS-1001`).
- **Pass Criteria:**
- [ ] Backend returns `HTTP 409 Conflict` (`"This attendee has already checked in."`).
- [ ] UI catches the 409, reconciles state, displays informative feedback (*"El asistente ya contaba con asistencia registrada"*), and ensures row reflects `ASISTIÓ` without unhandled application crash.
2. **Case 6B (Capacity Reached Conflict)**: When submitting a walk-in to a session at max capacity:
- **Pass Criteria:**
- [ ] Backend returns `HTTP 409 Conflict` (`"El taller ha alcanzado su cupo máximo"`).
- [ ] UI displays explicit capacity error alert; modal form data is preserved; row is **not** added to list.
### Scenario 7: Failed Roster Fetch & Actionable Retry (`AC-6`)
1. Temporarily stop the backend API process (`Ctrl+C` on uvicorn).
2. Switch dates or refresh the `#rosters` view.
3. **Pass Criteria:**
- [ ] Error banner renders: *"No se pudieron cargar los talleres. Verifica tu conexión."*
- [ ] A visible "Reintentar" button is displayed.
4. Restart the backend API process.
5. Click "Reintentar".
6. **Pass Criteria:**
- [ ] Roster reloads successfully without needing a browser reload.
### Scenario 8: Mobile Ergonomics & Accessibility Tree (`AC-7`)
1. Switch browser DevTools to Mobile Emulation: **375 x 812 px** (iPhone SE/X).
2. **Pass Criteria:**
- [ ] Zero horizontal scroll overflow on the table/cards.
- [ ] All check-in buttons, toggles, and modal inputs have minimum touch bounding boxes of **44 x 44 px**.
3. Navigate the view using only the keyboard (`Tab` and `Shift+Tab`).
4. **Pass Criteria:**
- [ ] Focus indicator is visibly highlighted on every active button and input.
- [ ] Toast notification container possesses `role="status"` and `aria-live="polite"`.
---
## 5. Evidence Capture & Scorecard Deliverable
The QA Specialist must produce `qa-evidence-scorecard.md` containing:
1. Formal table checking every criterion (`AC-1` to `AC-7`, Scenarios 1 to 8) with verdict: `PASS`, `FAIL`, or `BLOCKED`.
2. Captured screenshots attached:
- Desktop initial roster view.
- Mobile 375px view showing touch targets.
- Post-check-in state showing updated counter.
- Walk-in modal open state.
3. Browser console log confirming zero uncaught JavaScript exceptions.
4. If any test fails, record: Exact visual element, HTTP status, and response JSON payload.
---
## 6. Reset & Cleanup Procedure
To restore the test environment between verification passes:
```bash
# 1. Stop backend API (Ctrl+C)
# 2. Delete test database file
rm -f /home/kiskaadee/Projects/active/armonia/armonia-api/test_armonia.db
# 3. Re-run the seed script from Section 2
# 4. Restart backend API
```
+62
View File
@@ -0,0 +1,62 @@
# Armonía del Ser
> Digital operations platform and administrative control surface for **Armonía del Ser**, an integrative psychology and holistic health center founded by **Jasmin Isaza** in Tulancingo, Hidalgo, Mexico (operating since 2007).
---
## 🏛️ Ecosystem Topology & Repositories
The platform is structured into decoupled repositories with clear separation of concerns, mirrored from our primary self-hosted forge:
| Repository | Role & Technology | Target Platform | Stack |
| :--- | :--- | :--- | :--- |
| [**`armonia-landing`**](https://github.com/armonia-del-ser/armonia-landing) | Public client-facing landing page, catalog showcase, and self-service reservation portal. | Cloudflare Pages ($0 free tier) | [Vite+](https://viteplus.dev/), [Tailwind CSS](https://tailwindcss.com/), [TypeScript](https://www.typescriptlang.org/), [Biome](https://biomejs.dev/) |
| [**`armonia-dashboard`**](https://github.com/armonia-del-ser/armonia-dashboard) | Administrative mobile-first control surface for operators to review, follow-up, and acknowledge payments, authorize delayed-payment exceptions, release slots, and track packages. | Cloudflare Pages ($0 free tier) | [Vite+](https://viteplus.dev/), [Tailwind CSS](https://tailwindcss.com/), [TypeScript](https://www.typescriptlang.org/), [Biome](https://biomejs.dev/) |
| [**`armonia-api`**](https://github.com/armonia-del-ser/armonia-api) | Core backend REST API, operational source of truth, separated booking/payment state engine, Google OAuth + Turso allowlist, and Google Calendar coordination. | Google Cloud Run ($0 free tier) | [uv](https://docs.astral.sh/uv/), [Python 3.13](https://www.python.org/downloads/release/python-31316/), [FastAPI](https://fastapi.tiangolo.com/), [SQLModel](https://sqlmodel.tiangolo.com/), [Turso libSQL](https://docs.turso.tech/libsql), [Google Calendar](https://developers.google.com/workspace/calendar/api/concepts) |
| [**`homelab-armonia`**](https://github.com/armonia-del-ser/homelab-armonia) | Containerized Homelab orchestration uniting API and Dashboard behind Traefik, Authelia ForwardAuth, and local SQLite/Turso persistence. | Homelab Server | Docker Compose, Traefik, Authelia, LLDAP |
```mermaid
flowchart TD
CV["Clients / Visitors"] --> AL["armonia-landing"]
AL -->|"Public booking requests"| API["armonia-api"]
OP["Operators (Jasmin & Assistant)"] --> DASH["armonia-dashboard"]
DASH -->|"Google OAuth + Turso Allowlist"| API
API -->|"Operational SSOT & allowlist"| DB[("Turso Database<br/>libSQL")]
API -->|"Schedule coordination & sync health"| GC["Google Calendar API"]
API -->|"Manual follow-up via wa.me"| WA["WhatsApp Deep Links"]
```
---
## 📌 Operational Discovery & Ground Truth
> [!IMPORTANT]
> **Single Source of Truth (SSOT):** Do not assume business rules, payment flows, or scheduling constraints. Consult the primary operational discovery interviews:
>
> 1. **[Requirements Discovery Interview (2026-10-18)](https://github.com/armonia-del-ser/.github/blob/main/docs/interviews/2026-10-18-requirements-discovery.md):**
> Foundational discovery with Jasmin's assistant documenting 20 years of practice history, package accounting, WhatsApp-based intake funnels, and the critical need for mandatory buffer times between sessions.
> 2. **[Homelab Live PoC Feedback (2026-10-20)](https://github.com/armonia-del-ser/.github/blob/main/docs/interviews/2026-10-20-platform-feedback.md)** ([Versión en Español](https://github.com/armonia-del-ser/.github/blob/main/docs/interviews/2026-10-20-platform-feedback.es.md)):
> Frontline operational review following hands-on testing of the live Homelab demo, defining 2-step payment reconciliation (`voucher_received` $\to$ `reconciled`), payment extension (*prórroga*) deadline tracking, clinical session dossiers, and 5 foundational Agile user stories.
---
## 🌿 Canonical Business Description
En Armonía del Ser, somos un hogar de sanación y equilibrio. Nace del camino profesional y personal de Jasmin en 2007, combinando conocimientos en enfermería, psicología, temazcales, constelaciones, flores de Bach y herbolaria entre otros.
Hoy, ofrecemos un espacio integral donde cuerpo, mente y espíritu se encuentran. Aquí guiamos meditaciones, retiros, círculos de cacao, trabajamos con cuencos de cuarzo, equilibrio de chakras y limpieza energética. También ofrecemos atención psicológica, desintoxicaciones, rituales personalizados y celebraciones sagradas.
Somos un centro de atención psicológica, terapias alternativas y de la salud integrativa que ayuda a las personas a encontrarse con su verdadero Ser, a estar en equilibrio con su entorno y descubrir la salud y la abundancia que son su verdadera razón de Ser.
---
## 📍 Operational Profile
* **Founder & Principal Therapist:** Jasmin Isaza
* **Location:** Vicente Guerrero, Felipe Ángeles, 43640 Tulancingo, Hgo., Mexico
* **Direct Channel:** WhatsApp (`+52 775 148 7912`)
* **Core Offerings:**
* *Group Sessions (Presencial & Online):* Círculo de Cacao (Lunes 6 PM Presencial / Martes 7 PM Online), Meditación con cuencos (Martes 7 AM / Sábados 8 AM), Meditación con ejercicios conscientes (Martes 8 AM), Constelaciones Familiares (Jueves 7 PM Online), Clase de los 4 Elementos y Tarot (Viernes 9 AM Online), Meditación guiada (Sábados 7 AM), plus low-cost community workshops (e.g., *Curso de Abundancia y Prosperidad*, $50 MXN/session).
* *1-on-1 Consultations:* Atención Psicológica Individual (con cita previa, presencial u online), Flores de Bach, herbolaria, limpieza energética.
+2
View File
@@ -17,8 +17,10 @@ x 2026-10-19 (A) Implement Dynamic Operator Identity Pill in Header from GET /au
x 2026-10-19 (A) Implement Nueva Cita modal with client autocomplete search and WhatsApp confirmation in armonia-dashboard +dashboard @ui issue:armonia-dashboard#6 x 2026-10-19 (A) Implement Nueva Cita modal with client autocomplete search and WhatsApp confirmation in armonia-dashboard +dashboard @ui issue:armonia-dashboard#6
x 2026-10-19 (A) Implement Agenda Card Reschedule & Complete actions and Client Directory View in armonia-dashboard +dashboard @ui issue:armonia-dashboard#7 x 2026-10-19 (A) Implement Agenda Card Reschedule & Complete actions and Client Directory View in armonia-dashboard +dashboard @ui issue:armonia-dashboard#7
(C) Implement live Google Calendar API Pull-on-Read and Push-on-Write synchronization in armonia-api/app/services/calendar.py +api @gcal issue:armonia-api#4 (C) Implement live Google Calendar API Pull-on-Read and Push-on-Write synchronization in armonia-api/app/services/calendar.py +api @gcal issue:armonia-api#4
(B) Return structured error_code (ALREADY_CHECKED_IN, CAPACITY_REACHED) in 409 conflict responses in armonia-api +api @backend issue:armonia-api#15
x 2026-10-19 (C) Scaffold Vite+, Tailwind, HTMX, and Biome project structure in armonia-dashboard +dashboard @ui issue:armonia-dashboard#1 x 2026-10-19 (C) Scaffold Vite+, Tailwind, HTMX, and Biome project structure in armonia-dashboard +dashboard @ui issue:armonia-dashboard#1
x 2026-10-19 (C) Implement 48-hour follow-up queue, payment acknowledgment, and agenda views in armonia-dashboard with Anne Droid +dashboard @ui issue:armonia-dashboard#1 x 2026-10-19 (C) Implement 48-hour follow-up queue, payment acknowledgment, and agenda views in armonia-dashboard with Anne Droid +dashboard @ui issue:armonia-dashboard#1
x 2026-10-19 (C) Polish operator dashboard UI with toasts, inline micro-modals, agenda date filter, and sticky mobile nav +dashboard @ui issue:armonia-dashboard#1 x 2026-10-19 (C) Polish operator dashboard UI with toasts, inline micro-modals, agenda date filter, and sticky mobile nav +dashboard @ui issue:armonia-dashboard#1
x 2026-10-29 (C) Implement Group Workshop Roster check-in view and multi-session package counter in armonia-dashboard with Anne Droid +dashboard @ui issue:armonia-dashboard#9
(C) Scaffold Vite+, Tailwind, HTMX, and Biome project structure in armonia-landing +landing @ui issue:armonia-landing#1 (C) Scaffold Vite+, Tailwind, HTMX, and Biome project structure in armonia-landing +landing @ui issue:armonia-landing#1
(C) Implement public service catalog, slot picker, and SPEI WhatsApp handoff in armonia-landing with Anne Droid +landing @ui issue:armonia-landing#1 (C) Implement public service catalog, slot picker, and SPEI WhatsApp handoff in armonia-landing with Anne Droid +landing @ui issue:armonia-landing#1