Adds the runnable counterpart to examples/01-add-verbose-flag (which is artifacts-only). The fixture is the measurement target for Spor B's end-to-end pipeline run (B3) and Spor C's cache-prefix experiment. Baseline: - tally.mjs (80 lines, hand-rolled argv parser, zero deps) - 3 flags: --json, -i/--ignore-case, --lines + --help - Exit codes: 0 success, 1 file error, 2 invalid argv - 10 node:test cases, all green (~2.2s wall-clock) - Deterministic fixtures: sample.txt (foo×7, Foo×1, regex fo+×9) + poem.txt (--lines vs total distinction) - REGENERATED.md skeleton (B3 fills the pipeline walk-through) Brief preconditions verified: - grep -c 'foo' sample.txt = 4 (>= 1) - regex /fo+/g count = 9 (> grep count) - Brief assumptions for B3 SC #1, #3 hold This is the first runnable example in plugins/ultraplan-local/examples/. Next: B3 runs /ultraresearch-local + /ultraplan-local + /ultraexecute-local against the brief to add --regex/-r, then verifies all 10 Success Criteria.
3.2 KiB
REGENERATED.md — examples/02-real-cli
| Field | Value |
|---|---|
| Calibrated against | ultraplan-local v3.4.1 |
| Last regenerated | TBD — filled in after the B3 pipeline run |
| Source brief author | Hand-authored by operator (B1 session, 2026-05-04) |
| Baseline author | B2 session, 2026-05-04 |
| Pipeline run | TBD — B3 will run /ultraresearch-local, /ultraplan-local, /ultraexecute-local |
What this example demonstrates
(Placeholder — fylles ut når B3-pipeline-runet er ferdig. Skal forklare hvorfor 02-real-cli er en runnable fixture, i motsetning til 01-add-verbose-flag som kun er artifacts.)
Baseline (delivered by B2, 2026-05-04)
tally — a ~80-line zero-dep Node.js CLI that counts literal-substring
occurrences of a pattern in a text file. Three flags (--json,
-i/--ignore-case, --lines), --help, exit codes 0/1/2.
Layout:
examples/02-real-cli/
├── tally.mjs # CLI (≈ 80 lines, hand-rolled argv parser)
├── tests/tally.test.mjs # 10 node:test cases (all pass < 3s)
├── fixtures/
│ ├── sample.txt # 9-line input with known counts (foo×7, Foo×1, fo+ regex × 9)
│ └── poem.txt # 5-line input for --lines vs total distinction
└── REGENERATED.md # this file
(Placeholder — utvides med en mini-walk-through av baseline når B3 har sluttført pipeline-runet.)
Pipeline run (delivered by B3, TBD)
/ultraresearch-local
(Placeholder — research-swarmen forventes å rapportere 0 topics og produsere en kort placeholder-brief. Fyll inn faktisk output her.)
/ultraplan-local
(Placeholder — plan.md forventes med 3–5 steg som målretter tally.mjs
tests/tally.test.mjs. Lim inn step-overskrifter + manifest-summary.)
/ultraexecute-local
(Placeholder — progress.json forventes med verify_passed: true på alle
steg. Lim inn commit-SHA-ene + steg-tellingen.)
How to re-run this example
cd /path/to/ultraplan-local
# 1. Re-run the pipeline against the existing brief
/ultraresearch-local --project .claude/projects/2026-05-04-examples-02-real-cli
/ultraplan-local --project .claude/projects/2026-05-04-examples-02-real-cli
/ultraexecute-local --project .claude/projects/2026-05-04-examples-02-real-cli
# 2. Verify all 10 Success Criteria from brief.md hold:
node --test examples/02-real-cli/tests/tally.test.mjs
node examples/02-real-cli/tally.mjs --regex 'fo+' examples/02-real-cli/fixtures/sample.txt
node examples/02-real-cli/tally.mjs --json --regex 'fo+' examples/02-real-cli/fixtures/sample.txt
(Placeholder — utvides med eksakte forventede verdier etter B3.)
Regeneration triggers
When to re-run this example:
- ultraplan-local minor version bump (e.g. v3.4 → v3.5)
plan_versionschema bump- Manifest YAML required-key additions
progress.jsonschema bump- Pipeline-output format change (brief / research / plan / progress)
When regenerating: re-run the pipeline against the existing brief.md and
update this file plus examples/02-real-cli/ artifacts. The fixture itself
(tally.mjs, fixtures, baseline tests) stays stable across regenerations —
only the pipeline outputs change.