## Context PRD: [`docs/PRD.md`](../blob/main/docs/PRD.md) §§5, 6.6, 7. Key helpers already include `desired/{name}.json`. ## Goal Named desired-state documents workers can reconcile against (JumpCloud/Orbit pattern), with CAS on PUT. ## Out of scope - Worker reconciliation loop (CLI/device side) - Notify when desired-state changes - UI ## API | Method | Path | Behavior | |--------|------|----------| | GET | `/v1/orgs/{org}/projects/{project}/desired/{name}` | 200 body + `ETag`; 404 if missing | | PUT | `/v1/orgs/{org}/projects/{project}/desired/{name}` | Honor `If-Match`; return new `ETag`; 412 on conflict | Document JSON envelope (at least `name`, `org_id`, `project_id`, `body`, timestamps). ## Acceptance criteria - [ ] GET/PUT round-trip against memory Store - [ ] CAS conflict → 412 - [ ] Path org/project enforced with auth scope - [ ] Keys use existing `DesiredKey` helper - [ ] httptest tests; `make check` green ## Dependencies Prefer after “Wire jobs API + auth middleware into serve path”. ## How to hand to Aixgo Code Apply **`ax:go`** after auth is on the serve path.
Activity