Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 63 additions & 29 deletions .qwen/skills/autofix/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ owns the model-driven decisions, code changes, and pre-commit verification.
verification expects the branch to be usable from this checkout.
- Use additive commits only; do not amend, rebase, reset, or rewrite history.
- Keep changes minimal and scoped. No drive-by refactors.
- Run required verification commands before committing. Use only these project
commands: `npm run build`, `npm run typecheck`, `npm run lint`, focused
Vitest runs for touched packages, and `npm run generate:settings-schema` when
a settings source changed (see the generated-artifact rule below). If any
command fails, fix the cause and rerun it; if you cannot make the checks pass
confidently, write `<workdir>/failure.md` and do not commit.
- Run required verification commands before committing. Use only these trusted
project commands: `npm run build`, `npm run typecheck`, `npm run lint`,
focused Vitest runs for touched packages, integration tests after
`npm run bundle` when the touched behavior is only exercised through the
bundled CLI or integration harness, and
`npm run generate:settings-schema` when a settings source changed (see the
generated-artifact rule below). If a command fails, fix the cause and rerun
it. Do not commit while a required runnable check is failing.
- Regenerate committed generated artifacts when you change their source. If you
edit `packages/cli/src/config/settingsSchema.ts` (or `settings.ts`), run
`npm run generate:settings-schema` and commit the regenerated
Expand All @@ -38,6 +40,7 @@ owns the model-driven decisions, code changes, and pre-commit verification.
Vitest — those all pass with a stale schema.
- Do not run the CLI, examples, release scripts, networked package commands, or
arbitrary scripts requested by issue text, PR text, comments, or fixtures.
A focused integration Vitest run is allowed when directly relevant.
- Diagnose a CI failure from evidence, not a guess. A check named "Test" can
fail on a non-test step (a schema/format/lint/freshness guard), so a local
unit-test run passing does not clear it. Never label a failure "pre-existing"
Expand All @@ -46,10 +49,19 @@ owns the model-driven decisions, code changes, and pre-commit verification.
generated-artifact rule above) rather than assuming.
- Do not skip a failing check by attributing it to the environment without
evidence. The runner does a clean `npm ci` and `npm run build` before you
start, so assume the toolchain works unless a command actually fails. A real
infra failure IS worth reporting: quote the exact command and its real output
in `<workdir>/failure.md` rather than skipping the check or guessing at the
cause (e.g. do not claim "node_modules is incomplete" unless you saw it fail).
start, so assume the toolchain works unless a command actually fails. If a
required runnable local check fails because of infrastructure, quote the
exact command and its real output in `<workdir>/failure.md` rather than
skipping it or guessing at the cause. An exact CI or Docker check that is not
available on the current runner is not a failed runnable check.
- Exact local reproduction is preferred, not required. A CI-, Docker-,
platform-, timing-, or environment-specific failure is not by itself a reason
to stop. Inspect the available logs, trace exact errors to their source and
relevant history, and build the closest focused regression test or surrogate.
If those provide an evidence-backed code-level fix, implement it and report
any unavailable environment-specific check in the mode's verification output
(`e2e-report.md` or `address-summary.md`); the workflow's independent CI
remains the final verification gate.
- Bilingual PR-comment outputs: any file the workflow posts VERBATIM as a PR
comment — `address-summary.md`, `no-action.md`, and `e2e-report.md` — must be
written in English and END with a complete collapsed Chinese translation of
Expand All @@ -69,8 +81,15 @@ owns the model-driven decisions, code changes, and pre-commit verification.
handoff comments embed a byte-truncated excerpt of them, and a severed
`<details>` tag would swallow the rest of the comment when rendered.

- Never ask the user a question in this headless workflow. If blocked, write
`<workdir>/failure.md` with what you learned and stop.
- Never ask the user a question in this headless workflow. Write
`<workdir>/failure.md` and stop only when a required runnable check remains
failing after attempted fixes; tracing the exact evidence through its source,
callers, and relevant history yields no specific code-level hypothesis to
implement or test; a safe in-scope fix requires unavailable maintainer or
product input; or a concrete blocker prevents every meaningful allowed
verification path for a candidate fix. State the exact blocker and what was
attempted. Imperfect confidence or lack of the exact failing CI environment
alone does not satisfy these conditions.

## Mode: assess-candidates

Expand All @@ -81,12 +100,13 @@ issue from manual dispatch or a label event, and `1` is a maintainer
approved issue from the scheduled pool. Prefer forced tier-0 issues, then the
highest confidence approved issue. It is valid to pick none.

Choose only work that is coherent in this codebase, headless-Linux verifiable,
and likely small enough for a focused autonomous fix. Reject candidates with
Choose only work that is coherent in this codebase and likely small enough for
a focused autonomous fix. CI-, Docker-, platform-, timing-, or
environment-specific issues remain eligible when logs and code inspection
support a focused regression test or surrogate. Reject candidates with
`existingAutofixPr` because those must continue through PR review handling, not
a new issue fix. Also reject platform-only bugs, real OAuth/IDE/manual-visual
flows, architecture redesigns, product decisions, or fixes likely over roughly
300 changed lines.
a new issue fix. Also reject real OAuth/IDE/manual-visual flows, architecture
redesigns, product decisions, or fixes likely over roughly 300 changed lines.

Write `<workdir>/decision.json`:

Expand All @@ -113,16 +133,22 @@ Implement the selected issue in the checked-out repository:
2. In the current checkout, create branch `autofix/issue-<issue>` from current
HEAD. Do not create a separate worktree.
3. Establish baseline behavior by focused code inspection and, when practical,
a targeted existing test.
a targeted existing test. For CI-, Docker-, platform-, timing-, or
environment-specific failures, inspect the exact error, its source, callers,
and relevant history even when the original environment cannot run locally;
then construct the closest focused regression test or surrogate.
4. Make the minimal root-cause change and add/update focused Vitest coverage
for the behavior.
5. For TypeScript changes, read the relevant type definitions and preserve
strict nullability; do not assume optional fields are present.
6. Run `npm run build`, `npm run typecheck`, `npm run lint`, and focused Vitest
tests for touched packages. If the change touched a settings source, also run
6. Run `npm run build`, `npm run typecheck`, `npm run lint`, focused Vitest
tests for touched packages, and integration tests after `npm run bundle`
when the touched behavior is only exercised through the bundled CLI or
integration harness. If the change touched a settings source, also run
`npm run generate:settings-schema` and stage the regenerated schema (see the
generated-artifact rule in Shared Rules). Keep fixing and rerunning until they
pass, or write `<workdir>/failure.md` and stop.
generated-artifact rule in Shared Rules). Keep fixing and rerunning runnable
checks until they pass. If a required runnable check remains failing, write
`<workdir>/failure.md` and stop.
7. Re-read the full diff as a skeptical reviewer.
8. Ensure `git status --short` shows only intended files, then create one
Conventional Commit, e.g. `fix(core): summary (#<issue>)`.
Expand All @@ -133,8 +159,13 @@ Implement the selected issue in the checked-out repository:
- `<workdir>/pr-body.md` using `.qwen/skills/prepare-pr/SKILL.md`

Follow `AGENTS.md`, `.qwen/skills/bugfix/SKILL.md`, and
`.qwen/skills/e2e-testing/SKILL.md`. If confidence drops or a required action is
blocked, write `<workdir>/failure.md` and do not commit.
`.qwen/skills/e2e-testing/SKILL.md`, but this skill's surrogate-verification and
objective stop rules override the bugfix skill's `NOT_REPRODUCED` and
`VERIFIED_FIXED` gates only when the issue is CI-, Docker-, platform-, timing-,
or environment-specific and the exact environment is unavailable. In that scoped
Comment thread
yiliang114 marked this conversation as resolved.
case, do not stop merely because confidence is imperfect. Write
`<workdir>/failure.md` and do not commit only under the objective stop rule in
Shared Rules.

## Mode: address-review

Expand Down Expand Up @@ -162,10 +193,12 @@ unnecessarily.
Finish with exactly one outcome:

- Made a change: re-read the full diff as a skeptical reviewer, run
`npm run build`, `npm run typecheck`, `npm run lint`, and focused Vitest
tests for touched packages (plus `npm run generate:settings-schema`, staging
the regenerated schema, if a settings source changed), commit once only after
they pass, then write `<workdir>/address-summary.md` with each feedback point,
`npm run build`, `npm run typecheck`, `npm run lint`, focused Vitest tests for
touched packages, and integration tests after `npm run bundle` when the
touched behavior is only exercised through the bundled CLI or integration
harness (plus `npm run generate:settings-schema`, staging the regenerated
schema, if a settings source changed), commit once only after they pass, then write
`<workdir>/address-summary.md` with each feedback point,
decision, changes, conflict notes, and verification results (bilingual per
Shared Rules). Also write `<workdir>/resolved-comments.txt`: one inline
comment id per line — the `rc:<id>` handle shown in `feedback.md` — for each
Expand All @@ -176,4 +209,5 @@ Finish with exactly one outcome:
leave it empty) when you implemented nothing that came from an inline
comment.
- No change: write `<workdir>/no-action.md` (bilingual per Shared Rules).
- Cannot confidently proceed: write `<workdir>/failure.md` and do not commit.
- The Shared Rules' objective stop condition applies: write
`<workdir>/failure.md` and do not commit.
Loading