agentxchain 2.155.58 → 2.155.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentxchain",
3
- "version": "2.155.58",
3
+ "version": "2.155.59",
4
4
  "description": "CLI for AgentXchain — governed multi-agent software delivery",
5
5
  "type": "module",
6
6
  "bin": {
@@ -7039,14 +7039,7 @@ function evaluateIntentCoverage(turnResult, intakeContext, { state = null, confi
7039
7039
  }
7040
7040
 
7041
7041
  // Build a searchable corpus from the turn result for semantic fallback
7042
- const corpus = [
7043
- turnResult.summary || '',
7044
- ...(turnResult.decisions || []).map(d => `${d.statement || ''} ${d.rationale || ''}`),
7045
- ...(turnResult.objections || []).map(o => o.statement || ''),
7046
- ...(turnResult.files_changed || []),
7047
- ...(turnResult.artifacts_created || []),
7048
- ...(Array.isArray(turnResult.intent_response) ? turnResult.intent_response.map(r => `${r.item || ''} ${r.detail || ''}`) : []),
7049
- ].join('\n').toLowerCase();
7042
+ const corpus = buildIntentCoverageCorpus(turnResult);
7050
7043
 
7051
7044
  for (const item of acceptanceItems) {
7052
7045
  const normalizedItem = item.toLowerCase().trim();
@@ -7085,7 +7078,7 @@ function evaluateIntentCoverage(turnResult, intakeContext, { state = null, confi
7085
7078
  }
7086
7079
 
7087
7080
  // Check 2: Semantic fallback — significant keyword overlap
7088
- const words = normalizedItem.split(/\s+/).filter(w => w.length > 3);
7081
+ const words = tokenizeIntentCoverageText(normalizedItem).filter(w => w.length > 3);
7089
7082
  if (words.length === 0) {
7090
7083
  addressed.push(item);
7091
7084
  continue;
@@ -7204,16 +7197,7 @@ function evaluateRoadmapDerivedConditionalCoverage(item, turnResult, intakeConte
7204
7197
  const milestoneId = sectionMatch[1].toLowerCase();
7205
7198
 
7206
7199
  // Build a searchable corpus from the turn result
7207
- const corpus = [
7208
- turnResult.summary || '',
7209
- ...(turnResult.decisions || []).map(d => `${d.statement || ''} ${d.rationale || ''}`),
7210
- ...(turnResult.objections || []).map(o => o.statement || ''),
7211
- ...(turnResult.files_changed || []),
7212
- ...(turnResult.artifacts_created || []),
7213
- ...(Array.isArray(turnResult.intent_response)
7214
- ? turnResult.intent_response.map(r => `${r.item || ''} ${r.detail || ''}`)
7215
- : []),
7216
- ].join('\n').toLowerCase();
7200
+ const corpus = buildIntentCoverageCorpus(turnResult);
7217
7201
 
7218
7202
  // If the turn mentions the milestone section ID, the item is addressed
7219
7203
  return corpus.includes(milestoneId);
@@ -7244,16 +7228,7 @@ function evaluateRoadmapReplenishmentConditionalCoverage(item, turnResult, intak
7244
7228
  return null;
7245
7229
  }
7246
7230
 
7247
- const corpus = [
7248
- turnResult.summary || '',
7249
- ...(turnResult.decisions || []).map(d => `${d.statement || ''} ${d.rationale || ''}`),
7250
- ...(turnResult.objections || []).map(o => o.statement || ''),
7251
- ...(turnResult.files_changed || []),
7252
- ...(turnResult.artifacts_created || []),
7253
- ...(Array.isArray(turnResult.intent_response)
7254
- ? turnResult.intent_response.map(r => `${r.item || ''} ${r.detail || ''}`)
7255
- : []),
7256
- ].join('\n').toLowerCase();
7231
+ const corpus = buildIntentCoverageCorpus(turnResult);
7257
7232
 
7258
7233
  if (!corpus.includes('vision.md')) {
7259
7234
  return false;
@@ -7275,6 +7250,40 @@ function evaluateRoadmapReplenishmentConditionalCoverage(item, turnResult, intak
7275
7250
  return sectionNames.some((section) => corpus.includes(section));
7276
7251
  }
7277
7252
 
7253
+ function buildIntentCoverageCorpus(turnResult) {
7254
+ const verification = turnResult?.verification && typeof turnResult.verification === 'object'
7255
+ ? turnResult.verification
7256
+ : {};
7257
+ const machineEvidenceText = Array.isArray(verification.machine_evidence)
7258
+ ? verification.machine_evidence.map((entry) => {
7259
+ if (!entry || typeof entry !== 'object' || Array.isArray(entry)) return '';
7260
+ return Object.values(entry).map((value) => {
7261
+ if (typeof value === 'string') return value;
7262
+ if (Array.isArray(value)) return value.join(' ');
7263
+ if (value && typeof value === 'object') return JSON.stringify(value);
7264
+ return '';
7265
+ }).join(' ');
7266
+ })
7267
+ : [];
7268
+
7269
+ return [
7270
+ turnResult.summary || '',
7271
+ ...(turnResult.decisions || []).map(d => `${d.statement || ''} ${d.rationale || ''}`),
7272
+ ...(turnResult.objections || []).map(o => o.statement || ''),
7273
+ ...(turnResult.files_changed || []),
7274
+ ...(turnResult.artifacts_created || []),
7275
+ verification.evidence_summary || '',
7276
+ ...machineEvidenceText,
7277
+ ...(Array.isArray(turnResult.intent_response) ? turnResult.intent_response.map(r => `${r.item || ''} ${r.detail || ''}`) : []),
7278
+ ].join('\n').toLowerCase();
7279
+ }
7280
+
7281
+ function tokenizeIntentCoverageText(value) {
7282
+ return String(value || '')
7283
+ .toLowerCase()
7284
+ .match(/[a-z0-9]+/g) || [];
7285
+ }
7286
+
7278
7287
  export {
7279
7288
  STATE_PATH,
7280
7289
  HISTORY_PATH,