@ncoderz/awa 1.7.0 → 1.7.1

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/dist/index.js CHANGED
@@ -24,7 +24,7 @@ import { Command, Option } from "commander";
24
24
  // src/_generated/package_info.ts
25
25
  var PACKAGE_INFO = {
26
26
  "name": "@ncoderz/awa",
27
- "version": "1.7.0",
27
+ "version": "1.7.1",
28
28
  "author": "Richard Sewell <richard.sewell@ncoderz.com>",
29
29
  "license": "MIT",
30
30
  "description": "awa is an Agent Workflow for AIs. It is also a CLI tool to powerfully manage agent workflow files using templates."
@@ -482,7 +482,7 @@ async function fixTaskMatrix(filePath, codeToReqFile, specs, crossRefPatterns) {
482
482
  } catch {
483
483
  return false;
484
484
  }
485
- const { tasks, sourceReqs, sourceDesigns } = parseTaskFileData(content, crossRefPatterns);
485
+ const { tasks, sourceDesigns } = parseTaskFileData(content, crossRefPatterns);
486
486
  const acToTasks = /* @__PURE__ */ new Map();
487
487
  for (const task of tasks) {
488
488
  for (const acId of task.implements) {
@@ -499,15 +499,6 @@ async function fixTaskMatrix(filePath, codeToReqFile, specs, crossRefPatterns) {
499
499
  idToTestTasks.set(testId, existing);
500
500
  }
501
501
  }
502
- const sourceAcIds = /* @__PURE__ */ new Set();
503
- for (const reqName of sourceReqs) {
504
- const reqCode = extractCodeFromFileName(reqName);
505
- for (const sf of specs.specFiles) {
506
- if (sf.code === reqCode && /\bREQ-/.test(basename(sf.filePath))) {
507
- for (const acId of sf.acIds) sourceAcIds.add(acId);
508
- }
509
- }
510
- }
511
502
  const sourcePropertyIds = /* @__PURE__ */ new Set();
512
503
  for (const designName of sourceDesigns) {
513
504
  const designCode = extractCodeFromFileName(designName);
@@ -517,24 +508,9 @@ async function fixTaskMatrix(filePath, codeToReqFile, specs, crossRefPatterns) {
517
508
  }
518
509
  }
519
510
  }
520
- const allRefIds = /* @__PURE__ */ new Set([...acToTasks.keys(), ...idToTestTasks.keys()]);
521
- const uncovered = [];
522
- for (const acId of sourceAcIds) {
523
- if (!allRefIds.has(acId)) uncovered.push(acId);
524
- }
525
- for (const propId of sourcePropertyIds) {
526
- if (!allRefIds.has(propId)) uncovered.push(propId);
527
- }
528
- uncovered.sort(compareIds);
529
511
  const allIdsForMatrix = [.../* @__PURE__ */ new Set([...acToTasks.keys(), ...idToTestTasks.keys()])];
530
512
  const grouped = groupByReqFile(allIdsForMatrix, codeToReqFile);
531
- const newSection = generateTaskSection(
532
- grouped,
533
- acToTasks,
534
- idToTestTasks,
535
- sourcePropertyIds,
536
- uncovered
537
- );
513
+ const newSection = generateTaskSection(grouped, acToTasks, idToTestTasks, sourcePropertyIds);
538
514
  const newContent = replaceTraceabilitySection(content, newSection);
539
515
  if (newContent === content) return false;
540
516
  await writeFile(filePath, newContent, "utf-8");
@@ -601,7 +577,7 @@ function parseTaskFileData(content, crossRefPatterns) {
601
577
  }
602
578
  return { tasks, sourceReqs, sourceDesigns };
603
579
  }
604
- function generateTaskSection(grouped, acToTasks, idToTestTasks, propertyIds, uncovered) {
580
+ function generateTaskSection(grouped, acToTasks, idToTestTasks, propertyIds) {
605
581
  const lines = [];
606
582
  const reqFiles = [...grouped.keys()].sort();
607
583
  for (const reqFile of reqFiles) {
@@ -626,9 +602,7 @@ function generateTaskSection(grouped, acToTasks, idToTestTasks, propertyIds, unc
626
602
  }
627
603
  lines.push("");
628
604
  }
629
- const uncoveredStr = uncovered.length > 0 ? uncovered.join(", ") : "(none)";
630
- lines.push(`UNCOVERED: ${uncoveredStr}`);
631
- return lines.join("\n");
605
+ return lines.join("\n").trimEnd();
632
606
  }
633
607
  function groupByReqFile(ids, codeToReqFile) {
634
608
  const groups = /* @__PURE__ */ new Map();