kf-implement-feature
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseImplement Feature
功能实现
Deliver the smallest complete behavior change that fits the repository.
交付符合代码库要求的最小完整行为变更。
Workflow
工作流程
- Clarify the observable outcome, constraints, compatibility expectations, and acceptance evidence from the request and repository context.
- Inspect the relevant area before editing. Find analogous implementations and sample multiple examples when practical.
- Trace affected components and boundaries, including UI, application logic, persistence, infrastructure, tests, and documentation only where relevant.
- Infer repository conventions from repeated evidence. Prefer the established architecture over a generic textbook design.
- Choose the smallest complete change. Include every layer needed for the feature, but avoid speculative extensibility and unrelated cleanup.
- Implement consistently while preserving public behavior that the request does not intentionally change.
- Inspect changed code, run the smallest relevant validation supported by actual project tooling, fix failures caused by the work, and inspect the final diff.
- 从需求和代码库上下文明确可观测的结果、约束条件、兼容性预期以及验收依据。
- 在编辑前检查相关区域。实际可行时,找到类似的实现并参考多个示例。
- 追踪受影响的组件和边界,包括UI、应用逻辑、持久化层、基础设施、测试及相关文档(仅涉及相关部分)。
- 从重复出现的实例中推断代码库的约定。优先采用已确立的架构,而非通用的教科书式设计。
- 选择最小的完整变更。包含功能所需的所有层级,但避免不必要的扩展性设计和无关的清理工作。
- 保持实现一致性,同时保留需求未有意变更的公共行为。
- 检查变更后的代码,运行项目工具支持的最小相关验证,修复由本次工作导致的失败,并检查最终的差异。
Constraints
约束条件
- Do not introduce helpers, wrappers, repositories, factories, abstractions, or dependencies without a concrete need or established pattern.
- Do not format or refactor unrelated files.
- Do not treat one existing example as a repository-wide rule.
- Keep type safety, validation, error handling, and tests consistent with nearby canonical code.
- Report checks that could not be run and any remaining uncertainty.
This workflow handles cross-layer features without separate frontend, backend,
database, framework, or language-specific global skills.
- 若无具体需求或已确立的模式,请勿引入辅助工具、包装器、仓库类、工厂类、抽象层或依赖项。
- 请勿格式化或重构无关文件。
- 请勿将单个现有示例视为代码库的全局规则。
- 确保类型安全、验证逻辑、错误处理和测试与附近的标准代码保持一致。
- 报告无法运行的检查项以及任何剩余的不确定性。
此工作流程可处理跨层功能,无需区分前端、后端、数据库、框架或特定语言的全局技能。