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
4. Create or update the file in `agent-os/standards/[folder]/`
121
+
5.**Then repeat Steps 3-4 for the next selected standard**
113
122
114
123
### Step 5: Update the Index
115
124
@@ -185,3 +194,68 @@ Use error codes: `AUTH_001`, `DB_001`, `VAL_001`
185
194
When an error occurs in our application, we have established a consistent pattern for how errors should be formatted and returned to the client. This helps maintain consistency across our API and makes it easier for frontend developers to handle errors appropriately...
186
195
[continues for 3 more paragraphs]
187
196
```
197
+
198
+
## Example: Full Loop for One Standard
199
+
200
+
Here's how to process a single standard through the complete workflow:
201
+
202
+
**1. Present findings (Step 2):**
203
+
```
204
+
I found these patterns in your API code:
205
+
1. **Response Envelope** — All responses use { success, data, error }
206
+
2. **Error Codes** — Custom codes like AUTH_001
207
+
208
+
Which would you like to document?
209
+
```
210
+
211
+
User: "Both"
212
+
213
+
**2. Ask why for first standard (Step 3):**
214
+
```
215
+
For the Response Envelope pattern:
216
+
- What problem does this solve? Why not return raw data?
217
+
- Are there any endpoints that don't use this pattern?
218
+
```
219
+
220
+
User: "We use it so the frontend always knows where to find the data. All endpoints use it, no exceptions."
221
+
222
+
**3. Draft first standard (Step 3 continued):**
223
+
```
224
+
Here's the draft for api/response-envelope.md:
225
+
226
+
---
227
+
# Response Envelope
228
+
229
+
All API responses use this structure:
230
+
\`\`\`json
231
+
{ "success": true, "data": { ... } }
232
+
{ "success": false, "error": { ... } }
233
+
\`\`\`
234
+
235
+
- Frontend always checks `success` first, then reads `data` or `error`
236
+
- No exceptions — every endpoint uses this format
237
+
---
238
+
239
+
Create this file?
240
+
```
241
+
242
+
User: "Yes"
243
+
244
+
**4. Create file, then move to next standard:**
245
+
246
+
[Create the file]
247
+
248
+
**5. Ask why for second standard (back to Step 3):**
249
+
```
250
+
For the Error Codes pattern:
251
+
- What's the naming convention for codes?
252
+
- Where should new error codes be documented?
253
+
```
254
+
255
+
User: "Format is AREA_NUMBER like AUTH_001. We keep a list in the wiki."
256
+
257
+
**6. Draft second standard, confirm, create file...**
258
+
259
+
[Continue until all selected standards are done]
260
+
261
+
**Key point:** Complete the full ask → draft → confirm → create cycle for each standard before starting the next one.
0 commit comments