Skip to main content

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​

  1. Confirm assigned scope, acceptance criteria, current head and relevant repository instructions. Completion: the intended behavior and permitted files are explicit.
  2. 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.
  3. Apply the smallest authorized change with patch; use terminal for 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.
  4. 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​

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 from jknash/docsite main alongside this page. Source: jknash/hermes-shared-skills · branch hermes-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.