powercontext AGENTS.md

An AGENTS.md instruction file for PowerContext, a Python package with source code, tests, documentation, build settings, and agent skills. It lists the repository structure and commands for installation, checking, testing, documentation, and package building.

In plain words
What is it for?
Use it when developing PowerContext, including its Python source, tests, English or Chinese documentation, skills, package build, and quality checks.
Why use it?
It gives coding agents a reliable project map and standard commands for checking code, running tests, building the package, and validating documentation.

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

Made for: Codex, OpenCode.

Per session 1,028 This file is loaded in full into every session.
When invoked 1,028 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.01028 $0.01028
Opus 5 $0.00514 $0.00514
Sonnet 5 $0.00206 $0.00206
Haiku 4.5 $0.00103 $0.00103

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

Security

Grade A, and why

powercontext 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 yesterday.

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 · 69 lines

How it starts

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

Repository Guidelines

Project Structure & Module Organization

powercontext is a Python package built with uv and Hatchling. Runtime code lives in src/powercontext/; keep public package exports in src/powercontext/__init__.py and place new modules beside related code. Tests live in tests/; organize focused tests around observable behavior and keep cross-component acceptance scenarios in tests/e2e/. Documentation is split by locale under docs/en/ and docs/zh/, with RFC material in each locale's rfcs/ directory. Site configuration is in zensical.toml; generated output in site/ is not source material.

Build, Test, and Development Commands

  • make install: run uv sync and install prek hooks.
  • make skills-install: install the recommended agent skills pinned in skills-lock.json; requires npx and a Codex restart.
  • make check: verify the lock file, run all pre-commit hooks, and run ty check.
  • make test: run pytest with doctest support.
  • tox: run tests and type checks across Python 3.11, 3.12, 3.13, and 3.14.
  • make build: clean dist/ and build the wheel.
  • make docs-test: build documentation strictly.
  • make docs: serve documentation locally with Zensical.

Agent Skills

Use an available skill only when it matches the current task, and read its SKILL.md before applying it. Recommended skills are pinned in skills-lock.json; contributors can install them before a new Codex session with make skills-install.

Coding Style & Naming Conventions

Target Python 3.11+. Use PEP 8 naming: modules and functions in snake_case, classes in PascalCase, constants in UPPER_SNAKE_CASE. Ruff enforces formatting and linting with a 120-character line length; run uv run prek run -a before committing if you do not use the installed hooks. Keep comments focused on non-obvious intent rather than restating code.

Generated API Contract

openapi/powercontext.yaml is the source of truth for the HTTP API contract. The Python sources in src/powercontext/http/_generated/ are checked in; do not edit them by hand. After changing the contract, run make api-generate and make contract-test.

Read the full file on GitHub · 69 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. yesterday First seen · 69 lines · 1,028 tokens per session scan A 4a1b833c5ebd

Subscribe to this mod's changes

powercontext AGENTS.md is an instructions file published in the GitHub repository oceanbase/powercontext (923 stars, last pushed yesterday), licensed Apache-2.0. It adds 1,028 tokens to every session, about $0.0051 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-30.