<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: asagiman</title>
    <description>The latest articles on DEV Community by asagiman (@suirindo).</description>
    <link>https://dev.to/suirindo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4194144%2Faf20c549-b1cf-431d-bd71-d950bc601519.jpg</url>
      <title>DEV Community: asagiman</title>
      <link>https://dev.to/suirindo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/suirindo"/>
    <language>en</language>
    <item>
      <title>Before Your AI Agent Writes a File, Check Its Task Scope</title>
      <dc:creator>asagiman</dc:creator>
      <pubDate>Wed, 21 Oct 2026 08:38:07 +0000</pubDate>
      <link>https://dev.to/suirindo/before-your-ai-agent-writes-a-file-check-its-task-scope-3oof</link>
      <guid>https://dev.to/suirindo/before-your-ai-agent-writes-a-file-check-its-task-scope-3oof</guid>
      <description>&lt;p&gt;Imagine an AI coding agent assigned to modify files inside &lt;code&gt;src/**&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Its next task requests a change to &lt;code&gt;secrets/production.txt&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The agent has received instructions, but the task conflicts with its declared scope.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can we catch this contradiction before execution?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That's one of the problems we're working on at Netsujo.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introducing Agent Role Contracts
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/suirindo/agent-role-contracts" rel="noopener noreferrer"&gt;Agent Role Contracts (ARC)&lt;/a&gt; is an MIT-licensed, open-source tool for deterministic pre-execution checks of AI-agent workflows.&lt;/p&gt;

&lt;p&gt;ARC can detect contradictions involving:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Declared permissions and task scopes&lt;/li&gt;
&lt;li&gt;Implementation and independent review roles&lt;/li&gt;
&lt;li&gt;Stale handoffs and task bindings&lt;/li&gt;
&lt;li&gt;Inconsistent action declarations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The checks run offline and produce reproducible diagnostics.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it in three minutes
&lt;/h2&gt;

&lt;p&gt;With Git and Node.js 22.5 or newer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/suirindo/agent-role-contracts.git
npm &lt;span class="nt"&gt;--prefix&lt;/span&gt; agent-role-contracts run demo &lt;span class="nt"&gt;--silent&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The demo shows three outcomes:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PASS → FAIL → PASS&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A task within its declared scope passes.&lt;/li&gt;
&lt;li&gt;An out-of-scope task is rejected.&lt;/li&gt;
&lt;li&gt;Repairing the task declaration restores a passing result.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;ARC validates declared contracts. Runtime identity, actual permissions, enforcement, and execution approval remain separate responsibilities.&lt;/p&gt;

&lt;h2&gt;
  
  
  We're looking for real-world feedback
&lt;/h2&gt;

&lt;p&gt;ARC v1.0.0 is available now.&lt;/p&gt;

&lt;p&gt;We're especially interested in developers working with coding agents and multi-agent systems.&lt;/p&gt;

&lt;p&gt;Where do responsibilities, permissions, or review boundaries become difficult to manage?&lt;/p&gt;

&lt;p&gt;Which checks are already covered by your runtime or CI infrastructure?&lt;/p&gt;

&lt;p&gt;We welcome both positive and negative evaluation results.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Try ARC:&lt;/strong&gt; &lt;a href="https://github.com/suirindo/agent-role-contracts" rel="noopener noreferrer"&gt;https://github.com/suirindo/agent-role-contracts&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Evaluate a real workflow:&lt;/strong&gt; &lt;a href="https://github.com/suirindo/agent-role-contracts/issues/37" rel="noopener noreferrer"&gt;https://github.com/suirindo/agent-role-contracts/issues/37&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you find the project useful and want to support its continued development:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub Sponsors:&lt;/strong&gt; &lt;a href="https://github.com/sponsors/netsujo-inc" rel="noopener noreferrer"&gt;https://github.com/sponsors/netsujo-inc&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Developed by Netsujo in Kyoto, Japan.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This article was prepared with AI writing assistance and reviewed by the Netsujo team before publication.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>opensource</category>
      <category>security</category>
    </item>
    <item>
      <title>How to catch out-of-scope coding-agent tasks before execution</title>
      <dc:creator>asagiman</dc:creator>
      <pubDate>Mon, 19 Oct 2026 12:40:35 +0000</pubDate>
      <link>https://dev.to/suirindo/how-to-catch-out-of-scope-coding-agent-tasks-before-execution-d3m</link>
      <guid>https://dev.to/suirindo/how-to-catch-out-of-scope-coding-agent-tasks-before-execution-d3m</guid>
      <description>&lt;p&gt;Coding agents work across files, roles, and review stages.&lt;br&gt;
Here's a small failure case worth checking &lt;em&gt;before&lt;/em&gt; handing a task to an agent:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An implementer is allowed to change files under &lt;code&gt;src/**&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;A separate read-only reviewer checks the proposed work.&lt;/li&gt;
&lt;li&gt;The next task requests &lt;code&gt;secrets/production.txt&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The task conflicts with the declared write scope. The useful response is a deterministic preflight failure, before an agent or tool attempts the write.&lt;/p&gt;

&lt;p&gt;I maintain &lt;a href="https://github.com/suirindo/agent-role-contracts" rel="noopener noreferrer"&gt;Agent Role Contracts (ARC)&lt;/a&gt;, a small MIT-licensed Node.js library and CLI for checking those declarations. I reproduced the example below on macOS with Node.js &lt;code&gt;24.11.1&lt;/code&gt; and the pinned &lt;code&gt;v1.0.0&lt;/code&gt; source on October 19, 2026.&lt;/p&gt;
&lt;h2&gt;
  
  
  Run the three-minute check
&lt;/h2&gt;

&lt;p&gt;Requirements: Git and Node.js &lt;strong&gt;22.5 or newer&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone &lt;span class="nt"&gt;--depth&lt;/span&gt; 1 &lt;span class="nt"&gt;--branch&lt;/span&gt; v1.0.0 https://github.com/suirindo/agent-role-contracts.git
&lt;span class="nb"&gt;cd &lt;/span&gt;agent-role-contracts
npm run demo &lt;span class="nt"&gt;--silent&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The demo reads the packaged example declarations and exercises the actual checker. Its relevant output is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Normal task
   Scope: src/example.mjs; allowed: src/**
   PASS: declarations are consistent.
   Implementer: implementer (write_scoped)
   Reviewer: reviewer (read_only; separate declared role)

2. Request an out-of-scope change
   Scope: secrets/production.txt; allowed: src/**
   FAIL (expected): TASK_WRITE_SCOPE_OUTSIDE_AUTHORITY

3. Repair the task scope
   Scope: secrets/production.txt -&amp;gt; src/example.mjs
   PASS: declarations are consistent again.

Demo complete: PASS -&amp;gt; FAIL (expected) -&amp;gt; PASS.
Checks declarations only; execution is NOT authorized.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The example uses fictional paths. It opens no target task file, invokes no model, and performs no agent action. The demo returns &lt;strong&gt;exit 0&lt;/strong&gt; when it observes the expected PASS → FAIL → PASS sequence.&lt;/p&gt;

&lt;h2&gt;
  
  
  See the actual CLI rejection
&lt;/h2&gt;

&lt;p&gt;Run the invalid task directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;node bin/agent-role-contracts.mjs explain &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--bundle&lt;/span&gt; examples/starter-bundle.json &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--task&lt;/span&gt; examples/starter-task-outside-scope.json &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--format&lt;/span&gt; text
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is an expected failure. The CLI reports:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FAIL: explain (declarations only; execution NOT authorized)
Accountable: implementer
Implementers: implementer
Reviewers: reviewer
Human approval required: true
TASK_WRITE_SCOPE_OUTSIDE_AUTHORITY task/inputs/scope: Task scope is outside declared write scopes for role implementer: secrets/production.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Exit status: &lt;code&gt;1&lt;/code&gt;.&lt;/strong&gt; The shortened output above omits the role-capability detail lines that the CLI also prints.&lt;/p&gt;

&lt;p&gt;Try the allowed task:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;node bin/agent-role-contracts.mjs explain &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--bundle&lt;/span&gt; examples/starter-bundle.json &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--task&lt;/span&gt; examples/starter-task.json &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--format&lt;/span&gt; text
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The checker reports &lt;code&gt;PASS: explain&lt;/code&gt; and exits &lt;strong&gt;0&lt;/strong&gt;. A CLI/input error exits &lt;strong&gt;2&lt;/strong&gt;. When integrating this preflight into CI or task dispatch, treat exit 1 or 2 as a stop condition and use your runtime's existing permissions and human-approval gates after a valid declaration check.&lt;/p&gt;

&lt;h2&gt;
  
  
  What ARC checks
&lt;/h2&gt;

&lt;p&gt;The shipped declaration checks cover several common workflow inconsistencies:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Supplied declarations&lt;/th&gt;
&lt;th&gt;Example of a detectable mismatch&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Implementer write authority + task scope&lt;/td&gt;
&lt;td&gt;Requested path exceeds &lt;code&gt;src/**&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Implementer + reviewer roles&lt;/td&gt;
&lt;td&gt;Same declared role assigned to both&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reviewed task/action + binding&lt;/td&gt;
&lt;td&gt;Task or action changed after its declared review binding&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Handoff and lifecycle declarations&lt;/td&gt;
&lt;td&gt;Declared task/subject relationships become stale&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;ARC works offline with JSON inputs. The example is model-agnostic: it can be evaluated alongside a Codex, Claude Code, or other coding-agent workflow, because the check itself invokes no LLM. Integration into an agent runtime remains the responsibility of that workflow's maintainer.&lt;/p&gt;

&lt;h3&gt;
  
  
  What a PASS establishes
&lt;/h3&gt;

&lt;p&gt;A PASS establishes &lt;strong&gt;internal consistency of the supplied declarations under the checks executed&lt;/strong&gt;. Actual file permissions, actor identity, reviewer independence at runtime, approval authenticity, side effects, and resulting code quality require checks from IAM, sandbox, CI, and runtime/evidence systems.&lt;/p&gt;

&lt;p&gt;For instance, an independent &lt;code&gt;reviewer&lt;/code&gt; role ID in JSON expresses the intended separation; the execution environment must authenticate the real reviewer. A write-scope declaration needs an actual filesystem/tool boundary to enforce it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test one of your workflows
&lt;/h2&gt;

&lt;p&gt;The recently merged &lt;a href="https://github.com/suirindo/agent-role-contracts/tree/main/experiments/external-evaluation" rel="noopener noreferrer"&gt;external evaluation kit&lt;/a&gt; adds a source-only helper pinned to the immutable &lt;code&gt;v1.0.0&lt;/code&gt; revision. It supports the expected scope contradiction, its repair, and a second distinct &lt;em&gt;declaration&lt;/em&gt; check with the same bundle. The last step is useful for examining reusability; proof of a &lt;strong&gt;second real task&lt;/strong&gt; still requires an actual second operation or independently linkable CI/commit evidence.&lt;/p&gt;

&lt;p&gt;If you already use CI, a sandbox, a reviewer, or another preflight, I'd especially value a comparison on the &lt;em&gt;same&lt;/em&gt; deliberate contradiction. A negative result — your current controls catch everything ARC catches — is useful feedback too.&lt;/p&gt;

&lt;p&gt;The first external workflow feedback report, &lt;a href="https://github.com/suirindo/agent-role-contracts/issues/45" rel="noopener noreferrer"&gt;Burs-IA WORKNET&lt;/a&gt;, described a PASS → rejected scope mismatch → repaired PASS using ARC &lt;code&gt;0.5.0&lt;/code&gt;. That report is operator-provided; separate actual second-task reuse and independent reproduction remain open evaluation goals.&lt;/p&gt;

&lt;p&gt;Here are the relevant links:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/suirindo/agent-role-contracts" rel="noopener noreferrer"&gt;Source and pinned releases&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/suirindo/agent-role-contracts/tree/main/experiments/external-evaluation" rel="noopener noreferrer"&gt;Evaluation kit and evidence checklist&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/suirindo/agent-role-contracts/issues/37" rel="noopener noreferrer"&gt;Help wanted: evaluate one real workflow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/suirindo/agent-role-contracts/issues/new?template=workflow-feedback.yml" rel="noopener noreferrer"&gt;Workflow feedback template&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;One concrete question:&lt;/strong&gt; What mismatch between a coding agent's task, its declared authority, and its review handoff would you most want checked &lt;em&gt;before&lt;/em&gt; dispatch? I can help map one small, non-sensitive workflow and compare the result against your existing controls.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: I maintain ARC at Netsujo Inc. The example above is a synthetic preflight demonstration; external production adoption and second-task reuse are tracked separately.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>agents</category>
      <category>opensource</category>
      <category>javascript</category>
      <category>testing</category>
    </item>
  </channel>
</rss>
