Engagement with AI

AI-assisted upgrade of Kairos

 


Account of an upgrade process written primarily by Claude (Anthropic), the AI assistant used throughout the project, at the request of the site's author, October 2026. Offered as testimony rather than demonstration: what it was actually like for a scholar who is not a systems administrator to move a large legacy archive onto current software with an AI as the only technical partner. The latter part sets out the working conventions that emerged, and what would be recommended to anyone undertaking something similar.

The situation

Kairos had run for years on Drupal 7, which reached the end of its supported life. Drupal 7 cannot simply be "updated" to a current version: the software was rewritten in between, so the site had to be rebuilt on Drupal 11 and its data brought across. Behind it stood a processing system in OpenInsight, developed by the author over two decades, which turns some 2,500 hand-written documents into the records Kairos displays.

The author's competence lay where it mattered most and is hardest to replace: in the content, in sixty years of authoring conventions, and in that OpenInsight system. It did not lie in Linux command lines, Drupal configuration, Composer, server permissions or web hosting control panels. Those were exactly the layers the upgrade required. There was no developer to hand the work to. The project ran from June 2025 to October 2026, intermittently, through a great many working sessions in conversation with an AI.

The working environment

Four technical layers were in play at once: the OpenInsight procedures on a Windows laptop, the ordinary Windows desktop tools, the command line of a Linux web server, and the Drupal administration pages in a browser. The work was done on a small laptop, often in different locations, so that few windows could be open side by side and a change of place could interrupt a sequence half-way. The web host periodically logged the session out. None of the programs involved (the chat window, a text editor, a file manager, a terminal program and several browser tabs) was designed to communicate with any of the others.

The inherited processing system

Much of the work lay not in Drupal at all but in the processing system behind it. The procedures that read the site's pages and turn them into the records Kairos displays were first written long ago by the site's author in R/BASIC under Advanced Revelation (AREV), a DOS-based database environment, and later carried over to its Windows successor, OpenInsight. They had grown by accretion over some twenty years: switches set and since forgotten, deliberate shortcuts recorded only in the code itself, and debugging stops left in place to facilitate checking when needed.

The AI's engagement with that code began a year before the upgrade itself, when some twenty procedures were reviewed simply to document them more thorougly. The decision then was not to touch their logic at all, for fear of disrupting what worked: each was annotated in place, with its executable logic left untouched, so that the commented copy could be checked line by line against the original.

The code carried the marks of the constraints under which it was written. Under AREV a single record could not exceed 64 KB, while many articles run to 150 KB or more: scraping such documents, and storing them in parts that could later be reassembled for output, called for considerable ingenuity. The question of that limit was raised and noted in the first review, since several processes depended on handling documents in parts. Folder names were limited to eight characters. The DOS environment itself obliged an outdated version of Windows to be kept running long after it ceased to be maintained, until the move to OpenInsight removed that dependency.

The move to Windows, and later to an upgraded OpenInsight on a new machine, brought other legacy behaviour to light:

  • files opened by the procedures and never closed, accumulating until the system misbehaved;
  • practices that had worked under the older engine but hung or failed under the newer one, such as interactive message boxes and certain ways of preparing a selection of records;
  • text read byte by byte from documents written over decades in mixed character encodings, which had to be recognised and normalised before anything reached the web.

Within the upgrade project a greater effort was made to rationalise the procedures: a single shared layer for opening tables, shared routines for cleaning text and for formatting output, consistent diagnostics, and the removal of what had become dead or dangerous. Care was nevertheless taken not to redesign the logic by which documents are handled in parts. The procedures therefore still carry legacies of the 64 KB limit, and some inefficiency with them, which a more insightful redesign of the scraping logic could remove, but which are not worth disturbing while they work. The procedures written in the course of the project are in the same language and follow the same structure: they extend the inherited system rather than replacing it, keeping two decades of conventions intact and every step within reach of someone able to read and run that code.

How the work actually moved

An AI in a chat window cannot touch a server. Every action therefore travelled a relay chain, run by hand, dozens and eventually hundreds of times:

  1. the AI drafts a script or command in the chat;
  2. it is copied into a text editor and saved on the laptop;
  3. it is transferred to the server with a file manager;
  4. it is run in a terminal window;
  5. the output is selected, or photographed as a screenshot;
  6. the output is pasted back into the chat for the AI to read.

Six programs per cycle. Early on, a large part of the effort went not into the problem but into remembering the sequence itself: which window, which folder, which form of a command. A hidden cost lay in recalling or reconstructing full commands, since none of these programs shared a history with the others. Much of the eventual speed came not from better tools but from familiarity with these few routes, and from two late-arriving aids: the terminal's own memory of previous commands (recalled with the up-arrow key), and "execution cards", a single document per working session holding every command in order, ready to copy.

The return journey had its own cost. Screenshots were the habitual way of passing results back, but an AI cannot quote, count, search or compare the contents of a picture, and pictures are expensive for it to process. Text selected and copied from the terminal proved cheaper and far more precise; for long outputs, writing them to a file and attaching the file was better still. Screenshots remained the right choice only where the evidence was the appearance of a screen.

For readers interested in the mechanics, a separate page, Time and motion of the upgrade, maps the pathways along which the work travelled, the geography of folders, and the preparatory interview that was never held.

The economics of changing route

The author was deliberately reluctant to adopt new tools mid-campaign. As stated in the course of the work: new routes carry a learning penalty and new uncertainties; old routes are slow but carry none. The middle of a repair is the wrong moment to pay a learning penalty on the means of transport while the cargo itself, the data, is under repair. Several faster routes were considered and declined on that ground. A new route is worth adopting only when:

  • the saving recurs many times over;
  • it can be tried out on a throwaway task rather than a live one;
  • it falls back gracefully to the old route if it fails half-way;
  • it is introduced alone, and never in the middle of an incident.

What was hard

  • Several worlds at once. Windows paths and Linux paths; a database on a laptop and a database on a server; the folder a site lives in and the address it answers to. Many stumbles were simply commands issued in the right form for the wrong world.
  • Software that misreports itself. A browser import announced "failed" while completing successfully in the background. A save returned an error page (503) after it had in fact succeeded, so a second attempt was refused as a conflict. A setting reported as saved did nothing, because a hidden permission kept the search box from being shown to visitors. Each of these cost an evening before it was understood.
  • Old data, honestly imperfect. Six decades of pages carry six decades of habits: mixed character encodings, stray quotation marks, pages with two different titles, links written in a dozen styles. Every one of these surfaced as a failure somewhere downstream, and had to be traced back to its source.
  • Caution as a cost. With 50,000 records and no technical colleague, a wrong move could not be casually undone. Backups, dry runs and verification steps were essential, and each one added time.

The AI's own errors

A fair account must record that the AI made mistakes, some of them costly in time. It proposed Windows commands for a Linux server; wrote a search pattern that matched its own label and so reported zero where there were thousands; recommended the wrong tool for a script; gave instructions for screens that turned out to look different on this particular installation; and more than once diagnosed confidently from incomplete evidence. These were mostly caught by the author: by noticing that a result contradicted what he knew of his own corpus. That knowledge, held by no document, was the project's most reliable error detector.

Friction also had a credit side. The slow, repetitive cycle of running a procedure, exiting and checking is what revealed that some OpenInsight procedures were leaving files open behind them; and the habit of checking every count is what revealed that a batch import was creating some records twice. A faster, less watchful route might have missed both.

What made it work

  • Prediction as verification. Before every operation that changed data, the AI stated what should happen in numbers ("expect 1 created, 633 updated"). Success then became a pass/fail check instead of an impression, and any deviation was visible at once.
  • Fixing at source, not in the display. Early repairs were made inside Drupal; they did not survive the next import. The rule adopted was that every defect is corrected in the source pages or in the processing procedures, so that each regeneration makes the whole cleaner instead of undoing patches. The same rule came to apply to these explanatory pages: they are edited as files on the author's computer, and copied into Drupal by a script, rather than edited in Drupal's own editor.
  • A living record. Decisions, commands and findings were written into project notes at the moment they were made, so that work could resume after a break of days or weeks, on another computer, in a new conversation, without reconstructing what had been done.
  • Scripts with a home and a label. Every helper script came to live in one folder, outside the public website, headed by a line saying what it does and whether it is a one-off or a keeper. One unlabelled script found in the course of tidying would, if run, have deleted every record on the site.
  • Look first, then act. Any script able to change or delete data was written to run first in a "dry run" mode, reporting what it would do without doing it. Standing checks were rerun after every import, rather than improvised each time.
  • Full replacements instead of edit instructions. Instructions to "insert these lines after line so-and-so" in long procedures proved error-prone. Delivering the complete revised procedure, to be pasted whole, removed a whole class of mistakes.
  • A clear division of labour. The AI drafted, diagnosed from evidence and kept the record; the author executed every step, supplied the knowledge of the corpus, and made every judgement call, including, repeatedly, the call that "enough may be enough".

What would be done differently

Most of the friction lay in the mechanics of the collaboration rather than in the problems themselves, and most of the conventions above emerged only after weeks of work. Each could have been decided in the first week. A short initial conversation about the working environment would have settled at the outset what was otherwise discovered over months. Such a conversation would cover:

  • the computer and screen size, and whether work will move between locations;
  • which programs are already familiar, and which could be changed without strain;
  • tolerance for learning new tools, and when;
  • how results will be passed back to the AI (copied text rather than pictures);
  • where scripts will be kept, and how they will be labelled.

Recommendations

For any long project undertaken with an AI as technical partner:

  1. Begin with the conversation about the working environment.
  2. Settle from the first day that results are returned as text, not pictures.
  3. Give scripts a home, a header line and a label (one-off or keeper) from the very first script.
  4. Ask for the expected result, in numbers, before every operation that changes data.
  5. Keep one living record of decisions, written at the moment of decision.
  6. Change working routes only between campaigns, never during one.

Bearing witness

The point of recording this is not that the upgrade was heroic, but that it was possible. A scholar with deep knowledge of his own material and limited command of recent developments in the surrounding technology was able, with persistence, to carry a twenty-year-old system onto current software and put it live, without hiring a developer. It was also slow, frequently frustrating, and dependent on a degree of stamina and caution that should not be assumed of everyone. The AI made the work feasible; it did not make it easy. Both halves of that sentence are worth knowing for anyone contemplating something similar.