<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shin Takamatsu</title>
    <description>The latest articles on DEV Community by Shin Takamatsu (@shimpeiws).</description>
    <link>https://dev.to/shimpeiws</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4227211%2Fe79c48f1-759c-4344-9463-e7da0eb776a1.png</url>
      <title>DEV Community: Shin Takamatsu</title>
      <link>https://dev.to/shimpeiws</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shimpeiws"/>
    <language>en</language>
    <item>
      <title>Turning a Past Coding-Agent Run into an Evaluation Case</title>
      <dc:creator>Shin Takamatsu</dc:creator>
      <pubDate>Sun, 15 Nov 2026 05:05:53 +0000</pubDate>
      <link>https://dev.to/shimpeiws/turning-a-past-coding-agent-run-into-an-evaluation-case-d34</link>
      <guid>https://dev.to/shimpeiws/turning-a-past-coding-agent-run-into-an-evaluation-case-d34</guid>
      <description>&lt;p&gt;I want to know whether a change to my coding-agent setup actually helps. But in everyday development, each issue is different. Completion times and successful runs alone tell me little about whether a new model, harness, or set of instructions is better.&lt;/p&gt;

&lt;p&gt;I tried turning one past development task into an evaluation case: give a fresh agent session the original requirements and starting source, then check the implementation it produces.&lt;/p&gt;

&lt;p&gt;The useful discovery was how much of that starting point I already had. My saved job contained the initial requirements and starting commit SHA. I could extract the task and retrieve the source from Git without building an agent to reconstruct missing files.&lt;/p&gt;

&lt;p&gt;This article is adapted from &lt;a href="https://zenn.dev/shimpeiws/articles/5e0df5eeb398fb" rel="noopener noreferrer"&gt;my Japanese article on Zenn&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I borrowed from Trace2Eval
&lt;/h2&gt;

&lt;p&gt;The experiment was inspired by &lt;a href="https://arxiv.org/abs/2611.06506" rel="noopener noreferrer"&gt;Trace2Eval&lt;/a&gt;, a paper about constructing coding-agent evaluations from real user interactions.&lt;/p&gt;

&lt;p&gt;Its reconstruction process recovers three inputs: the user's task, the workspace before the interaction, and the initial execution environment. A candidate agent receives that context and produces an artifact for evaluation.&lt;/p&gt;

&lt;p&gt;For files, the process uses content observed in the trace and infers or retrieves what is missing. It excludes artifacts created during the session and distinguishes dependencies that existed initially from those installed during execution.&lt;/p&gt;

&lt;p&gt;I borrowed the idea of preparing those three inputs, but adapted the method to my own records:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Input&lt;/th&gt;
&lt;th&gt;What I used&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Requirements&lt;/td&gt;
&lt;td&gt;The initial job saved by my development system&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Starting source&lt;/td&gt;
&lt;td&gt;The Git tree at the job's recorded starting SHA&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Execution environment&lt;/td&gt;
&lt;td&gt;A runnable approximation based on observed versions and the lockfile&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This is an independent implementation inspired by the paper, rather than a reproduction of its full pipeline. I did not refer to the authors' implementation code.&lt;/p&gt;

&lt;p&gt;I also simplified two substantial parts. I omitted the loop that replays original tool calls, compares their results, and repairs the recovered environment. For scoring, I implemented task-specific behavioral checks instead of adopting the paper's rubric and LLM-judge approach.&lt;/p&gt;

&lt;p&gt;The code is in &lt;a href="https://github.com/shimpeiws/spike-trace2eval" rel="noopener noreferrer"&gt;spike-trace2eval&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The task I chose
&lt;/h2&gt;

&lt;p&gt;My development system, coding-worker, retains requirements, starting commits, tool events, patches, and verification output.&lt;/p&gt;

&lt;p&gt;I selected a run that implemented &lt;a href="https://github.com/shimpeiws/yuurei/issues/195" rel="noopener noreferrer"&gt;yuurei issue #195&lt;/a&gt;. &lt;a href="https://github.com/shimpeiws/yuurei" rel="noopener noreferrer"&gt;yuurei&lt;/a&gt; is my tool for running and recording coding-agent experiments.&lt;/p&gt;

&lt;p&gt;The task was to support a task body supplied as a string:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Execute it without creating a task file inside the project.&lt;/li&gt;
&lt;li&gt;Produce the same task digest for identical content, whether supplied through a file or as a string.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The requirements came from the issue body, acceptance criteria, and constraints saved at the start of the original run.&lt;/p&gt;

&lt;p&gt;I deliberately chose a tractable case. It had retained initial requirements and a starting SHA, limited external-service dependencies, and behavior I could check by executing the CLI.&lt;/p&gt;

&lt;p&gt;“Solving it again” meant implementing those requirements in a fresh session from the original source. The new patch did not have to match the old one.&lt;/p&gt;

&lt;h2&gt;
  
  
  The input was more than a chat log
&lt;/h2&gt;

&lt;p&gt;I used the saved records for one execution:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Record&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Initial job&lt;/td&gt;
&lt;td&gt;Recover the issue body, acceptance criteria, constraints, check commands, budget, and starting SHA&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Event log&lt;/td&gt;
&lt;td&gt;Inspect the initial prompt, tool operations, and environment observations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Manifest&lt;/td&gt;
&lt;td&gt;Cross-check the run identity and starting SHA&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Checksum list&lt;/td&gt;
&lt;td&gt;Check consistency of the saved evidence files&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Original patch and verification output&lt;/td&gt;
&lt;td&gt;Evaluator-side references, excluded from the new agent's input&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The event log contained 6,588 events and 85 distinct tool operations from one session. I also used the target repository's Git data.&lt;/p&gt;

&lt;p&gt;That distinction matters: the log did not contain a complete source snapshot. The starting SHA let me retrieve that snapshot from Git.&lt;/p&gt;

&lt;p&gt;The raw trace, full initial prompt, and patches are private. The public repository contains the recovery and evaluation code, synthetic tests, and reports with limited evidence detail.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building the evaluation inputs
&lt;/h2&gt;

&lt;p&gt;The following describes the current implementation, including safeguards added after the first real run. I separate those later changes from the historical result below.&lt;/p&gt;

&lt;h3&gt;
  
  
  Extract the initial task
&lt;/h3&gt;

&lt;p&gt;The pipeline cross-checks the run identity and starting SHA across the job, manifest, and event log. It also checks event sequences, tool-call/result pairing, and evidence checksums.&lt;/p&gt;

&lt;p&gt;Requirements are extracted mechanically from the initial job, with a source reference for each field. The issue body, for example, comes from &lt;code&gt;job.issue.body&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I also regenerated the initial prompt from the saved job and the historical template, then checked that it matched the prompt recorded in the event log.&lt;/p&gt;

&lt;p&gt;I chose not to summarize the full trace into a new task description. The trace also contains investigation, failed attempts, edits, and the final answer. Rewriting the task from all of that could introduce hints unavailable at the start.&lt;/p&gt;

&lt;p&gt;Here, the original requirements were already present. Extracting them directly made their provenance easier to inspect.&lt;/p&gt;

&lt;h3&gt;
  
  
  Retrieve the starting source
&lt;/h3&gt;

&lt;p&gt;The pipeline retrieves only the recorded starting commit into a new directory. It checks that HEAD matches the pinned SHA, history contains one commit, there are no remotes, and the working tree is clean.&lt;/p&gt;

&lt;p&gt;The current implementation also removes and checks Git metadata that could retain the operator's local paths.&lt;/p&gt;

&lt;p&gt;This recovers the Git-tracked source. It cannot recover unrecorded local files.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prepare an approximate environment
&lt;/h3&gt;

&lt;p&gt;The original log showed Node 26.8.2 and pnpm 11.6.0, while the starting repository configuration declared Node 24.&lt;/p&gt;

&lt;p&gt;I selected the observed versions: Node 26.8.2 and pnpm 11.6.0. The environment record keeps observations, selected values, unknowns, and deviations separate.&lt;/p&gt;

&lt;p&gt;Dependencies are installed from the starting commit's lockfile. Generated dependencies such as &lt;code&gt;node_modules&lt;/code&gt; are kept distinct from the starting source. Setup and existing checks run in a separate working copy to confirm that the selected environment is usable.&lt;/p&gt;

&lt;p&gt;The exact original OS version, full PATH and environment variables, internal harness instructions, and automatically injected context were unavailable. I treated the result as a documented approximation.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://github.com/shimpeiws/spike-trace2eval/blob/main/docs/environment.md" rel="noopener noreferrer"&gt;environment documentation&lt;/a&gt; records the selection.&lt;/p&gt;

&lt;h3&gt;
  
  
  Limit the agent's input package
&lt;/h3&gt;

&lt;p&gt;The package has four entries:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Input&lt;/th&gt;
&lt;th&gt;Contents&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;task.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Requirements and execution conditions derived from the initial job&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;source/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Source at the starting commit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;environment.json&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Environment observations and deviations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;setup.sh&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Dependency setup procedure&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The original trace, patch, final answer, and evaluator stay on the evaluation side. Checks inspect file inventories, hashes, provenance, escaping symlinks, and Git history.&lt;/p&gt;

&lt;p&gt;The pipeline uses Python's standard library and separates extraction, source preparation, environment preparation, input inspection, controls, execution, scoring, and reporting. Each stage leaves a record, and the next stage requires valid preceding records.&lt;/p&gt;

&lt;h2&gt;
  
  
  The evaluator was specific to this task
&lt;/h2&gt;

&lt;p&gt;Preparing the inputs was only part of constructing an evaluation case. I still needed a way to decide whether the new implementation satisfied the task.&lt;/p&gt;

&lt;p&gt;The starting commit already passed all five existing repository checks. Passing those checks again would not demonstrate that the new feature worked.&lt;/p&gt;

&lt;p&gt;I therefore implemented behavioral checks derived from the requirements. The evaluator runs the modified yuurei CLI and checks:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Check&lt;/th&gt;
&lt;th&gt;What it establishes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;File input&lt;/td&gt;
&lt;td&gt;Existing file-based task execution still works&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;String input&lt;/td&gt;
&lt;td&gt;A supported inline form, such as stdin, executes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Body integrity&lt;/td&gt;
&lt;td&gt;The supplied body reaches the runtime unchanged&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Digest correctness&lt;/td&gt;
&lt;td&gt;Both input forms produce the body's SHA-256&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Digest equality&lt;/td&gt;
&lt;td&gt;Identical bodies have identical digests across input forms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Different content&lt;/td&gt;
&lt;td&gt;Changing the body produces the expected different digest&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Input provenance&lt;/td&gt;
&lt;td&gt;Files retain their actual path; inline input has an identifier such as &lt;code&gt;stdin&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;File creation&lt;/td&gt;
&lt;td&gt;No new project files appear outside evaluator-managed locations&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A dummy runtime records the body it receives. This checks that the content reached the runtime, beyond whether the command exited successfully. These behavioral checks require no model inference.&lt;/p&gt;

&lt;p&gt;The evaluator also runs the existing tests, build, lint, format, and knip checks. A result is &lt;code&gt;satisfied&lt;/code&gt; only if all required behavioral and repository checks pass. Missing verification does not count as success.&lt;/p&gt;

&lt;p&gt;I tested the evaluator with two controls:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The unchanged starting source must fail.&lt;/li&gt;
&lt;li&gt;The source with the original implementation patch applied must pass.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The original patch is used only by the evaluator for that control. It is excluded from the new agent's inputs.&lt;/p&gt;

&lt;p&gt;These controls establish that the evaluator can distinguish those two states. They do not prove that it rejects every possible incorrect implementation.&lt;/p&gt;

&lt;p&gt;The task inputs came from saved records, but the task-specific evaluator was implemented as part of this proof of concept. It was not generated automatically.&lt;/p&gt;

&lt;h2&gt;
  
  
  One fresh attempt
&lt;/h2&gt;

&lt;p&gt;I gave the prepared inputs to OpenCode with &lt;code&gt;opencode-go/deepseek-v4.1-flash&lt;/code&gt; and ran one new session.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Item&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Termination&lt;/td&gt;
&lt;td&gt;&lt;code&gt;completed&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Elapsed time&lt;/td&gt;
&lt;td&gt;521.5 seconds, about 8 minutes 42 seconds&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Generated patch&lt;/td&gt;
&lt;td&gt;8 files, 13,084 bytes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Behavioral checks&lt;/td&gt;
&lt;td&gt;All passed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Five existing repository checks&lt;/td&gt;
&lt;td&gt;All passed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Verdict&lt;/td&gt;
&lt;td&gt;&lt;code&gt;satisfied&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;See the &lt;a href="https://github.com/shimpeiws/spike-trace2eval/blob/main/docs/r1-report.md" rel="noopener noreferrer"&gt;run report&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The result means that a fresh implementation, starting from the same source and requirements in an approximate environment, passed the checks I prepared.&lt;/p&gt;

&lt;p&gt;The original execution used the same model through an OpenCode-based setup. This was a fresh attempt, not a comparison between models. The original run went through coding-worker's adapter; the new run invoked the harness directly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Later safeguards do not change the original result
&lt;/h2&gt;

&lt;p&gt;Review after the run found input-separation problems.&lt;/p&gt;

&lt;p&gt;Git's &lt;code&gt;FETCH_HEAD&lt;/code&gt; and reflog still contained the operator's local path and Git identity. Environment-variable inheritance also used a blocklist, so most operator environment-variable names were passed through.&lt;/p&gt;

&lt;p&gt;I subsequently added Git metadata cleanup and inspection, and changed environment-variable inheritance to an allowlist. I did not rerun the original experiment under those revised conditions.&lt;/p&gt;

&lt;p&gt;The inspected tool trace showed no reads of that metadata or the original host-side source. But an absence of recorded reads does not establish that access was technically impossible.&lt;/p&gt;

&lt;p&gt;Network and access outside the working directory were not fully isolated at the OS level. The original solution was also public, so I cannot establish that it was absent from the model's training data.&lt;/p&gt;

&lt;p&gt;The successful outcome belongs to that one run, under those historical conditions. Because the original evidence and generated patch are private, public materials alone cannot support a complete independent recheck of the run.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I want to preserve from future runs
&lt;/h2&gt;

&lt;p&gt;The most useful lesson was about the records to retain.&lt;/p&gt;

&lt;p&gt;The initial job supplied the requirements. Git supplied the starting source. The event log supported prompt consistency checks and environment observations.&lt;/p&gt;

&lt;p&gt;A long execution log and a recoverable starting point are different things.&lt;/p&gt;

&lt;p&gt;Saving initial requirements and a starting SHA is a practice I can carry into other tasks. The task-specific evaluator remains additional work when adding cases.&lt;/p&gt;

&lt;p&gt;Without changing coding-worker, I connected existing records to case construction, fresh implementation, and scoring. This experiment did not cover requirements added during a conversation or reconstruction from incomplete traces.&lt;/p&gt;

&lt;p&gt;Next, I want to freeze the inputs and scoring conditions, run a new experiment with the current safeguards, and try another case with a reconstruction difficulty absent from this one.&lt;/p&gt;

&lt;p&gt;If I can preserve past work as tasks that remain runnable after model and harness changes, I can gradually build an evaluation set closer to my own development work.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://arxiv.org/abs/2611.06506" rel="noopener noreferrer"&gt;Trace2Eval paper&lt;/a&gt; — reconstruction procedure in §3.2 and Appendix A.2&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/shimpeiws/spike-trace2eval/blob/main/docs/poc-plan.md" rel="noopener noreferrer"&gt;PoC plan&lt;/a&gt; — selected case and simplifications&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/shimpeiws/spike-trace2eval/blob/main/docs/evaluation.md" rel="noopener noreferrer"&gt;Evaluation design&lt;/a&gt; — input boundaries, behavioral checks, and controls&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/shimpeiws/spike-trace2eval/blob/main/docs/r1-spike-assessment.md" rel="noopener noreferrer"&gt;Assessment of the first run&lt;/a&gt; — assessment at a specific revision of PR #5, excluding subsequent fixes&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>testing</category>
      <category>opensource</category>
      <category>devtool</category>
    </item>
    <item>
      <title>Connecting Business AI Agents to Existing Systems: An Ontology-Inspired Prototype</title>
      <dc:creator>Shin Takamatsu</dc:creator>
      <pubDate>Mon, 09 Nov 2026 10:54:03 +0000</pubDate>
      <link>https://dev.to/shimpeiws/connecting-business-ai-agents-to-existing-systems-an-ontology-inspired-prototype-2gb</link>
      <guid>https://dev.to/shimpeiws/connecting-business-ai-agents-to-existing-systems-an-ontology-inspired-prototype-2gb</guid>
      <description>&lt;p&gt;Access to business data, and safe ways for agents to use it, receive a lot of attention. From my own experience, I had another question: do business AI agents also need shared definitions of the entities, states, and actions they work with, plus a way to maintain those definitions?&lt;/p&gt;

&lt;p&gt;I built &lt;a href="https://github.com/shimpeiws/ontology-prototype" rel="noopener noreferrer"&gt;ontology-prototype&lt;/a&gt; to test whether I could turn that idea into a working system.&lt;/p&gt;

&lt;p&gt;Adapted from &lt;a href="https://zenn.dev/shimpeiws/articles/4fedafb9deb62d" rel="noopener noreferrer"&gt;my Japanese article&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Two experiences led me here.&lt;/p&gt;

&lt;p&gt;In a previous role, I worked on deploying and customizing a platform with particular strengths in one kind of data. It worked well when those strengths matched a customer's needs. But actual business workflows crossed several systems and used many kinds of information. Working with only part of that data made it hard to support the workflow as a whole.&lt;/p&gt;

&lt;p&gt;The other was a conversation with someone whose company owns several related businesses. They wanted to explore using forward-deployed engineers (FDEs), engineers who work directly with customers to improve operations, across those businesses. Two goals emerged: find changes that matter to each business and follow them through to an outcome, while making knowledge reusable across companies.&lt;/p&gt;

&lt;p&gt;The companies would have different systems and data. That brought me back to the same question.&lt;/p&gt;

&lt;h2&gt;
  
  
  The operational loop
&lt;/h2&gt;

&lt;p&gt;The prototype implements seven stages:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ingest snapshots from existing business sources.&lt;/li&gt;
&lt;li&gt;Map them into a shared business model stored in SQLite.&lt;/li&gt;
&lt;li&gt;Select candidates deterministically using declared conditions.&lt;/li&gt;
&lt;li&gt;Ask an AI model for explanations, possible causes, and proposed interventions.&lt;/li&gt;
&lt;li&gt;Have a human approve or reject each proposal.&lt;/li&gt;
&lt;li&gt;Execute approved proposals.&lt;/li&gt;
&lt;li&gt;Ingest later snapshots and evaluate the observed outcomes against a declared target and guardrails.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The facts and stage records are materialized in SQLite under the workspace's &lt;code&gt;.ontology/&lt;/code&gt; directory. The system keeps an internal representation of what it has ingested.&lt;/p&gt;

&lt;p&gt;Execution and outcome observation have separate destinations and sources. The current execution adapter writes reminders to a local CSV. Later business outcomes come from new exports of the external business systems, not from that reminder file.&lt;/p&gt;

&lt;p&gt;Repository structure&lt;/p&gt;

&lt;p&gt;The implementation is a monorepo. Every application calls the same shared core.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Path&lt;/th&gt;
&lt;th&gt;Responsibility&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;packages/core/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Shared Python package for definition validation and the operational loop&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;apps/cli/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;CLI commands for each stage&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;apps/api/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Local FastAPI app for editing and validating definitions and triggering stages&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;apps/web/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;React UI that accesses the core through the API&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;examples/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Workspace definitions and synthetic data&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  The example: completed work waiting to be invoiced
&lt;/h2&gt;

&lt;p&gt;For the demo, I used a workflow where completed jobs sit uninvoiced for too long.&lt;/p&gt;

&lt;p&gt;Jobs are recorded in a job-management system; invoices are recorded in a separate invoicing system. Each job's assignee issues the invoice manually. Nothing tells them when a completed job is ready for billing, so completed work can remain uninvoiced.&lt;/p&gt;

&lt;p&gt;The shared model defines three entities: &lt;code&gt;Job&lt;/code&gt;, &lt;code&gt;Invoice&lt;/code&gt;, and &lt;code&gt;Person&lt;/code&gt;. It also defines two events: &lt;code&gt;JobCompleted&lt;/code&gt; and &lt;code&gt;InvoiceIssued&lt;/code&gt;. An event records something that happened to an entity, with a timestamp.&lt;/p&gt;

&lt;p&gt;The scenario sets a target: reduce the median time from job completion to invoice issuance from a baseline of nine days to &lt;strong&gt;less than four days&lt;/strong&gt;, without increasing the invoice-error rate. The comparison is strict: exactly four days misses the target.&lt;/p&gt;

&lt;p&gt;Candidates are jobs that have been completed for more than two days without an invoice. The intervention is a reminder to the assignee.&lt;/p&gt;

&lt;p&gt;All data is synthetic. The current adapter records the reminder in a local CSV; it does not send email or write to an external business system.&lt;/p&gt;

&lt;h2&gt;
  
  
  Four files define the workflow
&lt;/h2&gt;

&lt;p&gt;A workspace is a directory containing four YAML files. The core reads these definitions as data. Loading them does not execute Python or SQL, or expand environment variables.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;Defines&lt;/th&gt;
&lt;th&gt;References&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;domain.yaml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Entities, properties, references, events, and candidate-selection conditions&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;mapping.yaml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Source fields mapped to entities and events&lt;/td&gt;
&lt;td&gt;&lt;code&gt;domain.yaml&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;evaluation.yaml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Outcome metric, target, guardrails, and their metric definitions&lt;/td&gt;
&lt;td&gt;&lt;code&gt;domain.yaml&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;agent.yaml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Diagnosis task, expected deliverables, and permitted action schemas&lt;/td&gt;
&lt;td&gt;&lt;code&gt;domain.yaml&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The domain defines what exists in the workflow, what can happen to it, and how to select entities from those events. Properties are typed and can reference another entity with &lt;code&gt;ref&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;An excerpt from &lt;code&gt;examples/job-invoicing/domain.yaml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;entities&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;Job&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;properties&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;string&lt;/span&gt;
        &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
      &lt;span class="na"&gt;assignee&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ref&lt;/span&gt;
        &lt;span class="na"&gt;ref&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Person&lt;/span&gt;
  &lt;span class="c1"&gt;# Invoice and Person are also declared.&lt;/span&gt;
&lt;span class="na"&gt;events&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;JobCompleted&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;subject&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Job&lt;/span&gt;
  &lt;span class="na"&gt;InvoiceIssued&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;subject&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Job&lt;/span&gt;
    &lt;span class="na"&gt;properties&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;invoice&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ref&lt;/span&gt;
        &lt;span class="na"&gt;ref&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Invoice&lt;/span&gt;
&lt;span class="na"&gt;projections&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;CompletedButNotInvoiced&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;subject&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Job&lt;/span&gt;
    &lt;span class="na"&gt;select&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;required_events&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;JobCompleted&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
      &lt;span class="na"&gt;absent_events&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;InvoiceIssued&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
      &lt;span class="na"&gt;elapsed&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;{&lt;/span&gt; &lt;span class="nv"&gt;comparator&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;gt&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;2&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;unit&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;days&lt;/span&gt; &lt;span class="pi"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A job references its assignee. An invoice references its job. Invoice issuance is recorded as an event whose subject is the job. Although the source records live in different systems, their relationships are expressed in one shared model.&lt;/p&gt;

&lt;p&gt;The other files refer to names from this domain.&lt;/p&gt;

&lt;p&gt;For example, &lt;code&gt;mapping.yaml&lt;/code&gt; declares that a job-management CSV row with &lt;code&gt;status: completed&lt;/code&gt; and a completion timestamp asserts a &lt;code&gt;JobCompleted&lt;/code&gt; event:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;event&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;JobCompleted&lt;/span&gt;
  &lt;span class="na"&gt;subject&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;entity&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Job&lt;/span&gt;
    &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;field&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;id&lt;/span&gt;
  &lt;span class="na"&gt;when&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;op&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;and&lt;/span&gt;
    &lt;span class="na"&gt;args&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;op&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;eq&lt;/span&gt;
        &lt;span class="na"&gt;field&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;status&lt;/span&gt;
        &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;completed&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;op&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;not_null&lt;/span&gt;
        &lt;span class="na"&gt;field&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;completed_at&lt;/span&gt;
  &lt;span class="na"&gt;occurred_at&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;field&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;completed_at&lt;/span&gt;
    &lt;span class="na"&gt;as&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;datetime&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The evaluation and agent definitions follow the same pattern. I will return to them in the evaluation and AI sections.&lt;/p&gt;

&lt;p&gt;Following one job, C01, shows what these definitions connect:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Stage&lt;/th&gt;
&lt;th&gt;How C01 is represented&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Ingestion&lt;/td&gt;
&lt;td&gt;A source row becomes &lt;code&gt;Job/C01&lt;/code&gt; and a completion event&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Candidate selection&lt;/td&gt;
&lt;td&gt;Its completion event and missing invoice make it a diagnosis candidate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Diagnosis and proposal&lt;/td&gt;
&lt;td&gt;A &lt;code&gt;SendReminder&lt;/code&gt; proposal references &lt;code&gt;Job/C01&lt;/code&gt; through &lt;code&gt;related_entity&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Later ingestion and evaluation&lt;/td&gt;
&lt;td&gt;Invoice issuance has the same &lt;code&gt;Job/C01&lt;/code&gt; subject, allowing completion and issuance to be paired&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Reads, reasoning, actions, and evaluation all refer to the same entity. That makes checking those references part of the foundation.&lt;/p&gt;

&lt;p&gt;The shared core validates the four files together. &lt;code&gt;ontology check&lt;/code&gt; checks types, required fields, and cross-file references. A mapping to an undefined entity or an agent referring to a nonexistent projection is an error.&lt;/p&gt;

&lt;p&gt;This is what I mean by managing shared definitions in this prototype: making their consistency mechanically checkable.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.palantir.com/docs/foundry/ontology" rel="noopener noreferrer"&gt;Palantir Ontology&lt;/a&gt; was a reference point for this design, particularly the idea of connecting real-world entities and relationships with &lt;a href="https://www.palantir.com/docs/foundry/action-types/side-effects-overview" rel="noopener noreferrer"&gt;actions&lt;/a&gt;. I applied that idea within the scope of a small operational loop.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep ingestion evidence separate from business facts
&lt;/h2&gt;

&lt;p&gt;The demo ingests CSV snapshots exported from each system. Consider this row from &lt;code&gt;jobs-current.csv&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;id,status,assignee,completed_at,invoiced_at
C01,completed,taro,2026-10-17,
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Through the mapping, it produces three things: job C01, person taro, and a fact asserting that C01 was completed on October 17, 2026.&lt;/p&gt;

&lt;p&gt;The completion timestamp becomes &lt;code&gt;occurred_at&lt;/code&gt;: when the event happened in the business. In this example, &lt;code&gt;observed_at&lt;/code&gt; records when the snapshot was ingested. Keeping both helps relate a run's inputs to when the system learned about them.&lt;/p&gt;

&lt;p&gt;The system retains two kinds of records:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ingestion evidence:&lt;/strong&gt; the snapshot bytes and per-row observation records.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Canonical business facts:&lt;/strong&gt; entities and events in SQLite.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Events are append-only. An event's identity is determined by its type, subject, and occurrence time.&lt;/p&gt;

&lt;p&gt;An invoice-issuance fact can arrive again from the invoicing export. The event is not duplicated; another observation is linked to the existing fact. If two records disagree on the occurrence time, both facts are retained. The system cannot tell whether the difference is a correction or a separate occurrence, so that decision remains with the operator.&lt;/p&gt;

&lt;p&gt;I treat the external systems and business documents as the sources of truth. The internal model and AI output alone do not establish that a business event happened. Keeping conflicting facts and repeated observations preserves the records behind those assertions.&lt;/p&gt;

&lt;p&gt;Those sources need not be clean or even digital. The information needed to establish a fact may still be on paper or in someone's memory.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limit what the AI sees and what it decides
&lt;/h2&gt;

&lt;p&gt;Candidate selection is deterministic.&lt;/p&gt;

&lt;p&gt;The projection from &lt;code&gt;domain.yaml&lt;/code&gt; is evaluated against events at an explicit &lt;code&gt;--as-of&lt;/code&gt; time. With October 21, 2026 as the evaluation date, C01 is four days past completion and C02 is three days past completion. Both qualify. C03, at exactly two days, does not.&lt;/p&gt;

&lt;p&gt;The candidate set and input references are frozen for each run. This preserves what that execution examined and selected; it does not reconstruct the entire system at an arbitrary historical instant.&lt;/p&gt;

&lt;p&gt;The model receives those candidates, their evidence, the task, and the schemas of permitted actions.&lt;/p&gt;

&lt;p&gt;In &lt;code&gt;agent.yaml&lt;/code&gt;, this demo permits only &lt;code&gt;SendReminder&lt;/code&gt;, with typed, required parameters for the recipient, related job, and reason:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;projection&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;CompletedButNotInvoiced&lt;/span&gt;
&lt;span class="na"&gt;task&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;goal&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Identify likely causes of delayed invoicing and suggest an intervention.&lt;/span&gt;
  &lt;span class="na"&gt;deliverables&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;explanation&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;hypotheses&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;follow_up_questions&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;action_proposals&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
&lt;span class="na"&gt;permitted_actions&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;SendReminder&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Send a billing-readiness reminder to the assignee.&lt;/span&gt;
    &lt;span class="na"&gt;params&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;target&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;{&lt;/span&gt; &lt;span class="nv"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;ref&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;ref&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;Person&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;required&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;true&lt;/span&gt; &lt;span class="pi"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;related_entity&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;{&lt;/span&gt; &lt;span class="nv"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;ref&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;ref&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;Job&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;required&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;true&lt;/span&gt; &lt;span class="pi"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;reason&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;{&lt;/span&gt; &lt;span class="nv"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;string&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;required&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;true&lt;/span&gt; &lt;span class="pi"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output contract is a single JSON object. Its shape is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"explanation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"hypotheses"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"statement"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"evidence"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"fact-..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"obs-..."&lt;/span&gt;&lt;span class="p"&gt;]}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"follow_up_questions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"..."&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"action_proposals"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"SendReminder"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"params"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"target"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"taro"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"related_entity"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"C01"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"reason"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"..."&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The core validates that output before saving executable proposals. Disallowed actions, invalid parameters, and nonexistent references are rejected. Evidence IDs cited by hypotheses are also checked; unresolved references are marked unverified.&lt;/p&gt;

&lt;p&gt;I wanted the model to produce proposals I could inspect and validate. Mechanical validation can establish consistency with definitions and references. It cannot establish that a cause hypothesis is correct or that an intervention makes sense for the business.&lt;/p&gt;

&lt;p&gt;Human review is the conservative choice in this version. I would like to automate decisions that eventually become stable enough not to need it.&lt;/p&gt;

&lt;p&gt;In the &lt;a href="https://github.com/shimpeiws/ontology-prototype/blob/main/docs/diagnosis-comparison-2026-10-06.md" rel="noopener noreferrer"&gt;recorded model comparison&lt;/a&gt;, the most useful differences appeared in explanations and questions. Three models each ran once on the same frozen input. All passed the output contract, but the recorded assessment found differences in how specifically they cited evidence and how useful their follow-up questions were. This was one trial per model, not evidence of a general model ranking.&lt;/p&gt;

&lt;p&gt;The model rated most highly noticed that both delayed jobs belonged to the same assignee and asked whether the invoicing procedure was documented and whether anything else was blocking it. Another used less specific evidence citations and generic reminder text.&lt;/p&gt;

&lt;p&gt;There is also an obvious limit to this demo: the only intervention is a reminder. A rule could construct that proposal without an AI model.&lt;/p&gt;

&lt;p&gt;My conclusion from the prototype was that AI was more useful for organizing possible explanations and identifying what a human should investigate when the cause was uncertain.&lt;/p&gt;

&lt;h2&gt;
  
  
  Separate proposals, approvals, and execution
&lt;/h2&gt;

&lt;p&gt;A validated proposal is saved with its action and parameters. Human approval or rejection is recorded separately. Proposals and decisions are append-only; the latest decision determines the current approval state.&lt;/p&gt;

&lt;p&gt;Approval is bound to the proposal's contents. A digest of the action and parameters is stored with the decision and checked immediately before execution. If the payload has changed, that approval does not authorize it. Execution is also refused if the current definition no longer permits the action.&lt;/p&gt;

&lt;p&gt;Approval alone executes nothing.&lt;/p&gt;

&lt;p&gt;The digest check answers one question: is this the payload that was approved? Whether it is still appropriate is a separate question. If an invoice was issued through another path between approval and execution, the reminder might no longer be needed. That is outside this mechanism's validation scope.&lt;/p&gt;

&lt;p&gt;An adapter separates the destination from the core. The current adapter appends one &lt;code&gt;SendReminder&lt;/code&gt; row to a local CSV. It does not send email or write to an external SaaS system.&lt;/p&gt;

&lt;p&gt;Before calling the adapter, the executor records an intent: an attempt is about to happen. After the call, it records the outcome and a receipt when delivery succeeds.&lt;/p&gt;

&lt;p&gt;The retry policy distinguishes success, confirmed failure, and an uncertain outcome:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Recorded state&lt;/th&gt;
&lt;th&gt;What happens on another execution request&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Succeeded&lt;/td&gt;
&lt;td&gt;Return the stored receipt without calling the adapter again&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Failed with confirmation that no effect occurred&lt;/td&gt;
&lt;td&gt;Allow a retry&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Uncertain&lt;/td&gt;
&lt;td&gt;Retry only if the adapter guarantees deduplication for the same idempotency key&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Unapproved, rejected, or changed payload&lt;/td&gt;
&lt;td&gt;Refuse execution&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This does not guarantee exactly-once delivery. It makes the next permitted step depend on the recorded outcome and the adapter's guarantees.&lt;/p&gt;

&lt;h2&gt;
  
  
  Evaluate the business outcome separately from execution
&lt;/h2&gt;

&lt;p&gt;Writing a reminder does not mean an invoice was issued.&lt;/p&gt;

&lt;p&gt;Execution never creates an &lt;code&gt;InvoiceIssued&lt;/code&gt; event. The business outcome has to arrive through a later source snapshot. In the demo, later CSVs assert invoice issuance for C01 through C03.&lt;/p&gt;

&lt;p&gt;The evaluation definition declares what counts as improvement:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;interval&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;start_event&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;JobCompleted&lt;/span&gt;
  &lt;span class="na"&gt;end_event&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;InvoiceIssued&lt;/span&gt;
&lt;span class="na"&gt;metric&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;duration&lt;/span&gt;
&lt;span class="na"&gt;aggregation&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;median&lt;/span&gt;
&lt;span class="na"&gt;unit&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;days&lt;/span&gt;
&lt;span class="na"&gt;baseline&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;9&lt;/span&gt;
&lt;span class="na"&gt;target&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;comparator&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;lt&lt;/span&gt;
  &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;4&lt;/span&gt;
&lt;span class="na"&gt;metrics&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;invoice_error_rate&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;entity&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Invoice&lt;/span&gt;
    &lt;span class="na"&gt;ref&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;job&lt;/span&gt;
    &lt;span class="na"&gt;flag&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;error&lt;/span&gt;
&lt;span class="na"&gt;guardrails&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;invoice-error-rate&lt;/span&gt;
    &lt;span class="na"&gt;metric&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;invoice_error_rate&lt;/span&gt;
    &lt;span class="na"&gt;comparator&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;not_increase&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Evaluation pairs start and end events by subject, then splits subjects into baseline and after cohorts using an explicit &lt;code&gt;--boundary&lt;/code&gt;. Jobs still waiting for an invoice remain in the report as pending, along with their elapsed time.&lt;/p&gt;

&lt;p&gt;The target and guardrails are judged separately. Missing evidence can leave the overall result &lt;code&gt;unverified&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://github.com/shimpeiws/ontology-prototype/blob/main/docs/walkthrough.md" rel="noopener noreferrer"&gt;walkthrough&lt;/a&gt; produces:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;baseline: median 9 days (3 paired)
after:    median 3 days (3 paired, 1 pending)
change:   6 days (improvement)
target lt 4 days: attained
guardrail invoice-error-rate: passed
overall:  success
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That success label has a specific limit. The median includes only completed intervals. A job still waiting for an invoice does not enter that aggregate. The evaluation can therefore report success while unresolved delays remain.&lt;/p&gt;

&lt;p&gt;I kept pending jobs and their elapsed times visible so the aggregate could be read alongside the completion counts. A possible next step would be an additional condition on the age of pending jobs. That would be a separate requirement from the median target.&lt;/p&gt;

&lt;p&gt;Overall success means that the after cohort met the target and all guardrails passed. A missed requirement is &lt;code&gt;not_met&lt;/code&gt;; insufficient evidence can produce &lt;code&gt;unverified&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In a &lt;a href="https://github.com/shimpeiws/ontology-prototype/blob/main/docs/v0.1-live-model-run.md" rel="noopener noreferrer"&gt;recorded run with a live model&lt;/a&gt;, the synthetic cohorts went from a nine-day median to three days, but invoice-error evidence was missing. The overall result was &lt;code&gt;unverified&lt;/code&gt;. Reporting insufficient evidence despite a favorable metric is a property I want to keep.&lt;/p&gt;

&lt;p&gt;The evaluation boundary is supplied by the operator. It is not derived from the proposal or execution records. Later facts can be linked to proposals for traceability, but the report measures observed differences between cohorts; it does not establish causation.&lt;/p&gt;

&lt;p&gt;These are demo results, not evidence of a real business improvement. What the prototype demonstrates is that the stages connect, and that &lt;code&gt;ontology trace&lt;/code&gt; can follow the same subject through their records.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try the same structure on another workflow
&lt;/h2&gt;

&lt;p&gt;One invoicing example cannot establish whether this is shared infrastructure or an invoicing-specific implementation.&lt;/p&gt;

&lt;p&gt;I added a second workflow: first-response SLA monitoring for support tickets. It has a similar structure: a start event occurs, an expected end event is still missing after a threshold, and a reminder goes to the responsible person.&lt;/p&gt;

&lt;p&gt;Getting the second workflow to run required moving candidate-selection logic, guardrail metric definitions, and multiple-source support from workflow-specific code into declarations. With those changes, selection through evaluation ran using the same four-file structure.&lt;/p&gt;

&lt;p&gt;The conclusion is limited: workflows with at least this common structure can use the same definition model. It does not establish generality across arbitrary business processes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I learned, and what remains
&lt;/h2&gt;

&lt;p&gt;I was able to implement a shared model that connects ingestion, proposals, approval, execution, and evaluation across records from different systems.&lt;/p&gt;

&lt;p&gt;Before building it, I expected the hardest technical boundaries to be ingesting external data and returning actions to external destinations. Those became the parts I spent the most attention on.&lt;/p&gt;

&lt;p&gt;At the input boundary, I separated observation evidence from business facts, retained conflicting facts, and linked repeated observations without duplicating events. At the output boundary, I separated proposals, approvals, and execution, and made retry behavior depend on recorded outcomes.&lt;/p&gt;

&lt;p&gt;Those two boundaries worked as the entry and exit points of the shared definitions.&lt;/p&gt;

&lt;p&gt;Production use would need much more: API and database connections, authentication, continuing incremental ingestion, real delivery adapters, write permissions, and recovery from distributed failures. Reviewer authentication and authorization would also need a different design.&lt;/p&gt;

&lt;p&gt;I am particularly interested in how far a common interface could extend to data that does not fit naturally into relational tables, such as images, video, or graph data, without forcing application code to handle every storage detail.&lt;/p&gt;

&lt;p&gt;But the hardest operational work may be finding and obtaining the information in the first place. There will not always be a well-maintained API waiting to be connected. Someone has to find the person who holds the relevant records and arrange for them to be supplied continuously.&lt;/p&gt;

&lt;p&gt;Someone also has to understand the business well enough to write the shared definitions, then maintain them as the business changes. Who creates and maintains the model remains a substantial problem beyond the software.&lt;/p&gt;

&lt;p&gt;The uncertainty this prototype reduced was technical: could I connect a workflow spanning multiple systems through shared definitions and keep the resulting process traceable?&lt;/p&gt;

&lt;p&gt;The next test is one real workflow: can I obtain its data continuously, and can the people responsible for it judge the proposals? I would like to find an opportunity to put that into practice.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>opensource</category>
      <category>agents</category>
    </item>
    <item>
      <title>Before I Could Evaluate My Coding-Agent Harness, I Had to Isolate It</title>
      <dc:creator>Shin Takamatsu</dc:creator>
      <pubDate>Wed, 04 Nov 2026 22:18:39 +0000</pubDate>
      <link>https://dev.to/shimpeiws/before-i-could-evaluate-my-coding-agent-harness-i-had-to-isolate-it-3ohm</link>
      <guid>https://dev.to/shimpeiws/before-i-could-evaluate-my-coding-agent-harness-i-had-to-isolate-it-3ohm</guid>
      <description>&lt;p&gt;I started writing an article about the relationship between coding-agent models and the harnesses around them. I wanted to explain something I had learned from comparing a few configurations, but the results never gave me a clear enough answer to finish it.&lt;/p&gt;

&lt;p&gt;Instead, I built &lt;a href="https://github.com/shimpeiws/yuurei" rel="noopener noreferrer"&gt;yuurei&lt;/a&gt;, a CLI for running coding agents with isolated, versionable configurations, without swapping out my everyday global setup.&lt;/p&gt;

&lt;p&gt;This is the story of the article I did not finish, the comparison behind it, and why I decided that isolation and evaluation should be separate tools.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Adapted from &lt;a href="https://zenn.dev/shimpeiws/articles/a12aed38b9d8ea" rel="noopener noreferrer"&gt;my Japanese article&lt;/a&gt;, originally published on September 14, 2026.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Was my harness holding the model back?
&lt;/h2&gt;

&lt;p&gt;Here, by &lt;em&gt;harness&lt;/em&gt;, I mean the workflow instructions I had accumulated in skills and files such as &lt;code&gt;CLAUDE.md&lt;/code&gt; and &lt;code&gt;AGENTS.md&lt;/code&gt;: understand the code first, review the design, stop when something looks risky, ask another agent to verify the result.&lt;/p&gt;

&lt;p&gt;I wanted to try the newly released GPT-6 Astra, so I casually asked Codex, which I rarely used at the time, to refactor one of my open-source projects. The output was better than I expected.&lt;/p&gt;

&lt;p&gt;Could this be better than what I was getting from Claude Code, where I had put much more work into the harness?&lt;/p&gt;

&lt;p&gt;I ran three configurations, using the same repository, starting commit, and prompt:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Run&lt;/th&gt;
&lt;th&gt;Runtime and model&lt;/th&gt;
&lt;th&gt;Harness&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;PR1&lt;/td&gt;
&lt;td&gt;Codex CLI / GPT-6 Astra&lt;/td&gt;
&lt;td&gt;Only the general-purpose pstack skill&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PR2&lt;/td&gt;
&lt;td&gt;Claude Code / Sonnet 5&lt;/td&gt;
&lt;td&gt;My custom harness&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PR3&lt;/td&gt;
&lt;td&gt;Claude Code / Sonnet 5&lt;/td&gt;
&lt;td&gt;Only pstack&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://github.com/backnotprop/pstack" rel="noopener noreferrer"&gt;pstack&lt;/a&gt; is a general-purpose collection of skills for coding agents, covering tasks such as investigation, design, and verification. “Only pstack” means I used those skills without my custom harness.&lt;/p&gt;

&lt;p&gt;My hypothesis was that the harness might be setting a ceiling on the agent's work. Perhaps all those constraints were good at giving it reasons to stop, but less good at helping it look for a safe alternative after stopping.&lt;/p&gt;

&lt;p&gt;That would have been something I could fix. I had written the harness.&lt;/p&gt;

&lt;p&gt;The comparison did not support that hypothesis. In PR3, removing the custom harness narrowed the agent's exploration. It did not produce dedicated tests or reach a design decision.&lt;/p&gt;

&lt;p&gt;The result was disappointing because the explanation I had hoped to find was in something I could change myself. Instead, differences between the models and execution environments remained possible explanations.&lt;/p&gt;

&lt;p&gt;I ran each condition only once: &lt;strong&gt;n = 1 per condition&lt;/strong&gt;. This was not enough to establish a general effect or separate model effects from runtime effects. What I could say was narrower: in this comparison, taking away my custom harness did not produce the improvement I expected.&lt;/p&gt;

&lt;h2&gt;
  
  
  I still wanted to keep comparing
&lt;/h2&gt;

&lt;p&gt;An inconclusive result did not make the question less interesting.&lt;/p&gt;

&lt;p&gt;Advice that helped an earlier model can become unnecessary as models improve. My harness had grown through repeated additions, and I could not say how much each part still contributed.&lt;/p&gt;

&lt;p&gt;I wanted to keep comparing configurations so I could make my own development output more consistent. To do that, I needed the comparisons to be practical to repeat.&lt;/p&gt;

&lt;p&gt;Even these three runs had been painful to set up.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Git worktree only solves half the problem
&lt;/h2&gt;

&lt;p&gt;For the repository, &lt;code&gt;git worktree&lt;/code&gt; gave me separate working trees at the same starting point.&lt;/p&gt;

&lt;p&gt;The harness was harder. Skills, instruction files, settings, and hooks were spread across several places. Each runtime had its own configuration locations and loading rules.&lt;/p&gt;

&lt;p&gt;With Claude Code, I could point &lt;code&gt;CLAUDE_CONFIG_DIR&lt;/code&gt; at another directory. But I could not simply assume that this isolated everything. I had to check the &lt;strong&gt;Setting sources&lt;/strong&gt; section of &lt;code&gt;/status&lt;/code&gt; each time to see what had actually been loaded.&lt;/p&gt;

&lt;p&gt;I used procedures and scripts to switch out the custom parts of my Claude Code harness. Restoring my normal environment afterward still took time because I had not put everything back correctly.&lt;/p&gt;

&lt;p&gt;I also started the Codex run assuming pstack would be absent because I rarely used Codex. Only afterward did I realize it had been active there too.&lt;/p&gt;

&lt;p&gt;That was one comparison with three runs. Removing individual harness components would quickly give me ten or twenty variants. Every variant would add another round of backing up, swapping, restarting, and restoring configuration.&lt;/p&gt;

&lt;p&gt;I could see myself getting stuck maintaining the comparison environment before I ever reached the thing I wanted to measure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Making the harness a versioned input
&lt;/h2&gt;

&lt;p&gt;That is why I built yuurei.&lt;/p&gt;

&lt;p&gt;For each run, it creates a temporary execution cell and runs the coding agent with the selected profile, keeping the runtime's configuration separate from my normal global setup.&lt;/p&gt;

&lt;p&gt;The basic model has three parts:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Concept&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Profile&lt;/td&gt;
&lt;td&gt;A runtime and its native configuration files: skills, instructions, settings, and hooks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Task&lt;/td&gt;
&lt;td&gt;The instructions sent to the runtime&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Run&lt;/td&gt;
&lt;td&gt;An execution using a profile and task, with its own trace and logs&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Profiles live under &lt;code&gt;.yuurei/&lt;/code&gt;, so I can keep them in version control. For me, that is the most useful part: a harness becomes a named artifact I can preserve instead of a collection of files I continuously overwrite.&lt;/p&gt;

&lt;p&gt;Here is a minimal example using the current CLI. It requires Node.js 22 or later, an installed Claude Code runtime, and an explicit authentication environment variable supported by the adapter; the &lt;a href="https://github.com/shimpeiws/yuurei#required-authentication-setup" rel="noopener noreferrer"&gt;README&lt;/a&gt; explains the authentication options.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; yuurei

&lt;span class="nb"&gt;mkdir &lt;/span&gt;yuurei-demo
&lt;span class="nb"&gt;cd &lt;/span&gt;yuurei-demo
yuurei init
yuurei doctor
yuurei profile list
yuurei run hello
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The default scaffold selects Claude Code and creates a small greeting task. It is a way to check the setup, rather than a refactoring experiment. Authentication must be ready before the run; an existing interactive login alone is not necessarily sufficient.&lt;/p&gt;

&lt;p&gt;After a run, I can inspect its record using the run ID printed by the CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yuurei trace show &amp;lt;run-id&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each run has a &lt;code&gt;trace.json&lt;/code&gt; recording information such as the runtime, execution outcome, timeout status, profile and task digests, and isolation verification result. Logs and the trace are retained under &lt;code&gt;.yuurei/runs/&amp;lt;run-id&amp;gt;/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The digests let me check which configuration was used. They do not establish that the resulting code is correct.&lt;/p&gt;

&lt;p&gt;That distinction mattered in the original comparison. The PR that looked most autonomous also incorrectly reported that its own checks had passed. An agent's report needs verification. So does the infrastructure I use to measure it.&lt;/p&gt;

&lt;p&gt;There is also a specific limit to the word &lt;em&gt;isolation&lt;/em&gt; here. Yuurei separates configuration and environment variables; its default isolation level uses a temporary &lt;code&gt;HOME&lt;/code&gt;. It is not an OS sandbox, and code executed by the agent still has the access available to my user account. Likewise, reproducible configuration does not imply identical agent behavior across runs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I separated isolation from evaluation
&lt;/h2&gt;

&lt;p&gt;My first plan was to build one tool that both isolated runs and evaluated them.&lt;/p&gt;

&lt;p&gt;I abandoned that plan because I had not worked out the evaluation design.&lt;/p&gt;

&lt;p&gt;The differences that stood out in the original comparison concerned behavior, rather than simply the quality of the final artifact:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Did the agent detect a risky change?&lt;/li&gt;
&lt;li&gt;Did it detect the risk and deliberately leave the change alone? That is different from never noticing it.&lt;/li&gt;
&lt;li&gt;After deciding against that change, did it look for another improvement?&lt;/li&gt;
&lt;li&gt;Did it hand the decision back to a human?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A PR diff cannot answer those questions on its own. I did not yet know how to capture them as structured observations.&lt;/p&gt;

&lt;p&gt;If I put evaluation into the same tool, I would have to settle those questions before I could release the isolation mechanism. An unresolved evaluation design would block a piece of infrastructure whose responsibility was already clear.&lt;/p&gt;

&lt;p&gt;I wanted the dependency to run the other way: an evaluator could use yuurei's execution records, while yuurei would not need to know which evaluator consumed them.&lt;/p&gt;

&lt;p&gt;So I kept yuurei responsible for preparing isolated executions and emitting machine-readable records. A separate tool would decide what to evaluate and how to judge it.&lt;/p&gt;

&lt;p&gt;The trace records execution facts. It does not turn those facts into a judgment that an agent made a good decision, nor does it automatically capture all the behavioral evidence a future evaluator might need.&lt;/p&gt;

&lt;p&gt;This separation also has a practical benefit: evaluation criteria will change. What I consider useful behavior may change as models improve. I do not want every revision to those criteria to require rebuilding the isolation layer.&lt;/p&gt;

&lt;p&gt;I could make the execution setup repeatable while leaving the evaluation questions open.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the original version did—and did not do
&lt;/h2&gt;

&lt;p&gt;At the time of the Japanese article, the v0.3 scope was single-runtime execution for Claude Code and Codex. Each runtime × model × harness × task combination was treated independently.&lt;/p&gt;

&lt;p&gt;That scope did not include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Porting a harness across runtimes.&lt;/li&gt;
&lt;li&gt;Automatically scoring output quality.&lt;/li&gt;
&lt;li&gt;A cost or ROI dashboard.&lt;/li&gt;
&lt;li&gt;OS-level sandboxing.&lt;/li&gt;
&lt;li&gt;Team authentication.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There was also no concept for grouping repeated executions of the same profile and task. Agent behavior varies from run to run, so repetition would be necessary before drawing stronger conclusions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Implementation update, November 5, 2026:&lt;/strong&gt; I checked this adaptation against &lt;a href="https://github.com/shimpeiws/yuurei/tree/f9e64dcc8108e96b29005fc6ac9f2bcbf9978428" rel="noopener noreferrer"&gt;v1.4.0&lt;/a&gt;. Yuurei now also supports OpenCode. Later additions include experimental repository seeding (&lt;code&gt;--seed-repo&lt;/code&gt;) and opt-in pre-run observation (&lt;code&gt;--observe&lt;/code&gt;). Pre-run observation records information about the prepared environment; it does not resolve the behavioral evaluation questions above. These additions do not change the original experiment or its results. The &lt;a href="https://github.com/shimpeiws/yuurei/blob/f9e64dcc8108e96b29005fc6ac9f2bcbf9978428/docs/contract.md" rel="noopener noreferrer"&gt;current public contract&lt;/a&gt; describes the implementation's guarantees and limits.&lt;/p&gt;

&lt;h2&gt;
  
  
  The question I still wanted to test
&lt;/h2&gt;

&lt;p&gt;One possibility remained open: could an accumulated harness prevent me from getting improvements that a newer model would otherwise provide?&lt;/p&gt;

&lt;p&gt;The original comparison could not answer that. PR2 and PR3 both used Sonnet 5. I had changed the harness while keeping the model fixed. Instructions written to compensate for an older model's weaknesses might behave differently when the model itself changes.&lt;/p&gt;

&lt;p&gt;Testing that requires the reverse comparison: preserve the harness and change the model.&lt;/p&gt;

&lt;p&gt;It also requires the older harness to still exist when I want to run the comparison. If I keep editing it in place, it may already be gone by the time the next model arrives.&lt;/p&gt;

&lt;p&gt;That was what yuurei was preparing me to do. I had not yet measured the effect I wanted to measure. I had built a way to preserve and rerun the configurations I would need to investigate it.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>testing</category>
      <category>devtools</category>
    </item>
  </channel>
</rss>
