Replace ``__SPECKIT_COMMAND_ __`` placeholders with invocations. Each placeholder encodes a command name in upper-case with underscores (e.g. ``__SPECKIT_COMMAND_PLAN__``, ``__SPECKIT_COMMAND_GIT_COMMIT__``). The replacement uses *separator* to join the segment
(content: str, separator: str = ".")
| 523 | |
| 524 | @staticmethod |
| 525 | def resolve_command_refs(content: str, separator: str = ".") -> str: |
| 526 | """Replace ``__SPECKIT_COMMAND_<NAME>__`` placeholders with invocations. |
| 527 | |
| 528 | Each placeholder encodes a command name in upper-case with |
| 529 | underscores (e.g. ``__SPECKIT_COMMAND_PLAN__``, |
| 530 | ``__SPECKIT_COMMAND_GIT_COMMIT__``). The replacement uses |
| 531 | *separator* to join the segments: |
| 532 | |
| 533 | * ``separator="."`` → ``/speckit.plan``, ``/speckit.git.commit`` |
| 534 | * ``separator="-"`` → ``/speckit-plan``, ``/speckit-git-commit`` |
| 535 | """ |
| 536 | return re.sub( |
| 537 | r"__SPECKIT_COMMAND_([A-Z][A-Z0-9_]*)__", |
| 538 | lambda m: "/speckit" + separator + m.group(1).lower().replace("_", separator), |
| 539 | content, |
| 540 | ) |
| 541 | |
| 542 | @staticmethod |
| 543 | def resolve_python_interpreter(project_root: Path | None = None) -> str: |
no outgoing calls