okf-generator
AGENTS.md99 starsChanged 5 months agoMITView on GitHub
BEFORE reading any source file, ALWAYS run: okf lookup returns the exact signature, parameters, docstring, dependencies, and callers in milliseconds. Grepping or reading source files directly is slower and gives you less information. Generate a bundle: Incremental update (fast): Diff two bundles: Full integration test: Hand TEST.md to an agent: "Run TEST.md and produce OKF_TEST_REPORT.md" Release: Hand RELEASE.md to an agent: "Follow RELEASE.md to cut a new release"
- Installs packages
In this repository4 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- docs/llms.txtllms.txt
- okf-generatorSkill
The file
Files
OKF Generator — Agent Instructions
CRITICAL RULE: Never grep source files first
BEFORE reading any source file, ALWAYS run:
okf lookup --bundle ./okf_bundle <ConceptName>okf lookup returns the exact signature, parameters, docstring, dependencies, and callers in milliseconds. Grepping or reading source files directly is slower and gives you less information.
Quick Start
pip install -e ".[dev]" # editable install
pytest tests/ -q # 415 testsKey Files
| File | Purpose |
okf/generator.py | Core scanner & bundle writer |
okf/manifest.py | SHA256 manifest model, change detection, rename handling |
okf/update.py | Incremental update pipeline |
okf/watcher.py | Watchdog file watcher for --watch mode |
okf/manifest_scanner.py | Dependency/manifest parsers (20 formats) |
okf/lookup.py | Concept search |
okf/diff.py | Bundle comparison |
okf/pairs.py | Training data generation |
okf/cli.py | CLI entry point |
tests/ | 415 unit tests |
tests/fixtures/complex/ | Multi-language test data (7 langs, 12 manifests) |
Lookup patterns
# Single concept (full detail: signature, params, docstring, calls, called-by)
okf lookup --bundle ./okf_bundle ClassName
# Filter by type
okf lookup --bundle ./okf_bundle --type Class
okf lookup --bundle ./okf_bundle --type Function
okf lookup --bundle ./okf_bundle --type Dependency
# Filter by language / ecosystem
okf lookup --bundle ./okf_bundle --tag lang:python
okf lookup --bundle ./okf_bundle --tag ecosystem:npm
# All concepts from one source file
okf lookup --bundle ./okf_bundle --file path/to/file.py
# Dependencies
okf lookup --bundle ./okf_bundle --type Dependency
okf lookup --bundle ./okf_bundle --type Dependency --tag ecosystem:pip
# JSON for programmatic use
okf lookup --bundle ./okf_bundle --json <Name>Custom Commands
/lookup NAME=<name>—RUN okf lookup --bundle ./okf_bundle $NAME/test—RUN pytest tests/ -q/test-md—RUN TEST.md and produce OKF_TEST_REPORT.md
Workflows
Generate a bundle:
okf generate ./src ./okf_bundleIncremental update (fast):
okf update ./src ./okf_bundle # incremental
okf update ./src ./okf_bundle --force # full re-scan
okf update ./src ./okf_bundle --watch # continuous watcherDiff two bundles:
okf diff ./old_bundle ./new_bundle --compactFull integration test: Hand TEST.md to an agent: "Run TEST.md and produce OKF_TEST_REPORT.md"
Release: Hand RELEASE.md to an agent: "Follow RELEASE.md to cut a new release"
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.

