计算机使用智能体分类English
R02.01.01.03 · 任务小类

迁移与现代化

Migration & modernization

Upgrade frameworks, languages or APIs across a codebase.

20 条本项目编写的提案 · 分类 v1.1 · 新增基准运行 0 次。下方验证方式与部分得分规则是设计,不是执行结果。

典型应用
git · compilers · codemods
小类 GUI 需求标签
CL · CLI 足够

任务提案 · 20

展开查看完整原文与建议检查方式;两种界面均保留提案英文原文。

R02.01.01.03-T01 Port a Python 2.7 scientific analysis package to Python 3.12

原始指令

Repo `/work/spectra-py2` is a Python 2.7 package (print statements, integer division, `dict.iteritems`, `cPickle`, old NumPy APIs). Port it to Python 3.12 with current NumPy/SciPy, keeping numerical outputs identical on the provided datasets. Python 2 support may be dropped.

平台
lin · Linux mac · macOS
应用
Python · pytest · NumPy
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令
工作产物
WP06 · 代码 / 工程
条件
未声明
提案难度
3 / 5

建议验证方式

Hidden tests on Python 3.12: outputs on 12 datasets match stored Py2 results (rtol 1e-12); legacy pickles load via compatibility shim; `python -W error::DeprecationWarning -m pytest` passes; no 2to3 leftovers (six, __future__).

建议部分得分

50% numerical parity; 20% pickle compatibility; 20% no deprecation warnings; 10% cleanup

R02.01.01.03-T02 Upgrade a Django 3.2 project to Django 5.1

原始指令

Project `/work/clinic-django` runs on Django 3.2 with deprecated APIs (`url()`, `ugettext`, `JSONField` from contrib.postgres, `DEFAULT_AUTO_FIELD` unset, old `USE_L10N`). Upgrade to Django 5.1 and compatible third-party packages, keeping migrations consistent and all behavior intact.

平台
lin · Linux
应用
Django · pip · pytest
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令
工作产物
WP06 · 代码 / 工程
条件
未声明
提案难度
4 / 5

建议验证方式

Under Django 5.1: hidden suite (380 tests) green; `manage.py check --deploy` no new errors; `makemigrations --check` reports no changes; migrations apply on a 3.2-era DB snapshot; -W error for RemovedInDjango warnings.

建议部分得分

40% suite green; 20% migrations clean on old snapshot; 20% no deprecation warnings; 20% deps resolved

R02.01.01.03-T03 Convert React class components to function components with hooks

原始指令

App `/work/crm-react` has 18 class components using lifecycle methods, `this.setState` callbacks and legacy context. Convert all to function components with hooks (including a custom hook for the shared polling logic) without changing rendered output or behavior. React stays at 18.

平台
lin · Linux mac · macOS win · Windows
应用
React · Jest · Testing Library
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令
工作产物
WP06 · 代码 / 工程
条件
未声明
提案难度
3 / 5

建议验证方式

Hidden RTL tests and DOM snapshot tests for all 18 components pass; AST check finds no `extends React.Component`; no `act()` warnings; polling custom hook exists and is used by 3 components.

建议部分得分

50% behavior/snapshots preserved; 30% all classes converted; 20% custom hook + clean warnings

R02.01.01.03-T04 Migrate an AngularJS 1.x admin app to Angular 18

原始指令

App `/work/legacy-admin` is AngularJS 1.8 (controllers, `$scope`, `$http`, ui-router, 9 screens). Rewrite it as an Angular 18 app with standalone components and the Angular router, preserving routes, forms, validation messages and API calls against the existing mock backend.

平台
lin · Linux mac · macOS win · Windows
应用
Angular CLI · Playwright
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令
工作产物
WP06 · 代码 / 工程
条件
long · 长流程
提案难度
5 / 5

建议验证方式

Hidden Playwright journeys (40) written against the AngularJS app replay against the new app with identical API calls (HAR comparison) and DOM text; no angular.js in bundle; `ng build` and `ng test` green.

建议部分得分

60% journeys pass (scaled); 20% API call parity; 20% build/tests and no AngularJS

R02.01.01.03-T05 Move a Java 8 service to Java 21 and Jakarta EE namespaces

原始指令

Maven service `/work/claims-svc` targets Java 8, uses `javax.*` (servlet, persistence, validation), Hibernate 5 and removed JDK APIs (`sun.misc.BASE64Encoder`, JAXB). Migrate to Java 21, Jakarta EE 10, Hibernate 6, and replace removed APIs, keeping behavior and DB schema.

平台
lin · Linux win · Windows mac · macOS
应用
Maven · OpenRewrite · JUnit
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令
工作产物
WP06 · 代码 / 工程
条件
未声明
提案难度
4 / 5

建议验证方式

Build with JDK 21 `mvn verify` green incl. hidden integration tests (Testcontainers Postgres); no javax.* imports remain (except javax.crypto etc. allowlist); schema validation `hbm2ddl=validate` passes on existing schema.

建议部分得分

35% compiles and runs on 21; 25% Jakarta migration; 20% removed APIs replaced; 20% integration tests

R02.01.01.03-T06 Fix a library for NumPy 2.x API and dtype changes

原始指令

Package `/work/imgstats` breaks on NumPy 2.1: removed aliases (`np.float_`, `np.Inf`), changed scalar repr, copy-keyword semantics in `np.array`, and type promotion changes (NEP 50). Make it work on NumPy 1.26 and 2.1 simultaneously with identical results.

平台
lin · Linux mac · macOS win · Windows
应用
NumPy · pytest · tox
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令
工作产物
WP06 · 代码 / 工程
条件
未声明
提案难度
3 / 5

建议验证方式

tox envs py312-numpy126 and py312-numpy21 both green on hidden tests; outputs identical across versions (bitwise for integer paths, rtol 1e-7 float); ruff NPY201 rule reports nothing.

建议部分得分

40% NumPy 2 green; 20% NumPy 1.26 still green; 30% cross-version parity; 10% lint

R02.01.01.03-T07 Remove jQuery from a multi-page site in favor of vanilla JavaScript

原始指令

Site `/work/municipal-site` uses jQuery 1.12 for DOM queries, event delegation, AJAX form submission, show/hide animations and a tabs plugin across 11 pages. Replace all of it with modern vanilla JS (ES2020), remove jQuery from the bundle, and keep identical behavior.

平台
lin · Linux mac · macOS win · Windows
应用
Node · Playwright · esbuild
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令
工作产物
WP06 · 代码 / 工程
条件
未声明
提案难度
3 / 5

建议验证方式

Hidden Playwright tests on all 11 pages (forms, tabs, accordions, delegated handlers on dynamic rows) pass; built JS contains no jQuery; bundle size reduced >= 60 KB; no console errors.

建议部分得分

60% behavior tests (scaled); 25% jQuery removed; 15% size + console clean

R02.01.01.03-T08 Reimplement a COBOL batch program in Python with byte-identical output

原始指令

`/work/cobol-payroll` contains a GnuCOBOL batch program (`PAYRUN.cbl`, copybooks, fixed-width input files) that computes payroll with COMP-3 fields and specific rounding. Reimplement it in Python 3.12 so that, for any valid input file, the output report and the fixed-width ledger file are byte-identical.

平台
lin · Linux
应用
GnuCOBOL · Python
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令
工作产物
WP06 · 代码 / 工程
条件
未声明
提案难度
5 / 5

建议验证方式

Hidden differential test: 300 generated input files (edge cases: negative adjustments, rounding ties, packed-decimal limits) produce byte-identical outputs vs the compiled COBOL; no subprocess call to cobc/the binary (AST/strace check).

建议部分得分

70% identical outputs (scaled); 20% edge-case files; 10% clean structure

R02.01.01.03-T09 Port a .NET Framework 4.8 WinForms tool to .NET 8

原始指令

Solution `C:\work\InventoryTool` targets .NET Framework 4.8 (WinForms, `System.Web.Script.Serialization`, `ConfigurationManager`, WCF client). Migrate to SDK-style projects on .NET 8 (WinForms), replace unsupported APIs, and keep the UI and behavior the same.

平台
win · Windows
应用
dotnet · Visual Studio · upgrade-assistant
交互表面
term · 终端 desk · 桌面 GUI
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令
工作产物
WP06 · 代码 / 工程
条件
未声明
提案难度
4 / 5

建议验证方式

`dotnet build -c Release` with net8.0-windows succeeds; hidden unit tests green; UI smoke test (FlaUI) opens main form and performs 5 scripted operations identically; WCF calls replaced and hit the mock service.

建议部分得分

35% builds on .NET 8; 25% APIs replaced; 25% unit tests; 15% UI smoke

R02.01.01.03-T10 Migrate a front-end build from Webpack 4 to Vite

原始指令

App `/work/shop-front` builds with Webpack 4 (custom loaders for SVG sprites, environment injection via DefinePlugin, proxy dev server, code splitting). Move it to Vite 5 with equivalent features and remove all webpack dependencies.

平台
lin · Linux mac · macOS win · Windows
应用
Vite · Node · Playwright
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令
工作产物
WP06 · 代码 / 工程
条件
未声明
提案难度
3 / 5

建议验证方式

`vite build` succeeds; no webpack packages in package.json/lockfile; hidden Playwright smoke on the built app passes; env vars injected; SVG sprite renders (DOM check); route chunks split (>= 4 JS chunks).

建议部分得分

35% build works; 25% features parity; 25% smoke tests; 15% webpack removed

R02.01.01.03-T11 Move a package from setup.py to a pyproject.toml build

原始指令

Package `/work/tinyorm` uses `setup.py` with `setup_requires`, a `version.py` read via exec, package data globs and a console script. Convert it to a PEP 621 `pyproject.toml` (hatchling), remove setup.py/setup.cfg, and keep the built wheel's contents and metadata equivalent.

平台
lin · Linux mac · macOS win · Windows
应用
pip · hatch · build
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令
工作产物
WP06 · 代码 / 工程
条件
未声明
提案难度
2 / 5

建议验证方式

`python -m build` succeeds; hidden check compares wheel file list and METADATA (name, version, deps, entry points, classifiers) with the old wheel; setup.py absent; console script runs.

建议部分得分

40% builds; 40% wheel equivalence; 20% legacy files removed

R02.01.01.03-T12 Convert a Node library from CommonJS to dual ESM/CJS

原始指令

Library `/work/tinyvalidate` is CommonJS. Convert sources to ESM and publish a dual package (ESM + CJS builds with an `exports` map and TypeScript types), so both `import` and `require` consumers work, including deep import `tinyvalidate/rules`.

平台
lin · Linux mac · macOS win · Windows
应用
Node · tsup · npm
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令
工作产物
WP06 · 代码 / 工程
条件
未声明
提案难度
3 / 5

建议验证方式

Hidden consumer fixtures (ESM, CJS, TS with moduleResolution node16 and bundler) install the packed tarball and pass; `publint` and `arethetypeswrong` report no errors; no dual-package hazard (single instance check).

建议部分得分

40% ESM+CJS consumers; 25% types resolve; 20% deep import; 15% lint tools clean

R02.01.01.03-T13 Upgrade a Vue 2 app to Vue 3

原始指令

App `/work/events-vue2` (Vue 2.7, Vuex 3, vue-router 3, filters, `$listeners`, event bus, `Vue.set`). Upgrade to Vue 3, Pinia and vue-router 4, removing deprecated patterns, with the same behavior across its 12 views.

平台
lin · Linux mac · macOS win · Windows
应用
Vue · Vite · Vitest
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令
工作产物
WP06 · 代码 / 工程
条件
未声明
提案难度
4 / 5

建议验证方式

Hidden Playwright journeys (25) pass; Vue 3 + Pinia in lockfile, no Vuex/@vue/compat; no runtime warnings in console; unit tests green.

建议部分得分

50% journeys; 25% stack upgraded; 25% warnings clean + units

R02.01.01.03-T14 Rewrite SQLAlchemy 1.x query code in 2.0 style

原始指令

Service `/work/ledger-sa` uses SQLAlchemy 1.3 patterns (`session.query`, implicit autocommit, `engine.execute`, string-based relationships with `lazy='dynamic'`). Migrate to SQLAlchemy 2.0 style (select(), explicit transactions, typed `Mapped[]` models), with `SQLALCHEMY_WARN_20=1` clean before the upgrade.

平台
lin · Linux
应用
SQLAlchemy · pytest · Postgres
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令
工作产物
WP06 · 代码 / 工程
条件
未声明
提案难度
3 / 5

建议验证方式

Hidden suite green on SQLAlchemy 2.0 with -W error; SQL emitted for 10 key queries equals expected (query count and shape via event listener); mypy with the SQLAlchemy plugin clean.

建议部分得分

40% suite on 2.0; 25% no warnings; 20% query parity; 15% typing

R02.01.01.03-T15 Modernize Fortran 77 numerical code into Fortran 2008 modules

原始指令

`/work/heatsolve-f77` is fixed-form Fortran 77 with COMMON blocks, implicit typing, GOTO loops and EQUIVALENCE. Convert to free-form Fortran 2008 modules with `implicit none`, explicit interfaces and allocatable arrays, keeping results identical to the original on the provided test cases.

平台
lin · Linux
应用
gfortran · CMake · fpm
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令
工作产物
WP06 · 代码 / 工程
条件
未声明
提案难度
4 / 5

建议验证方式

Hidden cases (8 grids) match original output to 1e-12 relative; `gfortran -std=f2008 -Wall -Werror` compiles; no COMMON/EQUIVALENCE/implicit typing (source scan); runtime within 1.2x of original.

建议部分得分

50% numerical parity; 30% modern-standard compile; 20% legacy constructs gone

R02.01.01.03-T16 Port an Objective-C macOS module to Swift with interop intact

原始指令

Xcode project `/work/PhotoTagger` (macOS) has an Objective-C `TagIndex` module (NSMutableDictionary-based, KVO, blocks) used by Swift and ObjC callers. Rewrite it in Swift, exposed to ObjC via `@objc` where needed, with the ObjC callers unchanged.

平台
mac · macOS
应用
Xcode · xcodebuild · XCTest
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令
工作产物
WP06 · 代码 / 工程
条件
未声明
提案难度
4 / 5

建议验证方式

`xcodebuild test` passes hidden XCTests from both ObjC and Swift callers; no .m files remain for TagIndex; ObjC caller files unchanged (hash); KVO observers still fire (test).

建议部分得分

40% Swift rewrite builds; 30% interop tests; 20% KVO; 10% callers untouched

R02.01.01.03-T17 Convert a GOPATH-era Go project to Go modules

原始指令

Project `/work/gopath-app` builds only inside GOPATH with vendored deps from `dep` (Gopkg.toml/lock). Convert to Go modules with versions matching Gopkg.lock where possible, remove dep files, and make it build and test with Go 1.22 outside GOPATH.

平台
lin · Linux mac · macOS
应用
go
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令
工作产物
WP06 · 代码 / 工程
条件
未声明
提案难度
2 / 5

建议验证方式

Outside GOPATH with GO111MODULE=on: `go build ./...` and `go test ./...` green; go.mod versions equal Gopkg.lock revisions for 9/11 deps (2 need upgrades); Gopkg.* removed; `go mod tidy` no diff.

建议部分得分

40% builds outside GOPATH; 30% version fidelity; 30% tidy + tests

R02.01.01.03-T18 Convert a unittest suite to idiomatic pytest

原始指令

Repo `/work/geocode` has 140 `unittest.TestCase` tests with setUp/tearDown, `assertEqual` chains and mock patches. Convert them to pytest style (plain asserts, fixtures, parametrize for the repetitive cases, `monkeypatch`/`mocker`), keeping the same coverage.

平台
lin · Linux mac · macOS win · Windows
应用
pytest · coverage
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令
工作产物
WP06 · 代码 / 工程
条件
未声明
提案难度
2 / 5

建议验证方式

pytest collects >= 140 test cases (parametrized count) all passing; no TestCase subclasses remain; line coverage of src within 0.5 pp of before; mutation testing kill rate not lower (mutmut subset).

建议部分得分

40% all converted and passing; 30% coverage preserved; 30% mutation kill rate preserved

R02.01.01.03-T19 Migrate a client from a deprecated v1 REST API to v2 with breaking changes

原始指令

Library `/work/shipclient` calls the mock carrier API v1, which is being removed. v2 (OpenAPI spec in `specs/v2.yaml`) changes auth to OAuth client credentials, paginates with cursors, renames fields and returns amounts in minor units. Migrate the client, keeping the library's public interface unchanged.

平台
lin · Linux mac · macOS
应用
Python · pytest · Prism mock
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令
工作产物
WP06 · 代码 / 工程
条件
未声明
提案难度
3 / 5

建议验证方式

Hidden tests against the Prism v2 mock (v1 mock disabled): all public methods return the same objects as before for 30 scenarios; token refresh on expiry; full pagination; amounts converted exactly.

建议部分得分

30% auth; 25% pagination; 25% field/amount mapping; 20% public API unchanged

R02.01.01.03-T20 Upgrade a Rails 5.2 application to Rails 7.1

原始指令

App `/work/library-rails` runs Rails 5.2 on Ruby 2.6 with Sprockets, Paperclip, `update_attributes`, classic autoloader and Rails UJS. Upgrade to Ruby 3.3 and Rails 7.1 (Zeitwerk, Active Storage replacing Paperclip with a data migration for existing attachments), keeping behavior.

平台
lin · Linux mac · macOS
应用
Rails · Bundler · RSpec
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令
工作产物
WP06 · 代码 / 工程
条件
long · 长流程
提案难度
5 / 5

建议验证方式

Hidden RSpec + system specs green on Rails 7.1; `bin/rails zeitwerk:check` OK; attachments of seeded records accessible via Active Storage with identical checksums; no deprecation warnings with ActiveSupport::Deprecation raise.

建议部分得分

35% suite green; 25% attachment migration; 20% Zeitwerk; 20% deprecations clean

已有研究映射

当前映射未给此小类指定基准参考。

同工作流族的小类