Engineering training guide

WealthCounsel 2 document production engine

A policy-driven, evidence-producing workflow that turns an authenticated attorney instruction for one exact matter into verified WealthCounsel documents—without quietly crossing into filing, signing, delivery, or client communication.

01 · Mental model

It is a compiler and a custody chain, not a document generator

WealthCounsel remains the authoritative legal-document generator for supported real matters. The repository decides what is authorized, translates source facts and attorney intent into a controlled execution plan, preserves artifact lineage, and proves what happened.

1. Compile the command

Resolve exact matter identity, package subjects, route, jurisdiction, and one production stage. The output is a fingerprinted intent receipt, not an informal guess.

2. Execute through gates

Operate WealthCounsel inside the authorized scope, preserve raw sources, finish exact working copies in licensed Word, and require evidence at each transition.

3. Seal and stop

Assemble the registered package, run technical and semantic QA, optionally upload the authorized files, read them back, and stop before downstream release actions.

Draft stage

Generate the best authorized draft, then make uncertainty reviewable

Incomplete facts or an unsupported route do not automatically stop an authorized draft. Provisional choices go into the running Draft Assumption and Review Note, and the output remains visibly draft-only.

Default boundary: sealed draft package; upload only when the command includes upload authority.

02 · How attorneys communicate with the engine

The instruction is the first production artifact

The engine accepts ordinary language—there is no magic command syntax—but an authenticated instruction from Greg Van Horn or an authorized firm attorney must bind one exact matter, communicate draft versus final, and make the intended terminal action clear. Upload is never inferred.

MINIMUM TO START

Communicate identity, stage, and scope

  • Matter: name and exact Lawmatics matter ID when practical
  • Stage: say draft or final explicitly
  • Subjects: identify who receives a package; a couple/family direction includes every clearly identified subject unless excluded
  • Route and jurisdiction: state them when known; direct attorney language has the highest route authority
  • Terminal action: create, download only, complete and file, produce finals, rework, or selected-file upload
  • Final signing dates: one explicit date for every final-package subject
ENGINE RESPONSE

Notify, bind, and continue

The engine may echo the exact matter, subjects, route, stage, assumptions, terminal action, and stop boundary. That declarative acknowledgement is notify-and-continue, not a second approval checkpoint.

Focused questions are appropriate for unresolved identity, conflicting stage, missing final signing dates, or a true technical hard stop. When drafting is authorized and the attorney says to proceed through incomplete substantive facts, the engine records provisional choices in the Draft Assumption and Review Note and continues.

Recommended kickoff pattern

This structure improves precision, but natural language is valid whenever it communicates the same facts unambiguously.

Matter: <matter name and exact matter ID when available>
Stage: <draft | final>
Package subjects: <person or people receiving packages>
Route / jurisdiction: <document family and state, if known>
Matter-specific direction: <choices, exclusions, or corrections>
Signing date: <one explicit date per final subject; final only>
Terminal action: <create only | download only | complete draft package and file |
                  produce finals | produce and file finals | selected-file upload>
Stop boundary: <optional explicit narrower stop>
DRAFT · NO FILING

Create review-ready drafts

A named-matter drafting instruction authorizes the WealthCounsel work needed to produce the requested draft set. It does not authorize upload or release.

Create draft documents for <matter>. Use the <route/family> package in <jurisdiction> for <subjects>. Record every provisional choice and stop before Lawmatics upload.
DRAFT · FULL DPC

Complete and file the draft package

“Download the docs” is a composite command. It means preserve sources, finish in Word/Ribbon, assemble, watermark, QA, upload the registered draft set, read it back, and stop at DPC-110.

Download the docs for <matter>.
SOURCE ONLY

Download without processing or filing

Use the qualifier only. This preserves and hashes the raw WealthCounsel DOCX files, then stops at DPC-20.

Download only for <matter>. Stop before editing, Word finishing, PDF assembly, watermarking, or upload.
FINAL · NO FILING

Produce sealed final deliverables

A final request requires an approved exact final profile and one confirmed signing date per subject. Plain “produce finals” stops at FPC-90.

Produce final documents for <matter> using the attorney-reviewed <route/family> documents in <jurisdiction>. Subjects: <subjects>. Signing date: <date per subject>. Do not upload.
FINAL · FILE IN LAWMATICS

Produce and upload finals

Explicit upload language extends the final loop through FPC-100 and FPC-110. The files still go only to the exact Lawmatics matter Files section.

Produce and upload the finals for <matter>. Route: <route/family and jurisdiction>. Subjects and signing dates: <subject/date pairs>. Upload the registered final set and stop after readback.
REWORK OR SELECTED FILES

Say what changes—and what happens next

The attorney does not need to name Class A–D. Identify the correction, affected subject/documents, and terminal action. A narrow upload should name the exact files.

For <matter>, change <current value> to <correct value> for <subject/documents>, then regenerate and re-download. Upload the replacement package only if expressly requested.

Or: Upload only <exact files> to <exact matter> and stop after readback.
Attorney languageEngine meaningDefault stop
“Create draft documents”Draft authority and matter-scoped production; no inferred uploadBefore Lawmatics upload
“Download the docs”Full Draft Package Completion Loop, including registered filingDPC-110 after upload readback
“Download only”Preserve and hash WealthCounsel source DOCX filesDPC-20
“Produce finals”Final Package Completion through sealed deliverablesFPC-90
“Produce and upload the finals”Final Package Completion plus explicit Lawmatics filingFPC-110
“Fix / change / redo / re-download”Compile sealed rework Class A–D, invalidate stale evidence, then perform the named terminal actionExact boundary in the correction receipt
“Upload only <files>”Exact selected-file upload; no companion files impliedAfter duplicate check and readback

Never bundled into document-production language

WealthCounsel Finalize, Ready for Signing, signature requests, delivery, Lawmatics stage changes, billing, portal actions, recording, and client communication require their own matter-specific authority. “Produce and upload finals” still does not authorize any of them.

Canonical communication owners: draft authority, final authority, stage policy, draft completion, and final completion.

03 · End-to-end lifecycle

The production run, from instruction to verified stop

The exact handlers differ by route and stage, but this control flow is the stable backbone.

Verify the execution lane

Run npm run verify:handoff. A real matter additionally requires a clean main checkout matching origin/main and a persisted certified-mainline receipt.

Compile the attorney communication

Bind the authenticated instruction to the exact Lawmatics matter, package subjects, stage, route, terminal action, upload scope, and stop boundary. Keep workflow authority separate from execution capability and credential availability.

Compile route intent

Source precedence is direct instruction → reviewed plan → attorney note. Paid-service metadata and questionnaires support the decision but cannot independently create a trust-bearing route.

Compile production stage

Resolve exactly one of draft or final. That decision binds the workflow, output set, assembly profile, source mode, watermark rule, and QA obligations.

Build the canonical graph

Normalize matter, people, roles, fiduciaries, beneficiaries, contacts, jurisdiction, and source facts. Surface conflicts. Record every provisional choice in the running review note.

Bind the family contract and manifest

Load one Layer 2 family contract, choose its exact route variant, and expand it into a versioned per-subject component manifest. Spouse and client data remain isolated.

Operate WealthCounsel

Verify the practice, reuse or create contacts duplicate-safely, select only approved parent answer sets, enter and read back controls, generate, and preserve the exact source set.

Preserve raw bytes and create job copies

Raw DOCX files are immutable evidence. All cleanup and finishing happens on exact, isolated, job-owned copies with hashes linking source to output.

Complete Word and Ribbon finishing

Open each job copy in licensed Microsoft Word, run the WealthCounsel Ribbon contract, save, close, reopen, then prove zero unresolved cross-references, processing instructions, repair prompts, and visible artifacts.

Export, assemble, and QA

Convert verified DOCX files independently, remove only structurally proven blank pages, assemble the registered order, apply a draft watermark only when required, and run technical plus route-semantic QA.

Seal the exact deliverable manifest

The manifest binds every selected artifact to its subject, source lineage, post-Word hash, assembly evidence, QA results, and stage-specific output set.

Optionally file, read back, and stop

When explicitly authorized, upload duplicate-safely to the exact Lawmatics matter Files surface, immediately verify remote identity and content, issue the receipt, classify learnings, and stop.

04 · Architecture

One source per question, with executable enforcement

The repository deliberately separates authority from how-to guidance and implementation. This prevents a helpful skill, old test, or historical note from silently becoming production policy.

Layer 1
Firm-wide rules

Policies and registries answer questions true for every document: authority, stages, route support, upload destination, Word finishing, output sets, watermark, QA, and stop gates.

policies/
registries/
registries/control-plane.json

Layer 2
Family contracts

Exactly one family contract defines the route-specific variants, client shape, confirmed component membership, candidate components, and release-manifest eligibility.

contracts/families/<familyId>.json

Skills
Operator how-to

Skills explain how to perform a route or platform task. They link to policy and family sources; they are not a second authority or status layer.

skills/wealth-counsel-engine/
SKILL-INDEX.md

Engine
Executable runtime

JavaScript modules compile intent, enforce receipts, orchestrate resumable steps, manage locks and leases, validate evidence, and invoke purpose-built adapters.

engine/
scripts/

External systems
Authoritative surfaces

Lawmatics supplies matter-scoped facts and the final Files destination. WealthCounsel generates the legal documents. Licensed Word and the WealthCounsel Ribbon materialize and verify production DOCX files.

Lawmatics · WealthCounsel · Microsoft Word

Why the receipts matter

A receipt is a tamper-evident contract between steps. It carries the exact policy fingerprint, matter and subject bindings, artifact hashes, and decision inputs. If a parent artifact or policy changes, downstream evidence becomes stale instead of being silently reused.

05 · Stage-specific completion loops

Draft and final are separate workflows

They share the same mandatory Word/Ribbon finishing contract, but they do not share source assumptions, assembly profiles, output sets, or watermark behavior. “Download the docs” invokes the full draft loop; “download only” stops at DPC-20. “Produce finals” stops at FPC-90; final filing requires explicit upload language.

Draft Package Completion

DPC-10 through DPC-110

DRAFT
  1. DPC-10Resolve exact matter, clients, and package subjects.
  2. DPC-20Download, preserve, and hash WealthCounsel sources.
  3. DPC-30Apply only registered non-substantive edits on working copies.
  4. DPC-40Complete licensed Word and WealthCounsel Ribbon finishing.
  5. DPC-50Save, close, reopen, and run post-Word QA.
  6. DPC-60Export PDFs and remove only proven blank pages.
  7. DPC-70Assemble the registered draft package order.
  8. DPC-80Retain the sealed base; create the separately watermarked combined draft.
  9. DPC-90Run technical and semantic QA; seal the upload manifest.
  10. DPC-100When authorized, upload exact finished deliverables to Lawmatics.
  11. DPC-110Read back every remote file, issue the receipt, and stop.

Final Package Completion

FPC-10 through FPC-110

NO WATERMARK
  1. FPC-10Bind final stage, exact subjects, route profile, and confirmed signing dates.
  2. FPC-20Populate/read back date controls, prove source freshness, preserve and hash.
  3. FPC-30Apply registered deterministic processing to final-labeled copies.
  4. FPC-40Complete the same licensed Word and Ribbon sequence.
  5. FPC-50Reopen and run final-stage identity, date, TOC, notary, and artifact QA.
  6. FPC-60Export PDFs and remove only structurally proven blank pages.
  7. FPC-70Assemble the exact approved final page/component order.
  8. FPC-80Prove all dates, inserts, page order, and zero watermark.
  9. FPC-90Seal finished DOCX files and one unwatermarked final PDF per subject.
  10. FPC-100Only when separately authorized, upload the exact final set or requested subset.
  11. FPC-110Read back final files, issue the filing receipt, and stop.

The shared non-negotiable Word gate

Every production DOCX—draft or final—must be an exact job-owned copy processed in an isolated licensed Word session with the WealthCounsel Ribbon, then saved, closed, reopened, and audited. Raw WealthCounsel DOCX files are preserved as source evidence but are never uploaded as production deliverables.

06 · Evidence and artifact lineage

Every artifact has parents, hashes, and a purpose

The engine does not treat “the document” as one mutable file. It carries a chain of distinct artifacts so source preservation, deterministic processing, and release evidence remain independently auditable.

Source factsLawmatics, instruction, attorney plan, exact source IDs
Intent receiptsMatter, route, stage, family, jurisdiction, manifest
Raw DOCXUntouched WealthCounsel evidence with SHA-256
Job copyIsolated working copy plus approved cleanup receipt
Finished DOCXWord/Ribbon receipt bound to post-Word bytes
Component PDFIndependent export and blank-page lineage
Package + readbackAssembly, QA, optional upload, remote identity and content proof

Technical QA proves

  • OPC/CRC validity and no Word repair prompt
  • Zero unresolved cross-references or processing instructions
  • Correct headings, TOCs, notary punctuation, tabs, and visible artifacts
  • Page geometry, rotation, decoded content, blank-page classification, and watermark coverage
  • Exact hashes and byte lengths at every controlled transition

Semantic QA proves

  • The generated operative-document family matches route intent
  • Component membership matches the family contract and manifest
  • Package subjects are not mixed or swapped
  • Required facts such as citizenship, county, fiduciaries, and signing date appear where expected
  • The upload list is the exact set authorized—not a convenient approximation

07 · Safety and stop semantics

Know what continues, what holds, and what truly stops

The engine distinguishes uncertainty that should be made reviewable from technical or identity conditions that make reliable production unsafe.

CONTINUE AS DRAFT

Review-note issues

  • Missing or conflicting matter facts
  • Incomplete reviewed plan or manifest
  • Unsupported route or jurisdiction variant
  • Missing exact historical reference
  • Provisional defaults, placeholders, or fallback drafting source
  • Failed substantive comparison that does not prevent creation of a useful draft

Every provisional decision records basis, confidence, affected documents/sections, and the attorney action needed.

HARD STOP

Unsafe or unauthorized execution

  • Wrong or unresolvable matter/practice identity
  • Stale or unsafe authenticated session
  • MFA, CAPTCHA, account recovery, password change, or unavailable secure credentials
  • Destructive or unrelated-record scope
  • Revoked remote permission
  • Technical failure preventing reliable creation, preservation, finishing, or readback
  • Real matter running from anything other than certified clean main
REPO TEST

Node verifies the repository

Fake people, synthetic adapters, no WealthCounsel. npm test and verify:handoff prove code and policy invariants.

It does not decide whether an authorized live run may start.

FIRM TEST

Real WealthCounsel, fake clients

Used to prove live UI and document behavior without a client matter. Identity and session safety still matter.

REAL MATTER

Named client and authenticated instruction

Starts only from certified production mainline. Authorized drafting proceeds through uncertainty; true hard stops and downstream gates remain intact.

Always separately gated

WealthCounsel Finalize, Ready for Signing, signature request, delivery, stage change, billing, portal action, recording, and client communication. Producing drafts, producing finals, or uploading files does not imply any of these.

08 · Rework

Corrections compile before documents change

Once generation has begun, ordinary attorney language such as “fix,” “change,” “redo,” or “re-download” is not a new first draft. The attorney should identify the target, correction, affected subject/documents, and intended terminal action; the engine then seals one edit class so it knows what evidence to invalidate and where the completion loop may resume.

A

Substantive correction

Wrong executor, shares, ages, powers, legal language, scenario, or package membership.

Path: return to exact WealthCounsel parent answer sets, regenerate, invalidate seals, and start fresh at DPC-20 for reissue.

B

Approved cleanup

Only allowlisted, non-substantive formatting or spacing corrections.

Path: preserve raw source, mutate isolated working copies, repeat Word/Ribbon and post-Word QA.

C

Assembly or filing only

Rebuild order, redo draft watermark, or re-upload selected valid finished files.

Path: verify parent hashes, then resume at the earliest still-valid assembly or upload step.

D

Identity or binding correction

Wrong person, spouse swap, client binding, or answer set tied to the wrong subject.

Path: issue an identity event, invalidate downstream evidence, then run the Class A regeneration path.

09 · Route envelope

Route status is a registry lookup, not a memory test

Always read registries/route-support.json at runtime. The table below is a training snapshot of the registry’s 2026-08-26 state, not a substitute for the canonical file.

RouteFamilyDraft statusOperational meaning
simple-will-individualSimple WillSupported with accepted exceptionControlled, matter-specific production; surface the registered DPA exception in review.
simple-will-coupleSimple WillPending production validationAttorney-authorized drafting only; New Jersey is the default registered variant.
testamentary-trust-individualTestamentary Trust WillPending production validationAttorney-authorized drafting; exact final profile exists for the registered New Jersey individual route.
testamentary-trust-coupleTestamentary Trust WillPending production validationAttorney-authorized drafting; Connecticut remains a provisional draft variant with its own final-processing profile.
revocable-living-trust-individualRevocable Living TrustPending production validationAttorney-authorized drafting; finals require a current-source freshness decision and new unwatermarked assembly.
mapt-jointMedicaid Asset Protection TrustPending production validationAttorney-authorized drafting; matter-specific substantive choices remain essential.
mapt-individualMedicaid Asset Protection TrustPending production validationAttorney-authorized drafting; tested examples are not firm-wide substantive defaults.
college-young-adultCollege / Young AdultPending production validationAttorney-authorized drafting inside the registered three-document envelope.
deed-transferDeed and Property TransferProduction prohibitedContract-mapped future-state lane; source packet, route, jurisdiction, and package remain unresolved.

Final-stage rule

A supported draft route does not imply final support. Final production requires an explicitly approved route-and-jurisdiction profile, exact historical reference, signing-date evidence, current WealthCounsel source rules, the final output set, and the full FPC evidence seal. There is no generic final fallback.

10 · Engineering code map

Where the important decisions execute

Start from the policy or registry that owns the question, then follow the control plane to its enforcing engine module.

engine/route-intent.js

Ranks source authority, prevents trust escalation from metadata, selects the family/route, and binds the family manifest.

engine/document-production-intent.js

Compiles exactly one stage and binds its workflow, output set, watermark, final profile, and downstream false flags.

engine/family-contracts.js

Loads the single Layer 2 family contract and resolves the exact client-shape variant and component status.

engine/production-wealthcounsel.js

Runs the guarded live WealthCounsel sequence: source/form binding, identity checks, contacts, parent entries, interview controls, generation, and download.

engine/draft-package-completion-executor.js

Executes resumable DPC-10 through DPC-110 handlers with step evidence and sealed manifests.

engine/final-package-completion-executor.js

Executes the final-stage handler contract and refuses draft-executor or generic-profile fallback.

engine/draft-correction-intent.js

Compiles natural-language rework into Class A–D receipts, invalidations, and the permitted resume point.

engine/word-ribbon-finishing.js

Validates the universal production DOCX finishing receipt and its exact post-Word hash binding.

engine/firm-document-assembly.js

Resolves registered draft/final views, component/page order, insert membership, and assembly constraints.

engine/lawmatics-client-files-policy.js

Validates exact file selection, Word receipts, stage evidence, matter Files destination, idempotency, and readback.

scripts/run-production-wealthcounsel.js

Production entry point for one absolute private job JSON and one external verified live runtime module.

npm run verify:handoff

Runs the repository-wide contract suite: family projections, tests, security, policies, production workflow, support registry, and source gates.

11 · Team training checklist

What an engineer should be able to explain

  • Why verify:handoff proves the repo but does not authorize a live write
  • How an attorney communicates matter, stage, subjects, signing dates, terminal action, and upload scope—and why “download the docs” differs from “download only”
  • How route intent and production stage become separate fingerprinted receipts
  • Why the family contract is Layer 2 and skills are never authority
  • Why WealthCounsel generates legal text while the engine controls lineage, processing, packaging, and QA
  • Why raw, working, finished, component-PDF, combined-PDF, and remote artifacts must remain distinct
  • Why every production DOCX must pass the isolated Word/Ribbon gate
  • How DPC differs from FPC and why final is not “draft minus watermark”
  • How Class A–D rework prevents local improvisation and stale-artifact reuse
  • Why Lawmatics uploads target Matter + exact matter ID and require immediate readback
  • Which downstream actions are always outside document production authority