@danmoisan/drm-copilot-mcp 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +50 -0
- package/out/mcp-server.js +17323 -0
- package/package.json +36 -0
- package/resources/claude-customizations/.claude/agent-memory/orchestrator/MEMORY.md +3 -0
- package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_repo_root_is_source_of_truth.md +11 -0
- package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_vsce_verify_package_location.md +19 -0
- package/resources/claude-customizations/.claude/agent-memory/orchestrator/project_extension_location.md +11 -0
- package/resources/claude-customizations/.claude/agent-memory/prd-feature/MEMORY.md +1 -0
- package/resources/claude-customizations/.claude/agent-memory/prd-feature/project_push_down_pattern.md +13 -0
- package/resources/claude-customizations/.claude/agent-memory/task-researcher/MEMORY.md +3 -0
- package/resources/claude-customizations/.claude/agent-memory/task-researcher/project_push_down_claude_dir.md +11 -0
- package/resources/claude-customizations/.claude/agents/atomic-executor.md +135 -0
- package/resources/claude-customizations/.claude/agents/atomic-planner.md +71 -0
- package/resources/claude-customizations/.claude/agents/csharp-typed-engineer.md +69 -0
- package/resources/claude-customizations/.claude/agents/epic-review.md +40 -0
- package/resources/claude-customizations/.claude/agents/feature-review.md +136 -0
- package/resources/claude-customizations/.claude/agents/orchestrator.md +83 -0
- package/resources/claude-customizations/.claude/agents/powershell-typed-engineer.md +80 -0
- package/resources/claude-customizations/.claude/agents/prd-feature.md +42 -0
- package/resources/claude-customizations/.claude/agents/python-typed-engineer.md +72 -0
- package/resources/claude-customizations/.claude/agents/staged-review.md +41 -0
- package/resources/claude-customizations/.claude/agents/status-updater.md +41 -0
- package/resources/claude-customizations/.claude/agents/task-researcher.md +81 -0
- package/resources/claude-customizations/.claude/agents/typescript-engineer.md +24 -0
- package/resources/claude-customizations/.claude/hooks/check-powershell-test-purity.ps1 +111 -0
- package/resources/claude-customizations/.claude/hooks/check-python-test-purity.ps1 +146 -0
- package/resources/claude-customizations/.claude/hooks/enforce-evidence-locations.ps1 +150 -0
- package/resources/claude-customizations/.claude/hooks/enforce-powershell-batch-budget.ps1 +238 -0
- package/resources/claude-customizations/.claude/hooks/enforce-promotion-mcp-only.ps1 +147 -0
- package/resources/claude-customizations/.claude/hooks/enforce-python-batch-budget.ps1 +235 -0
- package/resources/claude-customizations/.claude/hooks/validate-bash.ps1 +69 -0
- package/resources/claude-customizations/.claude/hooks/validate-executor-output.ps1 +296 -0
- package/resources/claude-customizations/.claude/hooks/validate-feature-review-coverage.ps1 +389 -0
- package/resources/claude-customizations/.claude/hooks/validate-orchestrator-output.ps1 +141 -0
- package/resources/claude-customizations/.claude/hooks/validate-planner-output.ps1 +288 -0
- package/resources/claude-customizations/.claude/hooks/validate-required-artifact-output.ps1 +171 -0
- package/resources/claude-customizations/.claude/hooks/validate-task-researcher-output.ps1 +142 -0
- package/resources/claude-customizations/.claude/rules/csharp.md +62 -0
- package/resources/claude-customizations/.claude/rules/general-code-change.md +71 -0
- package/resources/claude-customizations/.claude/rules/general-unit-test.md +60 -0
- package/resources/claude-customizations/.claude/rules/powershell.md +97 -0
- package/resources/claude-customizations/.claude/rules/python-suppressions.md +143 -0
- package/resources/claude-customizations/.claude/rules/python.md +99 -0
- package/resources/claude-customizations/.claude/rules/self-explanatory-code-commenting.md +97 -0
- package/resources/claude-customizations/.claude/rules/tonality.md +80 -0
- package/resources/claude-customizations/.claude/rules/typescript-suppressions.md +66 -0
- package/resources/claude-customizations/.claude/rules/typescript.md +45 -0
- package/resources/claude-customizations/.claude/settings.json +144 -0
- package/resources/claude-customizations/.claude/skills/acceptance-criteria-tracking/SKILL.md +102 -0
- package/resources/claude-customizations/.claude/skills/atomic-plan-contract/SKILL.md +189 -0
- package/resources/claude-customizations/.claude/skills/commit-message/SKILL.md +65 -0
- package/resources/claude-customizations/.claude/skills/csharp-change-budget-router/SKILL.md +90 -0
- package/resources/claude-customizations/.claude/skills/csharp-orchestration-state-machine/SKILL.md +58 -0
- package/resources/claude-customizations/.claude/skills/csharp-qa-gate/SKILL.md +77 -0
- package/resources/claude-customizations/.claude/skills/evidence-and-timestamp-conventions/SKILL.md +164 -0
- package/resources/claude-customizations/.claude/skills/execute-hard-lock/SKILL.md +82 -0
- package/resources/claude-customizations/.claude/skills/feature-promotion-lifecycle/SKILL.md +115 -0
- package/resources/claude-customizations/.claude/skills/feature-review-workflow/SKILL.md +167 -0
- package/resources/claude-customizations/.claude/skills/fill-feature-docs/SKILL.md +22 -0
- package/resources/claude-customizations/.claude/skills/invoke-csharp-engineer/SKILL.md +64 -0
- package/resources/claude-customizations/.claude/skills/invoke-powershell-engineer/SKILL.md +65 -0
- package/resources/claude-customizations/.claude/skills/invoke-python-engineer/SKILL.md +64 -0
- package/resources/claude-customizations/.claude/skills/make-skill-template/SKILL.md +147 -0
- package/resources/claude-customizations/.claude/skills/orchestrate/SKILL.md +132 -0
- package/resources/claude-customizations/.claude/skills/policy-audit-template-usage/SKILL.md +49 -0
- package/resources/claude-customizations/.claude/skills/policy-compliance-order/SKILL.md +40 -0
- package/resources/claude-customizations/.claude/skills/powershell-change-budget-router/SKILL.md +49 -0
- package/resources/claude-customizations/.claude/skills/powershell-orchestration-state-machine/SKILL.md +58 -0
- package/resources/claude-customizations/.claude/skills/powershell-qa-gate/SKILL.md +77 -0
- package/resources/claude-customizations/.claude/skills/pr-author/SKILL.md +50 -0
- package/resources/claude-customizations/.claude/skills/pr-base-branch-merge-base/SKILL.md +56 -0
- package/resources/claude-customizations/.claude/skills/pr-context-artifacts/SKILL.md +30 -0
- package/resources/claude-customizations/.claude/skills/python-change-budget-router/SKILL.md +79 -0
- package/resources/claude-customizations/.claude/skills/python-qa-gate/SKILL.md +77 -0
- package/resources/claude-customizations/.claude/skills/remediation-handoff-atomic-planner/SKILL.md +40 -0
- package/resources/claude-customizations/.claude/skills/research-issue/SKILL.md +67 -0
- package/resources/claude-customizations/.claude/skills/review-epic/SKILL.md +21 -0
- package/resources/claude-customizations/.claude/skills/review-feature/SKILL.md +25 -0
- package/resources/claude-customizations/.claude/skills/review-staged/SKILL.md +21 -0
- package/resources/claude-customizations/.claude/skills/skill-canonical-location-audit/SKILL.md +49 -0
- package/resources/claude-customizations/.claude/skills/translate-copilot-to-claude/SKILL.md +295 -0
- package/resources/claude-customizations/.claude/skills/update-status/SKILL.md +21 -0
- package/resources/claude-dir-customizations/.mcp.json +8 -0
- package/resources/codex-and-agents-customizations/.agents/README.md +86 -0
- package/resources/codex-and-agents-customizations/.agents/skills/README.md +49 -0
- package/resources/codex-and-agents-customizations/.agents/skills/acceptance-criteria-tracking/SKILL.md +107 -0
- package/resources/codex-and-agents-customizations/.agents/skills/atomic-executor/SKILL.md +73 -0
- package/resources/codex-and-agents-customizations/.agents/skills/atomic-plan-contract/SKILL.md +194 -0
- package/resources/codex-and-agents-customizations/.agents/skills/atomic-planner/SKILL.md +87 -0
- package/resources/codex-and-agents-customizations/.agents/skills/commit-message/SKILL.md +70 -0
- package/resources/codex-and-agents-customizations/.agents/skills/commit-message-conventions/SKILL.md +95 -0
- package/resources/codex-and-agents-customizations/.agents/skills/csharp/SKILL.md +67 -0
- package/resources/codex-and-agents-customizations/.agents/skills/csharp-change-budget-router/SKILL.md +94 -0
- package/resources/codex-and-agents-customizations/.agents/skills/csharp-orchestration-state-machine/SKILL.md +64 -0
- package/resources/codex-and-agents-customizations/.agents/skills/csharp-qa-gate/SKILL.md +82 -0
- package/resources/codex-and-agents-customizations/.agents/skills/evidence-and-timestamp-conventions/SKILL.md +168 -0
- package/resources/codex-and-agents-customizations/.agents/skills/execute-hard-lock/SKILL.md +88 -0
- package/resources/codex-and-agents-customizations/.agents/skills/feature-promotion-lifecycle/SKILL.md +129 -0
- package/resources/codex-and-agents-customizations/.agents/skills/feature-review/SKILL.md +106 -0
- package/resources/codex-and-agents-customizations/.agents/skills/feature-review-workflow/SKILL.md +181 -0
- package/resources/codex-and-agents-customizations/.agents/skills/fill-feature-docs/SKILL.md +27 -0
- package/resources/codex-and-agents-customizations/.agents/skills/invoke-csharp-engineer/SKILL.md +73 -0
- package/resources/codex-and-agents-customizations/.agents/skills/invoke-powershell-engineer/SKILL.md +74 -0
- package/resources/codex-and-agents-customizations/.agents/skills/invoke-python-engineer/SKILL.md +73 -0
- package/resources/codex-and-agents-customizations/.agents/skills/make-skill-template/SKILL.md +152 -0
- package/resources/codex-and-agents-customizations/.agents/skills/orchestrate/SKILL.md +143 -0
- package/resources/codex-and-agents-customizations/.agents/skills/orchestrator-workflow/SKILL.md +317 -0
- package/resources/codex-and-agents-customizations/.agents/skills/policy-audit-template-usage/SKILL.md +53 -0
- package/resources/codex-and-agents-customizations/.agents/skills/policy-compliance-order/SKILL.md +49 -0
- package/resources/codex-and-agents-customizations/.agents/skills/powershell/SKILL.md +102 -0
- package/resources/codex-and-agents-customizations/.agents/skills/powershell-change-budget-router/SKILL.md +53 -0
- package/resources/codex-and-agents-customizations/.agents/skills/powershell-orchestration-state-machine/SKILL.md +64 -0
- package/resources/codex-and-agents-customizations/.agents/skills/powershell-qa-gate/SKILL.md +83 -0
- package/resources/codex-and-agents-customizations/.agents/skills/pr-author/SKILL.md +55 -0
- package/resources/codex-and-agents-customizations/.agents/skills/pr-authoring/SKILL.md +124 -0
- package/resources/codex-and-agents-customizations/.agents/skills/pr-base-branch-merge-base/SKILL.md +60 -0
- package/resources/codex-and-agents-customizations/.agents/skills/pr-context-artifacts/SKILL.md +34 -0
- package/resources/codex-and-agents-customizations/.agents/skills/python/SKILL.md +104 -0
- package/resources/codex-and-agents-customizations/.agents/skills/python-change-budget-router/SKILL.md +84 -0
- package/resources/codex-and-agents-customizations/.agents/skills/python-qa-gate/SKILL.md +82 -0
- package/resources/codex-and-agents-customizations/.agents/skills/python-suppressions/SKILL.md +148 -0
- package/resources/codex-and-agents-customizations/.agents/skills/remediation-handoff-atomic-planner/SKILL.md +49 -0
- package/resources/codex-and-agents-customizations/.agents/skills/repo-automation-adapter/SKILL.md +142 -0
- package/resources/codex-and-agents-customizations/.agents/skills/repo-automation-adapter/agents/openai.yaml +5 -0
- package/resources/codex-and-agents-customizations/.agents/skills/research-issue/SKILL.md +72 -0
- package/resources/codex-and-agents-customizations/.agents/skills/review-epic/SKILL.md +26 -0
- package/resources/codex-and-agents-customizations/.agents/skills/review-feature/SKILL.md +30 -0
- package/resources/codex-and-agents-customizations/.agents/skills/review-staged/SKILL.md +26 -0
- package/resources/codex-and-agents-customizations/.agents/skills/self-explanatory-code-commenting/SKILL.md +102 -0
- package/resources/codex-and-agents-customizations/.agents/skills/skill-canonical-location-audit/SKILL.md +52 -0
- package/resources/codex-and-agents-customizations/.agents/skills/translate-copilot-to-claude/SKILL.md +317 -0
- package/resources/codex-and-agents-customizations/.agents/skills/typescript/SKILL.md +50 -0
- package/resources/codex-and-agents-customizations/.agents/skills/typescript-suppressions/SKILL.md +71 -0
- package/resources/codex-and-agents-customizations/.agents/skills/update-status/SKILL.md +26 -0
- package/resources/codex-and-agents-customizations/.codex/agents/5.1-beast-adjusted.toml +23 -0
- package/resources/codex-and-agents-customizations/.codex/agents/5.1-thinking-beast-mode-adjusted.toml +23 -0
- package/resources/codex-and-agents-customizations/.codex/agents/api-architect.toml +23 -0
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor.toml +151 -0
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner.toml +93 -0
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-planning.toml +24 -0
- package/resources/codex-and-agents-customizations/.codex/agents/commentary-remediation.toml +23 -0
- package/resources/codex-and-agents-customizations/.codex/agents/commit-steward.toml +20 -0
- package/resources/codex-and-agents-customizations/.codex/agents/csharp-atomic-executor.toml +24 -0
- package/resources/codex-and-agents-customizations/.codex/agents/csharp-atomic-planning.toml +25 -0
- package/resources/codex-and-agents-customizations/.codex/agents/csharp-orchestrator.toml +56 -0
- package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer.toml +97 -0
- package/resources/codex-and-agents-customizations/.codex/agents/epic-review.toml +52 -0
- package/resources/codex-and-agents-customizations/.codex/agents/expert-nextjs-developer.toml +23 -0
- package/resources/codex-and-agents-customizations/.codex/agents/expert-react-frontend-engineer.toml +23 -0
- package/resources/codex-and-agents-customizations/.codex/agents/feature-review.toml +149 -0
- package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer.toml +60 -0
- package/resources/codex-and-agents-customizations/.codex/agents/gpt-5-beast-mode.toml +23 -0
- package/resources/codex-and-agents-customizations/.codex/agents/hlbpa.toml +23 -0
- package/resources/codex-and-agents-customizations/.codex/agents/mentor.toml +23 -0
- package/resources/codex-and-agents-customizations/.codex/agents/orchestrator.toml +121 -0
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-atomic-executor.toml +24 -0
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-atomic-planning.toml +25 -0
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-di-unit-test-engineer.toml +24 -0
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-orchestrator.toml +56 -0
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer.toml +108 -0
- package/resources/codex-and-agents-customizations/.codex/agents/pr-author.toml +26 -0
- package/resources/codex-and-agents-customizations/.codex/agents/prd-feature.toml +53 -0
- package/resources/codex-and-agents-customizations/.codex/agents/prd.toml +23 -0
- package/resources/codex-and-agents-customizations/.codex/agents/pytest-unit-test-coding.toml +24 -0
- package/resources/codex-and-agents-customizations/.codex/agents/python-atomic-executor.toml +24 -0
- package/resources/codex-and-agents-customizations/.codex/agents/python-atomic-planning.toml +25 -0
- package/resources/codex-and-agents-customizations/.codex/agents/python-execution-only-typed.toml +24 -0
- package/resources/codex-and-agents-customizations/.codex/agents/python-orchestrator.toml +54 -0
- package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer.toml +100 -0
- package/resources/codex-and-agents-customizations/.codex/agents/staged-review.toml +53 -0
- package/resources/codex-and-agents-customizations/.codex/agents/status-updater.toml +53 -0
- package/resources/codex-and-agents-customizations/.codex/agents/task-researcher.toml +103 -0
- package/resources/codex-and-agents-customizations/.codex/agents/tdd-green.toml +23 -0
- package/resources/codex-and-agents-customizations/.codex/agents/tdd-red.toml +23 -0
- package/resources/codex-and-agents-customizations/.codex/agents/tdd-refactor.toml +23 -0
- package/resources/codex-and-agents-customizations/.codex/agents/typescript-engineer.toml +48 -0
- package/resources/codex-and-agents-customizations/.codex/agents/voidbeast-gpt41enhanced.toml +23 -0
- package/resources/codex-and-agents-customizations/.codex/codex-web-setup.plan.md +26 -0
- package/resources/codex-and-agents-customizations/.codex/codex-web-setup.sh +384 -0
- package/resources/codex-and-agents-customizations/.codex/config.toml +137 -0
- package/resources/codex-and-agents-customizations/.codex/hooks/check-powershell-test-purity.ps1 +113 -0
- package/resources/codex-and-agents-customizations/.codex/hooks/check-python-test-purity.ps1 +149 -0
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-evidence-locations.ps1 +153 -0
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-powershell-batch-budget.ps1 +241 -0
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-promotion-mcp-only.ps1 +150 -0
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-python-batch-budget.ps1 +238 -0
- package/resources/codex-and-agents-customizations/.codex/hooks/validate-bash.ps1 +72 -0
- package/resources/codex-and-agents-customizations/.codex/hooks/validate-feature-review-coverage.ps1 +265 -0
- package/resources/codex-and-agents-customizations/.codex/prompts/feature-review-remediate.md +10 -0
- package/resources/codex-and-agents-customizations/.codex/prompts/generate-commit-message-repo.md +11 -0
- package/resources/codex-and-agents-customizations/.codex/prompts/generate-pr.md +15 -0
- package/resources/codex-and-agents-customizations/.codex/prompts/orchestrate-work.md +22 -0
- package/resources/codex-and-agents-customizations/AGENTS.md +317 -0
- package/resources/customizations/.github/agents/5.1-Beast-adjusted.agent.md +181 -0
- package/resources/customizations/.github/agents/5.1-Thinking-Beast-Mode-adjusted.agent.md +361 -0
- package/resources/customizations/.github/agents/Powershell DI Unit Test Engineer.agent.md +192 -0
- package/resources/customizations/.github/agents/api-architect.agent.md +40 -0
- package/resources/customizations/.github/agents/atomic_executor.agent.md +251 -0
- package/resources/customizations/.github/agents/atomic_planning.agent.md +658 -0
- package/resources/customizations/.github/agents/commentary-remediation.agent.md +35 -0
- package/resources/customizations/.github/agents/commit-steward.agent.md +200 -0
- package/resources/customizations/.github/agents/csharp-atomic-executor.agent.md +288 -0
- package/resources/customizations/.github/agents/csharp-atomic-planning.agent.md +354 -0
- package/resources/customizations/.github/agents/csharp-orchestrator.agent.md +375 -0
- package/resources/customizations/.github/agents/csharp-typed-engineer.agent.md +285 -0
- package/resources/customizations/.github/agents/epic-review.agent.md +374 -0
- package/resources/customizations/.github/agents/expert-nextjs-developer.agent.md +477 -0
- package/resources/customizations/.github/agents/expert-react-frontend-engineer.agent.md +739 -0
- package/resources/customizations/.github/agents/feature-review.agent.md +49 -0
- package/resources/customizations/.github/agents/gpt-5-beast-mode.agent.md +116 -0
- package/resources/customizations/.github/agents/hlbpa.agent.md +219 -0
- package/resources/customizations/.github/agents/mentor.agent.md +32 -0
- package/resources/customizations/.github/agents/orchestrator.agent.md +449 -0
- package/resources/customizations/.github/agents/powershell-atomic-executor.agent.md +287 -0
- package/resources/customizations/.github/agents/powershell-atomic-planning.agent.md +647 -0
- package/resources/customizations/.github/agents/powershell-orchestrator.agent.md +382 -0
- package/resources/customizations/.github/agents/powershell-typed-engineer.agent.md +293 -0
- package/resources/customizations/.github/agents/pr-author.agent.md +138 -0
- package/resources/customizations/.github/agents/prd-feature.agent.md +52 -0
- package/resources/customizations/.github/agents/prd.agent.md +202 -0
- package/resources/customizations/.github/agents/pytest-unit-test-coding.agent.md +202 -0
- package/resources/customizations/.github/agents/python-atomic-executor.agent.md +289 -0
- package/resources/customizations/.github/agents/python-atomic-planning.agent.md +429 -0
- package/resources/customizations/.github/agents/python-execution-only-typed.agent.md +217 -0
- package/resources/customizations/.github/agents/python-orchestrator.agent.md +380 -0
- package/resources/customizations/.github/agents/python-typed-engineer.agent.md +271 -0
- package/resources/customizations/.github/agents/staged-review.agent.md +246 -0
- package/resources/customizations/.github/agents/status_updater.agent.md +279 -0
- package/resources/customizations/.github/agents/task-researcher.agent.md +298 -0
- package/resources/customizations/.github/agents/tdd-green.agent.md +60 -0
- package/resources/customizations/.github/agents/tdd-red.agent.md +66 -0
- package/resources/customizations/.github/agents/tdd-refactor.agent.md +94 -0
- package/resources/customizations/.github/agents/typescript-engineer.agent.md +167 -0
- package/resources/customizations/.github/agents/voidbeast-gpt41enhanced.agent.md +230 -0
- package/resources/customizations/.github/codex/execute-hard-lock.prompt.md +105 -0
- package/resources/customizations/.github/codex/resume-hard-lock.prompt.md +92 -0
- package/resources/customizations/.github/copilot-instructions.md +7 -0
- package/resources/customizations/.github/instructions/csharp-code-change.instructions.md +184 -0
- package/resources/customizations/.github/instructions/csharp-unit-test.instructions.md +52 -0
- package/resources/customizations/.github/instructions/general-code-change.instructions.md +290 -0
- package/resources/customizations/.github/instructions/general-unit-test.instructions.md +106 -0
- package/resources/customizations/.github/instructions/github-actions-ci-cd-best-practices.instructions.md +607 -0
- package/resources/customizations/.github/instructions/github-actions.instructions.md +23 -0
- package/resources/customizations/.github/instructions/powershell-code-change.instructions.md +81 -0
- package/resources/customizations/.github/instructions/powershell-unit-test.instructions.md +69 -0
- package/resources/customizations/.github/instructions/python-code-change.instructions.md +232 -0
- package/resources/customizations/.github/instructions/python-suppressions.instructions.md +609 -0
- package/resources/customizations/.github/instructions/python-unit-test.instructions.md +71 -0
- package/resources/customizations/.github/instructions/self-explanatory-code-commenting.instructions.md +238 -0
- package/resources/customizations/.github/instructions/tonality.instructions.md +133 -0
- package/resources/customizations/.github/instructions/typescript-code-change.instructions.md +203 -0
- package/resources/customizations/.github/instructions/typescript-suppressions.instructions.md +157 -0
- package/resources/customizations/.github/instructions/typescript-unit-test.instructions.md +112 -0
- package/resources/customizations/.github/prompts/add-educational-comments.prompt.md +129 -0
- package/resources/customizations/.github/prompts/breakdown-bug-prd.prompt.md +29 -0
- package/resources/customizations/.github/prompts/breakdown-epic-arch.prompt.md +66 -0
- package/resources/customizations/.github/prompts/breakdown-epic-pm.prompt.md +58 -0
- package/resources/customizations/.github/prompts/breakdown-feature-implementation.prompt.md +128 -0
- package/resources/customizations/.github/prompts/breakdown-feature-prd.prompt.md +61 -0
- package/resources/customizations/.github/prompts/code-exemplars-blueprint-generator.prompt.md +126 -0
- package/resources/customizations/.github/prompts/drafts/create-github-issues-feature-from-implementation-plan.prompt.md +28 -0
- package/resources/customizations/.github/prompts/drafts/create-implementation-plan.prompt.md +158 -0
- package/resources/customizations/.github/prompts/drafts/create-technical-spike.prompt.md +231 -0
- package/resources/customizations/.github/prompts/drafts/potential-feature-prd.prompt.md +19 -0
- package/resources/customizations/.github/prompts/drafts/update-implementation-plan.prompt.md +158 -0
- package/resources/customizations/.github/prompts/execute-plan-template.md +21 -0
- package/resources/customizations/.github/prompts/export-chat.prompt.md +7 -0
- package/resources/customizations/.github/prompts/fillout-prd-feature.prompt.md +46 -0
- package/resources/customizations/.github/prompts/generate-atomic-plan.prompt.md +96 -0
- package/resources/customizations/.github/prompts/generate-commit-message-repo.prompt.md +108 -0
- package/resources/customizations/.github/prompts/generate-pr.prompt.md +151 -0
- package/resources/customizations/.github/prompts/javascript-typescript-jest.prompt.md +44 -0
- package/resources/customizations/.github/prompts/orchestrate-csharp-work.prompt.md +66 -0
- package/resources/customizations/.github/prompts/orchestrate-powershell-work.prompt.md +50 -0
- package/resources/customizations/.github/prompts/orchestrate-python-work.prompt.md +50 -0
- package/resources/customizations/.github/prompts/orchestrate-work.prompt.md +66 -0
- package/resources/customizations/.github/prompts/remediate-comments.prompt.md +53 -0
- package/resources/customizations/.github/prompts/research-issue.prompt.md +125 -0
- package/resources/customizations/.github/prompts/review-epic.prompt.md +94 -0
- package/resources/customizations/.github/prompts/review-feature.prompt.md +130 -0
- package/resources/customizations/.github/prompts/review-staged.prompt.md +43 -0
- package/resources/customizations/.github/prompts/update_status.prompt.md +68 -0
- package/resources/customizations/.github/skills/README.md +26 -0
- package/resources/customizations/.github/skills/acceptance-criteria-tracking/SKILL.md +102 -0
- package/resources/customizations/.github/skills/atomic-plan-contract/SKILL.md +174 -0
- package/resources/customizations/.github/skills/csharp-change-budget-router/SKILL.md +48 -0
- package/resources/customizations/.github/skills/csharp-orchestration-state-machine/SKILL.md +57 -0
- package/resources/customizations/.github/skills/evidence-and-timestamp-conventions/SKILL.md +135 -0
- package/resources/customizations/.github/skills/feature-promotion-lifecycle/SKILL.md +121 -0
- package/resources/customizations/.github/skills/feature-review-workflow/SKILL.md +153 -0
- package/resources/customizations/.github/skills/make-skill-template/SKILL.md +147 -0
- package/resources/customizations/.github/skills/policy-audit-template-usage/SKILL.md +48 -0
- package/resources/customizations/.github/skills/policy-compliance-order/SKILL.md +37 -0
- package/resources/customizations/.github/skills/powershell-change-budget-router/SKILL.md +48 -0
- package/resources/customizations/.github/skills/powershell-orchestration-state-machine/SKILL.md +57 -0
- package/resources/customizations/.github/skills/pr-base-branch-merge-base/SKILL.md +55 -0
- package/resources/customizations/.github/skills/pr-context-artifacts/SKILL.md +29 -0
- package/resources/customizations/.github/skills/remediation-handoff-atomic-planner/SKILL.md +39 -0
- package/resources/customizations/.github/skills/skill-canonical-location-audit/SKILL.md +48 -0
- package/resources/feature-templates/bug/plan.yyyy-MM-ddTHH-mm.md +44 -0
- package/resources/feature-templates/bug/potential_bug.md +59 -0
- package/resources/feature-templates/bug/spec.md +99 -0
- package/resources/feature-templates/epic/initiative.md +43 -0
- package/resources/feature-templates/feature/plan.yyyy-MM-ddTHH-mm.md +53 -0
- package/resources/feature-templates/feature/spec.md +66 -0
- package/resources/feature-templates/feature/user-story.md +42 -0
- package/resources/feature-templates/potential/template.md +33 -0
- package/resources/feature-templates/refactor/plan.yyyy-MM-ddTHH-mm.md +52 -0
- package/resources/feature-templates/refactor/spec.md +69 -0
- package/resources/powershell/PoshQC/PoshQC.Analyzer.psm1 +254 -0
- package/resources/powershell/PoshQC/PoshQC.FileDiscovery.psm1 +138 -0
- package/resources/powershell/PoshQC/PoshQC.Testing.psm1 +409 -0
- package/resources/powershell/PoshQC/PoshQC.psd1 +31 -0
- package/resources/powershell/PoshQC/PoshQC.psm1 +101 -0
- package/resources/powershell/PoshQC/README.md +80 -0
- package/resources/powershell/PoshQC/settings/pester.runsettings.psd1 +59 -0
- package/resources/powershell/PoshQC/settings/pssa.settings.psd1 +55 -0
- package/resources/scripts/dev_tools/__init__.py +0 -0
- package/resources/scripts/dev_tools/agentic_sync.py +819 -0
- package/resources/scripts/dev_tools/codex_native_converter/__init__.py +11 -0
- package/resources/scripts/dev_tools/codex_native_converter/__main__.py +6 -0
- package/resources/scripts/dev_tools/codex_native_converter/cli.py +11 -0
- package/resources/scripts/dev_tools/new_active_feature_folder.py +79 -0
- package/resources/scripts/dev_tools/new_active_feature_folder_docs.py +268 -0
- package/resources/scripts/dev_tools/new_active_feature_folder_flow.py +366 -0
- package/resources/scripts/dev_tools/new_active_feature_folder_io.py +306 -0
- package/resources/scripts/dev_tools/new_active_feature_folder_markdown.py +252 -0
- package/resources/scripts/dev_tools/new_active_feature_folder_models.py +136 -0
- package/resources/scripts/dev_tools/new_potential_bug_entry.py +465 -0
- package/resources/scripts/dev_tools/potential_to_issue.py +421 -0
- package/resources/scripts/dev_tools/potential_to_issue_content.py +212 -0
- package/resources/scripts/dev_tools/pr_context/__init__.py +0 -0
- package/resources/scripts/dev_tools/pr_context/collector.py +619 -0
- package/resources/scripts/dev_tools/pr_context/feature_docs.py +349 -0
- package/resources/scripts/dev_tools/pr_context/git.py +153 -0
- package/resources/scripts/dev_tools/pr_context/github.py +549 -0
- package/resources/scripts/dev_tools/pr_context/models.py +198 -0
- package/resources/scripts/dev_tools/pr_context/render.py +342 -0
- package/resources/scripts/dev_tools/pr_context/render_feature_excerpts.py +256 -0
- package/resources/scripts/dev_tools/pr_context/render_pr_helpers.py +291 -0
- package/resources/scripts/dev_tools/pr_context/summary_helpers.py +386 -0
- package/resources/scripts/dev_tools/pr_context/verification_evidence.py +171 -0
- package/resources/scripts/dev_tools/prompt_mode_contract.py +152 -0
- package/resources/scripts/dev_tools/push_down_claude_customizations.py +188 -0
- package/resources/scripts/dev_tools/push_down_codex_and_agents_customizations.py +139 -0
- package/resources/scripts/dev_tools/push_down_copilot_customizations.py +504 -0
- package/resources/scripts/dev_tools/push_down_copilot_customizations_filesystem.py +217 -0
- package/resources/scripts/dev_tools/push_down_copilot_customizations_rewrites.py +293 -0
- package/resources/scripts/dev_tools/resolve_file_prompt.py +457 -0
- package/resources/scripts/dev_tools/resolve_hard_lock_prompt.py +444 -0
- package/resources/scripts/dev_tools/validate_orchestration_artifacts.py +554 -0
- package/resources/templates/codex_native_converter.py +35 -0
- package/resources/templates/collect_commit_context.py +212 -0
- package/resources/templates/collect_pr_context.py +74 -0
- package/resources/templates/hello_pwsh.ps1 +3 -0
- package/resources/templates/hello_python.py +11 -0
- package/resources/templates/link-parent-child.ps1 +480 -0
- package/resources/templates/new-claude-worktree-session.ps1 +232 -0
- package/resources/templates/new-potential-entry.ps1 +187 -0
- package/resources/templates/new_active_feature_folder.py +67 -0
- package/resources/templates/new_potential_bug_entry.py +54 -0
- package/resources/templates/policy_audit/AGENTS.md +117 -0
- package/resources/templates/policy_audit/code-review.yyyy-MM-ddTHH-mm.md +165 -0
- package/resources/templates/policy_audit/feature-audit.yyyy-MM-ddTHH-mm.md +124 -0
- package/resources/templates/policy_audit/policy-audit.yyyy-MM-ddTHH-mm.md +649 -0
- package/resources/templates/potential_to_issue.py +55 -0
- package/resources/templates/push_down_claude_customizations.py +188 -0
- package/resources/templates/push_down_codex_and_agents_customizations.py +95 -0
- package/resources/templates/push_down_copilot_customizations.py +124 -0
- package/resources/templates/resolve_atomic_plan_prompt.py +75 -0
- package/resources/templates/resolve_hard_lock_prompt.py +65 -0
- package/resources/templates/run-poshqc-analyze-autofix.ps1 +16 -0
- package/resources/templates/run-poshqc-analyze.ps1 +26 -0
- package/resources/templates/run-poshqc-format.ps1 +26 -0
- package/resources/templates/run-poshqc-suite.ps1 +24 -0
- package/resources/templates/run-poshqc-test.ps1 +32 -0
- package/resources/templates/sync-agents-from-instructions.ps1 +400 -0
- package/resources/templates/validate_orchestration_artifacts.py +55 -0
- package/resources/templates/vscode-cli.helpers.ps1 +63 -0
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
"""Create a potential bug entry and optionally open it in VS Code."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import argparse
|
|
6
|
+
import os
|
|
7
|
+
import re
|
|
8
|
+
import shutil
|
|
9
|
+
import subprocess
|
|
10
|
+
from dataclasses import dataclass
|
|
11
|
+
from datetime import date
|
|
12
|
+
from pathlib import Path
|
|
13
|
+
from typing import TYPE_CHECKING, Protocol
|
|
14
|
+
|
|
15
|
+
if TYPE_CHECKING:
|
|
16
|
+
from collections.abc import Callable, Iterable
|
|
17
|
+
|
|
18
|
+
SHORT_NAME_PATTERN = re.compile(r"^[a-z0-9]+(-[a-z0-9]+)*$")
|
|
19
|
+
_INSIDERS_SIGNAL_NAMES = (
|
|
20
|
+
"TERM_PROGRAM_VERSION",
|
|
21
|
+
"VSCODE_GIT_ASKPASS_MAIN",
|
|
22
|
+
"TERM_PROGRAM",
|
|
23
|
+
"VSCODE_IPC_HOOK_CLI",
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def _resolve_workspace() -> Path:
|
|
28
|
+
return Path.cwd()
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def validate_short_name(short_name: str) -> None:
|
|
32
|
+
"""Validate that a short name matches the repository kebab-case contract.
|
|
33
|
+
|
|
34
|
+
Purpose:
|
|
35
|
+
Reject invalid bug-entry short names before filesystem or template work begins.
|
|
36
|
+
|
|
37
|
+
Args:
|
|
38
|
+
short_name (str): Candidate short name that must use lowercase
|
|
39
|
+
kebab-case tokens.
|
|
40
|
+
|
|
41
|
+
Returns:
|
|
42
|
+
None: This validator returns no value when the short name satisfies
|
|
43
|
+
the contract.
|
|
44
|
+
|
|
45
|
+
Raises:
|
|
46
|
+
ValueError: Raised when the supplied short name is blank or
|
|
47
|
+
violates the kebab-case pattern.
|
|
48
|
+
|
|
49
|
+
Side Effects:
|
|
50
|
+
None.
|
|
51
|
+
"""
|
|
52
|
+
if not short_name or not SHORT_NAME_PATTERN.fullmatch(short_name):
|
|
53
|
+
raise ValueError(
|
|
54
|
+
f"Aborted: '{short_name}' is invalid. Use kebab-case letters/numbers only "
|
|
55
|
+
"(e.g., api-timeout)."
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def default_git_config_lookup(key: str) -> str | None:
|
|
60
|
+
"""Resolve a Git configuration value without failing when Git is unavailable.
|
|
61
|
+
|
|
62
|
+
Purpose:
|
|
63
|
+
Query Git configuration opportunistically so author discovery can
|
|
64
|
+
prefer repository settings.
|
|
65
|
+
|
|
66
|
+
Args:
|
|
67
|
+
key (str): Git configuration key to read, such as `user.name`.
|
|
68
|
+
|
|
69
|
+
Returns:
|
|
70
|
+
str | None: The trimmed configuration value when Git is available
|
|
71
|
+
and returns a non-blank value; otherwise `None`.
|
|
72
|
+
|
|
73
|
+
Raises:
|
|
74
|
+
None.
|
|
75
|
+
|
|
76
|
+
Side Effects:
|
|
77
|
+
Invokes the `git config` subprocess when Git is available on PATH.
|
|
78
|
+
"""
|
|
79
|
+
git_cmd = shutil.which("git")
|
|
80
|
+
if not git_cmd:
|
|
81
|
+
return None
|
|
82
|
+
result = subprocess.run( # noqa: S603
|
|
83
|
+
[git_cmd, "config", key],
|
|
84
|
+
check=False,
|
|
85
|
+
capture_output=True,
|
|
86
|
+
text=True,
|
|
87
|
+
)
|
|
88
|
+
value = result.stdout.strip()
|
|
89
|
+
return value or None
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def default_env_lookup(name: str) -> str | None:
|
|
93
|
+
"""Return a non-blank environment variable value when one is defined.
|
|
94
|
+
|
|
95
|
+
Purpose:
|
|
96
|
+
Provide a lightweight fallback lookup for author resolution
|
|
97
|
+
without accepting blank environment values.
|
|
98
|
+
|
|
99
|
+
Args:
|
|
100
|
+
name (str): Environment variable name to read from the current process.
|
|
101
|
+
|
|
102
|
+
Returns:
|
|
103
|
+
str | None: The environment variable value when present and
|
|
104
|
+
non-blank; otherwise `None`.
|
|
105
|
+
|
|
106
|
+
Raises:
|
|
107
|
+
None.
|
|
108
|
+
|
|
109
|
+
Side Effects:
|
|
110
|
+
Reads process environment state.
|
|
111
|
+
"""
|
|
112
|
+
value = os.getenv(name)
|
|
113
|
+
return value if value and value.strip() else None
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def get_author(
|
|
117
|
+
git_lookup: Callable[[str], str | None] = default_git_config_lookup,
|
|
118
|
+
env_lookup: Callable[[str], str | None] = default_env_lookup,
|
|
119
|
+
) -> str:
|
|
120
|
+
"""Resolve the author name from Git configuration before falling back to USERNAME.
|
|
121
|
+
|
|
122
|
+
Purpose:
|
|
123
|
+
Produce the best available author label for the generated
|
|
124
|
+
bug-entry markdown metadata.
|
|
125
|
+
|
|
126
|
+
Args:
|
|
127
|
+
git_lookup (Callable[[str], str | None]): Git-backed lookup
|
|
128
|
+
function for configuration values.
|
|
129
|
+
env_lookup (Callable[[str], str | None]): Environment-backed
|
|
130
|
+
lookup function for fallback variables.
|
|
131
|
+
|
|
132
|
+
Returns:
|
|
133
|
+
str: The resolved author name, or `Unknown` when neither lookup yields a value.
|
|
134
|
+
|
|
135
|
+
Raises:
|
|
136
|
+
None.
|
|
137
|
+
|
|
138
|
+
Side Effects:
|
|
139
|
+
May read Git configuration and process environment state through
|
|
140
|
+
the injected lookup callables.
|
|
141
|
+
"""
|
|
142
|
+
author = git_lookup("user.name")
|
|
143
|
+
if not author:
|
|
144
|
+
author = env_lookup("USERNAME")
|
|
145
|
+
if not author:
|
|
146
|
+
return "Unknown"
|
|
147
|
+
return author
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
def render_content(template: str, short_name: str, entry_date: str, author: str) -> str:
|
|
151
|
+
"""Apply bug-entry placeholder substitutions to the copied markdown template.
|
|
152
|
+
|
|
153
|
+
Purpose:
|
|
154
|
+
Replace the template placeholders with the concrete bug name,
|
|
155
|
+
entry date, and author metadata.
|
|
156
|
+
|
|
157
|
+
Args:
|
|
158
|
+
template (str): Raw markdown template content copied from the
|
|
159
|
+
selected source template.
|
|
160
|
+
short_name (str): Validated short name used to replace the
|
|
161
|
+
bug-name placeholder.
|
|
162
|
+
entry_date (str): ISO date string inserted into the generated markdown.
|
|
163
|
+
author (str): Author name inserted into the metadata block.
|
|
164
|
+
|
|
165
|
+
Returns:
|
|
166
|
+
str: Markdown content with all supported bug-entry placeholders replaced.
|
|
167
|
+
|
|
168
|
+
Raises:
|
|
169
|
+
None.
|
|
170
|
+
|
|
171
|
+
Side Effects:
|
|
172
|
+
None.
|
|
173
|
+
"""
|
|
174
|
+
updated = template.replace("<bug-name>", short_name)
|
|
175
|
+
updated = updated.replace("YYYY-MM-DD", entry_date)
|
|
176
|
+
updated = updated.replace("- Author: name", f"- Author: {author}")
|
|
177
|
+
return updated
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
class FileSystem(Protocol):
|
|
181
|
+
def ensure_dir(self, path: Path) -> None: ...
|
|
182
|
+
|
|
183
|
+
def copy_file(self, src: Path, dest: Path) -> None: ...
|
|
184
|
+
|
|
185
|
+
def read_text(self, path: Path) -> str: ...
|
|
186
|
+
|
|
187
|
+
def write_text(self, path: Path, content: str) -> None: ...
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
@dataclass
|
|
191
|
+
class RealFileSystem(FileSystem):
|
|
192
|
+
def ensure_dir(self, path: Path) -> None:
|
|
193
|
+
path.mkdir(parents=True, exist_ok=True)
|
|
194
|
+
|
|
195
|
+
def copy_file(self, src: Path, dest: Path) -> None:
|
|
196
|
+
shutil.copyfile(src, dest)
|
|
197
|
+
|
|
198
|
+
def read_text(self, path: Path) -> str:
|
|
199
|
+
return path.read_text(encoding="utf-8")
|
|
200
|
+
|
|
201
|
+
def write_text(self, path: Path, content: str) -> None:
|
|
202
|
+
path.write_text(content, encoding="utf-8")
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
def _is_insiders_session(
|
|
206
|
+
env_lookup: Callable[[str], str | None] | None = None,
|
|
207
|
+
) -> bool:
|
|
208
|
+
"""Return whether the current process appears to be running inside VS Code Insiders.
|
|
209
|
+
|
|
210
|
+
Purpose:
|
|
211
|
+
Detect the current editor flavor so launcher selection can prefer
|
|
212
|
+
`code-insiders` when the originating session is already Insiders.
|
|
213
|
+
|
|
214
|
+
Args:
|
|
215
|
+
env_lookup (Callable[[str], str | None]): Environment lookup used
|
|
216
|
+
to read the known VS Code session signal variables.
|
|
217
|
+
|
|
218
|
+
Returns:
|
|
219
|
+
bool: `True` when any supported signal indicates an Insiders session;
|
|
220
|
+
otherwise `False`.
|
|
221
|
+
|
|
222
|
+
Raises:
|
|
223
|
+
None.
|
|
224
|
+
|
|
225
|
+
Side Effects:
|
|
226
|
+
Reads process environment state through the injected lookup.
|
|
227
|
+
"""
|
|
228
|
+
# Check the documented VS Code environment signals in a stable order so
|
|
229
|
+
# the launcher behavior stays deterministic across bundled and root copies.
|
|
230
|
+
lookup = env_lookup or default_env_lookup
|
|
231
|
+
for variable_name in _INSIDERS_SIGNAL_NAMES:
|
|
232
|
+
value = lookup(variable_name)
|
|
233
|
+
if value and "insider" in value.lower():
|
|
234
|
+
return True
|
|
235
|
+
return False
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
def _resolve_code_cli(
|
|
239
|
+
which_lookup: Callable[[str], str | None] | None = None,
|
|
240
|
+
env_lookup: Callable[[str], str | None] | None = None,
|
|
241
|
+
) -> str | None:
|
|
242
|
+
"""Resolve the best VS Code CLI executable path for the current session.
|
|
243
|
+
[code_cmd, "--reuse-window", *[file_path.as_posix() for file_path in files]],
|
|
244
|
+
Purpose:
|
|
245
|
+
Choose the correct CLI path while preserving fallback to the standard
|
|
246
|
+
`code` command when an Insiders-specific executable is unavailable.
|
|
247
|
+
|
|
248
|
+
Args:
|
|
249
|
+
which_lookup (Callable[[str], str | None]): PATH lookup used to
|
|
250
|
+
resolve CLI executables.
|
|
251
|
+
env_lookup (Callable[[str], str | None]): Environment lookup used
|
|
252
|
+
for Insiders-session detection.
|
|
253
|
+
|
|
254
|
+
Returns:
|
|
255
|
+
str | None: Resolved CLI executable path when one is available;
|
|
256
|
+
otherwise `None`.
|
|
257
|
+
|
|
258
|
+
Raises:
|
|
259
|
+
None.
|
|
260
|
+
|
|
261
|
+
Side Effects:
|
|
262
|
+
Reads process environment state and PATH through the injected lookups.
|
|
263
|
+
"""
|
|
264
|
+
resolved_which_lookup = which_lookup or shutil.which
|
|
265
|
+
|
|
266
|
+
# Prefer the CLI that matches the current session first, then fall back to
|
|
267
|
+
# the other supported executable name to preserve graceful behavior.
|
|
268
|
+
candidate_names = (
|
|
269
|
+
("code-insiders", "code")
|
|
270
|
+
if _is_insiders_session(env_lookup)
|
|
271
|
+
else ("code", "code-insiders")
|
|
272
|
+
)
|
|
273
|
+
for candidate_name in candidate_names:
|
|
274
|
+
resolved_command = resolved_which_lookup(candidate_name)
|
|
275
|
+
if resolved_command:
|
|
276
|
+
return resolved_command
|
|
277
|
+
return None
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
def default_code_launcher(files: Iterable[Path]) -> bool:
|
|
281
|
+
"""Open created files in the matching VS Code session when possible.
|
|
282
|
+
|
|
283
|
+
Purpose:
|
|
284
|
+
Reuse the current VS Code or VS Code Insiders window for generated
|
|
285
|
+
files while preserving the existing boolean success contract.
|
|
286
|
+
|
|
287
|
+
Args:
|
|
288
|
+
files (Iterable[Path]): Files to open in the editor session.
|
|
289
|
+
|
|
290
|
+
Returns:
|
|
291
|
+
bool: `True` when a supported VS Code CLI executable was resolved and
|
|
292
|
+
invoked; otherwise `False`.
|
|
293
|
+
|
|
294
|
+
Raises:
|
|
295
|
+
None.
|
|
296
|
+
|
|
297
|
+
Side Effects:
|
|
298
|
+
Resolves editor CLI executables on PATH and invokes a subprocess when
|
|
299
|
+
an appropriate command is available.
|
|
300
|
+
"""
|
|
301
|
+
code_cmd = _resolve_code_cli()
|
|
302
|
+
if not code_cmd:
|
|
303
|
+
return False
|
|
304
|
+
|
|
305
|
+
subprocess.run( # noqa: S603
|
|
306
|
+
[
|
|
307
|
+
code_cmd,
|
|
308
|
+
"--reuse-window",
|
|
309
|
+
*[str(file_path).replace("\\", "/") for file_path in files],
|
|
310
|
+
],
|
|
311
|
+
check=False,
|
|
312
|
+
)
|
|
313
|
+
return True
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
def create_bug_entry(
|
|
317
|
+
short_name: str,
|
|
318
|
+
workspace: Path | None = None,
|
|
319
|
+
fs: FileSystem | None = None,
|
|
320
|
+
author_provider: Callable[[], str] = get_author,
|
|
321
|
+
code_launcher: Callable[[Iterable[Path]], bool] = default_code_launcher,
|
|
322
|
+
entry_date: str | None = None,
|
|
323
|
+
template_root: Path | None = None,
|
|
324
|
+
) -> Path:
|
|
325
|
+
"""Create a potential bug markdown file from the selected template root.
|
|
326
|
+
|
|
327
|
+
Purpose:
|
|
328
|
+
Materialize a new potential bug entry by copying a template,
|
|
329
|
+
filling in metadata, and optionally opening the result in
|
|
330
|
+
VS Code.
|
|
331
|
+
|
|
332
|
+
Args:
|
|
333
|
+
short_name (str): Validated kebab-case suffix for the generated
|
|
334
|
+
bug-entry filename and content.
|
|
335
|
+
workspace (Path | None): Workspace root that receives the
|
|
336
|
+
generated file; defaults to the resolved repository or
|
|
337
|
+
bundle workspace.
|
|
338
|
+
fs (FileSystem | None): Filesystem adapter used for directory
|
|
339
|
+
creation, file copy, and text I/O.
|
|
340
|
+
author_provider (Callable[[], str]): Callable that resolves the
|
|
341
|
+
author name inserted into the template.
|
|
342
|
+
code_launcher (Callable[[Iterable[Path]], bool]): Callable that
|
|
343
|
+
attempts to open the generated file in VS Code.
|
|
344
|
+
entry_date (str | None): Optional ISO date override for
|
|
345
|
+
deterministic generation.
|
|
346
|
+
template_root (Path | None): Optional bundled feature-template
|
|
347
|
+
root that overrides workspace-local templates.
|
|
348
|
+
|
|
349
|
+
Returns:
|
|
350
|
+
Path: Absolute path to the generated potential bug markdown file.
|
|
351
|
+
|
|
352
|
+
Raises:
|
|
353
|
+
ValueError: Raised when `short_name` violates the kebab-case contract.
|
|
354
|
+
FileNotFoundError: Raised when the selected template cannot be
|
|
355
|
+
copied from the resolved template path.
|
|
356
|
+
|
|
357
|
+
Side Effects:
|
|
358
|
+
Creates directories, copies and rewrites markdown files, and may
|
|
359
|
+
invoke the VS Code launcher or print a warning.
|
|
360
|
+
"""
|
|
361
|
+
validate_short_name(short_name)
|
|
362
|
+
|
|
363
|
+
workspace_path = workspace or _resolve_workspace()
|
|
364
|
+
filesystem = fs or RealFileSystem()
|
|
365
|
+
date_str = entry_date or date.today().strftime("%Y-%m-%d")
|
|
366
|
+
|
|
367
|
+
target_dir = workspace_path / "docs" / "features" / "potential"
|
|
368
|
+
target = target_dir / f"{date_str}-{short_name}.md"
|
|
369
|
+
if template_root is not None:
|
|
370
|
+
template = template_root / "bug" / "potential_bug.md"
|
|
371
|
+
else:
|
|
372
|
+
template = (
|
|
373
|
+
workspace_path
|
|
374
|
+
/ "docs"
|
|
375
|
+
/ "features"
|
|
376
|
+
/ "templates"
|
|
377
|
+
/ "bug"
|
|
378
|
+
/ "potential_bug.md"
|
|
379
|
+
)
|
|
380
|
+
|
|
381
|
+
filesystem.ensure_dir(target_dir)
|
|
382
|
+
filesystem.copy_file(template, target)
|
|
383
|
+
|
|
384
|
+
author = author_provider()
|
|
385
|
+
content = filesystem.read_text(target)
|
|
386
|
+
updated = render_content(content, short_name, date_str, author)
|
|
387
|
+
filesystem.write_text(target, updated)
|
|
388
|
+
|
|
389
|
+
if not code_launcher([target]):
|
|
390
|
+
print("WARNING: VS Code 'code' command not found. Open file manually:")
|
|
391
|
+
print(f" {target}")
|
|
392
|
+
|
|
393
|
+
return target
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
def parse_args() -> argparse.Namespace:
|
|
397
|
+
"""Parse CLI arguments for the potential bug entry workflow.
|
|
398
|
+
|
|
399
|
+
Purpose:
|
|
400
|
+
Define and read the command-line interface for creating a
|
|
401
|
+
potential bug entry from a bundled or workspace template.
|
|
402
|
+
|
|
403
|
+
Args:
|
|
404
|
+
None.
|
|
405
|
+
|
|
406
|
+
Returns:
|
|
407
|
+
argparse.Namespace: Parsed CLI arguments containing the required
|
|
408
|
+
short name and optional template root.
|
|
409
|
+
|
|
410
|
+
Raises:
|
|
411
|
+
SystemExit: Raised by `argparse` when required arguments are missing or invalid.
|
|
412
|
+
|
|
413
|
+
Side Effects:
|
|
414
|
+
Reads process command-line arguments and may emit argparse help or error text.
|
|
415
|
+
"""
|
|
416
|
+
parser = argparse.ArgumentParser(
|
|
417
|
+
description="Create a potential bug entry from the template."
|
|
418
|
+
)
|
|
419
|
+
parser.add_argument(
|
|
420
|
+
"--short-name", required=True, help="Bug name in kebab-case (e.g., api-timeout)"
|
|
421
|
+
)
|
|
422
|
+
parser.add_argument(
|
|
423
|
+
"--template-root",
|
|
424
|
+
default=None,
|
|
425
|
+
help="Bundled feature-templates dir (overrides workspace).",
|
|
426
|
+
)
|
|
427
|
+
return parser.parse_args()
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
def main() -> None:
|
|
431
|
+
"""Execute the CLI boundary for potential bug entry creation.
|
|
432
|
+
|
|
433
|
+
Purpose:
|
|
434
|
+
Bridge parsed CLI arguments into the bug-entry creation workflow
|
|
435
|
+
and convert user-facing failures into exit codes.
|
|
436
|
+
|
|
437
|
+
Args:
|
|
438
|
+
None.
|
|
439
|
+
|
|
440
|
+
Returns:
|
|
441
|
+
None: The CLI exits by returning normally on success or raising
|
|
442
|
+
`SystemExit` on handled failures.
|
|
443
|
+
|
|
444
|
+
Raises:
|
|
445
|
+
SystemExit: Raised with exit code 1 when validation or file lookup fails.
|
|
446
|
+
|
|
447
|
+
Side Effects:
|
|
448
|
+
Reads CLI arguments, may create bug-entry files, may launch VS
|
|
449
|
+
Code, and prints user-facing error messages on handled
|
|
450
|
+
failures.
|
|
451
|
+
"""
|
|
452
|
+
args = parse_args()
|
|
453
|
+
resolved_root = Path(args.template_root) if args.template_root else None
|
|
454
|
+
try:
|
|
455
|
+
create_bug_entry(short_name=args.short_name, template_root=resolved_root)
|
|
456
|
+
except ValueError as exc:
|
|
457
|
+
print(str(exc))
|
|
458
|
+
raise SystemExit(1) from exc
|
|
459
|
+
except FileNotFoundError as exc:
|
|
460
|
+
print(f"Aborted: required file not found: {exc}")
|
|
461
|
+
raise SystemExit(1) from exc
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
if __name__ == "__main__":
|
|
465
|
+
main()
|