Document generation

From hvkshetry/StewardOS · View interactive version

Document generation is an AI agent skill from the GitHub repository hvkshetry/StewardOS. Generate estate planning documents using python-docx and Jinja2 templates. Covers trust amendments, LLC agreements, powers of attorney, and other estate documents. Generated docs are uploaded to Paperless-ngx.

How to use this skill

Skill file

Document Generation

Approach

Use python-docx + Jinja2 templates stored in ~/personal/servers/estate-planning-mcp/templates/.

This is more flexible than Docassemble for family office documents that require

customization per entity and jurisdiction.

Tool Routing

Template Types

| Template | Use Case | Key Variables |

|----------|----------|---------------|

| trust-amendment | Modify trust provisions | trust_name, amendment_number, changes, effective_date |

| llc-operating-agreement | New LLC formation | llc_name, members, percentages, jurisdiction, manager |

| power-of-attorney | Grant POA | principal, agent, scope, jurisdiction, effective_date |

| certificate-of-trust | Prove trust existence | trust_name, trustee, formation_date, jurisdiction |

| assignment-of-assets | Transfer assets to entity | asset_description, from_party, to_entity, date |

| beneficiary-designation | Designate beneficiaries | account, primary_beneficiary, contingent, percentages |

Generation Workflow

Step 1: Gather Data from Estate Graph

Query estate-planning for:

Step 2: Select Template

Match the document need to a template. If no template exists:

Step 3: Fill Template Variables

Map estate-planning data to template variables:

Step 4: Generate Document

Execute python-docx code to render the template with variables.

Apply formatting:

Step 5: Upload to Paperless-ngx

Via paperless tools:

  1. Upload the generated .docx as a new document
  2. Title: [Doc Type] - [Entity Name] - YYYY-MM-DD
  3. Tags: legal, appropriate secondary tags
  4. Correspondent: The entity or attorney
  5. Link in estate-planning: link_document (or upsert_document_metadata) to associate with entity/asset

Output Contract

Return:

Important Constraints

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.