Skip to content
Merged
Show file tree
Hide file tree
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
14 changes: 14 additions & 0 deletions .agents/skills/ocaml-review/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: ocaml-review
description: review ocaml时使用
---

# OCaml Review

只读审查请求范围内的代码,只报告问题,不修改代码或其他文件。

1. 检查读写放大:单次操作是否重复全量读取、遍历或重写,结合数据量与调用频率判断影响。
2. `List` 仅用于明确小于 1000 项的数据,数量未知或可能 >= 1000 时应改用 `rrbvec`(已有依赖时使用 `Rrbvec` 向量),重点检查高频 `List.length`、`List.nth`、`List.append`、`List.concat` 等线性调用及重复拼接造成的 O(n²)。
3. 检查 `spec/` 下的 `.mli` 类型能否加强约束,以排除非法状态、区分身份与生命周期并限制构造权限。

仅报告有证据的问题,每点尽量一句,包含严重度、位置、触发条件与影响,并标明实证或推断;无发现时明确说明。
1 change: 0 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@
- If development is blocked because the `.mli` definitions under `spec/` are unclear or unreasonable, stop development immediately and report the specific spec issue, suggested changes, and rationale.
- Do not modify any ocaml files in bonsai_flutter repo
- Prefer native bonsai-ui/SwiftUI components and their built-in layout, scrolling, and animation behavior. Do not recreate these behaviors using per-row geometry tracking, shared observable geometry state, or repeated collection scans during scrolling. If native APIs cannot satisfy a requirement, explain the limitation and obtain explicit approval before implementing custom UI coordination.
- Avoid O(n²) `List` patterns such as `List.concat` and repeated `List.append` on large sequences; when the project already depends on the `rrbvec` package, use `Rrbvec` vectors instead.
Loading