Skip to content

sno-ai/sno-station-skills / skills/R-recursive-self-improvement/rem-reflect/skill

rem-reflect

Verified

Self Learning from this machine's Claude Code, Codex, Hermes, OpenClaw and Cursor sessions. Decide skill changes and lessons with accept/reject/tbd; recall lessons at session start.

FileKindSize
SKILL.mdskill md14.1 KB
references/labeler.mdmarkdown1.2 KB
references/labeler.schema.jsonconfig1.7 KB
references/local-settings.jsonconfig126 B
references/local-writer.schema.jsonconfig2.3 KB
references/proposal.schema.jsonconfig3.2 KB
references/render.jsonconfig245 B
references/signals.jsonconfig71 B
references/text.jsonconfig4.0 KB
scripts/adopt.test.tsscript13.0 KB
scripts/adopt.tsscript14.3 KB
scripts/agent-sessions.tsscript9.1 KB
scripts/allowance-fallback.test.tsscript16.0 KB
scripts/allowance-request-isolation.test.tsscript7.1 KB
scripts/backend.tsscript9.1 KB
scripts/calls.tsscript8.6 KB
scripts/catalogue-cloud.test.tsscript1.5 KB
scripts/catalogue.tsscript3.2 KB
scripts/chunk.tsscript2.1 KB
scripts/cloud-apply.test.tsscript25.2 KB
scripts/cloud-batch.test.tsscript11.2 KB
scripts/cloud-day.test.tsscript6.8 KB
scripts/cloud-verdict.test.tsscript12.1 KB
scripts/cloud-wait.test.tsscript1.3 KB
scripts/cloud.tsscript24.4 KB
scripts/config.tsscript8.1 KB
scripts/cursor.test.tsscript16.1 KB
scripts/cursor.tsscript6.7 KB
scripts/evidence.tsscript1.5 KB
scripts/first-message.test.tsscript10.3 KB
scripts/harvest.test.tsscript16.5 KB
scripts/harvest.tsscript22.6 KB
scripts/hermes-openclaw.test.tsscript25.6 KB
scripts/identity.test.tsscript3.3 KB
scripts/identity.tsscript3.5 KB
scripts/installed-roots.test.tsscript11.0 KB
scripts/journey-adopt-lesson.test.tsscript4.1 KB
scripts/journey-ops.test.tsscript8.0 KB
scripts/labeler.test.tsscript3.6 KB
scripts/labeler.tsscript9.5 KB
scripts/ledger.tsscript2.1 KB
scripts/lessons.tsscript4.7 KB
scripts/local-filter.test.tsscript3.9 KB
scripts/local-first-output.test.tsscript23.5 KB
scripts/local-settings.tsscript1.4 KB
scripts/local-writer.tsscript12.7 KB
scripts/login-in-place.test.tsscript5.8 KB
scripts/model-json.tsscript4.1 KB
scripts/no-network.test.tsscript5.0 KB
scripts/observe.tsscript1.4 KB
scripts/page-journey.test.tsscript6.7 KB
scripts/pages.test.tsscript4.1 KB
scripts/pages.tsscript4.8 KB
scripts/proposer-loop.test.tsscript1.5 KB
scripts/proposer-validate.test.tsscript9.1 KB
scripts/proposer.tsscript8.7 KB
scripts/recall-hook.test.tsscript20.9 KB
scripts/recall.test.tsscript31.4 KB
scripts/recall.tsscript18.2 KB
scripts/reflect.test.tsscript9.3 KB
scripts/reflect.tsscript14.3 KB
scripts/rem-reflectexecutablescript823 B
scripts/rem-reflect.tsscript17.8 KB
scripts/render-chunk.test.tsscript7.2 KB
scripts/render.tsscript9.7 KB
scripts/report.tsscript8.2 KB
scripts/run-status.test.tsscript19.1 KB
scripts/sampling.test.tsscript2.1 KB
scripts/sampling.tsscript915 B
scripts/selftest-guard.test.tsscript4.2 KB
scripts/selftest/bin/claudeexecutablescript94 B
scripts/selftest/bin/codexexecutablescript93 B
scripts/selftest/bin/shim-core.cjsscript4.6 KB
scripts/selftest/bin/snoexecutablescript5.7 KB
scripts/selftest/fixtures/hermes-session-export.jsonlother1.5 KB
scripts/selftest/fixtures/openclaw-events.jsonlother3.7 KB
scripts/selftest/fixtures/verdict-traces.jsonconfig16.6 KB
scripts/selftest/journey-e2e.shexecutablescript1.4 KB
scripts/selftest/journey.mjsscript9.5 KB
scripts/selftest/observe-journey.mjsscript12.5 KB
scripts/selftest/run-selftest.shexecutablescript7.0 KB
scripts/selftest/spawn-python.mjsexecutablescript765 B
scripts/session.test.tsscript5.2 KB
scripts/session.tsscript251 B
scripts/signal-local.test.tsscript7.0 KB
scripts/skill-impact.test.tsscript6.2 KB
scripts/station-settings.test.tsscript13.6 KB
scripts/store-memory.test.tsscript3.4 KB
scripts/store.tsscript7.7 KB
scripts/test-helpers.tsscript15.3 KB
scripts/text.tsscript760 B
scripts/trigger.test.tsscript3.6 KB
scripts/trigger.tsscript2.5 KB
scripts/verdicts.test.tsscript8.1 KB
scripts/verdicts.tsscript8.0 KB

scripts/selftest-guard.test.ts

View on GitHub
import { test } from 'node:test';
import assert from 'node:assert/strict';
import { spawnSync } from 'node:child_process';
import { chmodSync, existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, utimesSync, writeFileSync } from 'node:fs';
import { testTempRoot } from './test-helpers.ts';
import { join } from 'node:path';

test('self-test run refuses a missing store before reading sessions or invoking sno', t => {
  if (process.platform !== 'linux' || spawnSync('strace', ['--version']).error) {
    t.skip('Linux only: the file, socket and exec trace needs strace');
    return;
  }
  const dir = mkdtempSync(join(testTempRoot, 'rem-selftest-guard-'));
  t.after(() => rmSync(dir, { recursive: true, force: true }));
  const home = join(dir, 'home');
  const bin = join(dir, 'bin');
  const profile = join(dir, 'profile');
  for (const path of [home, bin, profile]) mkdirSync(path, { recursive: true });
  const claudeRoot = join(home, '.claude', 'projects');
  const codexRoot = join(home, '.codex', 'sessions');
  const claudeFile = join(claudeRoot, 'fake', 'session.jsonl');
  const codexFile = join(codexRoot, '2026', '09', '29', 'session.jsonl');
  for (const file of [claudeFile, codexFile]) {
    mkdirSync(join(file, '..'), { recursive: true });
    writeFileSync(file, '{}\n');
    const old = new Date('2026-09-29T00:00:00Z');
    utimesSync(file, old, old);
  }
  writeFileSync(join(profile, 'settings.json'), JSON.stringify({ mode: 'local-first', modelCalls: {
    R2: { 'local-first': 'off' }, R3: { 'local-first': 'off' }, R4: { 'local-first': 'off' },
  } }));
  const marker = join(dir, 'sno-called');
  for (const name of ['sno', 'claude', 'codex']) {
    const path = join(bin, name);
    writeFileSync(path, '#!/bin/sh\nprintf "%s\\n" "$0 $*" >> "$REM_TEST_MARKER"\nexit 2\n');
    chmodSync(path, 0o755);
  }
  const probeTrace = join(dir, 'probe.trace.log');
  const probe = spawnSync('strace', ['-e', 'trace=openat', '-o', probeTrace, process.execPath,
    '-e', 'require("node:fs").readFileSync(process.argv[1])', claudeFile], { encoding: 'utf8' });
  assert.equal(probe.status, 0, probe.stderr);
  assert.ok(readFileSync(probeTrace, 'utf8').includes(claudeFile),
    'the trace instrument detects a real session file read');
  const store = join(dir, 'missing-store');
  const entry = join(import.meta.dirname, 'rem-reflect.ts');
  mkdirSync(join(home, '.sno', 'experience'), { recursive: true });
  for (const [name, configuredStore] of [['missing', store], ['unset', undefined]] as const) {
    const trace = join(dir, `${name}.trace.log`);
    const env: NodeJS.ProcessEnv = { HOME: home, CODEX_HOME: join(home, '.codex'),
      CLAUDE_CONFIG_DIR: join(home, '.claude'), XDG_CONFIG_HOME: join(home, '.config'),
      SNO_PROFILE_DIR: profile, REM_SELFTEST: '1', REM_REFLECT_STORE: configuredStore,
      REM_TEST_MARKER: marker, PATH: `${bin}:/usr/bin:/bin`, TMPDIR: dir, NODE_OPTIONS: '' };
    if (configuredStore === undefined) delete env.REM_REFLECT_STORE;
    const result = spawnSync('strace', ['-f', '-e', 'trace=openat,connect,execve', '-o', trace,
      process.execPath, '--experimental-strip-types', entry, 'run', '--now', '2026-09-30T08:00:00Z'], {
      encoding: 'utf8', env,
    });
    assert.equal(result.error, undefined);
    const calls = readFileSync(trace, 'utf8').split('\n');
    const opened = calls.filter(line => line.includes('openat('));
    assert.equal(opened.some(line => line.includes(claudeRoot) || line.includes(codexRoot)), false,
      `${name}: the process must not open either session root`);
    assert.equal(calls.some(line => line.includes('connect(') && /sa_family=AF_INET6?/.test(line)), false,
      `${name}: the process must not open a network connection`);
    assert.equal(calls.some(line => /execve\("[^"]*\/(?:sno|claude|codex)"/.test(line)), false,
      `${name}: the process must not invoke an external client`);
    assert.equal(existsSync(marker), false, `${name}: the process must not invoke sno or another external client`);
    assert.notEqual(result.status, 0, `${name}: a missing self-test store must fail`);
    assert.equal(result.stderr.trim().split('\n').length, 1, result.stderr);
    assert.match(result.stderr, /missing.*store|store.*missing/i);
  }
});
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall