PSYCHO-Py800MCP: Instructions file for Codex

AGENTS.md

PSYCHO-Py800MCP AGENTS.md is an instructions file for Codex, OpenCode from saitoomituru/PSYCHO-Py800MCP. It costs 2,453 tokens per session, scanned A, original, Apache-2.0.

Project-specific instructions for an AI coding assistant working on PSYCHO-Py800MCP, a Python application that connects AI with oscilloscopes, logic analyzers, cameras, and microscopes through MCP.

In plain words
What is it for?
Guiding development of the desktop interface, MCP servers, measurement and waveform analysis, audio, evidence storage, documentation, experiments, and safe device communication.
Why use it?
They explain the project’s architecture and strict safety boundary, including that real instrument commands require human approval and must run inside controlled sessions.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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 PSYCHO-Py800MCP AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/saitoomituru/psycho-py800mcp/agents-md.svg)](https://agentmods.dev/instructions/saitoomituru/psycho-py800mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/saitoomituru/psycho-py800mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/saitoomituru/psycho-py800mcp/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,453 This file is loaded in full into every session.
When invoked 2,453 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.02453 $0.02453
Opus 5 $0.01226 $0.01226
Sonnet 5 $0.00491 $0.00491
Haiku 4.5 $0.00245 $0.00245

Measured 7d ago against content hash 0be528c386b5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

PSYCHO-Py800MCP 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 7d 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 · 228 lines

How it starts

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

AGENTS.md — PSYCHO-Py800MCP エージェント開発指示書

このファイルはAIエージェント(Claude Code等)が本プロジェクトを操作する際の 作法・制約・文脈を定義する。人間が読む設計書は /docs/ を参照。


プロジェクト文脈

PSYCHO-Py800MCPはオシロスコープ・ロジアナ・WebCam・顕微鏡をMCPで統合し、
AIがスケマティックベースで波形を読む、Mac/Win常駐Pythonアプリ。

開発者(齋藤みつる)はZeroRoomLab(山形県高畠町)を拠点とする
コンテンツクリエイター・エンジニア・独立研究者。
実機(SIGLENT SDS1204X-E・Hackintosh)で実際に使うことを前提とした現場駆動開発。

停滞・放置期間が発生することも前提とする。
エージェントはこれを「プロジェクト停止」と判断せず、再開時に /notes/ を確認してから状況を再確認すること。


責任の境界(最重要)

Claude/エージェント → 指揮・提案・コード生成のみ
エッジ端末         → SCPIコマンド実行(ここに責任が宿る)
人間(執行官)     → プローブを当てる・Startを押す

エージェントはSCPIコマンドを人間の確認なしに自動実行するコードを書かない。 すべての実機通信は、対象機器、許可操作、上限、TTL、解除条件を持つApprovalSessionの内側で行う。 Phase 0では実験ゲートを閉じ、実機通信を実装・実行しない。query-only実験も別の明示承認後に開始する。


アーキテクチャ概要

src/gui/      - PyQt6常駐アプリ(メニューバー/タスクトレイ)
src/psycho_py800mcp/*_mcp_server.py - FastMCPサーバー(公式`mcp` packageとの名前衝突を避ける)
src/engine/   - ゲシュタルト係数エンジン
src/audio/    - eSpeak NG音声統合
src/evidence/ - 証拠保全(SQLite + HDF5)
docs/         - 仕様書(変更時は必ず更新)
notes/        - 実験ノート・作業ログ(セッション終了時に追記)

詳細は docs/interface_spec.md を参照。


コーディング規約

言語・ライブラリ

  • Python 3.11+
  • GUI: PyQt6(システムトレイ・メインウィンドウ)
  • MCPサーバー: fastmcp
  • SCPI通信: pyvisa or socket直接(pyvisa-py使用、NI-VISA不要)
  • 波形処理: numpy / scipy
  • 波形保存: h5py(HDF5)
  • 証拠ログ: sqlite3(標準ライブラリ)
  • 音声: espeak-ng(CLIラップ or py-espeak-ng
  • スケマティック: kicad-python or skidl

命名規則

# クラス: PascalCase
class GestaltEngine:

# 関数・変数: snake_case
def calculate_coefficient(net_name: str) -> int:

# 定数: UPPER_SNAKE_CASE
MAX_COEFFICIENT = 500
TRIGGER_THRESHOLD = 300

# MCP ツール名: snake_case(動詞_名詞)
def get_waveform_summary(channel: int, duration: float):
def set_trigger(mode: str, level: float):

エラーハンドリング

# ハードウェア応答なし → 必ず明示的に返す
# 「ハードあかん」以上の情報をClaude側に送らない(見えないものは見えない)
return {"status": "error", "message": "device_not_responding", "detail": str(e)}

ゲシュタルト係数エンジン

src/engine/gestalt.py に実装。

COEFFICIENT_WEIGHTS = {
    "voltage_unknown":      40,
    "gnd_not_isolated":     80,
    "voltage_over_50v":    100,
    "confidence_low":       60,   # confidence < 0.5
    "adjacent_net_risk":    30,
    "protocol_unanalyzed":  20,
}

THRESHOLDS = {
    "normal":       (0,   100),   # 通常プローブ
    "recommend":  (100,   300),   # 差動プローブ推奨
    "required":   (300,   400),   # 差動プローブ必須+高圧モード
    "critical":   (400,   500),   # 2名体制・監視官承認必須
}

Read the full file on GitHub · 228 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. 7d ago First seen · 228 lines · 2,453 tokens per session scan A 0be528c386b5

Subscribe to this mod's changes

PSYCHO-Py800MCP AGENTS.md is an instructions file published in the GitHub repository saitoomituru/PSYCHO-Py800MCP (1 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 2,453 tokens to every session, about $0.0123 per session on Opus 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-31.

Related

Other instructions, from other repositories

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

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

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

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

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