Use this class-level skill when one tenant or product instance contains multiple persistent Hermes-like operators and correctness depends on every chat turn, background job, secret, and mutation reaching the exact owning profile.
The central rule is:
Business/domain records retain their canonical ownership model; profiles identify isolated operators, immutable authority, runtime routing, and provenance.
This skill covers the full chain from durable profile identity through runtime resolution, private filesystem materialization, profile-bound capabilities, chat/job dispatch, lifecycle supervision, and disposable canary proof.
Choose and document the product topology before coding:
Do not equate profile identity with data ownership, and do not let caller/model fields create authority.
thread/job
→ hermes_profile_id
→ authoritative active profile reload
→ exact stored opaque runtime_ref
→ trusted runtime resolution
→ /p/<profile-slug>/...
→ isolated home/session/secrets
→ profile-bound capability
→ canonical domain command
→ profile-attributed audit/job/review/UI state
Hard requirements:
runtime_ref is opaque and server-owned, never a caller URL/path/port.Prefer one private API-only multiplexer per tenant with profile-prefixed routes. Materialize one private home per profile beneath the multiplexer root and isolate:
Use canonical/relative path containment checks and reject traversal, absolute escapes, unsafe slugs, and sibling-prefix tricks.
Raw capabilities and provider keys belong only in private profile secret files. Config/manifests may contain provider/model names and trusted non-secret bindings, never raw credentials or model-selectable authority. Profile-local connector configuration must defeat hostile ambient values.
Issue one reusable active capability identity per profile:
Persistent business profiles should not receive ambient host, Docker, SSH, plugin administration, source/database access, or self-modification authority. Use temporary bounded workers for elevation.
Keep deterministic domain-only jobs on the non-agent path. Reasoning jobs must persist project_id plus hermes_profile_id, validate ownership before handler effects, deduplicate within a profile, claim atomically, use expiring leases, reclaim stale leases, and preserve failure evidence across recurring reschedules.
Dispatch a claimed job only through the active profile's current stored runtime binding. Force profile routing even if ambient routing defaults to legacy or shadow. Give every recurring reasoning handler an explicit failure-reschedule policy.
Prevent startup deadlocks:
Initial config/materialization errors fail startup closed. Public health must not expose raw credentials or internal error detail.
If scheduled work is a product feature, enable the scheduler by default and provide an explicit maintenance/external-worker disable switch.
Use strict RED-GREEN-REFACTOR for authority, routing, and lifecycle boundaries. Minimum tests:
Then run disposable real-runtime canaries for one-business and portfolio-plus-two-business topologies. A schema assertion, Compose parse, or mocked probe is not a runtime canary. Report environmental blockers honestly rather than synthesizing success.
Timeout and completion messages are not evidence. Inspect the worker transcript, actual worktree, untracked files, diff, commits, and tests. Repair and commit a coherent slice yourself or reject it; cherry-pick only after independent verification. A timed-out branch may be useful, but it is never automatically complete.
See references/runtime-dispatch-supervision-checklist.md for detailed filesystem, capability, job, startup, backup, adversarial, and canary checklists derived from a complete multi-profile implementation.
.env.