NAME

Skilletor::Report - The reports of sync, check and status – their shape, their text, their exit codes (spec §8)

VERSION

version 0.008000

SYNOPSIS

use Skilletor::Report qw( report_text exit_code );

my $report = $sk->sync;
print report_text($report) || 'skilletor: up to date', "\n";
exit exit_code( sync => $report );

DESCRIPTION

The reference's report.ts (spec §8), and the text skilletor status and skilletor check print (cli.ts). The reports themselves are plain data, built by Skilletor::Engine with their keys in the reference's order; "report_json" writes them as skilletor sync --json, check --json and status --json print them. The other functions word them for a person or a model's context, line for line as the CLI does: the same marks, the same activation hints (a skill is active at once, an agent or rule after /reload-plugins), every line passed through "display_safe".

report_json

print report_json( $sk->sync ), "\n";

A sync, check or status report as the CLI's --json prints it, byte for byte: JSON.stringify(report, null, 2) ("js_stringify" in Skilletor::JSON), keys in their order, every line through "display_safe", without the final newline. The escapes are JSON's own, so the text parses back to the same values.

report_text

The sync report's text; empty when no scope has anything to say (the CLI then prints skilletor: up to date).

report_hook

my $h = report_hook( $sk->sync );   # { systemMessage => …, additionalContext => … }

What the hooks make of a sync report (the reference's reportHook): a one-line systemMessage counting the items updated, removed, the warnings and the files to commit, and an additionalContext with one line per synced item (its activation hint; an item of another harness than Claude Code names it) and per counted warning, each line through "display_safe". A report with an error gives that line alone; one with nothing to say an empty hash. A run that added, updated or removed nothing leaves out what it would say in every session: an agent's missing briefing skills, and the settings warnings of a scope whose .claude/settings.json it did not update. The report itself is not changed.

status_text

check_text

changed or up to date.

exit_code

exit_code( sync | check | status => $report );

The CLI's exit code: 2 for a report with an error, 1 for a check that found a reason to sync, else 0.

display_safe

One line with every control character but tab, every bidi control, the line and paragraph separators, the zero-width space, word joiner and BOM escaped the JSON way (\n, \u001b, ‮): a name or a message from a config or a source cannot move the cursor, recolour or reorder what is shown.

empty_scope_report

empty_scope_report('user');

conflict_hint

The text after a conflict's path: already exists (use --force to adopt).

backend_label

git https://…, local /path.

has_changes

True when a sync added, updated or removed an item.

has_notable

True when a sync report has anything a hook would show.

ACTIVATION

SUPPORT

Issues

Please report bugs and feature requests at https://github.com/Getty/skilletor/issues.

CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

AUTHOR

Torsten Raudssus <torsten@raudssus.de>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2026 by Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)