Skip to content

Instantly share code, notes, and snippets.

View flavioespinoza's full-sized avatar
😎

Flavio Espinoza flavioespinoza

😎
View GitHub Profile

RUBRIC REVISION AGENT PROMPT

VERSION: 1 DATE: Dec 5 2025


Agent Purpose

You are a specialized Rubric Revision Agent that processes reviewer feedback on evaluation criteria and generates comprehensive revision documentation with source citations. Your role is to take a spreadsheet of criterion revisions and source project files, then produce detailed justifications with exact citations for each revision decision.

Rubric Writing Agent - Version 14

UNIFIED AGENT: Works across all AI systems with context-aware output adaptation


QUICK START

Step 1: Detect Output Mode

Our report sorter breaks down whenever a field holds more than a simple value. Some of the INFO columns are arrays with a mix of real strings and null entries, and others describe nested details where the metadata already tells us which child field belongs to which parent record. The current behaviour ignores all of that, so the rows jump around or the UI just throws errors.

What I need is predictable ordering: arrays should compare their entries in sequence and treat dangling nulls as the last resort, and nested fields should honour the parent/child hints that are already present in the metadata so the chosen child value drives the sort. If someone points the sorter at the parent object itself or at a child name that isn’t registered, we still expect the same explanatory errors we saw before. Until that happens it’s almost impossible to review these reports.*** End Patch

Description

We need to support sorting records by fields that contain complex data types like arrays and nested objects. Currently, the getRecords API doesn't handle these cases properly, which limits how users can organize and view their data.

FieldMetadata Reference (tested expectations)

interface FieldMetadata {
  id: string;
 type: "STRING" | "INTEGER" | "FLAG" | "CATEGORICAL" | "OTHER";
[
"ApiClient.getRecords must allow a SortOrder whose property describes the INFO field n_array0 (type STRING, number.type OTHER) and return the records ordered so that the variant with array values ['b','c','a'] is placed before ['c',null,'d','b'] when compare is 'asc'.",
"When comparing array-valued fields, ApiClient must treat null-only arrays as lesser, otherwise sort the array contents lexicographically and compare the first non-null entry so mixed null/string arrays produce a deterministic order.",
"When SortOrder.property is a FieldMetadata instance for n_string2 that has parent n_object0 with number.type OTHER and nested.items including that child, ApiClient.getRecords must resolve the nested path and order the records by the child's string values.",
"Issuing a sort whose property targets the parent field n_object0 directly must still reject with the exact message \"can't compare values of type 'object'. consider providing a custom compare function.\"",
"If nested metadata describes an invali

Type: Class Name: ApiClient Location: src/ApiClient.ts Signature: class ApiClient implements Api { constructor(reportData: ReportData); getRecords(params?: Params): Promise<PagedItems>; /* additional getters for samples, phenotypes, metadata, binary assets, decision tree */ } Description: In-memory implementation of the Api interface that exposes VCF report data. Must retain Promise-based getters for records, samples, phenotypes, FASTA/BAM/genes binaries, app metadata, HTS metadata, decision tree access, and query/sort behaviour validated by ApiClient.test.ts.

Type: Interface Name: ReportData Location: src/ApiClient.ts Signature: interface ReportData { metadata: Metadata; data: { [key: string]: Resource[] }; binary: BinaryReportData; decisionTree?: DecisionTree; }

diff --git a/package.json b/package.json
index a2aca16..dccb96f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@molgenis/vip-report-api",
- "version": "3.2.0",
+ "version": "3.3.0",
"description": "TypeScript Report API for Variant Call Format (VCF) Report Templates",

Our report sorter breaks down whenever a field holds more than a simple value. Some of the INFO columns are arrays with a mix of real strings and null entries, and others describe nested details where the metadata already tells us which child field belongs to which parent record. The current behaviour ignores all of that, so the rows jump around or the UI just throws errors.

What I need is predictable ordering: arrays should compare their entries in sequence and treat dangling nulls as the last resort, and nested fields should honour the parent/child hints that are already present in the metadata so the chosen child value drives the sort. If someone points the sorter at the parent object itself or at a child name that isn’t registered, we still expect the same explanatory errors we saw before. Until that happens it’s almost impossible to review these reports.*** End Patch

Description

We need to support sorting records by fields that contain complex data types like arrays and nested objects. Currently, the getRecords API doesn't handle these cases properly, which limits how users can organize and view their data.

FieldMetadata Reference (tested expectations)

interface FieldMetadata {
  id: string;
 type: "STRING" | "INTEGER" | "FLAG" | "CATEGORICAL" | "OTHER";
[
"ApiClient.getRecords must allow a SortOrder whose property describes the INFO field n_array0 (type STRING, number.type OTHER) and return the records ordered so that the variant with array values ['b','c','a'] is placed before ['c',null,'d','b'] when compare is 'asc'.",
"When comparing array-valued fields, ApiClient must treat null-only arrays as lesser, otherwise sort the array contents lexicographically and compare the first non-null entry so mixed null/string arrays produce a deterministic order.",
"When SortOrder.property is a FieldMetadata instance for n_string2 that has parent n_object0 with number.type OTHER and nested.items including that child, ApiClient.getRecords must resolve the nested path and order the records by the child's string values.",
"Issuing a sort whose property targets the parent field n_object0 directly must still reject with the exact message \"can't compare values of type 'object'. consider providing a custom compare function.\"",
"If nested metadata describes an invali