Add: high-level design with Mermaid diagrams, linked from the README - #82
Merged
Merged
Conversation
docs/HLD.md maps how rune works end to end, true to the code on main: components, the run/watch/session execution models, the session supervisor's event loop, the settle decision, the control protocol, the transcript and its bounds, on-disk state, release, security boundaries, and timeouts and limits. 17 Mermaid diagrams (flowcharts, sequence, state and ER), each validated with mermaid-cli. The README's existing Architecture & Internals section gains one overview diagram and a link. Docs only: no source, spec, spec-sync or translation files change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V3ZZAEiUP7xRJPozhZb6rL
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
docs/HLD.md, a high-level design of rune written against the code onmain(1f3372d). It covers purpose, context, components, the three execution models (run,watch,session), key flows (dispatch, run, watch, session start, send and settle, read and list, attach, stop and archive), session internals (lifecycle, the supervisor's event loop, thePendingSendsettle decision, the control protocol, transcript bounds), on-disk data, runtime and release, security and trust boundaries, failure modes with a timeouts table, decisions and a glossary.ROADMAP.md,CHANGELOG.md, the SpecSync change records andharnesses/.Notes for review
setsid.startspawns the supervisor withpgroup: true. That makes it a process-group leader, so its ownProcess.setsidcall is refused (EPERM, and the code rescues it). I measured this on macOS for this PR: I started a realrune session start -- sleep 120from bash inside a PTY, then closed the PTY and sent SIGHUP to the shell. The supervisor kept the shell's session id, led its own process group, and survived. The HLD states this and marks Linux and other shells as Unknown. Two places describesetsidas the mechanism: the comment onSupervisor#detach_from_terminaland theAGENTS.mdline "detached (Process.setsid)". No code is changed here.docs/andREADME.mdare not inmeaningful_paths, and no active change listsREADME.md, so nothing goes stale. I deliberately leftdocs/sessions.md,ROADMAP.md,specs/anddocs/i18n/alone, because they appear in accepted changes' affected paths.docs/i18n/README.*.mdfiles do not get the new section. The README says the English file is authoritative.hi/andINTENT.mdalready exist.hi checkpasses (155 criteria, 11 families), and no criteria changed.Test Plan
bunx -p @mermaid-js/mermaid-cli mmdcdocs/HLD.mdandREADME.mdresolvesfledge run docs-checkpassesfledge lanes run verifypasses (642 examples, 0 failures, spec coverage 100%)fledge trust verifypasses on the committed rangehi checkpasses🤖 Generated with Claude Code
https://claude.ai/code/session_01V3ZZAEiUP7xRJPozhZb6rL