airgen-cli 0.20.0 → 0.20.2

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.
@@ -693,7 +693,7 @@ export function registerLintCommands(program, client) {
693
693
  .option("--threshold <n>", "Jaccard similarity threshold (0.0-1.0)", "0.6")
694
694
  .option("--spray-threshold <n>", "Outgoing trace link count for spray pattern detection", "8")
695
695
  .option("--min-severity <level>", "Only show findings at this severity or above: low, medium, high", "low")
696
- .option("--substrate-namespace <ns>", "Use existing Substrate entity classifications instead of re-classifying (e.g. SE, SE:naval)")
696
+ .option("--substrate-namespace <ns>", "Substrate namespace for entity lookups (default: SE)", "SE")
697
697
  .action(async (tenant, project, opts) => {
698
698
  const uht = new UhtClient();
699
699
  if (!uht.isConfigured) {
@@ -722,14 +722,13 @@ export function registerLintCommands(program, client) {
722
722
  const conceptRefs = extractConcepts(requirements);
723
723
  const top = topConcepts(conceptRefs, maxConcepts);
724
724
  console.error(` ${conceptRefs.size} unique concepts found, classifying top ${top.length}.`);
725
- // Step 3: Classify concepts — use Substrate namespace if provided, else fresh classify
726
- const ns = opts.substrateNamespace;
727
- console.error(ns
728
- ? `Looking up concepts in Substrate namespace "${ns}"...`
729
- : "Classifying concepts via UHT...");
725
+ // Step 3: Classify concepts — use Substrate namespace (default: SE) for pre-classified entities
726
+ // Only falls back to fresh POST /classify for concepts not found in the namespace
727
+ const ns = opts.substrateNamespace ?? "SE";
728
+ console.error(`Looking up concepts in Substrate namespace "${ns}"...`);
730
729
  const concepts = [];
731
- if (ns) {
732
- // Namespace mode: look up pre-classified entities
730
+ {
731
+ // Namespace mode: look up pre-classified entities, fall back to fresh classify
733
732
  const lookupResults = await parallelMap(top, async ([name]) => uht.lookupEntity(name, ns), 5);
734
733
  for (let i = 0; i < lookupResults.length; i++) {
735
734
  const [name, refs] = top[i];
@@ -765,28 +764,6 @@ export function registerLintCommands(program, client) {
765
764
  }
766
765
  }
767
766
  }
768
- else {
769
- // Fresh classification mode (original behavior)
770
- const classifyResults = await parallelMap(top, async ([name]) => uht.classify(name), 5);
771
- for (let i = 0; i < classifyResults.length; i++) {
772
- const entry = classifyResults[i];
773
- const [name, refs] = top[i];
774
- if (entry.result) {
775
- const traitNames = entry.result.traits.map(t => t.name).filter(Boolean);
776
- concepts.push({
777
- name,
778
- hexCode: entry.result.hex_code,
779
- traits: traitNames,
780
- traitSet: new Set(traitNames),
781
- reqs: refs,
782
- });
783
- console.error(` ✓ ${name} → ${entry.result.hex_code} (${traitNames.length} traits)`);
784
- }
785
- else if (entry.error) {
786
- console.error(` ✗ ${name}: ${entry.error.message}`);
787
- }
788
- }
789
- }
790
767
  // Step 4: Cross-compare concepts in batches
791
768
  console.error("Cross-comparing concepts...");
792
769
  const comparisons = [];
@@ -25,7 +25,7 @@ export function registerTraceabilityCommands(program, client) {
25
25
  if (opts.type)
26
26
  links = links.filter(l => l.linkType === opts.type);
27
27
  const total = links.length;
28
- if (opts.limit)
28
+ if (opts.limit && opts.limit.toLowerCase() !== "all")
29
29
  links = links.slice(0, parseInt(opts.limit, 10));
30
30
  if (isJsonMode()) {
31
31
  output({ data: links, meta: { totalItems: total, showing: links.length } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "airgen-cli",
3
- "version": "0.20.0",
3
+ "version": "0.20.2",
4
4
  "description": "AIRGen CLI — requirements engineering from the command line",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",