Risk ranking of every function
list_worklistLists 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
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | cap the active list (default: the config's worklist_top, 50) | |
| repo | No | path to the scored repo's root (default: the repo the server was started in); a leading ~ is the home directory | |
| scope | No | restrict the ranking to these declared scopes (exact [[scope]] names from crapkit.toml, one --scope each) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| floor | No | the effective worklist_floor: rows under this ccn are listed only when over their ceiling or in a hot file | |
| stale | No | 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 | |
| active | No | the ranking: functions in files with churn in the window, risk descending, cut at top or worklist_top | |
| commit | No | that run's commit, full sha | |
| run_id | No | id of the run these numbers come from: the newest trusted run (a coverage run, or a verify run whose verdict passed) | |
| schema | No | payload schema version, 1 | |
| shallow | No | 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 | |
| commands | No | the call that answers stale and scored_changes; run it as given | |
| truncated | No | 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 | |
| dormant_top | No | the first 10 dormant functions, same shape as active: sleeping hazards kept out of the queue | |
| active_total | No | active rows admitted before the cap: what top or worklist_top hid | |
| dormant_count | No | ranked functions whose file had no commits in the window | |
| scored_changes | No | 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 | |
| churn_window_months | No | months of git history the churn weights cover, counted back from the commit date of HEAD |