ragtime: Instructions file for GitHub Copilot

.github/instructions/userspace-spec.instructions.md

ragtime userspace-spec.instructions.md is an instructions file for GitHub Copilot from mattv8/ragtime. It costs 5,025 tokens per session, scanned C, original, MIT.

A set of repository instructions for implementing user-space features in the Ragtime codebase, including runtime, workspace, preview, and sharing behavior.

In plain words
What is it for?
Use it when working on user-space runtime, collaboration, sharing, workspace files, preview sessions, or related control-plane and worker code.
Why use it?
It gives an agent the project-specific boundaries and architecture needed to change these areas without inventing new user-interface or permission rules.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file. Also seen: mentions AGENTS.md.

This is mattv8/ragtime's own configuration. It tells GitHub Copilot how to work on ragtime itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ragtime configures →

Reuse

Borrowing it

Nothing to install: this file belongs to mattv8/ragtime. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/mattv8/ragtime/beta/.github/instructions/userspace-spec.instructions.md
Clone the repo
git clone --depth 1 https://github.com/mattv8/ragtime

Made for: GitHub Copilot.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ragtime userspace-spec.instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mattv8/ragtime/userspace-spec/github.svg)](https://agentmods.dev/instructions/mattv8/ragtime/userspace-spec)
Your own site
<a href="https://agentmods.dev/instructions/mattv8/ragtime/userspace-spec"><img src="https://agentmods.dev/badge/instructions/mattv8/ragtime/userspace-spec/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ragtime userspace-spec.instructions.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/mattv8/ragtime/userspace-spec"><img src="https://agentmods.dev/badge/instructions/mattv8/ragtime/userspace-spec.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5,025 This file is loaded in full into every session.
When invoked 5,025 The same file — it is already loaded in full.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.05025 $0.05025
Opus 5.5 $0.02010 $0.02010
Sonnet 5.5 $0.01005 $0.01005
Haiku 4.5 $0.00502 $0.00502

Measured 2mo ago against content hash ed45c73de026, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

ragtime userspace-spec.instructions.md scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

docker exec runtime-dev sh -c 'rm -rf /data/_userspace/workspaces/<test_id>/rootfs'

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Why the browser lane can never be write-enabled: `ExecuteComponentRequest.request` is client-supplied query/command text with no execution-time binding of `component_id` to a server-registered query. Write-enabling it
.github/instructions/userspace-spec.instructions.md · 204 lines

How it starts

The opening of the file, as written. The whole thing — 204 lines — stays where its author put it; the contents beside it link to each section on GitHub.

User Space Feature Implementation Instructions

Last updated: 2026-07-14 (codebase-scanned; concise agent-focused)

Scope

  • Apply to User Space runtime/collab/share work in ragtime/userspace/** and runtime/**.
  • Keep changes incremental; do not invent new UX or role semantics.
  • Endpoint details belong in /docs (do not maintain static route dumps here).

Big Picture (How User Space Actually Works)

  • Control plane is in Ragtime app code (ragtime/userspace/runtime_service.py, ragtime/userspace/runtime_routes.py).
  • Data plane runs in runtime manager/worker code (runtime/manager/**, runtime/worker/**).
  • runtime/main.py chooses service mode via RUNTIME_SERVICE_MODE; manager mode also mounts worker routes.
  • Workspace runtime files live under ${INDEX_DATA_PATH}/_userspace/workspaces/{workspace_id}/files.
  • Preview is runtime-only and now uses dedicated per-workspace preview origins dispatched by PreviewHostDispatchMiddleware in ragtime/userspace/preview_host.py.
  • Preview launch is an explicit API step: control-plane routes mint short-lived bootstrap grants and the preview host mints a preview session cookie on first load.
  • Browser-auth cookie surfaces are only for collab and runtime_pty; preview no longer uses capability cookies.

Workspace Code Index Queue

  • Hidden User Space code indexes run through WorkspaceCodeIndexService (ragtime/userspace/workspace_code_index_service.py), not the generic filesystem indexer.
  • Dirty paths, manual reindex, missing-baseline reconcile, and process_dirty_workspace() all converge on durable workspace_code_index_jobs rows. Do not reintroduce direct asyncio.create_task() indexing paths.
  • Queue state is DB-owned: pending rows carry waiting_for_job_id; the runner atomically claims rows with FOR UPDATE SKIP LOCKED, clears the wait pointer, then runs them as indexing.
  • userspace_code_index_max_concurrency controls active jobs (default 1, admin range 1..8), but one workspace must not have two active code-index jobs at once.
  • Pending jobs cancel immediately; running jobs set cancel_requested and trip the in-memory cancellation flag checked during processing. Keep cancelled distinct from failed.

Read the full file on GitHub · 204 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 204 lines · 5,025 tokens per session scan C ed45c73de026

Subscribe to this mod's changes

ragtime userspace-spec.instructions.md is an instructions file published in the GitHub repository mattv8/ragtime (33 stars, last pushed today), licensed MIT. It adds 5,025 tokens to every session, about $0.0201 per session on Opus 5.5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

ragtime userspace-spec.instructions.md compared with instructions from other repositories

ragtime userspace-spec.instructions.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ragtime userspace-spec.instructions.mdmattv8/ragtimeInstructions file33todayMITC5,025GitHub Copilot
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode