LLM-Native Code Provenance and PR Review Tool
TraceAI makes AI-generated code transparent and reviewable by tracking the conversation that created it. Built for the future where code review includes not just diffs, but the full context of human-AI collaboration.
When AI generates code:
- The conversation context (prompts, iterations, decisions) is lost
- Code reviewers see diffs without understanding the "why"
- No way to trace specific code back to the prompt that generated it
- AI's role in development is invisible
TraceAI provides two core features:
Hover over any line of code to see:
- The prompt that generated it
- Link to full conversation
- Timestamp and context
- PR information
Automatically generate:
- Structured conversation data (JSON)
- Beautiful PR summaries (Markdown)
- Prompt-to-code mappings
- Stored as GitHub Gists
# Clone the repository
git clone https://github.com/yourteam/traceai.git
cd traceai
# Install the pipeline
cd pipeline/
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -e .# 1. Work with Claude Code (as normal)
# ... make changes ...
# 2. Process the conversation
traceai process artifact.json --repo /path/to/your/repo --pr-number 42
# 3. Upload to GitHub Gist
export GITHUB_TOKEN=ghp_your_token_here
traceai upload artifact.json
# 4. Generate PR summary
traceai pr-summary artifact.json --output pr-summary.md
# 5. Add to your PR description
cat pr-summary.md # Copy this into your PRtraceai pipeline --repo . --pr-number 42
# This runs: process → upload → generate PR summarytraceai/
├── pipeline/ # Python pipeline (READY ✅)
│ ├── traceai/
│ │ ├── parser.py # Parse Claude Code conversations
│ │ ├── mapper.py # Map prompts to code
│ │ ├── github_client.py # Upload to Gist
│ │ ├── markdown_gen.py # Generate PR summaries
│ │ └── cli.py # Command-line interface
│ └── tests/
│
├── extension/ # VSCode extension (TODO)
│ └── src/
│
├── demo/ # Demo materials
│ ├── artifact.json # Example artifact (REAL DATA!)
│ └── pr-summary.md # Example PR summary
│
└── docs/
├── HACKATHON_PLAN.md # 24-hour execution plan
├── CLAUDE.md # Context for AI assistants
└── CLAUDE_CODE_CONVERSATION_FORMAT.md # Format docs
## 🤖 AI-Generated Code Summary
This PR was developed in collaboration with Claude Code.
### 📊 Stats
- AI-Generated Changes: 15 edits across 13 files
- Conversation Length: 45 prompts, 143 total messages
- Total Tokens: 46,439
### 📝 Files Modified by AI
- `src/auth.ts` - Added logout functionality
- `src/theme.css` - Updated button styles
### 💡 Conversation Highlights
**Prompt 1**: "Add logout button to the navigation bar"
**Prompt 5**: "Make it red and add confirmation dialog"{
"version": "1.0",
"conversation_id": "traceai-86c84f17",
"metadata": {
"session_id": "86c84f17-852d-4e9d-9ff3-69c6aaaec62e",
"pr_number": 42,
"repo_path": "/Users/you/project",
"files_modified": 13
},
"mappings": [
{
"file": "src/auth.ts",
"lines": [45, 67],
"prompt": "Add logout button",
"tool": "Edit",
"confidence": 0.95
}
],
"conversation": [...],
"stats": {...}
}Claude Code Session
↓ (conversation.jsonl)
Python Pipeline
↓ (process + map + upload)
GitHub Gist (JSON artifact) + PR (Markdown summary)
↓ (GitHub API)
VSCode Extension (hover to view provenance)
- Capture: Find Claude Code conversation in
~/.claude/projects/ - Parse: Extract messages, tool calls, timestamps
- Map: Match prompts to code using tool calls + git blame
- Artifact: Generate structured JSON with full context
- Upload: Store in GitHub Gist (permanent, versioned)
- Display: Markdown summary for PR, hover UI in VSCode
| Command | Description |
|---|---|
traceai list-conversations |
List all Claude Code sessions |
traceai process |
Process conversation → artifact.json |
traceai upload |
Upload artifact → GitHub Gist |
traceai pr-summary |
Generate PR markdown |
traceai pipeline |
Run full workflow |
traceai validate |
Validate artifact schema |
See pipeline/README.md for detailed command docs.
Create a token at https://github.com/settings/tokens with gist scope:
export GITHUB_TOKEN=ghp_your_token_hereTraceAI works with Claude Code out of the box. No configuration needed - it automatically finds conversations in ~/.claude/.
| Component | Status | Notes |
|---|---|---|
| Python Pipeline | ✅ Complete | All features working |
| Conversation Parser | ✅ Complete | Supports Claude Code JSONL format |
| Prompt-to-Code Mapping | ✅ Complete | Tool call parsing + git blame |
| GitHub Gist Upload | ✅ Complete | Creates/updates Gists |
| PR Markdown Generator | ✅ Complete | Beautiful summaries |
| CLI Interface | ✅ Complete | Full-featured commands |
| VSCode Extension | 📋 Planned | Next priority |
| AI Summarization | 📋 Stretch | Optional enhancement |
The pipeline has been tested with real Claude Code conversations!
# Run on this project's own conversation
cd pipeline
source venv/bin/activate
traceai pipeline --repo .. --pr-number 1 --output-dir ../demoSee demo/artifact.json and demo/pr-summary.md for real examples generated from this project's development!
- HACKATHON_PLAN.md - Complete 24-hour implementation plan
- CLAUDE.md - Project context for AI assistants
- CLAUDE_CODE_CONVERSATION_FORMAT.md - Conversation format spec
- pipeline/README.md - Pipeline usage guide
# Install with dev dependencies
cd pipeline
pip install -e ".[dev]"
# Run tests
pytest
# Format code
black traceai/
ruff check traceai/
# Type checking
mypy traceai/- Python pipeline
- Conversation parsing
- Prompt-to-code mapping
- GitHub Gist storage
- PR markdown generation
- VSCode extension (basic hover)
- VSCode extension (full features)
- Line-level mapping refinement
- AI-powered summarization
- GitHub Actions automation
- Gutter icons showing AI-generated code
- Standalone conversation registry
- Multi-tool support (Cursor, Copilot, etc.)
- Team analytics dashboard
- Conversation search and replay
- Integration with code review platforms
This project was built during a 24-hour hackathon. Contributions welcome!
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request (with TraceAI summary! 😉)
MIT
- Claude Code - For being an amazing AI coding partner
- Anthropic - For building Claude
- The hackathon team - For believing in AI-native tooling
In 2-3 years, 50%+ of code will be AI-generated. Code review processes need to evolve to include conversation context, not just diffs. TraceAI is infrastructure for that future.
Built with ❤️ by the TraceAI team | GitHub | Report Issues