Skip to content

Drwegaa/agent-builder-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agent Builder System

Latest: v1.1.0 — adds agent-builder-solo (0-5 agent users), ships the 4 corpus-pipeline skills (corpus-ingestion, chunk-and-tag, deploy-skill, uptake-measure) as reference templates, and adds plugin-managed hooks/ for clean lifecycle. v1.0 contract preserved — wizard install still works the same.

Open agent-building toolkit for Claude Code. Bundles five things that work together:

  1. Obsidian vault — your second brain. 8-folder structure, auto-pulled and auto-pushed on every Claude Code session end.
  2. /agent-builder-solo skill (NEW in v1.1) — light version of agent-builder for 0-5 agent operators. 305 lines, same 2 production branches (Edit JA + Edit/Author Skill), no architecture-cascade overhead. Recommended starting point.
  3. /agent-builder skill — full fleet workflow (1,161 lines), 4 branches (A: Edit JA, B: Edit Skill, C: Polish Pass [EXPERIMENTAL], D: Full-Suite Audit [EXPERIMENTAL]). For 5+ agents with cross-dependencies.
  4. @corpus-trainer agent template — knowledge-acquisition agent that detects skill gaps, researches canonical sources, ingests, chunks, authors skills, deploys, measures uptake. v1.1 completes the 7-skill pipeline.
  5. @system-architect agent template — architecture agent that designs systems before they're built, owns ADRs, audits architectural choices, tracks tech debt.

Plus /graphify (any folder → knowledge graph), /save-session (rich capture), /brain-sync (scheduled vault hygiene), and a vault-autosave Stop hook (plugin-managed or wizard-installed).

Built for solo operators and founders building their own AI ops. Non-commercial — see LICENSE (PolyForm Noncommercial 1.0.0).


Install

Mac / Linux

git clone https://github.com/Drwegaa/agent-builder-system.git
cd agent-builder-system
bash setup.sh

Windows (PowerShell)

git clone https://github.com/Drwegaa/agent-builder-system.git
cd agent-builder-system
.\setup.ps1

The wizard walks you through 6 steps and asks for confirmation before doing anything. Each component (Graphify, agent-builder, corpus-trainer cluster, system-architect cluster) is opt-in — answer n to any you don't want.

Prerequisites

Tool Check Install
Claude Code claude --version claude.ai/code
Node.js 18+ node --version nodejs.org
Python 3.8+ python3 --version python.org
Git git --version git-scm.com
Obsidian open app obsidian.md

Windows additionally needs Git Bash for the Stop hook.


What you get

After running setup:

The vault

  • Obsidian vault at the path you choose (default ~/Documents/my-brain)
  • 8 folders: 00-Inbox, 01-Projects, 02-Decisions, 03-Daily, 04-Resources/{topics,code-topology}, 05-People, 06-Personal, 07-Sessions, 08-Archive
  • CLAUDE.md personalized with your brand name

Hooks + automation

  • Stop hook (vault-autosave) — every session end: git pull --rebase → append breadcrumb to today's daily note → commit + push any changes. You never manually commit.
  • PreCompact hook — reminds you to run /save-session before context compacts.

MCP server

  • vault-search (@bitbonsai/mcpvault) — fast BM25 full-text search across your vault. No obsidian-mcp — it re-indexes on every call and freezes large vaults. Writes go through Claude Code's native Write/Edit/Read on direct paths.

Slash commands

  • /save-session — rich capture (decisions, reasoning, action items) → vault + GitHub push
  • /brain-sync — inbox processing, frontmatter, wikilinks, broken-link audit (schedule via /schedule, don't run inside a work session)
  • /graphify <folder> — map any code project into a knowledge graph in your vault
  • /agent-builder — interactive workflow to edit an agent JA or author/edit a skill (4 branches)

Agent templates

Available via @-mention once installed:

  • @corpus-trainer — gap detection, canonical-source research, skill authoring. Reference template — adapt to your stack.
  • @system-architect — system design, ADRs, tech-debt tracking, architecture review. Reference template — adapt to your stack.

Configuration

Setup writes ~/.agent-builder/config.json:

{
  "brand_name": "<your name from setup Q1>",
  "vault_path": "<your vault path from setup Q2>",
  "plugin_version": "1.1.0",
  "installed_skills": [],
  "installed_agents": []
}

The agent templates read this file at runtime to locate your vault and to brand-correctly-name things. You can add other keys (e.g., task_tracker, model_preference, cost_ceiling_monthly_usd) — they're preserved on re-runs.


Vault structure

your-brain/
├── 00-Inbox/          ← raw captures, processed by scheduled /brain-sync
├── 01-Projects/       ← one note per active project
├── 02-Decisions/      ← ADRs with date, decision, why
├── 03-Daily/          ← auto-logged session summaries
├── 04-Resources/
│   ├── topics/        ← MOC hubs (you fill these)
│   └── code-topology/ ← Graphify output (auto-generated)
├── 05-People/         ← team, clients, contacts
├── 06-Personal/       ← personal notes, research
├── 07-Sessions/       ← optional: historical chat ingestion
└── 08-Archive/        ← done or paused

Versioning + scope

v1.1.0 (current) — production-ready

  • All of v1.0 (below) — wizard install path unchanged, backward-compatible
  • NEW /agent-builder-solo skill (305 lines, 0-5 agent users — recommended default)
  • NEW 4 corpus-pipeline reference templates: corpus-ingestion (584-line SKILL.md + 1 worked recipe + 814-line batch-ingest.py reference impl), chunk-and-tag (348-line SKILL.md + 593-line chunk-and-tag.py), deploy-skill (156 lines), uptake-measure (114 lines). All stack-specific — adapt scripts/recipes to your scraper, RAG chunker, deploy target, analytics backend.
  • NEW plugin-managed hooks/hooks.json for clean Claude Code plugin-install lifecycle (cleanly uninstalls on claude plugin remove)
  • NEW dual-mode vault-autosave.sh — reads config at runtime (plugin install) OR uses substituted placeholder (wizard install)

v1.0.0 — production-ready

  • Obsidian vault + Stop hook + /save-session + /brain-sync + vault-search MCP + /graphify
  • /agent-builder Branches A (Edit JA) + B (Edit Skill) — full workflow, used to build agents and skills
  • @corpus-trainer agent template + skills corpus-research, skill-author, gap-detect
  • @system-architect agent template + skills architecture-review, system-design-patterns, adr-sign-off, tech-debt-tracking

[EXPERIMENTAL] (v1.0+, all versions)

  • /agent-builder Branches C (Polish Pass) + D (Full-Suite Audit) — assume a multi-agent fleet (5+ agents with cross-dependencies). Solo operators with 1-3 agents should use /agent-builder-solo instead. C+D have a first-run gate that warns you before invoking.

v1.0 → v1.1 migration

Existing v1.0 wizard installs: re-run bash setup.sh (or .\setup.ps1 on Windows). Idempotent — your existing ~/.agent-builder/config.json is preserved + extended with the new installed_skills entries. New Step 5b prompts default to solo=y / fleet=n (matches most users); answer y to fleet if you want both. New Step 5c installs the 4 new pipeline skills automatically if you keep your corpus-trainer cluster.

Switching from /agent-builder (fleet) to /agent-builder-solo: no migration needed — both can coexist. Use solo for quick edits, fleet for high-stakes architectural changes.


Plugin structure

This repo is a Claude Code plugin manifest (.claude-plugin/plugin.json) plus a wizard installer for systems that go beyond what the plugin loader covers (Obsidian vault setup, MCP registration, Stop hook installation).

.claude-plugin/plugin.json      ← Claude Code plugin manifest (v1.1.0)
agents/                         ← reference agent templates (corpus-trainer, system-architect)
skills/                         ← 11 skills
  agent-builder-solo/           ← NEW v1.1 — light 305-line workflow for 0-5 agents
  agent-builder/                ← full 1,161-line workflow for 5+ agents
  graphify/                     ← any folder → knowledge graph
  corpus-research/              ← canonical-source identification
  corpus-ingestion/             ← NEW v1.1 — scrape + transcribe + quarantine (+ recipe + script)
  chunk-and-tag/                ← NEW v1.1 — RAG chunking with provenance (+ script)
  skill-author/                 ← author SKILL.md from corpus chunks
  deploy-skill/                 ← NEW v1.1 — staged skill → consuming agent install
  uptake-measure/               ← NEW v1.1 — 14-day adoption measurement
  gap-detect/                   ← detect missing skills across your agent fleet
  architecture-review/          ← multi-pattern conformance audit
  system-design-patterns/       ← pattern library + ADR templating
  adr-sign-off/                 ← six-gate ADR review
  tech-debt-tracking/           ← debt register lifecycle
commands/                       ← slash commands (save-session, brain-sync) — config-loaded
hooks/hooks.json                ← v1.1 plugin-managed hooks (Claude Code plugin loader)
install/                        ← template files used by setup.sh / setup.ps1
scripts/
  vault-autosave.sh             ← Stop-hook script (dual-mode: plugin OR wizard install)
  audit/                        ← pre-ship audit gates (secret + sanitization scans)
vault-template/                 ← skeleton copied to your vault on first install
docs/                           ← usage guides + architecture
setup.sh                        ← Mac/Linux wizard
setup.ps1                       ← Windows wizard
LICENSE                         ← PolyForm Noncommercial 1.0.0

After install

  1. Open Obsidian → Open folder as vault → pick your vault path
  2. Open any terminal → start Claude Code
  3. Your sessions auto-save (pull + commit + push) when you close Claude Code
  4. Try the new skills/agents:
    • /graphify <folder> — map any project to your vault
    • /agent-builder — edit an agent JA or author a skill
    • @corpus-trainer <task> — invoke the corpus trainer agent
    • @system-architect <task> — invoke the system architect agent
  5. Try the new skills:
    • /graphify <folder> — map any project to your vault
    • /agent-builder-solo — light JA/skill editor (recommended for 0-5 agents)
    • /agent-builder — full fleet JA/skill editor (5+ agents)
    • @corpus-trainer <task> — invoke the corpus trainer agent
    • @system-architect <task> — invoke the system architect agent
  6. (Recommended) Use /schedule to run /brain-sync every 3 days on Anthropic's remote agent infrastructure

Windows notes

  • The Stop hook uses bash. On Windows it requires Git Bash or WSL to be installed.
  • The MCP server and skills work natively on Windows with no extra setup.
  • See docs/mcp-servers.md.

Uninstall

See docs/uninstall.md for the cleanup checklist (skills, agents, hooks, MCP, config — all removable in a few minutes).


Docs


License

PolyForm Noncommercial 1.0.0. Free to use, modify, and redistribute for any noncommercial purpose. Commercial use requires a separate license — contact github.com/Drwegaa.


Build brief (how this repo was built)

This repo was built and audited rigorously across two releases, with an Opus audit gate after every phase. The full history is in the commit log + PR descriptions, but the short brief:

v1.0.0 (initial public release)

Cloned + sanitized from an internal 94-agent fleet codebase into a generic, public, non-commercial plugin.

5 build phases, each Opus-audited:

Phase What shipped Audit verdict Fixes applied
Phase 1 — Plugin skeleton .claude-plugin/plugin.json, LICENSE (PolyForm NC 1.0.0), reorganized claude-config/commands/+scripts/+install/, added agents/ dir, fixed vault-autosave.sh hardcoded path GO-WITH-FIXES SPDX license LicenseRef-PolyForm-Noncommercial-1.0.0, --no-verify rationale comment
Phase 2 — Sanitize 11 source files 3 parallel Sonnet sub-agents cloned + sanitized agent-builder skill (4,375→1,161 lines), corpus-trainer agent + 3 skills, system-architect agent + 4 skills GO-WITH-FIXES CRITICAL: phantom skill refs → [NOT INCLUDED IN v1.0] callouts; HIGH: license-on-7-skills + Step 7 [OPTIONAL]
Phase 3 — Cross-platform setup Extended setup.sh (Mac/Linux) + setup.ps1 (Windows), opt-in install per component, writes ~/.agent-builder/config.json GO-WITH-FIXES CRITICAL: docs/uninstall.md written; HIGH: install error handling + duplicate "Enjoy" line
Phase 4 — Fresh-user simulation (Audit-only, no new code) Opus walked a fresh-user install + first-use journey end-to-end NO-GO initially 2 CRITICAL fixed (commands/*.md runtime-config-load + vault-autosave.sh git-repo guard), 4 HIGH fixed (model opussonnet for system-architect, install-template dead code removed, agent-builder solo-operator guards, README solo quick-start), MEDIUM quick wins (chmod fix, .gitignore baseline, @bitbonsai/mcpvault@^0.11.0 pin)
Phase 5 — Ship PR #1 merged, repo renamed claude-2nd-brainagent-builder-system, tagged v1.0.0, GitHub release published

Audit gates (both passed):

  • scripts/audit/sanitization-scan.sh — 4/4 checks clean (no org names, no internal agent codes, no Asana GIDs, no internal paths/personas)
  • scripts/audit/secret-scan.sh — clean (gitleaks/trufflehog if installed + grep fallback for OpenAI/Anthropic/GitHub/Asana/AWS/Google/Slack/Stripe/JWT/PEM patterns)

v1.1.0 (this release)

Closes the 3 v1.0 deferrals: plugin-managed hooks, the 4 missing pipeline skills, and a solo-mode skill for 0-5 agent users.

4 build phases, single combined Opus audit at the end:

Phase What shipped
Phase 1 — Plugin-managed hooks hooks/hooks.json (Claude Code plugin convention) + dual-mode vault-autosave.sh (config-load at runtime OR placeholder-substituted at wizard install — both paths work, backward-compatible with v1.0 wizard installs)
Phase 2 — 4 pipeline skills Sonnet sub-agent sanitized corpus-ingestion (SKILL + recipe + 814-line batch-ingest.py), chunk-and-tag (SKILL + 593-line chunk-and-tag.py), deploy-skill, uptake-measure. All ship as reference templates with "adapt to your stack" banners. v1.0 [NOT INCLUDED] callouts removed.
Phase 3 — Solo-mode rewrite New agent-builder-solo skill (305 lines) — same 2 production branches (Edit JA + Edit/Author Skill) but skips every multi-agent gate. setup.sh Step 5b defaults to solo=y / fleet=n. Fleet /agent-builder still available for graduates.
Phase 4 — Combined Opus audit + ship GO-WITH-FIXES → fixed banner version drift, plugin_version mismatch, stale docs heading, uninstall.md staleness, hooks-divergence comment → PR #2 merged, tagged v1.1.0, GitHub release published

What's deferred to v1.2

  • Wizard-shipped uninstaller (bash setup.sh --uninstall)
  • Full "solo rewrite" of the fleet /agent-builder (current solo is a parallel skill; the fleet version still has 1,161 lines)
  • Windows VM real smoke test
  • Pre-existing setup.ps1 Step 3 quote-injection (carried from v1.0)
  • Box-drawing UTF-8 (chcp 65001) for Windows PowerShell 5.1

How to verify the build yourself

git clone https://github.com/Drwegaa/agent-builder-system.git
cd agent-builder-system
bash scripts/audit/sanitization-scan.sh    # should pass 4/4
bash scripts/audit/secret-scan.sh          # should pass
git log --oneline                          # full audit trail across both releases

The audit scripts live in the repo so you can run them yourself + add more checks for your fork.


Required Notice: Copyright Dr. Wegaa (https://github.com/Drwegaa)

About

Open agent-building toolkit for Claude Code (v1.1) — Obsidian vault + agent-builder-solo/fleet + corpus-trainer pipeline (7 skills) + system-architect (4 skills) + cross-platform setup. Non-commercial.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors