{"id":51548191,"url":"https://github.com/meharajm/context-machine","last_synced_at":"2026-07-09T21:00:16.210Z","repository":{"id":367622997,"uuid":"1281347191","full_name":"meharajM/context-machine","owner":"meharajM","description":"Team Project Memory skill for shared AI agent project knowledge, plus ContextEngine MCP","archived":false,"fork":false,"pushed_at":"2026-07-09T19:58:22.000Z","size":317,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-09T20:12:08.328Z","etag":null,"topics":["agent-memory","agent-skills","ai-agents","claude-code","cline","codex","copilot","cursor","devin","knowledge-base","mcp","project-memory","shared-memory","team-memory"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meharajM.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-26T13:14:36.000Z","updated_at":"2026-07-09T19:58:26.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/meharajM/context-machine","commit_stats":null,"previous_names":["meharajm/context-machine"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/meharajM/context-machine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meharajM%2Fcontext-machine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meharajM%2Fcontext-machine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meharajM%2Fcontext-machine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meharajM%2Fcontext-machine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meharajM","download_url":"https://codeload.github.com/meharajM/context-machine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meharajM%2Fcontext-machine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35312540,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-09T02:00:07.329Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-memory","agent-skills","ai-agents","claude-code","cline","codex","copilot","cursor","devin","knowledge-base","mcp","project-memory","shared-memory","team-memory"],"created_at":"2026-07-09T21:00:15.502Z","updated_at":"2026-07-09T21:00:16.186Z","avatar_url":"https://github.com/meharajM.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Team Project Memory Skill\n\nShared project memory and team knowledge graph for developer teams, AI coding agents, and multi-agent swarms.\n\nUse this when a development team, AI agent team, or multi-agent swarm using Codex, Claude Code, Cursor, GitHub Copilot, Devin, Cline, or other agents wants reusable repo learnings, solved bugs, failed attempts, debugging paths, confidence, and next-reuse instructions in git without overriding repo-local instructions.\n\nSearch terms: team project memory, developer team memory, shared AI memory, multi-agent memory, agent swarm memory, swarm coordination, shared knowledge graph, project knowledge graph, repo learnings, debugging history, failed attempts, solved bugs.\n\nThe v1 product is skill-first. It does not require the ContextEngine MCP server.\n\n## Install\n\nInstall the skill-only npm package for discovery:\n\n```bash\nnpm view @mhrj/team-project-memory-skill\n```\n\nInstall with the open Skills CLI for all supported local agents:\n\n```bash\nnpx skills add meharajM/context-machine --skill team-project-memory --agent '*' -g -y\n```\n\nList the available skills in this repo:\n\n```bash\nnpx skills add meharajM/context-machine --list\n```\n\nInstall the skill directly with Codex Skill Installer:\n\n```bash\npython3 ~/.codex/skills/.system/skill-installer/scripts/install-skill-from-github.py \\\n  --repo meharajM/context-machine \\\n  --path skills/team-project-memory\n```\n\nIf the direct GitHub download path fails because of local Python certificate setup, use the installer git fallback:\n\n```bash\npython3 ~/.codex/skills/.system/skill-installer/scripts/install-skill-from-github.py \\\n  --repo meharajM/context-machine \\\n  --path skills/team-project-memory \\\n  --method git\n```\n\nThis is the recommended v1 path. The skill is the product surface for team project memory and multi-agent project knowledge sharing; it does not require the ContextEngine MCP server.\n\nOptional Codex plugin install from this repo:\n\n```bash\ncodex plugin marketplace add meharajM/context-machine --ref main\ncodex plugin add team-project-memory@context-machine-team\n```\n\nFor local development against this checkout:\n\n```bash\ncodex plugin marketplace add /Users/meharaj/context-machine\ncodex plugin add team-project-memory@context-machine-team\n```\n\nAfter installing, start a new Codex thread so the skill list refreshes.\n\nThe npm package below is for the existing ContextEngine MCP server. Team Project Memory can be used without installing or running that MCP server.\n\n## Optional ContextEngine MCP\n\nThis repo also contains the older ContextEngine MCP server. It is optional infrastructure for teams that later want MCP-based retrieval, sync, or patch workflows.\n\n```bash\nnpm install -g @mhrj/contextengine-mcp\n```\n\nOr run it without a global install:\n\n```bash\nnpx -y @mhrj/contextengine-mcp\n```\n\n## MCP config\n\n```json\n{\n  \"mcpServers\": {\n    \"contextengine\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@mhrj/contextengine-mcp\"]\n    }\n  }\n}\n```\n\nTo store data somewhere other than `~/.contextengine`, pass `--root`:\n\n```json\n{\n  \"mcpServers\": {\n    \"contextengine\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@mhrj/contextengine-mcp\", \"--root\", \"/path/to/context-root\"]\n    }\n  }\n}\n```\n\n## Configuration\n\nConfig is loaded from `~/.contextengine.json` by default, with env vars overriding file values and `--root` taking final precedence.\n\nExample config:\n\n```json\n{\n  \"root\": \"~/.contextengine\",\n  \"sync\": {\n    \"mode\": \"git\",\n    \"repo\": \"git@github.com:you/context.git\",\n    \"branch\": \"main\",\n    \"autoPush\": true\n  },\n  \"storage\": {\n    \"mode\": \"global\"\n  },\n  \"patches\": {\n    \"expiryDays\": 30\n  }\n}\n```\n\nExample env vars:\n\n```bash\nCONTEXT_ENGINE_ROOT=~/.contextengine\nCONTEXT_ENGINE_SYNC_MODE=git\nCONTEXT_ENGINE_GIT_REPO=git@github.com:you/context.git\nCONTEXT_ENGINE_GIT_BRANCH=main\nCONTEXT_ENGINE_GDRIVE_FOLDER_ID=folder-id\nCONTEXT_ENGINE_GDRIVE_CREDENTIALS=~/.contextengine/.gdrive-credentials.json\n```\n\n## Context tools\n\n| Tool | Purpose |\n|------|---------|\n| `init_context` | Create a new project context with default sections and directories. |\n| `read_context` | Read the full `context.md` or a single topic section. |\n| `append_capture` | Append a timestamped note under a topic, optionally mirrored into `sources/`. |\n| `search_context_topics` | Search `context.md` and archived `topics/` files. |\n| `log_agent_outcome` | Append a structured agent outcome tagged with `session_id`. |\n| `compact_topic` | Archive an old topic body and replace it with a summary. |\n| `propose_context_patch` | Submit a full proposed `context.md` body and store a reviewable diff. |\n| `list_pending_patches` | List pending patches and clean up expired ones. |\n| `reject_context_patch` | Reject a pending patch. |\n| `apply_context_patch` | Apply a pending patch to `context.md`. |\n| `undo_context_patch` | Restore the latest `context.md` backup. |\n\n## Legacy compatibility\n\nThe server also ships the original `agent-loop-mcp` workflow so existing clients can migrate without breaking.\n\n| Tool | Purpose |\n|------|---------|\n| `init_loop` | Start a legacy loop session. |\n| `log_step` | Append a step to active context and enforce self-healing on failures. |\n| `compact_memory` | Summarize the active context into compacted history. |\n| `report_blocker` | Mark a loop session as blocked. |\n| `resume_loop` | Resume a blocked loop with human input. |\n| `get_tool_suggestions` | Return fallback guidance when an agent is stuck. |\n\nLegacy resource:\n\n| Resource | Purpose |\n|----------|---------|\n| `loop://{session_id}` | Read the raw markdown state of a legacy loop session. |\n\nContext resource:\n\n| Resource | Purpose |\n|----------|---------|\n| `contextengine://{project}/context` | Read the markdown state of a project context. |\n\n## Recommended workflow\n\n1. Call `init_context` once per project.\n2. Start each session with `read_context`.\n3. Use `append_capture` or `log_agent_outcome` for append-only facts.\n4. Use `propose_context_patch` for broader edits that should be reviewed.\n5. Use `list_pending_patches`, then `apply_context_patch` or `reject_context_patch` on explicit approval.\n6. Use `compact_topic` when sections become too large.\n\n## Sync modes\n\n### Git\n\nSet:\n\n```json\n{\n  \"sync\": {\n    \"mode\": \"git\",\n    \"repo\": \"git@github.com:you/context.git\",\n    \"branch\": \"main\",\n    \"autoPush\": true\n  }\n}\n```\n\nBehavior:\n\n- Initializes a git repo under the context root if needed.\n- Sets a local sync identity if none is configured.\n- Stages and commits changed files.\n- Pushes to the configured branch.\n\n### Google Drive\n\nSet:\n\n```json\n{\n  \"sync\": {\n    \"mode\": \"gdrive\",\n    \"gdriveFolderId\": \"your-folder-id\",\n    \"gdriveCredentials\": \"~/.contextengine/.gdrive-credentials.json\",\n    \"autoPush\": true\n  }\n}\n```\n\nBehavior:\n\n- Uploads each `projects/\u003cproject\u003e/context.md` to the configured Drive folder as `\u003cproject\u003e-context.md`.\n- Updates existing files in place when names match.\n- Run `npm run smoke:gdrive` with real `CONTEXT_ENGINE_GDRIVE_FOLDER_ID` and `CONTEXT_ENGINE_GDRIVE_CREDENTIALS` to validate a live upload and clean up the smoke file.\n\n## Onboarding checklist\n\n- Install the server or configure `npx`.\n- Create `~/.contextengine.json` or set the relevant env vars.\n- Decide whether sync should be `none`, `git`, or `gdrive`.\n- Run `init_context` for the first project.\n- Confirm `read_context` returns the created document.\n- If you rely on review gates, use `propose_context_patch` instead of broad direct rewrites.\n\n## Development\n\n```bash\nnpm install\nnpm run lint\nnpm test\nnpm run build\nnpm run smoke:mcp\nnpm run test:integration\nnpm run smoke:protocol\nnpm run smoke:package\nnpm run verify\nnpm publish --dry-run --access public\n\n# Optional, requires live Google Drive credentials\nnpm run smoke:gdrive\n```\n\n## Current verification\n\nThis list describes local verification for a beta candidate. It is not a full\npublic-release claim by itself: production Drive support still needs a live\n`npm run smoke:gdrive` pass with real credentials, and full public release\nreadiness still depends on the host, mobile, and PMF field gates in\n`docs/release-gate.md`.\n\n- Build: `npm run build`\n- Test suite: `npm test`\n- MCP stdio smoke: `npm run smoke:mcp`\n- MCP integration and concurrency subset: `npm run test:integration`\n- Raw MCP protocol smoke against the built server: `npm run smoke:protocol`\n- Packed npm artifact smoke after `npm pack` + install: `npm run smoke:package`\n- Full local validation pipeline: `npm run verify`\n- Git sync: covered by an automated local bare-remote test\n- Google Drive sync: create/update behavior is covered by automated tests; production Drive support should only be claimed after `npm run smoke:gdrive` passes with real `CONTEXT_ENGINE_GDRIVE_FOLDER_ID` and `CONTEXT_ENGINE_GDRIVE_CREDENTIALS`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeharajm%2Fcontext-machine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeharajm%2Fcontext-machine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeharajm%2Fcontext-machine/lists"}