Lab for asset managers
Compare renewable generation with the P50 budget, then extract key dates from three PPA term sheets.
You can ask Codex to compare real output with a budget, find key dates in contracts, and check what it says.
You can have Codex compare monthly generation with the P50 budget and extract key dates from PPA term sheets, then check both against an answer key.
You can have an agent produce a reproducible variance analysis and a sourced key-date register from PDFs, and verify both against a known-good key.
What you will make
You will do two jobs that asset managers do every month.
In part 1, Codex compares how much power four wind and solar farms made with how much the budget said. It writes a small program, a chart and a short report. In part 2, Codex reads three contracts and lists the dates that matter.
Codex does the first draft. You check it.
Part 1: Codex compares September 2026 generation for four assets with the P50 budget. P50 is the generation level expected to be exceeded half the time. Codex writes a Python script, runs it and saves a variance table, a chart and a short summary.
Part 2: Codex reads three PPA term sheets, which are power purchase agreement summaries. It lists the key dates with the page and the quote for each, and writes a calendar file. It also shows how it worked out any deadline that the contract states as a period.
Both parts follow the same routine: brief, plan, act, check.
Part 1 asks for a script, not just an answer. A script is repeatable and you can read it, so the variance is auditable. The summary must separate the measured variance from candidate causes, which stay hypotheses until the supporting data fits.
Part 2 extracts dated obligations from PDFs with page and quote provenance. Some deadlines are stated relative to another date, such as 90 days before a review or 12 months before an option. The agent must compute them and show its arithmetic.
Both outputs have a known correct form, so you can verify them.
| File | What it holds |
|---|---|
asset-manager/generation-2026-09.csv | Daily generation for four assets, September 2026 |
asset-manager/budget-p50-2026-09.csv | P50 budget for each asset, September 2026 |
asset-manager/ppa-wattle-creek.pdf | Power purchase agreement (PPA) term sheet, Wattle Creek Solar Farm |
asset-manager/ppa-stony-point.pdf | Power purchase agreement (PPA) term sheet, Stony Point Wind Farm |
asset-manager/ppa-banksia-ridge.pdf | Power purchase agreement (PPA) term sheet, Banksia Ridge Solar Farm |
Part 1, compare generation with budget
Send the brief and read the plan
Open Codex with the
CodexWorkfolder. Check that the mode says Ask for approval. Start a new thread.Copy the brief below and send it. Read the plan. It should say how Codex will work out the gap in per cent.
Open Codex with
CodexWorkas the project folder and check that the mode says Ask for approval. Start a new thread and send the brief below.Read the plan. It should say how the variance is calculated and which assets will be flagged. Correct it now if the method is not what you want.
Start a new thread with Ask for approval and send the brief. In the plan, check the variance definition, the rule for flagging an asset, and how the script reads the daily rows. Agree the method before the code exists.
Approve and run the script
Reply: Approved. Go ahead. Codex will ask before it runs the program. Read the command, then approve it.
If Python is missing, Codex will tell you. Do not install anything you do not understand. Ask Codex for another way.
Reply: Approved. Go ahead. Codex asks before it creates files and before it runs
variance.py. Read each request and approve it.If a chart package is missing, Codex must ask before it installs one. Decline and ask for an SVG chart that needs no extra package.
Reply: Approved. Go ahead. Approve the file writes and then the run of
variance.py. Network access is off by default, so an install needs your approval. Decline it and ask for an SVG chart written with the standard library.New thread
- September variance
Approved. Go ahead.
I wrote outputs/variance.py. Next I run it to make the table, the chart and the summary data.
Codex wants to run
ApproveDeclineAsk Codex to do something
Codex asks before it runs the script. Read the command first. Read the summary
Open
outputs\summary.md. Look at each cause Codex gives. A cause should say how sure it is and which numbers support it.Open
outputs\summary.md. Each cause should be written as a hypothesis, with the numbers that support it. A cause stated as a fact, with no data, is a claim to check.Open
outputs\summary.md. For each flagged asset, check that the hypothesis names a testable signature in the data, such as a run of low daily output, and that it cites those rows.
Goal: Compare September 2026 generation with the P50 budget for each asset and for the portfolio. Inputs: asset-manager/generation-2026-09.csv and asset-manager/budget-p50-2026-09.csv Output: outputs/variance.py, which you run. It saves outputs/variance.csv and a chart of actual against P50 for each asset. Also outputs/summary.md. Constraints: Do not change any source file. Write only in outputs/. In summary.md, state each cause as a hypothesis and cite the data that supports it. Flag any asset more than 10 per cent below P50. If matplotlib is not installed, do not install it. Write an SVG chart with no extra packages. Ask before you install anything. Done when: variance.csv has MWh and per cent variance for each asset and for the portfolio. How to check: Print the totals and show how you calculated the per cent variance. Make a plan first. Do not create any file until I approve the plan.
Part 2, extract key dates
Send the brief and read the plan
Start a new thread. Copy the brief below and send it. Read the plan.
Some deadlines are given as a count before another date. Check that the plan says how Codex will work them out.
Start a new thread and send the brief below. Read the plan. Check that it handles deadlines stated as a period before another date, and that it will record the page for each date.
Start a new thread and send the brief. Check that the plan separates dates the contract states from dates it derives, and that it will record page and quote for both.
Approve and check the dates
Reply: Approved. Go ahead. Approve the files.
Open
outputs\key-dates.csvin Excel. Pick two dates. Open the PDF and find them on the page Codex names.Reply: Approved. Go ahead. Approve the files, then open
outputs\key-dates.csvin Excel. Pick two dates, open the PDF and confirm each date on the page and quote that Codex gives.Reply: Approved. Go ahead. Open
outputs\key-dates.csvand spot-check at least two stated dates and every derived date against the PDF page. Ask Codex to show the date arithmetic for each derived date.New thread
- September variance
- PPA key dates
Approved. Go ahead.
I wrote 13 key dates. Two are not stated in a contract. I worked them out: the dispute deadline is 90 days before the price review, and the notice deadline is 12 months before the early termination option.
Ask Codex to do something
Codex shows its working for a relative deadline.
Goal: List the key dates in the three PPA term sheets. Inputs: asset-manager/ppa-wattle-creek.pdf, asset-manager/ppa-stony-point.pdf and asset-manager/ppa-banksia-ridge.pdf Output: outputs/key-dates.csv with the columns document, item, date, page, quote. Also outputs/key-dates.ics with one all-day event for each date. Constraints: Do not change any source file. Write only in outputs/. Use the page number of the PDF. For a deadline that the PDF states as a period before another date, show how you calculated it. Ask before you install anything. Done when: every date has a page and a quote. How to check: List each calculated deadline with its working. Make a plan first. Do not create any file until I approve the plan.
Answer key
Open each question below. Compare the answer with your own result.
Open each question below and compare the answer with your own result. A match is evidence. A mismatch is a reason to ask Codex to show its working.
Compare each answer with your outputs. The key came from the data that built the starter pack, so a mismatch points to a defect in the output.
| Asset | P50 (MWh) | Actual (MWh) | Variance |
|---|---|---|---|
| WCS Wattle Creek Solar Farm | 21,600 | 22,248 | +3.0% |
| BRS Banksia Ridge Solar Farm | 15,300 | 13,464 | -12.0% |
| SPW Stony Point Wind Farm | 37,800 | 30,996 | -18.0% |
| KHW Kookaburra Hill Wind Farm | 22,810 | 21,898 | -4.0% |
| Portfolio | 97,510 | 88,606 | -9.13% |
| Document | Item | Date | Page |
|---|---|---|---|
| ppa-wattle-creek.pdf | Commercial operation date | 1 March 2024 | 1 |
| ppa-wattle-creek.pdf | Term end | 28 February 2036 | 1 |
| ppa-wattle-creek.pdf | Price review | 1 July 2027 | 2 |
| ppa-wattle-creek.pdf | Last day to dispute the price review (90 days before) | 2 April 2027 | 2 |
| ppa-stony-point.pdf | Commercial operation date | 15 November 2022 | 1 |
| ppa-stony-point.pdf | Term end | 14 November 2034 | 1 |
| ppa-stony-point.pdf | Early termination option | 15 November 2029 | 2 |
| ppa-stony-point.pdf | Last day to give termination notice (12 months before) | 15 November 2028 | 2 |
| ppa-stony-point.pdf | Next annual price escalation | 1 January 2027 | 2 |
| ppa-banksia-ridge.pdf | Commercial operation date | 1 October 2025 | 1 |
| ppa-banksia-ridge.pdf | Term end | 30 September 2037 | 1 |
| ppa-banksia-ridge.pdf | Next curtailment cap review | 1 October 2027 | 2 |
| ppa-banksia-ridge.pdf | Next insurance certificate due | 31 January 2027 | 2 |
Check yourself
Part 1. What is the portfolio variance?
The four farms made 88,606 MWh (megawatt-hours). The budget was 97,510 MWh. The gap is -8,904 MWh (-9.13%). The farms made less than the budget.
Actual 88,606 MWh against a P50 of 97,510 MWh, so the variance is -8,904 MWh (-9.13%). If your figure differs, ask Codex to print the totals it used.
Actual 88,606 MWh against P50 97,510 MWh gives -8,904 MWh (-9.13%). The percentage is the MWh variance divided by P50. A different figure usually means a wrong sum, a missed day or a wrong base.
Part 1. Which assets are more than 10 per cent below P50, and what may explain it?
BRS is -12.0%. Curtailment (the grid limits the output) on nine days may explain it (1,700 MWh). SPW is -18.0%. Its availability was near 40 per cent from 6 to 11 September. WCS is +3.0% and KHW is -4.0%. Codex should call each cause a guess to test, not a fact.
BRS is -12.0%, with 1,700 MWh of curtailment and network curtailment on nine days. SPW is -18.0%, with availability near 40 per cent from 6 to 11 September. The others are WCS +3.0% and KHW -4.0%. Codex should state each cause as a hypothesis with its supporting data.
BRS -12.0%: 1,700 MWh of curtailment, with network curtailment on nine days. SPW -18.0%: availability near 40 per cent from 6 to 11 September. WCS +3.0% and KHW -4.0% are inside the 10 per cent threshold. The daily data supports these causes but cannot prove them, so the summary should say so.
Part 2. How many key dates are there, and which two need working out?
There are 13 dates. Two are worked out, not written in a contract. The last day to dispute the price review is 2 April 2027. The last day to give termination notice is 15 November 2028.
13 dates in total. The two calculated deadlines are 2 April 2027 (90 days before the price review) and 15 November 2028 (12 months before the early termination option). Codex should show the arithmetic for both.
13 dates. Two are derived: 2 April 2027, which is 90 days before the price review, and 15 November 2028, which is 12 months before the early termination option. Check the direction of each offset and the day count, because an off-by-one error here changes a contractual deadline.
Go further
Ask Codex to run the same program on next month's file. A program does the same job again with no extra work.
You can also ask Codex for a one-page note that lists the three biggest risks.
Turn part 1 into a monthly routine. Ask Codex to use $skill-creator to make a monthly-variance skill that takes a generation file and a budget file and always writes the same three outputs.
For part 2, ask Codex to add a column for who must act and how many days remain.
Package the script as a skill with $skill-creator, with tests that pin the portfolio figure to the key above. For scripted runs, codex exec can run the monthly brief non-interactively.
For part 2, add a validator that recomputes each derived date from its base date and compares it with the CSV. The check then no longer depends on the agent's arithmetic.
OtterBlock is not affiliated with OpenAI. Codex and ChatGPT are OpenAI products.