You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Markdown-Link-Check.ps1 uses (Get-Date).ToUniversalTime().ToString("o") which is already UTC but is a raw expression rather than the shared utility. Replace with Get-StandardTimestamp from CIHelpers.psm1 for consistency across all log outputs and to ensure future format changes are centralized.
Current Behavior
The script generates timestamps using (Get-Date).ToUniversalTime().ToString("o"). While this produces correct UTC timestamps, it is a duplicated expression that should be centralized through the shared utility.
Expected Behavior
The script uses Get-StandardTimestamp from CIHelpers.psm1, producing the same UTC timestamps but through the centralized utility function.
Root Cause
The script was developed before a shared timestamp utility existed. While the format is correct, the expression is duplicated and should be replaced for consistency and maintainability.
Files Requiring Changes
File
Change
scripts/linting/Markdown-Link-Check.ps1
Replace (Get-Date).ToUniversalTime().ToString("o") with Get-StandardTimestamp
Select Task Researcher from the agent picker at the bottom of the GitHub Copilot Chat prompt pane, then send the following prompt:
Research timestamp standardization in Markdown-Link-Check.ps1. Investigate: (1) Read the target script and find all timestamp usages (exact line numbers). (2) Verify Get-StandardTimestamp is available in CIHelpers.psm1 (from Issue #993). (3) Determine whether the script already imports CIHelpers.psm1 or needs an import added. (4) Check existing Pester tests for timestamp-related assertions that may need updating. (5) Identify any callers that depend on the current timestamp format. (6) Review codecov.yml patch coverage requirements.
Phase 2: Plan
Select Task Planner from the agent picker at the bottom of the GitHub Copilot Chat prompt pane, then send the following prompt:
Plan timestamp standardization for Markdown-Link-Check.ps1 using the research document. The plan should cover: (1) Replacing the UTC timestamp expression with Get-StandardTimestamp call. (2) Importing CIHelpers.psm1 if not already imported. (3) Updating Pester tests to verify the timestamp format. (4) Validation: npm run test:ps, npm run lint:ps.
Phase 3: Implement
Select Task Implementor from the agent picker at the bottom of the GitHub Copilot Chat prompt pane, then send the following prompt:
Implement timestamp standardization for Markdown-Link-Check.ps1 following the plan. Steps: (1) Replace (Get-Date).ToUniversalTime().ToString("o") with Get-StandardTimestamp at the identified line numbers. (2) Add CIHelpers.psm1 import if needed. (3) Update Pester test assertions for timestamp format. (4) Run npm run lint:ps and npm run test:ps. (5) Run the script's npm command and verify the JSON output contains a standardized UTC ISO 8601 timestamp.
Phase 4: Review
Select Task Reviewer from the agent picker at the bottom of the GitHub Copilot Chat prompt pane, then send the following prompt:
Review timestamp standardization for Markdown-Link-Check.ps1. Verify: (1) The UTC timestamp expression is replaced with Get-StandardTimestamp. (2) CIHelpers.psm1 is imported if it wasn't already. (3) JSON output timestamp is ISO 8601 UTC ending in Z. (4) No other logic was changed. (5) Pester tests updated and passing. (6) npm run lint:ps clean.
Summary
Markdown-Link-Check.ps1uses(Get-Date).ToUniversalTime().ToString("o")which is already UTC but is a raw expression rather than the shared utility. Replace withGet-StandardTimestampfrom CIHelpers.psm1 for consistency across all log outputs and to ensure future format changes are centralized.Current Behavior
The script generates timestamps using
(Get-Date).ToUniversalTime().ToString("o"). While this produces correct UTC timestamps, it is a duplicated expression that should be centralized through the shared utility.Expected Behavior
The script uses
Get-StandardTimestampfrom CIHelpers.psm1, producing the same UTC timestamps but through the centralized utility function.Root Cause
The script was developed before a shared timestamp utility existed. While the format is correct, the expression is duplicated and should be replaced for consistency and maintainability.
Files Requiring Changes
scripts/linting/Markdown-Link-Check.ps1(Get-Date).ToUniversalTime().ToString("o")withGet-StandardTimestampFix Guidance
Get-StandardTimestampis available (requires Issue Add Get-StandardTimestamp utility to CIHelpers module #993 merged first).(Get-Date).ToUniversalTime().ToString("o")usage and replace withGet-StandardTimestamp.Depends on: #993 (Get-StandardTimestamp utility)
RPI Framework Starter Prompts
Phase 1: Research
Select Task Researcher from the agent picker at the bottom of the GitHub Copilot Chat prompt pane, then send the following prompt:
Phase 2: Plan
Select Task Planner from the agent picker at the bottom of the GitHub Copilot Chat prompt pane, then send the following prompt:
Phase 3: Implement
Select Task Implementor from the agent picker at the bottom of the GitHub Copilot Chat prompt pane, then send the following prompt:
Phase 4: Review
Select Task Reviewer from the agent picker at the bottom of the GitHub Copilot Chat prompt pane, then send the following prompt:
References
scripts/linting/Markdown-Link-Check.ps1— target scriptscripts/lib/Modules/CIHelpers.psm1—Get-StandardTimestampsource