Skip to content

docs: add AutoResearch chat-log mining and agent runbook #3616

Closed

Description

@zackees

Context

Recent LPC845 and AutoResearch work showed that agents repeatedly needed the same prompt corrections before they produced useful hardware evidence. The missing documentation is not only the bash autoresearch command itself; it is the full agent workflow for mining prior Codex chats, extracting the right command shapes, verifying them against the repo parser, and turning that into durable AutoResearch agent documentation.

Relevant current sources:

  • CLAUDE.md routes hardware work to agents/docs/hardware-autoresearch.md and says new live-device functionality should go through examples/AutoResearch/AutoResearch.ino.
  • agents/docs/hardware-autoresearch.md documents fbuild port scan, bash autoresearch, fbuild-owned deploy, RPC usage, and examples such as bash autoresearch esp32s3 --parlio, bash autoresearch esp32c6 --parlio, bash autoresearch teensy41 --object-fled --tx-pin 8 --rx-pin 9 --timeout 120, and bash autoresearch lpc845 --fault-emit-test --upload-port COM10 --timeout 120s --skip-lint.
  • autoresearch, ci/autoresearch/args.py, and ci/autoresearch/phases.py are the command parser/orchestration source of truth.
  • examples/AutoResearch/ and especially examples/AutoResearch/AutoResearchRemote.cpp are the firmware-side RPC/function binding source of truth.
  • src/fl/channels/README.md and platform READMEs such as src/platforms/arm/lpc/README.md are needed when validating public FastLED API paths rather than raw peripheral benches.
  • https://github.com/FastLED/datasheets should be cited for MCU/peripheral claims before agents answer wiring or route questions.

The specific doc gap: agents need a repeatable way to rescan Codex chat archives and find evidence-backed AutoResearch usage patterns, then have a stronger model synthesize the final documentation. Lower-cost agents should be used as binary relevance gates and evidence extractors, not as the final source of truth.

Proposal

Add or extend agent documentation so a future agent can perform this workflow end to end:

  1. Scan Codex chat logs for AutoResearch/FastLED evidence.

    • Primary JSONL logs: C:\Users\niteris\.codex\sessions\YYYY\MM\DD\rollout-*.jsonl.
    • Also consider history.jsonl, logs_2.sqlite, goals_1.sqlite, and memories_1.sqlite when useful.
    • Use deterministic prefiltering first with terms such as autoresearch, auto research, fbuild port scan, esp32, esp32s3, esp32c6, lpc845, lpc8, teensy, rpc, function binding, cmd args, fault-emit, dma-uart, and uart.
  2. Normalize logs into indexed message windows.

    • Each message should have a stable idx, source file path, line number, role, timestamp, and text excerpt.
    • Do not ask a model to read all raw logs when a deterministic extractor can pass only relevant windows.
  3. Fan out lower-cost agents as yes/no gatekeepers.

    • Prompt each shard with a strict binary question: does this log contain evidence useful for improving FastLED AutoResearch agent documentation?
    • The first field returned must be answer: "yes" | "no".
    • For yes, return attention_indices, exact commands seen, boards/families, flags, files/docs mentioned, user corrections, and unresolved ambiguity.
    • For low-confidence no, preserve the indices for GPT-5.5 review.
  4. Use GPT-5.5 only for synthesis and verification.

    • GPT-5.5 should read the yes outputs and low-confidence no outputs, verify command syntax against autoresearch, ci/autoresearch/args.py, and ci/autoresearch/phases.py, dedupe findings, and update the durable docs.
    • Lower-cost model output should be treated as evidence pointers, not final documentation truth.
  5. Expand the AutoResearch runbook from the verified evidence.

    • Document board-family invocation patterns for ESP32-family boards, LPC/LPC845, Teensy, and generic/auto-detected boards.
    • Include examples for bringup, driver validation, loopback, fault diagnostics, and public FastLED API validation.
    • Include how to add firmware-side function bindings/RPC handlers in examples/AutoResearch/... and expose host-side command args/modes in ci/autoresearch/....
    • Include the guardrail that raw pyserial scripts, stale issue comments, and CI compile output are not substitutes for local bash autoresearch evidence when hardware is attached.

Suggested lower-model gatekeeper prompt

You are a binary relevance classifier for FastLED AutoResearch documentation.

For this chat log, answer YES only if it contains evidence useful for improving
AutoResearch agent documentation, including:
- bash autoresearch command shapes
- board bringup
- ESP32/LPC/Teensy/generic board behavior
- fbuild port scan
- AutoResearch RPC/function bindings
- command-line args or mode flags
- user corrections about how agents should use AutoResearch

Answer NO if it only mentions unrelated coding work, generic FastLED work,
or hardware work without AutoResearch documentation value.

Return strict JSON only:
{
  "answer": "yes" | "no",
  "confidence": 0.0-1.0,
  "attention_indices": [message idx numbers],
  "reason": "one short sentence",
  "summary_for_gpt55": "2-4 sentence evidence summary, empty if no",
  "commands_seen": [],
  "boards_or_families": [],
  "flags_seen": [],
  "files_or_docs_mentioned": [],
  "user_corrections": [],
  "open_questions": []
}

Acceptance criteria

  • Add agent documentation for the Codex chat-log scan workflow, including deterministic prefiltering, stable message indices, lower-model yes/no gating, attention_indices, and GPT-5.5 synthesis.
  • Document where Codex chat/session archives live locally and how to safely reduce them before model review.
  • Document concrete bash autoresearch <board-or-family> ... invocation patterns for ESP32-family, LPC/LPC845, Teensy, and generic/auto-detected board runs, verified against the current parser.
  • Document new-board bringup as a staged workflow: fbuild port scan, build/deploy through bash autoresearch, minimal boot/serial/RPC echo, then targeted driver/API validation.
  • Document how to add AutoResearch firmware-side RPC/function bindings under examples/AutoResearch/... and host-side command args/modes under ci/autoresearch/....
  • Include links to CLAUDE.md, agents/docs/hardware-autoresearch.md, autoresearch, ci/autoresearch/args.py, ci/autoresearch/phases.py, examples/AutoResearch/, src/fl/channels/README.md, relevant platform READMEs, and https://github.com/FastLED/datasheets.
  • Include guardrails: do not infer CLI syntax from memory, do not raw-pyserial around the harness, do not close hardware work from stale comments or CI compile-only evidence, and consult datasheets for peripheral/wiring claims.
  • Validate docs by running any relevant documentation tests or at least a focused grep/parser check that all documented flags still exist.

Open questions

  • Should the chat-log scanner live as documentation only, a small script, or a reusable Codex skill/plugin? Documentation is the minimum; a script may be warranted if this scan recurs.
  • Which lower model should be the default gatekeeper for this task (gpt-5.4-mini vs gpt-5.3-codex-spark), assuming both are available in the current Codex environment?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions