Skip to content

v1.93.6.0 feat: /plan-tune learns from ad-hoc question ids that carry a signal hint (#3442) - #3868

Merged
capy-ai[bot] merged 5 commits into
mainfrom
garrytan/gsta216-l5-signal-hints
Nov 2, 2026
Merged

capy-ai[bot] merged 5 commits into
mainfrom
garrytan/gsta216-l5-signal-hints

Conversation

@garrytan

@garrytan garrytan commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 3868,
  "head": "1ff314616d04e410a629212be78cd48d55c90db9",
  "version": "1.92.79.0",
  "base": "main",
  "gate": {
    "focused": {
      "pass": 1282,
      "fail": 0,
      "skip": 0
    }
  },
  "session_kind": "unattended",
  "head_tree": "fdab20de15390115879455db47db25054303bb8f",
  "product_patch_id": "f54f0f7986f9fa8471714e4f80dd4e5a1714bb83",
  "gstack_version": "1.92.79.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 153,
    "rules": "b2272efd321ce7cb",
    "base": "322906ab2b0975c6b009ae4a2804259be9e8ed70",
    "registry": "322906ab2b0975c6b009ae4a2804259be9e8ed70",
    "gate_scan": {
      "tagged": 0,
      "head": "1ff314616d04e410a629212be78cd48d55c90db9"
    },
    "reasons": [
      "gate-class",
      "risk:auth",
      "runtime=153"
    ],
    "risk": [
      "auth"
    ]
  },
  "pregate": "requires-remote cleared @fdab20de1539 (1 checks, current for 1ff314616d04)",
  "requires_remote": [
    "free-tests.yml/cso-macos-launcher: https://github.com/garrytan/gstack/actions/runs/41456794297/attempts/1",
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/41456794297/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/41456794257/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=fdab20de1539 tests=20216"
  ],
  "issues": {
    "fixes": [
      3442
    ],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "updated",
    "scope": "AGENTS.md, CLAUDE.md, README.md, CONTRIBUTING.md, docs/, plan-tune/ template and the question-tuning resolver; changelog.d fragment reviewed"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 6,
    "fixed": 0,
    "scope": "frozen",
    "fix_checks": 1,
    "rounds": 2,
    "ledgers_read": 3,
    "dispatches": {
      "specialist": 3
    }
  },
  "review_targeted": {
    "classes": [
      "auth"
    ],
    "rules": "c82addff6fb60fa0",
    "brief_sha": "7f92a0d0a8319c3c0e076fb3b1a4689c45120b2be2c14dfc7d4cb03aafa9d6a5",
    "product_patch_id": "f54f0f7986f9fa8471714e4f80dd4e5a1714bb83",
    "status": "done",
    "findings": 0,
    "raised_by": "targeted"
  }
}

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 the gstack-question-log row. The key comes from the fixed list that gstack-question-preference --signal-keys prints.

  • --derive uses 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.
  • The profile gains hinted_events, and --trace marks hinted rows (hinted).
  • One marker parser (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 with QLOG_SIGNAL_KEY_DROPPED, and the row is still logged.
  • A hint never changes auto-decide or one-way-door handling.
  • The question-tuning resolver tells skills when to add the hint, and every generated SKILL.md is regenerated. docs/designs/PLAN_TUNING_V0.md documents the hint.

Proof

  • Failing first on main at 322906a: 10 new plan-tune: {skill}-{slug} question ids never reach a signal (Gate 1 of #2623) #3442 tests fail there and pass here (failing-first.log: 133 pass, 10 fail).
  • Focused lane: 1,282 pass, 0 fail across 19 files. Guard lane (parity, skill size, gen-skill-docs, host config, bun entry isolation, spawnSync tripwire, module size, harness version): 635 pass, 0 fail. Typecheck is clean, and the test-type ratchet reports no new diagnostics.
  • Remote pregate (Ubicloud): tree fdab20d, 20,216 tests, 0 failed, $0.07, VM destroyed. The macOS and Windows lanes were cleared with this PR's CI runs.
  • Paid probe 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.
  • CI at cb1c2cc failed only on the HARNESS_VERSION guard for 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/workflows or 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 with Object.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.
  • The preference hook still looks up the raw marker id (question-preference-hook.ts:406), while the log hook lowercases it, so a never-ask preference on an uppercase marker id never matches.
  • The agent's marker now picks which dimension an unregistered answer moves. The closed key list, the per-day cap and (hinted) traces bound that. Whether hinted rows should carry less weight is a product call; D3 in the plan says full weight.
  • No test covers the PreToolUse gate with a hinted marker (question-preference-hook.ts:54).
  • In 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, new scripts/qid-marker.ts, scripts/psychographic-signals.ts, the question-tuning resolver and regenerated SKILL.md outputs), plus the unstaged TODOS.md edit and the new changelog.d/garrytan-gsta216-l5-signal-hints.md fragment. 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.

Documentation health:
  docs/designs/PLAN_TUNING_V0.md  Updated (added hinted_events to the example profile; documented the ;signal= hint, when derive uses it, hinted_events and (hinted) trace rows)
  plan-tune/SKILL.md.tmpl         Current
  docs/troubleshooting.md         Current (calibration fix text incomplete; see debt)
  README.md                       Current
  AGENTS.md                       Current
  CLAUDE.md                       Current
  CONTRIBUTING.md                 Current
  ARCHITECTURE.md                 Current
  CHANGELOG.md                    Skipped (parent-owned; fragment in changelog.d/ reviewed, untouched)
  TODOS.md                        Skipped (parent-owned; unstaged edit untouched)

Coverage debt.

Documentation coverage:
  [entity]                              [reference] [how-to] [tutorial] [explanation]
  <gstack-qid:{id};signal={key}> hint   ✅          ✅       ❌         ✅ PLAN_TUNING_V0
  gstack-question-preference --signal-keys ✅       ✅       ❌         ❌
  hinted_events / (hinted) trace rows   ✅          ❌       ❌         ✅ PLAN_TUNING_V0
  QLOG_SIGNAL_KEY_DROPPED               ❌          ❌       ❌         ❌
  scripts/qid-marker.ts                 ✅ (code)   ❌       ❌         ❌
  • Critical gap: QLOG_SIGNAL_KEY_DROPPED has no docs/troubleshooting.md entry explaining the dropped hint and the --signal-keys fix.
  • Common gap: /plan-tune's Inspect profile step does not surface hinted_events, so users cannot see from the skill how much of the observed profile came from hints.
  • docs/troubleshooting.md#plan-tune-not-calibrated still advises answering more registered questions; hinted answers to unregistered ids now count too.
  • Consider /document-generate for 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_key row field and hinted_events are 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

garrytan and others added 3 commits November 2, 2026 13:18
…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>
@trunk-io

trunk-io Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 2 commits November 2, 2026 13:43
…ARNESS_VERSION 6)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@github-actions github-actions Bot changed the title v1.92.79.0 feat: /plan-tune learns from ad-hoc question ids that carry a signal hint (#3442) v1.93.6.0 feat: /plan-tune learns from ad-hoc question ids that carry a signal hint (#3442) Nov 2, 2026
@capy-ai
capy-ai Bot merged commit 5209e92 into main Nov 2, 2026
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

plan-tune: {skill}-{slug} question ids never reach a signal (Gate 1 of #2623)

1 participant