Juggernaut.View.Advise (Juggernaut v0.4.0)

Copy Markdown View Source

mix juggernaut.advise for people (:human) and for agents (:agent, one JSON document, "kind": "advise"), from Juggernaut.Advise.analyse/2, and the result of --verify (verified/2).

The agent document holds counts (mutants by category), modules, startup (each boot-set function with its advice and evidence), tests (each probed test file: observed and declared category), misclassified, seams, declarations and next, the commands that would act on the advice. A declare advice is a person's to act on: its command is listed under for_a_person, never under next.

Summary

Functions

The agent document of advice (keys in a stable order).

The commands only a person may run on advice: declaring each function whose evidence allows it, and acknowledging each core declaration still unacknowledged.

The commands an agent may run on advice: --verify for functions with no evidence.

Renders advice in format.

The human or agent output of --verify: each function's pairs and their agreement.

Functions

agent(advice)

The agent document of advice (keys in a stable order).

for_a_person(advice)

@spec for_a_person(Juggernaut.Advise.t()) :: [String.t()]

The commands only a person may run on advice: declaring each function whose evidence allows it, and acknowledging each core declaration still unacknowledged.

next(advice)

@spec next(Juggernaut.Advise.t()) :: [String.t()]

The commands an agent may run on advice: --verify for functions with no evidence.

render(atom, advice)

@spec render(:human | :agent, Juggernaut.Advise.t()) :: iodata()

Renders advice in format.

verified(atom, functions)

@spec verified(:human | :agent, [map()]) :: iodata()

The human or agent output of --verify: each function's pairs and their agreement.