Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore: repair references after repository cleanup\n\n

Steven Enamakelc0b471ecc6c7
diff --git a/.claude/commands/ship-and-babysit.md b/.claude/commands/ship-and-babysit.md
deleted file mode 100644
index 9cd4a4fec1..0000000000
--- a/.claude/commands/ship-and-babysit.md
+++ /dev/null
@@ -1,117 +0,0 @@
----
-description: Commit, push to origin (fork), open PR to tinyhumansai/openhuman:main, then poll every ~5min for CodeRabbit comments and CI failures, resolve them, and exit when clean.
-allowed-tools: Bash, Read, Edit, Write, Agent, Skill
----
-
-You are running an end-to-end ship-and-babysit flow for the **openhuman** repo. Follow these phases in order. Be concise in user-facing text — one short sentence per phase transition is enough.
-
-Repo facts (from `CLAUDE.md`):
-
-- Upstream: `tinyhumansai/openhuman` (not a fork). PRs target **`main`**.
-- Push branches to **`origin`** (the user's own fork of `tinyhumansai/openhuman`). Treat `upstream` as fetch-only.
-- PRs are opened with `--head <fork-owner>:<branch>` against `tinyhumansai/openhuman:main`.
-- PR template: `.github/PULL_REQUEST_TEMPLATE.md`. Issue templates under `.github/ISSUE_TEMPLATE/`.
-- Feature work requires matching E2E coverage before shipping.
-
-**Resolve the fork owner once at the start** and reuse it for the rest of the flow:
-
-```bash
-FORK_OWNER=$(git remote get-url origin | sed -E 's#.*[:/]([^/]+)/[^/]+(\.git)?$#\1#')
-```
-
-The flow is **fork-only**: `origin` must be the user's fork. If `origin` resolves to `tinyhumansai` (the upstream org), stop and ask the user to add a fork remote — never push branches to the upstream repo.
-
-## Phase 1 — Commit
-
-1. Run `git status`, `git diff` (staged + unstaged), and recent `git log` in parallel to understand pending changes and the repo's commit message style.
-2. If there are no changes to commit AND the branch is already pushed AND a PR already exists, skip to Phase 4.
-3. If there are uncommitted changes, stage relevant files (avoid secrets / large binaries / `.env`), then create a commit using a conventional prefix (`feat:`, `fix:`, `refactor:`, `chore:`, `docs:`, `test:`). Use a HEREDOC for the message.
-4. Never use `--no-verify` to bypass commit hooks for your own changes. If a hook fails on your changes, fix the underlying issue and create a NEW commit (do not amend pushed commits).
-
-## Feature E2E rule
-
-- Core, domain, persistence, CLI, and JSON-RPC feature changes need Rust E2E coverage in `tests/*_e2e.rs`; new or changed RPC surfaces usually belong in `tests/json_rpc_e2e.rs`.
-- Frontend user flows need Playwright E2E coverage in `app/test/e2e/specs/*.spec.ts`.
-- Mock backend calls all the way through with `scripts/mock-api-server.mjs`, `scripts/mock-api/*`, or `app/test/e2e/mock-server.ts`; do not hit real backend services or third-party APIs in E2E.
-- Use focused commands when possible:
- - `pnpm test:rust:e2e -- --suite <suite>`
- - `pnpm --filter openhuman-app test:e2e:web:build`
- - `bash app/scripts/e2e-web-session.sh test/e2e/specs/<spec>.spec.ts`
-- Unit tests still matter for narrow logic, but they do not replace E2E coverage for newly built features.
-
-## Phase 2 — Push
-
-1. Determine current branch with `git rev-parse --abbrev-ref HEAD`. Confirm it follows the `feat/|fix/|refactor/|chore/|docs/|test/` prefix convention. Never push directly to `main`. If the branch doesn't match the convention, stop and ask the user to either rename it or confirm the deviation — don't auto-rename pushed branches.
-2. Push to **`origin`** with `-u` if upstream tracking is missing. Never push to `upstream`. Never force-push to `main`.
-3. **Pre-push hook policy** (per `CLAUDE.md`): if a pre-push hook fails on something unrelated to your changes (pre-existing breakage on `main` in code you didn't touch), push with `--no-verify` and call it out in the PR body. If the hook fails on your own changes, fix and re-push. Don't ask — just do the right thing and tell the user what you did.
-
-## Phase 3 — Open PR
-
-1. Verify upstream remote with `git remote -v`. It should point at `tinyhumansai/openhuman`. If missing, ask the user before adding it.
-2. Check whether a PR already exists for this branch:
- `gh pr list --repo tinyhumansai/openhuman --head <fork-owner>:<branch> --state open --json number,url`
- - **If a PR exists**, capture its `number` and `url`, print the URL, skip steps 3–5, and proceed straight to Phase 4 with that PR#.
-3. If none exists, draft a title (<70 chars) and a body that follows `.github/PULL_REQUEST_TEMPLATE.md` exactly. Inspect commits with `git log main..HEAD` and the diff with `git diff main...HEAD` to write the summary. If you bypassed a pre-push hook, note it in the PR body.
- - When filling the Submission Checklist, every item must be checked. Use `- [x] N/A: <reason>` when an item does not apply; unchecked `N/A` items still fail `scripts/check-pr-checklist.mjs`.
-4. Create the PR:
- ```bash
- gh pr create --repo tinyhumansai/openhuman --base main --head <fork-owner>:<branch> \
- --title "..." --body "$(cat <<'EOF'
- ...template-filled body...
- EOF
- )"
- ```
-5. Add appropriate labels/type if conventional for this repo.
-6. Capture the PR number and URL — you will need them in Phase 4. Print the URL to the user.
-
-## Phase 4 — Babysit loop (~5 minutes)
-
-Repeat the following loop until the exit condition is met. Use `ScheduleWakeup` to pace at **270s** (stays inside the prompt-cache window) — re-enter this phase each tick by passing the same `/ship-and-babysit` invocation back as the prompt.
-
-**Hard cap: 12 ticks (~60 minutes).** After that, stop the loop and ask the user, including PR URL, current CI snapshot, and any unresolved CodeRabbit threads. Maintain an explicit `tickCount` that increments by 1 on every loop entry (regardless of whether you commit or only wait on CI), and pass it through in the `ScheduleWakeup` `reason` (e.g. `"tick 5/12: waiting on CI for PR #1115"`) so the counter is visible across ticks and can't drift if a tick produces no commits.
-
-Each tick:
-
-1. **Fetch CI status**:
- `gh pr checks <PR#> --repo tinyhumansai/openhuman --json name,state,link,description`
- - `gh pr checks --json` returns a `link` field (an Actions URL like `…/actions/runs/<id>/job/<jobId>`), not a run id directly. Extract the run id with a regex that's robust to trailing slashes (`sed -nE 's#.*/actions/runs/([0-9]+)/.*#\1#p'`) — positional `awk -F/` is brittle when the URL has a trailing slash. Or skip URL parsing entirely and call `gh run list --repo tinyhumansai/openhuman --branch <branch> --json databaseId --limit 1 --jq '.[0].databaseId'`.
- - If any check is `FAILURE` or `CANCELLED`, branch by check type: when `link` matches `/actions/runs/<id>/` (Actions-backed), extract `<id>` and fetch logs with `gh run view <id> --log-failed --repo tinyhumansai/openhuman`; when it doesn't (e.g. the `CodeRabbit` virtual check or any other status posted directly via the Checks API without an Actions run), skip `gh run view` and work from the `name`/`state`/`description` fields plus any review comments. Then fix the underlying issue: edit code, commit (conventional prefix), push to `origin`. Do NOT skip hooks or disable failing tests to make CI green.
- - For local repro of common failures before pushing fixes:
- - Frontend: `pnpm typecheck`, `pnpm lint`, `pnpm format:check`, `pnpm test`.
- - Rust: `cargo check --manifest-path Cargo.toml`, `cargo check --manifest-path app/src-tauri/Cargo.toml`, `pnpm test:rust`.
- - Feature E2E: `pnpm test:rust:e2e -- --suite <suite>` for core/RPC behavior, or `pnpm --filter openhuman-app test:e2e:web:build` plus `bash app/scripts/e2e-web-session.sh test/e2e/specs/<spec>.spec.ts` for frontend flows.
- - Coverage gate is **≥ 80% on changed lines** (`.github/workflows/coverage.yml`) — if coverage fails, add tests for changed lines, not just happy path.
-2. **Fetch CodeRabbit review comments**:
- `gh api repos/tinyhumansai/openhuman/pulls/<PR#>/comments --paginate`
- Filter for comments authored by `coderabbitai` / `coderabbitai[bot]`. Also check issue-level comments: `gh api repos/tinyhumansai/openhuman/issues/<PR#>/comments --paginate`.
- - For each unresolved CodeRabbit suggestion: read the file/line referenced and apply the fix if it is correct and in scope. If a suggestion is wrong or out of scope, reply _inside the existing thread_ (so the reply attaches to the same conversation, not a brand-new review) before resolving:
- ```bash
- gh api repos/tinyhumansai/openhuman/pulls/comments/<comment_id>/replies \
- -X POST \
- -f body='**Dismissed:** <reason>'
- ```
- (`<comment_id>` is the top-level review-comment id from `gh api repos/tinyhumansai/openhuman/pulls/<PR#>/comments`. `POST /pulls/<PR#>/reviews` would create a _new_ review thread, not a reply.)
- - After fixing, commit and push to `origin`.
- - Mark the corresponding review thread as resolved via the GraphQL API:
- ```bash
- gh api graphql -f query='mutation($id:ID!){resolveReviewThread(input:{threadId:$id}){thread{isResolved}}}' -f id=<threadId>
- ```
- To list thread IDs (paginated — `reviewThreads` caps at 100 per page, so loop on `pageInfo.hasNextPage` / `endCursor` and feed back as `$cursor` until exhausted, otherwise threads past page 1 silently slip past the exit condition):
- ```bash
- gh api graphql -f query='query($owner:String!,$repo:String!,$num:Int!,$cursor:String){repository(owner:$owner,name:$repo){pullRequest(number:$num){reviewThreads(first:100, after:$cursor){pageInfo{hasNextPage endCursor} nodes{id isResolved comments(first:1){nodes{author{login} body}}}}}}}' -F owner=tinyhumansai -F repo=openhuman -F num=<PR#> -F cursor=
- ```
-3. **Exit condition** — stop the loop when ALL of these are true:
- - All required checks are `SUCCESS`. `PENDING` keeps the loop running, no exceptions — no "green" claim while CI is mid-run.
- - No unresolved CodeRabbit review threads remain.
- - No new CodeRabbit issue comments since the last tick that request changes. Track this by remembering the highest CodeRabbit issue-comment `id` seen on the previous tick (the GitHub issue-comment id is monotonic) and only treating ids strictly greater than that marker as new on the current tick.
- - When the exit condition holds, do NOT call `ScheduleWakeup` — return a final one-line summary with the PR URL and current status.
-4. **Pacing**: if exiting, stop. Otherwise call `ScheduleWakeup` with `delaySeconds: 270`, `prompt: "/ship-and-babysit"`, and a specific `reason` like "waiting on CI for PR #123" or "applied 2 CodeRabbit fixes, re-checking".
-
-## Guardrails
-
-- Never push to `upstream` (`tinyhumansai/openhuman`) — only to `origin` (the user's fork). Treat upstream as fetch-only.
-- Never force-push to `main`. Never amend pushed commits.
-- Never use `--no-verify` to bypass hooks failing on your own changes. The only sanctioned bypass is a pre-push hook failing on pre-existing unrelated breakage — call it out in the PR body when you do.
-- Never resolve a CodeRabbit thread without actually addressing it (or replying with a reasoned dismissal).
-- If you hit a blocker that needs human input (auth failure, ambiguous CodeRabbit suggestion, conflicting feedback, merge conflict, vendored `tauri-cli` missing), stop the loop and ask the user instead of guessing.
-- Do not merge the PR. Stop at "green and clean".
diff --git a/.claude/commands/ws-reset.md b/.claude/commands/ws-reset.md
deleted file mode 100644
index efa5f35c75..0000000000
--- a/.claude/commands/ws-reset.md
+++ /dev/null
@@ -1,15 +0,0 @@
----
-description: Reset the current branch to main, fetch upstream, and update submodules.
-allowed-tools: Bash
----
-
-Run the following steps in order. Stop and surface the error if any step fails — do not paper over a failure.
-
-```bash
-bash scripts/shortcuts/ws-reset.sh
-git status
-```
-
-The helper performs the destructive steps (`git fetch upstream`, `git checkout main`, `git reset --hard upstream/main`, `git submodule update --init --recursive`) behind a working-tree-dirty guard. Pass `--force` only if you intend to discard local changes.
-
-Then report in one line: the new HEAD SHA of `main` and whether submodules changed.
diff --git a/.codex/skills/ship-and-babysit/SKILL.md b/.codex/skills/ship-and-babysit/SKILL.md
new file mode 100644
index 0000000000..fd74abd97a
--- /dev/null
+++ b/.codex/skills/ship-and-babysit/SKILL.md
@@ -0,0 +1,174 @@
+---
+name: ship-and-babysit
+description: "End-to-end PR shipping workflow for tinyhumansai/openhuman: commit local changes, push to the user's fork, open or reuse a PR against main, then babysit CI and CodeRabbit feedback until the PR is green and clean. Use when the user asks to ship, open a PR, monitor CI, address review comments, or 'babysit' a branch."
+---
+
+# Ship and Babysit
+
+Use this skill for `tinyhumansai/openhuman` when the user wants a branch shipped end to end:
+
+- commit the local changes
+- push the branch to the user's fork
+- open or reuse a PR against `tinyhumansai/openhuman:main`
+- proactively run likely merge-gate validation and start fixing issues immediately
+- monitor CI and review feedback in a polling loop without waiting idly for every check to finish
+- address actionable review comments and push follow-up fixes
+- stop only when the PR is green and clean
+
+## Preconditions
+
+- Work from the repository root.
+- Follow repo rules from `AGENTS.md`, including validation and PR checklist requirements.
+- Assume `origin` is the user's writable fork and `upstream` points to `tinyhumansai/openhuman`.
+- Resolve the fork owner once near the start and reuse it:
+ - `FORK_OWNER=$(git remote get-url origin | sed -E 's#.*[:/]([^/]+)/[^/]+(\.git)?$#\1#')`
+- If `origin` resolves to `tinyhumansai`, stop and ask the user to add a fork remote. Never push branches to upstream.
+- If work starts on local `main`, create a new descriptive branch before committing so the changes leave `main` immediately.
+- Never push directly to `main`.
+- Never push to `upstream`.
+- Never amend or rewrite commits that are already pushed unless the user explicitly asks for it.
+- Never bypass hooks for breakage introduced by your own changes.
+- Default to autonomous execution. Do not stop to ask the user process questions when a reasonable safe default exists.
+- Only ask the user a question when the workflow is genuinely blocked by missing access, missing credentials, or an irreversible choice that cannot be inferred from repo context.
+
+## Workflow
+
+### Phase 1: Inspect and Commit
+
+1. Inspect the branch before changing anything. Prefer parallel reads:
+ - `git status --short`
+ - `git diff --stat`
+ - `git diff --cached --stat`
+ - `git log --oneline --decorate -n 12`
+2. Determine the current branch:
+ - `git rev-parse --abbrev-ref HEAD`
+3. Confirm the branch normally follows `feat/`, `fix/`, `refactor/`, `chore/`, `docs/`, or `test/`.
+ - If the current branch is `main`, create a new descriptive branch immediately and continue there.
+ - If the name does not follow convention and it is already a non-`main` branch, keep using it unless it is still local and trivially safe to rename without disrupting a pushed branch.
+4. If there are uncommitted changes, carry them onto the new branch before doing anything else so local `main` stays free of agent-authored commits.
+5. If there are uncommitted changes, run the smallest meaningful local validation for the touched area before committing.
+6. Stage only relevant files and create a focused conventional commit message.
+7. If there are no local changes, continue without creating a commit.
+
+### Feature E2E Requirement
+
+Before shipping feature work, verify that the PR includes end-to-end coverage for the new behavior.
+
+- Core, domain, persistence, CLI, or JSON-RPC feature changes need Rust E2E coverage in `tests/*_e2e.rs`, usually targeted through `pnpm test:rust:e2e -- --suite <suite>` or `bash scripts/test-rust-e2e.sh --suite <suite>`.
+- New or changed JSON-RPC surfaces should normally extend `tests/json_rpc_e2e.rs` unless a more focused `*_e2e.rs` suite owns the domain.
+- Frontend user flows need Playwright E2E coverage in `app/test/e2e/specs/*.spec.ts`; build/run targeted web E2E with `pnpm --filter openhuman-app test:e2e:web:build` and `bash app/scripts/e2e-web-session.sh test/e2e/specs/<spec>.spec.ts`.
+- Mock backend calls all the way through. Use the repo mock backend (`scripts/mock-api-server.mjs`, `scripts/mock-api/*`, `app/test/e2e/mock-server.ts`) and admin behavior endpoints; do not hit real backend services or third-party APIs.
+- Unit tests are still expected for narrow logic, but they do not replace E2E coverage for newly built features.
+
+### Phase 2: Push
+
+1. Push the current branch to `origin`.
+2. If upstream tracking is missing, push with `-u`.
+3. If a pre-push hook fails on your own changes, fix the issue and push again.
+4. If a pre-push hook fails only because of unrelated pre-existing breakage, push with `--no-verify` and record that explicitly in the PR body.
+5. After every later fix commit in the babysit loop, push again. Do not stop at a local commit.
+
+### Phase 3: Open or Reuse the PR
+
+1. Verify remotes with `git remote -v` and confirm `upstream` points at `tinyhumansai/openhuman`.
+2. Check for an existing PR for the exact branch:
+ - `gh pr list --repo tinyhumansai/openhuman --head <fork-owner>:<branch> --state open --json number,url`
+3. If a PR exists, capture its number and URL and reuse it.
+4. If no PR exists:
+ - inspect `git log main..HEAD` and `git diff main...HEAD`
+ - fill `.github/PULL_REQUEST_TEMPLATE.md` exactly
+ - mark every checklist item as checked; for non-applicable items use `- [x] N/A: <reason>` so `pnpm pr:checklist` accepts it
+ - create the PR against `tinyhumansai/openhuman:main` with `--head <fork-owner>:<branch>`
+5. Print the PR URL to the user.
+6. Immediately after opening or reusing the PR, start proactive validation based on the touched area instead of waiting for remote CI to finish:
+ - run the smallest set of likely merge-gate commands that cover the changed code
+ - prioritize fast failure detectors first, such as format, typecheck, lint, targeted tests, and cargo checks relevant to touched files
+ - fix locally discovered failures right away, then commit and push again before the next CI poll
+
+### Phase 4: Babysit Loop
+
+Run an explicit poll loop until the PR is green and clean. Do not treat this as a one-shot status check, and do not sit idle waiting for all checks to complete before acting.
+
+- Poll about every 5 minutes.
+- Stay in the loop for up to 12 ticks, about 60 minutes total.
+- If the environment does not support durable wakeups, remain in-session and use repeated polling with `sleep 270`.
+- On each tick, post a short progress update to the user.
+- Between ticks, prefer useful work over passive waiting:
+ - inspect completed failures as soon as they appear
+ - inspect review comments and unresolved threads immediately
+ - run likely local validations on changed areas while remote checks are still pending
+ - push fixes as soon as they are ready instead of batching them behind the full CI timeline
+
+Each tick:
+
+1. Fetch CI status:
+ - `gh pr checks <pr-number> --repo tinyhumansai/openhuman --json name,state,link,description`
+2. Treat `PENDING` as still in progress. Do not claim success while checks are still running.
+3. If any completed check is `FAILURE` or `CANCELLED`:
+ - if the `link` is a GitHub Actions run URL, extract the run id and inspect failing logs with `gh run view <id> --log-failed --repo tinyhumansai/openhuman`
+ - otherwise work from the check name, state, and description
+ - make the smallest correct fix
+ - rerun targeted validation
+ - commit
+ - push
+4. If checks are still mostly `PENDING`, do not wait for the whole matrix to finish before taking action:
+ - inspect the changed files and recent commit diff
+ - run the most relevant local merge-gate commands proactively
+ - fix any locally reproduced failure immediately
+ - commit and push as soon as the fix is validated
+5. Fetch PR review comments:
+ - `gh api repos/tinyhumansai/openhuman/pulls/<pr-number>/comments --paginate`
+6. Fetch issue-level PR comments:
+ - `gh api repos/tinyhumansai/openhuman/issues/<pr-number>/comments --paginate`
+7. Inspect review threads via GraphQL, not just flat comments, so unresolved discussions do not slip through:
+ - query `reviewThreads` with pagination until `hasNextPage` is false
+8. Specifically inspect bot feedback from `coderabbitai` and `coderabbitai[bot]`, but also check for human actionable review comments.
+9. For each actionable review comment or unresolved review thread:
+ - read the referenced file and line
+ - apply the smallest correct fix
+ - rerun targeted validation
+ - commit
+ - push
+10. For incorrect, stale, or out-of-scope review feedback, reply in the existing review thread with concrete reasoning. Do not open a new unrelated review, and resolve or dismiss only when the reasoning is explicit and the platform supports it.
+11. After addressing a review thread, resolve it through the GitHub review-thread API when appropriate.
+12. Track whether new issue-level CodeRabbit comments appeared since the previous tick so the loop does not exit while fresh bot feedback is waiting.
+13. Exit the loop only when all required checks are `SUCCESS`, no unresolved actionable review threads remain, no new actionable CodeRabbit issue comments remain, and the latest fixes are committed and pushed to the PR branch.
+
+If the loop reaches the hard cap, stop and report the PR URL, current CI snapshot, and any unresolved review threads or comments.
+
+## Useful Checks
+
+- `pnpm typecheck`
+- `pnpm lint`
+- `pnpm format:check`
+- `pnpm test`
+- `cargo check --manifest-path Cargo.toml`
+- `cargo check --manifest-path app/src-tauri/Cargo.toml`
+- `pnpm test:rust`
+- `pnpm test:rust:e2e -- --suite <suite>`
+- `pnpm --filter openhuman-app test:e2e:web:build`
+- `bash app/scripts/e2e-web-session.sh test/e2e/specs/<spec>.spec.ts`
+
+Prefer targeted test commands when the touched area is narrow, but do not claim validation passed if a command was not run.
+
+## Notes
+
+- Do not merge the PR unless the user explicitly asks.
+- Reuse an existing PR when one already exists for the branch.
+- Always push follow-up commits so the PR actually updates after fixes.
+- If invoked from `main`, branch first, then ship. Do not make the user clean up agent commits from `main`.
+- Checking `gh pr checks --watch` once is not sufficient babysitting. The skill should actively re-poll CI and review surfaces until the exit condition is met.
+- The skill should not ask the user for confirmation about routine workflow choices such as branch naming, whether to start fixing CI, or whether to act on obvious actionable failures.
+- The skill should assume the user wants active babysitting: inspect, fix, commit, and push continuously until blocked or green.
+- Review handling must include:
+ - PR review comments
+ - issue-level PR comments
+ - unresolved review threads
+- If CI or review surfaces reveal unrelated pre-existing breakage, call it out clearly and avoid masking it as fixed.
+- If GitHub auth, remotes, or branch protection do not allow the workflow, report the exact blocker and stop at the first blocked step.
+
+## Invocation Hints
+
+- `Use $ship-and-babysit for this branch`
+- `Ship this and babysit the PR`
+- `Open the PR and stay on CI until it is green`
diff --git a/.codex/skills/ship-and-babysit/agents/openai.yaml b/.codex/skills/ship-and-babysit/agents/openai.yaml
new file mode 100644
index 0000000000..dfe50ee00a
--- /dev/null
+++ b/.codex/skills/ship-and-babysit/agents/openai.yaml
@@ -0,0 +1,4 @@
+interface:
+ display_name: "Ship and Babysit"
+ short_description: "Ship PRs and babysit CI and reviews"
+ default_prompt: "Use $ship-and-babysit to commit, push, open or reuse a PR, and babysit CI plus CodeRabbit until it is green and clean."
diff --git a/AGENTS.md b/AGENTS.md
index df86bda8f2..12fe1a8a2a 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -420,7 +420,7 @@ two paths' equivalence — keep that as call sites migrate.
~31 domain directories — authoritative list: `ls -d src/openhuman/*/`. Major families: agent (`agent` — with `agent/{artifacts,context,experience,file_state,harness_init,learning,orchestration,plan_review,profiles,registry,session_db,session_import,tinyagents}`), memory (`memory` — with `memory/{agent,conversations,diff,goals,people,queue,search,sources,store,sync,tinycortex,tool_memory,tree}`), skills/flows (`skills` — with `skills/{catalog,runtime,webhooks}` —, `flows` — with `flows/{tinyflows,rhai}`), inference/AI (`inference` — with `inference/{embeddings,tokenjuice}` —, `routing`), MCP (`mcp` — with `mcp/{server,registry,audit,config_servers,http_client}`), runtimes (`runtime` — with `runtime/{node,python,python_server,pool,javascript}` —, `sandbox` — with `sandbox/cwd_jail`), channels (`channels`), web3 (`web3` — with `web3/{wallet,x402}`), plus kernel domains (`platform` — with `platform/{about_app,connectivity,cost,doctor,health,proc_metrics,service,socket,startup,update}` —, `config` — with `config/{migrations,migration_helpers,workspace}` —, `cron` — with `cron/scheduler_gate` —, `integrations`, `security` — with `security/{approval,credentials,keyring,keyring_consent,encryption,prompt_injection,devices}` —, `threads` — with `threads/{goals,todos}` —, `tools` — with `tools/{registry,status,timeout,agent_policy}` —, `util` — with `util/{text,retry,tls,types}` —, `voice`, …).
-**Family directories (in progress).** The flat tree is being collapsed so that **one directory equals one feature gate**: a capability spread across sibling top-level dirs costs a `#[cfg]` per dir plus five parallel registries to keep in sync. Landed so far (124 → 28 top-level dirs, 0 root-level `*.rs`): `util/` (incl. `util/sanitize`), `mcp/{server,registry,audit,config_servers,http_client}`, `sandbox/cwd_jail`, `cron/scheduler_gate`, `runtime/`, `media/`, `voice/audio_toolkit`, `web3/{wallet,x402}`, `medulla/chat`, `flows/{tinyflows,rhai}`, `desktop/` (accessibility, app_state, dashboard, notifications, overlay, provider_surfaces), `hosted/` (announcements, billing, referral, team — all thin proxies to the TinyHumans backend), `threads/{goals,todos}`, `tools/{registry,status,timeout,agent_policy}`, `platform/` (about_app, connectivity, cost, doctor, health, proc_metrics, service, socket, startup, update), `config/{migrations,migration_helpers,workspace}`, `integrations/{composio,file_storage,task_sources}`, `skills/{catalog,runtime,webhooks}`, `inference/{embeddings,tokenjuice}`, `security/{approval,credentials,keyring,keyring_consent,encryption,prompt_injection,devices}` (the kernel security family — never gated), and `agent/{experience,orchestration,registry,harness_init,session_db,session_import,context,profiles,learning,plan_review,file_state,artifacts,tinyagents}` (the agent harness is kernel and is never gated; `agent/` stayed put as the parent rather than becoming `agent/core`, which would have cost ~999 extra import rewrites for no gate benefit), and `memory/{store,sync,tree,search,sources,queue,diff,goals,conversations,tool_memory,tinycortex,agent,people}` (the largest family, moved last; `memory/` stayed put as the parent — a `memory → memory/core` rename would have cost ~545 extra rewrites — with the pre-existing `memory/sync.rs` renamed to `memory/sync_events.rs` to free the name for `memory_sync`, and `memory_tools` landing as `memory/tool_memory` to avoid the pre-existing `memory/tools/` agent-tool directory). Plan, target tree, and move-PR rules: [`docs/specs/2026-08-02-core-kernel-domain-reorg.md`](docs/specs/2026-08-02-core-kernel-domain-reorg.md).
+**Family directories.** The flat tree was collapsed so that **one directory equals one feature gate**: a capability spread across sibling top-level dirs costs a `#[cfg]` per dir plus five parallel registries to keep in sync. The current tree has 28 top-level dirs and no root-level `*.rs`: `util/` (incl. `util/sanitize`), `mcp/{server,registry,audit,config_servers,http_client}`, `sandbox/cwd_jail`, `cron/scheduler_gate`, `runtime/`, `media/`, `voice/audio_toolkit`, `web3/{wallet,x402}`, `medulla/chat`, `flows/{tinyflows,rhai}`, `desktop/` (accessibility, app_state, dashboard, notifications, overlay, provider_surfaces), `hosted/` (announcements, billing, referral, team — all thin proxies to the TinyHumans backend), `threads/{goals,todos}`, `tools/{registry,status,timeout,agent_policy}`, `platform/` (about_app, connectivity, cost, doctor, health, proc_metrics, service, socket, startup, update), `config/{migrations,migration_helpers,workspace}`, `integrations/{composio,file_storage,task_sources}`, `skills/{catalog,runtime,webhooks}`, `inference/{embeddings,tokenjuice}`, `security/{approval,credentials,keyring,keyring_consent,encryption,prompt_injection,devices}` (the kernel security family — never gated), `agent/{experience,orchestration,registry,harness_init,session_db,session_import,context,profiles,learning,plan_review,file_state,artifacts,tinyagents}` (the agent harness is kernel and is never gated), and `memory/{store,sync,tree,search,sources,queue,diff,goals,conversations,tool_memory,tinycortex,agent,people}`.
A move never changes the wire surface — RPC namespaces are string literals in `ControllerSchema`, not derived from module paths — so **do not rename namespace strings to match new paths**.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 59d5a9d09e..0bbf62b213 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -2,7 +2,7 @@
Thank you for your interest in contributing to OpenHuman. This guide is the fast path for getting a fresh checkout running locally, validating changes, and opening a pull request without having to piece together setup notes from multiple files.
-> **New to open source or coding?** Start with [`CONTRIBUTING-BEGINNERS.md`](CONTRIBUTING-BEGINNERS.md) — it walks you through every step from installing tools to opening your first PR.
+> **New to open source or coding?** Start with [`docs/CONTRIBUTING-BEGINNERS.md`](docs/CONTRIBUTING-BEGINNERS.md) — it walks you through every step from installing tools to opening your first PR.
For deeper architecture and subsystem references, use the GitBook under [`gitbooks/developing/`](gitbooks/developing/). For coding-agent and repository-specific implementation rules, see [`AGENTS.md`](AGENTS.md) and [`CLAUDE.md`](CLAUDE.md).
@@ -26,7 +26,7 @@ This project adheres to the [Contributor Covenant Code of Conduct](CODE_OF_CONDU
- Read the [README](README.md) for product context.
- Use [`gitbooks/developing/architecture.md`](gitbooks/developing/architecture.md) for the current system architecture.
- Check [open issues](https://github.com/tinyhumansai/openhuman/issues) and [Discussions](https://github.com/tinyhumansai/openhuman/discussions) before starting work.
-- Stuck rather than fixing something? [SUPPORT.md](SUPPORT.md) routes questions, install trouble, memory behavior, and model problems to the right category; [`docs/community/discussions.md`](docs/community/discussions.md) explains how those threads are triaged.
+- Stuck rather than fixing something? [`docs/SUPPORT.md`](docs/SUPPORT.md) routes questions, install trouble, memory behavior, and model problems to the right category; [`docs/community/discussions.md`](docs/community/discussions.md) explains how those threads are triaged.
- For security issues, follow [SECURITY.md](SECURITY.md) and do not file public issues.
## Development Setup
diff --git a/Cargo.toml b/Cargo.toml
index f1995153a4..d5997f7ec8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -786,8 +786,8 @@ filetime = "0.2"
# beat without real-time waits. Test-only — the runtime feature set in
# `[dependencies]` (`full`) intentionally excludes it.
tokio = { version = "1", features = ["test-util"] }
-# Property-based testing for the adversarial-input surfaces (command classifier,
-# encryption round-trip) — plan.md §6.3. Version already resolved in Cargo.lock.
+# Property-based testing for adversarial command-classifier and encryption
+# round-trip inputs. Version already resolved in Cargo.lock.
proptest = "1"
[features]
diff --git a/README.md b/README.md
index b8c8b76653..4b7d6dcb78 100644
--- a/README.md
+++ b/README.md
@@ -155,7 +155,7 @@ High-level comparison (products evolve, so verify against each vendor). OpenHuma
## Contributing from source
-New contributor? Start with [`CONTRIBUTING.md`](./CONTRIBUTING.md) for the fork/PR workflow and local validation commands, or use the copy-paste AI-agent prompt in [`CONTRIBUTING-BEGINNERS.md`](./CONTRIBUTING-BEGINNERS.md#optional--let-an-ai-coding-agent-guide-you). The short path is:
+New contributor? Start with [`CONTRIBUTING.md`](./CONTRIBUTING.md) for the fork/PR workflow and local validation commands, or use the copy-paste AI-agent prompt in [`CONTRIBUTING-BEGINNERS.md`](./docs/CONTRIBUTING-BEGINNERS.md#optional--let-an-ai-coding-agent-guide-you). The short path is:
1. Install Git, Node.js 24+, pnpm 10.10.0, Rust 1.96.1 (`rustfmt` + `clippy`), CMake, Ninja, ripgrep, and the platform desktop build prerequisites.
2. Fork and clone the repo, then run `git submodule update --init --recursive` before `pnpm install` so the vendored Tauri/CEF sources are present.
diff --git a/app/src-tauri/src/ptt_hotkeys.rs b/app/src-tauri/src/ptt_hotkeys.rs
index 04956e0401..3d2d497d6f 100644
--- a/app/src-tauri/src/ptt_hotkeys.rs
+++ b/app/src-tauri/src/ptt_hotkeys.rs
@@ -1,6 +1,5 @@
//! Global push-to-talk hotkey state + parsing.
//!
-//! See spec: `docs/superpowers/specs/2026-06-02-global-ptt-design.md`.
//!
//! `expand_ptt_shortcuts` mirrors `dictation_hotkeys::expand_dictation_shortcuts`
//! but rejects pure-modifier shortcuts (Ctrl, Cmd+Shift, etc.) because they
diff --git a/app/src/assets/audio/README.md b/app/src/assets/audio/README.md
index 2aa8638c95..2220329cb2 100644
--- a/app/src/assets/audio/README.md
+++ b/app/src/assets/audio/README.md
@@ -1,6 +1,6 @@
# Audio assets
-Short UI chimes for the push-to-talk feature (`docs/superpowers/specs/2026-06-02-global-ptt-design.md`).
+Short UI chimes for the push-to-talk feature.
| File | Purpose | Source | License |
| --------------- | ----------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------- |
diff --git a/app/src/pages/settings/voice/PttSettingsPanel.tsx b/app/src/pages/settings/voice/PttSettingsPanel.tsx
index f14da58970..c5e0aef10b 100644
--- a/app/src/pages/settings/voice/PttSettingsPanel.tsx
+++ b/app/src/pages/settings/voice/PttSettingsPanel.tsx
@@ -20,7 +20,6 @@
* standalone route. The "card" style matches the other sections inside
* VoicePanel.
*
- * Spec: docs/superpowers/specs/2026-06-02-global-ptt-design.md.
*/
import { useCallback, useState } from 'react';
diff --git a/app/src/services/pttService.ts b/app/src/services/pttService.ts
index 9b97cf2b1d..19342ee27a 100644
--- a/app/src/services/pttService.ts
+++ b/app/src/services/pttService.ts
@@ -1,7 +1,6 @@
/**
* pttService — push-to-talk session state machine.
*
- * See spec: `docs/superpowers/specs/2026-06-02-global-ptt-design.md` (§ 2, § 3).
*
* Dependency-injected so vitest can exercise the state machine with fake
* audio capture / fake STT / fake sendMessage. Real wiring (subscribing to
diff --git a/app/test/e2e/specs/ptt-flow.spec.ts b/app/test/e2e/specs/ptt-flow.spec.ts
index b1e1dad8e2..f74922028b 100644
--- a/app/test/e2e/specs/ptt-flow.spec.ts
+++ b/app/test/e2e/specs/ptt-flow.spec.ts
@@ -47,7 +47,6 @@
* wire). We spy on `__TAURI_INTERNALS__.invoke` before the press to
* capture the call payload.
*
- * Spec: docs/superpowers/specs/2026-06-02-global-ptt-design.md.
*
* Limitations / notes for follow-up sessions:
* - The OS-level global-shortcut emit can't be triggered by the Chromium
diff --git a/docs/CONTRIBUTING-BEGINNERS.md b/docs/CONTRIBUTING-BEGINNERS.md
index 25a7803829..f4b0986705 100644
--- a/docs/CONTRIBUTING-BEGINNERS.md
+++ b/docs/CONTRIBUTING-BEGINNERS.md
@@ -2,7 +2,7 @@
New to open source or coding? This guide walks you through everything from zero to your first pull request — based on real setup pain points that new contributors hit.
-For the full contributor reference, see [`CONTRIBUTING.md`](CONTRIBUTING.md).
+For the full contributor reference, see [`CONTRIBUTING.md`](../CONTRIBUTING.md).
---
@@ -477,6 +477,6 @@ The desktop build requires the full Rust toolchain and vendored Tauri setup. For
- Join the [Discord](https://discord.tinyhumans.ai/) and ask in the contributors channel
- Comment on the issue you're working on
-- Check [`gitbooks/developing/getting-set-up.md`](gitbooks/developing/getting-set-up.md) for deeper setup docs
+- Check [`gitbooks/developing/getting-set-up.md`](../gitbooks/developing/getting-set-up.md) for deeper setup docs
Thank you for contributing to OpenHuman!
diff --git a/docs/README.de.md b/docs/README.de.md
index cbb19ce6e2..6e4f94934a 100644
--- a/docs/README.de.md
+++ b/docs/README.de.md
@@ -152,7 +152,7 @@ Gespeicherte Workflows sind dauerhaft und trigger-gesteuert: sie feuern auf Zeit
## Beitragen aus dem Quellcode
-Neu hier? Beginne mit [`CONTRIBUTING.md`](../CONTRIBUTING.md) für den Fork-/PR-Workflow und die lokalen Prüfbefehle, oder nutze den Copy-Paste-Prompt für KI-Coding-Agenten in [`CONTRIBUTING-BEGINNERS.md`](../CONTRIBUTING-BEGINNERS.md#optional--let-an-ai-coding-agent-guide-you). Der kurze Weg:
+Neu hier? Beginne mit [`CONTRIBUTING.md`](../CONTRIBUTING.md) für den Fork-/PR-Workflow und die lokalen Prüfbefehle, oder nutze den Copy-Paste-Prompt für KI-Coding-Agenten in [`CONTRIBUTING-BEGINNERS.md`](CONTRIBUTING-BEGINNERS.md#optional--let-an-ai-coding-agent-guide-you). Der kurze Weg:
1. Installiere Git, Node.js 24+, pnpm 10.10.0, Rust 1.96.1 (`rustfmt` + `clippy`), CMake, Ninja, ripgrep sowie die plattformspezifischen Desktop-Build-Voraussetzungen.
2. Forke und klone das Repo, führe dann `git submodule update --init --recursive` aus, bevor du `pnpm install` startest, damit die mitgelieferten Tauri/CEF-Quellen vorhanden sind.
diff --git a/docs/README.ja-JP.md b/docs/README.ja-JP.md
index 94d52781cb..bc1b023136 100644
--- a/docs/README.ja-JP.md
+++ b/docs/README.ja-JP.md
@@ -152,7 +152,7 @@ n8n と Zapier に強くインスパイアされた[ワークフロー](https://
## ソースからのコントリビュート
-新しいコントリビューターの方は、まず [`CONTRIBUTING.md`](../CONTRIBUTING.md) で fork/PR ワークフローとローカル検証コマンドを確認するか、[`CONTRIBUTING-BEGINNERS.md`](../CONTRIBUTING-BEGINNERS.md#optional--let-an-ai-coding-agent-guide-you) のコピー&ペーストできる AI エージェント向けプロンプトを使ってください。最短経路は以下のとおりです:
+新しいコントリビューターの方は、まず [`CONTRIBUTING.md`](../CONTRIBUTING.md) で fork/PR ワークフローとローカル検証コマンドを確認するか、[`CONTRIBUTING-BEGINNERS.md`](CONTRIBUTING-BEGINNERS.md#optional--let-an-ai-coding-agent-guide-you) のコピー&ペーストできる AI エージェント向けプロンプトを使ってください。最短経路は以下のとおりです:
1. Git、Node.js 24+、pnpm 10.10.0、Rust 1.96.1(`rustfmt` + `clippy`)、CMake、Ninja、ripgrep、プラットフォーム向けデスクトップビルドの前提条件をインストールします。
2. リポジトリを fork してクローンし、`pnpm install` の前に `git submodule update --init --recursive` を実行して、ベンダー化された Tauri/CEF のソースを取得します。
diff --git a/docs/README.ko.md b/docs/README.ko.md
index c968390734..1abe8b59cf 100644
--- a/docs/README.ko.md
+++ b/docs/README.ko.md
@@ -152,7 +152,7 @@ n8n과 Zapier에서 깊은 영감을 받은 [워크플로우](https://tinyhumans
## 소스에서 기여하기
-새로운 기여자인가요? 포크/PR 워크플로우 및 로컬 검증 명령에 대해서는 [`CONTRIBUTING.md`](../CONTRIBUTING.md)에서 시작하거나, [`CONTRIBUTING-BEGINNERS.md`](../CONTRIBUTING-BEGINNERS.md#optional--let-an-ai-coding-agent-guide-you)의 복사-붙여넣기 AI 에이전트 프롬프트를 사용하세요. 빠른 경로는 다음과 같습니다.
+새로운 기여자인가요? 포크/PR 워크플로우 및 로컬 검증 명령에 대해서는 [`CONTRIBUTING.md`](../CONTRIBUTING.md)에서 시작하거나, [`CONTRIBUTING-BEGINNERS.md`](CONTRIBUTING-BEGINNERS.md#optional--let-an-ai-coding-agent-guide-you)의 복사-붙여넣기 AI 에이전트 프롬프트를 사용하세요. 빠른 경로는 다음과 같습니다.
1. Git, Node.js 24+, pnpm 10.10.0, Rust 1.96.1(`rustfmt` + `clippy`), CMake, Ninja, ripgrep 및 플랫폼 데스크톱 빌드 필수 구성 요소를 설치합니다.
2. 저장소를 포크하고 클론한 다음, `pnpm install` 전에 `git submodule update --init --recursive`를 실행하여 벤더링된 Tauri/CEF 소스가 존재하는지 확인합니다.
diff --git a/docs/README.ur-pk.md b/docs/README.ur-pk.md
index 8b32212814..222715b15a 100644
--- a/docs/README.ur-pk.md
+++ b/docs/README.ur-pk.md
@@ -198,7 +198,7 @@ n8n اور Zapier سے گہرے متاثر، [ورک فلوز](https://tinyhuman
## سورس سے تعاون
-نیا تعاون کنندہ؟ fork/PR ورک فلو اور مقامی تصدیقی کمانڈز کے لیے [`CONTRIBUTING.md`](../CONTRIBUTING.md) سے شروع کریں، یا [`CONTRIBUTING-BEGINNERS.md`](../CONTRIBUTING-BEGINNERS.md#optional--let-an-ai-coding-agent-guide-you) میں موجود کاپی پیسٹ AI-ایجنٹ پرامپٹ استعمال کریں۔ مختصر راستہ:
+نیا تعاون کنندہ؟ fork/PR ورک فلو اور مقامی تصدیقی کمانڈز کے لیے [`CONTRIBUTING.md`](../CONTRIBUTING.md) سے شروع کریں، یا [`CONTRIBUTING-BEGINNERS.md`](CONTRIBUTING-BEGINNERS.md#optional--let-an-ai-coding-agent-guide-you) میں موجود کاپی پیسٹ AI-ایجنٹ پرامپٹ استعمال کریں۔ مختصر راستہ:
1. Git، Node.js 24+، pnpm 10.10.0، Rust 1.96.1 (`rustfmt` + `clippy`)، CMake، Ninja، ripgrep، اور پلیٹ فارم ڈیسک ٹاپ بلڈ کی ضروریات انسٹال کریں۔
2. ریپو کو fork اور کلون کریں، پھر `pnpm install` سے پہلے `git submodule update --init --recursive` چلائیں تاکہ وینڈرڈ Tauri/CEF سورس موجود ہوں۔
diff --git a/docs/README.zh-CN.md b/docs/README.zh-CN.md
index 5657e4d930..5a23b3487a 100644
--- a/docs/README.zh-CN.md
+++ b/docs/README.zh-CN.md
@@ -152,7 +152,7 @@ OpenHuman 跳过了等待期。连接你的账户,让[自动拉取](https://ti
## 从源码贡献
-新贡献者?从 [`CONTRIBUTING.md`](../CONTRIBUTING.md) 了解 fork/PR 工作流和本地验证命令,或使用 [`CONTRIBUTING-BEGINNERS.md`](../CONTRIBUTING-BEGINNERS.md#optional--let-an-ai-coding-agent-guide-you) 中可直接复制粘贴的 AI 智能体提示词。快速路径:
+新贡献者?从 [`CONTRIBUTING.md`](../CONTRIBUTING.md) 了解 fork/PR 工作流和本地验证命令,或使用 [`CONTRIBUTING-BEGINNERS.md`](CONTRIBUTING-BEGINNERS.md#optional--let-an-ai-coding-agent-guide-you) 中可直接复制粘贴的 AI 智能体提示词。快速路径:
1. 安装 Git、Node.js 24+、pnpm 10.10.0、Rust 1.96.1(`rustfmt` + `clippy`)、CMake、Ninja、ripgrep,以及各平台桌面构建的前置依赖。
2. Fork 并克隆仓库,然后运行 `git submodule update --init --recursive` 之后再执行 `pnpm install`,确保内置的 Tauri/CEF 源码就位。
diff --git a/docs/SUPPORT.md b/docs/SUPPORT.md
index b291a4f6e2..eafb5d04ea 100644
--- a/docs/SUPPORT.md
+++ b/docs/SUPPORT.md
@@ -12,7 +12,7 @@ Pick the channel by what you have, and bring the evidence the form asks for.
| A model or provider misbehaving | [Models & providers](https://github.com/tinyhumansai/openhuman/discussions/categories/models-and-providers) |
| Something you built and want people to use | [Show & tell](https://github.com/tinyhumansai/openhuman/discussions/categories/show-and-tell) |
| Reproducible behavior that should change | [An issue](https://github.com/tinyhumansai/openhuman/issues/new/choose) |
-| A vulnerability | [The security policy](SECURITY.md) — never a public thread |
+| A vulnerability | [The security policy](../SECURITY.md) — never a public thread |
| A conversation | [Discord](https://discord.tinyhumans.ai/) |
Discord is for talking; Discussions is for anything that should still be
@@ -37,7 +37,7 @@ later does not un-publish a key.
Maintainers work a triage queue rather than the feed. A thread with community
replies and no maintainer reply gets `awaiting maintainer` and is worked
oldest-first — see
-[docs/community/discussions.md](docs/community/discussions.md).
+[docs/community/discussions.md](community/discussions.md).
Not everything belongs in core. If the answer is "that should be a plugin", the
thread gets `plugin, not core` and stays open so the plugin can be linked from
diff --git a/docs/community/discussions.md b/docs/community/discussions.md
index 156162d110..2ad658cf0a 100644
--- a/docs/community/discussions.md
+++ b/docs/community/discussions.md
@@ -2,7 +2,7 @@
How this repository's Discussions are organized, and how a thread moves through
them. Written for maintainers doing triage; contributors only need
-[SUPPORT.md](../../SUPPORT.md).
+[SUPPORT.md](../SUPPORT.md).
## Why not the default six
diff --git a/docs/harness-comparison-2026-07-22.md b/docs/harness-comparison-2026-07-22.md
index f3844562c7..36585b4b79 100644
--- a/docs/harness-comparison-2026-07-22.md
+++ b/docs/harness-comparison-2026-07-22.md
@@ -3,9 +3,7 @@
Date: 2026-07-22
Method: web research against primary sources where they exist (GitHub repos and
issue trackers, official docs), with every weakly-sourced figure flagged. Our
-own numbers come from the measured benchmarks in
-[`library-benchmarking.md`](library-benchmarking.md) and
-[`resource-profiling-session-2026-07-21.md`](resource-profiling-session-2026-07-21.md).
+own numbers come from the reproducible drivers under `scripts/profile/`.
The single most important source-quality finding: **the only fully measured,
reproducible numbers in this comparison are ours.** Codex publishes binary
diff --git a/scripts/profile/README.md b/scripts/profile/README.md
index 9f4a942e71..906e7f72e4 100644
--- a/scripts/profile/README.md
+++ b/scripts/profile/README.md
@@ -2,9 +2,7 @@
Reproducible benchmarking scripts for the OpenHuman Rust core as an embedded
library (no RPC server), built around the `library-profile` and `rss-bench`
-binaries (see `src/bin/library_profile/main.rs`). Full write-up:
-[`docs/library-benchmarking.md`](../../docs/library-benchmarking.md). Prior
-findings: [`docs/resource-profiling-session-2026-07-21.md`](../../docs/resource-profiling-session-2026-07-21.md).
+binaries (see `src/bin/library_profile/main.rs`).
Five driver scripts: `library-bench.sh` (per-scenario RSS/duration),
`library-cpu.sh` (samply), `library-heap.sh` (dhat), `library-fleet.sh`
@@ -64,9 +62,7 @@ projected footprint at the target agent count fits the RAM budget.
Results land in `target/profile/rust-library/fleet-<timestamp>/` (or
`--out DIR`). Exits nonzero if any swept N reports `fits: false` (use
-`--no-gate` to report only). See
-[`docs/library-benchmarking.md`](../../docs/library-benchmarking.md#the-2-gb--2-vcpu-server-budget)
-for the budget math.
+`--no-gate` to report only). The script's `--help` documents the budget math.
### `library-instances.sh` — multi-instance (many-processes) sweep
@@ -90,9 +86,7 @@ Results land in `target/profile/rust-library/instances-<timestamp>/` (or
`--out DIR`). Refuses to spawn more than `--max-instances` (default 200)
without an explicit raise — see the script's `--help` for the RAM math. Exits
nonzero with `--gate` if any instance failed to complete cleanly (nonzero
-exit or missing/invalid JSON); default is report-only. See
-[`docs/library-benchmarking.md`](../../docs/library-benchmarking.md#fleet-one-process-vs-instances-many-processes)
-for the fleet-vs-instances framing.
+exit or missing/invalid JSON); default is report-only.
### `library-pool-gate.sh` — runtime pool regression gate (#5106)
diff --git a/scripts/profile/library-bench.sh b/scripts/profile/library-bench.sh
index cb0c58fb41..85d26fecbc 100755
--- a/scripts/profile/library-bench.sh
+++ b/scripts/profile/library-bench.sh
@@ -271,8 +271,7 @@ write_summary() {
ZeroClaw self-reports (unverified) idling under 5 MiB RAM and roughly 8-12 MiB
under load. OpenHuman's Rust core currently settles around 35-50 MiB depending
-on scenario and feature set (see docs/library-benchmarking.md and
-docs/resource-profiling-session-2026-07-21.md for scope/caveats). Treat this as
+on scenario and feature set. Treat this as
a north star, not a like-for-like comparison: ZeroClaw's feature surface and
scope differ substantially from the OpenHuman core.
EOF
diff --git a/scripts/profile/library-cpu.sh b/scripts/profile/library-cpu.sh
index fb8d908af0..4f1b492bf3 100755
--- a/scripts/profile/library-cpu.sh
+++ b/scripts/profile/library-cpu.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# library-cpu.sh — samply wrapper for a CPU profile of one library-profile
-# scenario, following the recipe used in docs/resource-profiling-session-2026-07-21.md.
+# scenario, following the cold-path CPU profiling recipe.
#
# Usage:
# ./scripts/profile/library-cpu.sh <scenario> [-- <extra env VAR=value>...]
diff --git a/scripts/profile/library-fleet.sh b/scripts/profile/library-fleet.sh
index a55189f97a..4f8221f15a 100755
--- a/scripts/profile/library-fleet.sh
+++ b/scripts/profile/library-fleet.sh
@@ -48,7 +48,7 @@ GATE=1
# Idle CPU is measured over a 10s parked window and should be ~flat
# regardless of agent count (idle agents cost ~zero CPU). 500ms of CPU
# across that window (5% of one core) is the "low" threshold used in the
-# PASS/FAIL verdict line; see docs/library-benchmarking.md.
+# PASS/FAIL verdict line.
IDLE_CPU_MS_MAX=500
usage() {
diff --git a/src/core/observability.rs b/src/core/observability.rs
index 4e25a41c45..7d59a01fad 100644
--- a/src/core/observability.rs
+++ b/src/core/observability.rs
@@ -327,7 +327,6 @@ pub enum ExpectedErrorKind {
/// — `store::decide` updated 0 rows because `decided_at` was already set,
/// and `store::get_decision` confirms a persisted decision exists. The
/// inline-approvals design spec
- /// (`docs/superpowers/specs/2026-05-23-telegram-inline-approvals-design.md`)
/// classifies "no pending approval found" as a **benign** outcome: the
/// frontend `ApprovalRequestCard.decide` and the Telegram callback both call
/// `approval_decide` without server-confirmed dedupe, so double-taps, two
diff --git a/src/openhuman/agent/orchestration/mod.rs b/src/openhuman/agent/orchestration/mod.rs
index 7fe6f5ddab..8b7e0f4dc1 100644
--- a/src/openhuman/agent/orchestration/mod.rs
+++ b/src/openhuman/agent/orchestration/mod.rs
@@ -13,8 +13,7 @@
//! layer: durable SQL/JSON run ledgers, validation, cancellation semantics,
//! compatibility events, and JSON-RPC/tool response formatting.
//! [`running_subagents`] mirrors detached-sub-agent lifecycle into a
-//! TinyAgents task store; porting more of that lifecycle upstream is tracked
-//! in WP-5 of `docs/tinyagents-migration-plan-2026-07-22.md`.
+//! TinyAgents task store.
pub mod agent_teams;
pub(crate) mod background_completions;
diff --git a/src/openhuman/agent/orchestration/spawn_parallel_graph.rs b/src/openhuman/agent/orchestration/spawn_parallel_graph.rs
index babd14f238..f371da6dcb 100644
--- a/src/openhuman/agent/orchestration/spawn_parallel_graph.rs
+++ b/src/openhuman/agent/orchestration/spawn_parallel_graph.rs
@@ -3,8 +3,7 @@
//! The tool wrapper still owns `ToolResult` translation. This module owns
//! request parsing, parent-context validation, graph-side request validation,
//! worktree preflight, progress/event projection, worker fanout, final JSON
-//! formatting, and the topology surface (WP-5 of
-//! `docs/tinyagents-migration-plan-2026-07-22.md`).
+//! formatting, and the topology surface.
//!
//! **Write safety.** Whether a worker *needs* a claim on the shared workspace is
//! an OpenHuman decision — it reads sandbox mode, tool permissions and the
diff --git a/src/openhuman/agent/progress_tracing/journal_projection.rs b/src/openhuman/agent/progress_tracing/journal_projection.rs
index ea5984c825..99a06b2166 100644
--- a/src/openhuman/agent/progress_tracing/journal_projection.rs
+++ b/src/openhuman/agent/progress_tracing/journal_projection.rs
@@ -14,7 +14,7 @@
//! journalled event, made possible by the crate carrying tool outcome
//! (`duration_ms`/`output_bytes`/`error`) on `ToolCompleted` (tinyagents#18).
//!
-//! Known parity gaps (see `docs/.../C4-journal-progress-parity-plan.md` §2a):
+//! Known parity gaps:
//! - **Cost is an estimate, not the charge.** The provider's charged USD
//! reaches the live path through the `usage_carry` side-channel, which is not
//! an `AgentEvent` and is not journalled, so both the per-call