Repository navigation
Adding assembly name gen class - #39
Merged
Merged
Conversation
Skills are now authored in a tracked repository-root skills/ folder. The .agents/
mirror is gitignored in every consuming repository, so it is absent from a git
clone and cannot be the source the skills CLI reads.
ResolvePurviewSkillSources maps restored packages to their git source and commit
using metadata the package already carries - .agents/skills/* and the nuspec
<repository url commit /> element - so no custom skills.json is introduced and the
resolved ref matches the restored package version. A package that cannot be pinned
is reported (PRSKL0002), never installed from a guessed default branch.
ListPurviewSkills and InstallPurviewSkills are explicit targets with no
BeforeTargets/AfterTargets, so an ordinary restore or build installs nothing.
Installation is delegated to the skills CLI, which owns the agent-specific
destinations and the lockfile. The CLI is detected on PATH ('skills', then 'npx')
and a missing one is PRSKL0004 naming the fix rather than a raw shell error.
PurviewSkillsToPack lets one repository ship different skills in different
packages; PurviewSkillsSource installs from an explicit git source.
A malformed skill fails quietly where it hurts most: the skills CLI skips a SKILL.md whose frontmatter it cannot parse, so the skill never appears and a consumer cannot tell that from one that was never written. ValidatePurviewSkills checks that every skill folder has a SKILL.md, that it opens with frontmatter carrying name and description, that the name matches the folder, and that every references/ link resolves. IncludePurviewSkillsInPackage depends on it, so the repository that owns the skill sees the failure (PRSKL0005) rather than shipping it. PurviewSkillsToPack scopes the check so one project is not failed by another project's skill.
The policy and its enforcement lived inside one repository's test project, so any other repo could only adopt them by copying five C# files plus a schema - about sixty files across the ecosystem, each free to drift. That is the DRY failure the policy itself exists to prevent. Three layers, separated so the rules are testable without a repository on disk: ArchitecturePolicy/ProjectGraph read the policy and the csproj graph; ArchitecturePolicyEvaluator holds the rules and returns typed violations per rule; PurviewArchitectureTests is a thin TUnit base class over it. The evaluator takes an in-memory graph, so each rule is tested as a three-project fixture. Adoption is a policy file and one derived class. [InheritsTests] is required and load-bearing: TUnit does not walk base types during discovery, so without it the class compiles, the run is green and nothing is enforced. InheritedBaseClassTests proves discovery works against a temporary fixture repository. The schema is embedded for offline validation and published at its raw GitHub URL for editors, mirroring how Purview.Build ships purview-build.schema.json.
Two discovery defects, both of which produced a fully green architecture suite that checked nothing - the worst result this package can give. ProjectGraph hardcoded 'src' and returned an empty graph when it was absent. An empty graph satisfies every rule by construction, so a repository with any other layout enforced nothing. Source roots are now configurable via 'sourceRoots' in the policy (default ["src"], empty array scans the repository root), and emptiness is itself a violation: the new graphDiscovery rule runs before the rules it protects and names the folders that were searched. RepositoryRoot walked up from the test binary with no upper bound, so a policy in a parent folder - a sibling checkout, or a stray file in the directory everything is cloned into - would be found and silently applied to the wrong repository. The walk now stops at the .git boundary and says so.
kieronlanning
enabled auto-merge
October 15, 2026 15:21
kieronlanning
disabled auto-merge
October 15, 2026 15:23
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.
No description provided.