Compare commits
1 Commits
a11440dc1a
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f287ba99db |
2
memory/MEMORY.md
Normal file
2
memory/MEMORY.md
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
- [Dasheng (大盛) codebase map](dasheng-codebase.md) — Gitea instance at dasheng.io, IM product family + 悟空分身/取经团 worker system; refactor focus on `claude-worker-universe` + `jx-im/worker-client/thin_worker.py` (corrected from mini_tonky_bot/...)
|
||||||
|
- [bots.json node field is informational](feedback_bot_node_field.md) — don't block planning on unknown node values; sub-bots run on colleague machines
|
||||||
98
memory/dasheng-codebase.md
Normal file
98
memory/dasheng-codebase.md
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
---
|
||||||
|
name: Dasheng (大盛) Gitea codebase map
|
||||||
|
description: Top-level orientation for the dasheng.io Gitea organization — the IM product family + 悟空分身/取经团 distributed Claude worker system. Cite when work touches any of the cloned repos under ~/dasheng-repos.
|
||||||
|
type: project
|
||||||
|
originSessionId: c2c569ed-e20b-4000-a286-8d48afea8d86
|
||||||
|
---
|
||||||
|
# Dasheng codebase — orientation
|
||||||
|
|
||||||
|
## Account and access
|
||||||
|
- Gitea instance: `https://dasheng.io/gitea` (Gitea 1.25.4)
|
||||||
|
- Active account: `leipayne18` (admin)
|
||||||
|
- Credentials: NEVER commit. Held only in session-scoped env vars (`GITEA_TOKEN`). Rotated after each task.
|
||||||
|
|
||||||
|
## Workspace
|
||||||
|
- Local clone root: `/Users/pp-bot/dasheng-repos/`
|
||||||
|
- Master index of all 124 repos: `/Users/pp-bot/dasheng-repos/INDEX.md`
|
||||||
|
- Per-org subdirs: `~/dasheng-repos/<org>/<repo>/`
|
||||||
|
- Manifest: `.omc/repos.json` (with full_name, clone_url, default_branch, empty, size_kb)
|
||||||
|
- 108 cloned, 16 truly empty (verified via git ls-remote, kept as placeholders only)
|
||||||
|
|
||||||
|
## Org map (14 orgs)
|
||||||
|
| Org | Apparent role |
|
||||||
|
|---|---|
|
||||||
|
| `jx-im` | Core: IM client (Dart/Swift), worker system (universe, worker-client, worker-knowledge) |
|
||||||
|
| `Matrix-Ant-AI` | Mini-app ecosystem + Flutter packages (44 repos, the largest org) |
|
||||||
|
| `CUS-IM` / `CUS-IM-Plugin` | Customer-facing IM client + parallel plugin set (mirrors jx-im-plugin) |
|
||||||
|
| `jx-im-plugin` | Flutter plugin set: kiwi_module, photo_view, pin_code_fields, agora, camerawesome, etc. |
|
||||||
|
| `jx-im-advance-plugin` | Dev-branch versions of plugins (im_message_plugins-im-dev, jxim_chat_room_nav-im-dev, etc.) |
|
||||||
|
| `mini_tonky_bot` | Single repo: `worker-client` (thin worker — see below) |
|
||||||
|
| `leipayne18` | Personal: clawd, clawdbot-memory, customer-im-client-dev |
|
||||||
|
| `lewis`, `thomas`, `harry`, `josh`, `durant`, `victor`, `jiaswee`, `PM`, `ui` | Individual contributor sandboxes |
|
||||||
|
|
||||||
|
## Refactor targets (active focus)
|
||||||
|
|
||||||
|
### Universe
|
||||||
|
- Repo: `jx-im/claude-worker-universe` (44.7M Python)
|
||||||
|
- Local path: `~/dasheng-repos/jx-im/claude-worker-universe/`
|
||||||
|
- Role: Central hub / orchestrator of the 取经团 (Pilgrim Team) distributed Claude worker system
|
||||||
|
- Architecture uses Journey-to-the-West character names: 唐僧 (tang_seng_*), 八戒 (ba_jie_*), 沙僧 (wu_jing_*, sha), 悟空 (wu_kong_*)
|
||||||
|
- Deep-dive notes: `~/dasheng-repos/.omc/notes/universe.md`
|
||||||
|
- Headline pain points: `core/run_loop.py` 9238 LOC, `tools/thin_worker.py` 5271 LOC, `core/wu_jing_daemon.py` 4808 LOC, `services/bot_dashboard.py` 4266 LOC, ~zero tests
|
||||||
|
|
||||||
|
### Tinworker (= thin_worker)
|
||||||
|
- "tinworker" is phonetic for `thin_worker` — refers to the file `thin_worker.py`
|
||||||
|
- Primary repo: `mini_tonky_bot/worker-client` (1.7M Python)
|
||||||
|
- Local path: `~/dasheng-repos/mini_tonky_bot/worker-client/`
|
||||||
|
- Role: Single-file deployable Claude dev worker, distributed to volunteer contributors ("大仙")
|
||||||
|
- Deep-dive notes: `~/dasheng-repos/.omc/notes/tinworker.md`
|
||||||
|
- Confirmation status: hypothesis (strong evidence: file `thin_worker.py` matches user's "tinworker" pronunciation; module docstring "悟空分身 · Thin Worker"). User can override in `.omc/state.json`.
|
||||||
|
- Alternative candidates noted: `jx-im/worker-client` (older "Kevin" variant), `jx-im/worker-knowledge` (knowledge base, not runtime)
|
||||||
|
|
||||||
|
### CRITICAL FINDING — dual thin_worker.py
|
||||||
|
There are TWO `thin_worker.py` files with significant divergence:
|
||||||
|
- `jx-im/claude-worker-universe/tools/thin_worker.py` — 5271 LOC
|
||||||
|
- `mini_tonky_bot/worker-client/thin_worker.py` — 2233 LOC
|
||||||
|
|
||||||
|
Refactoring must decide which is canonical, identify drift, and consolidate. This is documented in both deep-dive notes and is the central refactor question.
|
||||||
|
|
||||||
|
## Multi-version IM client landscape
|
||||||
|
The IM client exists in at least 4 flavors — clarify with user which is the active production codebase before refactoring touches it:
|
||||||
|
- `jx-im/im-client` (Dart/Flutter, 2.3 GiB, latest)
|
||||||
|
- `jx-im/im-client-im-dev` (Dart, 1.1 GiB, dev branch carved out)
|
||||||
|
- `jx-im/im-client-ios-swift` / `-swift-demo` (native iOS)
|
||||||
|
- `Matrix-Ant-AI/im-client` (parallel?)
|
||||||
|
- `CUS-IM/customer-im-client` (customer-facing fork)
|
||||||
|
|
||||||
|
## Plugin set duplication
|
||||||
|
`jx-im-plugin` and `CUS-IM-Plugin` carry parallel forks of the same plugin set (kiwi_module, photo_view, pin_code_fields, pull_to_refresh, agora, camerawesome, im_camera, ZLImageEditor, etc.). When asked to fix a plugin, confirm which fork the user means.
|
||||||
|
|
||||||
|
## Where to look for what
|
||||||
|
- Onboarding flow / volunteer registration: `jx-im/worker-client/README.md` describes the "大仙接入" flow via http://www.dasheng.io
|
||||||
|
- Knowledge base / lessons learned / role docs: `jx-im/worker-knowledge/`
|
||||||
|
- Bot configs in production: `jx-im/claude-worker-universe/config/bots.json` (21 bots; ⚠ 19 plaintext tg_bot_tokens leaked in git — pending cleanup)
|
||||||
|
- Tinworker correction: canonical = `jx-im/worker-client` (verified 2026-04-25 by user; mini_tonky_bot/worker-client is a stale Phase-2 fork)
|
||||||
|
- 文殊菩萨 design (iter2 of /ralph): `~/dasheng-repos/.omc/notes/master-design.md` — full architecture; `~/dasheng-repos/.omc/prd-iter3.json` for execution stories
|
||||||
|
|
||||||
|
## Infrastructure access
|
||||||
|
- **EC2 server (also hosts Gitea)**: `dasheng.io`, user `ec2-user`, SSH key `/Users/pp-bot/Downloads/cc.pem` (chmod 400)
|
||||||
|
- AWS region: ap-southeast-2 (Sydney). Hostname: `ip-172-31-19-46.ap-southeast-2.compute.internal`. OS: Amazon Linux 2023.
|
||||||
|
- EC2-resident bots: `lobster-qa-bot` (八戒), `nezhasantaizi_bot` (哪吒三太子), `thin-nezha`. Run from `~/.claude/` on the EC2 box.
|
||||||
|
- env-var convention in `run_loop.py:6481`: `EC2_USER=ec2-user`, `EC2_HOST=dasheng.io`, `BAJIE_HOST=office-studio-cc` (SSH alias).
|
||||||
|
- Test command: `ssh -i /Users/pp-bot/Downloads/cc.pem ec2-user@dasheng.io 'whoami'`
|
||||||
|
|
||||||
|
## H5 vs iOS bot taxonomy (after 2026-04-25 user clarification)
|
||||||
|
4 H5 bots out of 21:
|
||||||
|
- jarvis_theone_bot (大仙·清源妙道真君, role=PM)
|
||||||
|
- kevins-studio-bot (奔波儿灞·Kevin, role=QA, qa_priority=true)
|
||||||
|
- andyjanebot (鬼金羊, role=QA, qa_priority=true)
|
||||||
|
- 虚日鼠 (planned: login=xurishu_bot, role=QA, qa_priority=true, tg_name=@newim2026wbot)
|
||||||
|
|
||||||
|
QA-priority H5 bot rule: verify open issues first, only switch to dev when no verification work pending.
|
||||||
|
|
||||||
|
## 文殊菩萨 (Manjushri) — planned new top-level role
|
||||||
|
- Inherits BOTH 八戒 (QA Automation) AND 唐僧 (PM Patrol) via composition (not subclass).
|
||||||
|
- Adds: PM-spec → test-case generation, hourly QA/test-task polling, cross-platform issue distribution, auto-PR (bot-dev → main), CLI surface, current-state-aware issue creation.
|
||||||
|
- node=MacBook (same as 唐僧). TG token reuse from 唐僧 (`tg_bot_token_inherits: lobster-pm-bot`); messages prefixed `[文殊菩萨]`.
|
||||||
|
- Module: `core/wen_shu_hub.py` (planned). Schedule: launchd plist (planned).
|
||||||
|
- Pre-req refactors before introduction: extract `sync_main_into_bot_dev` from `ba_jie_rev.merge_to_main:451-487`; extract `_fetch_open_issues_paginated` from 唐僧; add `RepoState` snapshot facade.
|
||||||
15
memory/feedback_bot_node_field.md
Normal file
15
memory/feedback_bot_node_field.md
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
name: bots.json node field is informational, not routing
|
||||||
|
description: When working with the dasheng claude-worker-universe bot registry, do not block planning or PRDs on resolving the node field for sub-bots; many run on colleague machines that the user does not own.
|
||||||
|
type: feedback
|
||||||
|
originSessionId: c2c569ed-e20b-4000-a286-8d48afea8d86
|
||||||
|
---
|
||||||
|
In `jx-im/claude-worker-universe/config/bots.json`, the `node` field on each bot entry is **informational, not behavioral**. Many sub-bots run on colleague machines outside the user's control. Do not treat unknown / unverified `node` values as blockers.
|
||||||
|
|
||||||
|
**Why:** User feedback 2026-04-25 iter2 of /ralph: "子机器人很多都是同事的机器 所以不要纠结在哪里" — many sub-bots are colleague-owned. The dispatch system uses Gitea labels + dashboard KV for routing, not the `node` field; bots self-register at startup.
|
||||||
|
|
||||||
|
**How to apply:**
|
||||||
|
- When designing or PRD-ing changes that touch bots.json, do NOT add acceptance criteria like "every bot has a verified node value" — accept `node="unknown"` or stale values.
|
||||||
|
- When asking the user about a new bot, DO NOT make the node a blocker question; default to `MacBook` (this user's primary machine) and let the colleague update it later if they own the bot.
|
||||||
|
- For 文殊菩萨 specifically: it runs on the same node as 唐僧 (MacBook) per separate instruction; that's fixed.
|
||||||
|
- Routing decisions (H5 vs iOS, qa_priority verify-first) come from `platforms` + `qa_priority` + `role_type` fields — never from `node`.
|
||||||
Reference in New Issue
Block a user