Skip to content

Rename the CONTEXT.md terms that drifted inside the implementation #21

Description

@DireDoch

CONTEXT.md lists the words this project does not use. The interface honours
them. The implementation does not.

In the code CONTEXT.md says Where
$deviceResult Form Factor (Avoid: DeviceType) Resolve-WcdExecutionOptions
$usageResult, $usageLabel Environment (Avoid: Usage) Resolve-WcdExecutionOptions
$engineerResult, $engineerTypes, $engineerYesNo Optional Tool (Avoid: engineer tool) Resolve-WcdExecutionOptions
$T.PromptUsageDesc1, $T.PromptUsageDesc2 Environment both $T tables
$T.PromptEngineer, $T.PromptEngineerDesc1/2, $T.EngineerBoxTitle, $T.EngineerCombineHint Optional Tool both $T tables
Etapes, Echecs, Avertissements Steps, failures, warnings the $moduleStatus object

The last row is its own problem: those are the only French identifiers in an
otherwise English codebase, on an object the Diagnostic reads by property name.

This is not cosmetic. Someone — or something — reading CONTEXT.md and then
grepping for Environment finds the parameter and the manifest key and stops,
because the value is called $usageResult from the moment it is read. The
domain language holds at the edge and breaks two lines in.

Also rename

ConvertTo-WcdOptionalToolSelection and Read-WcdOptionalToolChoice are already
correct — the drift is only in the locals and the $T keys around them. Fix
those and the file reads consistently.

Make it stick

tests/Help.Tests.ps1 already has a stale-vocabulary test:

Select-String -Pattern 'DeviceType|Config-Usage|Config-Engineer|Minimal[A-Z]'

Extend the pattern to the words above so the drift cannot come back. That test
is the actual deliverable — the rename without it just resets the clock.

Note the pattern must not catch legitimate uses: Get-WcdPnPDevices and
Config-DeviceManager contain "Device", and Set-WcdDeviceManagerStatus is a
correct name. Anchor on the specific identifiers, not on substrings.

Done when

  • Locals in Resolve-WcdExecutionOptions renamed to Form Factor / Environment / Optional Tool
  • $T keys renamed in both language tables
  • $moduleStatus fields renamed to English; every reader updated
    (Format-WcdModuleLine, Get-WcdFinalDiagnosticLines, the run loop)
  • tests/Help.Tests.ps1 stale-vocabulary pattern extended
  • The extended pattern does not flag Config-DeviceManager or Get-WcdPnPDevices
  • Full suite green; no behaviour change

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:architectureModule seams, orchestrator, test surfacerefactorRestructuring without changing behaviour

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions