agentleFS
terrene-foundationterrene-foundation/pact/.claude/skills/17-gold-standards/SKILL.md

gold-standards

Skill0 starsChanged 8 months agoApache-2.0View on GitHub

Mandatory best practices and gold standards for Kailash SDK development including absolute imports, parameter passing, error handling, testing policies (Real infrastructure recommended in Tiers 2-3), workflow design, custom node development, security, documentation, and test creation. Use when asking about 'best practices', 'standards', 'gold standards', 'mandatory rules', 'required patterns', 'absolute imports', 'Real infrastructure recommended', 'testing policy', 'error handling standards', 'security best practices', 'documentation standards', or 'workflow design standards'.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 5 are distinctive, and 2 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.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    [gold-absolute-imports](gold-absolute-imports.md): - ALWAYS absolute, NEVER relative

    line 14
  2. Very specific:

    [gold-workflow-design](gold-workflow-design.md): - Always .build() before execute, string-based node API, single responsibility

    line 33
  3. Distinctive:

    [gold-security](gold-security.md): - No hardcoded secrets, env vars for credentials, input validation, injection prevention

    line 38
  4. Distinctive:

    [gold-documentation](gold-documentation.md): - Document all public APIs, include examples, explain WHY not just WHAT

    line 39
  5. Very specific:

    All workflow patterns follow the canonical 4-parameter pattern from /01-core-sdk.

    line 43
  6. Distinctive:

    All connections use 4 parameters

    line 59
  7. Distinctive:

    No mocking in Tier 2-3 tests

    line 64

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill 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
SKILL.md

Kailash Gold Standards - Mandatory Best Practices

These are required patterns that prevent bugs, ensure consistency, and maintain code quality.

Sub-File Index

Code Organization

  • gold-absolute-imports - ALWAYS absolute, NEVER relative
    • from kailash.workflow.builder import WorkflowBuilder (not from ..workflow import builder)
  • gold-parameter-passing - 4-parameter connections + dict result access
    • workflow.add_connection(source_id, source_param, target_id, target_param)
    • results["node_id"]["result"] (not results["node_id"].result)

Testing

  • gold-mocking-policy - Real infrastructure in Tiers 2-3
    • Mocking ONLY in Tier 1 unit tests; Tiers 2-3 use real databases, APIs, infrastructure
  • gold-testing - 3-tier strategy, deterministic tests, resource cleanup
  • gold-test-creation - TDD, one assertion focus, AAA pattern

Error Handling

  • gold-error-handling - Explicit handling, no silent swallowing, actionable messages, cleanup in finally

Workflow & Node Design

  • gold-workflow-design - Always .build() before execute, string-based node API, single responsibility
  • gold-custom-nodes - Extend BaseNode, validate inputs, consistent output format

Security & Documentation

  • gold-security - No hardcoded secrets, env vars for credentials, input validation, injection prevention
  • gold-documentation - Document all public APIs, include examples, explain WHY not just WHAT

Quick Reference

All workflow patterns follow the canonical 4-parameter pattern from /01-core-sdk.

StandardCorrectWrong
Importsfrom kailash.workflow.builder import WorkflowBuilderfrom ..workflow.builder import WorkflowBuilder
Connectionsworkflow.add_connection("n1", "result", "n2", "input_data")workflow.add_connection("n1", "n2")
Executionruntime.execute(workflow.build())runtime.execute(workflow)
Resultsresults["node_id"]["result"]results["node_id"].result
Secretsos.environ["API_KEY"]api_key = "sk-..."
TestingReal DB in Tier 2-3Mock(spec=DataFlow) in Tier 2-3
Errorsexcept WorkflowExecutionError as e: logger.error(...)except: pass
DevelopmentWrite test first, then implementImplement first, add tests later

Before Every Commit

  • All imports absolute
  • All connections use 4 parameters
  • .build() called before execute
  • No hardcoded secrets
  • Error handling present
  • Tests written (TDD)
  • No mocking in Tier 2-3 tests
  • Documentation updated

Related Skills

  • 16-validation-patterns - Validation tools
  • 31-error-troubleshooting - Error patterns
  • 12-testing-strategies - Testing strategies
  • 01-core-sdk - Core patterns

Support

  • gold-standards-validator - Automated compliance checking
  • pattern-expert - Pattern validation
  • testing-specialist - Testing compliance

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.