Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OPC Team Init

Initialize or refresh an OPC-style multi-agent team for Hermes or OpenClaw.

The default team is:

  • default Hermes agent as coordinator-primary: goals, routing, synthesis, archive
  • researcher: evidence, verification, uncertainty
  • writer: structure, reader-facing content
  • builder: implementation, debugging, tests

Only the coordinator role is implemented by rewriting/augmenting the user's default Hermes agent. All other Hermes roles, including custom agents, are created as real Profiles.

It also supports user-defined peer agents such as growth-agent and secretary, shared Wiki memory, Discord proposal intake, temporary Subagent reporting rules, and role-scoped Waza passive skill exposure.

Profile content can be written in English, Simplified Chinese, or Traditional Chinese. English is the source of truth.

Install

Install this folder as a Codex skill under:

$HOME/.codex/skills/opc-team-init

The skill is MIT licensed. See LICENSE.

Install from GitHub:

git clone --depth 1 https://github.com/Ancienttwo/opc-team-init.git \
  "$HOME/.codex/skills/opc-team-init"

Codex skill installation only copies the skill and requires a restart. There is no reliable post-install hook, so configuration is an explicit setup step.

Install-or-reuse and configure from a team spec:

python3 "$HOME/.codex/skills/opc-team-init/scripts/opc_team_setup.py" install-configure \
  --team-spec /path/to/opc-team.json

Configure an already installed skill:

python3 "$HOME/.codex/skills/opc-team-init/scripts/opc_team_setup.py" configure \
  --team-spec /path/to/opc-team.json

fsSL-style bootstrap wrapper:

curl -fsSL https://raw.githubusercontent.com/Ancienttwo/opc-team-init/main/scripts/install_configure.sh \
  | OPC_TEAM_INIT_REPO_URL=https://github.com/Ancienttwo/opc-team-init.git \
    bash -s -- --team-spec /path/to/opc-team.json

Quick Start

Hermes target:

python3 "$HOME/.codex/skills/opc-team-init/scripts/init_opc_team.py" \
  --language en

--language is required for --mode init (the default mode). Choose en, zh-CN, or zh-TW. The --mode audit subcommand does not need it.

OpenClaw target:

python3 "$HOME/.codex/skills/opc-team-init/scripts/init_opc_team.py" \
  --language zh-TW \
  --target openclaw

The default shared Wiki path is:

$HOME/Documents/vault

Choose a vault interactively:

python3 "$HOME/.codex/skills/opc-team-init/scripts/init_opc_team.py" \
  --language zh-CN \
  --select-vault

Use an exact Wiki directory:

python3 "$HOME/.codex/skills/opc-team-init/scripts/init_opc_team.py" \
  --language en \
  --wiki-path "/absolute/path/to/vault"

Natural-language team setup should first be converted into a JSON team spec. See references/team-config.md. The setup wrapper runs Hermes audit before writes and then calls the source-of-truth initializer.

Languages

--language en|zh-CN|zh-TW controls which copy is written into:

  • ~/.hermes/SOUL.md and ~/.hermes/memories/MEMORY.md (default coordinator)
  • ~/.hermes/profiles/{researcher,writer,builder}/SOUL.md and memories/MEMORY.md
  • ~/.hermes/profiles/<custom>/SOUL.md and memories/MEMORY.md
  • ~/.hermes/OPC_ROUTING_TABLE.md
  • ~/.hermes/DISCORD_AGENT_PROPOSALS_SETUP.md
  • Default discord.channel_profiles runtime routes and compatible discord.channel_prompts strings injected into ~/.hermes/config.yaml
  • Wiki seed pages: SCHEMA.md, index.md, log.md, concepts/*.md, entities/custom-profiles.md, projects/opc-agent-team-operating-model.md
  • OpenClaw package agents/*.md, agent-dirs/*/SOUL.md|MEMORY.md, routing-table.md, subagent-reporting.md, discord-channel-routing.json

English is the source of truth; zh-CN and zh-TW are translations. Custom-profile language follows the global flag — do not put a language field inside individual specs.

Audit (read-only)

To inspect an existing install without writing anything:

python3 "$HOME/.codex/skills/opc-team-init/scripts/init_opc_team.py" \
  --hermes-home "$HOME/.hermes" \
  --mode audit

Add --audit-json for machine-readable output. Exit codes: 0 clean, 1 drift or missing, 2 severe (multiple Hermes gateway LaunchAgents fighting over a shared bot token).

The audit reports:

  • Per-profile SOUL/MEMORY status: clean, drift (managed block edited), legacy (no managed block — pre-v0.4 file or pure manual content), or missing.
  • Lines of manual content sitting outside each managed block (preserved across reruns).
  • Discord channel_profiles and channel_prompts coverage vs the registered custom profiles.
  • OPC_CHANNELS.json coverage vs discord.channel_profiles and discord.channel_prompts.
  • Custom registry vs profile directory consistency.
  • Wiki path validity.
  • Multi-gateway LaunchAgents in ~/Library/LaunchAgents/com.hermes.gateway*.plist.

Custom Agents

Add built-in custom peer agents:

python3 "$HOME/.codex/skills/opc-team-init/scripts/init_opc_team.py" \
  --language zh-CN \
  --custom-profile-preset growth-agent \
  --custom-profile-preset secretary

Add your own custom agent from JSON:

python3 "$HOME/.codex/skills/opc-team-init/scripts/init_opc_team.py" \
  --language en \
  --custom-profile-spec /path/to/custom-profiles.json

Custom agents are peers, not children of the core agents. They are created as Hermes Profiles and may not use reserved names such as default, coordinator, researcher, writer, or builder. Temporary Subagents only report to their immediate owning agent.

Dependencies

GStack, GBrain, and Waza are detected, not installed automatically.

Hermes GStack setup:

git clone --single-branch --depth 1 https://github.com/garrytan/gstack.git ~/gstack && cd ~/gstack && ./setup --host hermes

OpenClaw GStack setup:

git clone --single-branch --depth 1 https://github.com/garrytan/gstack.git ~/gstack && cd ~/gstack && ./setup --host openclaw

GBrain agent install guide:

https://raw.githubusercontent.com/garrytan/gbrain/master/INSTALL_FOR_AGENTS.md

Waza install:

npx skills add tw93/Waza -a codex -g -y

Optional explicit Waza root:

python3 "$HOME/.codex/skills/opc-team-init/scripts/init_opc_team.py" \
  --waza-root "$HOME/.claude/skills/waza"

Dependency mode:

python3 "$HOME/.codex/skills/opc-team-init/scripts/init_opc_team.py" \
  --language en \
  --dependency-mode prompt

Use --dependency-mode strict in CI-style checks.

Discord

Hermes does not allow two gateways to share a Discord bot token; a second hermes gateway start with the same token will fail. The default mode is therefore single-gateway: only the default coordinator gateway connects to Discord, and per-channel runtime routing is driven by discord.channel_profiles in ~/.hermes/config.yaml. discord.channel_prompts remains as compatible prompt/context injection. Specialist and custom Profiles never start their own gateway by default.

Only the default/coordinator home channel is written to discord.free_response_channels; it can work as an always-open Orchestrator channel. Researcher, writer, builder, and custom agent channels are written to discord.channel_profiles plus discord.channel_prompts, so they route to the right Profile runtime while still requiring an @mention and auto-create a thread.

Hermes proposal channel:

python3 "$HOME/.codex/skills/opc-team-init/scripts/init_opc_team.py" \
  --language en \
  --discord-channel-id 123456789012345678 \
  --discord-user-id 234567890123456789

Hermes one-bot multi-channel routing:

python3 "$HOME/.codex/skills/opc-team-init/scripts/init_opc_team.py" \
  --language zh-CN \
  --discord-channel-id 100000000000000001 \
  --agent-channel researcher=100000000000000002 \
  --agent-channel writer=100000000000000003 \
  --agent-channel builder=100000000000000004 \
  --agent-channel secretary=100000000000000005 \
  --agent-channel-name secretary=#secretary \
  --custom-profile-preset secretary

OpenClaw channel routing:

python3 "$HOME/.codex/skills/opc-team-init/scripts/init_opc_team.py" \
  --language en \
  --target openclaw \
  --discord-guild-id 345678901234567890 \
  --discord-channel-id 123456789012345678 \
  --discord-user-id 234567890123456789

--multi-gateway is an advanced opt-in. It requires each profile to already have its own DISCORD_BOT_TOKEN line in ~/.hermes/profiles/<name>/.env; the script refuses to start per-profile gateways otherwise.

Do not commit real bot tokens.

Managed Blocks and Backups

Specialist and custom profile SOUL.md and memories/MEMORY.md are written inside <!-- BEGIN OPC MANAGED: <profile> SOUL --> ... <!-- END OPC MANAGED: <profile> SOUL --> blocks. Manual content outside those blocks is preserved across reruns; rerunning the script replaces the block in place. The default coordinator's SOUL/MEMORY use the legacy OPC_TEAM_DEFAULT_COORDINATOR_* markers.

config.yaml writes are scoped to a fixed allowlist (skills.disabled, skills.external_dirs, delegation, platform_toolsets.cli, plus discord.require_mention/auto_thread/reactions/free_response_channels/channel_profiles/channel_prompts). Other keys are not touched. The default discord.channel_profiles and discord.channel_prompts maps are merged dict-wise so manual entries the user added are kept.

Before each refresh, the script snapshots SOUL/MEMORY/config/routing-table to ~/.hermes/.opc-backups/<timestamp>/ and prunes older snapshots beyond the most recent 10.

Generated Output

Hermes writes or refreshes:

  • default root SOUL.md, default memory, default config, and default .env
  • profiles/researcher
  • profiles/writer
  • profiles/builder
  • optional custom Profiles
  • shared Wiki files at WIKI_PATH

If profiles/coordinator already exists, it is kept as a legacy backup/template and is not used as the routine Hermes routing target.

OpenClaw writes a non-invasive package under:

$HOME/.openclaw/opc-team

Important OpenClaw files:

  • openclaw.config.patch.json5
  • agents.json
  • agent-skill-map.json
  • agent-dirs/*/
  • workspaces/*/
  • discord-channel-routing.json
  • OPENCLAW_IMPORT.md

The initializer does not mutate ~/.openclaw/openclaw.json; review and merge the generated patch yourself or through OpenClaw's config workflow.

Validation

python3 -m py_compile \
  "$HOME/.codex/skills/opc-team-init/scripts/init_opc_team.py" \
  "$HOME/.codex/skills/opc-team-init/scripts/init_hermes_opc_team.py"

Skill validation:

/Users/chris/.hermes/hermes-agent/venv/bin/python \
  "$HOME/.codex/skills/skill-writer/scripts/quick_validate.py" \
  "$HOME/.codex/skills/opc-team-init"

Version

Current skill metadata version: 0.5.2.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages