File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -590,8 +590,6 @@ def get_artifact_info(
590590 """
591591 bare , resolved_kind = _resolve_kind_hint (name , kind )
592592
593- from ..presets import PresetError , PresetResolver # lazy: avoids circular import
594-
595593 # Project and registry validation happens once, inside
596594 # ``_collect_inventory`` below — the same chokepoint ``list_artifacts``
597595 # uses — so both public methods fail closed identically instead of
@@ -620,13 +618,6 @@ def get_artifact_info(
620618 )
621619 if artifact is None :
622620 raise ArtifactNotFoundError (name )
623- try :
624- if PresetResolver (self .project_root ).resolve_content (
625- validated_name , resolved_kind
626- ) is None :
627- raise ArtifactNotFoundError (name )
628- except (OSError , PresetError ) as exc :
629- raise ArtifactResolutionError () from exc
630621 stack = _build_stack (
631622 self .project_root ,
632623 resolved_kind ,
@@ -856,7 +847,7 @@ def _iter_core_candidates(self) -> Iterable[tuple[ArtifactKind, str]]:
856847 if any (
857848 (directory / f"{ candidate } .md" ).is_file ()
858849 for directory in command_dirs
859- for candidate in PresetResolver .core_name_candidates (name )
850+ for candidate in PresetResolver .name_candidates (name )
860851 ):
861852 yield "command" , name
862853
Original file line number Diff line number Diff line change @@ -5292,8 +5292,16 @@ def _core_stem(template_name: str) -> Optional[str]:
52925292 return None
52935293
52945294 @classmethod
5295- def core_name_candidates (cls , logical_name : str ) -> list [str ]:
5296- """Return exact-first filename candidates for a core logical name."""
5295+ def name_candidates (cls , logical_name : str ) -> list [str ]:
5296+ """Return exact-first filename candidates for a ``speckit.<stem>`` logical name.
5297+
5298+ Given a logical name like ``speckit.plan``, returns
5299+ ``["speckit.plan", "plan"]`` so callers can try the fully-qualified
5300+ filename first and then fall back to the bare stem.
5301+
5302+ Names that do not follow the ``speckit.<stem>`` convention return a
5303+ single-element list containing the original name.
5304+ """
52975305 names = [logical_name ]
52985306 stem = cls ._core_stem (logical_name )
52995307 if stem and stem != logical_name :
@@ -5833,7 +5841,7 @@ def _find_bundled_core(
58335841 if base is None :
58345842 return None
58355843
5836- for name in self .core_name_candidates (template_name ):
5844+ for name in self .name_candidates (template_name ):
58375845 if template_type == "script" :
58385846 c = next (
58395847 (path for path in script_variant_paths (base , name ) if path .exists ()),
You can’t perform that action at this time.
0 commit comments