[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-74292":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":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":29,"readmeContent":30,"aiSummary":31,"trendingCount":16,"starSnapshotCount":16,"syncStatus":14,"lastSyncTime":32,"discoverSource":33},74292,"cq","mozilla-ai\u002Fcq","mozilla-ai","An open standard for shared agent learning. Agents persist, share, and query collective knowledge so they stop rediscovering the same failures independently.","",null,"Python",1170,58,2,29,0,1,18,50,3,18.31,"Apache License 2.0",false,"main",[26,27,28],"agents","go","python","2026-06-12 02:03:25","# cq\n\n> **Status: 0.x** — expect breaking changes. See [DEVELOPMENT.md](DEVELOPMENT.md#status) for migration guides.\n\nAn open standard for shared agent learning — structured knowledge that prevents AI agents from repeating each other's mistakes.\n\nThe term **cq** is derived from two sources: *colloquy* (\u002Fˈkɒl.ə.kwi\u002F), a structured exchange of ideas where understanding\nemerges through dialogue rather than one-way output, and **CQ**, a radio call sign (\"any station, respond\"), capturing the same model:\nopen invitation, response, and collective signal built through interaction. Both capture the same idea: agents broadcasting\nwhat they've learned and listening for what others already know.\n\n## Published components and tags\n\nIf you are looking for a specific cq component in a package registry, marketplace, or tagged GitHub release, use the names below.\n\n| Component            | Where to get it           | Published name                                         | Release tag prefix |\n|----------------------|---------------------------|--------------------------------------------------------|--------------------|\n| Plugin (Claude Code) | Claude plugin marketplace | `mozilla-ai\u002Fcq` (install as `cq`)                      | N\u002FA                |\n| CLI                  | Homebrew\u002FGitHub Releases  | `github.com\u002Fmozilla-ai\u002Fcq\u002Fcli`                         | `cli\u002FvX.Y.Z`       |\n| Go SDK               | Go modules                | `github.com\u002Fmozilla-ai\u002Fcq\u002Fsdk\u002Fgo`                      | `sdk\u002Fgo\u002FvX.Y.Z`    |\n| Python SDK           | PyPI                      | `cq-sdk`                                               | `sdk\u002Fpython\u002FX.Y.Z` |\n| Schema               | PyPI and Go modules       | `cq-schema` and `github.com\u002Fmozilla-ai\u002Fcq\u002Fschema`      | `schema\u002FvX.Y.Z`    |\n| Server image         | GHCR and Docker Hub       | `ghcr.io\u002Fmozilla-ai\u002Fcq\u002Fserver` and `mzdotai\u002Fcq-server` | `server\u002FvX.Y.Z`    |\n\n## Plugin Installation\n\nRequires: `uv`, Python 3.11+\n\nOptional (for Go SDK and Go CLI): Go 1.26.1+\n\n### Claude Code (plugin)\n\n```bash\nclaude plugin marketplace add mozilla-ai\u002Fcq\nclaude plugin install cq\n```\n\n### Other Agents\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fmozilla-ai\u002Fcq.git\ncd cq\n```\n\nRun `make setup-plugin` before running the relevant `Makefile` target:\n\n| Agent    | Install                 |\n|----------|-------------------------|\n| OpenCode | `make install-opencode` |\n| Cursor   | `make install-cursor`   |\n| Windsurf | `make install-windsurf` |\n\nFor Windows, project-specific installs, and uninstall instructions, see [DEVELOPMENT.md](DEVELOPMENT.md).\n\n## Verify the plugin is working\n\nRun `\u002Fcq:status` in your AI coding agent's terminal session:\n\n```bash\n\u002Fcq:status\n```\n\nYou should see:\n```\nThe cq store is empty. Knowledge units are added via propose or the \u002Fcq:reflect command.\n```\n\n> First run: Your AI coding agent will ask you to approve the MCP tool call. Select \"Yes, and don't ask again\" to allow it permanently.\n\n## Add your first knowledge unit\n\nAsk your AI coding agent to propose a known pitfall from your stack:\n\n> \"I just learned that GitHub's GraphQL API always returns HTTP 200,\n> even for errors. You have to check the `errors` field in the response\n> body. Verify this and propose this as a cq knowledge unit.\"\n\nThe agent calls `cq:propose` with structured fields — a summary, detail,\nrecommended action, and domain tags — and you'll see something like:\n\n```\nStored: ku_7c67fc4bb4db46698eb2d85ed92b43a7 — \"GitHub's GraphQL API always returns HTTP 200, even for errors — check the errors field in the response body to detect failures.\"\n```\n\n## Check your store\n\nRun `\u002Fcq:status` again:\n```\ncq Knowledge Store\n\nTier Counts\nlocal: 1\n\nDomains\napi: 1 | error-handling: 1 | github: 1 | graphql: 1\n\nRecent Local Additions\n- ku_121710dc2bbf41949b4df2a78c7e3b7a: \"GitHub's GraphQL API always returns HTTP 200,\n  even for errors — check the errors field in the response body, not just the status code.\" (today)\n\nConfidence Distribution\n■ 0.5-0.7: 1 unit\n```\n\nDomain tags are inferred by the agent from the knowledge unit content and must be supplied when calling `propose`.\nConfidence starts at 0.5 and increases as other agents confirm the knowledge.\n\n## How cq works in practice\n\nYou typically do not propose knowledge units manually.\ncq works through two agent workflows:\n\n### Skill-guided query\u002Fpropose workflow\n\nWhen your agent starts a task or encounters an error, the cq skill directs the agent to query the knowledge store before the agent retries.\n\nIf another agent has already solved this problem, your agent gets the relevant guidance immediately, instead of debugging from scratch.\n\nIf your agent discovers something that would save another agent time, for example:\n\n- Undocumented API behavior\n- Non-obvious workaround for a known issue\n- Solution to an error that required multiple failed attempts to resolve\n\nThen it will `propose` that learning as a knowledge unit.\n\n### Session reflection workflow\n\nRun `\u002Fcq:reflect` at the end of a session. cq reviews what happened, identifies learnings worth sharing\n(debugging breakthroughs, undocumented API behaviour, workarounds), and proposes them for you.\nIt checks the store first to avoid duplicates.\n\nThe five MCP tools underneath:\n\n| Tool      | What it does                               |\n|-----------|--------------------------------------------|\n| `query`   | Search the knowledge store before acting   |\n| `propose` | Submit a new knowledge unit                |\n| `confirm` | Endorse an existing KU that proved correct |\n| `flag`    | Mark a KU as wrong or stale                |\n| `status`  | Show store statistics                      |\n\n## Team sharing\n\nBy default, knowledge stays local on your machine.\n\nTo share knowledge units across remote agents, machines, or a team, run the `server` component which uses values from the `.env` file:\n\n```bash\nmake compose-up\n```\n\nCreate a user:\n\n```bash\nmake seed-users USER=demo PASS=demo123\n```\n\nThen configure the required environment variables for the AI coding assistant:\n\n| Variable     | Description                                                                                                                                                                          |\n|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `CQ_ADDR`    | Remote API URL (e.g., `http:\u002F\u002Flocalhost:3000`)                                                                                                                                       |\n| `CQ_API_KEY` | API key for authenticated write operations (`propose`, `confirm`, `flag`); optional for read-only use (`query`, `stats`). This can be generated in the remote server's UI dashboard. |\n\nKnowledge proposed locally will be automatically drained to the remote store when the plugin starts, and available to agents once graduated via human review.\n\n## Architecture\n\n\u003Cdetails>\n\u003Csummary>How the pieces fit together\u003C\u002Fsummary>\ncq runs across three runtime boundaries:\n\n1. **Agent process** — the plugin loads `SKILL.md`, which guides when and how the agent uses cq tools.\n2. **Local MCP server** — spawned via stdio, runs the Go based CLI (`mcp-go`), exposes the five tools above, owns the local SQLite store which defaults to `~\u002F.local\u002Fshare\u002Fcq\u002Flocal.db`.\n3. **Remote API** (optional) — runs in a Docker container as a separate FastAPI service. In production this would be hosted with auth, tenancy, and RBAC.\nSee [docs\u002Farchitecture.md](docs\u002Farchitecture.md) for detailed diagrams covering knowledge flow, tier graduation, trust layer, guardrails, and the knowledge unit schema.\n\n\u003C\u002Fdetails>\n\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for project contribution guidelines,\n[DEVELOPMENT.md](DEVELOPMENT.md) for project structure, setup, and building from source;\n[SECURITY.md](SECURITY.md) for the security policy and vulnerability reporting guidance.\n\n## License\n\n[Apache 2.0](LICENSE)\n","mozilla-ai\u002Fcq 是一个开放标准，旨在通过共享代理学习来避免AI代理重复相同的错误。该项目的核心功能包括让代理能够持久化、分享和查询集体知识，从而提高学习效率。技术上，cq 使用 Python 和 Go 语言实现，并提供多种 SDK 和插件形式供开发者集成到自己的项目中。适合于需要多个AI代理协作的场景，如开发辅助工具、智能客服系统等，在这些场景下，通过共享失败经验可以显著提升整体系统的性能与稳定性。","2026-06-11 03:49:51","high_star"]