add-concept

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Add Concept

添加概念

Always use the skill
load-plain-reference
to retrieve the ***plain syntax rules — but only if you haven't done so yet.
请务必使用skill
load-plain-reference
来获取plain语法规则——但仅在你尚未获取过的情况下执行此操作。

Workflow

工作流程

  1. Identify the target
    .plain
    file.
    If ambiguous, ask the user.
  2. Read the file to understand existing definitions, imports, and concepts.
  3. Validate the concept name against the syntax rules below.
  4. Check for uniqueness — the concept name must not already exist in the file or its imports.
  5. Check referenced concepts — any
    :ConceptName:
    used in the definition must already be defined above it (in this file or via
    import
    /
    requires
    ). Concept references must not form cycles (e.g., A references B and B references A).
  6. Check for circular references — if the new concept references
    :B:
    , then
    :B:
    must not reference the new concept (directly or indirectly). Example of a circular definition to avoid:
    plain
    - :Order: is placed by :Customer: and contains :OrderItem: entries.
    - :Customer: is a user who has placed at least one :Order:.
    Fix by removing the back-reference:
    plain
    - :Customer: is a user of the system.
    - :Order: is placed by :Customer: and contains :OrderItem: entries.
  7. Insert the concept into the
    ***definitions***
    section, after any concepts it references.
  8. Read the file again to confirm correct placement and syntax.
  1. 确定目标
    .plain
    文件
    。若存在歧义,请询问用户。
  2. 读取文件,了解现有定义、导入内容和概念。
  3. 验证概念名称,确保符合下方的语法规则。
  4. 检查唯一性——概念名称不得已存在于文件或其导入内容中。
  5. 检查引用的概念——定义中使用的任何
    :ConceptName:
    必须已在其上方定义(在当前文件中或通过
    import
    /
    requires
    导入)。概念引用不得形成循环(例如:A引用B,B引用A)。
  6. 检查循环引用——如果新概念引用
    :B:
    ,则
    :B:
    不得直接或间接引用该新概念。需避免的循环定义示例:
    plain
    - :Order: is placed by :Customer: and contains :OrderItem: entries.
    - :Customer: is a user who has placed at least one :Order:.
    修复方法:移除反向引用:
    plain
    - :Customer: is a user of the system.
    - :Order: is placed by :Customer: and contains :OrderItem: entries.
  7. 插入概念
    ***definitions***
    部分,放在它所引用的所有概念之后。
  8. 再次读取文件,确认放置位置和语法正确。

Concept Syntax Rules

概念语法规则

  • Wrapped in colons:
    :ConceptName:
  • CamelCase, starting with an uppercase letter
  • Valid characters: letters, digits,
    +
    ,
    -
    ,
    .
    ,
    _
  • Must be globally unique across the spec and all its imports
  • Exported concepts from
    requires
    modules are not transitive — if a concept needs to be shared across multiple
    requires
    modules, define it in a common import module instead
  • 用冒号包裹:
    :ConceptName:
  • 采用CamelCase格式,首字母大写
  • 有效字符:字母、数字、
    +
    -
    .
    _
  • 在规范文件及其所有导入内容中必须全局唯一
  • requires
    模块导出的概念不具有传递性——如果某个概念需要在多个
    requires
    模块间共享,请在公共导入模块中定义它

Definition Format

定义格式

A concept definition is a bullet in
***definitions***
that starts with the concept name:
plain
***definitions***
- :ConceptName: is a description of what it represents.
Attributes and constraints are nested sub-bullets:
plain
- :Task: describes an activity that needs to be done by :User:. :Task: has:
  - Name - a short description (required)
  - Notes - additional details (optional)
  - Due Date - completion deadline (optional)
概念定义是
***definitions***
中的一个项目符号,以概念名称开头:
plain
***definitions***
- :ConceptName: is a description of what it represents.
属性和约束为嵌套的子项目符号:
plain
- :Task: describes an activity that needs to be done by :User:. :Task: has:
  - Name - a short description (required)
  - Notes - additional details (optional)
  - Due Date - completion deadline (optional)

Validation Checklist

验证检查清单

  • Name uses
    :CamelCase:
    notation
  • Name is globally unique (not defined elsewhere in the file or imports)
  • Definition starts with the concept name
  • All referenced concepts (
    :OtherConcept:
    ) are already defined above
  • No circular references between concepts
  • Description is clear, concise, and language-agnostic
  • Placed inside a
    ***definitions***
    section
  • 名称使用
    :CamelCase:
    格式
  • 名称全局唯一(未在文件或导入内容的其他位置定义)
  • 定义以概念名称开头
  • 所有引用的概念(
    :OtherConcept:
    )已在上方定义
  • 概念间无循环引用
  • 描述清晰、简洁且与语言无关
  • 放置在
    ***definitions***
    部分内