Explanation

Agent workflow

Recommended loop for coding agents writing and repairing Point source.

Summary

A reliable agent workflow treats the compiler as the source of truth: check, explain, patch semantic source, repeat.

1. Index the file to list symbols and refs:

point index examples/math.point

2. Check with structured output:

point check-json examples/math.point

3. Explain the symbol tied to a diagnostic:

point explain examples/math.point point://semantic/Math/label.score status

4. Patch only the .point source at the named ref.

5. Re-check until ok: true.

For multiple errors, run point repair-plan examples/math.point and follow steps in order.

Rules for agents

  • Write and repair .point only; do not hand-edit generated TypeScript
  • Prefer point://semantic/ refs in prompts and patches
  • Use fmt or LSP format so spans stay stable
  • Run point test or point test-all when changing logic covered by tests

Contrast with raw LLM edit

Pasting an entire file into a model and asking for a fix forces the model to guess line numbers and generated names. Point diagnostics name the declaration, suggest repairs, and link related refs — smaller context, fewer wrong edits.

For a full walkthrough of the TypeScript vs Point agent loop (Cursor, Codex, Claude Code), see Agent coding loop.

See also