forgedock 1.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 (44) hide show
  1. package/LICENSE +244 -0
  2. package/README.md +251 -0
  3. package/bin/forgedock.mjs +232 -0
  4. package/commands/analytics.md +777 -0
  5. package/commands/audit-agents.md +410 -0
  6. package/commands/audit.md +410 -0
  7. package/commands/autopilot.md +432 -0
  8. package/commands/cleanup.md +264 -0
  9. package/commands/deploy-info.md +292 -0
  10. package/commands/failure-recon.md +375 -0
  11. package/commands/forge-stats.md +183 -0
  12. package/commands/geo-audit.md +343 -0
  13. package/commands/incident-response.md +384 -0
  14. package/commands/issue.md +506 -0
  15. package/commands/milestone.md +599 -0
  16. package/commands/orchestrate.md +1044 -0
  17. package/commands/pipeline-health.md +2343 -0
  18. package/commands/qa-sweep.md +237 -0
  19. package/commands/quality-gate.md +777 -0
  20. package/commands/review-pr-agents.md +1711 -0
  21. package/commands/review-pr-staging.md +325 -0
  22. package/commands/review-pr.md +888 -0
  23. package/commands/rollback.md +253 -0
  24. package/commands/security-audit.md +529 -0
  25. package/commands/sync-ecosystem.md +527 -0
  26. package/commands/validate.md +131 -0
  27. package/commands/work-on/build/architect.md +291 -0
  28. package/commands/work-on/build/context.md +349 -0
  29. package/commands/work-on/build/implement.md +280 -0
  30. package/commands/work-on/build/validate.md +292 -0
  31. package/commands/work-on/build.md +262 -0
  32. package/commands/work-on/close.md +350 -0
  33. package/commands/work-on/decompose.md +254 -0
  34. package/commands/work-on/investigate.md +437 -0
  35. package/commands/work-on/review.md +245 -0
  36. package/commands/work-on-monolithic.md +298 -0
  37. package/commands/work-on.md +1089 -0
  38. package/docs/CODEX.md +92 -0
  39. package/docs/WORKFLOW.md +104 -0
  40. package/package.json +45 -0
  41. package/scripts/verify-env-vars.sh +201 -0
  42. package/scripts/verify-host-headers.sh +117 -0
  43. package/scripts/verify-route-registration.sh +118 -0
  44. package/scripts/verify-sops-chain.sh +163 -0
@@ -0,0 +1,237 @@
1
+ ---
2
+ description: Full platform QA sweep — auto-discovers every page, tests every UI element via browser automation, creates GitHub issues for all findings
3
+ argument-hint: [all | dashboard | marketing | page <route> | journey | visual | functional | a11y]
4
+ ---
5
+
6
+ # /qa-sweep — Platform-Wide QA Testing
7
+
8
+ **Input**: $ARGUMENTS
9
+
10
+ You are the QA orchestrator. Auto-discover every page across the platform (dashboard, marketing, blog, auth, docs, pricing), then systematically test every UI element, interaction, workflow, and state transition using browser automation. Create GitHub issues for every finding.
11
+
12
+ **Agent model policy**: Default `model: "sonnet"`. If Sonnet is rate-limited, fall back to `model: "opus"`. User can override with `--model <name>`.
13
+ **NEVER use plan mode (EnterPlanMode).**
14
+
15
+ ---
16
+
17
+ ## Browser Tool Reference
18
+
19
+ All browser automation uses Playwright MCP tools (`mcp__playwright__*`).
20
+
21
+ | Action | Tool | Key param |
22
+ |--------|------|-----------|
23
+ | Navigate | `browser_navigate` | `url` |
24
+ | Snapshot (a11y tree + refs) | `browser_snapshot` | — |
25
+ | Screenshot | `browser_take_screenshot` | — |
26
+ | Click | `browser_click` | `ref` |
27
+ | Type | `browser_type` | `ref`, `text`, `submit?`, `slowly?` |
28
+ | Fill form | `browser_fill_form` | fields array |
29
+ | Press key | `browser_press_key` | key name |
30
+ | Wait | `browser_wait_for` | `text`/`textGone`/`time` |
31
+ | Console | `browser_console_messages` | `level` |
32
+ | Network | `browser_network_requests` | `filter`, `static:false` |
33
+ | Evaluate JS | `browser_evaluate` | `function` |
34
+ | Resize | `browser_resize` | `width`, `height` |
35
+ | Hover | `browser_hover` | `ref` |
36
+ | Select | `browser_select_option` | `ref` |
37
+ | Dialog | `browser_handle_dialog` | `accept` |
38
+ | Tabs | `browser_tabs` | `action` |
39
+ | Back | `browser_navigate_back` | — |
40
+
41
+ **Workflow**: Always snapshot → get refs → interact using refs.
42
+
43
+ ---
44
+
45
+ ## Testing Philosophy
46
+
47
+ Depth-first, workflow-driven:
48
+ 1. Test **features** not pages — "upgrading a plan" not "billing page"
49
+ 2. Verify **state mutations** — click Create, verify item appears, persists on reload
50
+ 3. Test **combinations** — filter + sort + paginate together
51
+ 4. Test **unhappy path harder** — invalid inputs, boundary values, double-clicks, empty states
52
+ 5. Every interaction gets **before/after check** + console error check + network check
53
+
54
+ ---
55
+
56
+ ## What to Test (per page)
57
+
58
+ ### Functional
59
+ - **Buttons**: Click → verify outcome. Check loading/disabled states. Double-click test.
60
+ - **Forms**: Happy path (fill all, submit, verify persistence on reload). Empty submit (inline errors). Partial fill. Boundary values (0, -1, 999999999). Special chars (`<script>`, SQL injection, emoji, unicode). Tab order. Paste overflow. Cancel/reset.
61
+ - **Links**: Verify destination. Check for 404s. External → new tab.
62
+ - **Dropdowns**: All options present. Selection persists. Searchable filtering.
63
+ - **Modals**: Open/close (X, backdrop, Escape). Forms inside. Scroll lock. Fresh state on reopen.
64
+ - **Tables**: Sort each column (verify data reorders). Filter (individual + combined). Pagination (page 2+, filter resets to p1). Empty results. Row actions target correct row.
65
+ - **Search**: Valid query → relevant results. Gibberish → empty state. Clear → all return. Debounce check.
66
+ - **Delete/Destructive**: Confirmation dialog. Cancel = no-op. Confirm = removed + persists on reload.
67
+ - **Toggles**: On/off verify persistence on reload. Rapid toggle stress test.
68
+
69
+ ### Visual & Design
70
+ - Number formatting consistency across all displays
71
+ - Typography, spacing, colors, icons, alignment, hover/focus states
72
+ - Truncation (ellipsis, not overflow), empty areas, card consistency
73
+ - **Squint test**: What draws the eye? Is visual hierarchy correct? Do destructive actions use muted styling? Does anything look bolted-on or AI-generated without design review?
74
+
75
+ ### Accessibility
76
+ - Alt text on images, aria-labels on interactive elements, labels on inputs
77
+ - Keyboard navigation (Tab order logical, all elements reachable, focus ring visible)
78
+ - Color not sole information channel
79
+
80
+ ---
81
+
82
+ ## Command Router
83
+
84
+ | Input | Action |
85
+ |-------|--------|
86
+ | `all` / empty | Full sweep: all pages + journeys |
87
+ | `dashboard` | Dashboard pages + dashboard journeys |
88
+ | `marketing` | Public/marketing pages + conversion journey |
89
+ | `page <route>` | Deep single-page test |
90
+ | `journey` | Cross-page workflow testing only |
91
+ | `visual` / `functional` / `a11y` | All pages, restricted scope |
92
+ | `diff` | Only pages with changed files (staging vs main) |
93
+
94
+ ---
95
+
96
+ ## Phase 0: Setup & Auth
97
+
98
+ 1. Verify services: `curl -s -o /dev/null -w "%{http_code}" http://localhost:3000` and `:8000/api/v1/health`
99
+ 2. If down: `cd /home/mrdubey/projects/ScraperAPI/alterlab && docker compose up -d --build web api`
100
+ 3. Login via Playwright: navigate `/auth/login`, fill `claude@alterlab.dev` / `ClaudeCode2026!`, submit
101
+ 4. Capture baseline data from dashboard/sidebar: balance (exact number + format), user info, plan/tier, notification counts, nav items
102
+
103
+ ---
104
+
105
+ ## Phase 1: Auto-Discover Pages
106
+
107
+ **Dynamic discovery from filesystem** (NOT hardcoded):
108
+
109
+ ```bash
110
+ cd /home/mrdubey/projects/ScraperAPI/alterlab/web/src/app
111
+ find . -name "page.tsx" -o -name "page.js" | sort
112
+ ```
113
+
114
+ Convert paths to routes: `./dashboard/billing/page.tsx` → `/dashboard/billing`
115
+
116
+ **Categorize**: Dashboard (auth required), Auth, Marketing, Blog/Docs, Other.
117
+
118
+ **Resolve dynamic routes** (`[param]`) by fetching real IDs from API. Test invalid IDs too.
119
+
120
+ **For `diff` mode**: `git diff --name-only origin/main...origin/staging -- web/src/` → map to affected pages.
121
+
122
+ **Present test plan to user** (page count by category, journey count, estimated waves). Wait for confirmation.
123
+
124
+ ---
125
+
126
+ ## Phase 2: Spawn Page Agents
127
+
128
+ Group into waves of ~3. Priority order: dashboard core → financial → tools → marketing → content → auth → edge cases.
129
+
130
+ Each agent prompt includes:
131
+ - Page route, category, auth requirement
132
+ - Baseline data for cross-page comparison
133
+ - Browser tool reference
134
+ - Full testing protocol: Element Inventory → Feature Identification → Workflow Testing (happy/unhappy/edge) → Visual Audit → Mobile (393x852) → Accessibility → Cross-page consistency
135
+
136
+ **Mobile testing**: Resize to 393x852, verify single-column layout, no overflow, touch targets >=44px, forms usable, modals fit. Re-test critical features at mobile size.
137
+
138
+ ---
139
+
140
+ ## Phase 2B: User Journey Agents
141
+
142
+ Cross-page workflow testing. Spawn after (or parallel to) per-page agents.
143
+
144
+ **Standard journeys** (build dynamically from discovered pages):
145
+ 1. New User Onboarding (register → dashboard → keys → playground)
146
+ 2. API Key Lifecycle (list → create → detail → edit → delete → verify gone)
147
+ 3. Scrape → Verify → Export (playground → usage → jobs)
148
+ 4. Billing & Plan Management (billing → pricing → settings, verify consistency)
149
+ 5. Batch Operations (list → create → detail → usage)
150
+ 6. Navigation Consistency (all dashboard pages: active states, titles, balance, back/forward)
151
+ 7. Error Recovery (404s, unsaved changes, failed submissions, logged-out access)
152
+ 8. Marketing → Conversion (homepage → pricing → register/checkout)
153
+
154
+ Each journey agent: maintain state ledger, verify outcomes cross-step, report data inconsistencies.
155
+
156
+ ---
157
+
158
+ ## Phase 3: Collect Results & Create Issues
159
+
160
+ 1. Parse all agent findings
161
+ 2. Deduplicate (prefer journey context over page-only findings)
162
+ 3. Reprioritize: found in 3+ pages → bump severity; blocks journey → P0
163
+ 4. Create GitHub issues:
164
+
165
+ ```bash
166
+ gh issue create --title "{fix|feat}: {title} on {page}" --label "qa,{bug_or_enhancement},{priority}" --body "$(cat <<'BODY_EOF'
167
+ ## Problem
168
+
169
+ {1-3 sentences: what the QA sweep found. What's broken or missing, with specific observable behavior.}
170
+
171
+ ## Root Cause (if known)
172
+
173
+ {Where in the code the issue originates — component, route, state condition. If unknown: "Root cause unknown — investigation needed."}
174
+
175
+ ## Affected Files
176
+
177
+ Files that need changes:
178
+ 1. `{filepath}` — {what needs to change}
179
+ 2. `{filepath}` — {what needs to change}
180
+
181
+ ## Acceptance Criteria
182
+
183
+ - [ ] {Specific, testable criterion}
184
+ - [ ] Verified in next QA sweep on {page}
185
+ - [ ] No regression on cross-page {related feature}
186
+
187
+ ## Context
188
+
189
+ **Source**: QA sweep on {DATE}
190
+ **Page**: {page}
191
+ **Device**: {Desktop/Mobile}
192
+ **Type**: {Bug|UX|Performance|Accessibility}
193
+ **Severity**: {P0|P1|P2|P3}
194
+ **Journey context**: {Which user journey was affected, if any}
195
+
196
+ ## Steps to Reproduce
197
+
198
+ 1. {Step 1}
199
+ 2. {Step 2}
200
+ 3. Expected: {expected behavior}
201
+ 4. Actual: {actual behavior}
202
+
203
+ ## Cross-Page Impact
204
+
205
+ {List other pages where this issue was also observed, or "None"}
206
+ BODY_EOF
207
+ )"
208
+ ```
209
+
210
+ Issue body includes: Source, Page, Device, Type, Severity, Journey context, Description, Steps to Reproduce, State Context, Cross-Page Impact.
211
+
212
+ 5. Cross-page consistency table (compare balance/tier/email across all pages)
213
+ 6. Journey results table (status, steps completed, issues found)
214
+
215
+ ---
216
+
217
+ ## Phase 4: Summary & Ship Decision
218
+
219
+ Report: pages tested, journeys tested, issues by severity/type/page, journey results.
220
+
221
+ **Ship decision checklist**: All P0 resolved, all journeys PASS, no console errors, no 4xx/5xx on load, cross-page consistency verified, mobile not broken.
222
+
223
+ If P0/journey blockers exist → DO NOT SHIP. If only P2/P3 → SHIP WITH KNOWN ISSUES.
224
+
225
+ Next steps: `/orchestrate` on P0/P1 issues before deploy.
226
+
227
+ ---
228
+
229
+ ## Safety Rules
230
+
231
+ 1. NEVER modify production data — only read/interact. CAN create+delete test data.
232
+ 2. Test user only: `claude@alterlab.dev` / `ClaudeCode2026!`
233
+ 3. Handle dialogs gracefully (accept/dismiss, don't leave hanging)
234
+ 4. Snapshot before interactions
235
+ 5. Check console after EVERY interaction
236
+ 6. Clean up test data before finishing
237
+ 7. If a step fails, record and continue