motoko-analyzer
Skill38 starsChanged 9 days agoApache-2.0View on GitHub
Run ONE motoko-mission improvement cycle with deterministic diagnostic gates (observe → diff → cheap-confirm → build → validate). Use when working on the motoko mission, running improvement cycles, or when the mission diagnostic loop or its gates are mentioned.
In this repository85 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- docs/llms.txtllms.txt
- llms.txtllms.txt
- agent-inboxSkill
- ailang-core-triageSkill
- ailang-packagesSkill
- benchmark-managerSkill
- benchmark-runnerSkill
- builtin-developerSkill
- cli-doc-maintainerSkill
- cloud-cascade-debugSkill
- cloud-setupSkill
- codebase-organizerSkill
- collaboration-hubSkill
- coordinator-helperSkill
- design-doc-creatorSkill
- design-spec-auditorSkill
- docs-syncSkill
- eval-analyzerSkill
- eval-gap-finderSkill
- gemini-cli-helperSkill
- github-issue-triageSkill
- headless-runnerSkill
- local-model-onboardingSkill
- local-ollama-evalSkill
- mission-briefSkill
- mission-controlSkill
- mission-loop-changeSkill
- model-managerSkill
- parser-developerSkill
- post-releaseSkill
- pr-monitorSkill
- prompt-managerSkill
- release-managerSkill
- sonarcloud-triageSkill
- sprint-evaluatorSkill
- sprint-executorSkill
- sprint-plannerSkill
- test-coverage-guardianSkill
- trace-debuggerSkill
- use-ailangSkill
- wasm-debuggerSkill
- agent-inboxSkill
- ailang-core-triageSkill
- ailang-packagesSkill
- benchmark-managerSkill
- benchmark-runnerSkill
- builtin-developerSkill
- cli-doc-maintainerSkill
- cloud-cascade-debugSkill
- cloud-setupSkill
- codebase-organizerSkill
- collaboration-hubSkill
- coordinator-helperSkill
- design-doc-creatorSkill
- design-spec-auditorSkill
- docs-syncSkill
- eval-analyzerSkill
- eval-gap-finderSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Run ONE motoko-mission improvement cycle with the deterministic diagnostic gates that this mission's history proved necessary.
- Distinctive: line 52
Add a unit test. Gate behind an env/flag if it changes default behavior.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Motoko Analyzer — the mission diagnostic loop
Run ONE motoko-mission improvement cycle with the deterministic diagnostic gates that this mission's history proved necessary. The gates run FIRST and are not skippable: you may not propose or build a fix until the cycle report and wire diff exist. This encodes the hard-won ordering — observe → diff → cheap-confirm → build → validate — so we stop spending GPU/hours on assumptions that a 2-minute capture refutes.
Read design_docs/motoko-mission.md and
design_docs/motoko-harness-analysis-log.md
for state. Append a log entry every cycle.
The five gates (run in order — earlier gates are cheap, later ones expensive)
Gate 1 — OBSERVE (deterministic, no GPU). Where is the gap, by failure MODE?
scripts/segment.sh # failure-mode segmentation of the latest rotationOutputs pass / disengage (fail, ≤2 tool calls) / grind-wrong (fail, >2) per harness, and the motoko↔pi gap. Do not propose a fix before pasting this. If the gap is disengagement, continue; if grind-wrong, the lever is correctness (different playbook).
Note: the rotation result JSON's
finish_reasonis SUMMARY-level and HIDES per-turn truncation. Disengage stats alone are not enough — you must run Gate 2.
Gate 2 — DIFF (small GPU). What does motoko actually put on the wire, and why 0 tool calls?
scripts/wire_diag.sh <benchmark> [<benchmark> ...] # default: the top always-disengage benchesCaptures the EXACT HTTP request+response bytes (via the ai-http-log sentinel + the openai-provider
wire logger) for failing benchmarks, then classifies each disengaged turn's per-call finish_reason
(length = truncation, stop = genuine "done") and prints motoko's request fields. This is the
step that surfaces truncation, dropped fields, parsing gaps — the things invisible to result-JSON stats.
The cause is necessarily something that DIFFERS between motoko and pi for the same input. Capture
pi too (scripts/wire_diag.sh --pi <benchmark>) when you need the comparison.
Gate 3 — CHEAP-CONFIRM (tiny GPU, ~1 min). Does the proposed change actually fix it?
scripts/cheap_confirm.py <captured-request.json> --set max_tokens=16384 # raw replay, N samplesReplays a captured request with ONE field changed and reports engage/disengage. Run this before any build or A/B. A param hypothesis confirmed here in 1 minute saves an hour of plumbing + a multi-hour A/B.
Gate 4 — BUILD (routing rule). One well-scoped, verified change.
- AILANG (
internal/,cmd/,tools/, eval rig) → commit todev(gh =sunholo-voight-kampff, rebase). - motoko_agent (
.ail, profiles, prompts, TS) → DRAFT PR toarniwesth/motoko_agentvia the fork. - Add a unit test. Gate behind an env/flag if it changes default behavior.
Gate 5 — VALIDATE + RECORD. Measure by the RIGHT metric; write the ledger.
- Validate on the BROAD set (core tier), not the biased flaky subset — smokes over-promise.
- Measure by the failure-mode delta (e.g. disengage-rate), not just pass rate.
- Append an analysis-log entry with: finding, the Ruled-out ledger (what was tested and refuted — this is the most valuable artifact; it stops re-chasing), lever class, prior-action status, next.
Standing rules (the discipline that earned its keep)
- Never blame the controlled variable. The eval holds the teaching prompt + benchmark constant to
eliminate them — so neither can explain a harness gap. The cause DIFFERS between harnesses. (See
memory
motoko-investigation-discipline.) - Source/capture before GPU. Confirm from a reference harness's source (pi:
/opt/homebrew/lib/node_modules/@mariozechner/pi-*; qwen-code/Qwen-Agent on GitHub + their issues) or a capture, before building. Reference harnesses + their issue trackers carry the answers (Qwen-Agent#789 was literally our bug). - Don't generalize from a biased subset. Flaky-6 smokes ≠ core-tier reality. Validate broad.
- Record negatives. A refuted hypothesis is progress; the ruled-out ledger is the map.
- One verified change per cycle. Conservative, lock-respecting (
scripts/segment.shreads only; GPU gates acquire the rig lock,--parallel 1, never force-push, never touch unrelated work).
Failure-mode taxonomy (use these exact terms in the log)
fail
├── disengage (≤2 tool calls — no real solution attempt)
│ ├── truncation (per-call finish_reason=length — budget too small for the model's reasoning)
│ └── genuine-stop (finish_reason=stop — model decided it was done)
└── grind-wrong (>2 tool calls — engaged but incorrect → correctness lever)When the cycle is mechanical enough, the launchd job can fire this skill unattended
A dev.ailang.motoko-analyzer launchd plist (StartInterval, rig-lock-respecting, blackout-aware —
mirror tools/launchd/os-rotation-filler.*) can run Gate 1 every idle window and open a chip/notify
when the dominant failure mode shifts. Judgment gates (3b hypothesis, 4 build) still need a human/agent.
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.

