deep-research AGENTS.md

A development guide for Deep Research, a Next.js application that uses a web interface, API routes, and shared UI components. It lists the package commands, project folders, and current testing situation.

In plain words
What is it for?
Working on the application's pages, API routes, components, configuration, builds, linting, and future test files.
Why use it?
It gives an AI assistant the repository context and the correct commands for installing dependencies, building, checking code, and running any available tests.

Instructions file for CodexOpenCode

โ–ถ OpenAI Deep Research in 4 mins Codex Community ยท about deep-research AGENTS.md ยท on YouTube โ†’
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/u14app/deep-research/agents-md
Clone the repo
git clone --depth 1 https://github.com/u14app/deep-research

Made for: Codex, OpenCode.

Per session 1,460 This file is loaded in full into every session.
When invoked 1,460 The same file โ€” it is already loaded in full.
Security scan C 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.01460 $0.01460
Opus 5 $0.00730 $0.00730
Sonnet 5 $0.00292 $0.00292
Haiku 4.5 $0.00146 $0.00146

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

Security

Grade C, and why

deep-research AGENTS.md scanned grade C 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- **Destructive Actions**: Avoid `rm -rf` or history rewriting in git unless explicitly requested.
AGENTS.md ยท 123 lines

How it starts

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

AGENTS.md

This document provides essential guidelines and technical references for AI agents (and human developers) working on the Deep Research repository. Adhere to these patterns to ensure consistency, security, and maintainability.


๐Ÿš€ Development Workflow & Commands

The project uses pnpm as the primary package manager.

Core Commands

  • Install Dependencies: pnpm install
  • Development Server: pnpm dev (Runs at http://localhost:3000)
  • Build Project: pnpm build
  • Static Export: pnpm build:export (Generates out/ directory)
  • Standalone Build: pnpm build:standalone
  • Linting: pnpm lint

Testing

  • Status: Currently, there are no automated tests in the codebase.
  • Guideline: If adding tests, use Vitest or Jest following standard Next.js patterns. Place test files next to the code they test (e.g., ComponentName.test.tsx) or in a __tests__ directory.
  • Single Test: To run a single test (if added), use pnpm vitest run path/to/file.test.ts.

๐Ÿ“‚ Project Structure

  • src/app: Next.js App Router (Pages, API routes, Layouts).
  • src/components: UI components.
    • ui/: Shadcn primitives.
    • Internal/: Custom shared components.
    • Research/, Knowledge/, etc.: Feature-specific components.
  • src/hooks: Custom React hooks for business logic and state interaction.
  • src/libs: External service integrations (e.g., MCP server logic).
  • src/store: Zustand stores for global state and persistence.
  • src/utils: Helper functions and core deep research logic.
  • src/locales: I18n translation files (JSON).

๐ŸŽจ Code Style & Conventions

1. TypeScript & Types

  • Strict Mode: strict: true is enabled in tsconfig.json. Always provide explicit types for function parameters and return values.
  • Global Types: Core business logic types (e.g., SearchTask, Knowledge, Source) are defined in src/types.d.ts. Check this file before creating new interfaces.
  • Explicit Any: While @typescript-eslint/no-explicit-any is currently off, avoid any unless absolutely necessary for external library compatibility. Prefer unknown or specific interfaces.
  • Zod: Use Zod for schema validation, especially for AI response parsing and API request bodies. See src/app/api/mcp/server.ts for examples.

Read the full file on GitHub ยท 123 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 ยท 123 lines ยท 1,460 tokens per session scan C 1740f40dca71

Subscribe to this mod's changes

deep-research AGENTS.md is an instructions file published in the GitHub repository u14app/deep-research (4,682 stars, last pushed 2mo ago), licensed MIT. It adds 1,460 tokens to every session, about $0.0073 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.