/nodal-hindsight:workflow-discoverfrom nodal-hindsight
Assess whether a human-in-the-loop AI workflow's stored history (AI suggestion, human action, outcome) can be mined for Nodal Hindsight, and write a readiness report. Use when onboarding a workflow. Do not use for analytics questions, eval runs, or runtime routing.
Ships in nodal-hindsight. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
You are assessing one human-in-the-loop AI workflow: an AI makes a suggestion, a person accepts, edits or overrides it, and later an outcome shows how it went. Hindsight turns that history into evaluation cases. Your job is to find out how much of the history is usable and to write a readiness report. You work from aggregates by default; a small sample of rows is allowed only after the user consents. You do not extract, map or load the data; that is a later step.
Resolve every resource from the directory containing this loaded SKILL.md. The
examples below write <skill-dir> for that directory.
These hold for the whole session, including when the user asks otherwise.
SELECT *. Do not open an export with a file reader,
head or cat. These fields can hold protected health information, and
anything you read is sent to the AI provider behind this session. Column
names and types are fine.references/content-samples.md: the user confirms this
agent is approved to read row content for this workflow, and then you may
view a few truncated values of named columns, in the session only. Without
a clear yes, stay on aggregates. With or without consent, no row content is
ever written to the profile, the report or any other file.reviewer_1, reviewer_2.SELECT or WITH
query. Never DDL, DML, grants or procedure calls. Never write to the source.
In the workflow's repository, read code and configuration only: no edits, no
commits, no running the workflow, no opening data files or secret files.LIMIT.Ask one question, then the next. First: which workflow, in the user's words.
Turn the name into a lowercase slug such as prior-auth-review; this is
<workflow> below.
Then ask for the repository that runs the workflow, as a choice:
With a repository, read references/source-repo.md and trace one run through
the code before asking anything else. The code shows where the suggestion,
the human action and the outcome are written, so you can tell the user where
the history lives instead of asking. Record what the code shows for each
check in the profile's code_findings, and the specific changes that would
close a gap in logging_changes. Do not put them in a source note.
The suggestion and the review are usually easy to find. The outcome often is
not: it arrives later and is stored somewhere else (a customer's later reply,
a status column in another system, an audit). Read references/outcomes.md
and do this before measuring:
outcome_signals, most trusted first; []
when the user confirmed there is none.No outcome is a valid result. It does not block the verdict; it tells the user what to start capturing.
The code says where records are written; only the data says how complete they
are. Confirm the store with the user as a choice, naming what the code showed
("the code writes drafts to ai_drafts in Snowflake; measure there, or from
an export?"):
The outcome signal from step 2 may live in a different store from the suggestion and the review. Measure each where it lives; an outcome store this session cannot reach stays unmeasured and the report says so.
"Somewhere else" is not supported yet. Record it as a source of type
unsupported with a note saying what would be needed (for example "an export
of traces to JSONL with the suggestion, the reviewer action and a timestamp"),
and ask whether a warehouse copy or a file export exists. If neither does,
still write the report from what the code showed. Its verdict is then
not-measured, which is not a judgement on the history.
Read the one reference that matches, when you reach this step:
references/source-warehouse.md. Probe the connection, find the
tables and columns from metadata, run the aggregate probes, and fill a
profile started with python3 <skill-dir>/scripts/readiness.py template.references/source-files.md. For SQLite, list the tables
with list-tables and name each one as database#table. Describe the
columns with list-columns, write a column map, and run profile-files. The script
computes the aggregates locally, so row content never enters this
conversation.Either way the result is one profile file,
hindsight-discovery/<workflow>/profile.json, in the current directory. It
holds aggregates only. references/readiness-format.md defines every field;
null means not measured and 0 means measured and absent. A check with
nothing measured is reported as not-measured, never as missing.
When a probe is denied, do not stop. Leave its fields null, give the user the
forwardable grant note from references/source-warehouse.md straight away,
since access is the slowest dependency, and carry on with the other probes.
Read references/checks.md. It lists, for each of the ten checks, which
results are ambiguous and which answers resolve them. Do not ask about a check
the probes settled.
Selection beats confirmation. Before asking anything, run this ladder:
ai_drafts.body equals messages.body in
81% of rows. Is ai_drafts (a) the suggestion as the reviewer saw it, (b) a
later regeneration, or (c) unknown?" Each option is a distinct reading that
the evidence supports. Always include "unknown" when it is an honest answer.
Never invent an option that has no evidence behind it.reviewed_by the person who made the decision, or the queue it was
assigned to?"answers with
"source": "code" and the file it came from.When a few example rows would resolve an ambiguity better than a question
(which of two columns is the suggestion, whether a category field holds real
request types), read references/content-samples.md and ask its consent
question once. On no, or not sure, carry on with choice questions.
A bare "is that right?" means you skipped the ladder. Ask one question at a
time. Record each answer in the profile's answers list with the check ID, the
question, the option chosen (the label, never pasted row content) and the
status that references/checks.md assigns to that option.
python3 <skill-dir>/scripts/readiness.py build \
--profile hindsight-discovery/<workflow>/profile.json \
--out hindsight-discovery/<workflow>
python3 <skill-dir>/scripts/readiness.py check \
hindsight-discovery/<workflow>/readiness.json
build applies the verdict rules and writes readiness.json and
readiness.md. The report states whether sample rows were viewed, from
content_access in the profile. Do not edit those two files by hand; change the profile and
rebuild. If you cannot run the script in this session, say so, apply the
rules in references/checks.md yourself, and mark the verdict provisional.
While a question from step 4 is open, say which verdict each answer leads to. --blind-sample-rate (default 0.10)
sets the share of weekly volume assumed to be reviewed blind in the
labels-needed table; ask the user only if they already have a rate in mind.
Then tell the user, in this order:
mine-history, partial, log-forward-only or
not-measured) and what it means for them in one sentence. For
not-measured, say plainly that the history was not judged, and what has
to be measured.<check>: present | partial | missing | not measured | needs an answer | deferred: <why>.
For a check that was not measured, add what the code suggests.
Use deferred: privileges (grant note handed over) or deferred: auth for
a probe that could not run. A check you cannot write a line for is a check
you skipped; go back and run it.readiness.md:
what to measure, what to start logging (most valuable first, with the
specific changes you recorded), and what comes after.readiness.md is
a reference table, not a sample plan.agents/openai.yaml (opens in a new tab)assets/readiness.schema.json (opens in a new tab)references/checks.md (opens in a new tab)references/content-samples.md (opens in a new tab)references/outcomes.md (opens in a new tab)references/readiness-format.md (opens in a new tab)references/source-files.md (opens in a new tab)references/source-repo.md (opens in a new tab)references/source-warehouse.md (opens in a new tab)scripts/readiness.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub nodal-data/nodal-hindsight --plugin nodal-hindsight