Azur
AGENTS.md2 starsChanged 21 days agoMITView on GitHub
- 模块:app(应用/UI/设置/工具管理)、agent-runtime(Agent 循环/提示词/内置工具/本地执行)、 business/*(api agent files notification application permission)、libs/*(logging okia)、 ui-kit、store、xsettings、remote-view、common-utils。 - 没有 Chaquopy、没有内置 Python 运行时、没有 MCP、没有更新检测、没有 Xposed 接管。不要重新引入。 - Python 能力 = 宿主 files/hosttools/bin/python3(CPython 3.12.13 musl),经 shell 工具以 root 调用。 - 12 个内置工具:shell open_uri launch_app find_installed_apps notify load_skill memory screenshot view_image zafiro_env screen_operation_accessibility screen_operation_shell。新增工具须同时改 BuiltinToolRegistry.default() 与(如需分组)BuiltinToolGroups。 - LocalTool.Py / customPyTools / ToolSettingsCodec.parseCustomPyTools 是*老设置 JSON 兼容层*,恒为空、不执行;不要"顺手清理"。 改了 assets/** 或 Kotlin 之后先 rm -rf project/<tree>/app/build,否则 Gradle 判 up-to-date 不重打包。 首次在新机/新环境构建需要自举(联网):sh /data/local/aitools/bootstrap-env.sh (rootfs + apk add openjdk17 + Android SDK + Gradle;SDK…
- Deletes or force-pushes
- Installs packages
In this repository13 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- add-worktreeSkill
- answer-me-with-htmlSkill
- extract-apkSkill
- grill-meSkill
- grill-with-docsSkill
- handoffSkill
- proceed-videoSkill
- prompt-engineeringSkill
- release-new-versionSkill
- test-hang-watchdogSkill
- test-triageSkill
- writing-for-agentsSkill
The file
Files
AGENTS.md — Azur 开发约定
1. 架构事实(改代码前必读)
- 模块:
app(应用/UI/设置/工具管理)、agent-runtime(Agent 循环/提示词/内置工具/本地执行)、business/*(api agent files notification application permission)、libs/*(logging okia)、ui-kit、store、xsettings、remote-view、common-utils。 - 没有 Chaquopy、没有内置 Python 运行时、没有 MCP、没有更新检测、没有 Xposed 接管。不要重新引入。
- Python 能力 = 宿主
files/hosttools/bin/python3(CPython 3.12.13 musl),经shell工具以 root 调用。 - 12 个内置工具:
shell open_uri launch_app find_installed_apps notify load_skill memory screenshot view_image zafiro_env screen_operation_accessibility screen_operation_shell。新增工具须同时改BuiltinToolRegistry.default()与(如需分组)BuiltinToolGroups。 LocalTool.Py/customPyTools/ToolSettingsCodec.parseCustomPyTools是老设置 JSON 兼容层,恒为空、不执行;不要"顺手清理"。
2. 构建
# 源码树改完必须同步到工程树(单向镜像,工程树不手改)
sh /data/local/aitools/project/sync.sh zafiro-15-1.8.1-Fork
# 构建(VARIANT=debug 必填,脚本默认 release,而 app 无 release 变体)
cd /data/local/aitools && ZAFIRO_VARIANT=debug sh env.sh build --max-workers=1
# 产物
/data/local/aitools/out/*.apk # RC=0 + size/md5 才算出包成功改了 assets/** 或 Kotlin 之后先 rm -rf project/<tree>/app/build,否则 Gradle 判 up-to-date 不重打包。
首次在新机/新环境构建需要自举(联网):sh /data/local/aitools/bootstrap-env.sh
(rootfs + apk add openjdk17 + Android SDK + Gradle;SDK 里 platforms/android-37.0 需改成 android-37 并改 source.properties)。
aapt2 / libz / init.gradle 已随包分发(assets/toolchain、assets/buildkit),部署由 HostToolsInstaller 完成。
3. 测试
sh /data/local/aitools/run-plain-tests.sh # JVM-only 子集
sh /data/local/aitools/build-test.sh # 全量;Robolectric 在 aarch64-musl 上必挂(无 nativeruntime)已知非代码失败:ShellBuiltinTest(容器以 root 跑,期望 default identity)、
XRepoRuntimeGatewayTest.readLlmConfig_*、BaseSessionBuiltinTest.handleCommand_*。
4. Python 装包
pip install 永久不可用(musl PT_INTERP=/lib/ld-musl-aarch64.so.1 在 Android 上不存在)。
纯 Python 包一律:sh /data/local/aitools/pyinstall.sh <pkg>(下载 py3-none-any.whl 解到 pylib)。
5. 改动铁律
- 只改
src/<tree>,改完sync.sh;工程树是镜像。 - 改
assets/hosttools/**后必须重算assets/hosttools/VERSION(对全量 1579 文件求(相对路径:大小)的 SHA-1), 否则stamp指纹不匹配 → 安装后重铺 113 MB。 - assets 里以
_开头的目录必须写成x__<原名>(aapt 会丢弃_开头的目录),由copyDir在复制期还原。 - 设备侧读文件断言必须
nsenter -t 1 -m --(本机 shell 在隔离 mount namespace,直读会得到相反结论)。 - 杀进程用
am force-stop(pm没有该子命令);am start对在跑进程只切前台,不重跑onCreate。 - 装包前先输出改动摘要(文件表 + versionCode/size/md5)。
6. 文档索引
| 文件 | 内容 |
README.md / README_CN.md | 当前版本特性(对外) |
文档/设备内执行-坑位清单.md | 设备内跑命令的坑:输出污染/截断、namespace、am-vs-pm、首装假死、网络 |
文档/HANDOFF-hosttools.md | hosttools/铺开/根域/构建资产的踩坑记录 |
assets/skills/* | 运行期技能(App 内 load_skill 用,随包分发) |
.agents/skills/* | 开发流程技能(13 个,已按本项目重写) |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

