ワンクリックで
opsx-apply
Implement tasks from an OpenSpec change (Experimental)
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Implement tasks from an OpenSpec change (Experimental)
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Reset the OpenRegister development environment (stop, remove volumes, restart, install apps)
Create a Pull Request from the current branch — runs local checks, picks target branch, and opens the PR on GitHub
Analyze a project's OpenSpec from 8 persona perspectives and suggest additional features
Iteratively run apply→verify in a loop until verify passes, then auto-archive — runs per-app in Docker context
Archive a completed change in the experimental workflow
Archive multiple completed changes at once
| name | opsx-apply |
| description | Implement tasks from an OpenSpec change (Experimental) |
| metadata | {"category":"Workflow","tags":["workflow","artifacts","experimental"]} |
Check the active model from your system context (it appears as "You are powered by the model named…").
"This command requires Sonnet or Opus — implementing tasks from OpenSpec changes needs stronger reasoning than Haiku can reliably provide. Please switch to Sonnet (
/model sonnet) or Opus (/model opus) and re-run."
Implement tasks from an OpenSpec change.
Input: Optionally specify a change name (e.g., /opsx-apply add-auth). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
Steps
Select the change
If a name is provided, use it. Otherwise:
openspec list --json to get available changes and use the AskUserQuestion tool to let the user selectAlways announce: "Using change: " and how to override (e.g., /opsx-apply <other>).
Check status to understand the schema
openspec status --change "<name>" --json
Parse the JSON to understand:
schemaName: The workflow being used (e.g., "spec-driven")Get apply instructions
openspec instructions apply --change "<name>" --json
This returns:
Handle states:
state: "blocked" (missing artifacts): show message, suggest using /opsx-continuestate: "all_done": congratulate, suggest archiveLoad architectural context
Before reading change-specific files, load ALL applicable ADRs. These are hard constraints on implementation — violating an ADR is a bug.
| Location | What | Priority |
|---|---|---|
openspec/changes/<name>/context-brief.md | Specter intelligence brief — features, user stories, stakeholders, schemas, standards. Contains market research data that informed the spec. | Load if present — provides domain context for implementation decisions |
.claude/openspec/architecture/adr-*.md | Company-wide ADRs (13 Conduction-wide decisions: data layer, API patterns, frontend, security, i18n, testing, etc.) | Always load — these are non-negotiable |
openspec/architecture/adr-*.md | Repo-specific ADRs (app's data model, workflows, standards compliance, security model) | Always load if present |
docs/ARCHITECTURE.md | App-specific technology decisions and component structure | Load if present |
Read these silently. Key ADRs to enforce during implementation:
Read context files
Read the files listed in contextFiles from the apply instructions output.
The files depend on the schema being used:
Additionally, load optional artifacts if present:
openspec/changes/<name>/contract.md — if it exists, treat it as the authoritative interface definition. Do not deviate from its declared endpoints, schemas, or error codes during implementation.openspec/changes/<name>/test-plan.md — if it exists, use it to guide verification steps for each task. Each TC's acceptance criteria tell you how to verify the task is done.Show current progress and confirm
Display:
Then use AskUserQuestion to ask:
"Ready to implement remaining tasks for
<change-name>?"
Options:
Implement tasks (loop until done or blocked)
For each pending task:
tests/Unit/ or tests/unit/ with at least 3 test methods covering the happy path, error handling, and edge cases- [ ] → - [x]plan.json exists):
openspec/changes/<name>/plan.json, find the tracking_issue number- [ ] **1.1 Task title**)- [ ] to - [x] - [ ] (2-space indent), change it to - [x]get_issue → {owner, repo, issue_number: <tracking_issue>} → apply the above changes to the body → update_issue → {owner, repo, issue_number: <tracking_issue>, body: <updated_body>}gh issue view <tracking_issue> --repo <repo> --json body --jq '.body' → apply the above changes → gh issue edit <tracking_issue> --repo <repo> --body "<updated_body>"plan.json: set "status": "done" for that taskSeed data requirement (ADR-001):
lib/Settings/{app}_register.jsondesign.md as the source — it defines objects, field values, and related items@self envelope pattern (register, schema, slug) per ADR-013design.md has no Seed Data section, flag this and suggest adding one before continuingPause if:
On completion or pause, show status and update progress comment
Display:
Pipeline progress comment (if plan.json exists with tracking_issue):
Post or update a single progress comment on the GitHub issue. Search existing comments for one starting with ## Pipeline Progress — if found, update it via PATCH; if not, create a new one. This keeps progress in one place instead of spamming multiple comments.
Format:
## Pipeline Progress
| Stage | Status | Details |
|-------|--------|---------|
| Implementation | ✓ N/M tasks | Completed tasks X, Y, Z |
| Quality Checks | pending | |
| Verification | pending | |
| Archive | pending | |
*Updated: YYYY-MM-DD HH:MM UTC*
list_issue_comments to find existing progress comment, then update_issue_comment or add_issue_commentgh api repos/{owner}/{repo}/issues/{n}/comments to search, then PATCH or POSTIf all tasks done: proceed to Step 8 (quality checks). Update the progress comment with Implementation = "✓ Complete" and Quality Checks = "running...".
If plan.json exists and all tasks are now done: also add a separate brief comment:
add_issue_comment → {owner, repo, issue_number: <tracking_issue>, body: "✓ All tasks implemented. Running quality checks."}gh issue comment <tracking_issue> --repo <repo> --body "✓ All tasks implemented. Running quality checks."Run code quality checks
After all tasks are complete, run the full quality suite from the project directory.
PHP quality (if the project has a composer.json with quality scripts):
cd <project-dir> && composer check:strict 2>&1
This runs: lint + named-args check + phpcs + phpmd + psalm + phpstan + unit tests.
If check:strict is not available, fall back to running individually:
composer phpcs 2>&1
composer phpmd 2>&1
composer psalm 2>&1
Frontend quality (if the project has a package.json with lint scripts):
cd <project-dir> && npm run lint 2>&1
npm run stylelint 2>&1
Handle failures:
composer phpcs:fix (PHPCBF auto-fixes ~60% of PHPCS issues)npm run lint -- --fix (ESLint auto-fix)Show quality results:
## Quality Checks
| Tool | Status |
|------|--------|
| PHPCS | ✓ Pass (or X errors fixed) |
| PHPMD | ✓ Pass |
| Psalm | ✓ Pass |
| PHPStan | ✓ Pass |
| ESLint | ✓ Pass |
| Stylelint | ✓ Pass |
| Unit Tests | ✓ Pass (N tests) |
Ask what's next
After quality checks pass (or remaining issues are reported), show the completion summary, then use AskUserQuestion to ask:
"Implementation complete! What would you like to do next?"
Options:
/opsx-verify) — recommended: check the code matches specs and run API/browser tests/team-reviewer) — have a reviewer look at the code before verifying/opsx-sync) — sync this change's specs to main specs first/opsx-archive) — skip verification if already reviewed externallyOutput During Implementation
## Implementing: <change-name> (schema: <schema-name>)
Working on task 3/7: <task description>
[...implementation happening...]
✓ Task complete
Working on task 4/7: <task description>
[...implementation happening...]
✓ Task complete
Output On Completion
## Implementation Complete
**Change:** <change-name>
**Schema:** <schema-name>
**Progress:** 7/7 tasks complete ✓
### Completed This Session
- [x] Task 1
- [x] Task 2
...
### Quality Checks
| Tool | Status |
|------|--------|
| PHPCS | ✓ Pass |
| PHPMD | ✓ Pass |
| Psalm | ✓ Pass |
| ESLint | ✓ Pass |
| Unit Tests | ✓ 42 tests passed |
**What's Next**
Recommended: `/opsx-verify` | Optional: `/team-reviewer`, `/opsx-sync` | Alternative: `/opsx-archive`
Output On Pause (Issue Encountered)
## Implementation Paused
**Change:** <change-name>
**Schema:** <schema-name>
**Progress:** 4/7 tasks complete
### Issue Encountered
<description of the issue>
**Options:**
1. <option 1>
2. <option 2>
3. Other approach
What would you like to do?
After completing tasks, review what happened and append any new observations to learnings.md:
Each entry must include today's date. One insight per bullet. Skip if nothing new was learned.
Guardrails
Fluid Workflow Integration
This skill supports the "actions on a change" model:
💡 If you switched models to run this command, don't forget to switch back to your preferred model with
/model <name>(e.g./model defaultor/model sonnet) when done.