< Summary

Information
Class: Intentum.AI.SystemOne.SystemOneQuestion
Assembly: Intentum.AI.SystemOne
File(s): /home/runner/work/Intentum/Intentum/src/Intentum.AI.SystemOne/SystemOneQuestion.cs
Line coverage
100%
Covered lines: 7
Uncovered lines: 0
Coverable lines: 7
Total lines: 25
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
.ctor(...)100%11100%
Choice(...)100%11100%
Score(...)100%11100%
Noul(...)100%11100%

File(s)

/home/runner/work/Intentum/Intentum/src/Intentum.AI.SystemOne/SystemOneQuestion.cs

#LineLine coverage
 1using System.Text.Json.Serialization;
 2
 3namespace Intentum.AI.SystemOne;
 4
 5/// <summary>A typed System One question: choice, noul (yes/no) or score.</summary>
 6/// <param name="Type">Question type: choice, noul or score.</param>
 7/// <param name="Instructions">Human/model instructions describing the question.</param>
 8/// <param name="Criteria">Choice: option → description map; score: ordered level list; noul: optional.</param>
 59public sealed record SystemOneQuestion(
 510    [property: JsonPropertyName("type")] string Type,
 511    [property: JsonPropertyName("instructions")] string Instructions,
 1012    [property: JsonPropertyName("criteria")] object? Criteria = null)
 13{
 14    /// <summary>A choice question over named options.</summary>
 15    public static SystemOneQuestion Choice(string instructions, IReadOnlyDictionary<string, string?> criteria) =>
 316        new("choice", instructions, criteria);
 17
 18    /// <summary>A score question over ordered levels (lowest first).</summary>
 19    public static SystemOneQuestion Score(string instructions, IReadOnlyList<string> criteria) =>
 120        new("score", instructions, criteria);
 21
 22    /// <summary>A yes/no question; the answer carries the probability of yes.</summary>
 23    public static SystemOneQuestion Noul(string instructions) =>
 124        new("noul", instructions);
 25}