CLAUDE.md · cyrusagents/cyrus
CLAUDE.md from cyrusagents/cyrus: 603 lines covering Project Overview, How Cyrus Works, Linear Webhooks Reference, Working with SDKs and more.
Template by cyrusagents
Install
Works with Claude Code. Read the repository before you give any tool access to your data.
curl -fsSL https://raw.githubusercontent.com/cyrusagents/cyrus/main/CLAUDE.md -o CLAUDE.md
Read it and adapt it to your project before use.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documentation
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
What's in it
A CLAUDE.md file: project memory Claude Code loads at the start of every session.
- For
- Claude Code
- Length
- 603 lines
- File
CLAUDE.md
Sections
- Project Overview
- How Cyrus Works
- Linear Webhooks Reference
- Working with SDKs
- Shared Skills Across Harnesses
- Checklist For New Agent CLI Harnesses
- Navigating GitHub Repositories
- Architecture Overview
- Testing Best Practices
- Common Commands
- Linear State Management
- Important Development Notes
- Dependency Security Policy (MANDATE)
- Development Workflow
- Key Code Paths
- Testing MCP Linear Integration
- Publishing
- Gemini CLI for Testing
First lines (shown under the repo's Apache-2.0 license)
# CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## Project Overview Cyrus (Linear Claude Agent) is a monorepo JavaScript/TypeScript application that integrates Linear's issue tracking with Anthropic's Claude Code to automate software development tasks. The project is transitioning to an edge-proxy architecture that separates OAuth/webhook handling (proxy) from Claude processing (edge workers). **Key capabilities:** - Monitors Linear issues assigned to a specific user - Creates isolated Git worktrees for each issue - Runs Claude Code sessions to process issues - Posts responses back to Linear as comments - Maintains conversation continuity using the `--continue` flag - Supports edge worker mode for distributed processing ## How Cyrus Works When a Linear issue is assigned to Cyrus, the following sequence occurs: 1. **Issue Detection & Routing**: The EdgeWorker receives a webhook from Linear and routes the issue to the appropriate repository based on configured patterns or workspace catch-all rules. 2. **Workspace Isolation**: A dedicated Git worktree is created for each issue (e.g., `worktrees/DEF-1/`) with a sanitized branch name derived from the issue identifier. This ensures complete isolation between concurrent tasks. 3. **AI Classification**: The issue content is analyzed to determine its type (`code`, `question`, `research`, etc.) and the appropriate procedure is selected (e.g., `full-development` for coding tasks). 4. **Subroutine Execution**: For development tasks, Claude executes a sequence of subroutines: - **coding-activity**: Implements the requested feature/fix - **verifications**: Runs tests, type checks, and linting - **git-gh**: Commits changes and creates pull requests - **concise-summary**: Generates a final summary for Linear 5. **Mid-Implementation Prompting**: Users can add comments to the Linear issue while Claude is working. These comments are streamed into the active session, allowing real-time guidance (e.g., "Also add a modulo method while you're at it"). 6. **Activity Tracking**: Every thought and action is posted back to Linear as activities, providing full visibility into what Claude is doing. ### Example Interaction A typical session flow: ``` [GitService] Fetching latest changes from remote... [GitService] Creating git worktree at .../worktrees/DEF-1 from origin/main [EdgeWorker] Workspace created at: .../worktrees/DEF-1 [EdgeWorker] AI routing decision: Classification: code, Procedure: full-development [ClaudeRunner] Session ID assigned by Claude: c5c1fc00-... [AgentSessionManager] Created thought activity activity-6 [AgentSessionManager] Created action activity activity-7 ... (Claude implements the feature) [ClaudeRunner] Session completed with 84 messages [AgentSessionManager] Subroutine completed, advancing to next: verifications ``` ### Test Drives To see Cyrus in action, refer to the test drives in `apps/f1/test-drives/`. These documents showcase real interactions demonstrating: - How issues are processed end-to-end - Mid-implementation prompting in action - Subroutine transitions and activity logging - Final repository state after completion The F1 (Formula 1) testing framework provides a controlled environment to test Cyrus without affecting production Linear workspaces. Choose validation by the actual changed behavior, not the size of the task or filenames. Follow the canonical [F1 applicability policy](skills/f1-test-drive/SKILL.md#applicability-required-before-setup): F1-covered product/runtime changes and functional changes to the F1 harness require relevant F1 validation. Changes with no relevant workflow behavior use targeted checks and a brief PR validation note, without running F1 or creating, attaching, or committing an F1 report. For releases, assess the full payload since the previous release, not just the release PR. Preserve historical test-drive evidence. ## Linear Webhooks Reference Cyrus processes Linear webhooks to respond to events like issue assignments, user prompts, and issue updates. The Linear SDK and webhook schemas are documented at: - **EntityWebhookPayload**: https://studio.apollographql.com/public/Linear-Webhooks/variant/current/schema/reference/objects/EntityWebhookPayload - **DataWebhookPayload**: https://studio.apollographql.com/public/Linear-Webhooks/variant/current/schema/reference/unions/DataWebhookPayload - **IssueWebhookPayload**: https://studio.apollographql.com/public/Linear-Webhooks/variant/current/schema/reference/objects/IssueWebhookPayload Key webhook types handled: - `AgentSessionEvent` (created/prompted) - When issues are assigned to Cyrus or users send prompts - `AppUserNotification` (issueUnassignedFromYou) - When issues are unassigned - `Issue` (update with title/description changes) - When issue title or description is modified The `EntityWebhookPayload` contains an `updatedFrom` field that holds previous values of changed properties, enabling Cyrus to detect what changed and compare old vs new values. ## Working with SDKs When examining or working with a package SDK: 1. First, install the dependencies: ```bash pnpm install ``` 2. Locate the specific SDK in the `node_modules` directory to examine its structure, types, and implementation details. 3. Review the SDK's documentation, source code, and type definitions to understand its API and usage patterns. ## Shared Skills Across Harnesses For reusable operational workflows (for example F1 test driving), keep a canonical skill in: - `skills/<skill-name>/SKILL.md` Then symlink that skill into harness-specific skill directories: - `.claude/skills/<skill-name>` - `.codex/skills/<skill-name>` - `.opencode/skills/<skill-name>` Use: ```bash ./scripts/symlink-skills.sh ``` Design rule: 1. Keep subagent files thin wrappers. 2. Put 95%+ workflow logic into canonical shared skills. 3. Update shared skill first; avoid duplicating protocol text across harnesses. ## Checklist For New Agent CLI Harnesses When implementing a new runner/harness (for example Codex, Gemini, OpenCode, or other CLIs), use this checklist before shipping. ### 1) Session Lifecycle And Turn Limits - Verify turn-limit behavior (`maxTurns`, `maxSessionTurns`, or equivalent). - Confirm what error/result payload is emitted when limits are exceeded. - Ensure session stop behavior is explicit and deterministic. ### 2) Prompt Model And Instructions - Identify how base system prompt is applied. - Identify whether appended instructions are supported and whether they extend or replace defaults. - Confirm provider-specific instruction fields (for example `developer_instructions`) and expected precedence. ### 3) Streaming Event Schema - Capture real JSON event streams and document item types. - Determine whether events are full objects or deltas/partials that require aggregation. - Add replay tests from real transcripts. ### 4) Final Message Semantics - Verify where the final answer lives: - in a `result` payload (Claude-style), or - in the last assistant message (Gemini-style), or - mixed model/event behavior. - Ensure we always post a final `response` activity when work completes successfully. ### 5) Tools And Permissions - Validate `tools`, `allowedTools`, and `disallowedTools` semantics for the SDK. - Validate approval/sandbox behavior for tool execution. - Verify tool calls produce both start and completion signals. - For providers that rely on static/project config files (for example Cursor CLI), implement a permission translation layer from Cyrus/Claude tool names to provider-native permission tokens and write that config before session start. This must support subroutine-time updates when allowed/disallowed tools change. For Cursor MCP servers, pre-enable them before session start (`agent mcp list` + `agent mcp enable <server>` per server) so tools are available in headless runs. When using Cursor in Cyrus, only MCP servers configured in `.cursor/mcp.json` should be treated as project MCP config; use Cursor's MCP config-location and file-format docs as the source of truth: https://cursor.com/docs/context/mcp#configuration-locations. For broad file permissions, map wildcard `Read(**)` / `Write(**)` to workspace-scoped patterns (for example `Read(./**)` / `Write(./**)`) to avoid unintentionally permitting absolute system paths. Reference: https://cursor.com/docs/cli/reference/permissions ### 6) Prompt Streaming Input - Verify whether the SDK supports streaming/incremental prompt input. - Set `supportsStreamingInput` correctly and gate behavior in runner adapters. ### 7) MCP Servers And Custom Tools
Signals
- Stars
- 867
- Forks
- 180
- Open issues
- 50
- Last commit (this folder)
- Sep 24, 2026 (1 month ago)
- Last release
- Sep 30, 2026 (29 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/cyrusagents/cyrus
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from cyrusagents
- 0.817score
release-core-test
cyrusagents
Invoke when dev-testing a Cyrus change that spans CYPACK (edgeworker + CLI) and CYHOST (Vercel-hosted GUI) and the hosted GUI needs to point at an unreleased…
SkillAFreshness: A★ 867Claude Code +9 - 0.813score
debug
cyrusagents
Full debugging workflow — reproduce the bug with a focused check, perform root cause analysis, then implement a minimal fix.
SkillAFreshness: A★ 867Claude Code +9 - 0.813score
summarize
cyrusagents
Format a final summary message for Linear.
SkillAFreshness: A★ 867Claude Code +9 - 0.813score
f1-test-drive
cyrusagents
Assess F1 applicability, then validate changed product workflows or the F1 harness end-to-end.
SkillAFreshness: A★ 867Claude Code +9 - 0.813score
verify-and-ship
cyrusagents
Choose proportionate validation, fix failures, update the changelog, commit, push, and create/update the pull request or merge request.
SkillAFreshness: A★ 867Claude Code +9 - 0.813score
cyrus-setup-linear
cyrusagents
Create a Linear OAuth application and configure Cyrus to use it — supports agent-browser automation or guided manual setup.
SkillAFreshness: A★ 867Claude Code +9
Cite this page
CLAUDE.md · cyrusagents/cyrus. Agent Mart. https://agentmart.dev/templates/cyrusagents-cyrus-claude-md (last updated 2026-10-24)