Repository navigation
v1.93.6.0 feat: /plan-tune learns from ad-hoc question ids that carry a signal hint (#3442) - #3868
Merged
Merged
Conversation
…mension (#3442) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…n reference (#3442) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
gstack: ok 1.92.79.0 for=ship Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…ARNESS_VERSION 6) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
3 tasks done
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.
What changed
/plan-tune now learns from answers to ad-hoc question ids that carry a signal hint (#3442). A skill that asks a question with no registry entry can name the preference it is about:
<gstack-qid:{id};signal={key}>in the question, and"signal_key":"<key>"in thegstack-question-logrow. The key comes from the fixed list thatgstack-question-preference --signal-keysprints.--deriveuses a hint only when the id has no registry entry, the key is a known signal, and the answer matches one of that signal's option keys. The match uses the exact key or the key's own words, never the broader label cues. Hinted answers fall under the same per-day cap as registered ones.hinted_events, and--tracemarks hinted rows(hinted).scripts/qid-marker.ts) now serves the log hook, the preference hook and the Codex session import. An unknown hint, or a hint on a registered id, is dropped withQLOG_SIGNAL_KEY_DROPPED, and the row is still logged.docs/designs/PLAN_TUNING_V0.mddocuments the hint.Proof
failing-first.log: 133 pass, 10 fail).plan-tune-inspect: 3 of 3 trials passed for $0.39, run locally. The broad PR selection (42 shards) was cancelled before any case finished; the train gate's census covers it.test/helpers/pty/boundaries.ts. That is fixed in 1ff3146, which records a non-behavioral decision: only questions carrying the new suffix can change a verdict, and the cases that ask them own their regenerated SKILL.md.Security read
Nothing here makes a network call, reads environment variables or secrets, widens permissions, or adds a dependency. Nothing touches
.github/workflowsor any setup, install or upgrade script. A hint is untrusted agent text, so the log validates it against SIGNAL_MAP, the profile re-checks it withObject.hasOwn, registered ids ignore it, and machine-chosen answers never carry one.Review notes
These are below the blocking floor. They are recorded here and in TODOS.md, and not fixed in this PR:
QID_MARKER_RE(scripts/qid-marker.ts:10) drops the whole marker when the;signal=tail is malformed (an underscore, a space or an empty key), so a typo costs the question id as well as the hint.question-preference-hook.ts:406), while the log hook lowercases it, so a never-ask preference on an uppercase marker id never matches.(hinted)traces bound that. Whether hinted rows should carry less weight is a product call; D3 in the plan says full weight.question-preference-hook.ts:54).test/helpers/pty/boundaries.ts, four specialized plan-eng-review predicates still compare the raw qid, and no unit test covers the widened regex.Documentation
Status: updated: one factual edit to the plan-tune design reference; no blockers.
Scope. Commit 075c6ba against base 322906a (66 files: signal hints for unregistered /plan-tune question ids in
bin/gstack-question-log,bin/gstack-question-preference --signal-keys,bin/gstack-developer-profile,bin/gstack-codex-session-import, the Claude question hooks, newscripts/qid-marker.ts,scripts/psychographic-signals.ts, the question-tuning resolver and regenerated SKILL.md outputs), plus the unstagedTODOS.mdedit and the newchangelog.d/garrytan-gsta216-l5-signal-hints.mdfragment. Discovery covered the tracked and untracked doc inventory; read in full:docs/designs/PLAN_TUNING_V0.md,plan-tune/SKILL.md.tmpl, the changelog fragment,AGENTS.md. Scanned by grep for the changed surface: README.md, CLAUDE.md, CONTRIBUTING.md, ARCHITECTURE.md, docs/PROJECT_STRUCTURE.md, docs/troubleshooting.md, docs/gbrain-sync.md, docs/spikes/codex-session-format.md, docs/designs/PLAN_TUNING_V1.md and the authored skill templates and sections. Banned terms: none configured.Coverage debt.
QLOG_SIGNAL_KEY_DROPPEDhas nodocs/troubleshooting.mdentry explaining the dropped hint and the--signal-keysfix.hinted_events, so users cannot see from the skill how much of the observed profile came from hints.docs/troubleshooting.md#plan-tune-not-calibratedstill advises answering more registered questions; hinted answers to unregistered ids now count too./document-generatefor a short how-to on choosing a signal key for an ad-hoc question.Diagram drift: none. The PLAN_TUNING_V0 architecture tree lists unchanged files.
Summary
Answers to ad-hoc /plan-tune questions now count toward your profile when the skill names the preference the question is about, using a fixed key list and the existing per-day cap.
Why
#3442: most logged answers are on ad-hoc question ids with no registry entry, so they moved no dimension and inferred values sat near 0.5 for months. /plan-tune's auto-decide and its declared-versus-observed view both depend on that observed evidence.
Blast radius
Four bins, the two Claude question hooks, the question-tuning resolver and its regenerated SKILL.md files, a new parser module, one design doc, and tests. Registered ids behave exactly as before, and an answer with no hint moves nothing it didn't move before. The
signal_keyrow field andhinted_eventsare additive.Pre-Landing Review
REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=6 fixed=0 scope=frozen fix_checks=1
Pass 1 ran the full panel: specialist, red team, adversarial, a GPT-6.1 Sol outside voice and the targeted auth reader. Nothing reached the blocking floor. The round-2 fix-check read the HARNESS_VERSION fix and found two informational notes.
Issues
Fixes #3442