Phase 1: Evidyne integration doc
Browse files- docs/evidyne_integration.md +51 -0
docs/evidyne_integration.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Evidyne Integration (SPI)
|
| 2 |
+
|
| 3 |
+
## Contract
|
| 4 |
+
|
| 5 |
+
Every operation returns the §32 response contract:
|
| 6 |
+
|
| 7 |
+
```json
|
| 8 |
+
{
|
| 9 |
+
"status": "PASS|REPAIR|REGENERATE|REPLAN|REJECT|UNRESOLVED|BLOCKED",
|
| 10 |
+
"project_id": "...",
|
| 11 |
+
"state_version": 18,
|
| 12 |
+
"artifacts": ["A_JOB_SHOT_0001"],
|
| 13 |
+
"evidence": [],
|
| 14 |
+
"warnings": [],
|
| 15 |
+
"next_actions": ["render_master"]
|
| 16 |
+
}
|
| 17 |
+
```
|
| 18 |
+
|
| 19 |
+
Failures add `failure_type`, `location`, `repair_plan`.
|
| 20 |
+
|
| 21 |
+
## Operations (Phase 1 implemented)
|
| 22 |
+
|
| 23 |
+
| Operation | Purpose | Notes |
|
| 24 |
+
|---|---|---|
|
| 25 |
+
| `create_project(prompt)` | new ProjectState | returns project_id |
|
| 26 |
+
| `interpret_project(pid)` | IntentEngine + idea generation | separates `must:` constraints |
|
| 27 |
+
| `generate_ideas(pid, task)` | adaptive idea budget | normal=3 / important=5 / major=8 |
|
| 28 |
+
| `commit_concept(pid, idea_id)` | governing rules | |
|
| 29 |
+
| `compile_production(pid)` | plan → DAG; validates | BLOCKED on cycles/invalid jobs |
|
| 30 |
+
| `render_draft(pid)` | scheduler + renderer | cached artifacts |
|
| 31 |
+
| `evaluate_draft(pid)` | level-1 checks → fusion → arbiter | evidence attached |
|
| 32 |
+
| `get_project_state(pid, fields?)` | lazy field retrieval (§68) | |
|
| 33 |
+
| `get_evidence(pid)` / `get_job_status(pid)` | observation | |
|
| 34 |
+
|
| 35 |
+
## Evidyne loop
|
| 36 |
+
|
| 37 |
+
```
|
| 38 |
+
THINK interpret_project / generate_ideas / commit_concept
|
| 39 |
+
EXECUTE compile_production / render_draft
|
| 40 |
+
VERIFY evaluate_draft (status REPAIR -> repair_plan in response)
|
| 41 |
+
REPAIR (Phase 7; today evaluate_draft reports repair targets)
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
Evidyne only needs `project_id` + these JSON calls; renderer and model internals stay behind
|
| 45 |
+
`ModelRouter`. In Phase 1 Evidyne can run the whole mock loop without any GPU.
|
| 46 |
+
|
| 47 |
+
## Adding a renderer (§43-J)
|
| 48 |
+
|
| 49 |
+
Implement the `Renderer` protocol (`spi/renderers/base.py`): `name`, `kind`, `capabilities()`,
|
| 50 |
+
`generate(request) -> {"artifact": uri, ...}`. Register with `ModelRouter.register(kind, renderer)`.
|
| 51 |
+
Phase 2 ships `WanRenderer` (diffusers `WanPipeline`) behind this exact interface.
|