.agents/skills/openspec-continue-change/SKILL.md
Continue working on an OpenSpec change by creating the next artifact. Use when the user wants to progress their change, create the next artifact, or continue their workflow.
npx skillsauth add em-jones/staccato-toolkit openspec-continue-changeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Continue working on a change by creating the next artifact.
Input: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
Steps
If no change name provided, prompt for selection
Run openspec list --json to get available changes sorted by most recently modified. Then use the AskUserQuestion tool to let the user select which change to work on.
Present the top 3-4 most recently modified changes as options, showing:
schema field if present, otherwise "spec-driven")lastModified field)Mark the most recently modified change as "(Recommended)" since it's likely what the user wants to continue.
IMPORTANT: Do NOT guess or auto-select a change. Always let the user choose.
Check current status
openspec status --change "<name>" --json
Parse the JSON to understand current state. The response includes:
schemaName: The workflow schema being used (e.g., "spec-driven")artifacts: Array of artifacts with their status ("done", "ready", "blocked")isComplete: Boolean indicating if all artifacts are completeIf design.md exists and contains a populated ## Prerequisite Changes table (non-n/a):
openspec/changes/<change-name>/design.mdopenspec status --change "<prereq-name>" --json 2>/dev/null1/3 complete) and count open tasks⚠ <prereq-name>: not yet createdPrerequisite Changes: section with the prereq status summaryChange: my-feature
Status: 2/3 artifacts complete
Prerequisite Changes:
- add-golang-support: 1/3 artifacts, 2 open tasks
- ⚠ add-testing-framework: not yet created
Act based on status:
If all artifacts are complete (isComplete: true):
If artifacts are ready to create (status shows artifacts with status: "ready"):
status: "ready" from the status outputopenspec instructions <artifact-id> --change "<name>" --json
context: Project background (constraints for you - do NOT include in output)rules: Artifact-specific rules (constraints for you - do NOT include in output)template: The structure to use for your output fileinstruction: Schema-specific guidanceoutputPath: Where to write the artifactdependencies: Completed artifacts to read for contexttemplate as the structure - fill in its sectionscontext and rules as constraints when writing - but do NOT copy them into the fileIf no artifacts are ready (all blocked):
After creating an artifact, show progress
openspec status --change "<name>"
Output
After each invocation, show:
Artifact Creation Guidelines
The artifact types and their purpose depend on the schema. Use the instruction field from the instructions output to understand what to create.
Common artifact patterns:
spec-driven schema (proposal → specs → design):
proposal.md: Ask user about the change if not clear. Fill in Why, What Changes, Capabilities, Impact.
td is initialized (td init if needed), create the change root feature issue (td create "<change-name>" --type feature [--parent <epic-id>]), create the change-level board (td board create "<change-name>" --query "descendant_of(<change-id>)"), and add frontmatter (td-board, td-issue) to proposal.md.specs/<capability>/spec.md: Create one spec per capability listed in the proposal's Capabilities section (use the capability name, not the change name).
td create "<capability>" --type feature --parent <change-id> → <spec-id>td board create "<change-name>-<capability>" --query "descendant_of(<spec-id>)"td create "Implement: <req-name>" --type task --parent <spec-id> → collect all <req-task-id>std create "worker: <capability>" --type feature --parent <change-id> --labels "worker"
# → <worker-epic-id>
td create "Context & Skills: <capability>" \
--type task \
--parent <change-id> \
--labels "skill:td-task-management,prerequisite" \
--body "This is a prerequisite task. Complete this first, then proceed to implementation tasks.
Instructions:
Provide context: Read and understand specs/<capability>/spec.md. Paste its complete contents here.
List all tasks without skills: Run `.ops/scripts/worker/tasks-without-skills.ts <worker-epic-id>`
Assign skills: For each task, run `td update <task-id> --labels 'skill:<skill-name>'`
Verify: Run the script again to confirm all tasks have skills (should output empty `[]`)
Mark complete and proceed to implementation tasks"
# → <context-task-id>
6. Re-parent all requirement tasks under the worker epic: bash
td update <req-task-id> --parent <worker-epic-id> # repeat for each req task
7. Link all issues to the spec file: bash
td link <spec-id> specs/<capability>/spec.md --role reference
td link <worker-epic-id> specs/<capability>/spec.md --role reference
td link <req-task-id> specs/<capability>/spec.md --role reference # each task
td link <context-task-id> specs/<capability>/spec.md --role reference
```
8. Add frontmatter (td-board, td-issue) to spec.md pointing to <spec-id>.
Worker epic purpose: The orchestrator (development-orchestrator) dispatches a worker subagent via the Task tool (subagent_type: "worker") for this capability. The worker receives <worker-epic-id> as its entry point, runs td ws start "<capability>-worker" then td ws tag <worker-epic-id>, uses td context <worker-epic-id> to load handoff state, and uses td-next-task.ts <worker-epic-id> (see scripts/td-next-task.ts) to find its next task within the tranche.
After creating all requirement tasks for each capability, run the rule-coverage audit (see Rule-Coverage Audit below).
After the rule-coverage audit, run the quality tooling audit for this capability (see Quality Tooling Audit below).
design.md: Document technical decisions, architecture, and implementation approach.
td create "<task>" --type task --parent <change-id> → collect all <cross-task-id>std create "worker: cross-cutting" --type feature --parent <change-id> --labels "worker"
# → <cc-worker-epic-id>
td create "Context & Skills: cross-cutting" \
--type task \
--parent <change-id> \
--labels "skill:td-task-management,prerequisite" \
--body "This is a prerequisite task. Complete this first, then proceed to implementation tasks.
Instructions:
Provide context: Read and understand design.md. Paste its complete contents here.
List all tasks without skills: Run `.ops/scripts/worker/tasks-without-skills.ts <worker-epic-id>`
Assign skills: For each task, run `td update <task-id> --labels 'skill:<skill-name>'`
Verify: Run the script again to confirm all tasks have skills (should output empty `[]`)
Mark complete and proceed to implementation tasks"
# → <cc-context-task-id>
4. Re-parent all cross-cutting tasks under the worker epic: bash
td update <cross-task-id> --parent <cc-worker-epic-id> # repeat for each task
5. Link all cross-cutting tasks and the worker epic to design.md: bash
td link <cc-worker-epic-id> design.md --role reference
td link <cross-task-id> design.md --role reference # each task
td link <cc-context-task-id> design.md --role reference
```
6. Add frontmatter (td-board, td-issue) to design.md pointing to the change root.
Note: if a change has only one capability and no cross-cutting tasks, the single worker epic from the specs phase is sufficient — omit the cross-cutting worker epic.
component frontmatter field in design.md: look up the ## Catalog Entities table. For each row where Kind is Component and Action is create or existing, find the entity file and read its first-line path comment (e.g. # src/ops/workloads) to get the repo-relative component path. Set component to that path (string for one, YAML list for multiple). If no Component entities are declared (n/a), omit the field.For other schemas, follow the instruction field from the CLI output.
Every worker epic must follow a two-phase approach to task execution:
Before any implementation task is assigned to a worker subagent, the worker epic must have an initial prerequisite task that:
skill:td-task-management.ops/scripts/worker/tasks-without-skills.ts <worker-epic-id> to find all tasks in the epic without skill labelsskill: labels to each task based on the requirements and contextFor capability-specific worker epics (created during specs phase):
After creating the worker epic and re-parenting all requirement tasks, create this prerequisite task:
td create "Context & Skills: <capability>" \
--type task \
--parent <change-id> \
--labels "skill:td-task-management,prerequisite" \
--body "This is a prerequisite task. Complete this first, then proceed to implementation tasks.
**Instructions:**
1. **Provide context**: Read and understand specs/<capability>/spec.md. Paste its complete contents here as context for understanding this capability's requirements.
2. **List all tasks in this epic without skill assignments**:
- Run: \`.ops/scripts/worker/tasks-without-skills.ts <worker-epic-id>\`
- This will output a JSON array of all tasks in this epic that lack a 'skill:' label
3. **Assign skills to each task**:
- For each task returned by the script above, determine the appropriate skill(s) needed
- Run: \`td update <task-id> --labels 'skill:<skill-name>'\` for each task
- Examples of skill labels: \`skill:go-developer\`, \`skill:typescript\`, \`skill:orchestrator\`, etc.
- Consult the design.md Agent Skills table and the task requirements to determine the right skill
4. **Verify completion**:
- Run the script again: \`.ops/scripts/worker/tasks-without-skills.ts <worker-epic-id>\`
- The output should be empty \`[]\` indicating all tasks now have skill labels
5. **Mark this task complete** and the worker can then proceed to work on implementation tasks"
For cross-cutting worker epics (created during design phase):
After creating the cross-cutting worker epic and re-parenting all cross-cutting tasks, create this prerequisite task:
td create "Context & Skills: cross-cutting" \
--type task \
--parent <change-id> \
--labels "skill:td-task-management,prerequisite" \
--body "This is a prerequisite task. Complete this first, then proceed to implementation tasks.
**Instructions:**
1. **Provide context**: Read and understand design.md. Paste its complete contents here as context for understanding cross-cutting work for this change.
2. **List all tasks in this epic without skill assignments**:
- Run: \`.ops/scripts/worker/tasks-without-skills.ts <worker-epic-id>\`
- This will output a JSON array of all tasks in this epic that lack a 'skill:' label
3. **Assign skills to each task**:
- For each task returned by the script above, determine the appropriate skill(s) needed
- Run: \`td update <task-id> --labels 'skill:<skill-name>'\` for each task
- Examples of skill labels: \`skill:go-developer\`, \`skill:typescript\`, \`skill:orchestrator\`, etc.
- Consult the design.md Agent Skills table and the task requirements to determine the right skill
4. **Verify completion**:
- Run the script again: \`.ops/scripts/worker/tasks-without-skills.ts <worker-epic-id>\`
- The output should be empty \`[]\` indicating all tasks now have skill labels
5. **Mark this task complete** and the worker can then proceed to work on implementation tasks"
After the context & skill assignment task is complete, all other tasks in the worker epic will have skill: labels assigned (see Phase 1). The worker then proceeds to implement tasks using the standard workflow:
.ops/scripts/worker/td-next-task.ts <worker-epic-id> to find the next actionable taskskill: label before returning itWhen creating any task (specs-phase, cross-cutting, gates, audits, etc.), follow this pattern:
For tasks that will have explicit skills assigned in Phase 1:
# No skill label at creation time — will be assigned in Phase 1 task
td create "<task-title>" --type task --parent <parent-id> --body "..."
For tasks that are created with a predefined skill (e.g., research, audit, gate tasks):
# Add skill label at creation time for tasks that won't go through Phase 1
td create "<task-title>" --type task --parent <parent-id> --labels "skill:<skill-name>" --body "..."
Examples of tasks that should have skills at creation:
--labels "skill:td-task-management"--labels "skill:td-task-management"--labels "skill:dev-portal-manager"--labels "skill:devops-automation"The rule-coverage audit ensures that pattern rules exist for every domain a capability touches. It runs twice per change: once during the specs phase (per capability), and once during the design phase (for cross-cutting concerns). Missing rules become research tasks that gate their dependent implementation tasks via td dep add.
The canonical list of pattern domains is at .opencode/rules/patterns/README.md.
If this file does not exist, warn:
"⚠ Rule-coverage audit skipped:
.opencode/rules/patterns/README.mdnot found. Create this file to enable rule-coverage auditing."
Then continue without creating research tasks.
After creating all requirement tasks for a capability:
Identify relevant pattern domains for this capability by reading its spec and consulting the trigger conditions in .opencode/rules/patterns/README.md. Common mappings:
code/testing, code/namingarchitecture/api-designarchitecture/boundariescode/error-handlingarchitecture/async-messagingarchitecture/data-modelingdelivery/observabilityFor each relevant domain, check whether the rule file exists:
ls .opencode/rules/patterns/<layer>/<domain>.md 2>/dev/null
If the rule file EXISTS: link it to each requirement task that benefits from it:
td link <req-task-id> .opencode/rules/patterns/<layer>/<domain>.md --role reference
If the rule file is MISSING: create a research task.
First, ensure the td-research feature issue exists under the change root:
# Only create once per change — check if it already exists first
td create "research: <change-name>" --type feature --parent <change-root-id>
# Capture: td-research-id
Then create the research task:
td create "Create rule: patterns/<layer>/<domain>.md" \
--type task \
--parent <td-research-id> \
--labels "skill:td-task-management" \
--body "Needed by: <capability-name> capability
Triggered by: <what in the capability requires this pattern>
Canonical ref: .opencode/rules/patterns/README.md#<domain>
Sources: <source literature from canonical README entry>"
# Capture: td-research-task-id
Wire the dependency from each affected requirement task:
td dep add <req-task-id> <td-research-task-id>
De-duplicate: if a research task for this domain was already created earlier in the same change (e.g., from a prior capability), reuse the existing research task ID — do not create a duplicate.
Show audit summary after each capability:
Rule coverage for <capability>:
✓ code/testing (exists)
✓ code/error-handling (exists)
⚠ architecture/api-design (missing) → research task td-xxxxx created, blocks td-yyyyy, td-zzzzz
After creating cross-cutting tasks from design.md:
Review the ## Technology Adoption & Usage Rules table in design.md. For each technology listed, identify implied pattern domains using the trigger conditions.
Review explicit pattern decisions in the design (e.g., "we use REST", "we use message queues", "we deploy to AWS").
For each implied domain:
Show supplement summary:
Design-phase rule-coverage supplement:
✓ delivery/ci-cd (already covered by research task td-xxxxx)
⚠ operations/security (missing, not caught in specs phase) → research task td-aaaaa created, blocks td-bbbbb
When a worker closes a research task (the rule file now exists), they SHOULD link the rule file to the requirement tasks that depended on it:
td link <req-task-id> .opencode/rules/patterns/<layer>/<domain>.md --role reference
This completes the two-way linkage so future workers see the rule in td show <req-task-id>.
Evaluates whether this change requires agent skills to be created or updated. Runs once after design.md is complete.
Purpose: Skills encode how agents behave with technologies/workflows. Distinct from rules (which govern code) — skills govern agent behavior.
Process:
## Agent Skills table in design.mdcreate or update action:
.opencode/skills/<skill-name>/SKILL.md existstd create "Skill: create/update <skill-name>" --type task --parent <change-root-id> --labels "skill:dev-portal-manager"td link <task-id> design.md --role referenceOutput example:
Skill audit:
⚠ create .opencode/skills/dev-portal-manager/SKILL.md → task td-xxxxx created
✓ update .opencode/skills/platform-architect/SKILL.md → task td-yyyyy exists
If ## Agent Skills table absent: warn and skip ("⚠ Skill audit skipped: table not found in design.md")
Ensures every technology has comprehensive tooling (linting, formatting, testing) in CI. Missing tooling → parallel OpenSpec changes + gate tasks. See Quality Tooling Pattern Rules.
Specs Phase (per capability):
openspec new change "add-<tech>-<kind>"), then gate task (skill:devops-automation, de-duplicate per tech)Design Phase (supplement):
Guardrails: Run after rule-coverage audit (specs and design phases). Create parallel changes if tooling missing — do not defer. Gate tasks block completion only, not implementation.
Ensures every dependency in Technology Adoption table either exists in Tech Radar (ring Adopt) or has a prerequisite change. Runs after ## Technology Adoption & Usage Rules populated.
Process:
n/a row in Technology Adoption table:
✓ and continue⚠ (no action — ring progression is human-driven)adopt-<tech-kebab> change + gate taskGuardrails: Not optional. Skip n/a rows. Gate task title format MUST be Gate: <prereq-name> complete. Case-insensitive tech name matching. If docs/tech-radar.json absent, warn and skip.
Ensures catalog entities exist for every new component/tool/service. Runs after radar check. Use dev-portal-manager skill.
Process:
## Catalog Entities table from design.mdcreate rows: check if .entities/<kind>-<name>.yaml exists; create task if absentexisting rows: verify file exists; warn if absentn/a: apply heuristics (new src/ dir, new packages in devbox.json, new .github/workflows/ files); create review task if any fire (max one per change)Guardrails: Not optional. Skip if table absent (warn). ADR, TechDocs, and content tasks created for every Component (not conditional). Backstage tasks at design time (full board visibility of post-archive work).
Spawns, gates, and announces emergent changes declared in design. Runs after catalog audit. For each non-n/a row in ## Prerequisite Changes table in design.md:
openspec new change "<prereq-name>")Gate: <prereq-name> completeGuardrails: Not optional. Skip if table absent (warn). Gate title format MUST be exact (Gate: <prereq-name> complete) for orchestrator to find gates. De-duplicate gate tasks.
Guardrails
context and rules are constraints for YOU, not content for the file
<context>, <rules>, <project_context> blocks into the artifact## Technology Adoption & Usage Rules table is populated during design authoring. If docs/tech-radar.json is absent, warn and skip.## Agent Skills table is absent, warn and skip — do not silently omit.## Catalog Entities table is absent, warn and skip — do not silently omit. When entities are present, ADR annotation, TechDocs scaffolding, TecDocs content, and Tech Radar tasks are always created.## Prerequisite Changes table is absent from design.md, warn and skip.tools
<!--VITE PLUS START--> # Using Vite+, the Unified Toolchain for the Web This project is using Vite+, a unified toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, Oxfmt, and Vite Task. Vite+ wraps runtime management, package management, and frontend tooling in a single global CLI called `vp`. Vite+ is distinct from Vite, but it invokes Vite through `vp dev` and `vp build`. ## Vite+ Workflow `vp` is a global binary that handles the full development lifecycle. Run `vp help` to pr
development
Guide for building performant data tables. Uses tanstack-table for table logic (sorting, filtering, pagination) and tanstack-virtual for rendering large datasets efficiently.
development
Expert guidance for building observable, expressive, and fault-tolerant TypeScript applications using the effect-ts/effect ecosystem. Covers Effect<A, E, R> type, error management, dependency injection via Layers, observability (logging, metrics, tracing), concurrency with Fibers, retry/scheduling, Schema validation, Streams, and Sinks.
tools
Complete E2E (end-to-end) and integration testing skill for TypeScript/NestJS projects using Jest, real infrastructure via Docker, and GWT pattern. ALWAYS use this skill when user needs to: **SETUP** - Initialize or configure E2E testing infrastructure: - Set up E2E testing for a new project - Configure docker-compose for testing (Kafka, PostgreSQL, MongoDB, Redis) - Create jest-e2e.config.ts or E2E Jest configuration - Set up test helpers for database, Kafka, or Redis - Configure .env.e2e environment variables - Create test/e2e directory structure **WRITE** - Create or add E2E/integration tests: - Write, create, add, or generate e2e tests or integration tests - Test API endpoints, workflows, or complete features end-to-end - Test with real databases, message brokers, or external services - Test Kafka consumers/producers, event-driven workflows - Working on any file ending in .e2e-spec.ts or in test/e2e/ directory - Use GWT (Given-When-Then) pattern for tests **REVIEW** - Audit or evaluate E2E tests: - Review existing E2E tests for quality - Check test isolation and cleanup patterns - Audit GWT pattern compliance - Evaluate assertion quality and specificity - Check for anti-patterns (multiple WHEN actions, conditional assertions) **RUN** - Execute or analyze E2E test results: - Run E2E tests - Start/stop Docker infrastructure for testing - Analyze E2E test results - Verify Docker services are healthy - Interpret test output and failures **DEBUG** - Fix failing or flaky E2E tests: - Fix failing E2E tests - Debug flaky tests or test isolation issues - Troubleshoot connection errors (database, Kafka, Redis) - Fix timeout issues or async operation failures - Diagnose race conditions or state leakage - Debug Kafka message consumption issues **OPTIMIZE** - Improve E2E test performance: - Speed up slow E2E tests - Optimize Docker infrastructure startup - Replace fixed waits with smart polling - Reduce beforeEach cleanup time - Improve test parallelization where safe Keywords: e2e, end-to-end, integration test, e2e-spec.ts, test/e2e, Jest, supertest, NestJS, Kafka, Redpanda, PostgreSQL, MongoDB, Redis, docker-compose, GWT pattern, Given-When-Then, real infrastructure, test isolation, flaky test, MSW, nock, waitForMessages, fix e2e, debug e2e, run e2e, review e2e, optimize e2e, setup e2e