Skip to content

feat(connect): auto-scope default room from git remote org - #66

Merged
joelteply merged 1 commit into
canaryfrom
feat/auto-scope-room-from-git-org
Apr 25, 2026
Merged

joelteply merged 1 commit into
canaryfrom
feat/auto-scope-room-from-git-org

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Summary

  • airc join with no --room now picks the default channel based on the git repo at \$PWD — primary signal is the org segment of the origin URL, fallback is the parent-dir basename, backstop is #general.
  • Identifier is cross-machine-stable: any useideem/* checkout anywhere on disk, on any OS, defaults to #useideem. Any cambriantech/* → #cambriantech. Any joelteply/* personal project → #joelteply.
  • Explicit --room X unchanged. AIRC_NO_AUTO_ROOM=1 disables. airc list + /join --room <x> cross-scope access unchanged.

Why

Today airc join dumps every tab on the gh account into one #general. If you work across multiple orgs (day job, side project, OSS, client work), that room becomes a firehose — hobbies and work agents trample each other's signal. Segregating by the owner of the code that each tab lives in matches how developers actually think about scope, without requiring anyone to type --room or remember names.

Using the gh org (not the parent dir name) as the primary signal is deliberate: path conventions vary per dev (`/Development/`, `/work/`, `C:\work`), but the remote URL is canonical. Joel on Mac and Brian on Linux agree on #useideem for free.

Behavior

cwd default room source
~/Development/ideem/vHSM #useideem git remote org
~/Development/ideem/authenticator #useideem git remote org
~/Development/cambrian/airc #cambriantech git remote org
~/personal-project (no remote) #personal-project parent-dir (if not $HOME)
/tmp, \$HOME, non-git dirs #general fallback

Test plan

  • test/integration.sh — 97/97 passed (room / part / handshake / gist-discovery unaffected)
  • Manual spot-checks across useideem, cambriantech, personal-gh, non-git temp dirs
  • Canary cross-machine validation before promoting to main

🤖 Generated with Claude Code

When `airc join` is run with no --room flag, derive the default
channel from the git repo at $PWD:

  1. Primary — gh org from origin URL (github/gitlab/bitbucket/self-
     hosted, whatever owner sits between host and repo). Stable
     across machines: useideem/vHSM on a Mac and useideem/authenticator
     on a Linux box both default to #useideem without coordinating
     paths. Matches airc's "gh OAuth scope IS the trust boundary"
     philosophy — the org that owns the code owns the room.

  2. Fallback — parent-directory basename, for local-only repos with
     no remote. Skipped when parent is $HOME / / / a generic workspace
     root (Development, work, src, projects, github, …).

  3. Backstop — #general when both signals refuse (non-git dirs).

Explicit --room X still wins. AIRC_NO_AUTO_ROOM=1 disables the
inference entirely. `airc list` continues to show every room on
the account, so switching scope is always one `/join --room <x>`
away.

97/97 integration tests pass — no regression to #general or
--no-general flows.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@joelteply
joelteply merged commit 985016c into canary Apr 25, 2026
1 check passed
joelteply added a commit that referenced this pull request Apr 25, 2026
- New top-level section "Auto-scope — the default room" with:
    * The rule (git remote owner → parent-dir → #general)
    * Worked example with a generic ~/work/my-org/* + ~/work/cambriantech/* layout
    * "Scoping is the default, not a wall" subsection explaining airc list
      + airc join --room <other> + AIRC_NO_AUTO_ROOM=1 for cross-room hops
- Swap the old "The Magic" bullet from a verbose inline description
  to a short pitch + link into the new section.
- Update "Same gh account" setup to reference the auto-scope room
  rather than saying "hosts #general" (now only true when auto-scope
  falls through).
- Table row + skill descriptions + quick-start comments: rename
  "Auto-#general" to "Auto-scope" throughout.

Also scrub the skill file of PII from the original rollout (per
Joel): no joelteply/useideem references, no "Joel's Mac / Brian's
Linux box" phrasings. Generic my-org / your-username examples +
cambriantech where a concrete name helps (public, self-promoted).

Pairs with the auto-scope feature landed in #66; completes the
"make the docs match the behavior" pass that the rollout demo
surfaced.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@joelteply
joelteply deleted the feat/auto-scope-room-from-git-org branch April 25, 2026 03:10
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.

1 participant