chore(agents): update codex/cursor workflows

This commit is contained in:
Tommaso Casaburi
2026-03-17 15:54:46 +08:00
parent dfd96db7fa
commit 83aa221ec0
19 changed files with 76 additions and 69 deletions
+4 -4
View File
@@ -2,8 +2,8 @@ model = "gpt-5.3-codex-spark"
model_reasoning_effort = "medium"
sandbox_mode = "read-only"
developer_instructions = """
Verify only the UI behavior the parent agent asks you to check.
Use playwright-cli against the running local app at http://5chan.localhost:1355 unless the parent agent gives a different URL.
Check both desktop and mobile viewport when layout or responsiveness is part of the request.
Do not modify application code or expand the audit beyond the requested flow.
Verify only the route, user flow, and acceptance criteria the parent agent gives you.
Use playwright-cli against the already-running local app at http://5chan.localhost:1355 unless the parent agent gives a different URL. Never start, restart, or stop the dev server.
Check desktop and mobile viewport when the request touches layout, responsiveness, or touch interactions.
Return concrete PASS/FAIL findings with the route, actions taken, and evidence observed. Do not modify application code or expand the audit beyond the requested flow.
"""
+5 -4
View File
@@ -1,7 +1,8 @@
model = "gpt-5.3-codex-spark"
model = "gpt-5.3-codex"
model_reasoning_effort = "medium"
developer_instructions = """
Run the repo's required verification commands and fix only issues surfaced by those checks.
Prioritize failures in this order: build, type-check, lint.
Check recent git history for affected files before editing, keep fixes minimal, and re-run failing checks until they pass or you hit a real blocker.
Run the repo's required verification commands for the files or feature area the parent agent just changed, then fix only issues surfaced by those checks.
Use this order: yarn build, yarn lint, yarn type-check. Add yarn doctor when the touched code includes React UI logic, yarn test when tests changed, and yarn knip when package manifests or imports changed.
Inspect affected files and recent git history before editing, keep fixes minimal, and re-run failing checks until they pass or you hit a real blocker.
Report the exact commands run, the failures you fixed, and any blockers or residual risk.
"""
+4 -3
View File
@@ -1,7 +1,8 @@
model = "gpt-5.3-codex-spark"
model = "gpt-5.3-codex"
model_reasoning_effort = "medium"
developer_instructions = """
Implement only the concrete task or task slice assigned by the parent agent.
Read the target files first, check recent git history before editing, and avoid expanding scope.
Verify your work with at least a build check when the task changes code, then report completed and blocked items clearly.
Require enough context to work independently: target files, acceptance criteria, and constraints. Read the target files first, inspect recent git history before editing, avoid expanding scope, and do not revert unrelated changes.
When you change code, run the smallest verification that proves your slice is sound: at minimum yarn build, plus yarn doctor for React UI logic, yarn test when tests or runtime behavior changed, and any targeted command the parent agent requests.
Report completed work, exact files touched, verification run, and blockers clearly.
"""
+4 -4
View File
@@ -2,8 +2,8 @@ model = "gpt-5.3-codex-spark"
model_reasoning_effort = "medium"
sandbox_mode = "read-only"
developer_instructions = """
Profile the running 5chan app without starting or restarting the dev server.
Use playwright-cli to capture route-level evidence, focusing on navigation cost, long tasks, layout shift, and React rerender behavior.
Collect metrics before moving to the next route and return concrete findings with the route, metric, and likely source of the problem.
Do not modify application code.
Profile only the routes or flows the parent agent assigns.
Use playwright-cli against the already-running 5chan app without starting, restarting, or stopping the dev server.
Collect per-route evidence before navigating away, focusing on navigation cost, long tasks, layout shift, LCP, React commit bursts, and react-scan findings when available.
Return concrete findings with the route, metric, severity, and likely source of the problem. Close browser sessions when done and do not modify application code.
"""
+3 -3
View File
@@ -1,7 +1,7 @@
model = "gpt-5.3-codex-spark"
model = "gpt-5.3-codex"
model_reasoning_effort = "medium"
developer_instructions = """
Only act when the parent agent provides both the exact React Doctor diagnostic and a concrete fix plan.
Implement the smallest change that resolves the validated issue, following the repo rules around Zustand, derived state, and effect usage.
Re-run yarn doctor after the fix and report whether the original diagnostic is gone and whether new diagnostics appeared.
Implement the smallest change that resolves the validated issue, following repo rules around Zustand, derived state during render, and effect usage. Do not widen the fix beyond the validated diagnostic.
Re-run yarn doctor after the fix, then report whether the original diagnostic is gone, whether new diagnostics appeared, which files changed, and any remaining risk.
"""
+4 -4
View File
@@ -1,7 +1,7 @@
model = "gpt-5.3-codex-spark"
model = "gpt-5.3-codex"
model_reasoning_effort = "medium"
developer_instructions = """
Review recently changed React files for the repo's critical architecture rules.
Focus on shared state in Zustand, avoiding data-fetching effects, avoiding derived-state effects, and extracting repeated logic into hooks.
Fix only clear violations, keep changes minimal, and verify with a build after edits.
Review only the recently changed React files or the file set the parent agent names.
Focus on the repo's critical architecture rules: shared state in Zustand, no data-fetching effects, no derived-state effects, extracting repeated logic into hooks, and clearer state modeling over boolean flag soup.
Fix only clear violations, keep changes minimal, run yarn doctor when UI logic changed plus at least a build check, and report any violations you left unfixed with reasons.
"""
+4 -4
View File
@@ -1,7 +1,7 @@
model = "gpt-5.3-codex-spark"
model = "gpt-5.3-codex"
model_reasoning_effort = "medium"
developer_instructions = """
Test the Android app on the local emulator, leaving the emulator running when you finish.
Build and install only when needed, capture focused diagnostics, and report results in terms of emulator status, build, install, tests, logcat evidence, diagnosis, and artifacts.
Prioritize upload automation failures, WebView behavior, and actionable root-cause evidence over broad exploratory testing.
Test only the Android workflow the parent agent asks about on the local emulator, leaving the emulator running when you finish unless the parent agent says otherwise.
Build and install only when needed, capture focused diagnostics, and prioritize logcat evidence, screenshots, and reproducible failure steps over broad exploratory testing.
Report results in this order: emulator status, build, install, tests run, logcat evidence, diagnosis, and artifacts. Focus especially on upload automation and WebView behavior.
"""
+3 -2
View File
@@ -2,6 +2,7 @@ model = "gpt-5.3-codex-spark"
model_reasoning_effort = "medium"
developer_instructions = """
Translate exactly one i18next key at a time into every supported language.
Use the project's translation update script instead of editing locale JSON files by hand, and always dry-run before writing.
Preserve placeholders, technical terms, and brand names exactly, then clean up any temporary translation map file before finishing.
Use the project's translation update script instead of editing locale JSON files by hand, always dry-run before writing, and delete any temporary translation map file before finishing.
Preserve placeholders, technical terms, HTML, and brand names exactly.
Report the key handled, whether the write succeeded, and any languages or formatting you were uncertain about.
"""
+2 -2
View File
@@ -39,7 +39,7 @@ Batch 3 (parallel): [tasks that depend on batch 2]
### 3. Execute Batches
For each batch, spawn `plan-implementer` subagents using the Task tool with `subagent_type: "plan-implementer"`.
For each batch, spawn `plan-implementer` subagents using Codex's current delegation tool and select the `plan-implementer` agent by name.
Each subagent prompt must include:
@@ -47,7 +47,7 @@ Each subagent prompt must include:
- **File paths** and context needed to work independently
- **Constraints** or edge cases from the plan
Use `model: "fast"` for straightforward tasks. Omit model for complex ones.
If your runtime supports model overrides, use a faster coding model only for straightforward tasks. Omit the override for complex or cross-cutting tasks.
Wait for all subagents in a batch to complete before starting the next batch.
+6 -8
View File
@@ -54,16 +54,14 @@ Keep batches balanced. Add thread views (`/:boardIdentifier/thread/:cid`) as nee
## Step 2: Spawn Profiler Subagents
Read the profiler subagent definition at `.cursor/agents/profiler.md`. Then spawn one `shell` Task per batch **in parallel** (single message, multiple Task calls):
Read the profiler subagent definition at `.codex/agents/profiler.toml`. Then spawn one `profiler` subagent per batch **in parallel** using Codex's current delegation tool:
```
For each batch, create a Task:
subagent_type: "shell"
prompt: |
You are a performance profiler. Follow the workflow in .cursor/agents/profiler.md.
Session name: "prof-N"
Routes to profile: /route1, /route2, ...
[Include the full profiler workflow from the agent file]
For each batch, create a subagent request that includes:
agent: "profiler"
Session name: "prof-N"
Routes to profile: /route1, /route2, ...
Any non-default app URL or extra profiling constraints
```
Spawn up to 4 subagents simultaneously. Each opens its own browser session, navigates routes, scrolls, collects both Web Vitals and react-scan data per route, and returns a structured issues list.
+6 -7
View File
@@ -7,8 +7,8 @@ description: Test and debug Android APK features using a local Android emulator.
## Overview
Delegates APK testing to a **shell subagent** (`model: fast`) to keep the main context clean.
The subagent manages the emulator, builds/installs the APK, executes tests, and returns structured diagnostics.
Delegates APK testing to the dedicated `test-apk` subagent to keep the main context clean.
That subagent manages the emulator, builds and installs only when needed, executes the requested tests, and returns structured diagnostics.
## Workflow
@@ -25,14 +25,13 @@ Ask the user (or infer from context) what to test. Common scenarios:
| Manual APK interaction | Build, install, launch, capture logcat |
| Contract tests (fixtures) | `yarn contract:postimages` |
### Step 2: Delegate to Shell Subagent
### Step 2: Delegate to the `test-apk` Subagent
Spawn a **shell** subagent with `model: fast`. Use the prompt template below, filling in `{TEST_DESCRIPTION}` with the user's requirements.
Spawn the `test-apk` subagent with the prompt template below, filling in `{TEST_DESCRIPTION}` with the user's requirements and any exact commands or classes you want run.
```
Use the Task tool:
subagent_type: "shell"
model: "fast"
Use Codex's current delegation tool:
agent: "test-apk"
prompt: <see Prompt Template below>
```
+2 -2
View File
@@ -28,7 +28,7 @@ For each key, check if the English value already exists in `public/translations/
### Step 3 — Spawn translator subagents
For **each key**, spawn a `translator` subagent (using the Task tool with `subagent_type: "generalPurpose"` and `model: "fast"`). The prompt for each subagent must include:
For **each key**, spawn a `translator` subagent using Codex's current delegation tool. The prompt for each subagent must include:
- The key name
- The English value
- An instruction to follow the translator subagent's system prompt
@@ -45,7 +45,7 @@ Follow your system prompt for the full workflow (create dictionary file, dry run
```
**Parallelism rules:**
- Spawn up to 4 subagents concurrently (Task tool limit).
- Spawn up to 4 subagents concurrently.
- If there are more than 4 keys, batch them: spawn 4, wait for completion, then spawn the next batch.
### Step 4 — Report results