convex-optimize

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
<!-- GENERATED from convex-agents content/capabilities/optimize.json — do not edit by hand. -->
<!-- GENERATED from convex-agents content/capabilities/optimize.json — do not edit by hand. -->

Audit and optimize an existing Convex app

审计并优化现有Convex应用

The remediation WORKFLOW for an existing app: open with a scored assessment, then act on it — upgrade stale components and set up observability — plan-then-confirm-then-apply. The assessment itself is delegated to launch-readiness (the findings-bus scorer); optimize's distinct value is the actions it takes on the result.
现有应用的修复工作流程:以一份带评分的评估报告开启,随后根据报告采取行动——升级陈旧组件、配置可观测性——遵循规划→确认→实施的步骤。评估本身交由launch-readiness(即findings-bus评分工具)完成;本优化能力的独特价值在于基于评估结果采取的具体行动。

Workflow

工作流程

  1. Detect the app: a
    convex/
    directory, the schema, and whether it's an anonymous or cloud deployment.
  2. ASSESS via
    launch-readiness
    — one scored, deduped report across authz/reviewer/advisor/insights with an ordered fix plan. Do not re-run those passes by hand; optimize consumes launch-readiness's report rather than re-implementing the audit.
  3. UPGRADE: run
    check-updates
    against the pinned
    @convex-dev/*
    components and fold stale-component (staleness-class) findings into the same plan.
  4. OBSERVABILITY: if the readiness report flagged an observability gap (no prod error capture), offer to install
    sentinel
    .
  5. Present the combined prioritized plan — the launch-readiness score + the fix plan + upgrades + observability, security/data-loss first — and apply only on explicit confirmation, dispatching each fix to its fixCapability.
  6. After applying, re-run the launch-readiness assessment and show the score delta.
  1. 检测应用:确认存在
    convex/
    目录、schema,以及该应用是匿名部署还是云部署。
  2. 通过
    launch-readiness
    进行评估——生成一份整合了授权(authz)、审核(reviewer)、建议(advisor)、洞察(insights)的带评分、去重报告,并附带有序修复计划。无需手动重复这些检查步骤;优化功能将直接调用launch-readiness的报告,而非重新实现审计逻辑。
  3. 升级:针对已固定版本的
    @convex-dev/*
    组件运行
    check-updates
    ,并将陈旧组件(staleness-class)相关问题纳入同一修复计划。
  4. 可观测性:若评估报告指出存在可观测性缺口(无生产环境错误捕获机制),则提供安装
    sentinel
    的选项。
  5. 展示合并后的优先级计划——包含launch-readiness评分、修复计划、升级项、可观测性配置,优先处理安全与数据丢失风险——仅在获得明确确认后实施,将每项修复任务分派至对应的修复能力模块。
  6. 实施完成后,重新运行launch-readiness评估并展示评分变化。

Rules

规则

  • Read-only first. Present a plan and CONFIRM before changing any file.
  • Delegate the audit to launch-readiness (the findings-bus scorer); don't re-implement reviewer/advisor/insights inline — optimize's job is acting on the report (upgrades + observability), not re-scoring.
  • Prioritize security and data-loss risks above style, following launch-readiness's ordering.
  • Never auto-land changes on someone's existing prod app; re-assess after applying and show the score moved.
  • 首先以只读模式操作。在修改任何文件前,先展示计划并获取确认。
  • 将审计工作委托给launch-readiness(findings-bus评分工具);不要在内部重新实现审核/建议/洞察逻辑——优化功能的职责是基于报告采取行动(升级+可观测性配置),而非重新评分。
  • 遵循launch-readiness的优先级排序,将安全与数据丢失风险置于代码风格等问题之上。
  • 切勿自动在他人的现有生产环境应用中部署更改;实施完成后重新评估并展示评分变化。