# RAMA AG — Master Development Tracker

Branch: `develop/v1` (a git worktree of the active repo at `D:\- CLAUD PROJECTS\RAMA AG\dev-v1`). **Live since 27.11.2026 18:30: `rama-v1.0.0-rc5` (`c3dd060`): Roller Frame sign-in. Previous: rc4 `ce19649` (Light Edition), rc3 `9ccca13` (onboarding + import), rc2 `37f8dbd`, rc1 `4e7a50a`.** All testing ran on `rama_workforce_laravel_test`, SQLite `:memory:` or the isolated server `:3401`. No synthetic data was ever written to the live database.

Status legend:
- **DONE**: implemented and tested.
- **DRAFT**: implemented, but uses unverified rules.
- **BLOCKED**: needs the owner.
- **PENDING**: not yet executed.

| Phase | Status | Evidence / notes |
| --- | --- | --- |
| 01 System audit | DONE | `RAMA_AG_SMGV_PHASE_01_AUDIT_REPORT.md` |
| 02 Two-role architecture | DONE | `RAMA_AG_SMGV_PHASE_02_IMPLEMENTATION_REPORT.md` |
| 02B Controlled deployment | DONE (live) | `RAMA_AG_SMGV_PHASE_02B_DEPLOYMENT_REPORT.md`; `rama-v0.2.0` live since 2026-11-26 22:30 |
| 03 SMGV PDF reverse engineering | DONE | `docs/rama/RAMA_AG_SMGV_PDF_SPECIFICATION.md`. 140 pages = 10 × 14 confirmed; relationships verified on 2 employees |
| 04 SMGV database architecture | DONE | `docs/rama/RAMA_AG_SMGV_DATABASE_ARCHITECTURE.md`. One forward migration, 15 tables, +6 immutability triggers (26 originals untouched) |
| 05 Contracts & Basisblatt | DONE | Basisblatt screen: personal data (AHV encrypted and masked), contract, Pensum per weekday with effective-dated history, opening balances, holiday calendar |
| 06 Time calculation engine | DONE | `App\Domain\Smgv\TimeEngine` (pure, integer minutes, time bands, cross-midnight, DST, Pensum, holidays, absences, corrections, year roll-up) |
| 07 GAV rules & vacation | DRAFT / BLOCKED | Versioned `RuleSet` with a `verified` flag per rule; seeded `2026.1-draft` is unverified, so every report is a draft. Owner questions below |
| 08 SMGV dashboard | DONE | `/smgv`: 11 KPIs, employee table, filters, cumulative trend chart, drill-down |
| 09 Monthly & annual reporting | DONE (draft values) | `/smgv/monthly` spreadsheet (sticky headers, keyboard navigation, editable absence cells); `/smgv/annual`, per employee and company-wide |
| 10 Monthly closing & audit trail | DONE | draft → review → ready → closed → reopened; immutable snapshot with SHA-256, rule version, sources; reopen needs a reason ≥ 10 characters and creates a new revision; append-only correction ledger; `/audit` |
| 11 SMGV PDF export center | DONE | Basisblatt (portrait) + 12 months + Jahresübersicht (landscape) = 14 pages per employee; combined PDF, separate PDFs as ZIP, Excel, preview, private audited downloads, download history; draft watermark |
| 12 Historical PDF import | DONE | Upload (private, SHA-256 duplicate check) → page classification → extraction of the Vorjahr opening values → review/mapping → explicit confirmation; never overwrites silently |
| Black Titanium redesign | SUPERSEDED by the Light Edition (rc4) | `docs/rama/RAMA_AG_BLACK_TITANIUM_DESIGN_SYSTEM.md` |
| 13 Testing & validation | DONE (automated + simulated browser) | main 562 (464 passed, 98 skipped by design), memory 97, upgrade 2: 0 failures. SMGV: 8 unit + 8 accounting + 6 center tests |
| Final rebuild & activation | DONE (rc1) | `RAMA_AG_FINAL_REBUILD_REPORT.md`, `RAMA_AG_FINAL_QA_REPORT.md`, `RAMA_AG_FINAL_MASTER_REPORT.md`. The backup was verified by a restore; the live SMGV migration passed every check; offline ≈ 51 s |
| Login Black Titanium ("Brush Corners") | DONE (live rc2) | `RAMA_AG_LOGIN_BLACK_TITANIUM_IMPLEMENTATION_REPORT.md`. UI only: original logo, centred card, animated brush corners (20 s seamless loop, reduced-motion/low-power still frame), DE/SQ. main 566 / memory 97 / node 6: 0 failures; browser QA 104/104; deployed with a ~6 s window, no migrations |
| Real employee onboarding + historical SMGV import | DONE (live rc3) | `RAMA_AG_EMPLOYEE_ONBOARDING_REPORT.md`, `RAMA_AG_SMGV_HISTORICAL_IMPORT_REPORT.md`, `RAMA_AG_SMGV_RECONCILIATION_REPORT.md`. 10 workers (created deactivated because every exit date in the PDF was past; activated on the owner's instruction at 09:08), username login, temporary passwords with an enforced change, Login & Security section, 6,427 values with provenance, 5,076/5,134 self-checks, 10 flagged cells (one derived row), 0 conflicts. Tests 0 failures |
| Black Titanium theme correction (Light Edition) | DONE (live rc4) | `RAMA_AG_BLACK_TITANIUM_LIGHT_CORRECTION_REPORT.md`. BLACK TITANIUM DOES NOT MEAN FULL DARK MODE: light workspace #F0F1F3, white surfaces, dark sidebar #111214 only; matte; branding "Gipser und Maler"; CSP inline-script error fixed. Audit 370/370 (28 routes × 3 widths, WCAG AA), tests 0 failures |
| Sign-in "Roller Frame" (owner's concept 01) | DONE (live rc5) | Login report §12: CSS paint rollers (left long, right short), seamless 20 s loop, hidden on phones; mockup texts; real logo + username field kept; QA 112/113 (1 outdated expectation), tests 0 failures |

## Decisions

1. **Separate worktree for development.** The live `:3400` server runs straight from the active working tree, so development happens in a separate folder.
2. **SMGV is a separate `admin` middleware, not a new `AppModule`.** The original role matrix and its tests stay intact.
3. **Daily and monthly results are computed, not stored, until a month is closed.** The closed snapshot stores the full result. This avoids duplicating attendance facts.
4. **Dompdf cannot mix portrait and landscape pages in one document.** Pages are rendered per employee and orientation, then merged by `App\Support\Pdf\PdfMerger`, which handles only our own Cpdf output.
5. **The SMGV association logo is not reproduced.** The PDFs carry a neutral "Vorlage: SMGV Arbeitszeitkontrolle" note instead. The owner must confirm.
6. **The historical import writes only the opening values (Vorjahr Stundensaldo and Ferien).** Monthly figures from old PDFs are shown for control only.
7. **Closing is allowed while rules are unverified.** The snapshot records `rules_verified = false`, and exports carry the "ENTWURF" watermark.

## Owner decisions needed after the onboarding

1. ~~Re-activate former employees~~ **done 27.11.2026 09:08** on the owner's instruction: all 10 accounts active, contract end dates removed (backup `activation-predeploy-20261127-085653`). Still open: set the current Pensum from 01.09.2026 (Durim Buduri from 01.10.2026), otherwise Sep–Dec show 0 Sollstunden.
2. The PDF has no address, phone, e-mail or AHV for anyone, and no Eintrittsdatum for 4 employees: please supply them, or enter them in the Basisblatt.
3. Check Blerim Dullovi's July sheet: the "Unproduktive Std. Total" row is blank on 10 vacation days.
4. Delete `D:\- CLAUD PROJECTS\RAMA AG\onboarding-credentials\RAMA_AG_initial_employee_credentials.txt` once the initial passwords are handed over.

## Blockers: owner questions (they block authoritative accounting only)

1. Which GAV version and articles apply?
2. Is the daily target at 100 % equal to 8.00 hours?
3. What is the maximum working time and the night window for supplements 1–3?
4. Is travel time paid, and how does the travel deduction work?
5. What is the vacation entitlement, and the rounding rule (inferred: round up to 0.05 h)?
6. What is the deadline for compensating last year's balance, the RPBK reporting duty, and whether the following year's opening balance includes the uncompensated "Rest"?
7. What are the Karenz (waiting-day) rules for illness?
8. Which canton's holiday calendar applies?
9. May the SMGV logo be used in exports?
10. ~~Real RAMA logo~~ received (white version, used on the sign-in page). Still needed: a **dark** version for PDF/Excel exports (white is invisible on white pages), The sidebar logo switch (`RAMA_LOGO` → white) is **live since 27.11.2026 09:20** (`.env` backup `sidebar-logo-env-20261127-092041`). The sidebar footer now says "Gipser und Maler" (rc4).

## Known limitations

- No real-device GPS acceptance has been done; GPS was only simulated.
- Large exports are generated synchronously; there is no queue worker. Ten employees (140 pages) take a few seconds.
- Secondary text uses #686D76 instead of the owner token #717680 on the grey workspace, for WCAG AA (documented in the design system).
