`graphify install --platform agents` installs the skill to the generic Agent-Skills locations: the spec's user-global ~/.agents/skills (global) and ./.agents/skills (--project) — the directories `npx skills` and spec-compliant frameworks read. `--platform skills` is an alias. Previously that user-global location was only reachable as an accidental side effect of the gemini-on-Windows branch. Bare `graphify install` is unchanged (still single-platform claude/windows). The platform is registered in tools/skillgen/platforms.toml (split, mirroring amp's agents-md body) and rendered through the skillgen drift/coverage guards. Since it is a post-v8 platform with no own v8 body, its --audit-coverage baseline is amp's v8 body (the body it re-homes). The rendered skill body is byte-identical to amp's; only the on-demand hooks reference differs (its own `graphify agents install` wording). The `graphify agents install` / `graphify skills install` subcommand is the amp-twin: it also wires an AGENTS.md always-on section, keeping it honest with the hooks reference it points at. The `--platform agents` path stays skill-only, exactly as amp's `--platform amp` does. Also: `skill-agents.md` added to package-data, and the wheel-packaging guard now covers every platform's skill body (not just references/always-on), so a missing skill body fails CI instead of only breaking install for real users. Closes #1405. Implements #1432. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2.4 KiB
graphify reference: add a URL and watch a folder
Load this when the user ran /graphify add <url> or passed --watch. Neither is part of the default build.
For /graphify add
Fetch a URL and add it to the corpus, then update the graph.
$(cat graphify-out/.graphify_python) -c "
import sys
from graphify.ingest import ingest
from pathlib import Path
try:
out = ingest('URL', Path('./raw'), author='AUTHOR', contributor='CONTRIBUTOR')
print(f'Saved to {out}')
except ValueError as e:
print(f'error: {e}', file=sys.stderr)
sys.exit(1)
except RuntimeError as e:
print(f'error: {e}', file=sys.stderr)
sys.exit(1)
"
Replace URL with the actual URL, AUTHOR with the user's name if provided, CONTRIBUTOR likewise. If the command exits with an error, tell the user what went wrong - do not silently continue. After a successful save, automatically run the --update pipeline on ./raw to merge the new file into the existing graph.
Supported URL types (auto-detected):
- YouTube / any video URL → audio downloaded via yt-dlp, transcribed to
.txton next run (requirespip install 'graphifyy[video]') - Twitter/X → fetched via oEmbed, saved as
.mdwith tweet text and author - arXiv → abstract + metadata saved as
.md - PDF → downloaded as
.pdf - Images (.png/.jpg/.webp) → downloaded, Claude vision extracts on next run
- Any webpage → converted to markdown via html2text
For --watch
Start a background watcher that monitors a folder and auto-updates the graph when files change.
$(cat graphify-out/.graphify_python) -m graphify.watch INPUT_PATH --debounce 3
Replace INPUT_PATH with the folder to watch. Behavior depends on what changed:
- Code files only (.py, .ts, .go, etc.): re-runs AST extraction + rebuild + cluster immediately, no LLM needed.
graph.jsonandGRAPH_REPORT.mdare updated automatically. - Docs, papers, or images: writes a
graphify-out/needs_updateflag and prints a notification to run/graphify --update(LLM semantic re-extraction required).
Debounce (default 3s): waits until file activity stops before triggering, so a wave of parallel agent writes doesn't trigger a rebuild per file.
Press Ctrl+C to stop.
For agentic workflows: run --watch in a background terminal. Code changes from agent waves are picked up automatically between waves. If agents are also writing docs or notes, you'll need a manual /graphify --update after those waves.