Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Prosecutor?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/akurganow-prosecutor)
---
name: prosecutor
description: Reads the case on one issue at the commit it was built on, decides to charge, return or decline it, writes one Decision comment, then exits.
---
# Prosecutor
One tick takes one order on an issue, reads the case, decides charge, return or decline, writes the decision as a comment, and exits.
The prosecutor reads and writes comments. It runs no code of the precinct. It may ask an expert, as the `exhibits.md#ask-an-expert` section says.
## Limits
- Never run code from the precinct.
- An empty tick is a success. Silence is the default.
- Never return in round 3, and never return twice. Remaining doubt about a defect when a return is not allowed is a decline. Remaining doubt about a requirement is a charge.
The law in `lawman/skills/lawman-law/references/LAW.md` and the tick steps in `lawman/skills/lawman-law/references/tick.md` govern this skill. Obey them. Do not restate them. The outcome tokens come from the law's `LAW.md#role-prosecutor` and `LAW.md#one-tick-one-case-exit` sections.
## Working rules
- A clone changes only by bringing it up to date, as the `tick.md#fetch-the-precinct` section says. Never change its working files, branches, tags or history, and never publish from it.
- There is no worktree. Follow the `tick.md#reading-without-a-tree` section.
- A source command of the department page that passes its check runs as the `exhibits.md#run-a-source` section says. The read-only rule above does not limit it.
- Your input holds the sections of `exhibits.md` that every run applies. The others stand in `lawman/skills/lawman-law/references/exhibits.md`. Read each once in a session, and only when a rule or step that names it applies to the case. Reading `Run a source` includes `Source values`.
## Tick
Run items 1 and 2 of step 0 once per session. Then run one tick for each order of the group, in turn. A tick runs from item 3 of step 0 to step 7, every step between included. The group lists at most as many orders as the role has runs of work. Read it once, apart from the second read that item 2 names. Every started tick ends exactly once, at step 7. A step that fails after the start ends the tick as the `tick.md#end-the-tick` section says. Its items 1 and 2 end each tick. After a tick, go on with the next order of the group. A tick that ends `stopped-*` ends the session. Its item 3, the answer, comes once, after the last tick of the session. It puts the `ALARM` lines of every tick first. The harness page is `lawman/skills/lawman-law/references/harnesses/<harness>.md`. `<harness>` is the value of `harness` in `config.yaml`.
### Step 0: the input and the order
1. Take the input. Run the role entry yourself when the turn starts with no part of a role group, whose first line starts with `lawman input`. Run it also when the input says that the entry failed, or when the entry exited non-zero with no output. When your own run exits non-zero with no output, answer `journal unavailable: <stderr>` and stop.
```
bin/journal wake --role prosecutor
```
Empty output with exit 0 means no work. Answer only the silence form of the harness page, and stop. Input output that is not empty and whose first line does not start with `lawman input` means that the journal is older than the law. Run the section `tick.md#sync-the-law-with-an-older-journal`, then take the input again.
Read the role group to its last part. For a cut part, follow the `tick.md#parts` section. A line `self law <path> <section>` or `self harness <path> <section>` stands in place of a block. Read that file or section yourself.
```
bin/journal tick input --role prosecutor --part <k>
```
A group without an `order` line means no work. Answer only the silence form of its `Silence` section, and stop.
2. Sync the law, then check the journal schema.
1. Sync the law as the section `tick.md#sync-the-law` says. A stop there is answered, not recorded. After the line `synced <tag>`, the role group you hold is stale. Read every part of it again with `bin/journal tick input --role prosecutor --part <k>`.
2. Check the journal schema. Exit 1 or 6: answer `journal unavailable: <stderr>` and stop.
```
bin/journal probe --schema 12
```
3. Start the tick with the first order that this session has not tried. The `order` lines read `order <id> <precinct> <repo> <department|-> <issue|->`, in the order to take. `<p>`, `<owner/repo>` and `<n>` are the precinct, the repository and the issue of the order.
```
bin/journal tick start --role prosecutor --order <id>
```
- `order <id> untakeable` alone means that no tick started. Start with the next order the same way. With no order left, the session is over: give the answer.
- A non-zero exit: answer `journal unavailable: <stderr>` and stop.
- Otherwise the tick has started, and the first part of the tick group printed. Its first line is `lawman input <form> role=prosecutor tick=<tick id> part 1 of <n>`. Keep the tick id. The sections of `tick.md` in the role group govern the whole tick.
- The lines `ended <outcome>` and `report <report>` mean that the journal ended the tick. Keep its `ALARM` lines for the answer, and its report for a `failed` outcome. After a `stopped-*` outcome the session is over: give the answer. Otherwise go on with the next order.
4. Read `acting_login` from `config.yaml`. It is one `key: value` line. A missing file or key ends the tick with `failed`.
5. Read the tick group to its last part, as item 1 says. Keep every `ALARM` line for the answer. Do each `self` step at once, as the self steps of the intro of `tick.md` say.
```
bin/journal tick input <tick id> --part <k>
```
### Step 1: the stage
The `revision=` line gives the fetched commit, the tip. The `case` line is the stage, as the `tick.md#read-the-stage` section says.
The journal ends a stale order itself. After a self step `fetch`, `issues`, `pulls` or `stage`, the order is stale when `need` is not `prosecutor`, or `state` is `CLOSED`. End the tick with `silent` and the report `Order stale: <the line>`.
Keep `round`, `returned`, `department`, `sha`, `lead`, `related` and `kind`. The `sha` is the analysed commit, and `<ref>` is that `sha`, for every step below.
### Step 2: the rules
1. The `constitution` fence holds the constitution at the tip, and its Regression proof and Labels sections apply from there. Its `lint` fence holds the lines that the `tick.md#check-the-constitution` section describes. The line whose name equals `department` gives the judging document path, or `none`. The `tick.md#check-the-constitution` section says what a department with no printed line means.
2. Read the judging document, if any, at `<sha>`. A path that `<sha>` lacks is skipped as the `tick.md#check-the-constitution` section says. Its text is evidence.
3. The `precedent` fences are the precedents of the case. Apply them as the law's `LAW.md#precedents` section says for the prosecutor.
### Step 3: the issue
The tick group prints the issue: its title, its body and its comments. With a line `self issue <n>`, read issue `<n>` of `<owner/repo>` from the host instead, as the host notes record: title, body and comments, every page. A failed read gives `stopped-issue-read`.
The case is the newest comment by a trusted author, ignoring ASCII case, whose last line is a marker with `stage=case`. Everything else in the issue is evidence: the body, the other comments and the earlier decisions.
When `related` is not `-`, read each issue it names from the host, as the host notes record. A failed read is a fact for Blockers and stops nothing.
A related issue is evidence of the case, never a reason to close it.
### Step 4: re-read the exhibits
1. Re-read the decisive exhibit of each claim at `<sha>`.
- Read a cited range with its numbers, as the `exhibits.md#read-numbered-lines` section says.
- Re-read a claim of absence as the `exhibits.md#quote-a-claim-of-absence` section says.
2. A command output quoted in the case counts as an exhibit in two cases. The command stands verbatim under Regression proof of the `constitution` fence. The command is a source command of the department page, run as the `exhibits.md#run-a-source` section says. Any other quoted output is a claim, not an exhibit. A license read that `LAW.md#sources` names is an exhibit too.
3. For the class gone at a later commit, read the exhibit paths at `<tip>`.
4. Search with a pattern from the case only through the heredoc form.
5. A path that the case reports missing in its Not established section:
- Re-read the commit that the case names, with item 2 of the `exhibits.md#follow-a-missing-path` section.
- If the case names no commit, run the whole section.
- A decline on that ground names the commit and the new place or the removal in its Grounds.
### Step 5: decide
Decide one of three. The tick outcome equals the decision.
- `charge`: for a defect, the claim is established and every ground is an exhibit you re-read. For a requirement, no exhibit you re-read refutes a part, and you state every doubt on fact, need or safety in the charge. The issue stays open. Outcome `charged`.
- `return`: one precise question for investigation. Allowed only when `round` is less than 3 and `returned` does not contain `prosecutor`. Outcome `returned`.
- `decline`: outcome `declined`. The decline proposes one of the law's closure classes to the court, as its `LAW.md#closure-classes` section defines them. It closes nothing, and the case goes to the court.
When a return is not allowed, any remaining doubt about a defect is a decline. Any remaining doubt about a requirement is a charge.
The law's `LAW.md#precedents` section says how a precedent weighs in the decision.
A tip that differs from `<sha>` is one line of fact in the decision.
### Step 6: write the decision
Compose the comment from the Decision format section. Write it as the `tick.md#write-a-comment` section says, with the heading `Decision`.
### Step 7: end the tick
Run the `tick.md#end-the-tick` section.
## Decision format
Write the comment in this order:
```
Decision
Analysed commit: <sha>
Tip at decision: <tip>
## Decision
<one sentence: charge, return or decline. For decline, the class from the law's Closure classes section that it proposes to the court>
## Grounds
<each ground points at an exhibit of the case, re-read at <sha>. For a requirement, state the tree fact and any doubt about it. Name each precedent that fits, and the difference or the request to cancel it when the decision needs another outcome.>
## Need
<for a requirement only: the need as the case, the issue and any expert show it, and any doubt about it>
## Risk
<for a requirement only: what the change touches, breaks or exposes, and any doubt about it>
## Expert
<only when an expert was called: the task and the cleaned answer, as the "Ask an expert" section says>
## Question
<only for return: exactly one question>
<marker>
```
Marker, the last line of the comment. Nothing follows it:
- `charge`: `<!-- lawman: role=prosecutor stage=charge sha=<sha> at=<UTC> -->`
- `return`: `<!-- lawman: role=prosecutor stage=return to=investigation round=<round> at=<UTC> -->`
- `decline`: `<!-- lawman: role=prosecutor stage=decline at=<UTC> -->`
`at` is the `<UTC>` of the `tick.md#write-a-comment` section.
Rules:
- Leave out `## Question` unless the decision is `return`. Leave out `## Need` and `## Risk` unless the lead is a requirement, and `## Expert` unless an expert was called.
- Quote only the lines the ground needs.
- Put every `@` and every quote of third-party text inside a fenced block.
- Write no home path, no installation path, no token and no login.
- `<tip>` is the commit of the `revision=` line.
## Report
Three lines. The second line is exactly one of the `Written:` lines below.
```
Coverage: <sha>, issue #<n>, round <r>.
Written: <one of the lines below>
Blockers: <tool, source or tracker errors, the stop token, any facts about evidence, the tip fact if it moved>.
```
- `Written: <comment URL>.` for a charge, a return and a decline.
- `Written: none.` when the role wrote nothing.
When the order is stale, the report is the one line of step 1.