A custom template system from the mid-2000s era

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.

Why it matters

Very little changes for practitioners; this is a personal anecdote showing LLMs can reverse-engineer and document forgotten legacy code accurately.

Read this as

Simon Willison found a blog post from 2003 where he built a PHP template system inspired by ColdFusion, using XML-style tags to mix database queries into web pages. He had forgotten its extra features, so he gave the 22-year-old code file to Claude, an AI chatbot, to document it. Claude produced good documentation and correctly dated the code to the mid-2000s. The point is showing AI can act as a 'code archaeologist' for old projects.

This is a low-stakes anecdote, not a product or research announcement. Willison used Claude to auto-document a PHP template engine he wrote in 2003, and the output was accurate enough to date and explain the forgotten code. The lesson for managers is modest: AI assistants can cheaply recover knowledge about undocumented legacy systems, reducing reliance on the original authors. No costs, timelines or vendors are given.

Willison fed his 22-year-old TemplateParser.class.php, a PHP template engine with XML tags like <sql> and <output> for embedding database queries, inspired by ColdFusion, into Claude with the prompt 'Write detailed markdown documentation for this template language'. The resulting documentation covered features absent from his original 2003 blog post. The shared Claude transcript summarised the code as 'a custom template system from the mid-2000s era'. No benchmarks or tooling details are provided.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

Simon Willison Claude PHP ColdFusion TemplateParser.class.php

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading