publishhaven
Choose another practical lesson
A worked example · The Agentic Trading Research Journal

Keep a client's latest instructions in one place

A client first asked for a remote workshop, then approved an in-person session. Old notes still mention the remote plan. What should you give an assistant before asking it to draft a reminder?

What you will make: A short current-facts sheet saying in-person, Room B and date unconfirmed, with the old remote decision kept separately.

Start on this page. No download, installation or coding is needed.

Try the example

See the finished example

The people, services and prices are fictional. This AI-authored teaching example was checked against the supplied notes. It is not a customer result or a measured test of an AI model.

Oak's current workshop instructions

As of October 5, 2026. Fictional worked example.

Use these facts for the next draft

  • Workshop format: in-person [E2, October 3].
  • Venue: Room B [E3, October 3].
  • Workshop date: unconfirmed. Ask Oak to approve a date before writing a dated reminder. The proposed date has not been approved [E4].

These instructions apply to Oak only. The old remote plan belongs in the separate history below, not in the next reminder. The preference marked for removal is omitted from both sections. This omission does not delete the original records or any past chat.

Separate history, excluded from current instructions

  • Previous format: remote [E1, 2026-10-01]

When is this useful?

A manually maintained facts sheet is sufficient for this small example. The purpose is to decide what is current before asking an assistant to write. A memory database is unnecessary here.

The example has been checked against its supplied notes. We have not measured whether this format saves readers time or attracts an audience. An assistant's answer needs its own review.

1. Read the sample notes

You have everything needed for this example below. The short note labels help you point to the source of a statement.

E1: Oak note dated 2026-10-01

Workshop format: remote Approved: Yes

E2: Oak note dated 2026-10-03

Workshop format: in-person Approved: Yes

E3: Oak note dated 2026-10-03

Venue: Room B Approved: Yes

E4: Oak note dated 2026-10-03

Proposed workshop date: 2026-11-10 Approved: No

E5: Pine note dated 2026-10-04

Venue: Room Z Approved: Yes

E6: Oak note dated 2026-10-02

Preference marked for removal: Fictional preference to remove Approved: Yes

Which notes belong in this exercise?

Use client Oak as of 2026-10-05. Omit the preference marked for removal from both the current sheet and history. The original sample notes remain visible here so you can inspect the omission.

2. Draft it yourself or use your usual assistant

Copy the complete task below into an assistant you already use, or use the finished example as a document template. The task includes every sample note; you do not need to attach files.

This page does not call an AI service. Use the fictional sample first. Remove private details before pasting your own material into another service.

3. Edit a copy of the result

Compare your draft with the finished example, then make your corrections here. This is an ordinary editable template; typing does not run an automatic fact check.

Your edits stay in this page. They are not uploaded or saved. Copy them before you leave or reload.

4. Check it against the notes

Use this checklist to review the meaning. Ticking a box records your judgment in this page; it does not verify the document automatically.

Review each statement against its source before marking it complete.

Practise a mistake and repair it

Change the current format back to remote. Trace that statement to the older note, then repair it using the later approved change. Ask for the missing date instead of copying the unapproved suggestion.

Use the method for your own work

Create a small dated facts sheet for one project. Record who approved each change and keep unrelated clients separate. Review it before drafting each message; do not assume an assistant will correct old information on its own.

You are finished when you can explain the result using the notes, identify what is missing and repair the deliberate mistake. A shorter manually written document is an acceptable result.

Optional: download the files and run Python checks

The full technical exercise is preserved for readers who want to inspect or change the program. These files are optional for the lesson above. A ZIP is a single download containing the sample documents and code; extract it before following the developer instructions.

Download every project file (ZIP)

A text editor; Python 3.11+ for the compiler. An assistant account is optional.

Files in the technical download
  • README.md
  • comparison-log.csv
  • events.json
  • expected.txt
  • finished-context.md
  • history-example.json
  • model-draft.md
  • policy.json
  • project.json
  • prompt.txt
  • run-record-template.json
  • run-record.md
  • run.py
  • verify.py

Your finished result

A client first asks for a remote workshop, then approves an in-person session. An assistant that reads every old note equally may repeat the old plan. Finish with a small current context pack that says in-person, Room B, links those facts to their approved updates, keeps the old format in a separate history file and leaves the date unresolved.

Input: six fictional events from two clients, including a correction, an unapproved date and a note to remove.

Finished output: two current Oak facts, one superseded Oak fact in history, no Pine venue and no removed preference in either generated file. The reminder draft asks for the date instead of inventing one.

This is the Agentic journal's context and memory path. “Context” is the material supplied to a model for its current task. “Memory” often means storing material for later reuse. Here both are ordinary inspectable files, not trained model weights or a hidden personal profile.

Why a facts sheet may be enough

For one client and a handful of changes, maintain a facts sheet manually. Read it before drafting. That is the baseline. A structured event log becomes useful when you need to see which approved change replaced an older decision, but it creates work of its own. There is no vector database or automatic retrieval in this project.

The research question is: can a small explicit context pack keep an approved correction separate from stale history and unrelated client notes? We test the file-selection behavior. We do not claim that every assistant will obey the pack or that memory always improves answers.

1. Inspect events and policy

Open events.json. E1 records remote format. E2, dated later, replaces it with in-person. E3 supplies Room B. E4 suggests a date but is unapproved. E5 belongs to Pine, a different client. E6 contains a fictional preference selected for removal.

Open policy.json. It selects Oak, a cutoff date, allowed fields and keys to forget. The example has clear dates, approvals and one meaning per key. Real notes often lack those properties. Resolve ambiguity with a person instead of assuming that whichever note was typed last must be right.

2. Build a small pack

Run the clean-folder commands below. Expected stdout is exactly:

client=Oak
current_facts=2
superseded_facts=1
forgotten_keys=1
files=current-context.md,history.json

Read results/current-context.md. It should name in-person format from E2 and Room B from E3. Read results/history.json: it contains E1, the old remote decision. The history helps explain a correction, but it is not the material to paste as current instructions.

The program filters other clients, future events and forgotten fields before building either output. It chooses the newest approved event for each allowed key. Two conflicting approved changes on the same date stop the build for human resolution rather than using the event ID as an arbitrary tiebreaker.

3. Use it in a draft

Paste only the current pack and prompt.txt into your assistant. Ask for a reminder, then check its format, venue and date against the pack. model-draft.md is the illustrative AI-authored reminder from this session. It is not a controlled experiment proving this approach beats no memory.

Try three routes yourself: draft from your facts sheet, draft with an assistant and no supplied context, and draft with the selected pack. Record the exact material supplied, actual answers and correction effort. The no-context answer may simply ask for information. That can be appropriate. Do not declare the longer answer better merely because it sounds confident.

4. Create a conflict and repair it

In a spare copy, duplicate E2 under a new ID on the same date and change its value to remote. The compiler must stop with same-day context conflict needs human resolution, exit status 2 and no new output folder. A person must determine the approved decision and fix the event data before another run.

verify.py also checks duplicate IDs, malformed dates, a string pretending to be a Boolean approval and an unknown forget key. It checks that Pine's venue and the removed preference stay out of both generated files, that the old format stays out of the current pack and that a repeat run cannot overwrite your prior result.

5. Understand removal limits

Removing a key here excludes it from newly generated files. The raw events.json still contains the fictional event. Existing output folders, backups, a model provider's stored chats and a previously sent message are not erased by this program. If you need deletion in a real service, inventory every copy and verify the service's actual deletion behavior. Do not advertise this filter as complete erasure.

Completion check: show the current pack, trace both facts to their approved events, explain why the date is unresolved, find the old remote fact only in history and reproduce the conflict rejection. Confirm that the other client's venue and the removed preference are absent from both generated outputs.

Adapt it: define a client boundary, a narrow list of useful facts, approval rules, timestamps and a review owner. Start with low-sensitivity information. Treat a client's correction as a source-linked change rather than silently editing an unexplained summary. Decide how to handle revocation and equally dated updates before connecting a model.

Next task: add an explicit revocation event and test that a revoked venue disappears without restoring an older venue automatically. Then evaluate the same reminder task with and without the pack using observed outputs. Keep selection correctness separate from model behavior.

Technical reading

Anthropic's context engineering article explains selecting information for a model. These public reports of repeated old tool calls and poor experience after enabling memory describe user problems. We did not reproduce their particular software failures. Our file exercise teaches an inspectable selection method, not a fix for those products.

Choose a route

Interface route: download and unzip the project. Read the input files and the included finished-*.md example in a text editor. Copy the finished example as an editable template; it is also included so you can complete the interface route without running Python. Paste their contents and prompt.txt into an assistant you already use, or write the draft yourself. Work with the fictional example first. Keep the raw answer unchanged, then save your corrections separately. Nothing in this project connects to email, purchasing or a client database.

Code route: install Python 3.11 or newer from python.org. Open a terminal in the unzipped folder. No packages, API keys or private repository access are required. Run:

python3 -I run.py
python3 -I verify.py

On Windows, use py -3 -I run.py and py -3 -I verify.py. The -I option isolates Python from user-specific Python settings. It does not turn the exercise into a sandbox for arbitrary downloaded code. Read the files before running them.

The first command creates results/. The second uses temporary copies to check the expected output and deliberate bad inputs. It leaves your own inputs and results alone. A second run refuses to overwrite results/; choose a fresh folder with python3 -I run.py --output results-2 when you intentionally want another version. Compare versions before deleting anything.

The programs assemble reviewed structured inputs into documents. They do not call a model, browse the web or decide whether prose is true. The supplied AI-authored draft came from this editorial authoring session. run-record.md explains exactly what was and was not observed. No separate API benchmark, customer deployment or independent reader trial is claimed.

Record a real attempt

Use comparison-log.csv to compare the same task and acceptance criteria on the manual and assistant routes. Copy run-record-template.json before trying your own assistant. Record the product and model label shown to you, date, exact prompt and supplied files, raw output, corrections, and setup, review and repair minutes. Unknown usage charges stay unknown rather than becoming zero. Do not confuse a download with a completed task. Finish the manual baseline too; for a one-off task, it may be the better method.

Before using real material, remove personal details and obtain appropriate permission. Your assistant's data handling depends on its product and account settings. This local exercise does not verify those settings.

Troubleshooting

  • Python is not found: use the Windows command above or verify your Python installation, then reopen the terminal.
  • A file cannot be found: unzip the whole folder. Keep run.py, project.json and the input files together.
  • JSON will not load: use double quotes, remove trailing commas and check the file in a JSON-aware editor. Preserve a clean copy before editing.
  • The checker rejects a draft: read the specific error, compare the input with the authoritative note, correct the draft and use a new output folder. Do not loosen the check just to get a pass.
  • The assistant writes different sentences: that is expected. The exact output below belongs to the deterministic compiler, not to every model's prose. Review the meaning of the assistant's answer separately.

What a pass means

The downloaded files are original educational material that you can adapt. A passing checker proves only the stated structural and data checks. It does not establish legal approval, broad factual accuracy, an effective model or a complete deployed agent. Human judgment still matters where the instructions say it does.

Continue with the journal

Original exercise: Build a current client context pack from changing notes. This companion lesson adds no numbered edition or extra email.

Choose your next lesson in The Agentic Trading Research Journal

Subscribe to The Agentic Trading Research Journal