Skip to content

Latest commit

 

History

History
74 lines (48 loc) · 3.31 KB

AGENTS.md

File metadata and controls

74 lines (48 loc) · 3.31 KB

AI Agent Guidelines

AI agents contributing to this repository must follow project conventions.

Description

The Device Management Kit (DMK) is a TypeScript library that provides easy communication with Ledger devices.

Documentation

Tools

  • proto is used as the toolchain manager to install the right version of every tool.
  • pnpm is used as the package manager to install all the dependencies.
  • Use gh CLI (if available) for GitHub operations (create/update PRs, view workflows, comments, etc.)

Cursor Skills

Skills are activated automatically when the user's request matches a trigger phrase.

Skill Trigger Description
Release Packages release, /release Orchestrates the full release flow using scripts in .cursor/scripts/release/
Backmerge backmerge, /backmerge Backmerge release into develop after PR merges

Cursor Commands

Commands are invoked explicitly by the user (via the command palette or / prefix).

Command Description
commit Create a commit following gitmoji conventions
changeset Create a changeset for a package
create-pr Create a GitHub PR with proper title, changeset, and CI validation
trigger-snapshot-release Trigger the snapshot release CI workflow

Cursor Rules

Rules provide context to agents when relevant (not always applied).

Rule Description
commit.mdc Gitmoji commit message format and signing requirements
changeset.mdc Changeset creation guidelines (one package per changeset, bump types)

Cursor Hooks

Hooks run automatically on agent events. Configured in .cursor/hooks.json.

Hook Event Description
format.cjs afterFileEdit Auto-formats edited files with Prettier
post-task-checks.cjs stop Runs tests, lint, and typecheck on changed packages

GitHub Copilot Review

Copilot reviews PRs using these instruction files:

File Scope
copilot-instructions.md Repo-wide review rules (focus areas, intentional patterns not to flag)
instructions/ Path-scoped rules (applyTo): signers, device actions, transports, tests, apps, CI

When you change a repo convention (lint rules, architecture, changeset policy), update these files too. Put rules that only apply to some paths in a scoped instructions/ file, not in the repo-wide file.

Sandbox permissions

The following commands require required_permissions: ["all"] because the default sandbox blocks post-install scripts, native module builds, or network access they need:

  • pnpm install / pnpm i
  • Any command that calls the GitHub API via gh (e.g. gh auth status, release scripts that fetch PR metadata)