Skip to main content
Glama

Risk ranking of every function

list_worklist
Read-onlyIdempotent

Lists every admitted function in the newest trusted run, ranked by complexity times recency-weighted churn, to survey a repo, split work, or pick the next fix.

Instructions

Lists the newest trusted run's whole risk ranking, every admitted function ordered by ccn times recency-weighted churn. Use it to survey a repo or split work, and get_next_item for the one packet to fix now. It runs no tests and keeps finished rows, so it never empties. Churn is cached per HEAD: after a commit, or on first use, the next read walks git log. git ls-files and git status count changed scored files (scored_changes). scope narrows before top caps, and an unknown scope is a config error. repo may be any directory under the measured checkout.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNocap the active list (default: the config's worklist_top, 50)
repoNopath to the scored repo's root (default: the repo the server was started in); a leading ~ is the home directory
scopeNorestrict the ranking to these declared scopes (exact [[scope]] names from crapkit.toml, one --scope each)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
floorNothe effective worklist_floor: rows under this ccn are listed only when over their ceiling or in a hot file
staleNotrue when the run's commit is not HEAD. It judges the commit, not the files: an amend or a commit that touched no scored file sets it, and an uncommitted edit leaves it false; scored_changes counts the files whose content moved. Schema 2 redefines it as that content difference
activeNothe ranking: functions in files with churn in the window, risk descending, cut at top or worklist_top
commitNothat run's commit, full sha
run_idNoid of the run these numbers come from: the newest trusted run (a coverage run, or a verify run whose verdict passed)
schemaNopayload schema version, 1
shallowNotrue when this checkout is a shallow clone: commits, authors and the churn the ranking reads count only the commits the clone holds; set fetch-depth: 0 on the checkout or run git fetch --unshallow for the real counts
commandsNothe call that answers stale and scored_changes; run it as given
truncatedNopresent only when the whole answer was longer than one tool result the server sends (7,500 characters): each list, string or object field it cut, at any depth, keeps its start, and full is the CLI command that prints the whole answer
dormant_topNothe first 10 dormant functions, same shape as active: sleeping hazards kept out of the queue
active_totalNoactive rows admitted before the cap: what top or worklist_top hid
dormant_countNoranked functions whose file had no commits in the window
scored_changesNohow many files the run scored hold other content now than the run recorded, deleted files included; 0 means the numbers describe the files on disk; null when crapkit cannot compare: the run recorded no content (crapkit 0.8.0 or older wrote it) or git failed reading the tree; treat null like any count above 0 and run commands.refresh
churn_window_monthsNomonths of git history the churn weights cover, counted back from the commit date of HEAD

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed15 schema fields changedv0.8.1
    • changedInput schema / properties / repo / description
      Previous value: -"path to the scored repo's root (default: the repo the server was started in)"New value: +"path to the scored repo's root (default: the repo the server was started in); a leading ~ is the home directory"
    • changedOutput schema / properties / active / items / properties / cov / description
      Previous value: -"branch coverage 0.0 to 1.0; null on an inventory-only run"New value: +"branch coverage inside the span, 0.0 to 1.0; statement coverage when the span has no branches, and invoked-or-not (1.0 or 0.0) when it has no statements; Python and/or add to ccn but coverage.py records no branch arc for them; 0.0 on an untested, excluded, no-lane or cc-only row; null on an inventory-only run"
    • changedOutput schema / properties / active / items / properties / crap / description
      Previous value: -"the score from the ranked run; null on an inventory-only run"New value: +"the score from the ranked run, ccn^2 x (1 - cov)^3 + ccn, or ccn on a cc-only or excluded row; null on an inventory-only run"
    • changedOutput schema / properties / active / items / properties / flag / description
      Previous value: -"measured, untested, no-lane or cc-only; null on an inventory-only run"New value: +"measured, untested, excluded, no-lane or cc-only; null on an inventory-only run"
    • changedOutput schema / properties / active / items / properties / flag / enum
      Previous value: -[
      -  "measured",
      -  "untested",
      -  "no-lane",
      -  "cc-only",
      -  null
      -]New value: +[
      +  "measured",
      +  "untested",
      +  "excluded",
      +  "no-lane",
      +  "cc-only",
      +  null
      +]
    • changedOutput schema / properties / churn_window_months / description
      Previous value: -"months of git history the churn weights cover"New value: +"months of git history the churn weights cover, counted back from the commit date of HEAD"
    • addedOutput schema / properties / commands
      Added value: +{
      +  "description": "the call that answers stale and scored_changes; run it as given",
      +  "properties": {
      +    "refresh": {
      +      "description": "crapkit coverage --reuse-unchanged: the cheapest run that brings scored_changes to 0 and clears stale",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • changedOutput schema / properties / dormant_top / items / properties / cov / description
      Previous value: -"branch coverage 0.0 to 1.0; null on an inventory-only run"New value: +"branch coverage inside the span, 0.0 to 1.0; statement coverage when the span has no branches, and invoked-or-not (1.0 or 0.0) when it has no statements; Python and/or add to ccn but coverage.py records no branch arc for them; 0.0 on an untested, excluded, no-lane or cc-only row; null on an inventory-only run"
    • changedOutput schema / properties / dormant_top / items / properties / crap / description
      Previous value: -"the score from the ranked run; null on an inventory-only run"New value: +"the score from the ranked run, ccn^2 x (1 - cov)^3 + ccn, or ccn on a cc-only or excluded row; null on an inventory-only run"
    • changedOutput schema / properties / dormant_top / items / properties / flag / description
      Previous value: -"measured, untested, no-lane or cc-only; null on an inventory-only run"New value: +"measured, untested, excluded, no-lane or cc-only; null on an inventory-only run"
    • changedOutput schema / properties / dormant_top / items / properties / flag / enum
      Previous value: -[
      -  "measured",
      -  "untested",
      -  "no-lane",
      -  "cc-only",
      -  null
      -]New value: +[
      +  "measured",
      +  "untested",
      +  "excluded",
      +  "no-lane",
      +  "cc-only",
      +  null
      +]
    • addedOutput schema / properties / scored_changes
      Added value: +{
      +  "description": "how many files the run scored hold other content now than the run recorded, deleted files included; 0 means the numbers describe the files on disk; null when crapkit cannot compare: the run recorded no content (crapkit 0.8.0 or older wrote it) or git failed reading the tree; treat null like any count above 0 and run commands.refresh",
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / shallow
      Added value: +{
      +  "description": "true when this checkout is a shallow clone: commits, authors and the churn the ranking reads count only the commits the clone holds; set fetch-depth: 0 on the checkout or run git fetch --unshallow for the real counts",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / stale / description
      Previous value: -"true when the run's commit is not HEAD, so cov, crap and uncovered_lines describe an older tree; crapkit coverage --reuse-unchanged (get_function_brief's commands.refresh) clears it"New value: +"true when the run's commit is not HEAD. It judges the commit, not the files: an amend or a commit that touched no scored file sets it, and an uncommitted edit leaves it false; scored_changes counts the files whose content moved. Schema 2 redefines it as that content difference"
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "description": "present only when the whole answer was longer than one tool result the server sends (7,500 characters): each list, string or object field it cut, at any depth, keeps its start, and full is the CLI command that prints the whole answer",
      +  "properties": {
      +    "fields": {
      +      "additionalProperties": {
      +        "properties": {
      +          "kept": {
      +            "description": "how many the answer keeps",
      +            "type": "integer"
      +          },
      +          "of": {
      +            "description": "how many the whole answer has",
      +            "type": "integer"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "description": "each cut field, named by its keys joined with dots (gate.breaches) -> kept and of: elements for a list, entries for an object, characters for a string",
      +      "type": "object"
      +    },
      +    "full": {
      +      "description": "the crapkit command that prints the whole answer, spelled for the server's shell",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed10 schema fields changedv0.8.0
    • addedOutput schema / properties / active / items / properties / handle
      Added value: +{
      +  "description": "short name form: the bare identifier, or (anonymous)#N for a function lizard could not name; pass it to get_function_brief as name",
      +  "type": "string"
      +}
    • addedOutput schema / properties / active / items / properties / occurrence
      Added value: +{
      +  "description": "source creation order among functions sharing start, from 1; 0 on an older row with no recorded position",
      +  "type": "integer"
      +}
    • changedOutput schema / properties / active / items / properties / remedy / description
      Previous value: -"decompose, split-lines, add-tests or ok; every row but ok reaches get_next_item when a lane measures it"New value: +"decompose, split-lines, add-tests or ok, as the run judged it; null on an inventory-only run. A row a lane measures reaches get_next_item unless its remedy is ok. After a crapkit.toml ceiling edit no run has scored, get_next_item's own remedy decides that, and it can differ from this one"
    • changedOutput schema / properties / active / items / properties / remedy / enum
      Previous value: -[
      -  "decompose",
      -  "split-lines",
      -  "add-tests",
      -  "ok"
      -]New value: +[
      +  "decompose",
      +  "split-lines",
      +  "add-tests",
      +  "ok",
      +  null
      +]
    • changedOutput schema / properties / active / items / properties / remedy / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • addedOutput schema / properties / dormant_top / items / properties / handle
      Added value: +{
      +  "description": "short name form: the bare identifier, or (anonymous)#N for a function lizard could not name; pass it to get_function_brief as name",
      +  "type": "string"
      +}
    • addedOutput schema / properties / dormant_top / items / properties / occurrence
      Added value: +{
      +  "description": "source creation order among functions sharing start, from 1; 0 on an older row with no recorded position",
      +  "type": "integer"
      +}
    • changedOutput schema / properties / dormant_top / items / properties / remedy / description
      Previous value: -"decompose, split-lines, add-tests or ok; every row but ok reaches get_next_item when a lane measures it"New value: +"decompose, split-lines, add-tests or ok, as the run judged it; null on an inventory-only run. A row a lane measures reaches get_next_item unless its remedy is ok. After a crapkit.toml ceiling edit no run has scored, get_next_item's own remedy decides that, and it can differ from this one"
    • changedOutput schema / properties / dormant_top / items / properties / remedy / enum
      Previous value: -[
      -  "decompose",
      -  "split-lines",
      -  "add-tests",
      -  "ok"
      -]New value: +[
      +  "decompose",
      +  "split-lines",
      +  "add-tests",
      +  "ok",
      +  null
      +]
    • changedOutput schema / properties / dormant_top / items / properties / remedy / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
  3. Changed4 schema fields changedv0.7.6
    • changedOutput schema / properties / active / items / properties / remedy / description
      Previous value: -"decompose, add-tests or ok; only decompose and add-tests rows with a lane reach get_next_item"New value: +"decompose, split-lines, add-tests or ok; every row but ok reaches get_next_item when a lane measures it"
    • changedOutput schema / properties / active / items / properties / remedy / enum
      Previous value: -[
      -  "decompose",
      -  "add-tests",
      -  "ok"
      -]New value: +[
      +  "decompose",
      +  "split-lines",
      +  "add-tests",
      +  "ok"
      +]
    • changedOutput schema / properties / dormant_top / items / properties / remedy / description
      Previous value: -"decompose, add-tests or ok; only decompose and add-tests rows with a lane reach get_next_item"New value: +"decompose, split-lines, add-tests or ok; every row but ok reaches get_next_item when a lane measures it"
    • changedOutput schema / properties / dormant_top / items / properties / remedy / enum
      Previous value: -[
      -  "decompose",
      -  "add-tests",
      -  "ok"
      -]New value: +[
      +  "decompose",
      +  "split-lines",
      +  "add-tests",
      +  "ok"
      +]
  4. Addedv0.6.0

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover read-only/idempotent/non-destructive, but the description adds behavior the annotations cannot: it runs no tests, keeps finished rows so it never empties, and caches churn per HEAD so a commit or first use triggers a git log walk. That is exactly the non-obvious operational context an agent needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose and the routing hint, and every sentence carries information (caching, git behavior, cap/scope ordering, repo path). Dense jargon like 'ccn times recency-weighted churn' is compressible but still meaningful, so it falls just short of a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need no explanation. For a read-only listing tool with three optional params, the description closes the real gaps: caching/refresh triggers, empty-list expectations, config-error conditions, and scope-vs-top ordering. Nothing needed to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description earns above baseline by adding interaction semantics not in the schema: scope narrows the ranking before top caps it, an unknown scope is a config error, and repo may be any directory under the measured checkout. It does not restate the schema's own defaults.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Lists the newest trusted run's whole risk ranking, every admitted function') and gives the exact ordering metric (ccn times recency-weighted churn). This clearly separates it from get_next_item (single packet) and list_runs (run list), so an agent can route without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Names the two use cases (survey a repo, split work) and explicitly routes the alternative: 'get_next_item for the one packet to fix now.' It also gives a usage constraint — scope narrows before top caps, and an unknown scope is a config error — so the agent knows both when to pick it and how to invoke it safely.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.