agentleFS
UmairBaig8UmairBaig8/okf-generator/AGENTS.md

okf-generator

AGENTS.md106 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

The file

Files
AGENTS.md

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 tests

Key Files

FilePurpose
okf/generator.pyCore scanner & bundle writer
okf/manifest.pySHA256 manifest model, change detection, rename handling
okf/update.pyIncremental update pipeline
okf/watcher.pyWatchdog file watcher for --watch mode
okf/manifest_scanner.pyDependency/manifest parsers (20 formats)
okf/lookup.pyConcept search
okf/diff.pyBundle comparison
okf/pairs.pyTraining data generation
okf/cli.pyCLI 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_bundle

Incremental update (fast):

okf update ./src ./okf_bundle          # incremental
okf update ./src ./okf_bundle --force  # full re-scan
okf update ./src ./okf_bundle --watch  # continuous watcher

Diff two bundles:

okf diff ./old_bundle ./new_bundle --compact

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"

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.