All guides

Keep AI-written code aligned with your architecture.

Architecture drift happens when working code moves away from the project's intended responsibilities and boundaries. Reduce it by giving coding agents current architecture constraints before they edit, then reviewing the changed files and affected product flow.

Intent reaches the implementation
Responsibilities
Mapped to blocks and files
Constraints
Delivered before editing
Scope change
New contract before expansion
Review
Behavior and evidence together

A map describes the system. A run contract connects that map to the change.

  1. Make architecture part of the run contract.

    A diagram alone cannot keep an implementation aligned. The agent needs the current responsibilities, relevant files, and constraints for the task it is about to perform. Kaplira connects project knowledge to the governed run so those decisions can be considered before editing.

    • Identify the architecture blocks and files affected by the task
    • Carry accepted boundaries and prior decisions into the live context
    • Declare the writable scope before implementation begins
    • Request a new contract if the change needs another subsystem
  2. A compiling shortcut can still cross a boundary.

    Illustrative example: a checkout UI task introduces a database call directly in a presentation component, even though the project requires persistence to stay behind its service layer. The feature may compile while violating an architectural decision.

    For that task, carry the service-layer constraint into the run, scope the intended files, and require a new contract if service changes are needed. Review both the dependency boundary and checkout behavior. This scenario explains the workflow; it is not a captured Kaplira intervention or a claim that every architectural violation is detected automatically.

  3. Review the change and preserve the decision.

    Compare the changed files with the declared scope, inspect their responsibilities, and validate the affected product flow. Tests and review evidence should explain what was checked, not imply that a green build proves architectural correctness.

    Keep accepted decisions and unresolved risks with the run so the next agent can reuse them. If the architecture intentionally changes, update the project knowledge instead of silently treating the old boundary as current.

Governance is easier to judge on a real run.

The desktop app is free, no signup is required, and the run record stays on your machine by default. Tell me which part of your review actually needs proof — that is what decides what gets built next.

Governance applies to integrated workflows that use the project contract. It does not replace your executor’s sandbox, access controls, tests, or human review, and it does not guarantee correct code. Read the run evidence and security boundaries to see what the record proves.