From 4427986d0e1b73ad1dd3ff5d4f14850c4c9fc3c5 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 28 Aug 2026 01:58:15 +0000 Subject: [PATCH] Generate every harness file; ship no default skills MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Nothing harness-specific is committed any more. CLAUDE.md, .claude/settings.json, and .gemini/settings.json join the other adapters as sync.py renderer output, and .cursor/environment.json, .github/copilot-instructions.md, and the Copilot setup workflow are gone — a cloud harness that needed a committed in-repo hook now carries the bootstrap one-liner in its own setup-script field instead. The Workflow model-mix hook moves to .agents/hooks/, where the generated settings.json points at it; the Claude SessionStart hook is dropped, since it could only ever have run after the settings file it lived in was generated. That removes the "seed" tier, so sync.py loses the merge-one-key machinery. `sync.py check` now enforces the invariant that replaced it: every renderer output is gitignored and absent from the index. Also drop the seven skills the template shipped with (ponytail* and find-skills) and empty skills-lock.json. The skill machinery stays for skills a project actually adds. --- .agents/AGENTS.md | 33 +-- .agents/README.md | 34 ++-- .../hooks/workflow-model-mix.py | 0 .agents/scripts/sync.py | 192 +++++++++++------- .agents/skills/find-skills/SKILL.md | 142 ------------- .agents/skills/ponytail-audit/SKILL.md | 41 ---- .agents/skills/ponytail-debt/SKILL.md | 44 ---- .agents/skills/ponytail-gain/SKILL.md | 50 ----- .agents/skills/ponytail-help/SKILL.md | 71 ------- .agents/skills/ponytail-review/SKILL.md | 57 ------ .agents/skills/ponytail/LICENSE | 21 -- .agents/skills/ponytail/SKILL.md | 120 ----------- .claude/hooks/session-start.sh | 17 -- .claude/settings.json | 29 --- .cursor/environment.json | 3 - .gemini/settings.json | 17 -- .github/copilot-instructions.md | 6 - .github/workflows/agent-config.yml | 29 +-- .github/workflows/copilot-setup-steps.yml | 25 --- .gitignore | 16 +- .pre-commit-config.yaml | 4 +- AGENTS.md | 55 +++-- CLAUDE.md | 5 - skills-lock.json | 45 +--- 24 files changed, 196 insertions(+), 860 deletions(-) rename {.claude => .agents}/hooks/workflow-model-mix.py (100%) delete mode 100644 .agents/skills/find-skills/SKILL.md delete mode 100644 .agents/skills/ponytail-audit/SKILL.md delete mode 100644 .agents/skills/ponytail-debt/SKILL.md delete mode 100644 .agents/skills/ponytail-gain/SKILL.md delete mode 100644 .agents/skills/ponytail-help/SKILL.md delete mode 100644 .agents/skills/ponytail-review/SKILL.md delete mode 100644 .agents/skills/ponytail/LICENSE delete mode 100644 .agents/skills/ponytail/SKILL.md delete mode 100755 .claude/hooks/session-start.sh delete mode 100644 .claude/settings.json delete mode 100644 .cursor/environment.json delete mode 100644 .gemini/settings.json delete mode 100644 .github/copilot-instructions.md delete mode 100644 .github/workflows/copilot-setup-steps.yml delete mode 100644 CLAUDE.md diff --git a/.agents/AGENTS.md b/.agents/AGENTS.md index 309ab02..aa54d2c 100644 --- a/.agents/AGENTS.md +++ b/.agents/AGENTS.md @@ -4,13 +4,17 @@ The one canonical agent folder, following the [Agent Skills](https://agentskills.io) open standard and [AGENTS.md](https://agents.md) conventions. -Every piece of agent configuration is one of three things: +Every piece of agent configuration is one of two things: | Tier | Strategy | |---|---| -| **Canonical** — the single source of truth | Lives here: `skills/`, `mcp/servers.json`, `scripts/` | -| **Seed** — a harness reads it straight from the clone, before any script can run | Committed in the harness's own location, kept minimal: hook and environment registrations, one managed key per settings file | -| **Generated** — everything else a harness wants | Rendered by `scripts/sync.py`, gitignored, recreated per checkout for the harnesses detected on that machine | +| **Canonical** — the single source of truth | Lives here: `skills/`, `mcp/servers.json`, `hooks/`, `scripts/` | +| **Generated** — everything a harness reads | Rendered by `scripts/sync.py`, gitignored, recreated per checkout for the harnesses detected on that machine | + +There is no committed middle tier. `CLAUDE.md`, `.claude/`, `.cursor/`, and +`.gemini/` are all generated, so a fresh clone has to run +`scripts/bootstrap.sh` before any harness-specific file exists — see the +environments table in `README.md`. Instructions and skills need almost no adapters: `AGENTS.md` and `.agents/skills/` are read natively by Codex, Cursor, Copilot's coding agent, @@ -24,6 +28,8 @@ tools with a project-level MCP surface; `sync.py list` shows the full table. - `skills/` — Shared skills. Each is a directory with `SKILL.md`. - `mcp/servers.json` — Canonical MCP server configuration (Claude `mcpServers` dialect, plus an optional `tools` read-only allowlist per server). +- `hooks/` — Hook scripts that generated adapters register. Harness-specific in + what registers them, canonical in where they live. - `scripts/` — `bootstrap.sh` (environment setup entry point), `sync.py` (adapter generator), `check-skills.py` (vendored-skill lock). - `setup` — Entry shim for harnesses that execute `.agents/setup` (Amp orbs). @@ -48,9 +54,7 @@ It installs into `.agents/skills/` and maintains the same `skills-lock.json`. 1. Edit `.agents/mcp/servers.json`. 2. Run `.agents/scripts/sync.py`. -3. Commit the canonical file plus the two committed seeds it updates - (`.claude/settings.json`, `.gemini/settings.json`). Every other rendered - adapter is gitignored. +3. Commit the canonical file. Every rendered adapter is gitignored. An optional `tools` array on a server is a read-only allowlist. It renders as `enabled_tools` for Codex and `includeTools` for Gemini and Qwen; the other @@ -64,13 +68,14 @@ harnesses have no equivalent and receive the server's whole tool surface. adapter. - To support a new harness, add one entry to the `HARNESSES` table in `scripts/sync.py` (detection, skills dir if it doesn't read `.agents/skills/` - natively, MCP renderer if it has a project-level MCP file) and mirror any new - output path in `.gitignore`'s generated-adapters block. CI fails if the two - fall out of step. -- Agent-specific configuration stays put. `.cursor/rules/*.mdc` and - `.github/instructions/*.instructions.md` use glob scoping and conditional - loading with no equivalent elsewhere — do not convert them into skills. - Knowledge every agent needs belongs in `AGENTS.md`. + natively, renderer if it has any project-level config file) and mirror every + new output path in `.gitignore`'s generated-adapters block. `sync.py check` + and CI both fail if the two fall out of step. +- Nothing harness-specific is committed. If a harness format has no equivalent + elsewhere — `.cursor/rules/*.mdc` and `.github/instructions/*.instructions.md` + use glob scoping and conditional loading that skills cannot express — add a + renderer for it here rather than committing the file. Knowledge every agent + needs belongs in `AGENTS.md`. - Keep secrets and machine-local configuration out of committed files. - Run the pre-commit hooks or their underlying scripts before committing. GitHub Actions enforces the same checks for pull requests and `main`. diff --git a/.agents/README.md b/.agents/README.md index dab3447..d2b145d 100644 --- a/.agents/README.md +++ b/.agents/README.md @@ -22,7 +22,7 @@ format. Rendered adapters are gitignored and recreated per checkout. # Show the harness table: detection state and what each gets .agents/scripts/sync.py list -# Fail if a managed key in a committed seed file is stale +# Fail if a generated adapter is unignored or committed .agents/scripts/sync.py check # Explicitly install this repo's managed MCP block in the user Codex config @@ -40,14 +40,19 @@ environment-specific except the hook that calls it: | Environment | Entry point | |---|---| | Local | `.agents/scripts/bootstrap.sh`, once per checkout | -| Claude Code (web/cloud) | `SessionStart` hook → `.claude/hooks/session-start.sh` | | GitHub Codespaces / devcontainers / Ona | `.devcontainer/devcontainer.json` `postCreateCommand` | -| GitHub Copilot coding agent | `.github/workflows/copilot-setup-steps.yml` (devcontainers are not honored there) | -| Cursor cloud agents | `.cursor/environment.json` `install` | | Amp orbs | `.agents/setup` | -| Codex cloud | No in-repo hook — put `.agents/scripts/bootstrap.sh` in the environment's Setup script field (chatgpt.com/codex/settings/environments) | -| Jules / Devin / Factory | No in-repo hook — same one-liner in their UI setup/snapshot configuration | | CI | `.github/workflows/agent-config.yml` | +| Every cloud harness (Claude Code on the web, Cursor, Codex, Copilot, Jules, Devin, Factory, …) | No in-repo hook — put `.agents/scripts/bootstrap.sh` in the environment's setup-script field | + +A cloud harness's in-repo setup hook would have to be a committed, +harness-specific file, and this repository has none by design: a hook can only +run once it exists in the clone, but everything harness-specific here is +generated by that very run. So those environments carry the one-line bootstrap +command in their own settings instead — Codex at +chatgpt.com/codex/settings/environments, the others in the equivalent +setup/snapshot field. Until bootstrap runs, a checkout has `AGENTS.md` and +`.agents/` and nothing else agent-facing. To add another environment, call `bash .agents/scripts/bootstrap.sh` from its native setup hook. Do not fork the setup logic. Bootstrap must stay @@ -56,11 +61,12 @@ secrets at setup time (Codex cloud strips them before the agent phase). ## Generated files -`sync.py` renders adapters from `.agents/mcp/servers.json` and links -`.agents/skills/` for harnesses that don't read it natively — by default only -for harnesses it detects on the machine (CLI on PATH, config directory, or -environment variable; CI renders all). All of it is gitignored; the -`Validate agent configuration` workflow fails if a rendered file ever shows up -untracked. The two committed exceptions, `.claude/settings.json` and -`.gemini/settings.json`, are hand-owned apart from one managed key each -(`enabledMcpjsonServers`, `mcpServers`), which `sync.py check` keeps honest. +`sync.py` renders adapters from `.agents/mcp/servers.json`, points them at the +hook scripts in `.agents/hooks/`, and links `.agents/skills/` for harnesses +that don't read it natively — by default only for harnesses it detects on the +machine (CLI on PATH, config directory, or environment variable; CI renders +all). There are no exceptions: `CLAUDE.md`, `.claude/settings.json`, and +`.gemini/settings.json` are rendered like everything else. All of it is +gitignored — `sync.py check` fails if a renderer output is unignored or +tracked, and the `Validate agent configuration` workflow fails if a bootstrap +run leaves an untracked file behind. diff --git a/.claude/hooks/workflow-model-mix.py b/.agents/hooks/workflow-model-mix.py similarity index 100% rename from .claude/hooks/workflow-model-mix.py rename to .agents/hooks/workflow-model-mix.py diff --git a/.agents/scripts/sync.py b/.agents/scripts/sync.py index ac1e76b..45573d5 100755 --- a/.agents/scripts/sync.py +++ b/.agents/scripts/sync.py @@ -5,19 +5,18 @@ .agents/skills/ shared skills (Agent Skills standard) .agents/mcp/servers.json MCP servers, Claude `mcpServers` dialect plus an optional `tools` read-only allowlist per server + .agents/hooks/ hook scripts that generated adapters point at -Committed seed files (always kept in sync, because they are committed): - .claude/settings.json `enabledMcpjsonServers` key only - .gemini/settings.json `mcpServers` key only - -Generated adapters (gitignored, rendered per checkout) are produced only for -harnesses detected on this machine, so a checkout carries adapters for the -tools that actually run here and nothing else. +Nothing harness-specific is committed. Every adapter is gitignored and +rendered per checkout, and only for the harnesses detected on this machine, so +a checkout carries adapters for the tools that actually run here and nothing +else. Run bootstrap.sh once per fresh checkout (or from a cloud environment's +setup-script field) to produce them. Usage: - sync.py [harness ...] sync seeds + adapters for detected (or named) harnesses - sync.py --all sync adapters for every known harness (CI default) - sync.py check verify the managed keys in committed seed files + sync.py [harness ...] render adapters for detected (or named) harnesses + sync.py --all render adapters for every known harness (CI default) + sync.py check verify no adapter is committed or unignored sync.py list show known harnesses, detection state, and adapters sync.py install-codex install this repo's MCP block into ~/.codex/config.toml @@ -31,6 +30,7 @@ import os import re import shutil +import subprocess import sys import tempfile from pathlib import Path @@ -41,22 +41,21 @@ # Each harness: how to detect it on this machine (env vars set, commands on # PATH, directories under $HOME), where its per-skill symlinks go (None = it -# reads .agents/skills natively), and which MCP renderer feeds it (None = no -# generated project-scoped MCP file). Detection never probes a path sync.py -# itself creates — one run would make that harness sticky-detected. +# reads .agents/skills natively), and which renderer produces its config files +# (None = nothing to generate). Detection never probes a path sync.py itself +# creates — one run would make that harness sticky-detected. HARNESSES = { - "claude": {"env": ["CLAUDECODE", "CLAUDE_CODE_REMOTE"], "cmd": ["claude"], "home": [".claude"], "skills": ".claude/skills", "mcp": "claude"}, - "codex": {"cmd": ["codex"], "home": [".codex"], "skills": None, "mcp": "codex"}, - "cursor": {"cmd": ["cursor-agent", "cursor"], "home": [".cursor"], "skills": None, "mcp": "cursor"}, - "gemini": {"cmd": ["gemini"], "home": [".gemini"], "skills": None, "mcp": None, - "note": "mcp → .gemini/settings.json (committed seed, always synced)"}, - "qwen": {"cmd": ["qwen"], "home": [".qwen"], "skills": None, "mcp": "qwen"}, - "opencode": {"cmd": ["opencode"], "home": [".config/opencode"], "skills": None, "mcp": "opencode"}, - "vscode": {"cmd": ["code"], "skills": None, "mcp": "vscode"}, - "kilo": {"cmd": ["kilo"], "home": [".config/kilo"], "skills": None, "mcp": "kilo"}, - "factory": {"cmd": ["droid"], "home": [".factory"], "skills": None, "mcp": "factory"}, - "amp": {"cmd": ["amp"], "home": [".amp"], "skills": None, "mcp": "amp"}, - "codebuddy": {"cmd": ["codebuddy"], "home": [".codebuddy"], "skills": ".codebuddy/skills", "mcp": None}, + "claude": {"env": ["CLAUDECODE", "CLAUDE_CODE_REMOTE"], "cmd": ["claude"], "home": [".claude"], "skills": ".claude/skills", "render": "claude"}, + "codex": {"cmd": ["codex"], "home": [".codex"], "skills": None, "render": "codex"}, + "cursor": {"cmd": ["cursor-agent", "cursor"], "home": [".cursor"], "skills": None, "render": "cursor"}, + "gemini": {"cmd": ["gemini"], "home": [".gemini"], "skills": None, "render": "gemini"}, + "qwen": {"cmd": ["qwen"], "home": [".qwen"], "skills": None, "render": "qwen"}, + "opencode": {"cmd": ["opencode"], "home": [".config/opencode"], "skills": None, "render": "opencode"}, + "vscode": {"cmd": ["code"], "skills": None, "render": "vscode"}, + "kilo": {"cmd": ["kilo"], "home": [".config/kilo"], "skills": None, "render": "kilo"}, + "factory": {"cmd": ["droid"], "home": [".factory"], "skills": None, "render": "factory"}, + "amp": {"cmd": ["amp"], "home": [".amp"], "skills": None, "render": "amp"}, + "codebuddy": {"cmd": ["codebuddy"], "home": [".codebuddy"], "skills": ".codebuddy/skills", "render": None}, } # Read AGENTS.md and .agents/skills/ natively; listed so `list` can say so. @@ -110,8 +109,17 @@ def is_remote(config): return "url" in config -# ── MCP renderers ───────────────────────────────────────────────────────────── +# ── Renderers ───────────────────────────────────────────────────────────────── # Each takes the canonical servers dict and returns {relative path: content}. +# Most only render MCP configuration; a harness that needs more (an instruction +# pointer, a hook registration) renders those files too. + +CLAUDE_MD = """@AGENTS.md + +Generated by .agents/scripts/sync.py — do not edit. Claude Code has no native +AGENTS.md reader, so this pointer imports it. Every reusable agent asset lives +in `.agents/`; adapters like this one are gitignored and rendered per checkout. +""" def render_claude(servers): @@ -121,7 +129,30 @@ def render_claude(servers): if is_remote(body): body.setdefault("type", "http") rendered[name] = body - return {".mcp.json": json_document({"mcpServers": rendered})} + # Claude Code ignores project MCP servers until they are opted into + # `enabledMcpjsonServers`. Local, uncommitted settings belong in + # .claude/settings.local.json, which this file never touches. + settings = { + "hooks": { + "PreToolUse": [ + { + "matcher": "Workflow", + "hooks": [ + { + "type": "command", + "command": "$CLAUDE_PROJECT_DIR/.agents/hooks/workflow-model-mix.py", + } + ], + } + ] + }, + "enabledMcpjsonServers": sorted(servers), + } + return { + "CLAUDE.md": CLAUDE_MD, + ".mcp.json": json_document({"mcpServers": rendered}), + ".claude/settings.json": json_document(settings), + } def render_cursor(servers): @@ -158,6 +189,14 @@ def gemini_servers(servers): return rendered +def render_gemini(servers): + document = { + "context": {"fileName": ["AGENTS.md", "GEMINI.md"]}, + "mcpServers": gemini_servers(servers), + } + return {".gemini/settings.json": json_document(document)} + + def render_qwen(servers): document = { "contextFileName": ["AGENTS.md", "QWEN.md"], @@ -244,10 +283,11 @@ def render_codex(servers): return {".codex/config.toml": codex_toml(servers)} -MCP_RENDERERS = { +RENDERERS = { "claude": render_claude, "codex": render_codex, "cursor": render_cursor, + "gemini": render_gemini, "qwen": render_qwen, "opencode": render_opencode, "vscode": render_vscode, @@ -257,34 +297,18 @@ def render_codex(servers): } -# ── Committed seeds: one managed key each, merged in place ──────────────────── - - -def merged_document(path, key, value): - try: - document = json.loads(path.read_text(encoding="utf-8")) - except FileNotFoundError: - document = {} - except (OSError, json.JSONDecodeError) as exc: - raise SystemExit(f"ERROR: cannot read {path}: {exc}") - if not isinstance(document, dict): - raise SystemExit(f"ERROR: {path} must contain a JSON object") - document[key] = value - return json_document(document) - - -def seed_outputs(servers): - """{path: expected content} for the committed files sync owns one key of. - - Claude Code ignores project MCP servers until they are opted into - `enabledMcpjsonServers`; Gemini CLI keeps MCP servers inside its settings - file. Both files are committed and hand-owned apart from that one key. - """ - seeds = { - REPO_ROOT / ".claude" / "settings.json": ("enabledMcpjsonServers", sorted(servers)), - REPO_ROOT / ".gemini" / "settings.json": ("mcpServers", gemini_servers(servers)), - } - return {path: merged_document(path, key, value) for path, (key, value) in seeds.items()} +def output_paths(): + """Every repo-relative path any renderer can write, across all harnesses.""" + servers = load_servers() + paths = set() + for spec in HARNESSES.values(): + if spec["render"]: + paths.update(RENDERERS[spec["render"]](servers)) + if spec["skills"]: + # Trailing slash: `git check-ignore` only matches a directory-only + # .gitignore pattern when the path is spelled as a directory. + paths.add(spec["skills"] + "/") + return sorted(paths) # ── Skill symlinks ──────────────────────────────────────────────────────────── @@ -358,13 +382,10 @@ def active_harnesses(arguments): def sync(arguments): servers = load_servers() - for path, content in seed_outputs(servers).items(): - atomic_write(path, content) - generated = [] for name in active_harnesses(arguments): spec = HARNESSES[name] - files = MCP_RENDERERS[spec["mcp"]](servers) if spec["mcp"] else {} + files = RENDERERS[spec["render"]](servers) if spec["render"] else {} for rel, content in files.items(): atomic_write(REPO_ROOT / rel, content) if spec["skills"]: @@ -372,29 +393,44 @@ def sync(arguments): files = {**files, spec["skills"] + "/": None} if files: generated.append(f"{name}: {', '.join(sorted(files))}") - print("Synced committed seeds: .claude/settings.json, .gemini/settings.json") for line in generated: print(f"Generated {line}") if not generated and not any(not argument.startswith("-") for argument in arguments): print("No harnesses detected; run with --all or name one to force.") +def git(*arguments): + return subprocess.run( + ["git", "-C", str(REPO_ROOT), *arguments], + capture_output=True, text=True, check=False, + ).stdout.splitlines() + + def check(): - stale = [] - for path, expected in seed_outputs(load_servers()).items(): - try: - current = path.read_text(encoding="utf-8") - except OSError: - current = None - if current != expected: - stale.append(path.relative_to(REPO_ROOT)) - if stale: - print("Stale managed keys in committed seed files:", file=sys.stderr) - for path in stale: - print(f" {path}", file=sys.stderr) - print("Run .agents/scripts/sync.py to regenerate them.", file=sys.stderr) + """No generated adapter may be committed, and every one must be ignored. + + That invariant is the whole point of the layout: `.agents/` is canonical, + everything a harness reads is rendered from it per checkout. A renderer + added without a matching .gitignore entry, or an adapter force-added to the + index, breaks it silently otherwise. + """ + outputs = output_paths() + tracked = git("ls-files", "--", *outputs) + # --no-index: a tracked path is otherwise reported as unignored too, which + # would duplicate the complaint below. + ignored = set(git("check-ignore", "--no-index", "--", *outputs)) + unignored = [path for path in outputs if path not in ignored] + if tracked or unignored: + if tracked: + print("Generated adapters are committed; remove them from git:", file=sys.stderr) + for path in tracked: + print(f" {path}", file=sys.stderr) + if unignored: + print("Generated adapters missing from .gitignore:", file=sys.stderr) + for path in unignored: + print(f" {path}", file=sys.stderr) raise SystemExit(1) - print("Managed keys in committed seed files are current.") + print(f"{len(outputs)} generated path(s) ignored and uncommitted.") def list_harnesses(): @@ -403,10 +439,8 @@ def list_harnesses(): adapters = [] if spec["skills"]: adapters.append(f"skills → {spec['skills']}") - if spec["mcp"]: - adapters.append("mcp → " + ", ".join(MCP_RENDERERS[spec["mcp"]](servers))) - if spec.get("note"): - adapters.append(spec["note"]) + if spec["render"]: + adapters.append("files → " + ", ".join(sorted(RENDERERS[spec["render"]](servers)))) state = "detected" if detected(spec) else "not detected" print(f"{name:10} {state:13} {'; '.join(adapters)}") print(f"{'native':10} {'—':13} AGENTS.md + .agents/skills, no adapter: {', '.join(NATIVE)}") diff --git a/.agents/skills/find-skills/SKILL.md b/.agents/skills/find-skills/SKILL.md deleted file mode 100644 index 7369d66..0000000 --- a/.agents/skills/find-skills/SKILL.md +++ /dev/null @@ -1,142 +0,0 @@ ---- -name: find-skills -description: Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill. ---- - -# Find Skills - -This skill helps you discover and install skills from the open agent skills ecosystem. - -## When to Use This Skill - -Use this skill when the user: - -- Asks "how do I do X" where X might be a common task with an existing skill -- Says "find a skill for X" or "is there a skill for X" -- Asks "can you do X" where X is a specialized capability -- Expresses interest in extending agent capabilities -- Wants to search for tools, templates, or workflows -- Mentions they wish they had help with a specific domain (design, testing, deployment, etc.) - -## What is the Skills CLI? - -The Skills CLI (`npx skills`) is the package manager for the open agent skills ecosystem. Skills are modular packages that extend agent capabilities with specialized knowledge, workflows, and tools. - -**Key commands:** - -- `npx skills find [query] [--owner ]` - Search for skills interactively or by keyword, optionally scoped to a GitHub owner -- `npx skills add ` - Install a skill from GitHub or other sources -- `npx skills check` - Check for skill updates -- `npx skills update` - Update all installed skills - -**Browse skills at:** https://skills.sh/ - -## How to Help Users Find Skills - -### Step 1: Understand What They Need - -When a user asks for help with something, identify: - -1. The domain (e.g., React, testing, design, deployment) -2. The specific task (e.g., writing tests, creating animations, reviewing PRs) -3. Whether this is a common enough task that a skill likely exists - -### Step 2: Check the Leaderboard First - -Before running a CLI search, check the [skills.sh leaderboard](https://skills.sh/) to see if a well-known skill already exists for the domain. The leaderboard ranks skills by total installs, surfacing the most popular and battle-tested options. - -For example, top skills for web development include: -- `vercel-labs/agent-skills` — React, Next.js, web design (100K+ installs each) -- `anthropics/skills` — Frontend design, document processing (100K+ installs) - -### Step 3: Search for Skills - -If the leaderboard doesn't cover the user's need, run the find command: - -```bash -npx skills find [query] [--owner ] -``` - -For example: - -- User asks "how do I make my React app faster?" → `npx skills find react performance` -- User asks "can you help me with PR reviews?" → `npx skills find pr review` -- User asks "I need to create a changelog" → `npx skills find changelog` - -### Step 4: Verify Quality Before Recommending - -**Do not recommend a skill based solely on search results.** Always verify: - -1. **Install count** — Prefer skills with 1K+ installs. Be cautious with anything under 100. -2. **Source reputation** — Official sources (`vercel-labs`, `anthropics`, `microsoft`) are more trustworthy than unknown authors. -3. **GitHub stars** — Check the source repository. A skill from a repo with <100 stars should be treated with skepticism. - -### Step 5: Present Options to the User - -When you find relevant skills, present them to the user with: - -1. The skill name and what it does -2. The install count and source -3. The install command they can run -4. A link to learn more at skills.sh - -Example response: - -``` -I found a skill that might help! The "react-best-practices" skill provides -React and Next.js performance optimization guidelines from Vercel Engineering. -(185K installs) - -To install it: -npx skills add vercel-labs/agent-skills@react-best-practices - -Learn more: https://skills.sh/vercel-labs/agent-skills/react-best-practices -``` - -### Step 6: Offer to Install - -If the user wants to proceed, you can install the skill for them: - -```bash -npx skills add -g -y -``` - -The `-g` flag installs globally (user-level) and `-y` skips confirmation prompts. - -## Common Skill Categories - -When searching, consider these common categories: - -| Category | Example Queries | -| --------------- | ---------------------------------------- | -| Web Development | react, nextjs, typescript, css, tailwind | -| Testing | testing, jest, playwright, e2e | -| DevOps | deploy, docker, kubernetes, ci-cd | -| Documentation | docs, readme, changelog, api-docs | -| Code Quality | review, lint, refactor, best-practices | -| Design | ui, ux, design-system, accessibility | -| Productivity | workflow, automation, git | - -## Tips for Effective Searches - -1. **Use specific keywords**: "react testing" is better than just "testing" -2. **Try alternative terms**: If "deploy" doesn't work, try "deployment" or "ci-cd" -3. **Check popular sources**: Many skills come from `vercel-labs/agent-skills` or `ComposioHQ/awesome-claude-skills` - -## When No Skills Are Found - -If no relevant skills exist: - -1. Acknowledge that no existing skill was found -2. Offer to help with the task directly using your general capabilities -3. Suggest the user could create their own skill with `npx skills init` - -Example: - -``` -I searched for skills related to "xyz" but didn't find any matches. -I can still help you with this task directly! Would you like me to proceed? - -If this is something you do often, you could create your own skill: -npx skills init my-xyz-skill -``` diff --git a/.agents/skills/ponytail-audit/SKILL.md b/.agents/skills/ponytail-audit/SKILL.md deleted file mode 100644 index 5582d10..0000000 --- a/.agents/skills/ponytail-audit/SKILL.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -name: ponytail-audit -description: > - Whole-repo audit for over-engineering. Like ponytail-review, but scans the - entire codebase instead of a diff: a ranked list of what to delete, simplify, - or replace with stdlib/native equivalents. Use when the user says "audit this - codebase", "audit for over-engineering", "what can I delete from this repo", - "find bloat", "ponytail-audit", or "/ponytail-audit". One-shot report, does - not apply fixes. ---- - -ponytail-review, repo-wide. Scan the whole tree instead of a diff. Rank -findings biggest cut first. - -## Tags - -Same as ponytail-review: - -- `delete:` dead code, unused flexibility, speculative feature. Replacement: nothing. -- `stdlib:` hand-rolled thing the standard library ships. Name the function. -- `native:` dependency or code doing what the platform already does. Name the feature. -- `yagni:` abstraction with one implementation, config nobody sets, layer with one caller. -- `shrink:` same logic, fewer lines. Show the shorter form. - -## Hunt - -Deps the stdlib or platform already ships, single-implementation interfaces, -factories with one product, wrappers that only delegate, files exporting one -thing, dead flags and config, hand-rolled stdlib. - -## Output - -One line per finding, ranked: ` . . [path]`. -End with `net: - lines, - deps possible.` Nothing to cut: `Lean already. Ship.` - -## Boundaries - -Scope: over-engineering and complexity only. Correctness bugs, security holes, -and performance are explicitly out of scope. Route them to a normal review -pass. Lists findings, applies nothing. One-shot. -"stop ponytail-audit" or "normal mode" to revert. diff --git a/.agents/skills/ponytail-debt/SKILL.md b/.agents/skills/ponytail-debt/SKILL.md deleted file mode 100644 index ecbc0ca..0000000 --- a/.agents/skills/ponytail-debt/SKILL.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -name: ponytail-debt -description: > - Harvest every `ponytail:` comment in the codebase into a debt ledger, so the - deliberate shortcuts and deferrals ponytail leaves behind get tracked instead - of rotting into "later means never". Use when the user says "ponytail debt", - "/ponytail-debt", "what did ponytail defer", "list the shortcuts", "ponytail - ledger", or "what did we mark to do later". One-shot report, changes nothing. ---- - -Every deliberate ponytail shortcut is marked with a `ponytail:` comment naming -its ceiling and upgrade path. This collects them into one ledger so a deferral -can't quietly become permanent. - -## Scan - -Grep the repo for comment markers, skipping `node_modules`, `.git`, and build -output: - -`grep -rnE '(#|//) ?ponytail:' .` (add other comment prefixes if your stack uses them) - -Each hit is one ledger row. The comment prefix keeps prose that merely mentions -the convention out of the ledger. - -## Output - -One row per marker, grouped by file: - -`:, . ceiling: . upgrade: .` - -The convention is `ponytail: , `, so pull the ceiling -and the trigger straight from the comment. Want an owner per row too? add -`git blame -L,`. - -Flag the rot risk: any `ponytail:` comment that names no upgrade path or -trigger gets a `no-trigger` tag, those are the ones that silently rot. - -End with ` markers, with no trigger.` Nothing found: `No ponytail: debt. Clean ledger.` - -## Boundaries - -Reads and reports only, changes nothing. To persist it, ask and it writes the -ledger to a file (e.g. `PONYTAIL-DEBT.md`). One-shot. "stop ponytail-debt" or -"normal mode" to revert. diff --git a/.agents/skills/ponytail-gain/SKILL.md b/.agents/skills/ponytail-gain/SKILL.md deleted file mode 100644 index 012e37b..0000000 --- a/.agents/skills/ponytail-gain/SKILL.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -name: ponytail-gain -description: > - Show ponytail's measured impact as a compact scoreboard: less code, less - cost, more speed, from the benchmark medians. One-shot display, not a - persistent mode, and not a per-repo number. Trigger: /ponytail-gain, - "ponytail gain", "what does ponytail save", "show ponytail impact", - "ponytail scoreboard". ---- - -# Ponytail Gain - -Display this scoreboard when invoked. One-shot: do NOT change mode, write flag -files, or persist anything. - -The figures are the published benchmark medians (5 everyday tasks: email -validator, debounce, CSV sum, countdown timer, rate limiter; three models: -Haiku, Sonnet, Opus). They are measured, not computed from the current repo. -Source: `benchmarks/` and the README. - -## Scoreboard - -Render plain ASCII bars. The bar length shows the measured range; the label -carries the exact figure: - -``` - ponytail gain benchmark median · 5 tasks · 3 models - - Lines of code no-skill ████████████████████ 100% - ponytail ██▌················· 6–20% ▼ 80–94% - Cost no-skill ████████████████████ 100% - ponytail █████▌·············· 23–53% ▼ 47–77% - Speed ponytail ▸ 3–6× faster - - This repo: /ponytail-debt (shortcuts you deferred) - /ponytail-audit (what's still cuttable) -``` - -## Honesty boundary - -These are benchmark medians, not this repo. NEVER print a per-repo savings -number ("you saved X lines/tokens here"): the unbuilt version was never -written, so there is no real baseline to subtract from in a live repo. The -only real per-repo figures come from `/ponytail-debt` (a counted ledger), and -this card points there instead of inventing one. - -## Boundaries - -One-shot display. Edits nothing, changes no mode. -"stop ponytail" or "normal mode": revert. diff --git a/.agents/skills/ponytail-help/SKILL.md b/.agents/skills/ponytail-help/SKILL.md deleted file mode 100644 index ba145c0..0000000 --- a/.agents/skills/ponytail-help/SKILL.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -name: ponytail-help -description: > - Quick-reference card for all ponytail modes, skills, and commands. - One-shot display, not a persistent mode. Trigger: /ponytail-help, - "ponytail help", "what ponytail commands", "how do I use ponytail". ---- - -# Ponytail Help - -Display this reference card when invoked. One-shot, do NOT change mode, -write flag files, or persist anything. - -## Levels - -| Level | Trigger | What change | -|-------|---------|-------------| -| **Lite** | `/ponytail lite` | Build what's asked, name the lazier alternative in one line. | -| **Full** | `/ponytail` | The ladder enforced: YAGNI → stdlib → native → one line → minimum. Default. | -| **Ultra** | `/ponytail ultra` | YAGNI extremist. Deletion before addition. Challenges requirements before building. | - -Level sticks until changed or session end. - -## Skills - -| Skill | Trigger | What it does | -|-------|---------|--------------| -| **ponytail** | `/ponytail` | Lazy mode itself. Simplest solution that works. | -| **ponytail-review** | `/ponytail-review` | Over-engineering review: `L42: yagni: factory, one product. Inline.` | -| **ponytail-audit** | `/ponytail-audit` | Whole-repo over-engineering audit: ranked list of what to delete. | -| **ponytail-debt** | `/ponytail-debt` | Harvest `ponytail:` shortcut comments into a tracked ledger. | -| **ponytail-gain** | `/ponytail-gain` | Measured-impact scoreboard: less code, less cost, more speed. | -| **ponytail-help** | `/ponytail-help` | This card. | - -Codex uses `@ponytail`, `@ponytail-review`, and `@ponytail-help`; Claude Code -and OpenCode use the slash-command forms above (OpenCode ships all six as -slash commands). - -## Deactivate - -Say "stop ponytail" or "normal mode". Resume anytime with `/ponytail`. -`/ponytail off` also works. - -## Configure Default Mode - -Default mode = `full`, auto-active every session. Change it: - -**Environment variable** (highest priority): -```bash -export PONYTAIL_DEFAULT_MODE=ultra -``` - -**Config file** (`~/.config/ponytail/config.json`, Windows: `%APPDATA%\ponytail\config.json`): -```json -{ "defaultMode": "lite" } -``` - -Set `"off"` to disable auto-activation on session start, activate manually -with `/ponytail` when wanted. - -Resolution: env var > config file > `full`. - -## Update - -Enable auto-update once: open `/plugin`, go to Marketplaces, pick ponytail, Enable auto-update. Claude Code then pulls new versions at startup (run `/reload-plugins` when it prompts). Manual refresh: `/plugin marketplace update ponytail` then `/reload-plugins`. - -If `/plugin` is not recognized, your Claude Code is out of date. Update it (`npm install -g @anthropic-ai/claude-code@latest`, or `brew upgrade claude-code`) and restart. Other hosts use their own update flow. - -## More - -Full docs + examples: https://github.com/DietrichGebert/ponytail diff --git a/.agents/skills/ponytail-review/SKILL.md b/.agents/skills/ponytail-review/SKILL.md deleted file mode 100644 index e137a85..0000000 --- a/.agents/skills/ponytail-review/SKILL.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -name: ponytail-review -description: > - Code review focused exclusively on over-engineering. Finds what to delete: - reinvented standard library, unneeded dependencies, speculative abstractions, - dead flexibility. One line per finding: location, what to cut, what replaces - it. Use when the user says "review for over-engineering", "what can we - delete", "is this over-engineered", "simplify review", or invokes - /ponytail-review. Complements correctness-focused review, this one only - hunts complexity. ---- - -Review diffs for unnecessary complexity. One line per finding: location, what -to cut, what replaces it. The diff's best outcome is getting shorter. - -## Format - -`L: . .`, or `:L: ...` for -multi-file diffs. - -Tags: - -- `delete:` dead code, unused flexibility, speculative feature. Replacement: nothing. -- `stdlib:` hand-rolled thing the standard library ships. Name the function. -- `native:` dependency or code doing what the platform already does. Name the feature. -- `yagni:` abstraction with one implementation, config nobody sets, layer with one caller. -- `shrink:` same logic, fewer lines. Show the shorter form. - -## Examples - -❌ "This EmailValidator class might be more complex than necessary, have you -considered whether all these validation rules are needed at this stage?" - -✅ `L12-38: stdlib: 27-line validator class. "@" in email, 1 line, real validation is the confirmation mail.` - -✅ `L4: native: moment.js imported for one format call. Intl.DateTimeFormat, 0 deps.` - -✅ `repo.py:L88: yagni: AbstractRepository with one implementation. Inline it until a second one exists.` - -✅ `L52-71: delete: retry wrapper around an idempotent local call. Nothing replaces it.` - -✅ `L30-44: shrink: manual loop builds dict. dict(zip(keys, values)), 1 line.` - -## Scoring - -End with the only metric that matters: `net: - lines possible.` - -If there is nothing to cut, say `Lean already. Ship.` and stop. - -## Boundaries - -Scope: over-engineering and complexity only. Correctness bugs, security holes, -and performance are explicitly out of scope. Route them to a normal review -pass, not this one. A single smoke test or `assert`-based -self-check is the ponytail minimum, not bloat, never flag it for deletion. -Does not apply the fixes, only lists them. -"stop ponytail-review" or "normal mode": revert to verbose review style. diff --git a/.agents/skills/ponytail/LICENSE b/.agents/skills/ponytail/LICENSE deleted file mode 100644 index 715d483..0000000 --- a/.agents/skills/ponytail/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2026 DietrichGebert - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/.agents/skills/ponytail/SKILL.md b/.agents/skills/ponytail/SKILL.md deleted file mode 100644 index 5f999d7..0000000 --- a/.agents/skills/ponytail/SKILL.md +++ /dev/null @@ -1,120 +0,0 @@ ---- -name: ponytail -description: > - Forces the laziest solution that actually works, simplest, shortest, most - minimal. Channels a senior dev who has seen everything: question whether the - task needs to exist at all (YAGNI), reach for the standard library before - custom code, native platform features before dependencies, one line before - fifty. Supports intensity levels: lite, full (default), ultra. Use on ANY - coding task: writing, adding, refactoring, fixing, reviewing, or designing - code, and choosing libraries or dependencies. Also use whenever the user - says "ponytail", "be lazy", "lazy mode", "simplest solution", "minimal - solution", "yagni", "do less", or "shortest path", or complains about - over-engineering, bloat, boilerplate, or unnecessary dependencies. Do NOT - use for non-coding requests (general knowledge, prose, translation, - summaries, recipes). -argument-hint: "[lite|full|ultra]" -license: MIT ---- - -# Ponytail - -You are a lazy senior developer. Lazy means efficient, not careless. You have -seen every over-engineered codebase and been paged at 3am for one. The best -code is the code never written. - -## Persistence - -ACTIVE EVERY RESPONSE. No drift back to over-building. Still active if -unsure. Off only: "stop ponytail" / "normal mode". Default: **full**. -Switch: `/ponytail lite|full|ultra`. - -## The ladder - -Stop at the first rung that holds: - -1. **Does this need to exist at all?** Speculative need = skip it, say so in one line. (YAGNI) -2. **Already in this codebase?** A helper, util, type, or pattern that already lives here → reuse it. Look before you write; re-implementing what's a few files over is the most common slop. -3. **Stdlib does it?** Use it. -4. **Native platform feature covers it?** `` over a picker lib, CSS over JS, DB constraint over app code. -5. **Already-installed dependency solves it?** Use it. Never add a new one for what a few lines can do. -6. **Can it be one line?** One line. -7. **Only then:** the minimum code that works. - -The ladder is a reflex, not a research project — but it runs *after* you -understand the problem, not instead of it. Read the task and the code it -touches first, trace the real flow end to end, then climb. Two rungs work → -take the higher one and move on. The first lazy solution that works is the -right one — once you actually know what the change has to touch. - -**Bug fix = root cause, not symptom.** A report names a symptom. Before you -edit, grep every caller of the function you're about to touch. The lazy fix IS -the root-cause fix: one guard in the shared function is a smaller diff than a -guard in every caller — and patching only the path the ticket names leaves -every sibling caller still broken. Fix it once, where all callers route through. - -## Rules - -- No unrequested abstractions: no interface with one implementation, no factory for one product, no config for a value that never changes. -- No boilerplate, no scaffolding "for later", later can scaffold for itself. -- Deletion over addition. Boring over clever, clever is what someone decodes at 3am. -- Fewest files possible. Shortest working diff wins — but only once you understand the problem. The smallest change in the wrong place isn't lazy, it's a second bug. -- Complex request? Ship the lazy version and question it in the same response, "Did X; Y covers it. Need full X? Say so." Never stall on an answer you can default. -- Two stdlib options, same size? Take the one that's correct on edge cases. Lazy means writing less code, not picking the flimsier algorithm. -- Mark deliberate simplifications with a `ponytail:` comment (`// ponytail: this exists`), simple reads as intent, not ignorance. Shortcut with a known ceiling (global lock, O(n²) scan, naive heuristic)? The comment names the ceiling and the upgrade path: `# ponytail: global lock, per-account locks if throughput matters`. - -## Output - -Code first. Then at most three short lines: what was skipped, when to add it. -No essays, no feature tours, no design notes. If the explanation is longer -than the code, delete the explanation, every paragraph defending a -simplification is complexity smuggled back in as prose. Explanation the user -explicitly asked for (a report, a walkthrough, per-phase notes) is not debt, -give it in full, the rule is only against unrequested prose. - -Pattern: `[code] → skipped: [X], add when [Y].` - -## Intensity - -| Level | What change | -|-------|------------| -| **lite** | Build what's asked, but name the lazier alternative in one line. User picks. | -| **full** | The ladder enforced. Stdlib and native first. Shortest diff, shortest explanation. Default. | -| **ultra** | YAGNI extremist. Deletion before addition. Ship the one-liner and challenge the rest of the requirement in the same breath. | - -Example: "Add a cache for these API responses." -- lite: "Done, cache added. FYI: `functools.lru_cache` covers this in one line if you'd rather not own a cache class." -- full: "`@lru_cache(maxsize=1000)` on the fetch function. Skipped custom cache class, add when lru_cache measurably falls short." -- ultra: "No cache until a profiler says so. When it does: `@lru_cache`. A hand-rolled TTL cache class is a bug farm with a hit rate." - -## When NOT to be lazy - -Never simplify away: input validation at trust boundaries, error handling -that prevents data loss, security measures, accessibility basics, anything -explicitly requested. User insists on the full version → build it, no -re-arguing. - -Never lazy about understanding the problem. The ladder shortens the -solution, never the reading. Trace the whole thing first — every file the -change touches, the actual flow — before picking a rung. Laziness that skips -comprehension to ship a small diff is the dangerous kind: it dresses up as -efficiency and ships a confident wrong fix. Read fully, then be lazy. - -Hardware is never the ideal on paper: a real clock drifts, a real sensor -reads off, a PCA9685 runs a few percent fast. Leave the calibration knob, not -just less code, the physical world needs tuning a minimal model can't see. - -Lazy code without its check is unfinished. Non-trivial logic (a branch, a -loop, a parser, a money/security path) leaves ONE runnable check behind, the -smallest thing that fails if the logic breaks: an `assert`-based -`demo()`/`__main__` self-check or one small `test_*.py`. No frameworks, no -fixtures, no per-function suites unless asked. Trivial one-liners need no -test, YAGNI applies to tests too. - -## Boundaries - -Ponytail governs what you build, not how you talk (pair with Caveman for -terse prose). "stop ponytail" / "normal mode": revert. Level persists until -changed or session end. - -The shortest path to done is the right path. diff --git a/.claude/hooks/session-start.sh b/.claude/hooks/session-start.sh deleted file mode 100755 index 49e87ad..0000000 --- a/.claude/hooks/session-start.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash -# Claude Code SessionStart hook: bootstrap remote sessions (Claude Code on the -# web) automatically. Local sessions skip it — run .agents/scripts/bootstrap.sh -# once per fresh checkout instead of paying for it on every session start. -# -# Always exits 0: a failing SessionStart hook kills the whole cloud session, -# and a session without generated adapters is still recoverable by hand. -set -uo pipefail - -if [ "${CLAUDE_CODE_REMOTE:-}" != "true" ]; then - exit 0 -fi - -project_dir="${CLAUDE_PROJECT_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)}" -"$project_dir/.agents/scripts/bootstrap.sh" || - echo "bootstrap failed; run .agents/scripts/bootstrap.sh manually" >&2 -exit 0 diff --git a/.claude/settings.json b/.claude/settings.json deleted file mode 100644 index 8d0fe13..0000000 --- a/.claude/settings.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "hooks": { - "SessionStart": [ - { - "matcher": "startup|resume", - "hooks": [ - { - "type": "command", - "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/session-start.sh" - } - ] - } - ], - "PreToolUse": [ - { - "matcher": "Workflow", - "hooks": [ - { - "type": "command", - "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/workflow-model-mix.py" - } - ] - } - ] - }, - "enabledMcpjsonServers": [ - "context7" - ] -} diff --git a/.cursor/environment.json b/.cursor/environment.json deleted file mode 100644 index ea5e42f..0000000 --- a/.cursor/environment.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "install": ".agents/scripts/bootstrap.sh" -} diff --git a/.gemini/settings.json b/.gemini/settings.json deleted file mode 100644 index 8897da9..0000000 --- a/.gemini/settings.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "context": { - "fileName": [ - "AGENTS.md", - "GEMINI.md" - ] - }, - "mcpServers": { - "context7": { - "httpUrl": "https://mcp.context7.com/mcp", - "includeTools": [ - "resolve-library-id", - "query-docs" - ] - } - } -} diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md deleted file mode 100644 index 2fc362f..0000000 --- a/.github/copilot-instructions.md +++ /dev/null @@ -1,6 +0,0 @@ -Follow [AGENTS.md](../AGENTS.md). It is the canonical instruction file for every -agent working in this repository. - -Path-scoped guidance belongs in `.github/instructions/*.instructions.md` with an -`applyTo` glob — that format is Copilot-specific and is not shared with other -agents. Anything every agent needs goes in `AGENTS.md` instead. diff --git a/.github/workflows/agent-config.yml b/.github/workflows/agent-config.yml index ff97617..ef72e44 100644 --- a/.github/workflows/agent-config.yml +++ b/.github/workflows/agent-config.yml @@ -8,31 +8,23 @@ on: pull_request: paths: - '.agents/**' - - '.claude/**' - - '.cursor/**' - - '.gemini/**' - '.devcontainer/**' - '.github/**' - '.gitignore' - '.pre-commit-config.yaml' - 'skills-lock.json' - 'AGENTS.md' - - 'CLAUDE.md' push: branches: - main paths: - '.agents/**' - - '.claude/**' - - '.cursor/**' - - '.gemini/**' - '.devcontainer/**' - '.github/**' - '.gitignore' - '.pre-commit-config.yaml' - 'skills-lock.json' - 'AGENTS.md' - - 'CLAUDE.md' workflow_dispatch: permissions: @@ -48,20 +40,14 @@ jobs: - name: Validate scripts run: | - bash -n .agents/scripts/bootstrap.sh \ - .agents/setup \ - .claude/hooks/session-start.sh + bash -n .agents/scripts/bootstrap.sh .agents/setup python3 -m py_compile .agents/scripts/sync.py \ .agents/scripts/check-skills.py \ - .claude/hooks/workflow-model-mix.py + .agents/hooks/workflow-model-mix.py - - name: Verify managed keys in committed seeds - # Must run before bootstrap: it checks the committed - # enabledMcpjsonServers key in .claude/settings.json and the - # mcpServers key in .gemini/settings.json against - # .agents/mcp/servers.json as checked out, before anything - # regenerates them. All other adapters are gitignored and have no - # committed state to drift-check. + - name: Verify no generated adapter is committed + # Every renderer output must be gitignored and absent from the index. + # Runs before bootstrap so it reads the repository as checked out. run: .agents/scripts/sync.py check - name: Verify skill lock @@ -106,13 +92,12 @@ jobs: for path in ( Path(".agents/mcp/servers.json"), - Path(".claude/settings.json"), - Path(".gemini/settings.json"), Path(".devcontainer/devcontainer.json"), - Path(".cursor/environment.json"), Path("skills-lock.json"), # Generated by the bootstrap step above: Path(".mcp.json"), + Path(".claude/settings.json"), + Path(".gemini/settings.json"), Path(".cursor/mcp.json"), Path(".vscode/mcp.json"), Path("opencode.json"), diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml deleted file mode 100644 index b3f55b7..0000000 --- a/.github/workflows/copilot-setup-steps.yml +++ /dev/null @@ -1,25 +0,0 @@ -# GitHub Copilot's coding agent runs the `copilot-setup-steps` job before the -# agent gets control; it does not honor .devcontainer/. The push/pull_request -# triggers exist only so edits to this file validate in CI. -name: Copilot Setup Steps - -on: - workflow_dispatch: - push: - paths: - - '.github/workflows/copilot-setup-steps.yml' - pull_request: - paths: - - '.github/workflows/copilot-setup-steps.yml' - -jobs: - copilot-setup-steps: - runs-on: ubuntu-latest - permissions: - contents: read - steps: - - name: Check out repository - uses: actions/checkout@v7 - - - name: Bootstrap agent environment - run: .agents/scripts/bootstrap.sh diff --git a/.gitignore b/.gitignore index f1901ba..b50b3e9 100644 --- a/.gitignore +++ b/.gitignore @@ -5,15 +5,17 @@ # ─── Generated agent adapters ───────────────────────────── # Written wholesale by .agents/scripts/sync.py (via bootstrap.sh) for the -# harnesses detected on this machine; nothing here is a bootstrap entry point, -# so none of it needs to exist before that script runs, and none of it carries -# any hand-authored content. Do not hand-edit or commit these. -# (.claude/settings.json and .gemini/settings.json are similar but stay -# committed — the generator only owns one key in each, the rest is -# hand-edited. CI fails if a sync.py output ever shows up untracked here, -# so keep this list in step with sync.py's renderers.) +# harnesses detected on this machine. Nothing harness-specific is committed: +# every file below is rendered from .agents/ per checkout and carries no +# hand-authored content. Do not hand-edit or commit these. Keep the list in +# step with sync.py's renderers — `sync.py check` fails if a renderer output +# is unignored or tracked, and CI fails if a bootstrap run leaves an untracked +# file behind. +/CLAUDE.md /.mcp.json +/.claude/settings.json /.claude/skills/ +/.gemini/settings.json /.cursor/mcp.json /.codex/config.toml /.vscode/mcp.json diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ea8cea4..69bdd88 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,8 +1,8 @@ repos: - repo: local hooks: - - id: check-agent-sync - name: Verify managed keys in committed agent seeds + - id: check-agent-adapters + name: Verify no generated agent adapter is committed entry: .agents/scripts/sync.py check language: script always_run: true diff --git a/AGENTS.md b/AGENTS.md index f293b83..ef18fd6 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -7,8 +7,8 @@ of truth, and what it must not touch.> | Path | Purpose | |---|---| -| `.agents/` | The one canonical agent folder: shared skills, MCP definitions, scripts, and the `setup` entry shim. Everything agent-related is edited here and only here. | -| `.claude/`, `.cursor/`, `.gemini/`, `.github/` | Committed seeds (files a harness reads straight from the clone before any script can run: hook and environment registrations, one managed key per settings file) plus CI enforcement under `.github/workflows/`. Everything else a harness needs is generated from `.agents/` and gitignored — never edit or commit generated adapters. | +| `.agents/` | The one canonical agent folder: shared skills, MCP definitions, hook scripts, setup scripts, and the `setup` entry shim. Everything agent-related is edited here and only here. | +| `.github/workflows/` | CI enforcement of the rules below. Nothing harness-specific is committed anywhere in this repository: every file a harness reads (`CLAUDE.md`, `.claude/`, `.cursor/`, `.gemini/`, …) is generated from `.agents/` and gitignored — never edit or commit one. | | `.devcontainer/` | Container definition for Codespaces, Ona, and local devcontainers. | ## Code quality @@ -52,18 +52,14 @@ Concretely, in `Workflow` scripts set `model:` per `agent()` call — omitting i inherits the session's strongest tier for every step, which is exactly the failure mode. A deliberately single-tier workflow states why in a `// single-tier: ` comment; a committed Claude Code hook -(`.claude/hooks/workflow-model-mix.py`) blocks multi-agent scripts that do +(`.agents/hooks/workflow-model-mix.py`) blocks multi-agent scripts that do neither. ## Skills and MCP -- **Ponytail is always on**, at its default `full` intensity, for every coding - task here. Read `.agents/skills/ponytail/SKILL.md` and apply it on every - response; keep it active unless the user explicitly changes intensity or turns - it off. `ponytail-audit`, `ponytail-debt`, `ponytail-gain`, `ponytail-help`, - and `ponytail-review` are pinned beside it. -- **find-skills** covers skill discovery — reach for it when a task looks like - something an installable skill already does. +- No skills ship with this template. Add one under `.agents/skills//` or + install a third party's with `npx skills add @ -y`, then re-run + `.agents/scripts/sync.py` and `.agents/scripts/check-skills.py --update`. - **Context7** is registered for library documentation: `resolve-library-id` then `query-docs`, rather than recalling an API from memory. It works unauthenticated at a lower rate limit; set `CONTEXT7_API_KEY` and add the @@ -71,27 +67,26 @@ neither. ## Agent configuration -- Run `.agents/scripts/bootstrap.sh` once per fresh checkout. It is idempotent - and is what every cloud environment runs on startup — see the environments - table in `.agents/README.md`. Environments with no in-repo hook (Codex - cloud, Jules, Devin, Factory) take that same line in their UI setup field. +- Run `.agents/scripts/bootstrap.sh` once per fresh checkout — nothing a + harness reads exists until you do. It is idempotent, and every environment + invokes this one line: from `.devcontainer/`, from `.agents/setup`, or from + the setup-script field in a cloud harness's own settings. See the + environments table in `.agents/README.md`. - Edit shared skills only in `.agents/skills/`; edit MCP servers only in - `.agents/mcp/servers.json`; then run `.agents/scripts/sync.py`. It renders - gitignored adapters for the harnesses detected on this machine (`--all` for - every harness, `list` for the full table of who gets what). Instructions and - skills ride the standards: harnesses read `AGENTS.md` (Claude Code through - the committed `CLAUDE.md` pointer, Gemini through the committed - `context.fileName` seed) and `.agents/skills/` (Claude Code and CodeBuddy - through generated symlinks). The rendered files are MCP configs for tools - with a project-level MCP surface; dsh has none (user-level `$DSH_HOME` - config only). -- `.claude/settings.json` and `.gemini/settings.json` stay committed even - though `sync.py` writes into them: it only owns one key in each - (`enabledMcpjsonServers`, `mcpServers`) and merges it into whatever the rest - of the file already says. The other committed agent files are the hooks that - reach the setup script before it can run (see the repository-layout table); - everything else is generated, and CI fails if a generated file is not - covered by `.gitignore`. + `.agents/mcp/servers.json`; edit hook scripts only in `.agents/hooks/`; then + run `.agents/scripts/sync.py`. It renders gitignored adapters for the + harnesses detected on this machine (`--all` for every harness, `list` for the + full table of who gets what). Instructions and skills ride the standards: + harnesses read `AGENTS.md` (Claude Code through the generated `CLAUDE.md` + pointer, Gemini through a generated `context.fileName`) and `.agents/skills/` + (Claude Code and CodeBuddy through generated symlinks). The rest is MCP + config for tools with a project-level MCP surface; dsh has none (user-level + `$DSH_HOME` config only). +- Every renderer output must be listed in `.gitignore`'s generated-adapters + block. `.agents/scripts/sync.py check` fails if one is unignored or tracked, + and CI fails if a bootstrap run leaves an untracked file behind. Local, + uncommitted Claude Code settings belong in `.claude/settings.local.json`, + which the generator never touches. - Codex loads a repo-local `.codex/config.toml` only for trusted projects; run `.agents/scripts/sync.py install-codex` only when the user wants this repo's MCP servers in their user-level Codex config instead. diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index 5debd9b..0000000 --- a/CLAUDE.md +++ /dev/null @@ -1,5 +0,0 @@ -@AGENTS.md - -This repo keeps all reusable agent assets in `.agents/` and generates -tool-specific adapters from it with `.agents/scripts/sync.py`; generated -adapters are gitignored. diff --git a/skills-lock.json b/skills-lock.json index 9405fc9..ff044d1 100644 --- a/skills-lock.json +++ b/skills-lock.json @@ -1,47 +1,4 @@ { "version": 1, - "skills": { - "find-skills": { - "source": "vercel-labs/skills", - "sourceType": "github", - "skillPath": "skills/find-skills/SKILL.md", - "computedHash": "1c27b1774a4ec17ad4556a72e3c0168beab3af0183b2c1b8aa9e320af3ff41ce" - }, - "ponytail": { - "source": "DietrichGebert/ponytail", - "sourceType": "github", - "skillPath": "skills/ponytail/SKILL.md", - "computedHash": "91ccca73c64d707142cfa8b6f80bfb46570a27e30b3deeb27b909f23978dd0b6" - }, - "ponytail-audit": { - "source": "DietrichGebert/ponytail", - "sourceType": "github", - "skillPath": "skills/ponytail-audit/SKILL.md", - "computedHash": "8b8d72e6ff70b65b6c9518d470fcf29dc696eea93d28f3efa10fdcc60cbd696d" - }, - "ponytail-debt": { - "source": "DietrichGebert/ponytail", - "sourceType": "github", - "skillPath": "skills/ponytail-debt/SKILL.md", - "computedHash": "0099b82174e3a4261828b4ec04d2c068b1b294fdab14f76701c2acd1f7c99539" - }, - "ponytail-gain": { - "source": "DietrichGebert/ponytail", - "sourceType": "github", - "skillPath": "skills/ponytail-gain/SKILL.md", - "computedHash": "c45ecba7906960eea904218b623abf097ebff84ecbacca6d68da1d0687435f75" - }, - "ponytail-help": { - "source": "DietrichGebert/ponytail", - "sourceType": "github", - "skillPath": "skills/ponytail-help/SKILL.md", - "computedHash": "10e8382b1033c9a0fec0073de6d3de3846b4f5dca7d78b6df2d476a1f4cd43c6" - }, - "ponytail-review": { - "source": "DietrichGebert/ponytail", - "sourceType": "github", - "skillPath": "skills/ponytail-review/SKILL.md", - "computedHash": "4646594fcd75455533f7ff1425f4f1c5ba0fa65f88241bf262b1c4fc275f049a" - } - } + "skills": {} }