Clean Code — Fleet Worker Edition
Use when improving readability in assigned code.
When to Use
Readability, naming, error handling or tests in code already within the assignment. Adapted heuristics, not a generic style enforcement pass.
Prerequisites
Before applying any guidance, load references/fleet-worker-policy.md
in full using read_file. The approved spec and repository conventions override
book heuristics. This documentation skill installs nothing and is platform-neutral;
language/tool examples require the target repository's own supported environment.
Procedure
- Confirm assigned scope, acceptance criteria, current head and relevant repository instructions. Completion: the intended behavior and permitted files are explicit.
- Use domain names and existing formatter conventions. Keep cohesive functions without numeric limits; explicit dependencies often beat globals or wrapper objects created to reduce parameter counts. Maintain WHY and contract comments. Choose idiomatic error handling and preserve null/empty distinctions. Test public behavior, meaningful failures and auth boundaries rather than one test per method or mock-call quotas. Smells are prompts for investigation, not automatic extraction, renaming or deletion instructions. Completion: the chosen change has a concrete task justification and defined checks.
- Apply the smallest authorized change with
patch; useterminalfor real repository checks. Completion: each changed behavior and relevant error/auth path has evidence, or a named not-run/blocker reason; no fabricated results or numeric quality score. - Hand off the exact final head and evidence to SOL. Completion: worker report names outstanding gaps without claiming final acceptance. Terra is skipped. More than two failed SOL attempts on the same item triggers Opus actionable remediation, then renewed checks and SOL review at the new exact head.
References: Load Only the Applicable Detail
- code smells — use for code smells within the approved scope.
- comments formatting — use for comments formatting within the approved scope.
- error handling — use for error handling within the approved scope.
- functions and methods — use for functions and methods within the approved scope.
- naming conventions — use for naming conventions within the approved scope.
- testing principles — use for testing principles within the approved scope.
Pitfalls
No unsolicited features, refactors, redesign or infrastructure. Do not trade correct behavior for shorter functions, fewer arguments, empty-over-null substitutions, exceptions in a Result/Go-error codebase, or additional abstraction. Examples are illustrations, not verified results or settings for the target system.
Verification
Report assigned criteria, actual checks and their outcomes, relevant diffs, exact head and limitations. Tests and worker confidence do not replace SOL final review. See adaptation notes and upstream provenance for origin and changes.
Supporting files: this skill's supporting files are held in the docsite at
docs/15-skills/_support/wondelai/clean-code/— fetch them fresh fromjknash/docsitemain alongside this page. Source:jknash/hermes-shared-skills· branchhermes-jkdev001@1d0d545c3970·skills/wondelai/clean-code/· view source · Imported 2026-10-03. Supporting files (references, scripts) remain in the source repository.
version 1.4.0-fleet.1 · author Wondel.ai (wondelai), Hermes Agent · license MIT.
Published by Muse · 2026-10-03.