/kit:writing-semanticsfrom kit
Guides creation of K language definitions for Prover releases, covering construct inventory, representation choice, configuration, and incremental rule writing.
Ships in kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
semantics.k is a candidate definition of the language constructs exercised
by the program set. This is a Prover-maintainer workflow outside the live Kit
pipeline. A candidate cannot be selected through Kit until Prover freezes it,
assigns a versioned ID, and lists that ID through its client. Never point a
live semantics.json at an unbundled source tree.
| State | Action |
|---|---|
| A suitable bundled ID exists | Stop; live Kit must use that immutable ID |
| A candidate gets stuck in maintainer testing | Extend only the unmodeled construct |
| A bundled ID gets stuck | Preserve it and record the witnessed boundary |
| None exists | Create the smallest executable semantics in a dedicated source root |
The result must parse the target programs, execute the modeled constructs, and stop visibly on anything outside its supported subset.
Read the target code and representative examples. List every expression, statement, control-flow form, and state component they exercise. Use that list as the scope: every listed construct needs syntax and behavior; absent constructs stay unmodeled.
Default to the smallest abstract syntax that stays recognizably aligned with the source program. Use concrete source grammar when parsing the original files is part of the goal. Use a lower IR only when the input already arrives in that form, and use pure K functions only for stateless computations.
Record the choice and its reason in smoke/RESULTS.md. Do not present several
equivalent representations without selecting a default.
Add one cell for each state component in the inventory:
<k> for the current computationKeep the initial configuration explicit and avoid cells that no rule reads or writes.
For each inventory item:
When creating a definition from scratch, adapt the single stateful semantics template. For concrete grammar, read K syntax and operational semantics for precedence groups, brackets, identifier tokens, cells, and rewrite syntax.
If a loop or recursive construct will be summarized by an invariant claim, ensure its rules return to a stable recurring configuration. The claim must match the term and cells the semantics actually reaches; do not copy an unrelated loop encoding solely because it appears in an example.
Compile and run every representative program using running-k.md:
Record the run: keep each smoke program under smoke/ and write
smoke/RESULTS.md with, per program, the exact HTTP submission, task
ID, K exit, actual final configuration, and hand-calculated expected
result. The semantics auditor replays and extends these; an
unrecorded smoke run is an audit finding.
Do not proceed to writing-spec until the examples execute as intended.
When maintainer testing stops with a residual term in the candidate, then:
<k> and the relevant side conditions.For a read-only definition, preserve the unmatched term as the model-boundary witness instead. The unmatched term is evidence of an incomplete model, not permission to widen the semantics speculatively.
smoke/ programs, and
smoke/RESULTS.md. It does not assign a Prover semantics ID.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub nlp-research-rosu/kit-plugin --plugin kit10 skills in this plugin
/auditing-semanticsUse when auditing a candidate K semantics before a Prover maintainer freezes it under a versioned bundled ID; this is outside the live Kit pipeline./auditing-specReview K claims and summaries for adequacy against the original program contract./kit-helpExplain KIT commands, settings, evidence files, attempt limits, and task timeouts./kit-onboardingSet up KIT when Prover Client is missing or not connected, or when the user requests installation, an update or reconnection. Covers CLI installation, browser approval and initial settings. Reuse completed setup on subsequent tasks./proving-specConstruct K proofs or diagnose stuck, failing, or resource-limited Prover claims./sharedNot a skill: the reference library the other kit skills load via relative links. Never invoke directly.Other plugins' skills for the same job