130 lines
3.3 KiB
Markdown
130 lines
3.3 KiB
Markdown
# stage assessor
|
|
|
|
```output
|
|
{ upgrade_plan, breaking_changes, baseline_checks, rollback_notes, revision_count: 0, max_revisions }
|
|
Preserve the dependency, target version, and user constraints.
|
|
```
|
|
|
|
```prompt
|
|
Extract the requested dependency, target version, and constraints from the user's
|
|
runtime prompt; ask for missing requirements by returning error rather than
|
|
guessing. Infer repository context from the workspace. Initialize revision_count=0
|
|
and max_revisions=2 unless a lower budget is requested, and preserve these fields.
|
|
Inspect manifests, lockfiles, supported runtimes, and release/migration notes.
|
|
Execute baseline checks and distinguish pre-existing failures from upgrade risks.
|
|
Plan the smallest compatible upgrade; return incompatible if the requested version
|
|
violates constraints. Do not broaden the upgrade to unrelated dependencies.
|
|
```
|
|
|
|
```edges
|
|
success -> updater
|
|
incompatible -> #failure
|
|
error -> #failure
|
|
```
|
|
|
|
```configs
|
|
provider=opencode-go
|
|
model=deepseek-v4.1-flash
|
|
retries=0
|
|
```
|
|
|
|
# stage updater
|
|
|
|
```output
|
|
{ changed_files, resolved_version, migration_changes, revision_count, max_revisions }
|
|
Preserve baseline evidence and rollback notes.
|
|
```
|
|
|
|
```prompt
|
|
Use the project's package manager to update the requested dependency and lockfile.
|
|
Apply necessary API migrations and focused regression coverage. Preserve unrelated
|
|
edits. On revision increment revision_count, or return exhausted if over budget.
|
|
Do not disable checks, force unsafe resolutions, or run production migrations.
|
|
```
|
|
|
|
```edges
|
|
success -> verifier
|
|
exhausted -> #failure
|
|
error -> #failure
|
|
```
|
|
|
|
```configs
|
|
provider=opencode-go
|
|
model=deepseek-v4.1-flash
|
|
retries=0
|
|
```
|
|
|
|
# stage verifier
|
|
|
|
```output
|
|
{ verification_results, dependency_tree, feedback?, revision_count, max_revisions }
|
|
Preserve migration changes and rollback notes.
|
|
```
|
|
|
|
```prompt
|
|
Execute clean-install, build, tests, and relevant compatibility/security checks.
|
|
Confirm the resolved dependency version and compare with baseline results. Report
|
|
exact commands and exit codes. Return regressions for upgrade-caused failures,
|
|
success only when required checks pass, or error when verification cannot run.
|
|
```
|
|
|
|
```edges
|
|
success -> reviewer
|
|
regressions -> updater
|
|
error -> #failure
|
|
```
|
|
|
|
```configs
|
|
provider=opencode-go
|
|
model=deepseek-v4.1-flash
|
|
retries=0
|
|
```
|
|
|
|
# stage reviewer
|
|
|
|
```output
|
|
{ approval, review_findings, verification_results, rollback_notes }
|
|
Preserve the dependency identity and resolved version.
|
|
```
|
|
|
|
```prompt
|
|
Review lockfile churn, transitive changes, compatibility, licensing/security findings,
|
|
and migration correctness. Reject unexplained or unsafe changes rather than accepting
|
|
passing tests alone. Return success only with explicit approval and recorded evidence.
|
|
```
|
|
|
|
```edges
|
|
success -> report
|
|
rejected -> #failure
|
|
error -> #failure
|
|
```
|
|
|
|
```configs
|
|
provider=opencode-go
|
|
model=deepseek-v4.1-flash
|
|
retries=0
|
|
```
|
|
|
|
# stage report
|
|
|
|
```output
|
|
{ upgrade_summary, evidence, rollback_notes, remaining_risks }
|
|
```
|
|
|
|
```prompt
|
|
Summarize the exact version change, required migrations, verified checks, and rollback
|
|
instructions. Include remaining risks. Do not merge, deploy, publish, or automatically
|
|
roll back user changes. Return success only for an approved, verified upgrade.
|
|
```
|
|
|
|
```edges
|
|
success -> #success
|
|
error -> #failure
|
|
```
|
|
|
|
```configs
|
|
provider=opencode-go
|
|
model=deepseek-v4.1-flash
|
|
retries=0
|
|
```
|