Creating Herdr-app mods
For agents creating or editing mods. Refresh the layout before judging a saved edit.
Workflow
- Read
herdr-app --skill, the installed app-home guide, and the relevant generated.d.tsfiles. Resolve the home fromHERDR_APP_HOME, thenXDG_CONFIG_HOME/herdr-app, otherwise~/.config/herdr-app. - Inspect
herdr-app statusandherdr-app commands. Record the original layout and identify another existing layout for the refresh round-trip. - Create a personal
mods/<name>/main.js, with optionalmod.jsonand relative imports. Clone shipped mods/layouts before editing. For source kept elsewhere, symlink the whole mod directory into the app home'smods/. Use copies when manifests must stay machine-local; individual frontend file symlinks can break relative imports. Use theme colours and current installed APIs. - After each code-edit batch, run
herdr-app check <app-home>/mods/<name>. Fix failures before proceeding. - You MUST switch away from the edited mod's layout and back, even when
checkpasses andstatushas no errors. Linked source edits can remain stale until this round-trip. Use existing layout names; do not restart the app or its core. - Inspect
herdr-app status, captureherdr-app shot /tmp/herdr-mod.png, and open the image. Finish only when the changed text, style, or behaviour is visible and no new errors remain. A passing check alone does not prove the running copy updated. - Restore the original layout unless the user requested another. For temporary mods, remove their layout blocks before removing their symlinks and source files.
Refresh example
When the edited layout is cli and shared-context also exists:
herdr-app do layout.switch --name shared-context
herdr-app do layout.switch --name cli
herdr-app status
herdr-app shot /tmp/herdr-mod.png
If the intended layout is not currently shown, show it before this round-trip. Preserve the user's terminals and unrelated layout edits.
Linked-directory loading and relative imports work; automatic reload of external target edits is tracked in herdr-app #887. Recheck the installed version before assuming this limitation changed.