Repository blueprint suggestions — Deep Dive
The Suggested blueprint flow recommends a catalog blueprint for a GitHub repository before the project is created. It is intentionally lightweight: the API reads repository signals from GitHub, maps those signals to one of the existing catalog blueprint ids, and returns a normal BlueprintDto for the create dialog to apply. It does not call a model; generation remains the separate Generate tab.
For the API contract see the reference; for the user flow see the experience guide.
End-to-end flow

- The dialog has a repository.
CreateFromGitHubDialogkeeps the active repository ind.sourceRepositoryand passes it into the sharedBlueprintPanel, whose tab strip starts the GitHub flow onsuggested(apps/web/src/pages/ProjectGalleryPage.tsx:676,apps/web/src/components/BlueprintPicker.tsx:371). - The client calls the new endpoint.
SuggestedBlueprintPanelcallsapiClient.suggestBlueprint(normalizedRepo)only when the tab is active and the repo string is non-empty (apps/web/src/components/BlueprintPicker.tsx:301,:305). The client method posts{ "repository": "owner/repo" }to/blueprints/suggest(apps/web/src/api/client.ts:186). - The endpoint validates shape and identity.
POST /api/blueprints/suggestrejects blankrepositorywith400, resolves the authenticated caller, and passescaller.Userto the suggestion service (apps/Agentweaver.Api/Endpoints/BlueprintEndpoints.cs:53,:59,:63). - The service parses GitHub coordinates.
TryParseOwnerRepoacceptsowner/repo, a GitHub URL, and a.gitsuffix, then normalizes to owner and repo strings (apps/Agentweaver.Api/Blueprints/GitHubRepoBlueprintSuggestionService.cs:17,:116). - GitHub is read using the submitting user scope. The service resolves the caller's GitHub token scope, gets a valid access token, and sends GitHub REST requests with
User-Agent,Accept: application/vnd.github+json, and a bearer token when available (GitHubRepoBlueprintSuggestionService.cs:48,:104). - Repository signals are collected. The service reads repository metadata, languages, and root contents (
GitHubRepoBlueprintSuggestionService.cs:51,:58,:62).BuildSignalsexposes description, up to five topics, top languages, up to eight root files, and whether issues are enabled (GitHubRepoBlueprintSuggestionService.cs:132). - Signals are mapped to catalog blueprint ids.
PickBlueprintscores text from name, description, topics, languages, and root file names. AI/LLM signals map toblueprint-ai-agent-engineering; docs/content-only signals map toblueprint-content-authoring; product/design-only signals map toblueprint-product-management; codebase signals or any non-Markdown language map toblueprint-software-development(GitHubRepoBlueprintSuggestionService.cs:149,:163,:167,:171,:175). - Catalog lookup is safe. If the mapped id is missing, the service falls back to
blueprint-software-development, then the first available catalog blueprint (GitHubRepoBlueprintSuggestionService.cs:70). If GitHub analysis fails or no templates exist, the response setsfallback: trueand confidence0(GitHubRepoBlueprintSuggestionService.cs:89,:93). The UI renders a warning plus View all templates →, which switches to the shared Templates tab rather than blocking project creation (BlueprintPicker.tsx:323,:371).
Shared dialog and personal repository source
The suggestion panel is now one tab inside the shared Blueprint panel used by both new-project dialogs. Blank projects use Generated | Templates; GitHub projects use Suggested | Templates | Generate. The Templates tab is the same StarterTemplatesSection in both flows, and every compact View all templates → control routes to setSelectedTab('templates') (apps/web/src/components/BlueprintPicker.tsx:209, :222, :371; apps/web/src/pages/ProjectGalleryPage.tsx:405, :676).
The GitHub-side source list includes the signed-in user's personal account before organizations. The backend's GET /api/github/accounts builds a first GitHubAccountResponse from GET https://api.github.com/user with type: "user", then appends orgs from /user/orgs; the UI displays @{login} with a You badge for that first entry (apps/Agentweaver.Api/Endpoints/AuthEndpoints.cs:207, :249, :276; apps/web/src/pages/ProjectGalleryPage.tsx:642). When that account is selected, GET /api/github/repos?account=<login> is routed to GitHub /user/repos?affiliation=owner, so repository search and recent rows include personal repos (AuthEndpoints.cs:295, :333; apps/web/src/pages/ProjectGalleryPage.tsx:501, :625).
Why this is separate from generation
Suggestion chooses from catalog blueprints and returns quickly from GitHub metadata. Generation uses a natural-language description and may produce an inline blueprint plus generated workflow YAML. Keeping the tabs separate makes the user choice clear: Suggested means "best matching starter template for this repo," Templates means manual catalog choice, and Generate means bespoke blueprint from a prompt (apps/web/src/pages/ProjectGalleryPage.tsx:676, apps/web/src/components/BlueprintPicker.tsx:236, :279).
Fallback behavior
Fallback is a product feature, not just an exception handler. A parse failure, unavailable GitHub metadata, canceled or failed GitHub calls, or an empty catalog returns a valid SuggestBlueprintResponse with fallback: true, confidence: 0, a rationale, no signals, and (when possible) the first catalog blueprint (GitHubRepoBlueprintSuggestionService.cs:42, :55, :89, :93). The UI renders a warning and a route to the Templates tab rather than blocking project creation (BlueprintPicker.tsx:323, :371).
Source
| Concern | File |
|---|---|
Suggested endpoint route and 400 blank-repository validation | apps/Agentweaver.Api/Endpoints/BlueprintEndpoints.cs:53 |
| Suggest request/response wire fields | apps/Agentweaver.Api/Blueprints/BlueprintDtos.cs:111 |
| GitHub repo parsing, signal collection, catalog mapping, fallback | apps/Agentweaver.Api/Blueprints/GitHubRepoBlueprintSuggestionService.cs:17 |
| DI registration | apps/Agentweaver.Api/Program.cs:603 |
| Web client method | apps/web/src/api/client.ts:186 |
| Frontend response type | apps/web/src/api/types.ts:219 |
| Suggested tab rendering and fallback UI | apps/web/src/components/BlueprintPicker.tsx:279 |
| Shared Blueprint panel, tab strip, and Templates routing | apps/web/src/components/BlueprintPicker.tsx:371 |
| Create-from-GitHub tab wiring | apps/web/src/pages/ProjectGalleryPage.tsx:676 |
| Personal GitHub account and repository endpoints | apps/Agentweaver.Api/Endpoints/AuthEndpoints.cs:207 |
