HankweaveWritingAboutusJoinus
HankweaveWritingAbout

Appendix A: Meta-Spec for AI-First Data Tools

Hrishi Olickel·February 26, 2026
  • Introduction
  • Core Principles
  • Principle 1: Maximize Explicitness & Context
  • Principle 2: Provide Debuggable Feedback
  • Principle 3: Ensure Operational Transparency
  • Principle 4: Enable Introspection & Discovery
  • Principle 5: Implement Robust Input Handling
  • Principle 6: Prefer Statelessness or Explicit State Management
  • Standardization
  • Standard Input Methods & Common Parameters
  • Standard Output Structure (JSON Format)
Note

This spec was written in April 2025, during our CISC-era attempt to define how AI-first tooling should behave. We've since moved away from thick, specialized tools toward simple primitives inside agentic loops — but the underlying principles about explicitness, debuggability and statelessness proved prescient and influenced how we design hank codons today. See the parent article for context.

Introduction

These principles define the standard for building AI-First Data Tools within Southbridge. The primary user of these tools is an AI agent (e.g., an LLM-based system). Human usability is secondary. The goal is to provide AI agents with reliable, transparent, and informative instruments to programmatically explore, understand, validate, and manipulate data.

These tools prioritize explicitness, structured communication, robust feedback, operational transparency, discoverability, predictable state handling, and resource awareness over human-centric interface conventions. Technical jargon is acceptable and encouraged where it enhances precision and conciseness, as the target AI agents can typically process it effectively.

Beyond operational robustness, a key goal is to provide semantic signals where possible — hints about the meaning or relationships within the data (e.g., identifying potential emails, addresses, or primary keys) — to aid the AI agent's downstream reasoning and task planning.


Core Principles

Principle 1: Maximize Explicitness & Context

  • Assume Zero Agent Context: Tool execution must be self-contained. Outputs cannot rely on implicit knowledge or prior interaction history.
  • Embed Operational Metadata: Every report MUST include metadata detailing the execution context (see Standard Output Structure below).
  • Structured Data Exchange: Use standard, easily parseable formats (JSON primarily, Markdown for summaries) for input configuration and output reporting.
  • Clarity & Precision: Use precise language, including technical jargon where appropriate. Ensure necessary operational details (scope, parameters, algorithms used) are clearly stated.

Principle 2: Provide Debuggable Feedback

  • Structured Reporting Standard: Adhere to the defined output structure for all executions (Success, Failure, Partial Success).
  • Actionable Error Details: Failures must report:
    • Clear error description (precise, using technical terms if appropriate).
    • Specific error location (file, line, record, column, value).
    • Likely cause (validation failure, parsing error, resource limit, timeout).
    • Potential remediation suggestions for the AI agent.
  • Execution Trace & Progress: Include a concise log of key internal steps, especially highlighting the failure point. For potentially long-running tasks, use standardized PROGRESS: messages within the trace.

Principle 3: Ensure Operational Transparency

  • Declare Scope: Always make the scope of analysis explicit within the operational metadata (e.g., "Processed first 1MB", "Analyzed 10% random sample").
  • Disclose Key Algorithms/Heuristics: Briefly state non-obvious methods used if they significantly impact interpretation (e.g., "Normalized using Z-Score", "Clustered via K-Means (k=5)").
  • Prioritize Determinism & Idempotency: Strive for deterministic outputs. Design operations to be idempotent where the task allows. If an operation is inherently non-deterministic or non-idempotent, document this clearly. Report seeds used for randomness.

Principle 4: Enable Introspection & Discovery

  • Standardized Self-Description (--help): All tools MUST implement a --help mechanism providing a machine-readable description of: purpose, usage syntax, all parameters with types/descriptions/defaults, output structure, and common error conditions.

Principle 5: Implement Robust Input Handling

  • Prefer Explicit Configuration: Favor structured configuration (CLI arguments, config files) over complex natural language parsing within the tool.
  • Validate Inputs Strictly: Use sensible defaults, but rigorously validate required parameters, types, and allowed values. Provide specific errors upon validation failure.

Principle 6: Prefer Statelessness or Explicit State Management

  • Default to Statelessness: Tools SHOULD be designed to be stateless whenever possible.
  • Explicit State Handling: If state is required (e.g., incremental processing), it MUST be handled explicitly. State should be passed into the tool (e.g., --state-file <path>) and returned out as part of the standard output structure (e.g., a next_state field). Avoid implicit state persistence within the tool's runtime between invocations.

Standardization

Standard Input Methods & Common Parameters

Input Sources: Support primary data input via file path(s) (--input <path>), standard input (piping), or optionally direct connection details (e.g., database URI).

Standard Parameters (must be implemented by all tools):

ParameterDescription
--helpDisplay usage information (Principle 4)
--input <source>Specify primary input data source(s)
--output <path>Optional path to write the primary result
--output-format <format>Report format: json (default) or markdown
--config <path>Path to a configuration file (YAML or JSON)
--verbosity <level>Logging detail: quiet, normal, debug, trace
--timeout <seconds>Maximum execution time
--state-file <path>Path to read/write persistent state (Principle 6)

Standard Output Structure (JSON Format)

All tools MUST output a JSON object conforming to this structure:

JSON
{ "operation_metadata": { "tool_name": "string", "tool_version": "string", "timestamp_start": "string", "timestamp_end": "string", "duration_ms": "integer", "status": "Success | Failure | Partial Success", "input_source_summary": "string", "input_scope_summary": "string", "parameters_used": {}, "resource_usage": { "peak_memory_mb": "integer | null" } }, "results": "object | array | string | null", "next_state": "object | string | null", "error_info": { "description": "string", "location": "string | null", "cause": "string | null", "suggestions": ["string"], "error_code": "string | null" }, "execution_trace": ["string"] }
  • next_state: Used by stateful tools (Principle 6) to pass state information for subsequent calls.
  • error_info: MUST be populated on Failure or Partial Success. Must be null on Success.
  • execution_trace: Provides debugging context and can include PROGRESS: messages.
← Back to main articleRISC won: Building towards Data AGI
Southbridge AI
WritingAboutGitHub
  • Introduction
  • Core Principles
  • Standardization
AboutJoin