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
Copy file name to clipboardExpand all lines: spx-gui/AGENTS.md
+24Lines changed: 24 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,30 @@ Keep import statements in order:
35
35
- Enum names and enum members
36
36
- Vue component names
37
37
38
+
### Identifier Resolution
39
+
40
+
When working with backend unique string identifiers such as `username`, project owner, and project name, distinguish unresolved identifiers from canonical identifiers.
41
+
42
+
* Treat values from route params, query params, and manual user input as unresolved identifiers.
43
+
44
+
* Treat values from JWT token fields such as `username` as unresolved identifiers unless the current task explicitly establishes a stronger guarantee.
45
+
46
+
* Treat backend-issued values from HTTP API responses as canonical identifiers.
47
+
48
+
* Prefer naming unresolved values explicitly, such as `ownerInput`, `projectNameInput`, or similar names that make the unresolved nature obvious.
49
+
50
+
* In models and resolved state, names like `owner`, `name`, and `username` should refer to canonical values.
51
+
52
+
* Keep normal strict and case-sensitive equality (`===` / `!==`) for consuming identifiers. Do not spread ad hoc case-normalization logic across comparison sites.
53
+
54
+
* Resolve unresolved identifiers at clear boundaries before consuming them. Typical resolution boundaries include project loading, user loading, and other backend-backed fetches.
55
+
56
+
* Avoid storing unresolved identifiers on long-lived models as if they were already canonical. Prefer passing unresolved identifiers as load or resolve parameters, then writing canonical values onto the model after resolution.
57
+
58
+
* Downstream logic should consume canonical values for behavior-sensitive checks. This includes ownership checks, permission checks, project reuse checks, local-cache decisions, and similar logic.
59
+
60
+
* Cache keys and similar identity-scoping data may intentionally use unresolved identifiers when that preserves stable session scoping.
0 commit comments