Finish estimate

From indigoai-us/hq-core · View interactive version

Finish estimate is an AI agent skill from the GitHub repository indigoai-us/hq-core. Mark a pending time estimate complete with actual duration.

How to use this skill

Skill file

/finish-estimate - Record Actual Time

Look up an estimate by ID (or grab the most-recent pending) and fill in the actual elapsed time, ratio, and verdict.

Input: $ARGUMENTS

Examples:

Steps

  1. Parse arguments
  1. Resolve target entry
  1. Normalize actual duration

Same parser as /track-estimate. Compute actual_minutes (single value, not a range — actuals are point measurements).

  1. Compute verdict

```

ratio = actual_minutes / expected_minutes

verdict = "under" if ratio < 0.8

| "on" if 0.8 <= ratio <= 1.2

| "over" if ratio > 1.2

```

  1. Rewrite the entry's line in log.jsonl
  1. Report

```

ID: <id>

Task: <task-or-surrounding-truncated>

Estimate: <expected> min (range <min>-<max>)

Actual: <actual> min

Ratio: <ratio> ({factor}x {over/under/on})

Category: <category>

```

Where factor:

Implementation hint

Use jq for the in-place rewrite. Atomic pattern:

LOG=workspace/estimate-log/log.jsonl
TMP=$(mktemp)
jq -c --arg id "$ID" --argjson actual "$ACTUAL_MINUTES" --arg ts "$NOW_ISO" --arg verdict "$VERDICT" --argjson ratio "$RATIO" --arg notes "$NOTES" '
  if .id == $id then
    . + {actual_minutes: $actual, actual_at: $ts, ratio: $ratio, verdict: $verdict, status: "completed"}
    + (if $notes != "" then {notes: $notes} else {} end)
  else . end
' "$LOG" > "$TMP" && mv "$TMP" "$LOG"

jq -c keeps it as JSONL. Field order may shift after the merge; that's fine — the dedup grep doesn't depend on order.

Notes

See also

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.