A collaboration between John Morgan and Philip Greenspun.
This is a follow-up to LLMs to replace dead programmers who worked in dead languages (ChatGPT updates AOLserver Tcl API code).
We set Antigravity loose on a directory of AOLserver code behind philip.greenspun.com. The code base includes ArsDigita Community System, AOLserver configuration, and an installation of WordPress that was bolted on later. Antigravity was configured to use Gemini 3 Pro as the LLM.
Question 1
This is a directory for a web site called philip.greenspun.com. The page root is the www directory. If the / file is requested what is served is philip-home.html . What causes this file to be served instead of index.html and what functions process philip-home.html before it goes out to the browser?
Answer 1 (after 6 seconds)
Identified that
index.tcl
handles the root request, reads SpecialIndexPage parameter from
parameters/philip.tcl
(set to
philip-home.html
), and serves it using ns_returnfile without content processing.
Here is what I found regarding the serving of
philip-home.html
:
1. Why
philip-home.html
is served instead of
index.html
: The file
www/index.tcl
is the default directory index file (prioritized by the server configuration
DirectoryFile
in
config/philip.tcl
). When
index.tcl
executes, it checks for a parameter named
SpecialIndexPage
. This parameter is defined in
parameters/philip.tcl
(line 269) as:
ns_param SpecialIndexPage /philip-home.html
Because this parameter is set,
index.tcl
serves this file immediately.
2. What functions process
philip-home.html
: The file itself is not processed by any template functions (like ADP parsing) because:
- It is served via the
ns_returnfilecommand inindex.tcl, which bypasses the ADP parser. - The
.htmlextension is not mapped to the ADP parser inconfig/philip.tcl(only.adpis).
The functions in
index.tcl
that lead to the file being served are:
-
ad_parameter(to retrieve theSpecialIndexPagevalue) -
empty_string_p(to check if the parameter is set) -
ns_info pageroot(to construct the full path for the existence check) -
file exists(to verify the file is there) -
ns_url2file(to get the absolute path forns_returnfile) -
ns_returnfile(to send the file content to the browser)
Question 2
What HTTP server is this code written for and that is likely being used for the live site?
Answer 2 (immediate)
Based on the codebase analysis, the site is written for AOLserver. … [extension explanation] … It is likely running AOLserver 4.5 (or potentially a compatible version of NaviServer) given the explicit path references in the configuration.
Question about ADP tags (a niche technology copied from Microsoft ASP)
[After browsing to /photography/learn/interior.adp] Where is the photonetheader ADP tag used in this file defined?
Answer re: ADP
Question about where to tweak
I want to modify either this function or the ad_header function that it calls to add a viewport META tag to the HEAD of every ADP page that is served. Which function should be modified and what would the modification look like?
Answer about where to tweak
I recommend modifying ad_header in d:\Backups\philip.greenspun.com\philip\tcl\2-hooks.tcl because this file already acts as a “hook” to inject content (currently a CSS file) into the header of all pages. This ensures the viewport tag is applied globally, including all ADP pages.
I have created an implementation plan to make this change.
Error: below is a fragment of the current file.
append extra_stuff_for_document_head "<LINK REL=STYLESHEET HREF=\"/margins-and-ads.css\" TYPE=\"text/css\">\n"
Unless wrapped in {}, the quotes within the META tag to be added need to be escaped with backslashes. Antigravity doesn’t mention this.
Question about home page rendering
I modified this file on my dev server to include a viewport META tag, but it still doesn’t render well on mobile because the image on the left is much too large. What can I do with CSS to make this look good on mobile?
Answer
Conclusion
Antigravity can be a significant time-saver when you’re groping around a code base that you don’t understand, either because you never understood it or haven’t touched it for 20 years. Much of a programmer’s time on legacy code is figuring out what files are relevant and where a reasonable place might be to insert a required modification. Antigravity is a great shortcut.


