@velarscript/cli 0.21.0 → 0.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/skill/ai-skill.md CHANGED
@@ -22,19 +22,24 @@ one round.
22
22
 
23
23
  The working loop:
24
24
 
25
- 1. Write ordinary code the way a fluent JS/Python author would.
26
- 2. Run `velar check`. Do exactly what each diagnostic says. It reports
25
+ 1. Run `velar graph` before a project-wide change to read the compiler-owned
26
+ module, ownership, call, state, derivation, and capability view. Use
27
+ `velar graph --focus <symbol> --depth 2` when the full overview is larger
28
+ than the context you need. The graph is derived from current compiler facts;
29
+ do not build or maintain a separate source index.
30
+ 2. Write ordinary code the way a fluent JS/Python author would.
31
+ 3. Run `velar check`. Do exactly what each diagnostic says. It reports
27
32
  **advisories** as well — a second channel for a spelling Vel accepts with a
28
33
  meaning other than the one your JS/Python reflex intended. An advisory never
29
34
  fails the check, and leaving one unresolved means the work is not done:
30
35
  either write the spelling it names, or put `// velar-allow <CODE>: <reason>`
31
36
  on that line saying why the code is right as written. A suppression with no
32
37
  reason, and one that no longer applies, are both compile errors.
33
- 3. Run `velar fix` to apply every rewrite the diagnostics already named
38
+ 4. Run `velar fix` to apply every rewrite the diagnostics already named
34
39
  (retired spellings with one successor, line-ending semicolons, and the rest
35
40
  of that family); it never rewrites anything that needs a decision, so what
36
41
  is left after it is the real work.
37
- 4. Run `velar test`. Run `velar format` to settle layout.
42
+ 5. Run `velar test`. Run `velar format` to settle layout.
38
43
 
39
44
  Do not invent workarounds for a diagnostic; it is the language telling you
40
45
  the canonical spelling.
@@ -136,7 +141,7 @@ well, but it is a guarantee rather than a trap.
136
141
  | `value is null` | `value == null` / `value != null` — `is` tests runtime types, `null` is a value. |
137
142
  | `switch`, or an `if`/`else if` ladder over an enum | `match` with `case _:` as the only fallback. |
138
143
  | Renaming a binding away from `type`, `json`, `from`, `match`, or `as` | Don't. Declaration words are contextual: each declares only in its own shape, so `const {type, from} = event` is ordinary code. `enum` and `case` are the exceptions — `enum` is a real VelarScript keyword and `case` is reserved by JavaScript — so neither can be a binding name; both stay fine as record fields, member names, and `match` branches. |
139
- | Treating `@` as a decorator, call, value, or user extension point | `@` is the annotation introducer and `@name` is a context annotation: it marks the following declaration or structural entry with a compiler-owned compile-time role selected by the current syntax context. The vocabulary is closed; source cannot declare, import, alias, pass, or construct a context annotation. `@main:`, `@dispose:`, and `@iterate:` follow this one rule. |
144
+ | Treating `@` as a decorator, call, value, or user extension point | `@` is the marker introducer and `@name` is a context marker: it marks the following declaration or structural entry with a compiler-owned compile-time role selected by the current syntax context. The vocabulary is closed; source cannot declare, import, alias, pass, or construct a context marker. `@main:`, `@dispose:`, and `@iterate:` follow this one rule. |
140
145
  | Two statements on one line | One statement per line; there are no semicolons. As in Python, an ordinary executable suite may keep its one non-block statement after the colon, as in `def stop(): return`, `if condition: action()`, or `case pattern: action()`. Multiple statements, nested blocks, and structural member or branch lists use indentation. Formatting preserves the author's single-line or indented choice. A line starting with `.` or `?.` continues the previous line, so method chains format normally. |
141
146
  | `count++` | `count += 1` |
142
147
  | `call(name: value)` named argument | `call(name=value)` |
@@ -288,7 +293,7 @@ class Session:
288
293
  const session = Session("session-1")
289
294
  ```
290
295
 
291
- `@name` is a context annotation with a compiler-owned role and can never collide with yours.
296
+ `@name` is a context marker with a compiler-owned role and can never collide with yours.
292
297
  `@dispose:` is the release contract — never called directly — that
293
298
  `using name = expression` runs on every exit from the owning scope (block end,
294
299
  `return`, `break`, `continue`, throw), in reverse declaration order. A derived