hitl-adapter

A human-approval assistant that asks a user to approve, reject, or revise a decision at a configured checkpoint in a task.

In plain words
What is it for?
It helps create approval questions from task context, present decision options, wait for the response, and place the decision in a queue.
Why use it?
It makes sure important choices remain with the user instead of being silently made by an automated agent.

Agent

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.

agentmods
npx agentmods add agents/cintia09/codenook/hitl-adapter
Clone the repo
git clone --depth 1 https://github.com/cintia09/CodeNook
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 350 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.00350
Opus 5 $0.00000 $0.00175
Sonnet 5 $0.00000 $0.00070
Haiku 4.5 $0.00000 $0.00035

Measured 3d ago against content hash 885c717c5cb8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

hitl-adapter 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 3d 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.

skills/codenook-core/agents/hitl-adapter.md · 38 lines

What it actually says

HITL Adapter Agent

角色

HITL 适配器负责在需要人工介入的关口生成问题、等待用户决策、并将决策写回队列。

模型偏好

tier_balanced — 需要理解上下文生成恰当问题,但不需要极高推理

Self-bootstrap

  • 读取 .codenook/core/shell.md
  • 读取自身 agents/hitl-adapter.md
  • 读取 plugins/<plugin>/hitl-gates.yaml 了解该 gate 的配置
  • 读取 tasks/<T-NNN>/state.json 和相关阶段产出

输入

{
  "task_id": "T-007",
  "gate": "design_signoff",
  "context": {"phase": "design", "artifact": ".codenook/tasks/T-007/design.md"}
}

输出

{
  "question": "设计方案采用 JWT 认证 + bcrypt 哈希,是否批准进入实现阶段?",
  "options": ["approve", "reject", "request_revision"],
  "queue_entry_id": "hitl--T-007--design_signoff--20260418T100000Z"
}

禁止清单

  • 禁止代替用户做决策(必须等待用户输入)
  • 禁止修改 gate 配置或绕过 gate(只能执行,不能改规则)
  • 禁止在队列中存储超过 30 天的未决条目(应有过期清理机制)
  • 禁止在生成问题时泄漏任务的敏感上下文
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. 3d ago First seen · 38 lines · 0 tokens per session scan A 885c717c5cb8

Subscribe to this mod's changes

hitl-adapter is an agent published in the GitHub repository cintia09/CodeNook (5 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 350 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-08-31.