causetrace AGENTS.md

causetrace AGENTS.md is an instructions file for Codex, OpenCode from milkoor/causetrace. It costs 1,245 tokens per session, scanned A, original, MIT.

A repository guide for the Causetrace Python project. It explains the code layout, development commands, style rules, and testing practices.

In plain words
What is it for?
Use it when developing Causetrace, especially when changing event behavior, running tests, checking runtime invariants, or working on its directed-graph analysis.
Why use it?
It gives a coding agent the project’s local rules before it changes code, reducing guesses about where code belongs and how to check it.

Instructions file for CodexOpenCode

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/milkoor/causetrace/agents-md
Clone the repo
git clone --depth 1 https://github.com/milkoor/causetrace

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 causetrace AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/milkoor/causetrace/agents-md.svg)](https://agentmods.dev/instructions/milkoor/causetrace/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/milkoor/causetrace/agents-md"><img src="https://agentmods.dev/badge/instructions/milkoor/causetrace/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,245 This file is loaded in full into every session.
When invoked 1,245 The same file — it is already loaded in full.
Security scan A 0 findings. 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.01245 $0.01245
Opus 5 $0.00622 $0.00622
Sonnet 5 $0.00249 $0.00249
Haiku 4.5 $0.00125 $0.00125

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

Security

Grade A, and why

causetrace 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 4d 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 · 79 lines

How it starts

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

Repository Guidelines

Project Structure & Module Organization

causetrace/ is the Python package. core.py owns events, storage, validation, and replay; analysis.py implements local topology and pattern metrics; annotation.py stores sidecar labels; cli.py exposes commands. Runtime-specific ingestion belongs in causetrace/hooks/. Tests are in tests/, DAG fixtures are in tests/fixtures/dags/, and the runnable example is demo/run_demo.py. Consult docs/runtime-principles.md and docs/schema/ before changing event semantics.

Build, Test, and Development Commands

pip install -e ".[test]"          # Editable install plus pytest
python -m pytest tests/ -v        # Run the full test suite
python -m pytest tests/test_invariants.py -v  # Check runtime invariants
python -m pytest tests/test_dag_fixtures.py -v # Check DAG analysis behavior
causetrace demo                   # Exercise the installed first-run path
causetrace doctor                 # Diagnose local runtime data sources

CI runs python -m pytest tests/ -v on Python 3.10, 3.11, and 3.12. Release builds are maintainer work; follow CONTRIBUTING.md before changing versions or publishing.

Coding Style & Naming Conventions

Target Python 3.10+ and use four-space indentation. Follow existing conventions: snake_case for functions, variables, modules, and test names; PascalCase for classes such as ToolEvent. Prefer explicit type hints on new public helpers and short docstrings where behavior is not obvious. No formatter or linter is configured in pyproject.toml; keep edits consistent with nearby code and avoid unrelated formatting churn.

Testing Guidelines

Tests use pytest and follow the tests/test_*.py pattern. Add parser or hook coverage in the matching module; first-run configuration belongs in tests/test_onboarding.py. Topology changes require DAG-fixture regression tests, including external-parent boundaries where relevant. Analysis is session-local: parents absent from the loaded session do not create graph nodes.

Read the full file on GitHub · 79 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. 4d ago First seen · 79 lines · 1,245 tokens per session scan A a26e3d97dbe4

Subscribe to this mod's changes

causetrace AGENTS.md is an instructions file published in the GitHub repository milkoor/causetrace (2 stars, last pushed 2mo ago), licensed MIT. It adds 1,245 tokens to every session, about $0.0062 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.