implement-with-sol
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseimplement-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
步骤
-
Worktree: create one withand run everything from inside it.
git wt <branch> origin/<default-branch> -
Spec file: save the task spec verbatim to a temp file (e.g.) so the prompt references a path instead of inlining it.
gh issue view <n> --json title,body -q '"# " + .title + "\n\n" + .body' > /tmp/<slug>.md -
Launch from the worktree, in the background:
codex exec --sandbox workspace-write "<prompt>"Global flags precede the subcommand: follow-ups are— flags placed aftercodex exec --sandbox workspace-write resume --last "<prompt>"fail. The model comes fromresume; override with~/.codex/config.toml.-mThe 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. -
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.
-
Fix rounds: send each finding viaas in step 3 and re-verify, until a review pass finds nothing. Trivial one-file tweaks may be fixed directly instead.
resume --last -
Ship: commit per the logical-commits skill (), then invoke
git-hunk skills get core logical-commits.make-pr
Done when a review pass finds nothing, the checks pass locally, and the PR URL is returned.
-
工作树:使用创建工作树,并在该工作树内执行所有操作。
git wt <branch> origin/<default-branch> -
规格文件:将任务规格原封不动保存至临时文件(例如:),以便在提示词中引用文件路径而非直接内嵌内容。
gh issue view <n> --json title,body -q '"# " + .title + "\n\n" + .body' > /tmp/<slug>.md -
启动:在工作树中后台运行以下命令:
codex exec --sandbox workspace-write "<prompt>"全局标志需置于子命令之前:后续跟进命令为——若将标志放在codex exec --sandbox workspace-write resume --last "<prompt>"之后会执行失败。模型配置取自resume;可通过~/.codex/config.toml参数覆盖。-m提示词需包含:规格文件路径并注明“严格遵循其中的所有决策”;需参考的现有代码和测试模式;完成标准(构建、代码检查和测试全部通过;覆盖所有要求的用例);审查指令“完成后,在工作树上运行review-fix技能并采用默认审查策略——无需提供审查摘要”;“请勿提交——将修改留在工作树中”;以及“输出已修改的文件和每条验证命令及其结果”。审查指令需严格按照上述表述:任何描述审查内容的文字都会成为审查摘要,而摘要会将默认审查策略替换为单一临时审查者,而非完整审查小组。 -
验证:自行重新执行声称已通过的检查,逐点对照规格审查代码差异,并对规格中提及的边缘情况进行冒烟测试。Codex的报告仅为声明,而非证据。
-
修复环节:通过步骤3中的命令提交每个问题并重新验证,直至审查无问题。对于简单的单文件调整,可直接手动修复。
resume --last -
提交:按照logical-commits技能()的规范提交代码,然后调用
git-hunk skills get core logical-commits命令。make-pr
当审查无问题、本地检查全部通过且返回PR链接时,流程完成。