Skip to main content
Glama

delimit_handoff_preflight

Validates cross-agent handoff invariants by inspecting git config, environment variables, and capture stamp. Prevents state corruption with a fail-closed verdict on critical failures.

Instructions

Validate cross-agent handoff invariants before switching coding agents (LED-1710).

When to use: before a session hands off to a different coding agent (claude -> antigravity -> codex -> gemini) or an Auto-Phoenix revive, to confirm the next agent will NOT inherit corrupted state — a core.bare=true repo, a junk test@*/empty git identity, leaked GIT_* env vars that misdirect git subprocesses, a stale <gitdir>/index.lock, or a missing/stale ~/.delimit/.last_capture stamp (next agent starts blind). When NOT to use: to capture or restore session context (use delimit_soul_capture / delimit_revive — this only INSPECTS), or for general repo health (delimit_repo_diagnose).

Sibling contrast: delimit_revive restores prior context (read+write); delimit_gov_health reports the policy-kernel layer; this is a narrow read-only pre-handoff gate over git + env + capture stamp returning a fail-closed verdict. Phase-1 VALIDATOR only: NOT wired into any live handoff path; auto-remediation is held for a later phase.

Side effects: READ-ONLY — inspects git config + the process env + the .last_capture file via a hermetic git env. NO writes, env mutation, git config changes, network, ledger, or notification; it cannot itself corrupt the state it checks.

Verdict: ok=False if ANY critical check fails (fail-closed). Critical: git_identity, not_bare. Warn: no_git_env_leak, no_stale_index_lock, handoff_freshness. Each check is {name, ok, severity, detail, remediation}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathNoRepository path to inspect. Empty resolves via the gateway resolver, then cwd.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, but description fully discloses it is READ-ONLY, inspects specific files/env, has no side effects, and details the verdict structure and checks.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with clear sections, though slightly verbose. Every sentence adds value, but could be more concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Complete for a pre-flight tool: describes checks, verdict, side effects, and usage context. Output schema exists to provide further detail on return structure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Only one parameter (project_path) with 100% schema coverage; description does not add extra meaning beyond the schema. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it validates cross-agent handoff invariants before switching coding agents. Distinguishes from siblings like delimit_revive, delimit_gov_health, and delimit_repo_diagnose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly provides 'When to use' and 'When NOT to use' sections with alternatives and context (Phase-1, not wired into live handoff).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/delimit-ai/delimit-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server