⨠feat: the lock and this Mac's files say niyam (P-55)
Slice: #266
The lock and this Mac's files use niyam's names. Every old name is still read until P-57 (#268). The owner asked in chat on 2026-11-11, "I want to fix everything", and approved this with a š.
Config folder
~/.config/niyam/holds the agent folders, session records andlocked/gh. The launcher is~/.config/niyam/bin/niyam.machineandsession-startwrite only the new place.- Every reader takes the new place, then the old: the session file, the session record (guard, as-agent),
agentsSetUp, lockout's lists, and doctor's launcher check. When a new record exists, it wins. machineleaves~/.config/process-rulesand the old launcher in place.upgraderepoints both launchers.
Agent variable
- Sessions get
NIYAM_AGENT, withPROCESS_RULES_AGENTstill set beside it: in the session script, as-agent's env and the cloud session's env file. - Every reader goes through
agentIn, which takes either: doctor, onboard's agent-session refusal, andagentSession(pre-push, owner-step). A reader that missed one would take an agent session for the owner.
Lock text
- The placeholder token is
niyam-no-agent-token, andisNoTokencounts both placeholders (cloud.ts, work.ts). - The SSH refusal says
niyam:, and the headers say "Written by niyam machine" / "Written by niyam session-start".
Hooks
- They try the new launcher, then the old, then
niyamon PATH. The pre-push hook countsNIYAM_AGENTorPROCESS_RULES_AGENT. - 0.6.8's and 0.6.9's texts join the older lists, so
onboardreplaces them in place, and as-agent's OWN_COMMANDS still covers them. - The env plan says "update ⦠to this release's lock" for a repo already locked.
Doctor and older files
- A 0.6.9 session file and record count, so a session started before the upgrade keeps working with no
machinerun. A test covers exactly that, with the token under the old keychain service only. doctormarks ā² a Mac with only the old folder or old launcher.
Tests: src/older-texts.test.ts freezes 0.6.9's texts, checked against this repo's deployed settings and hook. The new tests cover every fallback read and the mixed states: the hooks in a real sh, each variable alone, and both tokens. pnpm check passes: 1317 tests, 99.56% lines.
Left for P-56 (#267): the workflow, cloud path, settings file, onboard branch, template and other internal names. Recorded in docs/decisions.md; the README is updated.
š¤ Generated with Claude Code
Summary by cubic
Renames the lock and this Mac's local files from process-rules to niyam, still reading every old name until P-57.
machineand session-start write~/.config/niyam/ā agent folders, session records, the lockedghfolder, and the launcher~/.config/niyam/bin/niyamā and every reader takes the new place, then the old.- Agent sessions get
NIYAM_AGENTbesidePROCESS_RULES_AGENT; readers accept either. - The lock's placeholder token is now
niyam-no-agent-token; both placeholders count as no token, and the SSH refusal and header texts sayniyam:. The hooks try the new launcher, then the old, thenniyamon PATH.
Compatibility
machineleaves the old folder and launcher in place;upgraderepoints both launchers.doctornow checks the old launcher beside the new one, marking ā² a Mac with only the old folder or launcher and ā one whose launcher cannot run or still runs process-rules.- The lockout spares only agent folders' signing keys, including an agent whose login is
bin,sessions, orlocked, and no longer exempts an owner key named like the config folders' bin, sessions, or locked entries. - A session file or record that 0.6.9 wrote still counts, so a session started before the upgrade keeps working with no
machinerun. onboardreplaces 0.6.9's hooks and lock texts in place.