Skip to content

Commit ea84882

Browse files
authored
Merge pull request #10 from Tonnodoubt/codex/mobile-next
收口 RN 移动端系统优化
2 parents 190f4bb + 6f792f3 commit ea84882

70 files changed

Lines changed: 3629 additions & 1106 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
name: check-compiler-errors
3+
description: "运行并修复编译或类型检查错误。用户提到 compiler/type-check/tsc/类型错误/编译失败/Kotlin native build 失败/CI compile failed 时使用。"
4+
---
5+
6+
# Check Compiler Errors
7+
8+
Use this skill when compile or type-check failures block validation.
9+
10+
## Command Order
11+
12+
Prefer repo scripts over ad hoc commands:
13+
14+
1. TypeScript: `npm run type-check`
15+
2. Lint when relevant: `npm run lint`
16+
3. Unit/package tests when type fixes affect behavior: `npm run test:unit` or `npm run test --workspaces --if-present`
17+
4. Android/native changes: `cd android && ./gradlew assembleDebug --no-daemon`
18+
19+
If a script is missing, inspect `package.json` and use the closest existing command. Do not add a new dependency or script unless the user asks.
20+
21+
## Workflow
22+
23+
1. Run the smallest command that reproduces the compiler failure.
24+
2. Summarize errors by file and category.
25+
3. Fix the highest-confidence error first; prefer the canonical type boundary over casts.
26+
4. Re-run the same command.
27+
5. If one fix reveals the next compiler error, continue until clean or blocked.
28+
29+
## N.E.K.O.-RN Notes
30+
31+
- JS lip sync smoothing belongs in `LipSyncService`; Kotlin `PCMStreamPlayer` handles playback-head time alignment.
32+
- After Kotlin/native Android edits, Metro hot reload is insufficient; run the Gradle debug build.
33+
- For `@project_neko/*` package changes, check whether workspace tests or package sync are needed before declaring clean.
34+
35+
## Guardrails
36+
37+
- Never use `any` or broad casts just to quiet TypeScript unless there is no better local boundary.
38+
- Do not change runtime behavior while fixing a pure type error unless the compiler exposed a real bug.
39+
- Do not edit `.env` files.
40+
41+
## Output
42+
43+
```text
44+
Status: clean | blocked | still failing
45+
Commands: <commands run>
46+
Errors fixed: <files/categories>
47+
Remaining blocker: <only if any>
48+
```
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
interface:
2+
display_name: "Check Compiler Errors"
3+
short_description: "Run type checks and summarize compiler failures"
4+
default_prompt: "Run compiler checks and fix high-confidence failures."

.agents/skills/deslop/SKILL.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: deslop
3+
description: "清理 AI 生成感明显的代码膨胀。用户要求 deslop、去掉 AI 味、清理冗余、提交前简化 diff、删除多余注释/防御式代码/无意义抽象时使用。"
4+
---
5+
6+
# Deslop
7+
8+
Use this skill to clean the current diff while preserving behavior.
9+
10+
## Workflow
11+
12+
1. Inspect `git status --short`, `git diff --staged`, and `git diff`.
13+
2. Limit edits to changed lines or directly adjacent code needed to simplify those lines.
14+
3. Remove only clear slop:
15+
- Comments that restate code or explain obvious behavior.
16+
- TODO/FIXME/HACK comments not explicitly requested by the user.
17+
- Defensive checks, try/catch blocks, or fallbacks inconsistent with trusted local paths.
18+
- `any`, broad casts, or optionality added only to silence TypeScript.
19+
- One-off helpers, wrappers, flags, or configuration added for a single use.
20+
- Nested conditionals that can be made direct with early returns.
21+
- Debug logs or temporary output.
22+
4. Preserve existing local style even if another style would be preferable.
23+
5. Run the smallest relevant verification, usually `npm run type-check`, focused tests, or lint.
24+
25+
## Guardrails
26+
27+
- Keep behavior unchanged unless fixing a clear bug found during cleanup.
28+
- Do not refactor unrelated code.
29+
- Do not introduce new dependencies.
30+
- Do not delete files.
31+
- Do not edit `.env` files.
32+
- If cleanup would become a rewrite, stop and propose the smaller path first.
33+
34+
## Output
35+
36+
Report only:
37+
- What slop was removed.
38+
- Verification run and result.
39+
- Any remaining risk or skipped check.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
interface:
2+
display_name: "Deslop"
3+
short_description: "Remove AI-style code slop from a diff"
4+
default_prompt: "Clean up AI-generated slop in the current diff."
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
name: make-pr-easy-to-review
3+
description: "让当前 diff 或 PR 更容易审查。用户说 make this easy to review、整理 PR、写 reviewer notes、拆分说明、审查前清理提交信息/描述时使用。"
4+
---
5+
6+
# Make PR Easy To Review
7+
8+
Use this skill to improve reviewability without changing product behavior.
9+
10+
## Workflow
11+
12+
1. Inspect context:
13+
- `git status --short`
14+
- `git diff --stat`
15+
- `git diff --staged --stat`
16+
- PR metadata with `gh pr view` only if a PR exists and the user asks about it.
17+
2. Identify reviewability issues:
18+
- Mixed mechanical and behavioral edits.
19+
- Stale or missing PR description.
20+
- Generated files mixed with hand-written files.
21+
- Large files where the reviewer needs an entry point.
22+
- Missing test notes.
23+
3. Prefer non-code improvements first:
24+
- Concise TL;DR.
25+
- Changed-file map.
26+
- Risk notes.
27+
- Verification notes.
28+
4. If code cleanup is needed, use the `deslop` standard and keep behavior unchanged.
29+
30+
## Guardrails
31+
32+
- Do not rewrite history, squash commits, force-push, push, or open PRs without explicit approval.
33+
- Do not hide behavior changes under "cleanup".
34+
- Do not edit unrelated files.
35+
- If the PR is too large to make reviewable with notes, recommend splitting it instead of polishing around the problem.
36+
37+
## Output
38+
39+
Produce reviewer-ready notes:
40+
41+
```markdown
42+
## TL;DR
43+
<one paragraph>
44+
45+
## Reviewer Entry Points
46+
- <file>: <why it matters>
47+
48+
## Risk
49+
- <risk or "Low">
50+
51+
## Verification
52+
- <commands/results>
53+
```
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
interface:
2+
display_name: "Make PR Easy To Review"
3+
short_description: "Prepare a diff for easier review without changing behavior"
4+
default_prompt: "Make the current PR easier to review."
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
name: run-smoke-tests
3+
description: "运行冒烟测试或最小端到端验证。用户要求 smoke test、跑一下关键路径、验证改动没有破坏主流程、改完跑测试时使用。"
4+
---
5+
6+
# Run Smoke Tests
7+
8+
Use this skill to validate the smallest meaningful user path after a change.
9+
10+
## Test Selection
11+
12+
Pick the narrowest check that can catch the likely regression:
13+
14+
- Type-only change: `npm run type-check`
15+
- Shared TS behavior: `npm run test:unit`
16+
- Package behavior: `npm run test --workspaces --if-present`
17+
- Lint-sensitive edit: `npm run lint`
18+
- Android/native edit: `cd android && ./gradlew assembleDebug --no-daemon`
19+
- Mobile dev stack behavior: `npm run dev:mobile-stack` only when the user asks for interactive stack validation.
20+
21+
Use `npm test` only when broad validation is warranted; it can be slower than a focused check.
22+
23+
## Workflow
24+
25+
1. Identify the changed behavior and the smoke surface.
26+
2. Run prerequisites only when required.
27+
3. Run the focused command.
28+
4. If failing, inspect the first actionable failure and apply a minimal fix.
29+
5. Re-run the same command. Broaden only if the fix touches a shared path.
30+
31+
## Guardrails
32+
33+
- Prefer deterministic assertions over waiting or manual inspection.
34+
- Do not add Playwright, Detox, or other test dependencies without explicit approval.
35+
- Do not start an emulator unless explicitly requested.
36+
- Do not edit `.env` files.
37+
38+
## Output
39+
40+
Keep the result short:
41+
42+
```text
43+
Smoke surface: <why this check was chosen>
44+
Result: passed | failed | blocked
45+
Command: <command>
46+
Failure/fix: <only if relevant>
47+
```
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
interface:
2+
display_name: "Run Smoke Tests"
3+
short_description: "Run focused smoke validation and triage failures"
4+
default_prompt: "Run the relevant smoke tests and report failures."
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
name: thermo-nuclear-code-quality-review
3+
description: "极严格的可维护性审查。用户要求 thermo-nuclear review、严厉代码质量审查、深度 maintainability audit、检查抽象/大文件/复杂度/意大利面式条件分支时使用。"
4+
---
5+
6+
# Thermo-Nuclear Code Quality Review
7+
8+
Use this skill for a strict maintainability review of a diff or branch. Findings come first.
9+
10+
## Review Standard
11+
12+
Be ambitious about simplification. Do not accept "it works" if the change makes the system harder to reason about.
13+
14+
Check for:
15+
16+
- A simpler structure that removes whole branches, helpers, flags, or modes.
17+
- Files pushed toward or past 1,000 lines without a strong reason.
18+
- New one-off conditionals inserted into unrelated flows.
19+
- Business logic leaking into UI, hooks, or shared plumbing.
20+
- Service-layer code depending on React lifecycle or hooks.
21+
- Hook code containing business logic instead of event-to-state mapping.
22+
- Components importing service instances directly instead of consuming hooks.
23+
- `any`, `unknown`, broad casts, or optionality that hide unclear boundaries.
24+
- Sequential orchestration where independent work should be parallel or atomic.
25+
- Thin abstractions that add indirection without reducing complexity.
26+
27+
## Workflow
28+
29+
1. Collect `git status --short`, `git diff --stat`, and the relevant diff.
30+
2. Read changed files enough to understand boundaries and local style.
31+
3. Review by severity, not by file order.
32+
4. Report only actionable issues grounded in file/line references.
33+
5. If there are no issues, say so and name remaining test gaps.
34+
35+
## Guardrails
36+
37+
- Do not nitpick formatting while structural issues exist.
38+
- Do not request broad refactors unless the diff introduced or exposed the complexity.
39+
- Do not propose new dependencies.
40+
- Do not rewrite code during review unless the user asks for fixes.
41+
42+
## Output
43+
44+
```text
45+
Findings
46+
- [P0/P1/P2/P3] file:line - issue, impact, recommended fix
47+
48+
Open questions
49+
- <only if blocking>
50+
51+
Test gaps / residual risk
52+
- <only if relevant>
53+
```
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
interface:
2+
display_name: "Thermo Nuclear Review"
3+
short_description: "Run a strict maintainability review"
4+
default_prompt: "Run a strict maintainability review of the current diff."

0 commit comments

Comments
 (0)