Repository navigation
Description
This was generated by AI during triage.
From the 2026-11-11 fleet retrospective across 140 Triage runs: 4 out of 4 questionnaire validation failures in production (tourbot#2141, tourbot#2142, orchestration#905, orchestration#908) failed with ready-for-agent recommendation must not include a questionnaire because Claude emitted "questionnaire": "" (an empty string) while following the single JSON example in skills/thirdshift-triage/SKILL.md (which shows "state": "needs-info" with a "questionnaire" field).
Agent Brief
Category: enhancement
Summary: Normalize empty or whitespace-only "questionnaire" strings to None in parse_recommendation and include a non-needs-info (ready-for-agent / ready-for-human) JSON example without questionnaire in skills/thirdshift-triage/SKILL.md, so Triage sessions do not burn an extra correction turn (#2019) over "questionnaire": "".
Current behavior:
RawRecommendation.questionnairedeserializes"questionnaire": ""asSome(""), andparse_recommendationrejects any non-needs-infostate wherequestionnaireisSome(_), even when the string is empty or whitespace-only. With A Triage run discards its whole analysis over a questionnaire or field-shape mismatch #2019, that triggers an extra full Harness correction turn solely to delete"questionnaire": "".skills/thirdshift-triage/SKILL.mdshows only one JSON fence example ("state": "needs-info", which includes"questionnaire"), encouraging models that treat examples as fixed schemas to emit"questionnaire": ""onready-for-agentandready-for-humanrecommendations.
Desired behavior:
- During recommendation parsing (
parse_recommendation), treat an empty or whitespace-onlyquestionnairestring (""/" ") the same as an omitted ornullquestionnaire(None) before state-specific validation:- For
ready-for-agent,ready-for-human, andwontfix,"questionnaire": ""(or whitespace-only) succeeds cleanly asNonewithout needing a correction turn, while a non-empty"questionnaire"on those states continues to be rejected as invalid. - For
needs-info,"questionnaire": ""(or whitespace-only) continues to be rejected becauseneeds-inforequires non-empty questions.
- For
skills/thirdshift-triage/SKILL.mdincludes a concise second JSON example (or clear side-by-side illustration) forready-for-agent/ready-for-humanomittingquestionnaire, reinforcing thatquestionnaireis present only when"state"is"needs-info".- Regenerate
site/prompts/index.html(UPDATE_PROMPTS=1 cargo test prompts_page) so the embeddedthirdshift-triageskill on the prompts page stays in sync.
Key interfaces:
parse_recommendation/RawRecommendationin thetriagemodule.skills/thirdshift-triage/SKILL.mdJSON output specification andprompts_pageverification.
Acceptance criteria:
-
parse_recommendationaccepts"state": "ready-for-agent"(and"ready-for-human"/"wontfix") with"questionnaire": ""or"questionnaire": " "without error or correction turn. -
parse_recommendationstill rejects non-empty"questionnaire"onready-for-agent/ready-for-human/wontfix, and still rejects empty/whitespace"questionnaire"onneeds-info. -
skills/thirdshift-triage/SKILL.mdshowsready-for-agent(or non-needs-info) JSON withoutquestionnaire, andcargo test prompts_pagepasses.
Out of scope:
- Changing the correction-turn retry mechanism introduced by A Triage run discards its whole analysis over a questionnaire or field-shape mismatch #2019.
- Changing
security-findingcategory handling (A Triage of an existing Security finding fails: security-finding is rejected as its category #2018).
Activity
Simplify the Triage questionnaire check and name Fleet's text report …