Tecton

From ferdinandyb/dotfiles · View interactive version

Tecton is an AI agent skill from the GitHub repository ferdinandyb/dotfiles. Run Tecton plan and tests via Pants in the data-science repo. Handles long-running commands with proper output capture to avoid truncation.

How to use this skill

Skill file

Tecton Operations Skill

Critical: Output Handling for Long Commands

Tecton commands (especially tecton-plan) produce very long output that gets

truncated. **Capture to a file under $TMPDIR/opencode/ and inspect it with

the Read tool / rg:**

PANTS_CONCURRENT=True pants tecton-plan --workspace=<workspace> --skip-tests 2>&1 | tee "$TMPDIR/opencode/tecton-plan.txt"; echo "EXIT_CODE: ${PIPESTATUS[0]}"

Then inspect $TMPDIR/opencode/tecton-plan.txt:

Key points:

that's actually pre-created for you. On macOS $TMPDIR is a per-session

/var/folders/.../T/ path, not /tmp, so a hardcoded /tmp/opencode/...

path won't exist there. $TMPDIR is a known, static env var that bash-guard

expands and allow-lists — unlike $(mktemp), whose unpredictable output path

is blocked as an unresolved-variable write target.

report tee's exit code, not pants'.

ephemeral, and rm would trigger a permission prompt).

Environment

plan/test runs can proceed in parallel. The PANTS_CONCURRENT=True pants tecton-plan *

and PANTS_CONCURRENT=True pants test * forms are allow-listed in opencode.jsonc,

so they run without a permission prompt.

Workspaces for Testing

If staging passes, no need to check against bence-dev. Use bence-dev only when staging errors are unclear.

Operations

tecton-plan

Runs tecton plan against a workspace. Use --skip-tests to speed up iteration.

# Plan against staging (check this first)
PANTS_CONCURRENT=True pants tecton-plan --workspace=checkoutandsale-v1-staging --skip-tests 2>&1 | tee "$TMPDIR/opencode/tecton-plan-staging.txt"; echo "EXIT_CODE: ${PIPESTATUS[0]}"

# Plan against dev workspace (only if staging errors are unclear)
PANTS_CONCURRENT=True pants tecton-plan --workspace=bence-dev --skip-tests 2>&1 | tee "$TMPDIR/opencode/tecton-plan-dev.txt"; echo "EXIT_CODE: ${PIPESTATUS[0]}"

Inspect the capture files with the Read tool or rg.

tecton-test-run

Run Tecton tests using the pants test goal with --tecton-test-run flag.

# Run all tecton tests in a directory
PANTS_CONCURRENT=True pants test --tecton-test-run projects/features/repos/sig_tecton/tests/sig_tecton/datasources/orders/::

# Run a specific test file
PANTS_CONCURRENT=True pants test --tecton-test-run projects/features/repos/sig_tecton/tests/sig_tecton/datasources/orders/test_orders_datasources.py

# Run a specific test function
PANTS_CONCURRENT=True pants test --tecton-test-run projects/features/repos/sig_tecton/tests/path/to/test_file.py -- -k test_function_name

For long test runs, capture and inspect:

PANTS_CONCURRENT=True pants test --tecton-test-run projects/features/repos/sig_tecton/tests/:: 2>&1 | tee "$TMPDIR/opencode/tecton-test.txt"; echo "EXIT_CODE: ${PIPESTATUS[0]}"
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.