一键导入
hgraf-refine-plan-lineage
Understand revision_index and plan lineage. Plan refine logic moved to goldfive; harmonograf only stores + renders the revisions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Understand revision_index and plan lineage. Plan refine logic moved to goldfive; harmonograf only stores + renders the revisions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Understand and safely change heartbeat interval, stuck threshold, and timeout constants — client cadence, server detection math, frontend signal.
Add a new AnnotationKind — proto, storage, ingress RPC, optional downstream delivery to agents, frontend authoring UI, tests.
Add a new agent Capability — proto enum, client advertisement, server ingest, frontend gating in the control UI.
Add a new ControlKind — capability advertisement, client handler, server routing, ack semantics, frontend button, and tests — all the way through.
Add a new drift kind end-to-end. Goldfive owns the detector + enum; harmonograf reflects the kind through the intervention aggregator and the UI timeline.
Script a complex multi-turn FakeLlm scenario — function calls, tool chains, drift events, side-effect hooks, partial responses — for deterministic adk test coverage.
| name | hgraf-refine-plan-lineage |
| description | Understand revision_index and plan lineage. Plan refine logic moved to goldfive; harmonograf only stores + renders the revisions. |
You're touching how harmonograf reads or renders plan-revision
history — revision banners, the trajectory view's rev chips, the
intervention aggregator's outcome attribution, or the SQLite
task_plans.revision_* columns.
The refine decision logic (when to refine, what drift kind to
attribute, how to compose the LLM prompt) is in goldfive — see
goldfive.planner.* and goldfive.DefaultSteerer. This skill
covers the harmonograf side only.
A lineage is a sequence of TaskPlan rows sharing the same
plan_id. Each row has a revision_index:
revision_index = 0 — initial plan (goldfive's first
PlanSubmitted).revision_index = N — Nth refine (goldfive's Nth PlanRevised).Four columns encode lineage:
| Column | Role |
|---|---|
revision_index | Monotonic within a plan_id. |
revision_kind | Lowercase drift kind that caused the revise (user_steer, tool_error, looping_reasoning, cascade_cancel, …). Empty for revision_index=0. |
revision_severity | info / warning / critical. |
revision_reason | Free-text human summary from the planner. |
See server/harmonograf_server/storage/sqlite.py for the SCHEMA
and the backfill ALTER TABLE block.
PlanSubmitted (initial) or PlanRevised events.TelemetryUp.goldfive_event envelopes.server/harmonograf_server/ingest.py dispatches to
_handle_plan_submitted / _handle_plan_revised.TaskPlan row (new revision_index)
and publishes a delta on the bus.TaskRegistry.upsert(plan) runs computePlanDiff
against the previous revision and stores a PlanRevision.server/harmonograf_server/interventions.py joins revisions with
drifts + annotations. Two important mechanics:
_OUTCOME_WINDOW_S
(5 s) before a PlanRevised gets the plan_revised:rN outcome
label. User-control drifts use _USER_OUTCOME_WINDOW_S (300 s)
because the planner's refine LLM takes tens of seconds on local
models._merge_by_annotation_id.docs/user-guide/trajectory-view.md describes the ribbon + rev
chips the Trajectory view renders from the lineage.frontend/src/gantt/index.ts :: computePlanDiff computes the
diff between successive revisions. Updates to Task shape must
keep this in sync.revision_index is monotonic. If you
re-ingest an event with a lower index, the UI will just ignore
it. The server does not overwrite higher-indexed revisions.revision_kind on revisions. Goldfive should stamp a
kind on every revision beyond 0. An empty kind on a non-zero
revision surfaces as an unattributed intervention in the
aggregator; chase it upstream.session_id; plan_id is unique per session but not globally.
When joining for cross-session analytics, include both keys.dev-guide/server.md#listinterventions-71 — aggregator internals.dev-guide/storage-backends.md#task-plans — schema columns.user-guide/trajectory-view.md — user-facing render.