runtime-operator
Skill1 starsChanged 6 months agoMITView on GitHub
Shen-Hua V2 runtime operator for minimizing the gap to model-level long-task agents. Use when Codex needs real task queueing, durable event logs, memory indexing/search, resume prompt generation, verification gates, automation handoff prompts, or external-sync outbox files for long-running project work.
In this repository9 other files it gives its agents.
- templates/AGENTS.mdAGENTS.md
- deep-plannerSkill
- handoff-writerSkill
- persistent-memorySkill
- project-commanderSkill
- self-reviewerSkill
- shen-huaSkill
- subagent-orchestratorSkill
- verification-loopSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 5 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Use this skill when:
- Distinctive: line 20
Do not use this skill when:
- Distinctive: line 65
Use Codex heartbeat/cron automation only after a user chooses cadence.
- Distinctive: line 68
Use CI or external checks for hard enforcement when available.
- Very specific: line 76
Use .agent/state/tasks.jsonl as the local queue.
- Distinctive: line 86
When runtime state changes, also update:
- Very specific: line 93
Use $project-commander for choosing the next task.
- Very specific: line 94
Use $persistent-memory for memory hygiene.
- Very specific: line 95
Use $verification-loop after script or state changes.
- Very specific: line 96
Use $self-reviewer and $handoff-writer before ending.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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 Operator
Runtime Operator adds a real, project-local runtime layer under .agent/. It does not create unlimited autonomy, but it makes long-task operation resumable, inspectable, queue-driven, and ready for Codex automations or external sync.
Trigger Conditions
Use this skill when:
- The user asks to reduce gaps around automatic continuation, tool scheduling, external state sync, long-term memory retrieval, or task queues.
- A long-running project needs queue state, event logs, memory search, or resume prompts.
$project-commanderneeds a harder runtime substrate than Markdown-only memory.- Codex automations, GitHub/CI/task-board sync, or MCP integration must be prepared.
Do Not Trigger
Do not use this skill when:
- The task is a simple one-shot answer.
- The user forbids creating
.agent/state/or scripts. - A project already mandates a different runtime/state system.
Runtime Files
Maintain:
.agent/state/tasks.jsonl: durable local task queue..agent/state/events.jsonl: append-only runtime event log..agent/state/memory-index.json: searchable local memory index..agent/state/sync-outbox.jsonl: external sync actions waiting for a target..agent/state/sync-export.json: latest sync snapshot..agent/state/sync-targets.json: sync target policy and requirements..agent/state/automation-profile.json: automation readiness settings..agent/resume-prompt.md: prompt for future Codex sessions or automations..agent/automation-prompt.md: prompt body for a Codex heartbeat/cron automation..agent/RUNTIME.md: human-readable runtime operating guide..agent/GATES.md: required verification gates.
Script
Use:
py -3 .\.agents\skills\persistent-memory\scripts\shenhua_runtime.py <command>Key commands:
init: create runtime state files and prompts.task add <title>: add a task to the local queue.task list: show queue status.task update <id> --status done --note "..."event --type <type> --message "..."index: rebuild local memory index.search <query>: search indexed project memory.resume: regenerate.agent/resume-prompt.md.automation-prompt: regenerate.agent/automation-prompt.md.sync-export: export queue/events/handoff for external sync.gate: run runtime self-checks, skill validation, memory index, and resume generation.
Five Gap Minimization
- Automatic persistent running:
- Generate an automation prompt and runtime queue.
- Use Codex heartbeat/cron automation only after a user chooses cadence.
- Forced tool scheduling:
- Encode gates in
AGENTS.md, skills, andgate. - Use CI or external checks for hard enforcement when available.
- Encode gates in
- External state sync:
- Export a machine-readable outbox and sync snapshot.
- Actual remote writes require the chosen target, credentials, and MCP/CLI availability.
- Long-term memory retrieval:
- Rebuild and query
.agent/state/memory-index.json. - Upgrade to SQLite/vector/MCP memory only when project scale needs it.
- Rebuild and query
- Platform-level task queue:
- Use
.agent/state/tasks.jsonlas the local queue. - Mirror it to GitHub Issues/Projects, Linear, or other systems when configured.
- Use
Required .agent/ Updates
Always update:
.agent/LOG.md.agent/TASKS.md.agent/HANDOFF.md
When runtime state changes, also update:
.agent/state/events.jsonl.agent/state/tasks.jsonlwhen queue tasks change.agent/resume-prompt.mdafter major state changes
Other Skills
- Use
$project-commanderfor choosing the next task. - Use
$persistent-memoryfor memory hygiene. - Use
$verification-loopafter script or state changes. - Use
$self-reviewerand$handoff-writerbefore ending.
Subagents
Runtime Operator does not require subagents. Subagents can consume tasks from tasks.jsonl only when the current Codex runtime and user authorization permit delegation.
Verification
Run:
py -3 .\.agents\skills\persistent-memory\scripts\shenhua_runtime.py gateThe gate must pass before claiming the runtime layer is ready.
Output Format
RUNTIME STATUS
Queue:
Events:
Memory index:
Automation readiness:
External sync:
Gate result:
Remaining hard limits: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.

