chore: finish workspace cleanup

This commit is contained in:
2026-07-03 04:04:54 -07:00
parent 901e36b7a7
commit c4d5222ddd
9 changed files with 278 additions and 175 deletions

View File

@@ -377,7 +377,7 @@ await database
- Good: use one additive `care_tasks` table for MVP execution records instead of building a full recurring care-plan engine.
- Good: preserve `/app/health` separation; care execution is operational and not the health admin settings page.
- Base: `elderId` can be nullable for future public-area checks, but seeded MVP examples should use real elders.
- Bad: render fake care metrics in `ModulePage` after the module becomes real.
- Bad: render fake care metrics in a static placeholder after the module becomes real.
- Bad: update task status by ID alone without `organizationId`.
- Bad: only disable buttons in the UI while leaving Route Handlers on broad elder permissions.

View File

@@ -165,44 +165,17 @@ The project Dialog adapter must:
### Static Module Data Contract
Static or reserved module pages must not fabricate operational data. If a module does
not have a Drizzle-backed query/API and real persisted records, render a clear empty or
not-connected state instead of generated counters, fake workflows, sample records, or
mock priority/status rows.
Operational module pages must not fabricate data. If a module does not have a
Drizzle-backed query/API and real persisted records, render a clear empty or
not-connected state inside that module's own route/component instead of generated
counters, fake workflows, sample records, or mock priority/status rows.
`modules/shared/components/ModulePage.tsx` is the shared placeholder for these modules.
Its props should stay descriptive only:
The old shared reserved-module placeholder components were removed after devices,
notices, alerts, family, health, care, and emergency became real persisted workspaces.
Do not reintroduce a generic `ReservedModulePages` layer for operational modules.
```typescript
type ModulePageProps = {
title: string;
eyebrow: string;
description: string;
icon: LucideIcon;
phase: "待接入" | "二期预留" | "三期预留";
};
```
```typescript
// Bad: static pages pretending to have live business data.
<ModulePage
title="Care"
metrics={[{ label: "Today", value: "184", detail: "142 done" }]}
workflows={["Create plan", "Dispatch task"]}
/>
// Good: no fabricated records until a real data source exists.
<ModulePage
title="Care"
eyebrow="Plans and inspections"
description="Pending connection to care plans, task dispatch, and execution records."
icon={ClipboardCheck}
phase="待接入"
/>
```
When a module becomes real, replace the placeholder with a Server Component that loads
data from the server boundary and pass only persisted, permission-filtered data into
When a module becomes real, implement the route as a Server Component that loads data
from the server boundary and passes only persisted, permission-filtered data into
client components.
### App Shell Tenant and Account Menu Contract

View File

@@ -21,9 +21,9 @@ the rest conversationally.
## Status (update the checkboxes as you complete each item)
- [ ] Fill backend guidelines
- [ ] Fill frontend guidelines
- [ ] Add code examples
- [x] Fill backend guidelines
- [x] Fill frontend guidelines
- [x] Add code examples
---

View File

@@ -3,7 +3,7 @@
"name": "00-bootstrap-guidelines",
"title": "Bootstrap Guidelines",
"description": "Fill in project development guidelines for AI agents",
"status": "in_progress",
"status": "completed",
"dev_type": "docs",
"scope": null,
"package": null,
@@ -11,7 +11,7 @@
"creator": "TalexDreamSoul",
"assignee": "TalexDreamSoul",
"createdAt": "2026-07-01",
"completedAt": null,
"completedAt": "2026-07-03",
"branch": null,
"base_branch": null,
"worktree_path": null,