agentleFS
fengsihao23-engfengsihao23-eng/shen-hua/skills/runtime-operator/SKILL.md

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.

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
  1. Distinctive:

    Use this skill when:

    line 12
  2. Distinctive:

    Do not use this skill when:

    line 20
  3. Distinctive:

    Use Codex heartbeat/cron automation only after a user chooses cadence.

    line 65
  4. Distinctive:

    Use CI or external checks for hard enforcement when available.

    line 68
  5. Very specific:

    Use .agent/state/tasks.jsonl as the local queue.

    line 76
  6. Distinctive:

    When runtime state changes, also update:

    line 86
  7. Very specific:

    Use $project-commander for choosing the next task.

    line 93
  8. Very specific:

    Use $persistent-memory for memory hygiene.

    line 94
  9. Very specific:

    Use $verification-loop after script or state changes.

    line 95
  10. Very specific:

    Use $self-reviewer and $handoff-writer before ending.

    line 96

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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-commander needs 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

  1. Automatic persistent running:
    • Generate an automation prompt and runtime queue.
    • Use Codex heartbeat/cron automation only after a user chooses cadence.
  2. Forced tool scheduling:
    • Encode gates in AGENTS.md, skills, and gate.
    • Use CI or external checks for hard enforcement when available.
  3. External state sync:
    • Export a machine-readable outbox and sync snapshot.
    • Actual remote writes require the chosen target, credentials, and MCP/CLI availability.
  4. Long-term memory retrieval:
    • Rebuild and query .agent/state/memory-index.json.
    • Upgrade to SQLite/vector/MCP memory only when project scale needs it.
  5. Platform-level task queue:
    • Use .agent/state/tasks.jsonl as the local queue.
    • Mirror it to GitHub Issues/Projects, Linear, or other systems when configured.

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.jsonl when queue tasks change
  • .agent/resume-prompt.md after major state changes

Other Skills

  • Use $project-commander for choosing the next task.
  • Use $persistent-memory for memory hygiene.
  • Use $verification-loop after script or state changes.
  • Use $self-reviewer and $handoff-writer before 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 gate

The 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:

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.