Skip to content

Commit 8db2ed2

Browse files
committed
chore: imrpove pr-draft-summary trigger and runtime-behavior-probe tweak
1 parent be9ce37 commit 8db2ed2

File tree

3 files changed

+18
-20
lines changed

3 files changed

+18
-20
lines changed

.agents/skills/pr-draft-summary/SKILL.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: pr-draft-summary
3-
description: Create a PR title and draft description after substantive code changes are finished. Trigger when wrapping up a moderate-or-larger change (runtime code, tests, build config, docs with behavior impact) and you need the PR-ready summary block with change summary plus PR draft text.
3+
description: Create the required PR-ready summary block, branch suggestion, title, and draft description for openai-agents-python. Use in the final handoff after moderate-or-larger changes to runtime code, tests, examples, build/test configuration, or docs with behavior impact; skip only for trivial or conversation-only tasks, repo-meta/doc-only tasks without behavior impact, or when the user explicitly says not to include the PR draft block.
44
---
55

66
# PR Draft Summary
@@ -10,8 +10,8 @@ Produce the PR-ready summary required in this repository after substantive code
1010

1111
## When to Trigger
1212
- The task for this repo is finished (or ready for review) and it touched runtime code, tests, examples, docs with behavior impact, or build/test configuration.
13-
- You are about to send the "work complete" response and need the PR block included.
14-
- Skip only for trivial or conversation-only tasks where no PR-style summary is expected.
13+
- Treat this as the default final handoff step for substantive code work. Run it after any required verification or changeset work and before sending the "work complete" response.
14+
- Skip only for trivial or conversation-only tasks, repo-meta/doc-only tasks without behavior impact, or when the user explicitly says not to include the PR draft block.
1515

1616
## Inputs to Collect Automatically (do not ask the user)
1717
- Current branch: `git rev-parse --abbrev-ref HEAD`.
@@ -37,7 +37,7 @@ Produce the PR-ready summary required in this repository after substantive code
3737
9) Output only the block in "Output Format". Keep any surrounding status note minimal and in English.
3838

3939
## Output Format
40-
When closing out a task and the summary block is desired, add this concise Markdown block (English only) after any brief status note. If the user says they do not want it, skip this section.
40+
When closing out a task, add this concise Markdown block (English only) after any brief status note unless the task falls under the documented skip cases or the user says they do not want it.
4141

4242
```
4343
# Pull Request Draft

.agents/skills/runtime-behavior-probe/templates/python_probe.py

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@
1212

1313
from __future__ import annotations
1414

15-
from collections import Counter, defaultdict
16-
from importlib import metadata
1715
import json
1816
import os
19-
from pathlib import Path
2017
import platform
2118
import shutil
2219
import statistics
2320
import subprocess
2421
import sys
2522
import time
2623
import uuid
24+
from collections import Counter, defaultdict
25+
from importlib import metadata
26+
from pathlib import Path
2727

2828
SCENARIO = "replace-me"
2929
RUN_LABEL = "replace-me"
@@ -79,9 +79,7 @@ def emit(kind: str, **payload: object) -> None:
7979

8080

8181
def runtime_context() -> dict[str, object]:
82-
approved = {
83-
name: ("set" if os.getenv(name) else "unset") for name in APPROVED_ENV_VARS
84-
}
82+
approved = {name: ("set" if os.getenv(name) else "unset") for name in APPROVED_ENV_VARS}
8583
package_versions = {
8684
name: version
8785
for name in ("openai", "agents")
@@ -157,22 +155,16 @@ def summarize_results() -> dict[str, object]:
157155
if item.get("first_token_latency_s") is not None
158156
]
159157
result_flags = Counter(str(item["result_flag"]) for item in measured or items)
160-
observations = [
161-
str(item["observation_summary"]) for item in (measured or items)[:3]
162-
]
158+
observations = [str(item["observation_summary"]) for item in (measured or items)[:3]]
163159
summary_cases[case_id] = {
164160
"mode": str(items[-1]["mode"]),
165161
"runs": len(measured),
166162
"warmups": len(items) - len(measured),
167163
"result_flags": dict(result_flags),
168-
"median_total_latency_s": (
169-
statistics.median(latencies) if latencies else None
170-
),
164+
"median_total_latency_s": (statistics.median(latencies) if latencies else None),
171165
"mean_total_latency_s": statistics.mean(latencies) if latencies else None,
172166
"median_first_token_latency_s": (
173-
statistics.median(first_token_latencies)
174-
if first_token_latencies
175-
else None
167+
statistics.median(first_token_latencies) if first_token_latencies else None
176168
),
177169
"observations": observations,
178170
}

AGENTS.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ When working on OpenAI API or OpenAI platform integrations in this repo (Respons
3434

3535
Before changing runtime code, exported APIs, external configuration, persisted schemas, wire protocols, or other user-facing behavior, use `$implementation-strategy` to decide the compatibility boundary and implementation shape. Judge breaking changes against the latest release tag, not unreleased branch-local churn. Interfaces introduced or changed after the latest release tag may be rewritten without compatibility shims unless they define a released or explicitly supported durable external state boundary, or the user explicitly asks for a migration path. Unreleased persisted formats on `main` may be renumbered or squashed before release when intermediate snapshots are intentionally unsupported.
3636

37+
#### `$pr-draft-summary`
38+
39+
When a task in this repo finishes with moderate-or-larger code changes, invoke `$pr-draft-summary` in the final handoff to generate the required PR summary block, branch suggestion, title, and draft description. Treat this as the default close-out step after runtime code, tests, examples, build/test configuration, or docs with behavior impact are changed.
40+
41+
Skip `$pr-draft-summary` only for trivial or conversation-only tasks, repo-meta/doc-only tasks without behavior impact, or when the user explicitly says not to include the PR draft block.
42+
3743
### ExecPlans
3844

3945
Call out compatibility risk early in your plan only when the change affects behavior shipped in the latest release tag or a released or explicitly supported durable external state boundary, and confirm the approach before implementing changes that could impact users.
@@ -109,7 +115,7 @@ The OpenAI Agents Python repository provides the Python Agents SDK, examples, an
109115
```
110116
6. When `$code-change-verification` applies, run it to execute the full verification stack before marking work complete.
111117
7. Commit with concise, imperative messages; keep commits small and focused, then open a pull request.
112-
8. When reporting code changes as complete (after substantial code work), invoke `$pr-draft-summary` to generate the required PR summary block with change summary, PR title, and draft description.
118+
8. When reporting code changes as complete (after substantial code work), invoke `$pr-draft-summary` as the final handoff step unless the task falls under the documented skip cases.
113119

114120
### Testing & Automated Checks
115121

0 commit comments

Comments
 (0)