Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
172675e
docs(backlog): 2026-04-24 review — close 3, add 2, re-prioritize (#61)
tkstang Apr 24, 2026
7e5886e
fix(docs-transforms): append trailing slash to rewritten markdown URL…
tkstang Apr 27, 2026
e8cbe7e
chore(skills): make oat-pjm-update-repo-reference model-invocable (#62)
tkstang Apr 27, 2026
dcc4a3f
docs(research): compound-engineering-plugin competitive analysis (#59)
tkstang Apr 27, 2026
5494322
docs(backlog): import bl-53f0 + bl-3a4a from collaborative-design-wor…
tkstang Apr 27, 2026
adfa30e
fix(skills): guard parallel-phase worktree bootstrap against base mis…
tkstang Apr 30, 2026
4539bd5
feat(skills): collaborative design workflow (#68)
tkstang Apr 30, 2026
c1186c8
feat: add AWS profile + region overrides to archive sync (#67)
tkstang Apr 30, 2026
c63a13b
refactor: use project status JSON for skill state reads (#65)
tkstang May 1, 2026
19ae864
fix: correctly resolve S3 archive repo slug on worktrees (#69)
tkstang May 2, 2026
f33c659
feat(skills): make end-of-lifecycle skills model-invokable (#71)
tkstang May 3, 2026
8098bd5
fix: prefer archive.awsProfile config over shell AWS_PROFILE (#72)
tkstang May 4, 2026
177d67f
fix: rules fix for Copilot always-on rule activation (#73)
tkstang May 4, 2026
348e3a9
docs(skills): require ID + title in backlog-review output (#74)
tkstang May 7, 2026
417eb2e
feat: add project-independent brainstorming skill and pack (#70)
tkstang May 8, 2026
d5a37c5
fix(skills): honor archive.awsProfile/awsRegion in oat-project-comple…
tkstang May 8, 2026
a4e01bb
fix(skills): refresh repo dashboard during implement bookkeeping (#76)
tkstang May 8, 2026
5809923
fix(skills): rewrite open-PR description after archive + stop default…
tkstang May 11, 2026
12d2ef4
Add subagent capability guidance to skill creators (#78)
tkstang May 13, 2026
471e74b
feat(cli): backfill OAT state gitignore (#80)
tkstang May 14, 2026
f3ea8f0
fix: contain sync-generated OAT workflow state (#81)
tkstang May 18, 2026
a8e52f2
docs: regenerate repo knowledge base (#82)
tkstang May 18, 2026
6270ebd
fix(cli): emit single-quoted YAML frontmatter from oat sync (#84)
tkstang May 18, 2026
e8ff760
feat: add runtime dispatch selection guidance (#79)
tkstang May 18, 2026
2d2ad95
chore: update agent instruction files (#83)
tkstang May 18, 2026
f40294e
fix(skills): allow autonomous worktree bootstrap invocation (#85)
tkstang May 18, 2026
7df373a
fix(skills): recommend nested agent-instruction files by domain conve…
tkstang May 19, 2026
d957428
fix: update codex inherited effort ceiling dispatch (#87)
tkstang May 21, 2026
558cfa2
feat: add project splitting workflow (#88)
tkstang May 22, 2026
f918040
feat: capture accepted design drift in OAT lifecycle artifacts (#90)
tkstang May 25, 2026
56ba3a5
feat: add provider-aware dispatch ceilings (#89)
tkstang May 25, 2026
715fd80
fix: handle gitignored provider stray status (#91)
tkstang May 25, 2026
a919430
refactor: untrack generated OAT dashboard (#92)
tkstang May 25, 2026
2076a91
feat(skills): relocate backlog reviews + add priority-alignment walkt…
tkstang May 27, 2026
f51a3d7
feat: add worktree bootstrap with S3 archive sync (#94)
tkstang May 27, 2026
69d613e
docs: add May 2026 wrap-up report (#95)
tkstang May 29, 2026
f47ed77
docs(pjm): add Linear integration handover reference and pause projec…
tkstang May 29, 2026
c8a0dcf
feat: provider-neutral dispatch ceiling (presets + adapter registry) …
tkstang May 29, 2026
1046173
fix: accept trailing commas in config files (#99)
tkstang May 29, 2026
4381315
feat: add remote review-provide skills (ad-hoc + project rails) (#98)
tkstang May 29, 2026
5f56d34
feat(oat): commit scaffold baseline on `oat project new` + review-out…
tkstang May 31, 2026
50d8db5
fix(oat): split children resume at discovery for revalidation (#101)
tkstang Jun 1, 2026
b991b30
fix(docs): promote admonition titles to bold body lines on migrate (#…
tkstang Jun 2, 2026
9b8e835
feat: add `oat pjm init` for project-management repo-reference initia…
tkstang Jun 2, 2026
605713a
fix(skills): document canonical rule activation enum in oat-agent-ins…
tkstang Jun 2, 2026
f07676a
docs: add hooks research synthesis (#30)
tkstang Jun 3, 2026
427495a
feat: split archive CLI command surface (#105)
tkstang Jun 3, 2026
815d91e
chore(oat): scaffold skill-automation-and-review
tkstang Jun 3, 2026
5715f83
chore(oat): capture quick-start discovery for skill-automation-and-re…
tkstang Jun 3, 2026
192cb91
chore(oat): capture quick-start design for skill-automation-and-review
tkstang Jun 3, 2026
6d89ee8
chore(oat): update quick-start artifacts for skill-automation-and-review
tkstang Jun 3, 2026
414e2c7
chore(oat): record plan review artifact
tkstang Jun 3, 2026
3c5569e
chore(oat): resolve plan artifact-review findings (plan)
tkstang Jun 3, 2026
dfd8d52
chore(oat): fold quick-start discovery-completion fix (E) into scope
tkstang Jun 3, 2026
9ea5206
chore(oat): initialize implementation tracking
tkstang Jun 3, 2026
f8e78de
feat(p01-t01): add workflow.autoArtifactReview config keys
tkstang Jun 3, 2026
0ec8ae6
feat(p01-t02): add oat review latest review-discovery command
tkstang Jun 3, 2026
6db7c24
test(p01-t03): cover oat review latest in help + registry
tkstang Jun 3, 2026
8abfa35
feat(p02-t01): add plan artifact scope to oat-reviewer
tkstang Jun 3, 2026
deb9929
feat(p02-t02): add analysis review type to oat-reviewer
tkstang Jun 3, 2026
f3a3a47
feat(p02-t03): add shared auto artifact-review loop contract
tkstang Jun 3, 2026
5074a80
chore(oat): bookkeeping after p01-p02 pass
tkstang Jun 3, 2026
ede3663
chore(sync): update codex reviewer role exports
tkstang Jun 3, 2026
fc19080
feat(p03-t01): run auto plan-review loop in oat-project-plan
tkstang Jun 3, 2026
60c31d5
feat(p03-t02): run auto plan-review loop in quick-start
tkstang Jun 3, 2026
297ca03
feat(p03-t03): run import-aware plan-review loop in import-plan
tkstang Jun 3, 2026
2379b6d
fix(p03-t04): complete discovery in quick-start lightweight-design path
tkstang Jun 3, 2026
c3695bd
feat(p04-t01): add accuracy review loop to docs-analyze
tkstang Jun 3, 2026
a47b06f
feat(p04-t02): add accuracy review loop to agent-instructions-analyze
tkstang Jun 3, 2026
a217dab
chore(oat): bookkeeping after p03-p04 pass
tkstang Jun 3, 2026
043bbe7
feat(p05-t01): make review-provide model-invokable with gating
tkstang Jun 3, 2026
df9292d
feat(p05-t02): make review-receive model-invokable, use review-latest…
tkstang Jun 3, 2026
c37b564
feat(p05-t03): make discover model-invokable gated on active spec-dri…
tkstang Jun 3, 2026
8d98a7c
feat(p05-t04): make progress router model-invokable
tkstang Jun 3, 2026
954d8a9
test(p05-t05): assert invocability + descriptions for flipped skills
tkstang Jun 3, 2026
770c401
fix(p05): align review-provide gating with invocation contract
tkstang Jun 3, 2026
e0b0cb2
chore(oat): bookkeeping after p05 pass
tkstang Jun 3, 2026
a251ed9
docs(p06-t01): document auto-review loop, review-latest CLI, invocabi…
tkstang Jun 3, 2026
7aa29f7
chore(p06-t02): lockstep public-package version bump
tkstang Jun 3, 2026
6fb9538
docs(p06): correct auto artifact review precedence
tkstang Jun 3, 2026
cd64f32
chore(oat): bookkeeping after p06 pass
tkstang Jun 3, 2026
103eecd
fix(final-review): address latest review ordering and config precedence
tkstang Jun 3, 2026
39a47cc
chore(oat): finalize implementation review bookkeeping
tkstang Jun 3, 2026
e543d20
docs(skill-automation-and-review): update documentation from project …
tkstang Jun 4, 2026
21556c8
chore(skill-automation-and-review): mark docs updated
tkstang Jun 4, 2026
c9fbdb6
chore(oat): record final review artifact
tkstang Jun 4, 2026
9219934
chore(oat): prepare final PR artifacts
tkstang Jun 4, 2026
ba1ff56
chore(oat): record final PR handoff state
tkstang Jun 4, 2026
6e226a2
chore(oat): complete project lifecycle for skill-automation-and-review
tkstang Jun 4, 2026
6e3e2f0
chore(oat): remove duplicate project summary export
tkstang Jun 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
26 changes: 25 additions & 1 deletion .agents/agents/oat-phase-implementer.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: oat-phase-implementer
version: 1.0.0
version: 1.0.2
description: Implements a single plan phase end-to-end — reads artifacts once, executes tasks sequentially, commits per task, self-reviews, and returns a structured summary. Dispatched by oat-project-implement.
tools: Read, Write, Edit, Bash, Grep, Glob
color: cyan
Expand Down Expand Up @@ -33,6 +33,16 @@ You will be given a "Phase Scope" block including:
- **artifact_paths**: Paths to `plan.md`, `design.md`, `spec.md`, `implementation.md`, `discovery.md` (whichever exist for the project's mode)
- **commit_convention**: Commit message format from plan.md (e.g., `feat({scope}): {description}`)
- **workflow_mode**: `spec-driven` | `quick` | `import` (default `spec-driven`)
- **model_axis**: Optional model dispatch state selected by the orchestrator (`selected:<value>`, `inherited`, `not-applicable`, or `host-auto`)
- **effort_axis**: Optional effort dispatch state selected by the orchestrator (`selected:<value>`, `provider-default`, `inherited`, `not-applicable`, or `host-auto`)
- **dispatch_ceiling**: Optional resolved provider ceiling that capped/selected this dispatch
- **ceiling_source**: Optional source for the resolved ceiling (`repo config`, `project state`, or `preflight prompt`)
- **provider_default_effort**: Optional Codex provider default effort, used only to explain base/unpinned fallback dispatches
- **dispatch_rationale**: Optional short rationale for the model/effort axis choices

The `model_axis`, `effort_axis`, `dispatch_ceiling`, `ceiling_source`, and `provider_default_effort` fields describe dispatch state the orchestrator already chose; they are descriptive context for your report, not actions for you to take. Echo whatever values were provided in your summary. If a field is absent, report it as "not provided."

For Codex, `provider-default` means the base/unpinned role follows Codex configured/provider default effort. It does not mean OAT inherited the parent session ceiling.

If `mode: fix`, the block also includes:

Expand Down Expand Up @@ -77,6 +87,8 @@ For each task in the phase, in the order declared in plan.md:
3. Run the task's verification commands. Record pass/fail.
4. Commit using the plan's commit convention. Include only files the task declared.

Track your implementation confidence as `high`, `medium`, or `low` throughout the phase. If you are blocked because the work needs more reasoning or provider capability than the current dispatch appears to provide, say that explicitly in the report, include the current dispatch control when known, and do not keep retrying at the same capability as if the issue were missing context.

**Do not:**

- Skip tasks or reorder them.
Expand Down Expand Up @@ -116,6 +128,12 @@ Report format:
**Phase:** {phase-id}
**Tasks executed:** {N} of {N}
**Commits:** {sha1}..{shaN}
**Confidence:** high | medium | low
**Model axis:** {model_axis if provided, otherwise "not provided"}
**Effort axis:** {effort_axis if provided, otherwise "not provided"}
**Dispatch ceiling:** {dispatch_ceiling if provided, otherwise "not provided"}
**Ceiling source:** {ceiling_source if provided, otherwise "not provided"}
**Provider default effort:** {provider_default_effort if provided, otherwise "not provided"}

### Task Outcomes

Expand Down Expand Up @@ -179,6 +197,12 @@ If a fix introduces a regression or doesn't address its finding, either re-fix w
**Phase:** {phase-id}
**Findings addressed:** {N} critical, {N} important
**Commits:** {sha1}..{shaN}
**Confidence:** high | medium | low
**Model axis:** {model_axis if provided, otherwise "not provided"}
**Effort axis:** {effort_axis if provided, otherwise "not provided"}
**Dispatch ceiling:** {dispatch_ceiling if provided, otherwise "not provided"}
**Ceiling source:** {ceiling_source if provided, otherwise "not provided"}
**Provider default effort:** {provider_default_effort if provided, otherwise "not provided"}

### Fix Outcomes

Expand Down
137 changes: 121 additions & 16 deletions .agents/agents/oat-reviewer.md

Large diffs are not rendered by default.

58 changes: 56 additions & 2 deletions .agents/skills/create-agnostic-skill/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: create-agnostic-skill
version: 1.2.1
version: 1.3.0
description: Use when adding a reusable workflow skill for AI coding agents. Scaffolds a new .agents/skills skill using the Agent Skills open standard.
argument-hint: '[skill-name]'
disable-model-invocation: true
Expand Down Expand Up @@ -60,6 +60,7 @@ If not provided in arguments, ask for:
- **Model invocation**: Should the agent be able to invoke this automatically? (default: no)
- **User invocable**: (Claude Code only) Should this appear in the `/` menu? (default: yes)
- **Tool restrictions**: (Claude Code only) Which tools should the skill be allowed to use?
- **Delegation**: Will the skill dispatch subagents or require a fresh-context worker/reviewer? If yes, define the capability probe, authorization gate, fallback tier, and approval scope.
- **Supporting files**: Does the skill need templates, scripts, or reference files?

### Step 2: Apply Progressive Disclosure
Expand Down Expand Up @@ -295,9 +296,62 @@ Do **not** hard-code a specific Codex question tool name in skill prose unless t

**When NOT to:**

- Autonomous/subagent skills — use argument defaults or flags to drive decisions instead of prompting mid-execution
- Long-running autonomous skills after work has started — resolve required decisions in a pre-work gate, then lock the choice for the run
- Questions with open-ended answers — just ask conversationally in the skill prose

### Delegation and Subagent Capability

Skills that dispatch subagents, reviewers, workers, or fresh-context helper sessions must define a pre-work capability model. Do not let generated skills assume delegation is available, silently downgrade because authorization is required, or ask repeated approval questions mid-run.

**When to include this section:**

- The skill uses provider subagents, task workers, reviewers, or multi-agent execution
- The skill's quality depends on fresh context or isolated review/implementation
- The skill has a fallback mode when delegation is unavailable

**Required guidance for delegation-capable skills:**

1. **Probe before work starts.** Check whether the host can dispatch the needed worker/reviewer and whether dispatch requires user authorization.
2. **Separate capability states.** Report `available`, `authorization required`, or `not resolved`; do not treat authorization-required as unavailable.
3. **Ask once when authorization is required.** Use a concise question that names the delegation scope for the run. Approval should cover the stated worker roles and phases; a decline should select the documented fallback.
4. **Lock the tier.** Once selected, keep the execution mode for the run unless the user explicitly changes it.
5. **Fail closed before side effects.** If delegation is required for correctness and authorization is unresolved, stop before edits, writes, external side effects, or long-running work.
6. **Document fallback behavior.** If inline or single-agent execution is acceptable, explain when it applies. If it changes quality, artifact freshness, or review independence, say so.

**Portable provider wording:**

- Claude Code: use Task/subagent dispatch when available; if the skill benefits from structured prompts, include `AskUserQuestion` in `allowed-tools`.
- Cursor: use the provider's explicit agent invocation or natural-language agent handoff when supported.
- Codex: use multi-agent spawning when available; if the host requires explicit user authorization before spawning, ask before falling back.
- Fallback: use inline/single-agent execution only when the user declines delegation or the runtime truly cannot dispatch the required agent.

**Good pre-work pattern:**

```markdown
### Step 0.5: Capability Detection

Before edits, writes, external side effects, or long-running work, detect whether the required helper agents are available.

- Available without authorization → Tier 1: delegated execution.
- Authorization required → ask once: "Authorize `{worker/reviewer}` delegation for this run?"
- Approved → Tier 1.
- Declined → Tier 2: documented fallback.
- Not resolved / unsupported → Tier 2: documented fallback.

Report:

`Selected: Tier {1|2} — {Delegated|Fallback}; Reason: {available|authorized|user declined delegation|dispatch unavailable|required role unresolved}`

Lock the selected tier for the run.
```

**Anti-patterns:**

- Selecting inline fallback just because the user did not pre-mention subagents, when the skill itself requires delegation and authorization can be requested
- Asking for authorization after implementation or review has already started
- Re-asking for each phase when the first approval explicitly covered the run
- Hiding fallback quality differences from the user

### Progress Feedback

For multi-step skills, print brief progress updates so the user knows what's happening:
Expand Down
29 changes: 24 additions & 5 deletions .agents/skills/create-agnostic-skill/references/skill-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ Adjust based on complexity—not all sections are required:
5. **Arguments** - Parameters parsed from `$ARGUMENTS`
6. **Prerequisites** - Required setup or context (if applicable)
7. **Workflow/Steps** - Numbered steps using "Step 1, 2, 3..." naming
8. **Quality Standards** - Checklist format for docs skills (if applicable)
9. **Examples** - Both "Basic Usage" and "Conversational" styles
10. **Reference** - Links to relevant documentation
11. **Troubleshooting** - Common issues and solutions
12. **Success Criteria** - Checklist of completion conditions
8. **Capability Detection** - Required before work starts if the skill dispatches subagents/workers/reviewers
9. **Quality Standards** - Checklist format for docs skills (if applicable)
10. **Examples** - Both "Basic Usage" and "Conversational" styles
11. **Reference** - Links to relevant documentation
12. **Troubleshooting** - Common issues and solutions
13. **Success Criteria** - Checklist of completion conditions

## Annotated Template

Expand Down Expand Up @@ -87,6 +88,24 @@ Parse from `$ARGUMENTS`:

## Workflow

<!-- Include this Step 0.5 only if the skill dispatches subagents, workers, reviewers, or fresh-context helpers. -->

### Step 0.5: Capability Detection

Before edits, writes, external side effects, or long-running work, detect whether required helper agents are available.

- Available without authorization → Tier 1: delegated execution.
- Authorization required → ask once: "Authorize `{worker/reviewer}` delegation for this run?"
- Approved → Tier 1.
- Declined → Tier 2: documented fallback.
- Not resolved / unsupported → Tier 2: documented fallback.

Report the selected tier and reason before starting work:

`Selected: Tier {1|2} — {Delegated|Fallback}; Reason: {available|authorized|user declined delegation|dispatch unavailable|required role unresolved}`

Lock the selected tier for the run unless the user explicitly changes it.

### Step 1: First Step Title

Clear instructions in imperative form. Tell the agent what to do.
Expand Down
62 changes: 61 additions & 1 deletion .agents/skills/create-oat-skill/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: create-oat-skill
version: 1.2.0
version: 1.3.0
description: Use when adding a new oat-* workflow skill or lifecycle action. Scaffolds the skill with OAT conventions like mode assertions, progress banners, and project-root resolution.
argument-hint: '[skill-name]'
disable-model-invocation: true
Expand Down Expand Up @@ -51,6 +51,7 @@ If not provided, ask the user for:
- Description using the create-agnostic-skill formula: `Use when [trigger condition]. [What it does for disambiguation].`
- Whether this is `oat-*` (should be for this skill)
- Whether it needs project context (`activeProject` in `.oat/config.local.json`) or is repo-level
- Whether it dispatches OAT subagents/workers/reviewers, and if so which roles, what fallback is acceptable, and whether authorization covers the full run or only a narrower checkpoint

### Step 2: Draft the Skill Using the OAT Template

Expand All @@ -61,6 +62,7 @@ Use `.agents/skills/create-oat-skill/references/oat-skill-template.md` as the ba
- `## Mode Assertion`
- `## Progress Indicators (User-Facing)` (with separator banner)
- `### Step 0: Resolve Active Project` (if project-scoped)
- `### Step 0.5: Capability Detection and Tier Selection` (if the skill dispatches subagents/workers/reviewers)
- `## Success Criteria`

**Required frontmatter metadata:**
Expand Down Expand Up @@ -104,6 +106,19 @@ Use `.agents/skills/create-oat-skill/references/oat-skill-template.md` as the ba
- Fallback: ask in plain conversational text
- Do not hard-code a specific Codex question tool name in the skill text unless the host/runtime contract is guaranteed.

**Subagent/worker availability (required when the skill delegates):**

- Follow the delegation guidance from `.agents/skills/create-agnostic-skill/SKILL.md`.
- Add a pre-work capability step before any edits, artifact writes, external side effects, test runs, or long-running work.
- Distinguish `available`, `authorization required`, and `not resolved`; authorization-required is not the same as unavailable.
- If authorization is required, ask once at skill start and state the approval scope:
- Which roles are authorized (for example, `oat-phase-implementer`, `oat-reviewer`, or generic workers)
- Whether approval applies to the whole run, one phase, one review, or one checkpoint
- What fallback is selected if the user declines
- Lock the selected tier for the run unless the user explicitly changes execution mode.
- Fail closed before side effects if delegation is required for correctness and authorization remains unresolved.
- For Codex, mention multi-agent spawning generically. Do not pin a custom `agent_type` unless the role is guaranteed by the active host config or the skill instructs the agent how to fall back to built-in roles/self-contained prompts.

### Step 4: Create Files

Create:
Expand Down Expand Up @@ -173,6 +188,51 @@ pnpm test

Verify the skill appears in `packages/cli/assets/skills/` after build. If a test asserts the exact skill list for the category (e.g., non-interactive mode expectations), update that test to include the new skill.

## Reading project state

Skills that need to read fields from the active project's `state.md` (e.g. `phase`, `phaseStatus`, `workflowMode`, `docsUpdated`, `lastCommit`) MUST query the CLI instead of hand-parsing YAML with `grep`/`awk`.

For one field, use `--field`:

```bash
WORKFLOW_MODE=$(oat project status --field project.workflowMode 2>/dev/null || echo null)
```

If the skill is reading a resolved project path instead of the active project pointer, add `--project-path`:

```bash
WORKFLOW_MODE=$(oat project status --project-path "$PROJECT_PATH" --field project.workflowMode 2>/dev/null || echo null)
```

For multiple fields, use `--shell` so the CLI fetches project state once and prints shell-safe assignments:

```bash
eval "$(oat project status --shell \
PHASE=project.phase \
PHASE_STATUS=project.phaseStatus \
WORKFLOW_MODE=project.workflowMode 2>/dev/null)"
```

### Contract notes

- **Null sentinel behavior:** YAML `null` in `state.md` surfaces as the literal string `null`, matching the prior `grep | awk` behavior. Missing fields also print or assign `null` after project status resolves successfully.
- `--field <path>` reads arbitrary dot paths from the project status payload. Scalars print as raw values; objects and arrays print as compact JSON.
- `--shell NAME=path ...` prints shell-safe single-quoted assignments. Variable names must match `[A-Za-z_][A-Za-z0-9_]*`.
- `--project-path <path>` reads from a repo-relative or absolute project path instead of `.oat/config.local.json`'s active project pointer.
- Skill snippets assume `oat` is available on `PATH`; do not repeat per-skill `command -v oat` fallback blocks. CI/cloud environments without a global install can provide this `npx`-backed shim once per checkout:

```bash
mkdir -p .oat/bin
cat > .oat/bin/oat <<'EOF'
#!/usr/bin/env bash
exec npx @open-agent-toolkit/cli "$@"
EOF
chmod +x .oat/bin/oat
export PATH="$PWD/.oat/bin:$PATH"
```

- Do **not** use this pattern to write state — state writes stay in their existing skill sections.

## Examples

### Basic Usage
Expand Down
31 changes: 31 additions & 0 deletions .agents/skills/create-oat-skill/references/oat-skill-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,37 @@ If `PROJECT_PATH` is missing/invalid:
- Persist with `oat config set activeProject "$PROJECT_PATH"`.
- TODO(back-compat): validate `oat config` exists on older target branches before relying on this snippet.

<!-- Include this step only if the skill dispatches subagents, workers, reviewers, or fresh-context helpers. -->

### Step 0.5: Capability Detection and Tier Selection

Before edits, artifact writes, external side effects, test runs, or long-running work, detect whether required helper agents are available.

Detection logic:

- If the host can dispatch the required role(s) without extra authorization → Tier 1.
- If the host can dispatch the required role(s) but requires user authorization, ask once before continuing:

```
This skill normally delegates {implementation/review/analysis} to {role list}. Authorize delegated execution for this run?
```

- Approved → Tier 1.
- Declined → Tier 2.

- If the host cannot dispatch the required role(s), or a required role is unresolved → Tier 2.

Report:

```
[preflight] Checking subagent availability…
→ {role list}: {available | authorization required | not resolved}
→ Selected: Tier {1 | 2} — {Subagents | Inline}
→ Reason: {available without auth | authorized | user declined delegation | dispatch unavailable | required role unresolved}
```

Lock the selected tier for the run unless the user explicitly changes execution mode. If delegation is required for correctness and authorization is unresolved, stop before side effects instead of silently falling back.

### Step 1: {First Step}

{Instructions…}
Expand Down
Loading