Skip to main content

where are we

Codebase context for agents. Derived from the tree, not written by hand.

PyPI CI License


An agent opening an unfamiliar repository spends its first forty tool calls finding out where the tests live, what a step may call, how a scenario is launched, which variables must be set. Half an hour, every session, for answers that never change and need no model to produce.

This walks the tree instead. Two seconds, no model, no network.

$ where-are-we --repo . --agent-file AGENTS.md

framework map: 66 step modules, 1446 steps, 182 features, 1889 scenarios

The next session starts at turn one.


Install

pip install where-are-we
brew tap ngavrish/tap && brew install where-are-we
curl -fsSL https://ngavrish.github.io/where-are-we/install.sh | sh

macOS, Debian, Ubuntu, Fedora, RHEL. Or ghcr.io/ngavrish/where-are-we, and install nothing.


Three files

framework_map_brief.md — the digest for a prompt. framework_map.md — every step phrase, every scenario with its line number. framework_map.json — the same as data, under a versioned contract.

--agent-file writes the brief into AGENTS.md, CLAUDE.md or .cursorrules, between markers. Everything else in the file survives.


What it reads

The code. Languages and lines. Entry points, make targets, npm scripts, container commands. The HTTP routes it serves and the status codes it returns. The data model. The public surface of every module. Call graph across files, package graph and its cycles. Files nothing imports. The functions carrying the complexity. Blocks that appear twice.

What it runs on. Queues and topics. gRPC services. Scheduled work. Kubernetes probes, resources, replicas. Terraform, Pulumi, Ansible. Cache keys. Permissions. Metrics, spans, log fields. Error types. Retries, timeouts, breakers, rate limits. Transactions and idempotency. The services it calls. What is actually installed, from the lock files.

Contracts. OpenAPI to method and path. GraphQL to its types. Migrations to tables and columns. Mocks, feature flags and where they are branched on. Locale keys. Pinned images. Secret paths — never values.

Decay. Deprecations. Coverage. Documentation pointing at files that are gone. Git history and who has been touching what.

The test suite, if there is one. Layers and entry points. What a step may call, with signatures. Hooks, locators, timeouts, fixtures. Tags and what they mean. Step phrases that overlap, so a new one is not written when one exists. Phrases no feature uses. Dead page-object methods. The slow scenarios, from past junit.


Supported

Test runners — behave, pytest, jest, vitest, playwright, cypress, robot, JUnit, TestNG, Cucumber for JVM, JavaScript and Ruby, rspec, go test, xUnit, NUnit, SpecFlow, PHPUnit, Behat, Rust, XCTest, ExUnit, Flutter, Spock, clojure.test, hspec, busted, Foundry, karate, gauge, k6, gatling, JMeter, Locust, Espresso, Detox.

Languages — Python, TypeScript, JavaScript, Go, Java, Kotlin, Scala, Ruby, Rust, C#, PHP, Swift, C, C++, Elixir, Erlang, Dart, Groovy, Clojure, Haskell, Lua, Perl, R, Julia, Objective-C, F#, Solidity, Shell, SQL.

Web — Flask, FastAPI, Django, Express, Nest, Go net/http, chi, Spring, Rails, React, Vue, Svelte, Angular, Storybook.

Infrastructure — Docker, Compose, Kubernetes, Helm, Terraform, CloudFormation, Pulumi, Bicep, Ansible, Chef, Puppet, GitHub Actions, GitLab CI, Jenkins, CircleCI, Azure Pipelines, Buildkite, Drone.

Data — PostgreSQL and friends, MongoDB, Elasticsearch, DynamoDB, Cassandra, ClickHouse, Kafka, RabbitMQ, SQS, NATS, Pulsar, MQTT, dbt, Airflow, Spark, notebooks.

Detection is by shape, not by directory name. A page object is a class that owns selectors, wherever it lives and whatever the team calls it. Point it at a repository before you know what is in it.


In a pipeline

- uses: ngavrish/where-are-we@v1
  with:
    agent-file: AGENTS.md
    comment: "true"
- repo: https://github.com/ngavrish/where-are-we
  rev: v0.3.0
  hooks: [{id: where-are-we}]

Leaving the repository better than you found it

$ where-are-we --docs

would write steps/README.md — explains what this directory holds
would write .framework-map.json — lets this repository state its own vocabulary
would write AGENTS.md — the brief, where every agent harness already looks
would write docs/ARCHITECTURE.md — one page to read before touching anything

4 files. Run with --docs write to create them; existing files are never touched.

A map helps one session. A repository that explains itself helps every session, and a person can correct the explanation.


When the repository knows better

Autodetection gets the shape right and the vocabulary wrong. A repository states its own in .framework-map.json, and what it states wins.

where-are-we --init
{
  "name": "billing-e2e",
  "purpose": "End-to-end tests for the billing portal.",
  "layers": {"steps": "steps/*.py — steps own no selectors, they call page objects"},
  "product_src": ["../billing-web/src"],
  "conventions": ["After a fix, re-run only what failed."]
}

Staying current

The commit and the newest file in the tree are recorded with the map. Running it on every checkout costs a stat walk and nothing else.

where-are-we --install-hook git     # post-checkout, post-merge, post-commit
where-are-we --install-hook agent   # before the first turn of a session
where-are-we --diff                 # what changed since the last map

Options

--repo PATH                  the repository to index
--product PATH,…             source roots of the application under test
--also PATH,…                other repositories to fold into the same map
--out DIR                    where the three files land
--agent-file FILE            also write the brief into AGENTS.md, CLAUDE.md, …
--docs [write]               offer the repository the documentation it lacks
--for author|coder           author gets the whole vocabulary; coder gets the rest
--only "routes,data model"   keep only these sections in the brief
--skip "coverage,history"    drop these
--max-lines N                cap the brief; the full map is untouched
--diff                       what changed since the map already in --out
--init                       write a starter .framework-map.json
--install-hook git|agent     wire it into something that already runs
--watch SECONDS              rebuild whenever the tree moves
--html                       also write framework_map.html
--force                      rebuild even when nothing moved
--quiet                      no summary line

.wawe.toml holds any of these as defaults. .wawe-ignore keeps build output out. Anything shaped like a credential is redacted before it reaches a file.


As a library

from where_are_we import build, brief

m = build("/path/to/repo")
open("AGENTS.md", "w").write(brief(m))

Examples

Real output on three fixtures — a behave suite, a Go service, a React app — in docs/examples. Generated by running the tool on them, not by hand.


Why it exists

Built inside an agentic QA pipeline where seven branches ran at once, each opening the same way: forty greps for where the steps live, which page object owns the portal, how the driver is built. Identical in every branch, identical every run, derivable without a model. Three runs died at their deadline with the branches still reading.

Nothing about it turned out to be specific to that pipeline, that agent, or that language.


Contributing

Issues and pull requests welcome — CONTRIBUTING.md. A change keeps the contract in SCHEMA.md and comes with a case in tests/ built from a real directory.


MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

where_are_we-0.4.1.tar.gz (73.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

where_are_we-0.4.1-py3-none-any.whl (56.9 kB view details)

Uploaded Python 3

File details

Details for the file where_are_we-0.4.1.tar.gz.

File metadata

  • Download URL: where_are_we-0.4.1.tar.gz
  • Upload date:
  • Size: 73.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for where_are_we-0.4.1.tar.gz
Algorithm Hash digest
SHA256 2edc39471344de0d013a0ffecfe7b1101ba0a2b6af9e779452dcdf074b5cf053
MD5 0b32cc32a674b78180301d4505b3d8e4
BLAKE2b-256 733d7de8be4ff78bfd32d871e96880d3990f3422ed3abec0b642eb231094c93a

See more details on using hashes here.

File details

Details for the file where_are_we-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: where_are_we-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 56.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for where_are_we-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4492ce7d47f21f49eac748e4285a9c2ad387ed8a6cfa9551a2bc1cba8967b129
MD5 254c62be43826570aaa301e5a462a3d3
BLAKE2b-256 282707148d10d3f53e0b31c77270dd193baea25f5ec9e94984102edca1dbfc23

See more details on using hashes here.

Release history Release notifications | RSS feed

0.8.1

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.1

2 files

0.5.0

2 files

This release

0.4.1 This release

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page