Many libraries' serials holdings are stored only as human-readable, free-text 866 fields rather than as MARC-encoded 853/863 pairs. Converting by hand is slow, different conventions for textual holdings may have been followed, and hand-typed data is prone to typos and other errors.
The goal: a tool that is portable across different collections of records, works on messy holdings as they are (no manual clean-up), and never silently loses anything.
One statement from the Workbench's synthetic sample, and the fields its converter writes for it:
853 31 $8 1 $a v.$b no.$i (year)$j (month)863 40 $8 1.1 $a 27-31$b 4-4$i 1992-1996$j 04-04
I tried three ways to read 866 statements well enough to build 853/863 from them. Each asks something different of the person doing it.
Approach 1
Write the script by hand
Write the parsing code yourself, as a regular expression and a script built against your own collection's 866s.
My starting point was a script USC colleagues wrote for ONE Archives serials migrated from Inmagic, which read 866s written year first (Chung & Pendyala, 2023). I adapted it, but it was written for that one collection and expected a single 866 per record, so it did not translate well to my library's records.
Coding knowledge
The most.
Pros
The results were tuned to a bespoke collection, and I knew the code intimately. I stepped through it line by line, countless times, to see what it was doing. This is how the original parser's regular expression was written.
Cons
It is hard to make portable. A pattern written for one collection's habits does not carry to another's, and generalizing it by hand reached the limit of what I could do. It is only feasible when the 866s are already fairly clean and follow a consistent pattern; the messier they are, the harder it gets. That runs against the aim, which is a tool that works on messy holdings as they are, without a manual clean-up first, and without losing confidence that nothing is being silently lost.
It took me more than six months to adapt the script to my collection, much of it spent teaching myself Python; before that I had only followed online tutorials. The hardest part by far was the single, monolithic regular expression the whole parser rested on. It took weeks, if not months, of testing it against the corpus in regex101 before it accounted for every pattern. It handled most statements well, but some edge cases needed logic I couldn't see how to write. That was the wall, until AI coding assistants came along.
Asking every institution to write its own expression that way seemed unviable, and that is what led me to induce the expressions instead: find the patterns in a file, and generate a rule for each.
Approach 2
Ask a model to read the statements
Send the 866 statements to a large language model through its API and ask it to pick out the parts an 853/863 is built from: volumes, issues and dates. This is not a conversion to 853/863. It is an alternative to working out the patterns.
Coding knowledge
The least.
Pros
With minimal prompting, it picked out the important parts of each statement.
Cons
It is expensive in tokens. The free API access I had to ChatGPT at the time stopped me after fewer than two dozen records, before I could test much. And a model's output is not deterministic, so the same statements sent twice could come back read differently. I didn't test enough to see that happen, but nothing rules it out.
Holdings are public catalog data, so sending them out raised no real confidentiality concern; a stray internal note is the most that could slip through, and that was not how those fields were used here. I kept within USC's policy on sharing data with AI companies.
Approach 3 · chosen
Use AI to build the tool
Describe in plain language what the tool should do and how its screens should work, and have an AI coding assistant (Claude Code) write a deterministic Python application from that. It produced the Pattern Detector and the Converter first, then the Workbench that combined them.
Both began as one-shot prompts: the Pattern Detector from a single prompt in Cursor, and the Converter from handing my original parser to Claude Code and asking for the same thing, done better, with an interface. Those were proofs of concept. The real development began with version numbers.
Coding knowledge
Some. Without my familiarity with code, I couldn't have described the features I wanted as well, or spotted bugs and other problems as they came up.
Pros
The finished tool converts the same file the same way every time, can run on the cataloger's own machine, and needs no model, API key or tokens to run.
Cons
It is a black box. With my own parser I had stepped through every line; now I can confirm the tool works, and add tests so it can't stop working, without fully understanding why it works. That bothered me at first, and less once a test suite and automated checks meant good output couldn't quietly regress. It may also be overengineered, a common complaint about tools built this way, and that only widens the gap: I can't judge, as a senior software engineer could, whether a tool this size needs all the code and tests it has.
Side by side
Compared on
1 · By hand
2 · A model reads
3 · AI builds the tool
Coding knowledge
The most
The least
Some
Getting started
Over six months. Most of that went to the regular expression
Minimal prompting
A first working tool from one prompt
Cost
Nothing
Tokens for every statement. My free API access stopped within two dozen records
About $20/month (Pro plan) to build; nothing to run. A free tier is unlikely to manage a tool like this
Same output every time
Yes
Not guaranteed
Yes
Other collections
Poorly. It was tuned to one collection and needs clean, consistent 866s
Not tested far enough to say
Designed for it. Patterns are found in each file, and it is tested on other libraries' statements
Understanding the code
Fully, line by line
No code to read. The model's reading can't be stepped through
Partly: a black box, checked by tests
Part 2
The approach chosen: AI-assisted development of a deterministic tool
Built with an AI coding assistant; runs without one
The result is the MARC Holdings Workbench, a Python application. It uses no AI when it runs: no model, no network calls, no API key, and nothing leaves the machine. The same file converts the same way every time. The AI was in how it was built. A library paraprofessional, not a developer, worked with an AI coding assistant, release by release.
How the Workbench reads a statement
Two parts read every file. The pattern detector sorts all of a file's 866 statements into groups of the same shape, so that a cataloger decides what something means once per group rather than once per record. The standard parser reads each statement into volumes, issues and dates, and stops rather than guesses. Here is the statement from the top of the page, as the detector reads it.
The detector's own output for the statement in the first figure. The colors follow its subfields throughout:
$a volume$b issue$i year$j month
Each piece is recognized by a fixed list of rules, tried in order, and the first rule that fits wins. The order is what makes it read the way a cataloger would: 1992 is a year before it is a number, Nov. is November before it is "no" followed by "v.", and a caption counts only where a word starts. Spaces are set aside, so v.1 and v. 1 have the same shape. The long dash marks the hyphen that divides the start of the holdings from the end; the hyphen inside the dates means "through".
3 · A matching rule, with a slot for each value
Statements with the same labels in the same order are one group, whatever their numbers. For each group the detector writes a regular expression: the captions it saw, and a named slot for each value. This group's is 1,210 characters long, because it accepts any month or season, any spacing, and combined issues such as 8/9. Simplified, with each slot named:
Each group appears as a card: its shape, how many statements it holds, and a row for each slot with the detector's guess filled in. For each value the cataloger can set what it is (enumeration, year, month or season, day, or not encoded), its caption, its level, and whether it opens or closes the range. What changes upon confirmation depends on the group:
Nothing to decide. In this group every value carries its own caption, so the parser reads these statements in full and the pattern is confirmed without asking.
A caption to supply. In 39 no 1 (Spring 1995), from the same sample, the 39 has no caption; its shape is # ISS(CHRON YEAR). The card suggests v. but still asks. On its own the parser writes $a (*), the standard's placeholder for an unnamed level; with v. confirmed, the 853 reads $a v.$b no.
A reading only the cataloger can give. A lone number with no caption and no date could be a volume, an issue or a year. The parser holds it rather than guess, and the meaning confirmed on its pattern is what converts it.
5 · The parser reads; the pattern fills the gaps
A confirmed pattern decides which statements are its own, and supplies only what the parser cannot know: the meaning of a bare number, or a caption for a level written without one. It never overwrites a caption the statement prints. Wherever a statement says everything itself, the pattern and the parser alone write the same 853 and 863, and a test checks that both routes agree.
What the cataloger controls
The cataloger decides what "correct" means, and the Workbench is built to take those decisions: on a pattern (a group of statements with the same shape), on one record, or for the whole file.
On a pattern
Confirm or change what each value is, its caption and its level.
Mark a shape Skip to handle it by hand; its statements are left exactly as they are.
Test the expression against statements, or edit it by hand.
Export the pattern library and load it next week, or on another collection.
On one record
Edit an 866 before conversion, to fix a typo such as (Fal 1995-Fall 1999) or a wrong caption. The corrected text goes into the file, and "Put back as uploaded" undoes it. Split divides one 866 in two, such as where a serial changes from months to seasons.
This record's 853: its frequency ($w), numbering ($v), issues per volume ($u), and a caption for any level its statements leave blank.
Skip the record, give each shape its own 853, mark it reviewed, or leave a note for the log.
For the whole file
Holdings level: detailed (4) or summary (3).
Subfield convention: MARC 21, or a house convention adjustable subfield by subfield; the 853 indicators and numbering continuity ($v).
Whether the parser converts statements no pattern claims, and strict mode: convert only what it reads in full.
What to do when a value would be left out to fit MARC: convert and mark it, hold that statement, or leave the record as uploaded.
Whether to remove each 866 (only once it has been converted), and whether to clear existing 853/863s first.
Every record says what happened to each statement: converted, to check, left out to fit MARC, held, or belongs in an 867 or 868. A "Needs attention" filter gathers what is left to do, and the downloadable log lists every decision ("Edited by you", "853 set by you", "Skipped") beside what the tool did.
How it was built
What the “releases” were. The Workbench went from version 0.1.0 (July 24, 2026) to 0.50.0 (November 10, 2026): 119 numbered versions in 15 weeks. These weren’t releases in the usual software sense of a batch of changes put out every few weeks. Up to 0.49.0, each was one piece of work given its own number as it was finished, so the cataloger always knew which version they were testing:
Most were small. The median version holds 3 changes, and 23 hold just one. The 119 came out on 30 different days, and as many as 10 on one day.
69 went up only in the last number (fixes and small additions, like 0.44.1), and 50 in the middle number (something new or changed, like 0.45.0).
A few were large. 0.6.0, for example, holds 28 changes, because the numbers stood still for a week in August while the three original tools were being built.
So “119 releases” is accurate but overstates how much each one was. It’s better described as 119 small, numbered steps, each with a changelog entry written for catalogers. From 0.50.0 on, changes are gathered and a version is numbered only when a set is worth installing, which is the more usual practice; anything not yet released is listed in the Workbench's About box.
Each dot is one numbered version, stacked by day; 84 of them came in September.Versions as a table
Month
Versions
2026-07
2
2026-08
6
2026-09
84
2026-10
26
2026-11
1
Date
Version
Milestone
2026-07-24
0.1.0
First working version
2026-09-16
0.11.0
Workbench replaces the other two
2026-09-25
0.28.0
Simulated Alma round trip
The working rules
These are written down in the project's contributing guide "because most of them were arrived at by getting something wrong first."
Measure before you change. Count what actually happens on the corpus before writing a fix.
Nothing disappears silently. Every value is encoded, dropped with a warning that names it, or held for review with nothing written.
One reader of holdings. One parser reads every statement; a confirmed pattern supplies only what it cannot settle.
If a fix needs the tests rewritten, stop. It is usually arguing with the design rather than fixing a bug.
Write the changelog for catalogers. Say what changed about the output or the screen, not how the code changed.
The turning point: silent losses
A refusal is safe: nothing is written and the 866 stays. A silent loss is not: the tool writes the 853/863, removes the 866, and drops a value (a volume, an issue, a year) with nothing on screen to say so. Measured on a corpus of real 866 statements, 36 of 112 lost values silently. Now none do; the ones that cannot be fully read say what they left out.
Zero is what was measured, not a guarantee. Before 0.50.0, a one-shot review of the repository by Fable 5.2, a newly released Anthropic model with none of the project's history, found a shape that is in none of the test sources: a date with a doubled hyphen, as in v.3 (1990--1995), kept its first year and dropped the rest without a word. It is now marked to check. The project's conversion audit, which checks every number going into a conversion against the fields coming out, can be run on any new file to look for the same.
Outcomes as a table
Outcome
September 1, 2026 (0.6.0)
November 10, 2026 (0.50.0)
Converted cleanly
67
89
Converted, said what it left out
3
22
Converted, losing values silently
36
0
Converted nothing (866 kept)
6
6
Statements
112
117
On real data
Tested on a real export of 372 records from Alma.
holdings statements
1,057
values left unaccounted for
0
drift in a simulated Alma round trip
0
of Alma's own 866s reproduced by the simulation
48/48
The round trip is simulated. Alma regenerates an 866 from the 853/863 it is given; the Workbench imitates that step, then checks that converting the regenerated 866 gives back the same 863s. The imitation was checked against the 48 866s in the export that Alma itself had built, and reproduces all of them.
Two tools became one
The Pattern Detector and the Converter came first. On August 25 the Workbench arrived to combine them: find the patterns, confirm what they mean, convert in one place. For three weeks all three ran side by side, duplicating each other's code, until the copies drifted far enough that one deleted the other's pattern libraries. On September 16 the Workbench absorbed both, and they were retired.
The human in the loop
The AI writes the code; I decide what "correct" means. Using the tool, I found two bugs the tests had missed:
In v. 15 no. 6 - v. 23 nos. 2/3 (Nov/Dec 1994 - Late Summer 2002), a confirmed pattern coded the last issue as Summer ($j 22) and dropped "Late" without a word. The tests missed it because they checked the standard parser, not patterns. It also can't simply be coded: the serial may have an Early Summer issue too, and coding both as Summer would merge two issues into one. Only the piece can settle it, so the season is now left out, named, and the record flagged for a person to check. This was fixed in 0.9.6.
In v. 58 Suppl. (Sep 2003), confirming the pattern it arrived with wrote the volume and date and dropped "Suppl." without a word. I found it in a demo dry run, and it was fixed in 0.32.0.
Lessons, and what's next
A script reads what it was written for and passes over the rest. In the original clean-up project (Chung & Pendyala, 2023), which this work builds on, about 600 of 5,254 records came out with no 863. They were found afterward by looking for what was missing. That is the ordinary risk of matching patterns, not a fault of that script, and it matters most when the original 866 is removed so the ILS can rebuild it: a statement that was skipped or only partly read can take the only record of what is held with it. That risk led to the rule "Nothing disappears silently," which was fundamental to how the Workbench was developed. It makes the check part of the tool. Every value in a statement is encoded or named as left out, or the statement is held for review and its 866 kept.
Decide whether you can work with code you don't fully understand. That is the real trade in building with an AI coding assistant, especially for someone who isn't a programmer. What made it acceptable for me was a test suite and automated checks: I may not know why every line works, but I know the good output can't quietly stop. Passing tests show that the tool works, though, not that it was built well. It could be overengineered, or bloated beyond what the job needs, which is a common critique of "vibe-coded" applications, and I think only an experienced software engineer could properly judge that. That may also be where things are heading: people without a programming background using AI to build tools for their own needs, while software engineers build the guardrails that let that way of working happen safely. That is speculation, but it is worth raising in any discussion of where this goes next.
The models improved as I worked, and so did what was possible. My earliest attempts to use AI to get past the roadblocks in my own parser went nowhere. As new models were released over the months I worked on this, they broke through those same barriers, and later implemented new features and ideas from a single prompt, often without a hitch. Watching the models improve in real time, and sometimes get worse after an update, has been one of the most interesting parts of the project.
AI is at its best building the tool, not being it. Using AI to create tools for very specific, technical needs, from plain-language descriptions, is quickly becoming one of its best uses.
What's next. The Workbench is paused at version 0.50.0 until after the conference. When work resumes, there are still bugs and edge cases to work through. Next is testing it on more real holdings, in actual .mrc files: I have asked my technical services colleagues for examples they can share. I would also like someone with software engineering experience to review it, for what I can't judge myself: is the tool overengineered? Does a tool this small need such a large test suite? I don't know how to begin measuring that, and I think it takes someone who has built and maintained software to say. All of it is working toward a 1.0 release, once I'm confident the tool is ready for it.
A proof of concept, paused at version 0.50.0 until after the conference, not a supported service.
References
Chung, M., & Pendyala, P. C. (2023). Enhancing serials holdings data: A Pymarc-powered clean-up project. Code4Lib Journal, (58). https://journal.code4lib.org/articles/17839