@danmoisan/drm-copilot-mcp 1.1.19 → 1.1.21
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 +172 -11
- package/package.json +1 -1
- package/resources/claude-customizations/.claude/agents/atomic-executor.md +17 -6
- package/resources/claude-customizations/.claude/agents/atomic-planner.md +10 -2
- package/resources/claude-customizations/.claude/agents/epic-orchestrator.md +5 -0
- package/resources/claude-customizations/.claude/agents/orchestrator.md +4 -1
- package/resources/claude-customizations/.claude/agents/parallel-orchestrator.md +4 -0
- package/resources/claude-customizations/.claude/agents/task-researcher.md +8 -0
- package/resources/claude-customizations/.claude/hooks/enforce-epic-merge-gate-command.ps1 +190 -0
- package/resources/claude-customizations/.claude/hooks/enforce-epic-merge-gate.ps1 +22 -53
- package/resources/claude-customizations/.claude/hooks/hook-docs-only-diff.ps1 +5 -1
- package/resources/claude-customizations/.claude/hooks/premortem-section.ps1 +149 -0
- package/resources/claude-customizations/.claude/hooks/validate-executor-output.ps1 +210 -84
- package/resources/claude-customizations/.claude/hooks/validate-planner-output.ps1 +13 -1
- package/resources/claude-customizations/.claude/hooks/validate-task-researcher-output.ps1 +24 -5
- package/resources/claude-customizations/.claude/lib/ci-gate/Invoke-MergeConfirmationParser.ps1 +203 -0
- package/resources/claude-customizations/.claude/lib/codex-routing/CodexDeployment.psm1 +10 -10
- package/resources/claude-customizations/.claude/rules/plan-acceptance-gates.md +46 -10
- package/resources/claude-customizations/.claude/skills/atomic-plan-contract/SKILL.md +48 -16
- package/resources/claude-customizations/.claude/skills/cleanup-merged-worktrees/SKILL.md +7 -3
- package/resources/claude-customizations/.claude/skills/csharp-change-budget-router/SKILL.md +2 -2
- package/resources/claude-customizations/.claude/skills/epic-orchestrate/SKILL.md +12 -3
- package/resources/claude-customizations/.claude/skills/epic-plan/SKILL.md +4 -2
- package/resources/claude-customizations/.claude/skills/execution-environment/SKILL.md +134 -0
- package/resources/claude-customizations/.claude/skills/orchestrate/SKILL.md +22 -9
- package/resources/claude-customizations/.claude/skills/parallel-orchestrate/SKILL.md +29 -5
- package/resources/claude-customizations/.claude/skills/powershell-change-budget-router/SKILL.md +1 -1
- package/resources/claude-customizations/.claude/skills/python-change-budget-router/SKILL.md +1 -1
- package/resources/claude-customizations/.claude/skills/remediation-handoff-atomic-planner/SKILL.md +14 -6
- package/resources/claude-customizations/.claude/skills/research-issue/SKILL.md +6 -0
- package/resources/claude-customizations/config/orchestration-routing.json +7 -7
- package/resources/claude-customizations/pack-manifests/core.json +4 -0
- package/resources/codex-and-agents-customizations/.agents/skills/README.md +1 -0
- package/resources/codex-and-agents-customizations/.agents/skills/atomic-executor/SKILL.md +8 -7
- package/resources/codex-and-agents-customizations/.agents/skills/atomic-plan-contract/SKILL.md +39 -4
- package/resources/codex-and-agents-customizations/.agents/skills/atomic-planner/SKILL.md +8 -6
- package/resources/codex-and-agents-customizations/.agents/skills/codex-model-routing/SKILL.md +6 -6
- package/resources/codex-and-agents-customizations/.agents/skills/csharp-change-budget-router/SKILL.md +2 -2
- package/resources/codex-and-agents-customizations/.agents/skills/epic-orchestrate/SKILL.md +15 -8
- package/resources/codex-and-agents-customizations/.agents/skills/epic-plan/SKILL.md +2 -2
- package/resources/codex-and-agents-customizations/.agents/skills/execution-environment/SKILL.md +134 -0
- package/resources/codex-and-agents-customizations/.agents/skills/orchestrate/SKILL.md +16 -6
- package/resources/codex-and-agents-customizations/.agents/skills/orchestrator-workflow/SKILL.md +1 -1
- package/resources/codex-and-agents-customizations/.agents/skills/powershell-change-budget-router/SKILL.md +1 -1
- package/resources/codex-and-agents-customizations/.agents/skills/python-change-budget-router/SKILL.md +1 -1
- package/resources/codex-and-agents-customizations/.agents/skills/remediation-handoff-atomic-planner/SKILL.md +7 -3
- package/resources/codex-and-agents-customizations/.agents/skills/research-issue/SKILL.md +6 -0
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c1.toml +11 -7
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c2.toml +11 -7
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c3-elevated.toml +11 -7
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c3.toml +11 -7
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c4.toml +11 -7
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor.toml +11 -7
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c1.toml +6 -3
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c2.toml +6 -3
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c3-elevated.toml +6 -3
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c3.toml +6 -3
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c4.toml +6 -3
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner.toml +6 -3
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-planning.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/commit-steward-c1.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/commit-steward-c2.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/commit-steward-c3-elevated.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/commit-steward-c3.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/commit-steward-c4.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/commit-steward.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/csharp-atomic-planning.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c1.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c2.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c3-elevated.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c3.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c4.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/epic-orchestrator.toml +4 -2
- package/resources/codex-and-agents-customizations/.codex/agents/epic-planner.toml +2 -2
- package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer-c1.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer-c2.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer-c3-elevated.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer-c3.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer-c4.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/orchestrator-c1.toml +8 -5
- package/resources/codex-and-agents-customizations/.codex/agents/orchestrator-c2.toml +8 -5
- package/resources/codex-and-agents-customizations/.codex/agents/orchestrator-c3-elevated.toml +8 -5
- package/resources/codex-and-agents-customizations/.codex/agents/orchestrator-c3.toml +8 -5
- package/resources/codex-and-agents-customizations/.codex/agents/orchestrator-c4.toml +8 -5
- package/resources/codex-and-agents-customizations/.codex/agents/orchestrator.toml +8 -5
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-atomic-planning.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c1.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c2.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c3-elevated.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c3.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c4.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/pr-author-c1.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/pr-author-c2.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/pr-author-c3-elevated.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/pr-author-c3.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/pr-author-c4.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/pr-author.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/prd-feature-c1.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/prd-feature-c2.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/prd-feature-c3-elevated.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/prd-feature-c3.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/prd-feature-c4.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/prd-feature.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/python-atomic-planning.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c1.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c2.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c3-elevated.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c3.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c4.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/task-researcher-c1.toml +7 -1
- package/resources/codex-and-agents-customizations/.codex/agents/task-researcher-c2.toml +7 -1
- package/resources/codex-and-agents-customizations/.codex/agents/task-researcher-c3-elevated.toml +7 -1
- package/resources/codex-and-agents-customizations/.codex/agents/task-researcher-c3.toml +7 -1
- package/resources/codex-and-agents-customizations/.codex/agents/task-researcher-c4.toml +7 -1
- package/resources/codex-and-agents-customizations/.codex/agents/task-researcher.toml +7 -1
- package/resources/codex-and-agents-customizations/.codex/agents/typescript-engineer-c1.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/typescript-engineer-c2.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/typescript-engineer-c3-elevated.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/typescript-engineer-c3.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/typescript-engineer-c4.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/typescript-engineer.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/config.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-epic-merge-gate-command.ps1 +190 -0
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-epic-merge-gate.ps1 +17 -38
- package/resources/codex-and-agents-customizations/.codex/hooks/hook-docs-only-diff.ps1 +5 -1
- package/resources/codex-and-agents-customizations/.codex/hooks/record-subagent-routing-attestation.ps1 +82 -70
- package/resources/codex-and-agents-customizations/.codex/prompts/feature-review-remediate.md +6 -4
- package/resources/codex-and-agents-customizations/.codex-variants/csharp-legacy/agents/csharp-typed-engineer.toml +1 -1
- package/resources/codex-and-agents-customizations/pack-manifests/core.json +2 -0
- package/resources/config/orchestration-routing.json +7 -7
- package/resources/customizations/.github/agents/atomic_executor.agent.md +21 -11
- package/resources/customizations/.github/agents/atomic_planning.agent.md +8 -3
- package/resources/customizations/.github/agents/csharp-atomic-executor.agent.md +13 -9
- package/resources/customizations/.github/agents/csharp-atomic-planning.agent.md +2 -2
- package/resources/customizations/.github/agents/csharp-orchestrator.agent.md +2 -2
- package/resources/customizations/.github/agents/csharp-typed-engineer.agent.md +3 -3
- package/resources/customizations/.github/agents/orchestrator.agent.md +8 -5
- package/resources/customizations/.github/agents/powershell-atomic-executor.agent.md +13 -9
- package/resources/customizations/.github/agents/powershell-atomic-planning.agent.md +2 -2
- package/resources/customizations/.github/agents/powershell-orchestrator.agent.md +2 -2
- package/resources/customizations/.github/agents/powershell-typed-engineer.agent.md +3 -3
- package/resources/customizations/.github/agents/python-atomic-executor.agent.md +13 -9
- package/resources/customizations/.github/agents/python-atomic-planning.agent.md +2 -2
- package/resources/customizations/.github/agents/python-orchestrator.agent.md +2 -2
- package/resources/customizations/.github/agents/task-researcher.agent.md +6 -0
- package/resources/customizations/.github/prompts/generate-atomic-plan.prompt.md +16 -10
- package/resources/customizations/.github/prompts/orchestrate-csharp-work.prompt.md +2 -2
- package/resources/customizations/.github/prompts/orchestrate-powershell-work.prompt.md +1 -1
- package/resources/customizations/.github/prompts/orchestrate-python-work.prompt.md +1 -1
- package/resources/customizations/.github/prompts/orchestrate-work.prompt.md +2 -2
- package/resources/customizations/.github/skills/atomic-plan-contract/SKILL.md +39 -4
- package/resources/customizations/.github/skills/csharp-change-budget-router/SKILL.md +1 -1
- package/resources/customizations/.github/skills/execution-environment/SKILL.md +134 -0
- package/resources/customizations/.github/skills/powershell-change-budget-router/SKILL.md +1 -1
- package/resources/customizations/.github/skills/remediation-handoff-atomic-planner/SKILL.md +7 -3
- package/resources/feature-templates/bug/plan.yyyy-MM-ddTHH-mm.md +10 -0
- package/resources/feature-templates/feature/plan.yyyy-MM-ddTHH-mm.md +11 -0
- package/resources/feature-templates/refactor/plan.yyyy-MM-ddTHH-mm.md +11 -0
- package/resources/lib/codex-routing/CodexDeployment.psm1 +10 -10
- package/resources/powershell/PoshQC/PoshQC.CoverageMerge.psm1 +163 -0
- package/resources/powershell/PoshQC/PoshQC.Shard.psm1 +296 -0
- package/resources/powershell/PoshQC/PoshQC.Testing.psm1 +23 -4
- package/resources/powershell/PoshQC/PoshQC.psd1 +7 -1
- package/resources/powershell/PoshQC/PoshQC.psm1 +17 -5
- package/resources/powershell/PoshQC/README.md +13 -1
- package/resources/powershell/PoshQC/settings/pester.runsettings.psd1 +3 -0
|
@@ -6,7 +6,7 @@ tools: [vscode/runCommand, vscode/extensions, execute/getTerminalOutput, execute
|
|
|
6
6
|
handoffs:
|
|
7
7
|
- label: Build minimal-audit atomic plan (preflight all clear)
|
|
8
8
|
agent: atomic_planner
|
|
9
|
-
prompt: "Generate a minimal-audit atomic plan for `${feature-folder}` using `${feature-folder}/issue.md` as the only requirements source (no spec/user-story/research). Use directive `DIRECTIVE: MINIMAL-AUDIT PLAN REQUIRED`. Target plan file path is `${plan-path}` and MUST be updated in place. Do NOT create additional `plan.*.md` siblings during drafting or preflight revision loops. The plan MUST include exactly 3 phases: Phase 0 baseline capture, Phase 1 placeholder for constrained small-path implementation work, Phase 2 final QC loop. Final-QC command tasks MUST be unconditional when present in the plan: do not add IN_SCOPE/OUT_OF_SCOPE branching and do not allow SKIPPED as a valid completion state for those tasks. Require validation-only preflight through `atomic_executor`
|
|
9
|
+
prompt: "Generate a minimal-audit atomic plan for `${feature-folder}` using `${feature-folder}/issue.md` as the only requirements source (no spec/user-story/research). Use directive `DIRECTIVE: MINIMAL-AUDIT PLAN REQUIRED`. Target plan file path is `${plan-path}` and MUST be updated in place. Do NOT create additional `plan.*.md` siblings during drafting or preflight revision loops. The plan MUST include exactly 3 phases: Phase 0 baseline capture, Phase 1 placeholder for constrained small-path implementation work, Phase 2 final QC loop. Final-QC command tasks MUST be unconditional when present in the plan: do not add IN_SCOPE/OUT_OF_SCOPE branching and do not allow SKIPPED as a valid completion state for those tasks. Require validation-only preflight through `atomic_executor` under the single-pass preflight rule (trivial defects fixed in place, at most one return to the planner) ending in `PREFLIGHT: ALL CLEAR` while preserving the same target path. Return `plan-path` and final preflight signal."
|
|
10
10
|
send: true
|
|
11
11
|
- label: Execute Phase 0 only
|
|
12
12
|
agent: atomic_executor
|
|
@@ -38,7 +38,7 @@ handoffs:
|
|
|
38
38
|
send: true
|
|
39
39
|
- label: Build PowerShell atomic plan (preflight all clear)
|
|
40
40
|
agent: powershell-atomic-planning
|
|
41
|
-
prompt: "You are powershell-atomic-planning.\n\nUse the prompt structure and requirements from `.github/prompts/generate-atomic-plan.prompt.md` as the canonical template.\nThe calling agent provides a REQUIRED target plan path `${plan-path}`; update this file in place and do NOT create additional `plan.*.md` siblings during drafting or preflight revision loops.\n\nContext package:\n- objective + expected outcome\n- `${promotion-type}` and `${issue-num}` when available\n- `${feature-folder}`\n- `${feature-folder}/issue.md`\n- `${feature-folder}/spec.md`\n- `${feature-folder}/user-story.md` (or explicit `NONE`)\n- latest research artifact path(s)\n- constraints/APIs/invariants to preserve\n\nCore requirements:\n- Delegate plan creation to `atomic_planner` (planning only).\n- Require `atomic_planner` to run validation-only preflight through `atomic_executor`
|
|
41
|
+
prompt: "You are powershell-atomic-planning.\n\nUse the prompt structure and requirements from `.github/prompts/generate-atomic-plan.prompt.md` as the canonical template.\nThe calling agent provides a REQUIRED target plan path `${plan-path}`; update this file in place and do NOT create additional `plan.*.md` siblings during drafting or preflight revision loops.\n\nContext package:\n- objective + expected outcome\n- `${promotion-type}` and `${issue-num}` when available\n- `${feature-folder}`\n- `${feature-folder}/issue.md`\n- `${feature-folder}/spec.md`\n- `${feature-folder}/user-story.md` (or explicit `NONE`)\n- latest research artifact path(s)\n- constraints/APIs/invariants to preserve\n\nCore requirements:\n- Delegate plan creation to `atomic_planner` (planning only).\n- Require `atomic_planner` to run validation-only preflight through `atomic_executor` under the single-pass preflight rule (trivial defects fixed in place, at most one return to the planner) ending in `PREFLIGHT: ALL CLEAR` while preserving `${plan-path}`.\n- Approved plans MUST include explicit coverage-bearing baseline and final-QC testing tasks for PowerShell when policy requires coverage; coverage MUST NOT be left as UNVERIFIED for PASS outcomes.\n- Return the finalized plan path and final preflight signal; do not execute implementation."
|
|
42
42
|
send: true
|
|
43
43
|
- label: Execute approved PowerShell atomic plan
|
|
44
44
|
agent: powershell_atomic_executor
|
|
@@ -6,7 +6,7 @@ tools: [vscode, execute/testFailure, execute/getTerminalOutput, execute/killTerm
|
|
|
6
6
|
handoffs:
|
|
7
7
|
- label: Architecture + testability plan only (no edits)
|
|
8
8
|
agent: atomic_planner
|
|
9
|
-
prompt: "Create a plan ONLY (no implementation edits). Use `.github/prompts/generate-atomic-plan.prompt.md` as the planning contract and resolve it with concrete paths/inputs (`name`, `file`, `spec`, `user-story`, `research`) so there are no placeholders. Produce an executor-ready atomic plan with canonical `### Phase N — ...` headings, `- [ ] [P#-T#]` tasks, mandatory Phase 0 baseline capture, and mandatory final QA loop for all affected toolchains. Plan content must explicitly include: proposed script/module structure, minimal DI seams, Pester scenario-level test strategy, external executable wrapper mock strategy, and exact files to change. After drafting, run the mandatory validation-only handoff
|
|
9
|
+
prompt: "Create a plan ONLY (no implementation edits). Use `.github/prompts/generate-atomic-plan.prompt.md` as the planning contract and resolve it with concrete paths/inputs (`name`, `file`, `spec`, `user-story`, `research`) so there are no placeholders. Produce an executor-ready atomic plan with canonical `### Phase N — ...` headings, `- [ ] [P#-T#]` tasks, mandatory Phase 0 baseline capture, and mandatory final QA loop for all affected toolchains. Plan content must explicitly include: proposed script/module structure, minimal DI seams, Pester scenario-level test strategy, external executable wrapper mock strategy, and exact files to change. After drafting, run the mandatory single-pass validation-only handoff to `atomic_executor` with the exact directive `DIRECTIVE: PREFLIGHT VALIDATION ONLY` in the delegation prompt; apply the required plan deltas in one revision (a plan returns to the planner at most once) ending in `PREFLIGHT: ALL CLEAR`, then return the finalized plan plus the final all-clear signal."
|
|
10
10
|
send: true
|
|
11
11
|
- label: Implement approved plan
|
|
12
12
|
agent: powershell_atomic_executor
|
|
@@ -94,7 +94,7 @@ If any required item is missing in orchestrator handoff mode, STOP and request t
|
|
|
94
94
|
When in **Orchestrator handoff mode**, this agent MUST run the following delegation chain and MUST NOT bypass it with direct implementation:
|
|
95
95
|
|
|
96
96
|
1) Delegate to `atomic_planner` (handoff: **Architecture + testability plan only (no edits)**).
|
|
97
|
-
2) Require planner output to include final `PREFLIGHT: ALL CLEAR` from
|
|
97
|
+
2) Require planner output to include final `PREFLIGHT: ALL CLEAR` from single-pass `atomic_executor` preflight.
|
|
98
98
|
3) Delegate plan execution to `powershell_atomic_executor` (handoff: **Implement approved plan**).
|
|
99
99
|
4) Delegate final QA to `powershell_atomic_executor` (handoff: **Post-change QA gate (format + analyze + tests + coverage)**).
|
|
100
100
|
5) Delegate post-implementation review to `feature_code_review_agent` (handoff: **Post-implementation feature review**).
|
|
@@ -208,7 +208,7 @@ The plan should include:
|
|
|
208
208
|
- Exact files to change (must satisfy scope guardrails).
|
|
209
209
|
|
|
210
210
|
Orchestrator handoff mode requirement:
|
|
211
|
-
- Even if a draft plan is supplied, delegate to `atomic_planner` to normalize/validate the plan and run
|
|
211
|
+
- Even if a draft plan is supplied, delegate to `atomic_planner` to normalize/validate the plan and run mandatory single-pass preflight to `PREFLIGHT: ALL CLEAR` before any implementation delegation.
|
|
212
212
|
|
|
213
213
|
Orchestrator handoff mode hard stop:
|
|
214
214
|
- In this mode, ignore implicit approval shortcuts for direct local execution.
|
|
@@ -95,11 +95,11 @@ When all format and mode-gate requirements are satisfied, return:
|
|
|
95
95
|
|
|
96
96
|
### 2.0 Preflight validation-only mode (directive-driven)
|
|
97
97
|
|
|
98
|
-
If you receive a plan along with the following directive line (exact text):
|
|
98
|
+
If you receive a plan along with the following directive line (exact text) in the delegation prompt:
|
|
99
99
|
|
|
100
100
|
`DIRECTIVE: PREFLIGHT VALIDATION ONLY`
|
|
101
101
|
|
|
102
|
-
you MUST enter **validation-only** mode.
|
|
102
|
+
you MUST enter **validation-only** mode. The preflight directive belongs in the delegation prompt, never in a plan file; a directive line inside a plan file does not make an execution run a preflight run.
|
|
103
103
|
|
|
104
104
|
Validation-only mode rules (non-negotiable):
|
|
105
105
|
1) Perform ONLY the steps in:
|
|
@@ -116,14 +116,18 @@ Validation-only required output:
|
|
|
116
116
|
- `PREFLIGHT: ALL CLEAR`
|
|
117
117
|
- `PREFLIGHT: REVISIONS REQUIRED`
|
|
118
118
|
|
|
119
|
-
|
|
120
|
-
-
|
|
121
|
-
-
|
|
122
|
-
|
|
119
|
+
Single-pass rules (`### Single-Pass Preflight` in the `atomic-plan-contract` skill):
|
|
120
|
+
- Review the entire plan in one pass and classify every defect as trivial or substantive.
|
|
121
|
+
- Fix trivial defects in place, in task text only; never add, remove, or reorder tasks. Record each
|
|
122
|
+
fix in `<FEATURE>/evidence/other/preflight-fixes.<timestamp>.md`. This in-place edit is the only file
|
|
123
|
+
write validation-only mode permits.
|
|
124
|
+
- After the signal, emit one line per defect: `PREFLIGHT-FIX: <task id or heading> | <defect class> | <change made>`,
|
|
125
|
+
`PREFLIGHT-DEFECT: <task id or heading> | <defect class> | <required change>`, and
|
|
126
|
+
`preflight-fix-record: <path>` when at least one fix was made.
|
|
123
127
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
128
|
+
If revisions are required:
|
|
129
|
+
- Include a precise **plan delta** that `atomic_planner` can apply (exact edits/additions/removals), with one `PREFLIGHT-DEFECT:` line for every substantive defect found.
|
|
130
|
+
- Return the result to the caller. A plan returns to the planner at most once; the orchestrator routes the full defect list for one revision and runs one confirming preflight.
|
|
127
131
|
|
|
128
132
|
When the user provides a plan (in chat or via file path), you must:
|
|
129
133
|
|
|
@@ -105,9 +105,9 @@ Branch-specific required task sets:
|
|
|
105
105
|
|
|
106
106
|
---
|
|
107
107
|
|
|
108
|
-
### 2.5.1 Mandatory preflight
|
|
108
|
+
### 2.5.1 Mandatory single-pass preflight via `python-atomic-executor`
|
|
109
109
|
|
|
110
|
-
Follow
|
|
110
|
+
Follow `### Single-Pass Preflight` in the `atomic-plan-contract` skill. The preflight directive belongs in the delegation prompt, never in the plan file. The preflight executor fixes trivial defects in place and returns only substantive defects as `PREFLIGHT-DEFECT:` lines. A plan returns to the planner at most once: apply every listed change in one revision of the same file; if the confirming preflight still reports a substantive defect, the orchestrator halts with `blocked_reason: "validator_failed"`.
|
|
111
111
|
|
|
112
112
|
---
|
|
113
113
|
|
|
@@ -6,7 +6,7 @@ tools: [vscode/runCommand, vscode/extensions, execute/getTerminalOutput, execute
|
|
|
6
6
|
handoffs:
|
|
7
7
|
- label: Build minimal-audit atomic plan (preflight all clear)
|
|
8
8
|
agent: atomic_planner
|
|
9
|
-
prompt: "Generate a minimal-audit atomic plan for `${feature-folder}` using `${feature-folder}/issue.md` as the only requirements source (no spec/user-story/research). Use directive `DIRECTIVE: MINIMAL-AUDIT PLAN REQUIRED`. Target plan file path is `${plan-path}` and MUST be updated in place. Do NOT create additional `plan.*.md` siblings during drafting or preflight revision loops. The plan MUST include exactly 3 phases: Phase 0 baseline capture, Phase 1 placeholder for constrained small-path implementation work, Phase 2 final QC loop. Final-QC command tasks MUST be unconditional when present in the plan: do not add IN_SCOPE/OUT_OF_SCOPE branching and do not allow SKIPPED as a valid completion state for those tasks. Require validation-only preflight through `atomic_executor`
|
|
9
|
+
prompt: "Generate a minimal-audit atomic plan for `${feature-folder}` using `${feature-folder}/issue.md` as the only requirements source (no spec/user-story/research). Use directive `DIRECTIVE: MINIMAL-AUDIT PLAN REQUIRED`. Target plan file path is `${plan-path}` and MUST be updated in place. Do NOT create additional `plan.*.md` siblings during drafting or preflight revision loops. The plan MUST include exactly 3 phases: Phase 0 baseline capture, Phase 1 placeholder for constrained small-path implementation work, Phase 2 final QC loop. Final-QC command tasks MUST be unconditional when present in the plan: do not add IN_SCOPE/OUT_OF_SCOPE branching and do not allow SKIPPED as a valid completion state for those tasks. Require validation-only preflight through `atomic_executor` under the single-pass preflight rule (trivial defects fixed in place, at most one return to the planner) ending in `PREFLIGHT: ALL CLEAR` while preserving the same target path. Return `plan-path` and final preflight signal."
|
|
10
10
|
send: true
|
|
11
11
|
- label: Execute Phase 0 only
|
|
12
12
|
agent: atomic_executor
|
|
@@ -38,7 +38,7 @@ handoffs:
|
|
|
38
38
|
send: true
|
|
39
39
|
- label: Build Python atomic plan (preflight all clear)
|
|
40
40
|
agent: python-atomic-planning
|
|
41
|
-
prompt: "You are python-atomic-planning.\n\nUse the prompt structure and requirements from `.github/prompts/generate-atomic-plan.prompt.md` as the canonical template.\nThe calling agent provides a REQUIRED target plan path `${plan-path}`; update this file in place and do NOT create additional `plan.*.md` siblings during drafting or preflight revision loops.\n\nContext package:\n- objective + expected outcome\n- `${promotion-type}` and `${issue-num}` when available\n- `${feature-folder}`\n- `${feature-folder}/issue.md`\n- `${feature-folder}/spec.md`\n- `${feature-folder}/user-story.md` (or explicit `NONE`)\n- latest research artifact path(s)\n- constraints/APIs/invariants to preserve\n\nCore requirements:\n- Delegate plan creation to `atomic_planner` (planning only).\n- Require `atomic_planner` to run validation-only preflight through `atomic_executor`
|
|
41
|
+
prompt: "You are python-atomic-planning.\n\nUse the prompt structure and requirements from `.github/prompts/generate-atomic-plan.prompt.md` as the canonical template.\nThe calling agent provides a REQUIRED target plan path `${plan-path}`; update this file in place and do NOT create additional `plan.*.md` siblings during drafting or preflight revision loops.\n\nContext package:\n- objective + expected outcome\n- `${promotion-type}` and `${issue-num}` when available\n- `${feature-folder}`\n- `${feature-folder}/issue.md`\n- `${feature-folder}/spec.md`\n- `${feature-folder}/user-story.md` (or explicit `NONE`)\n- latest research artifact path(s)\n- constraints/APIs/invariants to preserve\n\nCore requirements:\n- Delegate plan creation to `atomic_planner` (planning only).\n- Require `atomic_planner` to run validation-only preflight through `atomic_executor` under the single-pass preflight rule (trivial defects fixed in place, at most one return to the planner) ending in `PREFLIGHT: ALL CLEAR` while preserving `${plan-path}`.\n- Approved plans MUST include explicit coverage-bearing baseline and final-QC testing tasks for Python when policy requires coverage; coverage MUST NOT be left as UNVERIFIED for PASS outcomes.\n- Return the finalized plan path and final preflight signal; do not execute implementation."
|
|
42
42
|
send: true
|
|
43
43
|
- label: Execute approved Python atomic plan
|
|
44
44
|
agent: python-atomic-executor
|
|
@@ -10,6 +10,8 @@ tools: [vscode/getProjectSetupInfo, vscode/installExtension, vscode/newWorkspace
|
|
|
10
10
|
|
|
11
11
|
You are a research-only specialist who performs deep, comprehensive analysis for task planning. Your sole responsibility is to write research notes to one of the two tracked research roots: `docs/features/<feature>/research/` for feature-associated research, or `docs/research/` for one-off research not tied to a feature. The orchestrator resolves which root to use and supplies the path; do not infer the feature folder independently. You MUST NOT make changes to any other files, code, or configurations.
|
|
12
12
|
|
|
13
|
+
Read `.github/skills/execution-environment/SKILL.md` first, before any other step. It states the tool routes, command-text restrictions, batch budget, hook context, CI shape, contract tests, evidence rules, coverage and file-size gates, and test-isolation checks that research findings and the pre-mortem must account for.
|
|
14
|
+
|
|
13
15
|
## Core Research Principles
|
|
14
16
|
|
|
15
17
|
You MUST operate under these constraints:
|
|
@@ -50,6 +52,10 @@ You WILL identify multiple implementation approaches during research, documentin
|
|
|
50
52
|
|
|
51
53
|
You WILL present findings succinctly to the user, highlighting key discoveries and alternative approaches. You MUST guide the user toward selecting a single recommended solution and then remove detailed alternative-approach research from the final research document, leaving only a brief (non-exhaustive) "Rejected alternatives" summary.
|
|
52
54
|
|
|
55
|
+
### 4. Pre-Mortem
|
|
56
|
+
|
|
57
|
+
Feature-associated research (a research path under `docs/features/`) MUST carry a `## Pre-Mortem` section with one bullet beginning with each of the seven labels `Review checklists`, `Coverage`, `Mirror parity`, `File size`, `Test isolation`, `CI-only behavior`, and `Evidence`. Each bullet states how the next review or CI run could fail on that dimension and the mitigation the plan must carry; a label that does not apply is written as "not applicable" followed by the reason. One-off research under `docs/research/` is exempt.
|
|
58
|
+
|
|
53
59
|
## Alternative Analysis Framework
|
|
54
60
|
|
|
55
61
|
During research, you WILL discover and evaluate multiple implementation approaches.
|
|
@@ -54,7 +54,7 @@ Plans must consist of discrete, atomic phases containing executable tasks. Each
|
|
|
54
54
|
|
|
55
55
|
Please fill out the template given in `${file}`.
|
|
56
56
|
|
|
57
|
-
## Mandatory post-output preflight
|
|
57
|
+
## Mandatory post-output single-pass preflight
|
|
58
58
|
|
|
59
59
|
After you have fully updated `${file}`, you MUST initiate a **validate-only** preflight validation
|
|
60
60
|
handoff to the `atomic_executor` agent.
|
|
@@ -63,10 +63,14 @@ Purpose:
|
|
|
63
63
|
Ensure the plan you produced is ingestible by the executor without replanning.
|
|
64
64
|
|
|
65
65
|
Hard constraints:
|
|
66
|
-
- The executor MUST perform **preflight checks only** (no task execution)
|
|
67
|
-
|
|
66
|
+
- The executor MUST perform **preflight checks only** (no task execution), in one pass over the
|
|
67
|
+
entire plan, fixing trivial defects in place and returning only substantive defects
|
|
68
|
+
(`### Single-Pass Preflight` in the `atomic-plan-contract` skill).
|
|
69
|
+
- The plan is design-level (`## Design-Level Plan Contract (Mandatory)` in the
|
|
70
|
+
`atomic-plan-contract` skill) and carries a `## Pre-Mortem` section.
|
|
71
|
+
- A plan returns to you at most once.
|
|
68
72
|
|
|
69
|
-
Required handoff directive (exact text)
|
|
73
|
+
Required handoff directive (exact text), placed in the handoff prompt and never in `${file}`:
|
|
70
74
|
|
|
71
75
|
`DIRECTIVE: PREFLIGHT VALIDATION ONLY`
|
|
72
76
|
|
|
@@ -75,13 +79,15 @@ Required validation result signals (exact text; one must be present):
|
|
|
75
79
|
- `PREFLIGHT: ALL CLEAR`
|
|
76
80
|
- `PREFLIGHT: REVISIONS REQUIRED`
|
|
77
81
|
|
|
78
|
-
|
|
82
|
+
Handoff protocol (MANDATORY):
|
|
79
83
|
1) Hand off `${file}` to `atomic_executor` with the directive above.
|
|
80
|
-
2) If the executor returns `PREFLIGHT: REVISIONS REQUIRED`, apply
|
|
81
|
-
`${file}` (preserving task IDs and
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
`
|
|
84
|
+
2) If the executor returns `PREFLIGHT: REVISIONS REQUIRED`, apply every `PREFLIGHT-DEFECT:` change
|
|
85
|
+
in the executor’s plan delta to `${file}` in one revision (preserving task IDs and
|
|
86
|
+
executor-compatible formatting), then hand off once more.
|
|
87
|
+
3) If the confirming preflight still returns `PREFLIGHT: REVISIONS REQUIRED`, stop and report
|
|
88
|
+
blocked state (`blocked_reason: "validator_failed"`); do not open another revision.
|
|
89
|
+
4) Only after `PREFLIGHT: ALL CLEAR` may you return control to the calling system, including the
|
|
90
|
+
final `PREFLIGHT: ALL CLEAR` signal verbatim.
|
|
85
91
|
|
|
86
92
|
## Template Validation Rules
|
|
87
93
|
|
|
@@ -27,7 +27,7 @@ Coordinate the user request from intake to completion using the correct path bas
|
|
|
27
27
|
1) Scope/create potential entry and promote with `--work-mode minor-audit`
|
|
28
28
|
2) Create branch and active feature folder with `--work-mode minor-audit`, then verify `issue.md` contains an explicit `## Acceptance Criteria` section
|
|
29
29
|
3) Delegate plan creation to `atomic_planner` with directive `DIRECTIVE: MINIMAL-AUDIT PLAN REQUIRED`
|
|
30
|
-
4) Require `atomic_executor` preflight
|
|
30
|
+
4) Require single-pass `atomic_executor` preflight ending in `PREFLIGHT: ALL CLEAR` (at most one return to the planner)
|
|
31
31
|
5) Delegate to `atomic_executor` to execute **Phase 0 only**
|
|
32
32
|
6) Branch behavior:
|
|
33
33
|
- explicit initial manual bootstrap opt-in: save state and stop for manual resume
|
|
@@ -40,7 +40,7 @@ Coordinate the user request from intake to completion using the correct path bas
|
|
|
40
40
|
2) Promote to GitHub issue and capture issue metadata
|
|
41
41
|
3) Create branch and active feature folder
|
|
42
42
|
4) Delegate research + spec/story completion
|
|
43
|
-
5) Delegate plan creation to `csharp-atomic-planning` (which delegates to `atomic_planner`, then
|
|
43
|
+
5) Delegate plan creation to `csharp-atomic-planning` (which delegates to `atomic_planner`, then runs single-pass preflight via `atomic_executor` ending in `PREFLIGHT: ALL CLEAR`)
|
|
44
44
|
6) After all-clear, delegate implementation + QA directly to `csharp-atomic-executor`
|
|
45
45
|
7) Delegate post-implementation feature review
|
|
46
46
|
|
|
@@ -29,7 +29,7 @@ Coordinate the user request from intake to completion using the correct path bas
|
|
|
29
29
|
2) Promote to GitHub issue and capture issue metadata
|
|
30
30
|
3) Create branch and active feature folder
|
|
31
31
|
4) Delegate research + spec/story completion
|
|
32
|
-
5) Delegate plan creation to `powershell-atomic-planning` (which delegates to `atomic_planner`, then
|
|
32
|
+
5) Delegate plan creation to `powershell-atomic-planning` (which delegates to `atomic_planner`, then runs single-pass preflight via `atomic_executor` ending in `PREFLIGHT: ALL CLEAR`)
|
|
33
33
|
6) After all-clear, delegate implementation + QA directly to `powershell_atomic_executor`
|
|
34
34
|
7) Delegate post-implementation feature review
|
|
35
35
|
|
|
@@ -29,7 +29,7 @@ Coordinate the user request from intake to completion using the correct path bas
|
|
|
29
29
|
2) Promote to GitHub issue and capture issue metadata
|
|
30
30
|
3) Create branch and active feature folder
|
|
31
31
|
4) Delegate research + spec/story completion
|
|
32
|
-
5) Delegate plan creation to `python-atomic-planning` (which delegates to `atomic_planner`, then
|
|
32
|
+
5) Delegate plan creation to `python-atomic-planning` (which delegates to `atomic_planner`, then runs single-pass preflight via `atomic_executor` ending in `PREFLIGHT: ALL CLEAR`)
|
|
33
33
|
6) After all-clear, delegate implementation + QA directly to `python-atomic-executor`
|
|
34
34
|
7) Delegate post-implementation feature review
|
|
35
35
|
|
|
@@ -27,7 +27,7 @@ Coordinate the user request from intake to completion using the correct path bas
|
|
|
27
27
|
1) Scope/create potential entry and promote with `--work-mode minor-audit`
|
|
28
28
|
2) Create branch and active feature folder with `--work-mode minor-audit`, then verify `issue.md` contains an explicit `## Acceptance Criteria` section
|
|
29
29
|
3) Delegate plan creation to `atomic_planner` with directive `DIRECTIVE: MINIMAL-AUDIT PLAN REQUIRED`
|
|
30
|
-
4) Require `atomic_executor` preflight
|
|
30
|
+
4) Require single-pass `atomic_executor` preflight ending in `PREFLIGHT: ALL CLEAR` (at most one return to the planner)
|
|
31
31
|
5) Delegate to `atomic_executor` to execute **Phase 0 only**
|
|
32
32
|
6) Branch behavior:
|
|
33
33
|
- explicit initial manual bootstrap opt-in: save state and stop for manual resume
|
|
@@ -40,7 +40,7 @@ Coordinate the user request from intake to completion using the correct path bas
|
|
|
40
40
|
2) Promote to GitHub issue and capture issue metadata
|
|
41
41
|
3) Create branch and active feature folder
|
|
42
42
|
4) Delegate research + spec/story completion
|
|
43
|
-
5) Delegate plan creation to `atomic_planner` (and require validation-only preflight through `atomic_executor`
|
|
43
|
+
5) Delegate plan creation to `atomic_planner` (and require single-pass validation-only preflight through `atomic_executor` ending in `PREFLIGHT: ALL CLEAR`)
|
|
44
44
|
6) After all-clear, delegate implementation + QA directly to `atomic_executor`
|
|
45
45
|
7) Delegate post-implementation feature review
|
|
46
46
|
|
|
@@ -21,6 +21,22 @@ Use this skill when:
|
|
|
21
21
|
- Task IDs must match their phase and be sequential per phase.
|
|
22
22
|
- Plans must pass the `validate_orchestration_artifacts` MCP tool with `artifact_type: "plan"` and `artifact_path: <plan-path>` before they can be reported as approved.
|
|
23
23
|
|
|
24
|
+
## Design-Level Plan Contract (Mandatory)
|
|
25
|
+
|
|
26
|
+
A plan is a design-level document: it states what changes and how the change is proven, not a transcript of commands. Every task names the files it creates or edits, the symbols, headings, or tests it touches, the behavior the change produces, the tests that prove that behavior, and an acceptance condition stated as an observable outcome.
|
|
27
|
+
|
|
28
|
+
Rules:
|
|
29
|
+
|
|
30
|
+
- **Anchors are symbols, headings, or test names.** A plan never cites a line number, a `path:line` locator, a `#L` anchor, or a commit SHA, because each goes stale when `main` moves (validator rules G11 and G12). Scope comparisons name the merge-base derivation of `origin/main` and `HEAD`, not a commit.
|
|
31
|
+
- **Literals only where they are the asserted value.** A plan quotes a literal when an acceptance condition asserts that exact value. It does not quote file contents, command output, or prose for context.
|
|
32
|
+
- **Tool routes are not restated.** Tool routes, launchers, wrapper scripts, command-text restrictions, the batch budget, hook context, and CI shape are owned by the `execution-environment` skill. A plan references that skill instead of restating its content.
|
|
33
|
+
- **Changed existing behavior names its asserting tests.** A task that changes the observable behavior of an existing function, script, fixture, or test stub (its signature, argv, output, exit status, or the files it writes) names every existing test that asserts that behavior and states each test's disposition: unchanged because it is unaffected, or updated, with the reason for the update. The tests are found by searching the test tree for the symbol, the file name, and the asserted output. A test that asserts the current behavior and is outside the task's file set fails once the change lands, and the plan's own acceptance condition then cannot be met. The planner's adversarial self-review includes this search for every task that changes existing behavior.
|
|
34
|
+
- **Size guideline.** A plan stays within 40 canonical tasks and 400 physical lines. A plan that needs more carries a `## Size Justification` section with at least one line stating why the size is necessary (validator rule G13). Files produced by one generator run count as one generator task.
|
|
35
|
+
- **Pre-Mortem.** Every plan carries a `## Pre-Mortem` section with one bullet beginning with each of the seven labels `Review checklists`, `Coverage`, `Mirror parity`, `File size`, `Test isolation`, `CI-only behavior`, and `Evidence`. Each bullet states how the plan prevents that failure class, or states "not applicable" followed by the reason. The `Test isolation` bullet names the isolation runs the plan performs: a seeded shuffled Jest run with the seed recorded, a reversed-order run of the new or changed Python test modules, and a seeded shuffled file-order run of the touched Pester suites with at least three seeds, each seed recorded. The `Mirror parity` bullet also covers the execution-environment brief: a plan that alters a fact the brief states (for example, it adds or renames a CI job, changes a required status context, a tool route, or a batch-budget rule) includes a task that updates the brief in the same change, in all six byte-identical copies, and the bullet names that task. Without that task the brief states a superseded fact once the change lands, which breaks the brief's own maintenance rule. The planner SubagentStop hook blocks a plan without a complete section.
|
|
36
|
+
- **Final-phase self-review.** The final phase of every plan contains a self-review task that walks the policy-audit, code-review, and feature-audit templates under `docs/features/templates/policy_audit/` against the branch diff from the merge base and writes `<FEATURE>/evidence/qa-gates/self-review.<timestamp>.md` with one PASS, FAIL, or N/A row per checklist item. A FAIL row is fixed and the QA loop is re-run before the self-review is rewritten; the plan does not complete with a FAIL row.
|
|
37
|
+
|
|
38
|
+
This section takes precedence over the literal-quoting rules of `## Wrap-Tolerant Assertion Authoring (Mandatory)`: those rules govern the asserted value of an acceptance condition, not context.
|
|
39
|
+
|
|
24
40
|
## Short-Path Minimal Plan Contract
|
|
25
41
|
|
|
26
42
|
When orchestration selects short path, a minimal plan is still mandatory and must include these blocks:
|
|
@@ -144,13 +160,30 @@ Any regression test task expected to fail must be tagged with `[expect-fail]` an
|
|
|
144
160
|
## Preflight Validation (Planner ↔ Executor)
|
|
145
161
|
|
|
146
162
|
When validating or handing off plans for execution:
|
|
147
|
-
-
|
|
163
|
+
- Put the directive line `DIRECTIVE: PREFLIGHT VALIDATION ONLY` in the delegation prompt. The preflight directive belongs in the delegation prompt, never in a plan file.
|
|
148
164
|
- Require one of the exact signals:
|
|
149
165
|
- `PREFLIGHT: ALL CLEAR`
|
|
150
166
|
- `PREFLIGHT: REVISIONS REQUIRED`
|
|
151
|
-
- If revisions are required, provide a precise plan delta
|
|
167
|
+
- If revisions are required, provide a precise plan delta with one `PREFLIGHT-DEFECT:` line per substantive defect. A plan returns to the planner at most once.
|
|
152
168
|
- If the required planner ↔ executor handoff cannot be started or completed, stop and report blocked state; do not self-approve the plan.
|
|
153
169
|
|
|
170
|
+
### Single-Pass Preflight
|
|
171
|
+
|
|
172
|
+
- **Review the entire plan in one pass.** The preflight executor checks every phase, task, and prose region and does not stop at the first defect.
|
|
173
|
+
- **Classify every defect as trivial or substantive.** Trivial defects are a stale or misspelled anchor, symbol, heading, or path whose intent is unambiguous; a citation correction, including removal of a G11 line-number or G12 commit-SHA citation; a typo; a literal-formatting defect that does not change what is asserted; and an evidence filename spelling. Substantive defects are a missing or extra task; a wrong file set or design; an acceptance criterion with no implementing task; an acceptance condition whose correction changes what is asserted; a task-ordering error; and a scope-boundary violation.
|
|
174
|
+
- **Fix trivial defects in place, in task text only.** The preflight executor edits task text and plan preamble in the same plan file and never adds, removes, or reorders tasks. Each fix is recorded in `<FEATURE>/evidence/other/preflight-fixes.<timestamp>.md`.
|
|
175
|
+
- **Return substantive defects only, all of them.** `PREFLIGHT: REVISIONS REQUIRED` is returned only when at least one substantive defect remains, and it lists every one. `PREFLIGHT: ALL CLEAR` may follow in-place fixes.
|
|
176
|
+
|
|
177
|
+
Output format. After the `PREFLIGHT:` signal, the return carries one line per defect:
|
|
178
|
+
|
|
179
|
+
- `PREFLIGHT-FIX: <task id or heading> | <defect class> | <change made>`
|
|
180
|
+
- `PREFLIGHT-DEFECT: <task id or heading> | <defect class> | <required change>`
|
|
181
|
+
- `preflight-fix-record: <path>` when at least one fix was made.
|
|
182
|
+
|
|
183
|
+
`PREFLIGHT: ALL CLEAR` carries no `PREFLIGHT-DEFECT:` line, and `PREFLIGHT: REVISIONS REQUIRED` carries at least one.
|
|
184
|
+
|
|
185
|
+
At most one return. On `PREFLIGHT: REVISIONS REQUIRED`, the orchestrator delegates one planner revision carrying the full `PREFLIGHT-DEFECT:` list and runs one more preflight. If that preflight still reports a substantive defect, the orchestrator halts with `blocked_reason: "validator_failed"` during planning, or records `final_status: "blocked_preflight_iteration_limit"` in a remediation cycle.
|
|
186
|
+
|
|
154
187
|
## Validator Gate (Mandatory)
|
|
155
188
|
|
|
156
189
|
Before a plan can be treated as approved:
|
|
@@ -159,15 +192,17 @@ Before a plan can be treated as approved:
|
|
|
159
192
|
- reject the plan if that validator exits non-zero,
|
|
160
193
|
- do not treat human-readable summaries as a substitute for validator success.
|
|
161
194
|
|
|
195
|
+
The validator applies the acceptance-gate rules of `.claude/rules/plan-acceptance-gates.md`. G1 through G9 judge the commands a plan states as acceptance conditions; G10 reports a SCRATCH definition not namespaced by issue number; and the document-level rules G11, G12, and G13 report a line-number citation, a commit-SHA citation, and a plan above 40 tasks or 400 lines without a non-empty `## Size Justification` section. The complete shipped set is therefore G1 through G13. The installed MCP validator applies G11 through G13 only after the extension release that carries them is installed; until then, validate a plan with the repository's Python CLI `scripts/dev_tools/validate_orchestration_artifacts.py` and its `plan` subcommand, as the `execution-environment` skill states.
|
|
196
|
+
|
|
162
197
|
## Plan-Path Continuity Contract (Mandatory)
|
|
163
198
|
|
|
164
199
|
When a caller provides an explicit target plan file path (for example `${plan-path}` or `${file}`):
|
|
165
200
|
|
|
166
201
|
- Planner MUST update that exact file in place.
|
|
167
|
-
- Planner MUST reuse the same file for
|
|
202
|
+
- Planner MUST reuse the same file for the single permitted preflight revision.
|
|
168
203
|
- Planner MUST NOT create additional timestamped sibling files (for example `plan.<timestamp>.md`) during the same planning cycle.
|
|
169
204
|
|
|
170
|
-
If the provided path does not exist, it may be created once, then reused for
|
|
205
|
+
If the provided path does not exist, it may be created once, then reused for the single permitted revision in that cycle.
|
|
171
206
|
|
|
172
207
|
## Mode source precedence (Mandatory)
|
|
173
208
|
|
|
@@ -28,7 +28,7 @@ When routed through `csharp-orchestrator`, small path still requires lifecycle s
|
|
|
28
28
|
- promote potential item to GitHub issue with `--work-mode minor-audit`,
|
|
29
29
|
- create active feature folder with `--work-mode minor-audit`,
|
|
30
30
|
- delegate minimal-audit plan creation to `atomic_planner` with `DIRECTIVE: MINIMAL-AUDIT PLAN REQUIRED`,
|
|
31
|
-
- require `atomic_executor` preflight
|
|
31
|
+
- require single-pass `atomic_executor` preflight ending in `PREFLIGHT: ALL CLEAR` (at most one return to the planner),
|
|
32
32
|
- execute Phase 0 only via atomic_executor before branching,
|
|
33
33
|
- run reduced small-audit after implementation and QC.
|
|
34
34
|
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: execution-environment
|
|
3
|
+
description: 'Execution-environment brief for research, planning, preflight, execution, and orchestration. Use before planning or delegating work so tool routes, command-text restrictions, the batch budget, hook context, CI shape, contract tests, evidence rules, coverage and file-size gates, and test-isolation checks are known and are not restated in plans.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Execution-Environment Brief
|
|
7
|
+
|
|
8
|
+
## Purpose and Maintenance
|
|
9
|
+
|
|
10
|
+
This brief states the environment facts that every researcher, planner, preflight executor, executor, and orchestrator needs before work starts. Plans reference this brief instead of restating its content; a plan that restates a tool route, a launcher, or a command-text restriction duplicates text that goes stale when this brief changes.
|
|
11
|
+
|
|
12
|
+
Maintenance rule: this brief is updated in the same change that alters any fact it states. It carries no line numbers and no commit identifiers; it cites files, symbols, headings, job names, and test names. The same text is byte-identical in six locations: `.claude/skills/execution-environment/SKILL.md`, `.agents/skills/execution-environment/SKILL.md`, `.github/skills/execution-environment/SKILL.md`, and their bundled copies under `extensions/drm-copilot/resources/`. Where the Claude and Codex runtimes differ, both paths are named (`.claude/hooks/...` and `.codex/hooks/...`).
|
|
13
|
+
|
|
14
|
+
## Tool Routes by Agent
|
|
15
|
+
|
|
16
|
+
- `atomic-executor` has no PowerShell tool. Its `tools:` list is Read, Grep, Glob, Edit, Write, several `Bash(...)` entries, the four `mcp__drm-copilot__run_poshqc_*` tools, and `mcp__drm-copilot__validate_orchestration_artifacts`. A `(pattern)` suffix on a `tools:` entry admits the bare tool, so the executor has Bash, subject to the repository hooks and the runtime guard described under Command-Text Restrictions.
|
|
17
|
+
- `atomic-planner` has no Bash. It has Read, Grep, Glob, Edit, Write, and `mcp__drm-copilot__validate_orchestration_artifacts`, so it can validate a plan with the installed validator before handoff but cannot run any toolchain command.
|
|
18
|
+
- `task-researcher` has Read, Grep, Glob, WebFetch, and Write. It cannot run `git show` or `gh`; facts that need either are marked for the orchestrator to confirm.
|
|
19
|
+
- `orchestrator` and the main session running the `orchestrate` skill have Bash, the PoshQC and validation MCP tools, and the `Agent` tool. Only they can delegate, so any step that needs a further agent run is orchestrator-owned.
|
|
20
|
+
- PowerShell for the executor therefore runs through the `mcp__drm-copilot__run_poshqc_*` tools or through a `sh` launcher script stored under `SCRATCH` that invokes PowerShell 7 from inside the script file.
|
|
21
|
+
|
|
22
|
+
## Command-Text Restrictions
|
|
23
|
+
|
|
24
|
+
Two separate mechanisms restrict Bash command text. They are kept apart here because they have different causes and different fixes.
|
|
25
|
+
|
|
26
|
+
- **Worktree isolation guard (Claude Code runtime behavior, not a repository hook).** Inside an agent-isolated worktree, the Claude Code runtime refuses Bash command text it cannot show stays inside the worktree. Observed refusals include text containing `pwsh`, `bash`, or `wsl`, heredocs, `printf --`, a `cd <path> &&` prefix before `git`, `git -C <other worktree>`, embedded `jq` filter strings, an unquoted shell variable in an option position, and loops or other compound constructs around `sh`. Text that passes includes `sh <file>.sh` with a literal path, `npx`, `poetry run python <script>`, `gh`, worktree-scoped `git`, and `git commit -F <file>`. No file under `.claude/hooks/` implements this guard, and no settings file registers it.
|
|
27
|
+
- **Repository hooks.** `.claude/hooks/validate-bash.ps1` (`.codex/hooks/validate-bash.ps1` for Codex; functions `Get-BlockedBashPattern`, `Get-CdChainedReadCommandMatch`, `Get-BashBlockReason`) denies destructive patterns (`rm -rf`, forced pushes, `git reset --hard`, recursive forced removal) and a `cd` followed later in the same command by a file-reading command such as `grep`, `cat`, `head`, `tail`, `less`, `more`, `awk`, or `sed -n`. `.claude/hooks/enforce-parallel-worktree-removal-gate.ps1` denies the literal worktree-removal command anywhere in a command.
|
|
28
|
+
- A multi-line `poetry run python -c` program exits 0 without running. Put Python helpers in a file under `SCRATCH` and run the file.
|
|
29
|
+
|
|
30
|
+
## PowerShell Route and PoshQC MCP Limits
|
|
31
|
+
|
|
32
|
+
- PoshQC MCP results carry no output. The summary string is composed from a fixed template before the child process runs (`runPoshQcWorkflow` in `extensions/drm-copilot/src/repo-automation-service.ts`), and `RepoAutomationExecutionResult` has no exit-code or output field. An `ok: true` result proves only that the tool was invoked.
|
|
33
|
+
- Counts, percentages, and findings therefore come from files or direct runs: pass and fail counts from `artifacts/pester/pester-junit.xml`, line coverage from `artifacts/pester/powershell-coverage.xml`, and analyzer findings from a direct `Invoke-ScriptAnalyzer` run with `scripts/powershell/PoshQC/settings/pssa.settings.psd1`.
|
|
34
|
+
- The MCP test tool reads the installed extension's settings. Branch-current Pester runs import `scripts/powershell/PoshQC/PoshQC.psd1` and call `Invoke-PoshQCTest` from a `sh`-launched PowerShell 7. The coverage population is derived by `Invoke-PoshQCTest` from `config/poshqc-coverage.json`; there is no hand-maintained coverage path list.
|
|
35
|
+
- `Invoke-Pester` without `-EnableExit` (or `Run.Exit`) exits 0 when tests fail; read the JUnit file rather than the exit code of such a run.
|
|
36
|
+
|
|
37
|
+
## Batch Budget
|
|
38
|
+
|
|
39
|
+
- In direct mode the batch-budget hooks allow at most three distinct production files per kind in one session: the fourth distinct non-test PowerShell file is denied with `POWERSHELL_LARGE_PATH_REQUIRED` and the fourth distinct non-test Python file with `PYTHON_LARGE_PATH_REQUIRED` (`.claude/hooks/enforce-powershell-batch-budget.ps1` and `.claude/hooks/enforce-python-batch-budget.ps1`; Codex copies under `.codex/hooks/`). Test files never count.
|
|
40
|
+
- Exemption: the cap does not apply when `artifacts/orchestration/orchestrator-state.json` in the worktree that holds the hook script selects the `large`, `remediation`, or `preparation` route and is not terminal (`Test-BatchBudgetLargePathRoute` in `.claude/hooks/enforce-batch-budget-route.ps1`). An isolated subagent worktree has no checkpoint, because `artifacts/` is gitignored, so direct mode applies there.
|
|
41
|
+
- Bundle mirror copies under `extensions/drm-copilot/resources/` are production files and count against the cap.
|
|
42
|
+
- A scratch `.ps1` file counts when it resolves inside the worktree root. Files under `SCRATCH`, which is outside the worktree root, are discarded without consuming a slot.
|
|
43
|
+
- Only `Write` and `Edit` calls are seen (the hook matcher is `Write|Edit`). Files written by Bash, by a copy script, or by a generator are not seen.
|
|
44
|
+
- Budget state is kept per session under `.claude/state/`; there is no automatic reset.
|
|
45
|
+
|
|
46
|
+
## Hook Execution Context
|
|
47
|
+
|
|
48
|
+
- Hooks for an isolated subagent run inside the subagent's worktree with that worktree's hook scripts, which are `main`'s copies. A hook change on a branch is not exercised by isolated subagents until it merges.
|
|
49
|
+
- Hook behavior on a branch is therefore proven by Pester suites, not by a live subagent run. A live check of a branch hook needs a non-isolated delegation from the item worktree.
|
|
50
|
+
- Enforcement hooks do not invoke Python; bash is preferred and PowerShell is acceptable (`tests/scripts/claude-runtime/enforcement-hooks-no-python-invocation.Tests.ps1`).
|
|
51
|
+
|
|
52
|
+
## MCP Surfaces Run the Installed Extension
|
|
53
|
+
|
|
54
|
+
- Every `mcp__drm-copilot__*` tool runs the installed extension, not the branch. `validate_orchestration_artifacts` applies the installed rule set, so validator rules added on a branch apply through MCP only after the extension release that carries them is installed.
|
|
55
|
+
- Branch-current plan validation runs the repository's Python CLI `scripts/dev_tools/validate_orchestration_artifacts.py` with its `plan` subcommand, through Poetry in module form.
|
|
56
|
+
- A push-down served by the MCP tools writes the installed extension's bundled payload; a repository-side edit under `extensions/drm-copilot/resources/` changes that payload only after a rebuild and reinstall.
|
|
57
|
+
|
|
58
|
+
## CI Shape and Required Checks
|
|
59
|
+
|
|
60
|
+
- `.github/workflows/ci.yml` triggers on `push` to `main` and `development`, on `pull_request` to `main`, `development`, and `epic/**`, on `workflow_dispatch`, and on `merge_group` (`types: [checks_requested]`, added by issue #952), with no path filters. When the merge queue on `main` is enabled, every required check is produced by a `merge_group` run of `ci.yml` as well as by the pull-request run; `.github/workflows/README.md` (`## Triggers`) records the trigger set.
|
|
61
|
+
- Jobs in `ci.yml` and their check names: `Change scope` (job `changes`, the change-scope decision below); `CI full run` (job `full-run-marker`, which runs only on a full run, marks that run as a valid base for later decisions, and is not a required check); `quality-checks7 / Code Quality & Tests (<python-version>)` on Python 3.10, 3.11, 3.12, and 3.13 (`_quality-checks.yml`: Black check, Ruff, Pyright, the Codex generator `--check`, the tier classification, Pytest with line and branch coverage, and the coverage-threshold check on the JSON report totals); `security-scan / Security Scanning` (its `safety check` step carries `continue-on-error: true` and does not fail the check); `docs-validation / Documentation Validation`; `build-check / Build Package`; `shell-coverage / Shell Coverage (Bats + kcov)`; `drm-copilot-extension-tests / drm-copilot Extension Tests (<os>)` on `ubuntu-latest` and `windows-latest`; `root-typescript-tests / Root TypeScript Tests (<os>)` on `ubuntu-latest` and `windows-latest`; `NPM Audit Gate / npm audit (<manifest>)` (the calling job carries the name `NPM Audit Gate`); and the `poshqc` group below.
|
|
62
|
+
- PowerShell CI (`_poshqc.yml`): `poshqc / PowerShell QC static` (format and analyze on `windows-latest`); the shard matrix `poshqc / PowerShell QC shard 1`, `shard 2`, and `shard 3` (`Invoke-PoshQCTest -ShardIndex -ShardCount` over the scan folders of `config/poshqc-scan.json`, with coverage, on `windows-latest`); the aggregator `poshqc / PowerShell QC`, which requires the static and shard jobs to succeed, verifies shard completeness against a Pester discovery count, and merges shard coverage; and `poshqc / PowerShell hook suites (Linux)`, which runs only `tests/scripts/claude-hooks` and `tests/scripts/codex-hooks` on `ubuntu-latest` with coverage disabled. A new test file under a scanned folder is assigned to a shard automatically and is counted by the completeness check.
|
|
63
|
+
- Change-scope decision (issue #962): the `Change scope` job runs `scripts/ci/Invoke-CiChangeScope.ps1` and publishes the job output `code`. The decision is `code=false` (docs-only) only on a `pull_request` event from this repository, through one of two comparisons. Green-run base: every file changed since the newest successful `ci.yml` run on the pull-request branch whose `CI full run` job succeeded, and whose head commit is present and an ancestor of the current head, is on the allowlist `config/ci-docs-only-paths.json`; the reason is `DOCS_ONLY_SINCE_<green head sha>`. Merge-base fallback (issue #973): when the green-run step ends with no earlier full green run (`NO_FULL_GREEN_RUN`), a missing base (`BASE_NOT_PRESENT`), or a non-ancestor base (`BASE_NOT_ANCESTOR`), and the pull request's base ref is exactly `main`, the script computes `git merge-base` of the payload base SHA (`BASE_SHA`, from `github.event.pull_request.base.sha`; the base ref arrives as `BASE_REF`) and the head, lists the files changed since that merge base with the same diff arguments, and decides `DOCS_ONLY_SINCE_MERGE_BASE_<merge base sha>` when every changed file is allowlisted. Both comparisons run the diff with rename detection off, so both the old and the new path of a rename are classified. A path is allowlisted when it starts with `docs/features/active/`, `docs/features/archive/`, `docs/features/completed/`, `docs/features/epics/`, `docs/features/parallel/`, `docs/features/potential/`, or `docs/research/`, does not start with `docs/features/templates/` or `docs/features/potential/template.md`, and ends in `.md`, `.txt`, `.log`, `.json`, or `.xml`; the allowlist file itself is not allowlisted. Every other case is a full run (`code=true`): `push`, `merge_group`, and `workflow_dispatch` events, a fork pull request, unreadable run or job data, no earlier full green run or a missing or non-ancestor base when the base ref is not `main`, a merge base that cannot be resolved (`MERGE_BASE_UNRESOLVED`, for example a blank base SHA or a base commit missing from the checkout), a failed ancestry check, an empty diff, any path outside the allowlist, and any error. The decision step carries `continue-on-error: true` and the callers compare the output with `!= 'false'`, so a failed or missing decision also gives a full run.
|
|
64
|
+
- Docs-only behavior (`code=false`): `ci.yml` passes `run-heavy: false` to `_quality-checks.yml`, `_security-scan.yml`, `_build-check.yml`, `_poshqc.yml`, `_shell-coverage.yml`, and `_drm-copilot-extension-tests.yml`. Each required job still starts under its full-run check name with every step skipped, so every required context reports `success` without running its suite. In `_poshqc.yml` the aggregator `poshqc / PowerShell QC` runs with every step gated, and `poshqc / PowerShell QC static`, the shard jobs, and `poshqc / PowerShell hook suites (Linux)` are skipped at job level. `docs-validation / Documentation Validation` runs in full. `root-typescript-tests`, `NPM Audit Gate`, and `CI full run` are skipped at job level. A `success` on a docs-only commit is therefore not evidence that the heavy suites pass for that commit; that evidence is the newest run whose `CI full run` job succeeded.
|
|
65
|
+
- A commit that changes any path outside the allowlist (any code, workflow, configuration, script, test, or customization file) runs the full set of jobs, and its `CI full run` job marks it as a base for later docs-only decisions. A standalone `workflow_dispatch` of a reusable workflow, or a caller that omits `run-heavy`, also runs in full. `.github/workflows/README.md` (`## Change-Scope Decision (Issue #962)`) records the reason codes and the per-context behavior table.
|
|
66
|
+
- Required contexts of ruleset 15241672, confirmed by the orchestrator through `gh api` on 2026-10-16: `drm-copilot-extension-tests / drm-copilot Extension Tests (ubuntu-latest)`, `drm-copilot-extension-tests / drm-copilot Extension Tests (windows-latest)`, `docs-validation / Documentation Validation`, `poshqc / PowerShell QC`, `shell-coverage / Shell Coverage (Bats + kcov)`, `security-scan / Security Scanning`, `quality-checks7 / Code Quality & Tests (3.10)`, `quality-checks7 / Code Quality & Tests (3.11)`, `quality-checks7 / Code Quality & Tests (3.12)`, `quality-checks7 / Code Quality & Tests (3.13)`, `build-check / Build Package`.
|
|
67
|
+
- Refresh rule: a change that renames a job, adds or removes a matrix entry, or changes the ruleset refreshes this list in the same change, and the orchestrator re-confirms the contexts with a read-only `gh api repos/drmoisan/drm-copilot/rulesets/15241672` call before relying on them.
|
|
68
|
+
- Skipped-check semantics: a job skipped by an `if:` condition reports success to a required check; a workflow that does not run at all reports nothing, which leaves the required check pending.
|
|
69
|
+
- A pull request into a branch other than `main`, `development`, or `epic/**` gets no CI run; dispatch `ci.yml` manually for it.
|
|
70
|
+
|
|
71
|
+
## CI-Only Failure Classes
|
|
72
|
+
|
|
73
|
+
- A test that reads gitignored `artifacts/` state passes only on a worktree that holds that state; CI has none.
|
|
74
|
+
- A fixture rooted at a drive letter or a `C:/workspace` path fails `path.isAbsolute` and path joins on Linux.
|
|
75
|
+
- `_shell-coverage.yml` checks out at depth one, so `origin/main` does not exist in that job; no test may diff against it.
|
|
76
|
+
- The Linux hook-suite job runs `tests/scripts/claude-hooks` and `tests/scripts/codex-hooks` on a case-sensitive file system: use `Join-Path`, forward-slash relative paths, exact file-name case, and no drive letters or backslash literals.
|
|
77
|
+
- The `.gitattributes` rule `* text=auto eol=lf` normalizes line endings on checkout, so a CRLF fixture committed as text is not CRLF in CI.
|
|
78
|
+
- Shard and single-process Pester runs expose module-scope import visibility and leaked state that per-suite local runs hide.
|
|
79
|
+
|
|
80
|
+
## Contract Tests That Pin Mirrored Files
|
|
81
|
+
|
|
82
|
+
Run these after editing any mirrored or bundled file; each is under `tests/scripts/dev_tools/` unless named otherwise.
|
|
83
|
+
|
|
84
|
+
- `test_push_down_claude_resource_contracts.py` and `test_push_down_codex_and_agents_resource_contracts.py`: every distributable `.claude`, `.agents`, and `.codex` file exists in the bundle with equal text.
|
|
85
|
+
- `test_push_down_claude_pack_manifest_completeness.py` and `test_push_down_codex_and_agents_pack_manifest_completeness.py`: every bundled file is listed in a pack manifest.
|
|
86
|
+
- The Codex generator check: `scripts/dev_tools/generate_codex_agent_variants.py` run in module form with `--check` (base agents are hand-edited; variants, bundle copies, and the Codex `core.json` are generated).
|
|
87
|
+
- `test_codex_agent_wrapper_contracts.py` and `test_codex_handoff_contract_parity.py`: pinned Codex agent fragments and handoff parity.
|
|
88
|
+
- `test_claude_rules_frontmatter.py`: rule `paths:` scopes and that every preloaded skill exists.
|
|
89
|
+
- `parallel_orchestrator_surface_expectations.py` (`PINNED_FROZEN_SURFACE_HASHES`): byte hashes of frozen orchestration surfaces, including `.claude/skills/epic-orchestrate/SKILL.md` and `.claude/agents/epic-orchestrator.md`.
|
|
90
|
+
- `test_quality_checks_workflow_contracts.py`: workflow step conditions.
|
|
91
|
+
- `test_push_down_issue_824_follow_ups.py`: pushed rules and skills name no consuming product.
|
|
92
|
+
- `test_typescript_toolchain_instruction_contracts.py`: no reference to another test framework, and every backticked npm script token in the pinned mirrors exists in the root `package.json`.
|
|
93
|
+
- `tests/scripts/claude-runtime/claude-architecture-doc.Tests.ps1` and `tests/scripts/claude-runtime/hook-dependency-guard-completeness.Tests.ps1`: agent tool names in the architecture document and the guarded dot-source pattern in hooks.
|
|
94
|
+
|
|
95
|
+
## Preflight Defect Classes the Validator Cannot See
|
|
96
|
+
|
|
97
|
+
These pass every validator rule and are found only by reading the plan against the tree:
|
|
98
|
+
|
|
99
|
+
- `git grep` against a file the plan creates (untracked, so invisible to `git grep`); a search pattern beginning with `-` that is not passed through `-e`.
|
|
100
|
+
- A checkbox diff-pair assertion against a file the plan adds, and a CRLF fixture under the `eol=lf` attribute rule.
|
|
101
|
+
- A new TypeScript production file without its own `coverageThreshold` entry in `extensions/drm-copilot/jest.config.cjs`, whose threshold map has per-file entries only and no `global` key.
|
|
102
|
+
- A per-file coverage floor asserted for code that the tests replace with blanket mocks.
|
|
103
|
+
- Batch-budget exhaustion across a session, and an acceptance condition that depends on a branch hook being exercised by an isolated subagent.
|
|
104
|
+
- `origin/main` advancing during planning: scope diffs anchor on the merge base of `origin/main` and `HEAD`, never on `origin/main` itself.
|
|
105
|
+
- `Measure-Object -Line` counts non-empty lines only; physical line counts use `wc -l` or `@(Get-Content -LiteralPath <path>).Count`.
|
|
106
|
+
- A coverage argument written as a filesystem path measures nothing; the dotted module form is required, and branch figures come from the JSON report, not the combined terminal column.
|
|
107
|
+
- A task that changes the observable behavior of an existing function, script, fixture, or test stub (signature, argv, output, exit status, or written files) while the tests that assert that behavior are outside the task's file set: those tests fail once the change lands, and the plan's own acceptance cannot be met. Preflight searches the test tree for the changed symbol, the file name, and the asserted output, and confirms that the task names each matching test with its disposition (unchanged because unaffected, or updated with the reason).
|
|
108
|
+
- A plan that alters a fact this brief states (it adds or renames a CI job, changes a required status context, a tool route, or a batch-budget rule) with no task that updates the brief in the same change, in all six byte-identical copies: the plan then breaks the maintenance rule in `## Purpose and Maintenance`. Preflight compares each task's changes against the facts this brief states and confirms that a brief-update task exists and that the plan's `Mirror parity` Pre-Mortem bullet names it.
|
|
109
|
+
|
|
110
|
+
## Evidence and Documentation Rules
|
|
111
|
+
|
|
112
|
+
- Evidence lives under `<FEATURE>/evidence/<kind>/` with kinds `baseline`, `regression-testing`, `qa-gates`, `other`, `issue-updates`, and `remediation-baseline` (`.claude/skills/evidence-and-timestamp-conventions/SKILL.md`; enforced by `.claude/hooks/enforce-evidence-locations.ps1`).
|
|
113
|
+
- Evidence filenames carry the UTC time of the write, read from the clock, in the `yyyy-MM-ddTHH-mm` shape; a consumer selects the lexicographically greatest `<name>.*.md`. Plan files are stamped by the feature-folder tooling in America/New_York.
|
|
114
|
+
- Every command-step artifact carries `Timestamp:`, `Command:`, `EXIT_CODE:`, and `Output Summary:`. No artifact records an absolute path, a host name, or a session scratchpad path; scratch locations are recorded as the token `SCRATCH`.
|
|
115
|
+
- `SCRATCH` is `<session scratchpad>/issue-<issue-num>/`, and scratch file names start with `issue-<issue-num>-`.
|
|
116
|
+
- `.github/workflows/_docs-validation.yml` checks only that `README.md` is present and non-empty and that `LICENSE` exists, and it warns when two instruction files are missing. There is no Markdown lint or link check in CI.
|
|
117
|
+
|
|
118
|
+
## Coverage and File-Size Gates
|
|
119
|
+
|
|
120
|
+
- Line coverage of at least 85% and branch coverage of at least 75% apply per changed production file in Python and TypeScript. PowerShell has a line threshold of 85% and no branch gate, because Pester does not measure branch coverage. No production file may be excluded from measurement.
|
|
121
|
+
- Python: measure a module with `--cov=<dotted.module>`, `--cov-branch`, `--cov-report=term-missing`, and `--cov-report=json:<path>`; read branch figures from the JSON report.
|
|
122
|
+
- TypeScript: a new production file needs its own entry in the `coverageThreshold` map of `extensions/drm-copilot/jest.config.cjs`; Jest runs through `node run-jest.cjs` in `extensions/drm-copilot/`.
|
|
123
|
+
- PowerShell: per-file line coverage is read from `artifacts/pester/powershell-coverage.xml` written by the self-hosted PoshQC module.
|
|
124
|
+
- No production, test, or reusable script file exceeds 500 physical lines; Markdown is exempt. Files at or near the limit are not extended; new logic goes into a new module and a new test file.
|
|
125
|
+
|
|
126
|
+
## Test Isolation Checks
|
|
127
|
+
|
|
128
|
+
- Tests create no temporary files; file and transcript reads go through injected seams with in-memory content.
|
|
129
|
+
- Before review, run each isolation check and record it under `<FEATURE>/evidence/regression-testing/`:
|
|
130
|
+
- a seeded shuffled Jest run (`node run-jest.cjs --randomize --seed=<n>` in `extensions/drm-copilot/`) with the seed recorded;
|
|
131
|
+
- a reversed-order run of the new or changed Python test modules in one process;
|
|
132
|
+
- a seeded shuffled file-order run of the touched Pester suites in one process, with at least three seeds and each seed and its file order recorded;
|
|
133
|
+
- a fresh single-process Pester run over `tests/scripts`, which is the CI shape.
|
|
134
|
+
- An order dependence found by any run is fixed on both sides: the suite that leaves state behind (globals, functions, environment variables, mocks, imported modules, script-scope state) and the suite that assumes prior state. Every seed is then re-run.
|
|
@@ -28,7 +28,7 @@ When routed through `powershell-orchestrator`, small path still requires lifecyc
|
|
|
28
28
|
- promote potential item to GitHub issue with `--work-mode minor-audit`,
|
|
29
29
|
- create active feature folder with `--work-mode minor-audit`,
|
|
30
30
|
- delegate minimal-audit plan creation to `atomic_planner` with `DIRECTIVE: MINIMAL-AUDIT PLAN REQUIRED`,
|
|
31
|
-
- require `atomic_executor` preflight
|
|
31
|
+
- require single-pass `atomic_executor` preflight ending in `PREFLIGHT: ALL CLEAR` (at most one return to the planner),
|
|
32
32
|
- execute Phase 0 only via `atomic_executor` before branching,
|
|
33
33
|
- run reduced small-audit after implementation and QC.
|
|
34
34
|
|
|
@@ -25,6 +25,9 @@ Trigger remediation when any of these are true:
|
|
|
25
25
|
Create `remediation-inputs.<timestamp>.md` with:
|
|
26
26
|
- Enumerated fix list with file paths, expected behavior, and verification commands.
|
|
27
27
|
- A “do not do” list (no scope creep, no policy weakening, no silent skips).
|
|
28
|
+
- Exactly one mode line, `Remediation-Mode: proportionate` or `Remediation-Mode: design`. The 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; otherwise it is design. CI-failure findings are normally proportionate.
|
|
29
|
+
|
|
30
|
+
Proportionate cycle: one `atomic_planner` delegation writes a short plan with a `## Pre-Mortem` section and a final self-review task, and one `atomic_executor` delegation runs single-pass preflight with in-place trivial fixes and then executes it; `preflight: {iterations: 1, final_status: "clear"}` is recorded before `execution_status`. A substantive preflight defect stops that run with `BLOCKED at preflight (before [P0-T1])` and no checked task, and the cycle converts to design mode (the mode line is rewritten to `Remediation-Mode: design`) for one planner revision. Design cycle: the handoff below runs with the at-most-one-return rule.
|
|
28
31
|
|
|
29
32
|
## Plan Creation and Handoff
|
|
30
33
|
|
|
@@ -34,9 +37,10 @@ Create `remediation-inputs.<timestamp>.md` with:
|
|
|
34
37
|
- `${file}` pointing to the remediation plan target file
|
|
35
38
|
3) Require `atomic_planner` to output a deterministic, atomic plan with phases and `[P#-T#]` IDs.
|
|
36
39
|
4) Require the same `${file}` path to be updated in place across all remediation-plan revisions in the same remediation loop.
|
|
37
|
-
5) The caller owns the downstream clearance
|
|
38
|
-
- hand the resulting remediation plan to `atomic_executor` in preflight-validation mode,
|
|
39
|
-
- if preflight returns `PREFLIGHT: REVISIONS REQUIRED`, re-delegate to `atomic_planner` against the same `${file}` path,
|
|
40
|
+
5) The caller owns the downstream clearance step:
|
|
41
|
+
- hand the resulting remediation plan to `atomic_executor` in preflight-validation mode, with the preflight directive in the delegation prompt and never in the plan file; preflight is single-pass and fixes trivial defects in place,
|
|
42
|
+
- if preflight returns `PREFLIGHT: REVISIONS REQUIRED`, re-delegate to `atomic_planner` once against the same `${file}` path with the full `PREFLIGHT-DEFECT:` list, then run one confirming preflight,
|
|
43
|
+
- if the confirming preflight still reports a substantive defect, record `final_status: "blocked_preflight_iteration_limit"` and halt the cycle,
|
|
40
44
|
- execute the remediation plan only after `PREFLIGHT: ALL CLEAR`.
|
|
41
45
|
|
|
42
46
|
## Context Package (When Required)
|
|
@@ -11,6 +11,16 @@
|
|
|
11
11
|
|
|
12
12
|
**Evidence accounting rule:** Record the expected artifact path or location in each evidence-producing task. Do not mark evidence-backed work complete without the artifact.
|
|
13
13
|
|
|
14
|
+
## Pre-Mortem
|
|
15
|
+
|
|
16
|
+
<!-- One bullet per label; state how the next review or CI run could fail on that dimension and the mitigation, or "not applicable" with the reason. -->
|
|
17
|
+
- Review checklists:
|
|
18
|
+
- Coverage:
|
|
19
|
+
- Mirror parity:
|
|
20
|
+
- File size:
|
|
21
|
+
- Test isolation:
|
|
22
|
+
- CI-only behavior:
|
|
23
|
+
- Evidence:
|
|
14
24
|
|
|
15
25
|
**Phase 0 — Context & Inputs**
|
|
16
26
|
- [ ] [P0-T1] Link approved spec: <spec link>
|
|
@@ -41,6 +41,17 @@
|
|
|
41
41
|
- [ ] [P2-T1] <Atomic task>
|
|
42
42
|
- [ ] [P2-T2] <Atomic task>
|
|
43
43
|
|
|
44
|
+
## Pre-Mortem
|
|
45
|
+
|
|
46
|
+
<!-- One bullet per label; state how the next review or CI run could fail on that dimension and the mitigation, or "not applicable" with the reason. -->
|
|
47
|
+
- Review checklists:
|
|
48
|
+
- Coverage:
|
|
49
|
+
- Mirror parity:
|
|
50
|
+
- File size:
|
|
51
|
+
- Test isolation:
|
|
52
|
+
- CI-only behavior:
|
|
53
|
+
- Evidence:
|
|
54
|
+
|
|
44
55
|
## Test Plan
|
|
45
56
|
|
|
46
57
|
- Unit: ...
|