runtime-engine
Skill1 starsChanged 6 months agoMITView on GitHub
Use when working on packages/theseus-runtime runtime host, command/control/query contracts, systems, sinks, projections, active dispatch registry, tool catalog hydration, SQLite runtime stores, snapshots, or runtime tests.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- extra-org/extratheir own version, first seen Jun 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- extra-org/extra★ 119same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-self-checkSkill
- biome-grit-rulesSkill
- biome-toolingSkill
- bun-testSkill
- bun-workspaceSkill
- cleanup-auditSkill
- code-reviewSkill
- dispatch-satelliteSkill
- docs-managementSkill
- docs-readingSkill
- effect-concurrency-lifecycleSkill
- effect-errors-schemaSkill
- effect-observability-timeSkill
- effect-services-layersSkill
- effect-testing-runtimeSkill
- effect-v4Skill
- jsx-md-authoringSkill
- monorepo-maintenanceSkill
- refactoring-disciplineSkill
- roadmap-managementSkill
- server-runtimeSkill
- testing-patternsSkill
- theseus-designSkill
- tool-authoringSkill
- typescript-strictSkill
- ui-layout-disciplineSkill
- theseus-designSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. About 0 are common, 17 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈17
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this skill for packages/theseus-runtime.
- Distinctive: line 76
Do not move server concerns into runtime.
- Distinctive: line 78
Do not introduce plugin APIs, dynamic loading, manifests, extension registries, or generic lifecycle hooks unless explicitly requested.
- Very specific: line 123
Add a new module only when it names a real runtime responsibility.
- Distinctive: line 134
When adding runtime behavior, prefer this order:
- Distinctive: line 138
Add or extend the narrow typed module.
- Distinctive: line 142
Add focused tests next to the owning package/module.
- Distinctive: line 153
If the proposed design starts with a public plugin API, first try a typed source module and static wiring instead.
- Distinctive: line 175
Do not lock runtime contracts to Docker Sandboxes, Sandcastle, Vercel Sandbox, E2B, Daytona, Modal, Podman, or git worktrees.
- Distinctive: line 193
Do not mirror raw model calls or complete tool result streams into Capsule by default.
- Distinctive: line 197
Keep Mission/Capsule assumptions local to the systems, sinks, and projections that actually need them.
- Distinctive: line 215
Read package scripts before running commands.
- Distinctive: line 220
Run server/core tests when RPC serialization, dispatch events, or primitive contracts change.
- Distinctive: line 225
Use Effect DI to cut the graph and test the behavior owner in isolation.
- Very specific: line 227
Default to focused owner tests with fake layers, fake services, fake stores, fake RuntimeEvents, deterministic clocks/ids/models, and …
- Distinctive: line 249
Default to clean-break replacement.
- Distinctive: line 253
When changing runtime contracts:
- Very specific: line 255
update first-party server/web/client callers in the same pass
- Distinctive: line 256
update stores, projections, sinks, serializers, tests, docs, and skills that consume changed RuntimeEvents
- Distinctive: line 258
update active design docs and skills when Mission/Capsule semantics change
- Distinctive: line 259
leave one coherent path, not a migration maze
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Runtime Engine
Use this skill for packages/theseus-runtime.
Load theseus-design as companion context when the work affects mission,
dispatch, capsule, satellite, or runtime ownership doctrine. Load
effect-concurrency-lifecycle for fibers, interruption, streams, scopes,
queues, or background completion watchers. Load effect-services-layers for
Layer/service wiring.
Read First
docs/runtime/architecture.mdpackages/theseus-runtime/package.jsonpackages/theseus-runtime/src/index.tspackages/theseus-runtime/src/live.tspackages/theseus-runtime/src/runtime/types.tspackages/theseus-runtime/src/runtime/host.ts- nearest package-local tests before changing behavior
Then read only the relevant slice:
- commands/control/query:
src/runtime/types.ts,src/runtime/client.ts,src/runtime/operations.ts - mission behavior:
src/runtime/systems/mission/system.ts - dispatch behavior:
src/runtime/systems/dispatch/system.ts - side effects:
src/runtime/sinks/ - read models:
src/runtime/projections/ - active handles:
src/registry.ts - tool catalog hydration:
src/tool-catalog.ts - durable state:
src/store/ - isolation doctrine:
docs/runtime/isolation.md
Current Model
The runtime is a live mission/world host. It exposes command, control, query,
and snapshot ports through TheseusRuntimeService.
The runtime is not a plugin host. It is statically wired source that agents can edit. Modularity exists to make source evolution safe, not to support opaque third-party extensions.
The runtime should be isolation-native. Do not assume tool execution happens against the host checkout. Sandbox is execution isolation; Workspace is source-state isolation inside a Sandbox.
The runtime owns:
- mission creation and mission/capsule links
- dispatch start, continuation, completion watching, and active handle registry
- current capsule binding for running work
- tool catalog hydration from serialized dispatch specs
- runtime command/control/query semantics
- projections over durable runtime state
- runtime-level errors
The runtime does not own:
- HTTP/RPC wire shape
- provider-specific transport details
- web UI state
- fixed crew/product ontology
- primitive implementation internals from core
Boundaries
theseus-coreowns primitives: Mission, Tool, Capsule, Dispatch, Satellite.theseus-runtimecomposes primitives into live work.theseus-serveradapts transport to runtime commands and queries.icarus-webrenders operator state and sends operator intent.
Do not move server concerns into runtime. Do not move runtime behavior into server handlers. Do not turn crew scaffolding into required runtime structure. Do not introduce plugin APIs, dynamic loading, manifests, extension registries, or generic lifecycle hooks unless explicitly requested.
Explicit Assembly
Behavior that changes what Theseus agents see, can do, observe, decide, or auto-load must be explicit in harness assembly.
Allowed pattern:
- named source module
- typed inputs/outputs
- explicit order
- visible wiring in
live.ts,host.ts, a ring, or another assembly module - opt out by removing/changing the assembly entry
Disallowed pattern:
- hidden file-existence behavior
- implicit
AGENTS.md/skill/instruction loading - import-order registration
- auto-discovered tools/satellites/systems
- layered user/org/project behavior merges that affect agent execution
- broad tool/model grants by default
Autoloading is allowed when it is owned by an explicit assembled module, such
as an agentsMdInstructionLoader satellite/source that can be removed from the
ring or harness assembly.
This rule is scoped to Theseus harness/runtime behavior. It does not forbid ordinary server, web, build, deployment, or environment configuration.
Module Shape
host.tsshould route and compose; avoid growing behavior there.types.tsowns runtime protocol contracts; keep variants explicit and exhaustively matched.systems/*/system.tsowns runtime behavior for one concept: commands, controls, events, or services in; events, state transitions, fibers, or primitive calls out.sinks/*owns side-effect consumers.projections/*owns read models and query derivation.store/*owns durable persistence backends.registry.tsowns active in-process handles only.
Add a new module only when it names a real runtime responsibility. Avoid generic
utils, mixed service bags, and old/new parallel paths.
A system does not need to be long-lived or heavyweight, but it must own a behavior slice that advances or reacts to live harness state. Do not call every module a system. Pure read shape is a projection. Side-effect consumer is a sink. Dispatch-safe-point middleware is Satellite. Static inventory is a catalog/resource unless it owns selection or hydration behavior.
Feature Addition Pattern
When adding runtime behavior, prefer this order:
- Identify whether the feature is a system, satellite, projection, sink, or tool/model catalog module.
- Add or extend the narrow typed module.
- Emit named RuntimeEvents if other modules or operators need to observe it.
- Wire it statically through
host.ts,live.ts, or the nearest existing assembly point. - Add focused tests next to the owning package/module.
Examples:
- file minimap: add file activity events, a file activity system or dispatch observation seam, and a projection
- stricter policy: add a
Satelliteand policy events - alternate mission behavior: replace or fork mission system wiring while preserving useful command/query contracts
- new audit output: add a sink
If the proposed design starts with a public plugin API, first try a typed source module and static wiring instead.
Runtime Semantics
- Commands start or create work.
- Control affects active work.
- Queries inspect active or durable state.
- Snapshots summarize current state without becoming a second store.
- Continuation creates a child dispatch with inherited context and a parent link. Do not mutate the old dispatch into a new run.
- Empty tool selections mean no tools. Broad authority must be explicit.
- Active registry state is not durable history.
- RuntimeEvents and CapsuleEvents should be append-only events.
- Sandbox and Workspace are distinct axes:
- Sandbox controls execution isolation: process space, filesystem root, network, secrets, mounts, resources, and host access.
- Workspace controls source-state isolation: checkout, branch, patch, diff, dirty state, and merge base.
- A git worktree is a Workspace provider, not a security Sandbox.
- Tools and model calls should execute against a Sandbox and usually target a Workspace. Promotion across workspace/sandbox boundaries should be explicit.
- Do not lock runtime contracts to Docker Sandboxes, Sandcastle, Vercel Sandbox, E2B, Daytona, Modal, Podman, or git worktrees. Treat them as provider candidates wired explicitly through source.
- RuntimeEvent identity is
_tag. Do not create a parallel dot-case runtime event namespace. Persist_tagfor indexing and serialize the tagged event as JSON. - Emit RuntimeEvents through named constructors in
runtime/events.tsor the owning event module; do not duplicate_tagliterals across systems. - Event streams are scoped by source and audience:
- DispatchEvents are dispatch-loop events from the Dispatch primitive
- RuntimeEvents are the mechanical runtime ledger for one run/session
- CapsuleEvents are curated mission record entries for review, evidence, decisions, artifacts, and continuation
- For now, one Mission owns exactly one primary Capsule. Do not introduce free-floating Capsules or arbitrary nested Capsules.
- Future side quests/sub-missions that need separate black boxes should become mission-like child work envelopes first; each child may then own its own Capsule.
- Do not mirror raw model calls or complete tool result streams into Capsule by default. Capsule sinks should select mission-relevant events.
- CapsuleEvent strings and OpenTelemetry span/metric names are adapter outputs, not RuntimeEvent identities.
- Keep Mission/Capsule assumptions local to the systems, sinks, and projections that actually need them. Future work models should not require rewriting unrelated runtime modules.
- Mission is primitive as structured work intent, but the current mission schema and mission types are evolvable. Do not hard-code one implementation-mission lifecycle into unrelated runtime systems.
Satellite And RuntimeBus
Satellite is dispatch-scoped middleware from core. Runtime provides a
SatelliteRing to dispatch and observes dispatch events.
RuntimeBus is an operator/client transport concept. If implemented, it should
adapt to runtime command/control/query semantics. Do not use it as a synonym for
Satellite or as a second runtime host.
Verification
- Read package scripts before running commands.
- For runtime-only type changes, prefer
bun run typecheckat the root when public contracts or server imports are affected. - For runtime behavior changes, run focused runtime tests first:
bun test packages/theseus-runtime/src/runtime - Run server/core tests when RPC serialization, dispatch events, or primitive contracts change.
Testing Doctrine
Use Effect DI to cut the graph and test the behavior owner in isolation.
Default to focused owner tests with fake layers, fake services, fake stores, fake RuntimeEvents, deterministic clocks/ids/models, and package-local test helpers.
Expected tests:
- systems: command/control/fact/lifecycle behavior
- projections: derivation from stored events
- sinks: curation and side effects
- tool/model catalog modules: selection and hydration
- codecs:
_taground trips and unknown boundary handling - registries/stores: direct behavior
Tests are executable design context for future agents. Prefer explicit, readable assertions over one broad scenario that hides the contract.
Narrow package integration tests are allowed when they prove local assembly of a few services. Do not add broad runtime/server/web E2E tests without explicit user confirmation or an explicit wiring-proof request.
Compatibility
Default to clean-break replacement. Do not preserve stale runtime contracts with aliases, shims, v1/v2 paths, compatibility re-exports, or parallel old/new flows unless the user explicitly requests back compatibility.
When changing runtime contracts:
- update first-party server/web/client callers in the same pass
- update stores, projections, sinks, serializers, tests, docs, and skills that consume changed RuntimeEvents
- update active design docs and skills when Mission/Capsule semantics change
- leave one coherent path, not a migration maze
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

