diff --git a/.claude/skills/ai-sdlc-gates/gates.json b/.claude/skills/ai-sdlc-gates/gates.json index cf6f5a2..d37c2ad 100644 --- a/.claude/skills/ai-sdlc-gates/gates.json +++ b/.claude/skills/ai-sdlc-gates/gates.json @@ -21,6 +21,7 @@ { "name": "AI-SDLC no private term in a public repository (skipped when private)", "script": "scripts/Check-PrivateTerms.ps1", "clause": "AI-SDLC", "mode": "Blocking" }, { "name": "C05 a pointer names a section that is there", "script": "scripts/Check-DocSectionRefs.ps1", "clause": "C05", "mode": "Blocking" }, { "name": "C05 both doc layers exist, and every unit has a page", "script": "scripts/Check-DocCoverage.ps1", "clause": "C05", "mode": "Blocking" }, + { "name": "Docs: no page was last checked longer ago than docs.lastCheckedMaxAgeDays (off by default)", "script": "scripts/Check-DocLastChecked.ps1", "clause": "C05", "mode": "Advisory" }, { "name": "Allow rules of the installed packages are in .claude/settings.json", "script": "scripts/Sync-AllowRules.ps1", "clause": "AI-SDLC", "mode": "Advisory", "args": { "Check": true } } ], "allow": [ diff --git a/.claude/skills/ai-sdlc-gates/scripts/AiSdlcConfig.psm1 b/.claude/skills/ai-sdlc-gates/scripts/AiSdlcConfig.psm1 index 3d3449e..3c23847 100644 --- a/.claude/skills/ai-sdlc-gates/scripts/AiSdlcConfig.psm1 +++ b/.claude/skills/ai-sdlc-gates/scripts/AiSdlcConfig.psm1 @@ -150,8 +150,9 @@ $script:Defaults = [ordered]@{ routePageFolders = @('docs/api/') } docs = [ordered]@{ - units = @() - unitExclude = @() + units = @() + unitExclude = @() + lastCheckedMaxAgeDays = 0 } repoGates = @() } diff --git a/.claude/skills/ai-sdlc-gates/scripts/Check-DocLastChecked.Tests.ps1 b/.claude/skills/ai-sdlc-gates/scripts/Check-DocLastChecked.Tests.ps1 new file mode 100644 index 0000000..e435f16 --- /dev/null +++ b/.claude/skills/ai-sdlc-gates/scripts/Check-DocLastChecked.Tests.ps1 @@ -0,0 +1,81 @@ +#requires -Version 7.4 + +Describe 'Check-DocLastChecked' { + BeforeAll { + $script:Gate = Join-Path $PSScriptRoot 'Check-DocLastChecked.ps1' + + # A repository with aisdlc.json, AGENTS.md and a docs/ folder with the given pages. + function New-Repo { + param([string]$Json = '{}', [hashtable]$Pages = @{}, [string]$Agents = '# Agents') + $root = Join-Path $TestDrive ([guid]::NewGuid().ToString('n')) + New-Item -ItemType Directory -Path (Join-Path $root 'docs') -Force | Out-Null + Set-Content -LiteralPath (Join-Path $root 'aisdlc.json') -Value $Json + Set-Content -LiteralPath (Join-Path $root 'AGENTS.md') -Value $Agents + foreach ($name in $Pages.Keys) { Set-Content -LiteralPath (Join-Path $root 'docs' $name) -Value $Pages[$name] } + $root + } + + function Invoke-Gate { + param([string]$Root, [switch]$Quiet) + $extra = @() + if ($Quiet) { $extra += '-Quiet' } + $output = & pwsh -NoProfile -File $script:Gate -RepoRoot $Root -Today '2026-11-09' @extra *>&1 | Out-String + [pscustomobject]@{ Code = $LASTEXITCODE; Output = $output } + } + + $script:On = '{ "docs": { "lastCheckedMaxAgeDays": 30 } }' + $script:OldPage = @{ 'old.md' = @('# Old', '', 'The list. Last checked: 2026-09-01.') } + } + + It 'is off by default, also with an old date' { + $r = Invoke-Gate (New-Repo -Pages $script:OldPage) + $r.Code | Should -Be 0 + $r.Output | Should -Match 'off' + } + + It 'counts as off' -ForEach @( + @{ Name = 'the string "30"'; Json = '{ "docs": { "lastCheckedMaxAgeDays": "30" } }' } + @{ Name = 'zero'; Json = '{ "docs": { "lastCheckedMaxAgeDays": 0 } }' } + @{ Name = 'a negative number'; Json = '{ "docs": { "lastCheckedMaxAgeDays": -5 } }' } + @{ Name = 'true'; Json = '{ "docs": { "lastCheckedMaxAgeDays": true } }' } + ) { + $r = Invoke-Gate (New-Repo -Json $Json -Pages $script:OldPage) + $r.Code | Should -Be 0 + $r.Output | Should -Match 'off' + } + + It 'lists a date older than the setting, with the file, the line and the age' { + $r = Invoke-Gate (New-Repo -Json $script:On -Pages $script:OldPage) + $r.Code | Should -Be 1 + $r.Output | Should -Match 'docs/old\.md:3 last checked 2026-09-01, 69 days ago' + } + + It 'passes a date that is exactly the setting old, and a newer one' { + $r = Invoke-Gate (New-Repo -Json $script:On -Pages @{ 'edge.md' = 'Last checked: 2026-10-10'; 'new.md' = 'last checked 2026-11-08' }) + $r.Code | Should -Be 0 -Because $r.Output + } + + It 'reads AGENTS.md too' { + $r = Invoke-Gate (New-Repo -Json $script:On -Agents "# Agents`nLast checked: 2025-01-01") + $r.Code | Should -Be 1 + $r.Output | Should -Match 'AGENTS\.md:2' + } + + It 'leaves a page without a date alone' { + $r = Invoke-Gate (New-Repo -Json $script:On -Pages @{ 'plain.md' = '# Plain page' }) + $r.Code | Should -Be 0 + } + + It 'prints nothing with -Quiet when nothing is too old, and the list when something is' { + (Invoke-Gate (New-Repo -Json $script:On -Pages @{ 'new.md' = 'Last checked: 2026-11-08' }) -Quiet).Output.Trim() | Should -BeNullOrEmpty + (Invoke-Gate (New-Repo -Pages $script:OldPage) -Quiet).Output.Trim() | Should -BeNullOrEmpty -Because 'off stays quiet as well' + (Invoke-Gate (New-Repo -Json $script:On -Pages $script:OldPage) -Quiet).Output | Should -Match 'docs/old\.md:3' + } + + It 'is registered as an Advisory core gate' { + $gates = Get-Content -LiteralPath (Join-Path $PSScriptRoot '..' 'gates.json') -Raw | ConvertFrom-Json + $entry = @($gates.gates | Where-Object { $_.script -eq 'scripts/Check-DocLastChecked.ps1' }) + $entry.Count | Should -Be 1 + $entry[0].mode | Should -Be 'Advisory' + } +} diff --git a/.claude/skills/ai-sdlc-gates/scripts/Check-DocLastChecked.ps1 b/.claude/skills/ai-sdlc-gates/scripts/Check-DocLastChecked.ps1 new file mode 100644 index 0000000..662d774 --- /dev/null +++ b/.claude/skills/ai-sdlc-gates/scripts/Check-DocLastChecked.ps1 @@ -0,0 +1,81 @@ +#Requires -Version 7 +<# +.SYNOPSIS + Docs lint: lists the pages whose facts were last checked too long ago. + +.DESCRIPTION + A page that copies facts from the outside world (versions, hosts, lists) says when someone last + checked them, as "Last checked: 2026-11-09". This gate reads AGENTS.md and the doc layers in + aisdlc.json and lists every such date that is older than docs.lastCheckedMaxAgeDays, with the file + and the line. A page without such a date is left alone. + + The setting is off by default. Only a positive whole number in aisdlc.json switches it on; any + other value, such as "30" as a string, counts as off. + + Exit 0 when the setting is off or no date is too old, and 1 when one is. The gate is Advisory, so + the runner shows a finding as a warning. The pre-push hook runs this script itself with -Quiet, so + the warning also shows on a push, which never fails on it. + +.PARAMETER RepoRoot + Repository root. Defaults to the folder that holds aisdlc.json, found from this script. + +.PARAMETER Today + The date to measure the age against. Defaults to today. A test passes a fixed date. + +.PARAMETER Quiet + Print nothing unless a date is too old. The pre-push hook uses it. + +.EXAMPLE + pwsh .claude/skills/ai-sdlc-gates/scripts/Check-DocLastChecked.ps1 +#> +[CmdletBinding()] +param( + [string]$RepoRoot, + [datetime]$Today = (Get-Date).Date, + [switch]$Quiet +) + +Import-Module (Join-Path $PSScriptRoot 'AiSdlcConfig.psm1') -Force +if (-not $RepoRoot) { $RepoRoot = Find-AiSdlcRepoRoot -StartPath $PSScriptRoot } + +$config = Get-AiSdlcConfig -RepoRoot $RepoRoot +$maxAge = $config.docs['lastCheckedMaxAgeDays'] +if (-not (($maxAge -is [int] -or $maxAge -is [long]) -and $maxAge -gt 0)) { + if (-not $Quiet) { Write-Host 'Last checked: off. Set docs.lastCheckedMaxAgeDays in aisdlc.json to a number of days to switch it on.' } + exit 0 +} + +$files = [System.Collections.Generic.List[string]]::new() +$agents = Join-Path $RepoRoot $config.paths.agentsFile +if (Test-Path -LiteralPath $agents) { $files.Add($agents) } +foreach ($layer in @(Get-AiSdlcPath -Name docsRoots -RepoRoot $RepoRoot -Relative)) { + $dir = Join-Path $RepoRoot $layer + if (Test-Path -LiteralPath $dir) { + Get-ChildItem -LiteralPath $dir -Recurse -Include *.md, *.markdown -File | ForEach-Object { $files.Add($_.FullName) } + } +} + +$pattern = [regex]'(?i)\blast checked:?\s*(\d{4}-\d{2}-\d{2})' +$old = [System.Collections.Generic.List[string]]::new() +foreach ($file in $files) { + $relative = [IO.Path]::GetRelativePath($RepoRoot, $file).Replace('\', '/') + $number = 0 + foreach ($line in [IO.File]::ReadLines($file)) { + $number++ + foreach ($match in $pattern.Matches($line)) { + $date = [datetime]::MinValue + if (-not [datetime]::TryParseExact($match.Groups[1].Value, 'yyyy-MM-dd', [cultureinfo]::InvariantCulture, 'None', [ref]$date)) { continue } + $age = ($Today.Date - $date.Date).Days + if ($age -gt $maxAge) { $old.Add("${relative}:$number last checked $($match.Groups[1].Value), $age days ago") } + } + } +} + +if ($old.Count) { + Write-Host "Last checked: $($old.Count) page date(s) are older than $maxAge days (docs.lastCheckedMaxAgeDays):" -ForegroundColor Yellow + foreach ($o in $old) { Write-Host " $o" } + Write-Host 'FIX: Check those facts against their source, fix what changed, and set the date to today.' + exit 1 +} +if (-not $Quiet) { Write-Host "Last checked: every date is at most $maxAge days old." } +exit 0 diff --git a/.claude/skills/ai-sdlc-gates/sync-manifest.json b/.claude/skills/ai-sdlc-gates/sync-manifest.json index f52a5f0..72d9520 100644 --- a/.claude/skills/ai-sdlc-gates/sync-manifest.json +++ b/.claude/skills/ai-sdlc-gates/sync-manifest.json @@ -20,8 +20,8 @@ ".claude/skills/adr-conventions/SKILL.md": "26e170df5a60858e25afe9176fa428f42affb1bb", ".claude/skills/ai-sdlc-gates/assets/actions/ai-sdlc-pr/action.yml": "f80ed84d896859668d74cd47bf327a714d383f8a", ".claude/skills/ai-sdlc-gates/assets/agents-core.md": "f7e45643bf0f5447d480b588784b2c599cc7f320", - ".claude/skills/ai-sdlc-gates/gates.json": "cf6f5a2d284f0b22f0f4a89292037caed3e53c19", - ".claude/skills/ai-sdlc-gates/scripts/AiSdlcConfig.psm1": "3d3449e30e25d842f355ce74a2150775ab8b3e0d", + ".claude/skills/ai-sdlc-gates/gates.json": "d37c2ad2ae7c5d8982aa4ae2b02c931ea7268642", + ".claude/skills/ai-sdlc-gates/scripts/AiSdlcConfig.psm1": "3c23847cfe4e9f3d43bf415ca834f464b04071b3", ".claude/skills/ai-sdlc-gates/scripts/AiSdlcConfig.Tests.ps1": "e5689b5deec495e74dc991786596903d70283263", ".claude/skills/ai-sdlc-gates/scripts/apm-version.json": "fbbd8a51e60e3a7e653a35bc9b959f2bf332ab74", ".claude/skills/ai-sdlc-gates/scripts/Build-DocsIndex.ps1": "64c6d651e638b0fe15d20cde02418e8021a5cdfc", @@ -38,6 +38,8 @@ ".claude/skills/ai-sdlc-gates/scripts/Check-DocCoverage.Tests.ps1": "4a0ec4a8a2e853dc747caed1fd52eab355795d74", ".claude/skills/ai-sdlc-gates/scripts/Check-DocEmDashes.ps1": "5bfba25e0161cef3f3d0afd7bff3f7c0f7cdd8e4", ".claude/skills/ai-sdlc-gates/scripts/Check-DocEmDashes.Tests.ps1": "c49f03dc79e512398464c9a635831d9484b6d8d5", + ".claude/skills/ai-sdlc-gates/scripts/Check-DocLastChecked.ps1": "662d77429101dd307f62b4ba4b391c5678a2f453", + ".claude/skills/ai-sdlc-gates/scripts/Check-DocLastChecked.Tests.ps1": "e435f161b0d0fafb3268e34ba149346029cb2273", ".claude/skills/ai-sdlc-gates/scripts/Check-DocLineCitations.ps1": "aa86e5e2370d5798f5fbb6984e6ad66d4d23235d", ".claude/skills/ai-sdlc-gates/scripts/Check-DocLineCitations.Tests.ps1": "dbab13ae6cf7594a5392655b00e01043023d8ba0", ".claude/skills/ai-sdlc-gates/scripts/Check-DocPersonNames.ps1": "931b28d5f8f50e660b2b4072f911feee86503435", @@ -111,10 +113,10 @@ ".claude/skills/ai-sdlc-handbook/references/constitution.md": "34e1aa1bd0af60f9975ee7236216a95d048e3b58", ".claude/skills/ai-sdlc-handbook/references/consumer-own.md": "3dd7f38e00b58f6d1c5b7c79a160a5ebfafdb3c1", ".claude/skills/ai-sdlc-handbook/references/context-management.md": "e284e60ca4d5e2624be79b5ce247e0662e430e3d", - ".claude/skills/ai-sdlc-handbook/references/docs-wiki.md": "038477c9b704a5b545decfe5e3f3f9970d8d1f9d", + ".claude/skills/ai-sdlc-handbook/references/docs-wiki.md": "37bdec92b7b65d58ce5d845385fdf9dc92cbcd6b", ".claude/skills/ai-sdlc-handbook/references/first-story.md": "be899eb395dafb2d704b8f0cb46bac1fb5e593c8", ".claude/skills/ai-sdlc-handbook/references/language.md": "ca703edeb9e07e28e32a39fbcc9116b64db444d8", - ".claude/skills/ai-sdlc-handbook/references/layout.md": "69e6a7345ca838eb224aa1bc6e093f3699c9a28c", + ".claude/skills/ai-sdlc-handbook/references/layout.md": "2d4692426dd0edfa2ffcd9c5f8379848823bb345", ".claude/skills/ai-sdlc-handbook/references/node-templates.md": "580c9c92c470a6abbaa0145cc3060ff1a11d247c", ".claude/skills/ai-sdlc-handbook/references/orchestration.md": "22373827d6ecd454d93cfb652f76c5204f3215e2", ".claude/skills/ai-sdlc-handbook/references/pattern.md": "f0f2a8cf3dac267cda0fd3783d86bddba5afc7c0", @@ -130,7 +132,7 @@ ".claude/skills/ai-sdlc-hooks/githooks/post-commit": "f18058f9a38efc164e13801d61bb05329a056109", ".claude/skills/ai-sdlc-hooks/githooks/post-merge": "bb373f33abd09294cda55d7fc4499f32672eb372", ".claude/skills/ai-sdlc-hooks/githooks/post-rewrite": "e4c187dffeeaba569901f3424fae476b17c14927", - ".claude/skills/ai-sdlc-hooks/githooks/pre-push": "73b10f0197b87c9311542cbb93627c116aa28788", + ".claude/skills/ai-sdlc-hooks/githooks/pre-push": "4061cda4b50922eb11ba925290c0cb4582806270", ".claude/skills/ai-sdlc-hooks/scripts/AiSdlcSetup.ps1": "52ffd325d13cd403e7bfea0de8098c530c129b65", ".claude/skills/ai-sdlc-hooks/scripts/AiSdlcSetup.Tests.ps1": "ef5b30f0811181462d354a61d3e64c19f0c305e2", ".claude/skills/ai-sdlc-hooks/scripts/Deny-AgentMerge.ps1": "535543b86886fcc582912ded5373b0bd3d756356", @@ -156,12 +158,12 @@ ".claude/skills/ai-sdlc-hooks/scripts/Invoke-PostEditCheck.Tests.ps1": "3429e18735428ab387ab58ae276d4195b32e7999", ".claude/skills/ai-sdlc-hooks/scripts/New-AiSdlcUpdatePullRequest.ps1": "b54f90deb751d0b0dbf8ee8fbc3f39b3300b3b3d", ".claude/skills/ai-sdlc-hooks/scripts/New-AiSdlcUpdatePullRequest.Tests.ps1": "77e4b627da13ea9887f3918f66bc5b33dfd91c56", - ".claude/skills/ai-sdlc-hooks/scripts/PrePushHook.Tests.ps1": "e75c62d107109d55b8d48b9c208c1cf4ea0d5e67", + ".claude/skills/ai-sdlc-hooks/scripts/PrePushHook.Tests.ps1": "b6b1e162200082e545ced70a584bd8ce8bb49f0a", ".claude/skills/ai-sdlc-hooks/scripts/Update-AiSdlc.ps1": "56abaf1de1c17bea94c26e128f8c41e275a74f87", ".claude/skills/ai-sdlc-hooks/scripts/Update-AiSdlc.Tests.ps1": "8db305e438bc7ee404eb5106eacbe5581738f148", ".claude/skills/ai-sdlc-hooks/scripts/WindowsLongPaths.ps1": "fa3d7f509b6f9a1a935178c1eaf0d1566b7afead", ".claude/skills/ai-sdlc-hooks/scripts/WindowsLongPaths.Tests.ps1": "21a220ca2ccc65a56ec427a6e74c5a5dbfbfd4ef", - ".claude/skills/ai-sdlc-hooks/SKILL.md": "774efd3863941a94682a7c8dcf3573280d173790", + ".claude/skills/ai-sdlc-hooks/SKILL.md": "475c187e39ed4bbc9731110380b927a45bf7d4b4", ".claude/skills/capture-learning/SKILL.md": "32300ce3189109b0d717f975623e8d7ccec1c821", ".claude/skills/convene-personas/SKILL.md": "449708a02206bec35a83d2f48ca6366c8b78e3a2", ".claude/skills/docs-wiki-conventions/SKILL.md": "0679512fa39815b63da6373ff29bb6eadc52ff24", diff --git a/.claude/skills/ai-sdlc-handbook/references/docs-wiki.md b/.claude/skills/ai-sdlc-handbook/references/docs-wiki.md index 038477c..37bdec9 100644 --- a/.claude/skills/ai-sdlc-handbook/references/docs-wiki.md +++ b/.claude/skills/ai-sdlc-handbook/references/docs-wiki.md @@ -173,6 +173,7 @@ sources, then checked claim by claim before anything is merged. | Check wiki integrity locally | `Invoke-LocalGates.ps1` and the pre-push hook (run `Check-DocsWiki.ps1`) | active | | Enforce the no-em-dash house style | `Check-DocEmDashes.ps1` (via `Invoke-LocalGates.ps1`) | active, blocking in CI | | Enforce the reading level (B2 sentences, B1 words) | `Check-DocReadingLevel.ps1` (via `Invoke-LocalGates.ps1`) | active, blocking | +| Warn when a page's `Last checked` date is too old | `Check-DocLastChecked.ps1` (via `Invoke-LocalGates.ps1` and the pre-push hook) | advisory, off until `docs.lastCheckedMaxAgeDays` is set | | Check wiki integrity before merge | CI gate in the pull request workflow | active, blocking (orphans, broken links, index sync, page-to-page connectivity) | | Check every pointer names a section that is there | `Check-DocSectionRefs.ps1` (via `Invoke-LocalGates.ps1`) | active, blocking | | Check every documented row carries a fact | `Check-DocRowContent.ps1` (blocking gate; no graph needed) | active | diff --git a/.claude/skills/ai-sdlc-handbook/references/layout.md b/.claude/skills/ai-sdlc-handbook/references/layout.md index 69e6a73..2d46924 100644 --- a/.claude/skills/ai-sdlc-handbook/references/layout.md +++ b/.claude/skills/ai-sdlc-handbook/references/layout.md @@ -136,6 +136,7 @@ installs. `AiSdlcConfig.psm1` takes each dependency whose path ends in `packs//ai-sdlc/private-terms.txt` | empty | | `paths.discoveryRoot` | The folder of the discovery pages, for the `discovery` pack | `docs-functional/discovery` | | `visibility` | `private` or `public`. The private-terms gate runs only on a `public` repository | `private` | +| `docs.lastCheckedMaxAgeDays` | A positive whole number switches on a warning for every `Last checked: ` in `AGENTS.md` and the doc layers that is older than this many days. The local gate run and the pre-push hook show it, and it never fails a push. Any other value counts as off. | `0` (off) | | `docs.units` / `docs.unitExclude` | The units that need a page, when the list of the packs does not fit, and the unit paths left out on purpose | the packs' list / none | | `paths.solution`, `paths.sourceRoot`, `paths.testRoot`, `paths.runSettings`, `paths.coverageBaseline`, `paths.packagesProps` | The .NET solution, its code, its tests and its coverage setup, for the `dotnet` pack | none | | `commands.build` / `commands.test` | How to build and test the repository. The pre-flight runs `commands.test` from the repository root, unless a pack pre-flight runs the tests itself, as the dotnet pack does | none | diff --git a/.claude/skills/ai-sdlc-hooks/SKILL.md b/.claude/skills/ai-sdlc-hooks/SKILL.md index 774efd3..475c187 100644 --- a/.claude/skills/ai-sdlc-hooks/SKILL.md +++ b/.claude/skills/ai-sdlc-hooks/SKILL.md @@ -42,7 +42,7 @@ The dotnet pack adds one more: `Deny-StaleGraphQuery.ps1` in `dotnet-code-graph` (`Test-PushReceipt.ps1` in `ai-sdlc-gates`). The pre-flight ran the same gates on that content, and the pull request build still runs them. A push that only deletes refs, or whose commits the remote already has, runs no gate at all. Only the refs of the remote being pushed to count. Both - push hooks judge this with one rule, `Test-PushSendsNothingNew` in `PreflightReceipt.psm1`. It also shows the change-completeness report, which is advisory and never fails the push. On a network share, the gates run on a local checkout of the pushed commit, which is much faster. Last, it + push hooks judge this with one rule, `Test-PushSendsNothingNew` in `PreflightReceipt.psm1`. It also shows the change-completeness report and the `Last checked` report, which are advisory and never fail the push. On a network share, the gates run on a local checkout of the pushed commit, which is much faster. Last, it hands the same ref lines on to `git lfs pre-push`, so the LFS objects are uploaded. The other hooks refresh the code graph, and do nothing when the graph tooling is absent. - `githooks/git-lfs-hook` is shared by `pre-push`, `post-checkout`, `post-commit` and `post-merge`. diff --git a/.claude/skills/ai-sdlc-hooks/githooks/pre-push b/.claude/skills/ai-sdlc-hooks/githooks/pre-push index 73b10f0..4061cda 100644 --- a/.claude/skills/ai-sdlc-hooks/githooks/pre-push +++ b/.claude/skills/ai-sdlc-hooks/githooks/pre-push @@ -160,6 +160,13 @@ run_gates() ( # so the -BlockingOnly run above leaves it out; this call keeps the report visible on every push, # for every tool, without failing it. completeness="${gate_root:-$repo_root}/.claude/skills/ai-sdlc-gates/scripts/Check-ChangeCompleteness.ps1" + # Advisory as well, for the same reason: lists the pages whose "Last checked" date is older than + # docs.lastCheckedMaxAgeDays. It prints nothing when the setting is off or every date is recent. + last_checked="${gate_root:-$repo_root}/.claude/skills/ai-sdlc-gates/scripts/Check-DocLastChecked.ps1" + if [ -f "$last_checked" ]; then + "$PWSH" -NoProfile -File "$last_checked" -Quiet || true + fi + if [ -f "$completeness" ]; then "$PWSH" -NoProfile -File "$completeness" || true fi diff --git a/.claude/skills/ai-sdlc-hooks/scripts/PrePushHook.Tests.ps1 b/.claude/skills/ai-sdlc-hooks/scripts/PrePushHook.Tests.ps1 index e75c62d..b6b1e16 100644 --- a/.claude/skills/ai-sdlc-hooks/scripts/PrePushHook.Tests.ps1 +++ b/.claude/skills/ai-sdlc-hooks/scripts/PrePushHook.Tests.ps1 @@ -280,6 +280,7 @@ Describe 'The pre-push git hook' { git -C $root init --quiet Set-Content -LiteralPath (Join-Path $gates 'Invoke-LocalGates.ps1') -Value "param([switch]`$BlockingOnly) Write-Host `"runner ran blockingOnly=`$BlockingOnly`"; Write-Host `"GIT_DIR=[`$env:GIT_DIR] GIT_INDEX_FILE=[`$env:GIT_INDEX_FILE]`"; exit $RunnerExit" Set-Content -LiteralPath (Join-Path $gates 'Check-ChangeCompleteness.ps1') -Value "Write-Host 'completeness ran'; exit $CompletenessExit" + Set-Content -LiteralPath (Join-Path $gates 'Check-DocLastChecked.ps1') -Value "param([switch]`$Quiet) Write-Host `"last-checked ran quiet=`$Quiet`"; exit 1" Set-Content -LiteralPath (Join-Path $dotnet 'Check-DocDrift.ps1') -Value "Write-Host 'drift ran on its own'; exit 0" $sha = $script:Sha if ($Receipt -ne 'None') { @@ -319,6 +320,13 @@ Describe 'The pre-push git hook' { $r.Output | Should -Match 'completeness ran' } + It 'shows the Last checked report quietly, and a finding there does not fail the push' -Skip:($script:NoSh -or $script:NoPwsh) { + $r = Invoke-PrePushWithGates + + $r.Code | Should -Be 0 -Because $r.Output + $r.Output | Should -Match 'last-checked ran quiet=True' + } + It 'does not run Check-DocDrift.ps1 again, because the runner runs it as a blocking gate' -Skip:($script:NoSh -or $script:NoPwsh) { $r = Invoke-PrePushWithGates diff --git a/CHANGELOG.md b/CHANGELOG.md index d405510..9a98d61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,13 @@ merge is ready to tag, and no second pull request is needed to name the version. Each entry names its issue, as `#42`. +## v1.4.0 - 2026-11-10 + +- A repository can set `docs.lastCheckedMaxAgeDays` in `aisdlc.json` to a number of days (#24). Then a + new advisory gate, `Check-DocLastChecked.ps1`, lists every `Last checked: ` in `AGENTS.md` and + the doc layers that is older than that. The pre-push hook shows the same list as a warning, and never + fails the push on it. The setting is off by default, and a page without such a date is left alone. + ## v1.3.3 - 2026-11-09 - A `Test-GitleaksBaseline` test no longer fails when a test file that runs in parallel deletes its own diff --git a/apm.lock.yaml b/apm.lock.yaml index dd845af..d3e5561 100644 --- a/apm.lock.yaml +++ b/apm.lock.yaml @@ -3,7 +3,7 @@ apm_version: 0.31.0 dependencies: - repo_url: _local/core name: ai-sdlc-core - version: 1.3.3 + version: 1.4.0 package_type: apm_package deployed_files: - .claude/agents/architect.md @@ -46,6 +46,8 @@ dependencies: - .claude/skills/ai-sdlc-gates/scripts/Check-DocCoverage.ps1 - .claude/skills/ai-sdlc-gates/scripts/Check-DocEmDashes.Tests.ps1 - .claude/skills/ai-sdlc-gates/scripts/Check-DocEmDashes.ps1 + - .claude/skills/ai-sdlc-gates/scripts/Check-DocLastChecked.Tests.ps1 + - .claude/skills/ai-sdlc-gates/scripts/Check-DocLastChecked.ps1 - .claude/skills/ai-sdlc-gates/scripts/Check-DocLineCitations.Tests.ps1 - .claude/skills/ai-sdlc-gates/scripts/Check-DocLineCitations.ps1 - .claude/skills/ai-sdlc-gates/scripts/Check-DocPersonNames.Tests.ps1 @@ -247,9 +249,9 @@ dependencies: .claude/skills/ai-sdlc-gates/SKILL.md: sha256:09165e4e714d27feedf2c07f0da9e3e4ceb485cbb8171b959428705c1247a83e .claude/skills/ai-sdlc-gates/assets/actions/ai-sdlc-pr/action.yml: sha256:ee6430668f2f44b6256275645e10f8ab2167b8b6d49990465c5527d1b334abac .claude/skills/ai-sdlc-gates/assets/agents-core.md: sha256:544bb5b78ceaa2ee9eb20203ecdef5d380ecd9b10265cc90d10385d96ed72509 - .claude/skills/ai-sdlc-gates/gates.json: sha256:160f09f14ff6591b024f827c879802cf9218b37785d209da6a1323602d6153e5 + .claude/skills/ai-sdlc-gates/gates.json: sha256:4f2b4947786c623788a7853675754822b7ed8bd55717ad9c47f7c699a0252928 .claude/skills/ai-sdlc-gates/scripts/AiSdlcConfig.Tests.ps1: sha256:669ce124af8ce839ddd1f463236777d682196ebda0a0175fe362185f033779a4 - .claude/skills/ai-sdlc-gates/scripts/AiSdlcConfig.psm1: sha256:59a69f20f41fdcde013a4654e6532730acb1da42408ff2d825747b8c6891e401 + .claude/skills/ai-sdlc-gates/scripts/AiSdlcConfig.psm1: sha256:b63d375c06e10f4a36bbb562d7f078a43944a2aff79c6aec37fe629ce9554c0a .claude/skills/ai-sdlc-gates/scripts/Build-DocsIndex.Tests.ps1: sha256:0b95e6de39c913f3bdebc38c6003f12565a225b165c19e73167cf30391ec1a8b .claude/skills/ai-sdlc-gates/scripts/Build-DocsIndex.ps1: sha256:fe0a4432d2e5cb3d1830bc178a086c721eea3cbdd744def18586e1d0a9c0a4c1 .claude/skills/ai-sdlc-gates/scripts/Check-AgentHygiene.Tests.ps1: sha256:d4115307bda4dc2794d395bf41cdc4169896f1255e37b5393d71ad3fb6e6495b @@ -264,6 +266,8 @@ dependencies: .claude/skills/ai-sdlc-gates/scripts/Check-DocCoverage.ps1: sha256:901976b2f8a97e56a57c1ff8dd1edfb0ce06c0972c19fe17bd0505d0c77a19e9 .claude/skills/ai-sdlc-gates/scripts/Check-DocEmDashes.Tests.ps1: sha256:092d340744011ebf8ea1dd057c278cdaccf87a1242a20a17f1579e452ec9f01e .claude/skills/ai-sdlc-gates/scripts/Check-DocEmDashes.ps1: sha256:93551cfbcfde7c0bd8f4e0495d38da86c4ed6289c22190f84989ef425256c3a3 + .claude/skills/ai-sdlc-gates/scripts/Check-DocLastChecked.Tests.ps1: sha256:ca122ee40ac7c9847724583a695801a37e7b3395a191d139dfb7694f111de899 + .claude/skills/ai-sdlc-gates/scripts/Check-DocLastChecked.ps1: sha256:a279e1011f13dd7e4a0141231a1bc35700231986885977ee1fc217c07ad56059 .claude/skills/ai-sdlc-gates/scripts/Check-DocLineCitations.Tests.ps1: sha256:4d4ce3e76a97d655a18e2b3e0b29349b9e33a660c8d1502ae0a9309792e3b533 .claude/skills/ai-sdlc-gates/scripts/Check-DocLineCitations.ps1: sha256:8f8b8e563a6283637f71f21fcf2d70f4ca38bbd8053f0d94f8283715247c9d13 .claude/skills/ai-sdlc-gates/scripts/Check-DocPersonNames.Tests.ps1: sha256:9b797aac762bdb17bad0a9117037be2dbeb82ca0f45e422a152958c0b66fce88 @@ -331,7 +335,7 @@ dependencies: .claude/skills/ai-sdlc-gates/scripts/gitleaks-rules.json: sha256:6a8a75c5dbcf2378a1c52d046e34ce275aac7ce08a0ae61408d25c18e1e27014 .claude/skills/ai-sdlc-gates/scripts/gitleaks-version.json: sha256:c54acb854f87a1bbdf0e90c670b72b5de3cd37f7e460d82eca599c3c7af23a84 .claude/skills/ai-sdlc-gates/skill-catalog.json: sha256:5537684656bf189a740ba7e9e7050083af05668d00501ce1e9c6909cb8b91203 - .claude/skills/ai-sdlc-gates/sync-manifest.json: sha256:6912b15b11efef78b071cddfafa6b4ccd56358a00677e9e9a302070383daba35 + .claude/skills/ai-sdlc-gates/sync-manifest.json: sha256:1934ca960410072099c1daed77920db30b43e0b01d2f8bb15dcf1a4157b516ab .claude/skills/ai-sdlc-handbook/SKILL.md: sha256:548e6b9ad79d3d2afa2f5779835988eeb12c49cda08917c4bbaa9ac0486a47a0 .claude/skills/ai-sdlc-handbook/references/README.md: sha256:654afcaa2b81f560eff93dbdef521b09ced06137a1dbb85d70a4e14ef7502248 .claude/skills/ai-sdlc-handbook/references/artifact-graph.md: sha256:d7ddfe20e5ee6565bcf25f9cef0f578da2a4ab1590033d791b8814d4688fd1f0 @@ -340,17 +344,17 @@ dependencies: .claude/skills/ai-sdlc-handbook/references/constitution.md: sha256:4b788d15a005a78d52f80e08a39ffc40059d810f8410ae9d9e0ee58c16e76538 .claude/skills/ai-sdlc-handbook/references/consumer-own.md: sha256:64321f5c9d8e5b43fcac9c48af14b8336e00cdce1c278aaa593249d084a0b6c8 .claude/skills/ai-sdlc-handbook/references/context-management.md: sha256:16146693f00f638bf428a52bb32a5cd9516ec419f86ea1690243295496b226df - .claude/skills/ai-sdlc-handbook/references/docs-wiki.md: sha256:2bd6f3a8e64f9db16163519767b822e4ebcffd740e3c5cbff17281ad71d264b7 + .claude/skills/ai-sdlc-handbook/references/docs-wiki.md: sha256:7e69bda6ce0538fa6d510e46c8ccc217e3c5cf252646bbba9af13b66e56ee609 .claude/skills/ai-sdlc-handbook/references/first-story.md: sha256:831552230cc16386ee01d7c730e288ef19aca5a66fafb00e1dfbbf4e9788caf2 .claude/skills/ai-sdlc-handbook/references/language.md: sha256:e0e32fae9c9fcdd23380d92ec910128254ce248538940541f5789ca78228a023 - .claude/skills/ai-sdlc-handbook/references/layout.md: sha256:c0287872a2b6ada62c4ac3fef9c8dc636c6b1b34c68b30d12c673cf2fe2ce33a + .claude/skills/ai-sdlc-handbook/references/layout.md: sha256:1a5aa5aa1fe2d96b582c71d50a908347f722cd4bf8aec7bf77e4edab8305c6e8 .claude/skills/ai-sdlc-handbook/references/node-templates.md: sha256:8664ad1f85bff48d6230ed22e3f25683f378822e566c2a1454cbb204f4bb8fad .claude/skills/ai-sdlc-handbook/references/orchestration.md: sha256:6a1d6b6cc434f2e312994bd77daaa1fef4e007e03777ac63f3ca74edaa0cc485 .claude/skills/ai-sdlc-handbook/references/pattern.md: sha256:7908f80ee28ff1f7cd9f85b22fcf3e455fe74225d33ff201f8fbce1623d672eb .claude/skills/ai-sdlc-handbook/references/personas.md: sha256:7913c3dca6bad93b45624349a12bf976f894eb6ca05c7baa1fa7e3ba802ca69a .claude/skills/ai-sdlc-handbook/references/plan.md: sha256:b632fe2da2369f494ebe2606c4bdc8726eabe3b7615b6ddb0b58fa9b3897a216 .claude/skills/ai-sdlc-handbook/references/skill-usage.md: sha256:9d5414b38d9d6f5bd7dfa9857e8e441bf040b0020f46ac8d3b29b0a476161c61 - .claude/skills/ai-sdlc-hooks/SKILL.md: sha256:a48437ae3951181a44fa32032e8f94dec686fe4d4339c84fa8089c60ace4ef89 + .claude/skills/ai-sdlc-hooks/SKILL.md: sha256:d42e01c14e1f10c93badc1cbcba581f4aab9b72475ae38c317e282f4977732ed .claude/skills/ai-sdlc-hooks/gates.json: sha256:dfc8b0003e930167e0fccc366867f423bc0850f3c69477c0e7119aed710bf902 .claude/skills/ai-sdlc-hooks/githooks/git-lfs-hook: sha256:3265310500749e7181a5625517f94e2efa62d48be987ebc9b0396d38e2eeffa6 .claude/skills/ai-sdlc-hooks/githooks/graphify-refresh: sha256:1bc6c7f181aab3a0fdd34bf8907a4884bea2412a56ebdc77a673707e17c046f3 @@ -358,7 +362,7 @@ dependencies: .claude/skills/ai-sdlc-hooks/githooks/post-commit: sha256:4f73a74133b0272725117fa9d962353abb6ed98d9cf5e731cd212fd5ace23271 .claude/skills/ai-sdlc-hooks/githooks/post-merge: sha256:b9f1f47cd3894406451e00c177912baeed66470b0cc18d581a5461330c7c0868 .claude/skills/ai-sdlc-hooks/githooks/post-rewrite: sha256:b7ee1a97b08a9826678829b6c49457fdc4b5ebd53eaf8cdd70f33d26e61c4a79 - .claude/skills/ai-sdlc-hooks/githooks/pre-push: sha256:54c273622626f944f1ffc1285c747b42d4c8a56e778aeba5744c971b13a294c6 + .claude/skills/ai-sdlc-hooks/githooks/pre-push: sha256:b926f356e8fdb8592986a814cae30e0fd2db6d44624dc38bd71b192eff12ca14 .claude/skills/ai-sdlc-hooks/scripts/AiSdlcSetup.Tests.ps1: sha256:004bc7f1a68e953c8e657b49e74755b69a14138dfb0db61162ab15420f2b24be .claude/skills/ai-sdlc-hooks/scripts/AiSdlcSetup.ps1: sha256:b3569de6e27c3dcaffbc082311e6882bd722d440e5e855245da2410033202c7e .claude/skills/ai-sdlc-hooks/scripts/Deny-AgentMerge.Tests.ps1: sha256:4c4e1f6b673671125290d78815c72277665a8a618b55fd589f75f3a36e3b80aa @@ -384,7 +388,7 @@ dependencies: .claude/skills/ai-sdlc-hooks/scripts/Invoke-PostEditCheck.ps1: sha256:d60cdd2d341487ded3b9fafe40da49f2adfb1cf8f20cf3f8559ea2e80a5f93c6 .claude/skills/ai-sdlc-hooks/scripts/New-AiSdlcUpdatePullRequest.Tests.ps1: sha256:9c9859767d2534c45e1c72b47f4b5c64aaa16c32c580df3b5d8bc3dce5cdb2c4 .claude/skills/ai-sdlc-hooks/scripts/New-AiSdlcUpdatePullRequest.ps1: sha256:abf763c6cde97dbfc83b25f140e768d66fd9edd3961605b7d058b08a31882875 - .claude/skills/ai-sdlc-hooks/scripts/PrePushHook.Tests.ps1: sha256:fd010d9d93bf336525d313bab3ae914cd237c25d33f445de02d0e93a372340fd + .claude/skills/ai-sdlc-hooks/scripts/PrePushHook.Tests.ps1: sha256:e8209185ca6a2cba6e73b3fc803dc0ee1a904665e60344536066b8cc43933be3 .claude/skills/ai-sdlc-hooks/scripts/Update-AiSdlc.Tests.ps1: sha256:4f2fe5313c8763f8128ad0e0347da1f2dd485393d20dc5e3a5d75e08aa157ad3 .claude/skills/ai-sdlc-hooks/scripts/Update-AiSdlc.ps1: sha256:0381e47c6b1070c7b230f81f243e25b1a8bfa68b5e8e9ae2ad6e225b0ddb36b6 .claude/skills/ai-sdlc-hooks/scripts/WindowsLongPaths.Tests.ps1: sha256:52f81e945390e61222a2668c8525cb17f17226267e24c52d7792263a07576543 @@ -427,7 +431,7 @@ dependencies: local_path: ./core - repo_url: _local/discovery name: ai-sdlc-discovery - version: 1.3.3 + version: 1.4.0 package_type: apm_package deployed_files: - .claude/skills/draw-customer-journey @@ -444,7 +448,7 @@ dependencies: local_path: ./packs/discovery - repo_url: _local/github name: ai-sdlc-github - version: 1.3.3 + version: 1.4.0 package_type: apm_package deployed_files: - .claude/skills/fix-pr-feedback @@ -534,7 +538,7 @@ dependencies: local_path: ./packs/github - repo_url: _local/github-issues name: ai-sdlc-github-issues - version: 1.3.3 + version: 1.4.0 package_type: apm_package deployed_files: - .claude/agents/draft-reviewer.md @@ -795,7 +799,7 @@ deployments: owners: - ./core active_owner: ./core - content_hash: sha256:160f09f14ff6591b024f827c879802cf9218b37785d209da6a1323602d6153e5 + content_hash: sha256:4f2b4947786c623788a7853675754822b7ed8bd55717ad9c47f7c699a0252928 - kind: project-relative target: claude value: .claude/skills/ai-sdlc-gates/scripts/AiSdlcConfig.Tests.ps1 @@ -813,7 +817,7 @@ deployments: owners: - ./core active_owner: ./core - content_hash: sha256:59a69f20f41fdcde013a4654e6532730acb1da42408ff2d825747b8c6891e401 + content_hash: sha256:b63d375c06e10f4a36bbb562d7f078a43944a2aff79c6aec37fe629ce9554c0a - kind: project-relative target: claude value: .claude/skills/ai-sdlc-gates/scripts/Build-DocsIndex.Tests.ps1 @@ -940,6 +944,24 @@ deployments: - ./core active_owner: ./core content_hash: sha256:93551cfbcfde7c0bd8f4e0495d38da86c4ed6289c22190f84989ef425256c3a3 +- kind: project-relative + target: claude + value: .claude/skills/ai-sdlc-gates/scripts/Check-DocLastChecked.Tests.ps1 + runtime: null + scope: project + owners: + - ./core + active_owner: ./core + content_hash: sha256:ca122ee40ac7c9847724583a695801a37e7b3395a191d139dfb7694f111de899 +- kind: project-relative + target: claude + value: .claude/skills/ai-sdlc-gates/scripts/Check-DocLastChecked.ps1 + runtime: null + scope: project + owners: + - ./core + active_owner: ./core + content_hash: sha256:a279e1011f13dd7e4a0141231a1bc35700231986885977ee1fc217c07ad56059 - kind: project-relative target: claude value: .claude/skills/ai-sdlc-gates/scripts/Check-DocLineCitations.Tests.ps1 @@ -1551,7 +1573,7 @@ deployments: owners: - ./core active_owner: ./core - content_hash: sha256:6912b15b11efef78b071cddfafa6b4ccd56358a00677e9e9a302070383daba35 + content_hash: sha256:1934ca960410072099c1daed77920db30b43e0b01d2f8bb15dcf1a4157b516ab - kind: project-relative target: claude value: .claude/skills/ai-sdlc-handbook @@ -1641,7 +1663,7 @@ deployments: owners: - ./core active_owner: ./core - content_hash: sha256:2bd6f3a8e64f9db16163519767b822e4ebcffd740e3c5cbff17281ad71d264b7 + content_hash: sha256:7e69bda6ce0538fa6d510e46c8ccc217e3c5cf252646bbba9af13b66e56ee609 - kind: project-relative target: claude value: .claude/skills/ai-sdlc-handbook/references/first-story.md @@ -1668,7 +1690,7 @@ deployments: owners: - ./core active_owner: ./core - content_hash: sha256:c0287872a2b6ada62c4ac3fef9c8dc636c6b1b34c68b30d12c673cf2fe2ce33a + content_hash: sha256:1a5aa5aa1fe2d96b582c71d50a908347f722cd4bf8aec7bf77e4edab8305c6e8 - kind: project-relative target: claude value: .claude/skills/ai-sdlc-handbook/references/node-templates.md @@ -1740,7 +1762,7 @@ deployments: owners: - ./core active_owner: ./core - content_hash: sha256:a48437ae3951181a44fa32032e8f94dec686fe4d4339c84fa8089c60ace4ef89 + content_hash: sha256:d42e01c14e1f10c93badc1cbcba581f4aab9b72475ae38c317e282f4977732ed - kind: project-relative target: claude value: .claude/skills/ai-sdlc-hooks/gates.json @@ -1812,7 +1834,7 @@ deployments: owners: - ./core active_owner: ./core - content_hash: sha256:54c273622626f944f1ffc1285c747b42d4c8a56e778aeba5744c971b13a294c6 + content_hash: sha256:b926f356e8fdb8592986a814cae30e0fd2db6d44624dc38bd71b192eff12ca14 - kind: project-relative target: claude value: .claude/skills/ai-sdlc-hooks/scripts/AiSdlcSetup.Tests.ps1 @@ -2046,7 +2068,7 @@ deployments: owners: - ./core active_owner: ./core - content_hash: sha256:fd010d9d93bf336525d313bab3ae914cd237c25d33f445de02d0e93a372340fd + content_hash: sha256:e8209185ca6a2cba6e73b3fc803dc0ee1a904665e60344536066b8cc43933be3 - kind: project-relative target: claude value: .claude/skills/ai-sdlc-hooks/scripts/Update-AiSdlc.Tests.ps1 diff --git a/core/.apm/skills/ai-sdlc-gates/gates.json b/core/.apm/skills/ai-sdlc-gates/gates.json index cf6f5a2..d37c2ad 100644 --- a/core/.apm/skills/ai-sdlc-gates/gates.json +++ b/core/.apm/skills/ai-sdlc-gates/gates.json @@ -21,6 +21,7 @@ { "name": "AI-SDLC no private term in a public repository (skipped when private)", "script": "scripts/Check-PrivateTerms.ps1", "clause": "AI-SDLC", "mode": "Blocking" }, { "name": "C05 a pointer names a section that is there", "script": "scripts/Check-DocSectionRefs.ps1", "clause": "C05", "mode": "Blocking" }, { "name": "C05 both doc layers exist, and every unit has a page", "script": "scripts/Check-DocCoverage.ps1", "clause": "C05", "mode": "Blocking" }, + { "name": "Docs: no page was last checked longer ago than docs.lastCheckedMaxAgeDays (off by default)", "script": "scripts/Check-DocLastChecked.ps1", "clause": "C05", "mode": "Advisory" }, { "name": "Allow rules of the installed packages are in .claude/settings.json", "script": "scripts/Sync-AllowRules.ps1", "clause": "AI-SDLC", "mode": "Advisory", "args": { "Check": true } } ], "allow": [ diff --git a/core/.apm/skills/ai-sdlc-gates/scripts/AiSdlcConfig.psm1 b/core/.apm/skills/ai-sdlc-gates/scripts/AiSdlcConfig.psm1 index 3d3449e..3c23847 100644 --- a/core/.apm/skills/ai-sdlc-gates/scripts/AiSdlcConfig.psm1 +++ b/core/.apm/skills/ai-sdlc-gates/scripts/AiSdlcConfig.psm1 @@ -150,8 +150,9 @@ $script:Defaults = [ordered]@{ routePageFolders = @('docs/api/') } docs = [ordered]@{ - units = @() - unitExclude = @() + units = @() + unitExclude = @() + lastCheckedMaxAgeDays = 0 } repoGates = @() } diff --git a/core/.apm/skills/ai-sdlc-gates/scripts/Check-DocLastChecked.Tests.ps1 b/core/.apm/skills/ai-sdlc-gates/scripts/Check-DocLastChecked.Tests.ps1 new file mode 100644 index 0000000..e435f16 --- /dev/null +++ b/core/.apm/skills/ai-sdlc-gates/scripts/Check-DocLastChecked.Tests.ps1 @@ -0,0 +1,81 @@ +#requires -Version 7.4 + +Describe 'Check-DocLastChecked' { + BeforeAll { + $script:Gate = Join-Path $PSScriptRoot 'Check-DocLastChecked.ps1' + + # A repository with aisdlc.json, AGENTS.md and a docs/ folder with the given pages. + function New-Repo { + param([string]$Json = '{}', [hashtable]$Pages = @{}, [string]$Agents = '# Agents') + $root = Join-Path $TestDrive ([guid]::NewGuid().ToString('n')) + New-Item -ItemType Directory -Path (Join-Path $root 'docs') -Force | Out-Null + Set-Content -LiteralPath (Join-Path $root 'aisdlc.json') -Value $Json + Set-Content -LiteralPath (Join-Path $root 'AGENTS.md') -Value $Agents + foreach ($name in $Pages.Keys) { Set-Content -LiteralPath (Join-Path $root 'docs' $name) -Value $Pages[$name] } + $root + } + + function Invoke-Gate { + param([string]$Root, [switch]$Quiet) + $extra = @() + if ($Quiet) { $extra += '-Quiet' } + $output = & pwsh -NoProfile -File $script:Gate -RepoRoot $Root -Today '2026-11-09' @extra *>&1 | Out-String + [pscustomobject]@{ Code = $LASTEXITCODE; Output = $output } + } + + $script:On = '{ "docs": { "lastCheckedMaxAgeDays": 30 } }' + $script:OldPage = @{ 'old.md' = @('# Old', '', 'The list. Last checked: 2026-09-01.') } + } + + It 'is off by default, also with an old date' { + $r = Invoke-Gate (New-Repo -Pages $script:OldPage) + $r.Code | Should -Be 0 + $r.Output | Should -Match 'off' + } + + It 'counts as off' -ForEach @( + @{ Name = 'the string "30"'; Json = '{ "docs": { "lastCheckedMaxAgeDays": "30" } }' } + @{ Name = 'zero'; Json = '{ "docs": { "lastCheckedMaxAgeDays": 0 } }' } + @{ Name = 'a negative number'; Json = '{ "docs": { "lastCheckedMaxAgeDays": -5 } }' } + @{ Name = 'true'; Json = '{ "docs": { "lastCheckedMaxAgeDays": true } }' } + ) { + $r = Invoke-Gate (New-Repo -Json $Json -Pages $script:OldPage) + $r.Code | Should -Be 0 + $r.Output | Should -Match 'off' + } + + It 'lists a date older than the setting, with the file, the line and the age' { + $r = Invoke-Gate (New-Repo -Json $script:On -Pages $script:OldPage) + $r.Code | Should -Be 1 + $r.Output | Should -Match 'docs/old\.md:3 last checked 2026-09-01, 69 days ago' + } + + It 'passes a date that is exactly the setting old, and a newer one' { + $r = Invoke-Gate (New-Repo -Json $script:On -Pages @{ 'edge.md' = 'Last checked: 2026-10-10'; 'new.md' = 'last checked 2026-11-08' }) + $r.Code | Should -Be 0 -Because $r.Output + } + + It 'reads AGENTS.md too' { + $r = Invoke-Gate (New-Repo -Json $script:On -Agents "# Agents`nLast checked: 2025-01-01") + $r.Code | Should -Be 1 + $r.Output | Should -Match 'AGENTS\.md:2' + } + + It 'leaves a page without a date alone' { + $r = Invoke-Gate (New-Repo -Json $script:On -Pages @{ 'plain.md' = '# Plain page' }) + $r.Code | Should -Be 0 + } + + It 'prints nothing with -Quiet when nothing is too old, and the list when something is' { + (Invoke-Gate (New-Repo -Json $script:On -Pages @{ 'new.md' = 'Last checked: 2026-11-08' }) -Quiet).Output.Trim() | Should -BeNullOrEmpty + (Invoke-Gate (New-Repo -Pages $script:OldPage) -Quiet).Output.Trim() | Should -BeNullOrEmpty -Because 'off stays quiet as well' + (Invoke-Gate (New-Repo -Json $script:On -Pages $script:OldPage) -Quiet).Output | Should -Match 'docs/old\.md:3' + } + + It 'is registered as an Advisory core gate' { + $gates = Get-Content -LiteralPath (Join-Path $PSScriptRoot '..' 'gates.json') -Raw | ConvertFrom-Json + $entry = @($gates.gates | Where-Object { $_.script -eq 'scripts/Check-DocLastChecked.ps1' }) + $entry.Count | Should -Be 1 + $entry[0].mode | Should -Be 'Advisory' + } +} diff --git a/core/.apm/skills/ai-sdlc-gates/scripts/Check-DocLastChecked.ps1 b/core/.apm/skills/ai-sdlc-gates/scripts/Check-DocLastChecked.ps1 new file mode 100644 index 0000000..662d774 --- /dev/null +++ b/core/.apm/skills/ai-sdlc-gates/scripts/Check-DocLastChecked.ps1 @@ -0,0 +1,81 @@ +#Requires -Version 7 +<# +.SYNOPSIS + Docs lint: lists the pages whose facts were last checked too long ago. + +.DESCRIPTION + A page that copies facts from the outside world (versions, hosts, lists) says when someone last + checked them, as "Last checked: 2026-11-09". This gate reads AGENTS.md and the doc layers in + aisdlc.json and lists every such date that is older than docs.lastCheckedMaxAgeDays, with the file + and the line. A page without such a date is left alone. + + The setting is off by default. Only a positive whole number in aisdlc.json switches it on; any + other value, such as "30" as a string, counts as off. + + Exit 0 when the setting is off or no date is too old, and 1 when one is. The gate is Advisory, so + the runner shows a finding as a warning. The pre-push hook runs this script itself with -Quiet, so + the warning also shows on a push, which never fails on it. + +.PARAMETER RepoRoot + Repository root. Defaults to the folder that holds aisdlc.json, found from this script. + +.PARAMETER Today + The date to measure the age against. Defaults to today. A test passes a fixed date. + +.PARAMETER Quiet + Print nothing unless a date is too old. The pre-push hook uses it. + +.EXAMPLE + pwsh .claude/skills/ai-sdlc-gates/scripts/Check-DocLastChecked.ps1 +#> +[CmdletBinding()] +param( + [string]$RepoRoot, + [datetime]$Today = (Get-Date).Date, + [switch]$Quiet +) + +Import-Module (Join-Path $PSScriptRoot 'AiSdlcConfig.psm1') -Force +if (-not $RepoRoot) { $RepoRoot = Find-AiSdlcRepoRoot -StartPath $PSScriptRoot } + +$config = Get-AiSdlcConfig -RepoRoot $RepoRoot +$maxAge = $config.docs['lastCheckedMaxAgeDays'] +if (-not (($maxAge -is [int] -or $maxAge -is [long]) -and $maxAge -gt 0)) { + if (-not $Quiet) { Write-Host 'Last checked: off. Set docs.lastCheckedMaxAgeDays in aisdlc.json to a number of days to switch it on.' } + exit 0 +} + +$files = [System.Collections.Generic.List[string]]::new() +$agents = Join-Path $RepoRoot $config.paths.agentsFile +if (Test-Path -LiteralPath $agents) { $files.Add($agents) } +foreach ($layer in @(Get-AiSdlcPath -Name docsRoots -RepoRoot $RepoRoot -Relative)) { + $dir = Join-Path $RepoRoot $layer + if (Test-Path -LiteralPath $dir) { + Get-ChildItem -LiteralPath $dir -Recurse -Include *.md, *.markdown -File | ForEach-Object { $files.Add($_.FullName) } + } +} + +$pattern = [regex]'(?i)\blast checked:?\s*(\d{4}-\d{2}-\d{2})' +$old = [System.Collections.Generic.List[string]]::new() +foreach ($file in $files) { + $relative = [IO.Path]::GetRelativePath($RepoRoot, $file).Replace('\', '/') + $number = 0 + foreach ($line in [IO.File]::ReadLines($file)) { + $number++ + foreach ($match in $pattern.Matches($line)) { + $date = [datetime]::MinValue + if (-not [datetime]::TryParseExact($match.Groups[1].Value, 'yyyy-MM-dd', [cultureinfo]::InvariantCulture, 'None', [ref]$date)) { continue } + $age = ($Today.Date - $date.Date).Days + if ($age -gt $maxAge) { $old.Add("${relative}:$number last checked $($match.Groups[1].Value), $age days ago") } + } + } +} + +if ($old.Count) { + Write-Host "Last checked: $($old.Count) page date(s) are older than $maxAge days (docs.lastCheckedMaxAgeDays):" -ForegroundColor Yellow + foreach ($o in $old) { Write-Host " $o" } + Write-Host 'FIX: Check those facts against their source, fix what changed, and set the date to today.' + exit 1 +} +if (-not $Quiet) { Write-Host "Last checked: every date is at most $maxAge days old." } +exit 0 diff --git a/core/.apm/skills/ai-sdlc-gates/sync-manifest.json b/core/.apm/skills/ai-sdlc-gates/sync-manifest.json index f52a5f0..72d9520 100644 --- a/core/.apm/skills/ai-sdlc-gates/sync-manifest.json +++ b/core/.apm/skills/ai-sdlc-gates/sync-manifest.json @@ -20,8 +20,8 @@ ".claude/skills/adr-conventions/SKILL.md": "26e170df5a60858e25afe9176fa428f42affb1bb", ".claude/skills/ai-sdlc-gates/assets/actions/ai-sdlc-pr/action.yml": "f80ed84d896859668d74cd47bf327a714d383f8a", ".claude/skills/ai-sdlc-gates/assets/agents-core.md": "f7e45643bf0f5447d480b588784b2c599cc7f320", - ".claude/skills/ai-sdlc-gates/gates.json": "cf6f5a2d284f0b22f0f4a89292037caed3e53c19", - ".claude/skills/ai-sdlc-gates/scripts/AiSdlcConfig.psm1": "3d3449e30e25d842f355ce74a2150775ab8b3e0d", + ".claude/skills/ai-sdlc-gates/gates.json": "d37c2ad2ae7c5d8982aa4ae2b02c931ea7268642", + ".claude/skills/ai-sdlc-gates/scripts/AiSdlcConfig.psm1": "3c23847cfe4e9f3d43bf415ca834f464b04071b3", ".claude/skills/ai-sdlc-gates/scripts/AiSdlcConfig.Tests.ps1": "e5689b5deec495e74dc991786596903d70283263", ".claude/skills/ai-sdlc-gates/scripts/apm-version.json": "fbbd8a51e60e3a7e653a35bc9b959f2bf332ab74", ".claude/skills/ai-sdlc-gates/scripts/Build-DocsIndex.ps1": "64c6d651e638b0fe15d20cde02418e8021a5cdfc", @@ -38,6 +38,8 @@ ".claude/skills/ai-sdlc-gates/scripts/Check-DocCoverage.Tests.ps1": "4a0ec4a8a2e853dc747caed1fd52eab355795d74", ".claude/skills/ai-sdlc-gates/scripts/Check-DocEmDashes.ps1": "5bfba25e0161cef3f3d0afd7bff3f7c0f7cdd8e4", ".claude/skills/ai-sdlc-gates/scripts/Check-DocEmDashes.Tests.ps1": "c49f03dc79e512398464c9a635831d9484b6d8d5", + ".claude/skills/ai-sdlc-gates/scripts/Check-DocLastChecked.ps1": "662d77429101dd307f62b4ba4b391c5678a2f453", + ".claude/skills/ai-sdlc-gates/scripts/Check-DocLastChecked.Tests.ps1": "e435f161b0d0fafb3268e34ba149346029cb2273", ".claude/skills/ai-sdlc-gates/scripts/Check-DocLineCitations.ps1": "aa86e5e2370d5798f5fbb6984e6ad66d4d23235d", ".claude/skills/ai-sdlc-gates/scripts/Check-DocLineCitations.Tests.ps1": "dbab13ae6cf7594a5392655b00e01043023d8ba0", ".claude/skills/ai-sdlc-gates/scripts/Check-DocPersonNames.ps1": "931b28d5f8f50e660b2b4072f911feee86503435", @@ -111,10 +113,10 @@ ".claude/skills/ai-sdlc-handbook/references/constitution.md": "34e1aa1bd0af60f9975ee7236216a95d048e3b58", ".claude/skills/ai-sdlc-handbook/references/consumer-own.md": "3dd7f38e00b58f6d1c5b7c79a160a5ebfafdb3c1", ".claude/skills/ai-sdlc-handbook/references/context-management.md": "e284e60ca4d5e2624be79b5ce247e0662e430e3d", - ".claude/skills/ai-sdlc-handbook/references/docs-wiki.md": "038477c9b704a5b545decfe5e3f3f9970d8d1f9d", + ".claude/skills/ai-sdlc-handbook/references/docs-wiki.md": "37bdec92b7b65d58ce5d845385fdf9dc92cbcd6b", ".claude/skills/ai-sdlc-handbook/references/first-story.md": "be899eb395dafb2d704b8f0cb46bac1fb5e593c8", ".claude/skills/ai-sdlc-handbook/references/language.md": "ca703edeb9e07e28e32a39fbcc9116b64db444d8", - ".claude/skills/ai-sdlc-handbook/references/layout.md": "69e6a7345ca838eb224aa1bc6e093f3699c9a28c", + ".claude/skills/ai-sdlc-handbook/references/layout.md": "2d4692426dd0edfa2ffcd9c5f8379848823bb345", ".claude/skills/ai-sdlc-handbook/references/node-templates.md": "580c9c92c470a6abbaa0145cc3060ff1a11d247c", ".claude/skills/ai-sdlc-handbook/references/orchestration.md": "22373827d6ecd454d93cfb652f76c5204f3215e2", ".claude/skills/ai-sdlc-handbook/references/pattern.md": "f0f2a8cf3dac267cda0fd3783d86bddba5afc7c0", @@ -130,7 +132,7 @@ ".claude/skills/ai-sdlc-hooks/githooks/post-commit": "f18058f9a38efc164e13801d61bb05329a056109", ".claude/skills/ai-sdlc-hooks/githooks/post-merge": "bb373f33abd09294cda55d7fc4499f32672eb372", ".claude/skills/ai-sdlc-hooks/githooks/post-rewrite": "e4c187dffeeaba569901f3424fae476b17c14927", - ".claude/skills/ai-sdlc-hooks/githooks/pre-push": "73b10f0197b87c9311542cbb93627c116aa28788", + ".claude/skills/ai-sdlc-hooks/githooks/pre-push": "4061cda4b50922eb11ba925290c0cb4582806270", ".claude/skills/ai-sdlc-hooks/scripts/AiSdlcSetup.ps1": "52ffd325d13cd403e7bfea0de8098c530c129b65", ".claude/skills/ai-sdlc-hooks/scripts/AiSdlcSetup.Tests.ps1": "ef5b30f0811181462d354a61d3e64c19f0c305e2", ".claude/skills/ai-sdlc-hooks/scripts/Deny-AgentMerge.ps1": "535543b86886fcc582912ded5373b0bd3d756356", @@ -156,12 +158,12 @@ ".claude/skills/ai-sdlc-hooks/scripts/Invoke-PostEditCheck.Tests.ps1": "3429e18735428ab387ab58ae276d4195b32e7999", ".claude/skills/ai-sdlc-hooks/scripts/New-AiSdlcUpdatePullRequest.ps1": "b54f90deb751d0b0dbf8ee8fbc3f39b3300b3b3d", ".claude/skills/ai-sdlc-hooks/scripts/New-AiSdlcUpdatePullRequest.Tests.ps1": "77e4b627da13ea9887f3918f66bc5b33dfd91c56", - ".claude/skills/ai-sdlc-hooks/scripts/PrePushHook.Tests.ps1": "e75c62d107109d55b8d48b9c208c1cf4ea0d5e67", + ".claude/skills/ai-sdlc-hooks/scripts/PrePushHook.Tests.ps1": "b6b1e162200082e545ced70a584bd8ce8bb49f0a", ".claude/skills/ai-sdlc-hooks/scripts/Update-AiSdlc.ps1": "56abaf1de1c17bea94c26e128f8c41e275a74f87", ".claude/skills/ai-sdlc-hooks/scripts/Update-AiSdlc.Tests.ps1": "8db305e438bc7ee404eb5106eacbe5581738f148", ".claude/skills/ai-sdlc-hooks/scripts/WindowsLongPaths.ps1": "fa3d7f509b6f9a1a935178c1eaf0d1566b7afead", ".claude/skills/ai-sdlc-hooks/scripts/WindowsLongPaths.Tests.ps1": "21a220ca2ccc65a56ec427a6e74c5a5dbfbfd4ef", - ".claude/skills/ai-sdlc-hooks/SKILL.md": "774efd3863941a94682a7c8dcf3573280d173790", + ".claude/skills/ai-sdlc-hooks/SKILL.md": "475c187e39ed4bbc9731110380b927a45bf7d4b4", ".claude/skills/capture-learning/SKILL.md": "32300ce3189109b0d717f975623e8d7ccec1c821", ".claude/skills/convene-personas/SKILL.md": "449708a02206bec35a83d2f48ca6366c8b78e3a2", ".claude/skills/docs-wiki-conventions/SKILL.md": "0679512fa39815b63da6373ff29bb6eadc52ff24", diff --git a/core/.apm/skills/ai-sdlc-handbook/references/docs-wiki.md b/core/.apm/skills/ai-sdlc-handbook/references/docs-wiki.md index 038477c..37bdec9 100644 --- a/core/.apm/skills/ai-sdlc-handbook/references/docs-wiki.md +++ b/core/.apm/skills/ai-sdlc-handbook/references/docs-wiki.md @@ -173,6 +173,7 @@ sources, then checked claim by claim before anything is merged. | Check wiki integrity locally | `Invoke-LocalGates.ps1` and the pre-push hook (run `Check-DocsWiki.ps1`) | active | | Enforce the no-em-dash house style | `Check-DocEmDashes.ps1` (via `Invoke-LocalGates.ps1`) | active, blocking in CI | | Enforce the reading level (B2 sentences, B1 words) | `Check-DocReadingLevel.ps1` (via `Invoke-LocalGates.ps1`) | active, blocking | +| Warn when a page's `Last checked` date is too old | `Check-DocLastChecked.ps1` (via `Invoke-LocalGates.ps1` and the pre-push hook) | advisory, off until `docs.lastCheckedMaxAgeDays` is set | | Check wiki integrity before merge | CI gate in the pull request workflow | active, blocking (orphans, broken links, index sync, page-to-page connectivity) | | Check every pointer names a section that is there | `Check-DocSectionRefs.ps1` (via `Invoke-LocalGates.ps1`) | active, blocking | | Check every documented row carries a fact | `Check-DocRowContent.ps1` (blocking gate; no graph needed) | active | diff --git a/core/.apm/skills/ai-sdlc-handbook/references/layout.md b/core/.apm/skills/ai-sdlc-handbook/references/layout.md index 69e6a73..2d46924 100644 --- a/core/.apm/skills/ai-sdlc-handbook/references/layout.md +++ b/core/.apm/skills/ai-sdlc-handbook/references/layout.md @@ -136,6 +136,7 @@ installs. `AiSdlcConfig.psm1` takes each dependency whose path ends in `packs//ai-sdlc/private-terms.txt` | empty | | `paths.discoveryRoot` | The folder of the discovery pages, for the `discovery` pack | `docs-functional/discovery` | | `visibility` | `private` or `public`. The private-terms gate runs only on a `public` repository | `private` | +| `docs.lastCheckedMaxAgeDays` | A positive whole number switches on a warning for every `Last checked: ` in `AGENTS.md` and the doc layers that is older than this many days. The local gate run and the pre-push hook show it, and it never fails a push. Any other value counts as off. | `0` (off) | | `docs.units` / `docs.unitExclude` | The units that need a page, when the list of the packs does not fit, and the unit paths left out on purpose | the packs' list / none | | `paths.solution`, `paths.sourceRoot`, `paths.testRoot`, `paths.runSettings`, `paths.coverageBaseline`, `paths.packagesProps` | The .NET solution, its code, its tests and its coverage setup, for the `dotnet` pack | none | | `commands.build` / `commands.test` | How to build and test the repository. The pre-flight runs `commands.test` from the repository root, unless a pack pre-flight runs the tests itself, as the dotnet pack does | none | diff --git a/core/.apm/skills/ai-sdlc-hooks/SKILL.md b/core/.apm/skills/ai-sdlc-hooks/SKILL.md index 774efd3..475c187 100644 --- a/core/.apm/skills/ai-sdlc-hooks/SKILL.md +++ b/core/.apm/skills/ai-sdlc-hooks/SKILL.md @@ -42,7 +42,7 @@ The dotnet pack adds one more: `Deny-StaleGraphQuery.ps1` in `dotnet-code-graph` (`Test-PushReceipt.ps1` in `ai-sdlc-gates`). The pre-flight ran the same gates on that content, and the pull request build still runs them. A push that only deletes refs, or whose commits the remote already has, runs no gate at all. Only the refs of the remote being pushed to count. Both - push hooks judge this with one rule, `Test-PushSendsNothingNew` in `PreflightReceipt.psm1`. It also shows the change-completeness report, which is advisory and never fails the push. On a network share, the gates run on a local checkout of the pushed commit, which is much faster. Last, it + push hooks judge this with one rule, `Test-PushSendsNothingNew` in `PreflightReceipt.psm1`. It also shows the change-completeness report and the `Last checked` report, which are advisory and never fail the push. On a network share, the gates run on a local checkout of the pushed commit, which is much faster. Last, it hands the same ref lines on to `git lfs pre-push`, so the LFS objects are uploaded. The other hooks refresh the code graph, and do nothing when the graph tooling is absent. - `githooks/git-lfs-hook` is shared by `pre-push`, `post-checkout`, `post-commit` and `post-merge`. diff --git a/core/.apm/skills/ai-sdlc-hooks/githooks/pre-push b/core/.apm/skills/ai-sdlc-hooks/githooks/pre-push index 73b10f0..4061cda 100755 --- a/core/.apm/skills/ai-sdlc-hooks/githooks/pre-push +++ b/core/.apm/skills/ai-sdlc-hooks/githooks/pre-push @@ -160,6 +160,13 @@ run_gates() ( # so the -BlockingOnly run above leaves it out; this call keeps the report visible on every push, # for every tool, without failing it. completeness="${gate_root:-$repo_root}/.claude/skills/ai-sdlc-gates/scripts/Check-ChangeCompleteness.ps1" + # Advisory as well, for the same reason: lists the pages whose "Last checked" date is older than + # docs.lastCheckedMaxAgeDays. It prints nothing when the setting is off or every date is recent. + last_checked="${gate_root:-$repo_root}/.claude/skills/ai-sdlc-gates/scripts/Check-DocLastChecked.ps1" + if [ -f "$last_checked" ]; then + "$PWSH" -NoProfile -File "$last_checked" -Quiet || true + fi + if [ -f "$completeness" ]; then "$PWSH" -NoProfile -File "$completeness" || true fi diff --git a/core/.apm/skills/ai-sdlc-hooks/scripts/PrePushHook.Tests.ps1 b/core/.apm/skills/ai-sdlc-hooks/scripts/PrePushHook.Tests.ps1 index e75c62d..b6b1e16 100644 --- a/core/.apm/skills/ai-sdlc-hooks/scripts/PrePushHook.Tests.ps1 +++ b/core/.apm/skills/ai-sdlc-hooks/scripts/PrePushHook.Tests.ps1 @@ -280,6 +280,7 @@ Describe 'The pre-push git hook' { git -C $root init --quiet Set-Content -LiteralPath (Join-Path $gates 'Invoke-LocalGates.ps1') -Value "param([switch]`$BlockingOnly) Write-Host `"runner ran blockingOnly=`$BlockingOnly`"; Write-Host `"GIT_DIR=[`$env:GIT_DIR] GIT_INDEX_FILE=[`$env:GIT_INDEX_FILE]`"; exit $RunnerExit" Set-Content -LiteralPath (Join-Path $gates 'Check-ChangeCompleteness.ps1') -Value "Write-Host 'completeness ran'; exit $CompletenessExit" + Set-Content -LiteralPath (Join-Path $gates 'Check-DocLastChecked.ps1') -Value "param([switch]`$Quiet) Write-Host `"last-checked ran quiet=`$Quiet`"; exit 1" Set-Content -LiteralPath (Join-Path $dotnet 'Check-DocDrift.ps1') -Value "Write-Host 'drift ran on its own'; exit 0" $sha = $script:Sha if ($Receipt -ne 'None') { @@ -319,6 +320,13 @@ Describe 'The pre-push git hook' { $r.Output | Should -Match 'completeness ran' } + It 'shows the Last checked report quietly, and a finding there does not fail the push' -Skip:($script:NoSh -or $script:NoPwsh) { + $r = Invoke-PrePushWithGates + + $r.Code | Should -Be 0 -Because $r.Output + $r.Output | Should -Match 'last-checked ran quiet=True' + } + It 'does not run Check-DocDrift.ps1 again, because the runner runs it as a blocking gate' -Skip:($script:NoSh -or $script:NoPwsh) { $r = Invoke-PrePushWithGates diff --git a/core/apm.yml b/core/apm.yml index 4b8a2c3..985fa7b 100644 --- a/core/apm.yml +++ b/core/apm.yml @@ -1,3 +1,3 @@ name: ai-sdlc-core -version: "1.3.3" +version: "1.4.0" description: The AI-SDLC core for every repository - workflow skills, review agents, hooks, core gates and the handbook. diff --git a/docs/packages/core.md b/docs/packages/core.md index aefac3a..89cf4f2 100644 --- a/docs/packages/core.md +++ b/docs/packages/core.md @@ -128,6 +128,7 @@ Documentation scripts live under `core/.apm/skills/adopt-docs/scripts/` and `cor - `Check-DocLineCitations.ps1` rejects source references by line number. - `Check-DocPersonNames.ps1` checks for internal team member names. - `Check-DocRowContent.ps1` requires each documentation line to carry a fact. +- `Check-DocLastChecked.ps1` lists the pages whose `Last checked` date is older than `docs.lastCheckedMaxAgeDays`. It is advisory and off by default. - `Check-DocSectionRefs.ps1` checks references to sections in other pages. `DocCoverage.psm1` finds units that need pages and the pages that cover them. diff --git a/packs/bicep/apm.yml b/packs/bicep/apm.yml index d520944..e1792a3 100644 --- a/packs/bicep/apm.yml +++ b/packs/bicep/apm.yml @@ -1,3 +1,3 @@ name: ai-sdlc-bicep -version: "1.3.3" +version: "1.4.0" description: The Bicep pack - Bicep conventions for infrastructure templates. diff --git a/packs/blazor/apm.yml b/packs/blazor/apm.yml index 6ed757a..7a2da6b 100644 --- a/packs/blazor/apm.yml +++ b/packs/blazor/apm.yml @@ -1,3 +1,3 @@ name: ai-sdlc-blazor -version: "1.3.3" +version: "1.4.0" description: The Blazor pack - portal UI conventions, component authorization and the Razor gates. diff --git a/packs/discovery/apm.yml b/packs/discovery/apm.yml index daec5fc..3a1f5f2 100644 --- a/packs/discovery/apm.yml +++ b/packs/discovery/apm.yml @@ -1,3 +1,3 @@ name: ai-sdlc-discovery -version: "1.3.3" +version: "1.4.0" description: The discovery pack - the discovery workflows that write a research summary, a journey map and a hypothesis canvas as markdown files in the repository. diff --git a/packs/dotnet/apm.yml b/packs/dotnet/apm.yml index de17529..01dd6cc 100644 --- a/packs/dotnet/apm.yml +++ b/packs/dotnet/apm.yml @@ -1,3 +1,3 @@ name: ai-sdlc-dotnet -version: "1.3.3" +version: "1.4.0" description: The .NET pack - C# conventions, test-first, the .NET gates and the code graph. diff --git a/packs/github-issues/apm.yml b/packs/github-issues/apm.yml index 846a255..410328f 100644 --- a/packs/github-issues/apm.yml +++ b/packs/github-issues/apm.yml @@ -1,3 +1,3 @@ name: ai-sdlc-github-issues -version: "1.3.3" +version: "1.4.0" description: The GitHub Issues pack - issue conventions and the issue contract gates. diff --git a/packs/github/apm.yml b/packs/github/apm.yml index a60c638..c55e392 100644 --- a/packs/github/apm.yml +++ b/packs/github/apm.yml @@ -1,3 +1,3 @@ name: ai-sdlc-github -version: "1.3.3" +version: "1.4.0" description: The GitHub pack - pull requests, review threads, pull request delivery metrics and the GitHub Actions workflows. diff --git a/packs/knowledge/apm.yml b/packs/knowledge/apm.yml index cd0da5f..ba8ac9d 100644 --- a/packs/knowledge/apm.yml +++ b/packs/knowledge/apm.yml @@ -1,3 +1,3 @@ name: ai-sdlc-knowledge -version: "1.3.3" +version: "1.4.0" description: The knowledge pack - the conventions and the workflow for platform knowledge notes in the knowledge repository. diff --git a/packs/sonarcloud/apm.yml b/packs/sonarcloud/apm.yml index 6c79dba..46a0472 100644 --- a/packs/sonarcloud/apm.yml +++ b/packs/sonarcloud/apm.yml @@ -1,5 +1,5 @@ name: ai-sdlc-sonarcloud -version: "1.3.3" +version: "1.4.0" description: The SonarQube Cloud pack - the SonarQube MCP server for the agent session, and the gate that keeps the token and the organization out of the repository. dependencies: mcp: