# Architecture Context for GitHub Copilot

Generated by `sruja ai-context -r . -f copilot-instructions`

## Summary
This workspace has 14 crates, 1 databases.

## Key Rules

1. **Respect layers**: Layers found: Core Engine, Extraction, Delivery, Secondary

## Forbidden Dependencies
- Lower-tier crates must not depend on higher-tier crates
- sruja-cli is the top-level aggregator — no other crate should depend on it
- WASM-only crates must not use native-only APIs (tree-sitter, fastembed)

## Before Committing
Run: `sruja check -r .` to check for architectural violations.

## Agentic Optimization Loop

When making architectural changes, follow this loop:
1. Run `sruja_evaluate_proposal` to validate health.
2. If it fails, run `sruja_record_learning` to document the error.
3. Only present the final code after a successful evaluation.


# Global AI Agent Guidelines
You MUST read and strictly adhere to the instructions located in `AGENTS.md` before proceeding with any task.
