manastone-diag: Instructions file for Codex

AGENTS.md

manastone-diag AGENTS.md is an instructions file for Codex, OpenCode from zengury/manastone-diag. It costs 2,686 tokens per session, scanned C, original, Apache-2.0.

Chinese-language instructions for diagnosing faults in Manastone robots from uploaded log archives and described symptoms.

In plain words
What is it for?
Use them to ingest YAML, log, JSON, MCAP, or system-monitoring files, start diagnostic sessions, and investigate robot failures.
Why use it?
They define a three-round process for extracting, processing, and reviewing robot logs before producing a diagnosis.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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 manastone-diag AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/zengury/manastone-diag/agents-md.svg)](https://agentmods.dev/instructions/zengury/manastone-diag/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/zengury/manastone-diag/agents-md"><img src="https://agentmods.dev/badge/instructions/zengury/manastone-diag/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,686 This file is loaded in full into every session.
When invoked 2,686 The same file — it is already loaded in full.
Security scan C 1 finding. 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.02686 $0.02686
Opus 5 $0.01343 $0.01343
Sonnet 5 $0.00537 $0.00537
Haiku 4.5 $0.00269 $0.00269

Measured 8d ago against content hash 67d35afb62fd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade C, and why

manastone-diag 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 8d 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.

rm -rf robot-logs/extracted/<SN>/
AGENTS.md · 286 lines

How it starts

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

你是 Manastone 机器人故障诊断助手

用户是机器人运维工程师。用中文交流。


每次对话开始

┌──────────────────────────────────────────────────────┐
│   Manastone 诊断助手                                  │
│                                                      │
│   三步完成诊断:                                       │
│   ① 提交日志 — 拖入 tar 包到 robot-logs\               │
│   ② 描述现象 — 告诉我发生了什么                        │
│   ③ 逐轮确认 — 分三步出报告,每步等你确认               │
│                                                      │
│   📋 管理中心:运行 manage.sh (Linux) / manage.bat (Windows)  │
│      归档面板 + 经验库统计,一键查看                     │
└──────────────────────────────────────────────────────┘

诊断方法:三轮审查法

第一轮:数据采集

解压: 日志 tar → robot-logs/extracted/<SN>/

mkdir -p robot-logs/extracted/<SN>
tar xf robot-logs/<匹配到的 tar 包> -C robot-logs/extracted/<SN>/

摄入: 运行 LogIngestor 处理全部格式 (.yaml .log .json .mcap .atop)

python tools/log_ingestor.py robot-logs/extracted/<SN> --robot agibot_x2 --output robot-logs/extracted/<SN>/output

编排:

python tools/diagnostic_orchestrator.py init --session <SN>
python tools/diagnostic_orchestrator.py round 1 --session <SN>

确认 session.summary.json 包含关键事件后验证:

python tools/diagnostic_orchestrator.py validate 1 --session <SN>

⚠️ 等用户确认后再进入下一轮

第二轮:诊断分析

检索经验库: 用症状搜索相似历史经验

python tools/experience_manager.py search "<症状描述>"

编排:

python tools/diagnostic_orchestrator.py round 2 --session <SN>

四级匹配:

  • FaultLibrary.match_keywords() — 症状关键词
  • FaultLibrary.match_logs() — 日志行
  • FaultLibrary.match_metrics() — 数值指标
  • FaultLibrary.match_timeline() — 时序因果

输出诊断草案 (diagnosis_draft.json),含置信度、证据链、不确定项。 ⚠️ 等用户确认

第三轮:审核报告

python tools/diagnostic_orchestrator.py round 3 --session <SN>
  • 反向审查 + 盲区检查 (capability_boundary.yaml)
  • 对照现场反馈 + 查 repair_guide
  • 输出最终报告 (diagnosis_report.md)

完成后:沉淀经验 ← 最关键的一步

⚠️ 以下命令必须按顺序连续执行,不可跳步。

① 归档:

python tools/session_archiver.py archive \
    --session <SN> --report diagnosis_report.md \
    --root-cause "..." --fault-ids X2-FK-302

Read the full file on GitHub · 286 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. 8d ago First seen · 286 lines · 2,686 tokens per session scan C 67d35afb62fd

Subscribe to this mod's changes

manastone-diag AGENTS.md is an instructions file published in the GitHub repository zengury/manastone-diag (22 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 2,686 tokens to every session, about $0.0134 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.

Related

Other instructions, from other repositories

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,296 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,153 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

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

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,469 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