Shortcut Integration
Connect ElasticClaw to Shortcut to auto-spawn agents when stories enter a workflow state.
Shortcut factories work identically to Linear factories — stories replace issues, workflow states replace statuses. The
[DONE] signal moves the story and terminates the claw when the PR merges.How it works
When a Shortcut story moves into a configured workflow state, the factory engine creates a claw pre-loaded with the story title, description, and URL in BOOTSTRAP.md. The agent reads it, implements the task, opens a PR, and sends [DONE] https://github.com/org/repo/pull/N. The hub moves the story and keeps the claw alive to watch for CI failures and review comments. When the PR merges, the claw terminates automatically.
1. Get a Shortcut API token
- Go to Shortcut → Settings → API Tokens
- Click Generate Token, name it elasticclaw
- Copy the token
2. Register the webhook
Shortcut supports programmatic webhook registration. Register the ElasticClaw webhook using your API token:
bash
curl -X POST https://api.app.shortcut.com/api/v3/webhooks \
-H "Shortcut-Token: YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-hub.example.com/api/integrations/shortcut/webhook",
"description": "ElasticClaw factory",
"story_update": true
}'You can also find the webhook URL in Settings → Factories in the hub web UI.
3. Configure hub.yaml
yaml
integrations:
shortcut:
- workspace: my-company # human label
token: YOUR_TOKEN
factories:
- name: shortcut-factory
integration: shortcut
workspace: my-company
trigger_status: "In Development" # story enters this state → spawn claw
done_status: "In Review" # story moves here on [DONE]
terminate_on_leave: true # kill claw if story leaves trigger state
template: base # template name (push to hub first)Restart the hub after editing hub.yaml:
sudo systemctl restart elasticclaw4. Add to your template
Tell your agent to signal done when finished:
markdown
When your task is complete, open a PR and send:
[DONE] https://github.com/org/repo/pull/N
This moves the Shortcut story and keeps you alive to watch for CI and review comments.
You'll be terminated automatically when the PR merges.Differences from Linear
- No HMAC signing — Shortcut doesn't provide webhook signatures
- Story IDs are stored as
sc-<id>internally - Workflow state names are resolved via the Shortcut API on each event
- No
teamfilter (Shortcut uses project-level scoping instead)