# How to Customize the i-have-adhd Ruleset by Forking the Repository

> Learn how to customize the i-have-adhd ruleset by forking the repository. Modify SKILL.md or the TypeScript extension to tailor it to your needs and improve your workflow.

- Repository: [Ayoub Ghriss/i-have-adhd](https://github.com/ayghri/i-have-adhd)
- Tags: how-to-guide
- Published: 2026-08-08

---

**Yes, you can fully customize the i-have-adhd ruleset by forking the repository and editing the [`SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/SKILL.md) file or modifying the rule loader in the TypeScript extension.**

The `ayghri/i-have-adhd` project is a Pi-coding-agent extension that loads behavioral guidelines from a plain-text Markdown file at runtime. Because the rules live outside the compiled binary and are injected into model responses dynamically, you can customize the i-have-adhd ruleset to match your preferred output style without touching the core agent logic.

## How the Extension Loads Rules

At runtime, the extension defined in [`extensions/i-have-adhd.ts`](https://github.com/ayghri/i-have-adhd/blob/main/extensions/i-have-adhd.ts) calls the `loadRules()` function to read the human-readable guidelines. Specifically, lines 42-60 of this file read [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md), strip the YAML front-matter using `stripFrontmatter()`, and store the resulting text. When ADHD mode is active, this content is automatically prepended to every model response, effectively altering the agent's behavior according to your custom rules.

## Three Ways to Customize the Ruleset

Once you fork the repository, you have full control over how rules are sourced and applied.

### 1. Edit the Default Rule File

The simplest method is to modify [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md) directly. This file contains the human-readable rule set applied when ADHD mode is active. You can change existing rules, add new behavioral guidelines, or remove defaults you do not need. The extension automatically picks up the new content on the next session start without requiring a recompile.

### 2. Change the Rule Source Path

If you prefer to store rules in a different location or maintain multiple rule profiles, modify the `loadRules()` function in [`extensions/i-have-adhd.ts`](https://github.com/ayghri/i-have-adhd/blob/main/extensions/i-have-adhd.ts). Replace the default file path with a custom location:

```ts
function loadRules(): string {
  const CUSTOM_PATH = join(EXTENSION_DIR, "..", "my-rules", "CUSTOM_RULES.md");
  const content = readFileSync(CUSTOM_PATH, "utf8");
  return stripFrontmatter(content);
}

```

After rebuilding the extension, the custom rule set will be injected instead of the default one.

### 3. Extend the Behavior

You can add new commands or configuration flags within the same extension file. For example, implement a custom command that swaps between multiple rule profiles based on user input, or add logic that conditionally appends different rule sets depending on the task type.

## Practical Implementation Examples

Toggle the mode during a Pi session without any code changes:

```ts
// In a Pi session
/i-have-adhd            // toggles on/off
/i-have-adhd on         // force enable
/i-have-adhd off        // force disable

```

Add a new rule by editing [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md). For example, append a guideline stating "use bullet points for lists," then commit the change. The next session will load the updated rules automatically.

To use a completely custom rule file, update the `loadRules` implementation as shown above, placing your [`CUSTOM_RULES.md`](https://github.com/ayghri/i-have-adhd/blob/main/CUSTOM_RULES.md) file in a `my-rules` directory at the repository root.

## Key Files for Customization

Understanding the repository structure helps you target the right files:

- **[`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md)** – Holds the default human-readable rule set applied when ADHD mode is active.
- **[`extensions/i-have-adhd.ts`](https://github.com/ayghri/i-have-adhd/blob/main/extensions/i-have-adhd.ts)** – Contains the extension code that loads the rule file, syncs state, and registers the `/i-have-adhd` command.
- **[`plugin.json`](https://github.com/ayghri/i-have-adhd/blob/main/plugin.json)** – Declares the extension to the Pi platform so it can be loaded as a plugin.
- **[`README.md`](https://github.com/ayghri/i-have-adhd/blob/main/README.md)** – Contains general repository documentation and usage instructions.

## Summary

- The rules are loaded dynamically from [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md) at runtime, not compiled into the binary.
- You can customize the i-have-adhd ruleset by forking the repository and editing the Markdown file directly.
- For advanced use cases, modify the `loadRules()` function in [`extensions/i-have-adhd.ts`](https://github.com/ayghri/i-have-adhd/blob/main/extensions/i-have-adhd.ts) to point to custom rule locations or implement profile switching.
- Changes take effect on the next session start after committing and installing your forked plugin.

## Frequently Asked Questions

### Do I need to recompile the extension after editing SKILL.md?

No. Because [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md) is a plain-text file read at runtime, you only need to restart your Pi session for the changes to take effect. Recompilation is only necessary if you modify the TypeScript loader logic in [`extensions/i-have-adhd.ts`](https://github.com/ayghri/i-have-adhd/blob/main/extensions/i-have-adhd.ts).

### Can I maintain multiple rule profiles and switch between them?

Yes. You can extend the `loadRules()` function in [`extensions/i-have-adhd.ts`](https://github.com/ayghri/i-have-adhd/blob/main/extensions/i-have-adhd.ts) to accept a parameter or check an environment variable, then load different Markdown files based on that input. Alternatively, create a custom command that swaps the active rule file path and reloads the rules.

### Will my custom rules persist if I update the fork from the original repository?

Your changes to [`SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/SKILL.md) or the loader logic will create merge conflicts if the upstream repository updates those same files. To avoid losing customizations, maintain your rules in a separate file (using the custom path method) or use Git branches to manage upstream merges carefully.

### Is it possible to add rules that only apply to specific programming languages?

Yes. You can modify the extension logic in [`extensions/i-have-adhd.ts`](https://github.com/ayghri/i-have-adhd/blob/main/extensions/i-have-adhd.ts) to inspect the current file extension or language mode, then conditionally append language-specific guidelines from separate rule files before injecting the final prompt text into the model response.