[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-110092":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":11,"subscribersCount":11,"size":11,"stars1d":11,"stars7d":14,"stars30d":15,"stars90d":11,"forks30d":11,"starsTrendScore":11,"compositeScore":16,"rankGlobal":8,"rankLanguage":8,"license":8,"archived":17,"fork":17,"defaultBranch":18,"hasWiki":19,"hasPages":17,"topics":20,"createdAt":8,"pushedAt":21,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":11,"starSnapshotCount":11,"syncStatus":14,"lastSyncTime":25,"discoverSource":26},110092,"ai-context-hub","xuejh9-png\u002Fai-context-hub","xuejh9-png",null,"Python",104,0,78,1,2,8,35.8,false,"main",true,[],"2026-10-15 07:04:21","2026-11-19 08:46:26","# AI Context Hub\n\n**Project context, approved task packets and UAT feedback that travel across AI tools — without a new agent server.**\n\n*跨 AI 的项目上下文共享、已批准任务包与 UAT 缺陷闭环，而不是另一个聊天机器人。*\n\n**v0.3.0 · Git + Markdown · On-demand · Python 3.10+ · No model API required**\n\n[中文：项目背景、痛点与价值](docs\u002FWHY_IT_EXISTS_ZH.md) · [中文部署指南](docs\u002FDEPLOYMENT_ZH.md) · [Architecture](docs\u002FARCHITECTURE.md) · [Task packets & UAT](docs\u002FTASK_PACKET.md) · [Source onboarding](docs\u002FSOURCE_ONBOARDING.md) · [Security](docs\u002FSECURITY.md) · [3-agent pilot runbook](docs\u002FPILOT_RUNBOOK.md)\n\n## Why this project exists\n\nWorking with multiple AI tools introduces a coordination problem: **the work may move between tools, but project context and evidence do not reliably move with it.** Chat sharing links are not general-purpose conversation APIs, and manually pasting long chats leads to stale context, repeated explanations, lost decisions, and unverifiable claims of completion.\n\nAI Context Hub solves a narrower, practical problem: **on request, each authorized agent can read the same project record and publish an attributable handoff that another agent can inspect and verify.**\n\n| Pain point | What the hub provides |\n| --- | --- |\n| Conversations are isolated across AI apps | Shared, tool-neutral Markdown project context |\n| Re-explaining background at every handoff | On-demand access to goals, constraints, decisions, current status, and recent handoffs |\n| \"Agent A says it is done\" is not evidence | Named handoffs with evidence fields, timestamps and Git commit history |\n| Agent updates can collide or be lost | Unique append-only handoff files, guarded Git sync and explicit conflict handling |\n| An approved plan quietly drifts while it is being built | An approved packet binds its brief, acceptance criteria and asset manifest; a post-approval edit cannot be published |\n| A defect report arrives as another ZIP of the source tree | UAT records reference the tested commit and PR, and are readable in place |\n| A full agent orchestration platform is overkill | CLI built with the Python standard library + Git; no server, database or extra model API |\n\n### Example: a multi-agent software project\n\n1. A human and a planning AI agree on the scope and record the approved decisions.\n2. An implementation agent reads the latest context, makes changes **in the separate application repository**, then writes a factual handoff with test evidence.\n3. A reviewer agent reads the same context and the previous handoff, checks the implementation independently and publishes a second review record.\n4. The planning AI reads both records from the private context repository to continue the discussion without relying on copied chat history.\n\n**The original application source and runtime tests remain the authority for whether a feature actually works.** This tool provides coordination and traceability, not proof-by-self-report.\n\n### What it deliberately does not do\n\n- No automatic capture or mirroring of complete ChatGPT, Codex, WorkBuddy, or other chat sessions.\n- No live shared model memory, hidden-state access, autonomous task scheduling, or always-on agents.\n- No guarantee that every AI tool has read\u002Fwrite access: credentials and permissions must be configured and verified per tool.\n- No promise of lower token spend, faster delivery, or fewer bugs without measuring those outcomes in real workflows.\n- No complete secret-scanning guarantee; humans must review what is uploaded to any remote, including a private one.\n\nSee the [Chinese project story and problem\u002Fsolution guide](docs\u002FWHY_IT_EXISTS_ZH.md) for the product rationale, practical workflow, system boundaries, and acceptance criteria.\n\n## Architecture\n\n```text\nYou approve the plan, then trigger a sync or publish\n          |\nChatGPT \u002F WorkBuddy \u002F Codex\n          | (Git clone\u002Fpull\u002Fpush or an authorized GitHub connector)\n          v\nPRIVATE Git repository: my-ai-context\n    projects\u002F\u003Cid>\u002FPROJECT_CONTEXT.md\n    projects\u002F\u003Cid>\u002FDECISIONS.md\n    projects\u002F\u003Cid>\u002FCURRENT_STATUS.md\n    projects\u002F\u003Cid>\u002Fhandoffs\u002F\u003Cunique id>.md  (append-only agent logs)\n    projects\u002F\u003Cid>\u002Ftasks\u002F\u003Ctask-id>\u002F         (approved implementation packet)\n        BRIEF.md  ACCEPTANCE.md  ASSETS.md\n        APPROVAL.md                        binds the approved packet text to SHA-256 hashes\n        assets\u002F\u003Capproved files>            hash-verified evidence images\n    projects\u002F\u003Cid>\u002Fuat\u002F\u003Cfeedback-id>\u002F       (append-only UAT defect records)\n        UAT_FEEDBACK.md  ASSETS.md  assets\u002F\u003Cscreenshots>\n          |\n          v\nApplication\u002Fsource-code repositories: branches, PRs, tests, builds (separate)\n\nPUBLIC Git repository: ai-context-hub (this implementation + safe examples only)\n```\n\n## Requirements\n\n- Python 3.10+ and Git (no pip dependencies, server, database or model API)\n- Access to a **private** Git repository for project records\n- User-approved credentials on each participating machine\u002Fconnector\n\n## Quick start\n\nFirst create a private, initialized repository in GitHub named e.g. `my-ai-context` (or use your own remote), then clone it locally. These commands run *inside your private clone*:\n\n```bash\npython \u002Fpath\u002Fto\u002Fai-context-hub\u002Fsrc\u002Fach.py --root . init --project demo --name \"Demo Project\"\npython \u002Fpath\u002Fto\u002Fai-context-hub\u002Fsrc\u002Fach.py --root . validate --project demo\n# First-time bootstrap files need review and an initial commit:\ngit add projects\u002Fdemo && git commit -m \"Initialize demo context\" && git push\npython \u002Fpath\u002Fto\u002Fai-context-hub\u002Fsrc\u002Fach.py --root . read --project demo --sync\npython \u002Fpath\u002Fto\u002Fai-context-hub\u002Fsrc\u002Fach.py --root . handoff --project demo --agent workbuddy --task \"Inspect\" --result \"Read files\" --evidence \"commit abc123\" --status VERIFIED\npython \u002Fpath\u002Fto\u002Fai-context-hub\u002Fsrc\u002Fach.py --root . sync-push --project demo\n```\n\nThe default `read` is local; `read --sync` first fetches and fast-forwards to the latest remote state. Never claim you read *current* shared context when your pull failed.\n\n`sync-push` accepts **only newly created handoff Markdown files**. It refuses unrelated or tracked file changes. Decisions and status updates require separate, explicitly reviewed commits\u002FPRs, avoiding agent overwrite of shared decisions. Concurrent independent handoffs are supported through unique filenames and guarded Git pushes. No forced pushes.\n\nConfigure a Git author name and email in each clone before publishing. `sync-push`\nchecks author\u002Fcommitter identity before staging. If signing or a commit hook fails,\nit unstages only the attempted logs and leaves their files intact. If a push fails,\nlogs remain committed locally: fix the connection\u002Fpermissions and rerun the same\ncommand. It checks every unpublished commit and refuses unrelated changes,\nexisting-log edits, unsafe files and detected credentials before pushing.\n\nConcurrent updates from separate clones append a merge commit without rewriting\neither handoff commit. A filename collision stops for manual review, even when\nthe contents match. Sync\u002Fpublish commands and the multi-file approval, asset-manifest\nand UAT-status updates share a per-checkout lock;\nuse separate clones for separate agents and do not run external Git mutations\nduring a sync. After a process crash, inspect `.git\u002Fach-sync.lock` and confirm no\nsync is running before manually removing a stale lock. No automatic lock stealing.\n\n### v0.2 workflow: packet → implementation → UAT\n\n```bash\n# Prove the access this workflow depends on before promising a review\npython ...\u002Fach.py --root . onboard-check --source-repo git@github.com:you\u002Fdemo-app.git --prove-push\n\n# Draft, approve and publish an implementation packet\npython ...\u002Fach.py --root . task-new --project demo --task task-1 --title \"Fix checkout copy\" \\\n    --accountable workbuddy --source-repo git@github.com:you\u002Fdemo-app.git \\\n    --scope \"Correct the checkout button label.\" --expected \"Label is correct and tests pass.\"\npython ...\u002Fach.py --root . task-asset  --project demo --task task-1 --file .\u002Fapproved-mock.png \\\n    --origin \"approved design mock\" --approved-by \u003Cyou>\npython ...\u002Fach.py --root . task-approve --project demo --task task-1 --approved-by \u003Cyou> \\\n    --statement \"Approved: this revision is the one to build.\"\npython ...\u002Fach.py --root . task-publish --project demo --task task-1\n\n# An agent reads the packet, implements elsewhere, and records real evidence\npython ...\u002Fach.py --root . task-read --project demo --task task-1 --sync\npython ...\u002Fach.py --root . handoff --project demo --agent workbuddy --task \"Implement task-1\" \\\n    --result \"Changed the checkout label\" --evidence \"commit \u003Csha>\" \\\n    --source-repo git@github.com:you\u002Fdemo-app.git --branch fix\u002Fcheckout-copy --code-sha \u003Csha> \\\n    --pr https:\u002F\u002Fgithub.com\u002Fyou\u002Fdemo-app\u002Fpull\u002F12 --build \"npm test\" --tests \"12 passed\" \\\n    --acceptance PENDING --status VERIFIED\n\n# The human tests the build and reports a defect without sending a ZIP\npython ...\u002Fach.py --root . uat-new --project demo --task task-1 --reporter \u003Cyou> \\\n    --source-repo git@github.com:you\u002Fdemo-app.git --tested-commit \u003Csha> \\\n    --environment \"macOS 15 \u002F build 2026-10-14\" --steps \"1. Open checkout  2. Click Pay\" \\\n    --expected \"Payment starts\" --observed \"Button does nothing\" --severity high \\\n    --screenshot .\u002Fbug.png\npython ...\u002Fach.py --root . uat-publish --project demo --feedback \u003Cid>\npython ...\u002Fach.py --root . uat-status  --project demo --feedback \u003Cid> --status fixed \\\n    --by codex --related-pr https:\u002F\u002Fgithub.com\u002Fyou\u002Fdemo-app\u002Fpull\u002F13 --note \"regression test added\"\n```\n\nA published packet can never be overwritten: changing it requires a new task id or\nrevision. A published UAT record may only grow — appending a status line or a new\nscreenshot is allowed, rewriting or deleting published content fails closed.\n\nApproval and UAT author names are recorded assertions. The CLI preserves and checks them,\nbut does not authenticate a human identity. Host access controls, protected branches and\nhuman review provide that authority. Run `onboard-check --prove-push` for a current write\ntest; seeing an older commit on the remote proves read\u002Fhistory only.\n\nThe full manual 3-agent pilot (planning AI approves, implementation agent builds,\nreviewer agent verifies, human runs UAT) is in the\n[3-agent pilot runbook](docs\u002FPILOT_RUNBOOK.md).\n\n### v0.3 workflow: existing local project → separate private source repository\n\nThis is the step that removes the ZIP. Inspection is read-only; nothing is staged, committed\nor pushed until you approve the exact file list.\n\n```bash\n# 1. Look before touching anything (read-only: writes nothing into the project)\npython ...\u002Fach.py source-inspect --path \"$HOME\u002FDesktop\u002FSome Project\"\n\n# 2. Create the destination PRIVATE repository, then plan the upload\nmkdir -p ~\u002Fsource-onboarding\u002Fsome-project\npython ...\u002Fach.py source-plan \\\n    --path \"$HOME\u002FDesktop\u002FSome Project\" --project some-project \\\n    --dest git@github.com:you\u002Fsome-project.git \\\n    --workdir ~\u002Fsource-onboarding\u002Fsome-project \\\n    --mode snapshot --deny 'artifacts\u002F*' \\\n    --authorize \"\u003Cyou>\" --statement \"Approved: first upload of the reviewed file list\"\n# -> prints one approval digest binding destination, mode, planned HEAD and the exact\n#    file list in SOURCE_MANIFEST.txt\n#    --mode snapshot publishes ONE commit with only these files and never uploads the\n#    project's own history; --mode history (default) publishes the existing commits\n\n# 3. Read the manifest, then approve that digest\npython ...\u002Fach.py source-publish --workdir ~\u002Fsource-onboarding\u002Fsome-project \\\n    --approve-manifest \u003Cdigest>\n\n# 4. Prove the upload with an independent fresh clone\npython ...\u002Fach.py source-verify --workdir ~\u002Fsource-onboarding\u002Fsome-project\n\n# 5. Record what each OTHER tool can actually do — never infer it\npython ...\u002Fach.py source-access --workdir ~\u002Fsource-onboarding\u002Fsome-project \\\n    --tool chatgpt --status pending --evidence \"connector not yet pointed at the repo\"\n# A verified record must include the exact Commit SHA from SOURCE_RESULT.md:\npython ...\u002Fach.py source-access --workdir ~\u002Fsource-onboarding\u002Fsome-project \\\n    --tool codex --status verified --sha \u003Cexact-published-commit> \\\n    --evidence \"independently cloned and read the published commit\"\n```\n\nHard gates: denied file types (`.env`, keys, keystores, databases), credential patterns, and\ndenied paths or contents **anywhere in the project's Git history** refuse history mode outright;\narchives, backups and oversized historical blobs also require snapshot mode. A `github.com`\ndestination is accepted only when the unauthenticated API returns exactly `404` and authenticated\nGit access succeeds; ambiguous API failures are refused. An existing different `origin` is a hard\nrefusal; history mode must still be on the approved branch and HEAD; unrelated history stops\nsnapshot publication instead of forcing; and the immutable commit tree must equal the approved\nmanifest byte for byte before push.\n\n`source-verify` proves only that **this machine** can push and read back. Until a second tool\nrecords a verified read with `source-access`, the summary reports\n`VERDICT: sharing NOT VERIFIED`. See [Source onboarding](docs\u002FSOURCE_ONBOARDING.md).\n\n## Commands\n\n| Command | Effect |\n| --- | --- |\n| `init` | Create a project context with templates (local only) |\n| `read [--sync] [--last N]` | Assemble verified-source context, latest handoffs and a packet\u002FUAT index |\n| `handoff` | Create an independent timestamped report, optionally with implementation evidence |\n| `validate` | Check required files, packet integrity, manifest hashes and credential patterns |\n| `sync-pull` | Fetch + fast-forward remote, refuse dirty tracked files |\n| `sync-push` | Commit\u002Fpush only new handoffs; guarded concurrent updates |\n| `onboard-check` | Verify context read, source-repo read and push permission; `BLOCKED` when unproven |\n| `task-new` | Draft `tasks\u002F\u003Ctask-id>\u002F` with brief, acceptance criteria and asset manifest |\n| `task-approve` | Record the human approval bound to the brief's SHA-256 (runs once per task) |\n| `task-asset` | Register one approved image with size, type, name and hash checks |\n| `task-publish` | Publish an approved, verified packet; never force-pushes or overwrites |\n| `task-read` | Read a packet and re-verify its approval binding and manifest hashes |\n| `uat-new` | Record a standardized defect report with an optional screenshot |\n| `uat-status` | Append a status transition (`reported`\u002F`reproduced`\u002F`fixed`\u002F`re-tested`) |\n| `uat-publish` | Publish a UAT record; published history is append-only |\n| `uat-read` | List or read UAT feedback records with their current status |\n| `source-inspect` | Read-only inspection of a local project before onboarding |\n| `source-plan` | Plan a first upload: exact file list, destination check, owner authorization |\n| `source-publish` | Non-destructive first upload (or later push) of the approved manifest |\n| `source-verify` | Fresh-clone read-back proving the commit SHA and every file byte |\n| `source-access` | Record one other tool's own read access to the source repository |\n\n## Reliability contract\n\n1. Separate `VERIFIED`, `REPORTED_UNVERIFIED`, `PROPOSED`, and `BLOCKED`; the same applies to the UAT statuses.\n2. A status statement requires concrete evidence: repository commit, command output or observable artifact.\n3. Agents write **new** handoff files, never clobber another agent's log.\n4. Major changes to shared decisions require user review.\n5. Publishing a task packet requires a prior human approval record; a brief edited after approval no longer binds and publication is refused.\n6. AI implementation is not human acceptance. `--acceptance PASSED` is refused unless it references a `re-tested` UAT record.\n7. Binary asset upload is only supported through the local CLI. A connector that cannot carry binaries must report that limitation instead of claiming success.\n8. Never store credentials, company confidential records, brokerage details or raw unapproved chat histories.\n9. A new repository is **not** connected merely because it exists; test read\u002Fwrite access for each agent.\n\n## Running tests\n\n```bash\npython -m unittest discover -s tests -v\n```\n\nThe suite builds real temporary bare Git remotes and covers:\n\n- two independent agents publishing handoffs concurrently without overwriting either log;\n- packet publication, read-back from a fresh clone, and idempotent repeated publication;\n- rejected-and-resumed pushes, commit-hook failures, missing Git identity, missing remote and pre-existing local changes — all failing closed with the local bytes preserved;\n- asset manifest\u002Fhash verification plus oversized, spoofed, wrongly-named and traversal-shaped asset rejection;\n- append-only UAT history: status transitions survive, rewrites and deletions fail closed;\n- acceptance gating, so an AI cannot declare human UAT passed without a `re-tested` record;\n- an onboarding verdict that reports `BLOCKED` rather than assuming access;\n- a guard asserting the public repository contains no real project, private repository or customer references.\n\nAll fixtures are synthetic: no real user, business project, chat transcript or private image is used.\n\n## Release status\n\nv0.1.0 published the context and handoff loop. A private-repository handoff was exercised across separate WorkBuddy and Codex runs and independently read through ChatGPT's authorized GitHub connector; this validates the **on-demand record-sharing path** for that particular environment, not automatic cross-platform chat synchronization.\n\nv0.2.0 adds the approved task packet, the hash-verified asset handoff, evidence-based completion records, the UAT defect loop and the fail-closed onboarding check. The local test suite passes on the maintained Python versions (3.10, 3.11, 3.13), and the public package contains no private project records.\n\nThe v0.2 workflow has not yet been exercised end-to-end by a second tool on a real project. Each participating tool still needs its own credential, read\u002Fwrite and read-back verification, which `onboard-check` reports honestly instead of assuming.\n\nv0.3.0 adds **application-source repository onboarding** for the gap recorded in issue #4:\nread-only inspection of an existing local project, a manifest the owner approves by digest, a\nnon-destructive first upload into a separate private repository, an independent fresh-clone\nread-back, and a per-tool access record that keeps \"this machine can read it\" separate from\n\"another AI tool can read it\". Six of the seven acceptance gates from that issue are now\nimplemented and covered by tests; remote repository creation still requires the owner's\naccount authorization and is reported as a setup requirement rather than assumed.\n\nLicense: **not yet chosen**; ask the repository owner before external redistribution or open-source licensing.\n","AI Context Hub 是一个轻量级、无服务器的跨 AI 工具项目上下文协同系统，用于在多个 AI 代理（如规划、实现、评审 agent）间可靠共享项目背景、已批准任务包和 UAT 缺陷反馈。其核心基于 Git + Markdown 实现 append-only 手动触发式上下文同步，支持带时间戳与签名的可验证手交记录、冲突感知的版本化手交文件、以及与源码仓库解耦但可追溯的审批绑定机制。不依赖模型 API、无需部署服务或数据库，仅需 Python 3.10+ 和 Git。适用于多 AI 协同开发、人工-AI 混合评审、UAT 缺陷闭环等强调可审计性与上下文一致性的软件工程场景。","2026-11-24 04:38:02","CREATED_QUERY"]