# Paisy/ADP Mode Behavior — Roo Code

## Active Persona: Professional Patrick

Patrick is in ADP/Paisy mindset. He is working on payroll and HR compliance systems for ADP Germany. This work has real-world legal/financial consequences — precision matters.

## Domain Context (always active in this mode)

| Domain | Details |
|--------|---------|
| Repo | Paisy monorepo — Java/Maven |
| Branch rule | feature/bugfix branches ONLY — never push to main/current |
| Language | Jira summaries, descriptions, comments → German; code/class names → as-is |
| DB | Oracle (production), H2 (test/C/S legacy). ORA-00001 is a real risk post-migration |
| Modules | cs-modules, java/modules, eau (EAU), eubp (euBP), fex (FEX) |
| Jira | Project: ESIDEPAISY. Terminal status: "Accepted" (not "Done"/"Closed") |

## Mandatory Jira Custom Fields
Every ticket must include:
- `customfield_10001` → Feature Link (current MEMO Feature: ESIDEPAISY-9648)
- `customfield_10501` → `{"value": "PAISY MEMO"}`
- `customfield_12700` → fiscal quarter e.g. `{"value": "FY26 / 2"}`
- Sprint via `customfield_10000` — set AFTER creation via update_ticket_fields

## Before Starting Any Paisy Task
1. **Search Domain Facts:** `memory_search_facts("ESIDEPAISY [module]")` + `memory_search_chunks("Paisy assessment")`
2. **Assessment First:** ALWAYS write an assessment.md document before any code changes
   - Document: requirements, root cause analysis, affected files, risks, alternatives
3. **Announce Focus:** `memory_announce_focus(session_id, "Paisy: ESIDEPAISY-XXXXX", files=["Assessment.md"], ide_hint="VS Code")`
4. **Create Branch:** `git checkout -b feature/ESIDEPAISY-XXXXX-short-description`

## Known Bug Patterns (check before exploring)
- **ORA-00001:** Duplicate hash constraint violation — ADVFEX C/S→PA migration, duplicate Anträge
- **NPE in EAU:** `getSendungsHeader()` null for Anträge never transmitted — always null-check
- **EclipseLink batch flush:** Transaction enters broken state after constraint violation — wrap in try/catch, manage em lifecycle carefully
- **euBP naming:** Old code uses English "RES" — correct is German descriptor via Verfahrensmerkmal

## Paisy Code Conventions
- Package structure: `controller/`, `model/`, `service/`, `util/`
- New utility classes go in `controller/util/` of the relevant module
- Assessment docs go in `docs/` within the module, or `java/modules/.../docs/`
- Tests are parameterized where possible (see BeitragssatzdateiParameterizedTest pattern)

## After Paisy Changes
1. **Store Fix:** `memory_store_fact("bug-pattern", "Fixed ESIDEPAISY-XXXXX: root cause was X, fix was Y")`
2. **Comment on Jira:** In German, reference the assessment, describe the change
3. **Open PR:** Never merge directly — always PR with description
4. **Resolve Hypothesis:** Document whether the fix was correct as predicted
