lifecycle-protocol

lifecycle-protocol is a command for Claude Code from bartoszarendt/agenticloop. It costs 0 tokens per session (1,543 once invoked), scanned A, original, MIT.

A documented lifecycle protocol for an agent-based software system. It defines how facts, decisions, refusals, prerequisites, and protected command-line checks are represented and handled.

In plain words
What is it for?
It helps implement and document validation results, refusal reasons, repair routing, and boundaries around protected workflow actions.
Why use it?
It provides a shared way to explain why an operation is allowed, rejected, or unknown. It also keeps diagnostics separate from actions that change tasks or pass human approval gates.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the agenticloop plugin — 18 skills, 3 commands, 4 agents shipped together

Good fit It helps implement and document validation results, refusal reasons, repair routing, and boundaries around protected workflow actions.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/bartoszarendt/agenticloop/lifecycle-protocol
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/bartoszarendt/agenticloop

Made for: Claude Code.

Or install agenticloop, the plugin that ships this one along with the rest of its 18 skills, 3 commands, 4 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for lifecycle-protocol

README.md
[![agentmods](https://agentmods.dev/badge/commands/bartoszarendt/agenticloop/lifecycle-protocol/github.svg)](https://agentmods.dev/commands/bartoszarendt/agenticloop/lifecycle-protocol)
Your own site
<a href="https://agentmods.dev/commands/bartoszarendt/agenticloop/lifecycle-protocol"><img src="https://agentmods.dev/badge/commands/bartoszarendt/agenticloop/lifecycle-protocol/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for lifecycle-protocol

Your own site · 80×15
<a href="https://agentmods.dev/commands/bartoszarendt/agenticloop/lifecycle-protocol"><img src="https://agentmods.dev/badge/commands/bartoszarendt/agenticloop/lifecycle-protocol.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,543 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01543
Opus 5.5 $0.00000 $0.00617
Sonnet 5.5 $0.00000 $0.00309
Haiku 4.5 $0.00000 $0.00154

Measured 1mo ago against content hash 0aa675412afe, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

lifecycle-protocol scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/lifecycle-protocol.md · 129 lines

How it starts

The opening of the file, as written. The whole thing — 129 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Lifecycle Protocol

This is the single human-readable lifecycle protocol. AGENTIC_LOOP.md is the small acting-methodology index; role files describe role boundaries; skills own procedures; adapters route to those sources. The CLI modules below are the machine authority. This protocol explains their shared lifecycle without making prose a mutation input.

Facts, Verdicts, And Refusals

Protected evaluators return a shared fact/verdict shape: ordered facts identify the canonical fact, observed state, fact owner, policy code when applicable, and evidence; a verdict is legal, illegal, or unknown; reasons identify failed or unavailable material facts; prerequisites name required protected inputs. src/result-envelope.js renders public validation results from that shape.

Every refusal has a stable code from src/refusal-classes.js, a material fact, a fact owner, and a safe deterministic nextAction when repair is mechanical. src/repair-policy.js owns routing. A diagnostic does not grant authority. It cannot move a task, consume a packet, accept review, certify audit, or cross a human gate. Mechanical recomputation is performed atomically by the protected CLI command, not delegated to a role.

task explain is the read-only consumer of those evaluator projections. It returns { derived: true, persisted: false, authority: "none", task, actions }; each action preserves the evaluator's facts, verdict, applicability, reasons, and prerequisites. It does not create evidence and no receipt or required check may invoke it as mutation evidence.

Canonical Lifecycle

  1. Contract and readiness. The Maintainer owns durable task scope and required checks. The CLI validates the trusted task-contract baseline and readiness against current facts. A broad activation scope does not authorize a task and readiness does not create activation.
  2. Authorization and dispatch. task prepare-dispatch derives a packet from current task, activation, readiness, repository, backend, role capability, and task-specific evidence. It is a read-only prediction. The packet is stale whenever a protected input changes.
  3. Atomic role start. For files, task role-start <id> --packet <path> revalidates and consumes the exact packet, records the in-progress carrier transition, and initializes the scratch check aggregate in one transaction. No post-start packet recomputation authorizes work. GitHub uses its guarded backend-equivalent transition.
  4. Implementation evidence. The Engineer modifies only accepted scope, runs the required checks, and uses CLI-produced execution evidence. On files, guarded task evidence mutations append allowed implementation evidence without changing protected task-contract fields.
  5. Return and review. task prepare-return derives a raw role return from the consumed packet, current carrier, exact artifact, and check evidence. task verify-return is the protected receiving boundary. Only a current verified return may enter review preparation; a raw return is not review evidence or completion.
  6. Review, audit, closeout. The Maintainer independently reviews the exact artifact. A fresh Auditor assesses the exact frozen candidate when enabled. Human-controlled closeout consumes the current evidence; no prior green, diagnostic, comment, label, or status auto-crosses the gate.

Read the full file on GitHub · 129 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 129 lines · 0 tokens per session scan A 0aa675412afe

Subscribe to this mod's changes

lifecycle-protocol is a command published in the GitHub repository bartoszarendt/agenticloop (2 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,543 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-13.