feat(catalog): clone-on-first-run — remove bundled corpus baseline#67
Open
msitarzewski wants to merge 1 commit into
Open
feat(catalog): clone-on-first-run — remove bundled corpus baseline#67msitarzewski wants to merge 1 commit into
msitarzewski wants to merge 1 commit into
Conversation
The app bundled a snapshot of the agent catalog (`resources/corpus-baseline`,
~210 files) and seeded it into app-data as the default `Bundled` source. That
snapshot perpetually drifted from the catalog — it had fallen 29 agents behind
and missed a flat→nested game-dev restructure — and re-vendoring it by hand was
a recurring chore that still shipped stale on fresh installs.
Drop the bundle entirely and make the app clone the live catalog instead:
- Remove `CatalogSource::Bundled` (backend + TS) and the baseline seed path
(`seed_from_baseline`, `baseline_dir`, the `resolve_active` baseline param).
The default source is now a managed clone at `~/.agency-agents`, empty until
provisioned. `resolve_active` just indexes the active root and degrades to an
empty "no agents" corpus (never panics) before the first clone completes.
- Delete `resources/corpus-baseline/` and its bundle entry in tauri.conf.json
(both `git clone` and the codeload tarball fallback already fetch from
GitHub, so nothing else used it). ~58k fewer lines in the repo/binary.
- First run: `CatalogFirstRun` now offers "Download from GitHub" (the emphasized
default; needs network) and "Use my own clone" (offline/existing escape
hatch). The Bundled card + the Settings switcher's Bundled option are gone.
- Migration: `catalog_configured` now returns false when the persisted source
can't be parsed as a current variant, so a pre-existing `{"kind":"bundled"}`
re-shows the first-run picker instead of stranding the user in an empty app.
This eliminates baseline drift at the root (fresh clones always have every
division, incl. gis/healthcare/strategy — so the empty-division + Runbooks
"sync to unlock" problems simply don't occur) and removes the app↔catalog
snapshot-coordination question.
Tradeoff: first run now needs network (or a local clone), by design.
Tests: replace the bundled-baseline tests with resolve_active_indexes_the_clone,
unprovisioned_source_serves_empty_corpus, and a migration assertion in the
source-persistence test. cargo test 270 passing; npm run check clean; build
clean. Reworked first-run modal verified visually against the component styles.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WdX6PvnCfRgYD11yVpXVor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The app bundled a snapshot of the agent catalog (
resources/corpus-baseline, ~210 files) and seeded it as the defaultBundledsource. That snapshot perpetually drifted — this week it was 29 agents behind and missed a flat→nested game-dev restructure — and re-vendoring it by hand still shipped stale on fresh installs.This drops the bundle entirely and makes the app clone the live catalog instead. Replaces the closed #61 (re-vendoring) with a fix at the root.
Changes
CatalogSource::Bundled(Rust + TS) and the baseline seed path (seed_from_baseline,baseline_dir, theresolve_activebaseline param). Default source is now a managed clone at~/.agency-agents, empty until provisioned;resolve_activeindexes the active root and degrades to an empty "no agents" corpus (never panics) before the first clone.resources/corpus-baseline/+ itstauri.conf.jsonbundle entry. Both existing fallbacks (git clone, codeload tarball) already fetch from GitHub, so nothing else used it. ~58k fewer lines, smaller binary.CatalogFirstRunnow offers Download from GitHub (emphasized default; needs network) and Use my own clone (offline/existing escape hatch). Bundled card + the Settings switcher's Bundled option removed.catalog_configuredreturns false when the persisted source can't parse as a current variant, so a pre-existing{"kind":"bundled"}re-shows the first-run picker instead of stranding the user in an empty app.Why
Eliminates baseline drift at the root — a fresh clone always has every division (gis/healthcare/strategy included), so empty divisions and Runbooks "sync to unlock" simply don't occur — and dissolves the app↔catalog snapshot-coordination question.
Tradeoff: first run needs network (or a local clone), by design. Small user base, clear consent prompt.
Verification
cargo test→ 270 passing. Newresolve_active_indexes_the_clone,unprovisioned_source_serves_empty_corpus, and a{"kind":"bundled"}→re-prompt migration assertion. Clean build, no warnings.npm run check0 errors; build clean.git clonethat already works.Related
🤖 Generated with Claude Code