Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ build_tmp/
CLAUDE.md
.claude/
.cursor/
.learnings/

# Prebuilt llama.xcframework: 必须从 ./llama.cpp-omni 子模块构建出来再放到这里,
# 仓库不再追踪二进制本身 (~189 MB),详见 README "构建 llama.xcframework" 一节
Expand Down
4 changes: 4 additions & 0 deletions MiniCPM-V-demo-Android/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.gitattributes text eol=lf
models/rag-guard-v4-2-e5/*.md text eol=lf
models/rag-guard-v4-2-e5/*.json text eol=lf
models/rag-guard-v4-2-e5/*.onnx filter=lfs diff=lfs merge=lfs -text
27 changes: 27 additions & 0 deletions MiniCPM-V-demo-Android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,44 @@
.externalNativeBuild
.cxx
local.properties
signing.local.properties
environment.local.bat

app/build/
app/.cxx/
.kotlin/
.gradle-user-home/
.android/
.android-user-home/
.gradle-local/
.android-local/

# Persist Graphify's reusable graph products, not machine-specific or rebuildable intermediates.
graphify-out/.graphify_python
graphify-out/.graphify_root
graphify-out/.graphify_analysis.json
graphify-out/.graphify_ast.json
graphify-out/.graphify_detect.json
graphify-out/.graphify_extract.json
graphify-out/.graphify_semantic.json
graphify-out/.graphify_incremental.json
graphify-out/cache/
graphify-out/20??-??-??/

# Local Codex hooks contain machine-specific executable paths.
.codex/

# Native libs produced by the buildGgmlCpu_v86 task (built per-machine).
app/src/main/jniLibs/

*.gguf
*.bin

# Python tooling caches.
__pycache__/
*.py[cod]
tools/rag_guard/data/generated/

app/src/main/cpp/build-llama/
app/src/main/cpp/build-mtmd/

Expand Down
27 changes: 27 additions & 0 deletions MiniCPM-V-demo-Android/.graphifyignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Generated outputs and local build state.
graphify-out/
app/build/
build/
.gradle/
.gradle-user-home/
.android/
.android-user-home/
.cxx/
app/.cxx/

# Binary UI variants and reference audio do not carry architecture knowledge.
app/src/main/res/mipmap-*/ic_launcher*.webp
app/src/main/assets/ref_audios/

# Pure configuration/schema JSON produces no AST nodes; its meaning is captured
# by AGENTS.md, Room migration code, manifests, and project documentation.
.codex/hooks.json
app/schemas/**/*.json
tools/rag_guard/data/dataset_sources.json

# Generated model/data artifacts are represented by manifests and source code.
*.gguf
*.onnx
*.bin
*.apk
tools/rag_guard/data/generated/
34 changes: 34 additions & 0 deletions MiniCPM-V-demo-Android/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Android build and installation rules

## Stable application signing

- Never install `com.example.minicpm_v_demo` with Gradle's generated debug key.
- Every device install and connected Android test must first run `verifyInstallationSigning`.
- Use the canonical certificate pinned in `app/build.gradle.kts`; keep the keystore and credentials outside Git via `signing.local.properties` or Gradle properties.
- Before changing the pinned certificate, compare it with the installed package certificate and obtain explicit approval for any uninstall that could erase application data.
- On `INSTALL_FAILED_UPDATE_INCOMPATIBLE`, stop. Do not uninstall automatically and do not generate another key.
- Do not run Gradle `connected*AndroidTest` tasks: AGP cleanup can uninstall the target package and erase app-private models, conversations, and knowledge bases even when tests pass.
- For device tests, build and verify signing first, install both APKs with `adb install -r`, then invoke the selected test with `adb shell am instrument`; never uninstall the target package as test cleanup.

## Canonical Windows Android environment

- Run Gradle through `gradlew.bat`; it loads `android-env.bat` and the ignored machine-specific `environment.local.bat`.
- Keep the single Gradle user home at the workspace root `.gradle-user-home` and the single Android user home at `.android`.
- Do not create `.gradle-user-home`, `.gradle-local`, `.android-local`, `.android`, or `.android-user-home` inside `MiniCPM-V-demo-Android`.
- Use JDK 21 and `D:\Android\Sdk`; do not rely on the older outer `D:\Android\platform-tools` PATH entry.

## graphify

This project has a knowledge graph at graphify-out/ with god nodes, community structure, and cross-file relationships.

When the user types `/graphify`, use the installed graphify skill or instructions before doing anything else.

Rules:
- For codebase questions, first run `graphify query "<question>"` when graphify-out/graph.json exists. Use `graphify path "<A>" "<B>"` for relationships and `graphify explain "<concept>"` for focused concepts. These return a scoped subgraph, usually much smaller than GRAPH_REPORT.md or raw grep output.
- Dirty graphify-out/ files are expected after hooks or incremental updates; dirty graph files are not a reason to skip graphify. Only skip graphify if the task is about stale or incorrect graph output, or the user explicitly says not to use it.
- If graphify-out/wiki/index.md exists, use it for broad navigation instead of raw source browsing.
- Read graphify-out/GRAPH_REPORT.md only for broad architecture review or when query/path/explain do not surface enough context.
- After modifying code, run `graphify update .` to keep the graph current (AST-only, no API cost).
- After modifying plans, ADRs, threat models, READMEs, or other documents, use the installed graphify skill to refresh semantic extraction before finishing the task; `graphify update .` alone is insufficient because it only refreshes code AST.
- Before reporting a local task complete, run `graphify check-update .`. If semantic changes are pending, update them with an available configured LLM backend or an explicitly approved semantic-extraction sub-agent; never stamp a failed or omitted document as current.
- Keep `graphify-out/graph.json`, `graphify-out/GRAPH_REPORT.md`, `graphify-out/graph.html`, labels, manifest, and cost audit in the workspace as persistent project artifacts.
Loading