taubyte-core-constraints

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Core Constraints

核心约束

Must-follow rules

必须遵守的规则

  1. Never ask user to run setup commands manually; agent performs setup.
  2. Run CLI preflight (
    taubyte-cli-prereqs
    ) before all Taubyte operations.
  3. For Dream/local, never run backend-contacting
    tau
    commands before Dream is up and universe exists.
  4. Use
    dream
    commands directly; never use
    tau dream
    .
  5. Use default universe
    default
    unless user explicitly requests another.
  6. After resource creation, push config (
    tau push project --config-only
    ) before relying on resource visibility.
  7. After code changes, push code (
    tau push project --code-only
    ) and verify builds/logs.
  8. Never set function timeout to
    0
    ; use valid durations (
    30s
    ,
    1m
    , etc.).
  9. HTTP functions: one function per path+method; never comma-separated methods.
  10. For functions/websites in automation, use empty template; for Go functions, include
    --language Go
    .
  11. Use matcher values for DB/storage SDK calls, not resource names.
  12. Do not bypass failing
    tau push project
    with direct git operations.
  13. On Git Bash Windows for path-like flags, prefix with
    MSYS_NO_PATHCONV=1
    .
  14. Website
    .taubyte/build.sh
    must be non-empty and must write deploy output to
    /out
    .
  15. Verify project selection with
    tau --json current
    before resource mutations.
  16. Website/library git fallback is an exception path only when
    tau push website|library
    is unavailable; never apply this exception to project config/code pushes.
  17. Never create website/library without explicit repository strategy:
    • use
      --generate-repository
      with deterministic
      --repository-name
      , or
    • use explicit existing
      --repository-name
      /
      --repository-id
      .
  18. After creating website/library, verify repository binding in config (
    websites/*.yaml
    or
    libraries/*.yaml
    ) before pushing.
  1. 绝不要要求用户手动运行设置命令;由Agent执行设置操作。
  2. 在所有Taubyte操作前运行CLI预检查(
    taubyte-cli-prereqs
    )。
  3. 对于Dream/本地环境,在Dream启动且universe存在前,绝不要运行会联系后端的
    tau
    命令。
  4. 直接使用
    dream
    命令;绝不要使用
    tau dream
  5. 除非用户明确要求其他universe,否则使用默认universe
    default
  6. 创建资源后,在依赖资源可见性前推送配置(
    tau push project --config-only
    )。
  7. 代码变更后,推送代码(
    tau push project --code-only
    )并验证构建/日志。
  8. 绝不要将函数超时设置为
    0
    ;使用有效的时长值(如
    30s
    1m
    等)。
  9. HTTP函数:每个路径+方法对应一个函数;绝不要使用逗号分隔的方法。
  10. 自动化中的函数/网站使用空模板;对于Go函数,需包含
    --language Go
    参数。
  11. DB/存储SDK调用使用匹配器值,而非资源名称。
  12. 不要通过直接Git操作绕过失败的
    tau push project
  13. 在Windows的Git Bash中使用路径类标志时,需添加前缀
    MSYS_NO_PATHCONV=1
  14. 网站的
    .taubyte/build.sh
    必须非空,且必须将部署输出写入
    /out
    目录。
  15. 在修改资源前,使用
    tau --json current
    验证项目选择。
  16. 网站/库的Git回退仅在
    tau push website|library
    不可用时作为异常路径;绝不要将此例外应用于项目配置/代码推送。
  17. 绝不要在未明确指定仓库策略的情况下创建网站/库:
    • 使用
      --generate-repository
      并配合确定的
      --repository-name
      ,或
    • 使用明确的现有
      --repository-name
      /
      --repository-id
  18. 创建网站/库后,在推送前验证配置中的仓库绑定(
    websites/*.yaml
    libraries/*.yaml
    )。

Layout constraints

布局约束

  • Project has
    tb_config_<name>
    +
    tb_code_<name>
    .
  • Website/library have separate repositories.
  • Function build layout must be discoverable by build system (avoid misplaced function paths).
  • 项目包含
    tb_config_<name>
    +
    tb_code_<name>
  • 网站/库拥有独立的仓库。
  • 函数构建布局必须能被构建系统发现(避免函数路径放置错误)。