refactor(panels, examples): cap the remaining runs

The panel migration tests (improvise-35e) keep their claim and lose their
history; tile_bar's scroll loop keeps its algorithm note. gen-grammar's
usage block is trimmed to the one line a reader runs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Edward Langley
2026-09-20 09:51:38 -07:00
parent f7d377b010
commit e8e7a7f1fe
6 changed files with 19 additions and 43 deletions
+5 -18
View File
@@ -1,21 +1,8 @@
//! Generate a random valid example matching a rule from `improv.pest`.
//!
//! Usage:
//! cargo run --example gen-grammar -- <rule_name>
//!
//! Examples:
//! cargo run --example gen-grammar -- file
//! cargo run --example gen-grammar -- category_section
//! cargo run --example gen-grammar -- bare_name
//!
//! Each invocation generates one example seeded from the current time + PID.
//!
//! The generator adds constraints beyond what the grammar requires to produce
//! realistic, round-trippable output:
//! - bare names are drawn from a word pool instead of random letters
//! - pipe_inner is never empty
//! - rest_of_line always produces at least one character
//! - repetitions (`*`) produce 1–4 items, not 0
//! `cargo run --example gen-grammar -- <rule_name>` — one random valid example
//! of a rule from `improv.pest`, seeded from the current time + PID.
// The generator constrains the grammar to produce realistic, round-trippable
// output rather than degenerate minima — `context/test-evidence/tui.md`.
use pest_meta::ast::{Expr, RuleType};
use pest_meta::parser;
+2 -5
View File
@@ -1,8 +1,5 @@
//! Parse a `.improv` file from stdin and print the formatted result to stdout.
//!
//! Usage:
//! cargo run --example pretty-print < file.improv
//! cargo run --example gen-grammar -- file | cargo run --example pretty-print
//! Parse a `.improv` file from stdin and print the formatted result to stdout:
//! `cargo run --example pretty-print < file.improv`.
use std::io::Read;