feat(api): AIN-182 Phase 2 · templates backend + 6 system seeds#52
Conversation
… endpoints Closes the backend half of AIN-182 §Phase 2 §5 + §6. Workflow templates are reusable blueprints a tenant can apply to an agent — ordered tasks with D11 model-class hints, optional HITL rules, D10 visibility model. ## Migration 20260519_0020 - New `templates` table (id, tenant_id NULL=system, name, description, visibility enum, tasks JSONB, hitl_rules JSONB, timestamps) - Unique (tenant_id, name) per tenant + partial unique on name for system templates (tenant_id IS NULL) - New `agents.template_id` FK (nullable, SET NULL on template delete) - Seeds 6 Ainfera system templates: inference-frontier, inference-fast, inference-cost-light, inference-embedding, routing-balanced, routing-quality-first. Memory #20 rowcount-asserted. ## CRUD endpoints - GET /v1/templates list (system + tenant own) - GET /v1/templates/{id} detail (404 across-tenant) - POST /v1/templates tenant-scoped create - PUT /v1/templates/{id} owner-only update - DELETE /v1/templates/{id} owner-only delete System templates (tenant_id NULL) are read-only via the API; the migration is the only path that mutates them. ## OpenAPI contract EXPECTED_OPERATIONS extended with 5 new paths. Closes part of AIN-182 (Phase 2 §5 + §6 backend half).
AIN-182 🔴 Dashboard 6 missing pages from D-153 spec — Glance, Agent detail, Inference detail, Templates gallery, Template editor, Routing policy
Severity: 🔴 URGENT — 6 of 8 spec'd dashboard pages NOT BUILTFiled 2026-05-18 PM after AIN-153 audit revealed Aule shipped 2 pages with empty-state data and marked parent Done. Reverted to In Progress. This ticket consolidates the 6 missing dashboard pages from the canonical spec into a single epic-child for parallel execution. Canonical spec reference🎨 Marketing + Dashboard Design (Ampersend + Unicorn) §Part 2 Missing pages (build these in order)Phase 1 — Critical-path pages (no payment dependency)1.
|
| Path | Status |
|---|---|
/agents/<id>/wallet |
DEFER — payment lane per AIN-179 |
/wallet |
DEFER — payment lane per AIN-179 |
These ship after AIN-129 CDP signup + USDC settlement live.
Cross-cutting requirements
- Keyboard shortcuts implemented per spec (⌘K palette, j/k, g+a/t/w/r/i, Esc, ⌘/)
- Mobile read-only verified per D12 (edit buttons hidden ≤768px viewport)
- Brand v1.3 tokens (bg #070B14, ink #E8EDF5, accent #4D95E8, IBM Plex Sans 500 -0.022em)
- No layout shifts (skeletons render at correct size before data loads)
- Live counters smooth count-up animation (400ms)
- New activity rows fade-in (200ms) with subtle slide-down (-8px)
- Hover transitions 120ms
Acceptance gates (this epic-child)
- All 6 pages built per spec
- All page data wired (no empty-state placeholders)
- Browser smoke on prod app.ainfera.ai for each page
- Mobile smoke at 375px viewport (read-only verified)
- Keyboard shortcuts smoke (⌘K palette works)
- 6 Ainfera templates seeded via migration
- Aule author override on all commits per Discipline docs(adr): ADR-012/013/014 — AA integration roadmap #4
- PR opens off
feat/ain-182-dashboard-6-missing-pagesbranch - AIN-153 parent moves to Done after this ships
Connection
- Parent: AIN-153 (dashboard epic, reverted to In Progress)
- D7-D37 locks: Decision Locks
- Spec: Marketing + Dashboard Design §Part 2
- Universal Control Plane lock: framework-agnostic from D1, no
fleet_*tables
Founder authorization
Per "Hard revert to In Progress and force the missing work" (2026-05-18 session 3.5 PM).
|
You have used all Bugbot PR reviews included in your free trial for your GitHub account on this workspace. To continue using Bugbot reviews, enable Bugbot for your team in the Cursor dashboard. |
Summary
Backend half of AIN-182 §Phase 2 §5+§6. New `templates` table + 6 Ainfera system seeds + full CRUD endpoints.
Migration 20260519_0020
Endpoints
Test plan
Closes part of: AIN-182 Phase 2