Commit Graph

1300 Commits

Author SHA1 Message Date
Boden Fuller 6e31e06763 test(maturity): split markdown reader assertions archive/codex/maturity-test-complexity 2026-04-12 01:31:45 -04:00
Bo 04ba1a374a refactor(defrag): split oscillation sweep helpers (#103) 2026-04-12 01:28:41 -04:00
Bo 24ff7bfddd test(defrag): add dedup UAT fixture assertions (#102) 2026-04-12 01:18:01 -04:00
Bo 1fa3a40b7f docs(evolve): clarify v2 operator loop (#98) 2026-04-12 01:07:19 -04:00
Bo 18cbefc59b test(capture): lock json stdout panic restore (#100) 2026-04-12 01:05:32 -04:00
Bo 1eff62b6af fix(forge): reconcile tier1 hardening (#96)
* fix(llm): harden session writer frontmatter

* feat(llm): add pre-chunk redactor

* feat(forge): wire tier1 transcript pipeline

* docs(cli): add forge review reference
2026-04-12 01:01:50 -04:00
Bo 7dcaf68b10 docs(cli): add forge review command reference (#101) 2026-04-12 00:55:33 -04:00
Bo c917eab75b test(mine): lock json stdout contract (#99)
* test(mine): lock json stdout contract

* fix(rpi): normalize next-work queue statuses
2026-04-12 00:45:12 -04:00
Boden Fuller 032ce8cb08 fix(test): update forge golden file for review subcommand
TestErrorForgeNoArgs golden file needed the new `review` subcommand
in the Available Commands list.
2026-04-12 00:45:08 -04:00
Boden Fuller 3a75242784 feat(forge): add Tier 2 structural review gate (W6)
New `ao forge review` command promotes draft session pages to
status:reviewed using a structural quality gate:
  - All 4 required section types present (headings, entities, assistant)
  - Confidence >= 0.5 (not an all-skipped session)
  - Atomic file rewrite with reviewed_at + reviewed_by timestamps

v1 uses structural checks only. LLM-based review (Claude/Codex
re-reviewing draft content) is deferred pending a labeled retrieval
relevance set for the eval harness.

Flags: --dry-run shows what would be promoted without writing.

Tests (6 cases):
  - Promotes qualifying draft pages
  - Skips already-reviewed pages
  - Skips low-confidence pages (0.01)
  - Dry-run counts but doesn't write
  - Empty/missing directory handled gracefully
2026-04-12 00:41:07 -04:00
Boden Fuller af7e3d3c79 feat(dream): add Tier 1 forge post-loop hook (W5)
After Dream RunLoop completes, runPostLoopTier1Forge collects recent
Claude session JSONL files (modified in last 26h, >1KB) from
~/.claude/projects/ and runs llm.RunForgeTier1 to produce draft
session pages in .agents/ao/sessions/.

Config: reads dream.local_curator.model and dream.local_curator.ollama_url
(same config the curator adapter uses). When no model is configured, the
hook skips silently (opt-in). AGENTOPS_FORGE_TIER1_DISABLE=1 kill switch
also short-circuits.

Results are recorded in the morning report's close_loop.tier1_forge
object (files_processed, files_skipped, sessions_wrote, errors). All
errors degrade honestly into summary.Degraded; the Dream run never
aborts on Tier 1 failure.

Tests:
- collectRecentSessionJSONL finds recent .jsonl, skips tiny/non-jsonl
- No ~/.claude/projects/ returns nil (no error)
- Kill switch skips silently
- No model configured skips silently
2026-04-12 00:38:46 -04:00
Boden Fuller 188adc63de docs(post-mortem): tier 1 forge learnings + next-work harvest
Learnings extracted from the Tier 1 forge implementation session.
Next work harvested: W5 Dream hook, W6 Tier 2 gate, flag matrix
test fix, larger chunk spike.
2026-04-12 00:25:49 -04:00
Bo 4c5321c636 feat(dream): add local curator adapter (#97) 2026-04-12 00:24:25 -04:00
Boden Fuller 123f543970 feat(forge): Tier 1 local-LLM session summarization pipeline
New cli/internal/llm package implementing the jsonl-to-llm-wiki tiered
forge v1 slice: parser → redactor → chunker → ollama client → summarizer
→ session writer. Wired into `ao forge transcript --tier=1 --model=<tag>
--llm-endpoint=<url>`.

Empirically validated via W0-6 spike (gemma4:e4b on bushido, 3/3 PASS).
14 files, 2425 LOC (1200 impl + 1200 test). 31 LOC thin Cobra wiring in
forge.go (within ≤40 budget). Kill switch: AGENTOPS_FORGE_TIER1_DISABLE=1.
2026-04-12 00:07:19 -04:00
Boden Fuller 6a96fdebed feat(forge): add --tier=1 local-LLM pipeline wiring + redactor (W4)
cli/cmd/ao/forge.go (thin cobra wiring, 32 lines added):
  - New flags: --tier, --model, --llm-endpoint on forge transcript
  - runForgeTranscript branches to runForgeTier1 when --tier=1
  - runForgeTier1 helper calls llm.RunForgeTier1 with OutputDir set to
    <cwd>/.agents/ao/sessions/
  - --tier=1 without --model returns an immediate error
  - Default --llm-endpoint empty → llm.ResolveDefaultEndpoint()
    (reads $AGENTOPS_LLM_ENDPOINT, falls back to http://localhost:11434 —
    NOT hardcoded per pre-mortem F6)

cli/internal/llm/redactor.go + test:
  - Prefix-match secret redactor (AWS, GitHub PAT/OAuth, Anthropic,
    OpenAI, PEM private key blocks)
  - Home-path scrubbing to /FIXTURE
  - 8 test cases including credential-at-chunk-boundary (F3 critical)

cli/internal/llm/forge_tier1.go + test:
  - RunForgeTier1(opts) dispatcher chaining:
      parser → Redact (BEFORE chunking, F3) → ChunkTurns →
      Summarizer.SummarizeChunk → BuildPage → WriteSessionPage
  - Kill switch: AGENTOPS_FORGE_TIER1_DISABLE=1 short-circuits immediately
  - Tier1Options.SetGeneratorFactory enables test injection of a fake LLM
  - Per-chunk errors degrade honestly to a skipped chunk (confidence drops)
  - L2 integration test via httptest.NewServer asserts:
      - Full end-to-end: fixture JSONL → session page on disk
      - stream:false in /api/generate body
      - GitHub token in fixture does NOT appear in the written page
      - Kill switch halts the pipeline
      - Missing OutputDir/SourcePaths return clear errors
      - FactoryInjection path for fakeLLM (test-only backend)

All llm package tests green (25+ cases across chunker, ollama, summarizer,
session writer, redactor, forge_tier1). cd cli && go build ./... clean.

Part of jsonl-to-llm-wiki tiered forge v1 slice (W0-W4+W7). Next: W7
local commits + pre-push gate, PAUSE before PR per plan.
2026-04-12 00:00:29 -04:00
Boden Fuller 0cee0aa586 feat(llm): add summarizer + session writer (W3)
Summarizer: renders each TurnChunk into the spike-validated PromptTemplate
(verbatim copy from .agents/rpi/spike-2026-04-11-gemma4-output-shape.md
— DO NOT edit without re-running the spike), calls the LLM once, tolerates
a wrapping ```markdown fence, and parses the strict-markdown output into
a ChunkNote (Intent / Summary / Entities / AssistantCondensed). Returns
an error when any required section is missing or empty. Recognizes "SKIP"
as a valid non-substantive response.

Session writer: 17-field frontmatter SessionFrontmatter struct enumerates
every field from the council ARCH-3 schema (type, session_id, source_jsonl,
workspace, started_at, ended_at, turns, tokens_in/out, model_primary,
status, tier, model, model_digest, confidence, ingested_at, ingested_by,
first_seen, + optional parent_session/reviewed_at/reviewed_by). BuildPage
computes confidence from the skip ratio and defaults status=draft, tier=1.
WriteSessionPage writes to a sibling tempfile then os.Rename's it into
place (atomic per pre-mortem F2).

Generator interface narrows what Summarizer needs from an LLM backend so
tests can use a fakeLLM scripted with canned responses; *OllamaClient
satisfies it via the new ModelName() method.

Tests (fakeLLM + tempdir):
  - Strict-markdown parse on the real spike output
  - SKIP recognition
  - ```markdown fence tolerance
  - Missing-section error
  - LLM error propagation
  - Prompt contains verbatim spike template + USER/ASSISTANT rendering
  - Entity wikilink extraction
  - Full 17-field frontmatter serialization
  - Optional fields omitted when empty
  - Atomic WriteSessionPage (no temp file leftover)
  - Overwrite via atomic rename
  - BuildPage confidence from skip ratio

Part of jsonl-to-llm-wiki tiered forge v1 slice. W4 wires RunForgeTier1
into cli/cmd/ao/forge.go as a ≤40 LOC thin dispatcher that chains:
parser → redactor → ChunkTurns → Summarizer.SummarizeChunk (per chunk) →
BuildPage → WriteSessionPage.
2026-04-11 23:26:17 -04:00
Boden Fuller cfd84bb9ab feat(llm): add turn chunker for session jsonl pipeline (W1)
New cli/internal/llm package with TurnChunk type and ChunkTurns(msgs,
maxChars) that groups TranscriptMessages into budget-bounded user→
assistant chunks. Drops tool_use/tool_result noise, filters <20-char
messages, proportionally truncates oversized pairs (40/60 user/assistant).

Test-first: 11 unit tests covering empty input, single pair, multi-pair,
budget boundaries (500/2000/4000), orphan drop, tool-noise filter, prompt
rendering, and zero-budget default fallback.

Part of the jsonl-to-llm-wiki tiered forge v1 slice. Downstream waves
(ollama client, summarizer, session writer, forge wiring) consume
TurnChunk via .Prompt() or field access. Privacy redaction runs BEFORE
chunking per pre-mortem F3 and is owned by W4.

Empirical basis: .agents/rpi/spike-2026-04-11-gemma4-output-shape.md (3/3
PASS on real nami session chunks with gemma2:9b).
2026-04-11 23:22:53 -04:00
Boden Fuller 0250c78d5b feat(llm): add ollama HTTP client for Tier 1 summarization (W2)
NewOllamaClient(opts) probes /api/tags to validate model installation,
records the model digest (for frontmatter model_digest field), and
queries /api/show to determine the advertised context budget (falling
back to DefaultContextBudget on any failure). Generate() POSTs to
/api/generate with stream:false (critical — ollama's default is
stream:true which would break single-shot JSON decode), retries on 5xx
up to MaxRetries, and returns the response string.

Sentinel errors: ErrOllamaOffline (connection refused), ErrModelNotInstalled
(model absent from /api/tags).

ResolveDefaultEndpoint() reads $AGENTOPS_LLM_ENDPOINT or falls back to
http://localhost:11434 — not hardcoded to bushido per pre-mortem F6.

Tests (httptest.NewServer mocks, 10 cases):
  - stream:false asserted in request body (S6 critical)
  - ErrModelNotInstalled when /api/tags omits the model
  - ErrOllamaOffline on connection refused
  - Digest() returns /api/tags digest value
  - ContextBudget() uses /api/show model_info.*.context_length
  - ContextBudget() falls back to DefaultContextBudget on missing field
  - Generate() retries once on 5xx
  - Malformed JSON surfaces a decode error
  - Per-request timeout fires via SetRequestTimeout
  - ResolveDefaultEndpoint env override + fallback

Part of jsonl-to-llm-wiki tiered forge v1 slice. W3 summarizer consumes
OllamaClient via Generate(prompt) and stamps Digest()/ContextBudget()
into the session page frontmatter.
2026-04-11 23:20:44 -04:00
Boden Fuller 33ef4824e3 fix(overnight): floor stage durations 2026-04-11 23:20:18 -04:00
Boden Fuller 1be62ff37f test(quarantine): promote claude code suite 2026-04-11 23:10:04 -04:00
Boden Fuller 204501fde5 test(quarantine): promote codex integration suite 2026-04-11 23:06:54 -04:00
Boden Fuller 40c88d0e46 test(quarantine): promote team runner suite 2026-04-11 22:57:16 -04:00
Boden Fuller 7e2ccc6336 test(quarantine): promote ol integration suite 2026-04-11 22:51:35 -04:00
Boden Fuller a8cca4d15c chore(skills): refresh llm wiki artifacts 2026-04-11 22:36:24 -04:00
Boden Fuller 22e08afae7 docs(tests): record quarantine promotion followups 2026-04-11 22:28:22 -04:00
boshu2 c20fe90a61 merge: llm wiki integration
# Conflicts:
#	docs/cli-skills-map.md
2026-04-11 22:26:27 -04:00
Boden Fuller 91b2ef5d9d docs(positioning): prepare HN devto article draft 2026-04-11 22:16:16 -04:00
boshu2 4b06c7780f feat(cli): add compile command archive/feat/llm-wiki-integration-2026-04-11 2026-04-11 21:58:46 -04:00
Boden Fuller a1a58bfb28 docs(skills): add autodev contract skill 2026-04-11 21:57:03 -04:00
boshu2 d282c84bc8 docs: sync llm-wiki skill catalog 2026-04-11 21:35:23 -04:00
Boden Fuller bd27a5493f test(council): smoke mixed artifacts 2026-04-11 21:28:50 -04:00
boshu2 305cb97e13 proposal(skills): add llm-wiki skill — Karpathy LLM Wiki × AgentOps hybrid
Proposes a new skill `skills/llm-wiki/` that brings Andrej Karpathy's LLM
Wiki pattern (April 2026) into AgentOps as a compounding layer for
external knowledge (articles, papers, transcripts, clipped web content).

Complements existing flywheel skills:
- skills/compile operates on internal .agents/ artifacts (existing)
- skills/llm-wiki operates on external raw/ sources (proposed)

Both produce LLM-maintained markdown wikis; they cross-link but don't
merge. The skill is tier-agnostic (--tier 1|2|3 flag for always-on local
LLM / on-demand expert / human).

Contents:
- skills/llm-wiki/SKILL.md — skill specification with init/ingest/query/
  lint/promote phases, interop with compile/research/forge/inject/
  post-mortem/knowledge-activation, output contract, open questions
- skills/llm-wiki/references/architecture.md — full design rationale,
  3-tier curator model, anti-patterns, schema files, migration path
- skills/llm-wiki/references/research.md — research artifact with source
  analysis (Karpathy gist, 2 community implementations, ecosystem tools)

Status: PROPOSAL. No implementation yet. Council review via
/pre-mortem --preset=product recommended before any code is written.

Motivated by real use on bushido-box (Boful's personal dev box) where
the vault needed a compounding external-knowledge layer to complement
the existing AgentOps internal flywheel. See
platform-lab/patterns/llm-wiki-architecture.md in that vault for the
host-specific design this proposal abstracts.
2026-04-11 21:28:28 -04:00
boshu2 8114d6a6da docs: capture compiled knowledge workspace requirements 2026-04-11 21:27:52 -04:00
Boden Fuller 6bc3e9f5ab refactor(overnight): keep RunLoop complexity from regressing
Refs na-1iv
2026-04-11 21:13:18 -04:00
Boden Fuller d1c9c43f80 docs(council): enforce strict mixed mode
Refs na-1i9
2026-04-11 21:09:47 -04:00
Boden Fuller 2af0f4bd02 test(overnight): cover live tree hash statuses
Refs na-1iv
2026-04-11 21:00:19 -04:00
Boden Fuller 758f77cdc0 docs(profiles): replace obsolete learn command
Refs na-uuy.7
2026-04-11 20:45:48 -04:00
Boden Fuller c421fb3620 fix(evolve): migrate baselines to era directories
Refs na-uuy.15
2026-04-11 20:37:44 -04:00
Boden Fuller c75fadd91e chore(agents): refresh learning decay metadata 2026-04-11 20:27:03 -04:00
Boden Fuller 8b30233286 docs(pre-mortem): add contract-atomic refactor gate
Refs na-uuy.14
2026-04-11 20:18:08 -04:00
Bo a73970035b Fix overnight process liveness on Windows
Treat successful Windows process lookup as alive instead of using unsupported Unix signal(0), and include the overnight package in the native Windows smoke gate.
2026-04-11 20:12:56 -04:00
Boden Fuller 873243addc fix(post-mortem): harden closure audit evidence matching 2026-04-11 20:00:43 -04:00
Bo 18d8f5b900 Add native Windows smoke coverage
Adds a blocking windows-smoke job, native PowerShell smoke script, Windows docs updates, and moves a Unix-only RPI lock permission test out of the Windows test path.
2026-04-11 19:52:32 -04:00
Boden Fuller 6ff3295ac2 chore(learning): refresh release learning decay 2026-04-11 19:32:49 -04:00
Bo 659c983ecc Add Windows ao installer
Adds a Windows PowerShell installer for ao, documents the Windows install path, fixes Windows-specific ao/runtime test issues, and removes the CI ripgrep dependency from the Codex override coverage validator.
2026-04-11 19:04:18 -04:00
Boden Fuller aca63b53bb ci: promote codex local gates 2026-04-11 18:51:02 -04:00
Boden Fuller 603e090cbb feat(cli): persist evolve goal-era baselines 2026-04-11 18:40:07 -04:00
Boden Fuller 1741517d0f docs(release): refresh v2.36 notes for retag v2.36.0 2026-04-11 18:02:19 -04:00
Boden Fuller 553211dabe docs: add autodev program contract 2026-04-11 17:37:54 -04:00
Boden Fuller b0002aa065 feat(cli): add evolve operator command 2026-04-11 17:26:06 -04:00