Skip to content

m2ai-portfolio/agenttrace

Repository files navigation

AgentTrace

A developer tool that logs agent reasoning traces (why code changed) and integrates with podcast learning retention via spaced-repetition notes.

Quick StartFeaturesExamplesContributing

What is this?

AgentTrace is a developer tool that logs the reasoning behind code changes and integrates with a spaced repetition system for podcast notes. It helps software engineers understand why code changes were made and aids in retaining valuable insights from podcasts.

Example Usage

$ python cli.py log-change --file main.py --line 10 --description "Fixed typo"
{"file": "main.py", "line": 10, "description": "Fixed typo"}

Problem

Developers struggle to understand why colleagues made certain code changes, and listeners forget podcast insights within hours, losing valuable knowledge.

Features

Feature Description
Log Code Changes Log the reasoning behind each code change with file name, line number, and a brief description.
Spaced Repetition for Podcast Notes Add new notes with a timestamp and a brief description, and schedule reminders for reviewing the notes at intervals (1 day, 3 days, 1 week).
Retrieve and Display Logs and Notes Retrieve and display all logged code changes and active podcast notes with their next review times.
Command Line Interface Use a simple and intuitive command line interface for all operations.
JSON Storage Store logs and notes in JSON files for easy access and manipulation.
Filtering by Date Range Filter logs and notes by a specified date range.

Quick Start

  1. Clone the repository:

    git clone https://github.com/m2ai-portfolio/AgentTrace.git
    cd AgentTrace
  2. Install dependencies:

    pip install -r requirements.txt
  3. Run your first command:

    python cli.py log-change --file main.py --line 10 --description "Fixed typo"

Examples

Log a Code Change

Command:

python cli.py log-change --file main.py --line 10 --description "Fixed typo"

Output:

{"file": "main.py", "line": 10, "description": "Fixed typo"}

Add a Podcast Note

Command:

python cli.py add-note --timestamp "2023-10-01 12:00:00" --description "Key concept: Dijkstra's Algorithm"

Output:

{"timestamp": "2023-10-01 12:00:00", "description": "Key concept: Dijkstra's Algorithm", "next_review": "2023-10-02 12:00:00"}

Review Podcast Notes

Command:

python cli.py review-notes

Output:

{"timestamp": "2023-10-01 12:00:00", "description": "Key concept: Dijkstra's Algorithm"}

File Structure

AgentTrace/
├── src/          # Core source code
│   ├── agenttrace.py
│   ├── cli.py
│   ├── data.py
│   ├── spaced_repetition.py
│   └── utils.py
├── tests/        # Test suite
│   ├── __init__.py
│   ├── test_agenttrace.py
│   ├── test_cli.py
│   └── test_spaced_repetition.py
├── .gitignore
├── .heartbeat-callback
├── conftest.py
├── pytest.ini
├── requirements.txt
├── README.md
├── spec.md
└── .self-healing-pipeline/  # Continuous integration and deployment configurations
    ├── builder-log-1.md
    ├── judge-brief-1.md
    ├── plan.md
    ├── retry-report.md
    ├── review-report.md
    └── test-contract.md

Tech Stack

Technology Purpose
Python 3.11+ Core programming language
click Command line interface library
pytest Testing framework

Contributing

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature/new-feature.
  3. Make your changes and run tests.
  4. Submit a pull request.

License

MIT

Author

Matthew Snow -- M2AI | @m2ai-portfolio

About

AgentTrace logs the reasoning behind code changes and integrates spaced repetition for podcast notes, helping developers and listeners retain valuable knowledge.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages