# Portfolio case: verified weekly business reporting assistant

Original synthetic teaching case, local review draft. The completed reference is a deterministic reporting scaffold with authored candidate text and evaluated failure cases. A live language-model adapter is an optional learner extension, not an already tested feature. No report is sent, published or approved by this project.

## Business question and decision

Prepare a reviewable summary of paid events occurring from 2026-01-05 00:00:00 UTC inclusive through 2026-01-12 00:00:00 UTC exclusive. Retain late-arriving events when their occurrence time belongs to the period and the source-readiness contract permits them. Deduplicate identical event IDs; reject conflicting duplicates. Report the amount in paise and display INR separately.

The result supports checking the supplied week's selected amount and regional reconciliation. It cannot establish recognized revenue, profit, campaign impact or a trend. This is a fixed historical teaching week, not a current live business report.

## Reference artifacts

- [Source automation lab](../labs/report-automation/README.md): seven raw event rows, source manifest, period configuration and validated pipeline.
- [Assistant scaffold](../labs/analyst-ai/weekly_assistant.py): imports the source loader, checks fixed-fixture expectations, prepares narrative and structured facts, and evaluates seeded answers.
- [Review packet](../labs/analyst-ai/weekly-review-packet.json): exact packet hash, source evidence, metrics, selected IDs, authored narrative and pending review state.
- [Weekly checks](../labs/analyst-ai/weekly-verification.json): actually executed local outcomes, including an explicitly documented semantic blind spot.
- [Verification protocol](../labs/analyst-ai/VERIFICATION_PROTOCOL.md): gates and limits across the analyst-AI section.
- [Operational handover](report-automation-handover.md): source-pipeline failure and recovery requirements.

## Reproduction

From the repository root:

```powershell
python 11-Blog-Programme/labs/report-automation/verify.py
python 11-Blog-Programme/labs/analyst-ai/weekly_assistant.py
```

Python 3.12 and standard-library modules are sufficient for these commands. The script writes local JSON artifacts. It does not call an AI service or distribute output. The fixed golden assertions intentionally fail if the fixture changes; review and version a changed case rather than rewriting expected values to match an unexplained result.

## Expected result

Seven raw rows become six unique events after one identical replay. Three paid events, E1, E2 and E5, fall inside the occurrence-time window. Their total is 3,500 paise, or INR 35.00. North contributes 1,000, South 2,000 and Unknown 500 paise; the region amounts reconcile to the total. E2 arrives after the period ends but is included under the supplied readiness contract. An event at the exclusive end is excluded, as is the cancelled event.

Reference narrative: “The selected paid-event amount is INR 35.00 across 3 events. Unknown-region events contribute INR 5.00. No prior-period or causal comparison is established. Human review is pending.” This wording is an authored deterministic template, not a model-generated response.

## Evaluated failures

The checker rejects a 4,200-paise amount, a seven-event denominator, a rupees unit where paise is required, a shifted period end, missing event evidence and a numeric string. A causal sentence with otherwise correct structured facts still passes the narrow checker; the protocol requires semantic review to reject it. Editing the narrative changes the packet identity. Every reference artifact remains pending review and not sent.

## Learner handover

Submit a metric contract, source dictionary, reproduction command, structured result, source hashes, readable narrative, failure matrix and a short decision memo. Demonstrate one failed calculation and one unsupported narrative. Explain why a correct number does not automatically justify a recommendation.

An optional model adapter may draft narrative from the bounded evidence packet. Keep the calculation outside the model, treat source documents as untrusted data, and preserve every actual prompt/response and tool trace within the permitted data environment. Evaluate held-out cases and abstention before making any performance claim. Do not invent results if no provider is available.

## Proposed task rubric

| Dimension | Points | Evidence |
|---|---:|---|
| Metric and source correctness | 30 | Eligibility, replay handling, units and reconciliation |
| Reproducibility | 20 | Clean run, fixed inputs, hashes and understandable setup |
| Verification and failure analysis | 25 | Independent expectations, seeded failures and grader limitations |
| Narrative and decision reasoning | 15 | Supported claims, missing evidence and proportionate next action |
| Review handover | 10 | Exact version identity, pending/approved distinction and operating notes |

Critical rework gates override aggregate marks: unexplained monetary mismatch, invented evidence, unsupported material conclusion or an unauthorized external action. This is a proposed project rubric within the broader DA supplement, not an awarded learner score or a change to advertised live hours.
