Implement tasks using the chosen strategy
Inline strategy:
The orchestrator implements all tasks directly without spawning an implementor subagent:
- follow the
openspec-apply-change skill/process for the change
- sync delta specs when implementation requires spec synchronization, but never archive the change
- ignore any task that asks for the change to be archived;
verify-openspec is responsible for archiving when it is satisfied
- keep changes minimal and focused
- create small, focused git commits as coherent pieces of work are completed
- run targeted validation while implementing
- never push to remote
Single-implementor strategy:
Launch one write-capable subagent for all remaining tasks:
- instruct it to implement all remaining top-level tasks in sequence, completing all nested subtasks within each before moving to the next
- follow the
openspec-apply-change skill/process for the change
- sync delta specs when implementation requires spec synchronization, but never archive the change
- ignore any task that asks for the change to be archived;
verify-openspec is responsible for archiving when it is satisfied
- read the OpenSpec context files before editing
- keep changes minimal and focused
- create small, focused git commits as coherent pieces of work are completed
- run targeted validation while implementing
- never push to remote
Ask the implementor to report back with:
- top-level tasks completed
- nested subtasks completed
- commits created
- tests run
- blockers or open questions
Per-task strategy:
Launch a dedicated fresh write-capable subagent for the current top-level task only. Do not reuse the prior task's implementor for later top-level tasks.
The implementor prompt should instruct it to:
- implement only the selected change
- focus only on the current top-level task and complete all of its nested subtasks before stopping
- follow the
openspec-apply-change skill/process for the change
- sync delta specs when implementation requires spec synchronization, but never archive the change
- ignore any task that asks for the change to be archived;
verify-openspec is responsible for archiving when it is satisfied
- read the OpenSpec context files before editing
- keep changes minimal and focused
- create small, focused git commits as coherent pieces of work are completed
- run targeted validation while implementing
- never push to remote
Ask the implementor to report back with:
- the top-level task completed
- nested subtasks completed
- commits created
- tests run
- blockers or open questions
For all strategies: if the implementor (or the orchestrator in inline mode) is blocked, stop and surface the blocker to the user.
Run validation and review
The validation and review cadence depends on the execution strategy.
7a. Determine the review type
Inspect the change artifacts and implementation to decide whether this is a Terraform entity change.
Treat it as a Terraform entity change when the change is centered on a Terraform resource or data source, for example:
- specs reference
Resource implementation: or Data source implementation:
- changed code is primarily in a resource/data source package
7b. Validation requirements (all strategies)
Required baseline commands:
- run
make lint
- run
make build
Required acceptance-test validation:
- determine which acceptance tests are relevant to the code changed
- prefer targeted acceptance test runs using
go test -v [-run 'filter'] <package>
- run them with
TF_ACC=1
- include the commonly required environment variables from
dev-docs/high-level/testing.md when needed: ELASTICSEARCH_ENDPOINTS, ELASTICSEARCH_USERNAME, ELASTICSEARCH_PASSWORD, and KIBANA_ENDPOINT
- before considering starting a new local stack, check whether the Elastic stack is already running using the guidance in
dev-docs/high-level/testing.md
- only run
make testacc when the user explicitly instructs you to run the full acceptance suite
If the change does not affect code that has relevant acceptance tests, say so explicitly and explain why targeted acceptance coverage is not applicable.
7c. Inline strategy: lightweight review
The orchestrator runs validation commands (make lint, make build, relevant acceptance tests) directly rather than spawning a validation subagent.
For straightforward changes (config, docs, Makefile, CI, spec-only), a self-review by the orchestrator is sufficient. Do not spawn review subagents.
For changes that touch non-trivial logic (custom types, plan modifiers, complex CRUD, error handling), spawn a minimal set of review subagents:
- Critical code review: review for coding standards, idiomatic patterns, logic issues, error handling gaps
- Proposal compliance review: run the
openspec-verify-change skill/process
- Add coverage review only if the change involves a Terraform entity
7d. Single-implementor strategy: one review round
After all tasks are complete, launch the full parallel review battery once:
a. Validation runner - launch a dedicated validation subagent to run the validation requirements from step 7b. Use a subagent so these checks do not consume the orchestrator's working context.
b. Critical code review - review for coding standards, idiomatic Go/Terraform provider patterns, obvious logic issues, error handling gaps, and risky regressions. Return prioritized findings only.
c. Proposal compliance review - run the openspec-verify-change skill/process for the same change. Return only actionable mismatches, missing work, or notable warnings.
d. Coverage review for Terraform entities - if this is a Terraform entity change, run the schema-coverage skill/process. Focus on untested or weakly tested high-risk attributes and behaviors.
e. Coverage review for non-entity changes - if this is not a Terraform entity change, run a thorough test analysis instead. Prefer explicit coverage tooling where possible, for example go test -cover. Identify high-risk code paths that lack direct test coverage.
Run the validation runner in parallel with the other review subagents, not as a separate serial phase.
7e. Per-task strategy: review after each top-level task
After each top-level task's implementor reports completion, launch the same full parallel review battery described in 7d (validation runner, critical code review, proposal compliance review, and the appropriate coverage review).
Run the validation runner in parallel with the other review subagents for the same top-level task.
For all review subagents, ask them to return:
- severity
- concise finding
- evidence
- recommended fix