docs(rfc): session tag-change event surface (#7663) - #7966
Conversation
Opus 4.8 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
Design Review (Fable 5) — 🟡 CONCERNSDesign-level review of Citations verified. The RFC's structure is sound; the one weak leg is the re-entrancy design it claims to settle. Design-Verdict: CONCERNS The re-entrancy question the RFC claims "settled now" isn't settleable as written: hook-write attribution has no mechanism, and advisory-only leaves loops unbounded. Watch
Suggestions
[DESIGN-REVIEWED] a75d4af |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsFINDING -- docs/request-for-change/rfc-session-tag-change-event.md:323 -- False positive or not applicable? A repository writer can comment: |
buluoray
left a comment
There was a problem hiding this comment.
Reviewed at head a75d4afb84df6d56143cc5a679d0f0a86a54bca6. Docs-only RFC (2 files: the new rfc-session-tag-change-event.md and its README index row). Verdict: approve.
Blocking: 0.
I spot-checked the load-bearing claims about existing code against source at the audited commit 6581a04ee, and they hold:
HOOK_EVENTScarries exactly the five turn-lifecycle events (hooks.py:93-99, constants above), matched byALLOWED_HOOK_EVENTS(validation.py:92-94);SessionTagsChangedhas zero hits tree-wide.- The two named write sites and their
push_slots_update()tails are accurate:api_chat_slot_tagswritesslot.tags(chat_tags.py:562) andapi_chat_slot_dropwriteswritten_tagsafter thestatus-filteredkeptsplit (chat_tags.py:980-983); nothing server-side consumes the transition. - The
chat_auto_tagnever-status guard is where claimed (chat_auto_tag.py:102-108), and theevents/package exists (base.py,kinds.py,backfill.py) with thesession/messagekind (events/kinds.py:40). - The
Stopadvisory-provenance precedent is quoted verbatim and correctly located (hooks.py:4213-4221).
Filing is correct per the Specification-management rules: the README index row is added with a verified against 6581a04ee note, so docs-lint.sh is satisfied. It contradicts no shipped spec under docs/system-specs/modules/ — it is additive design-of-record and states plainly that nothing is on main.
Non-blocking (1): Question 4 ("Re-entrancy settled now") asserts an origin=hook / hook_reentry_depth design but specifies no mechanism by which the server attributes a slot.tags write to a running hook — hooks are external fire-and-forget scripts that react through the same public tags API a user calls, so without a correlation signal (token/header/loop-local context) every hook-driven write would stamp origin=user at depth 0, making Phase 2's exit criteria unmeetable. This is a design-completeness gap in the proposal, not an inaccuracy about current code; naming the correlation mechanism (or moving it to Open questions) would make Question 4 genuinely "settled." The advisory Design Review lane raises the same point independently.
Could not verify with certainty: whether the events/ package has zero live emitters (I confirmed the package and its kinds exist and that SessionTagsChanged is absent, but did not exhaustively trace every from kiro_crew.events edge to prove none emits — the RFC only leans on this for its Option B alternative, not its recommendation).
Open PR relationship auditThis is a consolidated, point-in-time code-level audit note. It compares complete merge-base diffs and current/merged code; it does not treat a shared topic as duplication or partial coverage as completion. Relationship findings
No PR, Issue, label, branch, or review state was changed by the relationship-note portion of this audit. |
Summary
Adds an RFC for the session tag-change event surface requested in #7663: a fire-and-forget server-side event fired when a session's status tags change, so an automation can react to a lane transition (motivating case: a close-out prompt when a session enters Done).
Per
GOVERNANCE.md, a new public event interface that other automations subscribe to and that is "expensive to reverse once anything subscribes" must be written up as an RFC before code. This PR is the design of record only. No implementation code is landed (SessionTagsChangedhas zero hits insrc/;HOOK_EVENTSandALLOWED_HOOK_EVENTSstill carry exactly the five turn-lifecycle events).What is in this PR
docs/request-for-change/rfc-session-tag-change-event.md(following the repo RFC schema and aligned with the neighboringrfc-mcp-lifecycle-event-log.md)docs/request-for-change/README.md(onedraftindex row + a matching audit-preamble note)Positions taken on the four design questions + placement
added/removed) plus the resultingstatus_tagslist plussession_key, so consumers need no prior-state file.status: true); routine non-status auto-tags do not fire.origin,hook_reentry_depth), settled now per theStopprecedent (hooks.py:4213-4221) rather than an enforced cap.HOOK_EVENTSentry (run-now automation is the script-hook engine's job), over anevents/session kind, justified againstGOVERNANCE.mdand the PR feat(hooks): Add regex/contains matcher modes and declarative skills injection #3952 precedent.Scope correction over the issue
The issue names two tag writers; the RFC enumerates the full status-tag write surface as a table, including the folder-inheritance path via
validate_folder_tag_ids(which screens shape/vocabulary but notstatus:true, so an inherited folder status tag can move a session into a lane without either named handler running) and the channel-filing appends. Load-time reconstruction sites stay silent; fork emission is left as an explicit open question. It recommends a single choke-point emitter so no write site can silently skip the event.Testing
Docs-only change; no build/test/docker applies. Every
file:linecitation in the RFC was verified against the current tree HEAD6581a04ee(the issue's2ba6fb53enumbers had drifted and were not copied). A semantic review of the RFC returned APPROVED with no blocking issues.Notes for reviewers
authoris a placeholder(issue #7663 author)anddoc-pr: nullshould be set to this PR number once it lands.events/-package alignment) are called out in the RFC and are the reversible-once-subscribed decisions to settle before any implementation PR.Closes #7663 is intentionally NOT set: this RFC does not implement the event; implementation PRs will reference it by number per
GOVERNANCE.md.