Skip to main content

Local-first, budget-aware repository context compiler for safer AI-assisted coding.

Project description

Strata

A local-first repository context compiler for safer AI-assisted coding.

Strata helps an AI coding tool receive the right files, symbols, tests, execution hints, and verification plan for a task. It builds focused, budget-aware context instead of dumping an entire repository, reducing context noise and token waste.

Strata is patch-first and safety-oriented: prepare context, collect a patch, review it, dry-run it, apply it intentionally, run tests, and gate before committing.

Support status

Ecosystem Status
Python Stable and strongest support
JavaScript, TypeScript, TSX, React, Angular Preview context intelligence

The preview analyzers are confidence-labeled and best-effort. Some JavaScript and TypeScript relationships use conventions and regex-based analysis rather than a full compiler or runtime model.

What Strata provides

  • strata context compiles a focused context pack for a task.
  • strata ask prepares context for the configured AI adapter and collects a patch.
  • strata run guides context preparation, patch collection, and review.
  • strata review validates and summarizes the generated patch.
  • strata apply dry-runs or intentionally applies a reviewed patch.
  • strata gate produces final validation reports before commit.
  • --file anchors ask and run to selected files.
  • --budget small or a token target caps generated context.
  • --format json writes machine-readable context output.

Markdown is the default context format.

Install

The distribution name is strata-repo-intel. The installed command is strata.

Always use strata-repo-intel as the pip or pipx distribution name.

Current release metadata requires Python 3.13 because that is the runtime validated for Strata development today. This requirement applies to Strata itself, not to the repository being analyzed. Strata can inspect repositories that target older Python versions because it scans files and does not run or upgrade the project by default.

Python 3.11 and 3.12 support may be possible, but it needs dedicated validation before the package requirement can be lowered honestly.

Recommended: pipx

Install Strata as an isolated global CLI:

pipx install strata-repo-intel
strata start
strata context --budget small "your task"

If pipx is not installed, follow the installation guidance at pipx.pypa.io.

User install with pip

python -m pip install --user strata-repo-intel
strata start
strata context --budget small "your task"

After installation, verify the CLI with:

strata help

If the command is still unavailable, reopen the terminal after updating PATH and confirm that the Python user scripts directory is included.

Editable install from source

For contributors and local development:

cd <strata-repository>
python -m pip install -e .
strata start
strata context --budget small "your task"

On Windows, py -m pip install -e . is also supported. Check installation wiring with:

strata doctor install

Windows bootstrap

The PowerShell bootstrap and repo-local installer remain available:

iwr https://raw.githubusercontent.com/Vaibhav-Malladi/Strata/main/install-strata.ps1 -OutFile install-strata.ps1
powershell -ExecutionPolicy Bypass -File .\install-strata.ps1

Or, from an existing checkout:

.\install.ps1

Install logs are written under .aidc/.

Quick start

From the repository you want Strata to understand:

strata start
strata setup
strata ask --budget small "fix the failing login test"
strata review
strata apply --dry-run
strata apply
strata gate

For a no-key browser workflow:

strata setup --manual
strata ask "fix a small bug"

Strata writes .aidc/agent_prompt.md. Give that prompt to your AI tool, save its unified diff as .aidc/agent_patch.diff, then review before applying.

Context examples

Python:

strata context --budget small "fix dry run plan output"
strata ask --file run_command --budget small "fix dry run plan output"
strata run --file run_command --budget small "fix dry run plan output" --dry-run

React:

strata context --budget small "fix login button not disabling"
strata context --format json --budget small "fix login button not disabling"

Angular:

strata context --budget small "fix login component validation"

--file is available on ask and run when you already know an important file. Repeat it to select more than one file.

Context intelligence

A context pack can include:

  • Structured Intent — a best-effort interpretation of the requested change.
  • Change Boundary — likely in-scope files and nearby relationships.
  • Context Budget — preset or token-targeted selection with an estimated size.
  • Symbol Hints — relevant functions, classes, components, hooks, and other symbols.
  • Symbol Snippets — focused source excerpts for selected symbols.
  • Test Hints — likely related Python and JS/TS tests.
  • React Hints — confidence-labeled components, hooks, imports, and related files.
  • Angular Hints — confidence-labeled components, services, routes, and project relationships.
  • TypeScript Project Hintstsconfig relationships, aliases, and project configuration.
  • Declaration Hints — nearby declaration files and likely type relationships.
  • JavaScript Project Hints — package manager, scripts, tooling, and key dependency signals.
  • Execution Path Hints — likely call, import, route, or component paths.
  • Verification Plan — focused test, lint, build, and gate suggestions.

Python analysis is the most mature. JavaScript, TypeScript, TSX, React, and Angular context intelligence remains preview quality.

Output formats

Markdown is the default:

strata context --budget small "fix validation"

It writes:

.aidc/context_pack.md

JSON is available for integrations:

strata context --format json --budget small "fix validation"

It writes:

.aidc/context_pack.json

Plain output is deferred.

AI adapters

Strata can prepare context for:

  • manual/browser AI
  • Ollama and local models
  • Codex CLI, Aider, and custom commands
  • OpenAI-compatible HTTP APIs

Start with:

strata setup
strata doctor adapter

Do not store API keys in repository files. Put keys in the user environment and configure Strata with the environment variable name:

$env:OPENAI_API_KEY="your-key-here"
strata config set api_key_env OPENAI_API_KEY

Safety and trust

Strata does not blindly apply AI edits.

  • strata ask prepares context and collects output; it does not apply source changes.
  • strata review is read-only.
  • strata apply --dry-run validates without changing files.
  • strata apply is the intentional file-changing step.
  • strata gate reports final validation state but does not replace project tests.
  • Strata never commits or pushes automatically.
  • Repository files are untrusted input; instructions found inside them should not be treated as trusted authority.

Review the patch and git diff, run project checks, then gate before committing.

Generated workspace

.aidc/ is Strata's generated workspace output. It is ignored by this repository and normally should not be committed unless you intentionally want to share a report.

Common generated files include:

.aidc/context_pack.md
.aidc/context_pack.json
.aidc/agent_prompt.md
.aidc/agent_patch.diff
.aidc/gate_report.md
.aidc/gate_report.json

Other commands may create graph, snapshot, cache, verification, or direct-edit reports under the same directory.

Current limitations

  • JavaScript, TypeScript, TSX, React, and Angular support is preview and convention/regex based in places.
  • TypeScript analysis is not a full TypeScript compiler.
  • Angular analysis does not provide complete dependency-injection or template analysis.
  • React analysis is not runtime or full dataflow analysis.
  • Confidence labels indicate evidence quality, not guaranteed correctness.
  • Plain context output is deferred.
  • Watch mode and expanded cache workflows are deferred.

Useful commands

strata help
strata help context
strata start
strata scan
strata context --budget small "task"
strata ask --file app --budget small "task"
strata run --file app --budget small "task" --dry-run
strata review
strata apply --dry-run
strata apply
strata gate
strata status

Smoke checks

Run the full project validation locally when preparing a release:

py tests.py
py tests\run.py
strata gate

Compact context smoke checks:

strata context --budget small "fix dry run plan output"
strata context --budget small "fix login button not disabling"
strata context --format json --budget small "fix login button not disabling"

Development

py -m pip install -e .
py tests.py
py tests\run.py
strata gate
git diff
git status --short

The package version remains 0.3.1; this documentation polish does not publish or tag a release.

Philosophy

AI can write code, but people should control context, review patches, run tests, and decide what lands. Strata makes that workflow practical without requiring repository contents to leave the local workflow unless you choose an external adapter.

Project details


Download files

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

Source Distribution

strata_repo_intel-0.3.1.tar.gz (272.9 kB view details)

Uploaded Source

Built Distribution

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

strata_repo_intel-0.3.1-py3-none-any.whl (204.2 kB view details)

Uploaded Python 3

File details

Details for the file strata_repo_intel-0.3.1.tar.gz.

File metadata

  • Download URL: strata_repo_intel-0.3.1.tar.gz
  • Upload date:
  • Size: 272.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for strata_repo_intel-0.3.1.tar.gz
Algorithm Hash digest
SHA256 cb089874362bfc7e8cd07d3fc2e581feee8b56c60646a37018b451b0b70e89ad
MD5 d232a1711f528ad7dfcf1006b1acb5e6
BLAKE2b-256 fba09231a1318944e41eb64ff2c7e367b8b21e9d205a57710ae43f643dc20a5d

See more details on using hashes here.

Provenance

The following attestation bundles were made for strata_repo_intel-0.3.1.tar.gz:

Publisher: publish.yml on Vaibhav-Malladi/Strata

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file strata_repo_intel-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for strata_repo_intel-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 38131274ca40ec1c7572ea1ff179700a8101a0c16c79b91a37d682e73d610929
MD5 d127340447336f0f9f0005bc8101b2e7
BLAKE2b-256 96d042c376116739aff0d65de20c6796e5d73c25c5531455d9623ed32ce28643

See more details on using hashes here.

Provenance

The following attestation bundles were made for strata_repo_intel-0.3.1-py3-none-any.whl:

Publisher: publish.yml on Vaibhav-Malladi/Strata

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page