MCPcopy Create free account
hub / github.com/SethGammon/Citadel / buildCriteria

Function buildCriteria

scripts/usefulness-trial.js:67–111  ·  view source on GitHub ↗
(proof)

Source from the content-addressed store, hash-verified

65}
66
67function buildCriteria(proof) {
68 const setup = checkById(proof, 'setup');
69 const orient = checkById(proof, 'orient');
70 const route = checkById(proof, 'route');
71 const verify = checkById(proof, 'verify');
72 const report = checkById(proof, 'report');
73
74 return [
75 criterion(
76 'setup-path',
77 'User can get to a working setup path',
78 statusFromCheck(setup, { acceptPartial: true }),
79 setup.detail,
80 setup.evidence,
81 ),
82 criterion(
83 'next-action',
84 'User can understand the next action and risk boundary',
85 statusFromCheck(orient),
86 orient.detail,
87 orient.evidence,
88 ),
89 criterion(
90 'plain-language-routing',
91 'User can ask a plain-English task without choosing a skill first',
92 statusFromCheck(route),
93 route.detail,
94 route.evidence,
95 ),
96 criterion(
97 'verification',
98 'Citadel selects or runs a project-specific verification command',
99 statusFromCheck(verify),
100 verify.detail,
101 verify.evidence,
102 ),
103 criterion(
104 'durable-evidence',
105 'The run leaves inspectable local evidence for another session',
106 statusFromCheck(report),
107 report.detail,
108 report.evidence,
109 ),
110 ];
111}
112
113function decideTrial(proof, criteria) {
114 if (proof.status === 'blocked' || criteria.some((item) => item.status === 'fail')) {

Callers 1

buildTrialFunction · 0.85

Calls 3

checkByIdFunction · 0.85
criterionFunction · 0.85
statusFromCheckFunction · 0.85

Tested by

no test coverage detected