mscodebase-intelligence: Instructions file for Codex

AGENTS.md

mscodebase-intelligence AGENTS.md is an instructions file for Codex, OpenCode from ManSio/mscodebase-intelligence. It costs 9,318 tokens per session, scanned D, original, MIT.

A set of instructions for an IDE codebase-intelligence system that combines code analysis, language-server information, predictions, diagnostics, and development tools.

In plain words
What is it for?
Navigating and analyzing codebases, checking project history and runtime status, predicting changes, and following the system's required MCP tool workflow.
Why use it?
It tells the agent which project records to inspect and which code-intelligence tools to use before making changes.

Instructions file for CodexOpenCode

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

This is ManSio/mscodebase-intelligence's own configuration. It tells Codex and OpenCode how to work on mscodebase-intelligence 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 mscodebase-intelligence configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ManSio/mscodebase-intelligence. 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/ManSio/mscodebase-intelligence/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/ManSio/mscodebase-intelligence

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 mscodebase-intelligence AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mansio/mscodebase-intelligence/agents-md/github.svg)](https://agentmods.dev/instructions/mansio/mscodebase-intelligence/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/mansio/mscodebase-intelligence/agents-md"><img src="https://agentmods.dev/badge/instructions/mansio/mscodebase-intelligence/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 mscodebase-intelligence AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/mansio/mscodebase-intelligence/agents-md"><img src="https://agentmods.dev/badge/instructions/mansio/mscodebase-intelligence/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 9,318 This file is loaded in full into every session.
When invoked 9,318 The same file — it is already loaded in full.
Security scan D 3 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.09318 $0.09318
Opus 5.5 $0.03727 $0.03727
Sonnet 5.5 $0.01864 $0.01864
Haiku 4.5 $0.00932 $0.00932

Measured 26d ago against content hash 956fca1aca63, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade D, and why

mscodebase-intelligence 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 26d 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.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

<!-- stale-ignore -->

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

r = httpx.post('http://127.0.0.1:8080/v1/embeddings',

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- **NEVER** use `subprocess.run(capture_output=True)` in daemon threads — pipe buffer deadlock on Windows.
AGENTS.md · 542 lines

How it starts

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

Project Agent Rules — MSCodeBase Hybrid Architecture (65 Registered Tools)

Global system prompt / context injection for the AI Agent in Zed IDE. Applied across all projects. Optimized for the hybrid model: 16 Intel Layer + 32 Core MCP (включая codebase hub + 6 LSP + predict_change + bootstrap_pipeline) + 13 Inline/Diagnostic + 4 Dev Tools = 65 registered (+1 execute_script при MSCODEBASE_EXECUTE_SCRIPT_ENABLED=true → 66)

* execute_script отключён по умолчанию. Включить: MSCODEBASE_EXECUTE_SCRIPT_ENABLED=true в .env.

0. FIRST STEP IN ANY SESSION

  1. Check File-Contract: Артефакты MCP живут ВНЕ проекта (Задача 4/5). progress.json — в системной папке: <MSCODEBASE_DATA_DIR | %LOCALAPPDATA%/mscodebase | ~/.cache/mscodebase>/projects/<hash8>/progress.json, где <hash8> = md5(normalized project path)[:8] (lower, \\→/). Быстрый способ узнать путь — intel_get_runtime_status (поле progress_file) или python -c "from src.core.artifact_paths import get_progress_file; print(get_progress_file(Path('.').resolve()))". Легаси-путь .mscodebase/progress.json в проекте — больше не пишется.

  2. Read the Diary + Wisdom: Review the first 5 entries in AGENT_DIARY.md and read WISDOM.md целиком (если существуют) — WISDOM.md загружается всегда, это дистиллят фактов, а не архив.

  3. Determine MCP Context:

    • If intel_* tools or search_code are available → MCP-FIRST MODE (§0.2). IDE grep/read — только fallback.
    • If absent → MCP server offline. Work exclusively with grep, read_file, terminal.
  4. Runtime Check (MCP pipe): Call debug_runtime_passport() — единственная команда проверки «жив ли MCP-процесс».

    • Ответ с RUN_ID / BUILD_ID / PID → MCP подключён, продолжаем.
    • Transport error / «Not connected» → MCP offline, fallback на grep.
    • НЕ использовать intel_get_runtime_status для проверки связи — он проверяет embedder/индекс, а не pipe.
  5. Load Project Memory: Call intel_get_project_memory() to learn ADRs, known issues, tech debt.

  6. ⚠️ MULTI-WINDOW CHECK: intel_get_runtime_status().project_path — ЭТОТ проект видит MCP. Если пользователь говорит о ДРУГОМ проекте (лежит рядом, открыт в другом окне) — НЕ ДОВЕРЯЙ данным get_index_status() для этого проекта. Вместо этого:

    • Проверь, открыт ли проект: ls <путь>
    • Предупреди пользователя: «Сейчас MCP показывает проект X. Хотите, переключусь на Y?»
    • Используй intel_explain_project_state для проверки другого проекта

Read the full file on GitHub · 542 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. 26d ago Changed · +63 lines · +1,486 tokens per session 956fca1aca63
  2. 1mo ago Changed · +8 lines · +422 tokens per session 95dc446965c3
  3. 1mo ago Changed · -31 tokens per session 309a11fe2a89
  4. 1mo ago Changed · -9 tokens per session 78ff0b021c6a
  5. 1mo ago Changed · +5 tokens per session f2e5b64b5e2f
  6. 1mo ago Changed · +6 tokens per session 9796316a677e
  7. 2mo ago First seen · 471 lines · 7,439 tokens per session scan D ac6982fdf1fb

Subscribe to this mod's changes

mscodebase-intelligence AGENTS.md is an instructions file published in the GitHub repository ManSio/mscodebase-intelligence (3 stars, last pushed 5d ago), licensed MIT. It adds 9,318 tokens to every session, about $0.0373 per session on Opus 5.5. A static security scan graded it D with 3 findings (hidden instructions, sends data to an external url, runs shell commands). 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 · 9,715 tokens

next.js AGENTS.md

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,461 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, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 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,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,750 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens