[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M70FPZYCTHE1VDY8H3577J0H":3,"skill-same:01M70FPZYCTHE1VDY8H3577J0H":63},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":32,"linkOnly":33,"markdownContent":34,"markdownBody":35,"frontMatter":36,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":13,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":42,"install":43,"resources":56},"01M70FPZYCTHE1VDY8H3577J0H","forge-coder",null,"Procedural coding skill. Reads implementation.md, validates diffs against the codebase, applies changes in execution order, runs tests after each commit group, and produces a coder-report.md artifact.","SirTheOracle\u002Fforge-toolkit","SirTheOracle","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F264051384?v=4","01M70FNRYMQR4XHVN77S3NJPAW","01M70FNRZAGW58XJ1CC6JRY1PA",0,"MIT","https:\u002F\u002Fgithub.com\u002FSirTheOracle\u002Fforge-toolkit\u002Fblob\u002Fmain\u002Fcodex-skills\u002Fforge-coder\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31],"forge","forge coder","coder","diffs","tests","execution","commit","changes","artifact","procedural","report","codebase","implementation","coding","2026-11-10 10:12:30",false,"---\nname: forge-coder\ndescription: >\n  Procedural coding skill. Reads implementation.md, validates diffs against\n  the codebase, applies changes in execution order, runs tests after each\n  commit group, and produces a coder-report.md artifact.\n---\n\n# Forge Coder Skill\n\n## You are overseen (Command Center)\n\nEvery task you receive is auto-registered by the command-center hook when your turn ends — you need\ndo nothing for it to appear on the operator's board. You MAY emit an optional one-line milestone at\na natural boundary; it is best-effort, never required.\n\n## Hard Constraints\n\n1. Never apply a diff if `old_string` does not exist in the target file — stop and report\n2. Never auto-fix a mismatched diff — report the mismatch exactly as found\n3. Never skip the pre-flight validation phase\n4. Never continue to the next commit group if tests fail in the current group\n5. Always write the coder report, even on failure — partial progress must be documented\n6. Never start\u002Fstop long-running services (backend, frontend) directly — rely on test commands that may auto-start them via Playwright webServer or similar\n7. One git commit per commit group — not one commit per step\n8. Never infer missing structure from prose — reject malformed implementation steps instead of guessing\n9. Never accept standalone `# new_file` blocks, partial-file placeholders, or commit-group tests that depend on later groups\n\n## When to Stop: turn ceiling and declared-file scope\n\nThese are additional entry conditions into the stop-and-report path Phase 4 already\ndefines for failing tests: **files stay modified but are NOT committed**, the coder\nreport records what is done and what remains, and you stop. They never override Hard\nConstraint 7 (one git commit per commit group) or Hard Constraint 4 (never continue to\nthe next commit group if tests fail). If you hit one of them mid-group you STOP and\nescalate — you do NOT commit a partial group to satisfy them, and you do NOT start a\nsecond commit for the same group.\n\n**Turn-duration ceiling — 30 minutes.** If a single uninterrupted turn reaches **30\nminutes** without producing a commit, stop. Never continue silently. Escalate with\n`forge ask` — or send a `BLOCKED` callback if you cannot proceed at all — describing\nwhat is done and what remains. The 30-minute number is a first calibration, reasoned\nfrom observed runaways rather than measured across runs; it is tunable, and changing it\nshould be a deliberate edit.\n\n**Declared-file scope guard.** Never edit a file outside the declared file list of the\ncommit group you are executing. Reading other files for context is allowed and is often\nnecessary. Editing outside that list — or concluding that work outside that list is\nrequired before the group can finish — is an escalation trigger, not something to\nresolve and note: stop and escalate.\n\n**Prefer recorded partial progress over open-ended diagnosis.** When a group is not\ncomplete, **record** what is done and what remains as known-incomplete in\n`coder-report.md` and stop. Record, do not commit: Hard Constraint 5 already requires\nthe report even on failure, and this states the preference for reaching it early rather\nthan continuing an unbounded investigation. A completed group whose tests pass still\ncommits normally. Concretely: diagnosing test assertions that belong to a *different*\ncommit group is out-of-scope work — stop and report the observation instead of pursuing\nit.\n\n## Required Reads\n\nBefore any coding action, read these files in order:\n\n1. `.claude\u002Fforge-project.yml` (fallback: `~\u002F.claude\u002Fforge-project.yml`) — project config\n2. `.dev\u002Fproposals\u002F{slug}\u002Fimplementation.md` — the spec to execute\n3. `.dev\u002Fproposals\u002F{slug}\u002Ffinal-plan.md` �� for context on intent (read, don't execute from this)\n4. `~\u002F.claude\u002Fskills\u002Fforge-coder\u002Freferences\u002Fcoder-report-format.md` — output template\n\n## Phase 0: Config Loading\n\n1. Read `.claude\u002Fforge-project.yml`\n   (fallback: `~\u002F.claude\u002Fforge-project.yml`)\n2. Build the substitution map for all tokens:\n\n| Token | Source | Fallback |\n|-------|--------|----------|\n| `{{project_name}}` | `project.name` | required |\n| `{{test_command}}` | `testing.backend.command` | `pytest` |\n| `{{activate_venv}}` | `testing.backend.activate_venv` | null |\n| `{{e2e_command}}` | `testing.frontend.e2e_command` | null |\n| `{{frontend_working_dir}}` | `services.frontend.working_dir` | null |\n| `{{backend_working_dir}}` | `services.backend.working_dir` | `.` |\n| `{{migration_system}}` | `database.migration_system` | `none` |\n| `{{migration_dir}}` | `database.migration_dir` | null |\n| `{{migration_command}}` | `database.migration_command` | null |\n| `{{lint_command}}` | `linting.backend.command` | null |\n| `{{lint_fix_command}}` | `linting.backend.fix_command` | null |\n| `{{frontend_lint_command}}` | `linting.frontend.command` | null |\n| `{{type_check_command}}` | `type_checking.backend.command` | null |\n| `{{frontend_type_check_command}}` | `type_checking.frontend.command` | null |\n\n3. If `forge-project.yml` is not found, report error and stop:\n   ```\n   FORGE-CODER ERROR: No forge-project.yml found. Create .claude\u002Fforge-project.yml\n   with project config before running the coder skill.\n   ```\n\n## Phase 1: Input Validation\n\n1. Read `.dev\u002Fproposals\u002F{slug}\u002Fimplementation.md` fully.\n2. Locate the **Coverage Matrix** section.\n3. Parse every row. If ANY plan item has `Status` = `GAP` or is missing coverage:\n   ```\n   FORGE-CODER REJECTED: Coverage matrix has gaps.\n   Missing coverage for: P3, P7\n   Re-run adversarial-implementation to produce complete coverage before coding.\n   ```\n   Stop. Do not proceed.\n\n4. Build a step list from the **Implementation Steps** section. For each step, record:\n   - Step number\n   - Target file path\n   - Whether it's a new file or modification\n   - The `old_string` (for modifications)\n   - The `new_string`\n   - Reject the document if a step:\n     - omits the file path\n     - contains more than one target file\n     - omits the `new_string`\n     - uses a standalone `# new_file` block instead of the normal `old_string\u002Fnew_string` pair\n     - relies on prose like \"rest of file unchanged\" or \"insert near\"\n   - Canonical new-file shape:\n     - `**Action**: new_file`\n     - `# old_string` body is exactly `# new file`\n     - `# new_string` contains the full file content\n\n5. **Pre-flight diff validation** — for every modification step (not new files):\n   - Read the target file\n   - Search for `old_string` in the file content\n   - Record: FOUND (with line number), NOT FOUND, or NOT UNIQUE\n\n6. Report pre-flight results:\n   ```\n   PRE-FLIGHT VALIDATION\n   Step 1: src\u002Ffoo\u002Fbar.py — FOUND (line 45)\n   Step 2: src\u002Ffoo\u002Fbaz.py — FOUND (line 112)\n   Step 3: tests\u002Ftest_foo.py — NEW FILE (skip)\n   Step 4: src\u002Ffoo\u002Fqux.py — NOT UNIQUE\n   Step 5: src\u002Ffoo\u002Fqux.py — NOT FOUND\n\n   Result: 2 validation failures. STOPPING.\n   Step 4: old_string matched multiple locations in src\u002Ffoo\u002Fqux.py\n   Step 5: old_string not found in src\u002Ffoo\u002Fqux.py\n   The file may have changed since implementation.md was written.\n   Re-run adversarial-implementation to produce updated diffs.\n   ```\n\n7. If ANY step has a mismatch, ambiguity, malformed diff structure, or non-runnable\n   commit-group test dependency: stop and report. Write a partial coder-report with\n   the validation failure. Do NOT attempt to apply any diffs.\n\n8. If all steps validate: report success and proceed.\n   ```\n   PRE-FLIGHT VALIDATION: All N steps validated. Proceeding.\n   ```\n\n## Phase 2: Branch Check\n\n1. Run `git status` to check working tree state.\n2. Run `git branch --show-current` to note the current branch.\n3. If working tree has uncommitted changes, warn but continue:\n   ```\n   WARNING: Working tree has uncommitted changes. Proceeding on branch: feat\u002Fmy-feature\n   ```\n4. The coder does NOT create branches — that is the orchestrator's responsibility.\n   The coder works on whatever branch it's given.\n\n## Phase 3: Apply Changes\n\nRead the **Commit Groups** section from implementation.md. If commit groups are defined,\nfollow them. If not, treat all steps as a single commit group.\n\nFor each commit group:\n\n1. Log the group:\n   ```\n   COMMIT GROUP 1: \"Add voice reassignment DB migration and ORM field\"\n   Steps: 1, 2, 3\n   ```\n\n2. For each step in the group, in order:\n\n   **For modifications (old_string -> new_string):**\n   - Use the Edit tool with the exact `old_string` and `new_string`\n   - After the edit, read the file to confirm `new_string` is present\n   - If the edit fails (old_string not unique or not found): stop immediately\n     ```\n     EDIT FAILED at Step 2: old_string not unique in src\u002Ffoo\u002Fbar.py\n     Found 2 occurrences. Need more context to disambiguate.\n     STOPPING. Manual intervention required.\n     ```\n\n   **For new files:**\n   - Require the canonical new-file shape from Phase 1\n   - Use the Write tool with the full content from `new_string`\n   - Confirm the file exists after writing\n\n   **For database migrations:**\n   - If the step creates a file in `{{migration_dir}}`, write it normally\n   - Note in the report that a migration was created\n   - Do NOT run `{{migration_command}}` automatically — tests should handle this,\n     or the orchestrator runs it post-coding\n\n3. After all steps in the group are applied, proceed to Phase 4 for this group.\n\n## Phase 4: Test After Each Group\n\nAfter completing a commit group:\n\n1. **Run group-specific tests** if the implementation.md specifies them:\n   ```\n   Tests to run: pytest tests\u002Funit\u002Ftest_voice.py -v\n   ```\n   The command must be runnable after the group's steps are applied. If the command\n   references a test file created in a later group, stop and report the implementation\n   as invalid instead of guessing a substitute.\n\n2. If no group-specific tests, determine which tests to run:\n   - If any backend files (`.py`) were changed: run `{{test_command}}`\n     from `{{backend_working_dir}}`\n     (activate venv first if `{{activate_venv}}` is configured)\n   - If any frontend files (`.ts`, `.tsx`, `.js`, `.jsx`) were changed:\n     run `{{e2e_command}}` from `{{frontend_working_dir}}`\n     (skip if `{{e2e_command}}` is null)\n\n3. **If tests PASS:**\n   - Write the group message to `.dev\u002Fforge-tmp\u002Fcommit-message.txt` and capture\n     `expected_head` from the current physical worktree.\n   - Invoke `forge-git-request commit` with `--root \"$PROJECT_ROOT\"`,\n     `--expected-head \"$expected_head\"`, the message file, `--`, and every group\n     path as a separate literal argument. Direct Git mutation is forbidden.\n   - On a typed broker conflict, record the exact code, expected\u002Fcurrent HEAD,\n     and submitted path list in `coder-report.md`, callback `BLOCKED`, and do not retry.\n   - Report the commit ID returned by the broker.\n\n4. **If tests FAIL:**\n   - Report the failure with full test output:\n     ```\n     COMMIT GROUP 1: TESTS FAILED\n     Command: pytest tests\u002Funit\u002Ftest_voice.py -v\n     Exit code: 1\n     Output:\n     [full test output]\n\n     STOPPING. Do not continue to next group.\n     Files are modified but NOT committed.\n     ```\n   - Write the coder report with partial progress\n   - Do NOT attempt to fix the failing tests\n   - Do NOT continue to the next commit group\n\n## Phase 5: Full Validation\n\nAfter ALL commit groups pass and are committed:\n\n1. **Full backend test suite:**\n   ```bash\n   {{activate_venv}} && {{test_command}}\n   ```\n   Record: total passed, failed, skipped, errors\n\n2. **Linter** (if configured):\n   ```bash\n   {{lint_command}}\n   ```\n   Record: pass\u002Ffail, number of issues\n\n3. **Type checker** (if configured):\n   ```bash\n   {{type_check_command}}\n   ```\n   Record: pass\u002Ffail, number of issues\n\n4. **Frontend tests** (if frontend files were changed and e2e is configured):\n   ```bash\n   cd {{frontend_working_dir}} && {{e2e_command}}\n   ```\n   Record: pass\u002Ffail\n\n5. **Frontend lint** (if configured):\n   ```bash\n   cd {{frontend_working_dir}} && {{frontend_lint_command}}\n   ```\n\n6. **Definition of Done** — walk the checklist from implementation.md.\n   For each item, check it off or note the failure.\n\n7. Full validation failures are **non-blocking** — the commits are already made.\n   Report the failures in the coder report but do not roll back.\n   The QA stage will catch regressions.\n\n## Phase 6: Report\n\nWrite `.dev\u002Fproposals\u002F{slug}\u002Fcoder-report.md` following the format in\n`references\u002Fcoder-report-format.md`.\n\nThis file is the primary artifact. It MUST be written even on failure —\npartial progress is valuable context for the orchestrator and QA.\n\nAdd the report path to the artifact list when reporting completion to forge.\n\n---\n\n## Invocation\n\nThis skill requires a **slug**. The slug identifies the pipeline directory\nat `.dev\u002Fproposals\u002F{slug}\u002F` where `implementation.md` and `final-plan.md`\nlive, and where `coder-report.md` will be written.\n\nThe caller is responsible for providing the slug and for any coordination\nsignaling. This skill focuses solely on executing the implementation and\nproducing the report.\n\n## Escalation: forge ask\n\nWhen you hit a **blocking human decision** — an irreversible action (dropping\ndata, force-pushing, deleting resources), a genuinely ambiguous requirement the\nplan does not settle, or a credential\u002Fbilling surprise — STOP and escalate\ninstead of guessing:\n\n```\nforge ask --slug {slug} --stage {stage} --worker {worker} \"\u003Cyour question>\"\n```\n\n`{slug}`, `{stage}`, and `{worker}` are surfaced in the stage prompt the\norchestrator dispatched to you — cite them verbatim. This keeps your pipeline\npending open and puts your question on the operator's board; their answer is\nrouted back to you. If those ids are unavailable, use\n`forge ask --session-scope \"\u003Cquestion>\"`. Either way `forge ask` never blocks or\nfails your run.\n\nDo NOT ask for things you can resolve and note: a reasonable default, a naming\nchoice, a locally-decidable assumption. Log those in `coder-report.md` under an\n\"Assumptions\" note and proceed. Ask-worthy = a human must decide before it is\nsafe to continue; proceed-and-note = you can continue and the report records it.\n\n**Exceptions to the do-not-ask line.** The two stop conditions in \"When to Stop: turn\nceiling and declared-file scope\" — the 30-minute turn-duration ceiling and the\ndeclared-file scope guard — are explicit exceptions to the paragraph above. They are\nask-worthy even though they look locally resolvable: a worker that is not making\nprogress, or that has concluded it must edit outside its declared file list, escalates\nrather than proceed-and-note. Precedence: both are entry conditions into the\nstop-and-report path and never override Hard Constraint 7 (one git commit per commit\ngroup) or Hard Constraint 4 (never continue past a failing group); a worker that hits\nthe ceiling mid-group stops and escalates, it does not commit to satisfy the ceiling.\n\n## Error Recovery\n\n| Error | Action |\n|-------|--------|\n| `forge-project.yml` not found | Stop, report missing config |\n| `implementation.md` not found | Stop, report missing input |\n| Coverage matrix has gaps | Stop, report which items are uncovered |\n| `old_string` not found in file | Stop at pre-flight, report all mismatches |\n| Edit tool fails (not unique) | Stop at that step, report the ambiguity |\n| Tests fail after commit group | Stop, report test output, do not continue |\n| Full validation fails | Report failure but do not roll back — commits stand |\n| Git commit fails | Report the error, files remain staged |\n\n## What This Skill Does NOT Do\n\n- Does not create branches (orchestrator's job)\n- Does not push to remote (orchestrator's job)\n- Does not start\u002Fstop services (tests handle this)\n- Does not run database migrations (tests or orchestrator handle this)\n- Does not fix failing tests (report and stop)\n- Does not interpret the plan — it executes the diffs literally\n- Does not spawn sub-agents — it is a single procedural executor\n","# Forge Coder Skill\n\n## You are overseen (Command Center)\n\nEvery task you receive is auto-registered by the command-center hook when your turn ends — you need\ndo nothing for it to appear on the operator's board. You MAY emit an optional one-line milestone at\na natural boundary; it is best-effort, never required.\n\n## Hard Constraints\n\n1. Never apply a diff if `old_string` does not exist in the target file — stop and report\n2. Never auto-fix a mismatched diff — report the mismatch exactly as found\n3. Never skip the pre-flight validation phase\n4. Never continue to the next commit group if tests fail in the current group\n5. Always write the coder report, even on failure — partial progress must be documented\n6. Never start\u002Fstop long-running services (backend, frontend) directly — rely on test commands that may auto-start them via Playwright webServer or similar\n7. One git commit per commit group — not one commit per step\n8. Never infer missing structure from prose — reject malformed implementation steps instead of guessing\n9. Never accept standalone `# new_file` blocks, partial-file placeholders, or commit-group tests that depend on later groups\n\n## When to Stop: turn ceiling and declared-file scope\n\nThese are additional entry conditions into the stop-and-report path Phase 4 already\ndefines for failing tests: **files stay modified but are NOT committed**, the coder\nreport records what is done and what remains, and you stop. They never override Hard\nConstraint 7 (one git commit per commit group) or Hard Constraint 4 (never continue to\nthe next commit group if tests fail). If you hit one of them mid-group you STOP and\nescalate — you do NOT commit a partial group to satisfy them, and you do NOT start a\nsecond commit for the same group.\n\n**Turn-duration ceiling — 30 minutes.** If a single uninterrupted turn reaches **30\nminutes** without producing a commit, stop. Never continue silently. Escalate with\n`forge ask` — or send a `BLOCKED` callback if you cannot proceed at all — describing\nwhat is done and what remains. The 30-minute number is a first calibration, reasoned\nfrom observed runaways rather than measured across runs; it is tunable, and changing it\nshould be a deliberate edit.\n\n**Declared-file scope guard.** Never edit a file outside the declared file list of the\ncommit group you are executing. Reading other files for context is allowed and is often\nnecessary. Editing outside that list — or concluding that work outside that list is\nrequired before the group can finish — is an escalation trigger, not something to\nresolve and note: stop and escalate.\n\n**Prefer recorded partial progress over open-ended diagnosis.** When a group is not\ncomplete, **record** what is done and what remains as known-incomplete in\n`coder-report.md` and stop. Record, do not commit: Hard Constraint 5 already requires\nthe report even on failure, and this states the preference for reaching it early rather\nthan continuing an unbounded investigation. A completed group whose tests pass still\ncommits normally. Concretely: diagnosing test assertions that belong to a *different*\ncommit group is out-of-scope work — stop and report the observation instead of pursuing\nit.\n\n## Required Reads\n\nBefore any coding action, read these files in order:\n\n1. `.claude\u002Fforge-project.yml` (fallback: `~\u002F.claude\u002Fforge-project.yml`) — project config\n2. `.dev\u002Fproposals\u002F{slug}\u002Fimplementation.md` — the spec to execute\n3. `.dev\u002Fproposals\u002F{slug}\u002Ffinal-plan.md` �� for context on intent (read, don't execute from this)\n4. `~\u002F.claude\u002Fskills\u002Fforge-coder\u002Freferences\u002Fcoder-report-format.md` — output template\n\n## Phase 0: Config Loading\n\n1. Read `.claude\u002Fforge-project.yml`\n   (fallback: `~\u002F.claude\u002Fforge-project.yml`)\n2. Build the substitution map for all tokens:\n\n| Token | Source | Fallback |\n|-------|--------|----------|\n| `{{project_name}}` | `project.name` | required |\n| `{{test_command}}` | `testing.backend.command` | `pytest` |\n| `{{activate_venv}}` | `testing.backend.activate_venv` | null |\n| `{{e2e_command}}` | `testing.frontend.e2e_command` | null |\n| `{{frontend_working_dir}}` | `services.frontend.working_dir` | null |\n| `{{backend_working_dir}}` | `services.backend.working_dir` | `.` |\n| `{{migration_system}}` | `database.migration_system` | `none` |\n| `{{migration_dir}}` | `database.migration_dir` | null |\n| `{{migration_command}}` | `database.migration_command` | null |\n| `{{lint_command}}` | `linting.backend.command` | null |\n| `{{lint_fix_command}}` | `linting.backend.fix_command` | null |\n| `{{frontend_lint_command}}` | `linting.frontend.command` | null |\n| `{{type_check_command}}` | `type_checking.backend.command` | null |\n| `{{frontend_type_check_command}}` | `type_checking.frontend.command` | null |\n\n3. If `forge-project.yml` is not found, report error and stop:\n   ```\n   FORGE-CODER ERROR: No forge-project.yml found. Create .claude\u002Fforge-project.yml\n   with project config before running the coder skill.\n   ```\n\n## Phase 1: Input Validation\n\n1. Read `.dev\u002Fproposals\u002F{slug}\u002Fimplementation.md` fully.\n2. Locate the **Coverage Matrix** section.\n3. Parse every row. If ANY plan item has `Status` = `GAP` or is missing coverage:\n   ```\n   FORGE-CODER REJECTED: Coverage matrix has gaps.\n   Missing coverage for: P3, P7\n   Re-run adversarial-implementation to produce complete coverage before coding.\n   ```\n   Stop. Do not proceed.\n\n4. Build a step list from the **Implementation Steps** section. For each step, record:\n   - Step number\n   - Target file path\n   - Whether it's a new file or modification\n   - The `old_string` (for modifications)\n   - The `new_string`\n   - Reject the document if a step:\n     - omits the file path\n     - contains more than one target file\n     - omits the `new_string`\n     - uses a standalone `# new_file` block instead of the normal `old_string\u002Fnew_string` pair\n     - relies on prose like \"rest of file unchanged\" or \"insert near\"\n   - Canonical new-file shape:\n     - `**Action**: new_file`\n     - `# old_string` body is exactly `# new file`\n     - `# new_string` contains the full file content\n\n5. **Pre-flight diff validation** — for every modification step (not new files):\n   - Read the target file\n   - Search for `old_string` in the file content\n   - Record: FOUND (with line number), NOT FOUND, or NOT UNIQUE\n\n6. Report pre-flight results:\n   ```\n   PRE-FLIGHT VALIDATION\n   Step 1: src\u002Ffoo\u002Fbar.py — FOUND (line 45)\n   Step 2: src\u002Ffoo\u002Fbaz.py — FOUND (line 112)\n   Step 3: tests\u002Ftest_foo.py — NEW FILE (skip)\n   Step 4: src\u002Ffoo\u002Fqux.py — NOT UNIQUE\n   Step 5: src\u002Ffoo\u002Fqux.py — NOT FOUND\n\n   Result: 2 validation failures. STOPPING.\n   Step 4: old_string matched multiple locations in src\u002Ffoo\u002Fqux.py\n   Step 5: old_string not found in src\u002Ffoo\u002Fqux.py\n   The file may have changed since implementation.md was written.\n   Re-run adversarial-implementation to produce updated diffs.\n   ```\n\n7. If ANY step has a mismatch, ambiguity, malformed diff structure, or non-runnable\n   commit-group test dependency: stop and report. Write a partial coder-report with\n   the validation failure. Do NOT attempt to apply any diffs.\n\n8. If all steps validate: report success and proceed.\n   ```\n   PRE-FLIGHT VALIDATION: All N steps validated. Proceeding.\n   ```\n\n## Phase 2: Branch Check\n\n1. Run `git status` to check working tree state.\n2. Run `git branch --show-current` to note the current branch.\n3. If working tree has uncommitted changes, warn but continue:\n   ```\n   WARNING: Working tree has uncommitted changes. Proceeding on branch: feat\u002Fmy-feature\n   ```\n4. The coder does NOT create branches — that is the orchestrator's responsibility.\n   The coder works on whatever branch it's given.\n\n## Phase 3: Apply Changes\n\nRead the **Commit Groups** section from implementation.md. If commit groups are defined,\nfollow them. If not, treat all steps as a single commit group.\n\nFor each commit group:\n\n1. Log the group:\n   ```\n   COMMIT GROUP 1: \"Add voice reassignment DB migration and ORM field\"\n   Steps: 1, 2, 3\n   ```\n\n2. For each step in the group, in order:\n\n   **For modifications (old_string -> new_string):**\n   - Use the Edit tool with the exact `old_string` and `new_string`\n   - After the edit, read the file to confirm `new_string` is present\n   - If the edit fails (old_string not unique or not found): stop immediately\n     ```\n     EDIT FAILED at Step 2: old_string not unique in src\u002Ffoo\u002Fbar.py\n     Found 2 occurrences. Need more context to disambiguate.\n     STOPPING. Manual intervention required.\n     ```\n\n   **For new files:**\n   - Require the canonical new-file shape from Phase 1\n   - Use the Write tool with the full content from `new_string`\n   - Confirm the file exists after writing\n\n   **For database migrations:**\n   - If the step creates a file in `{{migration_dir}}`, write it normally\n   - Note in the report that a migration was created\n   - Do NOT run `{{migration_command}}` automatically — tests should handle this,\n     or the orchestrator runs it post-coding\n\n3. After all steps in the group are applied, proceed to Phase 4 for this group.\n\n## Phase 4: Test After Each Group\n\nAfter completing a commit group:\n\n1. **Run group-specific tests** if the implementation.md specifies them:\n   ```\n   Tests to run: pytest tests\u002Funit\u002Ftest_voice.py -v\n   ```\n   The command must be runnable after the group's steps are applied. If the command\n   references a test file created in a later group, stop and report the implementation\n   as invalid instead of guessing a substitute.\n\n2. If no group-specific tests, determine which tests to run:\n   - If any backend files (`.py`) were changed: run `{{test_command}}`\n     from `{{backend_working_dir}}`\n     (activate venv first if `{{activate_venv}}` is configured)\n   - If any frontend files (`.ts`, `.tsx`, `.js`, `.jsx`) were changed:\n     run `{{e2e_command}}` from `{{frontend_working_dir}}`\n     (skip if `{{e2e_command}}` is null)\n\n3. **If tests PASS:**\n   - Write the group message to `.dev\u002Fforge-tmp\u002Fcommit-message.txt` and capture\n     `expected_head` from the current physical worktree.\n   - Invoke `forge-git-request commit` with `--root \"$PROJECT_ROOT\"`,\n     `--expected-head \"$expected_head\"`, the message file, `--`, and every group\n     path as a separate literal argument. Direct Git mutation is forbidden.\n   - On a typed broker conflict, record the exact code, expected\u002Fcurrent HEAD,\n     and submitted path list in `coder-report.md`, callback `BLOCKED`, and do not retry.\n   - Report the commit ID returned by the broker.\n\n4. **If tests FAIL:**\n   - Report the failure with full test output:\n     ```\n     COMMIT GROUP 1: TESTS FAILED\n     Command: pytest tests\u002Funit\u002Ftest_voice.py -v\n     Exit code: 1\n     Output:\n     [full test output]\n\n     STOPPING. Do not continue to next group.\n     Files are modified but NOT committed.\n     ```\n   - Write the coder report with partial progress\n   - Do NOT attempt to fix the failing tests\n   - Do NOT continue to the next commit group\n\n## Phase 5: Full Validation\n\nAfter ALL commit groups pass and are committed:\n\n1. **Full backend test suite:**\n   ```bash\n   {{activate_venv}} && {{test_command}}\n   ```\n   Record: total passed, failed, skipped, errors\n\n2. **Linter** (if configured):\n   ```bash\n   {{lint_command}}\n   ```\n   Record: pass\u002Ffail, number of issues\n\n3. **Type checker** (if configured):\n   ```bash\n   {{type_check_command}}\n   ```\n   Record: pass\u002Ffail, number of issues\n\n4. **Frontend tests** (if frontend files were changed and e2e is configured):\n   ```bash\n   cd {{frontend_working_dir}} && {{e2e_command}}\n   ```\n   Record: pass\u002Ffail\n\n5. **Frontend lint** (if configured):\n   ```bash\n   cd {{frontend_working_dir}} && {{frontend_lint_command}}\n   ```\n\n6. **Definition of Done** — walk the checklist from implementation.md.\n   For each item, check it off or note the failure.\n\n7. Full validation failures are **non-blocking** — the commits are already made.\n   Report the failures in the coder report but do not roll back.\n   The QA stage will catch regressions.\n\n## Phase 6: Report\n\nWrite `.dev\u002Fproposals\u002F{slug}\u002Fcoder-report.md` following the format in\n`references\u002Fcoder-report-format.md`.\n\nThis file is the primary artifact. It MUST be written even on failure —\npartial progress is valuable context for the orchestrator and QA.\n\nAdd the report path to the artifact list when reporting completion to forge.\n\n---\n\n## Invocation\n\nThis skill requires a **slug**. The slug identifies the pipeline directory\nat `.dev\u002Fproposals\u002F{slug}\u002F` where `implementation.md` and `final-plan.md`\nlive, and where `coder-report.md` will be written.\n\nThe caller is responsible for providing the slug and for any coordination\nsignaling. This skill focuses solely on executing the implementation and\nproducing the report.\n\n## Escalation: forge ask\n\nWhen you hit a **blocking human decision** — an irreversible action (dropping\ndata, force-pushing, deleting resources), a genuinely ambiguous requirement the\nplan does not settle, or a credential\u002Fbilling surprise — STOP and escalate\ninstead of guessing:\n\n```\nforge ask --slug {slug} --stage {stage} --worker {worker} \"\u003Cyour question>\"\n```\n\n`{slug}`, `{stage}`, and `{worker}` are surfaced in the stage prompt the\norchestrator dispatched to you — cite them verbatim. This keeps your pipeline\npending open and puts your question on the operator's board; their answer is\nrouted back to you. If those ids are unavailable, use\n`forge ask --session-scope \"\u003Cquestion>\"`. Either way `forge ask` never blocks or\nfails your run.\n\nDo NOT ask for things you can resolve and note: a reasonable default, a naming\nchoice, a locally-decidable assumption. Log those in `coder-report.md` under an\n\"Assumptions\" note and proceed. Ask-worthy = a human must decide before it is\nsafe to continue; proceed-and-note = you can continue and the report records it.\n\n**Exceptions to the do-not-ask line.** The two stop conditions in \"When to Stop: turn\nceiling and declared-file scope\" — the 30-minute turn-duration ceiling and the\ndeclared-file scope guard — are explicit exceptions to the paragraph above. They are\nask-worthy even though they look locally resolvable: a worker that is not making\nprogress, or that has concluded it must edit outside its declared file list, escalates\nrather than proceed-and-note. Precedence: both are entry conditions into the\nstop-and-report path and never override Hard Constraint 7 (one git commit per commit\ngroup) or Hard Constraint 4 (never continue past a failing group); a worker that hits\nthe ceiling mid-group stops and escalates, it does not commit to satisfy the ceiling.\n\n## Error Recovery\n\n| Error | Action |\n|-------|--------|\n| `forge-project.yml` not found | Stop, report missing config |\n| `implementation.md` not found | Stop, report missing input |\n| Coverage matrix has gaps | Stop, report which items are uncovered |\n| `old_string` not found in file | Stop at pre-flight, report all mismatches |\n| Edit tool fails (not unique) | Stop at that step, report the ambiguity |\n| Tests fail after commit group | Stop, report test output, do not continue |\n| Full validation fails | Report failure but do not roll back — commits stand |\n| Git commit fails | Report the error, files remain staged |\n\n## What This Skill Does NOT Do\n\n- Does not create branches (orchestrator's job)\n- Does not push to remote (orchestrator's job)\n- Does not start\u002Fstop services (tests handle this)\n- Does not run database migrations (tests or orchestrator handle this)\n- Does not fix failing tests (report and stop)\n- Does not interpret the plan — it executes the diffs literally\n- Does not spawn sub-agents — it is a single procedural executor\n",{"name":5,"description":7},"main","50bb36677eced958128cea262c304bf9ceee4d4e","codex-skills\u002Fforge-coder","https:\u002F\u002Fgithub.com\u002FSirTheOracle\u002Fforge-toolkit","https:\u002F\u002Fgithub.com\u002FSirTheOracle","2026-10-20 00:50:37",{"source":8,"skillName":5,"commands":44,"prompt":54,"zipAvailable":55},[45,48,51],{"tool":46,"command":47},"npx","npx skills add SirTheOracle\u002Fforge-toolkit --skill forge-coder",{"tool":49,"command":50},"bunx","bunx skills add SirTheOracle\u002Fforge-toolkit --skill forge-coder",{"tool":52,"command":53},"pnpm","pnpm dlx skills add SirTheOracle\u002Fforge-toolkit --skill forge-coder","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSirTheOracle\u002Fforge-toolkit\u002Fblob\u002Fmain\u002Fcodex-skills\u002Fforge-coder\u002FSKILL.md",true,[57],{"path":58,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Fcoder-report-format.md","REFERENCE","参考文档",2936,"https:\u002F\u002Fgithub.com\u002FSirTheOracle\u002Fforge-toolkit\u002Fblob\u002Fmain\u002Fcodex-skills\u002Fforge-coder\u002Freferences\u002Fcoder-report-format.md",[64,90,114,119,140,163],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":32},"01M70FS350DG1MT6NBPYRPBFBQ","forge-orchestrator","tmux-based orchestrator for multi-agent building. Coordinates work across Claude Code and two Codex workers via forge-bridge. Translates user requests into dispatched tasks with structured audit logging. Replaces forge-dispatch, forge-state.yml, and stage-routing-map.yml.","https:\u002F\u002Fgithub.com\u002FSirTheOracle\u002Fforge-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fforge-orchestrator\u002FSKILL.md",[],[18,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89],"orchestrator","forge orchestrator","bridge","map","code","tasks","across","work","audit","multi-agent","logging","tmux","for","audit logging","workers","stage","with","multi","state",{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":32},"01M70FRYFZC51YWHVNNS3862PY","forge-fix-runner","Drain the GitHub `forge-fix` issue queue through the forge fix pipeline, one service at a time. Tallies actionable issues worst-first, scouts a service into a routing plan (clusters + quick\u002Ffull tiers), gets human approval, then dispatches fixes (quick = dispatched fix-code; full = forge-pipeline), gating every `Closes #N` on per-issue verification. Trigger when the user wants to fix triaged QA issues, \"work the forge-fix queue\", or \"run the fix runner\".","https:\u002F\u002Fgithub.com\u002FSirTheOracle\u002Fforge-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fforge-fix-runner\u002FSKILL.md",[],[97,98,18,99,100,101,102,103,104,105,106,107,75,108,78,109,110,111,112,113],"runner","fix","forge fix runner","quick","pipeline","actionable","time","issues","qa","gating","when","verification","plan","human","run","at","issue",{"skillNo":115,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":32},"01M70FRVVW3JAGQQK3FFR2VYRC","https:\u002F\u002Fgithub.com\u002FSirTheOracle\u002Fforge-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Fforge-coder\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":32},"01M70FRRYF6E22ECC8AGYYJEQ7","fix-reproducer","Optional first stage of the fix-pipeline. Verifies a reported bug is reproducible and captures deterministic repro steps, environment state, and evidence. Single procedural executor — does not spawn sub-agents and does not diagnose. Branches by environment: dev path runs the bug locally; prod path gathers observational evidence from the deployed environment. Always writes repro.md, even on NOT REPRODUCED. Trigger when the user invokes a fix-pipeline with the reproduce step enabled.","https:\u002F\u002Fgithub.com\u002FSirTheOracle\u002Fforge-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Ffix-reproducer\u002FSKILL.md",[],[126,127,98,128,129,130,131,101,132,133,134,135,136,137,138,107,86,87,89,139],"reproducer","fix reproducer","deterministic","evidence","executor","diagnose","Reproducible","environment","trigger","branches","dev","single","repro","first",{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":32},"01M70FRN8THYBT2DJVX99XQ3CM","fix-plan-reviewer","Single-agent adversarial reviewer for fix plans. Reads diagnosis.md and fix-plan.md, verifies the plan actually addresses the diagnosed cause, attacks the plan from multiple angles (cause coverage, defense adequacy, scope correctness, regression risk, rollback integrity, test plan integrity, risk honesty), and produces fix-review.md with severity-rated issues. Does NOT propose fixes for the issues — that is the revise mode of adversarial-fix-plan. Does NOT re-investigate the diagnosis. Trigger as the review stage of a fix-pipeline, after adversarial-fix-plan has produced fix-plan.md.","https:\u002F\u002Fgithub.com\u002FSirTheOracle\u002Fforge-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Ffix-plan-reviewer\u002FSKILL.md",[],[147,98,148,109,149,150,151,152,101,153,154,104,155,156,157,158,159,160,161,162],"fix plan reviewer","reviewer","plan reviewer","coverage","scope","regression","re","mode","review","diagnosis","defense","integrity","addresses","revise","attacks","as",{"skillNo":164,"name":165,"nameZh":6,"description":166,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":167,"categories":168,"keywords":169,"publishedAt":32},"01M70FRHGG6HN0VW483NDKX161","fix-coder","Mechanical single-executor that applies a vetted fix plan to the codebase. Reads fix-plan.md (the Changes, Defenses, and Test Plan sections), translates file-level changes into concrete diffs, applies them, runs the test plan, validates that the bug is no longer reproducible (dev) or that the test exercising the failing path passes (prod), and produces a single fix commit. Stays strictly in scope: does NOT modify the plan, does NOT re-investigate, does NOT touch files outside the plan. Always writes fix-coder-report.md, even on failure. Trigger as the implementation stage of a fix-pipeline, after fix-plan-reviewer has approved fix-plan.md.","https:\u002F\u002Fgithub.com\u002FSirTheOracle\u002Fforge-toolkit\u002Fblob\u002Fmain\u002Fskills\u002Ffix-coder\u002FSKILL.md",[],[98,170,20,130,151,101,153,171,172,21,173,24,148,109,174,175,162,176,132,134],"fix coder","failing","mechanical","files","bug","path","test plan"]