agentleFS
MicrosoftKnown publishermicrosoft/rayfin/packages/typescript-sdk/storage/AGENTS.md

rayfin / storage

AGENTS.md646 starsChanged 24 days agoMITView on GitHub

This package provides the standalone storage SDK for blob operations (upload, download, list, delete) with typed folder access. Run these from packages/typescript-sdk/storage/:

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    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
  1. Very specific:

    Run these from packages/typescript-sdk/storage/:

    line 7
  2. Distinctive:

    Schema Alignment: Keep folder names and schema keys aligned.

    line 31
  3. Distinctive:

    Composition: Prefer composing small helpers around folder clients over subclassing (clients are regenerated on access).

    line 32
  4. Distinctive:

    Options: Use options objects for prefixes, content types, and signals.

    line 34
  5. Very specific:

    Error Codes: Document new codes in storageErrorCodes.ts.

    line 36
  6. Very specific:

    Infrastructure: Run pwsh -File developer-setup.ps1 start from packages/host.

    line 46
  7. Very specific:

    Service: Run dotnet run in packages/host/Microsoft.Rayfin.WebService.

    line 47
  8. Very specific:

    Troubleshoot: If containers are unhealthy, run pwsh -File developer-setup.ps1 clean then start.

    line 49

≈ “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

@microsoft/rayfin-storage Agent Instructions

This package provides the standalone storage SDK for blob operations (upload, download, list, delete) with typed folder access.

Commands

Run these from packages/typescript-sdk/storage/:

# Build
rush build --to @microsoft/rayfin-storage

# Test
rushx test              # Unit tests
rushx test:watch        # Watch mode
rushx test:integration  # Integration tests (requires host services)

# Lint
rushx lint

Architecture

  • Entrypoint: createStorageClient returns a proxy mapping schema keys to folder clients.
  • Clients: Folder clients enforce strongly typed metadata from the schema.
  • Network: Uses shared ApiClient (@microsoft/rayfin-lib) for retries, auth, and error shaping.
  • Errors: Unified via StorageErrorCode literals and isStorageError guard.

Implementation Rules

  • Schema Alignment: Keep folder names and schema keys aligned; proxy maps properties directly to service folders.
  • Composition: Prefer composing small helpers around folder clients over subclassing (clients are regenerated on access).
  • Data Shapes: Extend StorageObjectRef in schema to support multiple data shapes per folder.
  • Options: Use options objects for prefixes, content types, and signals; do not mutate headers manually.
  • Exports: Align public exports with src/index.ts.
  • Error Codes: Document new codes in storageErrorCodes.ts.

Testing Strategy

  • Unit: src/__tests__/StorageClient.test.ts uses mocked ApiClient to validate request shaping.
  • Integration: src/__tests__/integration runs against the host web service.

Integration Test Workflow

  1. Prerequisites: Docker Desktop running (for SQL/Azurite).
  2. Infrastructure: Run pwsh -File developer-setup.ps1 start from packages/host.
  3. Service: Run dotnet run in packages/host/Microsoft.Rayfin.WebService.
  4. Run: Execute rushx test:integration from this package.
  5. Troubleshoot: If containers are unhealthy, run pwsh -File developer-setup.ps1 clean then start.

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.

Reviews can't be read right now.

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.