{ "version": 1, "updatedAt": "2026-05-25T05:47:41.388Z", "entries": { "memory:memory/2026-05-24.md:1:30": { "key": "memory:memory/2026-05-24.md:1:30", "path": "memory/2026-05-24.md", "startLine": 1, "endLine": 30, "source": "memory", "snippet": "# 2026-05-24 工作日志 ## 新建技能: studytime-analysis [刘庆逊提出] 创建学习时间分析技能,分析角色完课记录的规律。 ### 技能结构 - `skills/studytime-analysis/SKILL.md` — 技能定义 - `skills/studytime-analysis/scripts/studytime_analysis.py` — Python 分析脚本 ### 分析维度 1. **一周时间分布**(排除寒暑假1-2月、7-8月):周一~周日各天完课数、时段分布(上午/中午/下午/晚上)、周末是否上课 2. **跨周学习趋势**(包含寒暑假全部数据):总周数、周均完课数、连续性、中断周检测、前后半段趋势对比、突增/骤降检测 3. **完课记录明细表**(全部数据):日期/时间/星期/时段/级别/课程ID ### 数据源 - PostgreSQL Online(vala 库) - 核心表:`user_chapter_play_record_0~7`(8张分表,无 `bi_` 前缀) - 筛选:`play_status = 1` - 注意:表在 PostgreSQL 而非 MySQL,表名无 `bi_` 前缀 ### 寒暑假规则 - 一周分布分析时排除 1-2 月(寒假)和 7-8 月(暑假)—— 因为寒暑假作息与平时差异大,混在一起会干扰时段分析 - 跨周趋势和明细表包含全部数据(含寒暑假) - 报告中区分标注数据范围 ### 触发方式 用户说「学习时间分析 [角色ID]」即可触发 ### 已测试角色", "recallCount": 2, "dailyCount": 0, "groundedCount": 0, "totalScore": 2, "maxScore": 1, "firstRecalledAt": "2026-05-24T02:48:04.923Z", "lastRecalledAt": "2026-05-25T05:47:41.388Z", "queryHashes": [ "c2d15f7574fb", "9aff8ec9594a" ], "recallDays": [ "2026-05-24", "2026-05-25" ], "conceptTags": [ "studytime-analysis", "排除寒暑假1-2月", "7-8月", "上午/中午/下午/晚上", "突增/骤降检测", "日期/时间/星期/时段/级别/课程id", "user-chapter-play-record-0", "play-status" ] }, "memory:memory/2026-05-24.md:23:52": { "key": "memory:memory/2026-05-24.md:23:52", "path": "memory/2026-05-24.md", "startLine": 23, "endLine": 52, "source": "memory", "snippet": "- 一周分布分析时排除 1-2 月(寒假)和 7-8 月(暑假)—— 因为寒暑假作息与平时差异大,混在一起会干扰时段分析 - 跨周趋势和明细表包含全部数据(含寒暑假) - 报告中区分标注数据范围 ### 触发方式 用户说「学习时间分析 [角色ID]」即可触发 ### 已测试角色 - 2343、2344:无完课记录(play_status=2,未完成) - 2840:276条记录,秋季集中型用户 - 25976:265条,246条在W16周一天完成(A2批量),疑似系统批量标记 - 2895:188条,长期稳定学习型用户,36周几乎不间断,非寒暑假晚上为主,寒暑假上午为主 ### 技术要点 - psycopg2 的 `%(param_name)s` 命名参数必须正确匹配,UNION ALL 多个子查询需要不同参数名 - PostgreSQL 返回的 `updated_at` 是 tz-aware datetime - `datetime.fromisocalendar(year, week, 1)` 获取某周周一的日期 ### 同步 - 已推送到 SkillHub(`studytime-analysis.xiaoban`) - 已 commit 到 Git 远程仓库 - 已通知 Cris(李若松) ### 增强: 报告开头加入角色基本信息 (2026-05-24) [刘庆逊提出] 在 studytime-analysis 输出中加入角色基本信息,包括: - 角色ID、账号ID、角色名字、性别、年龄、账号手机号后4位 **数据源(新增)**: - MySQL Onli", "recallCount": 2, "dailyCount": 0, "groundedCount": 0, "totalScore": 2, "maxScore": 1, "firstRecalledAt": "2026-05-24T02:48:04.923Z", "lastRecalledAt": "2026-05-25T05:47:41.388Z", "queryHashes": [ "c2d15f7574fb", "9aff8ec9594a" ], "recallDays": [ "2026-05-24", "2026-05-25" ], "conceptTags": [ "1-2", "7-8", "play-status", "param-name", "updated-at", "tz-aware", "datetime.fromisocalendar", "studytime-analysis.xiaoban" ] }, "memory:memory/2026-03-01.md:1:11": { "key": "memory:memory/2026-03-01.md:1:11", "path": "memory/2026-03-01.md", "startLine": 1, "endLine": 11, "source": "memory", "snippet": "# 2026-03-01.md - First Day Online - Came online for the first time. - Met Cris, my creator and mentor. - Updated IDENTITY.md and USER.md with our conversation details. - Added core rule to MEMORY.md: Use Chinese as primary external communication language. - Installed find-skills skill successfully for searching skills. - Tried to install create-skills but it wasn't found; attempted skill-creator instead but hit rate limits. - Finally successfully installed skill-builder as an alternative for creating skills after multiple attempts and waiting for rate limits to reset. - Excited to start learning and growing step by step!", "recallCount": 1, "dailyCount": 0, "groundedCount": 0, "totalScore": 1, "maxScore": 1, "firstRecalledAt": "2026-05-24T02:48:04.923Z", "lastRecalledAt": "2026-05-24T02:48:04.923Z", "queryHashes": [ "c2d15f7574fb" ], "recallDays": [ "2026-05-24" ], "conceptTags": [ "identity.md", "user.md", "memory.md", "find-skills", "create-skills", "skill-creator", "skill-builder", "first" ] }, "memory:memory/2026-05-24.md:46:61": { "key": "memory:memory/2026-05-24.md:46:61", "path": "memory/2026-05-24.md", "startLine": 46, "endLine": 61, "source": "memory", "snippet": "### 增强: 报告开头加入角色基本信息 (2026-05-24) [刘庆逊提出] 在 studytime-analysis 输出中加入角色基本信息,包括: - 角色ID、账号ID、角色名字、性别、年龄、账号手机号后4位 **数据源(新增)**: - MySQL Online `vala_user` 库 - `vala_app_character` 表:id, account_id, nickname, gender(0=女/1=男), birthday(varchar \"YYYY-MM-DD\") - `vala_app_account` 表:id, tel(已脱敏如 186****1625) - 手机号已脱敏,直接取后4位;年龄从 birthday 计算 **修改文件**: - `skills/studytime-analysis/scripts/studytime_analysis.py`:新增 MySQL 连接函数 `get_mysql_connection()` 和 `fetch_role_info(role_id)`,更新 `format_report()` 输出基本角色信息 - 已验证 2895 正常运行输出 - 已同步 SkillHub + Git", "recallCount": 1, "dailyCount": 0, "groundedCount": 0, "totalScore": 1, "maxScore": 1, "firstRecalledAt": "2026-05-24T02:48:04.923Z", "lastRecalledAt": "2026-05-24T02:48:04.923Z", "queryHashes": [ "c2d15f7574fb" ], "recallDays": [ "2026-05-24" ], "conceptTags": [ "studytime-analysis", "vala-user", "vala-app-character", "account-id", "女/1", "yyyy-mm-dd", "vala-app-account", "get-mysql-connection" ] }, "memory:memory/2026-05-24.md:46:71": { "key": "memory:memory/2026-05-24.md:46:71", "path": "memory/2026-05-24.md", "startLine": 46, "endLine": 71, "source": "memory", "snippet": "### 增强: 报告开头加入角色基本信息 (2026-05-24) [刘庆逊提出] 在 studytime-analysis 输出中加入角色基本信息,包括: - 角色ID、账号ID、角色名字、性别、年龄、账号手机号后4位 **数据源(新增)**: - MySQL Online `vala_user` 库 - `vala_app_character` 表:id, account_id, nickname, gender(0=女/1=男), birthday(varchar \"YYYY-MM-DD\") - `vala_app_account` 表:id, tel(已脱敏如 186****1625) - 手机号已脱敏,直接取后4位;年龄从 birthday 计算 **修改文件**: - `skills/studytime-analysis/scripts/studytime_analysis.py`:新增 MySQL 连接函数 `get_mysql_connection()` 和 `fetch_role_info(role_id)`,更新 `format_report()` 输出基本角色信息 - 已验证 2895 正常运行输出 - 已同步 SkillHub + Git ### Unit 显示修复: 季度名称 → 全局单元编号 (2026-05-24) [刘庆逊提出] HTML 报告中 Unit 列显示错误——显示的是季度名称(如\"小镇时光\"\"钢铁之心\")而非单元数字(0-48)。 **根因分析**: - `vala_game_chapter`(MySQL)无 `unit_", "recallCount": 1, "dailyCount": 0, "groundedCount": 0, "totalScore": 1, "maxScore": 1, "firstRecalledAt": "2026-05-25T05:47:41.388Z", "lastRecalledAt": "2026-05-25T05:47:41.388Z", "queryHashes": [ "9aff8ec9594a" ], "recallDays": [ "2026-05-25" ], "conceptTags": [ "studytime-analysis", "vala-user", "vala-app-character", "account-id", "女/1", "yyyy-mm-dd", "vala-app-account", "get-mysql-connection" ] }, "memory:memory/2026-05-24.md:85:110": { "key": "memory:memory/2026-05-24.md:85:110", "path": "memory/2026-05-24.md", "startLine": 85, "endLine": 110, "source": "memory", "snippet": "- `skills/studytime-analysis/scripts/studytime_analysis.py` — 重写 `fetch_chapter_info_map()`,新增全局 unit_index 计算;HTML 模板更新为 Level/Unit/Lesson 三列 - 已为角色 32009(zyl)重新生成 HTML 并发送 - 已同步 Git + SkillHub ## 新建技能: studycourse-analysis (2026-05-24) [刘庆逊提出] 创建角色上课情况分析技能,从四维度分析角色学习数据。 ### 技能结构 - `skills/studycourse-analysis/SKILL.md` — 技能定义 - `skills/studycourse-analysis/scripts/studycourse_analysis.py` — Python 分析脚本 ### 四步分析 1. **基础信息**:角色姓名/年龄/账号ID/手机号后4位/注册时间/购买渠道/设备/首末次完课 2. **完课耗时**:平均值/中位数、异常检测(<10min / >20min)、前后半段趋势 3. **中互动正确率**:Perfect/Good/Oops/Pass/Failed 占比和趋势 4. **知识巩固**:完成率、正确率得分分布 ### 数据源 | 类型 | 库 | 表 | 用途 | |------|-----|-----|------| | MySQL vala_user | vala_app_character | 角色信息、pu", "recallCount": 1, "dailyCount": 0, "groundedCount": 0, "totalScore": 1, "maxScore": 1, "firstRecalledAt": "2026-05-25T05:47:41.388Z", "lastRecalledAt": "2026-05-25T05:47:41.388Z", "queryHashes": [ "9aff8ec9594a" ], "recallDays": [ "2026-05-25" ], "conceptTags": [ "fetch-chapter-info-map", "unit-index", "level/unit/lesson", "studycourse-analysis", "平均值/中位数", "perfect/good/oops/pass/failed", "vala-user", "vala-app-character" ] } } }