Files
specs/agent-projection/opencode/commands/opsx-explore.md
T

38 lines
3.3 KiB
Markdown

---
description: "Explore ideas without implementing or bypassing SDD approvals"
---
Enter explore mode as a thinking partner: investigate the codebase, clarify intent, compare mature solutions, surface risks and visualize trade-offs. Do not implement features or modify application code.
**OpenSpec store (WealthLedger):** Use only `wealth-ledger-specs`, whose physical root is `specs/openspec`. Every OpenSpec command that reads or writes specs or changes MUST include `--store wealth-ledger-specs`; keep this flag on every follow-up. Do not infer a store from cwd, the nearest root, or machine configuration.
**OpenSpec version preflight:** Before the first OpenSpec command, work from the workspace root and run `bash specs/scripts/verify-openspec-version.sh`. A missing or mismatched CLI is a blocking result.
**Approval boundary:** Exploration does not approve artifacts. If the user explicitly asks to capture a decision, create at most ONE planning artifact per invocation and then STOP for explicit Change Owner approval. Do not create an unapproved prerequisite or a downstream artifact merely because status reports it ready.
**Planning gate:** When exploration captures an artifact, run `bash specs/scripts/verify-openspec-planning.sh "<name>"` after the write and before requesting approval. Fix structural failures; if the captured decision changes upstream semantics, return to the earliest affected artifact and invalidate dependent approvals.
## Explore
- Read relevant code, durable docs and existing change artifacts.
- Use `openspec list --json --store wealth-ledger-specs` to discover active changes and `openspec status --change "<name>" --json --store wealth-ledger-specs` to resolve their paths.
- Ask questions only where the answer materially changes intent, behavior or architecture.
- For auth, security, storage, integrations, observability, caching, concurrency, infrastructure or tooling, compare mature supported solutions before recommending custom work.
- Offer to capture a stable decision in the appropriate current artifact; do not auto-capture it.
## Capture one artifact when explicitly requested
1. For a new change, scaffold it with `openspec new change "<name>" --store wealth-ledger-specs`. For an existing change, read its fresh status.
2. Confirm from the conversation that dependencies of the requested current artifact were explicitly approved. If approval cannot be established, ask again and stop.
3. The requested artifact must be the first `ready` artifact. Run `openspec instructions "<artifact-id>" --change "<name>" --json --store wealth-ledger-specs`, read completed dependencies and follow the returned template/instruction at `resolvedOutputPath`.
4. Create or update only that artifact, show fresh status, explain what downstream artifacts remain blocked by approval, and stop.
If an approved Proposal, Delta Specs or Design is edited, explicitly invalidate approval of its dependent artifacts according to the project cascade, report the affected artifacts and stop. Never rewrite downstream artifacts in the same invocation.
## Guardrails
- Explore mode may read and analyze freely but never writes implementation code.
- Create at most ONE planning artifact per invocation.
- File existence and CLI status are structural state, not owner approval.
- Do not create versioned planning documents outside `specs/openspec`.