.agents/skills/oat-worktree-bootstrap-auto/SKILL.md
Use when an orchestrator/subagent needs autonomous worktree bootstrap. Non-interactive companion to oat-worktree-bootstrap.
npx skillsauth add tkstang/open-agent-toolkit oat-worktree-bootstrap-autoInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Non-interactive worktree bootstrap for orchestrator and subagent execution flows. Creates or reuses a worktree, runs baseline checks, and reports structured status — all without user prompts.
This skill is the autonomous companion to oat-worktree-bootstrap. Key differences:
| Concern | oat-worktree-bootstrap (manual) | oat-worktree-bootstrap-auto (autonomous) |
| ---------------- | ------------------------------------ | ---------------------------------------- |
| Invocation | User-invocable, interactive | Agent-only, non-interactive |
| Prompts | Uses AskUserQuestion for decisions | Never uses AskUserQuestion |
| Failure handling | Asks user to abort/proceed | Policy-driven (strict or allow-failing) |
| Status output | Human-readable banners | Structured machine-parseable output |
| Logging | Console + optional artifact | Artifact-first, console fallback |
Both skills share the same worktree root resolution precedence and branch naming conventions.
When this skill is executed, provide concise status updates:
Print a phase banner once at start:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ OAT ▸ WORKTREE BOOTSTRAP AUTO ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Before major phases, print compact indicators, for example:
[1/5] Resolving worktree root…[2/5] Creating/reusing worktree…[3/5] Running baseline checks…[4/5] Syncing provider directories…[5/5] Returning structured status…<branch-name> — Target branch for the worktree.| Parameter | Default | Description |
| ---------------------------- | ----------------------- | ------------------------------- |
| --base <ref> | origin/main | Base ref to branch from |
| --path <root> | Resolved via precedence | Explicit worktree root override |
| --baseline-policy <policy> | strict | Baseline check failure policy |
| Policy | Behavior |
| --------------- | ---------------------------------------------------------------------------------------------------------- |
| strict | Fail fast on any baseline check failure. Return error status immediately. |
| allow-failing | Continue on baseline failures. Emit structured warnings. Log failures to project artifacts when available. |
Use the same resolution precedence as oat-worktree-bootstrap:
--path <root> (highest priority)OAT_WORKTREES_ROOT environment variable.oat/config.json → worktrees.root${REPO_ROOT}/.worktrees
b. ${REPO_ROOT}/worktrees
c. ../${REPO_NAME}-worktrees../${REPO_NAME}-worktreesIf the resolved root is project-local (.worktrees or worktrees), verify it is gitignored.
^[a-zA-Z0-9._/-]+${root}/{branch-name}git worktree add "{target-path}" "{branch-name}"git worktree add "{target-path}" -b "{branch-name}" "{base-ref}"On failure: return structured error, do not prompt.
After the worktree is created or reused, copy gitignored local-only config and sync configured local paths.
Config propagation:
SRC="$REPO_ROOT/.oat/config.local.json"
DST="$TARGET_PATH/.oat/config.local.json"
if [[ -f "$SRC" && ! -f "$DST" ]]; then
cp "$SRC" "$DST"
fi
activeIdea is stored in config.local.json, so it propagates automatically.Local paths sync:
oat local sync "$TARGET_PATH" 2>/dev/null || true
localPaths (e.g., .oat/ideas/, .oat/projects/local/) into the worktree.localPaths are configured, bootstrap continues.Execute in the target worktree directory:
pnpm run worktree:init # install + build + sync
oat status --scope project
pnpm test
git status --porcelain
Check behavior per baseline policy:
strict mode:
allow-failing mode:
implementation.md exists → append timestamped baseline-failure note.Worktrees do not inherit gitignored provider directories. Create them if missing:
mkdir -p "{target-path}/.claude/skills"
mkdir -p "{target-path}/.cursor/rules"
Then re-run sync to establish symlinks:
oat sync --scope all
Return a structured status object (for orchestrator consumption):
status: success | error | warning
worktree_path: '{absolute-path}'
branch: '{branch-name}'
base_ref: '{base-ref}'
checks:
worktree_init: pass | fail | skip
project_status: pass | fail | skip
tests: pass | fail | skip
git_clean: pass | fail | skip
provider_sync: pass | fail | skip
warnings: [] # List of warning messages (allow-failing mode)
error: null # Error message (strict mode failure)
baseline_policy: strict | allow-failing
Status determination:
success: All checks passed.warning: Some checks failed under allow-failing policy.error: A check failed under strict policy, or worktree creation failed.| Scenario | Behavior | | ------------------------------------ | ----------------------------------------------- | | Worktree creation fails | Return error status with git error message | | Branch already checked out elsewhere | Return error with worktree location info | | Baseline check fails (strict) | Return error with check name and failure output | | Baseline check fails (allow-failing) | Add to warnings, continue, log to artifacts | | No active project | Skip artifact logging, use console only | | Invalid branch name | Return error before attempting creation |
When baseline failures occur under allow-failing policy and an active project exists:
Append to implementation.md under ## Implementation Log:
### {YYYY-MM-DD} — Baseline Warning (autonomous bootstrap)
**Worktree:** {path}
**Branch:** {branch-name}
**Policy:** allow-failing
**Failures:**
- {check_name}: {failure summary}
| Flag | Type | Default | Description |
| ------------------- | --------------------------- | -------- | -------------------------------------------- |
| --baseline-policy | strict | allow-failing | strict | Controls behavior when baseline checks fail. |
Policy details:
| Policy | On Failure | Logging | Status Output |
| --------------- | ----------------------------------- | ------------------------------------------ | ----------------- |
| strict | Fail fast, return error immediately | Error in status output | status: error |
| allow-failing | Continue, collect warnings | Append to implementation.md (or console) | status: warning |
Orchestrator integration:
oat-project-subagent-implement, the baseline policy is passed through from the orchestration run policy.--baseline-policy allow-failing for exploratory runs and strict for production-quality execution.AskUserQuestion — all decisions are policy-driven.oat-worktree-bootstrap manual-safe behavior.documentation
Use when OAT implementation changes and repository reference docs must be synchronized. Updates .oat/repo/reference to match current behavior.
business
Merge multiple analysis artifacts into a single coherent report with provenance tracking. Reads existing artifacts from /deep-research, /analyze, and /compare.
testing
Use when the user questions or suspects an agent claim is wrong. Adversarially gathers evidence to verify or refute the claim using the best sources available in the current environment.
tools
Use when prioritizing backlog work or evaluating a roadmap. Produces value-effort ratings, dependency mapping, and execution recommendations.