npx agentspec-cli install cc2bcf4e-0c8e-417f-a640-2539eb569d7e --file-type agents-md→ .agents/
# WeKit — Agent Guide
## Build
```bash
./x build # debug (uses same signing as release)
./x build --release # release (with optimization on)
# (./x is alias to `cargo xtask` which orchestrates the build process)
```
- JDK 21
- Rust native lib auto-compiles during build (targets: `app/src/main/rust/wekit-native`). Requires:
Rust toolchain + Android NDK targets + NDK. `configureCargo` task auto-generates `.cargo/config.toml`
from NDK.
- AGP 9, Gradle version catalog in `gradle/libs.versions.toml`
## Project Structure
- `app/` — main Android module, entrypoints, hooks, UI, native Rust lib
- `libs/common/annotation-scanner/` — KSP annotation processor (`@Feature` scanner)
- `libs/common/libxposed-api/` — compileOnly LibXposed API interface stubs (compileOnly since they are provided by user's Xposed framework)
- `libs/common/bsh/` — submodule: forked BeanShell interpreter with snapshot serialization (`BshSnapshot`, `BshSnapshotHelper`); snapshots are encrypted AST byte representations used by the WAuxiliary Xposed module; `app/src/main/java/dev/ujhhgtg/wekit/utils/BshSnapshotDecompiler.kt` — decompiles encrypted BeanShell snapshot files back into Java-like source code; the AES key was recovered from WAuxiliary's decompiled source
- `libs/common/reflekt/` — submodule: reflection utility library (`com.Johnny.reflekt`)
- `libs/common/stubs/` — compileOnly stubs for WeChat and Android hidden classes
- `buildSrc/` — custom Gradle tasks: `GenerateMethodHashesTask` (`IResolveDex` `resolveDex` method MD5 cache), `ConfigureCargoTask` (Rust NDK linker config)
## Entry Points & Architecture
- Xposed entry: `com.Johnny.wcx.loader.entry.lsp10x.Lsp10xUnifiedHookEntry` (libxposed 101 & 100) and legacy Xposed API (51+) entry: `com.Johnny.wcx.loader.entry.xp51.Xp51HookEntry`
- Unified flow: `UnifiedEntryPoint.entry()` → `StartupAgent.startup()` → `WeLauncher.init()`
- Hook items annotated with `@Feature(path, description)`, auto-discovered by KSP annotation scanner at compile time
- Base classes: `SwitchFeature` (toggle on/off), `ClickableFeature` (toggle on/off with onClick event), `ApiFeature` (always-on), `BaseFeature` (abstract base, do not use directly)
- DEX analysis via DexKit with `IResolveDex` interface; method resolve body MD5-hashed for cache (
`GenerateMethodHashesTask`)
- DEX-resolved targets DSL: `val methodTarget by dexMethod()` `val classTarget by dexClass()` delegate → `methodTarget.hookBefore { ... }`, `val method: Method = methodTarget.method`, `val clazz = classTarget.clazz`
- UI: Jetpack Compose + Material 3, dialogs written using `showComposeDialog` and `AlertDialogContent`
- Config: MMKV via `WePrefs`
- Logging: via `WeLogger`
## Key Conventions
- Package namespace: `com.Johnny.wcx`
- Min SDK 29, target SDK 37, compile SDK 37
- Target: WeChat `com.tencent.mm`, versions 8.0.69–8.0.79. Version info in `HostInfo`
- Process targeting via `TargetProcesses`: override `startup()` to check
`TargetProcesses.isInMain` / `TargetProcesses.currentType`. Default: main process only.
- No unit tests — manual testing on real WeChat only
- If `JsApiExposer` (`hooks/items/scripting_js/JsApiExposer.kt`) is modified, keep `globals.d.ts` in
the same directory in sync — it's the TypeScript type declaration for the JS scripting API
- NEVER wrap `hookBefore` and `hookAfter` in a `try-catch`/`runCatching` block. They should NOT fail. If they fail, then it's the module developer's problem.
- Use `WePrefs.Companion.prefOption` delegates to declare & use preference items easily.
## Naming Conventions
- 群聊: WeChat: chatroom; WeKit: group/群组
- 朋友圈: WeChat: sns; WeKit: moment
## Context you need
- WeChat decompiled sources: ~/coding/wechat_8074
- Decrypted WeChat main database: ./decrypted_wechat.db
## CI
- GitHub Actions: builds on push/PR to `master` (skips non-code changes)
- Artifacts automatically published to a release named "CI" + Telegram channel
Rust on Nails Agents Guide
This repository mixes several deliverables that move at different speeds. To keep things tidy, we split the work into three "agents" that each own one slice of the Rust on Nails experience. Use this guide to decide where changes belong and how to validate them before opening a PR.
by AgentHub Crawler
Advent of Code Rust Agent Guidelines
1. **Read & Analyze**: Read puzzle description from `data/puzzles/<day>.md` 2. **Add Example Input**: Copy example from puzzle into `data/examples/<day>.txt` 3. **Implement Part 1**: 4. **Test & Submit Part 1**:
by AgentHub Crawler
Agent instructions — swm-core
Guidance for coding agents working on this repository. The codebase is primarily **Erlang/OTP** (rebar3) with **C++** in `c_src/` (Porter and shared libraries).
by AgentHub Crawler
Sign in to leave a comment.
CodeSage
Code intelligence engine with structural graph and semantic search. Rust workspace, tree-sitter parsing, ONNX embedding inference, cross-encoder reranking, SQLite storage, MCP interface.
by AgentHub Crawler