✨ feat: P-13 onboard finds the accounts and keeps the client's settings layout

Merged
AL
1mo ago
+396-21

Roadmap P-13 (added in #20).

  • Plain process-rules onboard. It suggests the owner from the gh login, and the agent from the accounts machine set up on this Mac, read from their session files. When there are several agents, it lists them. Enter takes the suggestion; typing names another account. Naming both on the command line still works.
  • The client's .claude/settings.json keeps its layout. onboard adds only its SessionStart entry, in the layout of its neighbours, using a small JSON text editor (src/jsonedit.ts). It swaps an older release's hook command within the text. In the first client, onboard had rewritten the whole file, and the owner's commit had to restore it by hand.
  • Version 0.3.0.

pnpm check: 418 tests pass.

🤖 Generated with Claude Code


Summary by cubic

process-rules onboard now suggests the owner from the gh login and the agent from the accounts machine set up on this Mac, so new clients no longer need both named on the command line. It also edits an existing .claude/settings.json in place — adding only its SessionStart entry and swapping an older release's command — following the file's own indentation and line endings, so the client's layout is kept. Version 0.3.0.

  • Enter takes the suggestion; typing names another account, and naming both on the command line still works.
  • When this Mac has several agents set up, it lists them, and suggests no owner when gh is signed out.
  • The edits refuse, changing nothing, when a value in the way is not an object or the target is not an array; only hooks.SessionStart[*].hooks[*].command is swapped, leaving the same string elsewhere alone.