Docs · Agent

Harness

The model is the driver, the harness is the vehicle. One agent loop owns everything; these mechanisms attach to it, each a small module, never a framework.

  • Project context

    SENTINEL.md → CLAUDE.md → AGENTS.md → .sentinel/context.md are injected into the system prompt (3k chars each). Plain files, no database. The repo is the index.

  • Skills

    Reusable workflows in .sentinel/skills/<name>/SKILL.md. Only names + descriptions sit in context; the full body loads when the model invokes the skill tool. Ships with reproduce-fix-verify.

  • Todos

    todoWrite overwrites the FULL list every call (stops the plan drifting), persisted to .sentinel/todos.json so goals survive compaction. Statuses: pending, in_progress, completed.

  • Subagents

    spawnAgent runs the same loop with fresh messages and restricted tools (depth limit 1) and returns a summary, the parent's context grows by the summary, not the transcript.

  • Hooks

    PreToolUse blocks dangerous commands (rm -rf /, fork bombs) and secret writes (.env, *.pem) before permission checks. A stop hook forces a test run when files changed but no tests ran.

  • Trajectories

    Every turn records JSONL to .sentinel/trajectories/<runId>.jsonl, the raw material for evals. Read failing traces to find the next behavior to gate.

Loop rules

  • Consecutive read-only tool calls run concurrently (up to 10); writes run serially.
  • Three edits to the same file triggers a reconsider reminder instead of another retry.
  • Disable trajectory logging with SENTINEL_NO_TRAJECTORY=1.

Write your own skill

.sentinel/skills/my-flow/SKILL.md
---
name: my-flow
description: When to use this workflow, in one line.
---
# My flow

1. Step one.
2. Step two.

Full map

docs/claude-code-adaptation.md in the repo maps every Claude-Code mechanism to its Sentinel adaptation, including what was deliberately deferred (agent teams, background agents, microcompact).