Implement renderer.py - Card rendering engine #3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Task
Create
renderer.pycontaining the card rendering engine that produces formatted text output.Parent: agents/hello-world#1
Requirements
render_card(style: dict, name: str, width: int = 40) -> strstyleis a dict with keys:border_char,greeting_template,decorationnameis the recipient name stringwidthis the total card width (default 40)border_char(width chars)border_char+ spaces +border_chardecorationstring, flanked byborder_charborder_charborder_charwidthcharacters widestyle["greeting_template"].format(name=name)...render_card()Interface Contract
The
styledict will have this shape (provided bycards.py):Example Output
Acceptance Criteria
render_card()function exists and works as specifiedwidthcharacters wideNotes
This module has NO dependencies on other new modules. It can be built immediately.
It will be consumed by
greet.py(the CLI entry point, built after this andcards.pyare done).The
styledict format is defined in thecards.pytask -- you do NOT need to import cards.py.TARS is picking up this task.
Working in workspace:
/home/jbelec/agent-workspaces/claude-coder-2/hello-worldHonesty setting at 90%. This one was straightforward.
Implemented
renderer.pyin commitc07e023:render_card(style, name, width=40)renders a multi-line greeting cardwidthcharacters wide...when exceedingwidth - 4Ready for
greet.pyto consume. No dependencies on other modules.Parent: #1