Skip to content
Closed
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
3 changes: 3 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# AGENTS

- 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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Do not classify every List.concat as quadratic

When an agent touches existing flattening code such as lib/syntax/inline.ml:952, this rule incorrectly labels it an O(n²) violation: OCaml's List.concat is linear in the total number of list elements. This can prompt needless Rrbvec rewrites or dependency changes; narrow the guidance to repeated appends or other incremental concatenation patterns that repeatedly rescan prefixes.

Useful? React with 👍 / 👎.

Loading