Skip to content

에이전트 계층을 루트에서 보이게: 승격은 루트로, 자식은 어디서나 같은 트리로 - #892

Merged
yansfil merged 20 commits into
mainfrom
gen-prd/agent-hierarchy-screens
Oct 9, 2026
Merged

yansfil merged 20 commits into
mainfrom
gen-prd/agent-hierarchy-screens

Conversation

@yansfil

@yansfil yansfil commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Related: PRD agents/prd/agent-hierarchy-screens/prd.md · 같은 영역의 직전 작업 #861, #862, #869 · 막힘 상태 #890 위에 합침

Summary

  • 하위 어디서 막히든 그 계보의 루트 한 줄이 사이드바와 Sessions의 Needs You에 오르고, 막힌 자손은 따로 오르지 않는다.
  • 승격 줄과 pane header band는 원인별 동사(승인 · 답변 · 확인 · 초안), 무엇을, 누가 순서로 쓰고, Open은 손댈 pane으로 간다.
  • 자식은 사이드바, Home, Sessions 어디서나 같은 트리로 보인다. 손자까지 레일로 들여쓰고, 접힌 행은 자손 표시(! N, ● N)를, 행마다 PR 아이콘 하나를 단다.
  • 트리 팝오버가 증손 이하와 외 N건을 열고, 끝나고 읽은 자식은 끝난 자식 N 아래로 접힌다.
  • Sessions는 사이드바와 같은 이름의 그룹(Needs You · Working · Done · Idle · Resolved 24h)으로 바뀌고, Factory 카드도 같은 자손 표시를 쓴다.
  • #890의 막힘(▲), 멈춤(◐), 대기를 트리에 합쳤다. 막힘은 동사 대신 원인 문장을 두 번째 줄에 남기고, 읽은 막힘은 새로 올라온 ask에 자리를 내준다.

사이드바 트리: 루트 아래 자식과 손자가 레일로 이어지고, 행마다 PR 아이콘과 접힌 자손 표시가 붙는다 (gallery, Light)

Review

  • 판단해 주세요: 열린 checkout 행의 목적 줄이 사라졌다(B35). 트리가 그 자리를 쓰기 때문인데, 접힌 checkout에서만 목적을 보는 것으로 충분한지.
  • 판단해 주세요: 트리 행은 한 줄이라(B14), 읽은 AI 질문의 요청 줄과 #890의 "대기 · …", "멈춤 · …" 줄은 트리에 남지 않는다. 막힘의 원인 줄만 남긴다(에이전트의 막힘, 멈춤, 대기를 사이드바에서 구분해 보인다 #890 B2).
  • 판단해 주세요: 접힌 부모의 자손 표시는 올라온 ask와 일하는 자손만 센다(D-40). #890이 배지에 세던 막힌 자식 수는 트리를 펼쳐야 보인다.
  • 조심해서 볼 파일: herdr-core/src/agent_state/escalation.rs - snapshot wire(RaisedAsk.raised_pane_id)와 승격 판단이 바뀐다. 원인별 동사와 미수신 문구가 여기서 정해진다.
  • 조심해서 볼 파일: herdr-core/src/agent_state/turn.rs - demand_verb가 읽은 AI 질문과 읽은 막힘을 루트의 할 일에서 뺀다. #890과 합친 자리라 행 표시, 마크 색, Needs You 판단이 여기서 갈린다.
  • 조심해서 볼 파일: herdr-core/src/agent_state/tally/scope.rs - runtime mutex 안에서 checkout마다 사이드바 트리를 만든다. 한 번만 만들도록 중복 호출을 지웠다.
  • 조심해서 볼 파일: web/src/components/agent-tree-popover.tsx, web/src/PaneHeaderBand.tsx - 묻는 행을 raised_pane_id로 찾고, 연결 안 된 기기의 Open을 막는다.
  • 비용 검토: 승격 lift는 행마다 조상을 다시 걷는다(계보 깊이에 비례). 고빈도 경로의 입력당 작업은 늘지 않고, publish는 상태 전이 때만 일어난다.

Evidence

  • 확인한 것: 결정적 verify(verify-cargo.sh test, lint)가 #890을 합친 head에서 PASS. herdr-core 1884개, hided 포함 2299개 통과.
  • 확인한 것: verify-web.sh 웹 1326개(1 skip), desktop unit 162개 통과. check-design-contract.mjs 통과.
  • 확인한 것: #890을 합친 뒤 blocked-state, sidebar-status, session-panel, projects-sidebar, overview, session-readers, lineage-session e2e 통과.
  • 확인한 것: web e2e 전체 249개 중 246개가 #890을 합치기 전 head에서 통과했고, 실패 3개는 고친 뒤 재실행에서 통과. 합친 뒤 전체 실행은 CI가 맡는다.
  • 확인한 것: desktop e2e 전체 67개 중 58개 통과, 8개 skip, 1개(session-labels)는 B14에 맞춰 옮긴 뒤 단독 재실행 통과.
  • 확인한 것: design review가 pane-header, session-panel, projects-sidebar에서 Pen r2 대비 Light/Dark 모두 PASS(합친 뒤 다시 실행).
  • 확인한 것: 승인된 디자인 후속(Dark 팝오버 레일 토큰 강화, Light PR 아이콘에서 빨강과 주황 구분)이 실제 화면 캡처로 확인됨.
  • 확인하지 못한 것: 설치된 앱(/Applications/hide.app)에서의 실제 계보 확인은 하지 않았다. 지시상 설치와 실행을 하지 않았고, 확인은 gallery, e2e fixture, 격리된 Herdr로 했다.
  • 확인하지 못한 것: 로컬 cargo test 중 bell_intake::the_bell_turn_receives_the_letter_bodies_and_confirms_them(이 PR이 손대지 않은 crate)이 부하 중 한 번 실패했다. 단독 8회는 모두 통과.
  • 확인하지 못한 것: 이 Mac의 전역 commit 서명 때문에 hide-host git 테스트와 cmdk.spec:215가 로컬에서만 실패하고, 서명을 끄면 통과한다. CI는 영향 없다.
  • 생성물: design/hide-screens.pen은 main의 파일에서 합친 생성기로 다시 만들었다. 한쪽만 바꾼 시트는 그쪽과 같다. gallery fixture(agentScopes.json, agentStates.json)도 diff가 크다.
추가 증거

Sessions: 승인된 Pen r2(왼쪽), 현재 Pen, 실제 화면(오른쪽). Needs You · Working · Done · Idle 그룹 (Light)

Pane header: 원인별 band와 조상 경로, Pen r2 대비 실제 (Dark)

후속으로 남긴 것:

  • 다시 뿌리를 옮긴 트리 팝오버에 원래 부모로 돌아가는 길이 없다.
  • 세 단계보다 깊은 곳에서 올라온 ask는 팝오버에서 손자의 자손 표시로만 보인다(트리는 2단계, D-12).
  • 여러 PR 목록 hover는 포인터로만 고를 수 있고, 키보드로는 닿지 않는다.
  • band hover 문구("경로 다음 checkout · N분째 동사 대기")를 단위 테스트가 확인하지 않는다.
  • 분 단위 문구는 snapshot 사이에 멈춰 있고, agentScopes.json에는 옛 sessions/work 모양이 남아 있다.
  • lift는 행마다 조상을 다시 계산한다(lineage_path_pane_ids로 줄일 수 있음). 트리 레일의 border-l-2는 토큰이 아닌 폭이다.
  • 자동 Resolve가 wait(백그라운드 작업, 답장 대기)를 보지 않는다. 막힘 band의 +N은 팝오버를 열지 못한다. 요청 집계(scope.rs VERBS)에 blocked가 없다(main과 같음).
Verification record
  • PRD: agents/prd/agent-hierarchy-screens/prd.md (sha256 68f370e815271d2cb5a8c6fe4f549a64fd3088a3ac45a7f44129f7981769361f)
  • Base ec61754 → head 36feb61, verified 2026-10-09T18:49:50.900Z: PASS
  • Verification report: agents/runs/agent-hierarchy-screens/verification-report.json and agents/runs/agent-hierarchy-screens/verification-report.md; source fingerprint 9fe3702577bf19b095ae8c67820fbe23cb686760563c2158181227bea553b678
  • Suites:
    • S1: GREEN bash scripts/verify-cargo.sh test (exit 0)
    • S2: GREEN bash scripts/verify-cargo.sh lint (exit 0)
  • Reviews:
    • Fidelity + Code (first, head 5195edd): Fix now were the e2e selectors to port, Draft asks keyed by the named pane, Home trees, the band's Open while disconnected, the hover path repeat, read-question demand, the B18 finished fold, the multi-PR hover list, the native-question verb, grandchild ArrowRight, the duplicate sidebar tree build and broad store reads. All fixed in e51ba10..ee42827.
    • Fidelity + Code (follow-up, head ee42827): all 13 prior items fixed (B18 partial). Fix now: a child's own native question claimed its parent had not received it; fixed in 0890706 with a test. Also fixed: the finished fold hiding a raised descendant, a draft's Open checking the wrong device, a vacuous e2e assertion. Follow-ups are listed above.
    • Merge resolution review (head 5d0b1f2, merge of main with 에이전트의 막힘, 멈춤, 대기를 사이드바에서 구분해 보인다 #890): nothing from 에이전트의 막힘, 멈춤, 대기를 사이드바에서 구분해 보인다 #890 dropped. Fix now: a read block hid a newer raised ask, and a waiting raised root drew its ask in working blue; both fixed in 36feb61 with a test. Also fixed: a read block's cause in Sessions, ja Idle group word, stale band and Resolved docs.
  • Evidence: none registered separately.
  • Changed paths: 95 (see Files changed)
  • Delivery: mode pr, branch gen-prd/agent-hierarchy-screens, base main

yansfil added 20 commits October 9, 2026 23:48
…s by agent state

A raised descendant at any depth now puts its lineage root, once, in Needs You
with the verb and what to do; the descendant keeps its own group. Each row
carries its own PR summary and a descendant mark, Sessions groups by the
agent's own state (Needs You, Working, Done, Idle, Resolved) with a 24-hour
Resolved window, and Sessions keeps its own tree folds.
…d 2 design: review targets, gallery tree rows, no issue or branch chips on tree rows
… mark and the regrouped Sessions in the owning guides
… the device rail, draw the fold row's chevron, and give the scene a two-level tree with asks, PR states and a fold
… raised row on each ask, keep a read AI question from asking, and build each checkout's sidebar tree once
…e tree popover, open Home trees in place, list several PRs under the sidebar icon, and block a band's Open while its device is not connected
…ant mark, the header's tree button and popover, the five Sessions groups, and the one-line open checkout
…he hook count never changes, and format the lift and demand verb changes
…ep finished children with a raised or working descendant unfolded, and check a draft's Open against the parent's device
…ne line, and say how a tree row's ask line differs from a raised row's request line
…hy-screens

The blocked, stopped and waiting states from the agent-blocked-state work
join the agent tree: a block keeps its cause as a tree row's line and as its
Sessions line instead of an ask verb, a stopped turn is the Idle row's
unfinished line, and waiting on children is the wait the core now names.
design/hide-screens.pen is regenerated from main's file with the merged
generators, so every sheet only one side touched matches that side.
…n the warning colour while it waits, keep a read block's cause in Sessions, and correct the band, Resolved and ja Idle wording
@yansfil
yansfil merged commit 56a4d1b into main Oct 9, 2026
20 checks passed
@yansfil
yansfil deleted the gen-prd/agent-hierarchy-screens branch October 9, 2026 19:09
yansfil added a commit that referenced this pull request Oct 9, 2026
Related: #892 (main turned red in the remote mailbox lane after it
merged)

## Summary

-
`remote_delivery::connected_remote_panes_receive_once_and_disconnect_keeps_the_same_letter_pending`
timed out waiting for the bell of the letter sent just before the device
disconnects.
- Cause: the doorbell tried that letter in the moment the SSH link
dropped, the Herdr call failed, and a failed ring waits for the pane to
move (the bell might have been typed). The device came back with the
pane idle at the same state sequence, so it never moved and the letter
was never rung again.
- Fix: when the pane or its device's link goes away after a failed ring
(`pane_unavailable`), that wait ends, and the letter is tried again once
the link is back. A bell that had started a turn would have moved the
pane, so this cannot type a second bell into a turn the first one
started.
- #892 did not add the bug; it changed timing so the doorbell now
reaches that letter before the disconnect more often (traced below).

## Review

- **조심해서 볼 파일**: `herdr-core/src/delivery/doorbell.rs` - failure path of
the bell: when a failed ring may be retried decides whether a bell can
be typed twice.
- **질문**: is "the link went away and came back with the pane unmoved" a
safe enough signal that the first bell never landed, or should the retry
also require a new state sequence from Herdr?

## Evidence

- **확인한 것**: a new doorbell test drives the fake Herdr through a ring
that fails as the link drops, the link going away (`pane_unavailable`),
and the link coming back: with the fix the letter is rung once; with
`link_lost` disabled nothing is typed (the CI symptom). herdr-core and
hided: 2302 tests pass.
- **확인한 것**: TEMP trace runs (#894 on main, #895 on the commit before
#892, coordinator and doorbell logged, every run directory kept):
pre-#892 4/4 passed with no `doorbell.failed`; main 3/4, and the one
failure is the only run with `doorbell.failed herdr_call_failed` for
that letter, after which the reconnected coordinator connected and
published but the letter was never tried again.
- **확인한 것**: the remote mailbox test passed 6/6 locally on macOS before
the fix (the race needs the CI runner's timing).
- **확인하지 못한 것**: why #892 moved the doorbell's first look at the letter
earlier was not isolated; the fix removes the dependency on that timing.
The eight-repeat TEMP run with this fix is linked in a comment when it
finishes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant