skills/setup/SKILL.md
Initialize docs/plan/decisions conventions plus note-routing and orchestration defaults in a repo; create structure if missing; no-op if already set up.
npx skillsauth add olliecrow/codex setupInstall 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.
rg -> find/grep, python -> python3, alternate repo-native scripts).plan/, ensure required plan directories exist before reading/writing them (create when edits are allowed; otherwise use an in-memory fallback and call it out).investigate -> plan -> fix -> verify -> battletest -> organise-docs -> git-commit -> re-review; cleanup scan -> prioritize -> clean -> verify -> re-scan; docs audit -> update -> verify -> re-audit.organise-docs frequently during execution to capture durable decisions and learnings, not only at the end.git-commit when changes are commit-eligible, checks are green, and repo policy permits commits.docs/ accurate and up to date, and promote durable learnings and decisions from work into docs.git-commit to create a small logical checkpoint commit once relevant checks are green and repo policy permits commits.organise-docs whenever durable learnings/decisions appear, and prune stale plan/ scratch artifacts.The skill is complete only when all of the following are true:
blocked with concrete blocker evidence.done, blocked, or not-applicable, with brief evidence or rationale.Stop only after this terminal contract is satisfied; otherwise continue iterating.
done: requested outcome is delivered and required checks are completed (for example expected artifact/report produced and required validation command(s) passed).blocked: progress cannot continue after bounded retries because of a concrete dependency or access issue; blocker evidence and exact unblock action are reported.not-applicable: an optional step is explicitly skipped with reason (for example no remote configured, so push step is marked not-applicable).Set up a consistent, agent-focused operating model in any repo. The setup is idempotent: if everything required is already in place, do nothing.
The setup must work for both:
Primary outcomes:
docs/ over time)organise-docs and git-commit frequently throughout execution, not only at the endcwd, verify required tools with command -v, and verify referenced files/directories exist before reading or searching them.If edits are not permitted (policy, permissions, or explicit user instruction), do not attempt setup. Report which required elements are missing and note that other skills must fall back to in-memory plan notes and local rationale capture (code comments or tests) until setup is allowed.
setup is responsible for bootstrapping the operating workflow, not just creating folders.
Baseline model to install:
docs/ stores durable, evergreen guidance and decisions.docs/ may be organized as a deep hierarchy (nested directories). Encourage cross-linking between docs using relative links and keep indexes current so docs are easy to navigate.plan/ stores disposable, task-scoped scratch notes and execution artifacts.docs/decisions.md.plan/current/docs/organise-docs and git-commit frequently during multi-step work so durable knowledge and checkpoint commits do not pile up.Consider the repo set up only if all of the following are true:
docs/README.md exists and states that docs/ is long-term, agent-focused, committed, and evergreen.docs/decisions.md exists and defines a decision-capture policy with a template.docs/workflows.md exists (or an equivalent workflow doc is referenced from AGENTS.md) and defines note routing, promotion, and parallel-work tracking conventions.plan/ exists (subfolders as defined below are preferred)..gitignore ignores plan/.AGENTS.md documents docs/, plan/, decision-capture policy usage, and where workflow conventions live.If any element is missing, perform setup.
Inspect repository state:
AGENTS.md, .gitignore, and check for docs/ and plan/ directories.AGENTS.md.If already set up:
If setup is needed, apply the following changes (minimal edits only):
AGENTS.md is missing, create it with concise sections for docs, plan, and workflow conventions.docs/ as long-term, agent-focused docs committed to git, evergreen, and kept lean.plan/ as short-term, disposable scratch space for agents, not committed.docs/decisions.md.docs/workflows.md (or equivalent).plan/current/notes.mdplan/current/notes-index.mdplan/current/orchestrator-status.mdplan/ subdirectories:
plan/current/plan/backlog/plan/complete/plan/experiments/plan/artifacts/plan/scratch/plan/handoffs/docs/README.md with an evergreen description of docs/ usage and its relationship to plan/.docs/decisions.md with the decision-capture policy and template.docs/workflows.md with the operating workflow for note routing, promotion, and orchestration.plan/ and the recommended subdirectories listed above.plan/ is ignored (add a plan/ entry if missing). Do not remove existing ignore rules.Validate:
Use these templates when creating new files.
AGENTS.md (minimum scaffold)
# Repository Guidelines
## Docs, Plans, and Decisions (agent usage)
- `docs/` is long-lived and committed (and may use nested directories + cross-links to stay organized).
- `plan/` is short-lived scratch space and is not committed.
- Decision capture policy lives in `docs/decisions.md`.
- Operating workflow conventions live in `docs/workflows.md`.
## Plan Directory Structure (agent usage)
- `plan/current/`
- `plan/backlog/`
- `plan/complete/`
- `plan/experiments/`
- `plan/artifacts/`
- `plan/scratch/`
- `plan/handoffs/`
docs/README.md
# Docs Directory
This directory holds long-term, agent-focused documentation for this repo. It is not intended for human readers and is committed to git.
Principles:
- Keep content evergreen and aligned with the codebase.
- Avoid time- or date-dependent language.
- Prefer updating existing docs when they have a clear home, but do not hesitate to create new focused docs and nested subdirectories when it improves organization and findability.
- Use docs for cross-cutting context or rationale that does not belong in code comments or tests.
- Keep entries concise and high-signal.
- Make docs interrelate: use relative links between related docs and avoid orphan docs by linking new docs from an index or a nearby "parent" doc.
Relationship to `/plan/`:
- `/plan/` is a short-term, disposable scratch space for agents and is not committed to git.
- `/plan/handoffs/` is used for sequential workflow handoffs between automation scripts when needed.
- Active notes should be routed into `/plan/current/` and promoted into `/docs/` only when they become durable guidance.
- `/docs/` is long-lived; only stable guidance should live here.
docs/decisions.md
# Decision Capture Policy
This document defines how to record fixes and important decisions so future work does not re-litigate the same questions. It is written to stay accurate over time; avoid time-specific language.
## When to record
- Any fix for a confirmed bug, regression, or safety issue.
- Any deliberate behavior choice that differs from intuitive defaults.
- Any trade-off decision that affects modeling or behavior.
- Any change that affects external behavior, invariants, or public APIs.
## Where to record
Use the smallest, most local place that makes the decision obvious:
- **Code comments** near the behavior when the rationale is not obvious.
- **Tests** with names/assertions that encode the invariant.
- **Docs** (this file or another focused doc) when the decision is cross-cutting.
Prefer updating an existing note over creating a new file.
## What to record
Keep entries short and focused:
- **Decision**: what was chosen.
- **Context**: what problem or risk it addresses.
- **Rationale**: why this choice was made.
- **Trade-offs**: what we are not doing.
- **Enforcement**: which tests or code paths lock it in.
- **References** (optional): file paths, tests, or PRs that embody the decision.
## Template
Decision: Context: Rationale: Trade-offs: Enforcement: References:
docs/workflows.md
# Operating Workflow
This document defines how work is tracked so progress compounds without context bloat.
## Core mode
- Keep active, disposable notes in `/plan/current/`.
- Promote durable guidance into `/docs/`.
- Capture important rationale in the smallest durable place (code comments, tests, or docs).
- Keep the workflow spartan: short notes, clear routing, minimal ceremony.
## Note routing
- `/plan/current/notes.md`: running task notes, key findings, and next actions.
- `/plan/current/notes-index.md`: compact index of active workstreams and pointers to detailed notes.
- `/plan/current/orchestrator-status.md`: packet/status board for parallel or subagent work.
- `/plan/handoffs/`: sequential handoff summaries for staged automation workflows.
## Parallel and subagent workflows
- Use isolated worktrees or dedicated working directories when streams are independent.
- Track each stream with owner, scope, status, blocker, and last update.
- Require each stream to produce a concise handoff summary before merge.
## Promotion cycle
- During execution: write concise notes to `/plan/current/`.
- At meaningful milestones: consolidate and de-duplicate active notes.
- Before finishing: promote durable learnings to `/docs/` and trim stale `/plan/` artifacts.
## Stop conditions
- Stop when acceptance checks pass, risks are documented, and no unresolved blockers remain.
- If no new evidence appears, avoid repeating the same loop; report completion instead.
data-ai
Use automatically for Sentinel repo sessions, trading research questions, market/company/ticker/source questions, or any request that should use Sentinel's read-only data sources and reference context. Enforces Sentinel's high-confidence, read-only, no-local-query-trace research posture.
documentation
Compact the current conversation into a handoff document for another agent to pick up.
tools
Run the Codex custom review feature from the CLI for arbitrary review instructions. Use when the user asks to use /review, custom review, or Codex review without tying the review to commits, uncommitted changes, or a base branch; prefer multicodex exec review with no explicit account and fall back to codex exec review only when multicodex is unavailable.
tools
Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).