How hassamazam/oneshot works
Oneshot is an unattended GitLab issue-to-merge orchestrator: a Loop issue enters a deterministic conductor, which runs replayable work phases, verifies the change, opens an MR, and merges it. Its documented stages include recall, research, optional design approval, planning, implementation, test-case authoring, review, browser verification, screenshots, and merge. The repository also contains separate local-tests and Ready For Automation workflows. Edges reflect README statements and sampled imports/calls; some phase internals and optional integrations are documented but not fully sampled.
Main entry points: runner.ts Run conductor · gitlab.ts GitLab client · index.ts CLI entry · artifacts.ts Run artifacts
Components 20
Dispatch and orchestration
- CLI entry
src/index.ts - Issue watcher
src/conductor/watcher.ts - Run conductor
src/conductor/runner.ts
Ticket pipeline
- Phase execution
src/conductor/phase.ts - Work phases
src/conductor/codephases.ts - Phase prompts
src/phases/prompts.ts - Review gates
src/conductor/reviewgate.ts - Browser verification
src/conductor/localtests.ts
Run state and integrations
- Run artifacts
src/lib/artifacts.ts - SQLite ledger
src/lib/db.ts - GitLab client
src/lib/gitlab.ts - Artifact publisher
src/lib/publish.ts - Slack updates
src/lib/slack.ts - Ticket worktrees
src/lib/worktrees.ts
Additional workflows
- Local-tests mode
src/localtests/runner.ts - Automation mode
src/automation/runner.ts - Automation context
src/automation/context.ts - Coverage analysis
src/automation/coverage.ts
Other components
- Operator
- Loop issue
Connections 29
- Operator → CLI entry: starts run
- Loop issue → Issue watcher: queues work
- CLI entry → Issue watcher: starts watcher
src/index.ts - CLI entry → Run conductor: dispatches run
src/index.ts - CLI entry → Local-tests mode: dispatches mode
src/index.ts - CLI entry → Automation mode: dispatches mode
src/index.ts - Issue watcher → Run conductor: starts ticket
src/conductor/runner.ts - Run conductor → GitLab client: reads issue
src/conductor/runner.ts - Run conductor → Phase execution: runs phases
src/conductor/runner.ts - Run conductor → Run artifacts: reads journal
src/conductor/runner.ts - Run conductor → Artifact publisher: publishes pending
src/conductor/runner.ts - Run conductor → Ticket worktrees: manages worktree
src/conductor/runner.ts - Run conductor → Slack updates: sends updates
src/conductor/runner.ts - Phase execution → Run artifacts: reads and writes
src/conductor/phase.ts - Phase execution → SQLite ledger: records state
src/conductor/phase.ts - Work phases → Phase prompts: uses prompts
- Review gates → Run artifacts: reads journal
src/conductor/reviewgate.ts - Review gates → GitLab client: reads ticket notes
src/conductor/reviewgate.ts - Review gates → GitLab client: posts gate notes
src/conductor/reviewgate.ts - Browser verification → GitLab client: publishes results
src/conductor/localtests.ts - Browser verification → SQLite ledger: records state
src/conductor/localtests.ts - Browser verification → Run artifacts: uses artifacts
src/conductor/localtests.ts - Artifact publisher → Run artifacts: reads artifacts
src/lib/publish.ts - Artifact publisher → GitLab client: uploads files
src/lib/publish.ts - Local-tests mode → GitLab client: reads issues
src/localtests/runner.ts - Local-tests mode → Slack updates: alerts
src/localtests/runner.ts - Automation mode → Automation context: builds context
src/automation/runner.ts - Automation mode → Coverage analysis: analyzes coverage
src/automation/runner.ts - Automation context → GitLab client: reads issue data
src/automation/context.ts