known AGENTS.md

Project instructions for an AI coding assistant working on known, a Rust library and command-line tool for managing instruction files used by coding assistants. It works with files such as AGENTS.md, CLAUDE.md, and GEMINI.md.

In plain words
What is it for?
Building, testing, formatting, linting, and extending the Rust library and command-line tool, including instruction-file migration and compatibility links.
Why use it?
They explain the project’s structure, commands, and file conventions so code changes and checks follow the repository’s expectations.

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

Made for: Codex, OpenCode.

Per session 2,316 This file is loaded in full into every session.
When invoked 2,316 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.02316 $0.02316
Opus 5 $0.01158 $0.01158
Sonnet 5 $0.00463 $0.00463
Haiku 4.5 $0.00232 $0.00232

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

Security

Grade A, and why

known 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 2d 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 · 129 lines

How it starts

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

AGENTS.md

This file provides guidance to agentic coding agents like Claude Code, Gemini CLI, and Codex CLI when working with code in this repository. This is the place for documenting our product requirements and development guidelines.

Project Overview

"known" is a Rust library that provides functionality for managing agentic LLM instruction files and project rules directories. It creates and manages AGENTS.md files with automatic migration from CLAUDE.md and GEMINI.md files, creates symlinks for compatibility, and manages rules directories for various AI coding assistants.

Common Commands

  • Build: cargo build
  • Run tests: cargo test
  • Run specific test: cargo test test_name
  • Check code: cargo check
  • Format code: cargo fmt
  • Lint: cargo clippy
  • Common development tasks: just -l

Architecture

The project follows standard Rust library structure:

  • src/lib.rs - Main library file containing public functions and tests
  • src/main.rs - CLI interface using clap for command-line argument parsing
  • src/agents.rs - AGENTS.md file creation and migration functionality
  • src/autostart.rs - Cross-platform autostart management
  • src/config/ - Configuration file management for tracking watched directories
    • src/config/mod.rs - Public API and re-exports
    • src/config/io.rs - File I/O operations for configuration
    • src/config/path.rs - Configuration file path resolution
    • src/config/structure.rs - Config struct and implementation
  • src/constants.rs - Shared constants used throughout the application
  • src/daemon/ - Modular file watching daemon with single instance enforcement
    • src/daemon/mod.rs - Main daemon orchestration and lifecycle management
    • src/daemon/config_event.rs - Configuration file event detection
    • src/daemon/config_handler.rs - Configuration file change handling and hot-reloading
    • src/daemon/events.rs - File system event handling and processing
    • src/daemon/file_event.rs - File system event handling logic
    • src/daemon/symlinks.rs - Symlink management operations
    • src/daemon/watchers.rs - File watcher setup and directory monitoring
  • src/single_instance/ - PID file locking for single instance enforcement
    • src/single_instance/mod.rs - Public API and tests
    • src/single_instance/lock.rs - SingleInstanceLock struct and implementation
    • src/single_instance/path.rs - System-wide lock file path functionality
    • src/single_instance/process.rs - Process management utilities
    • src/single_instance/stop.rs - Daemon stopping functionality
  • src/symlinks.rs - Symlink creation and rules directory management
  • Cargo.toml - Project configuration and dependencies
  • justfile - Just command runner for common development tasks

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

Subscribe to this mod's changes

known AGENTS.md is an instructions file published in the GitHub repository marclove/known (3 stars, last pushed 10mo ago), licensed BSD-3-Clause. It adds 2,316 tokens to every session, about $0.0116 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.