@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,480 @@
|
|
|
1
|
+
<#
|
|
2
|
+
.SYNOPSIS
|
|
3
|
+
Links a child GitHub issue to a parent tracking issue using the gh CLI.
|
|
4
|
+
|
|
5
|
+
.DESCRIPTION
|
|
6
|
+
This script ensures a parent tracking issue lists a specified child issue in its
|
|
7
|
+
"Child Issues" section and comments on the child issue with a backlink to the
|
|
8
|
+
parent. It validates gh CLI availability, fetches issue metadata, and edits the
|
|
9
|
+
parent body safely to avoid overwriting existing content.
|
|
10
|
+
|
|
11
|
+
.PARAMETER ChildIssueNumber
|
|
12
|
+
The issue number of the child issue to link.
|
|
13
|
+
|
|
14
|
+
.PARAMETER ParentIssueNumber
|
|
15
|
+
The issue number of the parent tracking issue that will reference the child.
|
|
16
|
+
|
|
17
|
+
.INPUTS
|
|
18
|
+
None. Issues are supplied via parameters or interactive prompts.
|
|
19
|
+
|
|
20
|
+
.OUTPUTS
|
|
21
|
+
None. Writes progress messages to the pipeline and terminates on error.
|
|
22
|
+
|
|
23
|
+
.EXAMPLE
|
|
24
|
+
pwsh ./link-parent-child.ps1 -ChildIssueNumber 123 -ParentIssueNumber 456
|
|
25
|
+
|
|
26
|
+
.NOTES
|
|
27
|
+
Requires authenticated gh CLI access to the repository context. Uses temporary
|
|
28
|
+
files to pass updated body content to gh issue edit.
|
|
29
|
+
#>
|
|
30
|
+
[CmdletBinding()]
|
|
31
|
+
param(
|
|
32
|
+
[string] $ChildIssueNumber,
|
|
33
|
+
[string] $ParentIssueNumber
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
function Write-ScriptError {
|
|
37
|
+
<#
|
|
38
|
+
.SYNOPSIS
|
|
39
|
+
Throws a standardized InvalidOperationException with a supplied message.
|
|
40
|
+
|
|
41
|
+
.DESCRIPTION
|
|
42
|
+
Centralizes error throwing to ensure consistent exception type and message
|
|
43
|
+
formatting throughout the script.
|
|
44
|
+
|
|
45
|
+
.PARAMETER Message
|
|
46
|
+
The descriptive error message to include in the thrown exception.
|
|
47
|
+
|
|
48
|
+
.INPUTS
|
|
49
|
+
None. Accepts a message string only.
|
|
50
|
+
|
|
51
|
+
.OUTPUTS
|
|
52
|
+
None. Always throws.
|
|
53
|
+
#>
|
|
54
|
+
[CmdletBinding()]
|
|
55
|
+
param([Parameter(Mandatory = $true)][string] $Message)
|
|
56
|
+
throw [System.InvalidOperationException]::new($Message)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function Invoke-GhCli {
|
|
60
|
+
<#
|
|
61
|
+
.SYNOPSIS
|
|
62
|
+
Invokes the gh CLI with provided arguments and captures output and exit code.
|
|
63
|
+
|
|
64
|
+
.DESCRIPTION
|
|
65
|
+
Executes gh commands through an injectable process runner to aid testing.
|
|
66
|
+
Returns both stdout/stderr output and the resulting exit code for callers to
|
|
67
|
+
interpret failures accurately.
|
|
68
|
+
|
|
69
|
+
.PARAMETER GhArgs
|
|
70
|
+
The gh CLI arguments to execute.
|
|
71
|
+
|
|
72
|
+
.PARAMETER InvokeProcess
|
|
73
|
+
Optional scriptblock used to run the command, enabling mocking for tests.
|
|
74
|
+
|
|
75
|
+
.OUTPUTS
|
|
76
|
+
Hashtable containing Output (string array) and ExitCode (int).
|
|
77
|
+
|
|
78
|
+
.EXAMPLE
|
|
79
|
+
Invoke-GhCli -GhArgs @('issue', 'view', '123', '--json', 'number')
|
|
80
|
+
# Returns the raw gh output and exit code for inspection.
|
|
81
|
+
#>
|
|
82
|
+
[CmdletBinding()]
|
|
83
|
+
[OutputType([hashtable])]
|
|
84
|
+
param(
|
|
85
|
+
[Parameter(Mandatory = $true)]
|
|
86
|
+
[string[]] $GhArgs,
|
|
87
|
+
|
|
88
|
+
[Parameter()]
|
|
89
|
+
[scriptblock] $InvokeProcess = { param([string[]] $GhArgs) & gh @GhArgs 2>&1 }
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
$result = & $InvokeProcess $GhArgs
|
|
93
|
+
$exitCode = $LASTEXITCODE
|
|
94
|
+
|
|
95
|
+
return @{ Output = $result; ExitCode = $exitCode }
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function Test-GhCli {
|
|
99
|
+
<#
|
|
100
|
+
.SYNOPSIS
|
|
101
|
+
Ensures the gh CLI is available before proceeding.
|
|
102
|
+
|
|
103
|
+
.DESCRIPTION
|
|
104
|
+
Checks for the gh executable on PATH and raises a clear error instructing
|
|
105
|
+
the user to install or authenticate if missing.
|
|
106
|
+
|
|
107
|
+
.OUTPUTS
|
|
108
|
+
None. Throws when gh is missing.
|
|
109
|
+
|
|
110
|
+
.EXAMPLE
|
|
111
|
+
Test-GhCli
|
|
112
|
+
# Verifies gh is available or raises a descriptive error.
|
|
113
|
+
#>
|
|
114
|
+
# Guard early to prevent later gh invocations from failing with less helpful errors.
|
|
115
|
+
if (-not (Get-Command gh -ErrorAction SilentlyContinue)) {
|
|
116
|
+
Write-ScriptError "gh CLI not found on PATH. Install gh and authenticate first."
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function Read-IssueNumber {
|
|
121
|
+
<#
|
|
122
|
+
.SYNOPSIS
|
|
123
|
+
Retrieves an issue number from provided input or interactive prompt.
|
|
124
|
+
|
|
125
|
+
.DESCRIPTION
|
|
126
|
+
Accepts a label and optional value. If the value is empty, it prompts the
|
|
127
|
+
user to enter the issue number. Empty responses are rejected to guarantee a
|
|
128
|
+
valid identifier.
|
|
129
|
+
|
|
130
|
+
.PARAMETER Label
|
|
131
|
+
Friendly label describing whether the number is for a child or parent issue.
|
|
132
|
+
|
|
133
|
+
.PARAMETER Value
|
|
134
|
+
The initial issue number value, if provided.
|
|
135
|
+
|
|
136
|
+
.OUTPUTS
|
|
137
|
+
Trimmed issue number string.
|
|
138
|
+
|
|
139
|
+
.EXAMPLE
|
|
140
|
+
Read-IssueNumber -Label "child" -Value "123"
|
|
141
|
+
# Returns "123" ensuring the value is non-empty.
|
|
142
|
+
#>
|
|
143
|
+
param(
|
|
144
|
+
[string] $Label,
|
|
145
|
+
[string] $Value
|
|
146
|
+
)
|
|
147
|
+
# Prompt when the caller did not provide a value to keep interactive usage straightforward.
|
|
148
|
+
if ([string]::IsNullOrWhiteSpace($Value)) {
|
|
149
|
+
$Value = Read-Host "Enter $Label issue number"
|
|
150
|
+
}
|
|
151
|
+
# Fail fast on blank responses so downstream gh calls never receive empty identifiers.
|
|
152
|
+
if ([string]::IsNullOrWhiteSpace($Value)) {
|
|
153
|
+
Write-ScriptError "$Label issue number is required."
|
|
154
|
+
}
|
|
155
|
+
return $Value.Trim()
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function Get-IssueFetchFailureCategory {
|
|
159
|
+
<#
|
|
160
|
+
.SYNOPSIS
|
|
161
|
+
Categorizes gh CLI failures when fetching an issue.
|
|
162
|
+
|
|
163
|
+
.DESCRIPTION
|
|
164
|
+
Inspects the exit code and textual output from gh to classify failures into
|
|
165
|
+
actionable categories (authentication, not found, permission, or unknown) so
|
|
166
|
+
calling code can craft precise guidance.
|
|
167
|
+
|
|
168
|
+
.PARAMETER ExitCode
|
|
169
|
+
Exit code returned by the gh CLI invocation.
|
|
170
|
+
|
|
171
|
+
.PARAMETER Output
|
|
172
|
+
Raw output from gh CLI; may be null when the command fails silently.
|
|
173
|
+
|
|
174
|
+
.OUTPUTS
|
|
175
|
+
A string category identifying the detected failure cause.
|
|
176
|
+
|
|
177
|
+
.EXAMPLE
|
|
178
|
+
Get-IssueFetchFailureCategory -ExitCode 1 -Output 'gh auth login'
|
|
179
|
+
# Returns 'auth-required' for authentication errors.
|
|
180
|
+
#>
|
|
181
|
+
[CmdletBinding()]
|
|
182
|
+
[OutputType([string])]
|
|
183
|
+
param(
|
|
184
|
+
[Parameter(Mandatory = $true)]
|
|
185
|
+
[int] $ExitCode,
|
|
186
|
+
|
|
187
|
+
[Parameter()]
|
|
188
|
+
[AllowNull()]
|
|
189
|
+
[object] $Output
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
$outputText = ""
|
|
193
|
+
# Normalize output to a single string to simplify downstream pattern matching.
|
|
194
|
+
if ($null -ne $Output) {
|
|
195
|
+
$outputText = @($Output) -join "`n"
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
# Authentication-related errors take precedence because they are the most common root cause.
|
|
199
|
+
if ($ExitCode -ne 0 -and (
|
|
200
|
+
$outputText -match '(?i)gh\s+auth\s+login' -or
|
|
201
|
+
$outputText -match '(?i)authentication' -or
|
|
202
|
+
$outputText -match '(?i)not\s+logged\s+in')) {
|
|
203
|
+
return 'auth-required'
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
# Detect missing issue references to guide users toward verifying identifiers.
|
|
207
|
+
if ($outputText -match '(?i)could\s+not\s+resolve\s+to\s+an\s+issue' -or
|
|
208
|
+
$outputText -match '(?i)issue\s+.*\s+not\s+found') {
|
|
209
|
+
return 'not-found'
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
# Permission or repo-context failures often indicate wrong repository selection.
|
|
213
|
+
if ($outputText -match '(?i)resource\s+not\s+accessible' -or
|
|
214
|
+
$outputText -match '(?i)permission\s+denied' -or
|
|
215
|
+
$outputText -match '(?i)repository\s+not\s+found') {
|
|
216
|
+
return 'permission-repo-context'
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
return 'unknown'
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
function Get-IssueFetchFailureMessage {
|
|
223
|
+
<#
|
|
224
|
+
.SYNOPSIS
|
|
225
|
+
Builds a user-facing error message from a categorized gh fetch failure.
|
|
226
|
+
|
|
227
|
+
.DESCRIPTION
|
|
228
|
+
Combines the failure category, issue label, and number to produce actionable
|
|
229
|
+
guidance, including gh commands the user can run to remediate. Includes raw
|
|
230
|
+
CLI output when available for easier troubleshooting.
|
|
231
|
+
|
|
232
|
+
.PARAMETER Category
|
|
233
|
+
Failure category returned by Get-IssueFetchFailureCategory.
|
|
234
|
+
|
|
235
|
+
.PARAMETER IssueLabel
|
|
236
|
+
Human-friendly label describing the issue role (child or parent).
|
|
237
|
+
|
|
238
|
+
.PARAMETER IssueNumber
|
|
239
|
+
The issue number that failed to fetch.
|
|
240
|
+
|
|
241
|
+
.PARAMETER Output
|
|
242
|
+
Optional raw gh CLI output to append for context.
|
|
243
|
+
|
|
244
|
+
.OUTPUTS
|
|
245
|
+
A composed string message suitable for user display.
|
|
246
|
+
|
|
247
|
+
.EXAMPLE
|
|
248
|
+
Get-IssueFetchFailureMessage -Category 'not-found' -IssueLabel 'child' -IssueNumber '123' -Output 'could not resolve to an issue'
|
|
249
|
+
# Returns a guided error message instructing the user to verify the issue number or repo context.
|
|
250
|
+
#>
|
|
251
|
+
[CmdletBinding()]
|
|
252
|
+
[OutputType([string])]
|
|
253
|
+
param(
|
|
254
|
+
[Parameter(Mandatory = $true)]
|
|
255
|
+
[string] $Category,
|
|
256
|
+
|
|
257
|
+
[Parameter(Mandatory = $true)]
|
|
258
|
+
[string] $IssueLabel,
|
|
259
|
+
|
|
260
|
+
[Parameter(Mandatory = $true)]
|
|
261
|
+
[string] $IssueNumber,
|
|
262
|
+
|
|
263
|
+
[Parameter()]
|
|
264
|
+
[AllowNull()]
|
|
265
|
+
[object] $Output
|
|
266
|
+
)
|
|
267
|
+
|
|
268
|
+
$outputText = ""
|
|
269
|
+
# Capture raw CLI output when available so it can be appended to the guidance text.
|
|
270
|
+
if ($null -ne $Output) {
|
|
271
|
+
$outputText = ((@($Output) -join "`n").Trim())
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
$baseMessage = "Unable to fetch $IssueLabel issue #$IssueNumber."
|
|
275
|
+
# Tailor guidance based on the detected failure type so the user has a direct next step.
|
|
276
|
+
$guidance = switch ($Category) {
|
|
277
|
+
'auth-required' {
|
|
278
|
+
"Run 'gh auth status' and, if needed, authenticate with 'gh auth login'."
|
|
279
|
+
}
|
|
280
|
+
'not-found' {
|
|
281
|
+
"Verify the issue number and repository context (for example: gh issue view $IssueNumber)."
|
|
282
|
+
}
|
|
283
|
+
'permission-repo-context' {
|
|
284
|
+
"Check repository access and active repo context (for example: gh repo view and gh auth status)."
|
|
285
|
+
}
|
|
286
|
+
default {
|
|
287
|
+
"Check gh CLI output and retry with explicit repo context (for example: gh issue view $IssueNumber --repo <owner>/<repo>)."
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
# Return concise guidance when no CLI output exists to avoid cluttering the message.
|
|
292
|
+
if ([string]::IsNullOrWhiteSpace($outputText)) {
|
|
293
|
+
return "$baseMessage $guidance"
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
return "$baseMessage $guidance CLI output: $outputText"
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
function Get-Issue {
|
|
300
|
+
<#
|
|
301
|
+
.SYNOPSIS
|
|
302
|
+
Retrieves issue metadata via gh CLI with robust error handling.
|
|
303
|
+
|
|
304
|
+
.DESCRIPTION
|
|
305
|
+
Calls gh issue view to fetch the issue number, title, URL, and body as JSON,
|
|
306
|
+
converting the result to a PowerShell object. Errors are classified and
|
|
307
|
+
surfaced with contextual guidance to keep failures actionable.
|
|
308
|
+
|
|
309
|
+
.PARAMETER IssueNumber
|
|
310
|
+
The issue number to retrieve.
|
|
311
|
+
|
|
312
|
+
.PARAMETER Label
|
|
313
|
+
Human-readable role label used in error messages (e.g., "child").
|
|
314
|
+
|
|
315
|
+
.PARAMETER InvokeGh
|
|
316
|
+
Optional injectable gh invoker for testing.
|
|
317
|
+
|
|
318
|
+
.OUTPUTS
|
|
319
|
+
PSCustomObject containing number, title, url, and body.
|
|
320
|
+
|
|
321
|
+
.EXAMPLE
|
|
322
|
+
Get-Issue -IssueNumber '123' -Label 'child'
|
|
323
|
+
# Fetches issue metadata or raises a classified error if retrieval fails.
|
|
324
|
+
#>
|
|
325
|
+
param(
|
|
326
|
+
[string] $IssueNumber,
|
|
327
|
+
[string] $Label,
|
|
328
|
+
[scriptblock] $InvokeGh = { param([string[]] $GhArgs) Invoke-GhCli -GhArgs $GhArgs }
|
|
329
|
+
)
|
|
330
|
+
|
|
331
|
+
# Pass --json fields as a single comma-separated argument to satisfy gh CLI parsing.
|
|
332
|
+
$result = & $InvokeGh @('issue', 'view', $IssueNumber, '--json', 'number,title,url,body')
|
|
333
|
+
# Surface classified errors immediately when gh fails to return the requested issue payload.
|
|
334
|
+
if ($result.ExitCode -ne 0 -or -not $result.Output) {
|
|
335
|
+
$failureCategory = Get-IssueFetchFailureCategory -ExitCode $result.ExitCode -Output $result.Output
|
|
336
|
+
$failureMessage = Get-IssueFetchFailureMessage -Category $failureCategory -IssueLabel $Label -IssueNumber $IssueNumber -Output $result.Output
|
|
337
|
+
Write-ScriptError $failureMessage
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
return $result.Output | ConvertFrom-Json
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
function Invoke-LinkParentChild {
|
|
344
|
+
<#
|
|
345
|
+
.SYNOPSIS
|
|
346
|
+
Updates a parent tracking issue to reference a child issue and comments on the child.
|
|
347
|
+
|
|
348
|
+
.DESCRIPTION
|
|
349
|
+
Validates gh CLI availability, collects issue numbers (prompting when absent),
|
|
350
|
+
fetches issue details, updates or creates the parent's "Child Issues" section,
|
|
351
|
+
and posts a backlink comment on the child issue when missing.
|
|
352
|
+
|
|
353
|
+
.PARAMETER ChildIssueNumberParam
|
|
354
|
+
Issue number for the child issue; prompted if not supplied.
|
|
355
|
+
|
|
356
|
+
.PARAMETER ParentIssueNumberParam
|
|
357
|
+
Issue number for the parent tracking issue; prompted if not supplied.
|
|
358
|
+
|
|
359
|
+
.PARAMETER InvokeGh
|
|
360
|
+
Optional gh invoker for testing or alternative execution.
|
|
361
|
+
|
|
362
|
+
.EXAMPLE
|
|
363
|
+
Invoke-LinkParentChild -ChildIssueNumberParam '123' -ParentIssueNumberParam '456'
|
|
364
|
+
# Updates the parent issue body and comments on the child with a backlink.
|
|
365
|
+
#>
|
|
366
|
+
[CmdletBinding()]
|
|
367
|
+
param(
|
|
368
|
+
[string] $ChildIssueNumberParam,
|
|
369
|
+
[string] $ParentIssueNumberParam,
|
|
370
|
+
[scriptblock] $InvokeGh = { param([string[]] $GhArgs) Invoke-GhCli -GhArgs $GhArgs }
|
|
371
|
+
)
|
|
372
|
+
|
|
373
|
+
Test-GhCli
|
|
374
|
+
|
|
375
|
+
# Collect and validate issue numbers, prompting the user when arguments were omitted.
|
|
376
|
+
$ChildIssueNumberParam = Read-IssueNumber -Label "child" -Value $ChildIssueNumberParam
|
|
377
|
+
$ParentIssueNumberParam = Read-IssueNumber -Label "parent" -Value $ParentIssueNumberParam
|
|
378
|
+
|
|
379
|
+
$childIssue = Get-Issue -IssueNumber $ChildIssueNumberParam -Label "child" -InvokeGh $InvokeGh
|
|
380
|
+
$parentIssue = Get-Issue -IssueNumber $ParentIssueNumberParam -Label "parent" -InvokeGh $InvokeGh
|
|
381
|
+
|
|
382
|
+
$parentBody = $parentIssue.body
|
|
383
|
+
# Protect against empty bodies to avoid overwriting the entire issue content accidentally.
|
|
384
|
+
if ([string]::IsNullOrWhiteSpace($parentBody)) {
|
|
385
|
+
Write-ScriptError "Parent issue #$ParentIssueNumberParam has an empty body; aborting to avoid overwriting content."
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
$childEntry = "- [ ] #$($childIssue.number) - $($childIssue.title)"
|
|
389
|
+
|
|
390
|
+
$headingPattern = "(?ims)^##\s+Child Issues\s*\r?\n(.*?)(?=^\#\#\s+|\z)"
|
|
391
|
+
$regexOptions = [System.Text.RegularExpressions.RegexOptions]::Multiline -bor [System.Text.RegularExpressions.RegexOptions]::Singleline
|
|
392
|
+
$headingRegex = [System.Text.RegularExpressions.Regex]::new($headingPattern, $regexOptions)
|
|
393
|
+
|
|
394
|
+
$match = $headingRegex.Match($parentBody)
|
|
395
|
+
$parentUpdated = $false
|
|
396
|
+
$step5Succeeded = $false
|
|
397
|
+
|
|
398
|
+
if ($match.Success) {
|
|
399
|
+
# Existing Child Issues section found; append entry if not already present.
|
|
400
|
+
$step5Succeeded = $true
|
|
401
|
+
$sectionContent = $match.Groups[1].Value
|
|
402
|
+
$alreadyListed = $sectionContent -match [regex]::Escape($childIssue.url) -or $sectionContent -match ("#" + [regex]::Escape($childIssue.number))
|
|
403
|
+
if ($alreadyListed) {
|
|
404
|
+
Write-Output "Parent issue already references child #$($childIssue.number); no body update needed."
|
|
405
|
+
$parentUpdated = $false
|
|
406
|
+
} else {
|
|
407
|
+
# Preserve existing list items while adding the new child entry to the bottom of the section.
|
|
408
|
+
$existingLines = $sectionContent.TrimEnd()
|
|
409
|
+
if ([string]::IsNullOrWhiteSpace($existingLines)) {
|
|
410
|
+
$newSection = "## Child Issues`n$childEntry`n"
|
|
411
|
+
} else {
|
|
412
|
+
$newSection = "## Child Issues`n$existingLines`n$childEntry`n"
|
|
413
|
+
}
|
|
414
|
+
$parentBody = $headingRegex.Replace($parentBody, $newSection.TrimEnd() + "`n")
|
|
415
|
+
$parentUpdated = $true
|
|
416
|
+
}
|
|
417
|
+
} else {
|
|
418
|
+
# No Child Issues section exists; prompt to convert the parent into a tracking issue before adding the section.
|
|
419
|
+
$response = Read-Host "Parent #$ParentIssueNumberParam has no 'Child Issues' section. Convert to tracking issue and add one? (y/n)"
|
|
420
|
+
if ($response -notin @("y", "Y", "yes", "Yes")) {
|
|
421
|
+
Write-ScriptError "Aborting: parent issue lacks a 'Child Issues' section and conversion was declined."
|
|
422
|
+
}
|
|
423
|
+
$step5Succeeded = $true
|
|
424
|
+
$parentBody = $parentBody.TrimEnd() + "`n`n## Child Issues`n$childEntry`n"
|
|
425
|
+
$parentUpdated = $true
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
if (-not $step5Succeeded) {
|
|
429
|
+
Write-ScriptError "Unable to process parent issue body."
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
if ($parentUpdated) {
|
|
433
|
+
# Write the updated body to a temp file to avoid in-place string escaping issues with gh CLI.
|
|
434
|
+
$tmp = [System.IO.Path]::ChangeExtension([System.IO.Path]::GetTempFileName(), '.md')
|
|
435
|
+
Set-Content -Path $tmp -Value $parentBody -Encoding UTF8
|
|
436
|
+
|
|
437
|
+
$editResult = & $InvokeGh @('issue', 'edit', $ParentIssueNumberParam, '--body-file', $tmp)
|
|
438
|
+
$editExit = $editResult.ExitCode
|
|
439
|
+
Remove-Item $tmp -ErrorAction SilentlyContinue
|
|
440
|
+
|
|
441
|
+
if ($editExit -ne 0) {
|
|
442
|
+
Write-ScriptError "Failed to update parent issue #$ParentIssueNumberParam."
|
|
443
|
+
}
|
|
444
|
+
Write-Output "Updated parent issue #$ParentIssueNumberParam with child link."
|
|
445
|
+
} else {
|
|
446
|
+
Write-Output "No parent body changes were required."
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
$childAlreadyLinked = $childIssue.body -match [regex]::Escape($parentIssue.url) -or $childIssue.body -match ("#" + [regex]::Escape($parentIssue.number))
|
|
450
|
+
# Avoid duplicating backlinks when the child body already references the parent issue.
|
|
451
|
+
if ($childAlreadyLinked) {
|
|
452
|
+
Write-Output "Child issue already references parent #$($parentIssue.number); no comment added."
|
|
453
|
+
return
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
# Add a backlink comment on the child so readers can navigate to the parent tracker.
|
|
457
|
+
$comment = "Linked to parent tracking issue #$($parentIssue.number) - $($parentIssue.title)"
|
|
458
|
+
$commentResult = & $InvokeGh @('issue', 'comment', $ChildIssueNumberParam, '--body', $comment)
|
|
459
|
+
if ($commentResult.ExitCode -ne 0) {
|
|
460
|
+
Write-ScriptError "Failed to add parent link comment to child issue #$ChildIssueNumberParam."
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
Write-Output "Added parent link comment to child issue #$ChildIssueNumberParam."
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
if (
|
|
467
|
+
$MyInvocation.InvocationName -eq '.' -and
|
|
468
|
+
[string]::IsNullOrWhiteSpace($ChildIssueNumber) -and
|
|
469
|
+
[string]::IsNullOrWhiteSpace($ParentIssueNumber)
|
|
470
|
+
) {
|
|
471
|
+
# Allow dot-sourcing without immediate execution so the functions can be reused.
|
|
472
|
+
return
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
if ($env:POSHQC_SKIP_SCRIPT_EXECUTION) {
|
|
476
|
+
# Honor CI/formatting contexts that should skip runtime execution while still loading the script.
|
|
477
|
+
return
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
Invoke-LinkParentChild -ChildIssueNumberParam $ChildIssueNumber -ParentIssueNumberParam $ParentIssueNumber
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
<#
|
|
2
|
+
.SYNOPSIS
|
|
3
|
+
Creates a git worktree and launches a Claude CLI session inside it as a background process.
|
|
4
|
+
|
|
5
|
+
.DESCRIPTION
|
|
6
|
+
Creates a new git worktree at a timestamped path derived from the destination
|
|
7
|
+
repository's basename, branches it off the current HEAD, and starts the Claude CLI
|
|
8
|
+
non-blocking via Start-Process.
|
|
9
|
+
Writes WorktreePath, ProcessId, and LogFile to stdout before returning to the caller.
|
|
10
|
+
|
|
11
|
+
.PARAMETER Objective
|
|
12
|
+
Prompt text passed to the Claude CLI as its primary argument.
|
|
13
|
+
|
|
14
|
+
.PARAMETER WorktreeParentPath
|
|
15
|
+
Parent directory for the new worktree. Defaults to the parent of the repo root.
|
|
16
|
+
|
|
17
|
+
.PARAMETER BranchName
|
|
18
|
+
Explicit branch name for the new worktree. When omitted, defaults to
|
|
19
|
+
<repoName>-wt-<timestamp>.
|
|
20
|
+
#>
|
|
21
|
+
[CmdletBinding(SupportsShouldProcess)]
|
|
22
|
+
param(
|
|
23
|
+
[string] $Objective,
|
|
24
|
+
|
|
25
|
+
[string] $WorktreeParentPath,
|
|
26
|
+
|
|
27
|
+
[string] $BranchName
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
$ErrorActionPreference = 'Stop'
|
|
31
|
+
$InformationPreference = 'Continue'
|
|
32
|
+
|
|
33
|
+
function Get-WorktreeTimestamp {
|
|
34
|
+
[CmdletBinding()]
|
|
35
|
+
param(
|
|
36
|
+
[scriptblock] $GetDateTime = { [datetime]::Now }
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
$now = & $GetDateTime
|
|
40
|
+
return $now.ToString('yyyy-MM-dd-HH-mm')
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function Build-WorktreePath {
|
|
44
|
+
[CmdletBinding()]
|
|
45
|
+
[OutputType([string])]
|
|
46
|
+
param(
|
|
47
|
+
[Parameter(Mandatory = $true)]
|
|
48
|
+
[string] $WorktreeParentPath,
|
|
49
|
+
|
|
50
|
+
[Parameter(Mandatory = $true)]
|
|
51
|
+
[string] $Timestamp,
|
|
52
|
+
|
|
53
|
+
[Parameter(Mandatory = $true)]
|
|
54
|
+
[string] $RepoName
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
return "$WorktreeParentPath/$RepoName-wt-$Timestamp"
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function Build-BranchName {
|
|
61
|
+
[CmdletBinding()]
|
|
62
|
+
[OutputType([string])]
|
|
63
|
+
param(
|
|
64
|
+
[Parameter(Mandatory = $true)]
|
|
65
|
+
[string] $Timestamp,
|
|
66
|
+
|
|
67
|
+
[Parameter(Mandatory = $true)]
|
|
68
|
+
[string] $RepoName,
|
|
69
|
+
|
|
70
|
+
[string] $BranchName
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
if ($BranchName) {
|
|
74
|
+
return $BranchName
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return "$RepoName-wt-$Timestamp"
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function Test-PreconditionsMet {
|
|
81
|
+
[CmdletBinding()]
|
|
82
|
+
param(
|
|
83
|
+
[Parameter(Mandatory = $true)]
|
|
84
|
+
[string] $WorktreePath,
|
|
85
|
+
|
|
86
|
+
[scriptblock] $GetCommand = { param([string] $Name) Get-Command $Name -ErrorAction SilentlyContinue },
|
|
87
|
+
|
|
88
|
+
[scriptblock] $TestPath = { param([string] $Path) Test-Path $Path }
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
$gitCmd = & $GetCommand 'git'
|
|
92
|
+
if (-not $gitCmd) {
|
|
93
|
+
throw "git is not available on PATH. Install git and ensure it is in your PATH before retrying."
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
$claudeCmd = & $GetCommand 'claude'
|
|
97
|
+
if (-not $claudeCmd) {
|
|
98
|
+
throw "claude is not available on PATH. Install the Claude CLI and ensure it is in your PATH before retrying."
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
$pathExists = & $TestPath $WorktreePath
|
|
102
|
+
if ($pathExists) {
|
|
103
|
+
throw "Target worktree path already exists: $WorktreePath. Remove the existing directory before retrying."
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function Invoke-GitWorktreeAdd {
|
|
108
|
+
[CmdletBinding()]
|
|
109
|
+
param(
|
|
110
|
+
[Parameter(Mandatory = $true)]
|
|
111
|
+
[string] $WorktreePath,
|
|
112
|
+
|
|
113
|
+
[Parameter(Mandatory = $true)]
|
|
114
|
+
[string] $BranchName,
|
|
115
|
+
|
|
116
|
+
[scriptblock] $InvokeGit = { param([string[]] $GitArgs) & git @GitArgs }
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
& $InvokeGit @('worktree', 'add', $WorktreePath, '-b', $BranchName)
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function Start-ClaudeBackground {
|
|
123
|
+
[CmdletBinding(SupportsShouldProcess)]
|
|
124
|
+
param(
|
|
125
|
+
[Parameter(Mandatory = $true)]
|
|
126
|
+
[string] $WorktreePath,
|
|
127
|
+
|
|
128
|
+
[string] $Objective,
|
|
129
|
+
|
|
130
|
+
[scriptblock] $InvokeStartProcess = {
|
|
131
|
+
param([hashtable] $StartArgs)
|
|
132
|
+
Start-Process @StartArgs -PassThru
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
$stdoutLog = "$WorktreePath/claude-session.stdout.log"
|
|
137
|
+
$stderrLog = "$WorktreePath/claude-session.stderr.log"
|
|
138
|
+
|
|
139
|
+
$claudeArgs = @('--dangerously-skip-permissions')
|
|
140
|
+
if ($Objective) {
|
|
141
|
+
$claudeArgs += $Objective
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
# On Windows, the claude CLI is installed by npm as a .cmd shim. Setting
|
|
145
|
+
# RedirectStandardOutput/Error forces UseShellExecute = $false, under which
|
|
146
|
+
# .NET calls Win32 CreateProcess directly. CreateProcess cannot launch
|
|
147
|
+
# non-PE files (.cmd/.bat/.ps1) and returns ERROR_BAD_EXE_FORMAT (193).
|
|
148
|
+
# Route through cmd.exe (a real Win32 binary) so it resolves the .cmd shim.
|
|
149
|
+
$isWindowsHost = $IsWindows -or ($env:OS -eq 'Windows_NT')
|
|
150
|
+
if ($isWindowsHost) {
|
|
151
|
+
$comSpec = $env:ComSpec
|
|
152
|
+
if (-not $comSpec) {
|
|
153
|
+
$comSpec = 'cmd.exe'
|
|
154
|
+
}
|
|
155
|
+
$filePath = $comSpec
|
|
156
|
+
$argumentList = @('/d', '/s', '/c', 'claude') + $claudeArgs
|
|
157
|
+
} else {
|
|
158
|
+
$filePath = 'claude'
|
|
159
|
+
$argumentList = $claudeArgs
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
$startArgs = @{
|
|
163
|
+
FilePath = $filePath
|
|
164
|
+
ArgumentList = $argumentList
|
|
165
|
+
WorkingDirectory = $WorktreePath
|
|
166
|
+
RedirectStandardOutput = $stdoutLog
|
|
167
|
+
RedirectStandardError = $stderrLog
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
return & $InvokeStartProcess $startArgs
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function Write-LaunchResult {
|
|
174
|
+
[CmdletBinding()]
|
|
175
|
+
param(
|
|
176
|
+
[Parameter(Mandatory = $true)]
|
|
177
|
+
[string] $WorktreePath,
|
|
178
|
+
|
|
179
|
+
[Parameter(Mandatory = $true)]
|
|
180
|
+
[string] $ProcessId,
|
|
181
|
+
|
|
182
|
+
[Parameter(Mandatory = $true)]
|
|
183
|
+
[string] $StdoutLog,
|
|
184
|
+
|
|
185
|
+
[Parameter(Mandatory = $true)]
|
|
186
|
+
[string] $StderrLog
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
Write-Output "WorktreePath: $WorktreePath"
|
|
190
|
+
Write-Output "ProcessId: $ProcessId"
|
|
191
|
+
Write-Output "StdoutLog: $StdoutLog"
|
|
192
|
+
Write-Output "StderrLog: $StderrLog"
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
# ---------------------------------------------------------------------------
|
|
196
|
+
# Script body
|
|
197
|
+
# ---------------------------------------------------------------------------
|
|
198
|
+
|
|
199
|
+
# Resolve default WorktreeParentPath when not supplied
|
|
200
|
+
$repoRoot = (git rev-parse --show-toplevel 2>$null).Trim()
|
|
201
|
+
if (-not $WorktreeParentPath) {
|
|
202
|
+
$WorktreeParentPath = Split-Path -Parent $repoRoot
|
|
203
|
+
}
|
|
204
|
+
$repoName = Split-Path -Leaf $repoRoot
|
|
205
|
+
|
|
206
|
+
$timestamp = Get-WorktreeTimestamp
|
|
207
|
+
$worktreePath = Build-WorktreePath -WorktreeParentPath $WorktreeParentPath -Timestamp $timestamp -RepoName $repoName
|
|
208
|
+
$resolvedBranch = Build-BranchName -Timestamp $timestamp -RepoName $repoName -BranchName $BranchName
|
|
209
|
+
|
|
210
|
+
try {
|
|
211
|
+
Test-PreconditionsMet -WorktreePath $worktreePath
|
|
212
|
+
}
|
|
213
|
+
catch {
|
|
214
|
+
Write-Error $_.Exception.Message
|
|
215
|
+
exit 1
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
if ($PSCmdlet.ShouldProcess($worktreePath, 'git worktree add')) {
|
|
219
|
+
Invoke-GitWorktreeAdd -WorktreePath $worktreePath -BranchName $resolvedBranch
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
$process = $null
|
|
223
|
+
if ($PSCmdlet.ShouldProcess($worktreePath, 'Start-Process claude')) {
|
|
224
|
+
$process = Start-ClaudeBackground -WorktreePath $worktreePath -Objective $Objective
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
$processId = if ($process) { $process.Id.ToString() } else { '0' }
|
|
228
|
+
$stdoutLog = "$worktreePath/claude-session.stdout.log"
|
|
229
|
+
$stderrLog = "$worktreePath/claude-session.stderr.log"
|
|
230
|
+
|
|
231
|
+
Write-LaunchResult -WorktreePath $worktreePath -ProcessId $processId -StdoutLog $stdoutLog -StderrLog $stderrLog
|
|
232
|
+
|