一键导入
opsx-pipeline
Process multiple OpenSpec changes in parallel using subagents — full lifecycle from proposal to merged PR
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Process multiple OpenSpec changes in parallel using subagents — full lifecycle from proposal to merged PR
用 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
Detect admin settings Vue components registered in the vue-router. Admin settings are rendered by Nextcloud's settings framework via `AdminSettings.php`; adding their Vue components to the in-app router exposes them as publicly-accessible frontend routes, bypassing all server-side access checks. ADR-004 hard rule. Observed 2026-04-30 on doriath where `/settings → AdminRoot` was a route in `src/router/index.js` (commit c7c72e9).
Run `composer audit` to check composer.lock dependencies for known CVEs. Invoked by the builder before push and the reviewer's mandatory block. Mirrors the orchestrator's `composer-audit` quality gate.
Scan lib/ for forbidden debug helpers (var_dump / die / error_log / print_r / dd / dump) that should not ship. Invoked by the builder before push, by the reviewer as Mandatory Step 2, and by the fixer during a retry. Mirrors the orchestrator's `forbidden-patterns` quality gate.
| name | opsx-pipeline |
| description | Process multiple OpenSpec changes in parallel using subagents — full lifecycle from proposal to merged PR |
| metadata | {"category":"Workflow","tags":["workflow","parallel","pipeline","experimental"]} |
Process one or more OpenSpec change proposals through the full lifecycle using parallel subagents. Each change gets its own agent, worktree, branch, and PR.
Input: Optionally specify change names, a repo name, or all to process all open proposals.
Examples:
/opsx-pipeline all — process all open proposals across all repos/opsx-pipeline procest — process all open proposals in Procest/opsx-pipeline sla-tracking routing — process specific changes by nameOverview
This command automates the full OpenSpec lifecycle per change:
proposal → ff (specs/design/tasks) → apply (implement) → verify → browser verify (optional) → archive + feature docs → PR
Each change runs as an independent subagent in an isolated git worktree on its own feature branch. The main agent orchestrates, monitors, and reports.
Scan for open proposals (directories in openspec/changes/ that contain a proposal.md but are NOT in archive/).
# For each app directory, find open proposals
for app in procest pipelinq docudesk openregister opencatalogi mydash nldesign larpingapp openconnector softwarecatalog zaakafhandelapp; do
if [ -d "$app/openspec/changes" ]; then
for change in $app/openspec/changes/*/proposal.md; do
echo "$app:$(basename $(dirname $change))"
done
fi
done
Also check .github/openspec/changes/ for org-wide proposals.
Filter based on input:
all → process everything found<repo-name> → only changes in that repo<change-name> [change-name...] → only those specific changes (search across all repos)If no input provided, list all discovered changes and use AskUserQuestion to let the user select which to process.
For each change, determine:
procest/brp-kvk-register-setsConductionNL/procest (from git remote)openspec-labeled issue already exists for this change (search GitHub issues by title)Display the plan:
## Pipeline Plan
| # | App | Change | GitHub Repo | Issue |
|---|-----|--------|-------------|-------|
| 1 | procest | brp-kvk-register-sets | ConductionNL/procest | #103 |
| 2 | pipelinq | sla-tracking | ConductionNL/pipelinq | #79 |
| ... | ... | ... | ... | ... |
Total: N changes across M repositories
Max parallel agents: 5 (browser-2 through browser-5, browser-7)
Use AskUserQuestion to confirm: "Process these N changes? Each will get a feature branch, full implementation, and PR to development."
Options:
Explain the model options for implementation sub-agents:
| Model | Speed | Quota | Best for |
|---|---|---|---|
| Haiku | Fastest | Low | Config tweaks, text changes, single-file edits, minor fixes |
| Sonnet | Balanced | Moderate | Feature additions, standard CRUD, multi-file changes |
| Opus | Slowest | High | Complex architectural changes, new services/schemas, cross-app impact |
Ask the user using AskUserQuestion:
"How should models be assigned across the {N} changes in this pipeline run?"
If "One model for all", ask using AskUserQuestion:
"Which model for all sub-agents?"
- Haiku — fastest, lowest quota. Best if all changes are small/simple.
- Sonnet (recommended) — balanced. Handles most feature work well.
- Opus — highest quality. Best for complex architectural changes, but uses significant quota per agent — consider carefully with multiple parallel changes.
Store as {PIPELINE_MODEL} (apply uniformly to all agents).
If "Choose per change", for each change show its name and (if available) the title from its proposal.md. Ask per change using AskUserQuestion:
"Model for
[change-name]?"
- Haiku — simple change (config, text, minor fix)
- Sonnet (recommended) — standard feature work
- Opus — complex change (new architecture, cross-app impact)
Store results as {CHANGE_MODELS} map of change-name → model.
If "Auto-select per change", for each change read the first 50 lines of its proposal.md (title, type, scope). Assign:
Show the assignments and ask using AskUserQuestion:
"Auto-assigned models — proceed or adjust?"
- Proceed — use as assigned
- Adjust — change any individual assignments
Store results as {CHANGE_MODELS} map of change-name → model.
Before launching agents, check whether the Nextcloud development environment is reachable:
curl -s -o /dev/null -w "%{http_code}" http://nextcloud.local/status.php
If reachable (HTTP 200), ask using AskUserQuestion:
"Nextcloud is running at nextcloud.local. Include browser testing in the pipeline?"
.vue, .js, .ts, .css)Store as {BROWSER_TESTING} (all, ui-only, or none).
If NOT reachable, ask using AskUserQuestion:
"Nextcloud is not running at nextcloud.local. Browser testing requires a running environment."
If the user chooses "Start it and retry", re-run the health check after they confirm. If still unreachable, ask again.
When {BROWSER_TESTING} is all or ui-only, assign browser numbers to eligible agents: browser-2 through browser-5, browser-7 (max 5 concurrent).
For each change, before launching agents:
a. Determine branch name: feature/<issue-number>/<change-name>
[OpenSpec] <change-title>, labeled openspec)feature/103/brp-kvk-register-setsb. Create git worktree:
cd <app-directory>
git fetch origin development
git worktree add /tmp/worktrees/<app>-<change-name> -b feature/<issue-number>/<change-name> origin/development
c. Update issue status: Add a comment "🚀 Pipeline started — processing change"
Launch one subagent per change. Maximum 5 concurrent agents — if more changes exist, queue them and launch new agents as earlier ones complete.
Read the full sub-agent prompt template at templates/sub-agent-prompt-template.md.
Replace {VARIABLES} before sending: <app-name>, <change-name>, <issue-number>, <owner/repo>, worktree path, branch name, {BROWSER_TESTING}, and the assigned <browser-N> (or "none").
Agent configuration:
isolation: "worktree" if the agent supports it, OR pre-create worktrees in Step 3run_in_background: true for all agents{BROWSER_TESTING} is all: assign browser numbers (browser-2 through browser-5, browser-7) to all agents{BROWSER_TESTING} is ui-only: assign browser numbers only to agents whose changes touch .vue, .js, .ts, or .css files; pass "none" for others{BROWSER_TESTING} is none: pass browser "none" for all agentsmodel: {PIPELINE_MODEL} (one model for all) or model: {CHANGE_MODELS}[change-name] (per-change) when launching each agentWhile agents are running:
Display progress updates:
## Pipeline Progress
| # | App | Change | Model | Status | Tasks | Quality | Browser | Docs |
|---|-----|--------|-------|--------|-------|---------|---------|------|
| 1 | procest | brp-kvk-register-sets | Sonnet | ✓ Complete | 7/7 | All pass | ✓ 3 scenarios | ✓ Updated |
| 2 | pipelinq | sla-tracking | Opus | ⏳ Running | 3/5 | — | — | — |
| 3 | pipelinq | routing | Sonnet | ⏳ Queued | — | — | — | — |
For each successfully completed change, first push the feature branch to origin (the worktree may not have pushed yet), then create a PR from the feature branch to development:
# Push the feature branch to origin (required before PR creation)
git -C /tmp/worktrees/<app>-<change-name> push -u origin feature/<issue-number>/<change-name>
# Now open the PR
gh pr create \
--repo <owner/repo> \
--base development \
--head feature/<issue-number>/<change-name> \
--title "feat(<app>): <Change Title>" \
--body "$(cat templates/pr-body-template.md)"
Read the PR body template at templates/pr-body-template.md and fill in the placeholders (summary bullets, tracking issue, task count, quality/browser results, feature doc paths, standards) before running gh pr create.
Update the original issue with a link to the PR.
After all PRs are created:
# For each completed change
cd <app-directory>
git worktree remove /tmp/worktrees/<app>-<change-name>
Display the complete pipeline results:
## Pipeline Complete
### Results
| # | App | Change | Model | Branch | PR | Tasks | Quality | Browser | Docs | Status |
|---|-----|--------|-------|--------|-----|-------|---------|---------|------|--------|
| 1 | procest | brp-kvk-register-sets | Sonnet | feature/103/brp-kvk-register-sets | #105 | 7/7 | ✓ | ✓ 3 | ✓ | Merged-ready |
| 2 | pipelinq | sla-tracking | Opus | feature/79/sla-tracking | #82 | 5/5 | ✓ | Skipped | ✓ | Merged-ready |
| ... |
### Summary
- Changes processed: N
- Successful: N
- Failed: N (with reasons)
- PRs created: N
- Total tasks implemented: N
- Total tests written: N
- Browser scenarios tested: N (or "Skipped")
- Feature docs created/updated: N
### Failed Changes (if any)
- <change-name>: <reason for failure>
Worktree preserved at: /tmp/worktrees/<app>-<change-name>
To resume: fix the issue and run `/opsx-pipeline <change-name>`
After execution, review what happened and append new observations to learnings.md under the appropriate section:
Each entry must include today's date. One insight per bullet. Skip if nothing new was learned.
/tmp/worktrees/<app>-<change-name> — NEVER modify the main working directory from a subagentfeature/<issue-number>/<change-name> based off origin/developmentdevelopment branch, never main or betadocs/features/ during archive. The feature overview table in docs/features/README.md must stay in sync.openspec command is not available, fall back to manual artifact creation (read proposal, create specs/design/tasks manually following the templates).