Version: v1.1.0
This page shows you how to use TealTiger correctly.
Best Practices
You’ve learned what TealTiger does (Goals), what it doesn’t do (Non-Goals), and what to avoid (Anti-Patterns). Now let’s talk about how to use it effectively.Core Principles
Before diving into specific practices, remember these principles:- Policies are contracts - Treat them like API contracts, not config files
- Determinism is a feature - Same input = same output is what you want
- Context flows through inputs - Dynamic data goes in context, not policies
- Compose by concern - Separate cost, security, and reliability policies
- Audit is first-class - Treat audit events as durable governance records
Best Practices
1. Treat Policies as Governance Contracts
The practice: Policies should be explicit, reviewed, versioned, and stable.- Policies are versioned in source control
- Changes require code review
- You can roll back to previous versions
- Audit logs reference specific policy versions
- Store policies in version control
- Require code review for policy changes
- Tag policy versions
- Document why policies exist
2. Keep Policies Deterministic and Explainable
The practice: Every decision should have a clear, understandable reason.- Developers understand why decisions happen
- Debugging is straightforward
- Audit logs are meaningful
- No surprises
- Use clear condition names
- Avoid ambiguous thresholds
- Document policy intent
- Test edge cases
3. Pass Context Through Inputs, Not Policy Logic
The practice: Encode dynamic behavior in inputs, keep policy logic stable.- Policies remain stable and testable
- Dynamic data doesn’t require policy changes
- Audit logs capture full context
- Easier to reason about behavior
- Pass user identity through context
- Pass environment through context
- Pass request metadata through context
- Keep policies environment-agnostic
4. Separate Policies by Concern
The practice: Compose policies by domain (cost, security, reliability).- Each policy is focused and testable
- Easy to review individual concerns
- Can evolve policies independently
- Clear ownership (security team owns security policies, etc.)
- Group policies by domain
- Avoid mixing concerns in one policy
- Test policies independently
- Assign ownership by domain
5. Use Audit Events as First-Class Output
The practice: Treat audit events as durable governance records.- Compliance teams get evidence they need
- Security teams can investigate incidents
- Developers can debug policy behavior
- Regulators get defensible audit trails
- Enable audit logging
- Forward to durable storage
- Set up retention policies
- Monitor for high-risk events
6. Integrate Early in the Execution Path
The practice: Evaluate policies BEFORE executing AI actions.- Fail fast when constraints are violated
- Reduces cost (don’t call LLM if blocked)
- Reduces blast radius (catch issues early)
- Improves predictability
- Evaluate before LLM calls
- Evaluate before tool executions
- Handle all decision types
- Log evaluation results
7. Keep Policies Vendor-Neutral
The practice: Base policies on behavior and risk, not provider details.- Policies survive provider changes
- Easy to migrate between providers
- Policies focus on governance, not infrastructure
- Reduces vendor lock-in
- Avoid provider-specific logic
- Use behavior-based conditions
- Test with multiple providers
- Document provider assumptions
8. Version Policies Alongside Code
The practice: Release policies with application changes.- Policies and code stay in sync
- Rollbacks include policy rollbacks
- Audit logs reference specific versions
- Reproducible deployments
- Store policies in source control
- Version policies with app versions
- Tag releases
- Document policy changes in changelog
9. Start Simple, Then Expand Coverage
The practice: Begin with high-impact policies, expand deliberately.- Reduces initial friction
- Builds confidence gradually
- Allows learning from data
- Avoids over-governing early
- Start with 1-2 high-impact policies
- Use MONITOR mode initially
- Observe for 1-2 weeks
- Expand based on data
10. Review Policies as Systems Evolve
The practice: Periodically review and adjust policies.- Policies stay relevant as systems evolve
- Data-driven adjustments
- Catches drift early
- Maintains trust
- Review policies monthly or quarterly
- Analyze audit logs for patterns
- Adjust thresholds based on data
- Test changes before deploying
Putting It All Together
Here’s a complete example following all best practices:Summary
Following these best practices ensures: ✅ Predictable enforcement - Deterministic, explainable decisions✅ Clean audit trails - Durable governance records
✅ Scalable governance - Policies that grow with your system
✅ Developer trust - No surprises, clear reasoning TealTiger works best when governance is visible, intentional, and boring.

