implement-with-sol

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

implement-with-sol

基于sol实现

Codex implements in a worktree; you keep planning, review, and synthesis. Ends with a PR ready for human review.
Codex在工作树中完成实现;你负责规划、审查和整合。最终生成可供人工审核的PR。

Steps

步骤

  1. Worktree: create one with
    git wt <branch> origin/<default-branch>
    and run everything from inside it.
  2. Spec file: save the task spec verbatim to a temp file (e.g.
    gh issue view <n> --json title,body -q '"# " + .title + "\n\n" + .body' > /tmp/<slug>.md
    ) so the prompt references a path instead of inlining it.
  3. Launch from the worktree, in the background:
    codex exec --sandbox workspace-write "<prompt>"
    Global flags precede the subcommand: follow-ups are
    codex exec --sandbox workspace-write resume --last "<prompt>"
    — flags placed after
    resume
    fail. The model comes from
    ~/.codex/config.toml
    ; override with
    -m
    .
    The prompt names: the spec path with "follow every decision in it"; the existing code and test patterns to study; the definition of done (build, lint, and tests pass; required cases covered); the review instruction "when done, run the review-fix skill on the working tree with its Default Review Policy — supply no review brief"; "Do NOT commit — leave changes in the working tree"; and "print files changed and each verification command with its result".
    Word the review instruction exactly that way: any prose describing what to review becomes a Review Brief, and a brief replaces the Default Review Policy with a single ad-hoc reviewer instead of the full panel.
  4. Verify: rerun the claimed checks yourself, review the diff against the spec decision by decision, and smoke-test edge cases the spec calls out. Codex's report is a claim, not evidence.
  5. Fix rounds: send each finding via
    resume --last
    as in step 3 and re-verify, until a review pass finds nothing. Trivial one-file tweaks may be fixed directly instead.
  6. Ship: commit per the logical-commits skill (
    git-hunk skills get core logical-commits
    ), then invoke
    make-pr
    .
Done when a review pass finds nothing, the checks pass locally, and the PR URL is returned.
  1. 工作树:使用
    git wt <branch> origin/<default-branch>
    创建工作树,并在该工作树内执行所有操作。
  2. 规格文件:将任务规格原封不动保存至临时文件(例如:
    gh issue view <n> --json title,body -q '"# " + .title + "\n\n" + .body' > /tmp/<slug>.md
    ),以便在提示词中引用文件路径而非直接内嵌内容。
  3. 启动:在工作树中后台运行以下命令:
    codex exec --sandbox workspace-write "<prompt>"
    全局标志需置于子命令之前:后续跟进命令为
    codex exec --sandbox workspace-write resume --last "<prompt>"
    ——若将标志放在
    resume
    之后会执行失败。模型配置取自
    ~/.codex/config.toml
    ;可通过
    -m
    参数覆盖。
    提示词需包含:规格文件路径并注明“严格遵循其中的所有决策”;需参考的现有代码和测试模式;完成标准(构建、代码检查和测试全部通过;覆盖所有要求的用例);审查指令“完成后,在工作树上运行review-fix技能并采用默认审查策略——无需提供审查摘要”;“请勿提交——将修改留在工作树中”;以及“输出已修改的文件和每条验证命令及其结果”。
    审查指令需严格按照上述表述:任何描述审查内容的文字都会成为审查摘要,而摘要会将默认审查策略替换为单一临时审查者,而非完整审查小组。
  4. 验证:自行重新执行声称已通过的检查,逐点对照规格审查代码差异,并对规格中提及的边缘情况进行冒烟测试。Codex的报告仅为声明,而非证据。
  5. 修复环节:通过步骤3中的
    resume --last
    命令提交每个问题并重新验证,直至审查无问题。对于简单的单文件调整,可直接手动修复。
  6. 提交:按照logical-commits技能(
    git-hunk skills get core logical-commits
    )的规范提交代码,然后调用
    make-pr
    命令。
当审查无问题、本地检查全部通过且返回PR链接时,流程完成。