From e092fea98f5bf7c76a4b087afaa8e27e42ebafb6 Mon Sep 17 00:00:00 2001 From: Mikhail Chusavitin Date: Tue, 18 Aug 2026 17:07:04 +0300 Subject: [PATCH] Add hyperlink-vs-button rule; register new contracts in router - controls-selection: forbid hyperlinks for opening modals/elements unless explicitly requested; buttons required instead. - AGENT-BOOTSTRAP: add router entries for hardware-ingest-json and submodule-integration contracts (lint was failing without them). --- AGENT-BOOTSTRAP.md | 4 ++++ rules/patterns/controls-selection/contract.md | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/AGENT-BOOTSTRAP.md b/AGENT-BOOTSTRAP.md index c1eb15e..765de66 100644 --- a/AGENT-BOOTSTRAP.md +++ b/AGENT-BOOTSTRAP.md @@ -41,6 +41,8 @@ Read additional contracts by task type: `go-api`, `go-background-tasks`, `go-logging` - DB queries, migrations, backups, startup DB safety: `go-database`, `backup-management` +- Hardware inventory ingest, Redfish/CMDB import payloads: + `hardware-ingest-json` - Local-first desktop migration/recovery: `local-first-recovery` - Tables, bulk actions, filters, pagination: @@ -65,6 +67,8 @@ Read additional contracts by task type: `secret-management` - Project architecture documentation rules: `go-project-bible` +- Git submodules, shared library/vendored dependency integration: + `submodule-integration` ## Default Rule diff --git a/rules/patterns/controls-selection/contract.md b/rules/patterns/controls-selection/contract.md index 4676e8e..aa4b9f9 100644 --- a/rules/patterns/controls-selection/contract.md +++ b/rules/patterns/controls-selection/contract.md @@ -1,6 +1,6 @@ # Contract: Controls + Selection -Version: 1.1 +Version: 1.2 ## Shared Base @@ -16,6 +16,9 @@ Version: 1.1 - Button text should describe the action outcome, not implementation detail. - Buttons are text-first; icons are optional and must not replace labels on primary/danger actions. - Base examples must show both `disabled` and `loading` states. +- Do not use a hyperlink (``/link-styled text) to open a modal, drawer, detail view, or any + other in-page element. Use a `button` (or button-styled control) instead, unless the user + explicitly asks for a hyperlink. Hyperlinks are reserved for navigation to another URL/page. ## Checkbox Selection