검사기는 설명 문단의 인용을 보고 통과했다
Claude 빌딩은 Claude Code 세션을 3D 사무실 건물의 직원으로 보여 주는 화면입니다. 저장소 문서에는 이 화면이 지키는 수가 몇 개 적혀 있습니다. 층은 최대 8층이고, 직원은 한 자리에 도착하면 최소 6초 머물며, 30분 동안 조용하면 퇴근합니다. 셋 다 코드의 상수 하나로 정해집니다.
문서가 단언한 수를 코드와 대조하는 검사기는 계측기를 놓은 날부터 앱 저장소마다 두고 있습니다. 어긋나면 문서의 줄번호를 찍고 실패로 끝나며, 어느 쪽이 맞는지는 사람이 정합니다. 빌딩 저장소에는 아직 이 검사기가 없어서, 10월 30일 새벽 밤 작업을 처음 시험할 때 이 일을 맡겼습니다. 밤 작업은 저장소에 남은 일 가운데 혼자 끝낼 수 있는 것을 하위 에이전트가 처리하고, 다른 에이전트가 검토하는 구조입니다. 첫 판은 0시 21분에 들어갔고 고친 판은 3분 뒤에 들어갔습니다.
수는 문서의 문장에서 읽는다
검사기는 수를 스크립트에 적지 않습니다. 문서에서 정해진 꼴의 문장을 찾아 수를 읽고, 코드의 상수와 견줍니다. 층 수라면 "최대 N층(server.py MAX_FLOORS)" 꼴의 문장에서 N 을 읽어 server.py 의 MAX_FLOORS 와 맞춰 보고, 머무름은 sim.js 의 DWELL, 퇴근은 LEAVE_MIN 과 맞춥니다. 8층에는 기타 층이 들어 있어서, 프로젝트를 일곱으로 자르고 기타를 붙이는 줄이 그대로인지도 같이 봅니다. 표준 라이브러리만 쓰고 맥에 들어 있는 파이썬 3.9 로 돕니다.
일꾼 에이전트는 검사기를 만든 뒤 문서와 코드를 임시 폴더에 복사해 하나씩 틀리게 바꿨습니다. 문서의 층을 9로, 머무름을 5초로, 퇴근을 20분으로 바꾼 셋에 코드의 DWELL 을 4로 바꾼 것, 자르는 줄을 바꾼 것, 문장 꼴을 지운 것까지 여섯 경우였습니다. 여섯 모두 실패로 끝났고, 바꾸지 않은 사본은 통과했습니다.
설명 문단이 같은 문장을 인용하고 있었다
일꾼은 문서의 빌드·실행 절에 검사기를 설명하는 문단도 넣었는데, 검사기가 무엇을 읽는지 알리려고 세 문장을 따옴표 안에 그대로 옮겨 적었습니다. 검사기 쪽 규칙은 "같은 문장이 여러 곳이면 모두 잰다"였습니다. 수를 두 곳에 적었으면 둘 다 맞아야 한다는 뜻이니, 의도는 더 엄격한 쪽이었습니다.
검토 에이전트가 diff 를 읽고 여기를 짚었습니다. 문장 꼴마다 문서에서 맞는 곳이 둘이 됐습니다. 구조 절의 진짜 단언 줄과 설명 문단의 인용입니다. 누군가 단언 줄을 "최대 10층(MAX_FLOORS)"으로 고쳐 쓰면 그 줄은 꼴이 달라져 검사기 눈에서 빠집니다. 인용은 여전히 8층이라고 말하고 코드도 8이니 통과합니다. 문장을 못 찾았을 때 내는 실패도, 인용이 늘 찾히니 나오지 않았습니다.
꼴은 그대로 두고 수만 바꿨다면 첫 판도 잡았습니다. 맞는 곳을 모두 견주니까요. 구멍은 꼴과 수가 함께 바뀔 때만 열렸습니다. 검사기가 가장 필요한 때는 누군가 그 줄을 다시 쓸 때이고, 다시 쓰다 보면 괄호 안의 꼴도 함께 바뀌기 쉽습니다. 일꾼의 여섯 경우에는 이 경우가 없었습니다. 수를 틀리게 한 판과 꼴을 지운 판은 있었지만, 꼴을 바꾸면서 수도 바꾼 판은 없었습니다.
꼭 한 곳에서만 찾는다
고친 판은 두 군데를 바꿨습니다. 설명 문단에서 인용을 빼고 어느 절의 어느 줄을 읽는지만 적었고, 문장 꼴은 검사기 맨 위 설명으로 옮겼습니다. 검사기는 꼴마다 문서에서 맞는 곳이 꼭 하나여야 하며, 둘 이상이면 "N곳에서 맞음"과 그 줄번호들을 찍고 실패합니다. 둘 이상인 것 자체를 어긋남으로 보는 것은 그중 하나의 꼴이 바뀌어도 나머지가 맞아 통과하기 때문입니다.
일부러 틀리는 판도 열 경우로 늘렸습니다. 앞의 여섯에, 세 단언 줄의 꼴만 하나씩 바꾼 셋과 층 문장을 다른 절에 그대로 옮겨 적은 하나를 더했습니다. 열 경우 모두 실패로 끝났고 바꾸지 않은 사본은 통과했습니다.
이 글을 쓰며 두 판을 사본에서 다시 돌려 봤습니다. 층 줄을 "최대 10층(MAX_FLOORS)"으로 바꾸면 첫 판은 통과했고, 고친 판은 "문서에서 찾지 못함"으로 실패했습니다. 꼴은 두고 수만 10으로 바꾸면 두 판 모두 그 줄번호를 찍고 실패했습니다.
짚은 쪽과 재현한 쪽
밤 작업에는 역할이 셋입니다. 예약 세션이 일을 고르고 정리하며, 일꾼과 검토자는 따로 도는 하위 에이전트입니다. 검토자에게는 파일을 읽는 도구 셋(Read·Grep·Glob)만 줬습니다. 고치지도 실행하지도 못하니 검토자의 지적은 읽고 따진 추론이고, 부르는 쪽이 그 지적 하나를 사본에서 재현해 본 뒤에 일꾼에게 돌려보내도록 정해 두었습니다.
이번에도 부르는 쪽이 사본에서 층 단언 줄 하나만 "최대 10층"으로 바꿔 돌렸고, 종료 코드는 0이었습니다. 헛통과가 재현된 것입니다. 그 결과를 일꾼에게 넘겨 고친 판을 받았고, 같은 재현이 이번에는 1로 끝났습니다.
정작 검증 기록에는 헛통과를 "검토자가 재현"했다고 적혔습니다. 실행할 수 없는 쪽이 재현했다는 문장입니다. 두 번째 검토도 fix 였는데, 지적은 바로 이 한 낱말이었습니다. 돌려보내기는 한 번까지라 고치지 않고 아침 보고에 남겼고, 그날 낮 12시에 "부르는 쪽이 재현"으로 바로잡았습니다. 낱말 하나였지만, 읽어서 짚은 것과 돌려서 확인한 것이 섞여 적히면 나중에 읽는 사람은 아무도 돌려 보지 않은 판단을 확인된 사실로 받게 됩니다.
이 일 하나에 든 시간은 약 5분 50초, 토큰은 약 64만이었습니다. 한 번 돌려보내지 않았다면 약 3분 40초와 30만이었습니다. 시험 기록은 이 시험의 가장 큰 결과를, 일꾼 혼자서는 못 본 헛통과를 검토 단계가 잡은 것으로 적었습니다.
검사기가 보지 않는 것
퇴근 문장은 문서의 검증 상태 절에 있습니다. 그 줄은 30분 조용하면 퇴근하는 것을 "실제로 기다려 보지 않았다"는 줄이고, 앞에 아직 확인하지 못했다는 표시가 붙어 있습니다. 검사기는 이 줄에서 30을 읽어 코드의 30과 맞춥니다. 문서와 코드가 같은 수를 말한다는 것까지가 검사기가 아는 전부입니다. 직원이 정말 30분 뒤에 나가는지는 아직 아무도 재지 않았고, 검증 기록에도 스크립트는 글자만 읽는다고 적어 두었습니다.
검사기가 생각보다 넓게 읽어서 틀린 일은 전에도 있었습니다. 계측기를 놓은 날에는 검색이 검사 스크립트 자신과 문서까지 세어서, 엔진 설정이 한 곳 다르다고 보였습니다. 그때는 실패로 떠서 바로 눈에 띄었습니다. 이번에는 통과로 떠서 시험을 만든 일꾼도 보지 못했습니다. 시험이 통과하면 그 시험이 무엇으로 실패할 수 있는지부터 보라는 것은 원본보다 재는 도구가 먼저 틀렸다에서 정리한 것과 같습니다.
정리하면
검사기가 문서에서 문장을 찾는다면 몇 곳에서 찾았는지도 셉니다. 둘 이상이면 하나가 다른 하나를 가립니다.
검사기를 설명하는 글에는 검사기가 찾는 문장을 옮겨 적지 않고, 그 문장이 어디에 있는지만 적습니다.
일부러 틀리는 판에는 수를 바꾼 판 말고도 꼴을 바꾼 판과 다른 곳에 옮겨 적은 판을 넣습니다.
읽어서 짚은 것과 돌려서 재현한 것을 기록에서 나눕니다. 실행할 수 없는 검토자에게 재현을 적지 않습니다.
검사기가 통과하면 문서와 코드가 같은 수를 말한다는 뜻까지입니다. 그 수대로 움직이는지는 따로 잽니다.
빌딩의 숫자 파일을 공개 직전에 막는 다른 검사기 이야기는 누적 합계를 빼면 그날 숫자가 나왔다에 있습니다.
Claude Building is a screen that shows Claude Code sessions as staff in a 3D office building. The repository's document states a few numbers this screen holds to. There are at most 8 floors, a staff member who arrives at a spot stays for at least 6 seconds, and after 30 minutes of quiet they leave for the day. Each of the three is set by a single constant in the code.
Since the day the gauges went in, I have been adding to each app repository a checker that compares the numbers its document states against the code. On a mismatch it prints the document's line number and ends in failure, and a person decides which side is right. The building repository did not have this checker yet, so in the early hours of October 30, when I first tried out the night run, I handed it this job. In the night run, a subagent handles whatever remaining tasks in a repository it can finish on its own, and another agent reviews the work. The first version went in at 12:21 a.m. and the fixed version 3 minutes later.
The numbers are read from the document's sentences
The checker does not write the numbers into the script. It finds sentences of a set form in the document, reads the number, and compares it with the constant in the code. For the floor count it reads N from a sentence of the form "at most N floors (server.py MAX_FLOORS)" and checks it against MAX_FLOORS in server.py; the dwell is matched against DWELL in sim.js, and leaving against LEAVE_MIN. The 8 floors include an Other floor, so it also checks that the line that cuts the projects to seven and adds Other is unchanged. It uses only the standard library and runs on the Python 3.9 that comes with the Mac.
After building the checker, the worker agent copied the document and code into a temporary folder and made them wrong one at a time. There were six cases: three in the document, changing the floors to 9, the dwell to 5 seconds and the leave time to 20 minutes, plus changing DWELL in the code to 4, changing the cutting line, and deleting a sentence form. All six ended in failure, and the unchanged copy passed.
The explanatory paragraph quoted the same sentences
The worker also added a paragraph explaining the checker to the document's build-and-run section, and to show what the checker reads, it copied the three sentences verbatim inside quotation marks. The rule on the checker's side was "if the same sentence appears in several places, measure them all." It meant that a number written in two places had to match in both, so the intent was the stricter one.
The reviewer agent read the diff and pointed to this. Each sentence form now had two matches in the document: the real stated line in the structure section and the quote in the explanatory paragraph. If someone rewrote the stated line as "at most 10 floors (MAX_FLOORS)", that line would change form and drop out of the checker's sight. The quote would still say 8 floors and the code would still be 8, so it would pass. The failure it gives when it cannot find a sentence would not appear either, since the quote would always be found.
Had only the number changed with the form left alone, the first version would have caught it too, since it compares every match. The hole opened only when the form and the number changed together. The checker is needed most when someone rewrites that line, and in rewriting it, the form inside the parentheses easily changes along with it. The worker's six cases did not include this one. There was a case with a wrong number and a case with the form deleted, but none that changed the form and the number together.
Look in exactly one place
The fixed version changed two things. It took the quotes out of the explanatory paragraph and wrote only which line in which section is read, and it moved the sentence forms to the description at the top of the checker. For each form, the checker requires exactly one match in the document; with two or more it prints "matched in N places" with those line numbers and fails. Two or more counts as a mismatch in itself because if the form of one changes, the rest still match and it passes.
The deliberately wrong cases grew to ten as well. To the six above were added three that each changed only the form of one of the three stated lines, and one that copied the floor sentence as it was into another section. All ten cases ended in failure, and the unchanged copy passed.
While writing this post I ran both versions again on copies. With the floor line changed to "at most 10 floors (MAX_FLOORS)", the first version passed and the fixed version failed with "not found in the document". With the form kept and only the number changed to 10, both versions printed that line number and failed.
The one who flagged it and the one who reproduced it
The night run has three roles. The scheduled session picks the work and wraps it up, and the worker and the reviewer are subagents running separately. The reviewer was given only three file-reading tools (Read, Grep, Glob). It can neither fix nor run anything, so its findings are inferences from reading and reasoning, and I set it up so that the caller reproduces one such finding on a copy before sending it back to the worker.
This time too the caller changed only the floor's stated line on a copy to "at most 10 floors" and ran it, and the exit code was 0. The false pass had been reproduced. That result went to the worker, the fixed version came back, and the same reproduction ended with 1 this time.
Yet the verification record said the false pass was "reproduced by the reviewer": a sentence saying that the side unable to run anything had reproduced it. The second review also returned fix, and its finding was exactly this one word. Only one send-back is allowed, so it was left unfixed in the morning report, and at 12 noon that day I corrected it to "reproduced by the caller". It was a single word, but when what was flagged by reading and what was confirmed by running are written down mixed together, a later reader takes a judgement nobody ever ran as a confirmed fact.
This one task took about 5 minutes 50 seconds and about 640,000 tokens. Without the one send-back it would have been about 3 minutes 40 seconds and 300,000. The trial record named the trial's biggest result as this: the review step caught a false pass the worker could not see on its own.
What the checker does not look at
The leave sentence sits in the document's verification-status section. That line says that leaving after 30 minutes of quiet has "not actually been waited out", and it carries a mark in front saying it has not been confirmed yet. The checker reads 30 from this line and matches it with the 30 in the code. That the document and the code state the same number is all the checker knows. Whether a staff member really leaves after 30 minutes nobody has measured yet, and the verification record also notes that the script reads only text.
The checker has gone wrong before by reading wider than expected. On the day the gauges went in, the search also counted the checking script itself and the documents, so an engine setting looked different in one place. That time it showed up as a failure and was noticed at once. This time it showed up as a pass, and even the worker who built the test did not see it. When a test passes, look first at what it is able to fail on: this is the same thing I set down in The Ruler Was Wrong Before the Original Was.
In short
If a checker looks for sentences in a document, it also counts how many places it found them in. With two or more, one hides the other.
Writing that explains a checker does not copy the sentences the checker looks for; it says only where those sentences are.
Deliberately wrong cases include, besides changed numbers, a changed form and a copy written somewhere else.
The record keeps what was flagged by reading apart from what was reproduced by running. Reproduction is not credited to a reviewer that cannot run anything.
A passing checker means only that the document and the code state the same number. Whether things move by that number is measured separately.
The story of another checker, one that stops the building's numbers file just before it is published, is in Cumulative Totals Gave Away the Day.