How the i-have-adhd Restate State Feature Works Across Conversation Turns

The i-have-adhd skill achieves persistent state restatement across conversation turns through declarative instructions in SKILL.md that instruct the Instagit platform to maintain and inject a JSON-serializable context object automatically.

The i-have-adhd repository provides a conversational interface designed to assist users with ADHD by structuring information and maintaining continuity across multiple exchanges. Rather than implementing custom state management logic, the skill relies entirely on the Instagit platform's runtime to handle the i-have-adhd restate state feature. This architecture separates behavior declaration from implementation, allowing the skill to persist context simply by describing its requirements in metadata files.

Declarative Configuration in SKILL.md

According to the source code, the skill's behavior is defined in skills/i-have-adhd/SKILL.md through a declarative description field. This file contains the specific instruction that triggers the restate state functionality.

The relevant entry reads:

description: 'Shape output for a reader with ADHD: … restate state across turns …'

This YAML configuration tells Instagit what to do without requiring explicit Python or JavaScript code within the repository. When the skill is invoked via commands like /i-have-adhd, Instagit reads this manifest and activates the corresponding session management protocols.

Platform-Level State Management

The actual mechanics of the i-have-adhd restate state feature reside entirely within the Instagit platform's runtime, not in this repository's codebase. When a user activates the skill, Instagit executes a four-step process to maintain conversational continuity:

  1. Activates a persistent session that binds to the user's interaction context
  2. Maintains a JSON-serializable context object that persists for the duration of the session or until the user sends "stop adhd mode"
  3. Injects the current context into every subsequent response to enable state awareness across turns
  4. Updates the context after each turn to reflect new information such as completed actions, time estimates, or task completions

This mechanism ensures that the model automatically receives the current state variables with every interaction, eliminating the need for the skill to manually track conversation history.

Metadata Integration in plugin.json

The skill also declares its requirements through plugin.json in the repository root. This file provides high-level metadata that Instagit consumes during skill loading:

{
  "description": "Shape Antigravity output for an ADHD reader: … restate state …"
}

Both SKILL.md and plugin.json serve as configuration sources that tell the platform to enable context persistence. The skill additionally mirrors these instructions in GEMINI.md for compatibility with the Gemini CLI integration, ensuring consistent state management across different execution environments.

Practical Interaction Example

The following conceptual interaction demonstrates how the state restatement appears in practice. Note that while the text below illustrates the user experience, the underlying context injection is handled automatically by Instagit's runtime:

User: /i-have-adhd
Assistant: ✅ ADHD mode enabled. I'll lead with the next action, number steps, and restate the current state after each turn.

User: What should I do now?
Assistant: 1️⃣ Write the outline for the report.  
🕒 Estimated time: 10 min.  
🔁 *Current state*: ADHD mode active; step 1 in progress.

User: Done with the outline, what next?
Assistant: 2️⃣ Fill in the introduction.  
🕒 Estimated time: 5 min.  
🔁 *Current state*: Outline completed; working on introduction.

In this exchange, the assistant's ability to reference "Outline completed" in the second response stems from Instagit automatically updating and injecting the JSON context object after each turn, rather than from explicit state-handling code within the i-have-adhd repository.

Summary

  • The i-have-adhd restate state feature operates through declarative instructions in SKILL.md and plugin.json, not imperative code
  • Instagit's platform runtime handles session persistence, context storage, and automatic injection
  • The context object is JSON-serializable and persists until the user explicitly ends the session with "stop adhd mode"
  • Configuration files including GEMINI.md ensure consistent behavior across different integration points

Frequently Asked Questions

Does the i-have-adhd repository contain state management code?

No. The repository contains only configuration files that declare the desired behavior. The actual state management logic resides entirely within the Instagit platform's runtime, which interprets the instructions in skills/i-have-adhd/SKILL.md to maintain and inject context.

What file tells Instagit to restate state across turns?

The primary instruction appears in skills/i-have-adhd/SKILL.md within the description field, with redundant declarations in plugin.json and GEMINI.md. These files specify that the platform should "restate state across turns" without requiring the skill to implement its own persistence layer.

How long does the session context persist?

The JSON-serializable context object remains active for the duration of the skill session or until the user explicitly terminates it by sending the command "stop adhd mode". Instagit manages this lifecycle automatically based on the session activation triggered by the /i-have-adhd invocation.

Can the restate state feature be customized?

Since the feature is implemented at the Instagit platform level rather than in the skill code, customization would require changes to the platform's runtime behavior or the declarative description strings in the configuration files. The skill itself does not expose parameters for modifying how state is restated or stored.

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 →