OpenDocuments: Instructions file for Codex

AGENTS.md

OpenDocuments AGENTS.md is an instructions file for Codex, OpenCode from joungminsung/OpenDocuments. It costs 3,109 tokens per session, scanned A, original, MIT.

Project instructions for OpenDocuments, a self-hosted platform that indexes documents from services such as GitHub, Notion, and Google Drive, then answers questions with sources. They explain its monorepo structure, meaning one repository containing several related packages and applications.

In plain words
What is it for?
Working on document search, connectors, file parsers, model integrations, the web application, the command-line tool, the server, or the TypeScript client.
Why use it?
They show where each part lives and which tools and commands to use when changing a particular package.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is joungminsung/OpenDocuments's own configuration. It tells Codex and OpenCode how to work on OpenDocuments itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything OpenDocuments configures →

Reuse

Borrowing it

Nothing to install: this file belongs to joungminsung/OpenDocuments. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/joungminsung/OpenDocuments/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/joungminsung/OpenDocuments

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for OpenDocuments AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/joungminsung/opendocuments/agents-md/github.svg)](https://agentmods.dev/instructions/joungminsung/opendocuments/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/joungminsung/opendocuments/agents-md"><img src="https://agentmods.dev/badge/instructions/joungminsung/opendocuments/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for OpenDocuments AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/joungminsung/opendocuments/agents-md"><img src="https://agentmods.dev/badge/instructions/joungminsung/opendocuments/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,109 This file is loaded in full into every session.
When invoked 3,109 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.03109 $0.03109
Opus 5.5 $0.01244 $0.01244
Sonnet 5.5 $0.00622 $0.00622
Haiku 4.5 $0.00311 $0.00311

Measured 2mo ago against content hash fab9356f644e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

OpenDocuments AGENTS.md 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 2mo 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.

AGENTS.md · 322 lines

How it starts

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

AGENTS.md

Project Overview

OpenDocuments는 자체 호스팅 RAG(Retrieval-Augmented Generation) 플랫폼이다. GitHub, Notion, Google Drive 등 다양한 소스의 문서를 인덱싱하고, 자연어로 질문하면 출처와 함께 답변을 제공한다.


Monorepo Structure

packages/          # 핵심 패키지 (5개)
  core/            # 비즈니스 로직 전체 (RAG, ingest, storage, auth, plugin system)
  server/          # HTTP API (Hono), MCP server, auth middleware, widget
  cli/             # CLI 17개 명령어 (Commander.js) - npm 글로벌 패키지 'opendocuments'
  web/             # React SPA (Vite + Tailwind) - private, npm 배포 안 함
  client/          # TypeScript SDK (@opendocuments/client)

plugins/           # 플러그인 (21개)
  model-*/         # 5개: ollama, openai, anthropic, google, grok
  parser-*/        # 9개: pdf, docx, xlsx, html, jupyter, email, code, pptx
  connector-*/     # 8개: github, notion, gdrive, s3, confluence, swagger, web-crawler, web-search

docs-site/         # VitePress 문서 사이트 (GitHub Pages 자동 배포)

Common Commands

npm run setup          # install + build (처음 클론 시)
npm run build          # turbo build (전체)
npm run test           # turbo test (51 tasks, ~648 tests)
npm run dev            # watch mode (전체)
npm run typecheck      # turbo typecheck

# 특정 패키지만
npx turbo build --filter=opendocuments-core
npx turbo test --filter=opendocuments-core

Code Conventions

TypeScript

  • strict mode 필수 (tsconfig.base.json)
  • ESM: 모든 import에 .js 확장자 필수
    import { sha256 } from './utils/hash.js'    // O
    import { sha256 } from './utils/hash'        // X
    
  • any 사용 금지 (web UI 제외). unknown 또는 명시적 타입 사용
  • 공개 API에는 JSDoc 작성

Naming

대상 규칙 예시
파일 kebab-case document-store.ts
클래스 PascalCase DocumentStore
함수/변수 camelCase getDocumentBySourcePath
상수 UPPER_SNAKE_CASE MAX_ALERTS
DB 컬럼 snake_case workspace_id
환경변수 UPPER_SNAKE_CASE OPENDOCUMENTS_DATA_DIR
CLI 명령어 kebab-case auth create-key

Read the full file on GitHub · 322 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. 2mo ago First seen · 322 lines · 3,109 tokens per session scan A fab9356f644e

Subscribe to this mod's changes

OpenDocuments AGENTS.md is an instructions file published in the GitHub repository joungminsung/OpenDocuments (123 stars, last pushed 3mo ago), licensed MIT. It adds 3,109 tokens to every session, about $0.0124 per session on Opus 5.5. 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-30.

Related

OpenDocuments AGENTS.md compared with instructions from other repositories

OpenDocuments AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
OpenDocuments AGENTS.mdjoungminsung/OpenDocumentsInstructions file1233mo agoMITA3,109Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode