feat(planner): Planner v0 — pending Candidates auf heute (Phase 5 von #360) #368
Labels
No labels
app/archiv
app/einkaufslisten
app/imap-client
app/wissensbasis
arch-answered
arch-question
area/api
area/auth
area/infra
area/mobile
area/shared
area/ui
area/web
portfolio-status
prio/high
prio/low
prio/medium
roadmap/public
size/l
size/m
size/s
size/xl
size/xs
status/blocked
status/needs-info
type/bug
type/chore
type/docs
type/feature
type/idea
type/refactor
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
admin-mrrm/mrrmlabapp#368
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Ziel
Phase 5 von Epic #360. Der Planner v0 ist die einfachste mögliche Heuristik: alle pending Candidates werden auf heute geplant, sortiert nach Priorität +
earliestAt.Ziel ist nicht schon ein realistischer Tagesplan — die schlauen Schichten (Location-Hints, Habit-Context, LLM) kommen später (Phasen 7/8). v0 macht eine Liste, mehr nicht. Damit ist die Pipeline durchgehend testbar: Source → Candidate → Planner → Day-View.
Scope
Service
PlannerService.planToday(ownerSub, now):lifecycleState='pending'undownerSub=….latestAt < startOfDay(now)→ markiere sie alsobsolete.priority (high>normal>low), dannearliestAt asc nulls last, danncreatedAt asc.plannedSlot = now(alle auf jetzt — v0 weiß noch nichts über Slots),lifecycleState='planned'.PlannerService.getToday(ownerSub, now):lifecycleState='planned'undplannedSlotim Range[startOfDay(now), endOfDay(now)], in Plan-Reihenfolge.API
POST /planner/run— triggertplanTodayfür den eingeloggten User. Body leer; Response = Day-View-DTO.GET /planner/today— Day-View-DTO für heute.DTO:
Tests
PlannerService.planToday: leere Liste, sortierung, obsolete-Markierung, idempotenz (zweimal aufrufen markiert nichts neu, weil schonplanned)PlannerService.getToday: nur planned-Candidates für heutePOST /planner/run,GET /planner/today, prüfen ReihenfolgeOut of scope (folgt später)
Bezug