Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ runs them:
- repository paths named in backticks in a tracked `.md`, and files under
`app/` or `docs/` named in a fenced command;
- the `docs/` folder map in `docs/README.md`;
- AGENTS.md's repository map against `app/web` and `app/nullius`, both ways (a
module it leaves out, a name it gives that does not exist);
- the importer registry against the README table and AGENTS' `importers/` entry.
- AGENTS.md "Where code lives" against the packages of `app/nullius`, both ways;
- the importer registry against the README table.

A path is only checked when its first segment is a top-level entry of the
repository, so a path under a wrong top-level directory passes silently.
Expand All @@ -30,7 +29,7 @@ or name the merge commit and diff its first parent.

## Procedure

1. **Run the check first.** `python3 .claude/skills/docs-drift/scripts/check_docs.py`,
1. **Run the check first.** `python3 .agents/skills/docs-drift/scripts/check_docs.py`,
on a bare `python3`.
Fix every finding before reading anything. Remove
obsolete references unless the user explicitly asks to keep them. An
Expand All @@ -46,28 +45,25 @@ or name the merge commit and diff its first parent.

| changed under | read these, asking "does this paragraph still describe the code?" |
| --- | --- |
| `pyproject.toml`, `app/nullius/cli.py`, `app/nullius/__main__.py`, `app/nullius/paths.py`, `app/nullius/migrate.py` | README Quickstart; `docs/getting-started.md` installation and migration; `docs/cli/README.md`; `docs/settings/README.md` storage and precedence; AGENTS installation and dependency rules; preserve source commands as well as installed commands |
| `pyproject.toml`, `app/nullius/cli.py`, `app/nullius/__main__.py`, `app/nullius/paths.py`, `app/nullius/migrate.py` | README Quickstart; `docs/getting-started.md` installation and migration; `docs/cli/README.md`; `docs/settings/README.md` storage and precedence; AGENTS "Three rules, each with a test"; preserve source commands as well as installed commands |
| `app/nullius/catalogue/storage.py`, `app/nullius/standard/contract/definitions.py`, `app/nullius/standard/runner/payload.py` | `docs/standard.md`, `docs/builder.md`, `docs/how-it-works.md`; all import skills and manual-add guides: user overlays versus bundled contributions, whole-folder selection, and runtime snapshots sent to hosts; generated Supported pages use explicit bundled roots |
| `app/nullius/runs/` | README "How to read a result"; `.claude/rules/running.md` "Interpreting results" and its runs-list paragraph (for `launches.py`); `docs/field-guide.md`, what each field it names means; `docs/how-it-works.md` "What you get back, page by page"; `docs/cli/` when a CLI changed |
| `app/nullius/traces/` | `.claude/rules/traces.md`; README "How to read a result" |
| `app/nullius/importers/` | README "Supported harnesses" (the table and the notes under it) and "Local by design"; `.claude/rules/running.md`, the import paragraph; `docs/cli/import.md`; the AGENTS map's `importers/` entry — the gate checks the registry's labels, you check the sentences |
| `app/nullius/compare/` | `.claude/rules/running.md`, the comparison paragraph; `docs/cli/read-jobs.md`; `docs/field-guide.md`; `docs/how-it-works.md`, the `/compare` row |
| `app/nullius/catalogue/`, `app/nullius/recipes/`, `app/nullius/harbor/` | README "Ways to run" and its sections from "Bring anything" to "Read it"; `docs/builder.md` "Recipe stages" and "Agents and Capabilities tabs"; `.claude/rules/running.md`, what the repository runs and installs; for `harbor/`, the `source.py` docstring and `docs/builder.md` "Which Harbor"; for `catalogue/`, `.claude/skills/import-benchmark/SKILL.md` (a Harbor entry, the listing rule) too; for `providers.py`, the provider rows of `docs/builder.md` "Which providers" |
| `app/nullius/execution.py`, `app/nullius/hosts.py`, `app/nullius/settings.py` | `.claude/rules/running.md`, the run-from-Review paragraph and the settings list with its count of things a person sets; README "What it does"; `docs/builder.md` "Run"; `docs/settings/README.md`; `docs/how-it-works.md`, Paths 2 to 4 |
| `app/nullius/runs/` | README "Reading a result"; `.claude/rules/running.md` "Reading a result"; `docs/field-guide.md`, what each field it names means; `docs/how-it-works.md` "Page by page"; `docs/cli/` when a CLI changed |
| `app/nullius/traces/` | `.claude/rules/traces.md`; README "Reading a result" |
| `app/nullius/importers/` | README "Ways to run" and "Local by design"; `.claude/rules/running.md` "Running the app"; `docs/cli/import.md` |
| `app/nullius/compare/` | `docs/cli/read-jobs.md`; `docs/field-guide.md`; `docs/how-it-works.md`, the `/compare` row |
| `app/nullius/catalogue/`, `app/nullius/recipes/`, `app/nullius/harbor/` | README "What it does" and "Ways to run"; `docs/builder.md` "Stages"; `.claude/rules/running.md` "What this repository runs"; for `harbor/`, the `source.py` docstring and `docs/builder.md` "Which Harbor"; for `catalogue/`, `.agents/skills/import-benchmark/SKILL.md` (a Harbor entry, the listing rule) too; for `providers.py`, the provider rows of `docs/builder.md` "Which providers" |
| `app/nullius/execution.py`, `app/nullius/hosts.py`, `app/nullius/settings.py` | `.claude/rules/running.md` "What this repository runs"; README "What it does"; `docs/builder.md` "Run"; `docs/settings/README.md`; `docs/how-it-works.md`, Paths 2 and 3 |
| `app/nullius/judge/`, `app/web/judge.py`, `app/web/judge_tasks.py`, `app/web/reconcile.py` | `docs/judgement.md`; README "What it does" |
| `app/nullius/workspace.py`, `app/nullius/workspace_cli.py` | `.claude/rules/running.md`, the workspace paragraph; `docs/how-it-works.md` "What the workspace keeps"; `docs/cli/read-jobs.md` |
| `app/nullius/redact.py` | `.claude/rules/running.md` (log lines are redacted); `.claude/rules/traces.md` (the artifact reader) |
| `app/web/`, `app/templates/`, `app/static/` | the AGENTS map's `app/web/` entry — the gate checks the module names, you check what it says each does; README "What it does", for the page that changed; `docs/how-it-works.md` "What you get back, page by page"; `.claude/rules/traces.md` for the trial page's strips; `app/tests/field_contract.json` when a template reads a different field (refreshed with `python3 app/tests/field_contract.py --write`) |
| `app/nullius/workspace.py`, `app/nullius/workspace_cli.py` | `.claude/rules/running.md` "Running the app"; `docs/how-it-works.md` "What the workspace keeps"; `docs/cli/read-jobs.md` |
| `app/nullius/redact.py` | `.claude/rules/running.md` (logs are redacted) |
| `app/web/`, `app/templates/`, `app/static/` | README "What it does", for the page that changed; `docs/how-it-works.md` "Page by page"; `.claude/rules/traces.md` for the trial page's strips; `app/tests/field_contract.json` when a template reads a different field (refreshed with `python3 app/tests/field_contract.py --write`) |
| `app/tests/`, `app/ui_tests/` | a *new module* is named in AGENTS Commands only if it is run differently |
| `.github/workflows/`, `app/requirements.txt` | AGENTS Commands (the PR judge) and Core Architecture (the discovery paths); README "Quickstart" and "Documentation"; `.claude/rules/running.md` "Running the app" |
| `.github/workflows/`, `app/requirements.txt` | AGENTS "Commands"; README "Quickstart" and "Documentation"; `.claude/rules/running.md` "Running the app" |
| `docs/` | `docs/README.md` — the gate checks its folders, you check the one-line descriptions; `docs/cli/` against each command's `--help` |
| `.claude/` | AGENTS.md, which is the map: every rule and skill is named there |
| `.agents/`, `.claude/` | AGENTS.md "Read first" |
| a document itself (`README.md`, `AGENTS.md`, `docs/field-guide.md`, a rule, a topic page) | the changed paragraphs against the code they describe, and every other document in this table that says the same thing |
| anything that closes or opens an issue | the issue's body and Development link; the README or rule sentence that cites it by number |

A changed path with no row is itself a finding: say which document should
describe it.

When the change removes or renames something - a route, a page, a module,
a function, a flag - also `git grep` the old names across the whole tree.
What still names them is drift no row routes: a docstring or a comment, a
Expand All @@ -79,10 +75,9 @@ or name the merge commit and diff its first parent.

3. **Then the surfaces everyone forgets**, whatever the scope:
- README.md "Quickstart" and "Documentation";
- AGENTS.md "What This Repo Is", "Core Architecture" and "More Detail";
- `.claude/rules/running.md` — its commands still run as written
(`nullius …`, `uv run …`, the `PYTHONPATH=app python3 -m nullius.…` forms, `--no-debug`);
- `docs/how-it-works.md` "The pieces" — the backend list beside the AGENTS map;
- AGENTS.md "Where code lives", "Commands" and "Read first";
- `.claude/rules/running.md` — its commands still run as written;
- `docs/how-it-works.md` "The pieces" — the backend list;
- `docs/cli/pages.md` — the covered rows still run, and a command that
gained a flag has it in the table.

Expand All @@ -106,5 +101,4 @@ or name the merge commit and diff its first parent.
## What this is not

Not a rewrite pass: leave prose that is still true alone, even when it could
be shorter. Not the place to add a document — if a change has no home in the
table, the missing row is the finding.
be shorter. Not the place to add a document.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
silently when files move — links that no longer resolve, paths named in prose
that no longer exist — and nothing that needs judgement.

python3 .claude/skills/docs-drift/scripts/check_docs.py
python3 .agents/skills/docs-drift/scripts/check_docs.py

Prints every finding and exits 1 if there are any.
"""
Expand Down Expand Up @@ -131,43 +131,27 @@ def check_md_links() -> list[str]:
return bad


def _map_bullet(text: str, root: str) -> str:
"""The AGENTS.md repository-map bullet that starts with `root` - up to the next bullet."""
m = re.search(r"^- `" + re.escape(root) + r"`.*?(?=^- `|^#|\Z)", text, re.M | re.S)
return m.group(0) if m else ""


def check_map() -> list[str]:
"""AGENTS.md's repository map names every module of app/web and
app/nullius and names no module that does not exist."""
"""AGENTS.md's "Where code lives" names every folder of modules directly under
app/nullius and its standard/, and none that does not exist. A module is
described by its docstring."""
agents = REPO / "AGENTS.md"
if not agents.exists():
return []
text = agents.read_text(encoding="utf-8")
bad = []
for root in ("app/web/", "app/nullius/"):
bullet = _map_bullet(text, root)
if not bullet:
bad.append(f"AGENTS.md: no map bullet for `{root}`")
continue
named = set(re.findall(r"`([\w/]+?)/?`", bullet))
modules = sorted(p for p in (REPO / root).rglob("*.py") if p.name != "__init__.py" and "__pycache__" not in p.parts)
for mod in modules:
rel = mod.relative_to(REPO / root)
bare, dotted = rel.stem, str(rel.with_suffix("")).replace("\\", "/")
if not ({bare, dotted, rel.parent.name + "/" + bare} & named):
bad.append(f"AGENTS.md: the `{root}` map does not name `{dotted}`")
for name in sorted(named):
if name.rstrip("/") == root.rstrip("/"):
continue
if "/" in name and not (REPO / root / name).exists() and not (REPO / root / (name + ".py")).exists():
bad.append(f"AGENTS.md: the `{root}` map names `{name}`, which does not exist under {root}")
return bad
part = re.search(r"^## Where code lives$.*?(?=^## |\Z)", agents.read_text(encoding="utf-8"), re.M | re.S)
if not part:
return ["AGENTS.md: no \"Where code lives\""]
root = REPO / "app/nullius"
folders = {p.name for top in (root, root / "standard") for p in top.iterdir() if p.is_dir() and any(p.rglob("*.py"))}
entries = {p.name for p in (root / "catalogue").iterdir() if p.is_dir()}
named = set(re.findall(r"`(?:app/nullius/)?([\w-]+)/`", part.group(0)))
return ([f"AGENTS.md: \"Where code lives\" does not name `{name}/`" for name in sorted(folders - named)]
+ [f"AGENTS.md: \"Where code lives\" names `{name}/`, which is not under app/nullius/"
for name in sorted(named - folders - entries) if not (REPO / name).is_dir()])


def check_importers() -> list[str]:
"""The importers the README's ways-in table and the AGENTS.md map name are
the registry's, no more and no fewer."""
"""The README's ways-in table names every importer of the registry."""
# The registry is read in a subprocess so this process's import path stays
# what it was: the test suite runs these checks over copies of the tree.
proc = subprocess.run([sys.executable, "-c", "import json, sys; from nullius import importers as r; "
Expand All @@ -186,15 +170,6 @@ def check_importers() -> list[str]:
for label in sorted(labels):
if label not in rows:
bad.append(f"README.md: the ways-in table does not name the {label} importer")
agents = (REPO / "AGENTS.md").read_text(encoding="utf-8") if (REPO / "AGENTS.md").exists() else ""
bullet = _map_bullet(agents, "app/nullius/")
listed = re.search(r"`importers/` \(([^)]*)\)", bullet)
if not listed:
bad.append("AGENTS.md: the map does not list `importers/` with its readers")
else:
for label in sorted(labels):
if label not in listed.group(1):
bad.append(f"AGENTS.md: `importers/` does not name {label}")
return bad


Expand Down
63 changes: 63 additions & 0 deletions .agents/skills/file-issue/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
name: file-issue
description: File a GitHub issue or open a pull request here with gh, short and in the shape the forms and the PR judge expect, then read it back. Use whenever asked to file, open, record or report an issue or a bug, or to open a PR, or when a defect is found in passing and should be recorded rather than fixed.
---

# File an issue, open a pull request

**Short.** What was wrong, then what changed. One fact per line; fragments are
fine. Quotes and numbers. No background, file tour, hedging or restated diff.

- Under 150 words, 250 for a large feature, not counting images, quoted output
and Acceptance.
- Drop facts, not words. Full words, real names: a stranger must be able to act on
it. A fact nobody acts on goes.

| No | Yes |
| --- | --- |
| Currently, when a user types a partial model name, the search may fail to return the expected results. | `Qwen 32b` lists nothing. OpenRouter has two. |
| Comprehensive tests were added and the change was verified thoroughly across browsers. | Route suite 690. Chromium, Firefox, WebKit. Not checked: macOS Safari. |

Never: a key, token, password, email address, personal message, private link,
host name, site address or machine attribution. A security problem goes to the
address in SECURITY.md, never to an issue.

## First

Search issues and pull requests, open and closed (`gh issue list --state all
--search`, `gh pr list --state all --search`), here and in the repository that
owns the cause (`--repo`). File a bug there once the user agrees, with a link from
here; while minor or unconfirmed, note it here instead.

## An issue

The body is the form's labels as `### Label`, in order; drop an empty one.
`.github/ISSUE_TEMPLATE/bug.yml` and `enhancement.yml` hold them, and their
placeholders are the example. Acceptance is `- [ ]` boxes, each checkable in the
diff.

gh issue create --title "<what is wrong, as a reader sees it>" \
--label <bug or enhancement> --label <P0 to P3> --body-file issue.md

- Priority: `P0` to `P3` as the form describes them, in the body and as the label.
Undecided: the lowest defensible, and say that it is a placeholder.
- `--assignee aitianshi` where that is the real owner, else nobody.
- Reuse labels. Set the native type (`Bug`, `Feature`) too; where `gh` lacks it,
the GraphQL mutation `updateIssue` takes `issueTypeId`.
- Keep the metadata true when scope, priority, owner or state changes.

## A pull request

The body is `.github/pull_request_template.md`; its comment is the example. The
title's types and scopes are in AGENTS.md. A visible change has an image pair per
place that changed, of one width, under `## Before and after`. Otherwise drop the
section, or write "Nothing visible changes." when templates or static files did.
`gh` cannot upload images: add them in the browser. "Not checked" is a valid line.

gh pr create --draft --title "fix(web): ..." --body-file pr.md

It stays a draft until the user says it is ready: CI runs then.

Read both back. With `Closes`, the issue lists the pull request in
`closedByPullRequestsReferences` (GraphQL), stacked ones too; a base is never
retargeted for it.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ on npm or PyPI, a Hugging Face page, a website) and a description. From the
link and the agent's own docs, find, in this order:

1. **Already here?** `cli list` reads bundled and user entries together. An
agent already in the catalogue gets a version, not a second folder (step 5).
agent already in the catalogue gets a version, not a second folder (step 5):
**Official**, a tag, branch or commit of its official source, or
**Experiment**, another source or someone's fixes. Say which when reporting.
With no entry yet, strongly recommend an official version first.
2. **ACP.** Does the agent speak ACP itself (an `acp` subcommand or flag)?
Else is there a maintained adapter - the vendor's own, then one the ACP
project lists? Note its package, latest release and date, and whether it
Expand Down Expand Up @@ -208,7 +211,7 @@ run only if your instructions already say yes.
`python3 app/tests/catalogue_docs.py --write`, run `python3 app/tests/parallel.py`,
the route suite (`uv run --no-project --with-requirements app/requirements.txt
python app/tests/parallel.py app/ui_tests`), and
`python3 .claude/skills/docs-drift/scripts/check_docs.py`. Use an isolated
`python3 .agents/skills/docs-drift/scripts/check_docs.py`. Use an isolated
profile with an empty user catalogue so personal overrides cannot mask the
contributed files. Personal imports finish with definition checks, authorized
proofs/trials and focused UI checks; report any unavailable prerequisites.
Expand Down
Loading