Opsx Apply
--- description: Apply an OpenSpec change by implementing pending tasks argument-hint: optional change name --- Project constitution preflight: - Before this workflow takes action, use skill `project-constitution` to read and enforce root `CONSTITUTION.md`. For architecture-sensitive work, also read `ARCHITECTURE.md`, `adr/README.md`, and relevant in-force `adr/*.md`. - If the constitution is missing, follow the bootstrap-safe/diagnostic rules from that skill; otherwise stop unless the user gives an explicit one-time override. - Do not read `.secrets.local.env` unless this workflow actually needs a listed external system, and never reveal secret values. Artifact review session intent: - Before key entry workflows create or consume reviewable artifacts, run `scripts/openspec-session-state --status` when the helper exists. - If `artifactReview.decision` is `unset`, ask whether to enable OpenAI-compatible artifact review for this session; record the answer with `scripts/openspec-session-state --review on` or `--review off`. - Reuse the recorded session decision on later commands. Use `/opsx:review-status`, `/opsx:review-on`, `/opsx:review-off`, `/opsx:review-reset`, and `/opsx:review-set` to inspect or change it. - Session settings are non-secret local overlays over `.codex/openspec-artifact-review.json`; do not edit global defaults unless the user explicitly asks. Use skill `openspec-apply-change`. Hard gate before implementation: 1. Run `git status --short`. 2. Run `openspec status --change <name> --json`. 3. Run `openspec instructions apply --change <name> --json`. 4. Refuse to apply if planning artifacts are missing or if `openspec/changes/<name>/{proposal.md,grill.md,design.md,design-review.md,adr.md,test-plan.md,tasks.md,specs/**}` has uncommitted changes, unless the user gives an explicit one-time override. 5. For intent-driven changes, read every file in `contextFiles`, any `openspec/changes/<name>/reviews/*.json` OpenAI-compatible artifact review reports as auxiliary context, and then read top-level `adr/*.md` when present. If `contextFiles.grill`, `contextFiles.design-review`, or `contextFiles.test-plan` are missing for an expanded intent-driven change, treat apply as blocked. If `contextFiles.adr` points at per-change `adr.md`, still derive durable constraints from top-level ADRs. Goal-guidance preflight: - Run this after apply eligibility is known and context is available, but before implementation file edits. - If the current session is already inside an active Codex Goal whose objective covers `<name>`, state that nested goal generation is skipped and continue normal apply. - If the user explicitly asks to continue without a goal, states "no goal", or otherwise clearly bypasses goal guidance, state the bypass and continue normal apply. - Do not generate a goal prompt when apply is blocked, all-done, or stopped by dirty planning artifacts; report the blocker instead. - Generate a copy-paste `/goal` prompt and stop before implementation when any condition applies: - three or more pending tasks remain; - the work is expected to cross multiple checkpoint boundaries; - material design or ADR constraints affect implementation; - multiple capabilities, subsystems, or documentation plus code are affected; - external services, credentials, generated assets, migrations, or long verification are needed; - the user asks Codex to keep going, implement everything, or avoid stopping except for blockers. - Small, local work may continue without goal guidance if it is unlikely to need multiple checkpoints. Generated apply goal shape:
when to use it
Community prompt sourced from the open-source GitHub repo AlekseiSeleznev/intent-driven-codex (NOASSERTION). A "Opsx Apply" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
productivitycommunitydeveloper
source
AlekseiSeleznev/intent-driven-codex · NOASSERTION
more in Productivity
Productivity✓ tested
Summarize a doc into decisions & actions
chief of staff who extracts what to DO, not just what was said
Productivity✓ tested
Draft a reply to a hard email
calm, direct communicator who de-escalates without caving
Productivity✓ tested
Turn a brain-dump into a weekly plan
planning coach who protects your focus, not just your calendar