global-coding-policy
Skill1 starsChanged 5 months agoMITView on GitHub
Use when writing code or Markdown anywhere.
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- templates/AGENTS.mdAGENTS.md
- hermes-state-db-walSkill
- honcho-profile-tuningSkill
- crit-cliSkill
- critSkill
- goal-promptSkill
- hermes-agent-skill-authoringSkill
- hermes-skill-lifecycleSkill
- meaning-preserving-rewriteSkill
- planSkill
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
- Distinctive: line 32
Use progressive disclosure after loading this baseline: load other task-specific skills and their linked files only when their triggers …
- Very specific: line 38
Keep the description frontmatter field in every SKILL.md under 60 characters.
- Distinctive: line 44
Write Mise tasks before writing any tests.
- Distinctive: line 45
Before writing code tests, establish minimal local and GitHub CI/CD powered by Mise and test both CI paths.
- Distinctive: line 46
Use specialized Mise toolchains whose dependency graphs each have exactly one default path.
- Very specific: line 50
Follow a BOOTSTRAP/RED/GREEN/REFACTOR, TDD-first workflow.
- Distinctive: line 51
Write tests before production code.
- Distinctive: line 52
Test only user-facing situations, contracts, APIs, integration boundaries, and interfaces—not implementation details or tests for their own …
- Distinctive: line 53
Use real tests, behavior, services, and functionality.
- Distinctive: line 54
Add or change only the smallest necessary tests and production-code diffs, minimizing blast radius.
- Distinctive: line 55
Write only production code that passes the tests and is directly required to make them pass.
- Distinctive: line 57
Prefer removing tests and their related code when removal solves the problem completely and correctly while preserving codebase conformity.
- Distinctive: line 63
Ensure all tests and code conform to the current codebase's shape while minimizing execution time and memory usage.
- Distinctive: line 64
Do not modify directories that would break Hermes Agent's installed shape or functionality.
- Very specific: line 68
When the workspace marks edits unverified and no canonical test/lint/build command exists:
- Very specific: line 70
Create a focused temporary verifier under an OS-safe tempfile dir with a hermes-verify- filename prefix (for example …
- Distinctive: line 72
Run it, require exit 0, delete it, and confirm cleanup.
- Very specific: line 75
If write_file refuses the system temp path (macOS /private/var/folders/...
≈ “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.
Files
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
descriptionfrontmatter field in everySKILL.mdunder 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:
- Create a focused temporary verifier under an OS-safe tempfile dir with a
hermes-verify-filename prefix (for exampletempfile.NamedTemporaryFile(..., prefix="hermes-verify-", delete=False)). - Assert only the changed behavior: paths, sizes, hashes, boundaries, and report claims.
- Run it, require exit 0, delete it, and confirm cleanup.
- 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.
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
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.

