diff --git a/.aipass/aipass_global_prompt.md b/.aipass/aipass_global_prompt.md index 6e79aac0..4321196b 100644 --- a/.aipass/aipass_global_prompt.md +++ b/.aipass/aipass_global_prompt.md @@ -176,6 +176,39 @@ Check seedgo standards. Before: `drone @seedgo checklist `. During: check Ask before spelunking. Need to know how another branch works? Dispatch the question: `drone @ai_mail dispatch @target "Question" "How does X work?"` — expert answer faster than digging unfamiliar files. +# Sub-Agents + +Sub-agents are your context-splitting tool — extensions of you, not separate workers. Default to using them. Your context window is finite and precious; theirs is disposable. + +Use sub-agents for: +- Reading and investigating files (especially outside your branch) +- Searching the codebase — grep, find, exploring unfamiliar code +- Building anything beyond a small fix (even in your own branch) +- Research, audits, comparisons, analysis +- Running tests and reporting results +- Any task that would consume context you need for orchestrating + +Do it yourself only when: +- User explicitly asks you to read or look at something +- Tiny edits — fix a typo, update a memory file, small config change +- Writing memories, STATUS, plan updates (your own files) +- Quick one-line commands — drone status, inbox check + +How to use them: +- One clear task per agent. Big prompt = shallow work. Focused prompt = thorough work. +- Brief them with full context — they start with zero knowledge of your conversation. +- Foreground when you need results to proceed. Background (`run_in_background: true`) when independent. +- Multiple agents in one message for parallel independent work (3 research agents scanning different areas). +- They report back results. You synthesize, decide, act. + +What sub-agents cannot do: +- No git access — drone commands blocked for non-devpulse +- No memory persistence — no `.trinity/`, no identity +- No dispatching other branches +- No committing — they build and test, you commit + +Sub-agents vs dispatch: Sub-agents are local workers (Agent tool, same session). Dispatch wakes a citizen branch (`drone @ai_mail dispatch`) — has memory, has identity, replies via email. Use dispatch for branch-expert work. Use sub-agents for everything else. + # Logging & Debugging Prax = only logging system. Every branch uses `from aipass.prax import logger`. diff --git a/AGENTS.md b/AGENTS.md index 374fba6e..02fddb6f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,55 +1,17 @@ # AIPass -A multi-agent framework where autonomous citizens live in branches and deploy disposable agents to do work. +A multi-agent framework where autonomous Agents(AIPass citizens) live in branches and deploy disposable sub-agents to do work. -## Branches +**User:** Name -Every branch follows this structure: -``` -src/aipass/{name}/ -├── .trinity/ # Identity & memory (passport.json, local.json, observations.json) -├── .aipass/ # System prompt -├── .ai_mail.local/ # Mailbox (inbox.json, sent/) -├── apps/ -│ ├── {name}.py # Entry point -│ ├── modules/ # Business logic -│ └── handlers/ # Implementation -├── logs/ -└── README.md -``` +# AIPass — Startup protocol -11 core branches: drone, seedgo, prax, cli, flow, ai_mail, api, trigger, spawn, memory, devpulse +On any greeting, silently read these files from CWD and run the commands — no narration, no announcing steps. Just do it and respond with the status. -## Commands +**Read:** `.trinity/passport.json`, `.trinity/local.json`, `.trinity/observations.json`, `README.md`, `STATUS.local.md` +**Check:** If `.ai_mail.local/inbox.json` exists, read it. Process any mail — don't ask, +**Run:** `drone @git status` -drone systems # List all branches -drone @seedgo audit aipass # Run standards audit -drone @ai_mail inbox # Check email -drone @ai_mail email @target "Subject" "Body" # Send email -drone @flow list open # Active plans +## Memories -## Startup - -On any greeting or first message, silently read these files and respond with status: -- `.trinity/passport.json` — your identity, role, purpose, principles -- `.trinity/local.json` — session history and key learnings -- `STATUS.local.md` — current work, issues, todos -- Check if `.ai_mail.local/inbox.json` exists — if so, read it and process any mail - -Your identity and branch context are also injected via hooks on session start and every prompt. You already have this context — but reading the files gives you the full picture. - -## Identity - -You are a citizen of AIPass. Your `.trinity/passport.json` defines who you are. Read it first — before writing anything, before making decisions. Your role, purpose, and principles are in that file. - -## Security - -- NEVER read, access, or reference files in `~/.secrets/`. This directory contains API keys, tokens, and recovery codes. No agent needs to see this. Code that programmatically reads keys (like the api branch) handles it — you don't. -- NEVER output credentials, tokens, or API keys in responses. - -## Key Principles - -- Code is truth. Running code beats architecture. -- Memory is everything. Update .trinity/ often. -- Dispatch, don't do. Branches are experts in their domain. -- Fail honestly. Errors over silent fallbacks. +Update `.trinity/` at natural breakpoints, after milestones, and on `/memo`. \ No newline at end of file diff --git a/GEMINI.md b/GEMINI.md index 374fba6e..02fddb6f 100644 --- a/GEMINI.md +++ b/GEMINI.md @@ -1,55 +1,17 @@ # AIPass -A multi-agent framework where autonomous citizens live in branches and deploy disposable agents to do work. +A multi-agent framework where autonomous Agents(AIPass citizens) live in branches and deploy disposable sub-agents to do work. -## Branches +**User:** Name -Every branch follows this structure: -``` -src/aipass/{name}/ -├── .trinity/ # Identity & memory (passport.json, local.json, observations.json) -├── .aipass/ # System prompt -├── .ai_mail.local/ # Mailbox (inbox.json, sent/) -├── apps/ -│ ├── {name}.py # Entry point -│ ├── modules/ # Business logic -│ └── handlers/ # Implementation -├── logs/ -└── README.md -``` +# AIPass — Startup protocol -11 core branches: drone, seedgo, prax, cli, flow, ai_mail, api, trigger, spawn, memory, devpulse +On any greeting, silently read these files from CWD and run the commands — no narration, no announcing steps. Just do it and respond with the status. -## Commands +**Read:** `.trinity/passport.json`, `.trinity/local.json`, `.trinity/observations.json`, `README.md`, `STATUS.local.md` +**Check:** If `.ai_mail.local/inbox.json` exists, read it. Process any mail — don't ask, +**Run:** `drone @git status` -drone systems # List all branches -drone @seedgo audit aipass # Run standards audit -drone @ai_mail inbox # Check email -drone @ai_mail email @target "Subject" "Body" # Send email -drone @flow list open # Active plans +## Memories -## Startup - -On any greeting or first message, silently read these files and respond with status: -- `.trinity/passport.json` — your identity, role, purpose, principles -- `.trinity/local.json` — session history and key learnings -- `STATUS.local.md` — current work, issues, todos -- Check if `.ai_mail.local/inbox.json` exists — if so, read it and process any mail - -Your identity and branch context are also injected via hooks on session start and every prompt. You already have this context — but reading the files gives you the full picture. - -## Identity - -You are a citizen of AIPass. Your `.trinity/passport.json` defines who you are. Read it first — before writing anything, before making decisions. Your role, purpose, and principles are in that file. - -## Security - -- NEVER read, access, or reference files in `~/.secrets/`. This directory contains API keys, tokens, and recovery codes. No agent needs to see this. Code that programmatically reads keys (like the api branch) handles it — you don't. -- NEVER output credentials, tokens, or API keys in responses. - -## Key Principles - -- Code is truth. Running code beats architecture. -- Memory is everything. Update .trinity/ often. -- Dispatch, don't do. Branches are experts in their domain. -- Fail honestly. Errors over silent fallbacks. +Update `.trinity/` at natural breakpoints, after milestones, and on `/memo`. \ No newline at end of file diff --git a/src/aipass/devpulse/AGENTS.md b/src/aipass/devpulse/AGENTS.md deleted file mode 100644 index cf1948f5..00000000 --- a/src/aipass/devpulse/AGENTS.md +++ /dev/null @@ -1,30 +0,0 @@ - -# DEVPULSE — Agent Instructions - -This project uses AIPass, a multi-agent framework. - -## Key Concepts - -- **Project** — this directory. Contains a registry and one or more agents. -- **Agent** — a citizen that lives inside the project with its own identity, memory, and code. -- **Registry** — `DEVPULSE_REGISTRY.json` tracks all agents. - -## Getting Started - -Create your first agent: -``` -aipass init agent -``` - -## Available Commands - -``` -aipass init agent # Create a new agent -drone @spawn create # Create agent (alternative) -drone @seedgo audit # Run standards audit -drone systems # List all infrastructure -``` - -## Startup - -On startup, read: `DEVPULSE_REGISTRY.json`, `README.md`, `STATUS.local.md` diff --git a/src/aipass/devpulse/GEMINI.md b/src/aipass/devpulse/GEMINI.md deleted file mode 100644 index ffff2beb..00000000 --- a/src/aipass/devpulse/GEMINI.md +++ /dev/null @@ -1,27 +0,0 @@ - -# DEVPULSE — Project Instructions - -This project uses AIPass, a multi-agent framework. - -## Key Concepts - -- **Project** — this directory. Contains a registry and one or more agents. -- **Agent** — a citizen that lives inside the project with its own identity, memory, and code. -- **Registry** — `DEVPULSE_REGISTRY.json` tracks all agents. - -## Getting Started - -Create your first agent: `aipass init agent ` - -## Available Commands - -``` -aipass init agent # Create a new agent -drone @spawn create # Create agent (alternative) -drone @seedgo audit # Run standards audit -drone systems # List all infrastructure -``` - -## Startup - -On startup, read: `DEVPULSE_REGISTRY.json`, `README.md`, `STATUS.local.md` diff --git a/src/aipass/devpulse/tests/test_git_gate.py b/src/aipass/devpulse/tests/test_git_gate.py index 077ab1a0..54f02e7c 100644 --- a/src/aipass/devpulse/tests/test_git_gate.py +++ b/src/aipass/devpulse/tests/test_git_gate.py @@ -19,9 +19,9 @@ from pathlib import Path import pytest -_USER_HOOK = Path.home() / ".claude" / "hooks" / "git_gate.py" _REPO_HOOK = Path(__file__).resolve().parents[4] / ".claude" / "hooks" / "git_gate.py" -HOOK_PATH = _USER_HOOK if _USER_HOOK.is_file() else _REPO_HOOK +_USER_HOOK = Path.home() / ".claude" / "hooks" / "git_gate.py" +HOOK_PATH = _REPO_HOOK if _REPO_HOOK.is_file() else _USER_HOOK _spec = importlib.util.spec_from_file_location("git_gate", HOOK_PATH) _mod = importlib.util.module_from_spec(_spec)