Skip to content

refactor: fold BreadcrumbSource into KNOWN_AGENTS#4

Merged
baldawarishi merged 3 commits intoblock:mainfrom
baldawarishi:fold-breadcrumb-source-into-known-agents
Feb 13, 2026
Merged

refactor: fold BreadcrumbSource into KNOWN_AGENTS#4
baldawarishi merged 3 commits intoblock:mainfrom
baldawarishi:fold-breadcrumb-source-into-known-agents

Conversation

@baldawarishi
Copy link
Collaborator

@baldawarishi baldawarishi commented Feb 12, 2026

Summary

  • Moves breadcrumb_dir and breadcrumb_ext fields directly into the Agent struct, eliminating the separate BreadcrumbSource struct and SOURCES constant
  • Removes the find_agent() helper that matched agents by email prefix — no longer needed since we iterate KNOWN_AGENTS directly
  • Makes it easier to add breadcrumb support for new agents by keeping all agent metadata in one place
  • Simplifies the breadcrumb fallback section in README

Addresses #3 (comment)

Test plan

  • cargo test — all 16 tests pass
  • ./scripts/aittributor --debug — breadcrumb fallback still works correctly

🤖 Generated with Claude Code

Move breadcrumb_dir and breadcrumb_ext fields directly into the Agent
struct, eliminating the separate BreadcrumbSource struct and SOURCES
constant. This makes it easier to add breadcrumb support for new agents
by keeping all agent metadata in one place.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment on lines +86 to +87
breadcrumb_dir: None,
breadcrumb_ext: None,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

can also make None default to remove these, but I suspect we'd be able to fill most of these in, so left them as is for now.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, agree.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@baldawarishi
Copy link
Collaborator Author

Also skipped version bump as v0.3.0 isn't released yet.

Comment on lines +86 to +87
breadcrumb_dir: None,
breadcrumb_ext: None,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, agree.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@baldawarishi baldawarishi merged commit 6e5d421 into block:main Feb 13, 2026
5 checks passed
@alecthomas
Copy link
Collaborator

@baldawarishi bumped to v0.3.0

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