Skip to content

feat(identity): bootstrap nudge in binary on first join (closes #146) - #255

Merged
joelteply merged 2 commits into
canaryfrom
fix/identity-bootstrap-nudge-in-binary
Apr 28, 2026
Merged

joelteply merged 2 commits into
canaryfrom
fix/identity-bootstrap-nudge-in-binary

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Skill drives bootstrap; binary now also nudges on first join when all of pronouns/role/bio are unset. Idempotent via sentinel file.

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.
Copilot AI review requested due to automatic review settings April 28, 2026 23:08
@joelteply
joelteply merged commit dfc566e into canary Apr 28, 2026
1 check passed
@joelteply
joelteply deleted the fix/identity-bootstrap-nudge-in-binary branch April 28, 2026 23:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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_unset helper to detect fully-unset identity fields and print a one-time tip.
  • Invoke the identity nudge from cmd_connect after join.
  • Enhance airc status to 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.

Comment on lines +808 to 813
# 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

Copilot AI Apr 28, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Suggested change
# 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

Copilot uses AI. Check for mistakes.
Comment on lines +122 to +126
echo ""
fi
}
: > "$nudge_file" 2>/dev/null || true
}

Copilot AI Apr 28, 2026

Copy link

Choose a reason for hiding this comment

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

: > "$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.

Copilot uses AI. Check for mistakes.
Comment on lines +98 to +101
# 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.

Copilot AI Apr 28, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Suggested change
# 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.

Copilot uses AI. Check for mistakes.
Comment on lines +808 to +812
# 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

Copilot AI Apr 28, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment on lines +47 to +51
# 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)

Copilot AI Apr 28, 2026

Copy link

Choose a reason for hiding this comment

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

The PR title/description focuses on the identity bootstrap nudge (#146), but this hunk also adds new airc status output for subscribed channels (#149). If this is intentional, consider mentioning it in the PR description (or splitting into a separate PR) to keep scope and review surface clear.

Copilot uses AI. Check for mistakes.
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