feat: cross-platform alias enrichment via JSONL#83
Conversation
Add support for operator-curated state/people.jsonl and state/channels.jsonl files that enrich the auto-populated phone book with cross-platform aliases (Bluesky, email, Google Docs, nicknames). The merged aliases are injected as a [PEOPLE] + [CHANNELS] block in every turn prompt, giving agents always-visible context about who is who across platforms — structurally preventing attribution errors from mismatched display names. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@strix-tkellogg we need a better process in here for upgrading their current phone book into jsonl so it doesn't crap out |
Addresses Tim's feedback on PR #83 — existing operators need a smooth upgrade from auto-populated phone books to JSONL enrichment. - `export_to_jsonl()`: generates starter people.jsonl + channels.jsonl from existing phone-book.md with placeholder fields for cross-platform aliases. Never overwrites existing files. - `open-strix export-phone-book` CLI command for operators to run the migration before adding Bluesky/email/docs aliases manually. - Logging in `_load_jsonl()`: warns on malformed JSON lines with line numbers instead of silently skipping. - 4 new tests (export, skip-existing, roundtrip, malformed-warning). 49 total pass. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Good call — pushed a fix (56d4d3b). What's new:
Upgrade path for existing operators: open-strix export-phone-book --home /path/to/agent
# Edit the generated JSONL files to add cross-platform aliases
# Restart — enrichment happens automatically at startup4 new tests + roundtrip test (export → enrich from exported files). 214 pass, 1 skipped. |
Merged upstream changes: - PR tkellogg#80: Cycle detection prompts reflection instead of just stopping - PR tkellogg#81: Five-whys integration into harness failure paths - PR tkellogg#82: Five-whys chainlink docs - PR tkellogg#83: Phone book → JSONL migration + alias enrichment Conflict resolution: - app.py: Kept both _withhold_final_text (ours) and _last_turn_failure (upstream) - prompts.py: Preserved auto-send model while adding aliases/failure sections - tools.py: Added missing file tools to tools list (read_file, glob_files, edit_file, write_file) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary
state/people.jsonlandstate/channels.jsonlsupport for operator-curated cross-platform aliases (Bluesky, email, Google Docs names, channel nicknames)[PEOPLE]+[CHANNELS]block in every turn prompt — agents always see who is who across platformsHow it works
enrich_from_jsonl()merges JSONL records into phone book entries by Discord IDrender_aliases_block()formats a compact reference blockrender_turn_prompt()includes the block as section 6Files changed
phone_book.py— JSONL loading, enrichment, alias renderingconfig.py—people_jsonl/channels_jsonlpaths onRepoLayoutapp.py— enrichment at startup, aliases in promptprompts.py—aliases_blockparameter, system prompt updatetests/test_phone_book.py— 13 new tests (45 total, all passing)Test plan
🤖 Generated with Claude Code