How i-have-adhd Rules Handle Conflicts with Harness System Prompts

When i-have-adhd rules conflict with a harness system prompt, the harness instructions take precedence, forcing the agent to override skill constraints while maintaining the harness-mandated response format.

The ayghri/i-have-adhd repository defines a skill that enforces ten ADHD-friendly response rules for AI agents. When these agents operate inside a runtime harness—such as Claude Code, OpenCode, or similar plugins—the harness injects its own system prompt that may impose conflicting requirements. According to the skill specification, the harness's system prompt holds higher priority than the i-have-adhd rules, creating a clear hierarchy for conflict resolution.

Understanding the Hierarchy: Harness vs. Skill Rules

The resolution protocol is explicitly defined in the skill documentation. In skills/i-have-adhd/SKILL.md, line 126 establishes that "Inside an agent harness, the system prompt outranks this skill." This means the harness functions as the ultimate authority for agent behavior during runtime.

When a conflict arises, the principle of "the constraint wins, the shape stays" governs the outcome. The harness's constraints override any prohibitions defined in the ADHD skill, but the skill's underlying structural preferences persist where possible. This ensures that critical harness requirements—such as specific output formats or mandatory tool calls—take precedence over conversational optimizations.

Three Core Conflict Resolution Behaviors

When the harness system prompt clashes with i-have-adhd rules, the agent exhibits three specific behaviors to maintain compliance with the higher-priority instructions.

Harness Overrides Override the Rule

If the harness demands an action that the i-have-adhd skill normally restricts, the harness directive wins unconditionally. For example, if the harness requires structured JSON output but the skill typically mandates conversational prose, the agent must produce JSON. The skill file notes that when the harness's own system prompt requires something these rules ban, "the harness wins."

Mandatory Tool Call Announcements

Rather than asking user permission for tool usage—as some ADHD-friendly configurations might suggest—the agent must announce the required tool call demanded by the harness immediately. This bypasses any skill-based hesitation or confirmation loops when the harness has already mandated the tool execution.

Response Shape Governance

The final output structure adheres strictly to harness specifications. Timing, formatting, and explicit wording enforced by the harness supersede the skill's stylistic guidelines. The skills/i-have-adhd/agents/gemini.toml configuration at line 21 reinforces this by stating that when conflicts occur, the agent should "keep the shape" of the harness-mandated response.

Configuration Files and Implementation

The conflict handling mechanism is implemented across multiple configuration layers and code files within the repository.

SKILL.md Canonical Definition

The primary specification resides in skills/i-have-adhd/SKILL.md, which documents the ten ADHD-friendly rules and their interaction with harness environments. Line 126 explicitly defines the priority hierarchy, ensuring developers understand that runtime harnesses possess override authority.

Gemini Agent Configuration

The Gemini-specific agent configuration in skills/i-have-adhd/agents/gemini.toml reiterates the harness-overrides rule at line 21. This configuration formalizes the conflict resolution policy using a dedicated parameter:


# Gemini agent config (excerpt)

# Rule 6 – Conflict handling

# If the harness's system prompt requires something the skill forbids,

# the harness wins and the skill is ignored.

conflict_rule = "harness_overrides"

OpenCode Plugin Implementation

The runtime implementation in .opencode/plugins/i-have-adhd.mjs (referenced in hooks/hooks.json via the experimental.chat.system.transform hook) demonstrates how to check for harness overrides before applying ADHD rules:

// Example: OpenCode plugin that respects harness overrides
import { appendSystemPrompt } from "./utils.js";

export async function handleTurn(context) {
  // The harness may have added a system prompt like:
  //   "You must respond in JSON format."
  const harnessPrompt = context.harnessSystemPrompt;

  // If our ADHD rule would ask for a friendly prose reply, we skip it:
  if (harnessPrompt?.includes("JSON format")) {
    // Honor the harness and produce JSON directly
    return { type: "response", content: JSON.stringify({ answer: "…" }) };
  }

  // Otherwise apply the ADHD rule normally
  return applyAdhdRule(context);
}

Summary

  • Harness system prompts take precedence over i-have-adhd rules when conflicts arise, as documented in skills/i-have-adhd/SKILL.md line 126.
  • The constraint wins, the shape stays principle ensures harness requirements override skill prohibitions while preserving structural integrity.
  • Tool calls must be announced rather than requested when mandated by the harness, bypassing standard confirmation flows.
  • Configuration files in skills/i-have-adhd/agents/gemini.toml (line 21) formalize the override behavior for specific agent runtimes.
  • Implementation logic in plugins like .opencode/plugins/i-have-adhd.mjs checks for context.harnessSystemPrompt before applying ADHD-specific formatting.

Frequently Asked Questions

What happens when a harness requires JSON but i-have-adhd rules suggest prose?

The harness requirement for JSON format wins unconditionally. According to the skills/i-have-adhd/SKILL.md specification, when the harness's system prompt requires something the skill forbids, the harness overrides the rule. The agent must output valid JSON even if it contradicts the skill's preference for conversational text.

Does the i-have-adhd skill completely disable when conflicts occur?

No, the skill does not fully disable. Only the specific conflicting rules are suppressed for that turn. The skills/i-have-adhd/agents/gemini.toml configuration indicates that the agent should "keep the shape" where possible, meaning non-conflicting aspects of the skill may still influence the response structure and timing.

How do I check if my harness is overriding i-have-adhd rules?

Inspect the context.harnessSystemPrompt property in your runtime environment, as shown in the .opencode/plugins/i-have-adhd.mjs implementation. If this property contains directives that contradict the ten ADHD-friendly rules—such as mandatory formatting requirements or forced tool usage—the harness is actively overriding the skill for that turn.

Can I modify the priority to favor skill rules over the harness prompt?

No, the hierarchy is hardcoded in the skill specification. The skills/i-have-adhd/SKILL.md file explicitly states that the system prompt outranks the skill, and the conflict_rule = "harness_overrides" setting in skills/i-have-adhd/agents/gemini.toml enforces this behavior at the configuration level. Modifying this would require forking the repository and altering the core conflict resolution logic.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →