codex-copilot-instruction-mirrors-document-defective-csharp-toolchain-commands
- Date captured: 2026-08-11
- Author: Dan Moisan
- Status: Pending promotion to GitHub issue
Automation note: Keep the section headings below unchanged; the promotion tooling maps each of them into the GitHub bug issue template.
Summary
Feature 2026-08-10-csharp-toolchain-gate-fidelity-512 (issues #492, #509, #512, #522) corrected the
C# format, analyzer and type-check commands in CLAUDE.md, .claude/rules/csharp.md and
.claude/skills/csharp-qa-gate/SKILL.md. It deliberately excluded the Codex/Copilot instruction
mirror tree under scope decision SD1. Those mirrors still document the CSharpier v0 bare-path form
(csharpier .) and the unpassable /t:Build ... /p:Nullable=enable nullable command. After that
feature merges, the mirrors become the only sites in the repository that disagree with
.github/workflows/ci.yml, so the divergence becomes host-dependent (Claude sessions read the
corrected files; Codex/Copilot sessions read the stale mirrors) and correspondingly harder to
diagnose.
Environment
- OS/version: Windows 11 Pro 10.0.26200
- Runtime: .NET Framework 4.8.1; MSBuild from Visual Studio 18 (Community); repo-pinned .NET SDK 8.0.205; CSharpier pinned to 1.2.6 in
dotnet-tools.json
- Command/flags used:
git grep -n -E 'csharpier[[:space:]]+\.' and git grep -n -F 'Nullable=enable' over tracked files
- Data source or fixture: the repository's own governance and instruction files
Steps to Reproduce
- From the repository root, run
git grep -n -E 'csharpier[[:space:]]+\.' -- ':!docs/features' ':!docs/research' ':!.claude/agent-memory'
- Run
git grep -n -E '(/t:Build.*Nullable=enable|Nullable=enable.*/t:Build)' -- ':!docs/features' ':!docs/research' ':!.claude/agent-memory'
- Observe that after feature 512 merges, every remaining hit is inside the mirror tree enumerated
below.
Expected Behavior
Every site in the repository that documents a mandatory toolchain command documents a command that
executes against the pinned toolchain, enforces the policy it names, and agrees with
.github/workflows/ci.yml, regardless of which agent host reads it.
Actual Behavior
Eight mirror files still document at least one defective command. Verified by grep on 2026-08-10 and
re-verified on 2026-08-11 after feature 512's corrections
(docs/features/active/2026-08-10-csharp-toolchain-gate-fidelity-512/evidence/qa-gates/site-inventory-reconciled.2026-08-11T00-18.md):
| Path |
Lines |
Defect |
AGENTS.md |
466 (false rationale), 469, 470 (format), 487, 488 (type-check), 660 (format), 662 (type-check) |
all |
.github/instructions/csharp-code-change.instructions.md |
29 (false rationale), 32, 33 (format), 50, 51 (type-check) |
all |
.github/instructions/csharp-unit-test.instructions.md |
45 (format), 47 (type-check) |
format + type-check |
.agents/skills/csharp/SKILL.md |
17 (format), 19 (type-check) |
format + type-check |
.agents/skills/csharp-qa-gate/SKILL.md |
32 (format), 34 (type-check) |
format + type-check |
.github/agents/csharp-typed-engineer.agent.md |
172 (format), 174 (type-check) |
format + type-check |
.github/agents/csharp-atomic-executor.agent.md |
258 (format), 260 (dotnet build -p:Nullable=enable) |
format + type-check |
.codex/codex-web-setup.sh |
342 (printed follow-up command inside the heredoc ending at line 348) |
type-check |
Note on .codex/codex-web-setup.sh:342: it is a documentation carrier, not an executable one —
lines 336-347 sit inside a heredoc terminated at line 348 and are printed as "useful follow-up
commands", not executed. Feature 512 handled its practical consequence by retaining
-EnableNullable on scripts/vscode/Invoke-VSBuild.ps1 as a warning-emitting no-op, so the printed
command still binds.
Logs / Screenshots
Impact / Severity
A Codex- or Copilot-driven session reading a mirror will still run the unpassable nullable command
and can still manufacture the false blocking CS86xx findings that required human-level override on
deliveries #507 and #508 on 2026-08-08. It will also run a format command that returns exit 1 and
formats nothing.
Suspected Cause / Notes
Recorded as scope decision SD1 of
docs/features/active/2026-08-10-csharp-toolchain-gate-fidelity-512/spec.md. The exclusion rests on
four grounds, in descending strength:
.github/instructions/ sits under an unsuspended hard constraint.
.claude/skills/policy-compliance-order/SKILL.md states: "Do NOT modify policy documents under
.claude/rules/ or .github/instructions/." The epic
build-ci-coverage-gate-fidelity's "Execution Authorization Required" section suspended that
constraint for feature 512 only for CLAUDE.md and .claude/rules/csharp.md.
.github/instructions/ therefore requires its own authorization grant, equivalent to the one
the epic issued for .claude/rules/csharp.md.
AGENTS.md forbids manual editing and its generator does not exist here. AGENTS.md lines
3-27 declare the file generated from seventeen .github/** sources, say "Do not edit this file
manually", and name scripts/dev-tools/sync-agents-from-instructions.ps1 as the regeneration
command. scripts/dev-tools/ contains exactly one file, run-actionlint.ps1; the named
generator does not exist in this repository. Hand-editing violates the file's own contract;
regenerating is impossible here.
.agents/, .codex/ and .github/agents/ are inbound artifacts of a different repository.
They self-describe as Codex push-down resources installed by the drm-copilot MCP tool
push_down_codex_and_agents_customizations. drm-copilot is the owning repository for
.agents/, .codex/ and .github/agents/. An edit here is not durable; the next push-down
overwrites it.
.github/agents/** is excluded on ground 3 only. If a reviewer disputes drm-copilot ownership
of .github/agents/, this issue is the correct place to resolve it.
Additional residuals folded into this entry
.csharpierignore comment residual. .csharpierignore lines 1-3 and 9-11 repeat the same
false premise feature 512 removed from CLAUDE.md ("CSharpier formats C# source only (per
CLAUDE.md C#1)"). The ignore rules are correct; only the explanatory comment is wrong. The file
is outside feature 512's enumerated documentation sites.
TaskMaster/Ribbon/EngineCommandCatalog.cs:93 comment residual. The comment reads
// returns false. This keeps the file clean under /p:Nullable=enable. It cites
/p:Nullable=enable as the enforcing gate, which is false after feature 512 — the gate now
relies on the per-file #nullable enable pragma plus /p:TreatWarningsAsErrors=true. It could not
be corrected in feature 512 because that feature makes no *.cs change.
.claude/rules/powershell.md:18 residual. That line states the Pester step should "use repo
config at scripts/powershell/PoshQC/settings/pester.runsettings.psd1". That path does not exist
in this checkout: ls scripts/ returns only dev-tools/, temp-extract-coverage.ps1 and
vscode/; find . -name "pester.runsettings*" and find . -type d -name "PoshQC" both return no
matches. PoshQC is entirely MCP-server-side here. This is the same class of defect as feature 512's
— a documented command referencing something that does not exist — in a different rule file, and
.claude/rules/powershell.md was not covered by the epic's authorization. Recorded in
docs/features/active/2026-08-10-csharp-toolchain-gate-fidelity-512/evidence/baseline/baseline-powershell-toolchain.2026-08-10T15-40.md.
PowerShell coverage shortfall: none to fold in. Feature 512's [P0-T16] measured line coverage of
scripts/vscode/Invoke-VSBuild.ps1 at 85.71%, at or above the 85% policy floor, so no
PREEXISTING_COVERAGE_SHORTFALL: was recorded and [P6-T4] had nothing to fold into this entry.
Proposed Fix / Validation Ideas
Next Step
codex-copilot-instruction-mirrors-document-defective-csharp-toolchain-commands
Summary
Feature
2026-08-10-csharp-toolchain-gate-fidelity-512(issues #492, #509, #512, #522) corrected theC# format, analyzer and type-check commands in
CLAUDE.md,.claude/rules/csharp.mdand.claude/skills/csharp-qa-gate/SKILL.md. It deliberately excluded the Codex/Copilot instructionmirror tree under scope decision SD1. Those mirrors still document the CSharpier v0 bare-path form
(
csharpier .) and the unpassable/t:Build ... /p:Nullable=enablenullable command. After thatfeature merges, the mirrors become the only sites in the repository that disagree with
.github/workflows/ci.yml, so the divergence becomes host-dependent (Claude sessions read thecorrected files; Codex/Copilot sessions read the stale mirrors) and correspondingly harder to
diagnose.
Environment
dotnet-tools.jsongit grep -n -E 'csharpier[[:space:]]+\.'andgit grep -n -F 'Nullable=enable'over tracked filesSteps to Reproduce
git grep -n -E 'csharpier[[:space:]]+\.' -- ':!docs/features' ':!docs/research' ':!.claude/agent-memory'git grep -n -E '(/t:Build.*Nullable=enable|Nullable=enable.*/t:Build)' -- ':!docs/features' ':!docs/research' ':!.claude/agent-memory'below.
Expected Behavior
Every site in the repository that documents a mandatory toolchain command documents a command that
executes against the pinned toolchain, enforces the policy it names, and agrees with
.github/workflows/ci.yml, regardless of which agent host reads it.Actual Behavior
Eight mirror files still document at least one defective command. Verified by grep on 2026-08-10 and
re-verified on 2026-08-11 after feature 512's corrections
(
docs/features/active/2026-08-10-csharp-toolchain-gate-fidelity-512/evidence/qa-gates/site-inventory-reconciled.2026-08-11T00-18.md):AGENTS.md.github/instructions/csharp-code-change.instructions.md.github/instructions/csharp-unit-test.instructions.md.agents/skills/csharp/SKILL.md.agents/skills/csharp-qa-gate/SKILL.md.github/agents/csharp-typed-engineer.agent.md.github/agents/csharp-atomic-executor.agent.mddotnet build -p:Nullable=enable).codex/codex-web-setup.shNote on
.codex/codex-web-setup.sh:342: it is a documentation carrier, not an executable one —lines 336-347 sit inside a heredoc terminated at line 348 and are printed as "useful follow-up
commands", not executed. Feature 512 handled its practical consequence by retaining
-EnableNullableonscripts/vscode/Invoke-VSBuild.ps1as a warning-emitting no-op, so the printedcommand still binds.
Logs / Screenshots
git grep -n -E 'csharpier[[:space:]]+\.'over trackedfiles (excluding
docs/features,docs/researchand.claude/agent-memory) returns 10 hits,all inside the mirror tree; the same-line
/t:Build+Nullable=enablegrep returns 9 hits,all inside the mirror tree.
Impact / Severity
A Codex- or Copilot-driven session reading a mirror will still run the unpassable nullable command
and can still manufacture the false blocking
CS86xxfindings that required human-level override ondeliveries #507 and #508 on 2026-08-08. It will also run a format command that returns exit 1 and
formats nothing.
Suspected Cause / Notes
Recorded as scope decision SD1 of
docs/features/active/2026-08-10-csharp-toolchain-gate-fidelity-512/spec.md. The exclusion rests onfour grounds, in descending strength:
.github/instructions/sits under an unsuspended hard constraint..claude/skills/policy-compliance-order/SKILL.mdstates: "Do NOT modify policy documents under.claude/rules/or.github/instructions/." The epicbuild-ci-coverage-gate-fidelity's "Execution Authorization Required" section suspended thatconstraint for feature 512 only for
CLAUDE.mdand.claude/rules/csharp.md..github/instructions/therefore requires its own authorization grant, equivalent to the onethe epic issued for
.claude/rules/csharp.md.AGENTS.mdforbids manual editing and its generator does not exist here.AGENTS.mdlines3-27 declare the file generated from seventeen
.github/**sources, say "Do not edit this filemanually", and name
scripts/dev-tools/sync-agents-from-instructions.ps1as the regenerationcommand.
scripts/dev-tools/contains exactly one file,run-actionlint.ps1; the namedgenerator does not exist in this repository. Hand-editing violates the file's own contract;
regenerating is impossible here.
.agents/,.codex/and.github/agents/are inbound artifacts of a different repository.They self-describe as Codex push-down resources installed by the
drm-copilotMCP toolpush_down_codex_and_agents_customizations.drm-copilotis the owning repository for.agents/,.codex/and.github/agents/. An edit here is not durable; the next push-downoverwrites it.
.github/agents/**is excluded on ground 3 only. If a reviewer disputesdrm-copilotownershipof
.github/agents/, this issue is the correct place to resolve it.Additional residuals folded into this entry
.csharpierignorecomment residual..csharpierignorelines 1-3 and 9-11 repeat the samefalse premise feature 512 removed from
CLAUDE.md("CSharpier formats C# source only (perCLAUDE.md C#1)"). The ignore rules are correct; only the explanatory comment is wrong. The file
is outside feature 512's enumerated documentation sites.
TaskMaster/Ribbon/EngineCommandCatalog.cs:93comment residual. The comment reads// returns false. This keeps the file clean under /p:Nullable=enable.It cites/p:Nullable=enableas the enforcing gate, which is false after feature 512 — the gate nowrelies on the per-file
#nullable enablepragma plus/p:TreatWarningsAsErrors=true. It could notbe corrected in feature 512 because that feature makes no
*.cschange..claude/rules/powershell.md:18residual. That line states the Pester step should "use repoconfig at
scripts/powershell/PoshQC/settings/pester.runsettings.psd1". That path does not existin this checkout:
ls scripts/returns onlydev-tools/,temp-extract-coverage.ps1andvscode/;find . -name "pester.runsettings*"andfind . -type d -name "PoshQC"both return nomatches. PoshQC is entirely MCP-server-side here. This is the same class of defect as feature 512's
— a documented command referencing something that does not exist — in a different rule file, and
.claude/rules/powershell.mdwas not covered by the epic's authorization. Recorded indocs/features/active/2026-08-10-csharp-toolchain-gate-fidelity-512/evidence/baseline/baseline-powershell-toolchain.2026-08-10T15-40.md.PowerShell coverage shortfall: none to fold in. Feature 512's [P0-T16] measured line coverage of
scripts/vscode/Invoke-VSBuild.ps1at 85.71%, at or above the 85% policy floor, so noPREEXISTING_COVERAGE_SHORTFALL:was recorded and [P6-T4] had nothing to fold into this entry.Proposed Fix / Validation Ideas
added, assert that every documented command in every instruction mirror is executable against
the pinned tool versions and agrees with
.github/workflows/ci.yml.[P5-T11] and confirm zero hits outside the permitted residual classes.
.github/instructions/equivalent to the epic's grant for.claude/rules/csharp.md;(b) correct
.github/instructions/*.instructions.mdunder that grant; (c) either restore theAGENTS.mdgenerator or agree a policy for maintaining the generated file; (d) raise the.agents/,.codex/and.github/agents/corrections upstream indrm-copilotso the nextpush-down carries them; (e) correct the
.csharpierignorecomment, theEngineCommandCatalog.cs:93comment, and.claude/rules/powershell.md:18.Next Step