Преглед изворни кода

remove DEBUG print statements and add Code vs Documentation policy

- Remove DEBUG discover print statements from device.go
- Add Code vs Documentation section to AGENTS.md requiring user
  direction when code and docs conflict
- Keep a single non-DEBUG status message (Discovering keyboards...)
Paul-Dieter Klumpp пре 2 недеља
родитељ
комит
1d285837f0
2 измењених фајлова са 7 додато и 5 уклоњено
  1. 6 0
      AGENTS.md
  2. 1 5
      internal/device/device.go

+ 6 - 0
AGENTS.md

@@ -100,6 +100,12 @@ prints JSON before returning non-zero.
 - Output should be machine-parseable (JSON when possible)
 - Cross-platform from day one
 
+## Code vs Documentation
+
+All documentation (README.md, comments, AGENTS.md) must stay in sync with the code.
+When code and documentation conflict, **ask the user** before deciding which one to change.
+Do not silently pick a winner — explicitly state the conflict and get direction.
+
 ## Go Development
 
 ### Tooling

+ 1 - 5
internal/device/device.go

@@ -87,10 +87,6 @@ func Discover(keyboards []Keyboard) ([]Device, error) {
 		}
 	}
 
-	fmt.Fprintf(os.Stderr, "DEBUG discover: found %d keyboard(s)\n", len(found))
-	for _, d := range found {
-		fmt.Fprintf(os.Stderr, "DEBUG discover:   %s path=%s VID=0x%04x PID=0x%04x\n", d.Name, d.Path, d.VendorID, d.ProductID)
-	}
-
+	fmt.Fprintf(os.Stderr, "Discovering keyboards...\n")
 	return found, nil
 }