Applied The Archive Playbook

Casualty File Page Sorter

Updated

Intermediate

What you'll learn

~45 min
  • Ask an AI tool, in plan mode, for a sorter that shows a file's pages together and suggests a type for each from its heading (the first line at the top of the page)
  • Read its plan for what matters to a page list: every page kept in file order, suggestions taken from the heading only, and your own label kept apart from the suggestion
  • Look at every page and label it yourself, including a letter that names a form, a blank back and a back with only a stamp
  • Say why a suggestion taken from a page's heading is still only a suggestion
  • Keep a page list of all twelve pages in which your label stands beside the suggestion

The story, and what you will end up with

On 10 February 2026 you requested Walt’s casualty file, the record your search log listed as request only. On 28 March it arrives from the records centre as one scanned file of twelve pages, and you register it the same day, as in the source register lesson. A casualty file, in this case, is the responsible authority’s file of reports and letters about one service member’s death.

Before you can use any of its pages, say in the chain of loss and burial you build next, you need a list of what each page is. The pages are not what you expect. The first is a cover. Then comes a notice to Walt’s mother, Ruth, that he is missing, then a letter from Ruth asking for news, then the back of her letter, which is empty. A back is the other side of a sheet of paper; a scan shows it as a page of its own. Most pages carry a printed title at the top. One carries only a rubber stamp.

The quick way is to let a rule sort them. A rule that searches each page for the name of a form finds “Report of Burial” in Ruth’s letter, because she writes that one would follow, and files her letter as a burial report. A narrower rule that reads only the heading of each page does better. It is still only a suggestion.

By the end of this lesson you will have a small sorter on your own computer: it shows all twelve pages together, suggests a type for each from its heading, and keeps your own label for every page in a page list. You build it by asking your AI tool in plain English, and then you look at the pages and label them yourself.

The file is about a death, and a mother’s letter in it is painful to read.

Before you start

First, if your AI tool is still open, leave it: type /exit and press Enter (if you use Antigravity, press Ctrl+D with nothing typed instead), and wait until you see the $ or % prompt. The next line goes there, in the terminal, not in the AI tool. It makes a folder for this lesson and goes into it:

Terminal window
mkdir -p ~/archive-playbook/08-page-sorter && cd ~/archive-playbook/08-page-sorter

Start your AI tool with the start line you kept from the setup lesson, the one with approval prompts off. Then ask it to set the folder up:

Set this folder up so we can undo any change you make, download https://learn.intellimetrics.net/starters/history/08/casualty-file.zip and unpack it into a data folder, and save a checkpoint.

Look for it saying three things: the folder is set up with Git (the program that saves snapshots, from setup), twelve page images are in the data folder, and a first snapshot, your checkpoint, is saved. If it does not mention one of them, ask: “Did you save a checkpoint with the pages in it?” If it says it kept the zip file somewhere outside this folder, ask it to delete that copy. If the download does not work, download casualty-file.zip in your browser, check where it went (the browser’s list of downloads shows the folder), and tell your AI tool, for example: “casualty-file.zip is in my Downloads folder. Unpack that one file into a data folder here, and save a checkpoint.” In Windows PowerShell or a desktop app, “my Downloads folder” works as is; only say “my Windows Downloads folder” if you use Ubuntu (WSL) on Windows, which keeps its own Downloads folder apart from Windows.

Everything in the download is fictional, made up for this course. Its twelve pages stand in for the scanned file in the story, with one difference: the words on them are stored as text that a program can read, and the words on a scan are not. If your own files are scans, How real archives differ says what you can do with them.

Open this box once, because it says what each code used further down stands for.

ℹWhat is in casualty-file.zipclick to expand

Twelve page images, one per page of casualty file TRAINING-CF-2214, in file order, named TRAINING-CF-2214_p01.svg to TRAINING-CF-2214_p12.svg. An .svg file is a kind of picture file that can also hold the words on it as text. Each page ends with the line “Fictional training example.” at its foot; that line, the footer, is not part of the page’s own text. You can open any of them in your browser.

Some words in the table may be new: an interment is a burial, and a disinterment is the taking up of a burial in order to move it. Next of kin is the closest relative, the person the authority writes to.

PageHeadingWhat else is on it
p01CASUALTY FILEWalt’s name, his service number TRAINING-SN-204583, and the file number
p02NOTICE OF MISSING STATUSdated 7 April 1945, to Mrs. Ruth Engstrom: missing in action since twenty-two March
p03Kettle Ford, Wis.dated May 2, 1945; “Dear Sir,” and three short lines, signed Mrs. Ruth Engstrom
p04(nothing)nothing but the footer; the paper is a little darker than a front
p05REPORT OF BURIALdated 2 April 1945: an isolated grave about one mile west of Wetkyauk village, Burma
p06RECEIVEDa tilted rubber stamp: RECEIVED, 19 APR 1945, TRAINING-REG-0415, and nothing else; darker paper
p07REPORT OF DISINTERMENTdated 14 February 1946: disinterred from the isolated grave, transferred to Nohorkhat Temporary Cemetery
p08REPORT OF INTERMENTdated 20 February 1946: Nohorkhat Temporary Cemetery, Assam, India, plot TRAINING-PLOT-NK-14
p09IDENTIFICATION MEMORANDUMdated 11 June 1946: “The responsible authority has identified the remains”
p10REQUEST FOR DISPOSITION OF REMAINSdated 15 September 1947: Ruth, his mother and next of kin, asks for burial at Norrlid Cemetery, Kettle Ford
p11SHIPMENT RECORDthe casket left Nohorkhat 28 April 1948 and arrived at Kettle Ford 19 May 1948
p12REPORT OF FINAL INTERMENTdated 22 May 1948: Norrlid Cemetery, lot TRAINING-LOT-KF-27, signed by the funeral director, Arne Solheim

Switch to plan mode

Your AI tool is already open. Switch to plan mode now: Shift+Tab until it says plan, or /plan (the keys for each tool). In plan mode it usually reads your file, asks its questions and shows you a plan before it builds anything; the order can vary.

The conversation

Each message below is an example. Say it your own way.

Say what you want

Say whose file it is, where the pages are, and what you want to do with them:

Walt's casualty file came as twelve page images in the data folder. Help me build a sorter that shows them together, suggests a type for each from its heading, and keeps my own label. Ask me what you need first.

Your AI tool reads the pages and comes back with questions. It may also tell you what it noticed: that page 3 is a letter whose body mentions a Report of Burial, that page 4 is blank, or that some pages disagree with each other about dates and distances. You do not need to act on the disagreements now; here you are only finding out what each page is.

Answer its questions

Answer each in a sentence. These are questions AI tools often ask, with one way to answer each. Yours may ask them in a different order or show a list of choices:

If it asksYou might say
Should your labels be saved to a file here, or only in the browser?Save them to a file in this folder.
Should a suggestion use the heading word for word, or match it to a short list of types?Use the heading as it reads.
What should happen on a page with no usable heading?No suggestion, with the reason. I’ll label those myself.
Just a label, or a note and how sure you are as well?Just a label, and a short note if I want one.
Group the pages by type, reorder them, or show all twelve side by side?All twelve side by side, in file order.
A grid where you click a page to enlarge it, or drag pages into a new order?A grid in file order, click to enlarge. No dragging.
Pick from the suggested types, or type your own label?I’ll type my own; show your suggestion beside it.
Should it point out where pages disagree with each other?Not now. I’ll compare the pages later.

If it asks several questions at once, answer the ones that matter to your research in a sentence, and for the rest say that its suggestions are fine. If it asks something not listed here, answer it the same way, in a sentence.

Read the plan

Next it shows you a plan: what it will build and how it will check it. Read it for six things:

  1. All twelve pages are shown, in file order, and none can be removed or hidden. A blank page stays where it is.
  2. A suggestion comes only from the heading of a page, never from words further down.
  3. A page whose heading is not a printed title, such as a place and a date, or a stamp, or nothing at all, gets no suggestion, or one that says it needs review.
  4. The suggestion and your label are kept apart. A suggestion never fills in or replaces your label.
  5. You get a page list to keep: every page in file order, with its suggestion and your label.
  6. Your page images are read and left as they are.

A first plan often leaves out the page list, and keeps your labels only inside the sorter. Say so in a sentence, in your own words, for example:

Also give me a page list to keep: every page, its suggestion and my label.

When the plan has all six, approve it: if your AI tool offers a choice to go ahead, pick it; otherwise say “Yes, go ahead and build it.” In Codex, press Shift+Tab first to leave plan mode. In Copilot, saying it brings up a choice to go ahead; pick that. Let it build. It may test what it built and tell you how to start it. When it has finished, ask it: “Did you install anything, and where?” Nothing, or something inside this lesson’s folder, is fine for these lessons. If it names anywhere else on your computer, ask it what that is for, and to remove it if you do not want it there.

Look at what it built

Ask it to start the sorter:

Start the sorter and open it in my browser.

Your AI tool may open the page straight from its file, or start a small program on this computer that serves the page at a local address, one ending in a number, such as http://127.0.0.1:8000/ (127.0.0.1 is an address that means this computer); either is fine. If it gives you an address without opening it, copy the address into your browser’s address bar and press Enter. If it says the address is already in use, say: “Something else is using that address. Don’t stop it. Use a different address for my page.” Leave the program running while you work; when you are done, ask your AI tool to stop it. If your AI tool does not take a message after opening the page, wait a minute. If it still does not, close the terminal window, open a new one, type this lesson’s folder line again, start your tool, and say: “Start the page again so it keeps running while we talk.” The page and your saved work are files in the folder, so nothing is lost.

Your sorter will be laid out in its own way. Before you type anything, look at the suggestions. Your sorter may show each heading word for word, or turn it into a short name of its own, such as “Burial report” for REPORT OF BURIAL. Either way it came from the heading.

Label the pages yourself

Now look at each page, enlarged, and type your own label. Where you agree with a suggestion, type it exactly as your sorter shows it, so the page list can tell later where you agreed. Your sorter may save each label as you type it or when you press Enter, or it may have a save button. If saving downloads a file instead, find its name in the browser’s list of downloads and tell your AI tool, for example: “My page list, page-list.csv, is in my Downloads folder. Move that one file into this folder.” If you cannot find where to type a label, tell your AI tool what you see and ask it where the label goes.

Here is how the pages work out, with the reason for each label:

  1. p01: a title that is right, and still not the label. The heading is CASUALTY FILE. Enlarge it: the page holds only Walt’s name, his service number and the file number. It is the cover of the file, not a document inside it. Label it Cover sheet. You may find your sorter already suggests “Cover sheet”, because it turned the heading into a name of its own. Look at the page anyway, and type Cover sheet only once you agree.
  2. p03: the letter that names a form. Its heading is Kettle Ford, Wis., a place, then a date, “Dear Sir,” and three short lines, signed Mrs. Ruth Engstrom. It has no printed title, so it has no suggestion. Read the middle line: “You wrote that a Report of Burial would follow if anything was learned.” She mentions the form; her letter is not the form. Page 10 names Ruth as his mother and next of kin, and page 2 is addressed to her. Label it Letter from next of kin.
  3. p04: the blank back. p04 is the side of the sheet behind p03, and nothing is on it but the footer. Label it Back of p03: blank, and leave it where it is. A list without p04 would be shorter and wrong: every page after it would be numbered one lower than in the file, and every reference to those pages would point at the wrong one.
  4. p05 and p06: a back with only a stamp. p05’s heading is REPORT OF BURIAL; type the suggestion. Its back, p06, holds only a tilted stamp: RECEIVED, 19 APR 1945, TRAINING-REG-0415. A hasty reader either files p06 as a new document called “Received” or sets it aside as an empty back. It is neither: it is the back of p05, carrying a stamp that says the burial report was received on 19 April 1945. Label it Back of p05: received stamp only. Here the order and the paper show which front it belongs to; in a real file you decide that by looking at both sides.
  5. p07 and p08: two titles a careless rule would mix up. p07’s heading is REPORT OF DISINTERMENT, p08’s is REPORT OF INTERMENT. A rule that looked for the letters “interment” anywhere in a line would find them inside “disinterment” and put p07 with p08. Check that your sorter suggests a disinterment for p07 and an interment for p08, then type each suggestion.
  6. The rest. p02, p09, p10, p11 and p12 carry their title as their heading. Enlarge each one anyway, then type its suggestion unless you see a reason not to.

Four of your twelve labels are your own words: p01, p03, p04 and p06. Those are the pages where you saw something a heading could not tell you.

Check it for these

  • The sorter shows twelve pages, p01 to p12, in the order of the table above, and the page list has twelve rows.
  • Page 3 has no suggestion, or one that says it needs review; nowhere is it suggested as a report of burial.
  • Page 7 is suggested as a disinterment and page 8 as an interment.
  • Pages 4 and 6 have no suggestion either, and both are still in place: p04 between p03 and p05, p06 between p05 and p07.
  • Your label stands beside the suggestion in the page list for every page, and is still there after you reload the sorter.
  • When you ask “Have my page images changed since the checkpoint?”, it compares them with the checkpoint and says no.

If something on the list is not true, tell your AI tool in a sentence what you see and what you expected, for example: “Page 4 is missing from the page list. Keep every page, including blank ones.”

Notice what the heading saved you from

Find p03 in your sorter. It has no suggestion, because its heading is a place and a date. Now see what a broader rule would have done. Ask:

What would page 3 get if the suggestion searched the whole page, not just its heading? Try it on a copy in this folder, and leave my sorter alone.

It should come back with a report of burial, from Ruth’s sentence about the report that would follow. Anyone who later went looking for the burial report would find a mother asking for news. Then remove the copy:

Remove that copy, and save a checkpoint.

The heading rule did better, and it still could not do the work. On p01 it had a title and the page was a cover. On p03, p04 and p06 it had nothing to offer, and only you could say what each page is.

Look at the pages yourself. In any file, open each page large before you trust its suggestion: in the sorter, or by asking your AI tool to open a page in your browser, or by opening a page file from the data folder in your browser.

Then ask for one more thing in the page list:

In the page list, mark each page where my label differs from the suggestion.

Your sorter decides how to mark a page with no suggestion: it may mark p03, p04 and p06 as differing, or as having no suggestion. Either is fine. In both, those three pages show no suggestion of their own, and the page list shows your label for each. p01 is marked if your sorter suggested CASUALTY FILE, and not if it already suggested “Cover sheet”. No other page should be marked, if you typed the suggestions as shown where you agreed. If capitals alone make a page count as different, say: “Ignore capitals when you compare them.”

One real run

Here are a few rows of one page list, from a sorter built with Claude Code on 10 November 2026. That sorter shows each heading word for word and keeps the reason when there is no suggestion. Yours will be laid out differently; check it against the list above, not against this one.

PageSuggestionReason for no suggestionMy labelDiffers
1CASUALTY FILE(none)Cover sheetyes
4(none)Page is blank apart from the training footer.Back of p03: blankno suggestion
5REPORT OF BURIAL(none)Report of Burialno
6(none)No heading; only stamp text (‘RECEIVED / 19 APR 1945 / TRAINING-REG-0415’).Back of p05: received stamp onlyno suggestion

Fictional training example.

The page list also has a column for each page’s file name and one for a note, left out here. The “training footer” in the row for page 4 is the footer line, “Fictional training example.” In that page list the agreeing labels were typed in ordinary capitals, such as Report of Burial, and that sorter ignores capitals when it compares.

How real archives differ

Real files have their own papers, under their own titles and in their own order, not the ones in this sample:

  • The US National Archives at St. Louis lists “Individual Deceased Personnel Files (IDPF)” for the “Army, Navy, Marine Corps, Air Force: 1939-1975”, and says they are “Also known as Mortuary or Casualty Files”. It describes their contents in general terms: “documents will vary based on branch of service and time period but may include correspondence, memorandums, teletype messages, and other documentation relating to the death of individual personnel during service.” The same page has a link, “Check which records are already on the Catalog”; follow it to see whether the file you want is already in the National Archives Catalog before you request a copy (National Archives at St. Louis, Frequently Requested Records).
  • A real file may hold different papers under different titles. Sort a real one by what is on its pages, not by what this sample led you to expect.
  • The pages in this sample were made with their words stored as text, so a program can read each heading. A real scan is a picture of a page: to a program it holds no words, and a sorter that suggests from the heading has nothing to read until someone puts that line into words. You can do that in two ways. You can type each page’s heading in yourself; the third request under Keep going below asks your AI tool for a place to do it. Or you can have the words read out of the picture by a program on your own computer, and check what comes back against the page before you rely on it. Do not ask an AI tool to read your real pages: each page you show it goes to the company that runs it. The one place in this track where you may ask your AI tool to read a record is the follow-up in Transcription Review Workbench, only with a public-domain page, and only after your data check allows it. Either way, you still look at every page and label it yourself.

Keep going

Small changes do not need plan mode. Say each in a sentence:

  1. “Let me sort the pages by my label, keeping all twelve and their page numbers.”
  2. “Give me a plain-text copy of the page list I can print.”
  3. “Let me add pages of my own file, typing each page’s lines with the heading first.” Before you rely on it, try it with a few pages you make up.
  4. “Save a checkpoint.” Your AI tool saves a snapshot you can return to (people who use Git call this a commit).

When you have the pages of a real file to sort, use the finished sorter. It runs on your real records by itself, with your AI tool closed. Do these steps in order; the first two happen now, while this folder still holds only practice data:

  1. Go through the data check, the questions in setup about what the material is, who decides how it is used, and which AI tool would see it. Go on only if it allows this use.
  2. While this folder still holds only the practice files, ask your AI tool: “How do I start the sorter myself on pages in another folder, and save my page list there too?”
  3. Write down what it tells you.
  4. Ask your AI tool to stop the page’s program, then leave the tool: type /exit and press Enter (if you use Antigravity, press Ctrl+D with nothing typed instead).
  5. Keep your real files in a folder of their own, outside this course folder, and do what you wrote down. Your page list is saved beside your real files, not in the course folder.

Try another case

Before the quiz, write two or three sentences for yourself. A cousin sends you a scanned pension file of nine pages, with the words already read out of each picture by a program. Page 4’s heading is AFFIDAVIT, and the page says the marriage certificate “is enclosed herewith”; page 5 holds only a stamp reading FILED; page 6 is blank. A sorting rule that searched those words labelled page 4 a marriage certificate and dropped page 6. What would you label pages 4, 5 and 6, and why does page 6 stay?

A good answer labels page 4 by its own heading, an affidavit, not by the paper it mentions; labels page 5 as the back or a stamp-only page belonging to the page before it, once you have looked at both sides; and keeps page 6 in place so the page numbers still match the scan.

Key takeaways

  • Ask briefly, and let your AI tool ask back. Say whose file it is, where the pages are, and what you want; its questions fill in the rest.
  • Read the plan for the research, not the code: every page kept in file order, suggestions from the heading only, your label kept apart, your images left alone.
  • A page’s heading is its own claim about what it is; its body is often about other papers. A rule that searches the body files a letter under the form the letter mentions.
  • A suggestion is a starting point, even when it is right. Your label, given after looking, is the one the page list keeps.
  • Every page stays in the file: a blank back and a back with only a stamp keep their places, so the page numbers match the file.
KNOWLEDGE CHECK

You are sorting a different file: eight scanned pages of a relative's estate papers, with each page's first line typed into a sorter that uses a heading rule like this lesson's. It suggests 'Inventory' for page 2, whose first line is INVENTORY. For page 5, whose first line is 'Dear Sir,' and whose body says 'the inventory you asked for is enclosed', it suggests nothing. Page 6, the back of page 5, is blank. What do you do?

What’s next

The labels you gave the pages here are the page references you need next. In the next lesson you build the Loss and Burial Chain, which sets out loss, first burial, disinterment, transfer and final burial, each step tied to its page of this file, and keeps records that disagree side by side.

intellimetrics · Arlington, VA
© 2026 intellimetrics.net
Search lessons