AGENTS.md

Project Identity

Project Name: ratatui_ruby

Description: A high-performance Ruby wrapper for the Ratatui TUI library.

Architecture:

1. File & Coding Standards

Licensing & Copyright (Strict)

Every file must begin with an SPDX-compliant header. Use the following format:

# frozen_string_literal: true

# SPDX-FileCopyrightText: 2025 Kerrick Long <me@kerricklong.com>
# SPDX-License-Identifier: AGPL-3.0-or-later

Ruby Standards

Rust Standards

2. Directory Structure Convention

The project follows a standard Gem layout with an ext/ directory for Rust code.

/
β”œβ”€β”€ .cargo/                 # Cargo configuration (linker flags)
β”œβ”€β”€ .github/                # CI/CD workflows
β”œβ”€β”€ bin/                    # Executables (console, setup)
β”œβ”€β”€ docs/                   # Documentation tree
β”‚   β”œβ”€β”€ contributors/       # Design docs, ecosystem notes
β”‚   └── index.md
β”œβ”€β”€ ext/
β”‚   └── ratatui_ruby/       # RUST SOURCE CODE GOES HERE
β”‚       β”œβ”€β”€ src/
β”‚       β”‚   └── lib.rs      # Entry point
β”‚       β”œβ”€β”€ Cargo.toml
β”‚       └── extconf.rb      # Makefile generator
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ ratatui_ruby/
β”‚   β”‚   β”œβ”€β”€ schema/         # Ruby Data definitions
β”‚   β”‚   └── version.rb
β”‚   └── ratatui_ruby.rb     # Main loader
β”œβ”€β”€ test/
β”‚   β”œβ”€β”€ data/               # Data-driven test files
β”‚   └── ratatui_ruby/       # Unit tests
β”œβ”€β”€ vendor/                 # Vendorized style configs (goodcop)
β”œβ”€β”€ AGENTS.md               # Context for AI agents
β”œβ”€β”€ Gemfile
β”œβ”€β”€ Rakefile
β”œβ”€β”€ REUSE.toml              # Compliance definition
└── ratatui_ruby.gemspec

3. Configuration & Tooling

Development Environment

Documentation

4. The Ruby <-> Rust Bridge Contract

The Ruby Side (lib/)

The Rust Side (ext/)

5. Deployment / Release