agentleFS
ankhorageankhorage/devtools/.agents/skills/ankhorage-coding-rules/SKILL.md

ankhorage-coding-rules

Skill2 starsChanged 9 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.

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
  1. Distinctive:

    Keep the diff within the requested issue.

    line 26
  2. Very specific:

    Never add, widen, or depend on eslint.local.config.mjs exceptions.

    line 35
  3. Distinctive:

    Do not weaken rules or add suppression comments, unsafe casts, or similar bypasses merely to make validation pass.

    line 37
  4. Very specific:

    Use functional programming by default: declare bindings with const, not let.

    line 41
  5. Distinctive:

    Keep one canonical implementation.

    line 45
  6. Distinctive:

    Use ordinary inline comments when they explain non-obvious intent, invariants, constraints, or the reason behind a decision.

    line 52
  7. Very specific:

    Do not use JSDoc-only tags such as @param or @returns as Paradox metadata.

    line 60
  8. Distinctive:

    Add a supported Paradox tag only when it changes or usefully enriches generated documentation.

    line 63
  9. Distinctive:

    Update documentation sources in the pull request, including repository-owned manual documentation outside the configured generated output.

    line 73
  10. Very specific:

    Run bun run docs locally only when the task explicitly changes or validates Paradox generation.

    line 78
  11. Distinctive:

    Test observable behavior at the owning boundary.

    line 83
  12. Distinctive:

    Do not hardcode package versions in tests.

    line 85
  13. Very specific:

    Follow the range-shape patterns in the Devtools repository sync test and ZORA PR #313.

    line 88
  14. Distinctive:

    Create new unit tests only.

    line 91
  15. Distinctive:

    Do not rerun an unchanged failing test without a new hypothesis or substantive change.

    line 95
  16. Distinctive:

    Add the repository-required changeset for published behavior, package shape, dependency, or public API changes.

    line 102

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

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/main and create a fresh task branch from it. Never implement directly on main.
  • 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.mjs exceptions. 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, not let; 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 src a 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. @example does not exist. Preserve supported metadata tags verbatim; never rewrite them as prose headings or labels such as Performance:. Do not use JSDoc-only tags such as @param or @returns as 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 @usage must have exactly one example combining @usage, @readme, and @title; additional @usage examples remain full-doc-only. Do not create dedicated readme-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.ts with 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.md or the configured Paradox output. The managed release workflow runs bun run docs after the package version bump and commits the result in the release commit.
  • Run bun run docs locally 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.
  • Create new unit tests only. Existing tests of all types may be executed, corrected, or extended with directly relevant assertions; never weaken assertions to conceal regressions.
  • New integration, E2E, smoke, browser, simulator, performance, or other non-unit tests require explicit user authorization. Never invent additional test matrices.
  • Do not rerun an unchanged failing test without a new hypothesis or substantive change; inspect available 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.

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.