Database tables for proposals and findings
This page lists the columns of proposals, proposal_hunks, session_replays, session_findings and candidates. Database tables says how to read the columns.
proposals
Section titled “proposals”A proposed change to a pipeline, an agent’s instructions or an agent’s skill, with its scores and what became of it.
| Column | Type | Notes |
|---|---|---|
id |
uuid |
key |
team_id |
uuid |
references teams |
pipeline_id |
uuid |
optional; references pipelines |
base_version_id |
uuid |
optional; references pipeline_versions |
diff |
text |
default '' |
scores |
jsonb |
default '{}' |
status |
text |
default 'open'; one of scoring, open, approved, rejected, failed |
decided_by |
uuid |
optional; references people |
decided_at |
timestamptz |
optional |
created_at |
timestamptz |
default now() |
target |
text |
default 'pipeline'; one of pipeline, instructions, skill, agent |
agent_id |
uuid |
optional; references agents |
skill_name |
text |
optional |
summary |
text |
default '' |
content |
text |
optional |
candidate_version_id |
uuid |
optional; references pipeline_versions |
run_id |
uuid |
optional; references runs |
pull_request |
text |
optional |
Check (((target = 'pipeline') = (pipeline_id IS NOT NULL)) AND ((target = 'skill') = (skill_name IS NOT NULL)) AND ((target = 'pipeline') OR (agent_id IS NOT NULL))).
proposal_hunks
Section titled “proposal_hunks”The hunks of a proposal. The server computes each one’s text and diff, each cites findings, and each holds the decision on it.
| Column | Type | Notes |
|---|---|---|
id |
uuid |
key |
team_id |
uuid |
references teams |
proposal_id |
uuid |
references proposals |
n |
integer |
|
target |
text |
one of instructions, skill, profile, check, pipeline |
op |
text |
one of add, change, delete |
rule_hash |
text |
optional |
skill_name |
text |
optional |
skill_description |
text |
optional |
person_id |
uuid |
optional; references people |
before |
text |
|
after |
text |
|
diff |
text |
|
content_hash |
text |
|
after_hash |
text |
|
finding_ids |
uuid[] |
|
occasions |
integer |
|
counts |
jsonb |
|
evidence |
jsonb |
|
decision |
text |
optional; one of accepted, rejected |
reason |
text |
optional |
decided_by |
uuid |
optional; references people |
decided_at |
timestamptz |
optional |
created_at |
timestamptz |
default now() |
Unique (proposal_id, n). Check ((decision IS NULL) = (decided_at IS NULL)). Check ((decision IS NULL) = (reason IS NULL)). Check ((target <> 'instructions') OR (op = 'add') OR (rule_hash IS NOT NULL)). Check ((target = 'instructions') OR (rule_hash IS NULL)). Check ((target = 'profile') = (person_id IS NOT NULL)). Check ((target = 'skill') = (skill_description IS NOT NULL)). Check ((target = 'skill') = (skill_name IS NOT NULL)). Check ((target = ANY (ARRAY['instructions', 'pipeline'])) OR (op <> 'delete')). Check (cardinality(finding_ids) > 0).
session_replays
Section titled “session_replays”One replay of one turn, scoring a proposal. The judge sees the label, never the variant.
| Column | Type | Notes |
|---|---|---|
id |
uuid |
key |
team_id |
uuid |
references teams |
proposal_id |
uuid |
references proposals |
kind |
text |
one of behind, unrelated |
variant |
text |
one of change, current |
source_session_id |
uuid |
references sessions |
upto_seq |
bigint |
|
finding_id |
uuid |
optional; references session_findings |
label |
text |
|
task_id |
uuid |
references tasks |
session_id |
uuid |
unique; references sessions |
status |
text |
default 'running'; one of running, replied, failed |
reply |
text |
optional |
verdict |
text |
optional |
superseded_at |
timestamptz |
optional |
created_at |
timestamptz |
default now() |
replied_at |
timestamptz |
optional |
Unique (proposal_id, label) where (superseded_at IS NULL). Check ((kind = 'behind') = (finding_id IS NOT NULL)). Check ((status = 'replied') = (reply IS NOT NULL)). Check ((verdict IS NULL) OR ((kind = 'behind') AND (verdict = ANY (ARRAY['fixed', 'still']))) OR ((kind = 'unrelated') AND (verdict = ANY (ARRAY['ok', 'worse'])))).
session_findings
Section titled “session_findings”A finding the coach kept, which is an exact quote from one event and what it shows about an agent or a pipeline.
| Column | Type | Notes |
|---|---|---|
id |
uuid |
key |
team_id |
uuid |
references teams |
agent_id |
uuid |
optional; references agents |
pipeline_id |
uuid |
optional; references pipelines |
session_id |
uuid |
references sessions |
event_id |
bigint |
references events |
seq |
bigint |
|
kind |
text |
one of followed, ignored, harm, gap |
quote |
text |
|
rule_hash |
text |
optional |
rule_text |
text |
optional |
candidate_id |
uuid |
optional; references candidates |
note |
text |
optional |
fix |
text |
optional; one of check, text |
trigger |
text |
optional |
source |
text |
one of person, pipeline, box |
person_id |
uuid |
optional; references people |
occasion |
uuid |
|
seen_at |
timestamptz |
|
run_id |
uuid |
optional; references runs |
created_at |
timestamptz |
default now() |
Unique (COALESCE(agent_id, pipeline_id), event_id, kind, COALESCE(rule_hash, ''::text), COALESCE(candidate_id, '00000000-0000-0000-0000-000000000000'::uuid)). Check ((agent_id IS NULL) <> (pipeline_id IS NULL)). Check ((agent_id IS NULL) OR ((kind = 'gap') <> (rule_hash IS NOT NULL))). Check ((agent_id IS NULL) OR ((kind = 'gap') = (candidate_id IS NOT NULL))). Check ((agent_id IS NULL) OR ((kind = 'gap') = (fix IS NOT NULL))). Check ((agent_id IS NULL) OR (kind <> 'gap') OR (note IS NOT NULL)). Check ((pipeline_id IS NULL) OR ((note IS NOT NULL) AND (rule_hash IS NULL) AND (candidate_id IS NULL) AND (fix IS NULL) AND (trigger IS NULL))). Check ((rule_hash IS NULL) = (rule_text IS NULL)).
candidates
Section titled “candidates”A correction no rule covers, with the findings that carry it.
| Column | Type | Notes |
|---|---|---|
id |
uuid |
key |
team_id |
uuid |
references teams |
agent_id |
uuid |
references agents |
correction |
text |
|
status |
text |
default 'open'; one of open, merged, closed |
merged_into |
uuid |
optional; references candidates |
run_id |
uuid |
optional; references runs |
created_at |
timestamptz |
default now() |
Check ((status = 'merged') = (merged_into IS NOT NULL)).