SKILL.md
- Confirm you are in the target project repo, not the global Codex home directory.
- If the current repo is /Users/mostafa/.codex or another Codex home, stop and ask for the target project path. - If the repo already has AGENTS.md, follow it first.
- Resolve templates from the active Codex home
templates/directory, then bootstrap missing SDLC files.
- Create missing directories: spec/, spec/templates/, spec/decisions/, spec/features/, scripts/. - Create AGENTS.md from templates/AGENTS.md only if missing. - Create codex.toml from templates/codex.toml only if missing. - Copy starter templates into spec/templates/ only if missing: - adr.md - architecture.md - backlog.md - feature.md - implementation.md - test-plan.md - test-results.md - status.md - evidence.md - docstrings.md - specindex.md - Create smoke starters only if missing: - spec/smoke.md from templates/smoke.md - spec/smokeregistry.yaml from templates/smoke_registry.yaml - scripts/smoke.py from templates/smoke.py - Keep placeholder scenarios disabled until a real entrypoint, fixture, schema/invariants, and mode behavior are configured. - Create spec/docstrings.md from templates/docstrings.md only if missing. - Do not overwrite existing repo-local files unless the user explicitly asks.
- Read the user’s project idea (or
spec/idea.mdif it exists), plus the newly bootstrappedAGENTS.mdandcodex.toml.
- Detect the project stack and replace Python/uv command placeholders only when the correct commands can be inferred safely; otherwise list every required customization. - Apply the Google-style docstring policy only to Python code.
- Ask up to 5 targeted questions only if essential info is missing (goal, users, constraints, success metrics).
- Create/update:
- spec/brief.md (1–2 pages) with: Goal, Users, Scope/Non-scope, Constraints, Risks, Milestones. - spec/index.md (navigation hub) with links to brief, architecture, ADRs, and backlog. - Prefer spec/templates/spec_index.md for a new spec/index.md.
- Initialize the project workflow state:
- Ensure spec/changelog.md exists with an initial entry. - Ensure spec/decisions/ exists; do not create an ADR unless a real decision is present. - Leave spec/backlog.md for backlog-builder unless the user explicitly asks to create it now.
- End with:
- Files created - Files preserved because they already existed - Any commands the user should customize in codex.toml - Smoke scenario/fixture/schema/mode fields that must be customized before enabling smoke - Proposed “first 3 work items” list (thin vertical slices) - Exact next command: Run $backlog-builder