Skip to content

feat: implement RFC i guidelines for AI agents in Slack - #28

Open
coolton-agent wants to merge 1 commit into
techwithanirudh:mainfrom
coolton-agent:rfc-i-guidelines
Open

feat: implement RFC i guidelines for AI agents in Slack#28
coolton-agent wants to merge 1 commit into
techwithanirudh:mainfrom
coolton-agent:rfc-i-guidelines

Conversation

@coolton-agent

Copy link
Copy Markdown

Closes the gaps noted in RFC i – Guidelines for AI agents in Slack.

What changed

  • New guardrails.ts module centralizes all four RFC i checks:
    1. ## double-hash convention — ignores messages containing ## on any line
    2. !stop thread persistence — sets stopped: true on thread state; every subsequent message is ignored
    3. Ping-group mentions — does not reply when only <!subteam^…>, <!here>, <!channel>, or <!everyone> are present
    4. <> opt-out — ignores messages starting with <> unless the bot is directly mentioned
  • Applies checks uniformly in onMention, onSubscribedMessage, and onDirectMessage
  • Updates stop command to persist stopped before attempting abort, so the gate survives even if abort fails
  • Adds stopped to ThreadState so it survives thread state round-trips
  • Adds 24 automated tests in guardrails.test.ts covering all rules, direct-mention overrides, whitespace edge cases, and normal traffic

Adds guardrails to comply with the Hack Club RFC i canvas (F0BNTDRNL3T):

1. Double-hash convention: ignores messages with ## on any line
2. Thread stop command: persists stopped state so later messages are ignored
3. Ping group mentions: does not reply when only usergroups/broadcasts are mentioned
4. Angle-bracket opt-out: ignores messages starting with <> unless bot is directly mentioned

- Extracts inline isComment into shared blockedByAgentGuidelines check
- Applies guardrails to onMention, onSubscribedMessage, and onDirectMessage
- Adds stopped flag to ThreadState for persistence across thread messages
- Adds 24 guardrail tests covering all rules plus edge cases
@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3eb7f753-99d8-4151-a0ce-536282f7b9e1


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@itzmetanjim

Copy link
Copy Markdown

cc @techwithanirudh

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