HADAL's documentation
These pages are for agents and people who change how HADAL works in HADAL, extend HADAL, or change its code. HADAL’s system prompt gives their full paths. The links here are relative to this folder.
Where things are
Section titled “Where things are”- The code is in the folder above this one (
web/,src/,docs/,test/). It runs directly from these files: there is no build. - The data is in
~/.hadal/, or inHADAL_DIR. The launcher shows it as Data.config.jsonhas the people, roles, tokens, invites, and settings.hadal.sqlitehas all sessions.extensions/has the owner’s drop-in extensions.themes/has the owner’s themes.- Change the data through the app, never in these files: the server keeps them in memory, and writes over them. There are two exceptions:
extensions/, where drop-ins go (extensions.md), andthemes/, where themes go (extensions/themes.md).
- HADAL’s own files are in
~/.pi/agent/: sign-ins, models, settings,AGENTS.md, skills, and prompt templates. HADAL uses them as HADAL does. It only reads HADAL’s sessions (sessions/), so that the owner can continue one here.
Pick the lightest change
Section titled “Pick the lightest change”Each step goes further than the step before it, and needs more care. Use the first one that does the job.
| To change | Use | Read |
|---|---|---|
| How HADAL works in one session | The session’s instructions (Menu → Instructions for HADAL) | customizing.md |
| How HADAL works in a project, or everywhere | An AGENTS.md in the project, or HADAL’s own in ~/.pi/agent/ |
customizing.md |
| A procedure that HADAL follows on request | A skill, or a prompt template: both become slash commands | customizing.md |
| What HADAL can do: a new tool, a rule in its prompt, a check on calls | A drop-in extension in ~/.hadal/extensions/, which the owner turns on |
extensions.md |
| What the app shows: a page, a rail button, a route of your own | The same drop-in, with a web part | extensions/app.md |
| How the app looks and is laid out | A theme: a folder of CSS in ~/.hadal/themes/, from Appearance → Duplicate |
extensions/themes.md |
| HADAL itself: its screens, its server, a built-in extension | Its code, while it runs | self-editing.md |
A drop-in extension stays when HADAL updates, and the owner can turn it off in the app. A change to HADAL’s code is for each person who uses this copy, and can break it for all of them.
The documents
Section titled “The documents”- customizing.md: how to change how HADAL works, without code.
- extensions.md: how to write extensions: tools, prompt sections, hooks, and pages, buttons, and routes in the app. It is an index: read it, then the guides in extensions/ that your task needs.
- The members of
host,web, andpocketare in extensions/reference/. - The exact types are in types/pocket.d.ts.
- Working examples are in examples/.
- The members of
- extensions/themes.md: how to make a theme, which changes how the app looks and is laid out. Every token and part is in extensions/reference/theme-surface.md.
- extensions/policies/: the rules for extensions and changes to HADAL: what belongs in core, the public API and how it changes, the security model for authors, and the gallery’s review.
- self-editing.md: how to change HADAL’s code while it runs, check the change, and undo a change that breaks it.
- embedders.md: the app bridge, for an embedder (an app that shows HADAL inside itself, such as an Electron or Tauri wrapper):
/api/pocket/info,window.pocketHost, and notifications without Web Push. - cli.md:
hadal cliandhadal run, the terminal as a tab in a session: how it connects, what it draws, and its exit codes. - docker.md: running HADAL in a container, with extensions, themes, HADAL’s folder, and the workspace mounted from the host.
- systemd.md: running HADAL as a systemd service, with a template unit whose instance name is the access mode.
- map.md: where each part of the code is, and how to add the usual things.
- architecture.md: how the parts depend on each other, and the orders that they need.
- ../notes/RESEARCH.md: the 2026-10-11 survey of what other harnesses do with context on local models, with measurements; the implemented results are the batteries in the README.
- ROADMAP.md: where HADAL goes, with the metric each change must move, and the research leads it draws on.
- features.md: what each feature does, as people use it.
- releases.md: the weekly release on Fridays, the betas between releases, and how to run a beta.
- release-notes.md: how to write the notes of a release.
- ../SECURITY.md: what HADAL protects, and what it does not.
The same pages are also rendered as a searchable site by docs-site/ (Starlight): cd docs-site && npm run dev.
Before you change anything
Section titled “Before you change anything”- Ask first. A change to HADAL reaches each person who uses it, at once. Say what you will change and why. Then wait for a yes, unless the person asked for exactly that change.
- Do not test on the live data. Check a change on a copy of HADAL with its own data folder (self-editing.md), not on the server that people use.
- Do not restart while your own tool call runs, and do not restart without asking. Tell the person to use Menu → Restart server.
These pages describe HADAL 0.29.0. Your copy has the pages of its own version in its docs/ folder.