powercontext
AGENTS.md1.2k starsChanged 4 months agoApache-2.0View on GitHub
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. The Fumadocs site lives in website/; its generated content/docs/, .generated/, and out/ directories are not source material. Use…
Trending
More talk lately.thin dataabout the whole repository
Who's talking about oceanbase/powercontext
- A Hacker News story“PowerContext, Context for work that humans and agents hand off and continue”Hacker News · Sep 15, 2026 · 1 points
- sudosubin/agents.nix“codex-marketplaces.github.oceanbase.powercontext: init at 1.1.7”GitHub · Oct 4, 2026
- sudosubin/agents.nix“agent-plugins.github.oceanbase.powercontext: init at 1.1.7”GitHub · Oct 4, 2026
- sudosubin/agents.nix“agent-skills.github.oceanbase.powercontext: init at 1.1.7”GitHub · Sep 30, 2026
- agentseek-ai/agentseekd“[Walkthrough] Run the PowerContext template”GitHub · Sep 18, 2026
The biggest 5 of 11 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 11
Talked about on GitHub and Hacker News (11 times).
On GitHub · 10
- Oct 4, 2026codex-marketplaces.github.oceanbase.powercontext: init at 1.1.7 — sudosubin/agents.nix0 reactions
- Oct 4, 2026agent-plugins.github.oceanbase.powercontext: init at 1.1.7 — sudosubin/agents.nix0 reactions
- Sep 30, 2026agent-skills.github.oceanbase.powercontext: init at 1.1.7 — sudosubin/agents.nix0 reactions
- Sep 18, 2026[Walkthrough] Run the PowerContext template — agentseek-ai/agentseekd0 reactions
- Sep 17, 2026Add PowerContext to Memory & Retrieval — aaif/aaif-landscape0 reactions · 1 comment
5 more on GitHub
- Sep 16, 2026build(deps): update powercontext[client] requirement from <1,>=0.0.2 to >=0.0.2,<2 in /integrations/langchain — ob-labs/powercontext-go0 reactions
- Sep 4, 2026Discovery: oceanbase/powercontext — WorkBuddy memory and handoff integration — sandbaseai/awesome-workbuddy0 reactions
- Aug 27, 2026Update powermem requirement from >=0.3.1 to >=1.1.7 in /main/xiaozhi-server — prodigylinda/ESP_deskdog_conversation_server0 reactions
- Aug 27, 2026epic: align PowerContext Go with current PowerContext behavior and CI contracts — ob-labs/powercontext-go0 reactions · 40 comments
- Aug 12, 2026build(deps): update powermem requirement from >=0.3.1 to >=1.1.7 in /main/xiaozhi-server — phamngoctung12lv-pixel/DoAnTotNghiep0 reactions
On Hacker News · 1
- Sep 15, 2026PowerContext, Context for work that humans and agents hand off and continue1 point
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- website/AGENTS.mdAGENTS.md
- website/CLAUDE.mdCLAUDE.md
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
16 rules. About 0 are common, 11 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 20
Use an available skill only when it matches the current task, and read its SKILL.md before applying it.
- Distinctive: line 28
Start from the current contract and relevant RFC.
- Distinctive: line 29
Keep domain rules in the runtime or Artifact service that owns them.
- Distinctive: line 31
Keep operation-specific validation, request construction, and error handling near their owning boundary.
- Distinctive: line 34
Keep authoritative records distinct from derived projections.
- Distinctive: line 37
Use REVIEW.md when reviewing changes.
- Very specific: line 45
Use pytest; name test files test_*.py and test functions test_*.
- Very specific: line 47
Put focused behavior tests in tests/ and assert through public interfaces.
- Very specific: line 48
Put cross-component acceptance scenarios in tests/e2e/.
- Distinctive: line 49
Add a regression test when fixing a defect that is likely to recur.
- Distinctive: line 50
Do not freeze implementation details such as import graphs, module ownership, dependency lists, buffer sizes, private call order, or call …
- Distinctive: line 51
Do not exhaustively mock and test internal errors that an abstraction deliberately normalizes.
- Distinctive: line 52
Do not test a straightforward script solely to increase coverage.
- Distinctive: line 60
Write page metadata and content as literal UTF-8 text.
- Distinctive: line 62
Write deliverables as self-contained, final-state artifacts.
- Very specific: line 72
Do not commit secrets, local virtual environments, caches, .powercontext/, dist/, or generated website output.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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. The Fumadocs site lives in website/; its generated content/docs/, .generated/, and out/ directories are not source material.
Build, Test, and Development Commands
make install: runuv syncand installprekhooks.make skills-install: install the recommended agent skills pinned inskills-lock.json; requiresnpxand a Codex restart.make check: verify the lock file, run all pre-commit hooks, and runty check.make test: runpytestwith doctest support.tox: run tests and type checks across Python 3.11, 3.12, 3.13, and 3.14.make build: cleandist/and build the wheel.make docs-test: lint and build the static website, including API references.make docs: serve the Fumadocs website locally.
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.
Design and Implementation
- Start from the current contract and relevant RFC. Change public APIs only as required by the task and avoid unrelated refactors. Do not weaken behavior tests to accommodate an implementation shortcut.
- Keep domain rules in the runtime or Artifact service that owns them. Transport and host adapters should translate their inputs and outputs without inventing different domain behavior.
- Extract helpers for cohesive responsibilities, such as an invariant, algorithm, protocol encoding, or state transition. Share code when callers have the same contract and failure semantics. Similar syntax or a few repeated lines is not enough; avoid forwarding helpers and intermediate types that only scatter an operation across files.
- Keep operation-specific validation, request construction, and error handling near their owning boundary. Do not add unrelated branches to a shared helper just to reuse it.
- Make identity and state transitions explicit. Keep retries, persisted state, and recovery consistent with the promised idempotency and delivery behavior. A successful write must remain usable through its supported read path.
- Choose compatibility deliberately. Unsupported formats may be rejected clearly before acceptance or writes; supported formats must work through serialization, persistence, readback, and reuse. Define the handling of existing records and version conflicts. Keep documentation and compatibility claims consistent with that choice.
- Keep authoritative records distinct from derived projections. Rebuilding derived state must preserve exact identities and historical evidence rather than silently assigning today's interpretation to old data.
- Account for work and storage costs at the expected scale. Identify whole-collection scans or rewrites on incremental operations, and measure their impact before claiming a performance improvement or acceptable cost.
Use REVIEW.md when reviewing changes.
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.
Testing Guidelines
Use pytest; name test files test_*.py and test functions test_*. Tests must protect observable behavior or a specific regression; complexity alone is not a reason to add one:
- Put focused behavior tests in
tests/and assert through public interfaces. - Put cross-component acceptance scenarios in
tests/e2e/; they should remain valid across internal rewrites. - Add a regression test when fixing a defect that is likely to recur. Reproduce the failure and preserve the externally observable behavior that was previously wrong.
- Do not freeze implementation details such as import graphs, module ownership, dependency lists, buffer sizes, private call order, or call counts unless they express an external budget or idempotency guarantee.
- Do not exhaustively mock and test internal errors that an abstraction deliberately normalizes. Cover an internal error separately only when it produces distinct observable behavior.
- Do not test a straightforward script solely to increase coverage. If its correctness is evident from reading it end to end and it has no meaningful external behavior or known regression, extra tests add noise rather than confidence.
Include doctests when public examples are useful. For changes that affect supported Python versions, prefer tox before opening a PR. Tests may use plain assert; Ruff allows S101 under tests/.
Run focused checks first and expand based on affected behavior. For claims about an external backend or host, distinguish actual execution from mocks, emulators, and direct hook invocation. Simulated inputs verify local handling; they do not establish that a real service produces those inputs or that a host supports the complete workflow.
Deliverables
Write page metadata and content as literal UTF-8 text. Use Chinese characters directly instead of Unicode escape sequences. Preserve non-ASCII text when serializing documentation metadata to JSON.
Write deliverables as self-contained, final-state artifacts. Incorporate requested feedback directly into the artifact. Do not refer to drafts, versions, review rounds, prior wording, superseded decisions, or the editing process unless the user explicitly requests a changelog, history, or decision record.
Commit & Pull Request Guidelines
Recent history uses short Conventional Commit-style subjects, such as feat: init powercontext, feat(website): establish new site style and structure, and chore(github): add more templates for PRs and issues. Keep the subject concise and scoped.
Pull requests should link the relevant issue or RFC, explain the rationale, summarize behavior/API/docs/test changes, call out user-facing or breaking changes, list validation commands, and include the AI usage statement requested by .github/pull_request_template.md.
Security & Configuration Tips
Do not commit secrets, local virtual environments, caches, .powercontext/, dist/, or generated website output. Keep dependency changes reflected in uv.lock, and use make check to catch lock drift before review.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

