ownership
GitHub用于确定代码变更或数据表所属模块,防止跨模块编辑。通过查阅 README 和目录文件识别所有者,指导调用 API 或申请新操作,维护模块边界与依赖规范。
Trigger Scenarios
Install
npx skills add langwatch/langwatch --skill ownership -g -y
SKILL.md
Frontmatter
{
"name": "ownership",
"description": "Where a change belongs in LangWatch: find the owning module of a subject, table or route from the generated READMEs (modules\/README.md and each module page), refuse an edit that reaches into another module, and name the *Api operation to call or the new operation to ask for. Use before any edit that touches two modules, and when someone says 'whose is this', 'who owns this table', 'which module owns', 'where does this change belong', 'can I edit this from here', 'reach into', or 'cross-module'.",
"user-invocable": true
}
Ownership: whose is this?
Every subject has one owning module (dev/docs/ARCHITECTURE.md §3; the map is
modules/catalogue.json). The generated READMEs put the answer on one page, next to the code
(plan: dev/docs/plans/module-readmes-2026-10-06.md). Read them before the code.
Find the owner
| You hold | Read |
|---|---|
| A subject or feature name | modules/README.md (Subjects column); Enterprise ones in enterprise/modules/README.md |
| A Postgres or ClickHouse table | the "Owns tables" column of the same index, then the module page's "What |
| A route, tRPC procedure or worker | the owner's process/README.md: REST transport, tRPC transport, Sockets, Workers |
| An operation another module calls | the owner's process/README.md, "Module API": every operation, its signature and the token |
| Who calls a module | the module page's "Who depends on |
A table listed as "Postgres, accessed not claimed" may have no owner yet, or the page may be stale.
Check modules/catalogue.json, the owner's repository claim and the share policies before you
conclude. Do not claim a table in passing: the claim is its own change, and the pages show the gap
so it gets one.
Decide
- The thing is owned by the module you are in. Edit it there.
- It is owned by another module. Do not edit that module's tables, repositories or files from
here. Call its
*Apitoken: add the peer tostatic dependenciesand call the operation listed under "Module API". Loadmodule-dependenciesfor how a peer is declared. Exception, a declared share (§7): the owner may declare a table shared for reading by named modules, inSHARED_PRISMA_TABLES(packages/architecture-enforcer/src/policies/persistence/prisma-table-ownership.ts) or the ClickHouse table-ownership policy. A named reader then reads it directly and the policy admits no write beyond a ruled one. Check the policy for your module's name; an undeclared read is a defect, not a share, and a reader need not become an owner. - The owner has no operation that does it. An operation that moves an existing handler over
unchanged may be added (§8). One that adds behaviour or a new shape is asked for: name it (its
name, input and result) and stop until it is ruled (
architecture-review, check A). - The change needs a new peer edge. Read your page's "Peers" table and the target's "Who
depends on" line first. If the target already depends on you, the edge closes a cycle; load
module-dependencies(peer cycles, §5).
Worked example: an automation posts to Slack
The pages as of 2026-10-07; read the live ones, not this example.
The automation needs a bot token. modules/README.md maps the slack subject to
modules/slack. Its page owns SlackIntegration and lists automation under "Who depends on
slack". Its process/README.md lists getUsableSlackConnection under "Module API
(SlackApi)". So the automation calls SlackApi.getUsableSlackConnection; it never reads
SlackIntegration or decrypts the token itself.
Traps
| Trap | Do instead |
|---|---|
| Guessing the owner from imports or folder names | read the index; modules/catalogue.json is the source the pages print |
| Editing the generated block to fix a wrong owner | fix the code or the catalogue, then run pnpm generate:readmes |
| Reading a peer's Prisma model because it is in the schema | through that module's *Api, unless the owner declares your module a reader in the share policy |
Trusting a ≈ value on a page |
≈ marks a value the generator could not read; check the code it cites |
Links
readmesskill: maintaining the generator and the pages.module-dependenciesskill: peers, static dependencies and cycles.repo-treeskill: where a new thing goes when no module owns it yet.
Version History
- c0c14dc Current 2026-10-19 19:34


