<?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>Forem: Dariusz Newecki</title>
    <description>The latest articles on Forem by Dariusz Newecki (@dariusz_newecki_e35b0924c).</description>
    <link>https://forem.com/dariusz_newecki_e35b0924c</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3635377%2Fed3a13b4-11d0-4f67-86de-6e2dd08a992e.png</url>
      <title>Forem: Dariusz Newecki</title>
      <link>https://forem.com/dariusz_newecki_e35b0924c</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/dariusz_newecki_e35b0924c"/>
    <language>en</language>
    <item>
      <title>Four Gates. One Governor. Zero Code Written. CORE Is Autonomous.</title>
      <dc:creator>Dariusz Newecki</dc:creator>
      <pubDate>Wed, 13 May 2026 12:10:27 +0000</pubDate>
      <link>https://forem.com/dariusz_newecki_e35b0924c/four-gates-one-governor-zero-code-written-core-is-autonomous-34b6</link>
      <guid>https://forem.com/dariusz_newecki_e35b0924c/four-gates-one-governor-zero-code-written-core-is-autonomous-34b6</guid>
      <description>&lt;p&gt;&lt;em&gt;When I defined A3 fourteen weeks ago, I wrote: "The daemon runs continuously, the Blackboard clears, the codebase converges, and every action is visible." Today all four gates that operationalize that definition are closed. I want to be precise about what that means — and honest about where the evidence is still accumulating.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What A3 Actually Is
&lt;/h2&gt;

&lt;p&gt;A3 is not a version number. It is a state the system either is in or isn't.&lt;/p&gt;

&lt;p&gt;I defined it with four gates because "autonomous" is a claim that's easy to make and hard to prove. Each gate closes one dimension of the proof. You can't skip one and still make the claim honestly.&lt;/p&gt;

&lt;p&gt;The four gates:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;G1 — Loop closure.&lt;/strong&gt; An autonomous fix lands end-to-end on a real example. Finding detected → proposal created → proposal approved → execution succeeded → re-audit confirms resolution. Not against a toy. Against the live codebase.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;G2 — Convergence.&lt;/strong&gt; Sustained state where the rate of finding resolution exceeds the rate of finding creation. This is what makes "autonomous" mean something rather than describing a system that runs forever without making progress.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;G3 — Consequence chain.&lt;/strong&gt; Every action is traceable. Finding → Proposal → Approval → Execution → File changes → New findings — all six edges materialized as queryable rows. The governor doesn't have to read source code to know what happened. The chain is the answer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;G4 — Governance in &lt;code&gt;.intent/&lt;/code&gt;.&lt;/strong&gt; No enforcement logic, path mappings, or policy thresholds live in &lt;code&gt;src/&lt;/code&gt;. All of it lives in &lt;code&gt;.intent/&lt;/code&gt; — human-authored files, read-only to CORE at runtime, never written by autonomous workers. This gate is the reason the governor role is real rather than nominal.&lt;/p&gt;

&lt;p&gt;All four are closed.&lt;/p&gt;




&lt;h2&gt;
  
  
  The One That Took Longest to Get Right
&lt;/h2&gt;

&lt;p&gt;G3 closed first — May 1. G1 was proven during the 79-second self-heal I wrote about last week. G4 closed May 10, after a campaign that moved 32 operational config sections out of hardcoded &lt;code&gt;src/&lt;/code&gt; literals and into governed YAML, touching 113 files.&lt;/p&gt;

&lt;p&gt;G2 was the last one, and the most careful.&lt;/p&gt;

&lt;p&gt;The structural piece was a circuit-breaker. After N consecutive identical-signature proposal failures, the affected findings are marked DELEGATE and a hazard finding is posted to the Blackboard. What this does: it converts systematic errors — an LLM producing the same wrong output over and over, a rule with no valid automated fix — into governance signals rather than infinite churn. The system doesn't spin. It escalates.&lt;/p&gt;

&lt;p&gt;That's the architecture of convergence. The daemon can't get stuck in a loop it can't exit. Every unmappable pattern eventually surfaces as a human decision.&lt;/p&gt;

&lt;p&gt;I closed G2 on May 12. Band D — 107 issues, fourteen weeks of engine integrity work — closed the same day.&lt;/p&gt;




&lt;h2&gt;
  
  
  What the Audit Shows
&lt;/h2&gt;

&lt;p&gt;Current state: &lt;code&gt;core-admin code audit&lt;/code&gt; returns PASS, 20 findings.&lt;/p&gt;

&lt;p&gt;Fourteen weeks ago, before Band D started, the audit returned findings in the hundreds across namespaces we didn't even have rules for yet. The findings weren't noise — they were governance debt we couldn't see because the instruments weren't built yet.&lt;/p&gt;

&lt;p&gt;That's the counterintuitive thing about this kind of system. Adding a rule doesn't fix violations. It makes violations visible. When ADR-031 landed — no hardcoded runtime directory paths — it surfaced 40 pre-existing violations in one run. The audit went from PASS to FAIL. That FAIL was progress.&lt;/p&gt;

&lt;p&gt;20 findings at PASS is not a clean codebase. It's a codebase where every remaining finding is known, tracked, and either queued for autonomous remediation or parked as a deliberate human decision. The difference between "has findings" and "has uncontrolled findings" is the entire value proposition.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Governor Role, Fourteen Weeks In
&lt;/h2&gt;

&lt;p&gt;I am not a programmer. I have not written implementation code during this project.&lt;/p&gt;

&lt;p&gt;What I've done: defined constitutional rules, authored ADRs, reviewed proposals that required architectural judgment, held the line on decisions where the system wanted to go one way and the architecture required another. One example: when &lt;code&gt;modularity.class_too_large&lt;/code&gt; kept triggering on &lt;code&gt;PathResolver&lt;/code&gt;, the autonomous path wanted to split it. The architectural answer was an exclusion in governance config, with a documented removal condition. That decision belongs in &lt;code&gt;.intent/&lt;/code&gt;. It takes three lines of YAML, not a code change.&lt;/p&gt;

&lt;p&gt;The G4 gate is what makes this possible. When governance lives in &lt;code&gt;src/&lt;/code&gt;, changing it requires a programmer. When it lives in &lt;code&gt;.intent/&lt;/code&gt;, it requires a governor.&lt;/p&gt;




&lt;h2&gt;
  
  
  What "Done" Honestly Means
&lt;/h2&gt;

&lt;p&gt;The machinery is complete. The empirical evidence is young.&lt;/p&gt;

&lt;p&gt;G2's structural guarantee — the circuit-breaker — is real. What I don't yet have is weeks of daemon logs showing sustained convergence across diverse rule namespaces, under varied load, with a full autonomous approval cycle running. The gate is closed by architecture. The demonstration is still accumulating.&lt;/p&gt;

&lt;p&gt;I'll write about that when the logs are there to show. The series has been honest about the distance between "designed to work" and "observed working." This is no different.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;The system is autonomous. The next question is whether it's legible — to someone who isn't its author.&lt;/p&gt;

&lt;p&gt;That's Band E. The outward-facing work: making the consequence chain readable to a stranger, making the governor role demonstrable rather than described, making the case that a regulated-industry team could operate this without understanding the source code.&lt;/p&gt;

&lt;p&gt;The 79-second self-heal was the internal proof. The external proof is what comes next.&lt;/p&gt;




&lt;p&gt;CORE is a governed software factory, actively built by the method it describes — &lt;a href="https://github.com/DariuszNewecki/CORE" rel="noopener noreferrer"&gt;source on GitHub&lt;/a&gt;. If you're building in the governed-AI or regulated-software space and this resonates, comments are open.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>governance</category>
      <category>devops</category>
      <category>programming</category>
    </item>
    <item>
      <title>79 Seconds: Our AI Governance System's First Autonomous Self-Heal</title>
      <dc:creator>Dariusz Newecki</dc:creator>
      <pubDate>Sat, 09 May 2026 13:57:13 +0000</pubDate>
      <link>https://forem.com/dariusz_newecki_e35b0924c/79-seconds-our-ai-governance-systems-first-autonomous-self-heal-53a8</link>
      <guid>https://forem.com/dariusz_newecki_e35b0924c/79-seconds-our-ai-governance-systems-first-autonomous-self-heal-53a8</guid>
      <description>&lt;p&gt;&lt;em&gt;I am not a programmer. I wrote zero lines of code today. The system fixed itself.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;We've been building CORE — a deterministic governance runtime that surrounds AI with constitutional law so that AI mistakes are detectable, traceable, and recoverable. The pitch is simple: a non-programmer governor holds the &lt;em&gt;why&lt;/em&gt;, AI and workers handle the &lt;em&gt;how&lt;/em&gt;, and the constitution ensures nothing unauthorized happens.&lt;/p&gt;

&lt;p&gt;Today we proved it works. Not in a demo. Not against a toy example. Against a real system that had been stuck for four days.&lt;/p&gt;

&lt;h2&gt;
  
  
  The State of Things This Morning
&lt;/h2&gt;

&lt;p&gt;The autonomous loop — detect violation → propose fix → approve → execute → verify — hadn't produced a successful commit in four days. The dashboard said &lt;code&gt;last_consequence: 4d ago&lt;/code&gt;. The blackboard (our shared state surface) had 55 open findings, none of which the loop could act on. Proposals were being generated and immediately rejected as structurally incoherent.&lt;/p&gt;

&lt;p&gt;From the outside it looked alive. Twenty active workers, sensors firing, heartbeats posting. But nothing was moving.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Investigation
&lt;/h2&gt;

&lt;p&gt;We didn't start by writing code. We started by asking questions of the system itself.&lt;/p&gt;

&lt;p&gt;The first query revealed the shape of the problem: 150 failed proposals, 0 executed today, the last consequence three days old. Dig deeper: 128 of those 150 failures were the same error — a constitutional gate blocking the same action, over and over. That's not a bug in the traditional sense. That's the system correctly enforcing its own laws while an upstream generator keeps producing proposals that violate them.&lt;/p&gt;

&lt;p&gt;Then: the 55 "open" findings the remediator was supposed to act on — what were they actually? Mostly &lt;code&gt;blackboard.entry_stale&lt;/code&gt; meta-findings. The loop was trying to remediate its own observability noise. The actual code violations — 25 of them, confirmed by audit — were invisible, blocked by their own historical entries sitting in &lt;code&gt;abandoned&lt;/code&gt; status, which the sensor dedup treated as permanent silencers.&lt;/p&gt;

&lt;p&gt;Seven distinct root causes, nested. Each one blocking the diagnostic of the next.&lt;/p&gt;

&lt;h2&gt;
  
  
  What We Fixed
&lt;/h2&gt;

&lt;p&gt;In order of discovery:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The stale-finding storm.&lt;/strong&gt; The BlackboardShopManager was scanning all entry types for SLA violations — including heartbeats with a 10-minute SLA. Every daemon restart, thousands of old heartbeat entries immediately exceeded their SLA. One line added to the WHERE clause: &lt;code&gt;AND entry_type IN ('finding', 'proposal')&lt;/code&gt;. Storm stopped. Zero new stale findings in 3 minutes versus 3 per minute before.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The consequence chain gap.&lt;/strong&gt; When a proposal completed successfully, the findings it had addressed stayed in &lt;code&gt;deferred_to_proposal&lt;/code&gt; status forever. The failure path had a revival method. The success path had nothing. New method: &lt;code&gt;resolve_deferred_entries_for_completed_proposal()&lt;/code&gt;. Symmetric with the failure path. Twelve lines of code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The proposal collapse.&lt;/strong&gt; The proposal generator was creating proposals for N files but only including one action — always targeting &lt;code&gt;scope.files[0]&lt;/code&gt;. A proposal claiming to fix 8 violations would touch exactly one file and leave 7 untouched. The fix: one ProposalAction per affected file, ordered 0 through N-1. The executor already supported multi-action proposals. Nobody had ever wired the generator correctly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The DELEGATE routing gap.&lt;/strong&gt; &lt;code&gt;modularity.class_too_large&lt;/code&gt; violations — class-level refactors that require human judgment — were marked &lt;code&gt;PENDING&lt;/code&gt; in the remediation map. PENDING entries are excluded from the active map by the loader. So those findings were claimed, found unmappable, and released back to open every 60 seconds. Forever. The fix was a YAML status change: &lt;code&gt;PENDING&lt;/code&gt; → &lt;code&gt;DELEGATE&lt;/code&gt;. The loader already handled DELEGATE entries. One word changed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The permanent-silence bug.&lt;/strong&gt; When we cleared the stale queue, we used &lt;code&gt;abandoned&lt;/code&gt; status. What we didn't know: &lt;code&gt;abandoned&lt;/code&gt; is treated the same as &lt;code&gt;open&lt;/code&gt; by the sensor dedup logic. "Already represented on the blackboard, do not re-post." So the violations we'd cleaned up were now permanently invisible. Filed as a design-level issue — &lt;code&gt;abandoned&lt;/code&gt; and "deliberately suppressed" need to be different states. Immediate fix: flip the cleaned-up &lt;code&gt;audit.violation::&lt;/code&gt; entries to &lt;code&gt;resolved&lt;/code&gt;, which the sensor correctly treats as "re-detectable."&lt;/p&gt;

&lt;h2&gt;
  
  
  13:16:18
&lt;/h2&gt;

&lt;p&gt;With the queue clean, the sensors unblocked, and the DELEGATE routing live, the loop had something to work with. A needs_split violation appeared. The remediator created a proposal. We approved it — the first manual approval of the day.&lt;/p&gt;

&lt;p&gt;At 13:16:18, &lt;code&gt;ProposalConsumerWorker&lt;/code&gt; picked it up. &lt;code&gt;fix.modularity&lt;/code&gt; ran. The LLM took 33 seconds to analyze the file. It returned a plan.&lt;/p&gt;

&lt;p&gt;The plan had one module. The validator requires at least two for a split.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;mark_failed&lt;/code&gt; ran. The file changes were reverted. The proposal was marked failed.&lt;/p&gt;

&lt;p&gt;Then: &lt;code&gt;revive_findings_for_failed_proposal&lt;/code&gt; ran. The deferred finding flipped back to open.&lt;/p&gt;

&lt;p&gt;At 13:17:37 — 79 seconds after failure — the finding was re-claimed, a new proposal was created, and it was sitting in the approval inbox.&lt;/p&gt;

&lt;p&gt;The loop had self-healed. Without intervention. Traceable at every step.&lt;/p&gt;

&lt;h2&gt;
  
  
  What "Self-Heal" Actually Means
&lt;/h2&gt;

&lt;p&gt;The LLM produced bad output. The system caught it, reverted the change, put the work back in the queue, and asked again. No data was corrupted. No state was left inconsistent. The governor's role was to review the next proposal and decide whether to approve it.&lt;/p&gt;

&lt;p&gt;This is the regulated-industry argument for this kind of governance. You don't need AI to never fail. You need failure to be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Detectable.&lt;/strong&gt; The validator caught a 1-module "split" plan before anything was committed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bounded.&lt;/strong&gt; The gate order — Conservation Gate, IntentGuard, plan validator — ensures AI output can't bypass constitutional constraints even if it tries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recoverable.&lt;/strong&gt; The revival mechanism returned the system to a known-good state. The finding was exactly as it was before the failed attempt.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Traceable.&lt;/strong&gt; Every step — finding posted, claimed, deferred, proposal created, approved, executing, failed, revived, re-claimed — is a timestamped row in a queryable table.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The audit trail isn't bolted on. It's how the loop works.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Governor Role
&lt;/h2&gt;

&lt;p&gt;I am not a programmer. I wrote zero lines of code today.&lt;/p&gt;

&lt;p&gt;What I did: asked questions of the system, recognized when an answer pointed to a design gap rather than a bug, held the line on architectural decisions (backbone workers don't get split autonomously, regardless of what the violation detector says), and approved one proposal when the conditions were right.&lt;/p&gt;

&lt;p&gt;The rest was diagnosis, sequencing, and constitutional reasoning. The code came from Claude Code on the development machine, prompted by the analysis. The analysis came from reading the system's own outputs — queries, logs, dashboard — not from reading source files.&lt;/p&gt;

&lt;p&gt;That's the governor role. Not "I don't code therefore I'm not involved in technical work." The opposite: deeply involved in technical decisions, operating at the right level of abstraction, with a system that surfaces the right information to make those decisions.&lt;/p&gt;

&lt;p&gt;The 79-second self-heal wasn't despite the governance architecture. It was because of it.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;The loop machinery is sound. The next bottleneck is &lt;code&gt;fix.modularity&lt;/code&gt;'s prompt — the LLM needs to be told explicitly to produce at least two modules and given responsibility-grouping context from the audit findings. That's prompt engineering work, not infrastructure.&lt;/p&gt;

&lt;p&gt;When that's fixed, CORE will autonomously split files, verify the split, commit, re-audit, and confirm the finding is resolved — without a human writing a line of code.&lt;/p&gt;

&lt;p&gt;We're close.&lt;/p&gt;




&lt;p&gt;CORE is a governed software factory, actively being built by the method it describes — &lt;a href="https://github.com/DariuszNewecki/CORE" rel="noopener noreferrer"&gt;source on GitHub&lt;/a&gt;. If you're building in the governed-AI or regulated-software space and this resonates, comments are open.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>governance</category>
      <category>devops</category>
      <category>programming</category>
    </item>
    <item>
      <title>CORE Closed Its Audit Trail. Then Found 18 Engine Gaps It Couldn't See Before.</title>
      <dc:creator>Dariusz Newecki</dc:creator>
      <pubDate>Fri, 01 May 2026 21:35:48 +0000</pubDate>
      <link>https://forem.com/dariusz_newecki_e35b0924c/core-closed-its-audit-trail-then-found-18-engine-gaps-it-couldnt-see-before-d00</link>
      <guid>https://forem.com/dariusz_newecki_e35b0924c/core-closed-its-audit-trail-then-found-18-engine-gaps-it-couldnt-see-before-d00</guid>
      <description>&lt;p&gt;Six weeks ago I published a post here titled &lt;em&gt;"Your Agent Has Two Logs. One of Them Doesn't Exist Yet."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This week, Band B closed. CORE's second log exists.&lt;/p&gt;

&lt;p&gt;Here's what that actually means — and why closing it immediately made things harder.&lt;/p&gt;




&lt;h2&gt;
  
  
  The two-log problem, briefly
&lt;/h2&gt;

&lt;p&gt;Every autonomous system that touches production code has two logs whether it admits it or not.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Log one:&lt;/strong&gt; what happened. Files changed, tests ran, commits landed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Log two:&lt;/strong&gt; &lt;em&gt;why&lt;/em&gt; it happened. What finding triggered what proposal. What approval authorized what execution. What execution caused what file change. What file change produced what new finding.&lt;/p&gt;

&lt;p&gt;Log two is the audit trail. In a regulated environment, log two isn't optional — it's the difference between a system you can defend and one you can't.&lt;/p&gt;

&lt;p&gt;CORE had log one. Log two was missing.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Band B actually required
&lt;/h2&gt;

&lt;p&gt;Eight issues. Four ADRs. Seven coordinated write-path decisions — where in the code does attribution get written, in what shape, guaranteed by what gate.&lt;/p&gt;

&lt;p&gt;The hard part wasn't the code. It was making the causality chain &lt;em&gt;complete&lt;/em&gt;. Every link had to be present:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Finding → which proposal claimed it (and when)&lt;/li&gt;
&lt;li&gt;Proposal → which execution consumed it (and what commit resulted)&lt;/li&gt;
&lt;li&gt;Execution → which new findings it produced&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Miss one link and the chain is decoration, not evidence.&lt;/p&gt;

&lt;p&gt;196 commits in April. 25 issues closed. Band B: 8 closed, 0 open.&lt;/p&gt;




&lt;h2&gt;
  
  
  What happened immediately after
&lt;/h2&gt;

&lt;p&gt;Band D opened with 18 issues.&lt;/p&gt;

&lt;p&gt;Not because we introduced regressions. Because closing Band B made the engine's integrity gaps visible in a way they weren't before. You can't measure attribution fidelity until attribution exists. Once it does, you can see exactly where the engine fails to populate it correctly.&lt;/p&gt;

&lt;p&gt;This is the convergence principle working as designed. The system gets more capable. It immediately finds more problems with itself. The audit PASS holds — 19 active workers, findings are warnings about modularity, not governance failures. But the work queue doesn't shrink when a band closes. It shifts.&lt;/p&gt;




&lt;h2&gt;
  
  
  What "GxP-load-bearing" means in practice
&lt;/h2&gt;

&lt;p&gt;I've been building CORE in part for environments like pharmaceutical manufacturing — where an AI system that modifies code or configuration needs to prove it acted within authorized boundaries, on authorized intent, with a complete audit trail.&lt;/p&gt;

&lt;p&gt;GxP (Good Practice regulations) doesn't care what your system &lt;em&gt;can&lt;/em&gt; do. It cares what your system &lt;em&gt;can prove&lt;/em&gt; it did.&lt;/p&gt;

&lt;p&gt;Band B is the difference between CORE being a capable tool and CORE being a defensible tool. The second log is what makes it defensible.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;Band D: engine integrity. 18 open issues. The system that now has a complete audit trail needs its engine tightened before those traces are fully trustworthy.&lt;/p&gt;

&lt;p&gt;Then Band E: external validation. CORE governing a repository it didn't build.&lt;/p&gt;

&lt;p&gt;The second log exists. Now we make sure everything it records is true.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;CORE is open source: &lt;a href="https://github.com/DariuszNewecki/CORE" rel="noopener noreferrer"&gt;github.com/DariuszNewecki/CORE&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Previous in this series: &lt;a href="https://dev.to/dariusz_newecki_e35b0924c/your-agent-has-two-logs-one-of-them-doesnt-exist-yet-253a"&gt;Your Agent Has Two Logs. One of Them Doesn't Exist Yet.&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>python</category>
      <category>core</category>
    </item>
    <item>
      <title>My Audit Caught My Audit Being Wrong</title>
      <dc:creator>Dariusz Newecki</dc:creator>
      <pubDate>Sat, 25 Apr 2026 22:16:52 +0000</pubDate>
      <link>https://forem.com/dariusz_newecki_e35b0924c/my-audit-caught-my-audit-being-wrong-42b6</link>
      <guid>https://forem.com/dariusz_newecki_e35b0924c/my-audit-caught-my-audit-being-wrong-42b6</guid>
      <description>&lt;p&gt;&lt;em&gt;And that's exactly what it's supposed to do.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;A few days ago I ran a diagnostic on CORE — the governance system I'm building that supervises AI-generated code. The diagnostic was supposed to investigate why a specific audit rule appeared to be silently failing. Not firing. Producing zero findings against files it should have flagged.&lt;/p&gt;

&lt;p&gt;I ran the investigation carefully. Stage by stage. I came to a conclusion.&lt;/p&gt;

&lt;p&gt;The conclusion was wrong.&lt;/p&gt;

&lt;p&gt;And I only found that out because the system itself told me so.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I thought was happening
&lt;/h2&gt;

&lt;p&gt;CORE has an audit rule called &lt;code&gt;autonomy.tracing.mandatory&lt;/code&gt;. It checks that any class ending in &lt;code&gt;Agent&lt;/code&gt; contains a mandatory call to &lt;code&gt;self.tracer.record&lt;/code&gt;. The logic is straightforward: if an autonomous agent produces work, that work must be traceable. No tracing call — the rule flags it.&lt;/p&gt;

&lt;p&gt;My notes said the rule was firing zero findings against &lt;code&gt;SelfHealingAgent&lt;/code&gt; — a class with, in fact, zero tracer references. A rule designed to catch exactly that situation, catching nothing.&lt;/p&gt;

&lt;p&gt;That's a governance gap. If a rule exists and silently fails, you don't have an audit system. You have a theatrical one.&lt;/p&gt;

&lt;p&gt;So I investigated.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I actually found
&lt;/h2&gt;

&lt;p&gt;The rule was firing. Correctly. Both findings were present, cleanly, in &lt;code&gt;reports/audit_findings.json&lt;/code&gt;:&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;"check_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"autonomy.tracing.mandatory"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"severity"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"warning"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Line 51: missing mandatory call(s): ['self.tracer.record']"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"file_path"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"src/will/agents/self_healing_agent.py"&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 system wasn't broken. The diagnostic's starting assumption was broken.&lt;/p&gt;

&lt;p&gt;Here's where it came from. CORE's audit output is rendered through Rich — a Python library that produces beautiful terminal tables with color, alignment, and spacing. Rich also truncates long strings to fit columns. So &lt;code&gt;autonomy.tracing.mandatory&lt;/code&gt; becomes &lt;code&gt;autonomy.tracing.mandat…&lt;/code&gt; on screen.&lt;/p&gt;

&lt;p&gt;When I ran &lt;code&gt;grep 'tracing.mandatory'&lt;/code&gt; against the captured terminal output to verify the finding, I got zero matches. Not because the finding wasn't there — because Rich had silently eaten the last four characters of the rule name, and my grep pattern was looking for the full string.&lt;/p&gt;

&lt;p&gt;I used display output as an oracle. Display output lied.&lt;/p&gt;

&lt;p&gt;The JSON source of truth never did.&lt;/p&gt;




&lt;h2&gt;
  
  
  The stage-by-stage result
&lt;/h2&gt;

&lt;p&gt;I re-ran the diagnostic properly, going to primary sources instead of rendered output:&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;Status&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Rule loaded and mapped&lt;/td&gt;
&lt;td&gt;PASS — rule extracted, bound to &lt;code&gt;ast_gate&lt;/code&gt; engine&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scope resolution&lt;/td&gt;
&lt;td&gt;PASS — &lt;code&gt;self_healing_agent.py&lt;/code&gt; in scope&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Engine dispatch&lt;/td&gt;
&lt;td&gt;PASS — engine ran against the file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Auto-ignore&lt;/td&gt;
&lt;td&gt;PASS — zero suppressions, nothing dropped silently&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Finding emitted&lt;/td&gt;
&lt;td&gt;PASS — present in &lt;code&gt;audit_findings.json&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Every stage passed. The investigation had no failure to explain, because there was no failure. It was investigating a ghost.&lt;/p&gt;

&lt;p&gt;Direct engine invocation confirmed it independently:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Standalone check — no orchestrator involved
&lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;node&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;ast&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;walk&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tree&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;GenericASTChecks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;is_selected&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;GenericASTChecks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;validate_requirement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;requirement&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;type&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;__name__&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;getattr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;?&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Output:
# ClassDef SelfHealingAgent -&amp;gt; missing mandatory call(s): ['self.tracer.record']
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same verdict. No ambiguity.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why this matters more than "I made a mistake"
&lt;/h2&gt;

&lt;p&gt;I'm building a system where AI generates code and a deterministic governance layer audits it. The entire value proposition is that the governance layer is trustworthy. Not smart — &lt;em&gt;trustworthy&lt;/em&gt;. You need to be able to look at a finding and know it reflects reality. You need to be able to look at a clean audit and know the system actually checked.&lt;/p&gt;

&lt;p&gt;That's called instrument qualification. In regulated industries — pharmaceuticals, medical devices, aerospace — you don't just validate the product. You validate the instruments you used to measure the product. A thermometer that reads 37°C when the actual temperature is 39°C isn't a minor inconvenience. It's a systematic lie that compounds silently across every reading it ever produces.&lt;/p&gt;

&lt;p&gt;I accidentally demonstrated the same principle in software.&lt;/p&gt;

&lt;p&gt;When I used &lt;code&gt;grep&lt;/code&gt; against Rich-rendered terminal output, I was reading from an instrument I hadn't qualified. Rich is a display library. It's not a data source. It's designed to make things readable to humans, not parseable by machines. Using it as a source of truth for a diagnostic is exactly as reliable as doing a medical measurement with a ruler.&lt;/p&gt;

&lt;p&gt;The JSON report is the qualified instrument. It's the canonical output. It doesn't truncate. It doesn't wrap. It doesn't abbreviate for column fit. It says what the system found.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A passing audit with many findings is less honest than a failing audit with fewer real ones. An instrument that gives you clean-looking output that misrepresents reality isn't helping you — it's flattering you.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What I changed
&lt;/h2&gt;

&lt;p&gt;Two things.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One: I added the stale references explicitly to the diagnostic record.&lt;/strong&gt; My notes had two wrong module paths that would have caused anyone running the diagnostic in the future to hit &lt;code&gt;ImportError&lt;/code&gt; immediately. &lt;code&gt;AuditorContext&lt;/code&gt; is not in &lt;code&gt;mind.logic.engines.ast_gate.base&lt;/code&gt; — it's in &lt;code&gt;mind.governance.audit_context&lt;/code&gt;. I documented both as stale references, with the correct paths. Constitutional debt is honest debt. Hiding it helps no one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Two: I documented the grep-against-Rich anti-pattern.&lt;/strong&gt; Not as a personal failure, but as a category. If I did it, someone else will do it, or I'll do it again in six months under pressure. The pattern needs a name so it can be recognized.&lt;/p&gt;




&lt;h2&gt;
  
  
  The uncomfortable version
&lt;/h2&gt;

&lt;p&gt;Here's the uncomfortable version of this story: I almost propagated the wrong conclusion.&lt;/p&gt;

&lt;p&gt;If I'd stopped at "zero grep matches, rule is not firing," I would have written a finding that said the governance system had a blind spot. I might have gone looking for a fix in the wrong place. I might have introduced a workaround that solved a problem that didn't exist, while leaving a different problem — the unreliable diagnostic method — completely intact.&lt;/p&gt;

&lt;p&gt;In a system that supervises autonomous AI code generation, a wrong finding about your audit rules is worse than a missing finding. A missing finding is a gap. A wrong finding is a confidence injection. You become &lt;em&gt;more&lt;/em&gt; certain the system is broken in a specific way, and that certainty guides you away from the actual state.&lt;/p&gt;

&lt;p&gt;That's the failure mode I'm most worried about in AI-supervised systems generally. Not that the AI is wrong — everyone accepts the AI might be wrong. The failure mode is when the verification layer produces plausible-looking output that you stop checking.&lt;/p&gt;

&lt;p&gt;CORE is built on the assumption that every layer lies until verified. Including the diagnostic layer. Including me.&lt;/p&gt;

&lt;p&gt;I'm not a programmer. I'm closer to a lawmaker than a coder. I built a governance system because I understand governance better than I understand AST traversal. Swimming against a current you can't even see clearly is exactly the situation where you need your instruments to be honest. Flattery is the thing that drowns you.&lt;/p&gt;

&lt;p&gt;The system didn't flatter me. That's not a bug. That's the only thing I actually need it to do.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;CORE is an open-source, deterministic governance runtime for AI-generated code. You can find it at &lt;a href="https://github.com/DariuszNewecki/CORE" rel="noopener noreferrer"&gt;github.com/DariuszNewecki/CORE&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>programming</category>
      <category>devops</category>
    </item>
    <item>
      <title>The First Test CORE Ever Wrote For Itself</title>
      <dc:creator>Dariusz Newecki</dc:creator>
      <pubDate>Sat, 18 Apr 2026 14:40:25 +0000</pubDate>
      <link>https://forem.com/dariusz_newecki_e35b0924c/the-first-test-core-ever-wrote-for-itself-2k44</link>
      <guid>https://forem.com/dariusz_newecki_e35b0924c/the-first-test-core-ever-wrote-for-itself-2k44</guid>
      <description>&lt;p&gt;&lt;em&gt;And why it was wrong — and why that's exactly the point.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Today, at 16:24 CET, my system wrote a test file for itself.&lt;/p&gt;

&lt;p&gt;Not a test I wrote. Not a test a developer wrote. A test that CORE — my constitutional governance runtime — autonomously detected was missing, proposed to generate, waited for my approval, and then wrote using its own CoderAgent.&lt;/p&gt;

&lt;p&gt;The test was wrong. The methods it tested don't exist. The API it assumed was hallucinated.&lt;/p&gt;

&lt;p&gt;And I'm more excited about this than if it had been perfect.&lt;/p&gt;




&lt;h2&gt;
  
  
  What CORE is (briefly)
&lt;/h2&gt;

&lt;p&gt;CORE is a deterministic governance runtime that surrounds AI code generation with constitutional law. AI produces code, but every output is verified against rules, audited, and must pass governance gates before execution. The human role is governor — not programmer.&lt;/p&gt;

&lt;p&gt;I've written about this system before. The previous milestone was &lt;a href="https://dev.to/dariusznewecki/when-my-ai-blocked-itself"&gt;when CORE blocked itself&lt;/a&gt; — a rule violation preventing its own remediation from executing. Today's milestone is different. Today, the system grew a new autonomous capability.&lt;/p&gt;




&lt;h2&gt;
  
  
  Stream B: closing the test loop
&lt;/h2&gt;

&lt;p&gt;CORE already has a working autonomous loop for code quality:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AuditViolationSensor detects violation
  → ViolationRemediatorWorker creates proposal
  → ProposalConsumerWorker executes fix
  → Sensor re-runs — finding resolves
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Stream B was the same loop, but for test coverage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;TestCoverageSensor detects missing test
  → TestRunnerSensor confirms (pytest)
  → TestRemediatorWorker creates build.tests proposal
  → ProposalConsumerWorker executes → CoderAgent writes test
  → TestRunnerSensor re-runs — pass or fail finding posted
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The components didn't exist. We built them today.&lt;/p&gt;




&lt;h2&gt;
  
  
  What we built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;TestCoverageSensor&lt;/code&gt;&lt;/strong&gt; — scans &lt;code&gt;src/&lt;/code&gt; for Python files with no corresponding test file. Posts &lt;code&gt;test.run_required::&lt;/code&gt; findings to the Blackboard. Critically: the scan parameters (source root, test root, excluded filenames) are read from &lt;code&gt;.intent/enforcement/config/test_coverage.yaml&lt;/code&gt; at runtime. No paths hardcoded in Python. Changing what gets scanned is a constitution edit, not a code change.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;TestRunnerSensor&lt;/code&gt;&lt;/strong&gt; — already existed, just paused. Consumes &lt;code&gt;test.run_required::&lt;/code&gt; findings, runs pytest, posts &lt;code&gt;test.missing&lt;/code&gt; or &lt;code&gt;test.failure&lt;/code&gt;. Activated today.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;TestRemediatorWorker&lt;/code&gt;&lt;/strong&gt; — new acting worker. Claims &lt;code&gt;test.missing&lt;/code&gt; and &lt;code&gt;test.failure&lt;/code&gt; findings, groups by &lt;code&gt;source_file&lt;/code&gt;, creates one &lt;code&gt;build.tests&lt;/code&gt; proposal per file. Per-file deduplication: two concurrent proposals for different files are valid and don't block each other.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;build.tests&lt;/code&gt; AtomicAction&lt;/strong&gt; — already existed in the registry. Takes &lt;code&gt;source_file&lt;/code&gt;, calls CoderAgent, runs auto-heal pipeline (fix.imports, fix.headers, fix.format), IntentGuard validation, writes the test file.&lt;/p&gt;

&lt;p&gt;Four components. One closed loop.&lt;/p&gt;




&lt;h2&gt;
  
  
  The bugs we hit
&lt;/h2&gt;

&lt;p&gt;I'm going to be honest about the path here, because the bugs were instructive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bug 1: &lt;code&gt;entry_id&lt;/code&gt; vs &lt;code&gt;id&lt;/code&gt;.&lt;/strong&gt;&lt;br&gt;
The BlackboardService contract is clear — all finding dicts use key &lt;code&gt;"id"&lt;/code&gt;. Somewhere along the way, three files in the codebase had &lt;code&gt;finding["entry_id"]&lt;/code&gt; — confusing a local variable name with the dict key. Same fix three times: &lt;code&gt;finding["id"]&lt;/code&gt;. The lesson: a contract stated only in docstrings is a contract that will be violated. CORE's next step should be a schema-level enforcement.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bug 2: Subject prefix mismatch.&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;ViolationRemediatorWorker&lt;/code&gt; only claims findings with prefix &lt;code&gt;audit.violation::&lt;/code&gt;. &lt;code&gt;test.missing::&lt;/code&gt; findings sat on the Blackboard unclaimed — the remediation map had the right entries but the worker never saw them. Option A (widen prefix) was ruled out: the worker's core loop reads &lt;code&gt;payload["rule"]&lt;/code&gt; for routing, and test findings have no &lt;code&gt;rule&lt;/code&gt; key. Option C (dedicated worker) was the right call. &lt;code&gt;TestRemediatorWorker&lt;/code&gt; was built. Single responsibility, clean separation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bug 3: &lt;code&gt;action_executor&lt;/code&gt; not available in daemon context.&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;build.tests&lt;/code&gt; calls &lt;code&gt;core_context.action_executor&lt;/code&gt;. At CLI bootstrap time, this attribute is monkey-patched onto CoreContext. The daemon doesn't do this — it passes a bare context. The fix was a &lt;code&gt;hasattr&lt;/code&gt; guard, already canonically established in &lt;code&gt;ViolationExecutorWorker&lt;/code&gt; with a comment explaining exactly this failure mode. Before applying it, I asked Claude Code to assess the blast radius: three sites in daemon paths were affected. We fixed the blocking one now; the other two go on the Phase 4 queue. Surgical over broad.&lt;/p&gt;




&lt;h2&gt;
  
  
  The first test
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;TestBlackboardAuditor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;unittest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;TestCase&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;test_audit_with_valid_data&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;mock_data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;entries&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
                &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Task 1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;status&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;pending&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
            &lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;auditor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;audit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;mock_data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;assertIn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;summary&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;BlackboardAuditor&lt;/code&gt; has no &lt;code&gt;audit()&lt;/code&gt; method. It has &lt;code&gt;run()&lt;/code&gt;, &lt;code&gt;run_loop()&lt;/code&gt;, SLA-tier checking, stale entry detection. The LLM invented an API from the class name alone.&lt;/p&gt;

&lt;p&gt;Why am I not disappointed?&lt;/p&gt;

&lt;p&gt;Because this is iteration zero. The infrastructure works — detection, proposal creation, approval gate, execution, git commit. The quality of the generated test is a separate concern, and it's an addressable one. CoderAgent generated tests without reading the source file first. The fix is to pass the source content as context before generation. That's a &lt;code&gt;build_tests_action.py&lt;/code&gt; improvement for the next session.&lt;/p&gt;

&lt;p&gt;More importantly: the system &lt;em&gt;caught its own mistake&lt;/em&gt;. &lt;code&gt;TestRunnerSensor&lt;/code&gt; will run, the tests will fail, &lt;code&gt;test.failure&lt;/code&gt; findings will be posted, a repair proposal will be created. The loop continues.&lt;/p&gt;




&lt;h2&gt;
  
  
  What "autonomous" actually means here
&lt;/h2&gt;

&lt;p&gt;I approved the proposal. I didn't write the test. I didn't write the sensor. I didn't wire the pipeline. I didn't debug the &lt;code&gt;entry_id&lt;/code&gt; bug — I read the trace, stated the contract, Claude Code applied the fix.&lt;/p&gt;

&lt;p&gt;My role today was:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Architectural decisions (Option A vs B vs C for the subject prefix problem)&lt;/li&gt;
&lt;li&gt;Scope control (one file, not 741)&lt;/li&gt;
&lt;li&gt;Approval gating (three proposals created, three reviewed, two rejected for cause, one approved)&lt;/li&gt;
&lt;li&gt;Quality judgment (the test is wrong — that's useful signal, not a failure)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is the governor role. Not programming. Governing.&lt;/p&gt;




&lt;h2&gt;
  
  
  The honest state
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What works:&lt;/strong&gt; The loop closes. Coverage gap detected → test proposed → human approves → test written → failure detected → repair proposed. End-to-end autonomous.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What doesn't yet:&lt;/strong&gt; The generated tests are hallucinated. CoderAgent wrote tests for an API that doesn't exist because it had no context about what &lt;code&gt;BlackboardAuditor&lt;/code&gt; actually does. The path mapping between &lt;code&gt;src/&lt;/code&gt; and &lt;code&gt;tests/&lt;/code&gt; is also hardcoded in two of the three pipeline files — a drift risk I'm aware of and haven't fixed yet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What's next:&lt;/strong&gt; The fix is the same pattern CORE already uses for code remediation: build a context package first. Read the source. Understand the architectural role. Then generate. &lt;code&gt;ViolationRemediator&lt;/code&gt; calls &lt;code&gt;RemediationInterpretationService.build_reasoning_brief_dict()&lt;/code&gt; before invoking any LLM — it passes actual method signatures, constitutional role, and import graph as the reasoning brief. &lt;code&gt;build.tests&lt;/code&gt; skips this step entirely. The infrastructure exists. It just isn't wired yet. Fix that, fix the path mapping to read from &lt;code&gt;.intent/&lt;/code&gt; everywhere, then open the scope beyond one file.&lt;/p&gt;

&lt;p&gt;The ratio today: one file with tests that fail. Tomorrow: the same loop repairs them.&lt;/p&gt;




&lt;h2&gt;
  
  
  On instrument qualification
&lt;/h2&gt;

&lt;p&gt;I've written before about the GxP principle I apply to CORE: &lt;em&gt;an instrument must be qualified before you trust its readings&lt;/em&gt;. An audit with 252 findings that passes is less trustworthy than one with 78 findings that fails.&lt;/p&gt;

&lt;p&gt;Today's first test is wrong. But the instrument that detected "this file has no tests" is correct. The instrument that detected "this test fails" will also be correct.&lt;/p&gt;

&lt;p&gt;The loop doesn't need perfect tests to be useful. It needs honest sensors.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;CORE is open source. The architecture documents, constitutional rules, and implementation are all public at &lt;a href="https://github.com/DariuszNewecki/CORE" rel="noopener noreferrer"&gt;github.com/DariuszNewecki/CORE&lt;/a&gt;. Documentation at &lt;a href="https://dariusznewecki.github.io/CORE" rel="noopener noreferrer"&gt;dariusznewecki.github.io/CORE&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Previous article in this series: &lt;a href="https://dev.to/dariusz_newecki_e35b0924c/the-ai-that-refused-to-ship-its-own-fix-1m1"&gt;The AI That Refused To Ship Its Own Fix&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>architecture</category>
      <category>core</category>
    </item>
    <item>
      <title>When My Governance System Governed Itself Wrong</title>
      <dc:creator>Dariusz Newecki</dc:creator>
      <pubDate>Tue, 14 Apr 2026 20:08:04 +0000</pubDate>
      <link>https://forem.com/dariusz_newecki_e35b0924c/when-my-governance-system-governed-itself-wrong-17c</link>
      <guid>https://forem.com/dariusz_newecki_e35b0924c/when-my-governance-system-governed-itself-wrong-17c</guid>
      <description>&lt;p&gt;&lt;em&gt;I built a sensor to detect import order violations. It found 152. The fixer found 0. One of them was lying.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Background
&lt;/h2&gt;

&lt;p&gt;CORE is a deterministic governance runtime I'm building around AI code generation. The core idea is simple: AI produces code, but AI is never trusted. Every output passes through constitutional rules, audit engines, and remediation loops before anything touches the codebase.&lt;/p&gt;

&lt;p&gt;One of those loops works like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AuditViolationSensor detects violation
    → posts finding to Blackboard
ViolationRemediatorWorker claims finding
    → dispatches AtomicAction (fix.imports, fix.ids, fix.headers, etc.)
Sensor runs again
    → confirms violation gone or re-posts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the convergence loop. The goal is that the Blackboard empties over time as violations get fixed. That's what I call A3 — the daemon runs continuously and the codebase converges without me touching anything.&lt;/p&gt;

&lt;p&gt;This session I was closing sensor coverage gaps. Several fix actions in &lt;code&gt;dev sync&lt;/code&gt; had no corresponding sensor, meaning the daemon was blind to those violations and a human had to run &lt;code&gt;dev sync&lt;/code&gt; manually to keep things clean. Not autonomous. Not A3.&lt;/p&gt;

&lt;p&gt;One of the gaps was &lt;code&gt;style.import_order&lt;/code&gt;. I wrote the sensor, wired it up, restarted the daemon.&lt;/p&gt;

&lt;p&gt;152 findings.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;The sensor was using an AST-based implementation — &lt;code&gt;check_import_order&lt;/code&gt; — that classifies imports into groups: &lt;code&gt;future&lt;/code&gt;, &lt;code&gt;stdlib&lt;/code&gt;, &lt;code&gt;third_party&lt;/code&gt;, &lt;code&gt;internal&lt;/code&gt;. It then checks that the groups appear in the right order.&lt;/p&gt;

&lt;p&gt;The fixer uses &lt;code&gt;ruff --select I&lt;/code&gt;, which does the same job but reads its configuration from &lt;code&gt;pyproject.toml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="nn"&gt;[tool.ruff.lint.isort]&lt;/span&gt;
&lt;span class="py"&gt;known-first-party&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"api"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"body"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"cli"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"features"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"mind"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"services"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"shared"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"will"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="py"&gt;section-order&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"future"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"standard-library"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"third-party"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"first-party"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"local-folder"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I ran &lt;code&gt;fix.imports --write&lt;/code&gt; to clean up before activating the sensor. Zero violations after. Then I activated the sensor. 152 violations.&lt;/p&gt;

&lt;p&gt;The sensor and the fixer disagreed on what "correctly ordered imports" means.&lt;/p&gt;




&lt;h2&gt;
  
  
  Finding the Root Cause
&lt;/h2&gt;

&lt;p&gt;I picked the simplest failing file — &lt;code&gt;src/cli/resources/admin/patterns.py&lt;/code&gt; — violation at line 7:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;typer&lt;/span&gt;                              &lt;span class="c1"&gt;# third_party → idx 2
&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;shared.cli_utils&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;core_command&lt;/span&gt; &lt;span class="c1"&gt;# internal   → idx 3
&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;.hub&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;app&lt;/span&gt;                      &lt;span class="c1"&gt;# ???
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The sensor's &lt;code&gt;_classify_root&lt;/code&gt; function takes the module name and classifies it. For &lt;code&gt;from .hub import app&lt;/code&gt;, a relative import, &lt;code&gt;stmt.module&lt;/code&gt; is &lt;code&gt;"hub"&lt;/code&gt;. &lt;code&gt;"hub"&lt;/code&gt; is not in &lt;code&gt;stdlib_names&lt;/code&gt; and not in &lt;code&gt;internal_roots&lt;/code&gt;, so it falls through to &lt;code&gt;third_party&lt;/code&gt; — index 2.&lt;/p&gt;

&lt;p&gt;But &lt;code&gt;shared&lt;/code&gt; was classified as &lt;code&gt;internal&lt;/code&gt; — index 3.&lt;/p&gt;

&lt;p&gt;Index 2 after index 3 → violation.&lt;/p&gt;

&lt;p&gt;Ruff treats relative imports as &lt;code&gt;local-folder&lt;/code&gt;, which comes &lt;em&gt;after&lt;/em&gt; &lt;code&gt;first-party&lt;/code&gt; in the section order. So ruff considers this file clean. The sensor considers it broken.&lt;/p&gt;

&lt;p&gt;Two problems:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem 1 — relative imports.&lt;/strong&gt; The sensor had no concept of them. Any &lt;code&gt;from .something import X&lt;/code&gt; got classified as &lt;code&gt;third_party&lt;/code&gt; because the module name (&lt;code&gt;something&lt;/code&gt;) didn't match any known root. Fix: detect &lt;code&gt;stmt.level &amp;gt; 0&lt;/code&gt; in &lt;code&gt;ast.ImportFrom&lt;/code&gt; and classify as &lt;code&gt;local&lt;/code&gt; with the highest order index.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem 2 — internal roots mismatch.&lt;/strong&gt; The sensor hardcoded &lt;code&gt;["shared", "mind", "body", "will", "features"]&lt;/code&gt;. Ruff's &lt;code&gt;known-first-party&lt;/code&gt; includes &lt;code&gt;["api", "body", "cli", "features", "mind", "services", "shared", "will"]&lt;/code&gt;. Missing: &lt;code&gt;api&lt;/code&gt;, &lt;code&gt;cli&lt;/code&gt;, &lt;code&gt;services&lt;/code&gt;. When a file imports from &lt;code&gt;cli&lt;/code&gt; after importing from &lt;code&gt;body&lt;/code&gt;, ruff sees two first-party imports in any order — fine. The sensor sees &lt;code&gt;third_party&lt;/code&gt; after &lt;code&gt;internal&lt;/code&gt; — violation.&lt;/p&gt;

&lt;p&gt;Fix: pass &lt;code&gt;internal_roots&lt;/code&gt; as a parameter in the enforcement mapping so the sensor reads from configuration rather than hardcoding.&lt;/p&gt;

&lt;p&gt;After both fixes: 0 violations. Sensor and fixer agreed.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Architectural Lesson
&lt;/h2&gt;

&lt;p&gt;This is an instrument qualification problem.&lt;/p&gt;

&lt;p&gt;In GxP-regulated environments (pharma, medical devices), before you trust a measurement instrument, you qualify it. You verify that it measures what it claims to measure, using a known reference. An unqualified instrument is not a trusted instrument — even if it produces numbers.&lt;/p&gt;

&lt;p&gt;I deployed a sensor without qualifying it against the fixer. The sensor was measuring something real (import order), but measuring it differently than the tool that fixes it. The result was 152 false positives — governance debt that looked real but wasn't.&lt;/p&gt;

&lt;p&gt;A sensor that disagrees with its corresponding fixer is worse than no sensor. It creates noise, erodes trust in the Blackboard, and — if the remediator were running — would dispatch fix actions that produce no change, loop, and dispatch again.&lt;/p&gt;

&lt;p&gt;The correct pattern before activating any new sensor:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run the fixer in dry-run mode. Collect what it would change.&lt;/li&gt;
&lt;li&gt;Run the sensor. Collect what it would flag.&lt;/li&gt;
&lt;li&gt;Verify the two sets agree on the same files.&lt;/li&gt;
&lt;li&gt;Only then activate.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;CORE doesn't enforce this yet. The gap is now in the backlog as &lt;code&gt;governance.sensor_fixer_coherence&lt;/code&gt; — a meta-rule that validates governance components against each other before they're trusted.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Got Fixed
&lt;/h2&gt;

&lt;p&gt;Three separate changes at three separate levels:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AST logic&lt;/strong&gt; (&lt;code&gt;src/mind/logic/engines/ast_gate/checks/import_checks.py&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Before: relative imports fell through to third_party
# After: detect stmt.level &amp;gt; 0 and classify as local (idx=4)
&lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;isinstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;stmt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ast&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ImportFrom&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;stmt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;level&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;grp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;local&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="n"&gt;idx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;  &lt;span class="c1"&gt;# always last — after internal
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Configuration&lt;/strong&gt; (&lt;code&gt;.intent/enforcement/mappings/code/style.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;style.import_order&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;engine&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ast_gate&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;check_type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;import_order&lt;/span&gt;
    &lt;span class="na"&gt;internal_roots&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;api"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;body"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cli"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;features"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;mind"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;services"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;shared"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;will"&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Tooling&lt;/strong&gt; — a new &lt;code&gt;core-admin workers blackboard purge&lt;/code&gt; command to clear stale findings when a sensor produces false positives before a fix is applied.&lt;/p&gt;




&lt;h2&gt;
  
  
  Current State
&lt;/h2&gt;

&lt;p&gt;7 sensors active. 52 rules. 0 findings. Blackboard clean.&lt;/p&gt;

&lt;p&gt;The convergence loop is running. The daemon detects violations, the remediator dispatches fixes, the sensor confirms they're gone. That's A3.&lt;/p&gt;

&lt;p&gt;The sensor-fixer coherence check doesn't exist yet. Until it does, every new sensor I add needs manual qualification before activation. That's a human step where CORE should eventually do the work itself.&lt;/p&gt;

&lt;p&gt;Which is the point of the whole project.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;CORE is open source: &lt;a href="https://github.com/DariuszNewecki/CORE" rel="noopener noreferrer"&gt;github.com/DariuszNewecki/CORE&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
&lt;em&gt;Previous posts in this series cover the constitutional model, the autonomous loop, and the ViolationExecutor implementation.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>automation</category>
      <category>codequality</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>PASSED with 252 findings. FAILED with 78. Which audit would you trust?</title>
      <dc:creator>Dariusz Newecki</dc:creator>
      <pubDate>Tue, 07 Apr 2026 21:00:32 +0000</pubDate>
      <link>https://forem.com/dariusz_newecki_e35b0924c/passed-with-252-findings-failed-with-78-which-audit-would-you-trust-1of</link>
      <guid>https://forem.com/dariusz_newecki_e35b0924c/passed-with-252-findings-failed-with-78-which-audit-would-you-trust-1of</guid>
      <description>&lt;p&gt;&lt;em&gt;A story about instrument qualification, false positives, and why honest governance sometimes means failing on purpose.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The paradox
&lt;/h2&gt;

&lt;p&gt;This morning, CORE's audit system reported 252 findings and returned a verdict of &lt;strong&gt;PASSED&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This evening, it reported 78 findings and returned a verdict of &lt;strong&gt;FAILED&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Nothing in production changed. No bugs were introduced. No architecture was violated.&lt;/p&gt;

&lt;p&gt;The sensors were fixed.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Finding&lt;/th&gt;
&lt;th&gt;Befr&lt;/th&gt;
&lt;th&gt;Aftr&lt;/th&gt;
&lt;th&gt;Delta&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Total findings&lt;/td&gt;
&lt;td&gt;252&lt;/td&gt;
&lt;td&gt;78&lt;/td&gt;
&lt;td&gt;-174&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Orphan files&lt;/td&gt;
&lt;td&gt;91&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;-91&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Modularity (blunt score)&lt;/td&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;-100&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;needs_split&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;19&lt;/td&gt;
&lt;td&gt;new&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;needs_refactor&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;27&lt;/td&gt;
&lt;td&gt;new&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;File size (redundant rule)&lt;/td&gt;
&lt;td&gt;29&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;-29&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Verdict&lt;/td&gt;
&lt;td&gt;PASS&lt;/td&gt;
&lt;td&gt;FAIL&lt;/td&gt;
&lt;td&gt;honest&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The FAILED verdict is the correct one. The PASSED verdict was a compliance illusion.&lt;/p&gt;




&lt;h2&gt;
  
  
  The instrument qualification problem
&lt;/h2&gt;

&lt;p&gt;In GxP-regulated environments — pharmaceutical manufacturing, medical devices, clinical software — you do not run an assay on an uncalibrated instrument and trust the result. Before any measurement is taken seriously, the instrument must be qualified: it must demonstrably measure what it claims to measure, within defined tolerances, under defined conditions.&lt;/p&gt;

&lt;p&gt;This principle is so fundamental that it precedes any discussion of the data itself. Bad data from a qualified instrument is a finding. Bad data from an unqualified instrument is noise — and acting on noise has a name: it is a deviation.&lt;/p&gt;

&lt;p&gt;Software governance systems face the same problem. An audit engine that produces findings is an instrument. If that instrument has not been qualified — if its detectors produce false positives, if its thresholds are miscalibrated, if its rules conflate distinct problem classes — then the findings it produces are not evidence. They are noise with a compliance label.&lt;/p&gt;

&lt;p&gt;Acting on that noise with automated remediation is not governance. It is confident, expensive, wrong work.&lt;/p&gt;




&lt;h2&gt;
  
  
  Case 1: The orphan file detector
&lt;/h2&gt;

&lt;p&gt;CORE uses a static import graph traversal to detect source files unreachable from any declared entry point. The principle is sound: if no entry point can reach a file, that file is dead code and should be removed.&lt;/p&gt;

&lt;p&gt;The detector flagged 91 files as orphans.&lt;/p&gt;

&lt;p&gt;All 91 were false positives.&lt;/p&gt;

&lt;p&gt;Static import graph traversal is a deliberate choice — deterministic, auditable, no runtime dependency. The tradeoff is that dynamically-loaded components must be explicitly declared as entry points. That declaration is itself a governance artifact: it makes the implicit loading contract explicit and versioned. The detector was not wrong — the contract was incomplete.&lt;/p&gt;

&lt;p&gt;An automated agent pointed at those 91 findings would have deleted live production code. The agent would have been operating correctly within its mandate. The mandate was wrong.&lt;/p&gt;

&lt;p&gt;The fix was not to make the detector smarter. It was to declare the dynamically-loaded directories as explicit entry points — converting an implicit runtime convention into a versioned, governed contract. Functionally this resembles static linking. Constitutionally it is different: the declaration is law, subject to change control, with documented rationale. The detector enforces the contract. The contract is owned by governance, not by the build system.&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;entry_points&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;src/will/self_healing/"&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;src/will/test_generation/"&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;src/shared/infrastructure/"&lt;/span&gt;
  &lt;span class="c1"&gt;# ... 10 more directories&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After the fix: zero orphan findings. Zero code deleted. The codebase did not change. The instrument was qualified.&lt;/p&gt;




&lt;h2&gt;
  
  
  Case 2: The modularity score
&lt;/h2&gt;

&lt;p&gt;Four rules were producing 100 findings collectively:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;modularity.single_responsibility&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;modularity.semantic_cohesion&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;modularity.import_coupling&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;modularity.refactor_score_threshold&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All four were proxies for a single composite score. All four mapped to the same remediation action: &lt;code&gt;fix.modularity&lt;/code&gt;. All four carried the same enforcement level: &lt;code&gt;reporting&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The problem is that they were measuring two fundamentally different things and treating them identically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem class A: a file is too long with a single coherent responsibility.&lt;/strong&gt;&lt;br&gt;
This is a mechanical problem. The file does one thing but does too much of it. The solution is splitting — redistributing logic across smaller files along natural seams. No discipline boundaries are crossed. No architectural judgment is required. An automated system can propose and execute this split safely, subject to a Logic Conservation Gate that verifies no logic was lost.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem class B: a file mixes distinct architectural disciplines.&lt;/strong&gt;&lt;br&gt;
A file that combines CLI rendering, database access, and business logic in 300 lines is not a size problem. It is an architectural violation. Resolving it requires a human to decide where each responsibility belongs in the constitutional layer structure. An automated system cannot make that decision safely — not because AI is incapable of generating a proposal, but because the decision carries architectural authority that must remain with a human until the boundaries are formally established.&lt;/p&gt;

&lt;p&gt;Conflating these two problems in a single score means the governance system cannot distinguish between what it is allowed to fix autonomously and what it must escalate. That distinction is not a technical nicety. In regulated environments, it is the difference between an approved automated action and an unauthorized architectural change.&lt;/p&gt;

&lt;p&gt;The fix was to retire the four proxy rules and replace them with two precise sensors:&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;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"modularity.needs_split"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"enforcement"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"reporting"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"rationale"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Automatable. Mechanical redistribution, no discipline boundaries crossed."&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&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;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"modularity.needs_refactor"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"enforcement"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"blocking"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"rationale"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Requires human judgment. Autonomous action prohibited until architectural decision is approved."&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 &lt;code&gt;blocking&lt;/code&gt; enforcement on &lt;code&gt;needs_refactor&lt;/code&gt; is the point. It is not a warning. It is a constitutional stop. The system will not proceed autonomously until a human has reviewed and authorized the architectural boundary decision.&lt;/p&gt;

&lt;p&gt;This is why the audit now returns FAILED. Twenty-seven files contain mixed-discipline violations. They are real findings. They require real decisions. The system is correctly refusing to act without authorization.&lt;/p&gt;




&lt;h2&gt;
  
  
  The verdict paradox
&lt;/h2&gt;

&lt;p&gt;A governance system that always passes is not a governance system. It is a reporting system with a green checkbox.&lt;/p&gt;

&lt;p&gt;PASSED with 252 findings meant: the system detected many things, none of them were classified as blocking, therefore no action is required. The 91 false positives contributed to a picture of busyness without actionability. The composite modularity score produced findings that the automated remediator could not distinguish from each other. Everything was flagged, nothing was escalated.&lt;/p&gt;

&lt;p&gt;FAILED with 78 findings means: the system has detected 27 architectural violations that require human decisions before any automated action proceeds. It has identified 19 files that can be split autonomously, subject to validation gates. Every finding in the report corresponds to a specific, actionable condition.&lt;/p&gt;

&lt;p&gt;The failure verdict is evidence that the governance system is functioning correctly. It is not a regression. It is an honest measurement.&lt;/p&gt;




&lt;h2&gt;
  
  
  The principle
&lt;/h2&gt;

&lt;p&gt;Governance quality is not measured by finding count. It is measured by finding accuracy.&lt;/p&gt;

&lt;p&gt;In regulated environments, the difference between a false positive acted upon and a true positive ignored is not a technical footnote. It is a compliance failure. Instrument qualification is not overhead — it is the precondition for trusting any measurement that follows.&lt;/p&gt;

&lt;p&gt;Before you ask what your audit found, ask whether your audit can be trusted.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;CORE is an open-source constitutional governance runtime for AI-assisted software development. Architecture, governance rules, and enforcement mappings are public.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;github.com/DariuszNewecki/CORE&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>I Spent a Saturday Cleaning My Own Repo. CORE Made Me.</title>
      <dc:creator>Dariusz Newecki</dc:creator>
      <pubDate>Sat, 04 Apr 2026 19:42:23 +0000</pubDate>
      <link>https://forem.com/dariusz_newecki_e35b0924c/i-spent-a-saturday-cleaning-my-own-repo-core-made-me-3pdf</link>
      <guid>https://forem.com/dariusz_newecki_e35b0924c/i-spent-a-saturday-cleaning-my-own-repo-core-made-me-3pdf</guid>
      <description>&lt;p&gt;&lt;em&gt;Not because I wanted to.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Because the system I built demands that everything it touches is defensible. And when I looked honestly at my own repository — the README, the docs, the &lt;code&gt;.gitignore&lt;/code&gt; — they weren't.&lt;/p&gt;

&lt;p&gt;So I fixed them.&lt;/p&gt;




&lt;h2&gt;
  
  
  The broken command nobody noticed
&lt;/h2&gt;

&lt;p&gt;It started with a README.&lt;/p&gt;

&lt;p&gt;The Quick Start section told anyone who cloned CORE to run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;poetry run core-admin check audit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That command doesn't exist. The correct command is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;poetry run core-admin code audit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One word difference. But anyone who followed that instruction would get an error on their very first interaction with the project. First impression: broken.&lt;/p&gt;

&lt;p&gt;The CLI had evolved. The legacy verb-first pattern (&lt;code&gt;check audit&lt;/code&gt;) was purged months ago when CORE's command structure was redesigned around resource-first architecture. The README hadn't kept up. It was documenting a command that no longer existed.&lt;/p&gt;




&lt;h2&gt;
  
  
  "If the docs lie, the system lies."
&lt;/h2&gt;

&lt;p&gt;This is the thing about building a governance runtime: you can't enforce standards on AI-generated code while your own documentation ships broken commands.&lt;/p&gt;

&lt;p&gt;CORE's entire thesis is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Never produce software you cannot defend.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Not rhetorically. Technically, legally, epistemically, historically.&lt;/p&gt;

&lt;p&gt;If I can't defend my own README — if the first thing someone tries doesn't work — then I'm not living by the standard I built into the system.&lt;/p&gt;

&lt;p&gt;That's not a philosophical problem. It's a credibility problem. And a consistency problem. And those are exactly the problems CORE exists to solve.&lt;/p&gt;




&lt;h2&gt;
  
  
  What a Saturday of self-governance looks like
&lt;/h2&gt;

&lt;p&gt;Here's what actually got done:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;README:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fixed the broken audit command (&lt;code&gt;check&lt;/code&gt; → &lt;code&gt;code&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Removed a stale metric (&lt;code&gt;0 blocking violations&lt;/code&gt;) that may or may not have been current&lt;/li&gt;
&lt;li&gt;Removed an acknowledgment that no longer reflected the project's direction&lt;/li&gt;
&lt;li&gt;Replaced a buried, collapsible workflow diagram with a cleaner conceptual flow — visible immediately, no click required&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;CONTRIBUTING.md:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Updated the CI description (it had said "smoke testing" — it does more than that now)&lt;/li&gt;
&lt;li&gt;Added the audit command so contributors know how to verify compliance locally before opening a PR&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;.gitignore:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Found that &lt;code&gt;logs/*&lt;/code&gt; was missing — only &lt;code&gt;!logs/.gitkeep&lt;/code&gt; existed, with no corresponding exclusion rule. Any non-&lt;code&gt;.log&lt;/code&gt; file landing in &lt;code&gt;logs/&lt;/code&gt; would have been tracked silently.&lt;/li&gt;
&lt;li&gt;Added proper &lt;code&gt;logs/*&lt;/code&gt; and &lt;code&gt;reports/*&lt;/code&gt; exclusions with the same pattern used for &lt;code&gt;var/&lt;/code&gt; and &lt;code&gt;work/&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;docs/ — complete rewrite:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The docs site had 111 files across 30 directories, most of them written at various stages of development, not reflecting current architecture&lt;/li&gt;
&lt;li&gt;I replaced all of it with six files: &lt;code&gt;index.md&lt;/code&gt;, &lt;code&gt;how-it-works.md&lt;/code&gt;, &lt;code&gt;autonomy-ladder.md&lt;/code&gt;, &lt;code&gt;getting-started.md&lt;/code&gt;, &lt;code&gt;cli-reference.md&lt;/code&gt;, &lt;code&gt;contributing.md&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Every CLI command in the reference was verified against the actual source code — not inferred, not remembered, not guessed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That last point matters. The first draft of &lt;code&gt;cli-reference.md&lt;/code&gt; was written by an AI assistant — from inference, not from source. I caught it, pushed back, and made it search the actual command registrations before writing anything. Same standard I apply to everything else.&lt;/p&gt;




&lt;h2&gt;
  
  
  The CLI reference problem is the whole problem in miniature
&lt;/h2&gt;

&lt;p&gt;The first draft of &lt;code&gt;cli-reference.md&lt;/code&gt; was written by an AI assistant — from inference, not from source.&lt;/p&gt;

&lt;p&gt;It had wrong subcommands. Plausible ones, but wrong.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;core-admin proposals inspect &amp;lt;id&amp;gt;&lt;/code&gt; — doesn't exist. It's &lt;code&gt;show&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;core-admin inspect status&lt;/code&gt; — legacy verb-first pattern, purged months ago. It's &lt;code&gt;core-admin admin status&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;core-admin governance coverage&lt;/code&gt; — wrong group entirely. It's &lt;code&gt;core-admin constitution status&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Three wrong commands in one file. All confident. All wrong.&lt;/p&gt;

&lt;p&gt;I caught it. Pushed back. Asked the assistant to search the actual source code before writing anything. It did. The commands got fixed.&lt;/p&gt;

&lt;p&gt;The irony was not subtle: an AI assistant producing plausible but unverified output, in documentation for a system that exists specifically to prevent AI from producing plausible but unverified output.&lt;/p&gt;

&lt;p&gt;That's not a documentation problem. That's an epistemic problem. And it's the same one that lives in &lt;code&gt;.intent/northstar/core_northstar.md&lt;/code&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Nothing is assumed silently. All assumptions must be explicit, owned, and traceable. Reasoning requires citation. If CORE cannot point to evidence, it cannot act.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  What this has to do with autonomy
&lt;/h2&gt;

&lt;p&gt;CORE is currently at A2+ — governed generation, universal workflow pattern. I'm working toward A3 — strategic autonomy, where CORE identifies and proposes architectural improvements without being asked.&lt;/p&gt;

&lt;p&gt;For A3 to be trustworthy, the system has to be clean. Not just the code — the whole project. The README someone reads before cloning. The docs they follow when getting started. The &lt;code&gt;.gitignore&lt;/code&gt; that determines what gets committed.&lt;/p&gt;

&lt;p&gt;If those are wrong, the foundation is wrong. And you can't build autonomous operation on a wrong foundation.&lt;/p&gt;

&lt;p&gt;Cleaning the repo isn't glamorous. It doesn't advance the autonomy ladder. But it's the kind of work the system's own philosophy demands — and that I'd been quietly deferring.&lt;/p&gt;




&lt;h2&gt;
  
  
  The self-referential part
&lt;/h2&gt;

&lt;p&gt;There's something almost uncomfortable about this.&lt;/p&gt;

&lt;p&gt;I built a system that enforces: &lt;em&gt;you cannot ship what you cannot defend.&lt;/em&gt; And then I had a README with a broken command, a &lt;code&gt;.gitignore&lt;/code&gt; with a missing rule, and a documentation site with 111 files of outdated content.&lt;/p&gt;

&lt;p&gt;The system couldn't enforce standards on its own repository — it doesn't govern Markdown files. That's a human responsibility.&lt;/p&gt;

&lt;p&gt;Which means the human has to do it.&lt;/p&gt;

&lt;p&gt;That's not a failure of CORE. That's the design. &lt;code&gt;.intent/&lt;/code&gt; is human-authored and immutable at runtime. CORE can never write to it. The constitution is mine to maintain.&lt;/p&gt;

&lt;p&gt;The same is true for everything outside the autonomy lanes — the README, the docs, the project presentation. CORE governs the code. I govern the rest.&lt;/p&gt;

&lt;p&gt;And today I did.&lt;/p&gt;




&lt;h2&gt;
  
  
  If you're curious
&lt;/h2&gt;

&lt;p&gt;The repo is at &lt;a href="https://github.com/DariuszNewecki/CORE" rel="noopener noreferrer"&gt;github.com/DariuszNewecki/CORE&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you've looked before and bounced — the docs are cleaner now. The commands in the Quick Start actually work.&lt;/p&gt;

&lt;p&gt;If you're new: read &lt;code&gt;.intent/&lt;/code&gt; before the source. That's where the law lives.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Previous in this series: &lt;a href="https://dev.to/dariusz_newecki_e35b0924c/my-ai-has-22-workers-2470-resolved-violations-and-still-cant-call-itself-autonomous-heres-the-4020"&gt;My AI Has 22 Workers, 2,470 Resolved Violations, and Still Can't Call Itself Autonomous. Here's the Gap.&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>cli</category>
      <category>codequality</category>
      <category>devjournal</category>
      <category>documentation</category>
    </item>
    <item>
      <title>The AI That Refused To Ship Its Own Fix</title>
      <dc:creator>Dariusz Newecki</dc:creator>
      <pubDate>Wed, 01 Apr 2026 18:15:43 +0000</pubDate>
      <link>https://forem.com/dariusz_newecki_e35b0924c/the-ai-that-refused-to-ship-its-own-fix-1m1</link>
      <guid>https://forem.com/dariusz_newecki_e35b0924c/the-ai-that-refused-to-ship-its-own-fix-1m1</guid>
      <description>&lt;p&gt;&lt;em&gt;Or: what constitutional governance actually looks like in practice&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I spent today doing something unusual. I was improving an AI system — and the system kept stopping me from making mistakes.&lt;/p&gt;

&lt;p&gt;Not because it was clever. Because it was governed.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Setup
&lt;/h2&gt;

&lt;p&gt;CORE is a constitutional governance runtime for AI coding agents. The short version: instead of letting AI write code freely and checking quality afterwards, CORE requires every decision to be traceable to declared law before execution begins.&lt;/p&gt;

&lt;p&gt;Every rule lives in &lt;code&gt;.intent/&lt;/code&gt;. Every action requires authority. Every mutation is defensible or it doesn't happen.&lt;/p&gt;

&lt;p&gt;Today's session was about advancing CORE toward A3 — full autonomous operation on Tier 1 violations. Eight items on the A3 readiness checklist were marked ❌. By end of session: one remained.&lt;/p&gt;

&lt;p&gt;Here's what the path looked like.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Gate That Wasn't Wired
&lt;/h2&gt;

&lt;p&gt;Early in the session I wanted to promote two entries in the autonomous remediation map from PENDING to ACTIVE. The Logic Conservation Gate had been implemented — a protection against AI refactors that delete more than 50% of a file's logic. The comment in the YAML said &lt;em&gt;"gated until Logic Conservation Gate implemented."&lt;/em&gt; Gate implemented. Promote.&lt;/p&gt;

&lt;p&gt;I gave Claude Code the prompt.&lt;/p&gt;

&lt;p&gt;It came back with a finding I hadn't expected:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"The gate exists in ComplexityRemediationService. ModularityRemediationService — the actual handler these entries call — never touches it. The comment in the YAML is still accurate."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The gate was implemented. Just not in the right place.&lt;/p&gt;

&lt;p&gt;We wired it. Then we promoted.&lt;/p&gt;

&lt;p&gt;That's not a dramatic story. That's exactly how it should work. The system forced verification before the claim. No amount of "the gate exists somewhere" was sufficient. It had to exist &lt;em&gt;here&lt;/em&gt;, in &lt;em&gt;this path&lt;/em&gt;, or the promotion was a lie.&lt;/p&gt;




&lt;h2&gt;
  
  
  83 Silent Failures, Now Loud
&lt;/h2&gt;

&lt;p&gt;Overnight, 83 proposals failed. Each showed &lt;code&gt;execution_results: {}&lt;/code&gt; — empty. The handlers were running but returning nothing.&lt;/p&gt;

&lt;p&gt;Three months ago this would have been invisible. The handlers returned &lt;code&gt;ok=True&lt;/code&gt; unconditionally. Internal errors were swallowed. The proposal consumer would mark everything COMPLETED and move on.&lt;/p&gt;

&lt;p&gt;Yesterday we fixed that. Wrapped every handler in try/except. Derived &lt;code&gt;ok&lt;/code&gt; from actual outcomes instead of hardcoding success.&lt;/p&gt;

&lt;p&gt;So this morning: 83 failures instead of 83 false completions.&lt;/p&gt;

&lt;p&gt;That's progress. Honest failure is worth more than dishonest success. CORE's constitution says exactly this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"CORE must never produce software it cannot defend."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A system that lies about its own outcomes cannot defend them.&lt;/p&gt;




&lt;h2&gt;
  
  
  319 Stuck Findings
&lt;/h2&gt;

&lt;p&gt;The blackboard showed 319 entries in &lt;code&gt;claimed&lt;/code&gt; status. All with &lt;code&gt;claimed_by = NULL&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Legacy entries — claimed before we added atomic claiming with worker identity. The fix was one SQL statement. But finding it required reading the blackboard, querying &lt;code&gt;claimed_by&lt;/code&gt;, and tracing the pattern.&lt;/p&gt;

&lt;p&gt;No amount of assuming "the system is fine" would have found this. The evidence had to be read. The constitution demands it:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Memory without evidence is forbidden."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After the fix, a new batch of 319 appeared — this time with a real UUID. The worker was claiming findings, finding no handler for them in the remediation map, and leaving them stuck.&lt;/p&gt;

&lt;p&gt;Another fix: release unmappable findings immediately at claim time.&lt;/p&gt;

&lt;p&gt;Each fix revealed by the system's own honesty about its state.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Makes This Different
&lt;/h2&gt;

&lt;p&gt;Most AI coding tools measure success by output volume. Lines written, tickets closed, PRs merged.&lt;/p&gt;

&lt;p&gt;CORE measures success by defensibility. Can you explain why this change was made? Under what authority? With what evidence? What happens if it's wrong?&lt;/p&gt;

&lt;p&gt;Today we made 14 commits. Each traceable to a checklist item. Each verified by the system before and after. The daemon either ran clean or it didn't. The blackboard either showed stuck entries or it didn't.&lt;/p&gt;

&lt;p&gt;The AI didn't just write code. It was governed while writing code. And when the governance caught a mistake — the gate that wasn't wired, the handler that lied about success, the findings that stayed claimed forever — we fixed the governance, not just the symptom.&lt;/p&gt;

&lt;p&gt;That's the mind shift. Not &lt;em&gt;"AI writes code faster."&lt;/em&gt; But:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Law governs intelligence. Defensibility outranks productivity."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Who This Is For
&lt;/h2&gt;

&lt;p&gt;CORE is not for everyone. It's explicitly not for casual app builders or speed-only workflows.&lt;/p&gt;

&lt;p&gt;It's for regulated environments. Safety-critical systems. Teams where &lt;em&gt;"the AI decided"&lt;/em&gt; is not an acceptable answer in a post-mortem.&lt;/p&gt;

&lt;p&gt;If that's your world — the architecture is open. The constitution is public.&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://github.com/DariuszNewecki/CORE" rel="noopener noreferrer"&gt;github.com/DariuszNewecki/CORE&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And if you think in terms of governance rather than just generation — I'm looking for collaborators. Not necessarily programmers. People who understand that software systems need to be able to explain themselves.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Written the same day the session happened. The daemon is running clean as I type this.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>python</category>
      <category>core</category>
    </item>
    <item>
      <title>Your Agent Has Two Logs. One of Them Doesn't Exist Yet.</title>
      <dc:creator>Dariusz Newecki</dc:creator>
      <pubDate>Mon, 30 Mar 2026 20:38:06 +0000</pubDate>
      <link>https://forem.com/dariusz_newecki_e35b0924c/your-agent-has-two-logs-one-of-them-doesnt-exist-yet-253a</link>
      <guid>https://forem.com/dariusz_newecki_e35b0924c/your-agent-has-two-logs-one-of-them-doesnt-exist-yet-253a</guid>
      <description>&lt;p&gt;Earlier this week I read Daniel Nwaneri's piece on induced authorization — the observation that agents don't just do unauthorized things, they &lt;em&gt;cause humans&lt;/em&gt; to do unauthorized things. His central example: an agent gives advice, an engineer widens a permission based on that advice, the agent's action log shows nothing unusual. The exposure is real. The log is clean.&lt;/p&gt;

&lt;p&gt;He named this the &lt;strong&gt;induced-edge problem&lt;/strong&gt;, and the framing is sharp enough to deserve a concrete answer.&lt;/p&gt;

&lt;p&gt;Here's the answer CORE gives — and the gap it still doesn't close. And why that gap is not an oversight, but a frontier.&lt;/p&gt;




&lt;h2&gt;
  
  
  Two Logs, Not One
&lt;/h2&gt;

&lt;p&gt;Most agent governance architectures assume one audit object: the action log. What did the agent do?&lt;/p&gt;

&lt;p&gt;The induced-edge problem reveals that this is the wrong unit. There are actually two logs:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Log 1 — The action log.&lt;/strong&gt; What the agent executed directly. This exists. For CORE, it's the blackboard: every worker posts findings, proposals, and outcomes to a PostgreSQL append-only record. Nothing is retracted. Nothing is amended. The audit trail is a fact of the architecture, not a feature someone remembered to add.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Log 2 — The consequence log.&lt;/strong&gt; What happened in the world as a result of the agent's &lt;em&gt;output&lt;/em&gt;. This doesn't fully exist yet. Not in CORE. Not in most systems.&lt;/p&gt;

&lt;p&gt;The distinction matters because these two logs decay differently. Direct edges — things the agent did itself — are trackable and can be pruned when unused. Induced edges — state changes that the agent's output &lt;em&gt;caused&lt;/em&gt; a human to make — don't decay on the same clock. A widened permission persists independently of whether the agent keeps referencing it. It's effectively permanent until someone explicitly reconciles it.&lt;/p&gt;




&lt;h2&gt;
  
  
  What CORE Gets Right
&lt;/h2&gt;

&lt;p&gt;Before the gap, what the design actually solves.&lt;/p&gt;

&lt;p&gt;CORE's blackboard is append-only by architecture. Workers post findings; they cannot revise or retract them. This matters because of a question Daniel raised that I think is underappreciated: &lt;em&gt;what keeps the audit history honest while a materiality classifier is being trained on it?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;His concern: if the classifier's training data can be gamed — even slowly, even unintentionally — you don't just end up with a gameable threshold. You end up with a corrupted evidence base. The reconciliation record loses its value at the same rate the classifier loses its integrity.&lt;/p&gt;

&lt;p&gt;CORE's append-only constraint answers this structurally. The blackboard accumulates an honest history not because workers are trustworthy, but because the architecture makes revision impossible.&lt;/p&gt;

&lt;p&gt;The proposal lifecycle adds another layer. When a proposal requires human approval, CORE records the approver identity and timestamp against the proposal record. &lt;code&gt;approved_by&lt;/code&gt;, &lt;code&gt;approved_at&lt;/code&gt; — persisted to the database, queryable, part of the chain. This isn't incidental. A dangerous proposal that executes without a recorded approver fails validation. The authorization chain is a first-class fact.&lt;/p&gt;

&lt;p&gt;This is what Daniel meant when he argued the reconciliation record is the primary value — more important than whatever threshold sits on top of it. CORE was built around this conviction. The Final Invariant — &lt;em&gt;CORE must never produce software it cannot defend&lt;/em&gt; — is not about catching violations. It's about maintaining a record from which any decision can be reconstructed and justified. The defense &lt;em&gt;is&lt;/em&gt; the record.&lt;/p&gt;




&lt;h2&gt;
  
  
  Where The Gap Actually Lives
&lt;/h2&gt;

&lt;p&gt;CORE logs that I approved a proposal, and when. What it doesn't log is what I did &lt;em&gt;as a consequence&lt;/em&gt; of that approval.&lt;/p&gt;

&lt;p&gt;If applying a proposal required me to also amend a &lt;code&gt;.intent/&lt;/code&gt; rule, add a new service account, or widen a scope — those downstream actions are outside the perimeter. CORE's record ends at "approved by Dariusz at timestamp X." The induced state change that followed is not in the log.&lt;/p&gt;

&lt;p&gt;But here's the thing: that gap is not an oversight in CORE's design. It's a consequence of something more fundamental.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;code&gt;.intent/&lt;/code&gt; Is a Shim
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;.intent/&lt;/code&gt; — CORE's constitutional layer, the directory of rules, worker declarations, and workflow stages that governs everything CORE does — is currently hand-authored YAML. Every file in it was written by me, under time pressure, as a working approximation of what a proper governance-policy tool would generate.&lt;/p&gt;

&lt;p&gt;The CORE-policy-governance-writer doesn't exist yet. I haven't had time to build it. What exists instead is a shim: YAML that holds the shape of the intended thing while the tooling catches up.&lt;/p&gt;

&lt;p&gt;This matters because of what &lt;code&gt;.intent/&lt;/code&gt; &lt;em&gt;is&lt;/em&gt; in the architecture. It's not configuration &lt;em&gt;for&lt;/em&gt; CORE. It's the constitutional layer that CORE &lt;em&gt;is&lt;/em&gt;. The rules, the worker mandates, the workflow invariants — these are the law CORE enforces. And the Final Invariant applies there with equal force:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Every change to &lt;code&gt;.intent/&lt;/code&gt; must be as traceable, as defensible, as auditable as any change to &lt;code&gt;src/&lt;/code&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Right now, it isn't. A change to &lt;code&gt;.intent/&lt;/code&gt; is a git commit I made. It's not a governed action. It's not logged against a finding. It's not traceable to a rule that authorized it. The authorization chain that CORE enforces rigorously for code changes simply doesn't exist yet for the policy layer itself.&lt;/p&gt;

&lt;p&gt;That's the induced-edge gap, stated precisely. It's not that CORE fails to track what humans do after approving proposals. It's that the &lt;em&gt;policy layer that would make human decisions about governance trackable&lt;/em&gt; hasn't been built yet. The two-log problem is the symptom. The missing tool is the cure.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Architecture Is Self-Similar By Design
&lt;/h2&gt;

&lt;p&gt;What the CORE-policy-governance-writer would be, once built, is exactly this: CORE, applied one layer up.&lt;/p&gt;

&lt;p&gt;The same principle that governs &lt;code&gt;src/&lt;/code&gt; — every change must be authorized, logged, traceable, defensible — applies to &lt;code&gt;.intent/&lt;/code&gt;. The governance writer would produce &lt;code&gt;.intent/&lt;/code&gt; changes as governed artifacts: triggered by a finding, authorized by a rule, logged to the blackboard, approvable or rejectable through the same proposal lifecycle that code changes use.&lt;/p&gt;

&lt;p&gt;This is the architecture completing itself. Not a new feature bolted on, but the same invariant applied consistently at every layer. CORE governing code. A governance writer governing CORE's constitution. The loop closes.&lt;/p&gt;

&lt;p&gt;Until that tool exists, the current &lt;code&gt;.intent/&lt;/code&gt; captures intent without capturing the consequences of acting on it. The authorization graph — declared scopes, permitted scope changes, human decisions that modified them — is implicit in my head and in git history, not in any structure CORE can reason over.&lt;/p&gt;

&lt;p&gt;Daniel asked whether runtime constitutional enforcement shrinks the attack surface for induced risks. The honest answer: completely, for direct edges. Structurally, for induced edges — once the policy layer is expressive enough to represent scope changes as first-class governed events. That work is ahead of me, not behind.&lt;/p&gt;




&lt;h2&gt;
  
  
  What The Thread Built
&lt;/h2&gt;

&lt;p&gt;Daniel's induced-edge framing gave me precise language for something I knew was missing but hadn't named cleanly. The two-log problem. The different decay rates of direct versus induced edges. The irreversible-by-default bootstrap.&lt;/p&gt;

&lt;p&gt;CORE's append-only blackboard and proposal authorization chain solve the honest-history problem for direct edges. The CORE-policy-governance-writer — when it exists — will extend the same guarantee to the policy layer itself. Every action traceable. Every authorization defensible. Including the ones that write the law.&lt;/p&gt;

&lt;p&gt;One person building it. Logic is consistent. The shim holds.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Daniel's piece: &lt;a href="https://dev.to/dannwaneri/agents-dont-just-do-unauthorized-things-they-cause-humans-to-do-unauthorized-things-51j4"&gt;Agents Don't Just Do Unauthorized Things. They Cause Humans to Do Unauthorized Things.&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;CORE on GitHub: &lt;a href="https://github.com/DariuszNewecki/CORE" rel="noopener noreferrer"&gt;github.com/DariuszNewecki/CORE&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>devops</category>
      <category>architecture</category>
      <category>core</category>
    </item>
    <item>
      <title>The Day CORE's Author Finally Followed CORE's Own Rules</title>
      <dc:creator>Dariusz Newecki</dc:creator>
      <pubDate>Sun, 29 Mar 2026 19:52:50 +0000</pubDate>
      <link>https://forem.com/dariusz_newecki_e35b0924c/the-day-cores-author-finally-followed-cores-own-rules-15ma</link>
      <guid>https://forem.com/dariusz_newecki_e35b0924c/the-day-cores-author-finally-followed-cores-own-rules-15ma</guid>
      <description>&lt;p&gt;I spent my Sunday not writing a single line of code.&lt;/p&gt;

&lt;p&gt;It was the most productive day I've had in months.&lt;/p&gt;




&lt;h2&gt;
  
  
  A bit of honest backstory
&lt;/h2&gt;

&lt;p&gt;I am not a programmer. I'm more of an architect. Maybe a philosopher who ended up with a codebase.&lt;/p&gt;

&lt;p&gt;I built CORE because I got angry. Angry at LLMs that hallucinate. Angry at context drift. Angry at tools that produce output nobody can defend. I wasn't trying to disrupt an industry — I was trying to solve my own problem.&lt;/p&gt;

&lt;p&gt;I built it for myself. On a server called &lt;code&gt;lira&lt;/code&gt;. In Antwerp. With PostgreSQL and local embeddings because I couldn't afford to throw GPU clusters at the problem.&lt;/p&gt;

&lt;p&gt;Necessity is the best creativity source. Eastern Europe will teach you that.&lt;/p&gt;

&lt;p&gt;Somewhere along the way the thing I built for myself started looking like something real. Something that might matter beyond my own island.&lt;/p&gt;

&lt;p&gt;But today I realised something uncomfortable.&lt;/p&gt;




&lt;h2&gt;
  
  
  CORE demands something from every project it touches
&lt;/h2&gt;

&lt;p&gt;CORE has a rule. Actually, it's stronger than a rule — it's a constitutional requirement:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Constitution before code. Always.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When CORE encounters a repository — whether it's a half-finished mess or a five-million line enterprise codebase — it doesn't start writing. It starts understanding. It maps. It asks. It surfaces contradictions. It refuses to proceed on guesswork.&lt;/p&gt;

&lt;p&gt;And before any implementation begins, CORE produces a constitution for the target system. A &lt;code&gt;.intent/&lt;/code&gt; directory. A set of requirements. A statement of what the software must do and why.&lt;/p&gt;

&lt;p&gt;CORE will not write a single line until that exists.&lt;/p&gt;

&lt;p&gt;I wrote this rule. I enforce this rule. I believe in this rule deeply enough to build an entire governance system around it.&lt;/p&gt;




&lt;h2&gt;
  
  
  So guess what I had never written for CORE itself.
&lt;/h2&gt;

&lt;p&gt;Yeah.&lt;/p&gt;

&lt;p&gt;CORE had a NorthStar document — a philosophical manifesto about why it exists, what it believes, what it will never do. Beautiful document. I'm proud of it.&lt;/p&gt;

&lt;p&gt;But a User Requirements document? Stating concretely what CORE must &lt;em&gt;deliver&lt;/em&gt; to a &lt;em&gt;user&lt;/em&gt;?&lt;/p&gt;

&lt;p&gt;Not written.&lt;/p&gt;

&lt;p&gt;I had been violating my own constitution. Quietly. For months.&lt;/p&gt;




&lt;h2&gt;
  
  
  How I finally got there
&lt;/h2&gt;

&lt;p&gt;It didn't happen the way I expected.&lt;/p&gt;

&lt;p&gt;I wasn't sitting at a desk with a blank document thinking "right, requirements time." I was having a conversation. A rambling, honest, philosophical Sunday conversation about CORE, about the industry, about building things on a shoestring from Eastern Europe, about my mother telling me decades ago that she couldn't follow what I was thinking.&lt;/p&gt;

&lt;p&gt;And somewhere in that conversation, someone asked: &lt;em&gt;"If a stranger landed on your GitHub right now, what would they understand in three seconds?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I had to think about it.&lt;/p&gt;

&lt;p&gt;The answer, when it came, was embarrassingly simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A thing that uses AI to write perfect applications.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Seven words. Obvious. To me. Completely invisible to everyone else because I had been leading with the architecture instead of the purpose.&lt;/p&gt;

&lt;p&gt;My mother would have told you the same thing. She did, in fact. Many times.&lt;/p&gt;




&lt;h2&gt;
  
  
  Writing the requirements properly
&lt;/h2&gt;

&lt;p&gt;Once I started actually articulating requirements — not philosophy, not principles, but &lt;em&gt;obligations&lt;/em&gt; — eight of them emerged:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UR-01: Universal Input Acceptance&lt;/strong&gt;&lt;br&gt;
CORE accepts anything. Conversation. Spec. Single file. Enormous repository. No assumptions about quality or structure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UR-02: Comprehension Before Action&lt;/strong&gt;&lt;br&gt;
CORE must be able to say "I know what this does and I understand it" — backed by evidence — before taking any action. Not assumed. Earned and declared.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UR-03: Gap and Contradiction Reporting&lt;/strong&gt;&lt;br&gt;
CORE asks when things are missing. CORE stops when things contradict. CORE never guesses.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UR-04: Constitution Before Code&lt;/strong&gt;&lt;br&gt;
The target system's &lt;code&gt;.intent/&lt;/code&gt; is CORE's first deliverable. Not a byproduct. A precondition. Implementation without an established constitution is malpractice.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UR-05: Output is Working Software&lt;/strong&gt;&lt;br&gt;
Working means: satisfies the stated requirements. Stack is the user's choice. Perfection is a quality indicator, not a deliverable. Correctness against declared intent is the only measure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UR-06: Continuous Constitutional Governance&lt;/strong&gt;&lt;br&gt;
CORE does not distinguish between "build" and "maintain." That's an industry distinction — two teams, two budgets, two problems. CORE asks one question continuously: &lt;em&gt;does this satisfy what you said you wanted?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UR-07: Defensibility is Non-Negotiable&lt;/strong&gt;&lt;br&gt;
Every output traces to a requirement, a rule, or an explicit human decision. If none exist, CORE stops and asks. CORE never produces software it cannot defend — technically, legally, epistemically, historically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UR-08: Judgement Belongs to the Human&lt;/strong&gt;&lt;br&gt;
CORE enforces coherence, not morality. What the software is &lt;em&gt;for&lt;/em&gt; is the user's responsibility. CORE flags contradictions. CORE surfaces missing decisions. CORE does not judge purpose.&lt;/p&gt;




&lt;h2&gt;
  
  
  Where does the document live?
&lt;/h2&gt;

&lt;p&gt;This is the part that made me genuinely happy.&lt;/p&gt;

&lt;p&gt;The answer was obvious. It could only go in one place: &lt;code&gt;.intent/northstar/&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Not &lt;code&gt;constitution/&lt;/code&gt; — it's not a foundational principle.&lt;br&gt;
Not &lt;code&gt;papers/&lt;/code&gt; — it's not philosophy.&lt;br&gt;
Not &lt;code&gt;rules/&lt;/code&gt; — it's not enforcement law.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;northstar/&lt;/code&gt; — because the User Requirements document &lt;em&gt;is&lt;/em&gt; the NorthStar made concrete. Same authority. Same scope. Same rule: human-authored, runtime-immutable. CORE can read it. Reason from it. Vector-search it for context. Never touch it.&lt;/p&gt;

&lt;p&gt;When your architecture tells you where something belongs without you having to think about it — that's good constitutional design.&lt;/p&gt;




&lt;h2&gt;
  
  
  The irony isn't lost on me
&lt;/h2&gt;

&lt;p&gt;CORE demands constitution before code from every project it touches.&lt;/p&gt;

&lt;p&gt;Today its own author finally wrote the requirements document that should have anchored CORE's own constitution from the beginning.&lt;/p&gt;

&lt;p&gt;I was the user. The conversation was CORE. Messy, human, philosophical input went in. Precise, defensible, constitutionally-placed output came out.&lt;/p&gt;

&lt;p&gt;No code written. Real progress made.&lt;/p&gt;




&lt;h2&gt;
  
  
  The governing invariant
&lt;/h2&gt;

&lt;p&gt;All eight requirements trace back to one line, declared in the NorthStar:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;CORE must never produce software it cannot defend.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Not defend emotionally. Not defend rhetorically.&lt;/p&gt;

&lt;p&gt;Defend technically, legally, epistemically, and historically.&lt;/p&gt;

&lt;p&gt;Everything else is a consequence of that one sentence.&lt;/p&gt;




&lt;p&gt;If any of this resonates — or if you want to tell me I'm doing it wrong — the repo is at &lt;a href="https://github.com/DariuszNewecki/CORE" rel="noopener noreferrer"&gt;github.com/DariuszNewecki/CORE&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;CORE is picky. CORE is honest. CORE is written to survive audits, post-mortems, and time.&lt;/p&gt;

&lt;p&gt;If that makes it unsuitable for most people, so be it.&lt;/p&gt;

&lt;p&gt;I did not build CORE to be liked. I built it to be right.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>devops</category>
      <category>core</category>
    </item>
    <item>
      <title>How one missing line broke months of autonomous self-improvement — and what fixing it revealed about constitutional software governance</title>
      <dc:creator>Dariusz Newecki</dc:creator>
      <pubDate>Sat, 28 Mar 2026 15:09:23 +0000</pubDate>
      <link>https://forem.com/dariusz_newecki_e35b0924c/how-one-missing-line-broke-months-of-autonomous-self-improvement-and-what-fixing-it-revealed-3l53</link>
      <guid>https://forem.com/dariusz_newecki_e35b0924c/how-one-missing-line-broke-months-of-autonomous-self-improvement-and-what-fixing-it-revealed-3l53</guid>
      <description>&lt;p&gt;CORE is a system I've been building for over a year. Its purpose is to govern and autonomously improve software codebases using constitutional rules—not loose AI reasoning, but deterministic policies enforced by auditors and workers in a layered architecture (Mind/Body/Will).&lt;/p&gt;

&lt;p&gt;The self-improvement loop is straightforward:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;AuditViolationSensor&lt;/span&gt; &lt;span class="n"&gt;detects&lt;/span&gt; &lt;span class="n"&gt;violation&lt;/span&gt;
  &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="n"&gt;posts&lt;/span&gt; &lt;span class="n"&gt;finding&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;blackboard&lt;/span&gt;
    &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="n"&gt;ViolationRemediatorWorker&lt;/span&gt; &lt;span class="n"&gt;creates&lt;/span&gt; &lt;span class="n"&gt;proposal&lt;/span&gt;
      &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="n"&gt;ProposalConsumerWorker&lt;/span&gt; &lt;span class="n"&gt;executes&lt;/span&gt; &lt;span class="n"&gt;fix&lt;/span&gt;
        &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="n"&gt;AuditViolationSensor&lt;/span&gt; &lt;span class="n"&gt;confirms&lt;/span&gt; &lt;span class="n"&gt;resolved&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For months, every proposal failed silently with the message: &lt;strong&gt;Actions failed: fix.logging&lt;/strong&gt;. The autonomous pipeline—the core feature—was completely broken, and the failure left almost no useful trace.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Investigation
&lt;/h3&gt;

&lt;p&gt;The first red flag was that &lt;code&gt;execution_results&lt;/code&gt; on every failed proposal was an empty dict &lt;code&gt;{}&lt;/code&gt;. This meant the failure occurred before &lt;code&gt;ActionExecutor&lt;/code&gt; even ran. Proposals were created correctly, approved correctly, and then died in the execution path.&lt;/p&gt;

&lt;p&gt;Working backwards:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;ProposalConsumerWorker&lt;/code&gt; picked up approved proposals.
&lt;/li&gt;
&lt;li&gt;It called &lt;code&gt;ProposalExecutor.execute()&lt;/code&gt;.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ActionExecutor.execute("fix.logging")&lt;/code&gt; crashed with:
&lt;code&gt;AttributeError: 'NoneType' object has no attribute 'write_runtime_text'&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;write_runtime_text&lt;/code&gt; belongs to &lt;code&gt;FileHandler&lt;/code&gt;, which meant &lt;code&gt;file_handler&lt;/code&gt; was &lt;code&gt;None&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I checked the daemon startup code in &lt;code&gt;src/will/commands/daemon.py&lt;/code&gt;. It wired up &lt;code&gt;git_service&lt;/code&gt;, &lt;code&gt;knowledge_service&lt;/code&gt;, &lt;code&gt;cognitive_service&lt;/code&gt;, and &lt;code&gt;qdrant_service&lt;/code&gt;—but &lt;code&gt;file_handler&lt;/code&gt; was never set. &lt;code&gt;CoreContext&lt;/code&gt; defaults it to &lt;code&gt;None&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The CLI path worked fine because the &lt;code&gt;@core_command&lt;/code&gt; decorator wires the full &lt;code&gt;CoreContext&lt;/code&gt; (including &lt;code&gt;FileHandler&lt;/code&gt;). The daemon startup simply forgot it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Root cause:&lt;/strong&gt; one missing line. Months of silent failure.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Fix That Got Rejected
&lt;/h3&gt;

&lt;p&gt;The obvious patch looked like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# In src/will/commands/daemon.py
&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;shared.infrastructure.storage.file_handler&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;FileHandler&lt;/span&gt;
&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;file_handler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;FileHandler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BootstrapRegistry&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_repo_path&lt;/span&gt;&lt;span class="p"&gt;()))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CORE's own audit immediately rejected it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ERROR | architecture.boundary.file_handler_access
src/will/commands/daemon.py:199 — Forbidden import:
'from shared.infrastructure.storage.file_handler import FileHandler'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;daemon.py&lt;/code&gt; lives in the &lt;strong&gt;Will&lt;/strong&gt; layer. &lt;code&gt;FileHandler&lt;/code&gt; lives in &lt;code&gt;shared.infrastructure.storage&lt;/code&gt;—&lt;strong&gt;Body&lt;/strong&gt; layer territory. The Will layer is not allowed to import Body infrastructure directly.&lt;/p&gt;

&lt;p&gt;The system enforced its own architectural boundaries against its author.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Correct Fix
&lt;/h3&gt;

&lt;p&gt;Add &lt;code&gt;get_file_handler()&lt;/code&gt; to &lt;code&gt;ServiceRegistry&lt;/code&gt; (in the Body layer, where it belongs), then call it from the daemon:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Proper approach
&lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;file_handler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;service_registry&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_file_handler&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The import now lives where the constitution says it should.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Happened Next
&lt;/h3&gt;

&lt;p&gt;Once the pipeline started running, two more bugs surfaced:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Double &lt;code&gt;write&lt;/code&gt; argument&lt;/strong&gt; — &lt;code&gt;ProposalExecutor&lt;/code&gt; passed &lt;code&gt;write=True&lt;/code&gt; explicitly &lt;em&gt;and&lt;/em&gt; unpacked &lt;code&gt;{"write": True}&lt;/code&gt; from proposal parameters → &lt;code&gt;TypeError: got multiple values for keyword argument 'write'&lt;/code&gt;.&lt;br&gt;&lt;br&gt;
Fixed by stripping &lt;code&gt;write&lt;/code&gt; from parameters before unpacking.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Layer detection in LoggingFixer&lt;/strong&gt; — The autonomous fixer converted &lt;code&gt;console.print()&lt;/code&gt; to &lt;code&gt;logger.info()&lt;/code&gt; in CLI-layer files because its path detection only checked for &lt;code&gt;body/cli&lt;/code&gt;, missing &lt;code&gt;src/cli/&lt;/code&gt;. It was breaking its own rendering.&lt;br&gt;&lt;br&gt;
Fixed by updating the path detection logic.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  First Autonomous Completion
&lt;/h3&gt;

&lt;p&gt;After the fixes:&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;status&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;completed&lt;/span&gt;
&lt;span class="na"&gt;fixes_applied&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;28&lt;/span&gt;
&lt;span class="na"&gt;files_modified&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;dry_run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;False&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No human approval. No human review. The governance pipeline ran end-to-end for the first time.&lt;/p&gt;

&lt;h3&gt;
  
  
  What This Revealed About Constitutional Governance
&lt;/h3&gt;

&lt;p&gt;Three lessons stood out:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Silent failures are a design smell.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The &lt;code&gt;fix.logging&lt;/code&gt; action returned &lt;code&gt;ActionResult(ok=True)&lt;/code&gt; unconditionally, regardless of outcome. The pipeline reported success even when it wasn't. Observability isn't optional—it's a constitutional requirement.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Layer boundaries matter at runtime, not just during review.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The daemon missed &lt;code&gt;file_handler&lt;/code&gt; because the bootstrap path (used by CLI) was never wired into the daemon path. Two code paths, one constitutional contract, and one path that didn't honour it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The governance system catching your own mistake is the point.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The audit rejection of the wrong-layer import wasn't an obstacle. It was the system working as designed. The constitution exists precisely for moments when you're moving fast and tempted to "just make it work." The system slowed that impulse and enforced the right fix.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Where CORE Stands Now
&lt;/h3&gt;

&lt;p&gt;We're not at full A3 autonomy yet. There's still an honest checklist of 8 remaining gaps—including rollback safety on partial execution failures, DB-level concurrency constraints, and the Logic Conservation Gate from an earlier test.&lt;/p&gt;

&lt;p&gt;But Tier 1 autonomous actions now work. The loop has closed.&lt;/p&gt;

&lt;p&gt;The system that was broken used its own constitutional rules to enforce the fix that unblocked it.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/DariuszNewecki/CORE" rel="noopener noreferrer"&gt;https://github.com/DariuszNewecki/CORE&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Previous posts in the series:&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://dev.to/dariusz_newecki_e35b0924c/my-ai-has-22-workers-2470-resolved-violations-and-still-cant-call-itself-autonomous-heres-the-gap-4020"&gt;My AI Has 22 Workers, 2,470 Resolved Violations, and Still Can't Call Itself Autonomous. Here's the Gap.&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/dariusz_newecki_e35b0924c/my-ai-governance-system-passed-its-own-audit-then-i-wrote-one-rule-now-it-fails-thats-the-point"&gt;My AI Governance System Passed Its Own Audit. Then I Wrote One Rule. Now It Fails. That's the Point.&lt;/a&gt;
(and the rest of the CORE series)&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;This version should slot right into your series. It's around 4–5 min read, maintains your voice, and emphasizes the self-referential governance aspect that readers seem to engage with. The code blocks are focused and helpful without overwhelming the narrative.&lt;/p&gt;

&lt;p&gt;If you want any tweaks (e.g., more/less detail on a specific bug, different emphasis on a lesson, or adjusting the previous posts links), just say the word.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>aigovernance</category>
      <category>opensource</category>
      <category>python</category>
    </item>
  </channel>
</rss>
