Skip to content

feat: list the steering files each chat receives under Context breakdown - #33600

Merged
RohanK6 merged 1 commit into
mainfrom
crew/conductor/chat-steering-p1
Nov 9, 2026
Merged

RohanK6 merged 1 commit into
mainfrom
crew/conductor/chat-steering-p1

Conversation

@RohanK6

@RohanK6 RohanK6 commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: A person can see, on a chat's Context breakdown tab, which steering files reach that chat and why any one does not.

Implements P1 of the accepted RFC (#33133). Today the Context breakdown shows one steering token total and nothing more. A person cannot tell which of their global, project or folder steering files the agent actually got, and on several harnesses the global and project trees do not reach the model at all (#29940, #30158).

Why it matters

Steering is how a person tells the agent their rules. When a file silently does not reach a chat, the agent ignores those rules and nothing on screen says why. derreckFromSlalom (#29940), gwatsonk (#30158) and calebpollman (#31952) all hit this.

Not a goal

What changed (motivation → approach → change)

  • Gap: no surface lists the steering files of one chat → the verdict has to come from what context assembly actually sends, or the list would lie → one plan, src/kiro_crew/steering_plan.py, applies the harness gates and, where Crew writes the text, reads the writer itself: the Claude Code load now has one reader, steering_resource_documents (context_assembly/agent_spec.py), whose list _load_steering_resources joins, and folder rows come from the bounded folder section rendered at the turn's cap.
  • GET /api/chat/slots/{slot}/steering (src/kiro_crew/dashboard/handlers/chat_steering.py) answers it, owner-gated like the other slot routes, and is registered as a redaction sink (security_posture_sinks_gateway.py): its display paths go through the Steering tab's _redact_meta. A cold chat's harness label comes from a new provider_label_for_backend in agent_sdk/drivers/acp.py, so the route does not import the ACP layer.
  • website/src/pages/ChatSteeringList.tsx renders "Steering in this chat" under the Context breakdown tab: name, source, when it applies, and whether it reaches this chat with the reason when not. Strings in all 12 locales.
  • Docs: docs/architecture/context-management.md names the plan; docs/feature-map/README.md row; the RFC moves to partial with this PR in implementation-prs, and its reaches vocabulary gains briefing (a member chat's essentials path decides per guide).

Backwards compatibility

Compatible: a new read-only route and a new list; no existing route, key or behaviour changes.

Removes nothing: the diff only adds a route, a module, a component and catalog keys.

Tests

  • test/test_chat_steering_plan.py (21): each gate's verdict, the kiro-cli agent-resources case, a project agent spec that kiro-cli serves instead, Codex global files, owner gating, a channel-linked chat listing its own project, a Claude Code project link the Steering tab does not read, a project AGENTS.md the load reads, a folder document the section cap leaves out, and a parity test that pins the Claude Code verdicts to what _load_steering_resources really sends. They fail on main: the route and module do not exist there.
  • test/test_security_posture.py: the new route is a registered redaction sink, and _redact_meta counts as both scanners.
  • website/src/test/ChatSteeringList.test.tsx (4): the list renders each verdict, the empty state, a labelled section with one list item per file, and a project change re-reads the list. Fails on main: the component does not exist there.
  • Proof: not provable -- other: new module and route; the tests import code main does not have.

Manual verification

Built the SPA from this branch and from main and opened a chat's Context tab against stubbed API answers (a two-turn context trace and three steering files), in en and de (screenshots below). Before: the breakdown alone. After: the same breakdown with "Steering in this chat" under it. zh-CN is checked by the i18n gates only: the capture host has no CJK font.

Screenshots / video

en de
before (main) before en before de
after after en after de

Related Issues

Part of #33112. Implements P1 of the accepted RFC (#33133). Credits #29940 (derreckFromSlalom), #30158 (gwatsonk), #31952 (calebpollman).

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributed under the project's Apache-2.0 license.

@RohanK6
RohanK6 requested review from a team and KiroCrewCaptain as code owners November 9, 2026 02:12
@RohanK6
RohanK6 requested a review from Zedmor November 9, 2026 02:12
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings (all downgraded on adjudication)

GPT 6.1 flagged blocking issues on 34333448b48626a1c02b71031d5dd6cae69edcb6; Opus 5.5 adjudication downgraded every one of them. Downgraded: the remedy each one needs is disproportionate to the harm it prevents. Adjudication downgraded all 1 blocking finding(s): the remedy each one requires is disproportionate to the harm it prevents.

This comment is updated in place on each push.

Review details

BLOCKING -- src/kiro_crew/dashboard/handlers/chat_steering.py:120 -- Body text can falsely mark an omitted guide as included

kept = is_member or f"# {scrub(path)}\n" in section
Trigger: A non-member chat inherits /standards; a.md starts with # /standards/b.md and exceeds the 3,300-character section cap. GET /api/chat/slots/{slot}/steering reaches _plan_blocking, where the substring check matches that heading inside a.md. The structural-marker scrub preserves it.
Outcome: The Context breakdown labels b.md “Included in this chat” although the bounded renderer omits its entire body.
Anchor: defect
Fix: Have the bounded renderer expose the document paths it admits, and derive membership from those paths rather than rendered body text.
Sites: none

[BLOCK-MERGE-DOWNGRADED] 3433344
[GPT-REVIEWED] 3433344

Adjudication (Opus 5.5) — is blocking on each finding proportionate?

F1: LOW harm. The defect is a wrong label in the read-only Context breakdown. Nothing is lost, corrupted or exposed, and the model's actual context is not changed. It needs all of these: a non-member chat (chat_steering.py:84,113-117); a section bounded by max_chars that actually cuts a document (folder_steering.py:872-876, admitted "in order while they fit"); and a guide body containing a line that is exactly # <another guide's scrubbed path>, which the substring check matches (chat_steering.py:120). Recovery: none. It is read-only display, and the label is recomputed on every GET, so it never persists.

The real fix is to change render_folder_steering's return contract, or add a parallel admitted-paths API, in the shared prompt renderer that the turn path uses. That puts a new seam on the hot context builder just to serve this display route. It is a cross-module change, which costs more than a rare, harmless mislabel is worth.

[ADJUDICATION] 34333448b48626a1c02b71031d5dd6cae69edcb6 total=1 uphold=0 downgrade=1
DOWNGRADE F1 src/kiro_crew/dashboard/handlers/chat_steering.py:120 reason=disproportionate-remedy
[GPT-ADJUDICATED] 34333448b48626a1c02b71031d5dd6cae69edcb6

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 34333448b48626a1c02b71031d5dd6cae69edcb6 false-positive: <reason, 20 to 500 characters>

@RohanK6
RohanK6 force-pushed the crew/conductor/chat-steering-p1 branch from 15afad1 to 524ff55 Compare November 9, 2026 02:14
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)

UX-level review of 34333448b48626a1c02b71031d5dd6cae69edcb6 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

cannot evaluate: missing screenshots of the new "Steering in this chat" list. The description's screenshot table shows "[image removed]" in all four cells, so no image was admitted and the blind read was not performed.

Evidence gaps

  • "Steering in this chat" section with files listed (ChatSteeringList.tsx): the heading, the intro line ("Steering files are rules the agent follows…"), and each file row (name, source · when it applies, whether it reaches this chat) have no screenshot. Fix: attach the en "after" capture as a github.com/user-attachments image.
  • "Not included" state in the warning colour (text-warn-text), with a reason such as reason_harness_has_no_path or reason_folder_cap: no screenshot. Fix: attach a capture with at least one file that does not reach the chat.
  • Empty state ("No steering files apply to this chat."): no screenshot. Fix: attach a capture.
  • Load error state (ErrorNotice with askAgent under the breakdown): no screenshot. Fix: attach a capture.
  • Longest-locale fit (de reason strings in the card rows): no screenshot. Fix: re-attach the de "after" capture.

Notes

  • The intro line partly says the same thing as the heading. Cut it to "Rules the agent follows in this chat."
  • Some reasons use words a first-time user won't know: "agent harness", "Kiro CLI default steering", "crewmate's briefing". Say what the user can do about each instead, e.g. "Not included: this chat's agent can't read global or project steering files."
  • Labels that sit side by side differ in style: one row starts with "Loaded by Kiro CLI…", the others with "Not included: …". Start all the positive rows with "Included: …" so they read the same way.

[UX-REVIEWED] 3433344

Description read

[DESCRIPTION-READ] 9de70a92cea3e4b086ae16727d19df96788c89121603ad819f681af72d7a717b

That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)

Design-level review of 34333448b48626a1c02b71031d5dd6cae69edcb6 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

cannot evaluate: missing a screenshot of the "Steering in this chat" list under Context breakdown. The description's four screenshot cells say "[image removed]", and the evidence list shows 0 images or recordings downloaded or committed.

Blockers

No rendered evidence for a new dashboard panel
Trigger: the diff adds a new visible section to the Context breakdown tab, "<ChatSteeringList slot={slot} revision={data?.revision} />" in website/src/pages/ContextBreakdownPanel.tsx. The new ChatSteeringList.tsx shows each file's name, source, when it applies, whether it reaches this chat, and the reason when it does not.
Outcome: no image of this revision exists → I can't judge how the list reads, including how the "why it doesn't reach this chat" reason shows up next to the breakdown → the shape of the surface stays unreviewed.
Fix: attach the en/de before and after captures the description mentions as github.com/user-attachments images, or commit them under temp-screenshots/.
Clears when: the evidence list for this head SHA names at least one downloaded image or committed image of the Context breakdown tab with "Steering in this chat" rendered, showing at least one row that does not reach the chat.

Notes

  • The ## Backwards compatibility section has both a Compatible: line and a Removes nothing: line. Keep only one. The _load_steering_resources → steering_resource_documents refactor keeps the joined output the same, so Removes nothing holds.

[DESIGN-REVIEWED] 3433344

Description read

[DESCRIPTION-READ] 2d0edce1a29cbcd73eee19a4517c82da9690c4ffdc557df1aa2663cd5a76d678

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 34333448b48626a1c02b71031d5dd6cae69edcb6 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

One note: the new backend-to-label helper is a second copy of mapping logic that provider_label already holds.

Notes

  • Item 5 — duplicate of src/kiro_crew/providers/acp.py:1418-1423: provider_label_for_backend re-spells "is_claude_backend_name check, then PROVIDER_LABEL_BY_BACKEND.get(backend, PROVIDER_LABEL_DEFAULT)". Grepping PROVIDER_LABEL_BY_BACKEND.get finds that tail in 2 places, and both must now stay in step. Subtraction: delete the tail in providers/acp.provider_label and have it return the single helper's result for the resolved backend, so one spelling remains.

What this change ships

Inventory (8 items) — 7 justified

Intent: let a person see which steering files reach a chat, and why a file does not. ADDITION (P1 of rfc-chat-steering-context.md, accepted on base).

  1. A "Steering in this chat" list appears under the Context breakdown tab — justified
  2. Each file shows its name, source, when it applies, and whether it reaches the chat with a reason — justified
  3. A new owner-gated read-only route, GET /api/chat/slots/{slot}/steering — justified
  4. The Claude Code steering load and the list now share one reader (steering_resource_documents) — justified
  5. A new public SDK helper, provider_label_for_backend, labels a chat that has no provider yet — duplicate of providers/acp.py provider_label tail
  6. The new route is registered as a redaction sink, with display paths redacted — justified
  7. The list's strings ship in all 12 locales, in a lazy-loaded chunk — justified
  8. The RFC moves to partial, and its reaches vocabulary gains briefing — justified

[FIRST-PRINCIPLES-REVIEWED] 3433344

Description read

[DESCRIPTION-READ] 16fb64787a5c644e448389679c55c7c9ddf7bdd222e26188da9dba03f41248d2

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 34333448b48626a1c02b71031d5dd6cae69edcb6 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 3433344

Verdict parsed from the review's SHA-scoped output markers for commit 34333448b48626a1c02b71031d5dd6cae69edcb6.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 34333448b48626a1c02b71031d5dd6cae69edcb6 false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: checking Automated validation is still running labels Nov 9, 2026
@RohanK6
RohanK6 force-pushed the crew/conductor/chat-steering-p1 branch from 524ff55 to da2b6b5 Compare November 9, 2026 03:13
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Sensitive Change Review

Sensitive files changed:

  • src/kiro_crew/security_posture_sinks_gateway.py

  • @RohanK6 posted a complete reasoning template for 3433344.

@RohanK6

RohanK6 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

Review round 1, fixed on da2b6b5:

  • Linked chats (GPT F2, Opus 1): the route now reads the project from the slot it already authorized, so a channel-linked chat lists its own project steering. New test: a channel-linked chat lists its own project.
  • Claude Code link admission (GPT F4, Opus 2): admission now asks only the loader gate, not the Steering tab read flag. For a link the tab does not read, the verdict comes from the loader own read and the row says when it applies is unknown (new key in all 12 locales). New test checks both against what the loader sends.
  • Static Ratchet: the route is registered as a redaction sink.

Downgraded and left as is: F1 (folder cap) and F3 (shadowed project agent spec) are marked shortcuts in the code; F5 (stale list after a project change) clears on the next mount.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Nov 9, 2026
@RohanK6
RohanK6 force-pushed the crew/conductor/chat-steering-p1 branch from da2b6b5 to 280de71 Compare November 9, 2026 05:11
@RohanK6

RohanK6 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

Review round 2, fixed on 280de71:

  • Opus (project agent spec): when the project has its own agent spec of that name, kiro-cli serves that one, so the list no longer claims either way. Those rows now say the product cannot tell. New test fails on the previous head.
  • Agent SDK boundary: the route reads the harness label through a new provider_label_for_backend in agent_sdk/drivers/acp.py, not the ACP layer.
  • Product name and French spacing in the new strings; the API client order test names the new method; the Windows test compares paths with the host separator.
  • Bundle Size: main itself was over the App ceiling; fix(website): re-measure the App chunk's bundle-size ceiling #33665 re-measured it, and this head is rebased onto it.

Sensitive change review

  • What rule changed: one row added to the redaction sink registry in security_posture_sinks_gateway.py, for the new per-chat steering route.
  • Before -> after: the new route was an unregistered redactor call site; now the posture panel counts it as a covered sink.
  • Worst case if wrong: the panel counts one more covered sink than it should; no redaction or scan changes.
  • Evidence checked: the route redacts every display path through _redact_meta, which is redact(), both scanners; no document body leaves it.
  • No regression:
    • Tools still work: no tool, gate or scanner code changed; only the registry list and its test.
    • Backward compatible: adding a registry row removes nothing and every earlier sink row is unchanged.
    • Existing tests: test_security_posture.py and test_security_posture_facade.py pass, 85 tests.
  • How to undo: revert this PR, or delete the one Per-chat steering list row and its test entry.

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 9, 2026
@RohanK6
RohanK6 force-pushed the crew/conductor/chat-steering-p1 branch from 280de71 to 2b216fa Compare November 9, 2026 06:12
@RohanK6

RohanK6 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto main for the conflict; no code change since the last note. Head 2b216fa.

Sensitive change review

  • What rule changed: one row added to the redaction sink registry in security_posture_sinks_gateway.py, for the new per-chat steering route.
  • Before -> after: the new route was an unregistered redactor call site; now the posture panel counts it as a covered sink.
  • Worst case if wrong: the panel counts one more covered sink than it should; no redaction or scan changes.
  • Evidence checked: the route redacts every display path through _redact_meta, which is redact(), both scanners; no document body leaves it.
  • No regression:
    • Tools still work: no tool, gate or scanner code changed; only the registry list and its test.
    • Backward compatible: adding a registry row removes nothing and every earlier sink row is unchanged.
    • Existing tests: test_security_posture.py and test_security_posture_facade.py pass on this head.
  • How to undo: revert this PR, or delete the one Per-chat steering list row and its test entry.

@github-actions github-actions Bot removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 9, 2026
@RohanK6
RohanK6 force-pushed the crew/conductor/chat-steering-p1 branch from 2b216fa to 4717164 Compare November 9, 2026 07:11
@RohanK6

RohanK6 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

Fixed two test reds on 4717164: the route now imports through the dashboard _shared facade, and the project agent spec path comes from config.paths.project_agents_dir. The new agent-spec read site is pinned in test_agent_spec_hardened_reads.py. The other reds on the previous head were GitHub rate limits and 504s.

Sensitive change review

  • What rule changed: one row added to the redaction sink registry in security_posture_sinks_gateway.py, for the new per-chat steering route.
  • Before -> after: the new route was an unregistered redactor call site; now the posture panel counts it as a covered sink.
  • Worst case if wrong: the panel counts one more covered sink than it should; no redaction or scan changes.
  • Evidence checked: the route redacts every display path through _redact_meta, which is redact(), both scanners; no document body leaves it.
  • No regression:
    • Tools still work: no tool, gate or scanner code changed; only the registry list and its test.
    • Backward compatible: adding a registry row removes nothing and every earlier sink row is unchanged.
    • Existing tests: test_security_posture.py and test_security_posture_facade.py pass on this head.
  • How to undo: revert this PR, or delete the one Per-chat steering list row and its test entry.

@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Nov 9, 2026
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 9, 2026
@RohanK6
RohanK6 force-pushed the crew/conductor/chat-steering-p1 branch from 4717164 to 7c58ac6 Compare November 9, 2026 08:32
@RohanK6

RohanK6 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

Review round 3, on 7c58ac6. Two findings came back a second time, so the approach changed instead of patching another case:

  • Verdicts drifting from what is sent (GPT F1, F2): the plan no longer copies the loader rules. The Claude Code steering load now has one reader, steering_resource_documents in context_assembly/agent_spec.py; _load_steering_resources joins its list, and the plan reads the same list. That covers links, AGENTS.md and any other declared file. Folder rows come from the bounded folder section rendered at the turn cap, so a document the cap leaves out says so. New tests: a project AGENTS.md is listed, and a folder document past the cap is not included.
  • Which agent spec kiro-cli serves (Opus): a pinned name now answers that the plan cannot tell, as a project spec of that name already did.
  • Stale list (GPT F3): the query is keyed on the slot project, agent, folder and the context trace revision, so a pick or a new turn re-reads it. New frontend test.
  • Symlink test (GPT F4): the platform skip is gone; the test is in test/requires-real-symlinks.txt.

Sensitive change review

  • What rule changed: one row added to the redaction sink registry in security_posture_sinks_gateway.py, for the new per-chat steering route.
  • Before -> after: the new route was an unregistered redactor call site; now the posture panel counts it as a covered sink.
  • Worst case if wrong: the panel counts one more covered sink than it should; no redaction or scan changes.
  • Evidence checked: the route redacts every display path through _redact_meta, which is redact(), both scanners; no document body leaves it.
  • No regression:
    • Tools still work: no tool, gate or scanner code changed; only the registry list and its test.
    • Backward compatible: adding a registry row removes nothing and every earlier sink row is unchanged.
    • Existing tests: test_security_posture.py and test_security_posture_facade.py pass on this head.
  • How to undo: revert this PR, or delete the one Per-chat steering list row and its test entry.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Nov 9, 2026
@RohanK6
RohanK6 force-pushed the crew/conductor/chat-steering-p1 branch from 7c58ac6 to af98d83 Compare November 9, 2026 09:11
@RohanK6

RohanK6 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

On af98d83: the new folder-cap test stubs the folder collection, so it pins the section-cap verdicts and not the collector (it failed on the Windows stability job). The kirocrew-worktree-dev skill-size red in backend shard 3 also fails on main; #33795 fixes it.

Sensitive change review

  • What rule changed: one row added to the redaction sink registry in security_posture_sinks_gateway.py, for the new per-chat steering route.
  • Before -> after: the new route was an unregistered redactor call site; now the posture panel counts it as a covered sink.
  • Worst case if wrong: the panel counts one more covered sink than it should; no redaction or scan changes.
  • Evidence checked: the route redacts every display path through _redact_meta, which is redact(), both scanners; no document body leaves it.
  • No regression:
    • Tools still work: no tool, gate or scanner code changed; only the registry list and its test.
    • Backward compatible: adding a registry row removes nothing and every earlier sink row is unchanged.
    • Existing tests: test_security_posture.py and test_security_posture_facade.py pass on this head.
  • How to undo: revert this PR, or delete the one Per-chat steering list row and its test entry.

@RohanK6
RohanK6 force-pushed the crew/conductor/chat-steering-p1 branch from af98d83 to c2c6f45 Compare November 9, 2026 10:31
@RohanK6

RohanK6 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

Review round 4, on c2c6f45:

  • Member chats (GPT, Opus): folder rows, and tree rows a folder covers, now read briefing; the essentials envelope decides them, so the route renders no folder section for a member. New test fails on the previous head.
  • Native launch record (GPT): the folder collection now takes the same _folder_steering_delivery_snapshot skip the turn takes, with the live session launch record from context_provider_of(provider).native_context_documents. New test fails on the previous head.

Sensitive change review

  • What rule changed: one row added to the redaction sink registry in security_posture_sinks_gateway.py, for the new per-chat steering route.
  • Before -> after: the new route was an unregistered redactor call site; now the posture panel counts it as a covered sink.
  • Worst case if wrong: the panel counts one more covered sink than it should; no redaction or scan changes.
  • Evidence checked: the route redacts every display path through _redact_meta, which is redact(), both scanners; no document body leaves it.
  • No regression:
    • Tools still work: no tool, gate or scanner code changed; only the registry list and its test.
    • Backward compatible: adding a registry row removes nothing and every earlier sink row is unchanged.
    • Existing tests: test_security_posture.py and test_security_posture_facade.py pass on this head.
  • How to undo: revert this PR, or delete the one Per-chat steering list row and its test entry.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 9, 2026
A person cannot see which steering files reach the chat they are in;
on several harnesses the global and project trees do not reach the
model at all. The Context breakdown tab now lists every global,
project and folder steering file with its source, when it applies,
and whether it reaches this chat, and why not.

The verdicts come from one plan that applies the gates context
assembly already applies, and a parity test pins the Claude Code
verdicts to what the loader sends. Read-only: nothing that reaches
the model changes.

Implements P1 of the accepted RFC (#33133). Part of #33112.
@RohanK6
RohanK6 force-pushed the crew/conductor/chat-steering-p1 branch from c2c6f45 to 3433344 Compare November 9, 2026 11:31
@RohanK6

RohanK6 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

Review round 5, on 3433344. The three upheld GPT findings are fixed; each new test fails on the previous head:

  • F1 (event loop): the launch record and the provider working directory are now read inside the offloaded worker, _plan_for_provider.
  • F3 (no slot project): context is listed for the provider working directory, as build_message does, while the agent still resolves with the slot own project, as turn admission does.
  • F4 (cap reason on a tree row): a tree file the folder section would have carried, but its cap cut, now says the folder section was full.

F2 and F5 were downgraded by the adjudicator and are left as they are.

Sensitive change review

  • What rule changed: one row added to the redaction sink registry in security_posture_sinks_gateway.py, for the new per-chat steering route.
  • Before -> after: the new route was an unregistered redactor call site; now the posture panel counts it as a covered sink.
  • Worst case if wrong: the panel counts one more covered sink than it should; no redaction or scan changes.
  • Evidence checked: the route redacts every display path through _redact_meta, which is redact(), both scanners; no document body leaves it.
  • No regression:
    • Tools still work: no tool, gate or scanner code changed; only the registry list and its test.
    • Backward compatible: adding a registry row removes nothing and every earlier sink row is unchanged.
    • Existing tests: test_security_posture.py and test_security_posture_facade.py pass on this head.
  • How to undo: revert this PR, or delete the one Per-chat steering list row and its test entry.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 9, 2026
@RohanK6
RohanK6 enabled auto-merge (squash) November 9, 2026 13:09

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve on 3433344. I read the whole diff (2066 lines). This is P1 of the accepted RFC from #33133.

  • steering_resource_documents now holds the loader body, and _load_steering_resources joins its output. The list and the Claude Code load therefore read one source. test_claude_code_verdicts_match_what_its_loader_sends and the AGENTS.md and link tests pin that parity.
  • Folder rows come from the same _folder_steering_delivery_snapshot skip and the same render_folder_steering at caps.steering that the turn uses, so folder_cap reflects the real cut.
  • declared_steering_targets reads the spec through _read_agent_spec and is registered in test_agent_spec_hardened_reads.py. For a pin or a project spec it returns None, and the row shows "cannot tell" instead of guessing.
  • The route is read-only. It has the same slot_not_found / deny_app_slot_access checks as selection-capabilities and sits behind the same owner check on the chat routes. Paths go through _redact_meta, and no body leaves the route. The redaction sink is registered. test_an_app_cannot_read_a_slot_it_does_not_own covers the app path.
  • The UI is lazy-loaded so the App chunk does not grow, and the strings are added to every locale.
  • All 97 checks are green, and nobody else has an open change request. Auto-merge is already set by RohanK6.

@RohanK6
RohanK6 merged commit c314463 into main Nov 9, 2026
155 of 157 checks passed
@RohanK6
RohanK6 deleted the crew/conductor/chat-steering-p1 branch November 9, 2026 13:17
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 9, 2026
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.

2 participants