-
Notifications
You must be signed in to change notification settings - Fork 0
Ticket Intake
Sparks can poll external project management systems and webhook endpoints for new work items, automatically dispatching them as autonomous tasks to appropriate ghosts. Completed tasks write results back to the source ticket.
Source (Linear / Webhook / ...)
→ Poll or receive webhook event
→ Validate + prompt-scan intake
→ Create AutonomousTask
→ Dispatch to ghost
→ Outcome (success / rollback)
→ Write-back result to ticket
[ticket_intake]
enabled = true
sources = ["linear"] # active sources[ticket_intake.linear]
enabled = true
poll_interval_secs = 60
project_ids = ["PROJECT_ID_1", "PROJECT_ID_2"]
status_filter = ["Todo", "In Progress"]
assignee_filter = ["bot-user"] # optional: only pick up tickets assigned to this userAuth: Set LINEAR_API_KEY in environment or .env.
export LINEAR_API_KEY=lin_api_...Write-back: When a task completes, Sparks updates the ticket status (e.g., In Progress → Done) and posts a comment with the outcome summary.
[ticket_intake.webhook]
enabled = true
bind = "127.0.0.1:8788"
secret = "" # HMAC secret for signature verification (use env var)Set the webhook secret via environment or keyring:
export SPARKS_WEBHOOK_SECRET=...
# or
sparks secrets set webhook.secretThe webhook endpoint accepts POST requests in a standard envelope format:
{
"title": "Fix the login bug",
"description": "Users can't log in with OAuth providers.",
"repo": "Enreign/myapp",
"risk_tier": "medium",
"labels": ["bug", "auth"]
}When a ticket is received, Sparks constructs an AutonomousTask with:
| Field | Source |
|---|---|
goal |
Ticket title + description |
repo |
From ticket metadata or config default |
risk_tier |
From ticket labels or config default |
ghost |
Classified automatically based on task content |
The task then enters the standard dispatch queue and executes via the assigned ghost.
All incoming tickets are scanned by the prompt scanner before dispatch. This prevents malicious content in external tickets from being executed as task goals.
Configure scanner behavior for intake specifically:
[prompt_scanner]
enabled = true
mode = "block" # "block" is recommended for external intake
threshold = 0.6See Sandboxing-and-Safety for scanner configuration options.
make user-flowRuns the full Linear ticket intake + writeback harness locally. Useful for end-to-end testing without a running Sparks instance.
-
src/ticket_intake/— intake provider implementations -
src/core.rs— task dispatch from intake events -
src/kpi.rs— outcome recording for intake tasks -
src/prompt_scanner.rs— intake-level scanning