{"id":51337316,"url":"https://github.com/luisgui1757/polaris","last_synced_at":"2026-07-02T04:01:08.129Z","repository":{"id":364227978,"uuid":"1266615578","full_name":"luisgui1757/polaris","owner":"luisgui1757","description":"Auto-injected, language-agnostic engineering rules for every AI coding CLI — Claude Code, Codex, Copilot, opencode, pi. Install once; the rules load themselves into each tool's native entrypoint.","archived":false,"fork":false,"pushed_at":"2026-07-01T14:27:25.000Z","size":192,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-01T16:07:15.872Z","etag":null,"topics":["agent-rules","agents-md","ai","ai-agents","claude-code","codex","coding-agent","coding-standards","developer-tools","github-copilot","llm","opencode"],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/luisgui1757.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":"ROADMAP.md","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-06-11T19:40:09.000Z","updated_at":"2026-07-01T14:27:45.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/luisgui1757/polaris","commit_stats":null,"previous_names":["luisgui1757/polaris"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/luisgui1757/polaris","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luisgui1757%2Fpolaris","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luisgui1757%2Fpolaris/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luisgui1757%2Fpolaris/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luisgui1757%2Fpolaris/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luisgui1757","download_url":"https://codeload.github.com/luisgui1757/polaris/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luisgui1757%2Fpolaris/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35032145,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-02T02:00:06.368Z","response_time":173,"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":["agent-rules","agents-md","ai","ai-agents","claude-code","codex","coding-agent","coding-standards","developer-tools","github-copilot","llm","opencode"],"created_at":"2026-07-02T04:00:43.475Z","updated_at":"2026-07-02T04:01:08.124Z","avatar_url":"https://github.com/luisgui1757.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Polaris\n\n**One set of engineering rules that every AI coding assistant follows automatically, in every repo.**\n\nPolaris is a small, language-agnostic rulebook for AI coding tools (Claude Code,\nCodex, GitHub Copilot, opencode, Pi CLI). You install it once and the rules load\nthemselves at startup — no slash command, no \"please read the docs,\" no copy-paste.\n\n---\n\n## The idea in one picture\n\n```\ncore/  (the rules)  ──►  tools/install  ──►  AGENTS.md / CLAUDE.md / copilot-instructions.md\n                                              (the files your AI tool already reads on startup)\n```\n\nYour AI tool already auto-reads a special file when it starts. `tools/install`\nwrites the rules into that file. That's the whole trick.\n\n---\n\n## Get it\n\n```bash\ngit clone https://github.com/luisgui1757/polaris.git\ncd polaris\n```\n\nRun everything below from that checkout. (Prefer to vendor a pinned copy instead\nof installing? See [`consumers.md`](consumers.md).)\n\n---\n\n## Use it\n\n\u003e Run these from your Polaris checkout — the commands use the repo-relative\n\u003e `tools/install` (or `make install`). **On Windows**, use the PowerShell port,\n\u003e which behaves identically and renders byte-for-byte the same block:\n\u003e `pwsh tools/install.ps1 -Target C:\\path\\to\\repo` (`-Global`, `-Check`,\n\u003e `-Remove`, `-DryRun` mirror the bash flags).\n\n### 1. Add the rules to a repo (and share with your team)\n\n```bash\ntools/install --target /path/to/your/repo\n```\n\nThis writes `AGENTS.md`, `CLAUDE.md`, and `.github/copilot-instructions.md` into\nthat repo. **Commit them.** Now anyone who clones it and opens any AI tool gets\nthe rules — automatically.\n\n### 2. Add the rules to *everything* on your machine (just you)\n\n```bash\ntools/install --global\n```\n\nWrites the rules into your home config once. Now **every** repo you open — even\nones that never heard of Polaris — carries the rules. (Per-machine; not shared.)\n\n### 3. Change the rules\n\nEdit a file in `core/`, then re-run `tools/install` (or `--global`).\n\n### 4. Check, verify, or remove\n\n```bash\ntools/install --check    # are the blocks up to date? (drift check; used in CI)\nmake status              # where are the rules installed?\ntools/install --remove   # uninstall — keeps any text you wrote around the block\n```\n\nTo confirm a tool actually *loaded* the rules, ask it in chat: *\"What does your\nloaded contract say under Modes?\"* If it can answer, the block is in context.\n\n---\n\n## What the AI actually sees\n\nThe rules are short and generic — correctness, simplicity, surgical changes,\ntesting discipline, how modes control edit authority, and memory hygiene. They\nlive in `core/` and get inlined into the entrypoint your tool auto-loads:\n\n| Tool | File it auto-reads (per repo) | …and globally | Evidence |\n| --- | --- | --- | --- |\n| Claude Code | `CLAUDE.md` | `~/.claude/CLAUDE.md` | live-verified 2026-06-18 |\n| Codex | `AGENTS.md` | `~/.codex/AGENTS.md` (`$CODEX_HOME`) | live-verified 2026-06-18 |\n| GitHub Copilot | `.github/copilot-instructions.md` | *(set in VS Code / github.com — manual)* | docs-confirmed 2026-06-18 |\n| opencode | `AGENTS.md` | `~/.config/opencode/AGENTS.md` | docs-confirmed 2026-06-18 |\n| Pi CLI | `AGENTS.md` | `~/.pi/agent/AGENTS.md` (`$PI_CODING_AGENT_DIR`) | local-package-confirmed 2026-06-18 |\n\nThe canonical tool/adapter metadata lives in\n[`templates/adapters/tool-metadata.tsv`](templates/adapters/tool-metadata.tsv);\n[`docs/tool-ingestion.md`](docs/tool-ingestion.md) records the source evidence\nbehind each dated status.\n\nA repo can add its own rules *around* the Polaris block — re-running install only\ntouches the block, never your text.\n\n---\n\n## Privacy\n\nPolaris is meant to be shareable, so it must never leak your private projects.\n`make check` scans the whole repo and **fails** if a private term or home path\nslips in, reporting the location without ever printing the term. The shipped\nfiles only ever contain generic patterns (home paths); your *own* private project\nnames live in `tools/forbidden-terms.local` — gitignored, never committed, and\nwired in via `MANIFEST.json`'s `local_denylist` key. Create it (one term per\nline) to scan for your terms too. Full guarantee and limits:\n[`docs/THREAT_MODEL.md`](docs/THREAT_MODEL.md).\n\n---\n\n## Repository layout\n\n| Path | What's there |\n| --- | --- |\n| `MANIFEST.json` | the machine-readable contract: core read-order, term policy, byte budget — **start here** |\n| `core/` | the rules themselves (read in the order `MANIFEST.json` → `required_core_read_order`) |\n| `tools/` | installer (`install`, `install.ps1`) + checks (`check`, `ci`, `lint`, `render`, `ruleset-check`, `status`, `verify-vendor`) |\n| `scripts/` | one-shot repo safeguards (branch protection) |\n| `docs/` | threat model, per-tool ingestion notes, release process |\n| `templates/` | overlay + adapter templates and canonical tool metadata for consumers |\n| `schemas/` | JSON Schema for `MANIFEST.json` |\n| `tests/` | the bats regression suite |\n| `AGENTS.md`, `CLAUDE.md`, `.github/copilot-instructions.md` | **generated** rule blocks (this repo dogfooding its own installer) — don't hand-edit |\n\n**Working on the rules?** Edit `core/`, run `tools/install`, commit the\nregenerated adapters. **Just reading?** `MANIFEST.json` + the files it lists are\nthe whole rulebook.\n\n---\n\n## Develop\n\n```bash\nmake ci             # local preflight: privacy scan + render + drift + rulesets + lint + shellcheck\nmake preflight      # same local preflight, named for what it proves\nmake gate           # strongest local gate: strict preflight + tests + pwsh drift check\nmake test           # bats tooling suite (incl. the bash/pwsh byte-identity parity)\nmake install-hooks  # install a git pre-push hook that runs make gate for you\nmake safeguards     # apply branch protection + merge rules to the GitHub repo\nmake help           # list everything\n```\n\nLocal `make ci`/`make preflight` is the fast pre-push surface. It runs the leak\nscan, render smoke, adapter drift, semantic ruleset verification, lint, and\nShellCheck; outside strict mode, missing optional linters are skipped loudly and\nnamed in the output. `make gate` is the strongest local proof: it runs the\npreflight in strict mode, the bats suite, and the PowerShell drift check; it\nrequires the strict local toolchain, including `pwsh`.\n\nGitHub's required `ci` context is stronger than local preflight: the workflow\nruns Linux + macOS preflight and `make test`, a strict lint job with every\nlinter installed, and a native **Windows (amd64)** PowerShell installer check.\n`main` is protected by the rulesets in `.github/rulesets/` (squash-only,\nrequired `ci` check, linear history).\n\n`ROADMAP.md` tracks remaining work and is deleted once the repo matures.\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluisgui1757%2Fpolaris","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluisgui1757%2Fpolaris","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluisgui1757%2Fpolaris/lists"}