Skip to content

Add muscle-memory aliases: post, upper, lower, capitalize - #589

Closed
danieljohnmorris wants to merge 1 commit into
mainfrom
feature/more-aliases
Closed

Add muscle-memory aliases: post, upper, lower, capitalize#589
danieljohnmorris wants to merge 1 commit into
mainfrom
feature/more-aliases

Conversation

@danieljohnmorris

Copy link
Copy Markdown
Collaborator

Summary

  • Closes ILO-78: adds postpst alias (pre-0.12.0 muscle memory)
  • Closes ILO-79: adds upperupr and lowerlwr aliases (Python/JS/Go/Rust naming)
  • Closes ILO-81: adds capitalizecap alias (Python/Ruby naming)

All aliases follow the existing pattern established by rand/randomrnd and rngrange: parse-time rewrite to canonical short form, one-shot hint on first use, ILO-P011 rejection if used as binding/function name.

Changes

  • src/ast/mod.rs: 5 new entries in BUILTIN_ALIASES with explanatory comments
  • tests/regression_post_alias.rs: 4 tests pinning alias-table, ILO-P011, and hint data
  • tests/regression_upper_lower_alias.rs: 9 tests covering alias-table, cross-engine dispatch, ILO-P011, and hints
  • tests/regression_capitalize_alias.rs: 6 tests covering alias-table, cross-engine dispatch, ILO-P011, and hints
  • examples/string-aliases.ilo: runnable example demonstrating the new string-case aliases

Note: feature/rand-alias had already merged into main (PR #581 → merged as part of #582), so this PR bases on main directly.

Test plan

  • cargo build passes
  • All 19 new regression tests pass
  • Pre-existing interpret_braceless_guard_fibonacci stack overflow is unrelated (also fails on main before these changes)
  • CI green

🤖 Generated with Claude Code

Closes ILO-78, ILO-79, ILO-81. Mirrors the rand/rnd alias pattern.
- `post` → `pst` (pre-0.12.0 muscle memory)
- `upper`/`lower` → `upr`/`lwr` (Python/JS/Go/Rust naming)
- `capitalize` → `cap` (Python/Ruby naming)

Updated skills/ilo/ilo-builtins.md to use `pst` as canonical.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented May 21, 2026

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
7018 1 7017 0
View the top 1 failed test(s) by shortest run time
ilo::regression_run_builtin::post_is_undefined_after_pst_rename
Stack Traces | 0.024s run time
thread 'post_is_undefined_after_pst_rename' (62422) panicked at tests/regression_run_builtin.rs:224:5:
expected ILO-T005, got: ^failed to lookup address information: Temporary failure in name resolution

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@danieljohnmorris

Copy link
Copy Markdown
Collaborator Author

Closed on main. Cherry-picked to compat/agent-natural (Draft PR #587) as the right venue for measuring "lean into agent training priors" hypothesis. Persona-log review found weak/zero evidence on main (zero post, zero capitalize, weak upper/lower only pre-lwr era). Manifesto P4 (no English keywords) + P1 (every alias adds tokens) push against landing on main without measured win. If agent-natural shows retry-rate drops, fold back to main with the number attached.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant