sdk-implementation-guide

Guides implementation of new Envilder runtime SDKs across multiple programming languages.

138|5|Updated Sep 19, 2024
One-click install
npx skills add https://github.com/macalbert/envilder --skill sdk-implementation-guide-macalbert
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sdk-implementation-guide
Source: https://github.com/macalbert/envilder/tree/main/.github/skills/sdk-implementation-guide
Command: npx skills add https://github.com/macalbert/envilder --skill sdk-implementation-guide-macalbert

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building a new runtime SDK for Envilder (Go, Java, PHP, Rust, etc.) requires consistent architecture, API surface, and conventions across languages. Without a shared guide, each SDK drifts in structure, naming, and behavior, making reviews and maintenance painful. ## Core Features & Use Cases - Standardized Folder Structure: Defines the domain/application/infrastructure layering every SDK must follow, adapted to each language's conventions. - Mandatory API Surface: Specifies Tier 1 static facade (load, resolveFile) and Tier 2 fluent builder (fromMapFile with provider options), plus environment routing. - Provider Contract & Conventions: Covers missing-secret handling, sync/async models per runtime, batch vs individual fetching, internal vs public visibility, naming conventions, and Go vanity imports. - Use Case: A contributor implementing the Rust SDK follows the guide to structure crates, implement the ISecretProvider trait, wire AWS SSM and Azure Key Vault providers, and validate against the PR checklist. ## Quick Start Ask the AI to walk you through implementing a new Envilder SDK for your target language using this guide, starting with the domain types and MapFileParser.

Frequently Asked Questions about sdk-implementation-guide

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement a new Envilder SDK for a language like Go or Rust?

Follow the implementation order in the guide: define domain types first, then MapFileParser, EnvilderClient, the AWS and Azure providers, the Envilder facade, and validation. Each step includes required unit and acceptance tests.

What API surface must every Envilder SDK expose?

Every SDK must provide a Tier 1 static facade with load and resolveFile methods, plus a Tier 2 fluent builder starting from fromMapFile with provider, vault URL, and profile options. Both tiers must support environment routing.

Should an SDK use sync or async methods for secret resolution?

It depends on the runtime: Node.js and Rust are async-only, Python and PHP are sync-only, while .NET and Java offer both. Go uses sync calls with context.Context and goroutines for batch operations.

How should SDKs handle missing secrets from AWS SSM or Azure Key Vault?

Providers must never throw on missing secrets; they return null, None, nil, or omit the entry from results. Validation is opt-in through a separate validateSecrets function that throws on empty or missing values.

How do I keep internal SDK components like SecretProviderFactory private?

Each language uses its own mechanism: internal keyword in .NET, underscore prefix in Python, unexported lowercase in Go, package-private in Java, pub(crate) in Rust, and excluding it from the barrel export in Node.js.

What tests are required before submitting an SDK pull request?

You need unit tests for MapFileParser, EnvilderClient, the facade, validation, and cross-provider checks, plus acceptance tests using LocalStack for AWS SSM and Lowkey Vault for Azure Key Vault. All tests must pass with Docker available.