fix: office-hours marks sessions "success" without writing design doc#1049
Open
walton-chris wants to merge 1 commit intogarrytan:mainfrom
Open
fix: office-hours marks sessions "success" without writing design doc#1049walton-chris wants to merge 1 commit intogarrytan:mainfrom
walton-chris wants to merge 1 commit intogarrytan:mainfrom
Conversation
The office-hours skill can complete the final telemetry block and log `outcome:success` even when Phase 5 (design doc write) was skipped — e.g., when a session ends early or the conversation pivots to implementation. The timeline shows `event:completed` with no corresponding `*-design-*.md` file on disk, silently losing the artifact that downstream skills (/plan-ceo-review, /plan-eng-review) depend on. Fix: add a "Pre-Telemetry: Verify Design Doc Artifact" section that runs before the preamble's telemetry block. It re-derives SLUG (since shell state doesn't persist between Bash tool calls), uses the preamble's `~/.gstack/sessions/$PPID` touch file as a session-start time reference, and looks for a fresh design doc written after that point. Emits `ARTIFACT_STATUS: ok` or `no_doc`. The Important Rules section now instructs Claude to use this result to drive OUTCOME — never log `success` when `no_doc`. Repro: observed in apex-coach session 2026-04-12 — timeline logged `duration_s:"0"`, `session:"unknown"`, `outcome:"success"`, but no design doc exists in ~/.gstack/projects/apex-coach/. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The office-hours skill can log
outcome:successin the timeline evenwhen Phase 5 (design doc write) was skipped. The session looks
complete in telemetry, but no
*-design-*.mdartifact exists on disk,silently breaking downstream skills (
/plan-ceo-review,/plan-eng-review) that read design docs from~/.gstack/projects/{slug}/.Repro
Observed in the wild on an apex-coach session (2026-04-12):
duration_s:"0"andsession:"unknown"are a separate shell-state bugaddressed in a companion PR. But the real issue here is
outcome:"success"logged against~/.gstack/projects/apex-coach/which contains zero
*-design-*.mdfiles. A session with nopersisted artifact is not a successful session.
Fix
Two changes to
office-hours/SKILL.md.tmpl:New section "Pre-Telemetry: Verify Design Doc Artifact" inserted
before the
{{LEARNINGS_LOG}}placeholder. It re-derivesSLUG,uses the preamble's
~/.gstack/sessions/\$PPIDtouch file as asession-start time reference, and finds any
*-design-*.mdwritten after that time. Emits
ARTIFACT_STATUS: okorno_doc.New rule in Important Rules instructing Claude to use the
artifact check to drive
OUTCOMEin the preamble's telemetryblock. Log
outcome:no_docwhen no doc was written, neveroutcome:success.Net diff: +56 lines, 0 deletions. Zero impact on sessions that
correctly write a doc.
Test plan
timeline logs `outcome:success` and artifact exists
logs `outcome:no_doc`
confirm the `-newer` check correctly distinguishes this session's
doc from prior ones
Generated with Claude Code