Skip to content

Commit 7da20c6

Browse files
docs: align workspace inventory with registry
1 parent 6af2caa commit 7da20c6

3 files changed

Lines changed: 47 additions & 1 deletion

File tree

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ Use placeholders in examples. OAuth and local account examples must be obviously
6666
| `/workspace/model-assets` | `model-assets/ModelAssetsClient.tsx` | Model CRUD, evidence table with risk coloring |
6767
| `/workspace/risk-findings` | `risk-findings/RiskFindingsClient.tsx` | Findings table with Priority Sort, J/K nav, share links |
6868
| `/workspace/reports` | `reports/page.tsx` | Report center with track-based generation |
69+
| `/workspace/api-keys` | `api-keys/ApiKeysClient.tsx` | API key management and scoped credentials |
6970
| `/workspace/settings` | `settings/SettingsClient.tsx` | System config, templates, runtime status |
7071
| `/workspace/account` | `account/page.tsx` | User profile, providers, security |
7172

ROADMAP.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# DiffAudit Platform Roadmap
22

3-
Last updated: 2026-05-23 07:54 Asia/Hong_Kong
3+
Last updated: 2026-05-23 08:03 Asia/Hong_Kong
44

55
## Current Goal
66

@@ -45,6 +45,7 @@ Keep the public Platform repository product-ready while advancing workspace UX,
4545
- [x] Move workspace global search visible copy into the shared workspace copy contract.
4646
- [x] Derive workspace global search aliases from navigation keys instead of route strings.
4747
- [x] Source desktop and mobile workspace navigation accessibility labels from workspace copy.
48+
- [x] Keep workspace page inventory aligned with the workspace navigation registry.
4849
- [ ] Continue polishing workspace IA and deep-page consistency through small, reviewable slices.
4950

5051
## Review Gates
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
"""Guard workspace route inventory against navigation-registry drift."""
2+
3+
from __future__ import annotations
4+
5+
import re
6+
import unittest
7+
from pathlib import Path
8+
9+
10+
REPO_ROOT = Path(__file__).resolve().parents[1]
11+
AGENTS_PATH = REPO_ROOT / "AGENTS.md"
12+
REGISTRY_PATH = REPO_ROOT / "apps" / "web" / "src" / "lib" / "workspace-registry.ts"
13+
14+
15+
def workspace_inventory_section(markdown: str) -> str:
16+
match = re.search(
17+
r"^## Workspace Page Inventory\s*(?P<section>.*?)(?=^## |\Z)",
18+
markdown,
19+
flags=re.MULTILINE | re.DOTALL,
20+
)
21+
if not match:
22+
raise AssertionError("AGENTS.md is missing the Workspace Page Inventory section.")
23+
return match.group("section")
24+
25+
26+
class WorkspaceInventoryTest(unittest.TestCase):
27+
def test_workspace_registry_routes_are_documented(self) -> None:
28+
registry = REGISTRY_PATH.read_text(encoding="utf-8")
29+
agents = AGENTS_PATH.read_text(encoding="utf-8")
30+
31+
registry_hrefs = sorted(set(re.findall(r'href:\s*"([^"]+)"', registry)))
32+
inventory = workspace_inventory_section(agents)
33+
34+
missing = [href for href in registry_hrefs if f"| `{href}` |" not in inventory]
35+
self.assertEqual(
36+
[],
37+
missing,
38+
"Every workspace navigation route in WORKSPACE_NAV_REGISTRY must be listed "
39+
"in AGENTS.md Workspace Page Inventory.",
40+
)
41+
42+
43+
if __name__ == "__main__":
44+
unittest.main()

0 commit comments

Comments
 (0)