feat(package): isolate project doctor diagnostics
Merged
UN
4mo ago+1053+1053+0123456789012345678901234567890123456789-364-364-012345678901234567890123456789
Summary
- add --isolated / --ignore-global support for project-scoped package and extension doctor diagnostics
- surface isolation metadata, vocabulary-specific rerun commands, and global-state remediation in doctor output
- advertise the new flags through help, completions, SDK flag/action/tool contracts, and package-author docs
- refactor extension API registration into a bound registrar to clear CodeFactor-parity complexity without breaking destructured package activators
- close/release pm-6abs and link the slice to pm-usfg, pm-w89s, pm-cbwg, and pm-x6jf
Verification
- pnpm build
- node scripts/run-tests.mjs test -- tests/unit/extensions/extension-command.spec.ts tests/unit/sdk/action-schema-parity.spec.ts tests/unit/sdk/tool-option-contracts.spec.ts tests/unit/sdk/sdk-index.spec.ts tests/unit/scripts/release/docs-skills-gate.spec.ts
- PM_AUTHOR=codex-agent pm test pm-6abs --run --progress
- node scripts/run-tests.mjs coverage (5450 tests, 100/100/100/100)
- temp-dir package init/install/doctor --project --isolated --detail deep --trace dogfood loaded only project:pm-temp-smoke
- pnpm changelog:pm && pnpm changelog:pm:check (pm-changelog 2026.7.6)
- pm health --check-only --summary --json
- pm validate --check-resolution --check-history-drift --json (ok; existing validate_resolution_missing_fields:269 warning only)
- pnpm audit --audit-level moderate
- GitHub Dependabot alerts: []
- GitHub code-scanning alerts: []
- greptile review --branch origin/main --agent (initial comments fixed; rerun clean, no review comments)
Notes
- Static quality gate CodeFactor-parity complexity is clear. The remaining repo-wide docstring coverage gate failure is tracked by open pm-4ak1 and is outside this completed pm-6abs slice.
Summary by cubic
Adds --isolated/--ignore-global to pm package|extension doctor so project diagnostics ignore global registrations, enabling hermetic smoke tests and closing GH-467. Also hardens the extension registrar and policy rendering for safer activation and clearer diagnostics.
-
New Features
pm package|extension doctor --project --isolated(alias--ignore-global) skips global registrations; doctor output shows isolation metadata and rerun hints.- Help, zsh completions, and
docs/SDK.mddocument isolation andPM_GLOBAL_PATH; SDK flag contracts, tool schema, and parameter tables include the flags; CLI threads the option to the loader viaignoreGlobalExtensions.
-
Refactors
- Registrar internals moved to private fields with bound public methods; activators cannot observe internal registries; improved
registerCommandvalidation traces and guarded malformed policy override names. - Enforces
schema.flagspolicy for inline flag registrations.
- Registrar internals moved to private fields with bound public methods; activators cannot observe internal registries; improved