poly-orchestrator
Skill23 starsChanged 47 days agoMITView on GitHub
Use poly as the single lint/format gate instead of invoking ruff/oxlint/rustfmt directly — one poly.toml, poly hooks install, poly migrate, CI via the polylint/polylint setup Action
In this repository5 other files it gives its agents.
- llms.txtllms.txt
- poly-lint-and-formatSkill
- poly-mcpSkill
- poly-overviewSkill
- poly-tiers-and-scopeSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is 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.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
Treat poly as the single lint and format gate for the repository.
- Distinctive: line 65
Components: Only the Linux musl release binary is bundled (every engine linked in).
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill 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
<!--
AI-RULEZ :: GENERATED FILE — DO NOT EDIT
Content-Hash: blake3:e1f83103977707b9d506be3043c135df006cbf39ae29e0f9115cbca003608633
Source-Hash: blake3:e29edb63f2181285397efb084a4e54e55082381ef957914b76eb12f9e897c4f4
Schema-Version: v1
-->poly as the Orchestrator
Treat poly as the single lint and format gate for the repository. Do not invoke ruff,
oxlint, taplo, rumdl, or the rest directly — poly runs them as engines (linked in, or downloaded
as signed components), uses host tools such as rustfmt and gofmt when installed, and covers
everything else via the tree-sitter generic tier, the quality metric tier, and its built-in
ast-grep rule pack, behind one binary, one config, and one report.
Adopt it
- One
poly.toml. Configure every language and rule in a single per-repo file (poly.local.tomlfor local overrides,extendsto share a base). Layering is tool default → poly's opinionated overrides → yourpoly.toml. In a monorepo a nestedpoly.tomldeep-merges on top of its ancestors for the files beneath it. poly migrate— absorb existing tool configs intopoly.tomlinstead of hand-writing it. It imports ruff, typos, taplo, and markdownlint configs, and turns a lefthook or pre-commit config into[hooks],[hooks.builtin]and[tools]entries; there is no eslint or prettier importer (an existing.oxlintrc.json/.oxfmtrc.jsonis read directly, so it needs none). The default is a dry-run report — pass--writeto apply (--allow-dirtyon a dirty tree),--recursefor a monorepo,--verifyto re-run poly afterwards, and--strip-supersededto also removepyproject.tomlsections for tools ruff replaces. It deletes a source only when nothing in it was lost.--to-v2rewrites an existing v1poly.toml([lint.<lang>.<tool>],[rules],per-file-ignores, …) into the v2 schema ([engines.<id>],[workspace] run,per_file_ignores), keeping comments.poly hooks install— wire the git-hook shims sopolyruns the configured stages on every commit, replacing a.pre-commit-config.yamlor lefthook setup. It installs the hook types yourpoly.tomlconfigures;--hook-typepicks specific ones. A foreign hook already there is kept as<hook>.legacyand run before poly; a lefthook hook is kept but not run (--replace-lefthookdiscards it), and--overwritediscards any preserved hook.poly hooks uninstallrestores what was there before;poly hooks run [stage]runs a stage by hand (--all-filesfor the whole tree,-vto show passing jobs' output).poly trust— a clonedpoly.tomlcannot run programs until the repository is trusted. Until then poly ignores[tools.<name>]binpaths,url/sha256,env,argsand the*_extra_argskeys, whole-project[hooks]jobs (poly lintreports that phase asskipped (untrusted)),[cache] dirand localextendsbases outside the repository, and prints one note naming them;poly hooks runand the git hooks refuse to run.poly trust --showlists the gated keys,poly trustrecords them, and changing one untrusts the repository again.poly hooks installrecords trust itself.poly mcphonours only recorded trust.- External tools — enable any catalog tool with
[tools.<name>] enabled = true(golangci-lint,actionlint,hadolint,helm,tflint,buf, …). Pinversionand setinstall = "auto"to have poly download a checksum-verified release when it is missing; by default it never downloads anything. poly config showprints the effective merged config;poly lock [--upgrade] [--check]pins symbolic remoteextendsrefs and Git hook sources intopoly.lock(every run re-resolves a hook source's declaredrevision, so a moved tag is followed;--upgradealso movesextendsrefs andlatesttools);poly config schemaprints the JSON Schema forpoly.toml. An unknown key in an engine table is anunknown-config-keywarning that suggests the nearest valid key (--verboselists every key the table reads).- Components. Only the Linux musl release binary is bundled (every engine linked in). Every
other release binary is a core build that downloads engines as signed components on first use
(
poly rulesinstalls theastgrepcomponent the same way):poly components list|status|sync|install, and--offline/POLY_OFFLINE=1forbids downloads. A needed component that cannot be installed is exit2, or a counted skip underon_missing = "skip".[components]inpoly.tomlsetsinstallandon_missing;[engines.typos] enabled = trueopts into spell-checking. poly doctorreports which poly is running, every poly on PATH, and the config in effect — the first thing to run when two machines disagree.
CI
polylint/polylint@v0 is a setup action: it installs the poly binary (with optional
caching) and puts it on PATH. It does not run poly for you — invoke the commands yourself
in following steps.
- uses: actions/checkout@v4
- uses: polylint/polylint@v0 # inputs: version (latest, or from-config), config-file, components, cache, github-token
- run: poly fmt .
- run: poly lint --deny-skips .--deny-skips makes a file poly could not check an exit-2 failure, so CI cannot pass while
covering nothing.
A CI checkout is untrusted, so a repository whose poly.toml sets gated keys ([hooks] jobs,
[tools.<name>] arguments, env or bin paths) needs POLY_TRUST=1 in the job's environment,
or --trust on each command; without it those keys are ignored and the whole-project phase is
skipped. Neither writes a trust record.
Engines and components are pinned to the poly version, so local, hook, and CI runs agree —
with one caveat: rustfmt and gofmt (and shellcheck for lint) are host tools used
automatically whenever they are on PATH, and output then depends on that tool's version. A
machine without them falls through to the lower-fidelity tree-sitter tier, and the report says so
per tool (a summary line, and degraded in JSON) without failing the run. Pin
those toolchains in CI (and expect drift otherwise), or set [engines.rustfmt] enabled = false /
[engines.gofmt] enabled = false to stop the subprocess. That does not leave the language
unformatted: native-toolchain backends read enabled themselves and hand the file to the
tier-2 reindenter when disabled — so the file is still formatted, just at lower fidelity.
Shell is different. It is formatted by the sh component, not a host tool, and
[engines.shfmt] enabled = false leaves shell unformatted; it does not fall back to the
tree-sitter reindenter.
Does 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.

