OpenWorkDocs is an open-source document generation system for creating customizable company documents including policies, standard operating procedures (SOPs), and guidelines from modular templates.
This repository provides a framework to generate company documents using:
- Modular document components that can be assembled based on your needs
- Industry-specific modules - set
industry: "law"and get comprehensive law firm documentation automatically! - Configuration-based customization without requiring code modifications
- Jinja2 templating for dynamic content based on company variables
- Comprehensive testing to ensure document integrity
- One-Click Industry Setup: Specify your industry and get specialized documents automatically
- Fully Customizable: Every document uses your company variables and terminology
- Professional Quality: Documents rival those created by expensive consultants
- Version Controlled: Track changes and maintain document history
- Extensible: Easy to add new industries and modules
industry: "law"Generates: 13 documents including ethics compliance, client intake procedures, billing policies, case management, risk management, and more - all customized for your law firm!
- Python 3.7 or higher
- pip (Python package installer)
- Clone the repository:
git clone https://github.com/yourusername/OpenWorkDocs.git
cd OpenWorkDocs- Create a virtual environment (recommended):
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Create your company configuration file (or modify the example):
cp templates/company_config.yaml my_company_config.yaml- Edit
my_company_config.yamlwith your company details. For industry-specific docs, just add one line:
industry: "law" # Automatically includes all law firm documents!- Generate your documents:
python templates/generate.py --config my_company_config.yaml --output my_docs- Find your generated documents in the
my_docsdirectory
Example Result: With industry: "law", you'll get 13 documents including client intake procedures, ethics compliance, billing policies, and more!
python templates/generate.py --help
Available options:
--config: Path to company configuration file (required)--output: Directory to write generated documents (default: 'output')--modules-dir: Directory containing document modules (default: 'modules')--debug: Enable debug logging--validate-only: Validate templates without generating documents
The configuration file controls which documents are generated and what variables are used in templates:
# Company variables for template substitution
variables:
company_name: "Acme Tech"
hr_contact_email: "hr@acme-tech.com"
last_updated: "February 15, 2024"
remote_work: true
open_source_participation: true
# Industry selection (optional) - automatically includes industry-specific policies
# When you set industry: "law", ALL law documents are automatically generated!
industry: "law"
# Policies to generate and their constituent modules
policies:
code_of_conduct:
- base
- tech_company
benefits:
- base
- health_insurance
- financial_benefitsThe industry feature automatically includes specialized documents for your industry:
Example: Setting industry: "law" generates these additional documents:
client_intake_procedures.md- Client onboarding and conflict checkingattorney_ethics_compliance.md- Professional responsibility and bar rulesbilling_time_tracking.md- Legal billing and IOLTA compliancedocument_management.md- Document security and e-discoverycase_management.md- Case planning and trial preparationclient_communication.md- Client interaction standardsrisk_management.md- Malpractice prevention and compliance
Result: 6 general policies + 7 industry-specific documents = 13 total customized documents!
For fine-tuned control, you can override industry defaults:
# Override which industry modules are included
industry_policies:
law:
- client_intake_procedures
- attorney_ethics_compliance
# Only include specific modulesEach policy type has multiple modules that can be included:
- code_of_conduct: base, tech_company, us_specific
- benefits: base, health_insurance, financial_benefits, time_off, workplace_perks
- dress_code: base, executive_leadership
- remote_work: base, communication, home_office, security, work_life_balance
- recruitment: base, job_posting_templates, interview_process, background_checks, offer_letters
- performance_management: base, goal_setting, performance_reviews, development_plans, performance_improvement
OpenWorkDocs supports industry-specific policy modules that are automatically included when you specify your industry in the configuration. Simply set industry: "law" and all relevant documents are generated!
- law ✅: client_intake_procedures, attorney_ethics_compliance, billing_time_tracking, document_management, case_management, client_communication, risk_management
- healthcare (coming soon): hipaa_compliance, patient_privacy, clinical_procedures, medical_ethics, healthcare_risk_management
- finance (coming soon): regulatory_compliance, client_data_protection, anti_money_laundering, trading_policies
- technology (coming soon): open_source_policy, ip_assignment, software_development, data_privacy
- education (coming soon): student_privacy, academic_integrity, campus_safety, educational_ethics
- manufacturing (coming soon): workplace_safety, quality_control, environmental_compliance, supply_chain
- retail (coming soon): customer_service, inventory_management, loss_prevention, sales_ethics
To validate templates without generating documents:
python templates/validate_templates.pyor
python templates/generate.py --validate-onlyRun the test suite:
./tests/run_tests.shOr run specific test components:
make validate # Validate template syntax
make test # Run unit tests
make coverage # Generate test coverage reportOpenWorkDocs/
├── modules/ # Document module templates
│ ├── benefits/ # Benefits policy modules
│ ├── code_of_conduct/ # Code of conduct modules
│ ├── dress_code/ # Dress code modules
│ └── remote_work/ # Remote work policy modules
├── templates/ # Generation and utility scripts
├── tests/ # Test files and fixtures
└── my_docs/ # Generated documents (default output)
Contributions are welcome! To contribute:
- Ensure your templates validate with the validation tool
- Run the test suite to ensure everything works
- Follow Jinja2 best practices for template creation
This project is licensed under [INSERT LICENSE] - see the LICENSE file for details.
- Built with Jinja2 templating engine
- Inspired by the need for customizable, reusable company documentation