110791ff45
- CMakeLists.txt template: adds target_link_libraries fn_table_viz with if(TARGET fn_table_viz) guard (compiles even without vendor/lua). - main.cpp template: adds commented include + data_table::render() panel block in render(). Also fixes include to use app_base.h + panel_menu.h (matching convention of chart_demo, shaders_lab). - app.md template: uses_functions lists all 12 fn_table_viz stack IDs commented out; uncomment when activating data_table::render(). - Bump version 0.1.0 -> 1.1.0. Add capability growth log entry. - Tag cpp-tables added to capability group. - Verified: test app test_scaffolder_default compiled clean, residues removed (dir + CMakeLists entry). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
4.3 KiB
4.3 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | params | output | tested | tests | test_file_path | file_path | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| init_cpp_app | pipeline | bash | pipelines | 1.1.0 | impure | init_cpp_app(name: string, [--project <p>] [--domain <d>] [--desc <s>] [--tags <csv>]) -> void | Scaffolder estandar de apps C++ del registry. Genera main.cpp + CMakeLists.txt + app.md siguiendo el patron canonico (cfg.about/log/panels, sin app_menubar manual, dockspace via framework), registra la app en cpp/CMakeLists.txt, inicializa repo Gitea dataforge/<name> y ejecuta fn index. |
|
|
false | error_go_core |
|
estructura completa de la app + entry registrada en cpp/CMakeLists.txt + repo Gitea + fn index | false | bash/functions/pipelines/init_cpp_app.sh |
Ejemplo
# App suelta en cpp/apps/<name>/
fn run init_cpp_app my_tool --desc "Herramienta para X"
# App dentro de un proyecto
fn run init_cpp_app finance_panel --project budget --desc "Panel de finanzas" --tags "finance,dashboard"
Que genera
<dir>/
main.cpp # Plantilla canonica: panels[] + cfg.about + cfg.log + run_app(cfg, render) + data_table comentado
CMakeLists.txt # add_imgui_app(<name> main.cpp) + target_link_libraries fn_table_viz (con guard)
app.md # Frontmatter completo (lang:cpp, framework:imgui, dir_path, repo_url) + uses_functions comentados
Y ademas:
- Registra
add_subdirectory(apps/<name>)(o el bloque_DIRpara projects) encpp/CMakeLists.txt. - Crea repo Gitea
dataforge/<name>con master + commit inicial viaensure_repo_synced_bash_infra(requiereGITEA_URLyGITEA_TOKEN). - Ejecuta
fn indexpara registrar la app enregistry.db.
Plantilla main.cpp
La plantilla cumple cpp/PATTERNS.md:
- NO llama
app_menubarmanual (lo dibuja el framework). - NO llama
DockSpaceOverViewport(auto_dockspace=true por defecto). - Declara
panels[]con un panel "Main" toggleable. - Setea
cfg.about(window About) ycfg.log(logger + ventana Logs). - Include
viz/data_table.hcomentado + panel "Data" comentado enrender()— descomentar para activardata_table::render().
Activar data_table::render()
- En
main.cpp: descomentar#include "viz/data_table.h"y el bloque del panel Data enrender(). - En
app.md: descomentar los 12 IDs del stackfn_table_vizenuses_functions. - El
CMakeLists.txtya linkafn_table_vizvia guardif(TARGET fn_table_viz)— sin cambio manual. - Poblar
data_tablescon tusdata_table::TableInputy el panel aparece en el DockSpace.
Cuando usarla
Cuando necesites crear una app C++ nueva que siga el patron canonico del registry. Es el unico camino autorizado para crear apps en cpp/apps/ o projects/*/apps/ — nunca escribir main.cpp + CMakeLists.txt a mano.
Gotchas
- Si
GITEA_URL/GITEA_TOKENno estan seteados, solo hacegit initlocal (no crea repo remoto). fn_table_vizrequiere quevendor/luaeste presente encpp/; el guardif(TARGET fn_table_viz)evita errores de link si no esta disponible.- El bloque de
uses_functionsenapp.mdqueda comentado intencionalmente — descomenta solo las funciones que la app realmente use para mantener el grafo de dependencias limpio.
Despues de crear
- Si usas
data_table::render(): descomentar include + panel enmain.cpp, descomentar IDs enapp.md, ejecutarfn index. - Para otras funciones del registry: anadir paths absolutos en
CMakeLists.txty los IDs enuses_functionsdeapp.md. - Build:
cd cpp && cmake --build build --target <name> -j.
Capability growth log
v1.1.0 (2026-05-15) — Auto-wires fn_table_viz; new apps get target_link_libraries + commented data_table template.