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
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,28 @@ 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
+
* Route params, query params, manual user input, and JWT-derived identifiers are unresolved unless the current task establishes a stronger guarantee.
43
+
44
+
* Backend-issued values from HTTP API responses are canonical.
45
+
46
+
* Prefer explicit unresolved names with an `Input` suffix.
47
+
48
+
* In models and resolved state, names like `owner`, `name`, and `username` should refer to canonical values.
49
+
50
+
* Keep normal strict and case-sensitive equality (`===` / `!==`) for consuming identifiers. Do not spread ad hoc case-normalization logic across comparison sites.
51
+
52
+
* Resolve unresolved identifiers at clear boundaries before consuming them. Typical resolution boundaries include project loading, user loading, and other backend-backed fetches.
53
+
54
+
* 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.
55
+
56
+
* Downstream logic should consume canonical values for behavior-sensitive checks such as ownership checks, permission checks, project reuse checks, and local-cache decisions.
57
+
58
+
* Cache keys and similar identity-scoping data may intentionally use unresolved identifiers when that preserves stable session scoping.
0 commit comments