Skip to content

chore(readme,skills): finalize docs to canary state — pre-main-merge - #143

Merged
joelteply merged 1 commit into
canaryfrom
chore/readme-skills-finalize
Apr 27, 2026
Merged

joelteply merged 1 commit into
canaryfrom
chore/readme-skills-finalize

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Final cleanup before canary→main promotion. Brings README and skills/ in line with what canary actually does.

README

  • Test count: 88 assertions / 11 scenarios → ~245 / 32 (current reality)
  • Core Commands: add `airc msg --room ` and `airc away` / `airc back`
  • Default Rooms: document /part stickiness (`parted_rooms` persists, `airc join --general` re-opts-in)
  • Skills table: add /whois, /away, /kick rows (closes "documented in IRC table, missing from skills" gap)

New skills

  • `skills/away/SKILL.md` — IRC /away alias for status set/clear
  • `skills/whois/SKILL.md` — identity lookup, walks subscribed rooms
  • `skills/kick/SKILL.md` — host-only peer eviction

`install.sh` auto-symlinks every `skills/*/` directory, so no installer change needed.

Why before main merge

vhsm and continuum's QA pass earlier today found that the IRC-airc table mapped to commands that didn't exist (`airc away`) and skills that didn't exist (`/whois`, `/kick`). #139 added the commands; this PR adds the skills + reconciles README so when canary lands on main, the public-facing surface is internally consistent.

README updates:
- Integration suite count: 88 assertions / 11 scenarios → ~245 / 32
- Core Commands: add `airc msg --room <name>` (sibling-room send) and
  `airc away` / `airc back` (IRC /away alias)
- Default Rooms: document /part stickiness (parted_rooms persists in
  primary scope's config) and `airc join --general` re-opt-in flag
- Skills table: add /whois, /away, /kick rows so the table covers
  every IRC verb in the IRC↔airc table (no more "documented in table,
  missing from skills")

New skills (install.sh auto-symlinks; no installer changes):
- skills/away/SKILL.md — IRC /away alias for status set/clear
- skills/whois/SKILL.md — identity lookup + cross-scope walk note
- skills/kick/SKILL.md — host-only peer eviction with SSH key drop

Why now: vhsm and continuum drove the IRC-table audit through QA.
README and skills were the last surfaces still claiming the
pre-#122/#138/#139 shape. Closing the gap before promoting canary
to main so the merged tree presents a coherent story.
Copilot AI review requested due to automatic review settings April 27, 2026 16:27
@joelteply
joelteply merged commit cc9e601 into canary Apr 27, 2026
2 checks passed
@joelteply
joelteply deleted the chore/readme-skills-finalize branch April 27, 2026 16:27

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

This PR updates public-facing documentation and Claude Code skill docs to match the current canary feature surface (notably IRC-aligned verbs like /away, /whois, /kick, cross-room messaging, and sticky /part behavior) ahead of canary→main promotion.

Changes:

  • Add new Claude Code skills documentation for /away, /whois, and /kick.
  • Update README to reflect current integration test scale, core commands (including airc msg --room), and persisted /part behavior via parted_rooms.
  • Expand the README skills table to include the newly documented IRC-aligned skills and updated skill descriptions.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
skills/whois/SKILL.md Documents /whois behavior including cross-scope lookup order and sample output
skills/kick/SKILL.md Documents host-only /kick behavior, effects, and safety notes
skills/away/SKILL.md Documents /away and /back status set/clear behavior
README.md Refreshes command reference, skill table, test suite stats, and sticky /part behavior

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread skills/whois/SKILL.md
bio: wallet/merchant bridging cert flow on vhsm-canary
status: in a meeting til 3pm
integrations: (none)
host: [email protected]

Copilot AI Apr 27, 2026

Copy link

Choose a reason for hiding this comment

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

The example output includes a specific Tailscale/CGNAT IP (100.91.51.87) and a real-looking username. Elsewhere in the repo we explicitly avoid hardcoded personal tailnet IPs (treated as low-grade PII); please replace this with a non-identifying placeholder (e.g., [email protected] or a TEST-NET address) so docs don’t reintroduce that leak pattern.

Suggested change
host: joelteply@100.91.51.87
host: user@100.64.0.1

Copilot uses AI. Check for mistakes.
Comment thread skills/kick/SKILL.md
## What kick does NOT do

- Doesn't touch the kicked peer's local state. Their config still says they're paired with you; they just can't reach you over SSH any more.
- Doesn't broadcast a "kicked" event in the room (current behavior; an explicit broadcast was discussed in early kick PRs but the host-side notice was felt to be enough).

Copilot AI Apr 27, 2026

Copy link

Choose a reason for hiding this comment

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

This section says kick “Doesn't broadcast a 'kicked' event in the room”, but airc’s cmd_kick emits a [kick] ... system message via cmd_send. Please update this doc to match current behavior (either document the broadcast, or change the implementation if the intent is truly no broadcast).

Suggested change
- Doesn't broadcast a "kicked" event in the room (current behavior; an explicit broadcast was discussed in early kick PRs but the host-side notice was felt to be enough).
- Doesn't emit a dedicated structured "kicked" event; current behavior is to send a room-visible host/system notice (for example, a `[kick] ...` message) instead.

Copilot uses AI. Check for mistakes.
Comment thread skills/whois/SKILL.md
Comment on lines +37 to +44
For each subscribed scope (primary first, then sidecars):

1. **Self** — short-circuits, prints your own identity.
2. **Host** — when target name matches the scope's `host_name`, reads `host_identity` cached at handshake.
3. **Local peer file** — `<scope>/peers/<target>.json` if you've paired with the target directly.
4. **Cross-peer-via-host** — single SSH read of host's `peers/<target>.json` for fellow joiners in the same room.

If primary scope misses, sibling sidecar scopes are walked (issue #134) — so a peer who's only in your `#general` sidecar resolves cleanly from a project-scope cwd.

Copilot AI Apr 27, 2026

Copy link

Choose a reason for hiding this comment

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

The “primary first, then sidecars” wording is not always accurate: cmd_whois checks the current scope first (_whois_in_scope "$AIRC_WRITE_DIR" ...), and only then walks sibling scopes (which may include the primary). Consider rephrasing to “current scope first, then sibling scopes” to match behavior when whois is invoked from a sidecar tab.

Suggested change
For each subscribed scope (primary first, then sidecars):
1. **Self** — short-circuits, prints your own identity.
2. **Host** — when target name matches the scope's `host_name`, reads `host_identity` cached at handshake.
3. **Local peer file** — `<scope>/peers/<target>.json` if you've paired with the target directly.
4. **Cross-peer-via-host** — single SSH read of host's `peers/<target>.json` for fellow joiners in the same room.
If primary scope misses, sibling sidecar scopes are walked (issue #134) — so a peer who's only in your `#general` sidecar resolves cleanly from a project-scope cwd.
For the current scope first, then sibling scopes:
1. **Self** — short-circuits, prints your own identity.
2. **Host** — when target name matches the scope's `host_name`, reads `host_identity` cached at handshake.
3. **Local peer file** — `<scope>/peers/<target>.json` if you've paired with the target directly.
4. **Cross-peer-via-host** — single SSH read of host's `peers/<target>.json` for fellow joiners in the same room.
If the current scope misses, sibling scopes are walked (issue #134) — so a peer who's only in your `#general` sidecar resolves cleanly from a project-scope cwd.

Copilot uses AI. Check for mistakes.
Comment thread skills/kick/SKILL.md
## Notes

- Kick refuses path-traversal in peer name (`../../foo` and similar). Validated before any filesystem op.
- The `[reason]` arg is currently informational only — printed by the command, not sent to the kicked peer (they're already off the wire by the time the message would arrive).

Copilot AI Apr 27, 2026

Copy link

Choose a reason for hiding this comment

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

The note says the optional [reason] is “informational only” and “not sent to the kicked peer”, but the implementation includes the reason in the [kick] ... message emitted via cmd_send (visible to the room, and potentially to the kicked peer until their connection drops). Please update this description to reflect what actually happens to the reason string.

Suggested change
- The `[reason]` arg is currently informational only — printed by the command, not sent to the kicked peer (they're already off the wire by the time the message would arrive).
- The optional `[reason]` is included in the `[kick] ...` notice sent to the room, so other peers can see it, and the kicked peer may still see it until their connection fully drops. Don't put secrets in the reason string.

Copilot uses AI. Check for mistakes.
joelteply added a commit that referenced this pull request Apr 27, 2026
#144) (#150)

fix(scope): _primary_scope_for must not strip when basename is leading-dot-only

Bug found by vhsm-d1f4 in PR #144 e2e (2026-04-27): \`airc join --general\`
silently failed to clear parted_rooms after a /part. Trace:

1. cmd_part on .airc.general writes parted_rooms=['general'] to primary's
   config.json (works — _primary_scope_for(.airc.general) → .airc, correct).
2. airc join --general triggers _force_general_sidecar=1 in cmd_connect.
3. cmd_connect calls _primary_scope_for "$AIRC_WRITE_DIR" where
   AIRC_WRITE_DIR is the PRIMARY scope ('.airc').
4. The regex 's/\.[a-z0-9-]+\$//' over-strips '.airc' (the entire basename
   IS one dot-segment) → prefix=''.
5. The 'is this a sidecar?' check (prefix != self_base) was true (since
   '' != '.airc'), so _primary_scope_for returned '<parent>/' (bogus).
6. _clear_parted_room got that bogus path, the python wrapper caught
   FileNotFoundError, sys.exit(0), silent no-op.

Net: --general printed the same "previously parted" message every time,
parted_rooms never cleared, sidecar never resubscribed. README #143 already
documented "airc join --general" as THE recovery path; would have shipped
broken-as-documented to main without the e2e catch.

## Fix

Add empty-prefix guard: if the regex eats the entire basename, the basename
was a leading-dot-only name (canonical primary scope), not a sidecar.
Return self instead of the bogus parent/empty-string concat.

## Why integration tests missed it

scenario_part_persists used fixture path '/tmp/airc-it-pp/state' /
'state.general'. Basename 'state' has no dots → regex no-ops → prefix=='state'
== self_base → primary case. The leading-dot code path was never exercised.
Real deployments use $repo/.airc — which IS leading-dot.

## Test fix

Renamed scenario_part_persists fixture from 'state' → '.airc' so the
basename matches production layout. Verified:
- pre-fix + .airc fixture: phase 4 fails (--general didn't respawn / parted_rooms didn't clear)
- post-fix + .airc fixture: 8/8 phases green

The class of bug ("test fixture diverges from real layout in a way that
hides a code path") is worth grepping for elsewhere — paths starting with
'.' are common enough that any regex over basename should account for them.
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