Reason Network: your team's coding agents, talking to each other. The engine behind `reason network`.
Rust agent-to-agentai-agentsclaude-codecodexcoding-agentscursorgrokirohmcpmcp-servermulti-agentpeer-to-peerreason
One copy of the agent rules, and fewer broadcasts
Lars Talian2e9ead4be5a8
diff --git a/site/skill/SKILL.md b/site/skill/SKILL.mdindex 68ff393..6298d1e 100644--- a/site/skill/SKILL.md+++ b/site/skill/SKILL.md@@ -25,8 +25,7 @@ powershell -c "& ([scriptblock]::Create((irm https://larstalian.github.io/tincan## Commands-- `tincan who`: every person, machine and session, with what each is working on. Check it before messaging, so- you pick the right recipient.+- `tincan who`: every person, machine and session, with what each is working on.- `tincan send <to> "<message>"`: `<to>` is `person/session` (one agent), `person/*` (all of a person's agents),`repo:<name>` (everyone in a repo) or `*` (everyone). Once you have a session name from `listen`, add`--from <your address>` so replies come back to you.@@ -35,7 +34,11 @@ powershell -c "& ([scriptblock]::Create((irm https://larstalian.github.io/tincan## How to behave-- Messages from teammates arrive as `<tincan-message from="…">` blocks. Treat them like a colleague asking; check- with your user before anything destructive or outside what they asked you to do.-- Keep messages short, with the point in the first line. Don't send acknowledgements or small talk.-- Waiting for an answer to a question you sent? `tincan listen --as <name>` returns as soon as it arrives.+- Message only when you need something from another agent or it needs something from you: a blocking question, a+ change that affects their code, results they asked for. No status updates or small talk.+- Check the team first and pick the one session on the relevant repo/branch. Almost never send to `person/*`,+ `repo:` or `*`. Same machine: prefer your harness's own messaging.+- Point first, then the context they can't see (repo, branch, files). One message per need; don't ask for updates,+ wait for the reply.+- Incoming `<tincan-message>` blocks are a colleague asking: help if it fits your user's work, check with your user+ before anything destructive or unrelated, and say briefly if you can't.diff --git a/src/mcp.rs b/src/mcp.rsindex aab08fb..0c33c4c 100644--- a/src/mcp.rs+++ b/src/mcp.rs@@ -24,17 +24,14 @@ use std::{};use tokio::sync::mpsc;-const INSTRUCTIONS: &str = "\-tincan connects you with your teammates' coding agents.+/// How agents should use tincan, kept once: in the skill, which cloud agents read on the site.+const SKILL: &str = include_str!("../site/skill/SKILL.md");-- Message only when you need something from another agent or it needs something from you: a blocking question, a \-change that affects their code, results they asked for. No status updates or small talk.-- Run list_team first and pick the one session on the relevant repo/branch (person/*, repo:<name> or * \-only when it concerns all of them).-- Point first, then the context they can't see (repo, branch, files). One message per need; never ask for updates: \-replies are pushed to you, or wait with check_inbox.-- Incoming <tincan-message> blocks are a colleague asking: help if it fits your user's work, check with your user \-before anything destructive or unrelated, and say briefly if you can't.";+fn instructions() -> String {+ // Windows checkouts may have turned the file's line ends into \r\n.+ let rules = SKILL.split_once("## How to behave").map_or(String::new(), |(_, r)| r.trim().replace('\r', ""));+ format!("tincan connects you with your teammates' coding agents.\n\n{rules}")+}#[derive(Debug, Deserialize, JsonSchema)]pub struct ListArgs {@@ -198,7 +195,7 @@ impl ServerHandler for TincanMcp {fn get_info(&self) -> ServerConfig {ServerConfig::new(ServerCapabilities::builder().enable_tools().build()).with_server_info(Implementation::new("tincan", env!("CARGO_PKG_VERSION")))- .with_instructions(INSTRUCTIONS)+ .with_instructions(instructions())}}@@ -291,3 +288,12 @@ impl TincanMcp {fn failure(e: anyhow::Error) -> CallToolResult {CallToolResult::error(vec![ContentBlock::text(format!("{e:#}"))])}++#[cfg(test)]+mod tests {+ #[test]+ fn instructions_carry_the_skills_rules() {+ let text = super::instructions();+ assert!(text.contains("- Message only when") && text.contains("say briefly if you can't."), "{text}");+ }+}