You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actionable follow-up to the hybrid-public-API decision in #156. This issue covers the pre-lock cleanup that must land before #131 starts the gitbook write-up.
Scope
Two phases. Phase A (dead-method removal) is deferred to CY27 per the project's "improve before audience-reducing changes" guiding principle, tracked separately.
Phase B — Boundary-leak facade methods
The audit under #156 found two cmdlet patterns that bypass the Client facade. Add facade methods, migrate consumers, internalize the previously-leaked types/methods.
Add Client.Selection.GetShapeDimensions(TargetShapes) returning List<Models.ShapeDimensions> (placement-of-convenience; a dedicated ShapeCommands is a larger architectural question, deferred)
Mark the static factory methods internal. Keep the PageDimensions / ShapeDimensions types public (they are return values)
Phase C — Enforcement layer
Apply the layered enforcement strategy from #156 Q2.
Mark VisioScripting.Helpers/* types internal (5 files: ArrangeHelper, InteropHelper, ReflectionHelper, SelectionHelper, TextHelper, WildcardHelper). Add [InternalsVisibleTo(...)] for VisioPowerShell and the four test projects (VTest, VTest.Models, VTest.Scripting, VTest.PowerShell). Relocate the one external test of WildcardHelper to VTest's internal-test scope or use the InternalsVisibleTo path
Mark CommandTarget and CommandTargetFlagsinternal
Mark Client.GetCommandTarget(flags) either internal or, if that breaks the *Commands plumbing, public with [EditorBrowsable(Never)] and an XML doc comment
Sweep VisioScripting.Models/* for any types not appearing in any public signature, mark them internal
Add [EditorBrowsable(Never)] + XML doc comments to any types that have to stay public for signature reasons but are not part of the contract
Write ADR at docs/decisions/visioscripting-public-api.md capturing the hybrid contract — what is in, what is out, the enforcement layers, and the rationale (point at the #156 decision comment)
Add a paragraph to CLAUDE.md per-commit conventions section noting that public surface changes on VisioScripting.Client / *Commands classes are breaking changes
Out of scope
Phase A — dead-method removal. ~36 unused public methods + dead LayerCommands class + 4 unused OutputCommands methods + ContainerrCommands.cs filename typo. Tracked in the CY27 follow-up issue (filed alongside this one).
PublicAPI.Shipped.txt analyzer. Deferred per #156 Q2; can be added later if drift becomes a real problem.
Architectural question "should there be a ShapeCommands class?" Deferred.
Acceptance
All Phase B and Phase C task-list items above checked off
Build clean across the solution
All 230 tests still pass
ADR landed
CLAUDE.md updated
Blocks
#131 (document VisioScripting.Client on gitbook). After this lands, #131 writes against the locked surface.
Actionable follow-up to the hybrid-public-API decision in #156. This issue covers the pre-lock cleanup that must land before #131 starts the gitbook write-up.
Scope
Two phases. Phase A (dead-method removal) is deferred to CY27 per the project's "improve before audience-reducing changes" guiding principle, tracked separately.
Phase B — Boundary-leak facade methods
The audit under #156 found two cmdlet patterns that bypass the
Clientfacade. Add facade methods, migrate consumers, internalize the previously-leaked types/methods.Loaders leak (
VisioScripting.Loaders.*.LoadFromXml(...)):Client.Model.LoadDirectedGraphFromXml(XDocument)returningDirectedGraphDocumentClient.Model.LoadOrgChartFromXml(XDocument)returningOrgChartDocumentImportVisioModel.csto call the new facade methodsVTest.Models/that callDirectedGraphDocumentLoader.LoadFromXml(...)/OrgChartDocumentLoader.LoadFromXml(...)directlyDirectedGraphDocumentLoaderandOrgChartDocumentLoaderinternalLoadFromXml(client, string filename)overload onDirectedGraphDocumentLoader(no external caller)Dimensions leak (
VisioScripting.Models.*Dimensions.Get_*Dimensions(...)):Client.Page.GetPageDimensions(TargetPages)returningList<Models.PageDimensions>Client.Selection.GetShapeDimensions(TargetShapes)returningList<Models.ShapeDimensions>(placement-of-convenience; a dedicatedShapeCommandsis a larger architectural question, deferred)MeasureVisioPage.csandMeasureVisioShape.csinternal. Keep thePageDimensions/ShapeDimensionstypespublic(they are return values)Phase C — Enforcement layer
Apply the layered enforcement strategy from #156 Q2.
VisioScripting.Helpers/*typesinternal(5 files:ArrangeHelper,InteropHelper,ReflectionHelper,SelectionHelper,TextHelper,WildcardHelper). Add[InternalsVisibleTo(...)]forVisioPowerShelland the four test projects (VTest,VTest.Models,VTest.Scripting,VTest.PowerShell). Relocate the one external test ofWildcardHelpertoVTest's internal-test scope or use the InternalsVisibleTo pathCommandTargetandCommandTargetFlagsinternalClient.GetCommandTarget(flags)eitherinternalor, if that breaks the*Commandsplumbing,publicwith[EditorBrowsable(Never)]and an XML doc commentVisioScripting.Models/*for any types not appearing in any public signature, mark theminternal[EditorBrowsable(Never)]+ XML doc comments to any types that have to staypublicfor signature reasons but are not part of the contractdocs/decisions/visioscripting-public-api.mdcapturing the hybrid contract — what is in, what is out, the enforcement layers, and the rationale (point at the #156 decision comment)CLAUDE.mdper-commit conventions section noting that public surface changes onVisioScripting.Client/*Commandsclasses are breaking changesOut of scope
LayerCommandsclass + 4 unusedOutputCommandsmethods +ContainerrCommands.csfilename typo. Tracked in the CY27 follow-up issue (filed alongside this one).PublicAPI.Shipped.txtanalyzer. Deferred per #156 Q2; can be added later if drift becomes a real problem.ShapeCommandsclass?" Deferred.Acceptance
CLAUDE.mdupdatedBlocks
VisioScripting.Clienton gitbook). After this lands, #131 writes against the locked surface.References
*Commandsplacements for new facade methods): #156 discussion threadEffort
M. ~9 hours total: Phase B ~6h, Phase C ~3h. Separable into two PRs if convenient.