Table of Contents generated with DocToc
Capability: capability:platform
Harness: Cursor (Composer + Agent CLI)
Cursor provides interactive and headless agent capabilities via Cursor Composer in the IDE and the cursor-agent CLI. This guide documents how Cursor operates as a first-class Apache Magpie skill runtime for #316.
Cursor integrates with Magpie without requiring custom skill copies, translation passes, or proprietary prompt wrappers. The integration follows RFC-AI-0004 Principle 3 (Vendor Neutrality) and Adding a new agent harness.
| Magpie requirement | Cursor implementation |
|---|---|
| Skill discovery | Cursor reads the canonical .agents/skills/magpie-*/SKILL.md symlinks directly. The existing universal row in skills/setup/agents.md covers this path. |
| Repository instructions | Cursor ingests repository instructions from AGENTS.md and project rules from .cursor/rules/ or .cursorrules. |
| Human-in-the-loop (HITL) | Cursor Composer enforces per-action approval modals for file edits and terminal commands. Auto-Run permissions map directly to Magpie's proposal-then-confirm discipline. |
| Tool bridges | Skills invoke the standard tools/* CLI adapters. Network access for authenticated operations respects the project isolation policy. |
| Model and MCP bridges | Cursor's MCP support connects to framework MCP servers (PonyMail, Gmail, ASF project metadata). |
| Spec-loop | The cursor profile forwards --workspace, --print, --force, and --trust flags for automated non-interactive runs. |
| Credential isolation | agent-iso launches Cursor or cursor-agent through the shared clean-environment wrapper, stripping unapproved ambient tokens. |
After running /magpie-setup to adopt the repository, the canonical .agents/skills/ links are active in your working tree. Cursor scans .agents/skills/ and discovers all available Magpie workflows.
Ctrl+I / Cmd+I or Ctrl+Shift+J / Cmd+Shift+J).Use the
magpie-security-issue-triageskill to triage the latest reports.
SKILL.md workflow, checks prerequisites, and presents a proposed plan before executing state mutations.cursor-agent)For non-interactive triage sweeps, automated spec-loops, or terminal sessions:
# Interactive terminal session with filtered environment agent-iso cursor-agent # Run a specific Magpie workflow headlessly cursor-agent --print --workspace /path/to/repo "Run the magpie-list-skills skill and print the summary."
Magpie enforces strict Human-in-the-Loop principles: no state mutation (closing issues, writing files, dispatching emails, pushing branches) occurs without explicit human approval.
In Cursor:
git status, uv run pytest, gh issue list).gh issue close, git push, gh pr create) must always require human confirmation.Cursor runs tool commands through standard subshells in your project environment. Deterministic tool scripts under tools/ (e.g. tools/cve-tool-vulnogram/, tools/github/, tools/privacy-llm/) execute with standard Python / Groovy runtimes.
When running in environments where agent-guard is enabled:
--no-verify) or push to protected branches is rejected deterministically.The cursor profile in tools/spec-loop/lib.sh invokes the CLI headlessly:
cursor agent --print --force --trust --workspace "$root" "<prompt>" # or via the standalone CLI cursor-agent --print --force --trust --workspace "$root" "<prompt>"
Cursor does not provide a per-invocation reasoning-effort flag, so the runner omits reasoning-level parameters. See the spec-loop guide for full options.
To isolate sensitive tokens and run Cursor under the standard Magpie credential policy:
source <framework>/tools/agent-isolation/agent-iso.sh agent-iso cursor .
The agent-iso launcher scrubs undeclared environment variables while preserving local developer toolchains (git, uv, gh).
Verify that the Cursor runtime wiring conforms to the framework standards:
# 1. Verify skill discovery topology $env:PYTHONUTF8=1; uv run --project tools/symlink-lint symlink-lint # 2. Validate skill and tool metadata $env:PYTHONUTF8=1; uv run --project tools/skill-and-tool-validator skill-and-tool-validate # 3. Check vendor neutrality score $env:PYTHONUTF8=1; uv run --project tools/vendor-neutrality-score vendor-neutrality-score # 4. Run pre-commit formatting and link verification uv run prek run doctoc --all-files
docs/adapters/add-a-harness.md — recipe for adding runtime harnesses.skills/setup/agents.md — agent-target registry (universal canonical path).docs/rfcs/RFC-AI-0004.md — normative principles for vendor neutrality and HITL.docs/vendor-neutrality.md — framework vendor neutrality index.