@numericoach/gskills-admin-cli 0.1.6 → 0.1.8

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.
package/README.md CHANGED
@@ -57,10 +57,11 @@ Raw project and analytics data can be read through resources such as `project-da
57
57
 
58
58
  ## Agent skill
59
59
 
60
- Install the bundled skill so AI agents know the auth model, resource map, output modes, sync workflow, and content-authoring standards.
60
+ Install the bundled skills so AI agents know the auth model, resource map, output modes, sync workflow, content-authoring standards, and recurring DB-backed ops runbooks.
61
61
 
62
62
  ```bash
63
63
  gskills-admin skills install --target ~/.codex/skills
64
+ gskills-admin skills install --name gskills-feedback-db-ops --target ~/.codex/skills
64
65
  ```
65
66
 
66
67
  ## Output
@@ -690,7 +690,7 @@ var resourceHelpRows = () => resources.map((resource) => ({
690
690
  aliases: resource.aliases.join(", ")
691
691
  }));
692
692
  // ../../src/cli/commands.ts
693
- import { cp, mkdir as mkdir2, readFile as readFile2, stat } from "node:fs/promises";
693
+ import { cp, mkdir as mkdir2, readFile as readFile2, readdir, stat } from "node:fs/promises";
694
694
  import { dirname as dirname2, join as join2 } from "node:path";
695
695
  import { fileURLToPath } from "node:url";
696
696
  var runCommand = async (ctx) => {
@@ -1226,10 +1226,18 @@ var runSkillsCommand = async (action, ctx) => {
1226
1226
  return { path: await skillsSourceDir() };
1227
1227
  if (action === "install") {
1228
1228
  const target = getStringFlag(ctx, "target") ?? join2(process.cwd(), ".codex", "skills");
1229
- const destination = join2(target, "gskills-admin-cli");
1229
+ const root = await skillsSourceRootDir();
1230
+ const requestedName = getStringFlag(ctx, "name");
1231
+ const skillNames = requestedName ? [requestedName] : await bundledSkillNames(root);
1230
1232
  await mkdir2(target, { recursive: true });
1231
- await cp(await skillsSourceDir(), destination, { recursive: true, force: true });
1232
- return { installed: true, destination };
1233
+ const installed = [];
1234
+ for (const skillName of skillNames) {
1235
+ const source = await skillsSourceDir(skillName);
1236
+ const destination = join2(target, skillName);
1237
+ await cp(source, destination, { recursive: true, force: true });
1238
+ installed.push({ name: skillName, destination });
1239
+ }
1240
+ return { installed: true, target, skills: installed };
1233
1241
  }
1234
1242
  throw new CliError(`Unknown skills command "${action}"`, 2);
1235
1243
  };
@@ -1338,12 +1346,12 @@ var GLOBAL_DEFAULT_RESOURCES = new Set([
1338
1346
  "chromebook-exercises"
1339
1347
  ]);
1340
1348
  var defaultInstanceId = (resource) => GLOBAL_DEFAULT_RESOURCES.has(resource.name) ? "global" : undefined;
1341
- var skillsSourceDir = async () => {
1349
+ var skillsSourceRootDir = async () => {
1342
1350
  const currentDir = dirname2(fileURLToPath(import.meta.url));
1343
1351
  const candidates = [
1344
- join2(currentDir, "..", "skills", "gskills-admin-cli"),
1345
- join2(process.cwd(), "packages", "gskills-admin-cli", "skills", "gskills-admin-cli"),
1346
- join2(process.cwd(), ".codex", "skills", "gskills-admin-cli")
1352
+ join2(currentDir, "..", "skills"),
1353
+ join2(process.cwd(), "packages", "gskills-admin-cli", "skills"),
1354
+ join2(process.cwd(), ".codex", "skills")
1347
1355
  ];
1348
1356
  for (const candidate of candidates) {
1349
1357
  try {
@@ -1353,6 +1361,19 @@ var skillsSourceDir = async () => {
1353
1361
  continue;
1354
1362
  }
1355
1363
  }
1364
+ throw new CliError("Bundled GSkills Admin CLI skills were not found", 1);
1365
+ };
1366
+ var bundledSkillNames = async (root) => {
1367
+ const entries = await readdir(root, { withFileTypes: true });
1368
+ return entries.filter((entry) => entry.isDirectory()).map((entry) => entry.name).filter((name) => name.startsWith("gskills-")).sort();
1369
+ };
1370
+ var skillsSourceDir = async (skillName = "gskills-admin-cli") => {
1371
+ const root = await skillsSourceRootDir();
1372
+ const candidate = join2(root, skillName);
1373
+ try {
1374
+ if ((await stat(candidate)).isDirectory())
1375
+ return candidate;
1376
+ } catch {}
1356
1377
  throw new CliError("Bundled GSkills Admin CLI skill was not found", 1);
1357
1378
  };
1358
1379
  var hasFlag = (ctx, name) => ctx.flags[name] === true;
@@ -1463,10 +1484,11 @@ var skillsHelp = () => ({
1463
1484
  usage: [
1464
1485
  "gskills-admin skills install",
1465
1486
  "gskills-admin skills install --target ~/.codex/skills",
1487
+ "gskills-admin skills install --name gskills-feedback-db-ops",
1466
1488
  "gskills-admin skills path"
1467
1489
  ],
1468
1490
  defaultTarget: "./.codex/skills",
1469
- note: "Installs the bundled GSkills Admin CLI skill for AI agents."
1491
+ note: "Installs bundled GSkills skills for AI agents. Pass --name to install one skill only."
1470
1492
  });
1471
1493
  var syncHelp = () => ({
1472
1494
  usage: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@numericoach/gskills-admin-cli",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Admin-only CLI for GSkills super-admin operations.",
@@ -0,0 +1,148 @@
1
+ ---
2
+ name: gskills-access-entity-ops
3
+ description: Use when Codex is asked to maintain GSkills access/auth/session/entity data outside normal dev work: domain auth, Okta/Google relogin, session invalidation, access passes, entities, groups, org units, content restrictions, and user visibility simulation.
4
+ ---
5
+
6
+ # GSkills Access, Auth, Entity Ops
7
+
8
+ Use this for Codex-backed access and visibility maintenance.
9
+
10
+ This is not UI browsing. It is DB-backed auth/access work where a wrong mutation can lock people out or expose content.
11
+
12
+ ## What Codex Has Actually Been Used For
13
+
14
+ - Adding Air Liquide auth domains by updating `Instance.domainGranular` in prod.
15
+ - Building and using a data-level JWT session invalidation mechanism.
16
+ - Disconnecting all Air Liquide users so they re-auth through Okta without deleting accounts.
17
+ - Simulating affected users for content visibility bugs.
18
+ - Proving when a user sees hidden content in home/search but not navbar.
19
+ - Checking entity and restriction state when content visibility is wrong.
20
+
21
+ ## Auth Domain Updates
22
+
23
+ Use this when the user asks to add domains to an instance login system.
24
+
25
+ 1. Identify the instance.
26
+ 2. Read:
27
+ - `Instance.id`
28
+ - `Instance.URL`
29
+ - `Instance.InstanceAddStyle`
30
+ - `Instance.domainGranular`
31
+ - `RunningState`
32
+ 3. Confirm the runtime code path.
33
+ - `src/auth.ts`
34
+ - `src/lib/server/instance-auth.ts`
35
+ 4. Normalize and deduplicate domains.
36
+ 5. Write only `Instance.domainGranular` if that is the intended change.
37
+ 6. Verify:
38
+ - saved count,
39
+ - expected count,
40
+ - missing domains,
41
+ - extra domains.
42
+
43
+ Known Air Liquide facts from prior Codex operation:
44
+
45
+ - instance id `cmfwilgzb000404kzmfrkuifm`
46
+ - URL `air-liquide`
47
+ - `InstanceAddStyle = GRANULAR_DOMAIN`
48
+ - auth matching reads `Instance.domainGranular`
49
+
50
+ ## Session Invalidation
51
+
52
+ Use this when users need to reconnect through a new provider, especially Google to Okta.
53
+
54
+ Rules:
55
+
56
+ - Never delete accounts to disconnect users.
57
+ - This app uses JWT cookies, not DB `Session` rows.
58
+ - Invalidation is done through `User.sessionVersion`.
59
+ - Audit fields are `sessionInvalidatedAt` and `sessionInvalidationReason`.
60
+ - Provider state is `lastAuthProvider`.
61
+
62
+ Preferred operation:
63
+
64
+ 1. Query target users.
65
+ 2. Dry-run count.
66
+ 3. Use Prisma/TypeScript through `src/lib/db.ts`.
67
+ 4. Increment `sessionVersion`.
68
+ 5. Set invalidation audit fields.
69
+ 6. Re-count affected rows.
70
+
71
+ Known Air Liquide operation:
72
+
73
+ - 52 users were invalidated.
74
+ - Updated `User.sessionVersion`.
75
+ - No accounts, access passes, or provider rows were deleted.
76
+
77
+ Use the existing repo skill too:
78
+
79
+ ```text
80
+ $gskills-user-session-invalidation
81
+ ```
82
+
83
+ ## Visibility And Entity Simulation
84
+
85
+ Use this when the user says a person can or cannot see a page/resource/path.
86
+
87
+ 1. Query affected user.
88
+ 2. Query a working comparison user when available.
89
+ 3. Query:
90
+ - access pass,
91
+ - legacy groups,
92
+ - manual groups,
93
+ - Google groups,
94
+ - org units,
95
+ - page `visibleEntityIds`,
96
+ - category and learning-path restrictions,
97
+ - inactive/reverted category flags.
98
+ 4. Simulate each user-visible surface separately:
99
+ - home cards,
100
+ - search,
101
+ - menu/navbar,
102
+ - direct page route.
103
+ 5. If the fix is code, verify with the same prod-shaped simulation.
104
+ 6. If the fix is data, write the narrowest possible change and invalidate relevant cache.
105
+
106
+ Known failure mode:
107
+
108
+ - A user can see cards or search results for pages that later 404 because home/search filtering is looser than the page route guard.
109
+ - A clean navbar simulation does not prove home/search are clean.
110
+
111
+ ## Access Pass Work
112
+
113
+ Use this when the issue is login/access rather than content visibility.
114
+
115
+ Check:
116
+
117
+ - `User.instanceID`
118
+ - active `AccessPass`
119
+ - pass type and dates,
120
+ - workflow logs for access start/expiry,
121
+ - login logs.
122
+
123
+ Do not grant broad pass access to hide a content-restriction bug.
124
+
125
+ ## Entity And Org Unit Work
126
+
127
+ Use existing CLI/API paths where possible:
128
+
129
+ ```bash
130
+ gskills-admin entities list --instance <instanceId> --language fr --output json
131
+ gskills-admin entities access-summary --instance <instanceId> --output json
132
+ gskills-admin entities sync-google-groups --instance <instanceId> --output json
133
+ gskills-admin org-units-sync google --instance <instanceId> --dry-run --output json
134
+ ```
135
+
136
+ For writes, dry-run first and report the exact target entities.
137
+
138
+ ## Done Criteria
139
+
140
+ Return:
141
+
142
+ - instance id/name,
143
+ - exact user/entity ids,
144
+ - before state,
145
+ - mutation performed,
146
+ - after state,
147
+ - whether cache was invalidated,
148
+ - whether users need to log in again.
@@ -0,0 +1,154 @@
1
+ ---
2
+ name: gskills-content-sync-cache-ops
3
+ description: Use when Codex is asked to maintain GSkills content data outside normal dev work: sync drift diagnosis, page visibility bugs, cache invalidation, page metadata backfills, content assistant lookups, content-news checks, or admin ingest repair.
4
+ ---
5
+
6
+ # GSkills Content, Sync, Cache Ops
7
+
8
+ Use this for Codex-backed maintenance of GSkills content data.
9
+
10
+ This is not about UI visits. It is about proving and fixing content state with DB, sync logs, cache helpers, and production verification.
11
+
12
+ ## What Codex Has Actually Been Used For
13
+
14
+ - Investigating a Google Contacts page sync issue where source global content was published but client copies stayed disabled.
15
+ - Proving stale deploy cache after sync/direct data repair and invalidating the right page/menu/app scopes.
16
+ - Repairing incomplete admin ingest syncs for `global` with the production repair workflow.
17
+ - Backfilling `Pages.headerColor` from global pages to client copies across 49,338 mapped pages.
18
+ - Comparing broken and working synced instances when a quiz exists in editor content but does not render on deploy.
19
+ - Finding content-assistant artifacts from `Chat` and `ChatMessage` metadata.
20
+ - Using Gmail/docs/source material to understand webinar/resource ingestion before writing GSkills data.
21
+
22
+ ## Sync Drift Investigation
23
+
24
+ Use this when a synced page/resource/quiz/path looks different on clients.
25
+
26
+ 1. Identify source global row and target instance rows.
27
+ 2. Query target copies by source linkage, not slug only.
28
+ - For pages, prefer `crossInstanceID` when relevant.
29
+ 3. Compare:
30
+ - `disabled`
31
+ - `archived`
32
+ - title/slug/language
33
+ - `headerColor`
34
+ - category/app links
35
+ - embedded quiz ids
36
+ - relation tables
37
+ 4. Check sync logs and admin logs around the event.
38
+ 5. Inspect the sync engine only after prod data proves the drift.
39
+ 6. Separate code fix from prod data repair.
40
+
41
+ Known example:
42
+
43
+ - Google Contacts page source was `disabled=false`, target copies were still `disabled=true`.
44
+ - The sync rule preserved target disabled state through `resolveSyncedDisabled`.
45
+ - Admin logs showed manual `pages.toggle-disabled` after the sync.
46
+
47
+ ## Cache Invalidation After Data Repair
48
+
49
+ Use this when a direct DB fix or sync leaves old deploy data visible.
50
+
51
+ Rules:
52
+
53
+ - Identify the edited entity first.
54
+ - Invalidate scopes for the entity, not only the visible symptom.
55
+ - If a `Pages` field changed, invalidate page scopes and menu/app scopes when the page appears in menus or app lists.
56
+
57
+ Known page repair scopes:
58
+
59
+ - `pages`
60
+ - `pages-count`
61
+ - `pages-lite`
62
+ - `page-minimal`
63
+ - `pages-knowledge`
64
+ - `deploy-home-static`
65
+ - `applications`
66
+ - `menu-bundle`
67
+
68
+ Use version bumps from:
69
+
70
+ - `src/lib/deploy-cache.ts`
71
+ - `src/lib/sync-engine/cache-invalidation.ts`
72
+
73
+ Verify current cache keys disappear or versions increase for sample instances.
74
+
75
+ ## Page Metadata Backfill
76
+
77
+ Use this for scoped prod backfills like `Pages.headerColor`.
78
+
79
+ Pattern:
80
+
81
+ 1. Count mapped rows.
82
+ 2. Count mismatches before.
83
+ 3. Write only the intended column.
84
+ 4. Count mismatches after.
85
+ 5. Tell the user the exact write scope.
86
+
87
+ Known validated shape:
88
+
89
+ - `UPDATE "Pages" SET "headerColor" = global_page."headerColor"` only.
90
+ - Target rows where `crossInstanceID` points to global page.
91
+ - Before: 49,338 mapped pages, 25,611 mismatches.
92
+ - After: 0 mismatches.
93
+
94
+ ## Admin Ingest Repair
95
+
96
+ Use this when the UI says synchronisations incomplètes or admin console data has repair tasks.
97
+
98
+ Preferred path:
99
+
100
+ ```bash
101
+ bunx vercel env pull /tmp/gskills-prod.env --environment=production --yes
102
+ bun --conditions react-server -e 'import { getAdminIngestRepairState } from "./src/lib/admin-ingest/repair"; ...'
103
+ ```
104
+
105
+ Then run the existing repair workflow, not ad hoc writes:
106
+
107
+ - `getAdminIngestRepairState(instanceId)`
108
+ - `adminIngestRepairWorkflow(instanceId, { maxConcurrentDays: 1 })`
109
+
110
+ Verify the queue is empty:
111
+
112
+ - `canLaunch=false`
113
+ - `blockedReason="no_repairs_needed"`
114
+ - `affectedDayCount=0`
115
+ - `repairTargetCount=0`
116
+
117
+ ## Content Assistant Lookup
118
+
119
+ Use this when the user asks for “the artifact” or a content creation thread.
120
+
121
+ Query:
122
+
123
+ - `User`
124
+ - `Chat`
125
+ - `ChatMessage`
126
+ - `metadata.artifact`
127
+ - `CHAT_KINDS.CONTENT_ASSISTANT`
128
+
129
+ Return the exact prod route:
130
+
131
+ ```text
132
+ https://g-skills.fr/fr/super-admin/global/content-assistant/<chatId>
133
+ ```
134
+
135
+ Do not browse manually when the artifact text and metadata are in DB.
136
+
137
+ ## Broken Deploy Content After Sync
138
+
139
+ Use this when a thing exists in editor but not on the deploy page.
140
+
141
+ - Compare the broken instance against a synced working instance.
142
+ - Query embedded ids from EditorJS JSON.
143
+ - Query relation tables separately.
144
+ - Pull production logs when runtime behavior matters.
145
+ - Keep the root cause tentative until the loader/action that returns empty/null is proven.
146
+
147
+ Good proof:
148
+
149
+ - broken page id,
150
+ - working page id,
151
+ - embedded quiz/resource id,
152
+ - relation count,
153
+ - runtime logs,
154
+ - exact API call or loader result.
@@ -0,0 +1,126 @@
1
+ ---
2
+ name: gskills-feedback-db-ops
3
+ description: Use when Codex is asked to handle GSkills feedback as an operational DB-backed workflow: investigate from prod rows, import feedback from emails, triage with Slack/Marina context, repair user state, close tickets, assign Theo, or send reply emails.
4
+ ---
5
+
6
+ # GSkills Feedback DB Ops
7
+
8
+ Use this for recurring Codex feedback work, not generic UI ticket browsing.
9
+
10
+ The pattern is: source evidence -> prod DB row -> root cause or data repair -> optional code fix -> feedback state/email update.
11
+
12
+ ## What Codex Has Actually Been Used For
13
+
14
+ - Building the feedback resolving skill after mining past Codex sessions and prod schema.
15
+ - Checking recent GSkills tickets with `#g-skills-auto`, prioritizing Marina’s human comments over automatic AI comments.
16
+ - Importing forwarded Gmail issues into prod `Feedback`, `FeedbackAnalysis`, and `FeedbackAssignee`.
17
+ - Investigating a course completion bug from a feedback URL, proving `UserPath.isAchieved = false` despite passed quiz attempts, then applying the prod completion write.
18
+ - Closing feedback after prod deploy verification, assigning it to Theo, creating a `FeedbackReply`, and sending a customer email.
19
+ - Categorizing and resolving stale tickets when the root cause is known.
20
+
21
+ ## Default Workflow
22
+
23
+ 1. Read the source.
24
+ - Feedback URL or id.
25
+ - Slack `#g-skills-auto` thread, especially Marina replies.
26
+ - Gmail thread when the ticket comes from forwarded client mail.
27
+ - Screenshot and client metadata.
28
+ 2. Read prod DB.
29
+ - `Feedback`
30
+ - `FeedbackAnalysis`
31
+ - `CommentFeedback`
32
+ - `FeedbackAssignee`
33
+ - `FeedbackReply`
34
+ - affected `User`, `Instance`, `Pages`, quiz/progress/access rows when relevant.
35
+ 3. Prove the issue.
36
+ - For content/access bugs, simulate the affected runtime path.
37
+ - For quiz/progress bugs, compare attempts with `UserPath` and learning-path completion rows.
38
+ - For imported emails, split separate asks into separate feedbacks.
39
+ 4. Act.
40
+ - Use existing app/CLI action when available.
41
+ - If a direct DB write is requested and safe, write the minimal rows and verify.
42
+ - For customer replies, use file-based body text and preserve the customer/user language.
43
+ 5. Verify.
44
+ - Re-read feedback state.
45
+ - Confirm assignee, status, reply row, email id, and admin log where applicable.
46
+
47
+ ## Email-To-Feedback Import
48
+
49
+ Use this when the user says a client email should become GSkills feedback.
50
+
51
+ Rules:
52
+
53
+ - Search both Theo and developer mailboxes when the user mentions both.
54
+ - Resolve the real Gmail API thread id with `gws`, not the UI fragment.
55
+ - Read the full thread.
56
+ - One email can contain multiple tickets. Split them.
57
+ - If the issue already exists, add context to the existing feedback instead of duplicating.
58
+ - Insert enough context for the feedback detail screen to be useful.
59
+
60
+ Tables:
61
+
62
+ - `Feedback`
63
+ - `FeedbackAnalysis`
64
+ - `FeedbackAssignee`
65
+ - optional `CommentFeedback`
66
+
67
+ Verification:
68
+
69
+ - feedback ids,
70
+ - instance and user pairing,
71
+ - `status = ANALYZED` when imported as actionable,
72
+ - assignee is Theo when requested,
73
+ - original thread ids preserved in context.
74
+
75
+ ## Feedback Closure With Email
76
+
77
+ Use this when the user asks to treat a feedback after a prod fix.
78
+
79
+ 1. Confirm production deployment is live when the fix depends on deploy.
80
+ 2. Re-run the affected-user proof or live state check.
81
+ 3. Draft in the same language as the user/feedback.
82
+ 4. Send with the CLI:
83
+
84
+ ```bash
85
+ gskills-admin feedback send-reply <feedbackId> --subject "..." --body-file ./reply.txt --dry-run --output json
86
+ gskills-admin feedback send-reply <feedbackId> --subject "..." --body-file ./reply.txt --yes --output json
87
+ ```
88
+
89
+ 5. Verify:
90
+ - `Feedback.status`
91
+ - `FeedbackAssignee`
92
+ - `FeedbackReply`
93
+ - `repliedAt`
94
+ - email message id
95
+
96
+ ## Progress Or Course Completion Repair
97
+
98
+ Use this when a user passed a quiz but a page/course/path did not validate.
99
+
100
+ Proof chain:
101
+
102
+ - feedback row,
103
+ - user id,
104
+ - page id,
105
+ - quiz id,
106
+ - quiz attempts with `passed=true`,
107
+ - `UserPath.isAchieved`,
108
+ - learning-path item completion rows,
109
+ - relevant runtime function.
110
+
111
+ For embedded quiz completion, the known safe dry-run/write path is:
112
+
113
+ ```ts
114
+ maybeAchieveCourseFromEmbeddedQuizSuccess({ userId, quizId, pageId, commit: false })
115
+ maybeAchieveCourseFromEmbeddedQuizSuccess({ userId, quizId, pageId, commit: true })
116
+ ```
117
+
118
+ Only write after the dry-run proves eligibility.
119
+
120
+ ## Common Pitfalls
121
+
122
+ - Do not trust the automatic AI comment over Marina’s Slack reply.
123
+ - Do not import forwarded email as one ticket if it contains multiple asks.
124
+ - Do not close a feedback before prod deploy is live when the fix depends on deploy.
125
+ - Do not use inline body strings for real feedback reply emails.
126
+ - Do not say “fixed” until the prod row and customer-visible state are verified.
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: gskills-ops-db-audit
3
+ description: Use when mining Codex history and prod DB evidence to identify recurring non-dev GSkills operations, especially data repairs, cache/sync fixes, feedback handling, auth/access changes, and content knowledge retrieval.
4
+ ---
5
+
6
+ # GSkills Codex Ops Audit
7
+
8
+ Use this when the user asks what Codex is often used for on GSkills outside normal development work.
9
+
10
+ Do not count UI visits as work. The signal is Codex-led investigation or mutation:
11
+
12
+ - prod DB reads,
13
+ - prod DB writes,
14
+ - Vercel/prod env checks,
15
+ - Slack/Gmail/Chronicle context that leads to GSkills data work,
16
+ - cache invalidation,
17
+ - feedback import or closure,
18
+ - sync repair,
19
+ - access/auth/session data changes,
20
+ - content assistant or chat data lookup.
21
+
22
+ ## Current Pattern Map
23
+
24
+ This is based on Codex memory and rollout summaries checked on 2026-05-13.
25
+
26
+ Common Codex-backed GSkills ops:
27
+
28
+ - Feedback investigation and resolution from URL, Slack, Gmail, screenshots and prod DB.
29
+ - Feedback creation from forwarded client emails into prod `Feedback`, `FeedbackAnalysis`, and `FeedbackAssignee`.
30
+ - Feedback closure after production verification, including assignment, reply row, and Resend email.
31
+ - Course/progress data repair after proving quiz attempts or completion state.
32
+ - Sync/page visibility investigations where prod data and admin logs prove target copies drifted.
33
+ - Cache invalidation after sync or direct DB fixes, especially page/menu/app deploy caches.
34
+ - Admin ingest repair workflows for incomplete Google/Admin console data syncs.
35
+ - Bulk page metadata backfills, such as copying `Pages.headerColor` from global to client copies.
36
+ - Auth/access data changes, such as Air Liquide `domainGranular` updates and JWT session invalidation.
37
+ - Content assistant and AI chat lookup by artifact/message metadata to retrieve exact prod links.
38
+
39
+ ## Default Audit Workflow
40
+
41
+ 1. Search Codex memory and rollout summaries first.
42
+ - Use `MEMORY.md` to locate relevant summaries.
43
+ - Search `rollout_summaries` for concrete phrases like `prod DB`, `Feedback`, `cache`, `sync`, `backfill`, `domainGranular`, `sessionVersion`, `content-assistant`.
44
+ 2. Then inspect prod DB only for current truth.
45
+ - Do not infer old behavior from current logs if the task is historical.
46
+ - Admin logs usually do not tag old Codex work as Codex.
47
+ 3. Ignore pure code refactors unless the Codex run also included prod data proof or mutation.
48
+ 4. For each recurring workflow, capture:
49
+ - trigger phrase from the user,
50
+ - evidence source,
51
+ - tables touched or read,
52
+ - code path reused,
53
+ - mutation safety rule,
54
+ - verification output,
55
+ - whether an admin log/email/customer effect happened.
56
+
57
+ ## High-Signal Rollout Families
58
+
59
+ - `gskills_feedback_resolving_skill_created`
60
+ - Feedback work should start with prod DB, screenshots, route context and recurrence.
61
+ - `gskills_feedback_triage_slack_marina_comments`
62
+ - For tickets, check `#g-skills-auto` and Marina comments before trusting AI summaries.
63
+ - `gskills_feedback_positioning_quiz_completion_bug`
64
+ - Codex proved quiz attempts passed, repaired `UserPath` completion in prod, and committed the code fix.
65
+ - `fm_visibility_feedback_resolution_and_production_followup`
66
+ - Codex simulated the affected user, waited for prod, then resolved/assigned/replied in DB and email.
67
+ - `email_to_prod_feedback_import_and_var_correction`
68
+ - Codex imported forwarded Gmail tickets into prod feedback rows.
69
+ - `gskills_admin_ingest_repair_global_incomplete_syncs`
70
+ - Codex used prod env and the repair workflow to clear incomplete admin ingest syncs.
71
+ - `gskills_slack_contact_page_cache_investigation`
72
+ - Codex traced a page/sync issue to stale deploy cache and invalidated the right scopes.
73
+ - `gskills_page_header_color_backfill`
74
+ - Codex measured prod drift, backfilled one column only, and proved zero mismatches after.
75
+ - `air_liquide_auth_domaingranular_update`
76
+ - Codex did a targeted prod data update on `Instance.domainGranular`.
77
+ - `gskills_airliquide_session_invalidation_and_skill`
78
+ - Codex used Prisma/TypeScript to invalidate sessions without deleting users.
79
+ - `stefanie_chromebook_content_assistant_prod_link`
80
+ - Codex queried `Chat`/`ChatMessage` metadata to find the exact content assistant artifact link.
81
+
82
+ ## Output
83
+
84
+ When asked for a new skill or workflow, output:
85
+
86
+ - what Codex actually did before,
87
+ - the repeated trigger pattern,
88
+ - what DB tables or APIs matter,
89
+ - how to run it safely now,
90
+ - what proof is required before saying it is done.
91
+
92
+ No visit counts. No “looked at page X” unless that visit led to a concrete data operation.