agent-run.lifecycle — Claude Code prompt: what it does, how to install
agent-run.lifecycle instructs an agent to build a structured lifecycle diagram for an agent run using the Archify workflow.
Apache-2.0 ★ 98,599 updated 2026-10-25
.claude/commands/agent-run.lifecycle.mdWhat agent-run.lifecycle does
This prompt tasks the model with authoring a typed JSON diagram spec under the showcase quality profile. The state machine must reflect ordered stages: queued, planning, execution, review, and terminal completion. It requires modeling interruptions, recoverable execution failures, user approval cancellation, and blocked reviews that expire.
The resulting candidate must be written directly to benchmark-candidate.json in the project root without modifying neighboring files. If shell access is available, the agent is directed to validate and repair the JSON using Archify CLI. Without the local Archify CLI installed, candidate self-repair cannot run before export.
What it helps with
- structure state transitions for an autonomous agent run
- map human approvals, review timeouts, and retry flows into JSON
- produce a benchmark diagram payload for Archify
- isolate terminal outcomes from paused execution states
Example prompts for the agent
- Run
agent-run.lifecycleto generate the run lifecycle diagram intobenchmark-candidate.json. - Build a typed JSON lifecycle spec targeting the showcase profile with Archify.
- Create the agent run diagram and validate it with Archify CLI.
How to install agent-run.lifecycle
Manually: put the files in place
.claude/commands/agent-run.lifecycle.mdHow to use
Paste the text at the start of a chat or into project instructions
Questions about agent-run.lifecycle
How to install agent-run.lifecycle in Claude Code?
Save the prompt definition to .claude/commands/agent-run.lifecycle.md inside your workspace.
What does agent-run.lifecycle do?
It guides an LLM to generate a lifecycle state diagram JSON file for Archify, covering execution stages and failure states.
Which output file does the prompt target?
The model writes its final diagram spec directly to benchmark-candidate.json at the repository root.
Source text
agent-run.lifecycle.md · Apache-2.0
# Agent-run lifecycle Use the Archify skill in this repository to create a lifecycle diagram for an agent run. Show the main ordered phases from queued through planning, execution, review, and completion. Execution may pause for human approval or fail recoverably. Review may block while waiting for input. A blocked run may expire, and a waiting approval may be cancelled by the user. Terminal exits must remain distinct from active and waiting states. Author a fresh typed JSON diagram specification targeting the `showcase` quality profile. Choose your own stable internal IDs and layout. Keep active work, interruptions, recovery, and terminal outcomes legible. Use the bundled Archify CLI to validate and repair the candidate when shell access is available. The external harness will independently validate the frozen candidate. Write the final candidate to exactly `benchmark-candidate.json` in the repository root. Do not edit any other file. The candidate file, not the prose response, is the attempt 1 artifact. Do not copy a checked-in example. Do not claim that validation passed.
© tt-a1i · Apache-2.0 · tt-a1i/archify