Git PR Ghostwriter β Encrypted diff analysis, conventional commit cleanup, GPG clearsigning, APS KV persistence, and R2 upload
|
1. Workspace Config & Setup
|
2. Casper x402 Micropayment
|
|
3. PR Analysis Dashboard
|
4. Suggested Inline Comments
|
|
5. Interactive Developer Console
|
6. GPG Clearsigned R2 Export
|
The ShipGhost Workflow: Specify git repository branch β Request analysis & pay Casper x402 micro-fee β Review side-by-side changes & suggested inline comments β Clean up commit logs interactively via Anna Developer Console β Persist history to Anna KV β Clearsign output bundle and upload to Cloudflare R2.
Pull Requests are critical codebase documents, but writing them is tedious. Developers working under pressure often push dozens of messy commits (wip, fix, stuff) and open blank PR descriptions. Code reviewers waste hours reverse-engineering intent, leading to knowledge debt.
ShipGhost is a secure, AI-native Anna application that analyzes your local git branch history, groups modified files into architectural components, and drafts a professional PR package (Title, Summary, Changes List, Architecture Rationale, and Suggested Inline Comments).
To protect corporate IP, diff payloads are encrypted under a 256-bit AES key before leaving your machine, and final exports are cryptographically clearsigned using local GPG/SSH keys.
Key Features:
- β‘ Git Analysis Engine: Walks local git diffs, stats, and logs for any repository branch.
- π AES-GCM-256 Encryption: Diff payloads are encrypted before LLM inference.
- π€ AI PR Ghostwriter: Generates professional PR title, description, rationale, testing instructions, and inline review comments.
- π§Ή Conventional Commit Cleanup: Rewrites messy commit messages into proper conventional format.
- βοΈ GPG/SSH Clearsigning: Cryptographic clearsigning of final PR description with local keys.
- πΎ Persistent PR History: Every generated PR draft is persisted to Anna APS KV β tracks titles, file changes, and timestamps across sessions.
- π¦ R2 Signed Artifact Upload: Clearsigned PR markdown is uploaded to Anna's R2 bucket via
host/uploadFile, returning a shareable download URL.
| Layer | Technology | Rationale |
|---|---|---|
| App Runtime | Anna App Runtime (Schema 2) | Native integration with host permissions |
| Frontend UI | Vanilla HTML5 / CSS Glassmorphism | Fast rendering, no compile step |
| Backend Plugin | Python 3.11 Executa | Accesses local git subprocesses |
| Cryptographic | PyCryptodome (AES-GCM-256) | Heavyweight local encryption |
| Signatures | GPG/SSH (ED25519 fallback) | Tamper-proof PR clearsigning |
| Persistent State | Anna APS KV (storage/get, storage/set) |
PR draft history (last 50 entries) |
| Artifact Storage | Anna R2 (host/uploadFile) |
Signed PR markdown distribution |
graph TD
UI[Frontend SPA - index.html] -->|tools.invoke| Exec[Python Executa Plugin]
Exec -->|git subprocess| Git[Local Git Repository]
Git -->|return diffs & logs| Exec
Exec -->|AES-GCM-256 encrypt| Crypto[Crypto Engine]
Exec -->|reverse-RPC: sampling/createMessage| Host[Host LLM Agent]
Host -->|return PR content & suggestions| Exec
Exec -->|storage/set| APS[Anna APS KV - PR History]
Exec -->|format review queue| UI
UI -->|GPG Clearsign request| Exec
Exec -->|gpg clearsign| GPG[Local GPG Agent]
Exec -->|host/uploadFile| R2[Anna R2 Storage]
ShipGhost exercises the full Anna SDK capability surface:
| Method | Purpose | Implementation |
|---|---|---|
sampling/createMessage |
LLM inference for PR draft generation & commit cleanup | call_host() in plugin.py |
storage/get |
Read persistent PR draft history from APS KV | storage_get() in plugin.py |
storage/set |
Write PR history entries to APS KV | storage_set() in plugin.py |
storage/delete |
Remove PR entries from APS KV | storage_delete_key() in plugin.py |
storage/list |
List all past PR keys in APS KV | storage_list_keys() in plugin.py |
host/uploadFile (inline) |
Upload signed PR markdown to R2 | host_upload_inline() in plugin.py |
host/uploadFile (negotiate+confirm) |
Stream large PR markdown reports to R2 | host_upload_negotiate() and host_upload_confirm() |
embeddings/create |
Compute dense vectors for commit message clustering | embed_texts() in plugin.py |
image/generate |
Generate visual architecture/impact diagrams | image_generate() in plugin.py |
files/upload_begin + complete |
Durable PR archive uploads (2-phase) | files_upload() in plugin.py |
files/download_url |
Presigned retrieval link for PR archive | files_download_url() in plugin.py |
files/list |
List items in PR archive | files_list() in plugin.py |
files/delete |
Delete PR archive entries | files_delete() in plugin.py |
agent/complete |
Stateless L1 completion | agent_complete() in plugin.py |
agent/session.create + run + history + cancel + delete |
Stateful L2 multi-turn agent sessions | agent_session_create(), agent_session_run(), etc. |
| Capability | Usage |
|---|---|
llm.sample |
Host-brokered LLM for PR drafting & completion |
llm.embed |
Vector embedding compute for commit message clustering |
llm.image |
DALL-E impact diagram generation |
llm.agent.auto |
Stateful multi-turn L2 agent sessions |
aps.kv |
Persistent PR history (last 50 drafts) |
host.upload |
R2 upload for clearsigned PR markdown |
| Feature | Status |
|---|---|
schema: 2 |
β |
host_capabilities |
β
llm.sample, llm.embed, llm.image, llm.agent.auto, host.upload |
user_message_prefix_template |
β |
system_prompt_addendum |
β |
optional_executas |
β |
csp_overrides |
β |
state_merge |
β |
dev.fixtures |
β |
dev.seed_storage |
β |
host_api.upload (negotiate + confirm) |
β |
host_api.chat (write_message + append_artifact) |
β |
host_api.storage (get/set/delete/list) |
β |
host_api.window (set_title/open_view/close) |
β |
host_api.llm (complete/embed) |
β |
host_api.image (generate) |
β |
host_api.agent (session) |
β |
Multiple views with min_size/max_size |
β 3 views |
| Developer Console | β Interactive SDK playground & live log console |
tags |
β |
Typed parameters in describe |
β All 4 tools |
| Layer | Algorithm |
|---|---|
| Diff encryption | AES-GCM-256 (ephemeral session keys) |
| PR signing | GPG clearsign / SSH-ED25519 fallback |
| Symbol hashing | SHA-256 |
- Anna AI-Native App: Combines multiple iframe views (
main,inline_inspector,commit_cleaner,screen-console) with real Executa tools and broad Anna Host-API usage βtools.invoke,storage(KV persistence),chat.append_artifact,windowmulti-view, andupload(R2). - Developer Usability Track: Delivers full local GPG/SSH signatures, APS KV persistence, R2 presigned exports, and a real-time Developer Console playground.
dorahacks-anna-shipghost/
βββ app.json # App listing metadata
βββ manifest.json # Anna App manifest (schema: 2)
βββ LICENSE # MIT License
βββ SPONSOR_DEFENSE.md # SDK integration citations
βββ package.json # Project script definitions
βββ bundle/
β βββ index.html # Frontend SPA structure
β βββ styles.css # Glassmorphism dark theme
β βββ app.js # State engine, SDK bridge & fallback mocks
β βββ anna-tool-ids.js # Auto-generated tool bindings
β βββ apple-touch-icon.png # Mobile browser bookmark icon
β βββ icon.svg # Embedded app icon
βββ executas/
β βββ shipghost/
β βββ pyproject.toml # Executa package configuration
β βββ executa.json # Executa config (host_capabilities, distribution)
β βββ plugin.py # Stdio JSON-RPC handler + AES + GPG + APS KV + R2
βββ fixtures/
β βββ seed.jsonl # Dev fixture data for offline testing
βββ data/
β βββ fixtures/
β βββ git_seed.jsonl # Seed git diff data
βββ docs/
β βββ AUDIT_REPORT.md # Threat model and invariants
β βββ friction-log.md # Integration friction log
β βββ icon.svg # Document icon
β βββ readme-hero.svg # Tactical vector header SVG
β βββ assets/ # HTML templates and asset generators
β βββ screenshots/ # Step-by-step UX walkthrough screenshots
βββ public/
β βββ icon.svg # Standalone app icon SVG
β βββ og-image.png # Open Graph banner PNG
β βββ pitch.html # Standalone marketing pitch deck HTML
βββ scripts/
β βββ bench.py # Latency and recall benchmarks
β βββ verify_offline.py # Air-gapped container test
β βββ record-shipghost.mjs # Puppeteer demo recording
βββ tests/
βββ test_plugin.py # Complete unit tests (100% offline coverage)
- Python β₯ 3.10
- Node.js β₯ 20
- Git
- Clone the codebase:
git clone https://github.com/edycutjong/shipghost.git cd shipghost - Set up virtual environment:
python3 -m venv venv source venv/bin/activate pip install -e executas/shipghost - Install npm dependencies:
Installs the required
@anna-ai/clidevDependency locally:npm install
- Run in Anna dev harness:
npm run dev # or npx anna-app dev .
ShipGhost utilizes a multi-stage CI pipeline verifying quality, cryptography, and offline safety.
# Run unit and integration tests (100+ assertions)
PYTHONPATH=. python3 tests/test_plugin.py
# Verify offline/air-gapped capability
python3 scripts/verify_offline.py
# Run performance and latency benchmarks
python3 scripts/bench.py| Layer | Tool | Status |
|---|---|---|
| Code Quality | Flake8 | β Passing |
| Unit Testing | 100+ parameterized assertions | β Passing (100%) |
| Security (SAST) | TruffleHog Secret Scanning | β Passing |
| Air-gap Audit | verify_offline.py (Socket blockers) | β Passing |
| Performance | bench.py (Diff walk latency checks) | β Passing (<30ms) |
This project is licensed under the MIT License β see the LICENSE file for details.
Built for the Anna AI-Native App Hackathon 2026. Special thanks to the Google DeepMind team.





