Commit Graph

242 Commits

Author SHA1 Message Date
Alexander Whitestone
0a4c8f2d37 art: The Timmy Foundation visual story — 24 images, 2 videos, generated with Grok Imagine 2026-04-07 12:46:17 -04:00
Alexander Whitestone
7399c83024 fix: null guard on assignees in orchestrator dispatch 2026-04-07 12:34:02 -04:00
Alexander Whitestone
cf213bffd1 [SOVEREIGN] Add Orchestrator v1 — backlog reader, priority scorer, agent dispatcher
Resolves #355 #356

Components:
- orchestrator.py: Full sovereign orchestrator with 6 subsystems
  1. Backlog reader (fetches from timmy-config, the-nexus, timmy-home)
  2. Priority scorer (0-100 based on severity, age, assignment state)
  3. Agent roster (groq/ezra/bezalel with health checks)
  4. Dispatcher (matches issues to agents by type/strength)
  5. Consolidated report (terminal + Telegram)
  6. Main loop (--once, --daemon, --dry-run)
- orchestrate.sh: Shell wrapper with env setup

Dry-run tested: 348 issues scanned, 3 agents detected UP.
stdlib only, no pip dependencies.
2026-04-07 12:31:14 -04:00
c1c3aaa681 Merge pull request 'feat: genchi-genbutsu — verify world state, not log vibes (#348)' (#360) from ezra/issue-348 into main 2026-04-07 16:23:35 +00:00
d023512858 Merge pull request 'feat: FLEET-003 - Fleet capacity inventory with resource baselines' (#353) from timmy/fleet-capacity-inventory into main 2026-04-07 16:23:22 +00:00
e5e01e36c9 Merge pull request '[KAIZEN] Automated retrospective after every burn cycle (fixes #349)' (#352) from ezra/issue-349 into main 2026-04-07 16:23:17 +00:00
ezra
e5055d269b feat: genchi-genbutsu — verify world state, not log vibes (#348)
Implement 現地現物 (Genchi Genbutsu) post-completion verification:

- Add bin/genchi-genbutsu.sh performing 5 world-state checks:
  1. Branch exists on remote
  2. PR exists
  3. PR has real file changes (> 0)
  4. PR is mergeable
  5. Issue has a completion comment from the agent

- Wire verification into all agent loops:
  - bin/claude-loop.sh: call genchi-genbutsu before merge/close
  - bin/gemini-loop.sh: delegate existing inline checks to genchi-genbutsu
  - bin/agent-loop.sh: resurrect generic agent loop with genchi-genbutsu wired in

- Update metrics JSONL to include 'verified' field for all loops

- Update burn monitor (tasks.py velocity_tracking):
  - Report verified_completion count alongside raw completions
  - Dashboard shows verified trend history

- Update morning report (tasks.py good_morning_report):
  - Count only verified completions from the last 24h
  - Surface verification failures in the report body

Fixes #348
Refs #345
2026-04-07 16:12:05 +00:00
Alexander Whitestone
277d21aef6 feat: FLEET-007 — Auto-restart agent (self-healing processes)
Daemon that monitors key services and restarts them automatically:
- Local: hermes-gateway, ollama, codeclaw-heartbeat
- Ezra: gitea, nginx, hermes-agent
- Allegro hermes-agent
- Bezalel: hermes-agent, evennia
- Max 3 restart attempts per service per cycle (prevents loops)
- 1-hour cooldown after max retries with Telegram escalation
- Restart log at ~/.local/timmy/fleet-health/restarts.log
- Modes: check now (--status for history, --daemon for continuous)

Fixes timmy-home#560
2026-04-07 12:04:33 -04:00
Alexander Whitestone
228e46a330 feat: FLEET-004/005 — Milestone messages and resource tracker
FLEET-004: 22 milestone messages across 6 phases + 11 Fibonacci uptime milestones.
FLEET-005: Resource tracking system — Capacity/Uptime/Innovation tension model.
  - Tracks capacity spending and regeneration (2/hr baseline)
  - Innovation generates only when utilization < 70% (5/hr scaled)
  - Fibonacci uptime milestone detection (95% through 99.5%)
  - Phase gate checks (P2: 95% uptime, P3: 95% + 100 innovation, P5: 95% + 500)
  - CLI: status, regen commands

Fixes timmy-home#557 (FLEET-004), #558 (FLEET-005)
2026-04-07 12:03:45 -04:00
Ezra
2e64b160b5 [KAIZEN] Harden retro scheduling, chunking, and tests (#349)
- Add Kaizen Retro to cron/jobs.json with explicit local model/provider
- Add Telegram message chunking for reports approaching the 4096-char limit
- Fix classify_issue_type false positives on short substrings (ci in cleanup)
- Add 28 unit tests covering classification, max-attempts detection,
  suggestion generation, report formatting, and Telegram chunking
2026-04-07 15:58:58 +00:00
Alexander Whitestone
67c2927c1a feat: FLEET-003 — Capacity inventory with resource baselines
Full resource audit of all 4 machines (3 VPS + 1 Mac) with:
- vCPU, RAM, disk, swap per machine
- Key processes sorted by resource usage
- Capacity utilization: ~15-20%, Innovation GENERATING
- Uptime baseline: Ezra/Allegro/Bezalel 100%, Gitea 95.8%
- Fibonacci uptime milestones (5 of 6 REACHED)
- Risk assessment (Ezra disk 72%, Bezalel 2GB RAM, Ezra CPU 269%)
- Recommendations across all phases

Fixes timmy-home#556 (FLEET-003)
2026-04-07 11:58:16 -04:00
Ezra
f18955ea90 [KAIZEN] Implement automated burn-cycle retrospective (fixes #349)
- Add bin/kaizen-retro.sh entry point and scripts/kaizen_retro.py
- Analyze closed issues, merged PRs, and stale/max-attempts issues
- Report success rates by agent, repo, and issue type
- Generate one concrete improvement suggestion per cycle
- Post retro to Telegram and comment on the latest morning report issue
- Wire into Huey as kaizen_retro() task at 07:15 daily
- Extend gitea_client.py with since param for list_issues and
  created_at/updated_at fields on PullRequest
2026-04-07 15:57:21 +00:00
2f6971902b Merge pull request '[MUDA] Issue #350 — Weekly fleet waste audit' (#351) from ezra/issue-350 into main 2026-04-07 15:34:17 +00:00
Ezra
6210e74af9 feat: Muda Audit — fleet waste elimination (#350)
Implements muda-audit.sh to measure the 7 wastes across the fleet:
1. Overproduction — agent issues created vs closed
2. Waiting — rate-limited API attempts from loop logs
3. Transport — issues closed-and-redirected
4. Overprocessing — PR diff size outliers (>500 lines for non-epics)
5. Inventory — issues open >30 days with no activity
6. Motion — git clone/rebase operations per issue from logs
7. Defects — PRs closed without merge vs merged

- fleet/muda_audit.py: core audit logic using gitea_client.py
- fleet/muda-audit.sh: thin bash wrapper
- cron/jobs.json: add Hermes cron job for weekly Sunday 21:00 runs
- cron/muda-audit.crontab: raw crontab snippet for host-level scheduling

Posts waste report to Telegram with week-over-week trends and top 3
elimination suggestions.

Part of Epic: #345
Closes: #350
2026-04-07 15:13:03 +00:00
Ezra
9cc89886da [MUDA] Issue #350 — weekly fleet waste audit
Implements muda-audit.sh measuring all 7 wastes across the fleet:
- Overproduction: issues created vs closed ratio
- Waiting: rate-limit hits from agent logs
- Transport: issues closed-and-redirected
- Overprocessing: PR diff size outliers >500 lines
- Inventory: stale issues open >30 days
- Motion: git clone/rebase churn from logs
- Defects: PRs closed without merge vs merged

Features:
- Persists week-over-week metrics to ~/.local/timmy/muda-audit/metrics.json
- Posts trended waste report to Telegram with top 3 eliminations
- Scheduled weekly (Sunday 21:00 UTC) via Gitea Actions
- Adds created_at/closed_at to PullRequest dataclass and page param to list_org_repos

Closes #350
2026-04-07 15:05:16 +00:00
Alexander Whitestone
ac17c6c321 feat: FLEET-002/006 — Fleet health check script
5-minute health monitoring for all 4 machines + Gitea:
- SSH connectivity check (socket-based, instant)
- Service check via SSH (nginx, gitea, hermes-agent, evennia)
- Disk usage check on all machines
- Local process check (hermes, ollama, openclaw, evennia)
- Telegram alert with 1-hour cooldown per alert
- Running uptime stats saved to ~/.local/timmy/fleet-health/uptime.json
- Per-day log files

Fixes timmy-home#555, FLEET-006
2026-04-07 10:26:05 -04:00
Alexander Whitestone
89bab7d2a0 feat: FLEET-001 — Fleet topology document
Complete inventory of all 4 machines, processes, services, credentials,
cron jobs, launchd services, and resource baselines.

Maps: Ezra (Forge), Allegro, Bezalel, Mac Local (hub).
Identifies unknowns and dependencies.
Generated from direct machine inspection.

Fixes timmy-home#554
2026-04-07 10:22:52 -04:00
Alexander Whitestone
95d65a1155 feat: extract sovereign work from hermes-agent fork into sidecar
Extracted 52 files from Timmy_Foundation/hermes-agent (gitea/main) into
hermes-sovereign/ directory to restore clean upstream tracking.

Layout:
  docs/             19 files — deploy guides, performance reports, security docs, research
  security/          5 files — audit workflows, PR checklists, validation scripts
  wizard-bootstrap/  7 files — wizard environment, dependency checking, auditing
  notebooks/         2 files — Jupyter health monitoring notebooks
  scripts/           5 files — forge health, smoke tests, syntax guard, deploy validation
  ci/                2 files — Gitea CI workflow definitions
  githooks/          3 files — pre-commit hooks and config
  devkit/            8 files — developer toolkit (Gitea client, health, notebook runner)
  README.md          1 file  — directory overview

Addresses: #337, #338
2026-04-07 10:11:20 -04:00
Bezalel
0d4d14b25d ops(gitea): add Ezra resurrection workflow
All checks were successful
Ezra Resurrection / resurrect (push) Successful in 3s
- Attempts health check and host-level restart via Docker nsenter
- Triggered manually or on push to this workflow file
- Part of all-hands effort to restore Ezra (#lazzyPit)
2026-04-07 03:36:50 +00:00
Alexander Whitestone
c4d0dbf942 docs: Universal Paperclips deep dive — AI agent blueprint from decisionproblem.com 2026-04-06 23:31:51 -04:00
8d573c1880 Merge branch 'main' of https://forge.alexanderwhitestone.com/Timmy_Foundation/timmy-config 2026-04-07 03:24:02 +00:00
Bezalel
49b3b8ab45 feat(wizards): add Ezra source-of-truth config with fixed fallback chain
- Establishes Ezra's config in timmy-config
- Fixes kimi-for-coding 403 issue by switching to kimi-k2.5
- Adds full fallback chain: kimi -> anthropic -> openrouter
- Part of #lazzyPit automated resurrection epic
2026-04-07 03:23:50 +00:00
Alexander Whitestone
634a72f288 feat: Force Multipliers #541 velocity tracking + #542 fleet cost report
Adds velocity_tracking() to track burn velocity across repos.
Adds fleet cost report in docs/fleet-cost-report.md.

Fixes #541
Fixes #542
2026-04-06 23:09:48 -04:00
9b36a0bd12 Implement Force Multiplier 16: The Nexus Bridge (Health Feed) 2026-04-06 22:45:25 -04:00
f4d4fbb70d Implement Force Multiplier 15: Contextual Memory Injection 2026-04-06 22:45:25 -04:00
2ad3e420c2 Implement Force Multiplier 14: The "Green Light" Auto-Merge 2026-04-06 22:45:24 -04:00
395942b8ad Implement Force Multiplier 13: Fleet Cost & Velocity Tracker 2026-04-06 22:45:23 -04:00
e18f9d772d Implement Force Multiplier 12: Automated Issue Decomposition 2026-04-06 22:45:23 -04:00
fd2aec4a24 Implement Force Multiplier 11: The Lazarus Heartbeat (Self-Healing) 2026-04-06 22:45:22 -04:00
bbbd7b6116 Implement Force Multiplier 10: Automated PR Quality Gate 2026-04-06 22:45:21 -04:00
d51100a107 Implement Sovereign Audit Trail in tasks.py 2026-04-06 22:45:20 -04:00
525f192763 Implement Fallback Portfolio wiring in tasks.py 2026-04-06 22:45:20 -04:00
67e2adbc4b Implement "The Reflex Layer" for low-reasoning tasks 2026-04-06 22:37:22 -04:00
66f13a95bb Implement Sovereign Audit Trail for agent actions 2026-04-06 22:36:42 -04:00
0eaeb135e2 Update automation inventory with new memory and audit capabilities 2026-04-06 22:36:42 -04:00
88c40211d5 feat: Bezalel Builder Wizard — Automated Artificer Provisioning (#323)
Co-authored-by: Google AI Agent <gemini@hermes.local>
Co-committed-by: Google AI Agent <gemini@hermes.local>
2026-04-07 02:34:41 +00:00
5e5abd4816 [ARCH] Gitea Client Resiliency & Retry Logic (#297)
Co-authored-by: Google AI Agent <gemini@hermes.local>
Co-committed-by: Google AI Agent <gemini@hermes.local>
2026-04-07 02:34:37 +00:00
1f28a5d4c7 [OPS] Intelligent Issue Triage & Priority Labeling (#296)
Co-authored-by: Google AI Agent <gemini@hermes.local>
Co-committed-by: Google AI Agent <gemini@hermes.local>
2026-04-07 02:34:35 +00:00
eea809e4d4 [PRIVACY] Implement pii-scrubber task via gemma2:2b (#294)
Co-authored-by: Google AI Agent <gemini@hermes.local>
Co-committed-by: Google AI Agent <gemini@hermes.local>
2026-04-07 02:33:37 +00:00
Bezalel
1759e40ef5 feat(config): add Bezalel wizard config with kimi-k2.5 fallback chain
- Establishes Bezalel's source-of-truth config in timmy-config
- Sets primary model to kimi-k2.5 via kimi-coding provider
- Adds fallback chain: kimi-k2.5 -> anthropic -> openrouter
- Includes platform configs, webhook routes, and provider settings
- Addresses #lazzyPit automated resurrection requirements
2026-04-07 01:59:03 +00:00
85b7c97f65 fix(fallback): add kimi-k2.5 to front of Allegro fallback chain
- Adds fallback_providers with kimi-coding:kimi-k2.5 as fallback1
- Followed by anthropic and openrouter fallbacks
- Aligns with #lazzyPit epic for automated resilience
2026-04-07 01:56:42 +00:00
49d7a4b511 [MEM] Implement Pre-compaction Flush Contract (#301)
Co-authored-by: Google AI Agent <gemini@hermes.local>
Co-committed-by: Google AI Agent <gemini@hermes.local>
2026-04-06 21:46:24 +00:00
c841ec306d [GOVERNANCE] Sovereign Handoff: Timmy Takes the Reigns (#313)
Co-authored-by: Google AI Agent <gemini@hermes.local>
Co-committed-by: Google AI Agent <gemini@hermes.local>
2026-04-06 21:45:39 +00:00
58a1ade960 [DOCS] Force Multiplier 17: Automated Documentation Freshness Audit (#312)
Co-authored-by: Google AI Agent <gemini@hermes.local>
Co-committed-by: Google AI Agent <gemini@hermes.local>
2026-04-06 18:34:42 +00:00
3cf165943c Merge pull request '[LAZARUS][SPEC] Cell contract, roles, lifecycle, and publication rules (#268)' (#278) from ezra/lazarus-cell-spec-268 into main 2026-04-06 17:00:47 +00:00
083fb18845 Merge pull request '[M2] Allegro Commit-or-Abort — cycle guard with 10-minute slice rule (Epic #842)' (#277) from allegro/m2-commit-or-abort-845 into main 2026-04-06 16:58:38 +00:00
Timmy Foundation Ops
c2fdbb5772 feat(lazarus): operator control surface + cell isolation + process backend (#274, #269)
Implements the Lazarus Pit v2.0 foundation:

- cell.py: Cell model, SQLite registry, filesystem packager with per-cell HERMES_HOME
- operator_ctl.py: summon, invite, team, status, close, destroy commands
- backends/base.py + process_backend.py: backend abstraction with process implementation
- cli.py: operator CLI entrypoint
- tests/test_cell.py: 13 tests for isolation, registry, TTL, lifecycle
- README.md: quick start and architecture invariants

All acceptance criteria for #274 and #269 are scaffolded and tested.
13 tests pass.
2026-04-06 16:58:14 +00:00
Ezra
ee749e0b93 [LAZARUS][SPEC] Define cell contract, roles, lifecycle, and publication rules
Addresses timmy-config#268.

- Establishes 6 core invariants (filesystem, credential, process, network, memory, audit)
- Defines 5 canonical roles: director, executor, observer, guest, substitute
- Documents full lifecycle state machine (IDLE -> INVITED -> PREPARING -> ACTIVE -> CHECKPOINTING/CLOSED/ARCHIVED)
- Specifies publication rules: what must, must not, and may be published back to Gitea
- Filesystem layout contract for process/venv/docker/remote backends
- Graveyard retention policy with hot/warm/cold tiers

Cross-references: #269 #270 #271 #272 #273 #274 #245
2026-04-06 16:56:43 +00:00
Timmy Foundation Ops
2db03bedb4 M2: Commit-or-Abort — cycle guard with 10-minute slice rule and crash recovery (Epic #842) 2026-04-06 16:54:02 +00:00
c6207bd689 Merge pull request '[gemini] implement read-only Nostur status query MVP (#182)' (#275) from gemini/issue-182 into main 2026-04-06 15:45:13 +00:00