[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-85105":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":15,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":16,"rankGlobal":10,"rankLanguage":10,"license":17,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":18,"topics":21,"createdAt":10,"pushedAt":10,"updatedAt":31,"readmeContent":32,"aiSummary":10,"trendingCount":15,"starSnapshotCount":15,"syncStatus":33,"lastSyncTime":34,"discoverSource":35},85105,"ghostwork","hvardhan878\u002Fghostwork","hvardhan878","Your personal AI worker. Watches your screen, learns your workflows, automates the repetitive parts. Built on Screenpipe. All local, no cloud, no setup. It gets better every day without you doing anything differently.","",null,"TypeScript",123,1,12,0,36.9,"Other",false,"main",true,[22,23,24,25,26,27,28,29,30],"accesibility","ai","ai-agent","ai-agents","automation","llm","macos","screenpipe","typescript","2026-06-15 10:04:21","# Ghostwork\n\n[![Discord](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-Join%20the%20community-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https:\u002F\u002Fdiscord.gg\u002FHxhDfs4H39)\n[![License: GPL v3](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-GPLv3-blue?style=for-the-badge&logo=gnu&logoColor=white)](LICENSE)\n\n> **The first agent you don't prompt.**\n\nGhostwork runs silently in the background, learns how you work from observation alone, and gradually takes repetitive tasks off your hands — without you ever writing a prompt or setting up an integration.\n\n---\n\n## What it does\n\nGhostwork watches every interaction across every app on your Mac (via [Screenpipe](https:\u002F\u002Fgithub.com\u002Fmediar-ai\u002Fscreenpipe)), builds a rich memory of your work patterns, and surfaces automations the moment they're relevant.\n\n### Memory layers\n\n| Layer | What's stored | How it's built |\n|-------|--------------|----------------|\n| **L1 Working** | Current screen context (app, URL, OCR) | Live, polled every 10 s |\n| **L2 Episodic** | Raw interactions: clicks, keys, navigations, app switches | Ingested every 2 min from Screenpipe's input stream |\n| **L3 Semantic** | Workflows and rules: *\"WHEN on LinkedIn search → DO export to CRM\"* | Promoted nightly from episodic memory via LLM |\n| **L4 Procedural** | Executable skills with step-by-step DOM\u002FAX locators | Promoted nightly from stable semantic rules |\n\n### Nightly consolidation (sleep cycle)\n\nEvery night Ghostwork runs a 3-phase consolidation:\n\n1. **NREM** — LLM analyses unsummarised sessions and promotes patterns to rules  \n2. **REM** — Rules with 3+ observations that have browser-recorded events are compiled into executable skills  \n3. **GC** — Power-law confidence decay, dedup, 90-day prune of raw events, `behaviour.md` rewrite\n\nThe living `behaviour.md` profile is injected into every LLM prompt, so the trigger decision has full context about who you are and what you do.\n\n---\n\n## Autonomy tiers\n\nGhostwork earns autonomy, never assumes it:\n\n| Tier | Triggered when | Behaviour |\n|------|---------------|-----------|\n| **Supervised** | Default for all new rules | Executes immediately, shows HUD notification, Cmd+Z available |\n| **Autonomous** | ≥5 accepts and \u003C2 rejections in last 10 | Runs silently; logged to Activity feed |\n\nActions that are externally visible (send email, submit form, post) always require one-tap approval regardless of tier.\n\n---\n\n## Execution stack\n\n1. **Compiled skill replay** — zero-token deterministic replay of recorded step sequences\n2. **AX-first native control** — `ax_list_elements` + `ax_click_element` via macOS Accessibility API; ~95% accuracy on native apps\n3. **Claude vision fallback** — pixel-level screenshots + function calling for browsers and AX-empty apps\n\nWhen a multi-step sequence fails mid-way, Ghostwork fires Cmd+Z for each completed reversible step in reverse order before surfacing the error.\n\n---\n\n## UI\n\n- **Menu bar icon** — reflects current state: observing \u002F working  \n- **Activity feed** — chronological log of every action taken and approval waiting  \n- **Timeline tab** — drill down into every recorded session; save any session as a skill  \n- **Behaviour tab** — learned rules with autonomy progress, category badges, and one-click boost  \n- **Approvals** — staged actions waiting for your confirmation before executing externally visible steps\n\n---\n\n## Setup\n\n### Prerequisites\n\n- macOS 12+\n- [Screenpipe](https:\u002F\u002Fgithub.com\u002Fmediar-ai\u002Fscreenpipe) installed and running (`screenpipe`)\n- Node.js 20+ and npm\n- An [OpenRouter](https:\u002F\u002Fopenrouter.ai) API key (or Anthropic key)\n\n### Install\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fyour-org\u002Fghostwork\ncd ghostwork\nnpm install\nnpx @electron\u002Frebuild -f -w better-sqlite3\n```\n\n### Configure\n\n```bash\ncp .env.example .env\n```\n\nEdit `.env`:\n\n```env\nOPENROUTER_API_KEY=sk-or-...\nANTHROPIC_API_KEY=sk-ant-...   # optional, used for native computer use\n```\n\n### Run\n\n```bash\nnpm start          # development (hot reload)\nnpm run build      # production build\nnpm run dist       # package as .dmg\n```\n\n---\n\n## Architecture\n\n```\nScreenpipe ──► sessionIngester (2min) ──► raw_events ──► extractor (30min) ──► rules\n                                                                                   │\n                                                                          NREM\u002FREM nightly\n                                                                                   │\n                                                                              compiled skills\n                                                                                   │\n                              actionEngine (10s) ──► LLM trigger ──► AX-first executor\n                                                                    └──► vision fallback\n```\n\nKey files:\n\n| File | Responsibility |\n|------|----------------|\n| `sessionIngester.ts` | 2 min poll → raw_events + per-event prediction scoring |\n| `extractor.ts` | 30 min batch → 7-category structured rule extraction |\n| `consolidation.ts` | Nightly NREM (sessions→rules) + REM (rules→skills) + GC |\n| `actionEngine.ts` | 10 s perception loop + LLM trigger decision + dispatch |\n| `computerUse.ts` | AX-first executor + Claude vision fallback |\n| `axDriver.ts` | macOS accessibility tree (AXUIElement via AppleScript) |\n| `skillEngine.ts` | Browser skill replay with multi-step rollback |\n| `approvals.ts` | Shadow-mode approval queue for externally visible actions |\n| `db.ts` | GhostWork SQLite: rules, episodes, skills, approvals, settings |\n\n---\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for setup instructions and coding guidelines.\n\nOpen issues on GitHub — look for `good first issue` labels. Join the [Discord](https:\u002F\u002Fdiscord.gg\u002FHxhDfs4H39) to discuss ideas or get help getting set up.\n\n---\n\n## Privacy\n\n- All data stays on your device. No cloud sync, no telemetry.\n- Ghostwork excludes itself, Cursor, and any app you add to the exclusion list.\n- Raw events are pruned after 90 days.\n- PII (emails, phone numbers, card numbers) is stripped before any LLM call.\n- The `behaviour.md` profile never leaves your machine.\n\n---\n\n## Roadmap\n\n- [ ] Full autopilot mode: skill execution without any prompt\n- [ ] Cross-session pattern detection in REM phase\n- [ ] Browser extension for richer DOM locators in user's main Chrome profile\n- [ ] Windows support (via Screenpipe Windows builds)\n- [ ] Team profiles (opt-in, anonymised)\n\n---\n\n## Licence\n\nGPL-3.0 — see [LICENSE](LICENSE) for details.\n",2,"2026-06-15 02:30:02","CREATED_QUERY"]