<?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: Brian Jin</title>
    <description>The latest articles on DEV Community by Brian Jin (@kikashy).</description>
    <link>https://dev.to/kikashy</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%2F4064884%2Fd01cffb8-2417-464c-8002-d70dea685aca.png</url>
      <title>DEV Community: Brian Jin</title>
      <link>https://dev.to/kikashy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kikashy"/>
    <language>en</language>
    <item>
      <title>What I Learned Trying to Make AI-Agent Decisions Testable</title>
      <dc:creator>Brian Jin</dc:creator>
      <pubDate>Wed, 05 Aug 2026 23:30:29 +0000</pubDate>
      <link>https://dev.to/kikashy/what-i-learned-trying-to-make-ai-agent-decisions-testable-5h6h</link>
      <guid>https://dev.to/kikashy/what-i-learned-trying-to-make-ai-agent-decisions-testable-5h6h</guid>
      <description>&lt;h1&gt;
  
  
  What I Learned Trying to Make AI-Agent Decisions Testable
&lt;/h1&gt;

&lt;p&gt;AI agents can retrieve the right policy, call the right tools, and still reach the wrong conclusion.&lt;/p&gt;

&lt;p&gt;That gap became increasingly hard for me to ignore.&lt;/p&gt;

&lt;p&gt;Most agent systems are getting better at access and execution. They can search documents, query databases, call APIs, use MCP servers, and complete multi-step workflows.&lt;/p&gt;

&lt;p&gt;But many important business decisions depend on something different:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which evidence is actually required?&lt;/li&gt;
&lt;li&gt;Which rule applies in this situation?&lt;/li&gt;
&lt;li&gt;Which exception changes the outcome?&lt;/li&gt;
&lt;li&gt;What should happen when evidence is missing or conflicting?&lt;/li&gt;
&lt;li&gt;When must the agent stop and escalate?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those questions are often buried inside prompts, application code, policy documents, or the judgment of a few experienced people.&lt;/p&gt;

&lt;p&gt;That makes them difficult to test, review, reuse, and improve.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem Is Not Always Missing Knowledge
&lt;/h2&gt;

&lt;p&gt;Imagine an agent reviewing a new vendor.&lt;/p&gt;

&lt;p&gt;It retrieves:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the vendor-onboarding policy&lt;/li&gt;
&lt;li&gt;the sanctions-screening result&lt;/li&gt;
&lt;li&gt;the tax form&lt;/li&gt;
&lt;li&gt;the proposed annual spend&lt;/li&gt;
&lt;li&gt;the business justification&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The agent has access to all the relevant information.&lt;/p&gt;

&lt;p&gt;But it still has to determine:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;whether the request is in scope&lt;/li&gt;
&lt;li&gt;whether all mandatory evidence is present&lt;/li&gt;
&lt;li&gt;whether a sanctions match creates a hard stop&lt;/li&gt;
&lt;li&gt;whether high annual spend requires committee review&lt;/li&gt;
&lt;li&gt;whether incomplete evidence means rejection or escalation&lt;/li&gt;
&lt;li&gt;whether it has enough information to decide at all&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Retrieval helps the agent find the policy.&lt;/p&gt;

&lt;p&gt;It does not guarantee that the agent will apply the policy correctly.&lt;/p&gt;

&lt;p&gt;A model may produce a plausible explanation while overlooking an exception, treating missing evidence as negative evidence, or claiming that approval occurred when no authorized person was consulted.&lt;/p&gt;

&lt;p&gt;The answer can sound reasonable and still be indefensible.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Coding Agents Often Feel More Reliable
&lt;/h2&gt;

&lt;p&gt;Coding agents currently provide one of the clearest examples of useful multi-step agent behavior.&lt;/p&gt;

&lt;p&gt;I do not think that is only because models are unusually good at code.&lt;/p&gt;

&lt;p&gt;Coding agents work inside an environment that already knows how to challenge their output:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;compilers&lt;/li&gt;
&lt;li&gt;unit tests&lt;/li&gt;
&lt;li&gt;type systems&lt;/li&gt;
&lt;li&gt;linters&lt;/li&gt;
&lt;li&gt;runtime feedback&lt;/li&gt;
&lt;li&gt;version control&lt;/li&gt;
&lt;li&gt;code review&lt;/li&gt;
&lt;li&gt;CI/CD&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The model proposes work.&lt;/p&gt;

&lt;p&gt;The surrounding environment evaluates it.&lt;/p&gt;

&lt;p&gt;Most business agents do not have an equivalent judgment harness.&lt;/p&gt;

&lt;p&gt;They may have access to tools and knowledge, but the conditions behind a defensible decision remain implicit.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Tried First
&lt;/h2&gt;

&lt;p&gt;The obvious place to start was prompts.&lt;/p&gt;

&lt;p&gt;A prompt can say:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;always check sanctions&lt;/li&gt;
&lt;li&gt;require a tax form&lt;/li&gt;
&lt;li&gt;escalate high-value vendors&lt;/li&gt;
&lt;li&gt;never approve when evidence is incomplete&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This can work for a narrow workflow.&lt;/p&gt;

&lt;p&gt;But as the decision grows, the prompt becomes difficult to review and test. Rules, exceptions, evidence requirements, explanations, and workflow instructions become mixed together.&lt;/p&gt;

&lt;p&gt;A model can also interpret the same prose differently across runs or implementations.&lt;/p&gt;

&lt;p&gt;The next option is application code.&lt;/p&gt;

&lt;p&gt;Hard-coded logic is more deterministic, but it creates another problem. The judgment becomes coupled to one application, one programming language, and one deployment.&lt;/p&gt;

&lt;p&gt;A domain expert cannot easily review it. Another agent cannot reuse it without reproducing the logic. Changes become software releases rather than reviewed updates to an organizational decision contract.&lt;/p&gt;

&lt;p&gt;Skills and tool definitions help package behavior.&lt;/p&gt;

&lt;p&gt;MCP helps standardize access to context and capabilities.&lt;/p&gt;

&lt;p&gt;Policy engines can evaluate explicit rules.&lt;/p&gt;

&lt;p&gt;All of these are useful. None of them, by themselves, fully represent the evidence, applicability, exceptions, uncertainty, and escalation conditions behind a business decision.&lt;/p&gt;

&lt;p&gt;That led me to experiment with separating the judgment from both the model and the workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Idea: A Testable Judgment Contract
&lt;/h2&gt;

&lt;p&gt;I started working on what is now the &lt;strong&gt;Judgment Pack Specification&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A Judgment Pack is a declarative representation of the conditions behind a decision.&lt;/p&gt;

&lt;p&gt;At a high level, a pack can describe:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;what question is being decided&lt;/li&gt;
&lt;li&gt;when the pack applies&lt;/li&gt;
&lt;li&gt;which evidence is required&lt;/li&gt;
&lt;li&gt;which facts are relevant&lt;/li&gt;
&lt;li&gt;which rules and exceptions affect the outcome&lt;/li&gt;
&lt;li&gt;which conditions make the decision unresolved&lt;/li&gt;
&lt;li&gt;when escalation is required&lt;/li&gt;
&lt;li&gt;which outputs are valid&lt;/li&gt;
&lt;li&gt;how expected behavior can be tested&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A simplified vendor-onboarding pack might express:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Decision:
May this vendor be onboarded?

Required evidence:
- sanctions-screening result
- tax-form status

Exceptions:
- sanctions match → hard stop
- annual spend above threshold → committee review

Unresolved conditions:
- required evidence missing
- screening could not be completed
- approval authority is unknown
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important part is not the file format.&lt;/p&gt;

&lt;p&gt;The important part is that the decision conditions become a reviewable and testable artifact rather than hidden instructions inside a prompt.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Testability Changes
&lt;/h2&gt;

&lt;p&gt;Once the judgment is explicit, we can write scenarios such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Scenario 1:
Sanctions clear
Tax form received
Spend below threshold
Expected result: eligible for approval
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Scenario 2:
Sanctions match
Tax form received
Expected result: hard stop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Scenario 3:
Sanctions screening missing
Tax form received
Expected result: unresolved
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Scenario 4:
Sanctions clear
Tax form received
Spend above threshold
Expected result: committee review
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now a change to the pack can be evaluated against known expectations.&lt;/p&gt;

&lt;p&gt;If someone modifies the annual-spend exception and an existing scenario starts producing direct approval instead of committee review, the test should fail.&lt;/p&gt;

&lt;p&gt;That is closer to what coding agents already have: an environment that can challenge the result.&lt;/p&gt;

&lt;h2&gt;
  
  
  Correctly Refusing to Decide Is Part of Correctness
&lt;/h2&gt;

&lt;p&gt;One lesson has become especially important.&lt;/p&gt;

&lt;p&gt;A business agent should not always produce an answer.&lt;/p&gt;

&lt;p&gt;Sometimes the correct outcome is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;evidence required&lt;/li&gt;
&lt;li&gt;unresolved&lt;/li&gt;
&lt;li&gt;not applicable&lt;/li&gt;
&lt;li&gt;escalate&lt;/li&gt;
&lt;li&gt;human approval required&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Many current evaluation approaches reward producing the expected answer. But in enterprise decisions, a system can also fail by deciding when it should have stopped.&lt;/p&gt;

&lt;p&gt;That means abstention and escalation cannot be treated as fallback error states.&lt;/p&gt;

&lt;p&gt;They are first-class outcomes.&lt;/p&gt;

&lt;p&gt;A useful judgment system must be able to distinguish:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“The answer is no”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;from:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“The system does not yet have authority or evidence to answer.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Those are operationally very different.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Judgment Pack Does Not Solve
&lt;/h2&gt;

&lt;p&gt;I do not see this as a replacement for agent frameworks, MCP, policy engines, or knowledge graphs.&lt;/p&gt;

&lt;p&gt;They solve different parts of the system.&lt;/p&gt;

&lt;p&gt;MCP can connect an agent to a sanctions service.&lt;/p&gt;

&lt;p&gt;A gateway can control whether the agent is allowed to call it.&lt;/p&gt;

&lt;p&gt;A policy engine can evaluate a deterministic rule.&lt;/p&gt;

&lt;p&gt;A knowledge graph can represent relationships and organizational context.&lt;/p&gt;

&lt;p&gt;A Judgment Pack is intended to describe how those inputs contribute to a defensible decision.&lt;/p&gt;

&lt;p&gt;It also does not prove that source data is true.&lt;/p&gt;

&lt;p&gt;If a system receives a false sanctions result, a correct evaluator can still produce the wrong real-world outcome. Provenance, source trust, authorization, and evidence acquisition remain separate concerns.&lt;/p&gt;

&lt;p&gt;The current project is an attempt to make those boundaries explicit rather than claiming one specification solves all of agent governance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Questions That Are Still Open
&lt;/h2&gt;

&lt;p&gt;Opening the project as open source is important because several of the hardest questions should not be answered by one person.&lt;/p&gt;

&lt;p&gt;Some of the questions I am currently exploring are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How should an agent select the correct pack?&lt;/li&gt;
&lt;li&gt;How should multiple packs compose?&lt;/li&gt;
&lt;li&gt;Where should Judgment Pack end and policy engines begin?&lt;/li&gt;
&lt;li&gt;How should conflicting evidence be represented?&lt;/li&gt;
&lt;li&gt;Which evaluator semantics must be portable across runtimes?&lt;/li&gt;
&lt;li&gt;How should evidence freshness be expressed?&lt;/li&gt;
&lt;li&gt;How should organizations version and approve judgment changes?&lt;/li&gt;
&lt;li&gt;How should authorization be separated from decision evaluation?&lt;/li&gt;
&lt;li&gt;What makes an explanation defensible rather than merely plausible?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are specification questions, runtime questions, and organizational questions at the same time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I Opened It
&lt;/h2&gt;

&lt;p&gt;I spent many years building enterprise data platforms, operational systems, and AI infrastructure.&lt;/p&gt;

&lt;p&gt;Across those environments, organizations often had plenty of data and documentation. What they struggled to preserve was the judgment behind important decisions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;which evidence mattered&lt;/li&gt;
&lt;li&gt;why an exception was allowed&lt;/li&gt;
&lt;li&gt;when a rule stopped applying&lt;/li&gt;
&lt;li&gt;who had authority&lt;/li&gt;
&lt;li&gt;what uncertainty required escalation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Frontier models can reason over more context and use more tools.&lt;/p&gt;

&lt;p&gt;But every organization still has its own conditions for what counts as an acceptable decision.&lt;/p&gt;

&lt;p&gt;That judgment should not remain trapped inside prompts, undocumented code, or individual experience.&lt;/p&gt;

&lt;p&gt;It should be possible to review, test, version, and improve it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Project Is Now Open Source
&lt;/h2&gt;

&lt;p&gt;The Judgment Pack Specification and runtime are now open source.&lt;/p&gt;

&lt;p&gt;I am looking for contributors in several areas:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Specification review&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Challenge how the project represents evidence, exceptions, uncertainty, escalation, and outcomes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Real-world decision packs&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Contribute a difficult decision from procurement, data governance, security, support, finance, operations, or another domain.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Adversarial scenarios&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Add cases where a reasonable-looking agent should refuse, escalate, or produce a different outcome.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Runtime and tooling&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Improve the Go runtime, evaluator, CLI, documentation, and agent integrations.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The most useful first contribution may not be code.&lt;/p&gt;

&lt;p&gt;A real decision that exposes where the current model breaks can be more valuable than another feature.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Website: &lt;a href="https://judgmentpack.org" rel="noopener noreferrer"&gt;judgmentpack.org&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Specification: &lt;a href="https://github.com/Judgment-Pack/judgment-pack-spec" rel="noopener noreferrer"&gt;Judgment-Pack/judgment-pack-spec&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Good first issues: &lt;a href="https://github.com/Judgment-Pack/judgment-pack-spec/labels/good%20first%20issue" rel="noopener noreferrer"&gt;Browse beginner-friendly issues&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I would especially value critical feedback from people working on agent evaluation, MCP, policy engines, rules-as-code, human approval, and enterprise AI systems.&lt;/p&gt;

&lt;p&gt;The project will improve faster through strong disagreement and real use cases than through agreement alone.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Disclosure:&lt;/strong&gt; AI tools assisted with editing and structure. The project design, technical content, examples, and final review are my own.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>ai</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
