### Start agents-web dev server Source: https://github.com/agentdmai/teamfuse/blob/main/README.md Starts the agents-web development server. Copies the example environment file, installs dependencies, and runs the dev server. Open http://127.0.0.1:3005 to see one breaker card per agent, all stopped. Flip the first Start to fork the wrapper, update status.json, and fill the log modal with tick output. ```bash cd agents-web cp .env.example .env.local npm install npm run dev ``` -------------------------------- ### Verify setup with agents-web Source: https://github.com/agentdmai/teamfuse/blob/main/SETUP.md Run these commands to install dependencies, typecheck, and start the dev server. Open http://127.0.0.1:3005; the table should have one breaker per entry in agents.config.json, all stopped. Press Start on one to see the state flip, sleep countdown, and log modal fill with wrapper output. ```bash cd agents-web npm install npm run typecheck npm run dev ``` -------------------------------- ### Development commands for the website Source: https://github.com/agentdmai/teamfuse/blob/main/website/README.md Run these commands from the website directory to install dependencies and start the development server. The dev server is available at http://127.0.0.1:3006. ```bash cd website npm install npm run dev # open http://127.0.0.1:3006 ``` -------------------------------- ### Setup commands for agents-web Source: https://github.com/agentdmai/teamfuse/blob/main/agents-web/README.md Commands to copy environment variables, install dependencies, and run the development server. The dashboard binds to 127.0.0.1:3005. ```bash cp .env.example .env.local npm install npm run dev # open http://127.0.0.1:3005 ``` -------------------------------- ### Install agents-web dependencies with npm Source: https://github.com/agentdmai/teamfuse/blob/main/README.md Installs the dependencies for the agents-web frontend. Run this from the repository root after cloning. ```bash cd agents-web && npm install && cd .. ``` -------------------------------- ### Example commit footer after bootstrap Source: https://github.com/agentdmai/teamfuse/blob/main/agents/sop/commit-attribution.md Example of the commit body footer after the bootstrap flow has filled in the placeholders. Shows the actual format with a company slug and a timestamp. ```text Co-Authored-By: acme-eng-bot Agent-Session: 2026-04-20T17:00:00Z ``` -------------------------------- ### Reset bootstrap state to start over Source: https://github.com/agentdmai/teamfuse/blob/main/SETUP.md If you want to start over, remove the config file and agent .env files, then reset instruction files back to the placeholder-laden versions. The skill is idempotent on AgentDM side; if admin_create_agent returns alias_taken, it skips and re-fetches the existing api key from .env. ```bash rm agents.config.json rm -rf agents/*/.env # reset instruction files back to the placeholder-laden versions git checkout agents/*/CLAUDE.md agents/*/AGENTS.md ``` -------------------------------- ### Install AgentDM skill for GitHub Copilot CLI Source: https://github.com/agentdmai/teamfuse/blob/main/SETUP.md Run this command in an operator session at the repo root to install the AgentDM skill for GitHub Copilot CLI. The first MCP call prints a URL for a one-time OAuth handshake; approve it and the token is cached by the MCP client. ```bash /skill install agentdm ``` -------------------------------- ### Create repository from template with gh Source: https://github.com/agentdmai/teamfuse/blob/main/README.md Creates a new private repository from the teamfuse template and clones it locally. Use this as the first step in the quickstart. The command requires the GitHub CLI and an authenticated account. ```bash gh repo create my-company --template agentdmai/teamfuse --private --clone cd my-company ``` -------------------------------- ### Authorise AgentDM in Claude Code Source: https://github.com/agentdmai/teamfuse/blob/main/README.md Starts Claude Code and installs the AgentDM plugin, reloads plugins, and opens the MCP authentication flow. Claude prints an OAuth URL; open it, pick Authenticate, sign in with Google or GitHub, and select Admin Agent when asked which agent to connect as. The bootstrap commands need admin scope to create agents and channels. ```bash claude > /plugin install agentdm@agentdm > /reload-plugins > /mcp -> AgentDM -> Authenitcate ``` -------------------------------- ### Install AgentDM plugin for Claude Code Source: https://github.com/agentdmai/teamfuse/blob/main/SETUP.md Run these commands in an operator session at the repo root to install the AgentDM plugin for Claude Code. The first MCP call prints a URL for a one-time OAuth handshake; approve it and the token is cached by the MCP client. ```bash /plugin install agentdm@agentdm /reload-plugins ``` -------------------------------- ### Add a stdio MCP server to .mcp.json Source: https://github.com/agentdmai/teamfuse/blob/main/docs/extending.md Add a new entry under mcpServers in the agent's .mcp.json for a stdio server. The example uses the GitHub MCP server with an environment variable for the personal access token. ```json "github": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${GH_TOKEN}" } } ``` -------------------------------- ### OAuth flow for AgentDM CLI plugin Source: https://github.com/agentdmai/teamfuse/blob/main/docs/agentdm-integration.md Steps to install the AgentDM plugin in Claude CLI and authorize via browser. After OAuth, AGENTDM_TOKEN is not needed locally; it is only used in per-agent sessions spawned by the control plane. ```text claude (CLI) /plugin install agentdm@agentdm /reload-plugins first MCP call from a skill: agentdm MCP server prints: "Open this URL in your browser to authorize..." user approves in browser MCP client caches the token subsequent calls use the cached token ``` -------------------------------- ### Add a remote MCP server to .mcp.json Source: https://github.com/agentdmai/teamfuse/blob/main/docs/extending.md Add a new entry under mcpServers in the agent's .mcp.json for a remote server. The example uses mcp-remote with a custom endpoint and an authorization header. ```json "custom-remote": { "command": "npx", "args": [ "-y", "mcp-remote", "https://your.endpoint/mcp", "--header", "Authorization: Bearer ${YOUR_TOKEN}" ] } ``` -------------------------------- ### Dogfood filter placeholder in queries/filters/dogfood.sql Source: https://github.com/agentdmai/teamfuse/blob/main/agents/analyst/CLAUDE.md Placeholder SQL comment block for the dogfood filter. Replace the example lines with actual account names and email domains. The filter must be applied to all external metrics before publishing. ```sql -- Replace with the company's own account names and email domains. -- Example: -- AND accounts.name NOT IN ('', '') -- AND users.email NOT LIKE '%@' ``` -------------------------------- ### Commit body footer Source: https://github.com/agentdmai/teamfuse/blob/main/agents/sop/commit-attribution.md Footer to include in every commit body, even on squash merges. Contains the Co-Authored-By line with company slug and agent name, and the Agent-Session line with the ISO8601 start time. ```text Co-Authored-By: - > Agent-Session: ``` -------------------------------- ### Run /teamfuse-init command Source: https://github.com/agentdmai/teamfuse/blob/main/README.md Asks for your company name, a short brief, operator alias, which of the five roles to provision, and any role-specific bindings. The brief is stored once in agents/sop/company.md and loaded by every agent on start-up. It also offers to create the GitHub Project board, wire existing local clones into @eng-bot and @qa-bot, then creates one AgentDM agent per role, stores each api key into agents//.env, creates the #eng, #leads, #ops channels, assigns skills, creates/resolves the project board, symlinks repos, writes agents.config.json and agents/sop/company.md, and replaces every in the role CLAUDE.md files. Idempotent and safe to rerun. ```bash > /teamfuse-init ``` -------------------------------- ### Create a minimal skill SKILL.md Source: https://github.com/agentdmai/teamfuse/blob/main/docs/extending.md A minimal skill file with frontmatter for description and trigger keywords, followed by the skill body. The body is loaded into context only when Claude invokes the skill. ```markdown --- description: Short description used by Claude to decide when to fire. trigger_keywords: [keyword1, keyword2] --- # Skill body Steps, examples, conventions. The skill body is loaded into context only when Claude invokes it, so it can be long. ``` -------------------------------- ### Run /teamfuse command Source: https://github.com/agentdmai/teamfuse/blob/main/README.md Inside the same Claude session, at the repo root, prints the banner and the command list. Run this once to see what else is available. ```bash > /teamfuse ``` -------------------------------- ### Run copilot CLI with -p, --resume, and --additional-mcp-config Source: https://github.com/agentdmai/teamfuse/blob/main/docs/streaming-agent-loop.md Invokes the copilot CLI in non-interactive prompt mode for a single tick. Passes the previous session ID via --resume and loads per-agent MCP servers from @.mcp.json. Omit --resume on the first tick or after a clear-session signal. ```bash copilot -p "" \ --resume \ --additional-mcp-config @.mcp.json ``` -------------------------------- ### Copy the TEMPLATE skeleton Source: https://github.com/agentdmai/teamfuse/blob/main/docs/creating-agents.md Use this command to create a new agent directory from the existing template. ```bash cp -R agents/TEMPLATE agents/ ``` -------------------------------- ### Create channels with admin_create_channel and admin_set_channel_members Source: https://github.com/agentdmai/teamfuse/blob/main/SETUP.md For channels, /teamfuse-init creates channels named eng, leads, and ops, then sets channel members with relevant aliases. This is part of the bootstrap flow. ```javascript admin_create_channel({ name: "eng" }) admin_create_channel({ name: "leads" }) admin_create_channel({ name: "ops" }) admin_set_channel_members({ channel, members: [] }) ``` -------------------------------- ### Clone and re-initialize repository with git Source: https://github.com/agentdmai/teamfuse/blob/main/README.md Alternative to the template command: clones the teamfuse repository and re-initializes it as a fresh Git repository with main as the default branch. Use this if you prefer a plain clone without the GitHub template workflow. ```bash git clone https://github.com/agentdmai/teamfuse my-company cd my-company rm -rf .git && git init -b main ``` -------------------------------- ### Create agent with admin_create_agent and admin_set_agent_skills Source: https://github.com/agentdmai/teamfuse/blob/main/SETUP.md Per selected role, /teamfuse-init calls admin_create_agent with alias, visibility private, and accessPolicy auto_approve, then admin_set_agent_skills with a role-specific list. The skill writes each returned api_key to agents//.env and never echoes it back to the terminal. ```javascript admin_create_agent({ alias, visibility: "private", accessPolicy: "auto_approve" }) admin_set_agent_skills({ alias, skills: }) ``` -------------------------------- ### Source layout of agents-web Source: https://github.com/agentdmai/teamfuse/blob/main/agents-web/README.md Directory tree showing the project structure, including app routes, components, database, and scripts. ```text src/ app/ layout.tsx, page.tsx control panel shell api/ agents/route.ts GET list + status for all agents agents/[id]/start POST spawn the loop agents/[id]/stop POST graceful then forced kill agents/[id]/wake POST SIGUSR1 agents/[id]/context GET CLAUDE.md + MEMORY.md agents/[id]/logs GET tail of agent-loop.log agents/[id]/skills GET skills from .claude/skills/ agents/[id]/tools GET tools.json snapshot agents/master POST kill every agent usage GET usage report usage/reset POST reset a window baseline heartbeat GET liveness summary components/ cabinet UI (breakers + modals) db/ drizzle + better-sqlite3 lib/ agents.ts config-driven registry status.ts status.json reader supervisor.ts spawn/stop/wake usage.ts session JSONL aggregator ui-state.ts KV for dashboard resets scripts/ agent-loop.sh bash wrapper (thin) agent-loop.py streaming Claude Code session manager tick-cost.py per-tick cost summariser ``` -------------------------------- ### Tail session log with dynamic slug Source: https://github.com/agentdmai/teamfuse/blob/main/docs/operator-guide.md Follows the live JSONL session log for the current working directory. Must be run from the agent's working directory so the slug matches. ```bash tail -f ~/.claude/projects/$(pwd | tr / -)/*.jsonl ``` -------------------------------- ### Add agent entry to agents.config.json Source: https://github.com/agentdmai/teamfuse/blob/main/docs/creating-agents.md Register the new agent in the repository configuration file located at the root. ```json { "id": "", "alias": "@", "role": "", "runtime": "claude", "chrome": false } ``` -------------------------------- ### Test AgentDM integration via CLI Source: https://github.com/agentdmai/teamfuse/blob/main/docs/agentdm-integration.md Use these commands from an agent's working directory to verify connectivity. Requires a Claude session with the agentdm MCP loaded. ```bash # List everyone you can see # (only callable from a claude session that has the agentdm MCP loaded) send_message({ to: "@pm-bot", message: "ping from a test" }) read_messages() ``` -------------------------------- ### Commit PNG screenshots and README update Source: https://github.com/agentdmai/teamfuse/blob/main/docs/screenshots/README.md Use this command sequence to commit the new PNG screenshots and update the README references. Run it from the teamfuse repository root after editing the README to point to the PNG files. ```bash cd /path/to/teamfuse git add docs/screenshots/control-panel.png docs/screenshots/agentdm-network.png README.md git commit -m "Replace SVG simulations with real screenshots" git push ``` -------------------------------- ### BROWSER-REQ message format for #browser-requests Source: https://github.com/agentdmai/teamfuse/blob/main/agents/sop/browser-request-format.md Use this message format to queue a single browser-required task for a human operator in the #browser-requests channel. The message must include all required fields: a unique kebab-case slug, owner, card URL or "none", a one-sentence description of the task, the target URL, the reason it unblocks work, the expected output filename, priority (p0, p1, or p2), and a deadline (ISO8601 or "none"). Never include credentials, financial data, permission changes, or OAuth grants in the message, and send only one request per message. ```plaintext BROWSER-REQ owner: <@pm-bot | @marketing | @qa-bot> card: what: where: why: expected-output: /browser-reports/> priority: deadline: ``` -------------------------------- ### Send user message JSON line to claude adapter stdin Source: https://github.com/agentdmai/teamfuse/blob/main/docs/streaming-agent-loop.md One JSON line per user message sent to the claude adapter's stdin. The message role is always "user" and the content holds the prompt. ```json {"type": "user", "message": {"role": "user", "content": ""}} ``` -------------------------------- ### Status file: ./status.json Source: https://github.com/agentdmai/teamfuse/blob/main/agents/pm-bot/CLAUDE.md Overwrite this file every tick with the current agent state. The state field accepts one of the listed values, and the counts and arrays should reflect the current tick's data. ```json { "agent": "pm-bot", "tick": "", "state": "idle | triaging | auditing | announcing-release | driving-queue | blocked", "last_action": "", "backlog_count": 0, "wip_count": 0, "idle_agents": [], "cards_generated_this_tick": 0, "leads_posts_today": 0 } ``` -------------------------------- ### claude invocation with stream-json and --dangerously-skip-permissions Source: https://github.com/agentdmai/teamfuse/blob/main/docs/streaming-agent-loop.md Run claude in non-interactive mode with stream-json input/output, partial messages, strict MCP config, and optional --chrome flag. Use --resume to preserve context across ticks and touch .orchestrator/clear-session to reset. --model opusplan is the default for long sessions. ```bash claude --print --verbose \ --input-format stream-json --output-format stream-json \ --include-partial-messages \ --dangerously-skip-permissions \ --model opusplan \ --mcp-config .mcp.json --strict-mcp-config \ --settings .orchestrator/session-settings.json \ [--chrome] ``` -------------------------------- ### Status file JSON structure Source: https://github.com/agentdmai/teamfuse/blob/main/agents/marketing/CLAUDE.md Overwrite this file every tick to report the agent's current state. The state field accepts one of the listed values: idle, drafting, publishing, browser-task, or blocked. ```json { "agent": "marketing", "tick": "", "state": "idle | drafting | publishing | browser-task | blocked", "current_card": null, "current_platform": null, "last_action": "" } ``` -------------------------------- ### Wake log format Source: https://github.com/agentdmai/teamfuse/blob/main/agents/sop/wake-protocol.md The format for entries recorded in the ./wake-log.md file within an agent's working directory. ```text | | | result= ``` -------------------------------- ### Claude Thread Model Source: https://github.com/agentdmai/teamfuse/blob/main/docs/streaming-agent-loop.md Visual representation of the Claude adapter thread model, featuring a main tick loop and dedicated daemon threads for stdout and stderr processing. ```text main thread ├─ signal handlers (SIGUSR1, SIGTERM, SIGINT) ├─ tick loop: send() -> wait_for_result() -> sleep_with_wake() │ │ owns: ClaudeAdapter.proc (Popen), events queue │ ├─ _pump_stdout thread (daemon) │ reads proc.stdout line by line │ json.loads, enqueues into events queue │ on EOF enqueues {"type": "__eof__"} │ └─ _pump_stderr thread (daemon) reads proc.stderr line by line logs to .orchestrator/agent-loop.log ``` -------------------------------- ### Copilot Thread Model Source: https://github.com/agentdmai/teamfuse/blob/main/docs/streaming-agent-loop.md Visual representation of the Copilot thread model, which utilizes a process-per-tick approach without requiring background threads. ```text main thread ├─ signal handlers (SIGUSR1, SIGTERM, SIGINT) └─ tick loop: send() -> wait_for_result() -> sleep_with_wake() wait_for_result() runs copilot -p as a subprocess reads stdout to completion, parses JSONL, returns no background threads needed (process per tick) ``` -------------------------------- ### Manual agent wake via curl Source: https://github.com/agentdmai/teamfuse/blob/main/docs/operator-guide.md Sends a manual wake request to an agent via the control plane's REST API. The control plane binds to localhost, so this command only works from the same host. ```bash curl -sS -X POST http://127.0.0.1:3005/api/agents//wake ``` -------------------------------- ### Manual stop-all via curl POST Source: https://github.com/agentdmai/teamfuse/blob/main/docs/operator-guide.md Sends a POST request to the master agent endpoint to stop all agents. This has the same effect as the master breaker. ```bash curl -sS -X POST http://127.0.0.1:3005/api/agents/master ``` -------------------------------- ### PM-bot operator DM for ready PR Source: https://github.com/agentdmai/teamfuse/blob/main/agents/sop/pr-review-protocol.md Sent by @pm-bot as a DM to the operator once a PR is out of draft and has a [QA] smoke green comment. Never sent for draft or red PRs. If the operator has not commented after 48 hours, ping once more; at 72 hours escalate to the leads channel as [STATUS]. ```text PR ready for operator review, QA green, card , ``` -------------------------------- ### Call admin MCP tools for guardrails Source: https://github.com/agentdmai/teamfuse/blob/main/docs/extending.md Call the admin MCP tool to list guardrail providers and set agent guardrails. Guardrails apply to outbound AgentDM messages only; failures block delivery. ```text admin_list_guardrail_providers() admin_set_agent_guardrails({ alias: "@pm-bot", guardrails: ["pii-redactor", "profanity-filter"] }) ``` -------------------------------- ### Status file JSON format Source: https://github.com/agentdmai/teamfuse/blob/main/agents/eng-bot/CLAUDE.md Overwrite ./status.json every tick with this JSON structure. The state field uses one of the enumerated values: idle, coding, testing, waiting-for-review, releasing, or blocked. ```json { "agent": "eng-bot", "tick": "", "state": "idle | coding | testing | waiting-for-review | releasing | blocked", "current_card": null, "current_pr": null, "current_release": null, "last_action": "", "tests_green": null } ``` -------------------------------- ### QA smoke green/red PR comment Source: https://github.com/agentdmai/teamfuse/blob/main/agents/sop/pr-review-protocol.md Posted by @qa-bot as a top-level PR comment after running the role's test suite. Green indicates the smoke passed and the PR is flipped out of draft; red indicates a failing assertion and the PR stays in draft. The report path is included in both cases. ```text [QA] smoke green, , p95 , report: ``` ```text [QA] smoke red, , report: ``` -------------------------------- ### Wake agent via curl Source: https://github.com/agentdmai/teamfuse/blob/main/agents/sop/wake-protocol.md Sends a POST request to the wake endpoint for a specific agent ID. The agent ID corresponds to the registry ID found in agents.config.json. ```bash curl -sS -X POST http://127.0.0.1:3005/api/agents//wake ``` -------------------------------- ### status.json schema for agent status Source: https://github.com/agentdmai/teamfuse/blob/main/agents/TEMPLATE/AGENTS.md Overwrite this file every polling tick. The state field accepts "idle" or other role-specific states; last_action records the most recent action taken. ```json { "agent": "", "tick": "", "state": "idle | ", "last_action": "" } ``` -------------------------------- ### Author merge command with gh pr merge Source: https://github.com/agentdmai/teamfuse/blob/main/agents/sop/pr-review-protocol.md Used by the author (not the operator or @pm-bot) to merge a PR after the card is moved to Reviewed. The author then moves the card to Done after merge and after any post-deploy gates. ```bash gh pr merge --squash ``` -------------------------------- ### Status file schema in status.json Source: https://github.com/agentdmai/teamfuse/blob/main/agents/analyst/CLAUDE.md JSON structure for the status file that must be overwritten every tick. The state field accepts one of the listed values. The tick field should be an ISO8601 timestamp. ```json { "agent": "analyst", "tick": "", "state": "idle | querying | digest | anomaly | blocked", "last_query": null, "last_anomaly": null, "last_action": "" } ``` -------------------------------- ### status.json Template Source: https://github.com/agentdmai/teamfuse/blob/main/agents/qa-bot/CLAUDE.md The content of 'status.json' that the agent overwrites on every polling tick. Use this shape to track agent state, the current PR being processed, the last test suite used, and the last test result. ```json { "agent": "qa-bot", "tick": "", "state": "idle | smoking | verifying-release | blocked", "current_pr": null, "last_suite": null, "last_verdict": null, "last_action": "" } ``` -------------------------------- ### Commit subject line prefix Source: https://github.com/agentdmai/teamfuse/blob/main/agents/sop/commit-attribution.md Prefix for git commit subject lines to attribute the commit to a specific agent. The placeholder is replaced with the actual commit message. ```text [agent: eng-bot] [agent: qa-bot] [agent: marketing] ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.