Task: Implement the Command-Line Tools feature

TASK-DESCRIPTION

The tools implement the requirements in prompts/features/06-command-line-tools.md. vcard-inspect prints the report, the JSON form, and the optional property list. vcard-render writes the SVG card and selects a card by index. vcard-viewer is the GTK4 window the handler opens, built only where the GTK4 development files are present. Every tool keeps the exit-code contract: 0 for a readable file, 1 for a file that cannot be read, and 2 for a usage error.

TASK-OUTPUT

Produce these complete files in this order, then the VERIFICATION: line: 1. sources/tools/vcard_inspect.cpp 2. sources/tools/vcard_render.cpp 3. sources/tools/vcard_viewer_ui.cpp 4. tests/60-command-line-tools.sh 5. tests/95-viewer.sh 6. sources/CMakeLists.txt

TASK-CONTEXT

The JSON form is written directly by vcard_inspect.cpp with a string escaper, so the project does not carry a general JSON library for one output. The viewer test runs the window under a private Xvfb display and checks the title and the WM class through the X server, which is how the dock matches a running window to the handler entry.

The viewer test must use its own private display and must not touch the real session.

TASK-FILES

Operation Path
create sources/tools/vcard_inspect.cpp
create sources/tools/vcard_render.cpp
create sources/tools/vcard_viewer_ui.cpp
create tests/60-command-line-tools.sh
create tests/95-viewer.sh
modify sources/CMakeLists.txt

TASK-VERIFY

TASK-FEATURES

TASK-ACCEPTANCE

OUTPUT: the complete files in the order listed, ending with the VERIFICATION: line.