Repository navigation
feat: keep each session's own plan and put it up for review - #1568
Merged
Merged
Conversation
The mission's unknown-key, cycle and upstream walk move to herdr-core/src/dag.rs so a session's plan can share them. The mission tests pass unchanged (38 passed: runtime::tests::missions, missions::tests, dag::tests).
Adds hide plan set/node/approve/drop/show, answered by the core over the pane capability. Plans are saved beside the session record in the link store (schema 8) and deleted with the session. A plan put up with --ask lays a question on the agent's row, so the band, the second line and the bell show 계획 검토 · N단계. The prompt hook keeps the core's small plan summary in the pane's record and adds its line to the context. The pre-tool hook reads only that record to refuse writes, commits and pushes under review, a merge by a PR-scope mission worker, and force pushes or rebases in any Hide pane. The plan_context shape is fixed in contracts/delivery-envelope.json and checked from both the core and the hook.
A short stub that sends the agent to hide plan help; the kit writes, observes and removes it with the other two.
…ecord Adds the plan detail item, prunes it with the session, pins the plan enums and the detail item kinds in the wire contract, and gives the session record the plan as its map draws it.
…ission nodes The plan chip takes the old task chip's place and ⇧⌘U, its popover is the small map, Larger and the pane menu's Plan open the map in the 보기 slot, the second line shows the current step, mission cards read the worker's plan, the record gains a Plan section, and Settings › Agents lists the three Hide skills.
# Conflicts: # contracts/hide-cli.json # hided/src/cli_contract.rs # web/src/shortcuts.test.ts
# Conflicts: # herdr-core/src/model.rs
# Conflicts: # herdr-core/src/model.rs # herdr-core/src/runtime/detail.rs # web/e2e/s2.spec.ts # web/src/DetailPanel.tsx # web/src/shortcuts.test.ts # web/src/snapshot.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
에이전트가 자기 일의 계획을
hide plan으로 올리면, Hide가 그 단계를 pane 옆 지도로 그리고 매 프롬프트에 지금 단계를 알려 줍니다.--ask로 올린 계획은 운영자의 검토를 기다리는 질문이 되어 pane 띠, 사이드바 둘째 줄, 벨, 폰에 같은 길로 뜨고(core는 문구 없이ask_subject{cause: plan_review, steps}만 보내고 각 화면이 자기 언어로 씁니다), 에이전트가hide plan approve할 때까지 파일 쓰기와git commit/git push가 막힙니다.pane 머리의 옛 작업 칩 자리에 계획 칩(
n/m, 검토 중이면Review)이 생기고, 팝오버는 작은 지도,크게 ›는 보기 칸의 큰 지도입니다.계획은 세션 기록과 같은 저장소에 남아 재시작 뒤에도 읽히고, 세션이 지워지면 함께 지워집니다.
검토로 올린 계획(영어 UI): 칩
Review, pane 띠와 사이드바 둘째 줄이Plan review · 5 steps로 묻습니다. 한국어 UI에서는계획 검토 · 5단계입니다.Review
done단계는done인 채 "바뀜"으로 남깁니다(빠진 나머지는dropped).n/m이 뒤로 가지 않게 하려는 선택입니다.--size-plan-node-compact: 144(팝오버 작은 지도의 카드 폭).herdr-core/src/runtime/plans.rs- runtime mutex 안의 일.refresh_plan_reviews가 snapshot 경로에서 계획 책이 바뀐 때만 보이는 행에 검토 질문을 다시 얹고, 얹었던 것만 걷어 냅니다.herdr-core/src/agent_state/turn.rs,header.rs,tally.rs- snapshot wire. 행의ask_subject가state.line.subject,state.ask.subject, 띠subject, 벨과 폰 알림의subject로 그대로 갑니다(ask_subject_cause를snapshot-wire-enums.json에 등록). 이 행은detail이 비고 상태 단어만 남습니다.web/public/m/sw.js,web/src/mobile/push.ts- 폰이 닫혀 있어도 알림을 쓰도록 페이지가{{count}}를 남긴 문구를 서비스 워커에 넘기고, 워커가 단계 수를 채웁니다.herdr-core/src/runtime/snapshot_delta.rs- snapshot wire. 위 호출이refresh_missions앞에 들어갑니다.herdr-core/src/links/- 링크 worker가 유일한 SQLite writer, 스키마 9에ledger_plans표(#1565의 8 다음).hide-agent-hooks/src/plan_record.rs,hide-agent-hooks/src/delivery.rs- failure path. PreToolUse는 core를 부르지 않고 pane 기록 파일만 읽습니다. 읽지 못한 계획 요약은 요약만 버리고 편지는 그대로 전합니다.herdr-core/src/dag.rs- 미션 그래프 코드를 옮긴 것(동작 그대로, 미션 테스트 77개 통과).plans.edit비교 한 번입니다. 계획이 바뀐 publish에서만 행 복사, lineage, 읽음 축을 다시 돕니다. 계획은 128개(PLAN_LIMIT), 단계는 64개(plan_too_large)로 막히고,laid는 보이는 pane으로 잘립니다.Evidence
web/e2e/plan-review.spec.ts.--ask→ 칩 Review, 띠와 사이드바Plan review · 4 steps(영어 UI), approve → 띠와 사이드바가 비고 1/4, 일하는 단계가 둘째 줄, 순서 거절plan_order_refused, 2/4, 팝오버 4단계,크게 ›→ 보기 칸 큰 지도(아래로 흐름), drop → 칩 사라짐.hide를 부르지 않고 거절), hided CLI 계약, hide-kit, web 전체(scripts/verify-web.sh), design contract, cargo lint(clippy, fmt).추가 증거
approve 뒤: 묻기가 사라지고 칩
1/5, pane 둘째 줄이core 이벤트 · 이벤트 쓰는 중.칩 팝오버: 끝난 단계 채움, 지금 단계 진행색과
Now, 기다리는 단계 점선,PR꼬리.크게 ›가 보기 칸에 큰 지도를 엽니다.Verification record
hide-plan(D-01..D-30, B1..B24), heade52d7f7b7(main merged four times:02f9043c0,d55a5218ewith feat: keep checkout Git state current with a background fetch and one merge judgment #1564,68e6fcba4with feat: let pull request facts and flow changes settle stale session record states #1565,8a6ca61afwith feat: replace the Memory and PRs tools with the Project tool and a sidebar PR list #1567; the last keeps both sides' 보기 items, Plan beside Worktrees and Cost, and 55 shortcut rows).e6e898dc3): the row carriesask_subject, and web, bell and phone word it withplan.askReview; core test compares the wire structure, web tests cover en/ko line, bell and service worker; e2eplan-review.spec.tspasses with the English text; isolated capture replaced.e6e898dc3: Code review found a raised ask (a blocked delegated child carrying the subject) would word the label line on its root;22e41901acarriessubjectonRaisedAskto the root's ask, band, turn card and tree popover, with a core test. A plain laid review does not raise on its own (ChildBlockedneeds the child's own block), so this was a latent path. Fidelity review: the same popover sites, fixed by the same commit; no other Fix now. Follow-ups:overviewTasks.cardLinereads onlyask.what(its one consumer falls back to the subject).sasu implement verify: PASS one52d7f7b7(and on22e41901a,8a6ca61af); CIverifygreen one52d7f7b7(run 39855795741). The phone's cached words now include the plan review template (mobile.spec.tsexpectation,e52d7f7b7). Code review of the8a6ca61afmerge: no Fix now.sasu implement verifyPASS on68e6fcba4(S1verify-cargo.sh test, S2verify-cargo.sh lint), and earlier on02f9043c0and7582bce1e.3c96a8381each failed one unrelated timing test under machine load (load average 20 to 28):memory_analysis::...a_linked_node_s_closed_session...andmemory_hook::...short_continuations...(DeadlineforEmpty). Each passed alone, neither file is in this diff.closed_result);ledger_plansis version 9, applied after it in the same migration. Code review of the move: no Fix now (a store a pre-merge build of this branch stamped 8 would missclosed_result; only throwaway candidate stores).6195d35af: 6 Fix now, 5 fixed (done steps on replan,--jsonrevise route, record 지금 line, waypoints icon,plan_not_yourstest), 1 left to the reviewer (B20 per-skill off). Follow-up on3c96a8381: no Fix now.6195d35af: 4 Fix now, all fixed (plan_too_largeand--jsonerrors as JSON, review question lifted from shown rows,--jsonrevise route, unreadable plan summary keeps the letters). Follow-up on3c96a8381: no Fix now.drop_detail_itemsfixes it for plans and missions (2b4b5ad79). Both reviews of02f9043c0..7582bce1e: no Fix now.s2.spec.tsshortcut count 53 vs 54 with Show plan) fixed in7582bce1e./clear, device clock skew, pane record cleanup, eviction note, OpenCode and Pi helper test,git rebase --continue, a documents-return assertion on the plan delete path, re-reading a record under a dropped plan.web/e2e/plan-review.spec.ts.