Agent Skills › langwatch/langwatch › ownership

ownership

GitHub

用于确定代码变更或数据表所属模块,防止跨模块编辑。通过查阅 README 和目录文件识别所有者,指导调用 API 或申请新操作,维护模块边界与依赖规范。

.claude/skills/ownership/SKILL.md langwatch/langwatch

Trigger Scenarios

询问谁拥有某个表、路由或主题 判断变更应归属哪个模块 尝试跨模块编辑时确认权限 查询模块间的依赖关系

Install

npx skills add langwatch/langwatch --skill ownership -g -y
More Options

Non-standard path

npx skills add https://github.com/langwatch/langwatch/tree/main/.claude/skills/ownership -g -y

Use without installing

npx skills use langwatch/langwatch@ownership

指定 Agent (Claude Code)

npx skills add langwatch/langwatch --skill ownership -a claude-code -g -y

安装 repo 全部 skill

npx skills add langwatch/langwatch --all -g -y

预览 repo 内 skill

npx skills add langwatch/langwatch --list

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 owns" table
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 " line

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

  1. The thing is owned by the module you are in. Edit it there.
  2. It is owned by another module. Do not edit that module's tables, repositories or files from here. Call its *Api token: add the peer to static dependencies and call the operation listed under "Module API". Load module-dependencies for how a peer is declared. Exception, a declared share (§7): the owner may declare a table shared for reading by named modules, in SHARED_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.
  3. 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).
  4. 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

  • readmes skill: maintaining the generator and the pages.
  • module-dependencies skill: peers, static dependencies and cycles.
  • repo-tree skill: where a new thing goes when no module owns it yet.

Version History

  • c0c14dc Current 2026-10-19 19:34

Same Skill Collection

.claude/skills/analyticssim/SKILL.md
.claude/skills/browser-pair/SKILL.md
.claude/skills/browser-test/SKILL.md
.claude/skills/chakra-ui-builder/SKILL.md
.claude/skills/chakra-ui-refactor/SKILL.md
.claude/skills/code-review/SKILL.md
.claude/skills/code-search/SKILL.md
.claude/skills/feature-map/SKILL.md
.claude/skills/githubsim/SKILL.md
.claude/skills/haven-auth/SKILL.md
.claude/skills/haven-db/SKILL.md
.claude/skills/haven-orb/SKILL.md
.claude/skills/haven-play/SKILL.md
.claude/skills/haven-seed/SKILL.md
.claude/skills/haven-setup/SKILL.md
.claude/skills/idpsim/SKILL.md
.claude/skills/lambdasim/SKILL.md
.claude/skills/langwatch-kanban/SKILL.md
.claude/skills/llmsim/SKILL.md
.claude/skills/mailsim/SKILL.md
.claude/skills/module/SKILL.md
.claude/skills/outboundsim/SKILL.md
.claude/skills/repo-tree/SKILL.md
.claude/skills/storagesim/SKILL.md
.claude/skills/voicesim/SKILL.md
plugins/langwatch/skills/langwatch/SKILL.md
services/langy-agent/skills/github/SKILL.md
skills/_compiled/native/agent-best-practices/SKILL.md
skills/_compiled/native/agent-performance/SKILL.md
skills/_compiled/native/automations/SKILL.md
skills/_compiled/native/code-changes/SKILL.md
skills/_compiled/native/context-sweet-spot/SKILL.md
skills/_compiled/native/daily-insights/SKILL.md
skills/_compiled/native/dashboard-widgets/SKILL.md
skills/_compiled/native/datasets/SKILL.md
skills/_compiled/native/debug-instrumentation/SKILL.md
skills/_compiled/native/debug-with-langwatch/SKILL.md
skills/_compiled/native/drive-the-ui/SKILL.md
skills/_compiled/native/eval-triage/SKILL.md
skills/_compiled/native/evaluate-multimodal/SKILL.md
skills/_compiled/native/evaluations/SKILL.md
skills/_compiled/native/experiments/SKILL.md
skills/_compiled/native/find-traces/SKILL.md
skills/_compiled/native/generate-rag-dataset/SKILL.md
skills/_compiled/native/github/SKILL.md
skills/_compiled/native/guided-onboarding/SKILL.md
skills/_compiled/native/level-up/SKILL.md
skills/_compiled/native/lwql-charts/SKILL.md
skills/_compiled/native/online-evaluations/SKILL.md

Metadata

Files
0
Version
c0c14dc
Hash
206c45e1
Indexed
2026-10-19 19:34

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-19 23:15
浙ICP备14020137号-1