agentleFS
hiromailyhiromaily/go-crypto-wallet/AGENTS.md

go-crypto-wallet

AGENTS.md128 starsChanged 6 months agoMITView on GitHub

This document defines the behavior and values for AI agents working on this project. For detailed documentation, see llms.txt and ARCHITECTURE.md. When modifying rules, skills, or documentation, always edit the SSOT location. Sync Process: Don't Repeat Yourself (DRY): Define once, reference everywhere. When information exists in multiple places, update the SSOT and reference it from others.

We split this AGENTS.md into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Incremental Changes: - No breaking changes without rollback plan

    line 23
  2. Distinctive:

    Code Quality: - Follow language-specific linting and testing standards

    line 24
  3. Distinctive:

    Read relevant documentation before making changes

    line 31
  4. Distinctive:

    Run verification commands after code changes

    line 32
  5. Distinctive:

    Consider impact on offline wallet operations

    line 34

≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md 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
AGENTS.md
<!-- ⚠️ AUTO-GENERATED FILE — DO NOT EDIT Source: template/pages/AGENTS.tpl.md · Run `make docs` to regenerate. -->

Agent Guidelines for go-crypto-wallet

This document defines the behavior and values for AI agents working on this project. For detailed documentation, see llms.txt and ARCHITECTURE.md.

Project Identity

  • Type: Multi-signature cryptocurrency wallet (BTC, BCH, ETH, XRP, ERC-20)
  • Security Model: Offline cold wallets (keygen, sign) + Online watch wallet
  • Architecture: Clean Architecture with strict layer separation
  • Status: Under refactoring based on Clean Code principles

Core Values (Priority Order)

  1. Security First - Private key protection is non-negotiable
  2. Clean Architecture - Domain layer has ZERO infrastructure dependencies
  3. Single Source of Truth (SSOT) - One authoritative location for each piece of information
  4. Incremental Changes - No breaking changes without rollback plan
  5. Code Quality - Follow language-specific linting and testing standards

Expected Behavior

Always Do

  • Check current branch before starting any task (see git-workflow skill)
  • Read relevant documentation before making changes
  • Run verification commands after code changes
  • Wrap errors with context using fmt.Errorf("context: %w", err)
  • Consider impact on offline wallet operations

Never Do

  • ❌ Log private keys or sensitive information
  • ❌ Edit files marked DO NOT EDIT (auto-generated)
  • ❌ Push directly to main branch
  • ❌ Run git merge or gh pr merge
  • ❌ Run protoc or buf commands directly (always use Makefile targets like make proto, make proto-ts)

Ask Before

  • Making security-related changes
  • Breaking changes to public APIs
  • Changes affecting multiple layers

SSOT Structure

When modifying rules, skills, or documentation, always edit the SSOT location.

AI Agent Configuration

CategorySSOT LocationOther Locations
Rules.claude/rules/*.md.cursor/rules/*.mdc (auto-generated)
Skills.claude/skills/*/SKILL.md.cursor/skills/ (symlink)
Commands.claude/commands/.cursor/commands/ (reference only)

Sync Process:

  • .cursor/rules/ → Auto-generated via make sync-cursor-rules
  • .cursor/skills/ → Symlink to .claude/skills/

Project Documentation

CategorySSOT LocationNotes
Guidelinesdocs/guidelines/Coding, testing, security, workflow, database, code-generation
ArchitectureARCHITECTURE.mdSystem design
Agent behaviorAGENTS.md (this file)Entry point for all agents

Key Principle

Don't Repeat Yourself (DRY): Define once, reference everywhere. When information exists in multiple places, update the SSOT and reference it from others.

Documentation Map

NeedDocument
Project overviewllms.txt
Architecture designARCHITECTURE.md
AI Agent instruction designdocs/ai/design.md
Guidelinesdocs/guidelines/
Coding conventionsdocs/guidelines/coding-conventions.md
Securitydocs/guidelines/security.md
Testingdocs/guidelines/testing.md
Workflowdocs/guidelines/workflow.md
Database changesdocs/database/db-management.md
Auto-generated filesdocs/guidelines/code-generation.md
CLI commandsinternal/interface-adapters/cli/README.mdCommand × Chain × UseCase matrix (SSOT)
Internal packagesinternal/AGENTS.md
Public packagespkg/AGENTS.md

Quick Reference

Identifying BTC Address Types

PrefixTypeBIPSegWit
1...P2PKHBIP44❌
3...P2SH or P2SH-P2WPKHBIP16/BIP49△
bc1q...P2WPKH or P2WSHBIP84✅
bc1p...P2TR (Taproot)BIP86✅

Identifying BCH Address Types

PrefixTypeMultisig
bitcoincash:q...P2PKH❌
bitcoincash:p...P2SH✅

Transaction Size Comparison

PatternWeightvBytesNotes
P2PKH Single-sig (1-in, 2-out)~680~170Legacy
P2WPKH Single-sig (1-in, 2-out)~440~110Native SegWit
P2TR Single-sig (1-in, 2-out)~396~99Taproot
2-of-3 P2WSH Multisig~1,100~275Traditional Multisig
2-of-3 MuSig2 (P2TR)~560~140Signature Aggregation

See Also

  • llms.txt - AI-friendly project sitemap
  • ARCHITECTURE.md - System architecture
  • docs/guidelines/ - Project guidelines and standards

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.