π The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
TypeScript agentic-aiagentic-frameworkagentic-workflowagentsai-agentsai-assistantai-skillsautonomous-agentsclaudecodexdsh-pluginharnessmcp-servermulti-agentmulti-agent-systemsnpmskillsswarmswarm-intelligencetypescript
fix(ruflo-console): ruRE refuses a sample that is a link (ADR-495) (#4439)
rUv39f5942c02c0
diff --git a/plugins/ruflo-console/.claude-plugin/plugin.json b/plugins/ruflo-console/.claude-plugin/plugin.jsonindex a674c0d141..ef42327ebf 100644--- a/plugins/ruflo-console/.claude-plugin/plugin.json+++ b/plugins/ruflo-console/.claude-plugin/plugin.json@@ -1,7 +1,7 @@{"name": "ruflo-console","description": "ruflo's cockpit inside Claude Code and the one /ruflo command for every ruflo mod (function hooks, early access). Views: overview with health alerts, swarm topology graph, claims flow with TTL rings, federation map, plugin health matrix, learning curve and pipeline, MetaHarness radar and audit trend, memory, cost gauge, agent timeline, approvals queue, event stream, a main menu, an x.ruv.io federation board, an AI terminal (codex, claude or both in remembered sessions, streamed), Skills (npx skills), a Hive-Mind view, a MetaHarness lab, agent drill-down; a command palette for confirm-gated actions through the ruflo CLI; a band above the prompt. Reads ruflo's files and the CLI's local JSON; anything not measured reads n/a. The one network call it makes by itself is a daily read of the published plugin.json at github.com/ruvnet/ruflo to offer an update (Settings β Updates: ask, auto, or off); it installs only through Claude Code's own claude plugin update, and never a new major version without asking.",- "version": "0.45.1",+ "version": "0.45.2","author": {"name": "ruvnet","url": "https://github.com/ruvnet"diff --git a/plugins/ruflo-console/CHANGELOG.md b/plugins/ruflo-console/CHANGELOG.mdindex 95df67db21..c62042a62b 100644--- a/plugins/ruflo-console/CHANGELOG.md+++ b/plugins/ruflo-console/CHANGELOG.md@@ -2,6 +2,10 @@Newest first. One `## <version> β <date>` heading per version, then `feat:`, `fix:`, `breaking:` and `chore:` bullets (ADR-478). Built from git history; older versions: `git log -- plugins/ruflo-console`.+## 0.45.2 β 2026-10-23+- fix: ruRE refuses a sample that is a link, or sits behind one (ADR-495). The text rule only stopped `..` and absolute paths; a link inside the project that pointed outside it was opened by the tool. Every ruRE row now walks the sample on disk first and shows the reason without starting anything, for the page and for Claude's `/ruflo run dt-re-*` alike. Adds a general `preflight` to actions.+- chore: ruRE source comments cite ADR-494 (they said 492).+## 0.45.1 β 2026-10-23- fix: broader Windows parity for the console (#4036, thanks @socrates6969) β the narrow 0.44.2 and 0.44.7 fixes extended across the whole plugin. The path helpers are consolidated into `hooks/data/paths.ts` (`isWindowsPath`, `isAbsolutePath`, `trimTrailing`, `joinPath`, `samePath`, `hasParentSegment`, `below`, `normalizePath`, `homeOf`) and the earlier narrower `abs-path.ts` is removed (its two sites move to the consolidated module).- fix: workspace keys ignore drive-letter case and trailing-separator differences, so `c:\work\app\` and `C:\Work\app` are one workspace with one remembered page and one terminal history.diff --git a/plugins/ruflo-console/hooks/actions.ts b/plugins/ruflo-console/hooks/actions.tsindex e3396ea82a..6f8d9eeab0 100644--- a/plugins/ruflo-console/hooks/actions.ts+++ b/plugins/ruflo-console/hooks/actions.ts@@ -19,6 +19,8 @@ export type ActionSpec = {write?: WriteOpexpect: stringverify?: (snapshot: Snapshot) => boolean+ /** Before anything starts (a read at once, a confirmed action after the confirm): the reason it must not run, or null. A reason is shown as the result and nothing is spawned (ADR-495). */+ preflight?: (host: Pick<Host, 'fs'>) => Promise<string | null>/** A local check after a confirmed action succeeds; never part of background refreshes. */verifyLocal?: (host: Pick<Host, 'fs' | 'home'>) => Promise<boolean>/** Reads only: runs at once, without the confirm step, and shows what the CLI printed. */diff --git a/plugins/ruflo-console/hooks/data/devtools.ts b/plugins/ruflo-console/hooks/data/devtools.tsindex b377614883..2df26e01b8 100644--- a/plugins/ruflo-console/hooks/data/devtools.ts+++ b/plugins/ruflo-console/hooks/data/devtools.ts@@ -51,7 +51,7 @@ function urlOf(text: string): string | null {const RULES: Record<DevField, { test: (text: string) => string | null; rule: string }> = {ref: { test: text => (/^[A-Za-z0-9@][A-Za-z0-9._/~^@{}-]{0,99}$/.test(text.trim()) ? text.trim() : null), rule: 'a git ref: HEAD, HEAD~3, main..HEAD, a branch or a sha (letters, digits . _ / ~ ^ @ { } -, not starting with -)' },path: { test: pathOf, rule: 'a path under the project: relative, letters, digits . _ / -, no .. segment, at most 160' },- // ruRE (ADR-492): the file or folder to analyze. Same rule as `path`: only what is inside the project can be named here.+ // ruRE (ADR-494): the file or folder to analyze. Same rule as `path`: only what is inside the project can be named here.sample: { test: pathOf, rule: 'a file or folder under the project: relative, letters, digits . _ / -, no .. segment, at most 160 (the ruRE page analyzes only what is inside this project)' },label: { test: text => (/^[A-Za-z0-9][A-Za-z0-9._-]{0,39}$/.test(text.trim()) ? text.trim() : null), rule: 'a label: letters, digits . _ -, at most 40, not starting with . or -' },url: { test: urlOf, rule: 'an http(s) URL with no spaces or quotes, at most 300' },@@ -149,7 +149,7 @@ export function brainLines(value: unknown): string[] {export function devLines(id: string, stdout: string, stderr = ''): string[] {const answer = unwrap(stdout)- // ruRE (ADR-492): its own readers, applied first; a CLI without the tools is said plainly.+ // ruRE (ADR-494): its own readers, applied first; a CLI without the tools is said plainly.if (id.startsWith('dt-re-')) {const lines = rureLines(id, answer?.value ?? null, stdout, stderr)diff --git a/plugins/ruflo-console/hooks/data/rure-guard.ts b/plugins/ruflo-console/hooks/data/rure-guard.tsnew file mode 100644index 0000000000..d2e7f84f73--- /dev/null+++ b/plugins/ruflo-console/hooks/data/rure-guard.ts@@ -0,0 +1,27 @@+/**+ * The disk half of the ruRE sample rule (ADR-495). `sample` (data/devtools.ts) is checked as text: relative, no `..`. A link inside the+ * project that points outside it passes that check, and the rure_* tools open the top-level file they are given, so a link there reads+ * what the person never named. This walks the sample from the project folder down and refuses when any part of it is a link. A part that+ * is not there is fine (the tool answers "not found" itself), and a host that cannot stat answers like a missing part, as `checkNoLinks`+ * does for writes: the check narrows what runs, it does not widen it. Leaf: no engine call, the host's `stat` is passed in.+ */+import type { ReaderFs } from './files'++const isLinkKind = (kind: string | undefined): boolean => kind === 'symlink' || kind === 'link'++/** `null` when the sample may be handed to a tool, or the reason it may not (one plain line). */+export async function sampleLinkCheck(fs: Pick<ReaderFs, 'stat'>, sample: string): Promise<string | null> {+ const parts = sample.split('/').filter(part => part !== '' && part !== '.')+ let at = ''++ for (const part of parts) {+ at = at === '' ? part : `${at}/${part}`++ const stat = await fs.stat(at).catch(() => undefined)++ if (stat === undefined) return null+ if (stat.isLink === true || isLinkKind(stat.kind)) return `${at} is a link: it could lead outside the project, so ruRE does not follow it. Copy the file into the project and name the copy.`+ }++ return null+}diff --git a/plugins/ruflo-console/hooks/data/rure.ts b/plugins/ruflo-console/hooks/data/rure.tsindex 3f182c38f6..e56ef50a6a 100644--- a/plugins/ruflo-console/hooks/data/rure.ts+++ b/plugins/ruflo-console/hooks/data/rure.ts@@ -1,5 +1,5 @@/**- * ruRE in Dev Tools (ADR-492): the readers for what the six `rure_*` tools answer through `ruflo mcp exec`. The tools+ * ruRE in Dev Tools (ADR-494): the readers for what the six `rure_*` tools answer through `ruflo mcp exec`. The tools* parse a file and never run it, but what they return is the file's own text (section names, imports, strings, type* names), so every such value passes plain() before it is a line: an escape sequence in a hostile binary never reaches* the terminal. Counts and offsets are shown only when they are measurements (#3822). Pure: strings in, lines out.diff --git a/plugins/ruflo-console/hooks/devtools.ts b/plugins/ruflo-console/hooks/devtools.tsindex 62322542e7..32a6467c91 100644--- a/plugins/ruflo-console/hooks/devtools.ts+++ b/plugins/ruflo-console/hooks/devtools.ts@@ -10,6 +10,7 @@ import type { ActionSpec } from './actions'import { devLines, fieldRule, fieldValue, need, tool, type DevField, type DevFields } from './data/devtools'import type { Host } from './host'import type { PaletteEntry } from './palette'+import { sampleLinkCheck } from './data/rure-guard'import { RURE, RURE_GROUPS } from './rure'import { SANDBOX, SANDBOX_GROUPS } from './sandbox'import type { State } from './state'@@ -195,6 +196,7 @@ export function devSpec(entry: DevEntry, fields: DevFields): ActionSpec | null {...(DECLARED[entry.cost] !== undefined && { declared: DECLARED[entry.cost] }),...(entry.note !== undefined && { note: entry.note }),...(entry.timeoutMs !== undefined && { timeoutMs: entry.timeoutMs }),+ ...(entry.group.startsWith('rure-') && fields.sample !== '' && { preflight: (host: Pick<Host, 'fs'>) => sampleLinkCheck(host.fs, fields.sample) }),}}@@ -254,7 +256,7 @@ export const withTmux = (entry: DevEntry, tmux: State['devtools']['tmux']): DevE/** Which entry Enter in each field runs; a field with none only keeps its text. */const SUBMITS: Partial<Record<DevField, string>> = { task: 'dt-brain', ref: 'dt-diff', path: 'dt-cow-status', session: 'dt-sb-capture', send: 'dt-sb-send', url: 'dt-br-open', target: 'dt-br-click', query: 'dt-plug-search', cmd: 'dt-term-exec' }-/** Enter in a field on a page of its own: the entry that page runs for it, where that differs from the shared `SUBMITS` (the ruRE page, ADR-492). */+/** Enter in a field on a page of its own: the entry that page runs for it, where that differs from the shared `SUBMITS` (the ruRE page, ADR-494). */const PAGE_SUBMITS: Partial<Record<DevGroup, Partial<Record<DevField, string>>>> = {'rure-app': { sample: 'dt-re-js', query: 'dt-re-find' },'rure-native': { sample: 'dt-re-bin' },diff --git a/plugins/ruflo-console/hooks/runner.ts b/plugins/ruflo-console/hooks/runner.tsindex 88234be944..85174bc3f6 100644--- a/plugins/ruflo-console/hooks/runner.ts+++ b/plugins/ruflo-console/hooks/runner.ts@@ -117,6 +117,15 @@ export function createRunner(state: State, host: Host, deps: RunnerDeps): Runnerhost.invalidate()try {+ const blocked = await spec.preflight?.(host)++ if (blocked !== undefined && blocked !== null) {+ if (spec.lab !== undefined) panel.result = { id: spec.lab, label: spec.label, ok: false, exitCode: null, lines: [blocked], atMs: Date.now() }+ say(spec.label, false, blocked)++ return+ }+// A CLI action picks its launcher once per session; a cold npx download gets a long limit and says it is a first run.const launcher = spec.argv === undefined ? await resolveLauncher(host, state) : nullconst argv = spec.argv ?? [...(launcher?.prefix ?? []), ...spec.args]diff --git a/plugins/ruflo-console/hooks/rure.ts b/plugins/ruflo-console/hooks/rure.tsindex 838e473476..7a7e4dcdf4 100644--- a/plugins/ruflo-console/hooks/rure.ts+++ b/plugins/ruflo-console/hooks/rure.ts@@ -1,5 +1,5 @@/**- * The ruRE page's catalog (ADR-492): static reverse engineering of a file in the project, through the six `rure_*` tools of+ * The ruRE page's catalog (ADR-494): static reverse engineering of a file in the project, through the six `rure_*` tools of* ruflo-rure (ADR-0001..0005 of that plugin). Every tool parses and never executes the target, so five are local $0 reads that* run at once; unpacking an .asar writes files to a temp folder, so it asks first. The file is named only by the `sample` field,* which holds a path inside the project: nothing outside it can be reached from here (the tools themselves accept any readablediff --git a/plugins/ruflo-console/hooks/version.ts b/plugins/ruflo-console/hooks/version.tsindex 83c2c4d34b..5f4ae67bd8 100644--- a/plugins/ruflo-console/hooks/version.ts+++ b/plugins/ruflo-console/hooks/version.ts@@ -2,4 +2,4 @@* The console's version, shown on the header so a person can tell which build is running. Kept equal to the plugin's manifest* (`.claude-plugin/plugin.json`); tests/version.spec.ts fails if the two drift.*/-export const CONSOLE_VERSION = '0.45.1'+export const CONSOLE_VERSION = '0.45.2'diff --git a/plugins/ruflo-console/hooks/views/devtools.ts b/plugins/ruflo-console/hooks/views/devtools.tsindex 7bf114129b..d8452c24c0 100644--- a/plugins/ruflo-console/hooks/views/devtools.ts+++ b/plugins/ruflo-console/hooks/views/devtools.ts@@ -46,7 +46,7 @@ const FIELDS: Partial<Record<DevGroup, readonly { field: DevField; label: string{ field: 'send', label: 'type', placeholder: 'one command line to type into that session: Enter shows it, then asks before it runs', submit: 'send' },],daa: [{ field: 'note', label: 'note', placeholder: 'feedback or knowledge to send (also a managed-agent prompt)' }],- // The ruRE page (ADR-492) draws these two sections; the sample is a path inside the project.+ // The ruRE page (ADR-494) draws these two sections; the sample is a path inside the project.'rure-app': [{ field: 'sample', label: 'sample', placeholder: 'a .asar file or a folder of JS source, inside this project', submit: 'map' },{ field: 'query', label: 'feature', placeholder: 'for FIND FEATURE: the feature in words, e.g. license check', submit: 'find' },diff --git a/plugins/ruflo-console/hooks/views/rure.ts b/plugins/ruflo-console/hooks/views/rure.tsindex e18f819cbd..3260d1a5f6 100644--- a/plugins/ruflo-console/hooks/views/rure.ts+++ b/plugins/ruflo-console/hooks/views/rure.ts@@ -8,7 +8,7 @@ const right = (group: DevGroup): string => DEV_GROUPS.find(entry => entry.id ===const title = (group: DevGroup): string => DEV_GROUPS.find(entry => entry.id === group)?.title ?? group/**- * ruRE (ADR-492): static reverse engineering of a file in the project, in two sections (JavaScript and Electron apps; native+ * ruRE (ADR-494): static reverse engineering of a file in the project, in two sections (JavaScript and Electron apps; native* binaries, .NET and EVM) and the result of the last run below. The rows are the Dev Tools rows, the fields and the result panel* the same; only the page is its own. Drawing it runs nothing. Everything in a result is the file's own text: it is shown cleaned* (no escape sequence reaches the terminal) and the page says to treat it as untrusted.diff --git a/plugins/ruflo-console/scripts/smoke.sh b/plugins/ruflo-console/scripts/smoke.shindex 2ac5e36dba..fc2cd10a96 100755--- a/plugins/ruflo-console/scripts/smoke.sh+++ b/plugins/ruflo-console/scripts/smoke.sh@@ -11,9 +11,9 @@ step() { printf "β %s ... " "$1"; }ok() { printf "PASS\n"; PASS=$((PASS+1)); }bad() { printf "FAIL: %s\n" "$1"; FAIL=$((FAIL+1)); }-step "1. plugin.json declares ruflo-console 0.45.1"+step "1. plugin.json declares ruflo-console 0.45.2"grep -q '"name": "ruflo-console"' "$ROOT/.claude-plugin/plugin.json" \- && grep -q '"version": "0.45.1"' "$ROOT/.claude-plugin/plugin.json" && ok || bad "name/version"+ && grep -q '"version": "0.45.2"' "$ROOT/.claude-plugin/plugin.json" && ok || bad "name/version"step "2. hooks.json names exactly one module and no classic hook commands"grep -q '"modules": \["./register.ts"\]' "$HOOKS/hooks.json" && ! grep -q '"command"' "$HOOKS/hooks.json" \diff --git a/plugins/ruflo-console/tests/rure-e2e.spec.ts b/plugins/ruflo-console/tests/rure-e2e.spec.tsindex 32384cd8a0..6ab96dc60a 100644--- a/plugins/ruflo-console/tests/rure-e2e.spec.ts+++ b/plugins/ruflo-console/tests/rure-e2e.spec.ts@@ -1,5 +1,5 @@/**- * ruRE end to end (ADR-492): every row of the page, as the console would run it, against the REAL built ruflo CLI and real files.+ * ruRE end to end (ADR-494): every row of the page, as the console would run it, against the REAL built ruflo CLI and real files.* A temp project gets an ELF, a PE, a Mach-O, a .NET assembly, two EVM contracts, a JS/Electron app, an .asar built from it and an* ELF whose section name carries terminal escapes; each row's exact argv (`ruflo mcp exec -t rure_* -p {...}`) runs in that project,* and what the CLI printed goes through the console's own reader. Nothing is mocked and nothing in the target is run.diff --git a/plugins/ruflo-console/tests/rure-page.spec.ts b/plugins/ruflo-console/tests/rure-page.spec.tsindex db472e3630..84f1a81757 100644--- a/plugins/ruflo-console/tests/rure-page.spec.ts+++ b/plugins/ruflo-console/tests/rure-page.spec.ts@@ -1,5 +1,5 @@/**- * The ruRE page (ADR-492) under vitest: the catalog against the real tool schemas, what the `sample` field refuses, the readers+ * The ruRE page (ADR-494) under vitest: the catalog against the real tool schemas, what the `sample` field refuses, the readers* against what the real CLI printed (tests/fixtures/rure/*.txt are captured `ruflo mcp exec` runs, not hand-written JSON), a hostile* answer, the page itself, its palette ids and Enter routing, and its guide. Run with* npx vitest run plugins/ruflo-console/tests/rure-page.spec.tsdiff --git a/plugins/ruflo-console/tests/rure-symlink.spec.ts b/plugins/ruflo-console/tests/rure-symlink.spec.tsnew file mode 100644index 0000000000..88b9a91482--- /dev/null+++ b/plugins/ruflo-console/tests/rure-symlink.spec.ts@@ -0,0 +1,84 @@+/**+ * The ruRE sample and links (ADR-495): the text rule lets a path through that names a link inside the project, and the tools open the+ * top-level file they are given. The sample is walked on disk before a row runs; a link anywhere on it is refused and nothing is spawned.+ * npx vitest run --dir plugins/ruflo-console/tests rure-symlink+ */+import { describe, expect, it, vi } from 'vitest'++import { devSpec, DEV } from '../hooks/devtools'+import { emptyFields } from '../hooks/data/devtools'+import { sampleLinkCheck } from '../hooks/data/rure-guard'+import type { Host } from '../hooks/host'+import { createRunner } from '../hooks/runner'+import { newState } from '../hooks/state'++type Entry = { isLink?: boolean; kind?: string } | undefined++const fsOf = (entries: Record<string, Entry>, seen: string[] = []) => ({+ stat: async (path: string) => {+ seen.push(path)++ return entries[path]+ },+})++describe('sampleLinkCheck', () => {+ it('lets a regular file through, and a path that is not there (the tool says so itself)', async () => {+ expect(await sampleLinkCheck(fsOf({ app: { kind: 'dir' }, 'app/tool': { kind: 'file' } }), 'app/tool')).toBeNull()+ expect(await sampleLinkCheck(fsOf({}), 'app/missing')).toBeNull()+ })++ it('refuses a sample that is a link', async () => {+ expect(await sampleLinkCheck(fsOf({ app: { kind: 'dir' }, 'app/tool': { isLink: true } }), 'app/tool')).toMatch(/app\/tool is a link/)+ })++ it('refuses a sample whose folder on the way is a link', async () => {+ const seen: string[] = []++ expect(await sampleLinkCheck(fsOf({ app: { isLink: true }, 'app/tool': { kind: 'file' } }, seen), 'app/tool')).toMatch(/^app is a link/)+ expect(seen).toEqual(['app'])+ })++ it('reads a link kind as a link too, and ignores `.` and empty parts', async () => {+ expect(await sampleLinkCheck(fsOf({ a: { kind: 'symlink' } }), './a//')).toMatch(/^a is a link/)+ expect(await sampleLinkCheck(fsOf({ a: { kind: 'link' } }), 'a')).toMatch(/^a is a link/)+ })++ it('a host that refuses stat answers like a missing part: the check narrows, it never widens', async () => {+ expect(await sampleLinkCheck({ stat: async () => Promise.reject(new Error('refused')) }, 'a/b')).toBeNull()+ })+})++describe('the ruRE rows carry the check', () => {+ const entry = (id: string) => DEV.find(item => item.id === id)!+ const fields = (sample: string) => ({ ...emptyFields(), sample, query: 'license' })++ it('every ruRE row has a preflight once a sample is set, and no other row does', () => {+ for (const item of DEV.filter(row => row.group.startsWith('rure-'))) expect(devSpec(item, fields('bin/tool'))?.preflight, item.id).toBeTypeOf('function')+ for (const item of DEV.filter(row => !row.group.startsWith('rure-'))) expect(devSpec(item, { ...emptyFields(), path: 'memory.rvf', ref: 'HEAD', label: 'l', url: 'https://example.com', target: '@e1', query: 'q', task: 't', cmd: 'c', id: 'i', note: 'n', session: 's', send: 'c' })?.preflight, item.id).toBeUndefined()+ })++ it('the preflight answers from the host fs', async () => {+ const spec = devSpec(entry('dt-re-bin'), fields('bin/tool'))!++ expect(await spec.preflight!({ fs: fsOf({ bin: { kind: 'dir' }, 'bin/tool': { isLink: true } }) } as unknown as Host)).toMatch(/bin\/tool is a link/)+ expect(await spec.preflight!({ fs: fsOf({ bin: { kind: 'dir' }, 'bin/tool': { kind: 'file' } }) } as unknown as Host)).toBeNull()+ })+})++describe('the runner on a link', () => {+ it('spawns nothing and shows the reason as the result', async () => {+ const run = vi.fn()+ const host = { invalidate: () => undefined, after: () => ({ cancel: () => undefined }), run, fs: fsOf({ bin: { kind: 'dir' }, 'bin/tool': { isLink: true } }) } as unknown as Host+ const state = newState({})+ const runner = createRunner(state, host, { freshRead: async () => undefined, setView: () => undefined, drill: () => undefined, command: () => undefined })++ runner.ask(devSpec(DEV.find(item => item.id === 'dt-re-bin')!, { ...emptyFields(), sample: 'bin/tool' })!, 'why')+ for (let turn = 0; turn < 10; turn++) await new Promise<void>(resolve => setTimeout(resolve, 0))++ expect(run).not.toHaveBeenCalled()+ expect(state.lab.result?.ok).toBe(false)+ expect(state.lab.result?.lines.join(' ')).toMatch(/bin\/tool is a link/)+ expect(state.isActing).toBe(false)+ })+})diff --git a/v3/docs/adr/ADR-495-rure-sample-link-check.md b/v3/docs/adr/ADR-495-rure-sample-link-check.mdnew file mode 100644index 0000000000..562ad4ddb4--- /dev/null+++ b/v3/docs/adr/ADR-495-rure-sample-link-check.md@@ -0,0 +1,45 @@+# ADR 495: ruRE refuses a sample that is a link++Status: Accepted (built and tested; ships in ruflo-console 0.45.2)++Date: 2026-10-23++Builds on: ADR-494 (the ruRE page). Closes the first limit in its section 4 and the "resolving symlinks before a sample is accepted" item of its section 7.++## 1. Context++ADR-494 keeps the ruRE page to files inside the project with a text rule on the `sample` field: relative, a plain character set, no `..`+segment. The `rure_*` tools open the top-level file they are given and follow a link there, so a link inside the project that points+outside it (`app/tool -> /etc/shadow`, or a folder `app -> /home/other`) passes the text rule and is read. ADR-494 stated this as a known+limit. Nothing about the page or Claude's `console_run` changed what is reachable; the gap is that "inside the project" was a claim about+the text of a path, not about where it lands.++## 2. Decision++Walk the sample on disk before any ruRE row runs, and refuse when any part of it is a link.++- **Where.** A general `preflight` on `ActionSpec` (hooks/actions.ts): an async check the runner awaits before it launches anything, for a+ read that runs at once and for a confirmed action alike. A reason becomes the result panel and the one-line outcome; nothing is spawned.+ `devSpec` sets it on every row of the ruRE groups once a sample is present.+- **What it checks.** `sampleLinkCheck` (hooks/data/rure-guard.ts) takes the sample's parts from the project folder down and calls the+ host's `stat` on each prefix. A part that is a link (`isLink`, or a `symlink`/`link` kind) refuses with that part named and the way out:+ copy the file into the project and name the copy.+- **A part that is not there is fine.** The tool answers "not found" itself, and the page's text for that is already readable.+- **A host that cannot stat answers like a missing part.** This is the convention `checkNoLinks` uses for writes. The check narrows what+ runs; it does not widen it, and it is not the only layer (the text rule and the confirm gate stay).+- **Same path for Claude.** `/ruflo run dt-re-*` and `console_run` build the same spec, so they get the same refusal.++## 3. Limits, stated plainly++- It depends on the engine's `stat` reporting a link as a link (`isLink`). That is what `checkNoLinks` already relies on for the write+ paths; if a host's `stat` follows links silently, this check cannot see them and the text rule is all there is.+- It is check-then-open. A link swapped in between the check and the tool's open is not caught. This needs a second writer inside the+ project inside that window.+- It covers the top-level file and the folders on the way. The tools skip links inside a directory walk themselves (ADR-494 section 4).+- It does not make a path outside the project reachable; that is a separate, wider decision.++## 4. Verification++`tests/rure-symlink.spec.ts`: a regular file and a missing path pass; a link as the sample, a link as a folder on the way (the walk+stops at it), `symlink` and `link` kinds, and `.`/empty parts; a host whose `stat` rejects; every ruRE row carries the preflight and no+other row does; and the runner on a link spawns nothing and shows the reason (the test fails with the runner change removed).