CAM-PULSE
CAM-PULSE mines reusable patterns from real repos, remembers what works, and injects that knowledge into your AI-assisted builds — with full attribution and test verification. No hallucinated success. No forgotten context. Every build draws on 3,590 methodologies from 55 source repositories across 5 language-specific brains. A paired blind A/B test proves the impact: KB-equipped agents achieve 92.3% vs 73.1% success (p=0.015, Wilcoxon).
For developers who want AI that learns, not just generates. Free and MIT licensed.
Every cycle feeds back. Successes strengthen patterns. Failures update priors. The system gets measurably better with use—not just bigger.
Not roadmap items. Not "coming soon." Each one is live, tested, and documented with real output.
Autonomously finds repos developers are sharing right now, filters for novelty against what it already knows, and keeps its knowledge fresh.
cam pulse scan --keywords "..."
Doesn't just store code snippets. Extracts reusable engineering patterns with lifecycle tracking, fitness scoring, and cross-pattern co-retrieval. Ships with 31 seed methodologies so every fresh install already knows CAM's own algorithms.
cam kb seed cam mine --yield-sort
Routes tasks to the best agent using Bayesian Kelly Criterion, injects learned patterns, and self-corrects when a run fails.
"90% coverage" can become a hard verification gatecam create --execute --check "pytest -q"
Every build is checked against real diffs, real tests, and real metrics. Failures are reported plainly.
cam forge-benchmark reports "0% lift" when that is the truthcam security scan cam validate
Six stages. Multi-pass mining. Bayesian routing. Knowledge injection. The loop keeps running.
X-Scout + HF
Novelty + dedup
Three-pass pipeline
Kelly Criterion
Inject + generate
Tests + attribution
Discover → mine → store → retrieve → route → build → verify → learn.
The 8-step CAM workflow. The verify → correct loop runs inside execution and emits artifacts you can inspect.
Real commands. Real output. Copy and run.
# Install and verify git clone https://github.com/deesatzed/CAM-Pulse.git cd CAM-Pulse pip install -e ".[dev]" # Smoke test cam --help cam govern stats cam pulse preflight
# One-shot X scan: search, filter, learn cam pulse scan \ --keywords "AI agent framework,new repo" \ --from-date 2026-03-21 # Dry run (scan + filter only, no cloning/mining) cam pulse scan --dry-run # View results cam pulse discoveries --limit 20 cam pulse status
# Start perpetual polling daemon (default: every 30 min) cam pulse daemon # Custom interval cam pulse daemon --interval 15 # View scan history and daily report cam pulse scans cam pulse report # Docker swarm deployment docker compose -f pulse/docker-compose.pulse.yml up -d
# Quick preview: file stats + domain signals (no LLM, free) cam mine-self --quick # Full LLM-powered mining of your own project cam mine-self # Mine a specific project directory cam mine-self --path /path/to/project # Extract patterns without generating tasks cam mine-self --no-tasks
# Check all tracked repos for staleness cam pulse freshness --verbose # Seed freshness metadata for existing discoveries cam pulse freshness --seed # Auto-refresh stale repos (significance >= 0.4) cam pulse freshness --auto-refresh # Re-mine a specific repo cam pulse refresh https://github.com/bytedance/deer-flow # Re-mine all stale repos cam pulse refresh --all # Preview without modifying cam pulse refresh --all --dry-run
# Ingest a HuggingFace model repo (auto-detects URL type) cam pulse ingest https://huggingface.co/microsoft/phi-3-mini-4k-instruct # Works with GitHub too — same command cam pulse ingest https://github.com/bytedance/deer-flow # Ingest HF repo by ID with revision control cam pulse ingest-hf sentence-transformers/all-MiniLM-L6-v2 --revision main # Force re-ingest even if already learned cam pulse ingest --force https://huggingface.co/BAAI/bge-small-en-v1.5
# Scan directories for repos (preview only, no LLM) cam mine-workspace ~/projects ~/experiments --scan-only # Mine up to 20 repos across directories cam mine-workspace ~/projects --max-repos 20 # Only mine repos that changed since last scan cam mine-workspace ~/code --changed-only # Deep scan with higher directory depth cam mine-workspace ~/projects --depth 8
# Enable Kelly routing in claw.toml # [kelly] # enabled = true # kappa = 10.0 # Shrinkage factor (higher = more conservative) # f_max = 0.40 # Maximum Kelly fraction cap # Run tasks — Kelly picks the best agent from real performance data cam create --execute --type architecture --workspace ./my-project # Kelly routing: task_type='architecture' -> agent 'claude' # (weights: claude=0.376, gemini=0.261, grok=0.261, codex=0.102) # A/B test knowledge ablation with adaptive margins cam ab-test start knowledge_ablation cam ab-test status # Samples: 24/20 Margin adapts: n=5 -> 0.05, n=50 -> 0.125 # View agent performance scores cam doctor
# Analyze knowledge gaps across your brain cam gaps # Discover new categories from unmapped patterns cam gaps --discover # Focus on a specific category cam gaps --category security # Exploratory retrieval: epsilon re-ranking + stratified corpus cam learn search "circuit breaker patterns" --explore
Each proof point was run, checked, and documented with real output. Grouped by the question it answers.
Discovers 18 repos from live X feeds, filters for novelty, clones and mines 16 novel repos into 86 new methodologies.
Discovered: 18 repos from X
Novel: 16 (2 already known)
Assimilated: 16/16 (0 failed)
Methodologies: 86 new patterns stored
JSON repair: 100% recovery (16/16 repaired)
Retrieves patterns from 3 mined repos and builds a cohesive event system: bus, middleware, plugin loader, loop detection. 258 lines.
Retrieved=3 | Used=3 | Attributed=3 | Quality=0.82
258 source lines across 5 modules
Event bus + middleware + plugin loader + loop detection
Knowledge compounds: Build A patterns inform Build B
On failure, byte-level restore resets the workspace and re-prompts the agent with violations plus test output. Drift 0.868, quality 0.76, lifecycle transition embryonic → viable.
Run 1: Correction loop triggered 3x (restore + feedback confirmed)
Run 2: First-attempt success — 10/10 tests | Drift: 0.868 | Quality: 0.76
Knowledge: 2 PULSE patterns injected | Lifecycle: embryonic → viable
Mined knowledge is retrieved, injected into agent prompts, and used to produce working code with passing tests. Retrieved=3, Used=3, Attributed=3.
Task: Pre-tool-call guardrail system
Agent output: 157 lines, 4 files, quality 0.85
Tests: 4/4 passing | Attribution: 3 patterns traced
CAM clones its own source, enhances the copy, validates through 7 gates, and atomically swaps the live install. Proven: quality 0.97, all 3,734 tests pass on the enhanced copy.
Three-pass mining: domain classification, knowledge overlap assessment, and focused LLM extraction with adaptive token budget. Nine repos, 52 methodologies.
Pass 1: Domain classification (10 categories, 0 cost)
Pass 2: KB overlap (overlap_score, suggested_focus)
Pass 3: LLM mining with structured context
Ranked improvement recommendations with confidence scores from mined knowledge. Evaluates a repo and produces enhancement plans backed by methodology evidence.
Five levels of escalating complexity: health check → build → validate → mine → self-improve. Each level exercises more of CAM's pipeline.
Multiple specialist CAM ganglia federate into a single CAM Brain. The Drive-Ops ganglion mined 1.5TB of local repos in 16 batches, producing 1,046 methodologies from 63 unique repos with 82 duplicates caught by content-hash dedup. Read-only FTS5 cross-queries pull knowledge across siblings when local confidence is low.
1,046 methodologies | 63 repos | 1.5TB drive scanned | 82 duplicates caught
16 batches | 3.5 hours | cross-query proven | brain manifests live
Natural-language specs become structured verification gates. "90% coverage" can be enforced as a hard gate. 51 tests cover extraction and enforcement.
min_coverage_pct | min_test_count
min_files_changed | max_files_changed
Operators: gte, gt, lte, lt, eq | Hard/soft gates
Phase 1 uses cached metadata checks. Phase 2 scores significance. Only important repo changes trigger a re-mine.
commits * 0.3 + new_release * 0.4
+ readme_changed * 0.2 + size_delta * 0.1
Two-gate TruffleHog plus regex fallback. Every repo is scanned before mining. Critical findings block the pipeline.
cam security scan src/ → CLEAN (0 findings)
cam security status → TruffleHog AVAILABLE
After mining new knowledge, CAM clones itself, runs its own build pipeline against the copy using newly learned patterns, validates through 7 gates (syntax, config, imports, DB schema, CLI smoke, full pytest, diff summary), and swaps only if ALL gates pass. Protected files (verifier, factory, engine, schema, config) require human review even if gates pass. Latest run: knowledge application demo produced a working async microservice with 3 PULSE patterns injected per attempt, drift 0.894, 12 files created. Self-enhancement: all 7 gates passed, 3,734 tests in 203.4s, atomic swap completed.
7 gates PASSED | 3,734 tests | 203.4s | 5 protected files
Knowledge demo: 3 PULSE patterns injected | drift 0.894 | 12 files
clone → enhance → validate → swap → post-swap → rollback-ready
CAM retrieves 3 PULSE patterns from 3,590 stored methodologies and injects them into the agent prompt alongside 12 evaluation hints. The agent produces architecture-informed code: endpoint separation, idempotent request tracking, and async SQLite persistence. The verifier checks drift alignment (0.894) and executes tests. On success, the EMA fitness feedback loop records the outcome, strengthening the patterns that contributed. Patterns traced back to mined source repos: Aegis_Atlas, CLI-Anything, and ClawTeam.
Retrieved: 3 PULSE patterns from 3,590 methodologies
Prompt: 12 evaluation hints + 3 injected patterns
Output: async microservice | 12 files | endpoint separation
Verification: drift 0.894 | tests passing | idempotent tracking
Fitness: EMA feedback recorded | lifecycle transition confirmed
Attribution: Aegis_Atlas, CLI-Anything, ClawTeam
Sukhov (2026) Bayesian Kelly Criterion sizes agent task allocation from Beta posteriors. Kappa-shrinkage prevents overconfidence with small samples. Uncertainty discount reduces fitness scores for unreliable agents' methodologies up to 30%. Adaptive A/B margins demand bigger effects from thin data — no premature conclusions.
f* = (p̄ - (1-p̄)/b) × n_eff / (n_eff + κ)
Kelly routing: architecture → claude 37.6% | gemini 26.1% | grok 26.1% | codex 10.2%
Kelly routing: analysis → claude 61.5% | codex 17.7% | gemini 17.7% | grok 3.1%
39 tests | kappa=10.0 | f_max=0.40 | exploration_floor=2%
Same task, two configurations. Run A: empty KB. Run B: full KB with 3,590 methodologies. Task: add retry logic with exponential backoff. Run B retrieved 5 battle-tested patterns from 4 repos in 1.4s and won 7 out of 8 quality checks.
Retrieved: 5 patterns from 4 repos
Run B wins: 429 awareness, jitter, bounded delay, error classification,
shared helper, error context, structured logging, fast-fail
Scorecard: KB-equipped 7/8 | Base 0/8
Full-stack SWE code generation on a Next.js history app. Blind 50/50 routing: control suppresses ALL knowledge (past_solutions + CAG corpus). 23 tasks, 6 evaluation phases, fully autonomous. KB-equipped arm: 100% success rate (8/8) vs 67% control (10/15). Near-zero variance (±0.001) proves consistent quality, not luck.
Composite: 0.699 vs 0.523 — +33.6% | Cohen's d = 0.843 (large)
D1 Functional Correctness: p = 0.039 (significant)
D2 Structural Compliance: p = 0.024 (significant)
D6 Expectation Match: p = 0.039 (significant)
Success rate: 100% vs 67% | Variant variance: ±0.001
6 dimensions: Functional, Structural, Intent, Correction, Token, Expectation
Every task now goes through an RL bandit that selects the best methodology from 3,590 mined patterns. 90% exploit (pick the best), 10% explore (discover hidden gems). After 5+ observations per (methodology, task_type), graduates from epsilon-greedy to Thompson sampling using Beta posteriors. Methods that fail twice on a task are forbidden on retry, forcing iteration through the ranked list. Cold-start protection gives under-tested methods 20% exploration.
3 queries against real DB (3,590 methodologies, real embeddings)
PRIMARY + CONTEXT selection verified on each query
Bandit outcomes recorded: 3 rows in methodology_bandit_outcomes
Forbidden-on-retry: 2 failures → excluded on next evaluate()
Relevance floor: 0.3 min score, skip KB if nothing qualifies
Infrastructure failures do NOT penalize methodologies
That single query searched 3,590 methodologies across all 5 brains (General, Drive-ops, Rust, TypeScript, Agentic-memory, Go, Misc) simultaneously. Result: Rust’s WASM sandbox with dual metering + taint tracking. Go’s five-layer permission lattice + AES-GCM encrypted secret storage. TypeScript’s defense-in-depth API gating + tiered AI gateway. Python’s pre-ingestion secret scanning + RLS multi-tenancy. Two universal patterns discovered automatically (multi-tenant isolation appeared in both Python and Go; MCP proxy appeared in both Rust and TypeScript). 108 transferable insights generated — each one says “this brain’s technique has no equivalent in that brain.” An 8-layer composition assembled the best pattern from each domain into a layered architecture. No LLM hallucination. Every result is a real methodology mined from a real repo.
$ cam federate "defense-in-depth security for a multi-tenant AI agent gateway"
Brains queried: 7 | Results: 40 | Coverage: 100%
UNIVERSAL PATTERNS (same concept, multiple languages):
• Multi-Tenant Dataset Isolation [python, go] (overlap: 0.32)
• MCP Proxy for Multi-Repo Support [rust, typescript] (overlap: 0.30)
UNIQUE INNOVATIONS (10 per brain):
• [rust] WASM Sandbox with Dual Metering (from openfang)
• [rust] Merkle Hash-Chain Audit Trail (from openfang)
• [rust] Information Flow Taint Tracking (from openfang)
• [go] Five-Layer Permission Lattice (from goclaw)
• [go] AES-GCM Encrypted Secret Storage (from goclaw)
• [go] Security Audit with Risk Scoring (from skillshare)
• [typescript] Defense-in-Depth API Gating (from dram-quest)
• [typescript] Secure AI Gateway + Tiered Models (from dram-quest)
• [general] Pre-Ingestion Secret Scanning (from a_aSatzClaw)
• [general] Four-Technique PHI Redaction (from a_a_betaQ)
8-LAYER COMPOSITION:
L1 [rust] AI integration → L2 [general] architecture
L3 [rust] CLI UX → L4 [rust] code quality
L5 [go] cross-cutting → L6 [go] data processing
L7 [typescript] design patterns → L8 [general] security
108 transferable insights | 3,734 tests passing | 0 regressions
The definitive test: each of 26 coding tasks was run twice on the same agent — once with the full knowledge base (3,590 methodologies), once with knowledge suppressed. Neither the agent nor the verifier knows which arm it’s in. The paired design eliminates agent confounding and task difficulty variance, requiring 4× fewer samples than unpaired experiments. Result: knowledge-equipped agents succeeded on 92.3% of tasks vs 73.1% control. On the 7 discordant pairs (one arm succeeded, one failed), the variant won 6 out of 7. When a task is borderline — hard enough that the agent might fail — the knowledge base tips it toward success.
Success: 92.3% variant vs 73.1% control | +19.2 pp lift
Composite: 0.804 vs 0.660 — +0.144 mean paired diff
Wilcoxon signed-rank (one-sided): W=122, p=0.0153
Paired t-test (one-sided): t=2.248, p=0.0168
Bootstrap 95% CI: [+0.023, +0.270] (excludes zero)
Cohen’s dz = 0.45 (medium effect)
McNemar discordant: 6 variant wins / 1 control win
Win/Tie/Loss: 9 / 15 / 2
Per agent: codex +0.116 | local +0.182 | grok +0.275 | claude +0.017 | gemini +0.138
All 5 agents show positive mean diff — KB effect is agent-independent
Not a benchmark. Not a meta-tool. Not a synthetic A/B report. A real Python CLI that cam create --execute built end-to-end from CAM-PULSE’s file-management, CLI, scanning, and dedup methodology families. Then verified against an actual home directory: 1.35 million files, 97.55 GB, 360 permission errors handled gracefully. Smart suggestions surfaced 4.8 GB clearly reclaimable (cache + installers), 27.9 GB in ML model files, 63,300 files untouched for 1+ year. 38 tests. 90% coverage. 16/16 validation steps pass in the harness.
Source: 8 modules, 459 statements, 0 pip deps (Python stdlib only)
Tests: 38 passed, 0 failed, 90% code coverage
Harness: 16/16 validation steps pass, exit 0
Real scan: 1,346,855 files indexed / 360 skipped
Total size: 97.55 GB across 1,211 unique extensions
SQLite index: 529 MB at ~/.tidyhome/index.db
Smart suggestions:
[CACHE] 202,918 files 3.5 GB reclaimable
[INSTALLER] 623 files 1.3 GB reclaimable
[ARCHIVE] 6,051 files 4.0 GB reclaimable
[MODEL] 411 files 27.9 GB (redownloadable)
[STALE-1Y] 63,300 files untouched 1+ year
KB sources: MiroFish, abacus_FileSearch, CLI-Anything,
app_organizer, AMM + Rust/Go/Python brain resilience
14 interactive pages. 40 real API endpoints. Every feature CAM has, now in your browser. Search knowledge, watch agents execute, build new brains, track evolution, mine repos — all from a single interface.
Four agent backends. Bayesian Kelly routing. Three deployment paths. One unified pipeline.
Access to Claude, GPT, Gemini, and dozens more through one routing layer.
Embeddings, repo comprehension, and deep dependency analysis.
Native X search, quick fixes, and live web lookup for the discovery pipeline.
Private, offline, and zero cloud. Native Apple Silicon acceleration.
Instead of static routing tags, Kelly Criterion selects the best agent per task type from real win/loss data. Each agent maintains a Beta posterior; kappa-shrinkage keeps decisions conservative until enough evidence accumulates. Priority chain: Kelly (with data) → recommended → exploration → learned → static → fallback. Real routing weights from production: architecture: claude 37.6% | gemini 26.1% | grok 26.1% | codex 10.2%
Lightweight and direct. No torch required.
pip install -e .
One command. Everything included.
docker compose up --build
Multi-container deployment with dedicated scout workers.
docker compose -f pulse/docker-compose.pulse.yml up -d
# pulse/docker-compose.pulse.yml services: pulse-orchestrator: command: ["cam", "pulse", "daemon"] restart: unless-stopped pulse-scout-ai: command: ["cam", "pulse", "scan", "--keywords", "AI agent framework new repo github.com"] pulse-scout-tools: command: ["cam", "pulse", "scan", "--keywords", "developer tools CLI open source github.com"]
Every AI coding tool generates code. Only CAM discovers patterns autonomously, remembers what works across repos, routes to the best agent per task, and proves what it did with real tests.
| Capability | GitHub Copilot | Cursor | Windsurf | Aider | CAM-PULSE |
|---|---|---|---|---|---|
| Verifies diffs actually happened | — | — | — | — | Yes — fails if nothing changed |
| Persistent cross-repo memory | — | Workspace only | Session only | — | Yes — 3,590 methodologies + lifecycle |
| Discovers new patterns autonomously | — | — | — | — | Yes — X-Scout + auto-learning |
| Applies learned knowledge to builds | — | — | — | — | Yes — retrieved, injected, attributed |
| Adaptive agent routing (learns from outcomes) | — | — | — | — | Yes — Bayesian Kelly Criterion |
| Runs 100% local, zero cloud | — | — | — | Some models | Yes — Ollama + MLX-LM |
| Reports honest failures | — | — | — | Partial | Yes — 0% lift reported when true |
| Cost | $19/mo | $20/mo | $0–40/mo | Free + API costs | Free + MIT licensed |
cam mine-selfcam mine-workspacecam gaps --discoverMost AI tools hide failures. CAM is built for the opposite: seven hardened checkpoints where the system will tell you the truth, even when the truth is zero.
Other agents say they updated files. CAM checks the actual diff. If nothing changed, the run fails.
In fixed-mode, CAM rejects agent output that introduces new top-level source namespaces. --namespace-safe-retry hardens retries.
Before risky execution, CAM asks the high-value questions, creates a reusable task contract, and blocks unsafe work.
The benchmark harness reports "0% lift" when the corpus does not beat baseline.
CAM states what does not work yet. --execute is not presented as a guaranteed autonomous builder.
Every mined methodology records source repo URL, discovery date, and license type.
Agents with few samples get kappa-shrinkage discounts. Kelly fractions stay near zero until real evidence accumulates. A/B test margins adapt to sample size instead of using a fixed threshold.
From drop-in skill to adaptive intelligence.