/.system/skills/ssot/repo/architecture-core-mechanisms/hook-lifecycle/SKILL.md (workflow playbook; created in Phase 3)
/.system/skills/ssot/repo/architecture-core-mechanisms/ability-workflow/SKILL.md (workflow playbook; created in Phase 3)
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: willyu1007-ai-first-template-runtime-model3description: Runtime Model4---5# Runtime Model67This document explains the runtime components and lifecycle semantics used by this AI-first template.89---1011## 1. Purpose and Scope1213This document is SSOT for:14- What the runtime components are (Agent Runtime / Tool Runner / Hook Runner / Module Runner)15- How a session progresses through lifecycle events16- How ability execution is represented and gated1718Out of scope:19- Implementation details of the runtime (later phases)20- Concrete registry generation scripts (later phases)2122---2324## 2. Runtime Components2526| Component | Role | Notes |27|----------|------|-------|28| Agent Runtime | Owns the session lifecycle and AI turn control | Long-lived process |29| Tool Runner | Executes abilities as tasks | Side effects MUST go through abilities |30| Hook Runner | Runs hooks on lifecycle events | Blocking vs non-blocking semantics matter |31| Module Runner | Modular automation exposed as abilities | Not a separate runtime; invoked via Tool Runner |3233Key invariants:34- **AI does not run arbitrary side-effecting operations directly.**35- **Ability execution is task-based** (`task.create` 鈫?`task.run`) and hook-guarded.3637---3839## 3. Execution Flow (Task-Based)4041Canonical flow:421. Read strategy entrypoints (`AGENTS.md`) and activate relevant skills (start with `repo-routing` if unsure)432. Plan with stages: `understand 鈫?plan 鈫?act 鈫?review`443. Execute side effects via the Tool Runner:45 - `task.create` (preflight / availability checks)46 - `task.run` (execution with guards)474. Record outcomes in appropriate workdocs4849---5051## 4. Lifecycle Events (Hook Timeline)5253The runtime emits lifecycle events in a standard sequence:5455```56PromptSubmit 鈫?[AI plans] 鈫?PreAbilityCreate 鈫?PreAbilityCall 鈫?PostAbilityCall 鈫?SessionStop57```5859Semantics:60- **Blocking, AI-visible** events gate decisions and execution (e.g., preflight/guards).61- **Non-blocking, infra-only** events handle logging/telemetry/build/test/report.6263---6465## 5. Safety Model (What prevents unsafe behavior)6667### 5.1 Tool-owned regions6869Some entrypoints contain tool-owned marker blocks. Never edit these blocks manually:70- `<!-- BEGIN ABILITY_INDEX --> ... <!-- END ABILITY_INDEX -->`71- Provider skill wrappers under `/.codex/skills/**` and `/.claude/skills/**` (edit SSOT under `/.system/skills/ssot/**`)7273### 5.2 Human approval gates7475When a change is security-sensitive, production-affecting, or otherwise high-risk:76- Stop and request explicit human approval.77- Record the checkpoint and decision in workdocs.7879---8081## 6. Related documents8283- `/.system/skills/ssot/repo/architecture-core-mechanisms/repo-architecture-overview/SKILL.md` (high-level architecture map)84- `/.system/skills/ssot/repo/architecture-core-mechanisms/hook-lifecycle/SKILL.md` (workflow playbook; created in Phase 3)85- `/.system/skills/ssot/repo/architecture-core-mechanisms/ability-workflow/SKILL.md` (workflow playbook; created in Phase 3)8687---88> Converted and distributed by [TomeVault](https://tomevault.io/claim/willyu1007) — claim your Tome and manage your conversions.89<!-- tomevault:4.0:skill_md:2026-04-15 -->
Run npx skillmds@latest add tomevault-io/willyu1007-ai-first-template-runtime-model in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Runtime Model It is listed under AI & ML on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.