{"id":51359495,"url":"https://github.com/lightninglabs/ai-docs-sync","last_synced_at":"2026-07-02T22:05:01.615Z","repository":{"id":368791713,"uuid":"1156573977","full_name":"lightninglabs/ai-docs-sync","owner":"lightninglabs","description":"CLI tool to sync AI guidance from .ai-docs/ to harness-specific outputs (Claude, Cursor, Copilot, Codex, Gemini)","archived":false,"fork":false,"pushed_at":"2026-02-12T20:16:39.000Z","size":66,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-07-02T08:32:26.024Z","etag":null,"topics":[],"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/lightninglabs.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-02-12T20:01:03.000Z","updated_at":"2026-02-16T18:17:35.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/lightninglabs/ai-docs-sync","commit_stats":null,"previous_names":["lightninglabs/ai-docs-sync"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/lightninglabs/ai-docs-sync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightninglabs%2Fai-docs-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightninglabs%2Fai-docs-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightninglabs%2Fai-docs-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightninglabs%2Fai-docs-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lightninglabs","download_url":"https://codeload.github.com/lightninglabs/ai-docs-sync/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightninglabs%2Fai-docs-sync/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35064279,"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":[],"created_at":"2026-07-02T22:05:00.730Z","updated_at":"2026-07-02T22:05:01.606Z","avatar_url":"https://github.com/lightninglabs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @lightninglabs/ai-docs-sync\n\nCLI tool to sync AI guidance from a canonical `.ai-docs/` directory into harness-specific outputs for **Claude**, **Cursor**, **Copilot**, **Codex**, and **Gemini**.\n\n## Why\n\nWhen a repo supports multiple AI harnesses, each expects different file names and formats for instructions, skills, commands, rules, and hooks. Without a single source of truth these files diverge, get hand-edited in the wrong place, and break in CI. `ai-docs-sync` solves this by making `.ai-docs/**` the canonical source and deterministically generating all harness-specific outputs.\n\n## Install\n\n```bash\nnpm install --save-dev @lightninglabs/ai-docs-sync\n# or\nyarn add --dev @lightninglabs/ai-docs-sync\n```\n\n## Usage\n\n### `ai-docs-sync init`\n\nScaffold the `.ai-docs/` directory structure with READMEs and a starter `AGENTS.md`:\n\n```bash\nnpx ai-docs-sync init\n```\n\nThis creates:\n\n```\n.ai-docs/\n├── AGENTS.md           # Your agent instructions (edit this)\n├── README.md\n├── commands/README.md\n├── hooks/README.md\n├── plans/README.md\n├── rules/README.md\n├── skills/README.md\n└── subagents/README.md\n```\n\nIt also prints the `.gitignore` lines you should add for generated outputs.\n\n### `ai-docs-sync sync`\n\nGenerate harness-specific files from `.ai-docs/**` into the working tree:\n\n```bash\nnpx ai-docs-sync sync\n```\n\nGenerated outputs:\n\n| Source                        | Generated outputs                                                                                          |\n| ----------------------------- | ---------------------------------------------------------------------------------------------------------- |\n| `.ai-docs/AGENTS.md`               | `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, `.github/copilot-instructions.md`                                   |\n| `.ai-docs/skills/\u003cname\u003e/`          | `.claude/skills/\u003cname\u003e/`, `.github/skills/\u003cname\u003e/`, `.codex/skills/\u003cname\u003e/`, `.gemini/skills/\u003cname\u003e/`      |\n| `.ai-docs/commands/\u003cname\u003e.md`      | `.claude/commands/`, `.cursor/commands/`, `.github/prompts/`, `.codex/prompts/`, `.gemini/commands/*.toml` |\n| `.ai-docs/rules/\u003cname\u003e.mdc`        | `.cursor/rules/\u003cname\u003e.mdc`                                                                                 |\n| `.ai-docs/subagents/\u003cname\u003e.md`     | `.claude/agents/\u003cname\u003e.md`, `.cursor/agents/\u003cname\u003e.md`                                                     |\n| `.ai-docs/hooks/claude.hooks.json` | `.claude/settings.json`                                                                                    |\n| `.ai-docs/hooks/gemini.hooks.json` | `.gemini/settings.json`                                                                                    |\n\n### `ai-docs-sync check`\n\nValidate determinism, output set correctness, and gitignore coverage:\n\n```bash\nnpx ai-docs-sync check\n```\n\nThis is designed to run in CI. It verifies:\n\n- All generated output paths are covered by `.gitignore`\n- Generating twice produces byte-for-byte identical outputs (determinism)\n- The generator produces exactly the expected file set (no missing/extra)\n- If generated outputs exist on disk, they match what would be generated\n\n### `ai-docs-sync clean`\n\nDelete generated outputs (allowlist-only, never touches `.ai-docs/**`):\n\n```bash\nnpx ai-docs-sync clean\n```\n\n## Authoring workflow\n\nFollow this procedure when you want to update your AI guidance files\n\n1. **Draft** new AI guidance in the harness you're using (e.g. `.claude/`, `.cursor/`) to test and confirm it works as expected\n2. **Copy** finalized content back into `.ai-docs/`\n3. Run `ai-docs-sync sync` to regenerate all harness outputs\n4. Run `ai-docs-sync check` to validate consistency\n5. Commit `.ai-docs/` changes (generated outputs are gitignored)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightninglabs%2Fai-docs-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flightninglabs%2Fai-docs-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightninglabs%2Fai-docs-sync/lists"}