# Yoi rename survey

Generated by read-only Pod `surveyor-yoi-rename-20260601` on 2026-06-01.

## Executive stance

Move implementation/public identity to `Yoi` / `yoi` / `.yoi` / `YOI_*` everywhere that is product, runtime, config, CLI, package, prompt, profile, diagnostic, test, or public documentation surface.

Do not bulk-rename historical records, generated personal memory, old work-item threads, or rationale docs except where they currently function as live project instructions or public docs.

A small bounded migration path is appropriate for existing dogfood data directories, but old public aliases should not be preserved long-term unless explicitly reapproved.

## Major rename surfaces

### Cargo package, crate, binary, lockfile

Files:

- `Cargo.toml`
- `crates/insomnia/Cargo.toml`
- `crates/insomnia/src/main.rs`
- `Cargo.lock`
- `crates/pod/src/entrypoint.rs`
- tests that expect `insomnia` / `insomnia pod`

Recommendations:

- `crates/insomnia/` -> `crates/yoi/`
- package `insomnia` -> `yoi`
- workspace dependency key `insomnia` -> `yoi`
- installed binary `insomnia` -> `yoi`
- regenerate `Cargo.lock`
- update help/tests from `Usage: insomnia ...` to `Usage: yoi ...`
- do not ship an `insomnia` binary unless a compatibility alias is explicitly approved

### Nix package/app/devshell

Files:

- `package.nix`
- `flake.nix`
- `devshell.nix` validation surface

Recommendations:

- `pname = "insomnia"` -> `pname = "yoi"`
- flake description should say Yoi
- flake app should point at `${package}/bin/yoi`
- expose `yoi` package/app outputs
- avoid long-term `insomnia` public output aliases

### CLI/runtime command surfaces

Files:

- `crates/insomnia/src/main.rs`
- `crates/pod/src/entrypoint.rs`
- `crates/client/src/runtime_command.rs`
- `crates/client/src/spawn.rs`
- `docs/environment.md`

Recommendations:

- `insomnia` -> `yoi`
- `insomnia pod` -> `yoi pod`
- `INSOMNIA_POD_RUNTIME_COMMAND` -> `YOI_POD_RUNTIME_COMMAND`
- `INSOMNIA-READY` -> `YOI-READY`
- runtime binary fallback `insomnia` -> `yoi`
- update CLI help tests and command examples

Mixed-version parent/child spawning need not be supported unless explicitly required.

### Data/config/runtime directories

Central files/surfaces:

- `crates/manifest/src/paths.rs`
- `crates/pod/src/entrypoint.rs`
- `crates/session-store/src/fs_store.rs`
- `crates/pod-registry/src/table.rs`
- `crates/tui/src/single_pod.rs`
- `crates/memory/src/workspace.rs`
- `.insomnia/manifest.toml`

Recommendations:

- `INSOMNIA_HOME` -> `YOI_HOME`
- `INSOMNIA_CONFIG_DIR` -> `YOI_CONFIG_DIR`
- `INSOMNIA_DATA_DIR` -> `YOI_DATA_DIR`
- `INSOMNIA_RUNTIME_DIR` -> `YOI_RUNTIME_DIR`
- `~/.insomnia` -> `~/.yoi`
- `~/.config/insomnia` -> `~/.config/yoi`
- `$XDG_RUNTIME_DIR/insomnia` -> `$XDG_RUNTIME_DIR/yoi`
- `/tmp/insomnia-*` -> `/tmp/yoi-*`
- `.insomnia/` -> `.yoi/`
- `.insomnia/{manifest.toml,workflow,knowledge,memory,prompts}` -> `.yoi/...`

Migration recommendation:

- Provide an explicit migration command/documented manual move, or a one-time startup migration if new paths do not exist and old paths do.
- Do not keep old and new roots as equal long-term search paths.
- Do not bulk-read or rewrite ignored personal `.insomnia/memory` contents during repository cleanup.

### Environment variables

Active variables to rename:

- `INSOMNIA_HOME` -> `YOI_HOME`
- `INSOMNIA_CONFIG_DIR` -> `YOI_CONFIG_DIR`
- `INSOMNIA_DATA_DIR` -> `YOI_DATA_DIR`
- `INSOMNIA_RUNTIME_DIR` -> `YOI_RUNTIME_DIR`
- `INSOMNIA_POD_RUNTIME_COMMAND` -> `YOI_POD_RUNTIME_COMMAND`

Historical/obsolete variables in old docs/work-items can remain if the file is historical.

### Prompt/profile namespace

Files:

- `resources/prompts/system/default.md`
- `resources/prompts/system/normal.md`
- `resources/prompts/system/pod-orchestration.md`
- `resources/prompts/internal/*.md`
- `resources/profiles/default.lua`
- `crates/manifest/src/profile.rs`
- `crates/pod/src/prompt/loader.rs`

Recommendations:

- `insomnia system` -> `Yoi system` or `yoi system`
- `$insomnia/...` -> `$yoi/...`
- `require("insomnia")` -> `require("yoi")`
- `require("insomnia.scope")` -> `require("yoi.scope")`
- `insomnia.profile` -> `yoi.profile`
- `insomnia.lua-profile.v1` -> `yoi.lua-profile.v1`
- `.insomnia/prompts` -> `.yoi/prompts`

Compatibility aliases should be avoided for public release unless separately approved.

### Active project instructions and docs

Rename active/live documentation and instructions:

- `AGENTS.md`
- `README.md`
- `docs/environment.md`
- `docs/manifest-profiles.md`
- `docs/pod-factory.md`
- active `docs/plan/*.md` and `docs/ref/*.md` as appropriate
- active workflow instructions under `.insomnia/workflow/*.md` after path migration

Do not bulk-rename historical records:

- closed work items
- historical reports in `docs/report/`
- `docs/branding.md` old-name rationale
- rename ticket title/content where it explicitly describes the transition

### Tests, snapshots, fixtures

Likely test surfaces:

- `crates/pod/src/entrypoint.rs`
- `crates/client/src/runtime_command.rs`
- `crates/client/src/spawn.rs`
- `crates/manifest/src/paths.rs`
- `crates/manifest/src/profile.rs`
- `crates/memory/src/workspace.rs`
- `crates/tools/src/web.rs`
- `crates/pod/tests/*.rs`

Recommendations:

- expected CLI help: `insomnia` -> `yoi`
- env tests: `INSOMNIA_*` -> `YOI_*`
- path tests: `.insomnia` -> `.yoi`
- Lua profile tests: `insomnia` module -> `yoi`
- generic test sample strings should be renamed unless intentionally testing migration

### User-visible diagnostics/log messages

Relevant surfaces:

- `crates/pod/src/entrypoint.rs`
- `crates/client/src/runtime_command.rs`
- `crates/pod-registry/src/table.rs`
- `crates/manifest/src/profile.rs`
- `crates/pod/src/prompt/loader.rs`
- `crates/insomnia/src/memory_lint.rs`
- TUI status/action messages that show paths or commands

Recommendations:

- diagnostics should use `YOI_*`, `$yoi`, `require("yoi")`, `yoi pod`, and `.yoi` paths
- old names should appear only in explicit migration diagnostics

### Repository/path names outside code

Surfaces:

- local checkout path `/home/hare/Projects/insomnia`
- repository name
- worktree names
- current runtime output paths under `/run/user/1000/insomnia/...`

Recommendations:

- Public repository name should eventually become `yoi`.
- Local checkout/runtime output paths are not first-pass code-edit targets.
- Current session/tool output paths are generated/historical.

## Intentionally retained old-name references

Do not bulk-rename by default:

- `docs/branding.md` rationale explaining the collision and rename
- this rename work item where it states old-to-new transition
- closed work items under `work-items/closed/`
- historical `docs/report/` files
- generated/personal `.insomnia/memory` content
- external session logs under old runtime paths
- migration tests/docs that explicitly refer to legacy `insomnia` names

## Proposed implementation order

1. Decide canonical spellings:
   - Product: `Yoi`
   - command/package/crate: `yoi`
   - dotdir: `.yoi`
   - env prefix: `YOI_`
   - builtin prompt prefix: `$yoi`
   - Lua module namespace: `yoi`
2. Rename Cargo/product package:
   - move `crates/insomnia` -> `crates/yoi`
   - update workspace manifest, package names, dependency keys, tests
   - confirm `cargo metadata`
3. Rename Nix packaging:
   - update `package.nix`, `flake.nix`, app program, install check
4. Rename CLI/runtime command surfaces:
   - command/help/examples/tests
   - runtime override env var
   - ready marker
   - binary fallback
5. Rename path/env authority:
   - centralize in `crates/manifest/src/paths.rs`
   - decide legacy path migration behavior
6. Rename workspace conventions:
   - `.insomnia` -> `.yoi`
   - move tracked workflow/knowledge/manifest assets
   - avoid rewriting generated personal memory
7. Rename profile/prompt namespace:
   - `$yoi`
   - `require("yoi")`
   - builtin profile/schema/source strings
8. Update active docs and project instructions.
9. Update tests/fixtures and add migration tests if migration is implemented.
10. Final grep/audit pass and classify remaining hits.

## Validation checklist

Minimum validation after implementation:

- `cargo check --workspace`
- `cargo test --workspace` or standard targeted test set
- `cargo metadata --format-version 1`
- `cargo run -p yoi -- --help` shows `yoi`
- `cargo run -p yoi -- pod --help` shows `Usage: yoi pod`
- spawn path test verifies parent expects `YOI-READY`
- env/path tests verify `YOI_HOME`, `YOI_CONFIG_DIR`, `YOI_DATA_DIR`, `YOI_RUNTIME_DIR`, `YOI_POD_RUNTIME_COMMAND`
- runtime path tests verify `~/.yoi`, `~/.config/yoi`, `$XDG_RUNTIME_DIR/yoi`, `.yoi/memory`, `.yoi/workflow`, `.yoi/knowledge`
- Lua profile tests verify `require("yoi")` and no required `require("insomnia")`
- prompt loader tests verify `$yoi/...` and `.yoi/prompts`
- Nix validation verifies `$out/bin/yoi` and flake app launch
- final residual search:

```bash
git grep -n -I -E 'insomnia|Insomnia|INSOMNIA|\.insomnia'
```

Every remaining hit must be branding rationale, migration code/test/doc, closed historical record, generated/personal ignored state, or an explicitly preserved external reference.
