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 contextcompiles a focused context pack for a task.strata askprepares context for the configured AI adapter and collects a patch.strata runguides context preparation, patch collection, and review.strata reviewvalidates and summarizes the generated patch.strata applydry-runs or intentionally applies a reviewed patch.strata gateproduces final validation reports before commit.--fileanchorsaskandrunto selected files.--budget smallor a token target caps generated context.--format jsonwrites 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 Hints —
tsconfigrelationships, 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 askprepares context and collects output; it does not apply source changes.strata reviewis read-only.strata apply --dry-runvalidates without changing files.strata applyis the intentional file-changing step.strata gatereports 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file strata_repo_intel-0.3.2.tar.gz.
File metadata
- Download URL: strata_repo_intel-0.3.2.tar.gz
- Upload date:
- Size: 273.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad9790a5024c64b26cbe5b9874c5b17511a590fc8d80ddcc7a48d24174dab306
|
|
| MD5 |
497eefdb35bdf609aa994cb6b9e45511
|
|
| BLAKE2b-256 |
523bf97d1e07c17a1c2c4586172246496622a43d6f61facf23a8759960c72b9d
|
Provenance
The following attestation bundles were made for strata_repo_intel-0.3.2.tar.gz:
Publisher:
publish.yml on Vaibhav-Malladi/Strata
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
strata_repo_intel-0.3.2.tar.gz -
Subject digest:
ad9790a5024c64b26cbe5b9874c5b17511a590fc8d80ddcc7a48d24174dab306 - Sigstore transparency entry: 1955924444
- Sigstore integration time:
-
Permalink:
Vaibhav-Malladi/Strata@58f3c2c0fa565b6881699a93bc5145fb72b62186 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/Vaibhav-Malladi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@58f3c2c0fa565b6881699a93bc5145fb72b62186 -
Trigger Event:
push
-
Statement type:
File details
Details for the file strata_repo_intel-0.3.2-py3-none-any.whl.
File metadata
- Download URL: strata_repo_intel-0.3.2-py3-none-any.whl
- Upload date:
- Size: 205.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e33d37462d415a823521a23b9367747ac9c96e6d693d77bd1831ce5cfedbd0e7
|
|
| MD5 |
a80ce075b8c149773cabce59c977af2f
|
|
| BLAKE2b-256 |
95bc0b5d5a5354c562937c86ef6ae8eba8e5a11b3a7acf58854bf31360c9616f
|
Provenance
The following attestation bundles were made for strata_repo_intel-0.3.2-py3-none-any.whl:
Publisher:
publish.yml on Vaibhav-Malladi/Strata
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
strata_repo_intel-0.3.2-py3-none-any.whl -
Subject digest:
e33d37462d415a823521a23b9367747ac9c96e6d693d77bd1831ce5cfedbd0e7 - Sigstore transparency entry: 1955924527
- Sigstore integration time:
-
Permalink:
Vaibhav-Malladi/Strata@58f3c2c0fa565b6881699a93bc5145fb72b62186 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/Vaibhav-Malladi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@58f3c2c0fa565b6881699a93bc5145fb72b62186 -
Trigger Event:
push
-
Statement type: