add-implementation-requirement

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Add Implementation Requirement

添加实现要求

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

Workflow

工作流程

  1. Identify the target
    .plain
    file.
    If ambiguous, ask the user.
  2. Read the file to understand existing implementation reqs, definitions, and functional specs.
  3. Determine if this belongs in implementation reqs — it must describe HOW to build, not WHAT to build (that goes in
    ***functional specs***
    ).
  4. Draft the requirement following the rules below.
  5. Insert it into the
    ***implementation reqs***
    section.
  6. Read the file again to confirm correct placement and syntax.
  1. 确定目标.plain文件。若存在歧义,请询问用户。
  2. 读取文件,了解现有的实现要求、定义和功能规范。
  3. 判断内容是否属于实现要求范畴——内容必须描述构建方式(HOW),而非构建内容(WHAT)(后者应放在
    ***functional specs***
    中)。
  4. 按照以下规则撰写要求
  5. 将其插入到
    ***implementation reqs***
    部分
  6. 再次读取文件,确认放置位置和语法正确。

What Belongs Here

适用内容

Implementation reqs are free-form instructions that steer code generation. Common contents:
  • Technology choices: language, framework, runtime version
  • Architectural constraints: patterns, layering, dependency rules
  • Coding standards: naming conventions, style guidelines
  • Data formats: serialization, encoding, transformation rules
  • Error handling: strategies, retry logic, exception hierarchies
  • Algorithm descriptions: specific approaches when behavior alone is insufficient
  • Performance guidance: memory constraints, streaming requirements, batching strategies
  • Language-specific constructs: generics, annotations, framework-specific types and idioms
实现要求是指导代码生成的自由格式说明,常见内容包括:
  • 技术选型:编程语言、框架、运行时版本
  • 架构约束:设计模式、分层结构、依赖规则
  • 编码标准:命名规范、风格指南
  • 数据格式:序列化、编码、转换规则
  • 错误处理:策略、重试逻辑、异常层级
  • 算法描述:当仅靠行为描述不足以说明时的具体实现方法
  • 性能指导:内存限制、流式处理要求、批处理策略
  • 语言特定结构:泛型、注解、框架特定类型及惯用写法

What Does NOT Belong Here

不适用内容

  • Behavior and features — those go in
    ***functional specs***
  • Concept definitions — those go in
    ***definitions***
  • Test instructions — those go in
    ***test reqs***
  • 行为与功能——这些应放在
    ***functional specs***
  • 概念定义——这些应放在
    ***definitions***
  • 测试说明——这些应放在
    ***test reqs***

Key Principle: HOW vs WHAT

核心原则:构建方式(HOW)vs 构建内容(WHAT)

***implementation reqs***
describe HOW the software should be built.
***functional specs***
describe WHAT the software should do.
If the requirement describes observable behavior (endpoints, business rules, user-facing features), it belongs in functional specs. If it describes internal structure, technology, or coding guidance, it belongs here.
***implementation reqs***
描述软件的构建方式。
***functional specs***
描述软件的功能内容。
如果要求描述的是可观察的行为(如接口、业务规则、面向用户的功能),则应归入功能规范;如果描述的是内部结构、技术选型或编码指导,则应归入此处。

Format

格式

Implementation reqs are bullet points in the
***implementation reqs***
section:
plain
***implementation reqs***
- :Implementation: should be in Python 3.12.
- :Implementation: should use pip for dependency management.
- When writing CSV files, :Implementation: should use streaming writes to avoid holding large datasets in memory.
Reference defined
:Concepts:
where they add clarity. Implementation reqs in non-leaf sections apply to all subsections.
实现要求是
***implementation reqs***
部分中的项目符号列表:
plain
***implementation reqs***
- :Implementation: should be in Python 3.12.
- :Implementation: should use pip for dependency management.
- When writing CSV files, :Implementation: should use streaming writes to avoid holding large datasets in memory.
引用已定义的
:Concepts:
以提升清晰度。非叶子章节中的实现要求适用于所有子章节。

Encapsulation Warning

封装警告

requires
modules only receive functional specs from their dependencies — not implementation reqs. If downstream modules need certain behavior to be visible, that behavior must be expressed in functional specs, not here.
requires
模块仅从其依赖项接收功能规范——不包括实现要求。如果下游模块需要特定行为可见,则该行为必须在功能规范中表述,而非此处。

Validation Checklist

验证检查清单

  • Describes HOW to build, not WHAT to build
  • All referenced
    :Concepts:
    are defined in
    ***definitions***
  • Does not duplicate guidance already present in the file or its imports
  • Placed inside a
    ***implementation reqs***
    section
  • No behavioral requirements that should be in
    ***functional specs***
  • 描述的是构建方式(HOW),而非构建内容(WHAT)
  • 所有引用的
    :Concepts:
    均在
    ***definitions***
    中定义
  • 未重复文件或其导入内容中已有的指导
  • 放置在
    ***implementation reqs***
    部分内
  • 不包含应归入
    ***functional specs***
    的行为要求