You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a12e77e
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: AGENTS.md
+10-5Lines changed: 10 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,10 +25,10 @@ This file governs the repository unless a closer `AGENTS.md` narrows the target.
25
25
## Python / JavaScript reflex and canonical-form table
26
26
27
27
Vel's parents are JavaScript and Python. These reflexes land in Vel source as
28
-
something else. `A1`–`A6` are **advisories** for those traps; `A7`–`A9` are
29
-
canonical-form advisories, raised only when the compiler can prove the longer
30
-
collection or record spelling has one language-owned replacement. The compiler
31
-
reports all nine and still emits. The rest are already errors whose message
28
+
something else. `A1`–`A6` are **advisories** for those traps; `A7`–`A10` and
29
+
`A13`–`A15` are canonical-form advisories, raised only when the compiler can prove
30
+
the longer collection or record spelling has one language-owned replacement.
31
+
The compiler reports them and still emits. The rest are already errors whose message
32
32
names the successor.
33
33
34
34
| Reflex | Write instead | Channel |
@@ -40,8 +40,11 @@ names the successor.
40
40
|`"${value}"`, `` `${value}` ``|`f"{value}"` or `` f`{value}` `` — only the `f` prefix interpolates, and `${...}` is legal literal text everywhere else (generating JavaScript source is a real use, and answers with `velar-allow A5`) |`A5`|
41
41
|`f"${value}"`|`f"{value}"` — even under the `f` prefix, `$` keeps the brace after it literal, so `${value}` stays text |`A6`|
42
42
| Empty collection + identity-only copy loop | Initialize from the compiler-owned conversion: `set.values()`, `Set(list)`, `map.keys()` / `map.values()`, `Map(record)`, or the matching `.copy()`; transforms, filters, effects, non-empty destinations, computed sources, and non-adjacent loops do not trigger |`A7`|
43
-
|`for item in items: if test: return true` followed by `return false`|`return items.some(item => test)` — only the exact single-slot, pure-boolean, early-return query over a List triggers; calls, getters, effects, optional conditions, wider bodies, computed sources, and non-adjacent returns do not |`A8`|
43
+
| Single-slot List loop that only returns on a pure condition, followed by the matching exhausted return | Use `some`, `every`, or `find`; only exact early-return query shapes trigger, while calls, getters, effects, optional conditions, wider bodies, computed sources, and non-adjacent returns do not |`A8`|
44
+
| Empty List + loop that only appends or extends a pure per-item projection, optionally under one pure guard | Initialize with `map`, `filter`, `filter(...).map(...)`, or `flatMap`; only stable List sources, data reads/operators, and compiler-owned `Type.from(value)` projections trigger, while calls, getters, effects, destination reads, wider bodies, and computed sources do not |`A13`|
44
45
| A closed target literal mirrors two or more same-name fields from one typed record |`Target.from(source, {overrides})` — target fields are the authority; computed/effectful overrides, partial targets, spreads, and mixed sources do not trigger. `.from` uses target declaration order, so preserve an intentional authored wire order with a reasoned suppression |`A9`|
46
+
|`flag ? "true" : "false"` in a native text attribute |`str(flag)` — the fix is offered only for that exact equivalent conversion, outside HTML bool-presence attributes and component props; it is withheld only when the discarded source contains an authored comment |`A14`|
47
+
|`{field: field}` repeats one ordinary identifier |`{field}` — quoted keys, different values, member/call expressions, and entries whose rewrite would erase a comment do not receive the mechanical fix |`A15`|
45
48
|`enumerate(xs)`|`for value, index in xs:`| error |
46
49
|`with X as y:`|`using y = X`| error |
47
50
|`raise E(...)`|`throw E(...)`| error |
@@ -97,6 +100,8 @@ the advisory channel in
97
100
and its exact collection canonicalization extensions in
0 commit comments