Forge
markdowndeeb25a2
1# UX spec: Agent Verify Epoch View v1
2
3**Статус:** Accepted (W3 target)
4**Дата:** 2026-05-31
5**Норма:** [ADR 0148 §8–§10](../adr/0148-agent-execution-environment-verification-ladder-and-native-tooling.md)
6**Naming:** [naming-layers-v1.md](naming-layers-v1.md) §1
7**Parity:** [0002 debug-human-agent-parity](../adr/0002-debug-human-agent-parity.md)
8
9## Цель
10
11Оператор видит **тот же verify state**, что orchestrator и агент — не «агент сказал green» (Cursor), а **epoch + rung ladder + snapshot + time slices**. Human и agent — **один** `VerificationLadder` API и **одни** DataBus projections.
12
13---
14
15## Surfaces (MLP)
16
17| Surface | Роль | Wave |
18|---------|------|------|
19| **Chat trace** (collapsible per run) | Primary narrative; `/agent last` | W3 ✓ partial |
20| **PFD `AgentEnvironmentInstrument`** | Glance: active task, cancel, stale glyph | W3 |
21| **Slash** `/agent verify\|status\|cancel\|last` | Operator parity | W3 ✓ partial |
22| **Gutter / editor chrome** | `AgentVerifyEpochStale` → dim files in dirty set | W3+ |
23| **Error list / F8** | `diagnose.files` parity (not substitute for epoch) | existing |
24
25---
26
27## Widget: Verify Epoch block
28
29Один блок на **verify epoch** (не на каждый environment task в isolation). Header + rung list + footer.
30
31### Header
32
33```text
34Verify · {verify_policy} · epoch {short_id}
35snapshot {verify_snapshot_id_short} · {git_head_7}{dirty_suffix}
36```
37
38| Field | Source |
39|-------|--------|
40| `verify_policy` | `minimal` \| `standard` \| `strict` \| `ci_parity` |
41| `short_id` | first 4–6 of `run_id` or epoch id |
42| `verify_snapshot_id` | HEAD + hash dirty paths @ start |
43| `dirty_suffix` | ` · 3 files dirty` if non-empty |
44
45**Stale header overlay:** `⚠ verify устарел — snapshot изменился ({reason})`
46Reasons: `write_in_epoch` \| `superseded` \| `cancel` from `AgentVerifyEpochStale`.
47
48### Rung list (ordered)
49
50Для каждого rung в climb (monotonic до fail или policy cap):
51
52```text
53 ✓ diagnose.files 0.8s
54 ✓ build.affected 9.1s
55 ⟳ test.scoped running… [Cancel]
56 ✗ compile.project failed (2 errors) [Details]
57 — test.full (not required)
58```
59
60| Glyph | State |
61|-------|-------|
62| ✓ | pass |
63| ⟳ | running ( spinner ) |
64| ✗ | failed (compile/test/diagnostics) |
65| ⊘ | cancelled |
66| ☠ | host died (`AgentEnvironmentTaskDied`) — **not** failed tests |
67| — | skipped / not required by policy |
68
69**Labels:** semantic id + RU tooltip from naming registry; **no** `L0`–`L4` in UI.
70
71**Details** opens structured DTO: diagnostics[], test_results[], log_ref — not raw stdout only.
72
73### Footer (time accounting)
74
75```text
76Reasoning: 4.2s · Environment: 16.8s · Blocked: 0.3s
77Status: green (standard) · max rung: build.affected
78```
79
80**Green rule (MLP):** показывать **green** только if all:
81
821. `AgentRunCompleted.green == true`
832. `max_rung_reached` ≥ policy minimum rung
843. epoch **not stale** on current workspace snapshot
85
86If agent text says «done» but epoch stale → show **⚠ not verified on current snapshot** (anti Cursor-green).
87
88---
89
90## PFD instrument (compact)
91
92Single line + expand:
93
94```text
95⟳ build.affected 9.1s [Cancel] · standard
96```
97
98Expand → same rung list as chat (shared ViewModel from DataBus projection).
99
100Stale: amber border + `⚠ stale`.
101
102Died: red + `☠ environment died` + [Retry verify].
103
104---
105
106## DataBus subscription (ViewModel)
107
108| Event | UI action |
109|-------|-----------|
110| `AgentRunStarted` | New epoch block; reset rungs |
111| `AgentRunPhaseChanged` | Update phase chip (reasoning / environment) |
112| `AgentEnvironmentTaskChanged` | Map `task_kind` → rung; progress |
113| `AgentEnvironmentTaskCompleted` | Rung ✓/✗; duration |
114| `AgentEnvironmentTaskDied` | Rung ☠; alert |
115| `AgentVerifyEpochStale` | Header overlay; gutter dim hook |
116| `AgentRunCompleted` | Footer green/red; freeze rung list |
117
118Payload field **`max_rung_reached`**: semantic string (`build.affected`), not `L2`.
119
120---
121
122## Human parity checklist
123
124- [ ] `/agent verify standard` renders **identical** block to autonomous run
125- [ ] Cancel instrument cancels runner + supervised host token
126- [ ] Write to file in `in_verification` set → stale **before** compile finishes
127- [ ] Two parallel verify chains **impossible** (UI shows single active epoch)
128- [ ] Failed tests (✗) visually distinct from host died (☠)
129
130---
131
132## Non-goals (W3)
133
134- `idle_user` time slice in UI (W3+ analytics)
135- Auto-rollback operator tree on failed verify
136- L4/ci_parity as default policy
137
138---
139
140## История
141
142| Дата | Изменение |
143|------|-----------|
144| 2026-05-31 | v1: MLP surfaces, green rule, semantic rung labels |
145
View only · write via MCP/CIDE