add-concept
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAdd a concept to the graph
向概念图添加概念
Each node is one YAML file in
(called below). The format, kinds, relation types and writing style
are defined in . Read it before writing; this
skill is the procedure, not the format.
plugins/runpod/skills/runpod-usage/concepts/concepts/concepts/README.mdEvery file is public-facing. Everything in it must be safe to show a customer
and backed by a public source. The validator enforces this.
每个节点对应 目录下的一个YAML文件(下文简称 )。文件格式、节点类型、关系类型和写作风格均在 中定义。编写前请先阅读该文档;本技能仅说明操作流程,不涉及格式规范。
plugins/runpod/skills/runpod-usage/concepts/concepts/concepts/README.md所有文件均面向公众。文件中的所有内容都必须可安全向客户展示,并有公开来源支持。验证器会强制执行此要求。
1. Check it doesn't already exist
1. 检查概念是否已存在
Search ids, names and aliases before creating anything:
bash
grep -ril "<term>" plugins/runpod/skills/runpod-usage/concepts/
cd ontology/tools && pnpm build:sqlite && pnpm query concept "<term>" # resolves names and aliases
pnpm query search "<term>" # finds rules that mention it- If the idea is a fact about an existing concept, add a rule to that file instead of a new node.
- If it is a new field or state of an existing resource, add it to that file's or
fields.states - Create a new file only for a thing a customer or agent names on its own, or for a flow that spans concepts.
创建任何内容前,请先搜索id、名称和别名:
bash
grep -ril "<term>" plugins/runpod/skills/runpod-usage/concepts/
cd ontology/tools && pnpm build:sqlite && pnpm query concept "<term>" # resolves names and aliases
pnpm query search "<term>" # finds rules that mention it- 如果该内容是关于现有概念的一个事实,请在对应文件中添加一条规则,而非创建新节点。
- 如果是现有资源的新字段或状态,请将其添加到该文件的 或
fields中。states - 仅当内容是客户或Agent独立提及的事物,或是跨概念的流程时,才创建新文件。
2. Pick the kind
2. 选择节点类型
| If it is… | kind | Example |
|---|---|---|
| Something with its own id and CRUD in the API | | pod, template |
| Part of a resource with no CRUD of its own | | worker, container-disk |
| Read-only reference data | | gpu-type, data-center |
| Something you do with a resource | | pod-ssh-access |
| Runpod hardware a resource runs on | | machine |
| Charges or credit | | pod-billing |
| A cap or quota | | api-rate-limit |
| A Runpod SDK or CLI | | flash |
| Something Runpod references but doesn't own | | container-image |
| How something works, in order, across concepts | | pod-deployment |
Set for a kind-of parent ( is_a ). Set for the
whole it belongs to ( part_of ). Top-level
resources, catalogs, billing roots, tools and limits sit .
is_acpu-podpodpart_ofworkerserverless-endpointpart_of: runpod-platform| 若内容是… | 类型(kind) | 示例 |
|---|---|---|
| 在API中拥有独立id和CRUD的事物 | | pod、template |
| 资源的组成部分,自身无独立CRUD | | worker、container-disk |
| 只读参考数据 | | gpu-type、data-center |
| 可对资源执行的操作 | | pod-ssh-access |
| 资源运行所依赖的Runpod硬件 | | machine |
| 费用或额度 | | pod-billing |
| 上限或配额 | | api-rate-limit |
| Runpod SDK或CLI | | flash |
| Runpod引用但不拥有的事物 | | container-image |
| 跨概念的事物运作流程 | | pod-deployment |
为父类设置 关系(例如 is_a )。为所属的整体设置 关系(例如 part_of )。顶级资源、目录、计费根节点、工具和限制的 均设为 。
is_acpu-podpodpart_ofworkerserverless-endpointpart_ofrunpod-platform3. Find public sources first
3. 优先查找公开来源
Write only what a public source supports:
| Source | Where | Cite as |
|---|---|---|
| REST v2 spec | | |
| Public docs | the | |
| Skills in this repo | | |
| A read-only request you ran | the live API | |
If no public source supports a claim, leave it out. Don't cite internal
documents, internal ids or private repositories. Don't create billable
resources to verify a claim without asking first.
仅编写有公开来源支持的内容:
| 来源 | 位置 | 引用格式 |
|---|---|---|
| REST v2 规范 | | |
| 公开文档 | | |
| 本仓库中的Skill | | |
| 执行的只读请求 | 线上API | |
如果没有公开来源支持某项表述,请省略该内容。不得引用内部文档、内部id或私有仓库。未经许可,不得创建付费资源来验证表述。
4. Write the file
4. 编写文件
Copy the shape of a similar file ( for a resource, for
infrastructure, for a process) and fill in:
pod.yamlmachine.yamlpod-deployment.yaml- (kebab-case; the file is
id),<id>.yaml,name,kind(one or two customer-facing sentences),summary,product,is_a,part_of.aliases - : the REST v2 schema and paths, GraphQL names from the public reference, MCP tools,
surfacescommands, console page.runpodctl - and
fieldsif the concept has them. With a REST v2 schema, every field must exist on that schema or its create/update request.states - , from the closed set in
relations.concepts/README.md - : one fact per rule, with an id of
rules. Write one to three sentences an agent can act on. Point<concept-id>.<slug>at the fields, states or actions the rule constrains. Put related rules on other concepts inapplies_toinstead of restating them.see:
For a process, add in order. Each step has an , ,
, the it involves and the that govern it. Steps
link to rules that already exist on the concepts. Put only the facts that
belong to the flow as a whole on the process itself, such as
.
stepsidtitledescriptionconceptsrulespod-deployment.stock-is-not-your-machineStyle: plain present tense, code identifiers in backticks, "Runpod" spelled
correctly, and no words like "currently" or "not yet". The full list is in
under "Writing style".
concepts/README.mdDon't use comments: rewrites the file from its data and
refuses a file with a comment, since it would drop it. Put the context in a
on the evidence instead.
#pnpm formatnote参考同类文件的结构(资源类参考 ,基础设施类参考 ,流程类参考 ),填写以下内容:
pod.yamlmachine.yamlpod-deployment.yaml- (短横线命名法(kebab-case);文件名为
id)、<id>.yaml、name、kind(一到两句面向客户的描述)、summary、product、is_a、part_of。aliases - :REST v2 schema和路径、公开参考文档中的GraphQL名称、MCP工具、
surfaces命令、控制台页面。runpodctl - 若概念有 和
fields,则填写。如果存在REST v2 schema,每个字段都必须在该schema或其创建/更新请求中存在。states - :从
relations中的封闭关系集合中选取。concepts/README.md - :每条规则对应一个事实,id格式为
rules。编写一到三句Agent可执行的描述。将<concept-id>.<slug>指向规则约束的字段、状态或操作。其他概念上的相关规则请通过applies_to引用,不要重复表述。see:
对于**流程(process)**类型的节点,需按顺序添加 。每个步骤包含 、、、涉及的 以及约束该步骤的 。步骤链接到概念上已存在的规则。仅将属于整个流程的事实放在流程节点本身中,例如 。
stepsidtitledescriptionconceptsrulespod-deployment.stock-is-not-your-machine写作风格:使用一般现在时,代码标识符用反引号包裹,"Runpod"拼写正确,不要使用“currently(目前)”或“not yet(尚未)”这类词汇。完整列表见 中的“Writing style”部分。
concepts/README.md不要使用 注释: 会根据数据重写文件,并且会拒绝包含注释的文件,因为注释会被丢弃。请将上下文信息放在证据的 字段中。
#pnpm formatnote5. Validate and look at it
5. 验证并查看结果
bash
cd ontology/tools
pnpm format # canonical style; CI runs format:check
pnpm validate --strict # must report 0 errors and 0 warnings
pnpm test
pnpm build:graph # open ../build/graph.htmlCommon validator errors:
| Error | Fix |
|---|---|
| A relation, |
| Add the field, or point at one that exists. |
| Restate the rule from a public source, or delete it. |
| Say what holds, and put the date in evidence as |
| Quote any item inside |
In the graph, find the node, check that its links make sense, and read its
panel once as a customer would.
bash
cd ontology/tools
pnpm format # canonical style; CI runs format:check
pnpm validate --strict # must report 0 errors and 0 warnings
pnpm test
pnpm build:graph # open ../build/graph.html常见验证器错误:
| 错误信息 | 修复方法 |
|---|---|
| 关系、 |
| 添加该字段,或指向已存在的字段。 |
| 用公开来源重新表述规则,或删除该规则。 |
| 说明适用的内容,并将日期以 |
| 为 |
在概念图中找到该节点,检查其链接是否合理,并站在客户的角度通读一遍节点面板内容。
6. Link a guide
6. 关联指南
Every concept must be covered by at least one skill, reference doc or golden path;
fails otherwise. Follow the skill
() to extend an existing doc or write a new one, and to
check that the docs already covering the concept still agree with its rules.
pnpm check:guideswrite-guide.claude/skills/write-guide/SKILL.md每个概念都必须至少有一个Skill、参考文档或黄金路径覆盖;否则 会执行失败。请按照 技能(路径:)扩展现有文档或编写新文档,并检查已覆盖该概念的文档是否仍与其规则一致。
pnpm check:guideswrite-guide.claude/skills/write-guide/SKILL.md7. Commit
7. 提交
Commit the concept file, plus any other files you linked from or to, with a
Conventional Commits message that says what the node explains, for example
.
docs(concepts): explain why a stopped pod may not restart提交概念文件,以及所有你关联的其他文件,使用Conventional Commits格式的提交信息,说明节点解释的内容,例如 。
docs(concepts): explain why a stopped pod may not restart