trajectory-logging
ATIF trajectory serialization with ring buffer for post-hoc debugging, eval dataset construction, and regression detection.
- License 许可
- GPL-3.0
- 最近更新
- 2026-04-24
- Stars
- ★ 1
- Forks
- 3
01 前言 Front Matter
- name
- trajectory-logging
- next
- [ "eval-framework" ]
- group
- orchestration
- workflows
- [ "continuous-improvement" ]
- description
- ATIF trajectory serialization with ring buffer for post-hoc debugging, eval dataset construction, and regression detection.
- prerequisites
- []
- user-invocable
- true
03 SKILL.md 正文
Trajectory Logging
Log every agent action as structured JSON using the ATIF (Agent Trajectory and Interaction Format) schema. Use a ring buffer to prevent disk exhaustion. Trajectory logs enable post-hoc debugging, eval dataset construction, and regression detection.
Steps
- Define the trajectory entry schema: structured JSON with fields for tool name, parameters, result, decision rationale, timestamp, agent ID, and session ID.
- Capture every tool invocation and result via a PostToolUse hook. Write entries to
.harness/trajectories/{agent-id}-{session-id}.jsonl. - Implement a ring buffer capped at 50K entries per file. When full, overwrite the oldest entries.
- Record session metadata at the start of each file: agent ID, task ID, mode, start time. Update with end time and summary statistics on session completion.
- Provide an eval dataset export tool that extracts trajectories into a format compatible with the eval-framework skill.
- Implement regression detection: compare trajectories across runs for the same task. Flag behavioral changes (e.g., deploy task now takes 15 tool calls instead of 8).
- Provide a trajectory search tool to query for specific actions, errors, or patterns across logs.
- Automatically prune trajectory files older than a configurable retention period.
Anti-Patterns
- Unstructured text logs with no consistent schema, making them impossible to query or compare
- No ring buffer -- a long-running agent fills 2GB of disk before anyone notices
- Trajectories written but never queried, providing no debugging value
- Regression detection comparing unrelated sessions, producing false positives
Validation
- Every tool invocation produces a valid JSON trajectory entry with all schema fields
- Ring buffer caps at 50K entries and file size stays bounded
- Regression detection flags significant changes in tool call count or sequence for the same task
- Trajectory search returns results for known actions and error patterns
04 同仓库更多 Skills
writer-memory
Agentic memory system for writers - track characters, relationships, scenes, and themes
wiki
LLM Wiki — persistent markdown knowledge base that compounds across sessions (Karpathy model)
website-creation
Build production-quality SaaS websites with opinionated design presets. Use when creating any startup website. The user MUST pick a design style before building. Enforces shadcn/ui, Figma design principles, specific CSS values per style, and anti-AI-writing. Load alongside anti-ai-writing skill. LIGHT MODE ONLY.
visual-verdict
Structured visual QA verdict for screenshot-to-reference comparisons
visual-qa-pipeline
Screenshot every page with Playwright, feed to visual QA agent for design evaluation, report results to Slack. Use after every build phase to verify UI matches the chosen design preset. Integrates with the Playwright skill and the website-creation preset system.
verify
Verify that a change really works before you claim completion