Start from the task
For debugging, include the failing path, related types, config, and tests. For architecture, include entrypoints, module boundaries, docs, and schema.
The task determines the context. A whole-repo export can be useful, but it is often wasteful.
Remove code noise
Dependencies, build output, generated files, snapshots, logs, and large fixtures usually waste tokens unless they are the issue.
Use filters to remove predictable noise before export.
Include non-code context
Specs, product docs, issue notes, API contracts, and design decisions often explain why the code exists.
This is where a multi-source builder matters: the repo is only one part of the context.
Riflet workflow
Add the repo, add external docs if needed, filter noise, check tokens, and export the focused bundle for your AI coding tool.
Build better AI context with Riflet
Collect the files, notes, websites, and docs that matter. Export one portable bundle for any AI.
Download Riflet freeFrequently asked questions
Is context engineering for codebases only useful for developers?
No. The same context principles apply to research, writing, legal review, client work, product planning, and any workflow where the AI needs project-specific source material.
Does more context always produce better AI output?
No. Relevant, well-structured context usually beats a large dump of loosely related files. Large context windows make preparation more important, not less important.
Where does Riflet fit in this workflow?
Riflet is the assembly step. It helps gather source material, filter it, estimate the token budget, and export one portable file for the AI tool you choose.
Does Riflet replace RAG or AI project features?
Not always. RAG is useful for large retrieval systems. AI project features are useful inside one platform. Riflet is best when you want explicit, portable context you can inspect before using.