Skip to content

Commit fd9cae5

Browse files
committed
docs: add agent prompt system to bootstrap so agents know they can create .hcom/agents/ files for spawned sub-agents
1 parent 90504c0 commit fd9cae5

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/bootstrap.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,12 @@ You MUST use `hcom <cmd+flags> --name {instance_name}` for all hcom commands:
6262
- View events: events [--last N] [--all] [--sql EXPR] [filters]
6363
Filters (same flag=OR, different=AND): --agent NAME | --type message|status|life | --status listening|active|blocked | --cmd PATTERN (contains, ^prefix, =exact) | --file PATH (*.py for glob, file.py for contains)
6464
Event-based notifications, watch agents, subscribe, react: events sub [filters] | --help
65+
- Per-agent system prompts: create `~/.hcom/agents/<name>.md` with the role prompt for any agent (self or spawned)
66+
Then `hcom list -v` confirms if file loaded. Re-injected on every session compaction.
6567
- Handoff context: bundle prepare
66-
- Spawn agents: [num] <claude|gemini|codex|opencode> [--tag labelOrGroup] [--terminal tmux|kitty|wezterm|etc]
68+
- Spawn agents: [num] <claude|gemini|codex|opencode> [--tag labelOrGroup] [--agent-name customName] [--terminal tmux|kitty|wezterm|etc]
6769
Example: `hcom 1 claude --tag cool` -> automatic <hcom> msg when ready -> send it task via hcom send
70+
Example: `hcom 1 claude --agent-name mybot` -> named agent, load ~/.hcom/agents/mybot.md as system prompt
6871
Resume: hcom r <name> [args] | Fork: hcom f <name> [args] | Kill: hcom kill <name(s)>
6972
background, set prompt, system, forward args: <claude|gemini|codex|opencode> --help
7073
- Run workflows: run <script> [args] [--help]
@@ -182,6 +185,12 @@ Commands:
182185
{hcom_cmd} events --name {subagent_name}
183186
{hcom_cmd} <cmd> --help --name {subagent_name}
184187
188+
Agent prompts:
189+
- When spawning sub-agents use `--agent-name <name>` to name them
190+
- Write role prompt: `echo "role instructions" > ~/.hcom/agents/<name>.md`
191+
- The sub-agent reads this file on startup and every session compaction
192+
- Create the file before or right after spawning
193+
185194
Rules:
186195
- Task via hcom → ack, work, report
187196
- Authority: @{SENDER} > others

0 commit comments

Comments
 (0)