Skip to content

Add lattice schema command for node type introspection #8

@gmoon

Description

@gmoon

Requirement

REQ-CLI-021 — Schema introspection command for node types

Summary

Agents sometimes need to know the exact YAML structure for a node type (what fields exist, which are required, valid enum values) before creating or editing nodes. Currently they learn this from the skill or by example, which can lead to malformed YAML when the skill is incomplete.

A lattice schema <type> command would display the full structure, eliminating guesswork.

Motivation

Inspired by gws schema drive.files.list from gws which lets agents inspect API payload shapes before constructing requests. See SRC-GWS-CLI in the lattice.

Example Output

$ lattice schema requirement
type: requirement
fields:
  id:          string (required) — e.g., REQ-FEAT-001
  title:       string (required)
  body:        string (required)
  status:      enum [draft, active, deprecated, superseded] (default: active)
  priority:    enum [P0, P1, P2] (required)
  category:    string (required)
  tags:        list<string> (optional)
  version:     semver (auto-managed)
  created_by:  string (required)
edges:
  derives_from: list<id> (optional) — thesis IDs
  depends_on:   list<id> (optional) — requirement IDs

Acceptance Criteria

  • lattice schema requirement|thesis|source|implementation shows all fields with types
  • Required vs optional clearly indicated
  • Enum values shown for constrained fields
  • Edge types shown with valid targets
  • --format json outputs structured schema for programmatic use

Lattice

  • Derives from: THX-AGENT-NATIVE-TOOLS
  • Source: SRC-GWS-CLI

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions