b9716a7cd6
Snapshot de WIP acumulado de sesiones previas antes de merge wave 1 del flow 0008 (kanban_cpp + agent_runner_api + DoD schema). Incluye: - dev/flows/0008-kanban-cpp-and-agent-workflows.md - dev/issues/0112-0119*.md (7 sub-issues) - WIP previo en cmd/fn/doctor.go, registry/*, modules/, cpp/, etc. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
96 lines
3.5 KiB
Markdown
96 lines
3.5 KiB
Markdown
---
|
|
id: "0116"
|
|
title: "skill_tree v2: reemplazar boton Claude fix por Launch workflow"
|
|
status: pendiente
|
|
type: feature
|
|
domain:
|
|
- cpp-stack
|
|
- agents
|
|
- dev-loop
|
|
scope: app
|
|
priority: alta
|
|
depends:
|
|
- "0113"
|
|
- "0114"
|
|
blocks: []
|
|
related:
|
|
- "0008"
|
|
- "0109"
|
|
- "0117"
|
|
- "0118"
|
|
created: 2026-05-18
|
|
updated: 2026-05-18
|
|
tags: [skill-tree, agents, ui, feature-flag]
|
|
flow: "0008"
|
|
---
|
|
|
|
# 0116 — skill_tree v2: Launch workflow
|
|
|
|
## Problema
|
|
|
|
`apps/skill_tree/main.cpp::spawn_claude_terminal` abre `wt.exe new-tab wsl.exe -- bash -ic "claude --dangerously-skip-permissions"`. Side effects:
|
|
|
|
- Terminal externa fuera de la app (mala UX para agentes paralelos).
|
|
- Sin trazabilidad (run no persistido).
|
|
- Sin DoD ni evidencias.
|
|
- Imposible cancelar desde la UI.
|
|
|
|
Flow 0008 surface 2: usuario clica `Launch workflow` -> run trackeado en `agent_runner_api`, NO se abre terminal.
|
|
|
|
## Decision
|
|
|
|
Modificar `apps/skill_tree/main.cpp`:
|
|
|
|
1. **Eliminar** (o esconder detras de feature flag `legacy_claude_fix`) el boton `TI_TERMINAL_2 " Claude fix"`.
|
|
2. **Anadir** boton `TI_PLAY " Launch workflow"`:
|
|
- POST `http://localhost:8486/api/runs` con `{issue_id, mode: "fix-issue"}`.
|
|
- Captura `run_id` del response.
|
|
- Toast `run_id=...` visible 3s.
|
|
- Refresh panel `Timeline` (issue 0118).
|
|
3. Pasar al panel `DoD inspector` (issue 0117) si el run tiene `dod_evidence_schema` declarado.
|
|
|
|
### Feature flag `legacy_claude_fix`
|
|
|
|
`dev/feature_flags.json`:
|
|
```json
|
|
"legacy_claude_fix": {
|
|
"enabled": false,
|
|
"issue": "0116",
|
|
"description": "Mostrar boton Claude fix viejo (terminal externa). Default OFF tras 0116",
|
|
"added": "2026-05-18",
|
|
"enabled_at": null
|
|
}
|
|
```
|
|
|
|
Logica: si flag ON, muestra ambos botones (Launch workflow + Claude fix legacy) durante rollback window. Si OFF (default), solo Launch workflow.
|
|
|
|
Eliminar flag + codigo legacy en issue separado tras 2 semanas estables.
|
|
|
|
## Criterios de aceptacion
|
|
|
|
- [ ] `apps/skill_tree/main.cpp` modificado: boton `Launch workflow` operativo.
|
|
- [ ] POST a `:8486/api/runs` usa `http_request_cpp_core` (0110) — NO popen inline.
|
|
- [ ] Feature flag `legacy_claude_fix` registrado en `dev/feature_flags.json` con `enabled: false`.
|
|
- [ ] Cuando flag OFF: `Claude fix` no se renderiza.
|
|
- [ ] Cuando flag ON: ambos botones aparecen para rollback.
|
|
- [ ] Toast `run_id=...` visible al lanzar.
|
|
- [ ] Si `agent_runner_api` no responde (`:8486` down): toast error + sugerencia `systemctl --user start agent_runner_api`.
|
|
- [ ] `uses_functions` actualizado en `apps/skill_tree/app.md`: anadir `http_request_cpp_core`.
|
|
- [ ] `e2e_checks` actualizados: smoke launch workflow con backend mock.
|
|
- [ ] Test manual: clic en nodo issue -> ve run en kanban_cpp `panel_agent_runs` y en skill_tree `Timeline` (0118).
|
|
- [ ] Version bump `apps/skill_tree/app.md::version` minor (`/version apps/skill_tree minor "..."`).
|
|
|
|
## Gotchas
|
|
|
|
- `spawn_claude_terminal` esta en main.cpp inline. NO eliminar la funcion en este issue — solo no llamarla cuando flag OFF. Eliminar en issue separado tras 2 semanas.
|
|
- HTTP POST sincrono bloquearia frame ImGui. Usar `std::async` o spawn thread + flag `pending_launch`. Renderizar spinner.
|
|
- Sin `agent_runner_api` corriendo, el boton es decorativo. Doctor check: `fn doctor services` debe mostrar `agent_runner_api active`.
|
|
- Si el issue NO tiene `dod_evidence_schema` declarado: run igualmente arranca, pero sin items DoD precreados.
|
|
|
|
## Out of scope
|
|
|
|
- Panel DoD inspector (0117).
|
|
- Panel Timeline (0118).
|
|
- Tab Calendar/Dashboard de skill_tree (otros sub-issues 0109*).
|
|
- Eliminacion definitiva de `spawn_claude_terminal` (issue separado tras rollback window).
|