From 6bae80b8743e05362f946cd02065ec1cd2ee673f Mon Sep 17 00:00:00 2001 From: Christian Nennemann Date: Mon, 6 Apr 2026 21:10:22 +0200 Subject: [PATCH] feat: add af-status, af-score, af-dag, af-report slash command skills --- .claude-plugin/plugin.json | 3 ++- skills/af-dag/SKILL.md | 34 ++++++++++++++++++++++++++++ skills/af-report/SKILL.md | 40 +++++++++++++++++++++++++++++++++ skills/af-score/SKILL.md | 23 +++++++++++++++++++ skills/af-status/SKILL.md | 25 +++++++++++++++++++++ skills/using-archeflow/SKILL.md | 2 +- 6 files changed, 125 insertions(+), 2 deletions(-) create mode 100644 skills/af-dag/SKILL.md create mode 100644 skills/af-report/SKILL.md create mode 100644 skills/af-score/SKILL.md create mode 100644 skills/af-status/SKILL.md diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 01df50b..bf3b34a 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -18,7 +18,8 @@ "shadow-detection", "memory", "progress", "presence", "colette-bridge", "git-integration", "multi-project", "cost-tracking", "custom-archetypes", "workflow-design", "domains", - "templates", "autonomous-mode", "using-archeflow" + "templates", "autonomous-mode", "using-archeflow", + "af-status", "af-score", "af-dag", "af-report" ], "hooks": "hooks/hooks.json" } diff --git a/skills/af-dag/SKILL.md b/skills/af-dag/SKILL.md new file mode 100644 index 0000000..6a102ac --- /dev/null +++ b/skills/af-dag/SKILL.md @@ -0,0 +1,34 @@ +--- +name: af-dag +description: | + Show the DAG of the current or last ArcheFlow run. + User: "/af-dag" + User: "/af-dag 2026-04-06-jwt-auth" +--- + +# ArcheFlow Run DAG + +1. Parse `run_id` from args. If none provided, read the latest run_id from `.archeflow/events/index.jsonl`. +2. Run `./lib/archeflow-dag.sh .archeflow/events/.jsonl` if the script exists. Display its output. +3. If the script does not exist, read `.archeflow/events/.jsonl` and render a text DAG: + - Each node is an event (phase transitions, agent starts/completes, findings). + - Show parent relationships via indentation. + - Mark completed events with `[done]`, active with `[running]`, failed with `[FAIL]`. + +Example output: +``` +run.start 2026-04-06-jwt-auth + plan.start + agent.complete explorer (42s) + agent.complete creator (68s) + do.start + agent.complete maker (180s) + check.start + agent.complete guardian (55s) -- 3 findings + agent.complete skeptic (40s) -- 1 finding + act.start + fixes.applied 3/4 +run.complete (6m12s) +``` + +4. If no events found for the run_id, say: "No events found for run ``." diff --git a/skills/af-report/SKILL.md b/skills/af-report/SKILL.md new file mode 100644 index 0000000..830f7fa --- /dev/null +++ b/skills/af-report/SKILL.md @@ -0,0 +1,40 @@ +--- +name: af-report +description: | + Generate a full process report for an ArcheFlow run. + User: "/af-report" + User: "/af-report 2026-04-06-jwt-auth" +--- + +# ArcheFlow Run Report + +1. Parse `run_id` from args. If none provided, read the latest run_id from `.archeflow/events/index.jsonl`. +2. Run `./lib/archeflow-report.sh .archeflow/events/.jsonl` if the script exists. Display its output. +3. If the script does not exist, read `.archeflow/events/.jsonl` and produce a markdown report: + +```markdown +# ArcheFlow Report: + +## Overview +| Field | Value | +|-------|-------| +| Task | ... | +| Workflow | fast/standard/thorough | +| Cycles | N | +| Duration | Xm Ys | +| Total Cost | $X.XX | + +## Phase Summary +For each phase (Plan, Do, Check, Act): agents involved, duration, token cost, key outputs. + +## Findings +Table of all findings: severity, category, description, archetype source, resolution (fixed/dismissed/deferred). + +## Fixes Applied +List of fixes with before/after summary and which finding they addressed. + +## Lessons Learned +Any new lessons extracted to memory during this run. +``` + +4. If no events found for the run_id, say: "No events found for run ``." diff --git a/skills/af-score/SKILL.md b/skills/af-score/SKILL.md new file mode 100644 index 0000000..3ce652b --- /dev/null +++ b/skills/af-score/SKILL.md @@ -0,0 +1,23 @@ +--- +name: af-score +description: | + Show archetype effectiveness scores across runs. + User: "/af-score" +--- + +# ArcheFlow Effectiveness Scores + +1. Run `./lib/archeflow-score.sh list` if the script exists. Display its output. +2. If the script does not exist, read `.archeflow/memory/effectiveness.jsonl` directly. +3. Summarize per archetype as a table: + +| Archetype | Runs | Signal/Noise | Fix Rate | Avg Cost | +|-----------|------|--------------|----------|----------| +| Guardian | ... | ... | ... | ... | +| Skeptic | ... | ... | ... | ... | + +- **Signal/Noise**: findings that led to actual fixes vs total findings raised. +- **Fix Rate**: percentage of findings that were applied (not dismissed). +- **Avg Cost**: mean token cost per review across runs. + +4. If no effectiveness data exists, say: "No effectiveness data yet. Run `/af-run` at least once." diff --git a/skills/af-status/SKILL.md b/skills/af-status/SKILL.md new file mode 100644 index 0000000..75b1403 --- /dev/null +++ b/skills/af-status/SKILL.md @@ -0,0 +1,25 @@ +--- +name: af-status +description: | + Show ArcheFlow status — current/last run, active agents, findings. + User: "/af-status" +--- + +# ArcheFlow Status + +1. Read `.archeflow/state.json` if it exists. Extract: task, phase, cycle, workflow, active agents, findings count, start time. +2. If `state.json` does not exist, read the latest entry from `.archeflow/events/index.jsonl`. Extract run_id, task, last event type, timestamp. +3. Calculate duration from start time to now (or to completion time if run finished). +4. Report as a compact table: + +| Field | Value | +|-------|-------| +| Run | `` | +| Task | `` | +| Phase | `` | +| Cycle | `` | +| Workflow | `` | +| Findings | `` | +| Duration | `` | + +5. If no `state.json` and no `index.jsonl`, say: "No active or recent ArcheFlow runs." diff --git a/skills/using-archeflow/SKILL.md b/skills/using-archeflow/SKILL.md index 4699cd1..9be8529 100644 --- a/skills/using-archeflow/SKILL.md +++ b/skills/using-archeflow/SKILL.md @@ -7,7 +7,7 @@ description: Use at session start when implementing features, reviewing code, de On activation, print ONE line then proceed silently: ``` -archeflow v0.8.0 · 19 skills · domain +archeflow v0.8.0 · 23 skills · domain ``` Domain auto-detected: `writing` if `colette.yaml` exists, `research` if paper/thesis files, `code` otherwise.