ankhorage-coding-rules
Skill2 starsChanged 58 days agoMITView on GitHub
Implement, refactor, test, review, or hand off code changes in Ankhorage repositories. Use for task branches and pull requests, canonical lint compliance, behavior-focused testing, Paradox function documentation, validation, and release-quality delivery. Use ankhorage-project-structure as well when the task changes package ownership, public entrypoints, or source architecture.
In this repository4 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ankhorage-project-structureSkill
- hexagonal-architectureSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 11 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
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
- could be automatic: a setting could enforce it
- Distinctive: line 26
Keep the diff within the requested issue.
- Very specific: line 35
Never add, widen, or depend on eslint.local.config.mjs exceptions.
- Distinctive: line 37
Do not weaken rules or add suppression comments, unsafe casts, or similar bypasses merely to make validation pass.
- Very specific: line 41
Use functional programming by default: declare bindings with const, not let.
- Distinctive: line 45
Keep one canonical implementation.
- Distinctive: line 52
Use ordinary inline comments when they explain non-obvious intent, invariants, constraints, or the reason behind a decision.
- Very specific: line 60
Do not use JSDoc-only tags such as @param or @returns as Paradox metadata.
- Distinctive: line 63
Add a supported Paradox tag only when it changes or usefully enriches generated documentation.
- Distinctive: line 73
Update documentation sources in the pull request, including repository-owned manual documentation outside the configured generated output.
- Very specific: line 78
Run bun run docs locally only when the task explicitly changes or validates Paradox generation.
- Distinctive: line 83
Test observable behavior at the owning boundary.
- Distinctive: line 85
Do not hardcode package versions in tests.
- Very specific: line 88
Follow the range-shape patterns in the Devtools repository sync test and ZORA PR #313.
- Distinctive: line 91
Run focused unit or integration tests before full E2E and smoke suites.
- Distinctive: line 92
Do not rerun an unchanged E2E or smoke failure without a new hypothesis.
- Distinctive: line 100
Add the repository-required changeset for published behavior, package shape, dependency, or public API changes.
≈ “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
Ankhorage Coding Rules
Deliver focused changes that satisfy the repository's current canonical policy and are ready for
review. Read the repository AGENTS.md, package scripts, public exports, representative tests, and
documentation ownership before editing.
Repository instructions may add stricter requirements. They must not be bypassed with local exceptions or replaced by generic preferences from this skill.
Git and delivery
- For a new task, fetch the latest
origin/mainand create a fresh task branch from it. Never implement directly onmain. - Continue existing pull-request work on its existing branch. Do not create a nested task branch.
- Preserve unrelated or dirty user work. Use an isolated worktree when changing branches would disturb it.
- Keep the diff within the requested issue. Do not mix opportunistic cleanup into the change.
- Deliver coding work through a pull request. If remote writes are unavailable or unauthorized, prepare the branch and report the pending push or PR explicitly.
- Describe the change, architectural effect, validation, public API and changeset impact, documentation impact, and linked issue in the PR body.
Canonical lint compliance
- New and materially changed code must satisfy the canonical ESLint configuration.
- Never add, widen, or depend on
eslint.local.config.mjsexceptions. Existing exceptions are removable migration debt, not policy for new work. - Do not weaken rules or add suppression comments, unsafe casts, or similar bypasses merely to make validation pass.
- Resolve size, complexity, and related findings around cohesive responsibilities and clear data flow. Do not split a function or file mechanically just to cross a threshold.
- Use functional programming by default: declare bindings with
const, notlet; write pure functions with explicit inputs and outputs; and use immutable data and updates. Keep side effects explicit and at system boundaries. Mutation or reassignment is allowed only for a clearly justified boundary or demonstrated performance-critical path, and must remain locally contained. - Keep one canonical implementation. Do not add compatibility aliases, dual paths, historical-state fallbacks, or sibling-source imports.
Comments and Paradox documentation
- Give every named production function under
srca concise Paradox/*** ... */comment, including exported functions and internal named helpers. Inline callbacks are exempt. - Use ordinary inline comments when they explain non-obvious intent, invariants, constraints, or the reason behind a decision. Do not narrate self-explanatory code or duplicate what names and types already express.
- Paradox documentation metadata belongs only inside
/*** ... */comments. The canonical tag vocabulary is owned by@ankhorage/rules-documentation:@readme,@usage,@config,@title,@see,@security, and@performance. Unsupported tag-shaped lines are invalid.@exampledoes not exist. Preserve supported metadata tags verbatim; never rewrite them as prose headings or labels such asPerformance:. Do not use JSDoc-only tags such as@paramor@returnsas Paradox metadata. - Paradox comments contain documentation prose and metadata only. Fenced or indented code blocks are invalid; source examples come from real code. Inline code spans remain valid prose.
- Add a supported Paradox tag only when it changes or usefully enriches generated documentation; plain function descriptions do not need tags.
- README usage documentation must come from a real repository-root
examples/<example>/...source file. A package that opts into@usagemust have exactly one example combining@usage,@readme, and@title; additional@usageexamples remain full-doc-only. Do not create dedicatedreadme-usage,usage-readme,readmeUsage, or equivalent source modules whose only purpose is feeding README usage text. - Configuration documentation is optional until a package opts in. Once it does, the canonical schema
is
src/types/config.tswith exactly one root type/interface carrying@config,@readme, and@title. - Update documentation sources in the pull request, including repository-owned manual documentation outside the configured generated output. Never hand-edit generated README or Paradox artifacts.
- Generated documentation is release-owned. Ordinary feature pull requests must not regenerate or
commit
README.mdor the configured Paradox output. The managed release workflow runsbun run docsafter the package version bump and commits the result in the release commit. - Run
bun run docslocally only when the task explicitly changes or validates Paradox generation; do not commit that generated diff from an ordinary feature pull request.
Testing
- Test observable behavior at the owning boundary. Keep tests deterministic and independent of execution order, ambient state, and live network services.
- Do not hardcode package versions in tests. When testing dependency declarations, assert the required semver range shape or a shared policy value instead of a Renovate-managed literal version. Assert an exact version only when the pin is itself the contract under test.
- Follow the range-shape patterns in the Devtools repository sync test and ZORA PR #313.
- Run focused unit or integration tests before full E2E and smoke suites.
- Do not rerun an unchanged E2E or smoke failure without a new hypothesis. After two unsuccessful full reruns without a substantive code or configuration change, stop cycling, inspect logs and artifacts, and report the blocker.
Public API and release quality
- Export public symbols intentionally from canonical entrypoints and exercise those exports in tests. Do not introduce consumer deep imports.
- Add the repository-required changeset for published behavior, package shape, dependency, or public API changes.
- Justify new dependencies and keep generated artifacts, lockfiles, and package metadata aligned with the repository's owning workflows.
- Review the final diff, then run the applicable build, lint, test, typecheck, Knip, format, changeset-status, and packaging checks. Run documentation generation only when explicitly needed to validate documentation tooling behavior.
- Report the exact commands run and any omissions or failures. Do not imply a fully green handoff when a required check did not run or pass.
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.

