Repository navigation
docs(factory): add "Simplest setup" — one-command issue→PR on-ramp #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| --- | ||
| title: 'Simplest setup' | ||
| description: 'One command on one machine turns a Linear issue into a pull request — the minimal on-ramp before the full Factory.' | ||
| --- | ||
|
|
||
| Before the full [Factory](/docs/factory/quickstart) — triage, multiple agents, a reviewer, and a merge gate — there's a one-command version you can run on a single machine (a Mac mini, your laptop, a sandbox). A new issue comes in, one agent implements it and opens a PR. You review and merge. | ||
|
|
||
| This is the fastest way to feel the loop. Graduate to the full Factory when you want review agents, a babysitter that keeps PRs green, and a merge gate. | ||
|
|
||
| ## What you need | ||
|
|
||
| - **relayfile ≥ 0.10.57** — `npm i -g relayfile` (check with `relayfile --version`). | ||
| - Linear and GitHub connected to your relay workspace: | ||
|
|
||
| ```bash | ||
| relayfile integration connect linear | ||
| relayfile integration connect github | ||
| ``` | ||
|
|
||
| The first `connect` runs an initial background sync of your existing issues — leave it running until `relayfile status` shows the provider `healthy`. You don't need the full backfill to finish before the next step; a *new* issue shows up within ~30s of being filed. | ||
| - On the machine that runs it: **`claude` and `gh` installed and signed in**, and you launch the command **from inside the repo** you want worked on (so the agent has the right working directory and push access). | ||
|
|
||
| <Note> | ||
| This local path uses your machine's `claude` and `gh`. The full [Factory](/docs/factory/quickstart) instead opens PRs through your workspace's GitHub connection — no local `gh` required — and adds triage, a reviewer, and a merge gate. That's the reason to graduate once this feels useful, not the reason to skip it now. | ||
| </Note> | ||
|
|
||
| ## The one command | ||
|
|
||
| Run this from inside your repo. When a new Linear issue is filed, one agent implements it and opens a PR: | ||
|
|
||
| ```bash | ||
| relayfile listen --path "/linear/issues/by-uuid/**" --event file.created \ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When delivery is retried or the listener reconnects, this direct Useful? React with 👍 / 👎. |
||
| --run "claude --print --dangerously-skip-permissions \ | ||
| 'Read the new Linear issue with: relayfile read {{path}} — then implement it, \ | ||
| create a branch, commit, push, and open a PR with: gh pr create --fill'" | ||
|
Comment on lines
+32
to
+35
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift Make both listener workflows idempotent. Relayfile delivers events at least once and replays missed events after reconnect. A repeated
📍 Affects 1 file
🤖 Prompt for AI Agents
Comment on lines
+33
to
+35
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🛡️ Analyzed with Security Review | 🟠 Major | 🏗️ Heavy lift 🧩 Analysis chain🏁 Script executed: sed -n '1,90p' web/content/docs/factory/simplest-setup.mdxRepository: AgentWorkforce/agentrelay.com Length of output: 3925 🏁 Script executed: printf '%s\n' '--- safety scope ---'
sed -n '1,220p' web/content/docs/factory/safety-scope.mdx
printf '%s\n' '--- events ---'
sed -n '1,220p' web/content/docs/file/events.mdxRepository: AgentWorkforce/agentrelay.com Length of output: 7675 🌐 Web query:
💡 Result: The dangerously-skip-permissions mode (also known as bypassPermissions) is a configuration option in Claude Code that disables interactive permission prompts and safety checks for tool calls [1]. When enabled, tool calls execute immediately without requiring user confirmation, which removes the standard "human-in-the-loop" safeguard intended to mitigate risks like prompt injection or unintended model actions [1]. Key security implications include: 1. Absence of Protection: This mode offers no protection against prompt injection or malicious instructions that might trick an LLM into performing unauthorized actions on the host system [1]. 2. Built-in Circuit Breakers: Even in this mode, specific critical operations—such as attempts to delete sensitive system paths like the filesystem root (/) or home directory (~)—will still trigger a prompt as a final circuit breaker against model error [1]. 3. Sandbox Behavior: The permission check is automatically bypassed when the environment is running inside a recognized sandbox [1]. 4. Cloud Security: When using Claude Code in a cloud environment (e.g., Claude Code on the web), the system ignores settings that request bypassPermissions to prevent repositories from forcing a session into an insecure state [1]. 5. Administrative Control: Administrators have the ability to explicitly disable the use of bypassPermissions mode across an organization via managed settings [1]. For workflows that require fewer interruptions but maintain security, the documentation recommends using auto mode instead, which provides background safety checks while minimizing the frequency of user prompts [1]. Citations: LLM Security Reachability: External Do not use bypass mode for provider-controlled issue text.
🤖 Prompt for AI Agents |
||
| ``` | ||
|
|
||
| `Ctrl+C` to stop. Add `--background` to detach it (logs to `~/.relayfile/listen.log`). | ||
|
|
||
| ### Why `by-uuid` and not `--provider linear`? | ||
|
|
||
| A single new issue materializes several files in the tree (`by-uuid`, `by-id`, `by-title`, `by-state/…`, plus indexes). Scoping the listener to the canonical `by-uuid` record fires the agent **once per issue** instead of once per file. Matching on `--provider linear` alone would run the agent — and open a PR — several times for one issue. | ||
|
|
||
| ## Only act on a specific status | ||
|
|
||
| Prefer a human gate — act only when an issue reaches, say, a "Ready for Agent" column — instead of on every new issue. Scope to that status view: | ||
|
|
||
| ```bash | ||
| relayfile listen --path "/linear/issues/by-state/ready-for-agent/**" --event file.created \ | ||
| --run "claude --print --dangerously-skip-permissions '…same prompt as above…'" | ||
| ``` | ||
|
|
||
| This fires once when an issue is created in **or** moved into that status. Use your own status's slug (lowercase, hyphenated); list what's available with `relayfile tree /linear/issues/by-state`. | ||
|
|
||
| ## Watch first, no agent | ||
|
|
||
| To confirm events land before wiring in `--run`: | ||
|
|
||
| ```bash | ||
| relayfile listen --provider linear | ||
| ``` | ||
|
|
||
| You'll see `Listening on /linear/** — Ctrl+C to stop`, then events print as they arrive. See [Events](/docs/file/events) for the full event model. | ||
|
|
||
| ## Next | ||
|
|
||
| <CardGroup cols={2}> | ||
| <Card title="Full Factory quickstart" href="/docs/factory/quickstart"> | ||
| Config, triage, multiple agents, a reviewer, and a merge gate. | ||
| </Card> | ||
| <Card title="Safety scope" href="/docs/factory/safety-scope"> | ||
| Control exactly what an agent is allowed to touch. | ||
| </Card> | ||
| </CardGroup> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On a workspace whose initial backfill is still running, following this instruction causes the subsequent
file.createdlistener to receive newly materialized/linear/issues/by-uuid/*records for historical issues. The event contract inweb/content/docs/file/events.mdxstates that sync changes surface as events, so the unconditional--runcan launch agents and open PRs for every old ticket still being backfilled; require backfill completion or explicitly filter initial-sync events before proceeding.Useful? React with 👍 / 👎.