{"id":37229397,"url":"https://github.com/nishantmodak/trajectory-ai","last_synced_at":"2026-01-15T03:32:34.066Z","repository":{"id":332013954,"uuid":"1132463314","full_name":"nishantmodak/trajectory-ai","owner":"nishantmodak","description":"Capture the why behind AI-generated code. Generate decision logs from Claude Code sessions for PR reviews.","archived":false,"fork":false,"pushed_at":"2026-01-12T02:17:18.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-12T06:05:32.119Z","etag":null,"topics":["ai","claude","claude-code","cli","code-review","decision-log","developer-tools","llm","provenance","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nishantmodak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-12T01:48:39.000Z","updated_at":"2026-01-12T02:34:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nishantmodak/trajectory-ai","commit_stats":null,"previous_names":["nishantmodak/trajectory"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/nishantmodak/trajectory-ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishantmodak%2Ftrajectory-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishantmodak%2Ftrajectory-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishantmodak%2Ftrajectory-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishantmodak%2Ftrajectory-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nishantmodak","download_url":"https://codeload.github.com/nishantmodak/trajectory-ai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nishantmodak%2Ftrajectory-ai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28442286,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:55:22.719Z","status":"online","status_checked_at":"2026-01-15T02:00:08.019Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","claude","claude-code","cli","code-review","decision-log","developer-tools","llm","provenance","python"],"created_at":"2026-01-15T03:32:33.584Z","updated_at":"2026-01-15T03:32:34.059Z","avatar_url":"https://github.com/nishantmodak.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# trajectory\n\n[![PyPI version](https://badge.fury.io/py/trajectory-ai.svg)](https://pypi.org/project/trajectory-ai/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nCapture the *why* behind AI-generated code.\n\nWhen you use Claude Code to write code, trajectory generates a decision log — what was decided, what was rejected, what was assumed. Attach it to your PR so reviewers see the reasoning, not just the diff.\n\n## Install\n\n```bash\npip install trajectory-ai\n```\n\nRequires `ANTHROPIC_API_KEY` environment variable.\n\n## Usage\n\n```bash\ncd your-project\ntrajectory gen\n```\n\nCreates `trajectory.md`:\n\n```markdown\n# feat/add-user-auth\n\n\u003e Implement JWT authentication for the API\n\n**Decisions:**\n- Use RS256 for token signing\n- Store refresh tokens in httpOnly cookies\n  ... +3 more (--audit)\n\n---\n_Session: a1b2c3d4_\n```\n\n## Commands\n\n```bash\ntrajectory gen                 # generate trajectory.md\ntrajectory gen --copy          # generate + copy to clipboard\ntrajectory gen --flow          # ASCII flow diagram\ntrajectory gen --audit         # full provenance details\ntrajectory gen -s 17c072d8     # use specific session\ntrajectory list                # show available sessions\n```\n\n## Flow Diagram\n\n```bash\ntrajectory gen --flow\n```\n\n```\n╔══ feat/add-user-auth ══╗\n\n  ┌─ INTENT ────────────────────────────┐\n  │ Add JWT auth to the API             │\n  └─────────────────────────────────────┘\n                    │\n                    ▼\n  ┌─ DIRECTIVE ─────────────────────────┐\n  │ Use RS256 for token signing         │\n  └─────────────────────────────────────┘\n                    │\n                    ▼\n  ┌─ IMPLEMENT ─────────────────────────┐\n  │ Add refresh token rotation          │\n  └─────────────────────────────────────┘\n                    │\n                    ▼\n  ┌─ OUTPUT ────────────────────────────┐\n  │ jwt.ts (new)                        │\n  │ auth.ts (3 edits)                   │\n  └─────────────────────────────────────┘\n\n  ╳─ REJECTED ──────────────────────────╳\n  ╳ Session-based auth with Redis       ╳\n  ╳─────────────────────────────────────╳\n\n╚══ Session: a1b2c3d4 ══╝\n```\n\n## Full Provenance (--audit)\n\n```markdown\n**Decisions:**\n- Use RS256 for token signing\n  Better security for production environments\n  `[chosen]` _Selected from: RS256 / HS256 / ES256_\n\n**Rejected:**\n- Session-based auth with Redis\n  _More infrastructure overhead_\n\n**Assumptions:**\n- API consumed by first-party clients only `[inferred]`\n\n**Deferred:**\n- Rate limiting _Explicitly marked for v2_\n```\n\n| Label | Meaning |\n|-------|---------|\n| `[explicit]` | User directly stated |\n| `[chosen]` | User selected from options |\n| `[inferred]` | Deduced from context |\n\n## How It Works\n\n1. Claude Code saves session logs to `~/.claude/projects/`\n2. Trajectory reads the JSONL (conversation, tool calls, file edits)\n3. Uses Claude API to extract structured decisions\n4. Generates clean markdown for your PR\n\n## Requirements\n\n- Python 3.9+\n- Claude Code\n- `ANTHROPIC_API_KEY`\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnishantmodak%2Ftrajectory-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnishantmodak%2Ftrajectory-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnishantmodak%2Ftrajectory-ai/lists"}