Repository navigation
feat(identity): bootstrap nudge in binary on first join (closes #146) - #255
Conversation
Pre-Phase-2B.3 you had to ls .airc.* + cat each room_name to know 'what rooms is this tab in?'. Post-2B.3 the canonical source is subscribed_channels in config.json. cmd_status now displays: channels: #cambriantech (default), #useideem, #general First subscribed channel is the default (what cmd_send stamps without --channel override); rest are advisory display tags. Verification: status 7/0, tabs 19/0; manual exercise.
continuum-b741 review: /join SKILL.md drives identity bootstrap, but
users running airc directly (most users on first contact) never get
the prompt and end up with all-(unset) whois forever.
## Fix
New `_identity_bootstrap_nudge_if_unset` helper in cmd_identity.sh.
Called from cmd_connect's joiner-success branch. Checks if all three
of pronouns/role/bio are unset; if so, prints a one-line tip with a
copy-pasteable command. Idempotent via $AIRC_WRITE_DIR/.identity_nudged_v1
sentinel — nags only once per scope.
Tip: set your identity so peers know who they are talking to.
One-line example:
airc identity set --pronouns they --role 'your role' --bio 'one-sentence bio'
Done? Suppress this nudge: touch <path>
Verification: tabs 19/0.
There was a problem hiding this comment.
Pull request overview
Adds a one-time “identity bootstrap” prompt after first successful join to encourage users to set pronouns/role/bio when all are unset, with idempotency via a sentinel file.
Changes:
- Add
_identity_bootstrap_nudge_if_unsethelper to detect fully-unset identity fields and print a one-time tip. - Invoke the identity nudge from
cmd_connectafter join. - Enhance
airc statusto display subscribed channels and indicate the default channel.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| lib/airc_bash/cmd_status.sh | Display subscribed_channels (default + rest) in airc status. |
| lib/airc_bash/cmd_identity.sh | Add one-time identity “bootstrap nudge” helper and sentinel handling. |
| lib/airc_bash/cmd_connect.sh | Trigger the identity nudge after a successful join. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Identity bootstrap nudge (#146). Skill /join SKILL.md prompts | ||
| # AIs to set pronouns/role/bio at first join, but users running | ||
| # airc directly (no skill) never get the prompt and end up with | ||
| # all-(unset) whois forever. Code-level one-time nudge here. | ||
| _identity_bootstrap_nudge_if_unset || true | ||
| fi |
There was a problem hiding this comment.
The identity bootstrap nudge is currently only invoked inside the if [ -n "$resolved_room_name" ] block, so users who join via a legacy invite / --no-room path (where resolved_room_name is empty) will never see the nudge even if pronouns/role/bio are all unset. Consider moving the _identity_bootstrap_nudge_if_unset call outside this room-specific conditional so it runs after any successful join.
| # Identity bootstrap nudge (#146). Skill /join SKILL.md prompts | |
| # AIs to set pronouns/role/bio at first join, but users running | |
| # airc directly (no skill) never get the prompt and end up with | |
| # all-(unset) whois forever. Code-level one-time nudge here. | |
| _identity_bootstrap_nudge_if_unset || true | |
| fi | |
| fi | |
| # Identity bootstrap nudge (#146). Skill /join SKILL.md prompts | |
| # AIs to set pronouns/role/bio at first join, but users running | |
| # airc directly (no skill) never get the prompt and end up with | |
| # all-(unset) whois forever. Code-level one-time nudge here. | |
| _identity_bootstrap_nudge_if_unset || true |
| echo "" | ||
| fi | ||
| } | ||
| : > "$nudge_file" 2>/dev/null || true | ||
| } |
There was a problem hiding this comment.
: > "$nudge_file" runs unconditionally, so if the Python check fails for an unexpected reason (e.g., $AIRC_PYTHON error, transient read failure), the sentinel file may still be created and permanently suppress future nudges. Suggest only writing the sentinel when the check succeeds (exit 0 or 2), and skipping sentinel creation for other nonzero exit codes so the nudge can retry later.
| # nudge file under $AIRC_WRITE_DIR/.identity_nudged_v1 records that | ||
| # we've nudged, so we don't nag every reconnect. The skill /join can | ||
| # still drive interactive bootstrap; this is the binary-side fallback | ||
| # for users running airc directly. |
There was a problem hiding this comment.
The comment says the sentinel file "records that we've nudged", but the code creates the sentinel even when identity is already set (no nudge printed). Either adjust the wording to reflect that it's a one-time check, or change the behavior to only create the sentinel when the nudge is actually displayed.
| # nudge file under $AIRC_WRITE_DIR/.identity_nudged_v1 records that | |
| # we've nudged, so we don't nag every reconnect. The skill /join can | |
| # still drive interactive bootstrap; this is the binary-side fallback | |
| # for users running airc directly. | |
| # sentinel file under $AIRC_WRITE_DIR/.identity_nudged_v1 records that | |
| # we've already performed this one-time bootstrap check, so we don't | |
| # repeat it on every reconnect. The skill /join can still drive | |
| # interactive bootstrap; this is the binary-side fallback for users | |
| # running airc directly. |
| # Identity bootstrap nudge (#146). Skill /join SKILL.md prompts | ||
| # AIs to set pronouns/role/bio at first join, but users running | ||
| # airc directly (no skill) never get the prompt and end up with | ||
| # all-(unset) whois forever. Code-level one-time nudge here. | ||
| _identity_bootstrap_nudge_if_unset || true |
There was a problem hiding this comment.
This PR introduces user-facing, one-time behavior (identity bootstrap nudge) but there doesn't appear to be an integration test covering (a) first-join with all fields unset prints the tip, and (b) subsequent reconnects are silent due to the sentinel file. Adding coverage in test/integration.sh (similar to scenario_identity / scenario_status) would prevent regressions.
| # Channel participation (#149). Post-Phase-2B.3 the canonical source | ||
| # is config.json's subscribed_channels; first element is the default | ||
| # channel that cmd_send stamps. Display the list with a marker for | ||
| # the default. | ||
| local _channels; _channels=$("$AIRC_PYTHON" -m airc_core.config read_channels --config "$CONFIG" 2>/dev/null) |
There was a problem hiding this comment.
Skill drives bootstrap; binary now also nudges on first join when all of pronouns/role/bio are unset. Idempotent via sentinel file.