Metadata-Version: 2.5
Name: keelhq
Version: 0.1.0a2
Summary: Keel: a solid base for agent-ready project workspaces (skeleton, MCP server, doctor).
Project-URL: Homepage, https://github.com/Eganathan/keel
Project-URL: Source, https://github.com/Eganathan/keel
Project-URL: Issues, https://github.com/Eganathan/keel/issues
Project-URL: Changelog, https://github.com/Eganathan/keel/blob/main/CHANGELOG.md
Author: Eganathan R
License: MIT License
        
        Copyright (c) 2026 Eganathan R
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: agents,changelog,claude-code,mcp,project-management,todo,workspace
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development
Requires-Python: >=3.11
Requires-Dist: jsonschema>=4.23
Requires-Dist: truststore>=0.9
Provides-Extra: mcp
Requires-Dist: mcp>=1.2; extra == 'mcp'
Description-Content-Type: text/markdown

# Keel

**A shared memory and rulebook for you and your AI agents.**

Keel keeps the todos, bugs, releases, docs and rules of all your projects in one hidden folder next to them. You use it from a web page or a terminal; your agent (Claude Code first, any MCP client works) uses the same data through tools. The agent starts every session already knowing what is in flight, follows the rules you set, and cannot do the risky things you have not allowed.

> **Status: alpha (0.1.0a2), on [PyPI](https://pypi.org/project/keelhq/).** It works and is tested, but it is an early alpha: data formats may still change between alphas (`keel upgrade` brings a workspace forward and backs it up first), and some features are missing (see [what is not there yet](#what-is-not-there-yet)). Good for trying on a real project; not yet for depending on.

## A look at it

The web page (`keel ui`) runs on your machine and shows the same data your agent works with. These screens use made-up data.

![The Keel home page: pinned quick links, projects and collections in the sidebar, and what is in flight across four projects](https://raw.githubusercontent.com/Eganathan/keel/main/site/src/img/home.png)

| Board | Connectors | Modes |
|---|---|---|
| ![A board of the backlog: open, in progress, testing and done](https://raw.githubusercontent.com/Eganathan/keel/main/site/src/img/board.png) | ![A verified Telegram bot and a guided setup for each kind of connector](https://raw.githubusercontent.com/Eganathan/keel/main/site/src/img/connectors.png) | ![Built-in ways of working for your agents: plan, review, audit and more](https://raw.githubusercontent.com/Eganathan/keel/main/site/src/img/modes.png) |

## Why

- **The agent starts from zero.** Every session it re-reads files to guess what is going on, or asks you to explain again. Keel gives it a short briefing instead: what is in flight, what is blocked, what waits on you, which docs went stale.
- **Work is scattered.** Todos in one place, bugs in another, notes in Markdown, release steps in your head. In Keel, you and the agent share one picture.
- **Nothing enforces how you work.** "Add a changelog entry before testing" is a rule an agent can skip. In Keel it is a workflow rule: the move is refused until it holds.

## The idea: a small harness around your agent

A *harness* is everything around a model that turns it into a dependable worker: what it remembers, which tools it may use, which rules it follows, what it must ask you first, and how its work is recorded. Keel is a small, open harness for project work. It is not an agent and it never calls a model: it is the place the agent reads from, writes to and is held to, and the same place you look at yourself.

```
 You ── web page / terminal ──┐
                              ▼
                      ┌───────────────┐        ┌──────────────────────┐
 Your agent ── MCP ──▶│   Keel core   │◀──────▶│  .keel/ (JSON files) │
 (Claude, Codex…)     │ rules, checks │        │  collections, items, │
        ▲             │ secret masking│        │  workflows, docs     │
        │             │ audit log     │        └──────────────────────┘
 session-start hook   └──────┬────────┘
 runs `keel briefing`        │ preview, then send
                             ▼
              Telegram · Cliq · email · PDF reports
```

The web page, the terminal and the agent all go through the same core, so the same rules, secret masking and audit log apply to all three.

## How it helps you

Keel is for a person who works on several projects with an AI agent and is tired of being the glue between them. It takes over the remembering and the enforcing, and leaves the deciding to you.

| Without Keel | With Keel |
|---|---|
| Every session you re-explain what is going on. | The agent opens with a briefing: what is in flight, what is blocked, what waits on you. |
| Half-done work is lost between sessions. | `start`, `note` and `done` leave notes the next session resumes from. |
| You remind the agent of your rules, again. | A rule refuses the move until it holds, for example a changelog entry before testing. |
| Two sessions edit the same thing. | A claim on the item refuses the second one, and names who holds it. |
| Docs rot without anyone noticing. | The briefing flags a doc when the code it watches has changed. |
| Context is lost when you switch projects. | One workspace for every project, filtered to the one you are in. |
| You worry what the agent might delete or leak. | No delete tool, secrets only as references, a preview before anything is sent. |
| You cannot tell what the agent actually did. | Every write is logged with who did it, and `git diff .keel` shows the change. |

## What you get

- **A workspace of small files.** One JSON file per item in a hidden `.keel/` folder, checked against published JSON Schemas. Review it like code, commit it, merge it. Todos, root-cause analyses, releases, a changelog, docs, links, projects, or any collection you define.
- **Workflows with rules.** A collection can have states and allowed moves. A move can require a field, a related changelog row, or a passing verification at the current commit. A refused move says which rule failed and which moves are allowed.
- **Projects are folders.** Point Keel at a `projects/` folder (`keel projects --root projects`): its subfolders are suggested, you choose which to track, or switch on `--auto` and a new folder is a project the moment it exists. Filters, the briefing and the agent all use the same list.
- **A briefing that stays small.** Per project: what is in flight, what is open, what waits on you, who holds a claim, how far a branch is ahead. It fits a token budget, and a "changed since last session" mode shows only the difference. After an upgrade it tells you once what is new.
- **Setup an agent can drive.** One checklist (`keel setup`, the `setup_status` tool) feeds the agent, the terminal and the web page. In `ask` mode the agent puts each decision to you; in `auto` mode you said "just do it", so it applies the defaults and reports. Even from an empty folder the agent can preview and create the workspace.
- **A web page** (`keel ui`): a projects sidebar that filters everything, lists you can search, sort and bulk-move, a board with drag and drop, notes, Markdown docs, import, reports, connectors and the setup checklist. It runs on your own machine only.
- **Work you can hand over.** `start`, `note` and `done` leave notes the next session resumes from; claims keep two agents off the same item; verification records what passed at which commit. Only a person ever runs an item's own command.
- **Safety built in.** Agents cannot delete, never see secrets (fields hold references such as `env:NAME`), send messages only after you see a preview, and write only inside `.keel/`. Every write is logged with who did it.
- **Friendly to harnesses.** 36 MCP tools in three tiers (read, write, outbound), `dry_run` on writes, error codes with the fix as data, the guide as an MCP resource, and a `keel-start` prompt.
- **Reports and messages.** PDF reports from Markdown and messages to Telegram, Cliq or email, with nothing for you to script.
- **Quick links.** Pin the places your work lives (stores, internal docs, tools) in the sidebar, one click away; the agent's briefing names them so it knows where things are.
- **A doctor** (`keel doctor`) that checks every file and warns about stale docs, untracked projects, merged-but-open branches and out-of-date agent files.

## Requirements

| You need | Why |
|---|---|
| Python 3.11 or newer, and [uv](https://docs.astral.sh/uv/getting-started/installation/) | to install and run Keel |
| A web browser | for the web page |
| `git` | project status and "docs gone stale" checks (optional) |
| Claude Code, or another agent that supports MCP | to let an agent use Keel (optional) |
| Chrome, Chromium, Edge or Brave | to make PDF reports (optional) |

## Install

```sh
uv tool install --prerelease allow "keelhq[mcp]"
keel --version
```

`--prerelease allow` is needed while Keel is an alpha (with pip: `pip install --pre "keelhq[mcp]"`). To try it without installing: `uvx --prerelease allow --from "keelhq[mcp]" keel --version`.

To update later, run the install command again with `--force`, then run `keel upgrade` in your project: it backs up your workspace, migrates its data if the format changed, refreshes the agent files Keel wrote (never the ones you edited) and runs the doctor.

## Quick start

**Let your agent set it up.** In the folder that holds your projects:

```sh
keel init-agent --write mcp
```

Start Claude Code there and say *"set up Keel here"*. It shows you what it would create (the collections, the project folders it found) and creates the workspace only when you agree, then asks which folders to track. Tell it to "just do it" and it decides and reports, never moving your folders.

**Or from a terminal:**

```sh
cd ~/work
keel init --preset command-center
keel projects --root projects            # folders under projects/ are suggested
keel projects --track android ios        # you choose which ones Keel tracks
keel init-agent --write all              # skills, AGENTS.md block
keel init-agent --write hooks            # session-start briefing (Claude Code)
keel init-agent --write mcp              # register the MCP server
keel ui                                  # the web page
```

Then start your agent in the same folder and ask: *"What is open in this project?"* The first time, it offers to read each project and write short docs (structure, architecture, conventions, commands). After that, every session starts with a briefing, and docs refresh when the code they describe changes.

If the web page says it needs its session link, open the exact link `keel ui` printed; a bare address is refused.

## A typical day

You keep three projects in one folder:

```
work/                  <- run your agent here
  .keel/               <- todos, bugs, docs and settings for all three (hidden)
  projects/
    android/           <- its own git repository
    blog/
    api/
```

1. **Morning.** You start Claude Code in `work/`. The session-start hook has already loaded the briefing: two todos in progress on `android`, one stale doc on `api`, `blog` has uncommitted changes.
2. **You say:** *"Pick up the login retry bug."* The agent finds it, claims it, moves it to *in progress* and does the work, leaving notes as it goes.
3. **A rule applies.** When it tries to move the todo to *testing*, Keel refuses: *"add a changelog entry for this todo first."* The agent adds the entry, then moves it.
4. **Docs stay true.** The code changed, so the next briefing says the `android` architecture doc is stale. The agent reads the git history, updates the doc and marks it verified.
5. **Friday.** You say: *"Make a weekly status PDF and send it to the team channel."* It renders the PDF, shows you a preview of the message, and sends it only after you agree.

## Using it effectively

- **Run the agent in the folder that holds `.keel`.** That is what lets it see all your projects at once.
- **Install the session-start hook** (`keel init-agent --write hooks`). Without it an agent has to remember to look; with it every session begins informed.
- **Give items a short title and a description someone could read cold.** Agents and teammates both rely on it.
- **Let the rules do the nagging.** Turn on the "changelog before testing" rule instead of reminding people.
- **Keep secrets as references.** Store `env:STAGING_PASSWORD`, never the password. Keel never writes a value to disk.
- **Run the doctor** (`keel doctor`) after bulk edits or imports.
- **Use `--read-only`** when you register the MCP server for an agent that should only look.
- **Bring in what you have:** `keel import checklist backlog.md --collection todos` turns a checklist into todos (a dry run until you add `--apply`).
- **Commit `.keel/`.** It is meant to be reviewed like code, in your repository or in a private repository of its own (see [where `.keel` lives](https://github.com/Eganathan/keel/blob/main/docs/guide.md#where-keel-lives-and-keeping-it-private)). Its `local/` folder (audit log, your personal connector settings, PDFs) is git-ignored. Git is also your undo: `git diff .keel` shows what changed.

## Commands at a glance

| | |
|---|---|
| `keel ui` | open the web page |
| `keel setup [--mode ask\|auto]` | what is left to set up, and how agents treat each decision |
| `keel projects [--root DIR] [--track IDS] [--ignore A,B] [--auto]` | choose which folders are projects |
| `keel briefing` | what is in flight, per project |
| `keel list todos` / `show` / `search words` / `history` | read |
| `keel add` / `update` / `move todos fix-login testing` | write, with the same checks as the agent |
| `keel start` / `note` / `done` / `claim` / `release` | work you can hand over |
| `keel verify` / `mark-verified` | verification, and "this doc is current" |
| `keel init --preset command-center` | Backlog, Now (work by stage), a changelog with statuses, RCAs, releases, projects and docs (`--dod` adds the changelog-before-testing rule) |
| `keel doctor [--deep] [--fix] [--undo]` | check every file; `--deep` also runs probes; `--fix` makes the safe repairs, `--undo` reverses them |
| `keel init-agent --write all\|hooks\|mcp` | teach an agent how to use Keel |
| `keel upgrade` / `update-agent` / `whats-new` | upgrade smoothly, refresh agent files, see what changed |
| `keel connect telegram\|cliq\|email`, `keel connectors check`, `keel send`, `keel report` | messages and PDF reports; check that a connector works |
| `keel secrets` | every secret the workspace refers to, and whether it is set (never the value) |
| `keel feedback search\|add` | report a problem or an idea (shows a dry run first) |
| `keel mcp [--read-only]` | the MCP server |

Everything, with options and examples, is in the [full guide](https://github.com/Eganathan/keel/blob/main/docs/guide.md).

## Stack

| Part | What it is |
|---|---|
| Core | Python 3.11+, standard library plus `jsonschema` and `truststore` |
| Storage | One small JSON file per item, in `.keel/`, checked against JSON Schemas in [`spec/`](https://github.com/Eganathan/keel/tree/main/spec) |
| Web page | Python's built-in HTTP server and plain JavaScript, no framework and no build step |
| Agent access | An MCP server (the official `mcp` SDK, optional install) |
| PDF reports | Your own Chromium-based browser, run headless |
| Messages | Telegram Bot API, Cliq webhooks, SMTP, over HTTPS using your operating system's certificates |
| Checks | `ruff`, `mypy` (strict), `pytest`, a secret scan, a browser check, GitHub Actions |

## What is not there yet

- **Inbound messages** (replying in Telegram to drive a session), plugins, and sprints with carry-over.
- **Editing a collection's fields from the web page** (creating one works).
- **A session-start hook for agents other than Claude Code.** Others are told to call the briefing first, which is less reliable.
- **A hosted, multi-user version** with a full audit trail. Keel is local first.
- **It is an alpha.** Data formats (`schema_version` 0) may change between alphas. Keel is MIT licensed (see [`LICENSE`](https://github.com/Eganathan/keel/blob/main/LICENSE)); changes are listed in the [changelog](https://github.com/Eganathan/keel/blob/main/CHANGELOG.md).

## Learn more

- [**The guide**](https://github.com/Eganathan/keel/blob/main/docs/guide.md): setup in ten minutes, many projects from one place, onboarding, messages and reports, importing, your own categories, what an agent can and cannot do, every command.
- [**The specification**](https://github.com/Eganathan/keel/blob/main/spec/README.md): Keel is written spec first. The JSON Schemas in [`spec/schemas/`](https://github.com/Eganathan/keel/tree/main/spec/schemas) define every document in a workspace, and the 36 tool definitions in [`spec/mcp/`](https://github.com/Eganathan/keel/tree/main/spec/mcp) are the files the MCP server registers its tools from. Contract tests check that code, examples and specs agree.
- [Design, including parts not built yet](https://github.com/Eganathan/keel/blob/main/docs/design.md)
- The [`site/`](https://github.com/Eganathan/keel/tree/main/site) folder builds the project's landing page, with the guide and a searchable tool catalogue.
- [Contributing](https://github.com/Eganathan/keel/blob/main/CONTRIBUTING.md) and [security](https://github.com/Eganathan/keel/blob/main/SECURITY.md)
- Found a problem or have an idea? `keel feedback add`, or [open an issue](https://github.com/Eganathan/keel/issues).

## Develop

```sh
uv sync
uv run ruff check . && uv run ruff format --check .
uv run mypy
uv run pytest
bash scripts/check_secrets.sh
```

Read [`AGENTS.md`](https://github.com/Eganathan/keel/blob/main/AGENTS.md) first: the specification changes together with its example and its contract test. After a change to the web page, also run the browser check (see [`CONTRIBUTING.md`](https://github.com/Eganathan/keel/blob/main/CONTRIBUTING.md)).
