codeninja 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/.gitattributes +11 -0
  2. package/README.md +293 -0
  3. package/agent/database-agent.md +504 -0
  4. package/agent/designs/README.md +10 -0
  5. package/agent/global-agent.md +236 -0
  6. package/agent/nodejs-agent.md +406 -0
  7. package/agent/reactjs-agent.md +260 -0
  8. package/cli.js +352 -0
  9. package/commands/audit.workflow.md +111 -0
  10. package/commands/create-api.workflow.md +99 -0
  11. package/commands/db-add-index.workflow.md +97 -0
  12. package/commands/db-create-table.workflow.md +132 -0
  13. package/commands/db-drop-table.workflow.md +103 -0
  14. package/commands/db-modify-table.workflow.md +159 -0
  15. package/commands/db-seed.workflow.md +99 -0
  16. package/commands/db-sync.workflow.md +100 -0
  17. package/commands/design.workflow.md +66 -0
  18. package/commands/initialize-project.workflow.md +500 -0
  19. package/commands/integrate-api.workflow.md +448 -0
  20. package/commands/modularize.workflow.md +329 -0
  21. package/commands/refactor.workflow.md +70 -0
  22. package/commands/sync.workflow.md +962 -0
  23. package/commands/test.workflow.md +40 -0
  24. package/commands/validate-page.workflow.md +543 -0
  25. package/mcp-server.js +842 -0
  26. package/package.json +24 -0
  27. package/tasks/README.md +283 -0
  28. package/tasks/add-health-route.task.md +103 -0
  29. package/tasks/ask-api-integration-scope.task.md +34 -0
  30. package/tasks/ask-api-key.task.md +23 -0
  31. package/tasks/ask-api-version.task.md +28 -0
  32. package/tasks/ask-client-type.task.md +24 -0
  33. package/tasks/ask-column-enum-values.task.md +51 -0
  34. package/tasks/ask-column-is-enum.task.md +39 -0
  35. package/tasks/ask-column-name.task.md +39 -0
  36. package/tasks/ask-column-position.task.md +39 -0
  37. package/tasks/ask-column-type.task.md +59 -0
  38. package/tasks/ask-database-config.task.md +66 -0
  39. package/tasks/ask-database-host.task.md +16 -0
  40. package/tasks/ask-database-name.task.md +18 -0
  41. package/tasks/ask-database-port.task.md +23 -0
  42. package/tasks/ask-database-type.task.md +30 -0
  43. package/tasks/ask-database-user.task.md +14 -0
  44. package/tasks/ask-design-description.task.md +16 -0
  45. package/tasks/ask-design-target.task.md +24 -0
  46. package/tasks/ask-encrypted-transport.task.md +25 -0
  47. package/tasks/ask-encryption-iv.task.md +23 -0
  48. package/tasks/ask-encryption-key.task.md +23 -0
  49. package/tasks/ask-feature-name.task.md +20 -0
  50. package/tasks/ask-http-method.task.md +21 -0
  51. package/tasks/ask-index-columns.task.md +46 -0
  52. package/tasks/ask-index-file-placement.task.md +33 -0
  53. package/tasks/ask-index-sort-order.task.md +37 -0
  54. package/tasks/ask-index-type.task.md +42 -0
  55. package/tasks/ask-init-mode.task.md +28 -0
  56. package/tasks/ask-linked-service.task.md +57 -0
  57. package/tasks/ask-modify-operation.task.md +36 -0
  58. package/tasks/ask-modularize-scope.task.md +31 -0
  59. package/tasks/ask-module-name.task.md +30 -0
  60. package/tasks/ask-new-column-name.task.md +21 -0
  61. package/tasks/ask-new-table-name.task.md +22 -0
  62. package/tasks/ask-old-column-name.task.md +22 -0
  63. package/tasks/ask-package-author.task.md +16 -0
  64. package/tasks/ask-package-name.task.md +23 -0
  65. package/tasks/ask-page-path.task.md +40 -0
  66. package/tasks/ask-primary-table.task.md +30 -0
  67. package/tasks/ask-project-figma.task.md +71 -0
  68. package/tasks/ask-project-info-doc.task.md +57 -0
  69. package/tasks/ask-project-scope-of-work.task.md +57 -0
  70. package/tasks/ask-project-type.task.md +24 -0
  71. package/tasks/ask-react-target-service.task.md +32 -0
  72. package/tasks/ask-redis-config.task.md +42 -0
  73. package/tasks/ask-redis-host.task.md +16 -0
  74. package/tasks/ask-redis-port.task.md +18 -0
  75. package/tasks/ask-refactor-type.task.md +26 -0
  76. package/tasks/ask-requires-auth.task.md +22 -0
  77. package/tasks/ask-response-mode.task.md +38 -0
  78. package/tasks/ask-route-description.task.md +20 -0
  79. package/tasks/ask-route-path.task.md +29 -0
  80. package/tasks/ask-seed-row-values.task.md +42 -0
  81. package/tasks/ask-seed-rows-count.task.md +22 -0
  82. package/tasks/ask-service-description.task.md +16 -0
  83. package/tasks/ask-service-name.task.md +27 -0
  84. package/tasks/ask-service-port.task.md +24 -0
  85. package/tasks/ask-supported-languages.task.md +40 -0
  86. package/tasks/ask-table-file-number.task.md +36 -0
  87. package/tasks/ask-table-indexes.task.md +47 -0
  88. package/tasks/ask-table-name.task.md +32 -0
  89. package/tasks/ask-table-needs-soft-delete.task.md +29 -0
  90. package/tasks/ask-table-needs-status.task.md +30 -0
  91. package/tasks/ask-table-purpose.task.md +28 -0
  92. package/tasks/ask-table-seed-data.task.md +44 -0
  93. package/tasks/ask-target-service.task.md +32 -0
  94. package/tasks/ask-test-type.task.md +20 -0
  95. package/tasks/ask-validation-library.task.md +38 -0
  96. package/tasks/detect-repository-state.task.md +92 -0
  97. package/tasks/generate-app.task.md +146 -0
  98. package/tasks/generate-common.task.md +330 -0
  99. package/tasks/generate-constants.task.md +123 -0
  100. package/tasks/generate-database.task.md +168 -0
  101. package/tasks/generate-docker-compose.task.md +298 -0
  102. package/tasks/generate-dockerfile.task.md +126 -0
  103. package/tasks/generate-dockerignore.task.md +123 -0
  104. package/tasks/generate-enc-dec-html.task.md +127 -0
  105. package/tasks/generate-enc-dec-php.task.md +145 -0
  106. package/tasks/generate-encryption.task.md +159 -0
  107. package/tasks/generate-fast-defaults.task.md +68 -0
  108. package/tasks/generate-gitignore.task.md +79 -0
  109. package/tasks/generate-headerValidator.task.md +377 -0
  110. package/tasks/generate-ide-configs.task.md +114 -0
  111. package/tasks/generate-ioRedis.task.md +120 -0
  112. package/tasks/generate-language-en.task.md +155 -0
  113. package/tasks/generate-logging.task.md +257 -0
  114. package/tasks/generate-model.task.md +180 -0
  115. package/tasks/generate-notification.task.md +251 -0
  116. package/tasks/generate-package-json.task.md +114 -0
  117. package/tasks/generate-rateLimiter.task.md +125 -0
  118. package/tasks/generate-react-api-client.task.md +169 -0
  119. package/tasks/generate-react-api-handler.task.md +102 -0
  120. package/tasks/generate-react-app-jsx.task.md +56 -0
  121. package/tasks/generate-react-dockerfile.task.md +175 -0
  122. package/tasks/generate-react-env.task.md +58 -0
  123. package/tasks/generate-react-gitignore.task.md +49 -0
  124. package/tasks/generate-react-htaccess.task.md +54 -0
  125. package/tasks/generate-react-index-html.task.md +53 -0
  126. package/tasks/generate-react-index-jsx.task.md +51 -0
  127. package/tasks/generate-react-package-json.task.md +77 -0
  128. package/tasks/generate-react-welcome-page.task.md +71 -0
  129. package/tasks/generate-readme.task.md +160 -0
  130. package/tasks/generate-response.task.md +202 -0
  131. package/tasks/generate-route-manager.task.md +173 -0
  132. package/tasks/generate-route.task.md +203 -0
  133. package/tasks/generate-swagger.task.md +290 -0
  134. package/tasks/generate-tbl-user-deviceinfo.task.md +75 -0
  135. package/tasks/generate-template.task.md +129 -0
  136. package/tasks/generate-validator.task.md +122 -0
  137. package/tasks/show-db-table-summary.task.md +66 -0
  138. package/tasks/show-final-summary.task.md +108 -0
  139. package/tasks/show-init-summary.task.md +257 -0
  140. package/tasks/write-context.task.md +314 -0
@@ -0,0 +1,448 @@
1
+ ---
2
+ type: workflow
3
+ name: integrate-api
4
+ description: >
5
+ Wires a ReactJS page's forms and action buttons to backend API calls
6
+ through apiHandler.js and apiClient.js. Creates or updates submit
7
+ handler functions, adds loading states, and wires success/error
8
+ responses back to the UI. Never touches validation logic or component
9
+ layout — API integration only.
10
+ ---
11
+
12
+ # Workflow: @integrate-api
13
+
14
+ ## Goal
15
+ Connect the frontend page to the backend. After this workflow runs,
16
+ every form submit and action button on the target page calls the
17
+ correct API handler function, handles the loading state, and processes
18
+ the response correctly.
19
+
20
+ ## Rules
21
+ - Target one specific page per run
22
+ - NEVER modify layout, CSS, or validation logic
23
+ - ALWAYS use `apiHandler.js` for API calls — never call `axiosClient`
24
+ directly from a page component
25
+ - ALWAYS add handler functions to `apiHandler.js` if the needed function
26
+ does not already exist there — never inline API calls in the page
27
+ - NEVER hardcode API endpoints in page files
28
+ - ONE confirmation before any file is written
29
+ - After writing files → run task: `write-context`
30
+
31
+ ---
32
+
33
+ ## Step-by-Step Execution
34
+
35
+ ---
36
+
37
+ ### Phase 1 — Target Selection
38
+
39
+ 1. Run task: `ask-react-target-service`
40
+ Stores: `context.current_action.service_name`
41
+
42
+ 2. Run task: `ask-page-path`
43
+ Stores: `context.current_action.page_path`
44
+ Stores: `context.current_action.page_name`
45
+
46
+ 3. Run task: `ask-api-integration-scope`
47
+ Stores: `context.current_action.api_integration_scope`
48
+ If scope == "specific" → also stores `context.current_action.api_integration_target`
49
+
50
+ ---
51
+
52
+ ### Phase 2 — Read Service Context
53
+
54
+ Read from context:
55
+ - `context.current_action.service_name` → the ReactJS service
56
+ - `context.services[<service_name>].linked_service` → the backend NodeJS service name
57
+ - `context.api_routes` filtered by the linked NodeJS service → available API routes
58
+
59
+ Read from disk:
60
+ - Full content of `context.current_action.page_path` (the target page)
61
+ - Full content of `src/api/apiHandler.js` in the target service
62
+ - Full content of `src/api/apiClient.js` in the target service (read-only reference)
63
+
64
+ ---
65
+
66
+ ### Phase 3 — Scan the Page for Integration Points
67
+
68
+ Read the page file and identify every place that could trigger an API call:
69
+
70
+ #### 3a — Forms
71
+
72
+ For each `<form>` element found:
73
+ - Note the form's apparent purpose (login, register, search, update
74
+ profile, etc.) — infer from field names, labels, heading text nearby
75
+ - Check if an `onSubmit` handler is already connected:
76
+ - `<form onSubmit={...}>` → handler exists, note the function name
77
+ - No `onSubmit` → no handler yet
78
+ - Check if a submit button exists: `<button type="submit">` or
79
+ `<input type="submit">`
80
+ - Note whether the form already imports anything from `apiHandler.js`
81
+
82
+ #### 3b — Action Buttons
83
+
84
+ For each `<button>` or clickable element that is NOT a submit button:
85
+ - Check if an `onClick` handler is connected
86
+ - Infer the action from button text or aria-label:
87
+ - "Delete", "Remove" → delete action
88
+ - "Edit", "Update" → update action
89
+ - "Save" → save/create action
90
+ - "Logout", "Sign out" → logout action
91
+ - "Load more", "Next page" → pagination/fetch action
92
+ - "Export", "Download" → export action
93
+ - "Approve", "Reject" → status change action
94
+ - Note if the handler already contains an API call
95
+
96
+ #### 3c — Existing API Calls
97
+
98
+ Detect any API calls already in the file:
99
+ - Imports from `apiHandler.js`
100
+ - `axiosClient` direct calls (flag these — they should be moved to apiHandler)
101
+ - `fetch(` or `axios.` calls (flag — should be moved to apiHandler)
102
+
103
+ If scope == "specific":
104
+ Apply the same scan but focus only on the form or action matching
105
+ `context.current_action.api_integration_target`. Other forms/buttons
106
+ are noted but not modified.
107
+
108
+ ---
109
+
110
+ ### Phase 4 — Match Forms to API Routes
111
+
112
+ For each integration point found, determine which backend API route it
113
+ should call. Use this priority:
114
+
115
+ 1. **Exact match** — an `apiHandler.js` function already exists for
116
+ this purpose (e.g. `webLogin` for a login form). Use it as-is.
117
+
118
+ 2. **Route match** — a route exists in `context.api_routes` for the
119
+ linked backend service that matches the form's apparent purpose.
120
+ A new handler function will be added to `apiHandler.js` for it.
121
+
122
+ 3. **No match** — no suitable route exists yet in either place.
123
+ The integration plan will note this as a gap. The form's submit
124
+ handler will be scaffolded with a `// TODO: connect to API` comment
125
+ and a placeholder structure so the page is functional once the
126
+ route is added. Do NOT create a route in the backend — that is
127
+ `@create-api`'s job.
128
+
129
+ For each match or gap, record:
130
+ `{ form_purpose, handler_function_name, route_path, route_method,
131
+ match_type: "existing_handler" | "new_handler" | "no_route" }`
132
+
133
+ ---
134
+
135
+ ### Phase 5 — Design the Integration
136
+
137
+ For each integration point, design what needs to be generated:
138
+
139
+ #### 5a — State requirements
140
+
141
+ Every API call needs at minimum:
142
+ - `loading` state — boolean, `false` by default
143
+ - `error` state — string or null, for displaying API error messages
144
+ to the user
145
+ - Response data state — depends on the form type:
146
+ - Auth forms (login/register) → no response data state needed
147
+ (session is stored by apiHandler)
148
+ - List/search forms → `data` state (array, `[]` default)
149
+ - Single-item fetch → `item` state (object, `null` default)
150
+ - Delete/update → may use a list refresh or a redirect
151
+
152
+ Identify existing state in the page to avoid duplicates. Only add
153
+ state that does not already exist.
154
+
155
+ #### 5b — Submit handler pattern
156
+
157
+ **Auth / destructive action pattern (login, delete, logout):**
158
+ ```jsx
159
+ const handle[Action] = async (e) => {
160
+ e?.preventDefault();
161
+ setLoading(true);
162
+ setError(null);
163
+ const res = await [handlerFunction]({ ...formData });
164
+ setLoading(false);
165
+ if (res?.code === 1) {
166
+ // success — navigate or show confirmation
167
+ navigate('/dashboard'); // use react-router useNavigate
168
+ } else {
169
+ setError(res?.message || 'Something went wrong. Please try again.');
170
+ }
171
+ };
172
+ ```
173
+
174
+ **Data fetch / load pattern (get list, get details):**
175
+ ```jsx
176
+ const fetch[Resource] = async () => {
177
+ setLoading(true);
178
+ setError(null);
179
+ const res = await [handlerFunction]({ ...filters });
180
+ setLoading(false);
181
+ if (res?.code === 1) {
182
+ setData(res?.data ?? []);
183
+ } else {
184
+ setError(res?.message || 'Failed to load data. Please try again.');
185
+ }
186
+ };
187
+ ```
188
+ Also add a `useEffect(() => { fetch[Resource](); }, [])` call to
189
+ load data on component mount if appropriate.
190
+
191
+ **Create / Update pattern (form submit):**
192
+ ```jsx
193
+ const handle[Action] = async (e) => {
194
+ e?.preventDefault();
195
+ setLoading(true);
196
+ setError(null);
197
+ const res = await [handlerFunction](formData);
198
+ setLoading(false);
199
+ if (res?.code === 1) {
200
+ // success — show message or reset form
201
+ setSuccessMsg(res?.message || '[Action] successful.');
202
+ resetForm(); // only if a form reset function exists
203
+ } else {
204
+ setError(res?.message || 'Something went wrong. Please try again.');
205
+ }
206
+ };
207
+ ```
208
+
209
+ #### 5c — Loading state feedback
210
+
211
+ Add a `disabled={loading}` prop to the submit button or action trigger.
212
+ Also add visual feedback text inside the button:
213
+ ```jsx
214
+ <button type="submit" disabled={loading}>
215
+ {loading ? 'Please wait...' : '[Original Button Text]'}
216
+ </button>
217
+ ```
218
+
219
+ #### 5d — Error display
220
+
221
+ Add an error display block just above the submit button:
222
+ ```jsx
223
+ {error && <p className={styles.apiError}>{error}</p>}
224
+ ```
225
+
226
+ Add to the page's `.module.css`:
227
+ ```css
228
+ .apiError {
229
+ color: #dc3545;
230
+ font-size: 0.875rem;
231
+ margin-bottom: 0.75rem;
232
+ padding: 0.5rem 0.75rem;
233
+ background-color: #fff5f5;
234
+ border: 1px solid #f5c6cb;
235
+ border-radius: 4px;
236
+ }
237
+ ```
238
+
239
+ #### 5e — Success feedback (for non-navigating actions)
240
+
241
+ If the action does not navigate away after success, add a success
242
+ message state and display:
243
+ ```jsx
244
+ const [successMsg, setSuccessMsg] = React.useState('');
245
+ ```
246
+ ```jsx
247
+ {successMsg && <p className={styles.successMsg}>{successMsg}</p>}
248
+ ```
249
+ ```css
250
+ .successMsg {
251
+ color: #155724;
252
+ font-size: 0.875rem;
253
+ margin-bottom: 0.75rem;
254
+ padding: 0.5rem 0.75rem;
255
+ background-color: #d4edda;
256
+ border: 1px solid #c3e6cb;
257
+ border-radius: 4px;
258
+ }
259
+ ```
260
+
261
+ ---
262
+
263
+ ### Phase 6 — Build and Show Integration Plan
264
+
265
+ Display the integration plan before writing anything:
266
+
267
+ ```
268
+ ┌──────────────────────────────────────────────────────┐
269
+ │ API INTEGRATION PLAN │
270
+ ├──────────────────────────────────────────────────────┤
271
+ │ Page : [page_name] │
272
+ │ Service : [service_name] │
273
+ │ Backend : [linked_service] (port [port]) │
274
+ ├──────────────────────────────────────────────────────┤
275
+ │ INTEGRATIONS │
276
+ │ │
277
+ │ ① Login Form → webLogin() │
278
+ │ Route : POST /login │
279
+ │ Handler : webLogin (already in apiHandler.js) │
280
+ │ State add : loading, error │
281
+ │ Pattern : auth/destructive │
282
+ │ On success: navigate('/dashboard') │
283
+ │ │
284
+ │ ② Delete Button → deleteUser() │
285
+ │ Route : DELETE /users/:id │
286
+ │ Handler : deleteUser (NEW — will add to │
287
+ │ apiHandler.js) │
288
+ │ State add : deleteLoading, deleteError │
289
+ │ Pattern : destructive │
290
+ │ On success: refresh user list │
291
+ ├──────────────────────────────────────────────────────┤
292
+ │ GAPS (no matching route yet) │
293
+ │ ③ Export CSV Button — no backend route for this yet │
294
+ │ Will add a TODO placeholder │
295
+ ├──────────────────────────────────────────────────────┤
296
+ │ FILES TO MODIFY │
297
+ │ → src/pages/[PageName]/index.jsx │
298
+ │ → src/pages/[PageName]/[PageName].module.css │
299
+ │ → src/api/apiHandler.js (add deleteUser function) │
300
+ └──────────────────────────────────────────────────────┘
301
+ ```
302
+
303
+ Ask exactly this question:
304
+ "Apply this integration plan? (yes / no / adjust)"
305
+
306
+ - If yes → proceed to Phase 7
307
+ - If no → abort. Nothing is written.
308
+ - If adjust → ask what to change (different handler, different on-success
309
+ action, skip an integration point). Apply and re-display.
310
+
311
+ ---
312
+
313
+ ### Phase 7 — Apply Integration
314
+
315
+ #### 7a — Update apiHandler.js (if new functions needed)
316
+
317
+ For each integration with `match_type == "new_handler"`:
318
+ Surgically append to `src/api/apiHandler.js`:
319
+
320
+ ```jsx
321
+ /**
322
+ * [Route description from context.api_routes or inferred].
323
+ *
324
+ * @param {Object} data - Request payload.
325
+ * @returns {Promise<Object>} API response.
326
+ */
327
+ export async function [functionName](data) {
328
+ const res = await axiosClient.post('[route_path]', data);
329
+ return res;
330
+ }
331
+ ```
332
+
333
+ Use the correct HTTP method — `axiosClient.get`, `.post`, `.put`,
334
+ `.patch`, `.delete` — matching the route method.
335
+
336
+ For DELETE or GET with ID: use template string for the path:
337
+ ```jsx
338
+ const res = await axiosClient.delete(`/users/${data.id}`);
339
+ ```
340
+
341
+ For gaps (`match_type == "no_route"`):
342
+ ```jsx
343
+ /**
344
+ * TODO: Connect to backend route once created via @create-api.
345
+ *
346
+ * @param {Object} data - Request payload.
347
+ * @returns {Promise<Object>} API response.
348
+ */
349
+ export async function [functionName](data) {
350
+ // TODO: Replace with actual route when backend is ready.
351
+ // Suggested: POST /[suggested_path]
352
+ console.warn('[functionName] is not yet connected to a backend route.');
353
+ return { code: 0, message: 'API not connected yet.' };
354
+ }
355
+ ```
356
+
357
+ #### 7b — Update the page file
358
+
359
+ Read the current page file. Apply all changes surgically:
360
+
361
+ 1. **Add imports** for apiHandler functions (only the new ones):
362
+ ```jsx
363
+ import { webLogin, deleteUser } from '../../api/apiHandler';
364
+ ```
365
+ Also add `useNavigate` from react-router-dom if any handler navigates:
366
+ ```jsx
367
+ import { useNavigate } from 'react-router-dom';
368
+ ```
369
+
370
+ 2. **Add state declarations** inside the component function:
371
+ ```jsx
372
+ const [loading, setLoading] = React.useState(false);
373
+ const [error, setError] = React.useState(null);
374
+ ```
375
+ Add `const navigate = useNavigate();` if navigate is used.
376
+
377
+ 3. **Add or update handler functions** inside the component:
378
+ Insert each handler function just before the return statement.
379
+ If a handler already exists (from validation or prior code) →
380
+ add only the API call logic inside it, not a new function.
381
+
382
+ 4. **Wire the form's onSubmit / button's onClick**:
383
+ - If `<form onSubmit={existing}>` → rename existing handler and
384
+ call it inside the new handler (after the API call succeeds)
385
+ - If no onSubmit → add `onSubmit={handle[Action]}`
386
+ - If button has no onClick → add `onClick={handle[Action]}`
387
+
388
+ 5. **Add loading state to buttons**:
389
+ Locate each submit button / action button. Add `disabled={loading}`
390
+ and the conditional button text as designed in Phase 5c.
391
+
392
+ 6. **Add error and success display elements**:
393
+ Place the error `<p>` above the submit button.
394
+ Place the success `<p>` below the submit button (for non-nav actions).
395
+
396
+ 7. **Add useEffect for data fetching** if applicable (Phase 5b).
397
+
398
+ #### 7c — Update the page's CSS module
399
+
400
+ Add `.apiError` and `.successMsg` classes to the page's `.module.css`
401
+ if they are not already there. Do not overwrite existing definitions.
402
+
403
+ ---
404
+
405
+ ### Phase 8 — Write Context and Report
406
+
407
+ Run task: `write-context` with:
408
+ - Append to `context.services[<service_name>].integrated_pages`:
409
+ `{ page, integrations: [list of { form_purpose, handler, route }], timestamp: ISO now }`
410
+ - Set `last_command` = "integrate-api"
411
+ - Append to top-level `change_log`:
412
+ `{ timestamp, command: "integrate-api", action: "Wired [n] API calls in [page]", affected_files: [...] }`
413
+ - After write-context → call MCP tool `context_clear_scratchpad` with keys: ["current_action"]
414
+
415
+ Display completion report:
416
+
417
+ ```
418
+ @integrate-api Complete
419
+ ─────────────────────────────────────────
420
+ Page : [page_name]
421
+ Integrations : [n] connected, [n] placeholders
422
+ ─────────────────────────────────────────
423
+ ✓ src/pages/[PageName]/index.jsx — updated
424
+ ✓ src/pages/[PageName]/[PageName].module.css — error/success styles added
425
+ [✓ src/api/apiHandler.js — [n] new function(s) added]
426
+ ─────────────────────────────────────────
427
+ [If gaps exist:]
428
+ ⚠ [n] action(s) have no backend route yet.
429
+ Placeholders added — run @create-api to scaffold the backend routes,
430
+ then re-run @integrate-api to connect them.
431
+ ─────────────────────────────────────────
432
+ ```
433
+
434
+ Run task: `show-final-summary`
435
+
436
+ ---
437
+
438
+ ## What This Workflow Does NOT Do
439
+
440
+ - Does not add or modify form validation — that is `@validate-page`'s job
441
+ - Does not create new pages or components
442
+ - Does not modify App.jsx routing
443
+ - Does not touch backend files (NodeJS service)
444
+ - Does not add authentication/session management beyond what apiHandler
445
+ already provides
446
+ - Does not add global state (Redux, Context API)
447
+ - Does not handle file uploads (beyond wiring the existing input to
448
+ an API call with FormData if the input type is "file")