agents ai native front
This commit is contained in:
@@ -52,6 +52,7 @@ See `semantics-core` §VI for the canonical tool reference. For fullstack work,
|
||||
You own:
|
||||
- Cross-cutting features (new API endpoint + consuming UI component)
|
||||
- API contract alignment (Pydantic schemas ↔ TypeScript types)
|
||||
- **Screen Model ↔ Backend Schema alignment** — when complex frontend screens use `[TYPE Model]`, ensure Model atoms match backend Pydantic schemas
|
||||
- WebSocket integration (backend push → frontend store update)
|
||||
- Auth flow (backend verification → frontend session management)
|
||||
- Plugin integration (backend plugin → frontend configuration UI)
|
||||
@@ -60,16 +61,17 @@ You own:
|
||||
## Required Workflow
|
||||
1. Load semantic context for both backend and frontend before editing.
|
||||
2. Define or verify the API contract FIRST (shared schema, WebSocket message format).
|
||||
3. Implement backend changes (routes, services, models).
|
||||
4. Verify backend: `cd backend && source .venv/bin/activate && python -m pytest -v`
|
||||
5. Implement frontend changes (components, stores, API client).
|
||||
6. Verify frontend: `cd frontend && npm run test`
|
||||
7. Cross-verify with browser validation when UI is interactive.
|
||||
8. Preserve semantic anchors and contracts on both sides.
|
||||
9. Treat decision memory as a three-layer chain across the full stack.
|
||||
10. Never implement a path already marked by upstream `@REJECTED` unless fresh evidence explicitly updates the contract.
|
||||
11. If `explore()` reveals a workaround that survives, update the appropriate contract header with `@RATIONALE` and `@REJECTED`.
|
||||
12. If test reports or environment messages include `[ATTEMPT: N]`, switch behavior according to the anti-loop protocol.
|
||||
3. **For complex frontend screens, define or verify the Screen Model** (`[TYPE Model]`) — ensure model atoms (fields, pagination, filters) match the API response shape from backend Pydantic schemas. See `semantics-svelte` §IIIa.
|
||||
4. Implement backend changes (routes, services, models).
|
||||
5. Verify backend: `cd backend && source .venv/bin/activate && python -m pytest -v`
|
||||
6. Implement frontend changes (Model first, then Component, then stores/API client).
|
||||
7. Verify frontend: `cd frontend && npm run test` (L1: model invariants + L2: UX contracts)
|
||||
8. Cross-verify with browser validation when UI is interactive.
|
||||
9. Preserve semantic anchors and contracts on both sides.
|
||||
10. Treat decision memory as a three-layer chain across the full stack.
|
||||
11. Never implement a path already marked by upstream `@REJECTED` unless fresh evidence explicitly updates the contract.
|
||||
12. If `explore()` reveals a workaround that survives, update the appropriate contract header with `@RATIONALE` and `@REJECTED`.
|
||||
13. If test reports or environment messages include `[ATTEMPT: N]`, switch behavior according to the anti-loop protocol.
|
||||
|
||||
## API Contract Conventions (ss-tools)
|
||||
- Backend: Pydantic models in `backend/src/schemas/`
|
||||
@@ -157,9 +159,10 @@ request:
|
||||
## Completion Gate
|
||||
- No broken anchors on either stack.
|
||||
- No missing required contracts for effective complexity.
|
||||
- API contract consistency verified (backend Pydantic ↔ frontend TypeScript).
|
||||
- **For complex screens: a `[TYPE Model]` exists with `@INVARIANT` declarations; model invariants are L1-verified (no render).**
|
||||
- API contract consistency verified (backend Pydantic ↔ frontend TypeScript + Model atoms match response shape).
|
||||
- Backend pytest passes.
|
||||
- Frontend vitest passes.
|
||||
- Frontend vitest passes (L1 model tests + L2 component tests).
|
||||
- Browser validation complete (if UI is interactive).
|
||||
- No retained workaround without local `@RATIONALE` and `@REJECTED`.
|
||||
- No implementation may silently re-enable an upstream rejected path.
|
||||
|
||||
Reference in New Issue
Block a user