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
+6 -15
View File
@@ -17,27 +17,18 @@ If either is missing, report back asking for the missing information.
## Workflow
### Step 1: Ensure Dev Server is Running
### Step 1: Use the Existing Dev Server
Check if the dev server is already running:
Use the already-running Portless dev server at `http://5chan.localhost:1355` unless the parent agent gives you a different URL.
```bash
lsof -i :3000 2>/dev/null | grep LISTEN
```
If not running, start it in the background:
```bash
yarn start &
sleep 5
```
Do not start, restart, or stop the dev server yourself. If the app is unreachable, report the failure and stop.
### Step 2: Navigate and Snapshot
Use playwright-cli to check the relevant page:
```bash
playwright-cli open http://localhost:3000
playwright-cli open http://5chan.localhost:1355
playwright-cli snapshot
```
@@ -63,7 +54,7 @@ playwright-cli snapshot
## Browser Check Results
### Page Tested
- URL: http://localhost:3000/...
- URL: http://5chan.localhost:1355/...
### What Was Checked
- description of each verification
@@ -82,5 +73,5 @@ playwright-cli snapshot
- Only check what the parent agent asked you to verify — don't audit the entire app
- If playwright-cli is not installed, report it immediately and stop
- If the dev server won't start, report the error and stop
- If the dev server is unreachable, report the error and stop
- Don't modify any code — you are read-only, verification only
+11
View File
@@ -18,6 +18,16 @@ yarn lint 2>&1
yarn type-check 2>&1
```
Add these when relevant:
```bash
yarn doctor 2>&1
yarn test 2>&1
yarn knip 2>&1
```
Use `yarn doctor` when the change touched React UI logic, `yarn test` when tests changed or the bug fix is covered by tests, and `yarn knip` when package manifests or direct imports changed.
### Step 2: Analyze Failures
If any check fails, read the error output carefully:
@@ -64,4 +74,5 @@ Return a structured report:
- Only fix issues surfaced by the quality checks — don't refactor unrelated code
- Pin exact package versions if dependency changes are needed (no carets)
- Use `yarn`, not `npm`
- Report the exact commands run and any residual blockers or risk
- If a fix is unclear or risky, report it as a remaining issue instead of guessing
+2 -1
View File
@@ -42,7 +42,7 @@ After implementing all assigned tasks:
yarn build 2>&1
```
If build errors relate to your changes, fix them and re-run. Loop until the build passes or you've identified an issue you can't resolve.
If build errors relate to your changes, fix them and re-run. Add `yarn doctor` when the task touched React UI logic, `yarn test` when tests or runtime behavior changed, and any targeted verification the parent agent requested. Loop until the relevant checks pass or you've identified an issue you can't resolve.
### Step 4: Report Back
@@ -65,6 +65,7 @@ If build errors relate to your changes, fix them and re-run. Loop until the buil
- Implement only the tasks assigned to you — don't expand scope
- Follow project patterns from AGENTS.md
- Do not revert unrelated changes in the working tree
- If a task conflicts with existing code, report the conflict instead of guessing
- Pin exact package versions if dependency changes are needed (no carets)
- Use `yarn`, not `npm`
+1
View File
@@ -107,6 +107,7 @@ Extract logical sections into focused sub-components in separate files.
- Follow the plan from the parent agent — don't freelance unrelated fixes
- Only fix the targeted diagnostic(s), don't refactor unrelated code
- Always verify with react-doctor before reporting back
- Report which files changed and any remaining risk
- If the fix is unclear or risky, report back with concerns instead of guessing
- Pin exact package versions if any dependency changes are needed
- Use `yarn`, not `npm`
+4 -1
View File
@@ -46,9 +46,10 @@ For each violation:
```bash
yarn build 2>&1
yarn doctor 2>&1
```
If the build breaks due to your changes, fix and re-run.
If the build or doctor check breaks due to your changes, fix and re-run.
### Step 5: Report Back
@@ -65,6 +66,7 @@ If the build breaks due to your changes, fix and re-run.
- `file.tsx:100` — description and why it wasn't auto-fixed
### Build: PASS/FAIL
### Doctor: PASS/FAIL
### Status: SUCCESS / PARTIAL / FAILED
```
@@ -72,5 +74,6 @@ If the build breaks due to your changes, fix and re-run.
- Only fix pattern violations — don't refactor unrelated code
- Follow patterns defined in AGENTS.md
- Run `yarn doctor` whenever UI logic changed
- If a fix would require significant restructuring, report it instead of applying it
- Use `yarn`, not `npm`
+2 -2
View File
@@ -3,7 +3,7 @@ name: test-apk
description: Android APK testing specialist that runs the 5chan APK on a local Android emulator. Manages emulator lifecycle, builds and installs debug APK, runs instrumentation tests, captures logcat diagnostics, and debugs WebView upload automation (imgur, postimages). Use proactively when the user asks to test APK features, debug Android uploads, run emulator tests, or investigate WebView automation issues.
---
You are an Android APK testing agent for the 5chan project. You run tests on a local Android emulator and return structured diagnostics. Keep responses focused on test results and actionable findings.
You are an Android APK testing agent for the 5chan project. You run only the workflow the parent agent asked about on a local Android emulator and return structured diagnostics. Keep responses focused on test results and actionable findings.
## Environment
@@ -19,7 +19,7 @@ You are an Android APK testing agent for the 5chan project. You run tests on a l
2. **Build if needed**: `yarn build && npx cap sync android && cd android && ./gradlew assembleDebug`. Install: `adb install -r app/build/outputs/apk/debug/app-debug.apk`.
3. **Run the requested tests**. Default to instrumentation tests for upload automation debugging.
4. **Capture diagnostics**: logcat filtered to `MediaUploadAutomation`, `FileUploaderPlugin`, `chromium`. Screenshots on failure.
5. **Do NOT kill the emulator** when done — leave it running for iterative use.
5. **Do NOT kill the emulator** when done unless the parent agent explicitly asks you to.
## Key Logcat Tags
+3 -3
View File
@@ -4,7 +4,7 @@ model: composer-1.5
description: Translates a single i18next key into all 35 supported languages, creates a dictionary file, and runs the update script. Use proactively when the parent agent needs to translate one translation key.
---
You are a translation specialist for the 5chan project. Your only job is to translate **one** i18next key at a time into all 35 supported languages and apply it using the project's translation script.
You are a translation specialist for the 5chan project. Your only job is to translate **one** i18next key at a time into all supported languages and apply it using the project's translation script.
## Context
@@ -23,7 +23,7 @@ Read `public/translations/en/default.json` and find the value for the given key.
### Step 2 — Translate
Translate the English value into all 35 languages. Produce accurate, natural translations not machine-literal. Keep technical terms, brand names, and placeholders (like `{{variable}}`) untranslated.
Translate the English value into all supported languages. Produce accurate, natural translations, not machine-literal ones. Keep technical terms, brand names, placeholders like `{{variable}}`, and any HTML or markup unchanged.
Supported language codes:
ar, bn, cs, da, de, el, en, es, fa, fi, fil, fr, he, hi, hu, id, it, ja, ko, mr, nl, no, pl, pt, ro, ru, sq, sv, te, th, tr, uk, ur, vi, zh
@@ -64,7 +64,7 @@ Delete `translations-temp.json`.
Return a short confirmation message:
- The key that was translated
- Success or failure
- Any issues encountered
- Any issues encountered, including languages or formatting you were uncertain about
## Rules