HumanLayer Agent Rules

SDKs and local tools for human approval and oversight of AI agents.

On this page

Overview

HumanLayer's CLAUDE.md distinguishes the SDK platform from local tools for approvals and coding sessions. A protocol diagram traces the flow, while language-specific sections and numbered TODO levels guide implementation.

Documents

├── 
├── .github
│   └── workflows
│       └── 
├── docs
│   └──  — User-facing documentation
├── hld
│   └── 
├── humanlayer-wui
│   └── 
└── 

Patterns in this file

01 / Architecture as narrative

Show the approval path across processes

An architecture diagram follows Claude Code through MCP, the CLI, the daemon, and the cloud API. It also shows where terminal and graphical approval interfaces join the flow.

Source excerpt starting at line 32.
### Architecture Flow```Claude Code → MCP Protocol → hlyr → JSON-RPC → hld → HumanLayer Cloud API                                         ↑         ↑                                    TUI ─┘         └─ WUI```

02 / Pointing at the source of truth

Read package-local tool choices

The TypeScript guidance avoids assuming one package manager or test framework throughout the monorepo. It directs those choices to package.json scripts and dependencies.

Source excerpt starting at line 52.
### TypeScript Development- Package managers vary - check `package.json` for npm or bun- Build/test commands differ - check `package.json` scripts section- Some use Jest, others Vitest, check `package.json` devDependencies

03 / House vocabulary

Name what each TODO priority means

The annotation vocabulary distinguishes critical blockers, architectural issues, feature gaps, polish, and open questions. The critical level explicitly means work must not merge.

Source excerpt starting at line 78.
We use a priority-based TODO annotation system throughout the codebase: - `TODO(0)`: Critical - never merge- `TODO(1)`: High - architectural flaws, major bugs- `TODO(2)`: Medium - minor bugs, missing features- `TODO(3)`: Low - polish, tests, documentation- `TODO(4)`: Questions/investigations needed- `PERF`: Performance optimization opportunities

Ideas for your repo

  1. Show how requests cross process and protocol boundaries.
  2. Use package manifests as the authority when tools vary within a monorepo.
  3. Define a shared priority vocabulary for TODOs.
Sponsored byModem

Give your agents the whole story.

These instructions explain how to work in HumanLayer. Modem shows your agents what customers said, who is affected, and what changed.

See how Modem works