Skip to content

Phase 4: Gateway Command Updates #7

@discreteds

Description

@discreteds

Overview

Update gateway command (commands/kleene.md) to use yq for registry and save operations.

Tasks

  • yq for registry operations
    • List enabled scenarios efficiently
    • Get scenario paths for unregistered check
    • Sync metadata with minimal reads
  • yq for save listing
    • Extract save metadata without full file reads
    • Sort saves by date efficiently
  • Enhanced save format with node previews
    • Rich save listings without loading scenarios
    • Resume preview shows context

Templates

# Scenario Menu Data
yq '.scenarios | to_entries | .[] | select(.value.enabled) | {id: .key, name: .value.name, description: .value.description, path: .value.path}' registry.yaml

# Save Metadata Batch
for f in ./saves/scenario/*.yaml; do
  yq --arg file "$f" '{file: $file, turn: .turn, node: .current_node, saved: .last_saved}' "$f"
done

Acceptance Criteria

  • Registry operations use yq when available
  • Save listing uses yq for metadata extraction
  • Save files include cached node title/preview
  • Old saves load without cached metadata (graceful degradation)

References

  • Plan: kleene/docs/plans/yq-scenario-optimization.md (Phase 4, lines 437-479)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions