# Harold: AI Chief of Staff > Complete documentation for Harold, an AI chief of staff that works with any harness and any model: plain Markdown records in a git repository, playbooks that say how recurring work is done, and a small program (`bin/harold`) that runs at the start and end of every session. No database, no server, no account beyond git hosting. Free and MIT licensed. To set Harold up, give your harness this line: Set up Harold for me: follow the setup playbook at https://github.com/dswinder-repo/harold-template/blob/main/playbooks/core/setup.md, and read https://harold.works/llms-full.txt for anything it doesn't cover. --- # What is Harold? URL: https://harold.works/docs/#overview/what-is-harold Harold is an AI chief of staff that works with any harness and any model. It is three things: - **Records.** Plain Markdown files in a git repository: your people, companies, projects, tasks, daily notes and research. They hold everything Harold knows, so any agent, in any harness, arrives already knowing your working life and continues where the last one left off. - **Playbooks.** Plain Markdown files that say exactly how recurring work is done (a meeting debrief, a morning brief, filing a new contact), and what fires each one. - **A small program.** `bin/harold` (Node, no dependencies) runs at the start and end of every session: at the start it loads and verifies what the session needs, and at the end it checks that nothing was left unfiled, then saves the work with git. There is no database, no server and no account beyond git hosting. Harold is free and MIT licensed. The starter repository, [harold-template](https://github.com/dswinder-repo/harold-template), is the empty workspace: you fill in your own work. ## The Idea You should never have to explain yourself twice. Every session leaves Harold knowing more and working better, so that Harold carries the load instead of you. It does this through its records, its playbooks and one short constitution, `AGENTS.md`, which every agent reads first and which tells it how to work within Harold. ## What You Do You talk to your harness the way you would talk to a chief of staff. You never type a Harold command. Harold reads what you say, by meaning, and runs the right playbook: "I just met someone at Acme Ventures" means file the contact, check the company, create the follow-up task and flag it in the next brief. The commands in `bin/harold` are for the agent, not for you. ## What Harold Needs A harness (an AI coding tool or agent app) that can read `AGENTS.md` and run a shell command. Harnesses with lifecycle hooks or plugins are wired by files already in the repository, so boot and close run on their own. Any other harness follows `AGENTS.md`, whose first instruction runs `bin/harold boot`. Harold lives in your GitHub repository, so you can use it from any device your harness runs on. See [Any AI Harness](#getting-started/your-ai-tool). ## Where to Start Paste one line into a harness that can run commands. It sets everything up, and you answer a few questions. See [Initial Setup](#getting-started/initial-setup). --- # How It Fits Together URL: https://harold.works/docs/#overview/architecture Harold is a git repository with a fixed layout. Records and procedures are Markdown; the program that keeps them honest is `bin/harold`. ## The Layout | Folder | What it holds | |---|---| | `people/` | One card per person | | `companies/` | One card per company | | `projects/` | One folder per project: its page, plans, notes and meetings. The page names its manager | | `tasks/` | One card per task, made with `bin/harold task` | | `daily/` | One dated note per session: what changed | | `research/` | Dated notes and intel; `research/meetings/` holds meeting notes that belong to no project | | `office/` | How Harold runs: settings, the project map (`office/projects.md`), the fix list, morning brief drafts | | `archive/` | Finished history | | `playbooks/` | Procedures (`core/`) and the format for each record type (`record-formats/`), listed in `playbooks/README.md` | | `bin/` and `tools/` | The program, its tests, the plugin and the harness wiring | `AGENTS.md` at the root is the constitution every agent reads first, and `CLAUDE.md` points at it. A product (code, design files, assets) lives in its own repository; Harold holds each project's management, not the product itself. ## Sessions Every session begins with `bin/harold boot` and ends each turn with `bin/harold close`. In between, the agent follows `AGENTS.md`: orient (read the playbook list, search the records), do the work by the playbook that fits, and file what changed. See [Boot and Close](#core-systems/enforcement). ## Finding Context Harold follows links between notes instead of loading folders. `bin/harold search ""` finds a note, and each hit lists its top linked notes. `bin/harold related ""` follows the links one hop (`--depth 2` for two): people, companies, projects and meetings, with how each is linked and the line where. It ends with a `gaps:` line: notes stale after `HAROLD_STALE_DAYS` (default 30 days), broken links, orphans, and no meeting notes. `bin/harold backlinks ""` lists everything pointing at a note. The index is a SQLite full-text search and link graph, `tools/index/search.db`. It is gitignored and rebuilt by boot, search and close whenever a file changed. A committed copy of the graph, `tools/index/graph.json`, is written at close. Archived notes are searchable and never flagged stale. Resolve any project to its folder with `bin/harold where `. When two records conflict, recent context (the last 30 days) wins; older conflicting entries lose, weighted by age. Person and company cards own relationship information, task cards own tasks, and your calendar owns events; nothing is duplicated between them. ## The Management Layer Harold can run work through a Chief of Staff, one project manager per project, and workers, all in any harness, with all state kept in the records. See [Managers and Workers](#core-systems/managers). --- # Prerequisites URL: https://harold.works/docs/#getting-started/prerequisites ## What You Need - **An AI harness that can run commands.** It runs the setup and works inside Harold afterwards. Any harness that can read `AGENTS.md` and run a shell command will do, with whichever model it runs. Harold lives in your GitHub repository, so you can use it from any device your harness runs on. See [Any AI Harness](#getting-started/your-ai-tool). - **A git host and a private repository of your own.** GitHub is what setup uses by default. Harold saves your work by committing it and pushing it to this repository at the end of every turn. It holds your working life (people, meetings, decisions), so it must be private, and it must be yours. If you have no account, setup helps you create one. - **On your own computer:** git, Node 18 or newer and Python 3.8 or newer (the figures in the setup playbook). Cloud sessions usually have them already. Two other files name Node more strictly: the optional GitHub agent action runs on Node 22, and the OpenClaw plugin's README says Harold needs Node 22 there, with OpenClaw itself needing whatever Node version its own documentation names. Nothing else: no database, no server and no other account. ## Where Harold Lives Setup asks you to choose, and you can change your mind later because everything is in your private repository. 1. **In the cloud.** Harold lives only in your private GitHub repository. You start a session in your harness's cloud from that repository; it copies Harold at the start and saves back at the end of every turn. Nothing stays on your computer, and you can pick up from any device. You need a harness that runs cloud sessions from a GitHub repository. 2. **On your own computer.** Harold is a folder you open in your harness there. It is still saved to your private repository at the end of every turn. Keep the folder out of synced folders (cloud drives) if you can, because they can evict files. --- # Initial Setup URL: https://harold.works/docs/#getting-started/initial-setup Paste this line into a harness that can run commands, in a folder on your computer or in a cloud session: ```text Set up Harold for me: follow the setup playbook at https://github.com/dswinder-repo/harold-template/blob/main/playbooks/core/setup.md, and read https://harold.works/llms-full.txt for anything it doesn't cover. ``` The tool reads the setup playbook and walks you through it in conversation. It does the work; you answer questions. It never asks you to open or edit a file, and never guesses a detail you have not given it. If you stop partway, the next session picks up where it left off: `bin/harold check` names what is still missing, and the playbook resumes at the first unfinished step. ## What Setup Does 1. **Where Harold lives, and a private copy.** You choose cloud or your own computer. Setup makes your own private copy of the starter: with the GitHub CLI, `gh repo create --private --template dswinder-repo/harold-template --clone`; or from the starter's page, Use this template, set to Private; or from a clone you already have, by creating an empty private repository and pointing `origin` at it. It checks `git remote get-url origin` and confirms `origin` is your own repository. Harold's repository must be your own private one: boot and `bin/harold check` warn while `origin` still points at the public starter, and `bin/harold close` never pushes there. While `origin` is the public starter, close commits locally and prints `local only, NOT PUSHED: origin is the public Harold starter, and close never pushes there`, followed by the `git remote set-url origin ` command to run, and exits 0. 2. **Git identity.** It checks `git config user.name` and `user.email` and sets them for the repository if empty, asking you which to use. 3. **Name and time zone.** It asks your name (as Harold should address you) and your time zone (such as `America/Chicago` or `Europe/London`), and writes `HAROLD_OPERATOR` and `HAROLD_TZ` into `office/settings`. Without a zone, Harold uses the zone of whatever machine runs it, which in the cloud is usually UTC. 4. **Where tasks and contacts live.** It asks, in plain words, whether your tasks live in Harold or in a task manager you already use (Asana, Linear, Todoist and so on), and whether your contacts live in Harold or in a CRM you already use (HubSpot and so on). It writes the answers as `HAROLD_TASKS` and `HAROLD_CONTACTS` in `office/settings`, checks that any tool you name has a connector in your harness (and tells you how to add it if not), and can import an exported contact list from your CRM once. See [Tasks](#core-systems/task-management). 5. **Wire your harness.** It does the one-time step for each harness you use (for example trusting hooks once). Harnesses with no hooks rely on the first instruction in `AGENTS.md`. See [Any AI Harness](#getting-started/your-ai-tool). 6. **Check it.** It runs `bin/harold check`, which should end with `RESULT: PASS` and no warning about the time zone or `origin`, then runs `bin/harold boot` and reads its output. 7. **First projects and people.** It asks which one to three projects you are working on and who the key people are, and files them through the project-intake and contacts playbooks. It deletes the `Example Project` entry and folder once a real project exists. You can skip anything you do not want to give yet. 8. **First session.** It runs `bin/harold close` once, which commits and pushes the setup to your private repository (and says so plainly if `origin` is still the public starter, in which case it only commits), and tells you in a line what was set up, where Harold lives and how to start a session from now on: open the folder in your harness, or start a cloud session on the repository. ## Optional Extras Ask for these later: a scheduled morning brief (see [Morning Brief](#daily-operations/morning-brief) and [Scheduled Jobs](#reference/scheduled-jobs)) and updates to Harold's own machinery (see [Updating and Tests](#reference/updating)). ## Your First Sessions Work as you normally would, and say what you are doing in plain words: a new project, a person you met, a task you finished. Harold files it as it goes, and each turn ends with a close that lists anything left unfiled. Search and relationships get richer as the records fill in. --- # Any AI Harness URL: https://harold.works/docs/#getting-started/your-ai-tool Harold lives in your GitHub repository, so you can use it from any device your harness runs on. The supported harnesses are Claude Code, Codex, Grok Build (formerly Cursor), Antigravity, GitHub Copilot (CLI), Amp, Qwen Code, Kimi Code, goose, Hermes Agent and OpenClaw. Harold is harness- and model-agnostic: it works the same in any harness that can read `AGENTS.md` and run a shell command, with whichever model that harness runs, so any other harness works too. Each harness below is wired by its own files, side by side; none is required for another, and Harold's own rule never depends on a harness: where a hook's output does not reach the model, the first instruction in `AGENTS.md` (run `bin/harold boot`) is the backstop. ## Which File Wires Each Harness | Harness | Wiring file | Start of session | End of every turn | End of session | One-time step | Where a hook cannot run, or its output is not shown to the model | |------|-------------|------------------|-------------------|----------------|---------------|-------------------------------------------------------------------| | Claude Code | `.claude/settings.json` | `SessionStart` runs `boot` | `Stop` runs `close` | `SessionEnd` runs `close --final` | none | none | | Claude desktop app (Cowork) | plugin `tools/harold-plugin/` | `boot-harold` skill, and `SessionStart` | `Stop` | `SessionEnd` | install the plugin from the repository's marketplace | Where no Harold folder is connected the plugin's boot refuses, by design | | Codex | `.codex/hooks.json` | `SessionStart` | `Stop` | `SessionEnd` (detached) | type `/hooks`, review and trust once, and again after any edit to the file | none | | Grok Build desktop app (formerly Cursor) | `.cursor/hooks.json` (`"version": 1`) | `sessionStart` (answers `{"additional_context": ...}`) | `stop` | `sessionEnd` | none | `sessionStart` is fire-and-forget and its timing is not guaranteed, so the agent also relies on `AGENTS.md`'s first instruction to run `boot`. Its cloud agents run them too | | Antigravity (`agy` CLI and desktop app) | `.agents/hooks.json` (hook name `harold`) | `SessionStart` (answers `injectSteps`) | `Stop` | none (not needed: every turn already saves) | none documented for loading the file; run `/hooks` in the CLI to confirm it loaded | Antigravity reads `AGENTS.md` natively. Hooks are documented for the CLI, the desktop app and the IDE, but only the CLI is confirmed to fire them; if `SessionStart` does not fire, the agent relies on `AGENTS.md`'s first instruction to run `boot`. `.agents/` also holds goose's plugin folder; both stay | | Qwen Code | `.qwen/settings.json` | `SessionStart` | `Stop` | `SessionEnd` | approve the exact configuration, or trust the folder (the file also makes Qwen read `AGENTS.md`) | none | | GitHub Copilot CLI | `.github/hooks/harold.json` (`"version": 1`) | `sessionStart` | `agentStop` | `sessionEnd` (detached) | none | none | | Grok Build terminal app (reads `AGENTS.md` natively) | `.grok/hooks/harold.json` | `SessionStart` | `Stop` | `SessionEnd` (detached) | `/hooks-trust`, or start with `--trust` | Whether `SessionStart` output reaches the model is not documented: it relies on `AGENTS.md`'s first instruction to run `boot` | | Kimi Code CLI | `tools/harnesses/kimi-config.toml` | `SessionStart` | `Stop` | `SessionEnd` (detached) | copy the three `[[hooks]]` blocks into `~/.kimi-code/config.toml` | `SessionStart` output is not shown to the model: it relies on `AGENTS.md`'s first instruction to run `boot` | | goose | `.agents/plugins/harold/` | `SessionStart` | `Stop` | `SessionEnd` | none | `SessionStart` output is not shown to the model: it relies on `AGENTS.md`'s first instruction to run `boot` | | Hermes Agent | `tools/harnesses/hermes-config.yaml` | first `pre_llm_call` | `pre_verify` and `on_session_end` | `on_session_finalize` (detached) | merge the `hooks:` block into `~/.hermes/config.yaml`, then approve each hook once, or start with `--accept-hooks`, set `HERMES_ACCEPT_HOOKS=1`, or set `hooks_auto_accept: true` | none | | Amp | `.amp/plugins/harold.ts` | first `agent.start` of a thread | `agent.end` | the plugin stops | run `plugins: reload` after adding or changing it | Amp has plugins only, no shell hooks | | OpenClaw | `tools/harnesses/openclaw/` | first `before_prompt_build` | `before_agent_finalize` and `agent_end` | `session_end` (detached) | install the plugin, and set `plugins.entries.harold.hooks.allowConversationAccess: true` (see `tools/harnesses/openclaw/README.md`) | none | | Any other harness | `AGENTS.md` alone | the agent runs `bin/harold boot` first | the agent runs `bin/harold close` last | `bin/harold close --final` | none | No hooks at all: nothing forces it, the agent follows `AGENTS.md` | Setup runs the one-time step for each harness you use. The same table is in `playbooks/core/harness-wiring.md` in your copy, a shorter one is in the starter's `README.md`, and the three setups kept outside the hidden folders (OpenClaw, Hermes Agent and Kimi Code) are in `tools/harnesses/README.md`. Harnesses wired by a file in the repository need only the one-time step shown; none needs another harness's wiring. ## Harnesses Set Up by Hand Kimi Code and Hermes Agent read user-level configuration, and OpenClaw needs a plugin install, so their setups live in `tools/harnesses/` and are installed once by hand: copy the three `[[hooks]]` blocks of `kimi-config.toml` into `~/.kimi-code/config.toml`; merge the `hooks:` block of `hermes-config.yaml` into `~/.hermes/config.yaml` and approve each hook once; install the `openclaw/` folder as an OpenClaw plugin and allow its conversation hooks (see its README). Each command first checks that it is inside a Harold workspace and otherwise does nothing. The repository root also carries a plugin marketplace (`.claude-plugin/marketplace.json`, marketplace `harold`, plugin `harold`) for the Claude desktop app and claude.ai: add the repository as a marketplace and install `harold` from the plugin settings. In Claude Code, `/plugin marketplace add /` then `/plugin install harold@harold`. The plugin carries Harold's skills (`boot-harold`, `analyst`, `compile`, `debrief`, `done`, `intake`, `morning-brief`, `push`, `status`), each a thin trigger that routes to its playbook. Claude Code also runs the same hooks from `.claude/settings.json`; when both fire, only one does the work. ## Harnesses Where a Hook Cannot Reach the Model Where a hook's output does not reach the model, or is not documented to, the hook only registers the session, and the agent runs `bin/harold boot` itself as its first action, as `AGENTS.md` instructs. That run prints the context for the same session, and until it has run, close warns that the context is not loaded. In the table above this is the Grok Build desktop app (formerly Cursor; its `sessionStart` timing is not guaranteed), the Grok Build terminal app (whether its start output reaches the model is not documented), Kimi Code and goose (their start hooks do not show output to the model), and Antigravity if its `SessionStart` hook does not fire (only the CLI is confirmed to fire hooks). Amp has plugins only, no shell hooks. Where no Harold folder is connected, the Claude desktop app plugin's boot refuses, by design. Grok Build also reads `.cursor/hooks.json` and `.claude/settings.json` hooks as well as `.grok/hooks/*.json`; Harold's step-aside check keeps borrowed hooks from running twice. **Assistant apps without hooks** (chat apps and bots that cannot run lifecycle hooks) have nothing that starts or closes Harold for them. They rely on the first instruction in `AGENTS.md` alone: they are asked to run `bin/harold boot` first and `bin/harold close` last, and nothing forces it. ## Wiring a Harness Not Listed Run the same commands from the workspace root with no `--via` flag (add `< /dev/null` if the hook passes input). Boot exits 0 with the context to load, or 2 with `HAROLD BOOT REFUSED`. Close never blocks: it prints anything missing as a warning list and exits 0, or 1 when the push failed. The `--via=` flag picks the answer format for a hook; the formats it knows are claude, codex, cursor (the Grok Build desktop app, formerly Cursor), antigravity, qwen, copilot, grok, kimi, goose, hermes, amp and openclaw. --- # Records URL: https://harold.works/docs/#core-systems/records Records are plain Markdown in the repository. Every record follows the format for its type in `playbooks/record-formats/`, so a person or an agent can read any record at a glance. Each template there is the skeleton to copy, followed by a block saying what each section holds, how long it runs and how it is updated. | Record | Lives in | Template | |---|---|---| | Project page | `projects//.md`, or `projects///.md` when it has a parent organisation, named after the project (the map entry's `card:`) | `project.md` | | Person | `people/.md` | `person.md` | | Company | `companies/.md` | `company.md` | | Task (a blocker is a task too) | `tasks/.md` | `task.md` | | Meeting | `/meetings/YYYY-MM-DD-.md` (`research/meetings/` when it belongs to no project) | `meeting.md` | | Intel | `research/.md` | `intel.md` | | Daily note | `daily/YYYY-MM-DD-.md` | `daily.md` | ## Rules for Every Record 1. **One record per thing.** Search first. If the record exists, update it; never start a second note beside it. 2. **Update in place.** Rewrite the section so it states what is true now, instead of appending "Update:" paragraphs. A fact appears once, in the section whose job it is. 3. **Current sections are replaced; history sections are merged.** Sections like Current Status are rewritten whole. Timeline and History get one line per event, newest first, and the oldest lines are condensed and archived word for word under `archive/` when they pass their length budget. Nothing is deleted without being archived or recorded in the daily note. 4. **Finished prose.** Plain, complete sentences, never pasted dictation or tool output. 5. **Stay within budget.** Each format gives section lengths; longer detail lives in a linked file. 6. **Frontmatter is the index.** Fill every field the template has, set `last_updated` on every edit, and let `project:` name a project from `office/projects.md` or `global`. 7. **What changed goes in the daily note,** not in the record. The record shows the result. 8. **No decision records.** Your direction is written into the record it belongs to, usually the project page, as part of its story. ## What Each Record Holds - **Project page:** a title paragraph, links, Goal, Current Status (where it stands, just finished, running, waiting on you, next step, detail, paused work), Details, People and Links, and History. Its frontmatter names the project's `manager:` session. The page's Current Status is replaced whole at each update. - **Person card:** identity line, Who They Are, Where Things Stand (replaced after each interaction), Timeline and Related. Frontmatter carries type, company, warmth, `last_contact`, `next_followup` and projects. There is no separate CRM database: the cards are the contact records. - **Company card:** an opening paragraph, Facts (each with its source and date), Where Things Stand, People, Timeline and Related. - **Meeting note:** Summary, Action Items (each with its task reference), Key Points and Related. Never a pasted transcript: it links its source. - **Intel note:** Summary, Detail, What It Means for Us, Sources and Related. It is marked durable or timely, and timely notes carry an expiry date. - **Daily note:** the one record that is a log: what was done, contacts touched, files changed and what comes next. `bin/harold close` requires one whenever knowledge changed. ## The Project Map `office/projects.md` is the registry of every project Harold routes work into. Boot loads it and `bin/harold where ` queries it. Each project is one `## ` heading with `- key: value` bullets: `folder`, `status` (only `archived` or `autonomous`), `type` (organisation, workstream or tool), `aliases`, `keywords`, `routes`, `people`, `card`, `notes`. Aliases are how you actually refer to a project out loud; when you use a name that is not there, Harold adds it. A project is **active** when its page names a manager or it has activity within `HAROLD_PULSE_DAYS` days (default 14), and quiet otherwise; `bin/harold pulse` works it out and quiet projects are never nagged. Ending an engagement means setting `status: archived`. The starter ships one placeholder, `Example Project`, to show the format. --- # Tasks URL: https://harold.works/docs/#core-systems/task-management A task is a card: one Markdown file in `tasks/`, named after a short readable title, with a reference such as `H-86` in its frontmatter. The frontmatter is the whole record: title, project, due date, urgency, status (`open`, `in progress`, `done` or `cancelled`), the people it concerns, the note it came from, `blocked_by` and `completed`. The body is one to three plain sentences. ## Working with Tasks You speak and Harold updates the cards in the same turn. "Done", "finished" and "shipped" mean done; "started" and "working on" mean in progress; "blocked", "waiting on" and "paused" mean a note on the task plus a Blocker task; a new task is created under its most specific project (or `global`); a changed priority or due date updates the field. Harold confirms in a few words. Meetings are never tasks, because they live on your calendar; prep or follow-up work that comes out of a meeting can be. ```bash bin/harold task list [--project ] [--all] [--json] bin/harold task create "" [--project <name>] [--due YYYY-MM-DD] [--priority high|medium|low] [--contact <name>] [--blocked-by H-n] [--desc "<text>"] bin/harold task start|done|cancel|reopen <ref> bin/harold task update <ref> [--title <t>] [--due YYYY-MM-DD|none] [--priority <p>] [--project <name>|none] [--blocked-by H-n|none] [--desc <text>] bin/harold task conflicts ``` ## Your Own Task Manager If you already use a task manager, it stays your only task list. Setup records it as `HAROLD_TASKS` in `office/settings` (for example `"Asana"`); the default `"harold"` means task cards as described above. Agents then create, update and read tasks in your tool through your harness's own connector for it, Harold makes no task cards, and meeting notes and records link to the tool's tasks. Nothing is synced between the two, so there is never a duplicate. Boot prints one line saying where tasks live, and `bin/harold task create` warns if someone tries to make a card anyway. ## Blockers Are Tasks Something a task is waiting on is a task card titled "Blocker: waiting on <who or what> for <task>", under the same project, with what is stuck and why in its body. The held-up task names it in `blocked_by`. When the Blocker is done or cancelled, `blocked_by` is cleared on the tasks it held up. A Blocker open more than 7 days is chased by the Chief of Staff's check-in; past 14 days it goes to you with a recommendation. ## Notes Become Tasks Every action item in a meeting note carries a task reference, and `bin/harold close` flags one that does not. An idea that is not a commitment is marked "(no task: an idea, not a commitment)". A follow-up on someone else's promise is also a task. ## Alerts Alerts are worked out from the cards each time, never saved: `bin/harold alerts`. Boot prints the counts and the top three: tasks due within 2 days, open desk questions, follow-ups past their date and Blocker tasks over 7 days. `bin/harold cold` lists people who have gone cold: a person with a warmth (Hot, Warm, Lukewarm or Cold) whose `last_contact` is older than their warmth allows (14, 30, 60 or 90 days by default; `HAROLD_COLD_DAYS_HOT`, `_WARM`, `_LUKEWARM` and `HAROLD_COLD_DAYS` change them). People with no warmth are not tracked. --- # Playbooks URL: https://harold.works/docs/#core-systems/playbooks Playbooks are plain Markdown files in `playbooks/` that say exactly how Harold runs a recurring workflow. `playbooks/README.md` is the one list of them and what fires each. You never type a command: Harold reads what you say and runs the playbook that fits, with its full chain (the intake, the card update, the task, the downstream playbook and the analyst sweep). Harold refines a trigger whenever it fires wrongly or fails to fire. ## Layout - `playbooks/core/`: portable procedures that name no employer or client. - `playbooks/engagements/<name>/`: optional, employer- or client-specific playbooks you write yourself. Ending an engagement means setting its project to `status: archived`; its playbooks stay and stop firing. - `playbooks/record-formats/`: the one format for each record type (not playbooks). The index is machine-read: `bin/harold boot` reads every playbook body and refuses to start if one cannot be read. It warns when a playbook on disk is missing from the table and refuses when the table lists one that is not on disk. ## Always On These run on every message you send, in the same turn: | What Harold detects | Action | |---|---| | Before any output | `core/pre-flight-verification.md`: names, dates, context, filing | | A new name with business context, or any interaction with a contact | `core/contacts.md` | | A new project that `bin/harold where` cannot resolve | `core/project-intake.md` | | A task signal | Update the task cards at once | | New intel | `core/analyst.md`: apply it across the knowledge base | | Research from 3+ sources | File it in `research/` or on the project page | | A file dropped or source material pasted | Save it with its project, then process it the same turn (`core/compile.md`) | | You step away | Build one useful, non-disruptive improvement and offer to keep, modify or revert it | ## The Playbooks | Playbook | What it does | |---|---| | `core/analyst.md` | Cross-reference new intel against the whole knowledge base and apply it to every file it touches | | `core/chief-of-staff.md` | Run the Chief of Staff, project manager and worker layer in any harness | | `core/compile.md` | Turn saved sources into structured knowledge, or re-synthesize one topic | | `core/contacts.md` | File every new or changed contact, and every interaction with one, on the person and company cards | | `core/desks.md` | Questions, answers and notes between you and each manager | | `core/document-qc.md` | Fact-check a final document before it leaves, and fix the knowledge base where it was wrong | | `core/email-triage.md` | Turn significant email into decisions, commitments and relationship context, without copying the inbox | | `core/event-prep.md` | Prepare for events, capture on the day, debrief afterwards | | `core/harness-wiring.md` | The rules behind boot and close, and which file wires each tool | | `core/knowledge-base-health.md` | A clean-up audit on the 1st and 15th of the month | | `core/meeting-debrief.md` | Capture a meeting's outcomes into the cards, notes and tasks | | `core/morning-brief.md` | Start the day in three guided steps | | `core/pre-flight-verification.md` | Catch wrong names, dates, facts and filing before any output reaches you | | `core/project-intake.md` | Give every new project a folder, a map entry and a project page | | `core/project-manager.md` | Run one project: its page, tasks, desk and workers | | `core/setup.md` | Walk a new operator through setup | | `core/ship-to-github.md` | Commit, push and verify at the end of a coding session without leaking secrets | | `core/status.md` | A concise summary worked out from the cards: active projects, flags, stale relationships, deadlines | ## Writing a Playbook When work recurs, or you have to explain a procedure, Harold improves the playbook it belongs to without asking. A new playbook is proposed to you first, with its name, what fires it and a few lines on what it would say, and written only on your yes; it is kept short and listed in `playbooks/README.md`. A playbook starts with `# Playbook: <Title>`, then `**Purpose:**` (one sentence; boot prints it) and `**Trigger:**`. Every step names the file it writes to, says what happens when data is missing, and the playbook ends with a completion checklist. A workflow earns a playbook after it has been done by hand three times. ## Time Triggers Timed work runs as scheduled tasks in your harness's own scheduler, cloud or local (or, as a fallback, the optional GitHub workflows); boot prints the alerts it acts on. An event under 10 days out with no prep, or a meeting in under 24 hours with no prep, fires `core/event-prep.md`; an event that has passed with no debrief prompts `core/meeting-debrief.md`; a Blocker open over 7 days goes to the Chief of Staff's check-in; the 1st and 15th of the month fire the clean-up audit; a start-of-day opener fires `core/morning-brief.md`. --- # Boot and Close URL: https://harold.works/docs/#core-systems/enforcement `bin/harold boot` and `bin/harold close` are the program's two jobs. They do not think; they check. The workspace root is what `bin/harold root` prints, and every read and write uses absolute paths under it. ## What Boot Does Boot, run from the workspace root, gets today's real date from the system (never inferred from context), verifies every core file and every playbook body is readable, loads the project map, alerts, open Blocker tasks and any scheduled work that is due, registers the session, and prints all of it. If it refuses (non-zero exit, or output starting `HAROLD BOOT REFUSED`), the agent stops and says so, because an unreadable playbook means the contract is not met. It never works from memory. Boot keeps its printout under `HAROLD_HOOK_BUDGET` (default 9,000 characters; normally about 6,000) so the whole of it reaches the model. Safety warnings print in full: `origin` looks like the public starter, a secret in `office/settings`, that file ignored by git. Upkeep warnings fold into one line pointing at `bin/harold check`, which lists them all. If the printout grows past the budget the lowest-priority sections give way to a one-line pointer; the date, the warnings, the scheduled work and the exit condition are never cut. `bin/harold boot --full` prints everything, and `bin/harold boot --project <name>` gives a project manager its project's view. Boot looks at most twice a day at whether the public starter has newer machinery (`git ls-remote`, nothing is changed). `HAROLD_UPDATE_CHECK="0"` turns that off. ## What Close Does At the end of every turn close runs (the Stop hook, or the agent). It first pulls from `origin`, so files written elsewhere during the turn are seen by the checks; offline, it says so and checks the local copy. It then verifies that: - changed knowledge was logged in today's `daily/` note; - touched contacts were filed; - every action item in a meeting note changed this session carries a task; - due scheduled work was recorded; - new work belongs to a project: a new `research/` note carries `project:` frontmatter naming a project in `office/projects.md` or `project: global`, and a new top-level folder has a project-map entry. It also lists the rule files (`AGENTS.md` and the playbooks) that changed since the session last saw them, so a long-running session re-reads the new text. Then it commits and pushes the repository. It never blocks: anything missing is printed as a warning list and the work is saved either way. Only a failed push exits non-zero. `bin/harold close --final` runs when the session ends. Close refuses to commit anything that looks like a credential. **Close never pushes to the public starter.** While `origin` is the public Harold starter (or a fork of it), close commits locally and prints `local only, NOT PUSHED: origin is the public Harold starter, and close never pushes there. Your work is committed here.` with the command to point `origin` at your own private repository (`git remote set-url origin <your private repo URL>`, then `git push -u origin HEAD`). It exits 0, because nothing failed. Harold's repository is your own and private. Boot and `bin/harold check` warn when `origin` still points at the public starter, and `bin/harold update` only ever pulls Harold's machinery from the starter, never your records. ## Where Hooks Do Not Run If boot's output is already in the agent's context, it ran and is not run again. In a harness without hooks, or where they did not fire, the agent runs `bin/harold boot` first and `bin/harold close` last. Each can run in its own shell: boot records the session in `office/logs/.last-boot` (gitignored), and a close with no session id uses that latest boot as its baseline. If boot cannot run at all, the agent does its checks by hand: get today's date with `date "+%Y-%m-%d %A"`; check what is due (`bin/harold brief status`, `bin/harold housekeeping status`, `bin/harold task list`, `bin/harold alerts`); and verify the core files are readable (`bin/harold check` does all of it). An evicted file in a synced folder returns a read error; the agent retries, and tells you which files could not be read. ## The Check `bin/harold check` is the contract test on its own: playbooks readable, the fix list, the project map, alerts, daily notes, the time zone, `origin`. It ends with `RESULT: PASS` or lists what to fix. `--json` prints it for a program. ## The Fix List `office/fixes.md` holds checks and changes that your corrections call for and that are not built yet. A correction never becomes a note: it changes a rule or becomes a check. Boot says so when open items have waited more than 7 days. --- # Managers and Workers URL: https://harold.works/docs/#core-systems/managers Harold can run a management layer in any harness, with all state kept in its records: a Chief of Staff, one project manager per project, and workers. This is how `AGENTS.md`, `playbooks/core/chief-of-staff.md`, `playbooks/core/project-manager.md` and `playbooks/core/desks.md` describe it. ## Roles - **You** decide and publish. You talk to the Chief of Staff, and may talk to any project manager directly. - **The Chief of Staff** manages and does no project work. It is your single point of contact, knows who is running, starts managers and watches usage. - **A project manager** owns one project's plan, page, workers and, where the project has a product, the product's repository. It is named `<Project> : PM`, and its project page names its session in the `manager:` field. - **A worker** does one piece of work for a manager, following a self-contained brief, reports a short result, files what it learned in the right record, and is archived. Its brief tells it to message its manager when it finishes or gets stuck. ## Rules - **The right model for every job.** Every helper, worker or session runs on the lightest model that can do its job well, named explicitly at launch with a one-line reason, never inherited. Managers plan, brief and check; building, editing, checking and research go to a lighter model; simple lookups go to the lightest. A worker runs on a heavier model only when its launch names the part the lighter one would do worse. - **Managers delegate.** They decide, plan and check; any job of more than a couple of steps goes to a worker. - **Managers start in Harold.** Every manager session is started in the Harold workspace itself, as its only folder or repository, so it runs on Harold's constitution, playbooks, hooks and settings. A product's repository is reached through workers started on it, or attached later when the work needs it. - **One conversation.** The Chief of Staff and each manager keep one long conversation, relying on the harness's own compaction; Harold's start-up reloads after one. Nothing is handed to a replacement session. - **Talk to you as a chief of staff would.** Short, plain English, holding only what got done, what needs you and why, and what you need to know: no file paths, code or machinery. - **State lives in Harold, not in any harness.** The picture is rebuilt from the harness's live session list, the project pages, `office/projects.md` and the daily notes. ## The Desk A desk is a view of the task cards, never a separate store. A manager posts a question for you as a task titled `[desk-question]` with why it is needed now, what it blocks, a recommendation and options; you answer in batches, and the answer is recorded on the card. You can also leave a `[desk-note]` for a manager: `decide` (your call), `standing` (an order from now on) or `thinking` (explore and report back; no decision is recorded). Managers read the desk after a gap of an hour or more and before asking anything new. ## Checking on Workers Workers sometimes stop without reporting. When a worker has been quiet for over an hour, its manager checks all its running workers with one session-list call, and opens a single worker only when that list shows it stuck or failed, because each check stays in the conversation and is re-read every turn. Scheduled reminders are not used for check-ins: scheduled tasks are only for regular routines. ## The Check-In At each check-in the Chief of Staff checks the managers independently: who is running, whether each is moving, whether the records match the work, which models and how much usage, and blockers older than 7 days. In a harness that cannot message other agents, the Chief of Staff playbook's fallback is a one-way note per manager at `office/inbox/<project>.md` (and `office/inbox/chief-of-staff.md` for a manager writing back), read at the same moments as the desk and cleared once handled. --- # Morning Brief URL: https://harold.works/docs/#daily-operations/morning-brief The morning brief starts the day in three guided steps (`playbooks/core/morning-brief.md`). It fires when you open the day ("good morning", "gm", "let's get started", "start the day"), never on its own, and a first message that is a project request is just that request. 1. **Intel, then the overnight question.** Orientation only, with no tasks yet. Harold reads yesterday's notes, covers what you have set up (weather, calendars, markets, news beats), and asks what came in overnight, because Harold cannot see most of your email and late messages. 2. **The brief and priorities.** It folds in what you said, proposes your top priorities from the cards and alerts, and asks you to confirm. 3. **Ready-to-run prompts** for the day's work. Calendars are read through a calendar connector available in the session. If none is available, the brief says so and carries on. ## A Draft Before You Start A scheduled job can write steps 1 and 2 to `office/briefs/YYYY-MM-DD.md` before you sit down. Boot prints "Today's morning brief draft" as ready, ready on `origin`, or none; when a draft exists, Harold shows it instead of re-running those steps and still asks the overnight question. Nothing writes a draft unless you switch a scheduler on. See [Scheduled Jobs](#reference/scheduled-jobs). `bin/harold brief status` shows where today's draft is and whether a brief is due. The gate is due only on a weekday in your own time zone (`HAROLD_TZ`) when today's file does not exist yet. --- # Meetings and Contacts URL: https://harold.works/docs/#daily-operations/meeting-debrief ## Meeting Debrief Tell Harold you finished a meeting, or hand it your notes, a transcript or a forwarded email (`playbooks/core/meeting-debrief.md`). Harold processes what you give it and asks follow-up questions only for the gaps. It files one meeting note (never a second note for the same meeting), logs the interaction on each contact's card, creates a task for every commitment and records its reference in the note, and then the analyst sweep applies what was learned across the knowledge base. ## Contacts When a name with business context appears, or you interact with someone (a meeting, call, email or message), Harold files it on the person and company cards after a duplicate check, creates any follow-up tasks, and runs the downstream playbook (`playbooks/core/contacts.md`). The cards are the contact records, with warmth, `last_contact` and `next_followup` in their frontmatter; there is no separate database. `bin/harold cold` lists the people who have gone cold. If you already use a CRM, set `HAROLD_CONTACTS` in `office/settings` (for example `"HubSpot"`). The CRM keeps contact details and deals, reached through your harness's connector; Harold's person and company cards keep the context (how you met, what was said, what matters) and link to the CRM record. You can import an exported contact list into cards once during setup. Nothing is synced, so contacts are never duplicated. ## Project Intake When you start working on a project that `bin/harold where` cannot resolve, Harold gives it a folder, a map entry, a project page and cross-links (`playbooks/core/project-intake.md`). You never announce a new project. ## The Analyst When new intel arrives (a brief, a meeting, news, a strategy session), `playbooks/core/analyst.md` cross-references it against the whole knowledge base and applies it to every file it touches, instead of just noting it. ## Status and Health Ask "status" and Harold summarizes the active projects with their next step, flags, stale relationships and deadlines from the cards (`playbooks/core/status.md`; it writes nothing). On the 1st and 15th of the month the clean-up audit (`playbooks/core/knowledge-base-health.md`) checks dates, names, links, orphans, task cards and record sizes, and reports. --- # Commands URL: https://harold.works/docs/#reference/commands You never type these; your agent runs them. Run `bin/harold help` for the list in your copy. | Command | What it does | |---|---| | `boot [--full] [--project <name>]` | Load and verify, register the session; refuses if the contract fails | | `check [--json]` | The contract test only | | `close [--final]` | Pull, verify filing, list changed rule files, commit and push (commit only while `origin` is the public starter). As a hook, `--via=<tool>` picks the answer format and `--detach` returns at once | | `file daily <slug> "<text>"` | Write to the day's note | | `file crm '<json>'` | Log an interaction, upsert or follow up a contact card, or a contact's task | | `task list\|create\|start\|done\|cancel\|reopen\|update\|conflicts` | Harold's task list: one card per task in `tasks/` | | `alerts` | Alerts worked out from the cards | | `cold [--json]` | People gone cold | | `where <topic>` | Resolve a topic to a folder through `office/projects.md` | | `search <query>` | SQLite full-text search over all Markdown, each hit with its top linked notes | | `related <note\|topic> [--depth 1\|2] [--limit N]` | Follow the links: neighbours, how they link, staleness, gaps | | `backlinks <note>` | Every note that links to it | | `pulse [--all] [--json]` | Active projects with last activity and next step; quiet ones on one line | | `brief start\|finish\|status\|notify` | The scheduled morning brief | | `housekeeping start [job]\|finish\|status` | The scheduled clean-up audit | | `update [--dry-run] [--from <git url or path>] [--ref <branch>]` | Bring Harold's own files up to the starter | | `heartbeats roll [--dry-run]` | Move old heartbeats into monthly files (close does this) | | `layout [--json]` | Where each home lives; exits 1 if a required one is missing | | `index [--full]` | Rebuild `tools/index/search.db` | | `root` | Print the workspace root | ## Settings Non-secret settings live in `office/settings`, which is committed so every machine, cloud session and scheduled job reads them with nothing to set up. Precedence: the environment, then `~/.harold/env`, then this file. Only `HAROLD_*` names are read there, and never one that looks like a credential. Credentials belong outside the repository, in `~/.harold/env`. | Setting | Meaning | |---|---| | `HAROLD_TZ` | Your IANA time zone, such as `America/Chicago`. Unset, Harold uses the zone of the machine that runs it | | `HAROLD_OPERATOR` | Your name, as Harold should address you (boot shows it in its header) | | `HAROLD_TASKS` | Where your tasks live: `harold` (task cards, the default) or the name of your own task manager, such as `Asana` | | `HAROLD_CONTACTS` | Where your contacts live: `harold` (person and company cards, the default) or the name of your own CRM, such as `HubSpot` | | `HAROLD_STALE_DAYS` | Days after which a maintained note counts as stale in related and search (default 30) | | `HAROLD_PULSE_DAYS` | Days after which an active project counts as quiet (default 14) | | `HAROLD_AGENTS_BUDGET` | Characters `AGENTS.md` may hold before check warns (default 36000) | | `HAROLD_UPDATE_CHECK` | `0` turns off boot's look at whether the starter has newer machinery | | `HAROLD_SHARED_HOMES` | Top-level folders that are shared homes, not projects | --- # Updating and Tests URL: https://harold.works/docs/#reference/updating ## Updating `bin/harold update --dry-run` shows what newer machinery the starter has; `bin/harold update` applies it, without touching your records or your edits. It brings only Harold's own files (the list is `tools/update-manifest.txt`: the program, the tests, the plugin and harness wiring, the playbooks and record formats, the job prompts) up to the starter named in `tools/upstream.json`. Your records are never touched, and your edits are never overwritten: a machinery file you edited gets the starter's copy written beside it as `<file>.upstream` for a session to merge, and when the starter's `AGENTS.md` changes, `AGENTS.md.upstream` is written the same way. To keep a path out of updates, list it in `skip` in `tools/upstream.json`. `--from` and `--ref` update from a different git URL, path or branch. `bin/harold update` only ever pulls from the starter, and `bin/harold close` never pushes to it, so nothing you write reaches the public starter. ## Tests The starter carries its own tests. Run `node --test tools/tests/*.test.js` and `python3 -m pytest tools/tests` from the repository root. --- # Scheduled Jobs URL: https://harold.works/docs/#reference/scheduled-jobs Nothing runs on a schedule unless you switch it on. Any recurring job (the morning brief, the twice-monthly upkeep, or anything you write) can be scheduled with your harness's own scheduler, in the cloud or on your computer; Claude Code, Codex, GitHub Copilot and Grok Build cloud agents, for example, run a prompt on a timer with your computer off. Point the schedule at the job's prompt file. As a fallback for a harness that cannot schedule in the cloud, the starter includes a GitHub-hosted job that runs any prompt on a timer with your computer off, using claude, codex, copilot, grok, kimi or qwen with a stored sign-in token or API key; it ships ready-made for the brief and the upkeep and runs any other prompt too (see Optional GitHub Workflows below). ## Morning Brief `tools/jobs/brief-prompt.md` is the job's prompt. It starts with `bin/harold brief start` (the gate: due only on a weekday in `HAROLD_TZ` when today's file does not exist; `--force` overrides), writes steps 1 and 2 of the morning brief, then runs `bin/harold brief finish`, which validates the file, commits only the brief paths and pushes. `bin/harold brief notify` supports a phone notice. ## Clean-Up Audit `tools/jobs/housekeeping-prompt.md` runs the audit on the 1st and 15th of the month, silently. It is off by default: `tools/jobs/housekeeping.json` has `"cloud": false`; set `"cloud": true` to hand it to a scheduler. The job never contacts anyone, never deletes anything (stale material moves to an archive), and leaves at most three one-line notes in `office/briefs/housekeeping-notes.md` for the next brief to show. `bin/harold housekeeping status` shows where it stands. ## Optional GitHub Workflows The fallback described above. `.github/workflows-optional/` holds `morning-brief.yml`, `brief-notify.yml`, `housekeeping.yml` and `scheduled-job.yml` (the blank form for any other prompt: edit its cron and `PROMPT_FILE`, and copy it once per job). GitHub never runs that folder. A workflow runs only once you copy it into `.github/workflows/` and commit; delete the copy to turn it off. Each file names its repository variables (`HAROLD_TZ`, `HAROLD_BRIEF_TIME`, `HAROLD_AGENT`) and secrets at the top. The morning-brief workflow wakes every hour and lets `bin/harold brief start` decide, so the brief lands at your own time in your own time zone (`HAROLD_TZ`, default 06:30 local) with no daylight-saving changes needed. `HAROLD_AGENT` picks the harness that runs the job (claude, codex, copilot, grok, kimi, qwen or custom), on your subscription where you have one.