hivemind
CLAUDE.md110 starsChanged 9 months agoApache-2.0View on GitHub
Hivemind is a multi-agent software engineering orchestrator. It takes a user prompt, decomposes it into a DAG of tasks, assigns specialist agents, executes them with dependency awareness, and delivers tested/reviewed code.
In this repository75 other files it gives its agents.
- algorithmic-artSkill
- api-designSkill
- apple-notesSkill
- apple-remindersSkill
- article-writingSkill
- async-pythonSkill
- brand-guidelinesSkill
- camsnapSkill
- canvas-designSkill
- celery-tasksSkill
- claude-apiSkill
- coding-agentSkill
- content-engineSkill
- diffsSkill
- doc-coauthoringSkill
- docker-deploymentSkill
- docxSkill
- e2e-testingSkill
- email-serviceSkill
- fastapi-backendSkill
- frontend-designSkill
- frontend-slidesSkill
- gh-issuesSkill
- githubSkill
- git-workflowSkill
- graphql-apiSkill
- healthcheckSkill
- internal-commsSkill
- investor-materialsSkill
- jwt-authenticationSkill
- market-researchSkill
- mcp-builderSkill
- mermaid-diagramsSkill
- microservicesSkill
- mobile-react-nativeSkill
- model-usageSkill
- nextjs-fullstackSkill
- nodejs-expressSkill
- obsidianSkill
- openai-whisperSkill
- oracleSkill
- pdfSkill
- peekabooSkill
- planning-with-filesSkill
- postgres-databaseSkill
- pptxSkill
- prisma-ormSkill
- proseSkill
- pytest-patternsSkill
- react-typescriptSkill
- redis-cachingSkill
- s3-file-storageSkill
- security-reviewSkill
- session-logsSkill
- skill-creatorSkill
- slack-gif-creatorSkill
- sqlalchemy-ormSkill
- state-managementSkill
- strategic-compactSkill
- stripe-paymentsSkill
- The first 60 shown.
The file
We split this CLAUDE.md into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 63
Add the role to AgentRole enum in contracts.py
- Very specific: line 64
Add agent config in config.py AGENT_REGISTRY
- Very specific: line 65
Add system prompt in prompts.py
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md — Hivemind Project Guide
What is this project?
Hivemind is a multi-agent software engineering orchestrator. It takes a user prompt, decomposes it into a DAG of tasks, assigns specialist agents, executes them with dependency awareness, and delivers tested/reviewed code.
Architecture Overview
User message
→ Triage (_triage_is_simple) # Simple? Skip PM+Architect
→ Architect Agent (architect_agent) # Codebase review → ArchitectureBrief
→ PM Agent (pm_agent) # Decompose → TaskGraph (DAG)
→ LangGraph DAG Executor # select_batch → execute_batch → post_batch → loop
→ Review (read-only critique) # ACC-Collab pattern + lint/format + test safety net
→ Memory Agent # Update project memory with lessons learnedKey Design Decisions
- One DAG per project, always. New messages inject tasks into the live DAG (add or cancel). Never spawn parallel DAGs on the same project. Deferred messages are buffered during PM/Architect phase and drained when the graph is ready.
- Read-only reviewer. The reviewer critiques code but never modifies it. Automated lint/format runs separately. If lint/format breaks tests, changes are reverted to pre-review HEAD.
- Adaptive triage. Simple tasks (short prompt, no complex keywords) skip PM + Architect and go straight to a single fullstack agent. Complex tasks get the full pipeline.
- Writer/Reader separation. Writer agents (modify files) run sequentially under
asyncio.Lock. Reader agents (analysis, research) run in parallel. - Typed contracts.
TaskInput → TaskOutputwith structured artifacts, not free-form text.
Key Files
| File | Purpose |
orchestrator.py | Central coordinator — session lifecycle, triage, DAG dispatch, message injection, event emission |
dag_executor_langgraph.py | LangGraph StateGraph: select_batch → execute_batch → post_batch → review_code. SQLite checkpointing. Self-healing. |
pm_agent.py | PM Agent — decomposes user requests into TaskGraph DAGs. Task count scales with complexity (no forced minimums). |
architect_agent.py | Architect Agent — pre-planning codebase review, produces ArchitectureBrief |
contracts.py | TaskInput, TaskOutput, TaskGraph, TaskStatus — typed contracts for all agent communication |
config.py | All configuration constants (DAG_MAX_CONCURRENT_NODES, agent registry, timeouts, budgets) |
src/workers/task_queue.py | ProjectTaskQueue with per-project asyncio.Lock for writer serialization |
memory_agent.py | Post-execution memory updates + lessons-learned injection |
blackboard.py | Shared state for complexity classification, inter-agent notes |
debate_engine.py | Structured debate for critical tasks (currently proactive, planned: reactive on failure) |
reflexion.py | Self-reflection on failed tasks before retry |
orch_watchdog.py | Agent silence detection (5 stuck signals) + active escalation |
Conventions
- Python 3.11+, async-first (
asyncio). No sync blocking in the event loop. - Linting:
ruff check+ruff format. Run before committing. - Commits: Conventional commits (
feat:,fix:,chore:). One logical change per commit. - No forced minimums: PM agent scales task count to request complexity. A 1-task plan is valid for simple requests.
- No parallel DAGs on same project. This is a hard invariant. Messages buffer, inject, or wait — never spawn a second DAG.
Testing
python3 -m pytest tests/ -v # Full suite
python3 -m pytest tests/ -k "test_name" # Specific test
python3 -c "import py_compile; py_compile.compile('file.py', doraise=True)" # Quick syntax checkCommon Patterns
Adding a new agent role
- Add the role to
AgentRoleenum incontracts.py - Add agent config in
config.pyAGENT_REGISTRY - Add system prompt in
prompts.py - The DAG executor will automatically dispatch to it based on
TaskInput.role
Modifying the DAG execution loop
The LangGraph graph is built in build_dag_graph() at the bottom of dag_executor_langgraph.py:
START → select_batch → execute_batch → post_batch → should_continue → (loop or review_code or END)Each node is an async function that takes DAGState and returns a partial state update dict.
Injecting tasks mid-execution
orchestrator.py:_inject_user_tasks() calls PM to decompose the new message, then uses graph.add_task() / graph.remove_task() to modify the live TaskGraph. The executor's select_batch will discover new tasks via ready_tasks() in the next round.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

