Skip to content

Coding-agent subagents A3: promote a demo bundle over an SSH tunnel (VM) or a port-forward (K8s) #382

Open

Description

@pdettori

Part of the Coding-agent subagents epic (#378). Item A3. It's independent.

Goal

A user on a laptop can /promote a small, curated Claude Code workflow into the stack's Redis — the #370 VM's or the #426 K8s stack's — and get a digest that prompt leaves can name as configRef.

Current state (verified on main @ 24c6f5e)

  • promote writes straight to Redis (harness/src/promote-cli.ts:112, REDIS_URL or --redis-url). Bundles expire after 30 days (harness/src/config-store.ts:16).
  • The VM's Redis is 127.0.0.1:6379 (deploy/vm/env/supervisor.env.example:20), so it can't be reached from a laptop. The K8s Redis (StatefulSet redis, namespace moca) is likewise in-cluster only.
  • /promote (deploy/claude/commands/promote.md) assumes kubectl port-forward.
  • The reachability path is substrate-specific: an SSH tunnel to the VM, or a kubectl port-forward to svc/redis on the K8s stack. The front door is the same Redis either way.
  • Bundle ownership and upload through the control plane is MI1 S3 (§7.1), not built.

Scope

  1. Document both reachability paths — the SSH tunnel on the VM (ssh -L 16379:127.0.0.1:6379 …, then --redis-url redis://127.0.0.1:16379) and the port-forward on K8s (kubectl -n moca port-forward svc/redis 16379:6379, same --redis-url) — in deploy/vm/README.md, deploy/k8s/README.md and in /promote's guidance. Keep promote.md's permission rules intact: no $VAR expansions, and grants per command.
  2. Write a minimal demo .claude (promotion spec §11, "author in a sandbox"):
    • one research skill: fetch with curl -o, then grep or read the file (Pi shows only the tail of long output), and cite sources;
    • a CLAUDE.md that sets the output format and a length limit.
  3. Record the digest for the runbook (Coding-agent subagents A6: demo runbook #385).

Acceptance

  • /promote --redis-url … against the VM prints a digest, and so does it against the K8s stack's Redis over a port-forward.
  • A prompt leaf with that configRef uses the skill, as the answer and transcript show — verified once per substrate.

Out of scope

References

Working conventions (for a fresh session)

  • Workspace: git fetch, then create a worktree from rossoctl/main (never local main), under .worktrees/. Populate and build pi-fork (git submodule update --init --recursive && cd pi-fork && npm ci && npm run build), then pnpm install. A worktree without the pi-fork build does not typecheck.
  • Plans: write the plan with superpowers:writing-plans into docs/plans/<date>-<slug>.md. Plans are gitignored and never committed. Write it in chunks, one append per task.
  • Pre-flight table: list every process entrypoint, systemd unit, env example and shell/Go launcher whose boot contract changes, not only TypeScript call sites.
  • Tests: Redis on 6379 must be up. Use each package's own node_modules/.bin/vitest. vitest can exit non-zero with every test green, so grep the log for Errors. Redirect long output to /tmp/kagenti/.... make lint skips untracked files.
  • Commits: git commit -s with Assisted-By: Claude (Anthropic AI) <[email protected]>, never Co-Authored-By.
  • Shared KVM rig: alert the owner before using it, record a manifest of what you install, and verify cleanup.
  • Don't push or open PRs without the owner's go-ahead.

Activity

  1. added
    enhancement
    on Sep 30, 2026
  2. changed the title [-]Claude Code subagents A3: promote a demo bundle to the VM over an SSH tunnel[/-] [+]Claude Code subagents A3: promote a demo bundle over an SSH tunnel (VM) or a port-forward (K8s)[/+] on Oct 5, 2026
  3. changed the title [-]Claude Code subagents A3: promote a demo bundle over an SSH tunnel (VM) or a port-forward (K8s)[/-] [+]Coding-agent subagents A3: promote a demo bundle over an SSH tunnel (VM) or a port-forward (K8s)[/+] on Oct 13, 2026
  4. pdettori commented on Oct 13, 2026

    @pdettori
    MemberAuthor

    Status (2026-10-13). Largely superseded.

    #458 (ADR-0038) added mocactl promote, which uploads a bundle through the control plane (POST /v1/config-bundles). It needs no kubectl and no Redis access, and mocactl run --config <digest> binds the bundle to a session. So the SSH-tunnel and port-forward scope here is obsolete.

    What remains: the minimal demo .claude (the research skill and the CLAUDE.md), its digest for the runbook (#385), and a per-substrate check that a leaf using it follows the skill. Suggest retitling to drop "over an SSH tunnel".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions