Skip to content

Run telemetry, operator-only factory teardown, reliable improvement self-edits, multi-provider agents - #92

Merged
stempeck merged 2 commits into
mainfrom
issues/91
Aug 3, 2026
Merged

Run telemetry, operator-only factory teardown, reliable improvement self-edits, multi-provider agents#92
stempeck merged 2 commits into
mainfrom
issues/91

Conversation

@stempeck

@stempeck stempeck commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Closes #91.

What you get

See where your runs spend time and money

New af telemetry [on|off|status|report|usage] command family. Recording is off by default and factory-wide when you opt in. Once on:

  • af telemetry report prints a per-step timing table right in the terminal — find the slow step of a formula run without leaving the shell.
  • quickstart.sh now installs a bundled, pinned, checksum-verified dashboard (loopback-only) seeded with six views: step duration, tokens per agent/model/step, cost per agent/model, spend outside steps, and two honesty views that show you when the accounting doesn't reconcile instead of rounding the gap away. --no-telemetry skips all of it.
  • Prefer your own observability stack? Point endpoint in .agentfactory/telemetry.json at any OpenTelemetry address — the bundled dashboard is a convenience, not a dependency. Secrets and factory-specific endpoints stay untracked.
  • The web console gains a Telemetry panel — step timings, token usage, session metrics — readable from your host browser over the console's existing connection, no tunnels. Every degraded state is a plain-language sentence telling you what's wrong and what to do next; an unprobed backend is never shown as healthy and an empty pane always says why.
  • Quality/fidelity gate grader calls are attributed as overhead instead of being invisible spend.
  • The bundled backend is relaunched automatically (by af up and the watchdog) if it dies while recording is on.

The factory can no longer be torn down by accident

Factory-wide teardown — bare af down, --all, --reset, af install --agents, af dispatch stop — is now operator-only: run from inside any agent session (this has happened, twice) it refuses with clear guidance to skip, continue, and escalate to you. Scoped stops still work, in three tiers: an agent can stop itself, a dispatcher can stop the specialist it dispatched, and the interactive manager can stop any autonomous worker — so you can direct crisis teardown through the manager. --reset carries the same authority as the plain stop. Documented honestly as a guardrail against accidents, not a security boundary (accepted bypasses are listed in ADR-021), with drift tests keeping the doc claims accurate.

Improvement self-edits actually land

A dispatched agent running in a worktree used to write its formula self-improvement to a worktree-local copy that nothing validates or promotes — the edit silently vanished. It now always edits the factory-root store formula, so the verdict you're mailed and the af install --agents promotion route see the same file the agent touched.

Run agents on non-Anthropic models

A litellm gateway route (codex in models.json, key kept in an untracked secrets file, --litellm bootstrap flag) lets you assign any agent to GPT models per-agent. Ships with working variants — gpt-fable-review and gpt-rootcause-all — plus two new formulas: fable-secure (fixed-checklist security-program coordinator) and multi-agent (two persistent analysts on different models, findings synthesized independently).

Wider watchdog coverage

startup.json now watches the full autonomous-worker roster by default, not just mergepatrol, so wedged workers get noticed and restarted.

Notes

  • 230 files, +42k lines — the bulk is the new internal/telemetry package and its recorded-real test corpus (actual pinned-backend responses, rejection shapes, golden DTOs for every degraded state).
  • No behavior changes when telemetry is off and no dashboard is installed; teardown from an operator shell is byte-for-byte unchanged.
  • CI gains a conformance job that drives the shipped console JS with real backend DTOs to assert the exact banner lines an operator would see.

🤖 Generated with Claude Code

stempeck and others added 2 commits August 2, 2026 23:15
…e panel), gate factory-wide teardown as operator-only with three-tier scoped af down, fix improvement self-edits to target the factory-root store from worktrees, add litellm-routed GPT formulas plus fable-secure and multi-agent, and expanded watchdog coverage.
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ stempeck
❌ agentfactory


agentfactory seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@stempeck
stempeck merged commit 0df7e2e into main Aug 3, 2026
6 of 7 checks passed
@stempeck
stempeck deleted the issues/91 branch August 3, 2026 03:26
stempeck added a commit that referenced this pull request Aug 3, 2026
* docs: refresh README + CHANGELOG for the #92 wave (telemetry flagship)

- Fix three stale README claims caught in the cycle-2 audit:
  `af version` -> `af --version`; formula count 19 -> 24; skills 3 -> 10.
- Add an Observability section and command-reference entries for `af telemetry`
  (per-step latency + token usage), plus lighter coverage of `af improvement`
  and multi-provider `af config models`.
- Expand the Included Formulas table to all 24 (adds fable-secure, gpt-fable-review,
  gpt-rootcause-all, multi-agent, marketing-cycle) and Included Skills to all 10.
- CHANGELOG [Unreleased]: telemetry, multi-provider agents, operator-only factory
  teardown, reliable improvement self-edits, new shipped formulas.

marketing-cycle af-50cdad6b; flagship (af telemetry) approved via #93.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Co-authored-by: agentfactory-cli <293373236+agentfactory-cli@users.noreply.github.com>

* marketing-cycle af-50cdad6b: cycle-2 audit, story, and gate log

Committed-mode cycle state: the audit (NEW/STALE/STORY-WORTHY), the operator-approved
story proposal (flagship = af telemetry, APPROVE via #93), and the GATE-1 checklist log.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Co-authored-by: agentfactory-cli <293373236+agentfactory-cli@users.noreply.github.com>

* marketing-cycle af-50cdad6b: web-console + telemetry revamp (operator direction, #94)

Operator feedback on #94: lead from the HUMAN-operator perspective, feature the web
console (Floor + the new Telemetry view), show BOTH time and tokens, broaden coverage
beyond telemetry alone, and correct the token claim (tokens + cost ARE recorded).

- README: surface the web console Floor view and Telemetry view (per-step timing +
  per-run token usage + session metrics; degradation-as-data banner).
- Tier B drafts (Medium + LinkedIn) rewritten v2 in the operator's voice: control-room
  framing, real per-step durations from this run, honest token/cost handling, a tour of
  the wider #92 wave (multi-provider, operator-only teardown, self-improvement).
- Stage two live-console screenshots (Floor, Telemetry) as article assets.
- GATE-3 addendum: source evidence for the new web-console claims.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Co-authored-by: agentfactory-cli <293373236+agentfactory-cli@users.noreply.github.com>

* marketing-cycle af-50cdad6b: resolve GATE 4 draft approval (#94)

- Medium: READY (operator approved as written).
- LinkedIn: EDITED — operator supplied a shorter canonical version; body replaced with
  their text, mechanics-only fixes applied and enumerated (Worflow->Workflow, GitHub URL
  filled, Medium URL left as publish-time placeholder). Prior draft kept as reference.
- Runbook Voice: recorded the operator's short-form LinkedIn register as the new
  calibration source.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Co-authored-by: agentfactory-cli <293373236+agentfactory-cli@users.noreply.github.com>

* marketing-cycle af-50cdad6b: self-review + self-verify log (PASS)

SELF-REVIEW and SELF-VERIFY sections: diff clean, links resolve, no cruft committed,
Tier A stale fixes hold, both drafts operator-resolved, tier/voice/privacy laws upheld.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Co-authored-by: agentfactory-cli <293373236+agentfactory-cli@users.noreply.github.com>

---------

Co-authored-by: agentfactory <dev@agentfactory.local>
Co-authored-by: agentfactory-cli <293373236+agentfactory-cli@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No run measurement, ungoverned teardown authority, improvement self-edits that miss the store, and a single-provider fleet

2 participants