Skip to content

Commit 7581576

Browse files
committed
feat: enforce strict output format for ai-pr skill responses
1 parent 7dd4e18 commit 7581576

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.config/fish/functions/ai_pr.fish

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Diff below. Describe ONLY visible substantive changes. Skip trivial changes enti
116116
if test -n "$branch_hint"
117117
set prompt "$prompt\nBranch type: $branch_hint"
118118
end
119-
set prompt "$prompt\n\nOutput: First line = PR title in format: $commitizen_type(#$ticket_number): description (max 72 chars total). Blank line. Then markdown PR description in $language_name. All text in $language_name. No explanations."
119+
set prompt "$prompt\n\nCRITICAL: Your entire response must be ONLY the PR content. The first character you output must be the first character of the PR title. Do not output any thoughts, explanations, or analysis.\n\nFormat:\nLine 1: $commitizen_type(#$ticket_number): description (max 72 chars)\nLine 2: blank\nLine 3+: Markdown PR body in $language_name"
120120
set temp_prompt (mktemp -t opencode_prompt.XXXXXX)
121121
set temp_output (mktemp -t opencode_output.XXXXXX)
122122
echo "$prompt" >$temp_prompt

.config/opencode/skills/ai-pr/SKILL.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ description: Generate concise PR descriptions from git diffs and commit context.
2525
- Breaking Changes section: include only when diff obviously breaks behavior.
2626

2727
## Output
28+
**CRITICAL: Your response must contain ONLY the PR content below. Do not include ANY explanatory text, thoughts, analysis, or meta-commentary before or after the PR content.**
29+
2830
- First line is the PR title only.
2931
- Blank line after title.
3032
- Then markdown PR description using the provided section headings.
31-
- Output only the final content, no explanations.
33+
- Do not output anything else.

0 commit comments

Comments
 (0)