Skip to content

rxp Plan

A CLI regex tool. Build, test, debug regular expressions. The Year 1 Python-fluency artifact. Quiet ship; no launch energy. Eventually used by services/aiops/ for log-pattern extraction in Year 5.

rxp is one of the Group C fluency artifacts — small CLIs that prove you can ship code with PR review, CI, and releases. It’s the deliverable for Year 1 Phase 4 (Python fluency) and the first artifact ROOT publishes to GitHub. The bar isn’t novelty; it’s discipline — a typer CLI, a real test suite, a TestPyPI release, a tagged version, a README with ten usage examples.

rxp earns its keep beyond Year 1 by getting a real production role in Year 5: services/aiops/ calls it via subprocess to extract patterns out of log lines during incident triage. That integration is what makes rxp NOT just a fluency artifact — it’s a small tool with a permanent home in the platform’s agent layer. Same story for the other Year 1 CLIs (konfig lands in basecamp CI, pulse emits Prometheus metrics).

The launch energy is intentionally low. Push, get a PR review, cut a release, move on. Loud launches are reserved for terralabs (Y2), basecamp (Y3), and the Year 5 capstones. Year 1 is about shipping habits, not adoption metrics.


What it is

A typer-based Python CLI:

Terminal window
rxp test '\b[A-Z][a-z]+\b' "Hello World, Foo Bar"
# → highlights matches, shows positions, capture groups
rxp explain '\b\d{3}-\d{4}\b'
# → English explanation: "matches phone-number-like XXX-XXXX at word boundaries"
rxp debug '(?P<area>\d{3})-(?P<num>\d{4})' --input phones.txt
# → step-through evaluation, named group extraction
rxp stream # read stdin, highlight matches inline

Why it exists

  1. Phase deliverable: Year 1 Phase 4 Python fluency proof
  2. Real tool: ROOT operations involve regex constantly (log parsing). A well-designed regex CLI saves time.
  3. Y5 integration: services/aiops/ uses rxp internally for parsing patterns out of log lines (called via subprocess from the agent). This is what makes rxp NOT just a fluency artifact — it earns a production role later.

Pattern it teaches

Text processing as a first-class primitive. Modern languages all have regex; the patterns (named groups, lookaheads, anchors, character classes, greediness vs laziness) transfer across language. Building the tool forces you to understand them at the principle level.

Also reinforces:


Scope

v1 (Year 1 Phase 4: quiet ship)

[ ] typer CLI: test, explain, debug, stream
[ ] Match positions, capture groups (positional + named), highlight with rich
[ ] Explain mode: produces natural-language description of the regex
[ ] Stream mode: read stdin, highlight matches inline
[ ] 70%+ test coverage
[ ] README + 10 usage examples
[ ] Published to TestPyPI (PyPI later)
[ ] Quiet ship: no blog post, no LinkedIn

v2 (deferred: only if Y5 capstone elective involves polishing minor projects)

  • Regex DSL → regex compiler
  • Web UI for browser-based testing
  • VSCode extension

Stack

  • Python 3.12+
  • typer (CLI)
  • rich (terminal rendering)
  • pydantic v2
  • pytest + hypothesis

When built

Year 1 Phase 4, Month 4-5. Ships to github.com/abukix/rxp + TestPyPI.


Dependencies

rxp stands alone in Year 1 — no platform dependencies, no data dependencies. The Year 5 integration is the only downstream dependency: services/aiops/ (Y5 P28) calls rxp via subprocess, so rxp must remain installable and stable through the program’s end.


Deliverables checklist

[ ] github.com/abukix/rxp public (quiet ship)
[ ] All commands working (test, explain, debug, stream)
[ ] Published to TestPyPI (then PyPI)
[ ] README with installation + usage + 10 examples
[ ] CI: GitHub Actions runs tests on PR
[ ] Tagged release with changelog

Public vs private

Public quiet ship from Year 1 Phase 4. No launch energy. The discipline is shipping (PR review + CI + release), not adoption.


Cross-references