programasweights-python: Instructions file for Codex

AGENTS.md

programasweights-python AGENTS.md is an instructions file for Codex, OpenCode from programasweights/programasweights-python. It costs 2,888 tokens per session, scanned A, original, MIT.

A set of project instructions for using ProgramAsWeights, a tool that compiles plain-language descriptions into small local text-processing functions.

In plain words
What is it for?
Use it for fuzzy search, typo-tolerant matching, format repair, classification, extracting details, log triage, intent routing, and preparing or checking agent tool calls.
Why use it?
It helps handle messy text when fixed patterns such as regular expressions are not reliable and a full language model would be unnecessary.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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 programasweights-python AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/programasweights/programasweights-python/agents-md"><img src="https://agentmods.dev/badge/instructions/programasweights/programasweights-python/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,888 This file is loaded in full into every session.
When invoked 2,888 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.02888 $0.02888
Opus 5.5 $0.01155 $0.01155
Sonnet 5.5 $0.00578 $0.00578
Haiku 4.5 $0.00289 $0.00289

Measured 1mo ago against content hash 60a8ddfca6f3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

programasweights-python 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 1mo 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 · 291 lines

How it starts

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

ProgramAsWeights (PAW)

PAW compiles natural language specifications into tiny neural functions that run locally. Each function takes a single text input and returns a single text output. Use it when you need fuzzy text processing — classification, extraction, format repair, search, triage — that regex can't handle but a full LLM is overkill for.

Website: https://programasweights.com Full documentation: https://programasweights.readthedocs.io

When to Use PAW

  • Fuzzy search — typo-tolerant matching, semantic search, near-duplicate detection
  • Format repair — fix broken JSON, normalize dates, repair malformed inputs
  • Classification — sentiment, urgency, categories defined in your own words
  • Extraction — emails, names, dates from messy unstructured text
  • Log triage — extract errors from verbose output, filter noise
  • Intent routing — map user descriptions to the closest URL, menu item, or setting
  • Agent preprocessing — parse tool calls, validate outputs, route tasks

Install

pip install programasweights --extra-index-url https://pypi.programasweights.com/simple/

Quickstart

import programasweights as paw

# Compile your own function and save its ID
program = paw.compile(
    "Classify if a message needs immediate attention or can wait. "
    "Return only 'immediate' or 'wait'."
)
print(program.id)  # Save this ID for future runs

# Load once and reuse the function locally
fn = paw.function(program.id)
fn("Urgent: server is down!")  # "immediate"
fn("Newsletter: spring picnic")  # "wait"

On future runs, load the saved ID with paw.function(saved_program_id). Compile outside request handlers and reuse the loaded function across calls.

Load a local .paw file with paw.function("./classifier.paw") (SDK 0.4.5+).

If you want the smaller browser-compatible runtime explicitly, pass compiler="paw-4b-gpt2". Otherwise, omit compiler and let the server default decide.

Remote inference (optional)

Read the full file on GitHub · 291 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. 1mo ago Changed · +35 lines · +204 tokens per session 60a8ddfca6f3
  2. 1mo ago Changed · +6 lines · +117 tokens per session 5b6f8b613cce
  3. 2mo ago First seen · 250 lines · 2,567 tokens per session scan A 5a9cc3b4c385

Subscribe to this mod's changes

programasweights-python AGENTS.md is an instructions file published in the GitHub repository programasweights/programasweights-python (371 stars, last pushed 13d ago), licensed MIT. It adds 2,888 tokens to every session, about $0.0116 per session on Opus 5.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-30.

Related

programasweights-python AGENTS.md compared with instructions from other repositories

programasweights-python AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
programasweights-python AGENTS.mdprogramasweights/programasweights-pythonInstructions file37113d agoMITA2,888Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode