feat: add decision.point event type, decision logger, and run replay script

- archeflow-decision.sh: convenience wrapper for logging PDCA decision points
- archeflow-replay.sh: timeline view and weighted what-if replay for recorded runs
- archeflow-event.sh: add decision.point usage example
- archeflow-dag.sh: render decision.point events in DAG output
This commit is contained in:
2026-04-06 21:33:36 +02:00
parent 6a49c21bbe
commit 607a53f1bf
4 changed files with 283 additions and 1 deletions

View File

@@ -87,6 +87,9 @@ EVENTS_PARSED=$(jq -r '
elif .type == "agent.complete" then
(.data.archetype // .agent // "unknown") + " (" + .phase + ")" +
(if (.data.tokens // 0) > 0 then " [" + (.data.tokens | tostring) + " tok]" else "" end)
elif .type == "decision.point" then
(.data.archetype // .agent // "?") + " → " + (.data.decision // "?") +
" (conf " + ((.data.confidence // 0) | tostring) + ")"
elif .type == "decision" then
"decision: " + (.data.what // "unknown") + " → " + (.data.chosen // "unknown")
elif .type == "phase.transition" then
@@ -209,7 +212,7 @@ render_node() {
local colored_label
case "$type" in
phase.transition) colored_label="${C_TRANS}${label}${C_RESET}" ;;
decision) colored_label="${C_DECISION}${label}${C_RESET}" ;;
decision|decision.point) colored_label="${C_DECISION}${label}${C_RESET}" ;;
review.verdict) colored_label="${C_VERDICT}${label}${C_RESET}" ;;
*) colored_label="${pc}${label}${C_RESET}" ;;
esac