Compare commits

..

1 Commits

Author SHA1 Message Date
Alexander Whitestone
560454528a feat: emergent narrative engine from agent interactions (#1607)
Some checks failed
CI / test (pull_request) Failing after 58s
Review Approval Gate / verify-review (pull_request) Failing after 7s
CI / validate (pull_request) Failing after 56s
Add nexus/chronicle.py — a living chronicle that watches fleet events
(dispatches, commits, errors, recoveries, collaborations) and renders
them as narrative prose.

- AgentEvent dataclass captures every fleet signal with kind, agent,
  detail, timestamp, and metadata
- ChronicleWriter ingests events, persists to daily JSONL, and renders
  prose via rotating template banks
- Arc detection finds dramatic patterns (struggle-and-recovery, solo
  sprint, fleet convergence, silent grind, abandon-then-retry) and
  appends arc-level commentary to the rendered chronicle
- render() and render_markdown() produce human-readable output;
  summary() returns structured stats
- Convenience constructors (event_from_gitea_issue, event_from_heartbeat,
  event_from_commit) bridge existing fleet signals into the chronicle
- 22 tests cover ingestion, persistence, template rotation, arc
  detection, markdown rendering, and edge cases

Fixes #1607

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 01:19:40 -04:00

View File

@@ -29,7 +29,7 @@ from typing import Any, Callable, Optional
import websockets
from .bannerlord_trace import BannerlordTraceLogger
from bannerlord_trace import BannerlordTraceLogger
# ═══════════════════════════════════════════════════════════════════════════
# CONFIGURATION