task_graph__node_link__degree_extremum_value¶
Program Contract¶
Program: value(extreme(metric(nodes(graph), degree_metric), direction=max_or_min)); scene=node_link; scope=degree_extremum_value
Candidate set: the visible graph, tree, network, route, matrix, table, node, edge, label, weight, path, and option elements inside the degree_extremum_value objective scope.
Operands: visible scene state and prompt-bound operands named by extreme, metric, nodes, graph, degree_metric, direction, max_or_min, node_link, degree_extremum_value plus the active query_id branch.
Operation: evaluate value over the candidate set using the visible graph structure, labels, weights, directions, reachability, paths, connectivity, or option-selection constraints encoded in the program expression; generation enforces a unique final answer.
Output binding: answer uses the integer schema; the queried extreme degree value,.
Annotation witnesses: annotation uses the point schema; one point at the node center whose branch-specific degree value equals the requested maximum or minimum.
Query ids: undirected_max_degree_value, undirected_min_degree_value, directed_max_in_degree_value, directed_max_out_degree_value.
Reasoning Operations¶
Families: ranking, topology
1) Identity¶
- Domain:
graph - Scene:
comparison - Scene id:
node_link - Task id:
task_graph__node_link__degree_extremum_value - Objective: ask for the highest or lowest degree-style value present in one labeled node-link graph.
2) Scene + task contract¶
- Branch metadata:
query_id query_id: one ofundirected_max_degree_value,undirected_min_degree_value,directed_max_in_degree_value, ordirected_max_out_degree_value- Supported
graph_directionalityvalues:undirected,directed - Supported directed
degree_modevalues:in_degree,out_degree - Supported
scene_variantvalues:circular,shell,spring,grid_jitter,layered,component_clustered,path_spine,radial_tree answer_gt.type:integerannotation_gt.type:point- Scene contract:
- one single-panel labeled node-link graph,
- simple unweighted graph only,
- no self-loops or multi-edges,
- directed branches also reject reciprocal directed edge pairs,
- visible node labels use one whole-image label format (
letters,numbers, ornamed), - node count is sampled from
5..10. - Query contract:
- undirected branches ask for the maximum or minimum node degree value,
- directed branches ask for the maximum in-degree or out-degree value,
- the default sampler is uniform over the four public
query_idbranches, graph_directionality,degree_mode, andextremum_modeare derived from the selected publicquery_id,- branch answer supports are
undirected_max=2..5,undirected_min=0..3, anddirected_max_in/out=1..4, - answer is the queried extreme degree value,
- every generated instance has exactly one node attaining the queried extreme value.
3) Prompt contract¶
- Bundle:
graph_node_link_comparison_v1 scene_key:single_graph_comparisontask_key:extreme_degree_value_query- Modes:
answer_only,answer_and_annotation - Answer JSON shape:
{"answer":3} - Answer+annotation JSON shape:
{"annotation":[[180,220]],"answer":3} - Prompt-facing annotation uses one pixel-space node center for the unique node attaining the active branch's maximum/minimum degree or maximum directed in/out-degree value.
- If the node label format is
named, prompt references quote the node label, for example node"Lima".
4) Annotation + trace contract¶
- Prompt-facing annotation is one point at the node center whose branch-specific degree value equals the requested maximum or minimum.
answer_gt.value == execution_trace.target_degreeby construction.len(annotation_gt.value) == 1by construction.execution_trace.graph_directionalityrecordsundirectedordirected;execution_trace.degree_moderecordsdegree,in_degree, orout_degree.execution_trace.extremum_moderecordsmaxormin.execution_trace.query_id_probabilitiesrecords the public branch sampling distribution.execution_trace.queried_degrees_by_labelstores the degree map used to compute the answer.execution_trace.matching_labelsandwitness_symbolic.labelsstore the label attaining the queried extreme value.scene_ir.entitiesstores node labels, total degrees, directed degrees, queried degree values, center points, bboxes, andis_extreme_degree_node.projected_annotationincludespoint.
5) Visual policy¶
- Rendering uses the shared graph light-panel style from
src/trace_tasks/resources/configs/domains/graph/base.yaml. - Directed branches render arrowheads and reject reciprocal edge pairs so the queried degree mode remains readable.
- Node label format, edge routing, glyph style, named node color, layout transform, and layout are visual variation only.
- The prompt never refers to node position, color, or shape as semantic annotation.
6) Determinism + constraints¶
- Deterministic sampling/rendering from
instance_seed. - Answers and annotation come from the same adjacency map and rendered node assignment.
- Generation rejects samples that cannot realize the requested
(query_id, target_degree)exactly with one unique extremum node. - Explicit
query_idoverrides must map to one supported public branch.
7) Complexity + tests¶
- Complexity components:
topology_reasoning,visual_scan,ambiguity,clutter - Tests:
tests/test_graph_comparison_extreme_degree_value_contracts.py,tests/test_graph_comparison_extreme_degree_value_tasks.py,tests/test_prompt_system.py,tests/test_scene_config.py