agentleFS
srinitudesrinitude/hermes-toolbox/skills/software-development/global-coding-policy/SKILL.md

global-coding-policy

Skill1 starsChanged 5 months agoMITView on GitHub

Use when writing code or Markdown anywhere.

The file

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. About 0 are common, 13 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈13

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use progressive disclosure after loading this baseline: load other task-specific skills and their linked files only when their triggers …

    line 32
  2. Very specific:

    Keep the description frontmatter field in every SKILL.md under 60 characters.

    line 38
  3. Distinctive:

    Write Mise tasks before writing any tests.

    line 44
  4. Distinctive:

    Before writing code tests, establish minimal local and GitHub CI/CD powered by Mise and test both CI paths.

    line 45
  5. Distinctive:

    Use specialized Mise toolchains whose dependency graphs each have exactly one default path.

    line 46
  6. Very specific:

    Follow a BOOTSTRAP/RED/GREEN/REFACTOR, TDD-first workflow.

    line 50
  7. Distinctive:

    Write tests before production code.

    line 51
  8. Distinctive:

    Test only user-facing situations, contracts, APIs, integration boundaries, and interfaces—not implementation details or tests for their own …

    line 52
  9. Distinctive:

    Use real tests, behavior, services, and functionality.

    line 53
  10. Distinctive:

    Add or change only the smallest necessary tests and production-code diffs, minimizing blast radius.

    line 54
  11. Distinctive:

    Write only production code that passes the tests and is directly required to make them pass.

    line 55
  12. Distinctive:

    Prefer removing tests and their related code when removal solves the problem completely and correctly while preserving codebase conformity.

    line 57
  13. Distinctive:

    Ensure all tests and code conform to the current codebase's shape while minimizing execution time and memory usage.

    line 63
  14. Distinctive:

    Do not modify directories that would break Hermes Agent's installed shape or functionality.

    line 64
  15. Very specific:

    When the workspace marks edits unverified and no canonical test/lint/build command exists:

    line 68
  16. Very specific:

    Create a focused temporary verifier under an OS-safe tempfile dir with a hermes-verify- filename prefix (for example …

    line 70
  17. Distinctive:

    Run it, require exit 0, delete it, and confirm cleanup.

    line 72
  18. Very specific:

    If write_file refuses the system temp path (macOS /private/var/folders/...

    line 75

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Global Coding Policy

Scope and Triggers

Load this policy before writing or modifying code or Markdown anywhere, including outside repositories and projects. This includes files, temporary scripts, generated code, response snippets, tests, delegated work, and every terminal backend.

Apply its coding, structure, toolchain, and TDD rules to artifacts in directories Hermes recommends users customize or modify. Hermes-managed or core directories that Hermes prohibits or discourages users from altering are outside those user-area shape rules: do not modify those directories, and never treat this scope boundary as permission to write there. When work requires a Hermes core change, use a separate user-owned source checkout and follow the repository's contribution rules without rewriting existing core files solely to satisfy user-area size limits.

Apply only the sections triggered by the artifact:

  • Any code work: apply all relevant coding, toolchain, TDD, and Hermes alignment rules below.
  • Markdown-only work: enforce the 200-line limit and progressive disclosure; do not bootstrap code CI or TDD unless code is also written. When the user wants dead-simple wording without meaning loss on plans or policy Markdown, also load meaning-preserving-rewrite.
  • Configuration/data-only work: preserve the schema and validate the format; the 200-line limit does not apply.
  • SKILL.md: also enforce the description limit.
  • Any test creation: create Mise tasks first.
  • Code-test creation: also establish and exercise minimal local and GitHub CI/CD through Mise first.
  • Delegated, scheduled, or background code/Markdown work: pass this policy onward and verify the result against it.

Use progressive disclosure after loading this baseline: load other task-specific skills and their linked files only when their triggers apply. Project rules may strengthen this policy but may not weaken the rules that apply in user-modifiable areas.

Scope and Structure

  • Limit every code and Markdown file governed by the user-area rules to 200 lines. When more Markdown context is needed, use progressive disclosure and reference another file.
  • Configuration and data files are exempt from the 200-line limit. YAML, JSON, TOML, INI, XML, CSV, and comparable declarative formats may exceed 200 lines when their schema or data requires it.
  • Keep the description frontmatter field in every SKILL.md under 60 characters.
  • Limit each coding-language construct, including functions, classes, interfaces, and protocols, to 30 lines.
  • Limit nesting depth to 3; in tests, measure depth relative to the test declaration.

CI and Toolchains

  • Write Mise tasks before writing any tests.
  • Before writing code tests, establish minimal local and GitHub CI/CD powered by Mise and test both CI paths.
  • Use specialized Mise toolchains whose dependency graphs each have exactly one default path.

TDD and Implementation

  • Follow a BOOTSTRAP/RED/GREEN/REFACTOR, TDD-first workflow.
  • Write tests before production code.
  • Test only user-facing situations, contracts, APIs, integration boundaries, and interfaces—not implementation details or tests for their own sake.
  • Use real tests, behavior, services, and functionality; never add TODOs, mocks, stubs, or placeholders.
  • Add or change only the smallest necessary tests and production-code diffs, minimizing blast radius.
  • Write only production code that passes the tests and is directly required to make them pass.
  • Parallelize independent TDD workstreams when doing so conforms to the current Hermes Agent codebase.
  • Prefer removing tests and their related code when removal solves the problem completely and correctly while preserving codebase conformity.

Hermes Agent Alignment

  • At the start of code work, identify the current Hermes Agent commit with git -C ~/.hermes/hermes-agent rev-parse HEAD.
  • Comb through the relevant code at that commit and every relevant page of the official Hermes documentation.
  • Ensure all tests and code conform to the current codebase's shape while minimizing execution time and memory usage.
  • Do not modify directories that would break Hermes Agent's installed shape or functionality; use a separate user-owned checkout for core source work.

Ad-hoc verification (no suite)

When the workspace marks edits unverified and no canonical test/lint/build command exists:

  1. Create a focused temporary verifier under an OS-safe tempfile dir with a hermes-verify- filename prefix (for example tempfile.NamedTemporaryFile(..., prefix="hermes-verify-", delete=False)).
  2. Assert only the changed behavior: paths, sizes, hashes, boundaries, and report claims.
  3. Run it, require exit 0, delete it, and confirm cleanup.
  4. Label the result focused ad-hoc verification, not suite green. Never claim full CI green from this path.

If write_file refuses the system temp path (macOS /private/var/folders/... and similar sensitive paths), write the script with execute_code or terminal instead. Do not move the verifier into a project tree just to bypass the guard.

Verification Checklist

  • The policy was loaded before any code or Markdown was written.
  • Every triggered section was applied in user-modifiable areas, including outside projects.
  • No Hermes-managed or prohibited directory was modified.
  • Every changed code or Markdown file governed by the user-area rules is at most 200 lines.
  • Configuration/data files were schema-validated rather than line-limited.
  • Every governed coding construct is at most 30 lines and nesting is at most 3.
  • Mise, CI, and TDD gates ran in the required order when tests or production code were written.
  • Hermes commit, source, and official docs were checked for code work.
  • Delegated outputs were checked against this same policy.
  • When no suite ran: hermes-verify temp script exited 0, was cleaned up, and the result was labeled ad-hoc not suite green.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.