# What Programming Languages Are Used in the i-have-adhd Repository?

> Discover the programming languages powering the i-have-adhd repository. Explore TypeScript, JavaScript, Python, and more for AI skill adapters and pipelines.

- Repository: [Ayoub Ghriss/i-have-adhd](https://github.com/ayghri/i-have-adhd)
- Tags: getting-started
- Published: 2026-08-30

---

**The i-have-adhd repository utilizes TypeScript, JavaScript (ES Modules), Python, JSON, Markdown, Shell scripts, and YAML configuration files to implement cross-runtime AI skill adapters, evaluation pipelines, and documentation.**

The i-have-adhd project maintained by ayghri is a polyglot codebase engineered to deliver ADHD-friendly AI responses across multiple runtime environments. Understanding the programming languages used in the i-have-adhd repository reveals how it bridges TypeScript-based core extensions, Python-driven testing frameworks, and declarative markup to support platforms like Pi, OMP, and OpenCode.

## TypeScript – Core Extension Implementation

The primary application logic resides in TypeScript source files that provide type-safe implementations for various runtimes. The [[`extensions/i-have-adhd.ts`](https://github.com/ayghri/i-have-adhd/blob/main/extensions/i-have-adhd.ts)](https://github.com/ayghri/i-have-adhd/blob/main/extensions/i-have-adhd.ts) file contains the main extension entry points, while [[`context-compat.ts`](https://github.com/ayghri/i-have-adhd/blob/main/context-compat.ts)](https://github.com/ayghri/i-have-adhd/blob/main/context-compat.ts) handles context compatibility layers between different AI platforms. These files export strongly-typed interfaces and functions that ensure consistent behavior across the Pi, OMP, and OpenCode runtimes.

```typescript
// context-compat.ts
export interface SkillContext {
  runtime: "pi" | "omp" | "opencode";
  instruction: string;
}

export function adaptContext(ctx: SkillContext): string {
  return `[${ctx.runtime}] ${ctx.instruction}`;
}

```

## JavaScript – Runtime-Specific Adapters

For environments that execute native ES Modules, the repository provides JavaScript `.mjs` files that act as runtime-specific plugin entry points. The [`.opencode/plugins/i-have-adhd.mjs`](https://github.com/ayghri/i-have-adhd/blob/main/.opencode/plugins/i-have-adhd.mjs) file registers the skill with the OpenCode server by exporting a standardized plugin object containing the **name**, **description**, and **run** function.

```javascript
// .opencode/plugins/i-have-adhd.mjs
export const name = "i-have-adhd";
export const description = "ADHD‑friendly response skill";
export async function run(context) {
  // ...implementation that reads SKILL.md and injects responses
}

```

Additionally, the plugin fetches the canonical skill definition remotely to ensure always-updated behavior:

```javascript
// .opencode/plugins/i-have-adhd.mjs
export const name = "i-have-adhd";
export async function run(context) {
  const skill = await fetch(
    "https://raw.githubusercontent.com/ayghri/i-have-adhd/main/skills/i-have-adhd/SKILL.md"
  ).then(r => r.text());
  // …process skill…
}

```

## Python – Evaluation and Automation

The repository leverages **Python** for test runners, evaluation scripts, and CI helpers that drive the validation framework. The [[`scripts/run_evals.py`](https://github.com/ayghri/i-have-adhd/blob/main/scripts/run_evals.py)](https://github.com/ayghri/i-have-adhd/blob/main/scripts/run_evals.py) file serves as the CLI driver that validates, plans, executes, and scores evaluation runs using Python's built-in testing infrastructure.

```python

# scripts/run_evals.py

import argparse, json, subprocess

def main():
    parser = argparse.ArgumentParser()
    parser.add_argument("action", choices=["validate", "plan", "run"])
    args = parser.parse_args()
    if args.action == "run":
        subprocess.run(["python3", "-m", "unittest", "discover", "-s", "tests"])

```

## Configuration and Infrastructure

Beyond compiled and interpreted languages, the project relies on several declarative and markup formats to define metadata and documentation.

### JSON – Package Manifests

The [[`package.json`](https://github.com/ayghri/i-have-adhd/blob/main/package.json)](https://github.com/ayghri/i-have-adhd/blob/main/package.json) file declares Node.js package metadata, extension entry points, and runtime dependencies required by the TypeScript and JavaScript components.

### YAML – Agent Configuration

Runtime-specific AI agent behaviors are configured using YAML files. The [[`skills/i-have-adhd/agents/openai.yaml`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/agents/openai.yaml)](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/agents/openai.yaml) file defines parameters for the OpenAI runtime agent, allowing declarative adjustment of model settings without modifying source code.

### Markdown – Documentation

Project documentation, skill specifications, and user-facing guides are authored in Markdown. The [[`README.md`](https://github.com/ayghri/i-have-adhd/blob/main/README.md)](https://github.com/ayghri/i-have-adhd/blob/main/README.md) provides high-level project overview, while [`skills/i-have-adhd/SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/SKILL.md) contains the canonical skill definition consumed by the adapters.

### Shell Scripts – Deployment Hooks

Cross-platform deployment is supported through shell scripts located in the [`hooks/`](https://github.com/ayghri/i-have-adhd/tree/main/hooks) directory. The [[`hooks/always-on.sh`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/always-on.sh)](https://github.com/ayghri/i-have-adhd/blob/main/hooks/always-on.sh) file provides Unix-like systems with always-on hook functionality for persistent deployment scenarios.

## Summary

The i-have-adhd repository demonstrates a modern polyglot architecture:

- **TypeScript** provides type-safe core extensions in [`extensions/i-have-adhd.ts`](https://github.com/ayghri/i-have-adhd/blob/main/extensions/i-have-adhd.ts) and [`context-compat.ts`](https://github.com/ayghri/i-have-adhd/blob/main/context-compat.ts)
- **JavaScript (ES Modules)** enables runtime-specific plugins via `.opencode/plugins/i-have-adhd.mjs`
- **Python** drives evaluation automation through [`scripts/run_evals.py`](https://github.com/ayghri/i-have-adhd/blob/main/scripts/run_evals.py)
- **JSON** defines package manifests in [`package.json`](https://github.com/ayghri/i-have-adhd/blob/main/package.json)
- **YAML** configures AI agents in [`skills/i-have-adhd/agents/openai.yaml`](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/agents/openai.yaml)
- **Markdown** documents the project and defines skills in [`README.md`](https://github.com/ayghri/i-have-adhd/blob/main/README.md) and [`SKILL.md`](https://github.com/ayghri/i-have-adhd/blob/main/SKILL.md)
- **Shell scripts** handle deployment automation in [`hooks/always-on.sh`](https://github.com/ayghri/i-have-adhd/blob/main/hooks/always-on.sh)

## Frequently Asked Questions

### What is the main programming language used for the i-have-adhd extensions?

TypeScript serves as the primary language for core extension logic, implemented in files like [[`extensions/i-have-adhd.ts`](https://github.com/ayghri/i-have-adhd/blob/main/extensions/i-have-adhd.ts)](https://github.com/ayghri/i-have-adhd/blob/main/extensions/i-have-adhd.ts) and [[`context-compat.ts`](https://github.com/ayghri/i-have-adhd/blob/main/context-compat.ts)](https://github.com/ayghri/i-have-adhd/blob/main/context-compat.ts). These files provide type-safe adapters for multiple runtimes including Pi, OMP, and OpenCode.

### Why does the repository use both TypeScript and JavaScript?

TypeScript handles the compile-time type safety and complex logic in the core extensions, while JavaScript ES Modules (`.mjs` files) serve as the runtime-specific entry points for platforms like OpenCode that execute native JavaScript. The [`.opencode/plugins/i-have-adhd.mjs`](https://github.com/ayghri/i-have-adhd/blob/main/.opencode/plugins/i-have-adhd.mjs) file acts as a lightweight wrapper that loads the compiled TypeScript logic.

### How does Python support the i-have-adhd testing pipeline?

Python manages the evaluation framework through [[`scripts/run_evals.py`](https://github.com/ayghri/i-have-adhd/blob/main/scripts/run_evals.py)](https://github.com/ayghri/i-have-adhd/blob/main/scripts/run_evals.py), which orchestrates test discovery, execution, and scoring. The script uses `argparse` for CLI interaction and `subprocess` to run `unittest` discovery across the repository's test suites.

### Where are the AI agent configurations defined?

Agent configurations are defined declaratively using YAML files located in [`skills/i-have-adhd/agents/`](https://github.com/ayghri/i-have-adhd/tree/main/skills/i-have-adhd/agents), such as [[`openai.yaml`](https://github.com/ayghri/i-have-adhd/blob/main/openai.yaml)](https://github.com/ayghri/i-have-adhd/blob/main/skills/i-have-adhd/agents/openai.yaml). These files allow runtime-specific tuning of model parameters without requiring code changes in the TypeScript or Python sources.