Skip to content

ahstn/oceans-llm / .agents/skills/verify-oceans-admin

verify-oceans-admin

Verified

Verify the Oceans LLM admin control plane and backend gateway against the real local stack, seeded demo data, and bounded live providers when required. Use for user-path checks of sign-in, models, API keys, observability, usage costs, spend controls, batches, agent sessions, request logs, Anthropic Messages thinking and effort compatibility, MCP registry and tool access, OpenRouter routing, guardrails, and Skills storage.

FileKindSize
SKILL.mdskill md29.0 KB
examples/mcp-candidates.jsonconfig3.0 KB
features/README.mdmarkdown10.0 KB
features/account-onboarding.mdmarkdown4.3 KB
features/agent-harnesses.mdmarkdown4.3 KB
features/agent-plugins.mdmarkdown1005 B
features/agent-sessions.mdmarkdown3.9 KB
features/anthropic-messages.mdmarkdown20.7 KB
features/api-keys.mdmarkdown6.5 KB
features/attribution.mdmarkdown13.9 KB
features/audit-log.mdmarkdown4.9 KB
features/backend-gateway.mdmarkdown5.2 KB
features/batch-requests.mdmarkdown4.2 KB
features/design-system.mdmarkdown4.6 KB
features/guardrails.mdmarkdown7.0 KB
features/harness-integration.mdmarkdown7.8 KB
features/identity.mdmarkdown4.2 KB
features/image-generation.mdmarkdown7.3 KB
features/leaderboard.mdmarkdown3.3 KB
features/live-llm-requests.mdmarkdown12.6 KB
features/mcp-client-oauth.mdmarkdown9.9 KB
features/mcp-ownership.mdmarkdown7.4 KB
features/mcp.mdmarkdown19.6 KB
features/models.mdmarkdown8.2 KB
features/password-sign-in.mdmarkdown8.3 KB
features/profile.mdmarkdown2.5 KB
features/rate-limits.mdmarkdown6.0 KB
features/request-logs.mdmarkdown8.6 KB
features/review-agent.mdmarkdown3.7 KB
features/routing.jsonconfig33.6 KB
features/service-tiers.mdmarkdown6.3 KB
features/skills.mdmarkdown9.8 KB
features/spend-controls.mdmarkdown7.3 KB
features/usage-costs.mdmarkdown3.7 KB
features/workspace-connections.mdmarkdown6.1 KB
scripts/check-messages.mjsexecutablescript2.4 KB
scripts/check-messages.test.mjsscript3.0 KB
scripts/control-oceans-adminexecutablescript25.3 KB
scripts/control-oceans-admin.test.mjsscript7.6 KB
scripts/drive-backend-gateway.mjsexecutablescript12.5 KB
scripts/drive-harness-integration.mjsscript6.6 KB
scripts/drive-mcp.mjsscript13.0 KB
scripts/drive-models.mjsscript12.9 KB
scripts/drive-observability.mjsscript16.8 KB
scripts/drive-profile.mjsscript8.2 KB
scripts/drive-service-tiers.mjsexecutablescript20.1 KB
scripts/drive-skills.mjsscript27.2 KB
scripts/mcp-browser.mjsscript26.5 KB
scripts/mcp-canary.mjsscript18.8 KB
scripts/mcp-candidates.mjsscript3.5 KB
scripts/mcp-verification.test.mjsscript10.2 KB
scripts/messages-regressions.mjsscript15.8 KB
scripts/plan-verification.mjsscript5.2 KB
scripts/plan-verification.test.mjsscript6.1 KB
scripts/proof-cli.mjsscript11.1 KB
scripts/proof.mjsscript9.2 KB
scripts/proof.test.mjsscript10.4 KB

scripts/plan-verification.mjs

View on GitHub
#!/usr/bin/env node
// Maps a git diff to the verification proofs in features/routing.json.
// Usage: plan-verification.mjs [base-ref] [--json]
import { execFileSync } from 'node:child_process'
import { readFileSync } from 'node:fs'
import { dirname, join } from 'node:path'
import { fileURLToPath } from 'node:url'

const skillDir = join(dirname(fileURLToPath(import.meta.url)), '..')
const control = '.agents/skills/verify-oceans-admin/scripts/control-oceans-admin'

export function globToRegExp(glob) {
  let source = ''
  for (let i = 0; i < glob.length; i += 1) {
    const char = glob[i]
    if (char === '*' && glob[i + 1] === '*') {
      const slash = glob[i + 2] === '/'
      source += slash ? '(?:.*/)?' : '.*'
      i += slash ? 2 : 1
    } else if (char === '*') {
      source += '[^/]*'
    } else if (char === '?') {
      source += '[^/]'
    } else if (char === '{') {
      const end = glob.indexOf('}', i)
      source += `(?:${glob.slice(i + 1, end).split(',').map(escapeRegExp).join('|')})`
      i = end
    } else {
      source += escapeRegExp(char)
    }
  }
  return new RegExp(`^${source}$`)
}

function escapeRegExp(text) {
  return text.replace(/[.+^${}()|[\]\\]/g, '\\$&')
}

function matcher(globs) {
  const patterns = globs.map(globToRegExp)
  return (path) => patterns.some((pattern) => pattern.test(path))
}

export function planFor(paths, routing) {
  const skips = routing.skip.map((rule) => ({ ...rule, test: matcher(rule.paths) }))
  const features = routing.features.map((feature) => ({ ...feature, test: matcher(feature.paths) }))
  const shared = routing.shared.map((rule) => ({ ...rule, test: matcher(rule.paths) }))
  const selected = new Map()
  const skipped = []
  const unmapped = []

  const select = (id, path) => {
    if (!selected.has(id)) selected.set(id, new Set())
    selected.get(id).add(path)
  }

  for (const path of [...new Set(paths)].sort()) {
    const skip = skips.find((rule) => rule.test(path))
    if (skip) {
      skipped.push({ path, reason: skip.reason })
      continue
    }
    let matched = false
    for (const feature of features) {
      if (feature.test(path)) {
        select(feature.id, path)
        matched = true
      }
    }
    for (const rule of shared) {
      if (rule.test(path)) {
        rule.features.forEach((id) => select(id, path))
        matched = true
      }
    }
    if (!matched) unmapped.push(path)
  }

  const proofs = routing.features
    .filter((feature) => selected.has(feature.id))
    .map((feature) => ({
      id: feature.id,
      file: feature.file,
      proof: feature.proof,
      paid: Boolean(feature.paid),
      because: [...selected.get(feature.id)],
    }))
  return { proofs, skipped, unmapped, noRuntimeSurface: proofs.length === 0 && unmapped.length === 0 }
}

function git(args) {
  return execFileSync('git', args, { encoding: 'utf8' }).trim()
}

// --no-renames lists a moved file at both its old and new path, so both features are planned.
export function changedPaths(base) {
  const mergeBase = git(['merge-base', base, 'HEAD'])
  const tracked = git(['diff', '--name-only', '--no-renames', mergeBase])
  const untracked = git(['ls-files', '--others', '--exclude-standard'])
  return { mergeBase, paths: `${tracked}\n${untracked}`.split('\n').filter(Boolean) }
}

export function defaultBase(routing) {
  for (const ref of routing.baseRefs) {
    try {
      git(['rev-parse', '--verify', '--quiet', ref])
      return ref
    } catch {
      // Try the next candidate.
    }
  }
  throw new Error(`None of ${routing.baseRefs.join(', ')} exist; pass a base ref.`)
}

function proofCommand(proof) {
  if (proof.drive) return `${control} drive ${proof.drive}`
  return `manual recipe (use Playwright or a browser against the launched stack)`
}

function printPlan(base, mergeBase, plan) {
  console.log(`Verification plan for ${base} (merge-base ${mergeBase.slice(0, 12)}) plus working tree`)
  for (const proof of plan.proofs) {
    const paid = proof.paid ? ' [paid: follow the Live LLM requests policy]' : ''
    console.log(`\nRUN ${proof.id}${paid}`)
    console.log(`  recipe: .agents/skills/verify-oceans-admin/features/${proof.file}`)
    console.log(`  proof:  ${proofCommand(proof.proof)}`)
    console.log(`  because: ${proof.because.join(', ')}`)
  }
  if (plan.unmapped.length > 0) {
    console.log('\nUNMAPPED (decide the runtime surface, then add the path to features/routing.json):')
    plan.unmapped.forEach((path) => console.log(`  ${path}`))
  }
  if (plan.skipped.length > 0) {
    console.log('\nSKIPPED:')
    plan.skipped.forEach(({ path, reason }) => console.log(`  ${path} (${reason})`))
  }
  if (plan.noRuntimeSurface) {
    console.log('\nSKIP: no runtime surface. Report this line instead of a live proof.')
  }
}

function main(argv) {
  const json = argv.includes('--json')
  const routing = JSON.parse(readFileSync(join(skillDir, 'features/routing.json'), 'utf8'))
  const base = argv.find((arg) => !arg.startsWith('--')) ?? defaultBase(routing)
  const { mergeBase, paths } = changedPaths(base)
  const plan = planFor(paths, routing)
  if (json) {
    console.log(JSON.stringify({ base, mergeBase, ...plan }, null, 2))
  } else {
    printPlan(base, mergeBase, plan)
  }
}

if (process.argv[1] === fileURLToPath(import.meta.url)) {
  main(process.argv.slice(2))
}
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: 471kUpdated 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