compose

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Compose

Compose

Every task

每项任务

  • Verify before claiming done: run the checks named by the task path and report their result.
  • Make the smallest correct change; keep what works.
  • Explain the result in plain engineering reasons.
  • Build from the context you have; state assumptions.
  • Open only the files the tree names for your task kind and areas; open another reference only when a check fails or a named file sends you there.
  • 在声称完成前先验证:运行任务路径指定的检查,并报告结果。
  • 进行最小且正确的更改;保留当前有效的实现。
  • 用清晰的工程原因说明结果。
  • 根据已有上下文进行构建;说明所作的假设。
  • 仅打开任务树为该任务类型和相关领域指定的文件;只有在检查失败或指定文件指向另一份参考文档时,才打开其他参考文档。

Question 0: Is the task clear enough to act?

问题 0:任务是否足够明确,可以开始执行?

  • Look in the prompt, then the code.
    • Clear enough: continue to Question 1.
    • A missing answer changes what gets built: ask at most 3 questions, each with a stated default.
    • No human can answer (CI or headless): proceed and list the assumptions.
  • In a kit project, never ask how the architecture should look.
  • 先查看提示,再查看代码。
    • 足够明确:继续处理问题 1。
    • 如果缺少的答案会改变构建内容:最多提出 3 个问题,并为每个问题给出明确的默认方案。
    • 无人能够回答(CI 或无头环境):继续执行并列出假设。
  • 在 kit 项目中,绝不要询问架构应采用何种设计。

Question 1: What kind of task is it?

问题 1:这是什么类型的任务?

  • New feature or screen → 1. If adding to an existing project, use the
    ../compose-architecture/references/existing-projects.md
    Choose tree; 2. read
    ../compose-feature/SKILL.md
    as the main area; 3. scaffold with its new-feature script when applicable; 4. choose each area in Question 2; 5. run the feature checks and tests.
  • Change to existing code → 1. Find the affected code; 2. use the
    ../compose-architecture/references/existing-projects.md
    Choose tree and keep its coherent pattern; 3. read the owning topic skill from Question 2; 4. make the smallest change; 5. run its checks and affected tests. Change only what the request names; list related gaps as follow-ups.
  • Bug fix → 1. Use the
    ../compose-architecture/references/existing-projects.md
    Choose tree; 2. write a failing test that reproduces the bug using
    ../compose-feature/references/testing.md
    ; 3. read only the affected area in Question 2; 4. make the smallest fix; 5. show the test passing and run affected checks.
  • Review only → 1. Use the
    ../compose-architecture/references/existing-projects.md
    Choose tree; 2. read
    ../compose-feature/references/review-mode.md
    for severity; 3. inspect only the relevant area in Question 2; 4. report findings and what is sound; 5. make no edits.
  • Conform or fix after review → 1. Restructure only: keep behaviour, visible UI, navigation, persistence and public APIs exactly as they are; 2. do not add screens, controls, wiring, saved state or features the existing code lacks; list them as follow-ups in the answer; 3. when changing a constructor or signature, update every caller and test in the same change; 4. run the existing tests before and after; both runs must pass; 5. run the guards. Use the
    ../compose-architecture/references/existing-projects.md
    Choose tree and
    ../compose-feature/references/review-mode.md
    for severity.
  • Project, module or build setup → 1. For existing code, use the
    ../compose-architecture/references/existing-projects.md
    Choose tree; 2. read
    ../compose-project/SKILL.md
    ; 3. choose the build area in Question 2; 4. make the change; 5. run project checks and affected build/tests.
  • Question or explanation → 1. For existing code, use the
    ../compose-architecture/references/existing-projects.md
    Choose tree; 2. identify the area in Question 2; 3. read only the file holding the fact; 4. answer with evidence and state any uncertainty.
  • 新功能或界面 → 1. 如果要添加到现有项目中,请使用
    ../compose-architecture/references/existing-projects.md
    中的 Choose tree;2. 将
    ../compose-feature/SKILL.md
    作为主要领域阅读;3. 在适用时使用其新功能脚本搭建脚手架;4. 在问题 2 中选择每个相关领域;5. 运行功能检查和测试。
  • 修改现有代码 → 1. 找出受影响的代码;2. 使用
    ../compose-architecture/references/existing-projects.md
    中的 Choose tree,并保持其一致的模式;3. 阅读问题 2 中负责该领域的 skill;4. 进行最小更改;5. 运行相关检查和受影响的测试。仅修改请求中明确指定的内容;将相关缺口列为后续事项。
  • 修复 bug → 1. 使用
    ../compose-architecture/references/existing-projects.md
    中的 Choose tree;2. 使用
    ../compose-feature/references/testing.md
    编写一个能够复现该 bug 的失败测试;3. 仅阅读问题 2 中受影响的领域;4. 进行最小修复;5. 证明测试通过,并运行受影响的检查。
  • 仅进行审查 → 1. 使用
    ../compose-architecture/references/existing-projects.md
    中的 Choose tree;2. 阅读
    ../compose-feature/references/review-mode.md
    了解严重程度;3. 仅检查问题 2 中的相关领域;4. 报告发现的问题以及设计合理的部分;5. 不进行任何编辑。
  • 根据审查结果进行调整或修复 → 1. 仅进行重构:必须完全保持现有行为、可见 UI、导航、持久化机制和公共 API;2. 不要添加现有代码中不存在的界面、控件、连接、已保存状态或功能,应在回答中将其列为后续事项;3. 修改构造函数或方法签名时,在同一次更改中更新所有调用方和测试;4. 在更改前后运行现有测试,两次运行都必须通过;5. 运行各项守卫检查。使用
    ../compose-architecture/references/existing-projects.md
    中的 Choose tree,并使用
    ../compose-feature/references/review-mode.md
    判断严重程度。
  • 项目、模块或构建设置 → 1. 对于现有代码,使用
    ../compose-architecture/references/existing-projects.md
    中的 Choose tree;2. 阅读
    ../compose-project/SKILL.md
    ;3. 在问题 2 中选择构建领域;4. 进行更改;5. 运行项目检查以及受影响的构建和测试。
  • 提问或解释 → 1. 对于现有代码,使用
    ../compose-architecture/references/existing-projects.md
    中的 Choose tree;2. 确定问题 2 中的相关领域;3. 仅阅读包含答案的文件;4. 根据证据回答,并说明任何不确定性。

Question 2: Which area does it touch?

问题 2:任务涉及哪个领域?

Read the area's SKILL.md only for the task's main area; for every other area, read only its one reference.
  • UI →
    ../compose-ui/references/ux-states.md
    ; if this is the task's main area, also
    ../compose-ui/SKILL.md
    .
  • Adaptive layout (tablet, foldable, desktop or browser window, window size) →
    ../compose-ui/references/adaptive-layouts.md
    ; if this is the task's main area, also
    ../compose-ui/SKILL.md
    .
  • State and lifetime →
    ../compose-architecture/references/state-ownership.md
    ; if this is the task's main area, also
    ../compose-architecture/SKILL.md
    .
  • Errors →
    ../compose-architecture/references/error-handling.md
    ; if this is the task's main area, also
    ../compose-architecture/SKILL.md
    .
  • Navigation →
    ../compose-architecture/references/navigation.md
    ; if this is the task's main area, also
    ../compose-architecture/SKILL.md
    .
  • Data storage →
    ../compose-data/references/datastore.md
    ; if this is the task's main area, also
    ../compose-data/SKILL.md
    .
  • Network →
    ../compose-data/references/networking-ktor.md
    ; if this is the task's main area, also
    ../compose-data/SKILL.md
    .
  • Paging →
    ../compose-data/references/paging.md
    ; if this is the task's main area, also
    ../compose-data/SKILL.md
    .
  • DI and modules →
    ../compose-architecture/references/dependency-injection.md
    ; if this is the task's main area, also
    ../compose-architecture/SKILL.md
    .
  • Platform / iOS / desktop →
    ../compose-platform/references/sharing-and-bridges.md
    ; if this is the task's main area, also
    ../compose-platform/SKILL.md
    .
  • Notifications and background work →
    ../compose-platform/references/notifications-and-background-work.md
    ; if this is the task's main area, also
    ../compose-platform/SKILL.md
    .
  • Build and Gradle →
    ../compose-project/references/convention-plugins.md
    ; if this is the task's main area, also
    ../compose-project/SKILL.md
    .
  • Testing →
    ../compose-feature/references/testing.md
    ; if this is the task's main area, also
    ../compose-feature/SKILL.md
    .
Not covered here → use judgement and state the assumption.
  • 仅针对任务的主要领域阅读该领域的 SKILL.md;对于其他每个领域,仅阅读其对应的一份参考文档。
  • UI →
    ../compose-ui/references/ux-states.md
    ;如果这是任务的主要领域,还需阅读
    ../compose-ui/SKILL.md
    。
  • 自适应布局(平板、可折叠设备、桌面端、浏览器窗口、窗口尺寸) →
    ../compose-ui/references/adaptive-layouts.md
    ;如果这是任务的主要领域,还需阅读
    ../compose-ui/SKILL.md
    。
  • 状态与生命周期 →
    ../compose-architecture/references/state-ownership.md
    ;如果这是任务的主要领域,还需阅读
    ../compose-architecture/SKILL.md
    。
  • 错误处理 →
    ../compose-architecture/references/error-handling.md
    ;如果这是任务的主要领域,还需阅读
    ../compose-architecture/SKILL.md
    。
  • 导航 →
    ../compose-architecture/references/navigation.md
    ;如果这是任务的主要领域,还需阅读
    ../compose-architecture/SKILL.md
    。
  • 数据存储 →
    ../compose-data/references/datastore.md
    ;如果这是任务的主要领域,还需阅读
    ../compose-data/SKILL.md
    。
  • 网络 →
    ../compose-data/references/networking-ktor.md
    ;如果这是任务的主要领域,还需阅读
    ../compose-data/SKILL.md
    。
  • 分页 →
    ../compose-data/references/paging.md
    ;如果这是任务的主要领域,还需阅读
    ../compose-data/SKILL.md
    。
  • DI 与模块 →
    ../compose-architecture/references/dependency-injection.md
    ;如果这是任务的主要领域,还需阅读
    ../compose-architecture/SKILL.md
    。
  • 平台 / iOS / 桌面端 →
    ../compose-platform/references/sharing-and-bridges.md
    ;如果这是任务的主要领域,还需阅读
    ../compose-platform/SKILL.md
    。
  • 通知与后台工作 →
    ../compose-platform/references/notifications-and-background-work.md
    ;如果这是任务的主要领域,还需阅读
    ../compose-platform/SKILL.md
    。
  • 构建与 Gradle →
    ../compose-project/references/convention-plugins.md
    ;如果这是任务的主要领域,还需阅读
    ../compose-project/SKILL.md
    。
  • 测试 →
    ../compose-feature/references/testing.md
    ;如果这是任务的主要领域,还需阅读
    ../compose-feature/SKILL.md
    。
此处未涵盖 → 自行判断并说明假设。