Repository navigation
Conversation
Reviewer's GuideImplementationResolve package-local component documentation from every restored package's skill indexes, support multiple skills and legacy extension docs, and avoid duplicate package entries.
ConfigurationBump the CLI package version to 11.0.2 alongside the feature release.
DocumentationDocument package-skill lookup behavior, source precedence and fallback, and update the agent guidance for querying component APIs.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Linked issuesChecked at commit 0ee2c22 #1324 feat(LLMsDocsCli): resolve API docs from package skills · 5 of 5 met
|
There was a problem hiding this comment.
Hey - I've found 4 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="tools/BootstrapBlazor.LLMsDocs.Cli/Services/ProjectDocsClient.cs" line_range="138" />
<code_context>
{
- entries.AddRange(ReadPackageEntries(package));
+ entries.AddRange(ReadPackageEntries(package)
+ .Where(entry => names.Add($"{package.Package}/{entry.Entry.Name}")));
}
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException)
</code_context>
<issue_to_address>
**Package documentation is indistinguishable**
When two or more restored packages index an entry with the same name, `GetAsync` selects the first matching extension entry in assets order, and `SearchAsync` collapses entries that share a generated `DocumentPath`. Callers cannot identify or select the other package’s documentation and may receive the wrong package’s API docs.
Preserve package identity in lookups and generated document paths so callers can distinguish and select entries from different packages.
Also at `tools/BootstrapBlazor.LLMsDocs.Cli/Services/ProjectDocsResolver.cs:104`, `tools/BootstrapBlazor.LLMsDocs.Cli/Services/ProjectDocsResolver.cs:118`.
</issue_to_address>
### Comment 2
<location path="tools/BootstrapBlazor.LLMsDocs.Cli/Services/ProjectDocsResolver.cs" line_range="104" />
<code_context>
- if (docs is not null)
+ var skillsRoot = Path.Combine(packageRoot, "skills");
+ var docs = Directory.Exists(skillsRoot)
+ ? Directory.GetDirectories(skillsRoot).Order(StringComparer.Ordinal)
+ .Where(p => File.Exists(Path.Combine(p, "SKILL.md"))
+ && File.Exists(Path.Combine(p, "references", "llms.txt")))
</code_context>
<issue_to_address>
**One package’s docs hide all local docs**
When enumerating a package’s skills directory fails, including after another package has already been resolved, `Directory.GetDirectories` throws, and `Resolve` catches the exception around the entire `ReadPackages` call and returns an empty package list. Lookups then use online docs instead of local docs.
Handle skills-directory enumeration errors per package so one failure does not discard packages already resolved or prevent resolving others.
</issue_to_address>
### Comment 3
<location path="tools/BootstrapBlazor.LLMsDocs.Cli/Services/ProjectDocsResolver.cs" line_range="109-118" />
<code_context>
+ && File.Exists(Path.Combine(p, "references", "llms.txt")))
+ .Select(p => Path.Combine(p, "references")).ToArray()
+ : [];
+ if (docs.Length == 0 && !core)
{
- packages.Add(new PackageDocs(name, item.Name[(separator + 1)..], docs, !core));
+ var legacyDocs = Path.Combine(packageRoot, "docs", "llms");
+ if (File.Exists(Path.Combine(legacyDocs, "llms.txt")))
+ {
+ docs = [legacyDocs];
+ }
}
+ packages.AddRange(docs.Select(directory => new PackageDocs(name, item.Name[(separator + 1)..], directory, !core)));
break;
}
}
</code_context>
<issue_to_address>
**Later package docs are skipped**
When the same package path exists in multiple package folders and the first copy has no usable docs, the unconditional `break` stops the package-folder scan before later copies are checked, so local lookup falls back online instead of using the later copy’s docs.
Continue scanning when the current copy yields no usable docs, and break only after usable docs are found.
</issue_to_address>
### Comment 4
<location path="tools/BootstrapBlazor.LLMsDocs.Cli/Services/ProjectDocsResolver.cs" line_range="118" />
<code_context>
+ }
}
+ packages.AddRange(docs.Select(directory => new PackageDocs(name, item.Name[(separator + 1)..], directory, !core)));
break;
}
}
</code_context>
<issue_to_address>
**Package index links point nowhere**
When a caller runs `bb-llms index` with a project package that supplies skill-based docs and follows one of its links, `IndexAsync` emits each local entry’s `DocumentPath`, but `ReadPackageEntries` sets that path to `components/<name>.txt` or `extensions/<name>.txt` rather than the skill document’s path under `references`. Following links in the printed index therefore fails for entries newly discovered from package skills.
Preserve a usable relative document path for each local entry, or emit links that point to the actual package documentation files.
</issue_to_address>| { | ||
| entries.AddRange(ReadPackageEntries(package)); | ||
| entries.AddRange(ReadPackageEntries(package) | ||
| .Where(entry => names.Add($"{package.Package}/{entry.Entry.Name}"))); |
There was a problem hiding this comment.
🟡 Medium · Package documentation is indistinguishable
When two or more restored packages index an entry with the same name, GetAsync selects the first matching extension entry in assets order, and SearchAsync collapses entries that share a generated DocumentPath. Callers cannot identify or select the other package’s documentation and may receive the wrong package’s API docs.
Preserve package identity in lookups and generated document paths so callers can distinguish and select entries from different packages.
Also at tools/BootstrapBlazor.LLMsDocs.Cli/Services/ProjectDocsResolver.cs:104, tools/BootstrapBlazor.LLMsDocs.Cli/Services/ProjectDocsResolver.cs:118.
Prompt for AI agents
In `tools/BootstrapBlazor.LLMsDocs.Cli/Services/ProjectDocsClient.cs` at line 138:
**Package documentation is indistinguishable**
When two or more restored packages index an entry with the same name, `GetAsync` selects the first matching extension entry in assets order, and `SearchAsync` collapses entries that share a generated `DocumentPath`. Callers cannot identify or select the other package’s documentation and may receive the wrong package’s API docs.
Preserve package identity in lookups and generated document paths so callers can distinguish and select entries from different packages.
Also at `tools/BootstrapBlazor.LLMsDocs.Cli/Services/ProjectDocsResolver.cs:104`, `tools/BootstrapBlazor.LLMsDocs.Cli/Services/ProjectDocsResolver.cs:118`.| if (docs is not null) | ||
| var skillsRoot = Path.Combine(packageRoot, "skills"); | ||
| var docs = Directory.Exists(skillsRoot) | ||
| ? Directory.GetDirectories(skillsRoot).Order(StringComparer.Ordinal) |
There was a problem hiding this comment.
🟡 Medium · One package’s docs hide all local docs
When enumerating a package’s skills directory fails, including after another package has already been resolved, Directory.GetDirectories throws, and Resolve catches the exception around the entire ReadPackages call and returns an empty package list. Lookups then use online docs instead of local docs.
Handle skills-directory enumeration errors per package so one failure does not discard packages already resolved or prevent resolving others.
Prompt for AI agents
In `tools/BootstrapBlazor.LLMsDocs.Cli/Services/ProjectDocsResolver.cs` at line 104:
**One package’s docs hide all local docs**
When enumerating a package’s skills directory fails, including after another package has already been resolved, `Directory.GetDirectories` throws, and `Resolve` catches the exception around the entire `ReadPackages` call and returns an empty package list. Lookups then use online docs instead of local docs.
Handle skills-directory enumeration errors per package so one failure does not discard packages already resolved or prevent resolving others.| if (docs.Length == 0 && !core) | ||
| { | ||
| packages.Add(new PackageDocs(name, item.Name[(separator + 1)..], docs, !core)); | ||
| var legacyDocs = Path.Combine(packageRoot, "docs", "llms"); | ||
| if (File.Exists(Path.Combine(legacyDocs, "llms.txt"))) | ||
| { | ||
| docs = [legacyDocs]; | ||
| } | ||
| } | ||
| packages.AddRange(docs.Select(directory => new PackageDocs(name, item.Name[(separator + 1)..], directory, !core))); | ||
| break; |
There was a problem hiding this comment.
🟡 Medium · Later package docs are skipped
When the same package path exists in multiple package folders and the first copy has no usable docs, the unconditional break stops the package-folder scan before later copies are checked, so local lookup falls back online instead of using the later copy’s docs.
Continue scanning when the current copy yields no usable docs, and break only after usable docs are found.
Prompt for AI agents
In `tools/BootstrapBlazor.LLMsDocs.Cli/Services/ProjectDocsResolver.cs` at lines 109-118:
**Later package docs are skipped**
When the same package path exists in multiple package folders and the first copy has no usable docs, the unconditional `break` stops the package-folder scan before later copies are checked, so local lookup falls back online instead of using the later copy’s docs.
Continue scanning when the current copy yields no usable docs, and break only after usable docs are found.| } | ||
| } | ||
| packages.AddRange(docs.Select(directory => new PackageDocs(name, item.Name[(separator + 1)..], directory, !core))); | ||
| break; |
There was a problem hiding this comment.
🟡 Medium · Package index links point nowhere
When a caller runs bb-llms index with a project package that supplies skill-based docs and follows one of its links, IndexAsync emits each local entry’s DocumentPath, but ReadPackageEntries sets that path to components/<name>.txt or extensions/<name>.txt rather than the skill document’s path under references. Following links in the printed index therefore fails for entries newly discovered from package skills.
Preserve a usable relative document path for each local entry, or emit links that point to the actual package documentation files.
Prompt for AI agents
In `tools/BootstrapBlazor.LLMsDocs.Cli/Services/ProjectDocsResolver.cs` at line 118:
**Package index links point nowhere**
When a caller runs `bb-llms index` with a project package that supplies skill-based docs and follows one of its links, `IndexAsync` emits each local entry’s `DocumentPath`, but `ReadPackageEntries` sets that path to `components/<name>.txt` or `extensions/<name>.txt` rather than the skill document’s path under `references`. Following links in the printed index therefore fails for entries newly discovered from package skills.
Preserve a usable relative document path for each local entry, or emit links that point to the actual package documentation files.
Link issues
fixes #1324
Summary By Copilot
Read API documentation from every BootstrapBlazor package restored by the selected project, using each package skill's
references/llms.txtto resolve component names and document paths. Support multiple skills per package, retain legacy extension docs and online fallback, and update CLI guidance. Bump the CLI to 11.0.2.Regression?
Existing source precedence and online fallback remain; package-local lookups now include skill-based docs.
Risk
Automatic local lookup now covers all restored BootstrapBlazor packages. Legacy extension documentation remains supported, and unrelated packages in the global NuGet cache are not selected.
Verification
Manual (required)
Automated
dotnet pack .\tools\BootstrapBlazor.LLMsDocs.Cli\BootstrapBlazor.LLMsDocs.Cli.csproj -c Release --no-restore -v:q— passed.dotnet new classlib --framework net11.0 --no-restore -o $temp --force— passed; temporary consumer project created.dotnet add (Join-Path $temp 'bb-llms-pr-smoke.csproj') package BootstrapBlazor.DockView --version 11.0.1— passed.dotnet run --project .\tools\BootstrapBlazor.LLMsDocs.Cli\BootstrapBlazor.LLMsDocs.Cli.csproj -c Release --no-build -- get DockViewV2 --project (Join-Path $temp 'bb-llms-pr-smoke.csproj') --framework net11.0— passed; resolvedDockViewV2.txtfromBootstrapBlazor.DockView 11.0.1.git diff --check origin/master...HEAD— passed.No dedicated automated test project was run.
Packaging changes reviewed?
Updated the CLI package version to 11.0.2 and verified
dotnet pack.☑️ Self Check before Merge
Summary by Sourcery
Resolve BootstrapBlazor API documentation from the skills shipped with packages restored by the current project while retaining legacy documentation and online fallbacks.
New Features:
references/llms.txtfiles in the BootstrapBlazor packages restored by the selected project, including extension packages and multiple skills per package.Bug Fixes:
Enhancements:
docs/llmsdocumentation when skill indexes are unavailable.Build:
Documentation:
Tests: