Repository navigation
docs(agents): record the Slack output convention in the playbook - #8331
Conversation
#8320 fixed agent-controlled text reaching a Slack DM title, and swept the same pattern out of the registry and member-event builders. The rule it enforces lived only as a comment in one file, which is how the sweep became necessary. Write it down. Documents the helpers added in #8330; merge after it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
`.agents/**` is under a hard approval gate, so keeping the playbook entry here would block a security fix on a documentation review. The rule ships separately in #8331; the behaviour it describes is unchanged. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated path requires human/CODEOWNERS review.
This is a documentation-only change: one new section (41 net added lines) in .agents/playbook.md recording the Slack/notification output convention. The reviewer verified every load-bearing claim against #8330 (helper names/signatures and both behavioral claims match), and found no Medium-or-worse findings — the diff itself is clean.
However, gated_paths is true (.agents/playbook.md matches .agents/**) and review_decision is REVIEW_REQUIRED, not APPROVED. Per decision table row 2, this is a hard, non-overridable approval gate that cannot be satisfied by a clean diff alone.
Escalation reasons
- Touches gated path
.agents/playbook.md(matches.agents/**); requires explicit human/CODEOWNERS approval.review_decisionis currentlyREVIEW_REQUIRED.
No blocking findings. Once a human/CODEOWNERS approval lands (review_decision: APPROVED), this clean diff would fall through to approve. Note the merge-ordering dependency: these helpers only exist after #8330 merges — already stated in the PR body.
Why human review
- Touches gated path .agents/playbook.md (matches .agents/**) and review_decision is REVIEW_REQUIRED (not APPROVED) — requires explicit human/CODEOWNERS approval before merge.
- This PR touches a path under a hard, non-overridable approval gate (.agents/playbook.md (modified) matches
.agents/**) and the current GitHub review decision is 'REVIEW_REQUIRED', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.
…ion titles (#8330) * fix(notifications): keep agent-controlled text out of Slack notification titles `notifyComplianceChange` built its Slack DM title by interpolating the stored compliance `headline`. For an unreachable agent that headline is `Unreachable: ${errorMessage}` — untruncated text derived from the agent's own error response. Slack parses a DM's text as mrkdwn, so a hostile or misbehaving agent could put `<!channel>`, a `<@U…>` mention, a forged `<url|label>` link, a newline that fakes a line of platform copy, or ten kilobytes of prose into the headline of a message the owner reads as ours. Notification titles are now fixed templates plus short sanitized identifiers, and text we did not author moves to a new `body` that is flattened to one line, capped, and escaped per surface. The same pattern was swept out of the registry and member-event builders, where member- supplied edit summaries, post titles, excerpts and organization names were reaching a moderator-trusted channel raw. Closes #8320. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * chore: move the Slack-output convention to its own PR `.agents/**` is under a hard approval gate, so keeping the playbook entry here would block a security fix on a documentation review. The rule ships separately in #8331; the behaviour it describes is unchanged. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
|
#8330 is merged ( The only thing outstanding is the |
|
#8337 (the #8326 follow-up) adds a fifth helper to Suggested, after the - `sanitizeSlackLiteral(raw, max)` — `sanitizeSlackLine` plus a
zero-width space through the inline formatting tokens and through a
bare URL's `//`. Slack auto-links a bare `https://…` even with no
mrkdwn syntax around it, so an org renamed to
`Acme https://evil.example Co` is still a clickable attacker
destination. Use it where the value is a name or label that has no
business carrying formatting or a link at all.Context: |
Split out of #8330 so a documentation review does not block a security fix.
.agents/**is under a hard approval gate, and that PR closes #8320.Why
#8320 was agent-controlled error text reaching a Slack DM title. The rule it violated — titles are fixed templates plus sanitized fields, untrusted free text goes in the body — existed only as a comment in
compliance-heartbeat.ts, directly above the one branch that didn't follow it. When #8330 swept the rest of the repo it found the same shape in the registry and member-event builders, where member-supplied edit summaries, post titles and excerpts reached a moderator-trusted channel raw.A convention that lives in one file's comment is how that happens. This writes it into
.agents/playbook.mdunder Critical Rules, alongside the existing design-system and UI-casing entries.What it says
<url|label>can't be escaped, so check the target and drop the link when it fails.server/src/utils/slack-escape.tsrather than writing another local escaper, with a one-line description of each and when it applies.Documents helpers introduced in #8330, so merge this after that one. No code changes.
🤖 Generated with Claude Code
Open workspace in Conductor