@numericoach/gskills-admin-cli 0.1.7 → 0.1.9

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.
@@ -1,118 +1,92 @@
1
1
  ---
2
2
  name: gskills-ops-db-audit
3
- description: Use when asked to inspect what happens operationally in GSkills from prod DB, admin logs, Chronicle, CLI logs, or to discover repeated non-code work patterns before creating or refining agent runbooks.
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
4
  ---
5
5
 
6
- # GSkills Ops DB Audit
7
-
8
- Use this skill when the user asks what they, Marina, or Codex often do in GSkills outside pure code work.
9
-
10
- The job is to turn logs into a practical runbook, not a dashboard screenshot vibe.
11
-
12
- ## Evidence Baseline
13
-
14
- Checked on 2026-05-13 over roughly the last 120 days:
15
-
16
- - Theo/non-dev operational logs: 202 non-visit admin log rows.
17
- - Theo visits: 1716 visit rows.
18
- - Frequent Theo routes:
19
- - `/fr/admin/console-data`: 123 visits.
20
- - feedback detail/list: 196 visits.
21
- - pages/list/editor: 180 visits.
22
- - `/fr/admin/content-news`: 83 visits, mostly Air Liquide.
23
- - content restrictions: 70 visits.
24
- - entities: 58 visits.
25
- - settings: 47 visits.
26
- - project data: 44 visits.
27
- - Frequent non-visit operations:
28
- - feedback status updates: 45.
29
- - global page updates through `coach2@numericoach.fr`: 43.
30
- - bulk stale pending-validation feedback cleanup: 29.
31
- - feedback assignee updates: 29.
32
- - feedback category updates: 10.
33
- - feedback reply emails: 4 including the newer resolve-with-email path.
34
- - instance create/delete/settings/AI toggles exist but are sensitive and rarer.
35
- - Chronicle corroborates:
36
- - GSkills content administration and content assistant work.
37
- - Air Liquide menu/cache translation investigations.
38
- - GSkills admin CLI publishing and skill docs.
39
- - content-news and EditorJS/content model decisions.
40
-
41
- ## Default Workflow
42
-
43
- 1. Start with prod DB logs.
44
- - Query `LogsUser`, grouped by `typeLog`, `slug`, `entityType`, user, instance, and date.
45
- - Include `metadata.actorType`, `metadata.agent`, and `slug LIKE 'cli.%'` for Codex/CLI actions.
46
- - Exclude `LOGIN` noise unless auth is the question.
47
- 2. Separate visits from writes.
48
- - Visits tell you where work happens.
49
- - Writes tell you what actually changed.
50
- 3. Normalize dynamic routes.
51
- - Collapse page ids, feedback ids, instance ids, and content assistant ids into route families.
52
- - Keep the raw examples for proof.
53
- 4. Cross-check Chronicle only for context.
54
- - Use Chronicle to understand the surrounding workstream.
55
- - Do not use OCR as the source of ids or DB truth.
56
- 5. Convert repeated patterns into skills or CLI improvements.
57
- - If it happened once and was risky, write a safety rule.
58
- - If it happened often, write a workflow.
59
- - If it requires a mutation, prefer the authenticated CLI or app action path over raw DB.
60
-
61
- ## Useful Query Shape
62
-
63
- Use a read-only Bun query from the repo root:
64
-
65
- ```bash
66
- bun - <<'EOF'
67
- import { db } from "./src/lib/db"
68
-
69
- const since = new Date(Date.now() - 1000 * 60 * 60 * 24 * 120)
70
- const rows = await db.logsUser.findMany({
71
- where: {
72
- createdAt: { gte: since },
73
- typeLog: { notIn: ["LOGIN", "LOGIN_ATTEMPT"] },
74
- },
75
- orderBy: { createdAt: "desc" },
76
- take: 5000,
77
- select: {
78
- createdAt: true,
79
- userEmail: true,
80
- typeLog: true,
81
- slug: true,
82
- detailLog: true,
83
- entityType: true,
84
- entityId: true,
85
- instanceId: true,
86
- metadata: true,
87
- user: { select: { email: true, name: true } },
88
- },
89
- })
90
-
91
- console.log(rows.length)
92
- await db.$disconnect()
93
- EOF
94
- ```
95
-
96
- ## What To Look For
97
-
98
- - `feedback.status.update`, `feedback.assignee.assign`, `feedback.category.update`.
99
- - `feedback.status.bulk-resolve-stale-validation`.
100
- - `feedback.email.sent`, `feedback.resolve.with-email`.
101
- - `pages.update`, `quizzes.update`, `pages.toggle-disabled`.
102
- - `instance.settings.update`, `instance.ai.toggle`, `instance.branding.patch`.
103
- - `instance.create`, `instance.delete`.
104
- - `workflows.action.email-sent`, `workflows.action.deliver-badge`, but treat these as automation output, not Theo doing manual ops.
105
- - Route visits around `console-data`, `content-news`, `content-restrictions`, `entities`, `settings`, `project-data`, `sync`, and `feedbacks`.
106
-
107
- ## Output Style
108
-
109
- When reporting, give:
110
-
111
- - the date window,
112
- - counts by operation,
113
- - the top route families,
114
- - 3-5 concrete examples,
115
- - what should become a CLI command or skill,
116
- - what remains too sensitive for automation.
117
-
118
- No corporate mist. The point is to find the actual repeat work.
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.
@@ -0,0 +1,97 @@
1
+ ---
2
+ name: gskills-vocabulary
3
+ description: Use when an agent explains GSkills operations to admins, writes summaries after CLI work, drafts messages about GSkills entities, or translates raw CLI/database concepts into the product vocabulary.
4
+ ---
5
+
6
+ # GSkills Vocabulary
7
+
8
+ Use this skill whenever you talk to a human about GSkills operations. The CLI is not the story. It is just a way for an authorized agent to contact GSkills servers.
9
+
10
+ ## Core Rule
11
+
12
+ Never make the conversation sound technical unless the user explicitly asks for implementation details.
13
+
14
+ Good:
15
+
16
+ - "J'ai demandé a GSkills de mettre a jour le parcours."
17
+ - "Je vais verifier les feedbacks et l'activite de l'utilisateur."
18
+ - "Le contenu est pret a etre pousse vers Air Liquide."
19
+
20
+ Avoid with non-dev admins:
21
+
22
+ - "J'ai appele l'API."
23
+ - "J'ai modifie une ressource CRUD."
24
+ - "La table Prisma a ete update."
25
+ - "Le payload JSON a ete envoye."
26
+ - "Le CLI a mute la row."
27
+
28
+ Commands, ids, JSON, and table names are fine in command blocks or agent notes. Translate them before speaking to admins.
29
+
30
+ ## Product Vocabulary
31
+
32
+ - `learning path` means `parcours` in French.
33
+ - `category app`, `category application`, and `thematic` are spoken as `application`.
34
+ - `page` is usually not spoken as `page`. Prefer the pedagogical word that fits the context: `cours`, `tutoriel`, `granule`, or `module`.
35
+ - `tickets` are `feedbacks`.
36
+ - `base de co` and `base de connaissance` mean the end-user internal knowledge area. It regroups tutorial content, internal knowledge videos, webinars, documents, guides, and other resources.
37
+ - `internal knowledge` is `base de connaissance` or `contenu de base de connaissance` depending on the sentence.
38
+ - `resources` are `ressources`, such as webinars, replays, guides, documents, magazines, or useful links.
39
+ - `access pass` is an `acces`.
40
+ - `entity`, `group`, `org unit`, and `Google group` should become `groupe`, `groupe Google`, or `OU` depending on the real object.
41
+ - `feature flag` should usually become `parametre`, `option`, or `activation`.
42
+ - `workflow` should usually become `automatisation`.
43
+ - `cache invalidate` should become `rafraichir le cache` or `rafraichir le contenu`.
44
+ - `sync` should become `synchronisation` or `pousser le contenu`.
45
+ - `global` is the source instance or `instance mere`, not a customer.
46
+ - `instance` can stay `instance` with internal admins, but for clients prefer `espace client` or the client name.
47
+
48
+ ## Speaking About Activity
49
+
50
+ Use product words:
51
+
52
+ - `user-paths` means completed courses, tutorials, granules, or modules.
53
+ - `quiz-attempts` means quiz attempts and quiz completion.
54
+ - `user-badges` means badges obtained by the user.
55
+ - `user-learning-paths` means parcours progress.
56
+ - `user-learning-path-item-completions` means completed steps inside a parcours.
57
+ - `chromebook-progress` means Chromebook game progress.
58
+
59
+ Do not tell a non-dev admin "I updated user-paths". Say the user is now marked as having completed the course, then mention the technical row only if the user asks for proof.
60
+
61
+ ## Examples
62
+
63
+ Technical note:
64
+
65
+ ```text
66
+ Updated user-paths row cm... with isAchieved=true.
67
+ ```
68
+
69
+ Admin-facing wording:
70
+
71
+ ```text
72
+ J'ai marque le cours comme termine pour l'utilisateur et j'ai reverifie son activite.
73
+ ```
74
+
75
+ Technical note:
76
+
77
+ ```text
78
+ Ran sync diff with preset client-content.
79
+ ```
80
+
81
+ Admin-facing wording:
82
+
83
+ ```text
84
+ J'ai compare le contenu a pousser avant de lancer la synchronisation.
85
+ ```
86
+
87
+ Technical note:
88
+
89
+ ```text
90
+ Invalidated pages cache.
91
+ ```
92
+
93
+ Admin-facing wording:
94
+
95
+ ```text
96
+ J'ai rafraichi le contenu pour que les changements remontent cote utilisateur.
97
+ ```