smriti/cli/smriti_cli
Himanshu Dongre 68b3b51661 Attach projects to spaces so sessions stay connected automatically
Smriti previously required passing <space> on every command, and the
repo↔space binding lived only inside a hardcoded SessionStart hook
string. This makes the binding durable and ambient.

- New cli/smriti_cli/attachment.py reads/writes `.smriti.json` at the
  repo root — a committed file that binds the repo to a space and
  travels with it (repo A→space A, repo B→space B).
- The <space> positional is now optional on state, current, metrics,
  checkpoint create/list, claim create/list, and worktree open/list.
  When omitted it resolves from the nearest `.smriti.json`, walking up
  from the working directory, so any session opened inside the repo
  stays connected without re-passing the space.
- `smriti init` writes `.smriti.json` and binds the space's backend
  project_root to the checkout. The generated SessionStart hook is now
  space-less (`smriti state --compact`) — identical across every
  project and stable when a project is re-attached.
- New `smriti status` command: a day-two continuity check showing the
  attachment, backend health, and open work.
- CLI api_url also resolves from the attachment as a last-resort
  default, behind --api-url and SMRITI_API_URL.

MCP tool signatures are intentionally unchanged this sprint.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 00:10:50 +05:30
..
skill_pack Add local-first setup onboarding 2026-05-16 22:39:38 +05:30
__init__.py Add CLI for agent and programmatic access 2026-04-11 11:10:01 +05:30
__main__.py Add CLI for agent and programmatic access 2026-04-11 11:10:01 +05:30
attachment.py Attach projects to spaces so sessions stay connected automatically 2026-05-19 00:10:50 +05:30
client.py Add Project Current State CLI surface 2026-05-16 20:55:01 +05:30
formatters.py Clarify claim completion metrics 2026-05-18 00:07:42 +05:30
main.py Attach projects to spaces so sessions stay connected automatically 2026-05-19 00:10:50 +05:30
mcp_server.py Populate worktree list probe columns 2026-05-04 12:52:35 +05:30
quickstart.py Polish external validation output and docs 2026-05-17 12:15:14 +05:30