Harkirat Singh / Analytics

09 / AI workflow engineering

Evidence-first agent workflow

A local Python tool interface that carries definitions, source checks and unresolved limits into its results.

PythonJSON contractsBehavioral testing

A correct subtotal can still be an incomplete answer.

Question
How can an agent-facing tool return useful analysis without treating an incomplete result as ready for release?

Synthetic five-transaction fixture. Recorded local execution on 7 October 2026; no live business or model-service data.

Supported finding

The known revenue subtotal is 140 fictional units across 4 of 5 rows. One price is missing and customer C2 has conflicting keys, so complete revenue and the customer-segment join remain blocked.

Decision implication

Carry coverage and blockers alongside the number. Resolve the missing price and customer-key conflict before using the result as a complete total or segment analysis.

Limitation

This is a local tool prototype. It does not establish real-model compatibility, production isolation or improved business outcomes.

What the fixture actually supports

Fixed recorded values. The illustrative scenarios below do not recalculate or replace these results.

Invented transactions; revenue = quantity × price × (1 − discount)
RowQuantityUnit priceDiscountRevenue, fictional units
T1210010%180
T2 · return-110010%-90
T31500%50
T41Unknown0%Unknown
T5100%0
Known subtotal · 4/5 rows———140

An observed zero counts as known. A missing price does not. Row coverage is 80%; this does not mean 80% of revenue is known.

Conversion and customer-join checks
Separate conversion fixture; pooled count denominator
GroupSuccessesEligibleConversion
A11010%
B9010090%
Pooled9111082.7273% rounded

The simple average of the two group percentages is 50%; it gives the groups equal weight and is not the pooled rate. In the customer dimension, C2 maps to both B and C. The required many-to-one join fails, so no customer-segment output is produced.

What should the tool report?

Five explanatory scenarios. This browser does not run Python, call a model or verify your local files.

Recorded values explained; no new execution.

Report the subtotal with its limits.

Known subtotal: 140 fictional units across 4 of 5 rows. Complete revenue is unknown; the customer join is blocked by duplicate C2.

Execution
The recorded local Python computation completed.
Evidence
A retained receipt applies to its recorded inputs and implementation.
Release eligibility
Complete revenue and customer-segment output remain blocked.

Resolve missing price and conflicting customer keys through the data owner; preserve the qualified subtotal.

Inspect. Compute. Verify.

Three permitted tools, with one JSON request and response per process.

inspect_inputs
Read the synthetic inputs and analytical contract. Return a digest that identifies their current contents.
analyze
Require that digest, validate the request, compute eligible measures and write a new run. Preserve unknown values, signed returns and join blockers.
verify_result
Check retained artifacts against the source and implementation identities. Integrity verification does not grant analytical or human approval.
Verification scope and design limits

The retained Python 3.12.14 / Windows suite ran 37 tests: 35 passed and two symlink tests were skipped. Checks cover stale inputs, malformed requests, source and result tampering, output boundaries, writer ownership and cooperative cancellation before commit.

Hashes detect changes against a baseline; they are not signatures or proof of source truth. This application boundary is not an operating-system sandbox. Real Claude, ChatGPT, Grok and open-weight execution, hostile concurrent filesystem mutation, native Excel/BI acceptance and production load were not tested.

This user-directed learning project was developed with AI assistance. The source package documents implementation, testing and attribution. It carries no open-source licence grant.

Read the original verification record. Its browser limitations describe the original standalone presentation; this integrated page is reviewed separately.

Run the local example

No model account, API key or paid service is needed.

Included

Python executor, synthetic CSVs, contracts, tests, recorded evidence and the original standalone presentation source.

Software

Python standard library. Tested on Python 3.12.14 / Windows; the intended 3.10+ baseline is not a tested version matrix.

Reproduction scope

Local tool execution only. The package does not reproduce a real model host, native BI workflow or production service.

Reproduce and inspect

python -B -m unittest discover -s tests -v
python -B examples/run_demo.py --workspace . --output-dir runs/my-review

The demo performs inspection, analysis and verification. Existing run directories are not overwritten.

Read the recorded JSON response · Tool protocol