specfact-cli 0.55.4__py3-none-any.whl → 0.55.19__py3-none-any.whl

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.
Files changed (27) hide show
  1. specfact_cli/__init__.py +1 -1
  2. specfact_cli/adapters/openspec_parser.py +37 -68
  3. specfact_cli/analyzers/async_checks.py +783 -0
  4. specfact_cli/analyzers/code_analyzer.py +104 -312
  5. specfact_cli/analyzers/graph_analyzer.py +29 -33
  6. specfact_cli/analyzers/python_patterns.py +377 -0
  7. specfact_cli/generators/test_to_openapi.py +246 -412
  8. specfact_cli/generators/workflow_generator.py +6 -46
  9. specfact_cli/importers/speckit_converter.py +40 -99
  10. specfact_cli/registry/bootstrap.py +3 -3
  11. specfact_cli/registry/crypto_validator.py +4 -0
  12. specfact_cli/registry/dependency_resolver.py +4 -1
  13. specfact_cli/registry/marketplace_client.py +31 -15
  14. specfact_cli/registry/module-signing-public-next.pem +3 -0
  15. specfact_cli/registry/module_installer.py +536 -48
  16. specfact_cli/registry/module_packages.py +256 -82
  17. specfact_cli/registry/official-module-cutoff.json +1038 -0
  18. specfact_cli/registry/official_module_cutoff.py +77 -0
  19. specfact_cli/validators/repro_checker.py +105 -130
  20. {specfact_cli-0.55.4.dist-info → specfact_cli-0.55.19.dist-info}/METADATA +7 -8
  21. {specfact_cli-0.55.4.dist-info → specfact_cli-0.55.19.dist-info}/RECORD +24 -22
  22. {specfact_cli-0.55.4.dist-info → specfact_cli-0.55.19.dist-info}/WHEEL +1 -1
  23. specfact_cli/resources/semgrep/async.yml +0 -285
  24. specfact_cli/resources/semgrep/code-quality.yml +0 -260
  25. specfact_cli/resources/semgrep/feature-detection.yml +0 -774
  26. {specfact_cli-0.55.4.dist-info → specfact_cli-0.55.19.dist-info}/entry_points.txt +0 -0
  27. {specfact_cli-0.55.4.dist-info → specfact_cli-0.55.19.dist-info}/licenses/LICENSE +0 -0
specfact_cli/__init__.py CHANGED
@@ -76,6 +76,6 @@ def _install_progressive_disclosure() -> None:
76
76
  # keeps missing-command and missing-parameter UX consistent outside the root CLI too.
77
77
  _install_progressive_disclosure()
78
78
 
79
- __version__ = "0.55.4"
79
+ __version__ = "0.55.19"
80
80
 
81
81
  __all__ = ["__version__"]
@@ -261,22 +261,13 @@ class OpenSpecParser:
261
261
  return sections
262
262
 
263
263
  def _flush_spec_section(
264
- self,
265
- section: str | None,
266
- current_text: list[str],
267
- current_items: list[str],
268
- overview: str,
269
- requirements: list[str],
270
- scenarios: list[str],
271
- ) -> tuple[str, list[str], list[str]]:
272
- """Commit accumulated content for the current spec section and return updated accumulators."""
264
+ self, sections: dict[str, Any], section: str | None, text: list[str], items: list[str]
265
+ ) -> None:
266
+ """Finish the current recognized spec section."""
273
267
  if section == "overview":
274
- overview = "\n".join(current_text).strip()
275
- elif section == "requirements":
276
- requirements = current_items
277
- elif section == "scenarios":
278
- scenarios = current_items
279
- return overview, requirements, scenarios
268
+ sections[section] = "\n".join(text).strip()
269
+ elif section in {"requirements", "scenarios"}:
270
+ sections[section] = items
280
271
 
281
272
  @beartype
282
273
  @require(lambda content: isinstance(content, str), "Content must be str")
@@ -291,39 +282,29 @@ class OpenSpecParser:
291
282
  Returns:
292
283
  Dictionary with "overview", "requirements" and "scenarios"
293
284
  """
294
- overview: str = ""
295
- requirements: list[str] = []
296
- scenarios: list[str] = []
297
-
285
+ sections: dict[str, Any] = {"overview": "", "requirements": [], "scenarios": []}
298
286
  current_section: str | None = None
299
287
  current_items: list[str] = []
300
288
  current_text: list[str] = []
301
-
302
289
  for line in content.splitlines():
303
290
  if line.startswith("##"):
304
- overview, requirements, scenarios = self._flush_spec_section(
305
- current_section, current_text, current_items, overview, requirements, scenarios
306
- )
291
+ self._flush_spec_section(sections, current_section, current_text, current_items)
307
292
  current_section = line.lstrip("#").strip().lower()
308
293
  current_items = []
309
294
  current_text = []
310
- elif line.strip().startswith("-") or line.strip().startswith("*"):
311
- item = line.strip().lstrip("-*").strip()
312
- if item:
313
- current_items.append(item)
314
- elif current_section:
315
- if current_section == "overview" or (current_section in ("requirements", "scenarios") and line.strip()):
316
- current_text.append(line)
317
-
318
- overview, requirements, scenarios = self._flush_spec_section(
319
- current_section, current_text, current_items, overview, requirements, scenarios
320
- )
321
-
322
- return {
323
- "overview": overview,
324
- "requirements": requirements,
325
- "scenarios": scenarios,
326
- }
295
+ continue
296
+ stripped = line.strip()
297
+ bullet = stripped.startswith(("-", "*"))
298
+ item = stripped.lstrip("-*").strip() if bullet else ""
299
+ if item:
300
+ current_items.append(item)
301
+ if not bullet and (
302
+ current_section == "overview" or (current_section in {"requirements", "scenarios"} and stripped)
303
+ ):
304
+ current_text.append(line)
305
+
306
+ self._flush_spec_section(sections, current_section, current_text, current_items)
307
+ return sections
327
308
 
328
309
  @beartype
329
310
  @require(lambda content: isinstance(content, str), "Content must be str")
@@ -346,30 +327,20 @@ class OpenSpecParser:
346
327
  "impact": "",
347
328
  }
348
329
 
349
- current_section: str | None = None
330
+ current_section = ""
350
331
  current_content: list[str] = []
351
-
352
332
  for line in content.splitlines():
353
- # Check for section headers
354
333
  if line.startswith("##"):
355
- # Save previous section
356
- if current_section:
357
- section_key = self._normalize_section_name(current_section)
358
- if section_key and section_key in sections:
359
- sections[section_key] = "\n".join(current_content).strip()
360
- # Start new section
361
- current_section = line.lstrip("#").strip()
334
+ if current_section in sections:
335
+ sections[current_section] = "\n".join(current_content).strip()
336
+ current_section = self._normalize_section_name(line.lstrip("#").strip())
362
337
  current_content = []
363
- else:
364
- if current_section:
365
- current_content.append(line)
366
-
367
- # Save last section
368
- if current_section:
369
- section_key = self._normalize_section_name(current_section)
370
- if section_key and section_key in sections:
371
- sections[section_key] = "\n".join(current_content).strip()
338
+ continue
339
+ if current_section:
340
+ current_content.append(line)
372
341
 
342
+ if current_section in sections:
343
+ sections[current_section] = "\n".join(current_content).strip()
373
344
  return sections
374
345
 
375
346
  @beartype
@@ -392,21 +363,19 @@ class OpenSpecParser:
392
363
  current_section: str | None = None
393
364
 
394
365
  for line in content.splitlines():
366
+ if current_section == "content":
367
+ delta_content.append(line)
368
+ continue
395
369
  if line.startswith("##"):
396
- if current_section == "content":
397
- delta_content.append(line)
398
- continue
399
370
  current_section = line.lstrip("#").strip().lower()
400
371
  continue
401
- if not current_section:
402
- continue
403
372
  stripped = line.strip()
404
- if current_section == "type" and stripped:
373
+ if not stripped:
374
+ continue
375
+ if current_section == "type":
405
376
  change_type = stripped.upper()
406
- elif current_section in ("feature id", "feature_id") and stripped:
377
+ elif current_section in {"feature id", "feature_id"}:
407
378
  feature_id = stripped
408
- elif current_section == "content":
409
- delta_content.append(line)
410
379
 
411
380
  return {
412
381
  "type": change_type,