Skip to content

feat(scribe): add solution-local analyzer support (auto-pack & inject without LocalScribe)#9

Merged
crazycrank merged 5 commits into
masterfrom
copilot/add-solution-local-analyzer-support
Apr 6, 2026
Merged

feat(scribe): add solution-local analyzer support (auto-pack & inject without LocalScribe)#9
crazycrank merged 5 commits into
masterfrom
copilot/add-solution-local-analyzer-support

Conversation

Copilot AI commented Apr 6, 2026

Copy link
Copy Markdown
Contributor
  • Audit implementation vs documentation for solution-local analyzers
  • Audit SDK approach documentation (Sdk.props, Sdk.targets, Scribe.Sdk.csproj, all docs)
  • Fix Scribe.Sdk.csproj XML header comment — mention SolutionAnalyzer alongside LocalDev
  • Fix Scribe.Sdk.csproj <Description> — mention SolutionAnalyzer alongside LocalDev
  • Fix trailing separator issue — normalise $(ArtifactsPath) via EnsureTrailingSlash in .props and .targets (review comment fix(scribe): fix bug in using resolution #1 and feat(scribe): the local dev flow is now configured with a .localscrib… #3)
  • Fix version source — prefer $(NuGetPackageVersion) with fallback to $(PackageVersion) in .targets (review comment Feat/cleanup #2)
  • Update architecture docs to reflect normalisation step and version source
  • Verify build (0 warnings, 0 errors) and tests (88 passed)

Copilot AI changed the title [WIP] Add solution-local analyzer support for auto-pack and inject feat(scribe): add solution-local analyzer support (auto-pack & inject without LocalScribe) Apr 6, 2026
Copilot AI requested a review from crazycrank April 6, 2026 05:35
…on-local analyzers

Agent-Logs-Url: https://github.com/BulletsForHumanity/Scribe/sessions/a0a87e65-138d-464f-bb3a-d0393d5bfd40

Co-authored-by: crazycrank <11194014+crazycrank@users.noreply.github.com>
@crazycrank crazycrank marked this pull request as ready for review April 6, 2026 06:30
Copilot AI review requested due to automatic review settings April 6, 2026 06:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds first-class solution-local analyzer support to the Scribe SDK so analyzer/generator projects inside the same solution can auto-pack on build, publish into the solution’s artifacts directory, and be consumed via normal PackageReference without LocalDev / .localscribe.

Changes:

  • Introduces ScribeSolutionAnalyzer=true workflow: timestamp versioning (0.0.0-dev.yyyyMMddHHmmss), auto-pack-on-build, and artifacts/packages output.
  • Generates per-analyzer *.Directory.Packages.targets override files after packing (LocalDev-style pinning via wildcard import).
  • Updates SDK wiring and documentation to describe setup, mechanics, and infrastructure architecture.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Scribe/build/Scribe.SolutionAnalyzer.props Adds early-phase MSBuild properties for solution-local analyzers (timestamp version, auto-pack, artifacts output, restore source).
Scribe/build/Scribe.SolutionAnalyzer.targets Adds late-phase target to generate a PackageVersion Update override file after Pack.
Scribe.Sdk/Sdk/Sdk.props Imports the SolutionAnalyzer props into the SDK early phase.
Scribe.Sdk/Sdk/Sdk.targets Imports the SolutionAnalyzer targets into the SDK late phase.
Scribe.Sdk/Scribe.Sdk.csproj Packs SolutionAnalyzer props/targets into the SDK NuGet package.
Scribe.Sdk/README.md Documents the new ScribeSolutionAnalyzer=true workflow and links to the full guide.
README.md Adds Solution-Local Analyzers to the component table and documentation index.
docs/solution-local-analyzers.md New/rewritten full setup guide and rationale for the workflow.
docs/project-setup.md Adds a Solution-Local Analyzers section pointing to the dedicated guide.
docs/architecture-infrastructure.md Updates infrastructure architecture to include SolutionAnalyzer alongside LocalDev.

Comment on lines +75 to +77
<PropertyGroup Condition="'$(ScribeSolutionAnalyzer)' == 'true' and '$(ArtifactsPath)' != ''">
<PackageOutputPath>$(ArtifactsPath)packages\</PackageOutputPath>
</PropertyGroup>

Copilot AI Apr 6, 2026

Copy link

Choose a reason for hiding this comment

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

PackageOutputPath is built by string-concatenating $(ArtifactsPath) and packages\. This assumes $(ArtifactsPath) already ends with a directory separator; if a consuming solution sets ArtifactsPath without a trailing slash, output and restore paths become invalid (e.g. C:\repo\.artifactspackages\). Consider normalising ArtifactsPath to a guaranteed trailing separator (or introducing an internal _ScribeSaArtifactsDir with a trailing slash) and using that for PackageOutputPath and RestoreAdditionalProjectSources.

Copilot uses AI. Check for mistakes.
and '$(ArtifactsPath)' != ''"
>
<PropertyGroup>
<_ScribeSaVersion>$(PackageVersion)</_ScribeSaVersion>

Copilot AI Apr 6, 2026

Copy link

Choose a reason for hiding this comment

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

The override file pins to $(PackageVersion), but Pack ultimately uses the normalised $(NuGetPackageVersion) (and LocalDev already prefers that with a fallback). If these ever differ (e.g., version normalisation or an injected suffix), the generated .Directory.Packages.targets could pin a version that doesn’t match the produced .nupkg. Consider reading $(NuGetPackageVersion) first and falling back to $(PackageVersion) (mirroring Scribe.LocalDev.targets).

Suggested change
<_ScribeSaVersion>$(PackageVersion)</_ScribeSaVersion>
<_ScribeSaVersion Condition="'$(NuGetPackageVersion)' != ''">$(NuGetPackageVersion)</_ScribeSaVersion>
<_ScribeSaVersion Condition="'$(_ScribeSaVersion)' == ''">$(PackageVersion)</_ScribeSaVersion>

Copilot uses AI. Check for mistakes.
Comment on lines +31 to +33
<_ScribeSaVersion>$(PackageVersion)</_ScribeSaVersion>
<_ScribeSaOverridePath>$(ArtifactsPath)$(PackageId).Directory.Packages.targets</_ScribeSaOverridePath>
</PropertyGroup>

Copilot AI Apr 6, 2026

Copy link

Choose a reason for hiding this comment

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

_ScribeSaOverridePath is formed as $(ArtifactsPath)$(PackageId)..., which assumes $(ArtifactsPath) ends with a directory separator. If it doesn’t, the override file will be written to an unintended path/name. Consider using a normalised artifacts directory property with a guaranteed trailing slash (or System.IO.Path::Combine) before concatenating.

Copilot uses AI. Check for mistakes.
@crazycrank crazycrank merged commit caadfb9 into master Apr 6, 2026
1 check passed
@crazycrank crazycrank deleted the copilot/add-solution-local-analyzer-support branch April 6, 2026 07:44
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.

feat: solution-local analyzer support (auto-pack & inject without LocalScribe)

3 participants