heard AGENTS.md

A contributor and coding-agent guide for Heard, a macOS menu-bar app that speaks updates from Claude Code, Codex, and command-line agents. It explains how the app and its short-lived hook processes communicate.

In plain words
What is it for?
Use it when working on Heard’s daemon, command-line hooks, Unix-socket messages, event routing, or speech handling. It also points contributors to the project’s setup, testing, and contribution process.
Why use it?
It shows where agent events enter the system and how they reach the speech queue. This helps developers understand the event flow before changing hooks, routing, or narration behavior.

Instructions file for CodexOpenCode

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 instructions/heardlabs/heard/agents-md
Clone the repo
git clone --depth 1 https://github.com/heardlabs/heard

Made for: Codex, OpenCode.

Per session 3,488 This file is loaded in full into every session.
When invoked 3,488 The same file — it is already loaded in full.
Security scan B 1 finding. 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.03488 $0.03488
Opus 5 $0.01744 $0.01744
Sonnet 5 $0.00698 $0.00698
Haiku 4.5 $0.00349 $0.00349

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

Security

Grade B, and why

heard AGENTS.md scanned grade B with 1 finding 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

~/.claude/settings.json hook → python -m heard.hook claude-code
AGENTS.md · 166 lines

How it starts

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

Heard — contributor & agent guide

A macOS voice companion that narrates Claude Code / Codex / arbitrary CLI agents. py2app menu-bar bundle + CLI. Apache 2.0. heard.dev · Releases

This file is the guide for contributors and for coding agents opened in this repo (Claude Code auto-reads it via CLAUDE.md). Keep it current when the architecture shifts. For setup, the test gate, and the PR flow, see CONTRIBUTING.md.


Process model

One process — the menu-bar app (Heard.app) — runs the daemon as an in-process thread. Hooks installed by Claude Code / Codex are spawned as short-lived python -m heard.hook <agent> subprocesses. They read the hook payload from stdin, send a JSON message over a Unix-domain socket to the daemon, and exit.

CC tool call
  ↓
~/.claude/settings.json hook → python -m heard.hook claude-code
  ↓ stdin: {"hook_event_name": "PreToolUse", ...}
heard.client.send_event() → Unix socket
  ↓
Heard.app (daemon thread) — _handle_event routes by kind:
  ├─ tool_pre / tool_post  → fast-path templates (no LLM)   → speech queue
  ├─ prose / finals        → harness (the brain)            → speech queue
  └─ harness punts (None)  → no-LLM floor (canned/template) → speech queue
  ↓
afplay → history.append (after successful play)

The harness brain is the mandatory narration path for prose and finals. There are exactly three lanes:

  1. Brain (harness.narrate) — prose + finals. One narration-brain call with access to the persona, the Agent State scoreboard, and Working Memory.
  2. Fast-path templates — tool actions ("Editing auth.py"); never the brain (latency/cost). Cheap, no LLM.
  3. No-LLM floor (Daemon._floor_text) — fires only when the brain punts (LLM unreachable: daily cap, outage, no provider). Tools keep their clean template; a final is read as-is if short, else swapped for a bounded lead of the message prefixed with the project. This floor — not any legacy path — is the only fallback. The floor (and the local Kokoro TTS option) is what keeps Heard from going silent, which for an ambient tool reads as "broken."

Read the full file on GitHub · 166 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. 3d ago First seen · 166 lines · 3,488 tokens per session scan B f5d6c8505099

Subscribe to this mod's changes

heard AGENTS.md is an instructions file published in the GitHub repository heardlabs/heard (175 stars, last pushed 9d ago), licensed Apache-2.0. It adds 3,488 tokens to every session, about $0.0174 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

NarrateClaude CLAUDE.md

Instructions for nicedreamzapp/NarrateClaude, covering narrate mode — always on, core rule, how to narrate, voice and this is a general-purpose session.

nicedreamzapp/NarrateClaude · 284 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,345 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens