Skip to content

Commit 99481e8

Browse files
committed
Bump Codex package to 0.4.5
1 parent ddb184c commit 99481e8

5 files changed

Lines changed: 173 additions & 6 deletions

File tree

.agents/skills/bug-report/SKILL.md

Lines changed: 68 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,47 @@ Produce a verification verdict:
100100
- **STILL PRESENT** — bug reproduces as described; fix did not resolve the issue
101101
- **CANNOT VERIFY** — automated checks inconclusive; manual playtest required
102102

103-
Ask: "May I update `production/qa/bugs/[BUG-ID].md` to set Status: Verified Fixed / Still Present / Cannot Verify?"
103+
If the verdict is **VERIFIED FIXED**, treat verification, closure, stale triage
104+
metadata cleanup, and session-state routing as one deterministic bug lifecycle
105+
operation when the facts are unambiguous.
106+
107+
Before writing, present the verification evidence and ask once for the full
108+
changeset:
109+
110+
> "May I update these files to mark [BUG-ID] Verified Fixed, add verification
111+
> evidence, close the bug, refresh stale triage metadata when safe, and update
112+
> the derived checkpoint in `production/session-state/active.md`?
113+
> Files: `production/qa/bugs/[BUG-ID].md`, [any affected
114+
> `production/qa/bug-triage-*.md` files], `production/session-state/active.md`."
115+
116+
Do not stop after VERIFIED FIXED to offer `$bug-report close [BUG-ID]` as the
117+
next action when closure facts are deterministic. Do not ask a separate "May I
118+
write?" for `production/session-state/active.md` when the update is only a
119+
derived checkpoint for completed bug lifecycle work. Do not ask a separate "May
120+
I write?" for this file.
121+
122+
Bundle only deterministic metadata cleanup:
123+
- Set top-level `**Status**: Verified Fixed`.
124+
- Add or update verification evidence with the command(s), grep checks, commit
125+
or file evidence, and verifier.
126+
- Append the Closure Record from Phase 2D and set top-level `**Status**: Closed`
127+
when the closure record can be completed from known facts.
128+
- Refresh affected `production/qa/bug-triage-*.md` reports only when the refresh
129+
removes closed bugs, updates open/closed counts, clears a stale recommended
130+
action, or records "0 open bugs" without assigning priorities or changing
131+
sprint scope.
132+
- Update `production/session-state/active.md` only with derived checkpoint
133+
routing: completed bug lifecycle work, files touched, owed verification, and
134+
the next valid Session Worklist lane.
135+
136+
Do not bundle and stop for user decision if triage would require assigning
137+
priorities, choosing sprint scope, marking bugs Won't Fix, changing severity, or
138+
resolving conflicting bug states.
139+
140+
If the verdict is **STILL PRESENT** or **CANNOT VERIFY**, ask:
141+
142+
> "May I update `production/qa/bugs/[BUG-ID].md` to set Status: Still Present /
143+
> Cannot Verify and add the verification evidence?"
104144
105145
If STILL PRESENT: reopen the bug, set Status back to Open, and suggest re-running `$hotfix [BUG-ID]`.
106146

@@ -125,9 +165,29 @@ Append a closure record to the bug file:
125165

126166
Update the top-level `**Status**: Open` field to `**Status**: Closed`.
127167

128-
Ask: "May I update `production/qa/bugs/[BUG-ID].md` to mark it Closed?"
168+
If the bug is already `Verified Fixed`, close the bug and refresh stale triage
169+
metadata under the same approval when the refresh is safe deterministic cleanup.
170+
Before writing, list the exact files and ask once:
129171

130-
After closing, check `production/qa/bug-triage-*.md` — if the bug appears in an open triage report, note: "Bug [ID] is referenced in the triage report. Run `$bug-triage` to refresh the open bug count."
172+
> "May I update these files to close [BUG-ID], refresh stale triage metadata
173+
> when safe, and update the derived checkpoint in
174+
> `production/session-state/active.md`?
175+
> Files: `production/qa/bugs/[BUG-ID].md`, [any affected
176+
> `production/qa/bug-triage-*.md` files], `production/session-state/active.md`."
177+
178+
Do not ask a separate "May I write?" for `production/session-state/active.md`
179+
when the update is only a derived checkpoint for completed bug lifecycle work.
180+
Do not ask a separate "May I write?" for this file.
181+
182+
Safe stale triage metadata refresh includes removing the closed bug from open
183+
bug tables, updating open/closed counts, clearing stale "fix this bug" actions,
184+
and recording a zero-open-bugs refresh. It must not assign priorities, choose
185+
sprint scope, mark bugs Won't Fix, change severity, or resolve conflicting bug
186+
states.
187+
188+
If stale triage metadata exists but is unsafe to refresh automatically, close
189+
the bug and mark triage cleanup as non-blocking owed follow-up instead of
190+
blocking closure.
131191

132192
---
133193

@@ -156,8 +216,11 @@ After saving, suggest based on mode:
156216
- Never mark a bug closed without verification — a fix that doesn't verify is still Open
157217

158218
**After verify returns VERIFIED FIXED:**
159-
- Run `$bug-report close [BUG-ID]` — write the closure record and update status
160-
- Run `$bug-triage` to refresh the open bug count and remove it from the active list
219+
- When closure facts are deterministic, complete verification, closure, stale
220+
triage metadata cleanup, and derived session-state routing under the same
221+
approved changeset.
222+
- If closure or triage refresh requires a manual decision, stop at the decision
223+
point and make the blocked item explicit.
161224

162225
## Ported metadata
163226

.agents/skills/bug-triage/SKILL.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ ensures no critical bug is lost between sprints.
1616
- Sprint start — assign open bugs to the new sprint or backlog
1717
- After `$team-qa` completes and new bugs have been filed
1818
- When the bug count crosses 10+ open items
19+
- As bundled metadata cleanup after `$bug-report verify [BUG-ID]` or
20+
`$bug-report close [BUG-ID]` closes a bug and stale triage report fields can
21+
be refreshed without new prioritization decisions
1922

2023
---
2124

@@ -46,6 +49,13 @@ If no bug files found:
4649
4750
Stop and report. Do not proceed if no bugs exist.
4851

52+
If this run is a zero-open-bugs closure refresh started from an approved
53+
`$bug-report verify [BUG-ID]` or `$bug-report close [BUG-ID]` lifecycle, do not
54+
stop for a separate triage decision. Treat it as metadata cleanup: update the
55+
affected stale triage report so the open bug count, priority tables, and
56+
recommended action reflect that no bugs remain open. Mark any broader trend or
57+
sprint-priority work as non-blocking follow-up.
58+
4959
### Step 2b — Load sprint context
5060

5161
Read the most recently modified file in `production/sprints/` to understand:
@@ -217,6 +227,19 @@ Present the report in conversation, then ask:
217227

218228
Write only after approval.
219229

230+
Exception for bundled bug lifecycle cleanup: when `$bug-report verify [BUG-ID]`
231+
or `$bug-report close [BUG-ID]` already obtained approval for the full
232+
changeset, do not ask a second triage write prompt for deterministic metadata
233+
cleanup. The approval must have listed the exact stale
234+
`production/qa/bug-triage-*.md` file(s) being updated.
235+
236+
Bundled triage cleanup is allowed only when it removes closed bugs from open
237+
tables, updates counts, clears stale recommended actions, or records a
238+
zero-open-bugs closure refresh. It must be explicitly marked non-blocking if it
239+
cannot be completed safely. Do not bundle if the triage work would require
240+
assigning priorities, choosing sprint scope, marking bugs Won't Fix, changing
241+
severity, or resolving conflicting bug states.
242+
220243
After writing:
221244
- If any S1 bugs are unassigned: "S1 bugs must be assigned before the sprint
222245
can be considered healthy. Run `$sprint-status` to see current capacity."

.codex/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.4.4
1+
0.4.5

.codex/lib/validate_runtime.py

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,46 @@
255255
),
256256
}
257257

258+
BUG_LIFECYCLE_REQUIRED_PHRASES = {
259+
".agents/skills/bug-report/SKILL.md": (
260+
"treat verification, closure, stale triage",
261+
"one deterministic bug lifecycle operation",
262+
"Do not stop after VERIFIED FIXED to offer `$bug-report close [BUG-ID]` as the",
263+
"refresh stale triage metadata under the same approval",
264+
"zero-open-bugs refresh",
265+
"derived checkpoint",
266+
'Do not ask a separate "May I write?" for `production/session-state/active.md`',
267+
"Do not bundle and stop for user decision if triage would require assigning",
268+
),
269+
".agents/skills/bug-triage/SKILL.md": (
270+
"zero-open-bugs closure refresh",
271+
"Treat it as metadata cleanup",
272+
"non-blocking follow-up",
273+
"Exception for bundled bug lifecycle cleanup",
274+
"deterministic metadata cleanup",
275+
"It must be explicitly marked non-blocking if it cannot be completed safely",
276+
"Do not bundle if the triage work would require assigning priorities",
277+
),
278+
}
279+
280+
BUG_LIFECYCLE_FORBIDDEN_PHRASES = (
281+
(
282+
".agents/skills/bug-report/SKILL.md",
283+
'Bug [ID] is referenced in the triage report. Run `$bug-triage` to refresh the open bug count.',
284+
"bug close still defers deterministic triage refresh to a separate prompt",
285+
),
286+
(
287+
".agents/skills/bug-report/SKILL.md",
288+
"Run `$bug-report close [BUG-ID]` — write the closure record and update status",
289+
"verified-fixed still forces a separate close step",
290+
),
291+
(
292+
".agents/skills/bug-report/SKILL.md",
293+
"Run `$bug-triage` to refresh the open bug count and remove it from the active list",
294+
"verified-fixed still forces a separate triage cleanup step",
295+
),
296+
)
297+
258298
INTERNAL_READONLY_CLOSEOUT_PATTERNS = (
259299
(re.compile(r"\bself[- ]check\b", re.IGNORECASE), "Self-Check"),
260300
(re.compile(r"\bregistry (?:candidate )?scan\b", re.IGNORECASE), "registry scan"),
@@ -472,6 +512,33 @@ def validate_playtest_focus_contract(root: Path) -> list[str]:
472512
return errors
473513

474514

515+
def contains_phrase(text: str, phrase: str) -> bool:
516+
normalized_text = re.sub(r"\s+", " ", text)
517+
normalized_phrase = re.sub(r"\s+", " ", phrase)
518+
return normalized_phrase in normalized_text
519+
520+
521+
def validate_bug_lifecycle_contract(root: Path) -> list[str]:
522+
errors: list[str] = []
523+
for rel, required_phrases in BUG_LIFECYCLE_REQUIRED_PHRASES.items():
524+
path = root / rel
525+
if not path.exists():
526+
errors.append(f"{rel}: missing bug lifecycle contract surface")
527+
continue
528+
text = path.read_text(encoding="utf-8")
529+
missing = [phrase for phrase in required_phrases if not contains_phrase(text, phrase)]
530+
if missing:
531+
errors.append(f"{rel}: missing bug lifecycle contract phrase(s): {', '.join(missing)}")
532+
533+
for rel, phrase, message in BUG_LIFECYCLE_FORBIDDEN_PHRASES:
534+
path = root / rel
535+
if not path.exists():
536+
continue
537+
if phrase in path.read_text(encoding="utf-8"):
538+
errors.append(f"{rel}: {message}")
539+
return errors
540+
541+
475542
def validate_active_state_checkpoint_text(rel: Path, text: str, exempt: bool = False) -> list[str]:
476543
if exempt or ACTIVE_STATE_PATH not in text:
477544
return []
@@ -525,6 +592,7 @@ def validate_skills(root: Path, require_present: bool = False) -> list[str]:
525592
unexpected = sorted(skill_names - REQUIRED_CORE_SKILLS - ALLOWED_PROJECT_LOCAL_SKILLS)
526593
if unexpected:
527594
errors.append(f".agents/skills: unexpected project-local skills: {', '.join(unexpected)}")
595+
errors.extend(validate_bug_lifecycle_contract(root))
528596

529597
for skill_file in skill_files:
530598
rel = skill_file.relative_to(root)

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## v0.4.5 - 2026-07-09
4+
5+
- Updated `$bug-report verify` so a VERIFIED FIXED result can complete
6+
verification evidence, closure, safe stale triage cleanup, and derived
7+
session-state routing under one approved changeset.
8+
- Updated `$bug-report close` so already verified bugs can close and refresh
9+
stale triage metadata without handing the user a separate bookkeeping prompt.
10+
- Clarified `$bug-triage` zero-open-bugs closure refreshes as deterministic
11+
metadata cleanup when they do not require priority, sprint-scope, severity, or
12+
Won't Fix decisions.
13+
- Added runtime validation to keep the bug lifecycle contract from regressing
14+
back into forced verify -> close -> triage handoffs.
15+
316
## Unreleased
417

518
- Nothing yet.

0 commit comments

Comments
 (0)