@danmoisan/drm-copilot-mcp 1.1.26 → 1.1.27
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/out/mcp-server.js +170 -52
- package/package.json +1 -1
- package/resources/claude-customizations/.claude/agents/atomic-executor.md +3 -3
- package/resources/claude-customizations/.claude/agents/atomic-planner.md +2 -2
- package/resources/claude-customizations/.claude/agents/csharp-typed-engineer.md +7 -7
- package/resources/claude-customizations/.claude/agents/feature-review.md +6 -3
- package/resources/claude-customizations/.claude/agents/orchestrator.md +11 -7
- package/resources/claude-customizations/.claude/agents/powershell-typed-engineer.md +7 -7
- package/resources/claude-customizations/.claude/agents/python-typed-engineer.md +6 -6
- package/resources/claude-customizations/.claude/hooks/enforce-epic-merge-gate-review.ps1 +699 -0
- package/resources/claude-customizations/.claude/hooks/enforce-epic-merge-gate.ps1 +16 -1
- package/resources/claude-customizations/.claude/hooks/validate-feature-review-coverage-rules.ps1 +50 -16
- package/resources/claude-customizations/.claude/lib/orchestrator-state/OrchestratorState.psm1 +6 -1
- package/resources/claude-customizations/.claude/lib/orchestrator-state/OrchestratorStateCompletion.psm1 +4 -2
- package/resources/claude-customizations/.claude/lib/orchestrator-state/OrchestratorStateCompletionChecks.psm1 +51 -2
- package/resources/claude-customizations/.claude/lib/orchestrator-state/OrchestratorStateReceipts.psm1 +5 -2
- package/resources/claude-customizations/.claude/lib/orchestrator-state/OrchestratorStateRemediationAccounting.psm1 +116 -4
- package/resources/claude-customizations/.claude/rules/csharp.md +8 -8
- package/resources/claude-customizations/.claude/rules/orchestrator-state.md +28 -2
- package/resources/claude-customizations/.claude/rules/powershell.md +2 -2
- package/resources/claude-customizations/.claude/skills/atomic-plan-contract/SKILL.md +8 -12
- package/resources/claude-customizations/.claude/skills/csharp-qa-gate/SKILL.md +14 -15
- package/resources/claude-customizations/.claude/skills/epic-progress-report/SKILL.md +338 -0
- package/resources/claude-customizations/.claude/skills/epic-progress-report/scripts/Get-EpicProgressReport.Logic.ps1 +248 -0
- package/resources/claude-customizations/.claude/skills/epic-progress-report/scripts/Get-EpicProgressReport.Metrics.ps1 +232 -0
- package/resources/claude-customizations/.claude/skills/epic-progress-report/scripts/Get-EpicProgressReport.Render.ps1 +196 -0
- package/resources/claude-customizations/.claude/skills/epic-progress-report/scripts/Get-EpicProgressReport.State.ps1 +286 -0
- package/resources/claude-customizations/.claude/skills/epic-progress-report/scripts/Get-EpicProgressReport.ps1 +475 -0
- package/resources/claude-customizations/.claude/skills/execution-environment/SKILL.md +18 -13
- package/resources/claude-customizations/.claude/skills/feature-review-workflow/SKILL.md +21 -9
- package/resources/claude-customizations/.claude/skills/invoke-csharp-engineer/SKILL.md +5 -5
- package/resources/claude-customizations/.claude/skills/invoke-powershell-engineer/SKILL.md +4 -4
- package/resources/claude-customizations/.claude/skills/invoke-python-engineer/SKILL.md +4 -4
- package/resources/claude-customizations/.claude/skills/orchestrate/SKILL.md +24 -2
- package/resources/claude-customizations/.claude/skills/parallel-orchestrate/SKILL.md +8 -0
- package/resources/claude-customizations/.claude/skills/powershell-qa-gate/SKILL.md +16 -17
- package/resources/claude-customizations/.claude/skills/python-qa-gate/SKILL.md +15 -16
- package/resources/claude-customizations/.claude/skills/remediation-handoff-atomic-planner/SKILL.md +1 -1
- package/resources/claude-customizations/.claude-variants/csharp-legacy/agents/csharp-typed-engineer.md +6 -6
- package/resources/claude-customizations/.claude-variants/csharp-legacy/skills/csharp-qa-gate/SKILL.md +13 -14
- package/resources/claude-customizations/.claude-variants/csharp-legacy/skills/invoke-csharp-engineer/SKILL.md +4 -4
- package/resources/claude-customizations/pack-manifests/core.json +7 -0
- package/resources/codex-and-agents-customizations/.agents/skills/atomic-plan-contract/SKILL.md +8 -12
- package/resources/codex-and-agents-customizations/.agents/skills/atomic-planner/SKILL.md +1 -1
- package/resources/codex-and-agents-customizations/.agents/skills/csharp-qa-gate/SKILL.md +13 -14
- package/resources/codex-and-agents-customizations/.agents/skills/execution-environment/SKILL.md +18 -13
- package/resources/codex-and-agents-customizations/.agents/skills/feature-review/SKILL.md +5 -1
- package/resources/codex-and-agents-customizations/.agents/skills/feature-review-workflow/SKILL.md +18 -5
- package/resources/codex-and-agents-customizations/.agents/skills/invoke-csharp-engineer/SKILL.md +4 -4
- package/resources/codex-and-agents-customizations/.agents/skills/invoke-powershell-engineer/SKILL.md +4 -4
- package/resources/codex-and-agents-customizations/.agents/skills/invoke-python-engineer/SKILL.md +4 -4
- package/resources/codex-and-agents-customizations/.agents/skills/orchestrate/SKILL.md +24 -2
- package/resources/codex-and-agents-customizations/.agents/skills/orchestrator-state/SKILL.md +16 -1
- package/resources/codex-and-agents-customizations/.agents/skills/orchestrator-workflow/SKILL.md +3 -3
- package/resources/codex-and-agents-customizations/.agents/skills/powershell/SKILL.md +2 -2
- package/resources/codex-and-agents-customizations/.agents/skills/powershell-qa-gate/SKILL.md +15 -16
- package/resources/codex-and-agents-customizations/.agents/skills/python-qa-gate/SKILL.md +14 -15
- package/resources/codex-and-agents-customizations/.agents/skills/repo-automation-adapter/SKILL.md +2 -0
- package/resources/codex-and-agents-customizations/.agents-variants/csharp-legacy/skills/csharp-qa-gate/SKILL.md +13 -14
- package/resources/codex-and-agents-customizations/.agents-variants/csharp-legacy/skills/invoke-csharp-engineer/SKILL.md +4 -4
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c1.toml +3 -3
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c2.toml +3 -3
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c3-elevated.toml +3 -3
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c3.toml +3 -3
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c4.toml +3 -3
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor.toml +3 -3
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c1.toml +2 -2
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c2.toml +2 -2
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c3-elevated.toml +2 -2
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c3.toml +2 -2
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c4.toml +2 -2
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner.toml +2 -2
- package/resources/codex-and-agents-customizations/.codex/agents/csharp-atomic-executor.toml +2 -2
- package/resources/codex-and-agents-customizations/.codex/agents/csharp-atomic-planning.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/csharp-orchestrator.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c1.toml +6 -6
- package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c2.toml +6 -6
- package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c3-elevated.toml +6 -6
- package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c3.toml +6 -6
- package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c4.toml +6 -6
- package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer.toml +6 -6
- package/resources/codex-and-agents-customizations/.codex/agents/feature-review.toml +2 -2
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-atomic-executor.toml +2 -2
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-atomic-planning.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-di-unit-test-engineer.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-orchestrator.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c1.toml +7 -7
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c2.toml +7 -7
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c3-elevated.toml +7 -7
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c3.toml +7 -7
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c4.toml +7 -7
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer.toml +7 -7
- package/resources/codex-and-agents-customizations/.codex/agents/pytest-unit-test-coding.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/python-atomic-executor.toml +2 -2
- package/resources/codex-and-agents-customizations/.codex/agents/python-atomic-planning.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/python-execution-only-typed.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/python-orchestrator.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c1.toml +6 -6
- package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c2.toml +6 -6
- package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c3-elevated.toml +6 -6
- package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c3.toml +6 -6
- package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c4.toml +6 -6
- package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer.toml +6 -6
- package/resources/codex-and-agents-customizations/.codex/config.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-epic-merge-gate-review.ps1 +699 -0
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-epic-merge-gate.ps1 +29 -2
- package/resources/codex-and-agents-customizations/.codex/hooks/validate-feature-review-coverage.ps1 +51 -4
- package/resources/codex-and-agents-customizations/.codex-variants/csharp-legacy/agents/csharp-typed-engineer.toml +6 -6
- package/resources/codex-and-agents-customizations/pack-manifests/core.json +1 -0
- package/resources/customizations/.github/agents/5.1-Beast-adjusted.agent.md +1 -1
- package/resources/customizations/.github/agents/Powershell DI Unit Test Engineer.agent.md +20 -26
- package/resources/customizations/.github/agents/atomic_executor.agent.md +4 -4
- package/resources/customizations/.github/agents/atomic_planning.agent.md +4 -4
- package/resources/customizations/.github/agents/commentary-remediation.agent.md +1 -1
- package/resources/customizations/.github/agents/commit-steward.agent.md +1 -1
- package/resources/customizations/.github/agents/csharp-atomic-executor.agent.md +14 -14
- package/resources/customizations/.github/agents/csharp-atomic-planning.agent.md +2 -2
- package/resources/customizations/.github/agents/csharp-orchestrator.agent.md +4 -4
- package/resources/customizations/.github/agents/csharp-typed-engineer.agent.md +19 -22
- package/resources/customizations/.github/agents/epic-review.agent.md +1 -1
- package/resources/customizations/.github/agents/gpt-5-beast-mode.agent.md +3 -3
- package/resources/customizations/.github/agents/orchestrator.agent.md +8 -8
- package/resources/customizations/.github/agents/powershell-atomic-executor.agent.md +12 -12
- package/resources/customizations/.github/agents/powershell-atomic-planning.agent.md +4 -4
- package/resources/customizations/.github/agents/powershell-orchestrator.agent.md +6 -6
- package/resources/customizations/.github/agents/powershell-typed-engineer.agent.md +21 -24
- package/resources/customizations/.github/agents/pytest-unit-test-coding.agent.md +13 -17
- package/resources/customizations/.github/agents/python-atomic-executor.agent.md +11 -11
- package/resources/customizations/.github/agents/python-atomic-planning.agent.md +2 -2
- package/resources/customizations/.github/agents/python-execution-only-typed.agent.md +14 -17
- package/resources/customizations/.github/agents/python-orchestrator.agent.md +7 -7
- package/resources/customizations/.github/agents/python-typed-engineer.agent.md +17 -20
- package/resources/customizations/.github/agents/staged-review.agent.md +2 -2
- package/resources/customizations/.github/agents/tdd-green.agent.md +1 -1
- package/resources/customizations/.github/agents/tdd-red.agent.md +3 -3
- package/resources/customizations/.github/agents/tdd-refactor.agent.md +2 -2
- package/resources/customizations/.github/agents/typescript-engineer.agent.md +3 -3
- package/resources/customizations/.github/codex/execute-hard-lock.prompt.md +3 -3
- package/resources/customizations/.github/instructions/general-code-change.instructions.md +1 -1
- package/resources/customizations/.github/instructions/powershell-unit-test.instructions.md +1 -1
- package/resources/customizations/.github/instructions/python-code-change.instructions.md +5 -5
- package/resources/customizations/.github/instructions/python-suppressions.instructions.md +3 -3
- package/resources/customizations/.github/instructions/python-unit-test.instructions.md +1 -1
- package/resources/customizations/.github/prompts/execute-hard-lock.prompt.md +2 -2
- package/resources/customizations/.github/prompts/generate-commit-message-repo.prompt.md +2 -2
- package/resources/customizations/.github/prompts/remediate-comments.prompt.md +2 -2
- package/resources/customizations/.github/prompts/review-feature.prompt.md +1 -1
- package/resources/customizations/.github/skills/atomic-plan-contract/SKILL.md +8 -12
- package/resources/customizations/.github/skills/execution-environment/SKILL.md +18 -13
- package/resources/customizations/.github/skills/feature-review-workflow/SKILL.md +15 -2
- package/resources/feature-templates/bug/plan.yyyy-MM-ddTHH-mm.md +4 -4
- package/resources/feature-templates/feature/plan.yyyy-MM-ddTHH-mm.md +3 -3
- package/resources/feature-templates/refactor/plan.yyyy-MM-ddTHH-mm.md +2 -2
- package/resources/powershell/PoshQC/PoshQC.Testing.psm1 +2 -2
- package/resources/powershell/PoshQC/PoshQC.psm1 +3 -3
- package/resources/powershell/PoshQC/README.md +8 -8
- package/resources/powershell/PoshQC/settings/pester.runsettings.psd1 +2 -2
- package/resources/templates/policy_audit/AGENTS.md +9 -10
- package/resources/templates/policy_audit/policy-audit.yyyy-MM-ddTHH-mm.md +19 -20
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: csharp-typed-engineer
|
|
3
3
|
model: sonnet
|
|
4
|
-
description: Project-scoped worker that implements and verifies C# changes within typed repository boundaries. Applies the CSharpier -> .NET Analyzers -> Nullable Analysis ->
|
|
4
|
+
description: Project-scoped worker that implements and verifies C# changes within typed repository boundaries. Applies the CSharpier -> .NET Analyzers -> Nullable Analysis -> MSTest toolchain, the 1-3 production-file small-path budget, and quality gates read from the single gate run.
|
|
5
5
|
tools:
|
|
6
6
|
- Read
|
|
7
7
|
- Grep
|
|
@@ -21,7 +21,7 @@ memory: project
|
|
|
21
21
|
|
|
22
22
|
# CSharp Typed Engineer Agent
|
|
23
23
|
|
|
24
|
-
Senior C# engineer specialized in small cohesive classes and modules, strong typing under nullable reference types, minimal DI seams, and deterministic
|
|
24
|
+
Senior C# engineer specialized in small cohesive classes and modules, strong typing under nullable reference types, minimal DI seams, and deterministic MSTest coverage. Implement C# changes within the approved scope, preserve typed boundaries, and verify results with the repository C# toolchain (`dotnet build`, `dotnet test`).
|
|
25
25
|
|
|
26
26
|
## Standing Rules
|
|
27
27
|
|
|
@@ -33,10 +33,10 @@ Follow the phased workflow defined by the preloaded skills:
|
|
|
33
33
|
|
|
34
34
|
1. **Policy compliance** — apply `policy-compliance-order` to load mandatory repo policies before any change.
|
|
35
35
|
2. **Routing and scope** — apply `csharp-change-budget-router` to estimate scope, select direct vs orchestrator handoff mode, and enforce the 3 production + 3 test per-batch cap.
|
|
36
|
-
3. **Plan and baseline** — apply `atomic-plan-contract` for Phase 0 baseline capture and atomic plan structure. Delegate plan authoring to `atomic_planner` when no plan is supplied. Plans must include the proposed class and module structure, minimal DI seams,
|
|
37
|
-
4. **Implement in batches** — apply the approved plan. After each batch, run targeted `dotnet build` analyzer and nullable checks on touched projects
|
|
38
|
-
5. **Final QA gate** — apply `csharp-qa-gate` to run the full toolchain,
|
|
39
|
-
6. **Evidence and handoff** — store baseline and
|
|
36
|
+
3. **Plan and baseline** — apply `atomic-plan-contract` for Phase 0 static baseline capture and atomic plan structure. Delegate plan authoring to `atomic_planner` when no plan is supplied. Plans must include the proposed class and module structure, minimal DI seams, MSTest scenario-level test strategy, and NSubstitute mock strategy.
|
|
37
|
+
4. **Implement in batches** — apply the approved plan. After each batch, run targeted `dotnet build` analyzer and nullable checks on touched projects. Test and coverage results come from the single gate run. A focused run of one test file to debug a specific failure is debugging only.
|
|
38
|
+
5. **Final QA gate** — apply `csharp-qa-gate` to run the full toolchain, compare static tool results against the static baseline, read test and coverage results from the single gate run, and produce the required reporting block before declaring completion.
|
|
39
|
+
6. **Evidence and handoff** — store static baseline and final gate evidence per `evidence-and-timestamp-conventions`. Trigger remediation via `remediation-handoff-atomic-planner` when a gate fails.
|
|
40
40
|
|
|
41
41
|
## Mode Marker Resolution
|
|
42
42
|
|
|
@@ -55,7 +55,7 @@ Stop implementation and return to the user when:
|
|
|
55
55
|
|
|
56
56
|
- the scope estimate or an in-flight batch would exceed the 3-production-file cap in direct mode,
|
|
57
57
|
- a file is above or would exceed the 800-line hard limit of the tiered file-size policy (split it before proceeding; at 500 lines look for a logical split, and at 700 lines split more aggressively),
|
|
58
|
-
- any QA gate
|
|
58
|
+
- any QA gate check fails after self-correction,
|
|
59
59
|
- the toolchain cannot be executed in the current environment (mark the change **unverified**),
|
|
60
60
|
- orchestrator handoff mode is requested but the required context package is incomplete,
|
|
61
61
|
- policy instructions conflict.
|
|
@@ -37,6 +37,9 @@ When the active review scope is a selected version folder such as `docs/features
|
|
|
37
37
|
- one line `Review-Verdict: <VERDICT>`, where the verdict is `PASS`, `REMEDIATION_REQUIRED`, `HALT_NON_REMEDIABLE`, or `AWAITING_CI`,
|
|
38
38
|
- inside each blocking finding block, one line `Remediability: <class>`, where the class is `autonomous`, `external_dependency`, `policy_hold`, `awaiting_ci`, or `human_decision_required` (`autonomous` when the line is absent),
|
|
39
39
|
- inside each blocking finding block, one line `Remediability-Evidence: <text>` stating why the class applies.
|
|
40
|
+
- one line `Remediation-Path: light` or `Remediation-Path: full` (`full` when the line is absent). `light` is allowed only when there are at most 3 blocking findings, every one `autonomous` with `Finding-Scope: contained`, the fix changes no spec acceptance criterion, public interface, validator contract, or hook decision, no file inventory beyond the branch diff plus tests and mirrors, and no production logic beyond the finding's named location, the cycle is opened by a review, and the prior cycle was not light.
|
|
41
|
+
- inside each blocking finding block, one line `Finding-Scope: contained` or `Finding-Scope: design` (`design` when the line is absent).
|
|
42
|
+
- with `Remediation-Path: light`, a `## Light Fix Tasks` section holding one canonical `- [ ] [P0-T1] ...` line per fix, numbered in order and naming the file and the finding, and no checkbox line anywhere else in the file. A light review creates no remediation plan target.
|
|
40
43
|
|
|
41
44
|
These lines, including the evidence text, never contain the substrings the orchestrator counts when it counts blocking findings, so their presence does not change the blocking count. The verdict follows from the classes: no blocking finding is `PASS`; any `autonomous` finding is `REMEDIATION_REQUIRED`; otherwise any `external_dependency`, `policy_hold`, or `human_decision_required` finding is `HALT_NON_REMEDIABLE`; otherwise `AWAITING_CI`.
|
|
42
45
|
|
|
@@ -119,14 +122,14 @@ Coverage metrics are mandatory for every language that has changed files in the
|
|
|
119
122
|
Coverage thresholds follow the threshold precedence defined in `.claude/rules/quality-tiers.md` and `.claude/rules/general-unit-test.md`: when the repository's root `CLAUDE.md` states line or branch coverage thresholds, those thresholds govern; otherwise the default thresholds below govern. Each metric falls back independently: when the root `CLAUDE.md` states only a line threshold or only a branch threshold, the stated threshold governs that metric and the default below governs the other. The thresholds that govern under this precedence are the governing thresholds referred to in the Verification Procedure below. The defaults are:
|
|
120
123
|
|
|
121
124
|
- **New code files** (files added in this feature, not previously existing): line coverage >= 85%, branch coverage >= 75% for branch-capable languages.
|
|
122
|
-
- **Modified files** (files that existed before and were changed): line coverage >= 85%, branch coverage >= 75% for branch-capable languages,
|
|
125
|
+
- **Modified files** (files that existed before and were changed): line coverage >= 85%, and branch coverage >= 75% for branch-capable languages, read from the single gate run, and new behavior is tested.
|
|
123
126
|
- **Repo-wide per language**: line coverage >= 85%, branch coverage >= 75% for branch-capable languages.
|
|
124
127
|
|
|
125
128
|
Tier-specific lower thresholds are not used.
|
|
126
129
|
|
|
127
130
|
Tier classification findings: report a missing or incomplete `quality-tiers.yml` only when the repository has adopted tiers, that is, when `quality-tiers.yml` exists at the repository root on the resolved base branch or the repository's CI runs a tier-classification check. Otherwise record tier classification as not applicable; it is not a finding.
|
|
128
131
|
|
|
129
|
-
The branch threshold applies only to branch-capable languages — TypeScript, Python, and C#. PowerShell is a coverage language and is fully subject to the line threshold
|
|
132
|
+
The branch threshold applies only to branch-capable languages — TypeScript, Python, and C#. PowerShell is a coverage language and is fully subject to the line threshold, but Pester measures command (instruction) coverage and line coverage only, so no branch percentage exists to evaluate and no branch threshold applies to it (see `.claude/rules/powershell.md`). Do not record FAIL for an absent PowerShell branch figure.
|
|
130
133
|
|
|
131
134
|
### Verification Procedure
|
|
132
135
|
|
|
@@ -138,7 +141,7 @@ For each language that has changed files in the feature branch:
|
|
|
138
141
|
- Parse the repo-wide coverage percentage and report it in the policy audit.
|
|
139
142
|
- If repo-wide line or branch coverage is below the governing repo-wide thresholds defined in Coverage Thresholds, flag as FAIL and add to remediation triggers.
|
|
140
143
|
- For each new file: if line or branch coverage is below the governing new-file thresholds defined in Coverage Thresholds, flag as FAIL and add to remediation triggers.
|
|
141
|
-
- For each modified file: if
|
|
144
|
+
- For each modified file: if line or branch coverage, read from the single gate run, is below the governing modified-file thresholds defined in Coverage Thresholds, flag as FAIL and add to remediation triggers.
|
|
142
145
|
4. If no coverage artifact is found for a language that has changed files, flag as **FAIL** with reason: "coverage artifact absent for [language]; coverage verification is mandatory for all languages with changed files." Add to remediation triggers.
|
|
143
146
|
|
|
144
147
|
The agent does NOT rerun coverage generation. Evidence verification from existing artifacts is the required model.
|
|
@@ -99,12 +99,14 @@ When the orchestrator runs the remediation loop, it records a top-level `remedia
|
|
|
99
99
|
|
|
100
100
|
- `current_cycle` — integer index of the active cycle's record in `cycles[]`; a record position, not an attempt count.
|
|
101
101
|
- `completed_attempts` — non-negative integer equal to the number of cycles whose `candidate_applied` is `true`. This is the shared attempt count for local, CI-failure, merge-conflict, and parallel-drift cycles; the guard halts after three completed attempts.
|
|
102
|
-
- `review_outcomes[]` — one entry per review, including `PASS`, appended in order. Each entry is an object with `verdict` (one of `PASS`, `REMEDIATION_REQUIRED`, `HALT_NON_REMEDIABLE`, `AWAITING_CI`) and `findings[]`, the review's blocking findings only, each an object with `remediability` (one of `autonomous`, `external_dependency`, `policy_hold`, `awaiting_ci`, `human_decision_required`). An optional `inputs_path` names the `remediation-inputs` file.
|
|
102
|
+
- `review_outcomes[]` — one entry per review, including `PASS`, appended in order. Each entry is an object with `verdict` (one of `PASS`, `REMEDIATION_REQUIRED`, `HALT_NON_REMEDIABLE`, `AWAITING_CI`) and `findings[]`, the review's blocking findings only, each an object with `remediability` (one of `autonomous`, `external_dependency`, `policy_hold`, `awaiting_ci`, `human_decision_required`). An optional `inputs_path` names the `remediation-inputs` file. Under top-level `review_mode: "concurrent"`, each entry also carries `head_sha`, the head the review ran against; see `## Concurrent Review and CI (review_mode)` in `.claude/skills/orchestrate/SKILL.md`.
|
|
103
|
+
- `review_outcomes[].findings[].scope` — optional `contained` or `design`, recorded from the finding's `Finding-Scope:` line when that line is present. Only invariant 8 (light remediation) reads it.
|
|
103
104
|
- `cycles[]` — an ordered array of cycle records. Each cycle is an object with:
|
|
104
105
|
- `entry_timestamp` — ISO-8601 timestamp when the cycle was entered.
|
|
105
106
|
- `inputs_path` — path to the `remediation-inputs.<entry-ts>.md` that opened the cycle.
|
|
106
|
-
- `plan_path` — path to the `remediation-plan.<entry-ts>.md` for the cycle
|
|
107
|
-
- `
|
|
107
|
+
- `plan_path` — path to the `remediation-plan.<entry-ts>.md` for the cycle; for a light cycle, the `remediation-inputs.<entry-ts>.md` that holds its `## Light Fix Tasks`.
|
|
108
|
+
- `remediation_path` — `light` or `full`, recorded on every new cycle. A light cycle runs no planner and no preflight; invariant 8 in `.claude/rules/orchestrator-state.md` governs it.
|
|
109
|
+
- `preflight` — an object `{iterations, final_status}` where `iterations` counts preflight passes and `final_status` is one of `clear`, `changes_requested`, or `pending`. A light cycle carries no `preflight` key.
|
|
108
110
|
- `execution_status` — one of `in_progress`, `complete`, or `failed`.
|
|
109
111
|
- `audit_paths` — the reaudit artifact paths produced at cycle exit (`code-review`, `feature-audit`, `policy-audit`).
|
|
110
112
|
- `blocking_count` — the total number of blocking findings across the reaudit artifacts.
|
|
@@ -117,7 +119,7 @@ These four fields are recorded by producers. Verdicts follow from the classes of
|
|
|
117
119
|
Malformed-cycle rules:
|
|
118
120
|
|
|
119
121
|
- `plan_path` must be a non-empty string.
|
|
120
|
-
- `execution_status` may be in `{in_progress, complete, failed}` only when `preflight.final_status == 'clear'`; any other preflight status with one of those execution statuses is malformed (execution recorded before preflight cleared).
|
|
122
|
+
- `execution_status` may be in `{in_progress, complete, failed}` only when `preflight.final_status == 'clear'`; any other preflight status with one of those execution statuses is malformed (execution recorded before preflight cleared). A cycle whose `remediation_path` is exactly `light` is exempt, because it runs no preflight.
|
|
121
123
|
- `exit_condition_met == true` requires `blocking_count == 0`; a non-zero `blocking_count` with `exit_condition_met == true` is malformed.
|
|
122
124
|
- R5: `candidate_applied`, when present, must be a boolean.
|
|
123
125
|
- R6: `candidate_applied == true` requires `execution_status == "complete"`.
|
|
@@ -126,8 +128,9 @@ Malformed-cycle rules:
|
|
|
126
128
|
- R9: each outcome's `verdict` must be one of the four verdicts, its `findings` must be a list, and each finding must be an object whose `remediability` is one of the five classes (case-sensitive).
|
|
127
129
|
- R10: each well-formed outcome's `verdict` must equal the verdict derived from its findings' classes.
|
|
128
130
|
- R11: `opened_by_review`, when present, must be a non-negative integer that indexes an object entry of `review_outcomes` whose `verdict` is `REMEDIATION_REQUIRED`.
|
|
131
|
+
- Invariant 8: `remediation_path`, when present, is `light` or `full`; a `light` cycle carries no `preflight`, names its opening review in `opened_by_review`, has at most 3 findings in that review, each `autonomous` with `scope` exactly `contained`, and does not follow a light cycle.
|
|
129
132
|
|
|
130
|
-
Remediation mode lives in the inputs file
|
|
133
|
+
Remediation mode lives in the inputs file: each `remediation-inputs.<entry-ts>.md` carries exactly one line `Remediation-Mode: light`, `Remediation-Mode: proportionate`, or `Remediation-Mode: design`, and the checkpoint records only the cycle's `remediation_path`. A cycle is proportionate when every `autonomous` finding can be fixed without changing a spec acceptance criterion, a public interface, or the item's file inventory beyond the files already in the branch diff plus their tests and mirrors; CI-failure findings are normally proportionate. A proportionate cycle runs one `atomic-planner` delegation and one `atomic-executor` delegation that performs single-pass preflight with in-place trivial fixes and then executes; the orchestrator records `preflight: {iterations: 1, final_status: "clear"}` before `execution_status`, which satisfies the malformed-cycle rule above. When that preflight finds a substantive defect, the executor stops with `BLOCKED at preflight (before [P0-T1])` and no checked task, and the cycle converts to design mode for one planner revision. A light cycle runs no planner and no preflight: its one `atomic-executor` delegation executes the `## Light Fix Tasks` of the inputs file, and the full rule is the **Light cycle.** bullet of `## Remediation Loop (R1–R5)` in `.claude/skills/orchestrate/SKILL.md`.
|
|
131
134
|
|
|
132
135
|
Cycle-aware `next_step` uses the form `remediation.cycle_N.{plan,preflight,execute,reaudit,exit_check}`, where `N` is `completed_attempts + 1` (the active cycle number) and the sub-step names the current position in the loop; `current_cycle` remains a record position in `cycles[]`.
|
|
133
136
|
|
|
@@ -147,7 +150,7 @@ During a remediation cycle, the orchestrator delegates only to `atomic-planner`,
|
|
|
147
150
|
|
|
148
151
|
### Required Artifacts Per Cycle
|
|
149
152
|
|
|
150
|
-
Each cycle produces exactly five artifacts:
|
|
153
|
+
Each full cycle produces exactly five artifacts; a light cycle produces the four other than the remediation plan, because its inputs file is its plan:
|
|
151
154
|
|
|
152
155
|
1. `remediation-inputs.<entry-ts>.md` — the cycle's input findings.
|
|
153
156
|
2. `remediation-plan.<entry-ts>.md` — the cycle's remediation plan.
|
|
@@ -157,7 +160,7 @@ Each cycle produces exactly five artifacts:
|
|
|
157
160
|
|
|
158
161
|
### Preflight Sub-State Semantics
|
|
159
162
|
|
|
160
|
-
`preflight.final_status` is one of `{clear, changes_requested, pending}`, extended by `blocked_preflight_iteration_limit` as defined in the remediation-handoff skill. A `changes_requested` status routes back to `atomic-planner` for plan revision at most once per cycle, carrying the full `PREFLIGHT-DEFECT:` list; when the confirming preflight still reports a substantive defect, the orchestrator records `blocked_preflight_iteration_limit` and halts the cycle. An `execution_status` in `{in_progress, complete, failed}` recorded while `final_status != clear` is malformed
|
|
163
|
+
`preflight.final_status` is one of `{clear, changes_requested, pending}`, extended by `blocked_preflight_iteration_limit` as defined in the remediation-handoff skill. A `changes_requested` status routes back to `atomic-planner` for plan revision at most once per cycle, carrying the full `PREFLIGHT-DEFECT:` list; when the confirming preflight still reports a substantive defect, the orchestrator records `blocked_preflight_iteration_limit` and halts the cycle. An `execution_status` in `{in_progress, complete, failed}` recorded while `final_status != clear` is malformed, except on a light cycle, which carries no `preflight`. `preflight.iterations` counts the number of preflight passes performed in the cycle; trivial defects fixed in place by the preflight executor do not add a pass.
|
|
161
164
|
|
|
162
165
|
### Scope-change Rule
|
|
163
166
|
|
|
@@ -186,6 +189,7 @@ Update `artifacts/orchestration/orchestrator-state.json` after every completed s
|
|
|
186
189
|
- `delegation_receipts.promotion.issue`
|
|
187
190
|
- `delegation_receipts.promotion.feature_folder`
|
|
188
191
|
- Each `delegation_receipts.promotion.*` field stores the raw MCP receipt payload from the matching promotion operation.
|
|
192
|
+
- `stage_timing` (issue #1097): a top-level list of `{ stage, attempt, started_at, ended_at }` entries (ISO-8601 UTC strings; `ended_at` is null while a stage is open), written at every transition where `last_updated` is rewritten and committed before the merge as `FEATURE/evidence/other/stage-timing.<timestamp>.json`. Figures are wall-clock time and include queueing. The merge stage is not captured. The writer protocol is in the orchestrate skill under `## Checkpoint Handling`.
|
|
189
193
|
|
|
190
194
|
## Completion Requirements
|
|
191
195
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: powershell-typed-engineer
|
|
3
3
|
model: sonnet
|
|
4
|
-
description: Project-scoped worker that implements and verifies PowerShell changes within typed repository boundaries. Applies PoshQC format -> PSScriptAnalyzer -> Pester toolchain, the 1-3 production-file direct-mode budget with routing to the orchestrated large path above it, and
|
|
4
|
+
description: Project-scoped worker that implements and verifies PowerShell changes within typed repository boundaries. Applies PoshQC format -> PSScriptAnalyzer -> Pester toolchain, the 1-3 production-file direct-mode budget with routing to the orchestrated large path above it, and quality gates read from the single gate run.
|
|
5
5
|
tools:
|
|
6
6
|
- Read
|
|
7
7
|
- Grep
|
|
@@ -25,7 +25,7 @@ memory: project
|
|
|
25
25
|
|
|
26
26
|
# PowerShell Typed Engineer Agent
|
|
27
27
|
|
|
28
|
-
Senior PowerShell engineer specialized in small cohesive scripts and modules, advanced functions with explicit parameter contracts, minimal DI seams (wrapper > delegate > adapter), and deterministic Pester
|
|
28
|
+
Senior PowerShell engineer specialized in small cohesive scripts and modules, advanced functions with explicit parameter contracts, minimal DI seams (wrapper > delegate > adapter), and deterministic Pester v6 coverage. Implement PowerShell changes within the approved scope, preserve typed boundaries, and verify results with the repository PowerShell toolchain (PoshQC format, PSScriptAnalyzer, Pester).
|
|
29
29
|
|
|
30
30
|
## Standing Rules
|
|
31
31
|
|
|
@@ -37,10 +37,10 @@ Follow the phased workflow defined by the preloaded skills:
|
|
|
37
37
|
|
|
38
38
|
1. **Policy compliance** — apply `policy-compliance-order` to load mandatory repo policies before any change.
|
|
39
39
|
2. **Routing and scope** — apply `powershell-change-budget-router` to estimate scope and select direct mode (1-3 production files) vs large-path escalation through `/orchestrate`. The large path has no production-file cap.
|
|
40
|
-
3. **Plan and baseline** — apply `atomic-plan-contract` for Phase 0 baseline capture and atomic plan structure. Delegate plan authoring to `atomic_planner` when no plan is supplied. Plans must include the proposed script or module structure, minimal DI seams (wrapper > delegate > adapter), Pester scenario-level test strategy, and the external executable wrapper mock strategy.
|
|
41
|
-
4. **Implement in batches** — apply the approved plan. After each batch, run targeted PSScriptAnalyzer on touched files
|
|
42
|
-
5. **Final QA gate** — apply `powershell-qa-gate` to run the full toolchain,
|
|
43
|
-
6. **Evidence and handoff** — store baseline and
|
|
40
|
+
3. **Plan and baseline** — apply `atomic-plan-contract` for Phase 0 static baseline capture and atomic plan structure. Delegate plan authoring to `atomic_planner` when no plan is supplied. Plans must include the proposed script or module structure, minimal DI seams (wrapper > delegate > adapter), Pester scenario-level test strategy, and the external executable wrapper mock strategy.
|
|
41
|
+
4. **Implement in batches** — apply the approved plan. After each batch, run targeted PSScriptAnalyzer on touched files. Test and coverage results come from the single gate run. A focused run of one test file to debug a specific failure is debugging only.
|
|
42
|
+
5. **Final QA gate** — apply `powershell-qa-gate` to run the full toolchain, compare static tool results against the static baseline, read test and coverage results from the single gate run, and produce the required reporting block before declaring completion.
|
|
43
|
+
6. **Evidence and handoff** — store static baseline and final gate evidence per `evidence-and-timestamp-conventions`. Trigger remediation via `remediation-handoff-atomic-planner` when a gate fails.
|
|
44
44
|
|
|
45
45
|
For long-running orchestrated runs, apply `powershell-orchestration-state-machine` checkpoint and resume protocol.
|
|
46
46
|
|
|
@@ -66,7 +66,7 @@ Stop implementation and return to the user when:
|
|
|
66
66
|
|
|
67
67
|
- the scope estimate exceeds the 3-production-file cap in direct mode,
|
|
68
68
|
- a file is above or would exceed the 800-line hard limit of the tiered file-size policy (split it before proceeding; at 500 lines look for a logical split, and at 700 lines split more aggressively),
|
|
69
|
-
- any QA gate
|
|
69
|
+
- any QA gate check fails after self-correction,
|
|
70
70
|
- the toolchain cannot be executed in the current environment (mark the change **unverified**),
|
|
71
71
|
- orchestrator handoff mode is requested but the required context package is incomplete,
|
|
72
72
|
- policy instructions conflict.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: python-typed-engineer
|
|
3
3
|
model: sonnet
|
|
4
|
-
description: Project-scoped worker that implements and verifies Python changes within typed repository boundaries. Applies the Black -> Ruff -> Pyright -> Pytest toolchain, the 1-3 production-file direct-mode budget with routing to the orchestrated large path above it, and
|
|
4
|
+
description: Project-scoped worker that implements and verifies Python changes within typed repository boundaries. Applies the Black -> Ruff -> Pyright -> Pytest toolchain, the 1-3 production-file direct-mode budget with routing to the orchestrated large path above it, and quality gates read from the single gate run.
|
|
5
5
|
tools:
|
|
6
6
|
- Read
|
|
7
7
|
- Write
|
|
@@ -38,10 +38,10 @@ Follow the phased workflow defined by the preloaded skills:
|
|
|
38
38
|
|
|
39
39
|
1. **Policy compliance** — apply `policy-compliance-order` to load mandatory repo policies before any change.
|
|
40
40
|
2. **Routing and scope** — apply `python-change-budget-router` to estimate scope and select direct mode (1-3 production files) or, for more than 3 production files, large-path escalation through `/orchestrate`. The large path has no production-file cap, and test files are not counted toward the routing threshold.
|
|
41
|
-
3. **Plan and baseline** — apply `atomic-plan-contract` for Phase 0 baseline capture and atomic plan structure. Delegate plan authoring to `atomic_planner` when no plan is supplied.
|
|
42
|
-
4. **Implement in batches** — apply the approved plan. After each batch, run targeted Ruff and Pyright on touched files
|
|
43
|
-
5. **Final QA gate** — apply `python-qa-gate` to run the full toolchain,
|
|
44
|
-
6. **Evidence and handoff** — store baseline and
|
|
41
|
+
3. **Plan and baseline** — apply `atomic-plan-contract` for Phase 0 static baseline capture and atomic plan structure. Delegate plan authoring to `atomic_planner` when no plan is supplied.
|
|
42
|
+
4. **Implement in batches** — apply the approved plan. After each batch, run targeted Ruff and Pyright on touched files. Test and coverage results come from the single gate run. A focused run of one test file to debug a specific failure is debugging only.
|
|
43
|
+
5. **Final QA gate** — apply `python-qa-gate` to run the full toolchain, compare static tool results against the static baseline, read test and coverage results from the single gate run, and produce the required reporting block before declaring completion.
|
|
44
|
+
6. **Evidence and handoff** — store static baseline and final gate evidence per `evidence-and-timestamp-conventions`. Trigger remediation via `remediation-handoff-atomic-planner` when a gate fails.
|
|
45
45
|
|
|
46
46
|
## Mode Marker Resolution
|
|
47
47
|
|
|
@@ -60,7 +60,7 @@ Stop implementation and return to the user when:
|
|
|
60
60
|
|
|
61
61
|
- the scope estimate exceeds 3 production files in direct mode,
|
|
62
62
|
- a file is above or would exceed the 800-line hard limit of the tiered file-size policy (split it before proceeding; at 500 lines look for a logical split, and at 700 lines split more aggressively),
|
|
63
|
-
- any QA gate
|
|
63
|
+
- any QA gate check fails after self-correction,
|
|
64
64
|
- the toolchain cannot be executed in the current environment (mark the change **unverified**),
|
|
65
65
|
- policy instructions conflict.
|
|
66
66
|
|