agentleFS
OpenAgentsIncOpenAgentsInc/openagents/.agents/skills/coax-pitfalls/SKILL.md

coax-pitfalls

Skill469 starsChanged 7 days agoApache-2.0View on GitHub

Use when diagnosing Coax compiler errors (E0105, E0216, E0225, E0315, E0317, E0351, E0366, E0381, E0400, E0404, E0406, E0700, E0702, E0941, E0942), configuring coax/web/tool.sh directives, or running #authority mutation checks.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not guess across 3+ compile-fail turns.

    line 12
  2. Very specific:

    Place at the top of a .coax tool entry file (parsed via sed/grep by coax/web/tool.sh):

    line 35
  3. Very specific:

    Ensure ./coax/bin/coax exists (coax/build.sh or cp -c -R /Users/christopherdavid/work/openagents/coax/bin ./coax/bin).

    line 43

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Coax Pitfalls & Fast Troubleshooting

First 10 Seconds on Any Error

Do not guess across 3+ compile-fail turns. Run the compiler's own built-in lookup first:

./coax/bin/coax explain E0366
./coax/bin/coax vocab <keyword-or-stdlib-name>

Most Frequent Transcript Error Codes

CodeCauseExact Fix
E0216Closed range (0..n or 0..=n)Always use half-open 0..<n.
E0225Foreign spelling (let, fn, var, pub, it, null)Use Coax syntax (x := ..., f :: (...) -> T, ifx c then a else b).
E0315 / E0351Unknown procedure / struct fieldgit grep -n "Name ::" to verify exact spelling & signature before editing.
E0317 / E0366Slice/view/mutability mismatchPass arr[..] or arr[0..<n]; cast cast(string) buf[0..<n]; respect [] const T vs [] T.
E0323Ignored return valueAssign explicitly: _ = call(...);.
E0400 / E0404Compile-time step or aggregate storage budget exceededAdd #steps 100000000 on large #test blocks; avoid giant stack arrays inside compile-time tests; add // tool.sh: run-steps 250000000 for tools.
E0406#assert failed in #testIsolate single test with ./coax/bin/coax test FILE --library --only "SUBSTR".
E0700 / E0702GPU threadgroup array read/write barrier ruleInsert the required threadgroup barrier between writes and cross-thread reads in coax metal kernels.
E0941 / E0942#effects(...) contract mismatchKeep pure logic effect-free; only call host effects inside procedures declaring them.
E0105Invalid string escapeVerify valid escape sequences (\n, \r, \t, \", \\, \0).

coax/web/tool.sh File-Header Directives

Place at the top of a .coax tool entry file (parsed via sed/grep by coax/web/tool.sh):

  • // tool.sh: tls — link TLS native runtime (https://, wss://).
  • // tool.sh: run-steps N — raise compile-time evaluation step budget.
  • // tool.sh: release — emit release C (--release, no checked-arithmetic traps).
  • // tool.sh: stack-gib N — raise tool_main stack from 1 GiB to N GiB.
  • // tool.sh: objc FILE.m FRAMEWORK... — link macOS Objective-C helper.

Fresh Worktree & Mutation Workflow

  1. Ensure ./coax/bin/coax exists (coax/build.sh or cp -c -R /Users/christopherdavid/work/openagents/coax/bin ./coax/bin).
  2. Tight inner loop: ./coax/bin/coax test FILE --library --only "SUBSTR".
  3. Full file suite: ./coax/bin/coax test FILE --library.
  4. For #authority; files: ./coax/bin/coax mutate FILE --changed origin/main -> zero surviving mutants (mark true equivalents // mutant: equivalent // why).
  5. Apply the 3-round rule: after 3 failed rounds on the same error, stop tweaking and re-read the compiler diagnostic / spec (coax/spec.md) or change approach.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.