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.
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- arxivSkill
- desktop-ship-verifySkill
- session-handoffSkill
- transcript-hillclimbSkill
- verse-realmSkill
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
- Distinctive: line 12
Do not guess across 3+ compile-fail turns.
- Very specific: line 35
Place at the top of a .coax tool entry file (parsed via sed/grep by coax/web/tool.sh):
- Very specific: line 43
Ensure ./coax/bin/coax exists (coax/build.sh or cp -c -R /Users/christopherdavid/work/openagents/coax/bin ./coax/bin).
≈ “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.
Files
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
| Code | Cause | Exact Fix |
E0216 | Closed range (0..n or 0..=n) | Always use half-open 0..<n. |
E0225 | Foreign spelling (let, fn, var, pub, it, null) | Use Coax syntax (x := ..., f :: (...) -> T, ifx c then a else b). |
E0315 / E0351 | Unknown procedure / struct field | git grep -n "Name ::" to verify exact spelling & signature before editing. |
E0317 / E0366 | Slice/view/mutability mismatch | Pass arr[..] or arr[0..<n]; cast cast(string) buf[0..<n]; respect [] const T vs [] T. |
E0323 | Ignored return value | Assign explicitly: _ = call(...);. |
E0400 / E0404 | Compile-time step or aggregate storage budget exceeded | Add #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 #test | Isolate single test with ./coax/bin/coax test FILE --library --only "SUBSTR". |
E0700 / E0702 | GPU threadgroup array read/write barrier rule | Insert the required threadgroup barrier between writes and cross-thread reads in coax metal kernels. |
E0941 / E0942 | #effects(...) contract mismatch | Keep pure logic effect-free; only call host effects inside procedures declaring them. |
E0105 | Invalid string escape | Verify 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— raisetool_mainstack from 1 GiB toNGiB.// tool.sh: objc FILE.m FRAMEWORK...— link macOS Objective-C helper.
Fresh Worktree & Mutation Workflow
- Ensure
./coax/bin/coaxexists (coax/build.shorcp -c -R /Users/christopherdavid/work/openagents/coax/bin ./coax/bin). - Tight inner loop:
./coax/bin/coax test FILE --library --only "SUBSTR". - Full file suite:
./coax/bin/coax test FILE --library. - For
#authority;files:./coax/bin/coax mutate FILE --changed origin/main-> zero surviving mutants (mark true equivalents// mutant: equivalent // why). - 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.
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
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.

