freddie AGENTS.md

A project instruction file for Freddie, an AI coding assistant with its own session, workflow, settings, and extension systems.

In plain words
What is it for?
Use it to guide Freddie code changes, choose between workflow tools and direct calls, and avoid reimplementing its underlying systems.
Why use it?
It explains how agents should work in the repository and which existing components they must use or leave alone.

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/anentrypoint/freddie/agents-md
Clone the repo
git clone --depth 1 https://github.com/AnEntrypoint/freddie

Made for: Codex, OpenCode.

Per session 19,753 This file is loaded in full into every session.
When invoked 19,753 The same file — it is already loaded in full.
Security scan D 3 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.19753 $0.19753
Opus 5 $0.09876 $0.09876
Sonnet 5 $0.03951 $0.03951
Haiku 4.5 $0.01975 $0.01975

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

Security

Grade D, and why

freddie AGENTS.md scanned grade D with 3 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 2d 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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

Four AnEntrypoint-owned dependencies are vendored as git submodules at freddie's top level for local editing: `design` (-> `anentrypoint-design` npm package), `acptoapi`, `plugsdk`, `gm`. `gm` **is** a submodule (added d

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

- `plugins/tools/code_execution/handler.js` (`code_execution`) — run arbitrary code

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

Four AnEntrypoint-owned dependencies are vendored as git submodules at freddie's top level for local editing: `design` (-> `anentrypoint-design` npm package), `acptoapi`, `plugsdk`, `gm`. `gm` **is** a submodule (added d
AGENTS.md · 526 lines

How it starts

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

Freddie — Agent Guide

Instructions for AI coding assistants working on Freddie. Present-tense rules only — history lives in git log and CHANGELOG.md.

Preferred mechanism for multi-step tool graphs is run_flow — use it spontaneously; it reduces turns. Direct tool calls remain legal for single steps.

Substrate (do not reimplement)

Status: freddie depends on @earendil-works/pi-tui only — @earendil-works/pi-ai was removed (73 transitive packages) since freddie's real LLM path always routed through acptoapi, never pi-ai; pi-ai's only freddie-side usage was the now-deleted src/agent/pi-bridge.js, whose callLLM export had zero internal consumers. @earendil-works/pi-coding-agent and @earendil-works/pi-agent-core are not installedAgentSession, SessionManager, SettingsManager, DefaultResourceLoader, ModelRuntime, runPrintMode/runRpcMode are not in use anywhere in this codebase. The agent turn loop (src/agent/machine.js), session store (src/sessions.js), settings (src/config.js), skills loader (src/skills/index.js), and plugin/extension system (src/host/*) are freddie-original code, not thin wrappers over that package. The correct npm scope for that package is @earendil-works/pi-coding-agent (not @mariozechner/pi-coding-agent, a stale scope). Adoption tradeoffs and the compaction-module's SessionEntry[] shape requirement are evaluated in memory (recall "Freddie pi-coding-agent substrate adoption tradeoffs") — conclusion: no swap reduces freddie's maintenance surface, src/agent/compress/*'s own policy remains pragmatic.

  • @earendil-works/pi-coding-agent (not yet a dependency) — agent + tools + interactive TUI, if adopted. Exports AgentSession/createAgentSession, SessionManager, SettingsManager, DefaultResourceLoader, ModelRuntime, defineTool, InteractiveMode, runPrintMode, runRpcMode, createEventBus.
  • @earendil-works/pi-agent-core (not yet a dependency) — lower-level Agent/agentLoop/runAgentLoop/streamProxy, a dependency of pi-coding-agent itself.
  • @earendil-works/pi-tui — TUI primitives (Ink-equivalent), actually installed. src/tui/index.js::launchTui() dynamically imports it and, on a real TTY, constructs src/tui/app.js::runTui() directly on top of pi-tui's own TuiMainScreen/ProcessTerminal/Editor/Container primitives (not InteractiveMode — that class lives in pi-coding-agent, which is not installed; freddie's TUI is a from-scratch shell built on pi-tui's lower-level building blocks). TUI is pi-tui's shared TypeScript interface only (no runtime constructor — typeof TUI === 'undefined' at runtime); the concrete, constructible renderer classes are TuiMainScreen (preserves terminal scrollback, differential re-render — what app.js uses, matching pi-tui's own README Quick Start example almost verbatim) and TuiAltScreen (application-owned fixed viewport in the alternate screen buffer, with setLayoutRoot/VStack/HStack/ScrollView, mouse-driven selection, in-app search — a heavier feature set app.js does not need). Falls back to src/cli/interactive.js's plain readline REPL on non-TTY stdio, a pi-tui import failure, a runTui() throw, or (Windows only) when process.env.TMUX is set — see the psmux/tmux constraint below. plugins/core/core-cli/plugin.js's run CLI command calls launchTui(), not interactive() directly — the rich TUI must stay reachable from the actual freddie run command, not just as a library export. pi-tui is a fully independent package (zero shared dependencies with pi-ai, confirmed directly against its own package.json) — its removal was never on the table alongside pi-ai's.
  • pi-tui Windows tmux/psmux raw-mode incompatibility (enableWindowsVTInput/SetConsoleMode breaking keyboard input in a pty pane, launchTui()'s TMUX-env routing-around) — see rs-learn (recall "Freddie pi-tui Windows tmux psmux raw-mode defect").
  • floosieProcessorMachine (xstate). Use for gateway pipelines. Compose, don't fork.
  • anentrypoint-design — webjsx + ripple-ui. All GUI for freddie and thebird lives here. Source lives in its own repo (AnEntrypoint/design), vendored as a git submodule at ./design in this repo for easy editing; freddie's runtime code consumes it via the github:AnEntrypoint/design npm dep spec (default branch, no ref pin, no npm registry involved) — the submodule does not change any import path. For local SDK iteration, edit ./design, rebuild via node scripts/build.mjs inside it, then push to main (CI commits the rebuilt dist/) to flow the change to every consumer. Do NOT add React.
  • acptoapi — THE LLM SDK (see "acptoapi is THE SDK" below). Source lives in its own repo (AnEntrypoint/acptoapi), vendored as a git submodule at ./acptoapi in this repo for easy editing; freddie's package.json pins it via github:AnEntrypoint/acptoapi (see Versioning below) — the submodule does not change that. Edit ./acptoapi, then push to main to flow the change downstream.
  • xstate v5 — every long-lived state machine (agent turns, gateway lifecycle, approvals).

Read the full file on GitHub · 526 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. 2d ago First seen · 526 lines · 19,753 tokens per session scan D c9a276c8ceff

Subscribe to this mod's changes

freddie AGENTS.md is an instructions file published in the GitHub repository AnEntrypoint/freddie (5 stars, last pushed 2d ago), licensed MIT. It adds 19,753 tokens to every session, about $0.0988 per session on Opus 5. A static security scan graded it D with 3 findings (downloads and executes remote code, unrestricted tool access, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

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

next.js AGENTS.md

Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens