Cleanup stale documents across all repos #12
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
residual/.agent#12
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Plan: Cleanup stale documents across all repos
Goal
Audit and clean up stale documentation across the residual workspace. Some documents are entirely superseded by the
core/consolidation and should be deleted. Others have specific stale sections that need rewriting.Background
The great
core/consolidation happened months ago: all core binaries (res,res-init,res-console,res-sh,res-login,res-edit) and shared libraries were folded into the singlecore/Go module. Old per-app repos (init/,console/,shell/,auth/,res/,editor/) no longer exist. Many documents still reference the old layout, old binary names (residual-*), old package paths (core/proc/instead ofcore/lib/proc/), and old build instructions.Documents to DELETE
1.
CLAUDE.md(workspace root)AGENTS.md. Contains pre-core repo layout, old binary table, old build instructions (cd init && go build ./cmd/res-init), old.agents/reference, old dependency graph.2.
.agent/notes/architecture.mdinit/,console/,shell/,auth/,res/as separate repos with their owngo.mod. Sayscore/has no binaries. Entirely wrong.Documents to REWRITE
3.
docs/init-design.md— Major rewriteinit/,login/,console/,editor/,shell/)core/proc/,core/ipc/,core/lock/,core/script/→ should becore/lib/proc/, etc.console/script/lua.go(doesn't exist)core/lock,core/ipc,core/proccore/script/,core/lock/residual-init.service,/etc/init.d/residual-init), PAM names, runit names — these are correct by design.4.
docs/os/os.md— Major rewriteresidual-login,residual-sh,residual-console→res-login,res-sh,res-consoleresidualwith subcommands → should beres-osinit/residual-init→ to be renamedresidual-initramfs(verify if this happened)5.
docs/architecture.md— Minor rewritecore/script/→core/lib/script/,core/proc/→core/lib/proc/6.
docs/design/tooling.md— Minor rewritecd init && go build ./cmd/res-init) → singlecd core && go build ./cmd/...7–10. Console docs — Title/header fixes
docs/keymap.mdline 41:residual-console→res-consoledocs/console/console.mdline 1:residual-console→res-consoledocs/console/console-design.mdline 1:residual-console→res-consoledocs/console/scripting.mdline 1:residual-console→res-console11.
docs/design/aesthetic.md— Minor fixresidual-console→res-console12–14.
core/.agent/claude/fileshandoff.md: Binary table shows old separate repos → update tocore/single modulenotes.md: Claims top-level dirs are independent repos, staleeditor/sidebar.gopath → updatetodo.md: Saysres-editexists ineditor/→ update tocore/cmd/res-editDocuments to REVIEW
15.
os/README.mdinit/residual-init→ to be renamedresidual-initramfs. Verify if rename happened. Update or remove planning notes.Implementation steps
CLAUDE.mdand.agent/notes/architecture.mdresidual-console→res-console,residual-edit→res-edit,residual-sh→res-sh,residual-login→res-loginacross all docscore/proc/→core/lib/proc/,core/ipc/→core/lib/ipc/,core/lock/→core/lib/lock/,core/script/→core/lib/script/,core/tui/→core/lib/tui/docs/init-design.md: Update architecture diagram and all package pathsdocs/os/os.md: Update binary names, verify persistence CLI name, clean up initramfs notesdocs/design/tooling.md: Update build commandscore/.agent/claude/files: Update repo layout descriptionsos/README.md: Verify initramfs hook statusgo build ./... && go test ./...incore/andextra/Risks
docs/init-design.mdis a large canonical document. Rewriting it risks introducing new errors. Consider doing it in a separate PR from the minor fixes.residual-*references may be intentional (systemd service names, PAM service names, unix group names). Do not blindly replace — verify context.core/.agent/claude/files are agent operational memory. Rewriting them affects future agent sessions. Be careful to preserve useful warnings (e.g., "old paths likecore/proc/").Verification checklist
core/proc/,core/ipc/,core/lock/,core/script/,core/tui/as package pathsinit/,console/,shell/,auth/,res/are separate repos with their owngo.modresidual-console,residual-edit,residual-sh,residual-loginas binary names (except for systemd/PAM/runit service names)docs/init-design.mdarchitecture diagram reflectscore/single moduledocs/os/os.mdusesres-osfor persistence CLIgo build ./... && go test ./...passes incore/andextra/Corrections from user review
1. CLAUDE.md should be REWRITTEN, not deleted
CLAUDE.md is intentionally kept as a copy of AGENTS.md for devcontainer/Claude Code context. It should be rewritten to match the current AGENTS.md (post-core consolidation), not deleted. The stale content (pre-core layout, old binary table, old build instructions) needs to be updated to the current single-module
core/layout.2. Binary naming:
residual-loginis correct,res-loginis wrongThe login manager has no reason to be a subcommand of the
resutility. It should keep theresidual-prefix:residual-loginres-loginThis affects:
core/cmd/res-login/— directory may need renaming, or binary output name changedres-login→residual-loginres-login)docs/os/os.md(already usesresidual-login— this was actually correct)docs/keymap.md,docs/console/*.md,docs/design/aesthetic.md— verify if any mentionres-loginException: Systemd/PAM/runit service names like
residual-login@.serviceand unix groupresidual-initare correct by design and should NOT be changed.3. Updated action items
CLAUDE.mdto match currentAGENTS.md(singlecore/module, current binary names)docs/os/os.md— it already usesresidual-login, so it may be partially correct alreadyAGENTS.md— changeres-login→residual-loginin binary table and all referencescore/cmd/res-login/— rename directory or change build output toresidual-loginres-login→residual-loginwhere it refers to the binary4. Note on
residual-*vsres-*namingThe user has clarified that
residual-loginis the exception. Other core binaries (res-console,res-sh,res-edit,res-init,res) correctly use theres-*prefix. Onlyres-loginwas wrong.Additional correction:
residual-initnamingThe
res-init→residual-initrename also applies:residual-initis the system-level init daemon. It keeps theresidual-prefix.res-initis reserved for a separate future tool (not the init daemon).res-*prefix.Files affected by
res-init→residual-initAGENTS.md— binary table saysres-initcore/cmd/res-init/— directory may need renaming or build output changeddocs/init-design.md— referencesres-initthroughoutdocs/res-init-client.md— referencesres-initdocs/README.md— referencesres-initdocs/os/os.md— verify current usagecore/internal/libs/init/— package comments may reference binary namecore/cmd/res-demo/— demo tool may referenceres-initComplete naming convention (confirmed)
residual-initresidual-residual-loginresidual-ressubcommand)resresres-consoleres-res-shres-res-editres-res-osres-res-demores-res-themeres-res-calcres-res-coderes-res-sheetsres-Updated action items for issue #12
CLAUDE.mdto match currentAGENTS.mdAGENTS.md—res-login→residual-login,res-init→residual-initcore/cmd/res-login/→residual-login(directory or build output)core/cmd/res-init/→residual-init(directory or build output)docs/init-design.md—res-init→residual-initdocs/res-init-client.md—res-init→residual-initdocs/README.md—res-init→residual-init,res-login→residual-logindocs/os/os.md— already usesresidual-login, checkres-initusageres-login→residual-login,res-init→residual-initStarting implementation. Build mode engaged.
Implementation complete ✅
All changes from the stale document cleanup plan have been implemented and pushed.
Changes made
Workspace root (residual/.agent):
AGENTS.md—res-init→residual-init,res-login→residual-loginCLAUDE.mdto match currentAGENTS.md.agent/notes/architecture.md(pre-core layout)core/ repo:
cmd/res-init/→cmd/residual-init/cmd/res-login/→cmd/residual-login/core/.agent/claude/handoff.md,notes.md,todo.mddocs/ repo:
docs/init-design.md— fixed architecture diagram, dependency graph, package paths, binary namesdocs/os/os.md— fixed binary names (residual-sh→res-sh,residual-console→res-console, persistence CLIresidual→res-os)docs/architecture.md— fixed package paths and binary namesdocs/design/tooling.md— fixed build commands and binary namesdocs/design/aesthetic.md— fixedresidual-consolereferencedocs/design/lua-scripting.md— fixedres-initreferencesdocs/keymap.md— fixed titledocs/console/console.md— fixed titledocs/console/console-design.md— fixed titledocs/console/scripting.md— fixed titledocs/res-init-client.md— fixed allres-initreferencesdocs/res-dispatcher.md— fixedres-loginreferencedocs/README.md— fixed binary names.opencode/agents/*.md— fixed binary names in agent harness files.opencode/skills/residual/SKILL.md— fixed binary names and pathsVerification
cd core && go build ./...— PASScd core && CGO_ENABLED=1 go test ./...— PASScd extra && go build ./... && go test ./...— PASSCommits pushed
residual/.agent:d2d63dc— docs: update AGENTS.md binary names, delete stale architecture.mdresidual/core:99ef311— refactor: rename cmd/res-init → cmd/residual-init, cmd/res-login → cmd/residual-loginresidual/docs:5e15a56— docs: fix stale binary names, package paths, and build commands