Sagebrush™ Standards
Legal documents should be as computable as code. Sagebrush™ Standards transform legal workflows from manual processes into automated, validated systems. You define the complete workflow—from data collection to document generation—in a single file.
The Problem We Solve
Legal practice suffers from preventable inefficiencies:
- Static documents trap legal knowledge in Word files and PDFs that software cannot process
- Inconsistent data collection forces clients to answer the same questions differently across firms
- Manual review processes create bottlenecks and introduce errors
- No standardized automation means every firm reinvents document generation
- Vendor lock-in prevents you from switching service providers without rebuilding workflows
You waste time on problems that software should solve. Sagebrush™ Standards provide the foundation for computable legal documents.
What Are Sagebrush™ Standards?
Sagebrush™ Standards define how to write legal workflows as code. You create markdown files with structured metadata that specify three things in one place:
- What questions to ask (client questionnaires)
- How staff reviews submissions (approval workflows)
- What documents to generate (output templates)
These files are human-readable, version-controllable with git, and machine-processable. You write them once and run them everywhere. Any software that conforms to Sagebrush™ Standards can execute your workflows.
Core Components
Notations: Single-File Workflows
A notation is one markdown file that defines a complete legal workflow. The file contains structured YAML metadata at the top (front matter) followed by a document template.
You specify:
- A unique identifier for the workflow
- The title and description
- Whether the workflow applies to individuals, organizations, or both
- The complete question flow for clients
- The complete review flow for staff
- The document template with variable placeholders
This single-file approach keeps related logic together. You never lose track of which questionnaire generates which document. Everything lives in one place.
Questionnaires as State Machines
Sagebrush™ Standards model questionnaires as state machines—finite paths through questions with explicit transitions. This approach eliminates ambiguity about what happens next.
Flow: Client-Facing Questions
The flow defines your client’s journey. Each state references a question. Based on the answer, the system moves to the next state. You specify unconditional transitions with _ and conditional transitions based on answer values.
Every flow must start at BEGIN and reach END. No questions fall through the cracks. No infinite loops trap users. The validation system enforces these rules.
Alignment: Staff Review Process
The alignment defines how your staff reviews client submissions. This human-in-the-loop verification ensures quality control and legal oversight. Staff questionnaires can approve, reject, request clarification, or route to specialized reviewers.
You maintain final authority over automated processes. The system assists; you decide.
Document Generation
Document templates use Liquid templating to insert client data into predefined structures. You write the template once with variable placeholders. The system replaces placeholders with actual responses when generating documents.
You can:
- Insert variables:
{{client_name}} - Format dates:
{{start_date | date: "%B %d, %Y"}} - Format currency:
{{amount | currency}} - Add conditional sections: Show text only if certain conditions apply
- Create loops: Repeat sections for multiple items
The output is a professional document ready for signatures. You generate PDFs or formatted text files depending on your needs.
Benefits By Audience
For Legal Professionals
Eliminate repetitive work. You stop drafting the same documents manually. Define the workflow once and reuse it for every client.
Enforce quality control. Staff review is built into the workflow. No submission bypasses verification. You catch errors before they reach clients.
Maintain compliance. Validation ensures all required information is collected. Audit trails track every action. You demonstrate compliance through system-generated logs.
Scale without proportional hiring. Automated workflows handle increased volume without proportional staff growth. You serve more clients without sacrificing quality.
For Organizations
Standardize across teams. Every office uses the same workflows. You eliminate inconsistency between jurisdictions and practitioners.
Swap service providers seamlessly. Sagebrush™ Standards define the interface. Any conforming provider can execute your workflows. You avoid vendor lock-in.
Track every step. Complete audit trails show who did what and when. You prove compliance and identify bottlenecks.
Own your workflows. Workflow definitions are text files you control. You migrate to new systems without rebuilding from scratch.
For Clients
Experience faster turnaround. Automated workflows eliminate manual handoffs. You get documents faster.
Provide information once. Structured data collection prevents redundant questions. You answer each question one time.
See transparent processes. You know exactly what information is needed and why. No surprises or hidden requirements.
For the Legal Industry
Enable interoperability. Different legal tech systems can share workflow definitions. You break down data silos.
Foster innovation. Open standards let anyone build conforming tools. Competition improves quality and reduces cost.
Democratize sophisticated workflows. Small firms access the same automation as large firms. You compete on legal expertise, not software budgets.
Foundation for AI assistance. Structured, validated documents let language models provide reliable assistance. You augment human expertise with machine intelligence.
Technical Architecture
File Format
Sagebrush™ Standards use markdown files with YAML front matter. The structure is:
---
code: unique_identifier
title: Document Title
description: Purpose of this workflow
respondent_type: org_and_person
flow:
BEGIN:
_: "first_question"
first_question:
_: "END"
alignment:
BEGIN:
_: "staff_review"
staff_review:
_: "END"
---
# Document Template
Dear {{client_name}},
Your {{service_type}} is confirmed...
Required fields are code, title, description, respondent_type, flow, and alignment. The validation system rejects files that omit required fields.
State Machine Structure
State machines define paths through questionnaires:
- BEGIN state - Entry point for every workflow
- Question states - Reference questions that exist in your database
- Transitions - Define what happens next based on answers
- END state - Terminal state when workflow completes
You use _ for unconditional transitions (always go to this next state) and answer values for conditional transitions (go to different states based on the answer).
The validation system ensures:
- BEGIN state exists
- At least one path reaches END
- No infinite loops
- No unreachable states
- All question references are valid
Variable Interpolation
Document templates use Liquid templating syntax. Variables appear in double curly braces: {{variable_name}}. You reference:
- Client data:
{{client_name}},{{organization_name}} - Question answers:
{{service_type}},{{start_date}} - Conditional sections:
{% if respondent_type == "org_and_person" %} This binds both organization and individual. {% endif %}
The validation system checks that all variables reference available data sources.
Validation System
Sagebrush™ Standards enforce strict validation:
YAML Validation
- Proper front matter delimiters (
---) - Valid YAML syntax
- All required fields present
- Field constraints met (title under 255 characters, respondent_type matches allowed values)
State Machine Validation
- BEGIN and END states exist
- All paths are reachable
- No infinite loops
- Question references exist in database
- Conditional transitions match valid answer values
Variable Validation
- All
{{variables}}in templates correspond to available data - Liquid syntax is properly formatted
- Filters are valid (
date,currency, etc.)
When validation fails, you receive specific error messages identifying the problem. You fix the issue and revalidate.
Implementation Standards
Legal Compliance Requirements
Jurisdiction: Use Nevada law and Washoe County when possible. This provides predictable legal interpretation and venue.
End Dates: Include explicit end dates for all agreements. Nevada courts favor definite terms.
Human Review: Implement staff review (alignment questionnaires) for quality control. Automated systems should augment, not replace, professional judgment.
Audit Trails: Maintain comprehensive logs of all actions. Track who answered what and when. Record all state transitions and document generations.
Technical Requirements
Liquid Templating: Use the Liquid templating engine for variable substitution. This provides proven, secure template processing.
PDF Support: Handle PDF form population and generation. Many legal documents require PDF output.
Markdown Support: Support markdown for document creation. Markdown provides clean, version-controllable source.
Cross-Platform: Ensure implementations work across operating systems and platforms.
APIs and Webhooks: Provide RESTful APIs for integration. Support webhooks for real-time notifications of status changes.
Quality Assurance
Comprehensive Validation: Validate all inputs—YAML structure, state machines, question references, variables. Catch errors before they affect users.
Clear Error Messages: When validation fails, explain what went wrong and how to fix it. Point to the specific line or field causing problems.
Thorough Testing: Test all workflows end-to-end. Verify that every path through the state machine works correctly.
Performance Optimization: Optimize for fast response times. Users should not wait for validation or document generation.
Example Notation
This simplified service agreement shows Sagebrush™ Standards in practice:
---
code: simple_service_agreement
title: Simple Service Agreement
description: Basic service agreement for consulting services
respondent_type: org_and_person
flow:
BEGIN:
_: "what_is_your_name__personal_name"
what_is_your_name__personal_name:
_: "what_is_service_type__text"
what_is_service_type__text:
_: "what_is_start_date__date"
what_is_start_date__date:
_: "END"
alignment:
BEGIN:
_: "staff_review__approve_reject"
staff_review__approve_reject:
"Approve": "END"
"Reject": "rejection_reason__text"
rejection_reason__text:
_: "END"
---
# Service Agreement
**Agreement Date**: {{agreement_date | date: "%B %d, %Y"}}
This Service Agreement ("Agreement") is entered into between:
**Client**: {{client_name}}
**Service Provider**: Sagebrush Services
## Services
The Service Provider agrees to provide {{service_type}} services
beginning on {{start_date | date: "%B %d, %Y"}}.
{% if respondent_type == "org_and_person" %}
This agreement binds both the organization and the individual signatory.
{% endif %}
## Terms
This agreement shall remain in effect until {{end_date | date: "%B %d, %Y"}}.
---
*Nothing in this document constitutes legal advice without a
valid signed retainer.*
The client completes three questions: name, service type, and start date. Staff reviews and either approves or rejects with a reason. Upon approval, the system generates a complete service agreement with all variables populated.
Why Open Standards Matter
Avoid Vendor Lock-In
You own your workflow definitions. The files are plain text that any conforming system can execute. You switch service providers without rewriting workflows from scratch.
Proprietary systems trap your processes behind their interfaces. Open standards set you free.
Enable Innovation
Anyone can build tools that conform to Sagebrush™ Standards. Competition drives quality improvements and cost reductions. You benefit from innovation across the entire ecosystem.
Closed systems stagnate. Open standards evolve through community contribution.
Foster Collaboration
You share workflow definitions with other organizations. Peer review improves quality. Best practices spread through the community.
Siloed systems prevent learning from others’ experience. Open standards create a knowledge commons.
Future-Proof Your Investment
Standards outlast any single implementation. Your workflows remain executable even if specific software products disappear. Text files never become obsolete.
Proprietary formats die with their creators. Open standards persist across generations.
Getting Started
For Organizations
Evaluate your needs. Identify repetitive legal workflows that consume staff time. Look for processes where you collect similar information repeatedly.
Review the specification. Read the complete technical specification to understand requirements and capabilities. Determine if Sagebrush™ Standards fit your workflow patterns.
Contact for guidance. Reach out for implementation assistance. We help you adopt standards in your practice and connect you with conforming service providers.
For Developers
Access the repository. The Sagebrush™ Standards repository on GitHub contains the complete specification and validation rules.
Study validation requirements. Understand what makes a notation valid. Review state machine validation, variable checking, and YAML structure requirements.
Build conforming tools. Create software that executes Sagebrush™ Standards workflows. Join the ecosystem of interoperable legal tech.
For Legal Professionals
Understand computable documents. Learn how structured workflows differ from traditional documents. See how questionnaires, review processes, and templates combine into complete systems.
Explore example notations. Review notations for common legal workflows. Understand how your practice areas map to the Sagebrush™ Standards structure.
Consider adoption. Evaluate whether standardized workflows would improve your practice. Assess time savings from automation and consistency improvements from validation.
Contact and Resources
Technical Support: [email protected]
GitHub Repository: github.com/neon-law-foundation/SagebrushStandards
General Inquiries: [email protected]
Legal Notice: Nothing in this document constitutes legal advice without a valid signed retainer. Sagebrush™ Standards is a technical specification, not legal counsel. The Neon Law Foundation maintains these standards as an open resource for the legal industry.
Sagebrush™ is a trademark of the Neon Law Foundation. The Sagebrush™ Standards specification is open and freely implementable by anyone.