agentleFS
keep-starknet-strangekeep-starknet-strange/starknet-agentic/AGENTS.md

starknet-agentic

AGENTS.md80 starsChanged 7 months agoMITView on GitHub

This is the single canonical instruction file for automated coding agents in this repository. Keep behavior and workflow directives here. Compatibility policy: - AGENTS.md is canonical. - Any tool-specific file (for example CLAUDE.md) must be a thin adapter or reference layer, not a conflicting instruction source. Build production-grade Starknet agent infrastructure: secure Cairo contracts, reliable runtimes, and high-signal skills that external developers can install and use with minimal friction. This repository includes: - Cairo contracts (contracts/**) - TypeScript packages and…

The file

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

12 rules. About 0 are common, 11 are distinctive, and 1 is 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.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Keep normative process guidance in this file only.

    line 28
  2. Distinctive:

    Do not duplicate behavioral rules across multiple root files.

    line 29
  3. Distinctive:

    Prefer narrow diffs with explicit acceptance checks.

    line 31
  4. Distinctive:

    Treat key handling, policy enforcement, and upgrade paths as critical.

    line 33
  5. Distinctive:

    Use pinned refs for install docs and deterministic validation scripts.

    line 35
  6. Distinctive:

    Use authoring -> testing -> optimization -> auditor flow for Cairo work.

    line 37
  7. Distinctive:

    Keep changes focused and reversible.

    line 66
  8. Distinctive:

    Verify interface compatibility and security posture.

    line 72
  9. Very specific:

    Use conventional commits (feat:, fix:, docs:, chore:, test:, refactor:, ci:).

    line 95
  10. Distinctive:

    Test on Sepolia before any mainnet deployment.

    line 97
  11. Distinctive:

    run the relevant deterministic benchmark command

    line 109
  12. Distinctive:

    if touching benchmark/eval policy, update scorecards and gate docs

    line 110

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

AGENTS.md - Canonical Agent Instructions

This is the single canonical instruction file for automated coding agents in this repository. Keep behavior and workflow directives here.

Compatibility policy:

  • AGENTS.md is canonical.
  • Any tool-specific file (for example CLAUDE.md) must be a thin adapter or reference layer, not a conflicting instruction source.

Mission

Build production-grade Starknet agent infrastructure: secure Cairo contracts, reliable runtimes, and high-signal skills that external developers can install and use with minimal friction.

Scope

This repository includes:

  • Cairo contracts (contracts/**)
  • TypeScript packages and examples (packages/**, examples/**)
  • public installable skills (skills/**)
  • quality/security gates (scripts/quality/**, CI workflows)

Core Operating Principles

  1. Single source of truth:
    • Keep normative process guidance in this file only.
    • Do not duplicate behavioral rules across multiple root files.
  2. Small, testable changes:
    • Prefer narrow diffs with explicit acceptance checks.
  3. Security-first for high-risk paths:
    • Treat key handling, policy enforcement, and upgrade paths as critical.
  4. Reproducibility:
    • Use pinned refs for install docs and deterministic validation scripts.
  5. Explicit handoffs:
    • Use authoring -> testing -> optimization -> auditor flow for Cairo work.

Roles and Boundaries

RoleOwnsDoes Not Own
CoordinatorScope, plan, sequencingLarge feature implementation
Contracts ExecutorCairo contracts/tests/deploy scriptsUnrelated UX changes
Runtime ExecutorMCP/A2A/adapters/tool runtimeSilent ABI/policy shape changes
Skills Executorskills/**, references, install UX docsContract logic changes without coordination
ReviewerCorrectness, security regressions, release gatesInitial implementation

Task Lifecycle

todo -> inprogress -> inreview -> done

The blocked state can be entered from any state when waiting on a dependency or decision.

Work Protocol

1) Investigation (Coordinator)

  • Identify touched files/interfaces and risk class.
  • Define acceptance checks before implementation.
  • Mark parallelizable vs serialized work.

2) Execution (Executor)

  • Implement only approved scope.
  • Keep changes focused and reversible.
  • Surface blockers immediately.

3) Review (Reviewer)

  • Run relevant checks.
  • Verify interface compatibility and security posture.
  • Confirm acceptance criteria are satisfied.

Parallelization Rules

Safe to parallelize:

  • packages/** or examples/** vs contracts/** when interfaces are stable
  • independent skill docs under different skills/<name>/
  • docs work while long test suites run

Must serialize:

  • Any shared interface change (ABI, calldata shape, policy fields)
  • changes to scripts/** and CI workflows
  • concurrent edits to the same skill directory

Conflict resolution:

  1. Detect overlap early (rg on touched files).
  2. Pause dependent work if overlap exists.
  3. Land interface change first with tests.
  4. Rebase/adjust dependents, then re-verify.

Git and Deployment

  • Use conventional commits (feat:, fix:, docs:, chore:, test:, refactor:, ci:).
  • Branch from main for every change.
  • Test on Sepolia before any mainnet deployment.

Required Validation by Change Type

Skills/install UX changes:

  • python3 scripts/quality/validate_skills.py
  • python3 scripts/skills_manifest.py --check
  • python3 scripts/quality/check_codex_distribution.py
  • python3 -m unittest scripts/quality/test_codex_distribution.py
  • python3 scripts/quality/validate_marketplace.py

Cairo skill benchmark/eval changes:

  • run the relevant deterministic benchmark command
  • if touching benchmark/eval policy, update scorecards and gate docs

Contract changes:

  • scarb build and snforge test in impacted contract package(s)

TypeScript package changes:

  • package build + tests for impacted workspace packages

Escalation Rules

Escalate when:

  • public interfaces or policy schema change
  • security-sensitive behavior changes (keys, approvals, upgrade authority)
  • deployment credentials/funding/network access are required
  • contradictory requirements block progress

Escalation format:

## Escalation: [Title]
**Blocker**: [...]
**Options**:
1. [...]
2. [...]
**Recommendation**: [...]

Canonical References

  • Skills spec and format: references/agentskills/**
  • System architecture and boundaries: docs/SPECIFICATION.md
  • Security policy: SECURITY.md
  • Cairo skill cutover (legacy name mapping): skills/README.md ("Cairo Skill Cutover")
  • Skills distribution docs: skills/README.md

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.