domain-experts
AGENTS.md29 starsChanged 5 months agoMITView on GitHub
This repo turns human job roles into agent-loadable skill files. If you're an AI agent working in this checkout, this is your map. The package domain-experts on npm ships the CLI and the role library — npm users are frozen at the last publish, so release after every meaningful role batch or CLI change:
- Commits and pushes
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 33,398 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository3 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- docs/llms.txtllms.txt
- domain-expert-routerSkill
The file
We split this AGENTS.md into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 19
Never hand-edit the auto-generated blocks in ROADMAP.md or README.md (between START/END markers) or data/roles.json.
- Distinctive: line 20
Don't invent numbers in role content.
- Very specific: line 22
Commit messages: role: add <name> / role: improve <name> — <what> / role: upgrade <name> to spec 2 for role work.
- Very specific: line 33
Keep README truthful: human commands are npx domain-experts ….
- Very specific: line 44
Don't wrap multi-line ASCII code blocks in <div align="center"> — it centers each line independently and skews the art.
≈ “Common” is an estimate: at least 1 in 5 of the 43,423 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent guide for this repo
This repo turns human job roles into agent-loadable skill files. If you're an AI agent working in this checkout, this is your map.
What lives where
roles/<slug>/SKILL.md— one role's reasoning core;roles/<slug>/references/— its deep-dive playbooks, red flags, vocabulary.AUTHORING.md— the canonical quality spec and LLM drafting pipeline. Read it before writing or editing any role. TEMPLATE.md is only the skeleton.scripts/lint_roles.py— mechanical checks;scripts/generate_roadmap.py— regenerates ROADMAP.md, the README role-count block, anddata/roles.json.bin/cli.js— thedomain-expertsCLI (list/search/match/preview/add/init/update/command). Non-confidentmatchqueries append todata/gap-log.jsonl— frequency-ranked into ROADMAP.md's "Requested but missing" section bygenerate_roadmap.py.scripts/suggest_role_requests.py— opensrole-request-labeled issues for uncovered O*NET occupations (skips "All Other" catch-alls and codes with an open issue already); run weekly by.github/workflows/role-requests.yml.skills/domain-expert-router/— meta-skill that dispatches "act as X" requests to a role..claude/workflows/generate-role.js(/generate-role "<need>") — resolves a free-text need to an existing role, a new specialization leaf, or a new parent role, then runs AUTHORING.md's Pass 0-4 pipeline and opens a PR..claude/workflows/audit-roles.js(/audit-roles [batchSize]) — batched re-score of shipped roles against the rubric and source currency; stampslast_audited/audit_score, flagsstatus: needs-refresh, deprecates on a second consecutive failure..claude/workflows/scan-project.js(/scan-project <path>) — read-only scan of an external project, proposes candidate needs, hands user-picked ones to/generate-role(never writes into the scanned project or logs its contents). All three are human-PR-gated — none commits tomainor publishes.
Rules
- New roles must be
spec: 2per AUTHORING.md — SKILL.md + references/ trio, worked example with reconciling numbers, no idea stated twice. CI rejects legacy-format additions. - Order of operations when adding/renaming a role: write files →
git add roles/<slug>→python3 scripts/lint_roles.py <slug>until clean →python3 scripts/generate_roadmap.py→ commit everything together. The roadmap script counts only git-tracked roles; running it beforegit addskips your new role. - Never hand-edit the auto-generated blocks in ROADMAP.md or README.md (between START/END markers) or
data/roles.json. - Don't invent numbers in role content. Specific thresholds trace to a named source or are labeled as stated heuristics.
- Regulated roles (law, medicine, financial advice, tax, safety) carry the disclaimer blockquote — see
roles/lawyer-contracts/SKILL.md. - Commit messages:
role: add <name>/role: improve <name> — <what>/role: upgrade <name> to spec 2for role work; plain imperative for infra. - Legacy (spec-1) roles are tracked in ROADMAP.md's auto-generated "Spec-2 upgrade queue". Upgrading one = CONTRIBUTING.md's "Exact recipe for upgrading a legacy role to spec 2" — restructure + references/ trio (incl. vocabulary.md), never a lossy rewrite.
- Optional lifecycle frontmatter (
parent,status,last_audited,audit_score) is written by the/generate-roleand/audit-rolesworkflows, not hand-authored.status: deprecatedroles live inroles/_deprecated/<slug>/, excluded from active counts but never deleted.
Release (npm)
The package domain-experts on npm ships the CLI and the role library — npm users are frozen at the last publish, so release after every meaningful role batch or CLI change:
- Bump
versionin package.json (semver: role batches = minor, fixes = patch) and commit it. git tag v<version> && git push origin v<version>— pushing the tag triggers.github/workflows/publish.yml, which publishes to npm automatically via npm's OIDC trusted publishing (noNPM_TOKEN, no 2FA prompt). The workflow fails closed if the tag doesn't matchpackage.json's version, and runsnpm pack --dry-runfirst so a bad tarball never ships.- Watch the Actions run for the publish job;
npm view domain-experts versionshould match within a minute or two of it going green. - Keep README truthful: human commands are
npx domain-experts …; commands inside the agent copy-paste prompt usenpx --yes …(agents hang on npx's interactive confirm without it).
One-time setup (maintainer only, done once via the npmjs.com dashboard): on the domain-experts package's Settings → Publishing access, add a Trusted Publisher — provider GitHub Actions, repo wonsukchoi/domain-experts, workflow file publish.yml, no environment. Until this is configured, tag-push publishes will fail with an auth error — fall back to manual npm publish (2FA) for that release.
The installed CLI also self-nudges: every command (except --json output and help) checks the npm registry at most once per day and prints a one-line "vX.Y.Z available" notice to stderr if the installed version is behind. Silent no-op if offline — see checkForUpdate() in bin/cli.js.
Known pitfalls
- A parallel drafting session may be committing to
mainat any time —git pull --rebase --autostashbefore pushing; expect occasional races. generate_roadmap.pycounts only git-tracked roles. Run it aftergit add, or your role is missing from the counts and CI fails.- Branch protection requires the
lintcheck on PRs; admin direct pushes bypass it (the "Bypassed rule violations" notice is expected). - Don't wrap multi-line ASCII code blocks in
<div align="center">— it centers each line independently and skews the art.
Verify before you're done
python3 scripts/lint_roles.py # 0 errors required
python3 scripts/generate_roadmap.py # then confirm git diff is only your intended files
node bin/cli.js list >/dev/null # CLI still parses every roleDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

