The common way to send code to an AI is still manual file selection, a ZIP, or pasted snippets. That flow hides important decisions: what was excluded, which commit produced the context, whether secrets were present and whether the same selection can be reproduced later.
TreeSift treats that handoff as an engineering artifact. The goal is not to magically choose what the AI should read, but to make selection deterministic, explainable and verifiable.
Four mechanisms hold that design together:
- Deterministic selection with ignore rules evaluated in the correct directory scope
- Git provenance, hashes and manifests that reconstruct the handoff state
- Conservative policies for secrets, binaries and sensitive local files
- An explicit boundary between repository data and files containing instructions for agents
A central architectural decision was to avoid a classifier that decides which files are 'important'. That can feel convenient, but it creates hidden behavior and makes exclusion decisions hard to explain. TreeSift keeps selection controlled by observable rules.
The same selection core powers context bundles and ZIP/TAR archives. That avoids two definitions of what belongs to the project and reduces drift between what is analyzed and what is packaged.
Snapshots and deltas let later interactions send only changes since a prior handoff. The benefit is not only token reduction; it preserves provenance across project states.
Should context engineering be treated as prompt engineering, or as a reproducible stage of the software pipeline?
Once context becomes an artifact, it can be reviewed, compared, versioned and validated like other engineering outputs.
That does not eliminate risk: secret detection is never perfect and token estimates do not replace the target model's tokenizer. The improvement is making those limitations explicit instead of hiding them in a manual step.
Design criterion
Should an agent receive as much context as possible, or the smallest context whose origin and selection we can explain?
Sources and supporting references
These are some of the works, studies and institutions used as conceptual support for the article's arguments.
Primary source for architecture, deterministic behavior, safety policies, manifests and the context workflow.