First release on PyPI, as owners-yaml. The package was developed in the monorepo as posthog-owners and never published under that name.
Added
SPEC.mddefines theowners.yamlformat, version 1, with the resolution steps, a field merge table, a flow diagram, and a worked example.owners.schema.jsondescribes the file for editors.SPEC.mdsection 7 defines the resolver interface, andresolution.schema.jsondescribes its JSON response.conformance/holds language-neutral test cases for the resolution rules, which any implementation can run.publish-owners-yaml.ymlpublishes the package to PyPI when anowners-yaml-v*tag is pushed.- Root-only repo settings in
owners.yaml:github_org,producers,reserved_dirs,alias_files, andcodeowners. alias_filesdeclares the file names, besidesowners.yaml, that count as ownership files. It defaults to[product.yaml], so a root file that predates the setting keeps resolving as before; a declared list replaces the default, andalias_files: []turns alias files off.--repo-rooton every CLI command, and--orgonlintandcodeowners.- A tree that is not a git worktree is read from disk, so the CLI works on an export or a scratch copy.
owners_yaml.github.GitHubOrgvalidates team slugs and handles without any host tooling.- An
owners-yamlconsole script, souvx owners-yamlworks without--from. BatchOwnershipSource, a source that fetches a batch's ownership files together.OwnersResolver.map()calls itsread_allbefore it reads any file: first for the rootowners.yaml, then for the batch.- The top-level
owners_yamlpackage exports the full public API, so consumers do not import submodules. py.typed, so type checkers read the package's annotations.
Fixed
- Rule patterns support
[abc],[a-z]and[!abc]character classes, as SPEC section 3.5 now states.match_is_globalready counted[as a wildcard, so such a pattern passed lint, counted as a crosscutting glob, then matched nothing and let its paths fall through to an ancestor's owner.
Changed
- The GitHub organization is no longer hardcoded.
codeownersandlint --liveread it fromgithub_orgor--org, and fail with a clear message when neither is set. - Producer names are no longer hardcoded. A repo that declares
producersgets typo checks; a repo that does not accepts any name. - The reserved
products/**/mcp/**location moved from the code into PostHog's ownreserved_dirs..github/workflows/**stays built in. - The CODEOWNERS projection reads its Jest spelling rules from the
codeownerssettings instead of PostHog's layout. - Outside a git worktree and without
--repo-root, the CLI prints an error instead of a traceback. version: trueandversion: 1.0no longer count asversion: 1, so such a file counts as absent.product.yamlis no longer a PostHog convention baked into the code. It is the default value ofalias_files, which a root file can replace or empty.