Codegen Add Shell Entity
Table of Contents
When to use this skill
When you need to add REPL commands for a new entity in ores.shell.
Prerequisites: the domain type must exist (domain-type-creator), the
server-side handlers and messaging protocol must be implemented, and
table I/O must be available for list output. See Entity lifecycle for
the full layer ordering.
How to use this skill
- Gather requirements: entity name, menu name (plural), operations needed (list, add, history, delete), parameters for each operation.
- Phase 1 — list + add (PR:
[shell] Add {entity} list and add commands): create{entity}_commands.hppand.cpp; create submenu, register list and add; wire intoapplication.cpp. - Phase 2 — history (PR:
[shell] Add {entity} history command): addprocess_get_{entity}_historyand registerhistorysubcommand. - Phase 3 — recipe docs (PR:
[doc] Add {entity} shell command recipes): addhow_do_i_*.orgrecipes underdoc/recipes/shell/.
Use feature-branch-manager between phases and pr-manager to open each PR.
Build after every step: cmake --build --preset linux-clang-debug-ninja --target ores.shell.
Recipes
- How do I create shell commands for a new entity? — phase-by-phase walkthrough.
Reference
- Shell entity patterns — class layout, registration, operation shapes, file locations.
- Entity lifecycle — layer ordering overview.
- domain-type-creator — prerequisite first layer.
Codegen gap
❌ No codegen profile exists for ores.shell. Do not hand-code this
layer. When entity-creator reaches this layer:
- Raise a sprint story: "Implement codegen profile for shell REPL commands."
- Reference Entity lifecycle§"Codegen gaps" for what the profile must cover.
- Link the story to the entity task before marking this layer done.
- Once the profile is merged, regenerate and discard any hand-written code.
Until the gap is resolved, this layer is incomplete.