How heinsithukyaw/git-agent works
Git Agent is a stateless, repository-backed dependency watcher. Its scheduled workflow reads the configured stack, gathers registry and advisory data, triages changes, optionally adds model narration, then gates and commits a digest and public projection. A separate issue-comment workflow handles conversational commands; a conditional heartbeat records fetch failures. The published site is rendered from committed public artifacts. The tree and excerpts support these main stages, but do not expose every script’s call graph, so uncertain internal wiring is omitted.
Main entry points: fetch-step.mjs Fetch step · commit-step.mjs Commit step · store.mjs File store · route-step.mjs Command routing
Components 26
Scheduled digest
- Fetch step
scripts/fetch-step.mjs - Dependency sources
lib/sources.mjs - Narration step
scripts/narrate-step.mjs - Model client
lib/llm.mjs - Commit step
scripts/commit-step.mjs - Heartbeat step
scripts/heartbeat-step.mjs
Issue conversation
- Command routing
scripts/route-step.mjs - Command rules
lib/commands.mjs - Reply step
scripts/reply-step.mjs
Triage and safety
- Advisory triage
lib/triage.mjs - Containment gate
lib/gate.mjs - Public projection
lib/public-surface.mjs - Publication policy
lib/publishable.mjs
Repository and publication
- Watch configuration
data/stack.json - Digest renderer
lib/render.mjs - File store
lib/store.mjs - Run history
history/runs.jsonl - Static site renderer
scripts/render-site.mjs - Published Pages
site/index.html
Other components
- GitHub Actions
- Repository operator
- Site reader
- GitHub API
- Package registries
- OSV advisories
- Configured model endpoint
Connections 30
- GitHub Actions → Fetch step: starts run
- Fetch step → Watch configuration: reads config
- Fetch step → Dependency sources: gathers data
- Dependency sources → Package registries: queries releases
- Dependency sources → OSV advisories: queries advisories
- Fetch step → Advisory triage: triages data
- Fetch step → Narration step: passes artifact
- Narration step → Model client: requests prose
- Model client → Configured model endpoint: sends request
- Narration step → Containment gate: checks narration
- GitHub Actions → Commit step: starts commit job
- Commit step → Containment gate: validates output
- Commit step → Digest renderer: renders digest
- Commit step → Public projection: projects public data
- Public projection → Publication policy: applies policy
- Commit step → File store: writes artifacts
- File store → Run history: appends records
- GitHub Actions → Heartbeat step: runs on failure
- Heartbeat step → File store: writes status
- Repository operator → Watch configuration: configures watchlist
- GitHub Actions → Command routing: starts issue turn
- Command routing → Command rules: checks command
- Command routing → GitHub API: reads issue
- Reply step → GitHub API: posts reply
- Command routing → File store: records command
- GitHub Actions → Reply step: dispatches reply
- GitHub Actions → Static site renderer: renders site
- Static site renderer → File store: reads summary
- Static site renderer → Published Pages: writes site
- Site reader → Published Pages: views digest