From b41b223fc88a648a2d823caab98fd54ec4924c29 Mon Sep 17 00:00:00 2001 From: "swe-agent[bot]" <0+swe-agent[bot]@users.noreply.github.com> Date: Tue, 9 Dec 2025 17:19:23 +0800 Subject: [PATCH] =?UTF-8?q?refactor(pr-53):=20=E8=B0=83=E6=95=B4=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=91=BD=E5=90=8D=E5=92=8C=E6=8A=80=E8=83=BD=E5=AE=9A?= =?UTF-8?q?=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 回滚 skills/codex/SKILL.md 至使用 codex-wrapper - codeagent-wrapper 已由独立技能 skills/codeagent/SKILL.md 提供 - 保持向后兼容性和职责分离 2. 重命名命令文件为语义化名称 - gh-implement.md → gh-issue-implement.md - 更新命令标识从 /gh-implement 到 /gh-issue-implement - 提升命令意图的清晰度 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- ...{gh-implement.md => gh-issue-implement.md} | 2 +- skills/codex/SKILL.md | 46 +++++++++---------- 2 files changed, 24 insertions(+), 24 deletions(-) rename github-workflow/commands/{gh-implement.md => gh-issue-implement.md} (90%) diff --git a/github-workflow/commands/gh-implement.md b/github-workflow/commands/gh-issue-implement.md similarity index 90% rename from github-workflow/commands/gh-implement.md rename to github-workflow/commands/gh-issue-implement.md index 4a1fc15..8c98ef9 100644 --- a/github-workflow/commands/gh-implement.md +++ b/github-workflow/commands/gh-issue-implement.md @@ -3,7 +3,7 @@ description: Implement GitHub issue with full development lifecycle argument-hint: Issue number (e.g., "123") --- -You are the `/gh-implement` workflow orchestrator. Drive the issue-to-PR loop with minimal ceremony and zero fluff. +You are the `/gh-issue-implement` workflow orchestrator. Drive the issue-to-PR loop with minimal ceremony and zero fluff. ## Phase 1: Issue Analysis - Run `gh issue view $ARGUMENTS --json title,body,labels,comments`. diff --git a/skills/codex/SKILL.md b/skills/codex/SKILL.md index 434aae4..21da4c7 100644 --- a/skills/codex/SKILL.md +++ b/skills/codex/SKILL.md @@ -32,7 +32,7 @@ When falling back to direct execution: **Mandatory**: Run every automated invocation through the Bash tool in the foreground with **HEREDOC syntax** to avoid shell quoting issues, keeping the `timeout` parameter fixed at `7200000` milliseconds (do not change it or use any other entry point). ```bash -codeagent-wrapper - [working_dir] <<'EOF' +codex-wrapper - [working_dir] <<'EOF' EOF ``` @@ -44,12 +44,12 @@ EOF **Simple tasks** (backward compatibility): For simple single-line tasks without special characters, you can still use direct quoting: ```bash -codeagent-wrapper "simple task here" [working_dir] +codex-wrapper "simple task here" [working_dir] ``` **Resume a session with HEREDOC:** ```bash -codeagent-wrapper resume - [working_dir] <<'EOF' +codex-wrapper resume - [working_dir] <<'EOF' EOF ``` @@ -58,7 +58,7 @@ EOF - **Bash/Zsh**: Use `<<'EOF'` (single quotes prevent variable expansion) - **PowerShell 5.1+**: Use `@'` and `'@` (here-string syntax) ```powershell - codeagent-wrapper - @' + codex-wrapper - @' task content '@ ``` @@ -104,7 +104,7 @@ All automated executions must use HEREDOC syntax through the Bash tool in the fo ``` Bash tool parameters: -- command: codeagent-wrapper - [working_dir] <<'EOF' +- command: codex-wrapper - [working_dir] <<'EOF' EOF - timeout: 7200000 @@ -120,18 +120,18 @@ Run every call in the foreground—never append `&` to background it—so logs a **Basic code analysis:** ```bash # Recommended: with HEREDOC (handles any special characters) -codeagent-wrapper - <<'EOF' +codex-wrapper - <<'EOF' explain @src/main.ts EOF # timeout: 7200000 # Alternative: simple direct quoting (if task is simple) -codeagent-wrapper "explain @src/main.ts" +codex-wrapper "explain @src/main.ts" ``` **Refactoring with multiline instructions:** ```bash -codeagent-wrapper - <<'EOF' +codex-wrapper - <<'EOF' refactor @src/utils for performance: - Extract duplicate code into helpers - Use memoization for expensive calculations @@ -142,7 +142,7 @@ EOF **Multi-file analysis:** ```bash -codeagent-wrapper - "/path/to/project" <<'EOF' +codex-wrapper - "/path/to/project" <<'EOF' analyze @. and find security issues: 1. Check for SQL injection vulnerabilities 2. Identify XSS risks in templates @@ -155,13 +155,13 @@ EOF **Resume previous session:** ```bash # First session -codeagent-wrapper - <<'EOF' +codex-wrapper - <<'EOF' add comments to @utils.js explaining the caching logic EOF # Output includes: SESSION_ID: 019a7247-ac9d-71f3-89e2-a823dbd8fd14 # Continue the conversation with more context -codeagent-wrapper resume 019a7247-ac9d-71f3-89e2-a823dbd8fd14 - <<'EOF' +codex-wrapper resume 019a7247-ac9d-71f3-89e2-a823dbd8fd14 - <<'EOF' now add TypeScript type hints and handle edge cases where cache is null EOF # timeout: 7200000 @@ -169,7 +169,7 @@ EOF **Task with code snippets and special characters:** ```bash -codeagent-wrapper - <<'EOF' +codex-wrapper - <<'EOF' Fix the bug in @app.js where the regex /\d+/ doesn't match "123" The current code is: const re = /\d+/; @@ -190,10 +190,10 @@ EOF **Correct:** ```bash # Option 1: file redirection -codeagent-wrapper --parallel < tasks.txt +codex-wrapper --parallel < tasks.txt # Option 2: heredoc (recommended for multiple tasks) -codeagent-wrapper --parallel <<'EOF' +codex-wrapper --parallel <<'EOF' ---TASK--- id: task1 workdir: /path/to/dir @@ -202,28 +202,28 @@ task content EOF # Option 3: pipe -echo "---TASK---..." | codeagent-wrapper --parallel +echo "---TASK---..." | codex-wrapper --parallel ``` **Incorrect (will trigger shell parsing errors):** ```bash # Bad: no extra args allowed after --parallel -codeagent-wrapper --parallel - /path/to/dir <<'EOF' +codex-wrapper --parallel - /path/to/dir <<'EOF' ... EOF # Bad: --parallel does not take a task argument -codeagent-wrapper --parallel "task description" +codex-wrapper --parallel "task description" # Bad: workdir must live inside the task config -codeagent-wrapper --parallel /path/to/dir < tasks.txt +codex-wrapper --parallel /path/to/dir < tasks.txt ``` For multiple independent or dependent tasks, use `--parallel` mode with delimiter format: **Typical Workflow (analyze → implement → test, chained in a single parallel call)**: ```bash -codeagent-wrapper --parallel <<'EOF' +codex-wrapper --parallel <<'EOF' ---TASK--- id: analyze_1732876800 workdir: /home/user/project @@ -243,10 +243,10 @@ dependencies: implement_1732876801 add and run regression tests covering the new endpoints and UI flows EOF ``` -A single `codeagent-wrapper --parallel` call schedules all three stages concurrently, using `dependencies` to enforce sequential ordering without multiple invocations. +A single `codex-wrapper --parallel` call schedules all three stages concurrently, using `dependencies` to enforce sequential ordering without multiple invocations. ```bash -codeagent-wrapper --parallel <<'EOF' +codex-wrapper --parallel <<'EOF' ---TASK--- id: backend_1732876800 workdir: /home/user/project/backend @@ -283,14 +283,14 @@ EOF **Dependencies Best Practices** -- Avoid multiple invocations: Place "analyze then implement" in a single `codeagent-wrapper --parallel` call, chaining them via `dependencies`, rather than running analysis first and then launching implementation separately. +- Avoid multiple invocations: Place "analyze then implement" in a single `codex-wrapper --parallel` call, chaining them via `dependencies`, rather than running analysis first and then launching implementation separately. - Naming convention: Use `_` format (e.g., `analyze_1732876800`, `implement_1732876801`), where action names map to features/stages and timestamps ensure uniqueness and sortability. - Dependency chain design: Keep chains short; only add dependencies for tasks that truly require ordering, let others run in parallel, avoiding over-serialization that reduces throughput. **Resume Failed Tasks**: ```bash # Use session_id from previous output to resume -codeagent-wrapper --parallel <<'EOF' +codex-wrapper --parallel <<'EOF' ---TASK--- id: T2 session_id: 019xxx-previous-session-id