Repository navigation
Description
installManPagesTo in cmd/internal/cli/selfinstall.go generates the app's own man pages with
doc.GenManTree, then lists every file in <prefix>/share/man/man1 and returns the lot as "installed".
installManPagesUnderPrefix records each with its SHA-256 in the app's manifest. self uninstall removes
every manifest entry whose hash still matches. Another app's page, unchanged since, matches.
In one line: each app's manifest claims every man page in the shared directory, so uninstalling one app
deletes the others' pages.
Per-app state, 2026-09-02, prefix ~/.local
| App | Installed | Manifest | Its pages in man1 |
|---|---|---|---|
| devlore-test | no | none | 0 |
| lore | yes | none | 24 |
| star | yes | claims 117, 55 its own | 55 |
| writ | yes | claims 115, 28 its own | 28 |
The other 10 pages in man1 belong to the Personal repository's scripts.
- devlore-test has never been installed here. It registers the same
selfcommand and inherits the
defect the day it is. - lore has a binary but no manifest, so it was put there by something other than a current
self install. With no manifest its uninstall deletes nothing. Lore is a victim: its 24 pages are claimed
by both star's and writ's manifests. - star and writ are the two that would delete. Either one's uninstall takes lore's 24 pages and the 10
script pages along with its own.man1holds 117 files; star's manifest claims all 117.
Config is not affected: uninstall removes only config.d/<tool>.yaml and never the shared config.yaml.
Requirements
All four programs — devlore-test, lore, star, writ — get exactly the same self subcommands, with the
same behavior. Uniformity on this dimension is the requirement, not a preference.
- Each generates its own default config, man pages and completions — completions for every installed
shell: bash, fish, or zsh (PowerShell where present). - Each writes a manifest of the files it installed, and only those.
- The manifest decides removal:
self uninstallremoves a file only if it is in the manifest and
unchanged since install. A changed file is left behind and reported.
Evidence of completion
-
installManPagesToreturns only the pages it generated forrootCmd - the completion and extension steps audited against the same rule: only what this app wrote
- the four programs register the same
selfsubcommands, asserted by one test over all four roots -
self installproduces the default config, man pages and completions for every installed shell, asserted - a unit test installs two apps into one prefix and asserts each manifest holds only its own files
-
self uninstallof one app leaves the other's man pages and completions in place, end to end - a file changed after install is left behind and reported, end to end
-
loreinstalled throughself installhas a manifest
Found while taking #743's LKG. Orthogonal to that work; its own worktree.
Activity
Charter the plan for #743: LKG taken, three more collisions, three ru…
Config spec and plan: the command surface is one set on four programs
star adopts the output convention: the shared root, and extension com…