Files
aji/.claude/skills/aji-jev/SKILL.md
T
dev 65e7a0a97c eval: advisory instruction feedback from Claude Code sessions
`ajieval sessions` pairs each human prompt with what the assistant did
just before it, and asks Jev whether the prompt was a correction and which
repository rule (AGENTS.md, the aji-jev skill, commit memory) the corrected
behaviour broke. Excerpts are truncated and credential-like strings
redacted; answers stay in a local log, and each prompt is sent once.

`sessions report` proposes clarifying a rule only when corrections pointing
to it recur across sessions (thresholds in triage.json); it never edits
instructions. `sessions hook` is meant for a personal SessionEnd hook: it
returns at once and scans in the background, and does nothing without a
TypeSafe key, which may now also come from ~/.config/typesafe/api_key.
2026-10-07 22:37:24 +03:00

40 lines
4.0 KiB
Markdown

---
name: aji-jev
description: Use when classifying failed Aji evaluation runs, deciding whether a spec, diagnostic, agent-bundle or documentation improvement is warranted, or when TypeSafe/Jev comes up in this repository. Covers `ajieval classify --suggest`, `calibrate` and `triage`, and the hard limits on where Jev may be used.
---
# Jev in Aji: advisory triage only
Jev (TypeSafe) is a System One classifier. It answers typed questions (`choice`, `score`, `noul`) about a small state and returns calibrated probabilities. In this repository it only *suggests*. The verifier, conformance tests and the owner decide.
## Hard limits
- Only `tools/eval/`. Never call Jev from `src/`, the verifier, the interpreter, `build.zig`, CI gates or conformance verdicts. Aji is deterministic, and an external model is not.
- Only failed runs of the `dev` and `validation` sets. Never send a `test`-set run, a held-out task or anything from the private benchmark repository (protocol §29, spec 14 §12). `jev.check_sendable` enforces this; do not bypass it.
- No language change follows from a classification alone. Protocol §38 requires repeated failures across tasks and agents; `triage` enforces this through the minimums in `tools/eval/triage.json`.
- Nothing during a frozen experiment. Pass `--plan` to `triage`. Record observations with `ajieval journal` and act only after the last cell has run.
- Never tune the language to the M or C corpus or to one benchmark task.
## Workflow
1. For each failed dev/validation run: `python3 -m ajieval classify RUN --suggest`. This needs `TYPESAFE_API_KEY`; never print or record it.
2. A human confirms or overrides the suggestion with `python3 -m ajieval classify RUN CATEGORY --cause CAUSE [--caught-by ...]`.
3. Once enough runs have both a human label and a suggestion, run `python3 -m ajieval calibrate runs/`. Propose `"calibrated": true` and the thresholds in `triage.json` to the owner only when agreement among auto-accepted suggestions is high. Do not flip it yourself.
4. Run `python3 -m ajieval triage runs/ [--plan PLAN]`. For each proposal, act according to its route:
- `diagnostics`: patch the message in `src/diag.zig` and `docs/reference/error-codes.md`, add a test, open a PR.
- `agent_bundle` / `documentation`: clarify `docs/agent/`, the Quick Reference or the reference without changing meaning. Check the bundle growth (`tools/agent_bundle_tokens.py`).
- `language`: add an entry to `docs/design/open-questions.md` with the evidence (runs, tasks, agents, codes). Only the owner turns it into an RFC.
- `harness`: fix `tools/eval/`.
- `task_ambiguity`: run the task acceptance review (protocol §8).
- `model_capability`: nothing.
## Session feedback on instructions and skills
A personal SessionEnd hook (`.claude/settings.local.json`, never the shared settings) runs `python3 -m ajieval sessions hook` from `tools/eval`. In the background it pairs each human prompt with what the assistant did just before, redacts credential-like strings, truncates both, and asks Jev two questions: whether the prompt was a correction, and which rule in `sessions.RULES` the corrected behaviour broke. Answers stay in `~/.cache/aji-sessions/events.jsonl`. Without a TypeSafe key the hook does nothing.
`python3 -m ajieval sessions report` proposes clarifying a rule only when corrections pointing to it recur across sessions (thresholds in `triage.json`, `sessions`). Act on a proposal by sharpening the rule where it lives (`AGENTS.md`, this skill, or memory) and only after the owner agrees. The report never edits anything. Corrections no rule explains are listed as `unattributed`; recurring ones suggest a missing rule.
## Changing the questions
The option descriptions in `tools/eval/ajieval/jev.py` are the classifier's input. A change there changes `questions_hash`, and suggestions made under different hashes must not be mixed in `calibrate`. Keep the descriptions atomic and literal: Jev reads instructions at face value and handles multi-hop reasoning poorly.