Skip to content

Commit 9e61bb2

Browse files
fix: resolve {SCRIPT} placeholder and strip strategy key from markdown output
- Pop strategy key from frontmatter after wrap substitution so it does not leak into rendered markdown/YAML agent command files - Call resolve_skill_placeholders + _convert_argument_placeholder for the markdown branch so {SCRIPT}/{AGENT_SCRIPT} are resolved and {ARGS} is converted to agent-specific format (fixes Codex P2 ordering issue) - Remove preset key from init-options.json during project init
1 parent 7a11b37 commit 9e61bb2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/specify_cli/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1273,7 +1273,6 @@ def init(
12731273
"integration": resolved_integration.key,
12741274
"branch_numbering": branch_numbering or "sequential",
12751275
"here": here,
1276-
"preset": preset,
12771276
"script": selected_script,
12781277
"speckit_version": get_speckit_version(),
12791278
}

src/specify_cli/agents.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@ def register_commands(
421421
for key in ("scripts", "agent_scripts"):
422422
if key not in frontmatter and key in core_frontmatter:
423423
frontmatter[key] = core_frontmatter[key]
424+
frontmatter.pop("strategy", None)
424425

425426
frontmatter = self._adjust_script_paths(frontmatter)
426427

@@ -443,6 +444,8 @@ def register_commands(
443444
agent_name, output_name, frontmatter, body, source_id, cmd_file, project_root
444445
)
445446
elif agent_config["format"] == "markdown":
447+
body = self.resolve_skill_placeholders(agent_name, frontmatter, body, project_root)
448+
body = self._convert_argument_placeholder(body, "$ARGUMENTS", agent_config["args"])
446449
output = self.render_markdown_command(frontmatter, body, source_id, context_note)
447450
elif agent_config["format"] == "toml":
448451
body = self.resolve_skill_placeholders(agent_name, frontmatter, body, project_root)

0 commit comments

Comments
 (0)