Skip to content

Latest commit

 

History

History
139 lines (117 loc) · 3.39 KB

File metadata and controls

139 lines (117 loc) · 3.39 KB

Codencer Snippet Library

This document provides specialized configuration and command snippets for advanced Codencer usage. For the primary "Day 0" flow, see the Operator Runbook.


🏗 Workspace Provisioning (workspace.json)

Configure how isolated worktrees are prepared before an agent executes.

Node.js / TypeScript

Efficiently share node_modules avoiding costly file copies.

{
  "provisioning": {
    "copy": [".env", ".env.local"],
    "symlinks": ["node_modules"],
    "hooks": {
      "post_create": "npm install --prefer-offline"
    }
  }
}

Go / Modules

{
  "provisioning": {
    "copy": [".env"],
    "symlinks": ["vendor"],
    "hooks": {
      "post_create": "go mod download"
    }
  }
}

Python / Pipenv

{
  "provisioning": {
    "copy": [".env"],
    "symlinks": [".venv"],
    "hooks": {
      "post_create": "pipenv install --deploy --ignore-pipfile"
    }
  }
}

⚡️ Specialized Submission Flows

5.2 Rich Submission with Metadata

Targeting a specific adapter for a task saved in a markdown file.

./bin/orchestratorctl submit my-run \
  --prompt-file prompts/refactor-auth.md \
  --title "Auth Refactor" \
  --adapter codex \
  --timeout 300 \
  --validation "make test-auth" \
  --acceptance "Login still works" \
  --wait --json

5.3 Piped Task Definitions

Machine-to-machine handoff without temporary files.

echo '{"version":"v1","goal":"Fix typos","title":"Small Fix"}' | \
  ./bin/orchestratorctl submit my-run --task-json - --wait --json

5.4 Multiline Stdin (Heredoc)

cat <<'EOF' | ./bin/orchestratorctl submit my-run --stdin --title "Fix Lints" --adapter codex --wait --json
Fix all lint errors in the internal/app package. 
Exclude the test files. 
EOF

5.5 Claude Headless Execution

Use the Claude adapter when the claude CLI is installed locally and reachable through CLAUDE_BINARY or $PATH.

cat <<'EOF' | ./bin/orchestratorctl submit my-run --stdin --title "Claude Audit" --adapter claude --wait --json
Review the auth package, explain the failing behavior, and propose a minimal fix.
EOF

For Claude attempts, the standard evidence set includes:

  • prompt.txt
  • stdout.log
  • stderr.log
  • result.json

OpenClaw ACPX (Experimental / Alpha)

Relay tasks to an OpenClaw-compatible executor via the standardized ACP bridge. Use --wait --json for synchronous machine-safe handoffs.

./bin/orchestratorctl submit my-run \
  --goal "Fix UI layout issues in the landing page" \
  --adapter openclaw-acpx \
  --wait --json

Antigravity Broker (Cross-Side)

Requires a previous orchestratorctl antigravity bind <PID>.

./bin/orchestratorctl submit my-run \
  --goal "Check React component alignment" \
  --adapter antigravity-broker \
  --wait --json

🔍 Auditing & Evidence

Inspecting Provisioning Telemetry

See exactly how the workspace was prepared.

./bin/orchestratorctl step result <HANDLE> --json | jq '.provisioning'

Listing Collected Artifacts

./bin/orchestratorctl step artifacts <HANDLE>

Streaming Raw Logs

./bin/orchestratorctl step logs <HANDLE>

Inspecting Claude-Specific Evidence

./bin/orchestratorctl step artifacts <HANDLE>
./bin/orchestratorctl step result <HANDLE> --json | jq '.raw_output_ref, .artifacts["prompt.txt"], .artifacts["stderr.log"]'