{"skill":{"slug":"sightglass","displayName":"Sightglass","summary":"Monitors AI coding agents to track dependency choices, classify discovery methods, flag risks, and reveal biases and missed alternatives in your project.","description":"# 🔍 Sightglass — Agent Supply Chain Intelligence\n\nYour AI coding agent just added 47 dependencies to your project. Do you know why it picked any of them?\n\n**Sightglass instruments AI coding agents** to capture every tool selection, dependency install, and architectural choice — then surfaces risks, biases, and better alternatives you never saw.\n\n## Why This Matters\n\nWhen a human developer picks a dependency, there's a reasoning trail: blog posts read, alternatives compared, team discussions had. When an AI agent picks one, that trail is invisible. The agent \"just knows\" packages from training data — which means it's biased toward:\n\n- Whatever was popular when training data was cut off\n- Packages with the most Stack Overflow mentions (not the best packages)\n- Dependencies it's seen in similar projects (not necessarily right for yours)\n\nSightglass makes this invisible decision-making visible.\n\n## Discovery Classification\n\nSightglass classifies **how** your agent found each dependency:\n\n| Classification | What It Means | Risk Level |\n|---|---|---|\n| **TRAINING_RECALL** | Agent just \"knew\" it from training data — no search performed | 🟡 Medium |\n| **CONTEXT_INHERITANCE** | Found in existing project files (package.json, imports, etc.) | 🟢 Low |\n| **REACTIVE_SEARCH** | Agent hit a problem and searched for a solution | 🟡 Medium |\n| **PROACTIVE_SEARCH** | Agent actively compared alternatives before choosing | 🟢 Low |\n| **USER_DIRECTED** | Human explicitly told the agent what to use | ⚪ None |\n\nHigh `TRAINING_RECALL` percentages are a red flag — it means your agent is on autopilot, not thinking.\n\n## Quick Start\n\n### 1. Setup\n\n```bash\n./skills/sightglass/setup.sh\n```\n\nThis installs the CLI (`@sightglass/cli`), runs initial configuration, and checks the watcher daemon.\n\n### 2. Login\n\n```bash\nsightglass login\n```\n\nAuthenticate with [sightglass.dev](https://sightglass.dev) to enable cloud analysis and history.\n\n### 3. Watch\n\n```bash\nsightglass watch\n```\n\nStarts the background watcher that monitors agent sessions — file changes, package installs, tool calls.\n\n### 4. Analyze\n\n```bash\nsightglass analyze\n# or\n./skills/sightglass/analyze.sh --since \"1 hour ago\" --format json\n```\n\n## OpenClaw Integration\n\n### Automatic Session Tracking\n\nSightglass provides pre/post hooks for coding agent sessions:\n\n**Before a session** — `hooks/pre-spawn.sh`:\n- Records start time and project context\n- Ensures the watcher daemon is running\n\n**After a session** — `hooks/post-session.sh`:\n- Runs analysis on everything that happened\n- Outputs a summary: risks found, training recall %, alternatives missed\n\n### Using with a Coding Agent\n\nWhen you spawn a coding agent through OpenClaw, wrap it with Sightglass:\n\n```bash\n# Before spawning\nsource ./skills/sightglass/hooks/pre-spawn.sh /path/to/project\n\n# ... agent does its work ...\n\n# After session ends\n./skills/sightglass/hooks/post-session.sh\n```\n\nThe post-session output looks like:\n\n```\n📊 Session Summary\n  Dependencies added: 12\n  Risks found: 3\n  Training recall: 67%\n  Alternatives missed: 5\n\n  ⚠️  Run 'sightglass analyze --since ...' for details\n```\n\n67% training recall means two-thirds of the packages were grabbed from memory with zero comparison shopping. Sightglass will show you what alternatives existed.\n\n## Commands Reference\n\n### CLI (`@sightglass/cli`)\n\n| Command | Description |\n|---|---|\n| `sightglass init` | Initialize Sightglass in a project directory |\n| `sightglass login` | Authenticate with sightglass.dev |\n| `sightglass setup` | Interactive first-time configuration |\n| `sightglass watch` | Start the watcher daemon |\n| `sightglass analyze` | Analyze agent sessions and dependency decisions |\n\n### Skill Scripts\n\n| Script | Description |\n|---|---|\n| `setup.sh` | Install CLI, configure, verify watcher |\n| `analyze.sh` | Standalone analysis with `--since`, `--session`, `--format`, `--push` flags |\n| `hooks/pre-spawn.sh` | Pre-session hook — records start, ensures watcher |\n| `hooks/post-session.sh` | Post-session hook — analyzes and summarizes |\n\n### analyze.sh Flags\n\n```\n--since <time>     Analysis window start (ISO timestamp or relative like \"1 hour ago\")\n--session <id>     Analyze a specific session by ID\n--format <fmt>     Output format: text (default), json, markdown\n--push             Push results to https://sightglass.dev\n```\n\n## What Sightglass Surfaces\n\nFor each agent session, you get:\n\n- **Dependency inventory** — every package added, removed, or upgraded\n- **Discovery method** — how the agent found each one (training recall vs. searched)\n- **Risk flags** — known vulnerabilities, unmaintained packages, better alternatives\n- **Alternatives report** — what the agent *could* have chosen but didn't consider\n- **Bias indicators** — patterns showing training data influence over reasoned choice\n\n## API\n\nAll data syncs to [sightglass.dev](https://sightglass.dev) when authenticated. Use `--push` with analyze or configure auto-push in setup.\n\n---\n\n*Your agent's dependencies are your dependencies. Know where they came from.*\n","topics":["Coding"],"tags":{"latest":"0.1.0"},"stats":{"comments":0,"downloads":1082,"installsAllTime":40,"installsCurrent":0,"stars":0,"versions":1},"createdAt":1771792400016,"updatedAt":1778992461309},"latestVersion":{"version":"0.1.0","createdAt":1771792400016,"changelog":"Initial release — agent supply chain intelligence","license":null},"metadata":null,"owner":{"handle":"davidgeorgehope","userId":"s17chhxqggdvjs75set5hjtr6h885zdj","displayName":"David Hope","image":"https://avatars.githubusercontent.com/u/30470909?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1779950246417}}