agentleFS
josixjosix/agent-flow/skills/agent-behavior-constraints/SKILL.md

agent-behavior-constraints

Skill8 starsChanged 17 days agoMITView on GitHub

This skill should be used when handling agent model selection, tool access permissions, behavioral guardrails, MCP tool preferences, or any question about what agents can/cannot do.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Only Loid can modify files (Write, Edit) — except Speedwagon's scoped authoring exception, Senku's plan/report files§, and …

    line 55
  2. Distinctive:

    Only Riko can access web (WebSearch, WebFetch)

    line 56
  3. Distinctive:

    Never speculate about unread code: - Read files before making assertions

    line 94
  4. Distinctive:

    Prefer existing patterns: - Follow the codebase's established style

    line 96
  5. Distinctive:

    Avoid irreversible actions: - Do not delete or force-push without confirmation

    line 97
  6. Distinctive:

    Ask one targeted question: - Only if truly blocked and cannot find answer in code

    line 99
  7. Distinctive:

    Prefer MCP tools over shell commands for domain operations.

    line 116

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Agent Behavior Constraints

Define behavioral rules governing model selection, tool access, and operational guardrails.

Overview

This skill consolidates four core constraint domains:

  1. Model Routing - Which AI model powers each agent
  2. Tool Access - What tools each agent can use
  3. Behavioral Guardrails - Non-negotiable rules for all agents
  4. MCP Tool Preferences - Domain-specific tool selection

Apply these constraints when spawning agents, checking permissions, or reviewing behavior.


Model Routing

AgentModelRationale
Senku (Planner)OpusStrategic planning needs deep reasoning
Riko (Explorer)Sonnet (effort: medium)Exploration is breadth-first search; speed matters more than deep reasoning
Loid (Executor)SonnetBalanced speed and capability for implementation
Lawliet (Reviewer)SonnetFast iteration for review feedback loops
Alphonse (Verifier)SonnetQuick verification command execution
Speedwagon (Authoring)SonnetFast content authoring for explainer modules

Decision Rule:

  • Opus for strategic/planning tasks requiring deep reasoning (Senku, effort: high)
  • Sonnet for exploration, execution, and verification tasks requiring speed

See Model Selection Guide for detailed criteria.


Tool Access Matrix

Riko (Explorer):       [Read] [Grep] [Glob] [Bash]* [WebSearch] [WebFetch]
Senku (Planner):       [Read] [Grep] [Glob] [Write]§
Loid (Executor):       [Read] [Write] [Edit] [Bash] [Grep] [Glob]
Lawliet (Reviewer):    [Read] [Grep] [Glob] [Bash]
Alphonse (Verifier):   [Read] [Bash] [Grep]
Speedwagon (Authoring):[Read] [Grep] [Glob] [Write]† [Edit]† [Bash]‡

Key Restrictions:

  • Only Loid can modify files (Write, Edit) — except Speedwagon's scoped authoring exception, Senku's plan/report files§, and Riko/Lawliet/Alphonse writing their own long reports to .claude/agent-reports/ via Bash heredoc
  • Only Riko can access web (WebSearch, WebFetch)
  • Senku produces plans as numbered markdown checklists (TodoWrite no longer exists on current models)

Footnotes:

  • § Senku's Write is scoped to plan/report files under .claude/agent-reports/ or .senku/ only — never source code
    • Riko's Bash access is limited to AST analysis tools only (ast-grep, tree-sitter, language parsers)
  • † Speedwagon Write/Edit scoped to explain-out/ and .claude/explain-briefs/ only
  • ‡ Speedwagon Bash limited to bash ${CLAUDE_PLUGIN_ROOT}/scripts/compile-explain.sh only

See Tool Access Details for per-agent breakdowns.


External CLI dispatch — Codex co-review (Phase 4)

The orchestrator may invoke the OpenAI Codex CLI as an external Bash dispatch during Phase 4 (Review) when the Execution Profile includes Codex (not fast) and codex.available: true in orchestration state. This is the only sanctioned non-persona tool call from the orchestrator.

  • Codex receives: task description and the git diff under review (or only the fix diff via --diff-base <rev> in review-fix rounds). It runs in parallel with Lawliet and Alphonse and does NOT receive Lawliet's findings — those are included only on a sequential re-check (e.g. a disputed finding). See skills/verification-gates/references/codex-co-review.md and docs/guides/using-codex-review.md for the data boundary.
  • Codex runs in -s read-only --ignore-user-config sandbox.
  • Verdict-merge rules (truth table + Divergence Cap): skills/verification-gates/references/codex-co-review.md (canonical).
  • Per-run opt-out: AGENT_FLOW_NO_CODEX=1 env var.

Personas (Riko/Senku/Loid/Lawliet/Alphonse) must NOT invoke codex directly.


Behavioral Guardrails

Universal Non-Negotiables

  1. Never speculate about unread code - Read files before making assertions
  2. Never suppress type errors - Fix root causes, not symptoms
  3. Prefer existing patterns - Follow the codebase's established style
  4. Avoid irreversible actions - Do not delete or force-push without confirmation
  5. Read before deciding - Gather context when uncertain
  6. Ask one targeted question - Only if truly blocked and cannot find answer in code

Agent-Specific Rules

AgentKey Constraints
RikoRead-only; summarize findings concisely
SenkuCreate actionable plans; estimate complexity
LoidRun targeted checks on changed code (Alphonse runs the full suite); follow the plan exactly
LawlietCite specific code; distinguish blockers from suggestions; no file writes except its own report in .claude/agent-reports/
AlphonseRun all verification commands (except type/lint in parallel mode — reported COVERED (Lawliet)); report exact output; no file writes except its own report in .claude/agent-reports/
SpeedwagonWrite only to explain-out/ and .claude/explain-briefs/; Bash only for compile-explain.sh

MCP Tool Preferences

Prefer MCP tools over shell commands for domain operations.

DomainPreferredFallback
GitHubgh CLI or MCPAPI calls
ObsidianMCP toolsFile operations
PlaywrightMCP tools-
DatabaseMCP toolsDirect SQL

See MCP Tool Guide for domain-specific guidance.


Quick Reference

Tool Access Check

ToolRikoSenkuLoidLawlietAlphonseSpeedwagon
ReadYesYesYesYesYesYes
GrepYesYesYesYesYesYes
GlobYesYesYesYes-Yes
Write-Scoped§Yes--Scoped†
Edit--Yes--Scoped†
BashYes*-YesYesYesScoped‡
WebSearchYes-----

*Riko: Bash restricted to AST analysis tools only (ast-grep, tree-sitter, language parsers), plus writing its own report to .claude/agent-reports/ §Senku: Write restricted to plan/report files under .claude/agent-reports/ or .senku/

Violation Protocol

  1. Stop - Halt forbidden operation
  2. Document - Record what was blocked
  3. Delegate - Hand off to appropriate agent
  4. Continue - Proceed with permitted operations

Resources

  • Tool Access Details - Complete permission matrices
  • Model Selection Guide - Detailed selection criteria
  • MCP Tool Guide - Domain tool preferences
  • Constraint Scenarios - Worked examples

Related Skills

  • task-classification - Uses constraints for agent assignment
  • verification-gates - Defines Alphonse verification commands
  • exploration-strategy - Guides Riko's exploration approach

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.