{"id":44422966,"url":"https://github.com/default-anton/pi-subdir-context","last_synced_at":"2026-04-04T01:02:18.458Z","repository":{"id":335357716,"uuid":"1143607973","full_name":"default-anton/pi-subdir-context","owner":"default-anton","description":"Automatically load AGENTS.md context from subdirectories in pi coding agent","archived":false,"fork":false,"pushed_at":"2026-03-27T16:44:06.000Z","size":150,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-28T01:25:48.241Z","etag":null,"topics":["agents","ai","coding-agent","context","llm","pi","pi-extension"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/default-anton.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-01-27T19:39:55.000Z","updated_at":"2026-03-27T16:44:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/default-anton/pi-subdir-context","commit_stats":null,"previous_names":["default-anton/pi-subdir-context"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/default-anton/pi-subdir-context","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/default-anton%2Fpi-subdir-context","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/default-anton%2Fpi-subdir-context/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/default-anton%2Fpi-subdir-context/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/default-anton%2Fpi-subdir-context/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/default-anton","download_url":"https://codeload.github.com/default-anton/pi-subdir-context/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/default-anton%2Fpi-subdir-context/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31381081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T21:40:47.592Z","status":"ssl_error","status_checked_at":"2026-04-03T21:40:05.436Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["agents","ai","coding-agent","context","llm","pi","pi-extension"],"created_at":"2026-02-12T10:08:30.384Z","updated_at":"2026-04-04T01:02:18.426Z","avatar_url":"https://github.com/default-anton.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# pi-subdir-context\n\nAutomatically load `AGENTS` context (`AGENTS.override.md` or `AGENTS.md`) from subdirectories in [pi](https://github.com/badlogic/pi-mono) coding agent.\n\n## What it does\n\nWhen you read a file in a subdirectory (e.g., `src/components/Button.tsx`), this extension automatically discovers and injects AGENTS context files in the path hierarchy. `AGENTS.override.md` is treated as `AGENTS.md` and wins when both exist in the same directory, so you get relevant local context without manual loading.\n\n## Installation\n\n```bash\npi install npm:pi-subdir-context\n```\n\nOr try it temporarily:\n\n```bash\npi -e npm:pi-subdir-context\n```\n\n## How it works\n\n1. When you use the `read` tool, the extension checks the file's directory path\n2. It walks up the tree looking for AGENTS context files (`AGENTS.override.md` first, then `AGENTS.md`)\n3. Found files are loaded in order (closest to root first)\n4. Content is injected into the tool result as additional context\n5. Already-loaded files are deduplicated per session\n\n## Example\n\nProject structure:\n```\nmy-project/\n├── AGENTS.md                    # project-wide rules\n├── src/\n│   ├── AGENTS.override.md       # src-specific override\n│   └── components/\n│       ├── AGENTS.md            # component-specific rules\n│       └── Button.tsx\n```\n\nWhen you `read src/components/Button.tsx`, the extension automatically loads subdirectory context (the root AGENTS context is already loaded by pi):\n1. `src/AGENTS.override.md` (override beats `src/AGENTS.md`)\n2. `src/components/AGENTS.md` (component-specific — closest to file)\n\n## Scope\n\n- Context loading stops at the project root (current working directory)\n- Files outside the project or home directory are ignored\n- Files are loaded once per session and deduplicated\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefault-anton%2Fpi-subdir-context","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdefault-anton%2Fpi-subdir-context","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefault-anton%2Fpi-subdir-context/lists"}