MARK GARASLEGAL AI & SOFTWARE

Legal ↔ Technical / Architecture map

Deal Wind Tunnel

Compare modeled contract packages, inspect their consequences and save a planning decision that can be checked against its original run.

Workflow SVG ↓Project case study ↗

Current workflow review / 31 October 2026

All 40 tests passed on 31 October 2026. Four fresh synthetic runs each evaluated 160 packages and retained five alternatives. A planning receipt verified against its own run and was refused against a different run. The earlier study in which a simpler method performed better remains in the research record.

Read the updated case study ↗Current verification record ↓
The map below describes its original snapshot. The note above covers later fixes and checks; older results below still belong to the earlier version.

01 / Workflow

How the work moves through the system.

Read from left to right. Open a step to see why it matters, how it works, and where to find the code.

Process or decisionEvidence or data exchange

01Documents & context

implemented

Supply annotated sources and negotiation goal

The user provides annotated source text and a negotiation goal. Original assertions are saved so modeled terms can be traced to their stated sources.

Legal ↔ Technical
Legal purpose

A document marker is not authentication or legal interpretation.

How it works

Supported local containers, explicit field grammar and source hashes.

  • wind_tunnel/context.py:17documents_from_paths
  • wind_tunnel/context.py:42parse_document

02Application & processing

implemented

Resolve source conflicts and assumptions

The parser and context builder handle supported rules for one field replacing another. Missing or conflicting inputs block the search.

Legal ↔ Technical
Legal purpose

Unknown material operating facts are not silently filled with zero.

How it works

Reconstructed context, active value provenance, ready state and conflict records.

  • wind_tunnel/context.py:95build_context
  • wind_tunnel/context.py:153verify_context
implemented

Explore coherent package alternatives

Once sources and preferences pass their checks, the search explores coherent packages within its limits. It uses the same evaluator and records each candidate’s lineage and spent evaluation attempts.

Legal ↔ Technical
Legal purpose

Search operates within a declared commercial model rather than drafting arbitrary clauses.

How it works

Evolutionary or simpler multistart search with reproducible seed, finite domains and review budget.

  • wind_tunnel/search.py:99run
  • wind_tunnel/model.py:15Package
implemented

Reconcile scenario consequences

Deterministic calculations and a separate arithmetic reconstruction check cash and operational consequences. Hypothetical supplier assumptions remain separately identified.

Legal ↔ Technical
Legal purpose

Exact arithmetic validates a declared model, not its assumptions or legal sufficiency.

How it works

Scenario simulation, independent checks, hard cash/shortfall gates and profile compatibility.

  • wind_tunnel/evaluate.py:162evaluate
  • wind_tunnel/evaluate.py:77independent_check
  • wind_tunnel/evaluate.py:116supplier_assessment

03Review & decisions

implemented

Confirm supported preferences

The user explicitly confirms priorities and hard limits. Inferred preferences alone cannot authorize a package search.

Legal ↔ Technical
Legal purpose

A proposed preference is distinct from confirmed decision criteria.

How it works

Transparent cue parser, editable finite priorities and explicit confirmation validation.

  • wind_tunnel/preferences.py:13infer
  • wind_tunnel/preferences.py:70confirm
  • wind_tunnel/preferences.py:80validate
implemented

Record a local planning decision

A reviewer can select, defer or reject a shortlisted package with a reason. The workflow replays its checks and ties the decision to that exact run; it does not send an offer.

Legal ↔ Technical
Legal purpose

Selection is a planning note; it is not contract assent or professional approval.

How it works

Current package replay, hard-failure selection gate and a reasoned local receipt.

  • wind_tunnel/review.py:48record_review
  • wind_tunnel/review.py:24current_package

04Records & handoff

implemented

Inspect a frozen shortlist

The local report presents a fixed shortlist of complete packages. Source context, tradeoffs and unknowns stay beside each alternative.

Legal ↔ Technical
Legal purpose

No shortlist result is represented as an offer or acceptance probability.

How it works

Checksum-bound run bundle, complete package details and at most the configured review shortlist.

  • wind_tunnel/search.py:76shortlist
  • wind_tunnel/output.py:44save_bundle
  • wind_tunnel/output.py:80render_bundle
implemented

Verify or reopen the planning record

Verification checks the saved decision’s run and implementation links. A counteroffer or changed preference starts a separate calculation and cannot inherit the earlier decision.

Legal ↔ Technical
Legal purpose

Changed context requires renewed consideration.

How it works

Receipt checksum/bindings plus append-only output directories and same-package update comparisons.

  • wind_tunnel/review.py:68verify_review
  • wind_tunnel/experiments.py:33update_run
Read the connections as a list
  • Supply annotated sources and negotiation goal → Resolve source conflicts and assumptionsParsed source assertions
  • Resolve source conflicts and assumptions → Confirm supported preferencesReady context
  • Confirm supported preferences → Explore coherent package alternativesConfirmed criteria
  • Explore coherent package alternatives → Reconcile scenario consequencesWhole packages
  • Resolve source conflicts and assumptions ⇢ Reconcile scenario consequencesOperating and source assumptions
  • Reconcile scenario consequences → Inspect a frozen shortlistEligible results
  • Inspect a frozen shortlist → Record a local planning decisionHuman inspection
  • Record a local planning decision → Verify or reopen the planning recordBound review record
  • Verify or reopen the planning record ⇢ Resolve source conflicts and assumptionsNew counteroffer or preferences
  • Inspect a frozen shortlist ⇢ Verify or reopen the planning recordExact saved run

02 / Implementation traces

Follow an action into the code.

10 grouped traces. The model and retrieval entries show which integrations run, which use local rules, and which are only configured.

implemented

Guided wizard and repeated updates

Work from a stated goal through confirmed criteria, sources and revised negotiation context.

Interface / command
wind_tunnel/__main__.py:wizard / interactive_preferences
Call
python -m wind_tunnel wizard → execute or update_run
Service / backend
wind_tunnel/__main__.py:execute; experiments.py:update_run
Rules & validation
The user explicitly confirms priorities/limits; source conflicts block search. Repeated update/preferences actions create fresh round folders; a local browser opening is a convenience, not a server or transaction.
Model / provider
none; transparent cue parser is deterministic
Prompt
none
Retrieval / sources
none
Persistence
Fresh guided timestamp folder with per-round context, run and HTML files
Review & permissions
User types confirm before criteria are used. Further legal/commercial review remains external.
Output
Conditional alternatives and preserved per-round reports.
  • wind_tunnel/__main__.py:87wizard
  • wind_tunnel/__main__.py:67interactive_preferences
  • wind_tunnel/__main__.py:35execute
  • wind_tunnel/experiments.py:33update_run
implemented

Preferences proposal and explicit confirmation commands

Separate interpretation of a goal from authorization to apply hard limits.

Interface / command
wind_tunnel/__main__.py:main
Call
python -m wind_tunnel preferences / confirm → infer / confirm
Service / backend
wind_tunnel/preferences.py:infer / confirm / validate
Rules & validation
Recognize limited cues, preserve ambiguous/general prose, prohibit inferred numeric weights, and require supported unique priorities plus bounded integer limits.
Model / provider
none
Prompt
none
Retrieval / sources
none
Persistence
New preferences JSON file with original prompt, proposed fields or confirmation and parent revision
Review & permissions
Nonempty actor label records explicit field review; it is not an authenticated legal signature.
Output
Proposed or confirmed preference revision.
  • wind_tunnel/__main__.py:125main
  • wind_tunnel/preferences.py:13infer
  • wind_tunnel/preferences.py:70confirm
  • wind_tunnel/preferences.py:80validate
implemented

Run command and modelled search

Compare coherent commercial packages under stated assumptions and hard constraints.

Interface / command
wind_tunnel/__main__.py:main / execute
Call
python -m wind_tunnel run → execute → search.run → evaluate
Service / backend
wind_tunnel/context.py:build_context; search.py:run; evaluate.py:evaluate
Rules & validation
Validate current context, confirmed preferences and finite scenarios/profiles before searching. Record spent attempts before evaluation; deterministic and independent arithmetic checks govern eligibility, not a blended legal score.
Model / provider
none
Prompt
none
Retrieval / sources
none
Persistence
New context.json, manifest.json, attempts.jsonl, run.json, index.html, complete.json
Review & permissions
Hard gates cannot be offset by a better objective. Hypothetical profile fit does not authorize acceptance.
Output
Five-option-or-smaller review shortlist and traceable alternatives.
  • wind_tunnel/__main__.py:35execute
  • wind_tunnel/search.py:99run
  • wind_tunnel/evaluate.py:162evaluate
  • wind_tunnel/output.py:33event_writer
  • wind_tunnel/output.py:44save_bundle
implemented

Update command and same-package comparison

Reconsider a saved negotiation when an annotated counteroffer or confirmed preference changes.

Interface / command
wind_tunnel/__main__.py:main
Call
python -m wind_tunnel update → read_bundle → update_run
Service / backend
wind_tunnel/experiments.py:update_run
Rules & validation
Verify prior bundle checksum, rebuild context from retained sources plus explicit additions, re-evaluate previous packages, then search with warm packages. Report input-driven changes separately from shortlist churn.
Model / provider
none
Prompt
none
Retrieval / sources
none
Persistence
Fresh run folder; update block carries previous checksum, source/preference differences and same-package results
Review & permissions
Conflicting/missing context refuses. Old review receipts remain bound to the previous run.
Output
New alternatives and an inspectable update report.
  • wind_tunnel/output.py:54read_bundle
  • wind_tunnel/experiments.py:33update_run
  • wind_tunnel/context.py:166changes
implemented

Planning review command and local decision report

Retain which package was selected for further review, deferred or rejected and why.

Interface / command
wind_tunnel/__main__.py:main; review.py:record_review generated HTML
Call
python -m wind_tunnel review → record_review → current_package
Service / backend
wind_tunnel/review.py:record_review / current_package / bindings
Rules & validation
Verify bundle and reconstructed context, validate inputs, replay every evaluator field and reject drift. Search-lineage fields remain distinct. A select decision cannot override hard failures.
Model / provider
none
Prompt
none
Retrieval / sources
none
Persistence
Fresh receipt.json and index.html bind run/package/context/preferences/scenarios/profiles/current code
Review & permissions
Nonempty bounded reviewer label and reason; identity is self-asserted. The action never sends an offer or records assent.
Output
Local planning decision receipt and readable scope statement.
  • wind_tunnel/__main__.py:125main
  • wind_tunnel/review.py:48record_review
  • wind_tunnel/review.py:24current_package
  • wind_tunnel/review.py:41bindings
implemented

Verify review command

Detect stale or modified planning records before they are reused.

Interface / command
wind_tunnel/__main__.py:main
Call
python -m wind_tunnel verify-review → verify_review → current_package
Service / backend
wind_tunnel/review.py:verify_review
Rules & validation
Check receipt size/schema/checksum, decision metadata, current replay, exact run/input/code bindings and the non-assent scope. Changed run or implementation needs a fresh review.
Model / provider
none
Prompt
none
Retrieval / sources
none
Persistence
Read receipt.json plus exact run.json; verification prints JSON and does not mutate either
Review & permissions
Local digest verification cannot authenticate an author or defeat replacement of the entire evidence set.
Output
Verified-local-planning-record status or a controlled failure.
  • wind_tunnel/__main__.py:125main
  • wind_tunnel/review.py:68verify_review
  • wind_tunnel/review.py:16review_inputs
implemented

Frozen HTML package report

Inspect complete package terms, modeled cash consequences, source assertions and unresolved legal dependencies.

Interface / command
wind_tunnel/output.py:render_bundle
Call
Direct local index.html links to frozen run.json; no HTTP API
Service / backend
wind_tunnel/output.py:render_bundle / document_html
Rules & validation
Escape source/prose, show exact terms and scenario calculations, and label profile counts as hypothetical. A frozen HTML edit does not change the model.
Model / provider
none
Prompt
none
Retrieval / sources
none
Persistence
index.html beside checksum-bound run.json and preserved source text inside context
Review & permissions
Human review of legal meaning, factual validity and commercial fit remains necessary.
Output
Standalone readable report and machine-readable run.
  • wind_tunnel/output.py:80render_bundle
  • wind_tunnel/output.py:76document_html
  • wind_tunnel/output.py:44save_bundle
implemented

Synthetic demonstration command

Exercise normal, changed, incomplete and deliberately corrupted modeled situations.

Interface / command
wind_tunnel/__main__.py:main
Call
python -m wind_tunnel demo → experiments.demo
Service / backend
wind_tunnel/experiments.py:demo
Rules & validation
Run authored scenarios for ordinary and baseline packages, a counteroffer, unknown supplier facts, conflicting amendments, fragile low-cost terms and an arithmetic corruption.
Model / provider
none
Prompt
none
Retrieval / sources
none
Persistence
New demo directory: ordinary/baseline/updated/unknown-supplier bundles and failure examples
Review & permissions
All examples are synthetic; passed wiring does not establish negotiation effectiveness.
Output
Local demonstration and explicit controlled failure examples.
  • wind_tunnel/experiments.py:60demo
  • wind_tunnel/evaluate.py:77independent_check
implemented

Equal-budget benchmark command

Compare search mechanisms against a strong simpler baseline within one finite domain.

Interface / command
wind_tunnel/__main__.py:main
Call
python -m wind_tunnel benchmark → experiments.benchmark
Service / backend
wind_tunnel/experiments.py:benchmark / benchmark_contexts
Rules & validation
Paired seeds, shared initial candidates/evaluation budgets and fixed review shortlists support controlled comparison. Exhaustive finite reference and later challenge checks remain distinct.
Model / provider
none
Prompt
none
Retrieval / sources
none
Persistence
New benchmark run records, shortlists, metrics and summary
Review & permissions
Historical simpler-method advantage remains preserved; rerunning consumed cases is not a new holdout.
Output
Bounded synthetic search comparison; no human usefulness or ROI result.
  • wind_tunnel/experiments.py:111benchmark
  • wind_tunnel/experiments.py:103benchmark_contexts
  • wind_tunnel/model.py:101all_packages
implemented

Reusable scenario method laboratory

Test whether a smaller development recipe survives separately introduced material cases.

Interface / command
wind_tunnel/__main__.py:main
Call
python -m wind_tunnel method-lab → method_lab.run_lab → recipe_audit.audit_recipe
Service / backend
wind_tunnel/method_lab.py:run_lab; recipe_audit.py:audit_recipe
Rules & validation
Freeze a candidate recipe before challenge cases enter; compare with the full fixed-test baseline and retain missed material cases. No automatic promotion occurs.
Model / provider
none
Prompt
none
Retrieval / sources
none
Persistence
Frozen development recipe, audit results and summary in a fresh directory
Review & permissions
The preserved recipe missed material challenge cases and promotion was rejected; no cross-domain transfer or expert-cost savings established.
Output
Experimental recipe/audit record with negative findings retained.
  • wind_tunnel/method_lab.py:12run_lab
  • wind_tunnel/recipe_audit.py:7audit_recipe
Which parts of the app are mapped

Ten grouped surfaces: wizard, preference proposal/confirmation, run, update, new review and verification commands, frozen HTML, demonstration, benchmark and method laboratory. No HTTP endpoints, integrations or hidden model providers are implemented.

10 mapped0 partial0 unmapped
  • Guided wizard and repeated updatesimplemented

    Current command or output traced; synthetic model scope is explicit.

  • Preferences proposal and explicit confirmation commandsimplemented

    Current command or output traced; synthetic model scope is explicit.

  • Run command and modelled searchimplemented

    Current command or output traced; synthetic model scope is explicit.

  • Update command and same-package comparisonimplemented

    Current command or output traced; synthetic model scope is explicit.

  • Planning review command and local decision reportimplemented

    Current command or output traced; synthetic model scope is explicit.

  • Verify review commandimplemented

    Current command or output traced; synthetic model scope is explicit.

  • Frozen HTML package reportimplemented

    Current command or output traced; synthetic model scope is explicit.

  • Synthetic demonstration commandimplemented

    Current command or output traced; synthetic model scope is explicit.

  • Equal-budget benchmark commandimplemented

    Current command or output traced; synthetic model scope is explicit.

  • Reusable scenario method laboratoryimplemented

    Current command or output traced; synthetic model scope is explicit.

03 / Review and permissions

What needs to happen before the next step?

implemented

Explicit source grammar and reconstruction

Supported annotations retain exact source lines and per-field provenance; conflicts, unknown fields and unsupported input types fail instead of being silently interpreted.

Code references
  • wind_tunnel/context.py:17documents_from_paths
  • wind_tunnel/context.py:42parse_document
  • wind_tunnel/context.py:95build_context
  • wind_tunnel/context.py:153verify_context
implemented

Confirmed criteria and hard constraints

Proposed preference text is not confirmation. Unsupported weights and malformed limits refuse; package/domain, cash, shortfall and known-prohibition gates remain separate from objective trade-offs.

Code references
  • wind_tunnel/preferences.py:80validate
  • wind_tunnel/evaluate.py:162evaluate
  • wind_tunnel/model.py:15Package
implemented

Independent arithmetic and unknown supplier state

Integer-cent simulation is cross-checked using separately reconstructed arithmetic; hypothetical supplier compatibility and missing information are never presented as acceptance probability.

Code references
  • wind_tunnel/evaluate.py:45simulate
  • wind_tunnel/evaluate.py:77independent_check
  • wind_tunnel/evaluate.py:116supplier_assessment
implemented

Budget, lineage and preserved outputs

Search bounds and spent attempts are recorded; fresh output directories prevent replacing old runs. Canonical run checksums detect content changes but do not establish external authenticity.

Code references
  • wind_tunnel/search.py:99run
  • wind_tunnel/output.py:33event_writer
  • wind_tunnel/output.py:25new_output
  • wind_tunnel/output.py:54read_bundle
implemented

Review binding and non-assent boundary

Each review binds run/package/input/code identities and fresh checks. Selection cannot override hard failures. Reviewer labels remain self-asserted; no sending, signing or transaction path exists.

Code references
  • wind_tunnel/review.py:48record_review
  • wind_tunnel/review.py:68verify_review
  • wind_tunnel/review.py:24current_package
implemented

Research promotion separation

Recipe selection is frozen before the independent challenge and negative results remain explicit; development coverage does not become legal truth or a production promotion.

Code references
  • wind_tunnel/method_lab.py:12run_lab
  • wind_tunnel/recipe_audit.py:7audit_recipe

04 / Completion work

What changed in this snapshot.

Implemented change

Planning review and verify-review commands

Added record_review and verify_review. Every decision checks the saved run checksum, reconstructs context, validates confirmed preferences/scenarios/profiles and replays the selected package. Selection cannot override hard failures; records bind run, package, inputs and implementation and preserve existing output.

The application produced frozen alternatives and supported updates, but had no normal user command to retain which package a reviewer selected, deferred or rejected and why. A bound planning record closes that gap without implying negotiation authority.

Options considered
  • Add an unconstrained natural-language contract parser.
  • Replace the search mechanism despite the simpler baseline already performing better in the preserved study.
  • Complete a local, reasoned review record with exact run binding and fresh deterministic replay.
Files changed
  • wind_tunnel/review.py
  • wind_tunnel/__main__.py
  • tests/test_review.py
  • README.md

Validation

passedpython3 -B -m unittest discover -s tests -v

Actual source directory: 40 tests passed, including seven planning-review tests; baseline was 33. Bundled Python used.

passedpython3 -B -m wind_tunnel demo --out NEW_OUTPUT

Fresh synthetic deterministic demonstration completed; no model or network calls.

passedpython3 -B -m wind_tunnel review --run RUN --package ID --decision select --reviewer "Synthetic demonstration reviewer" --reason "Synthetic planning selection for further review only" --out NEW_REVIEW

Actual freshly generated shortlist package was replayed and a local record created.

passedpython3 -B -m wind_tunnel verify-review --receipt RECEIPT --run RUN

The fresh local planning record verified against its exact run and current source. Initial end-to-end check exposed extra search-lineage fields; comparison was corrected to verify all evaluator fields while retaining that metadata, and covered by regression tests.

passedPYTHONPYCACHEPREFIX=WORK_CACHE python3 -m compileall -q wind_tunnel tests

Syntax compilation passed in the actual source directory; bytecode cache was written only under this task workspace.

passedpython3 -B -m wind_tunnel verify-review --receipt RECEIPT --run DIFFERENT_UPDATED_RUN

Negative CLI smoke returned expected exit 2; an old planning receipt cannot inherit the updated run.

Scope of the tool

  • Only annotated UTF-8 text/Markdown or JSON bundles of those texts; arbitrary clause extraction is not implemented.
  • Supply economics use a simplified finite model; assumptions and source assertions are not verified real-world facts.
  • No LLM, external retrieval, network call, supplier communication or transaction exists in the core.
  • Supplier-profile fit is hypothetical scenario compatibility, not acceptance probability; legal interpretation and execution remain outside the tool.

Unfinished work and gaps in the map

  • General-language contract interpretation, arbitrary clause invention, PDF/DOCX/email/spreadsheet ingestion and tracked changes are absent.
  • No jurisdictional legal engine, current-authority lookup, authentic document execution or counterparty communication.
  • Deadlines, outside-option and concession notes are retained but not fully modeled; no calibrated acceptance model or pairwise utility elicitation.
  • Simplified supply-domain economic assumptions require independent operating and legal review.
  • Local review labels/checksums do not authenticate a person or anchor evidence against wholesale replacement.
  • Historical simpler-baseline advantage and rejected evolved recipe remain preserved; no professional/customer study or measured time savings.
  • No model/provider, production access-control layer, live transactions or deployment added.
  • Reviewer labels are self-asserted, not authenticated identities.
  • Hashes are local integrity checks, not signatures or external anchors.
  • No actual supplier acceptance, legal opinion, executed contract, customer ROI or professional study was added.
Implementation snapshot

These maps explain the software, its sources, and who reviews the results. Local and synthetic tests do not establish legal accuracy or readiness for production. The technical traces identify configured integrations and unfinished paths.