Skip to content

Add pipeline resume from specific phase #43

Description

@PAMulligan

Description

Add the ability to resume the `/build-from-schema` pipeline from a specific phase. Currently if a phase fails or needs re-running, the only option is to restart from the beginning.

Why

The 10-phase pipeline can take significant time. If phase 5 (testing) reveals issues that require tweaking phase 3 (route generation), users shouldn't have to re-run phases 0-2. Resume support also handles interrupted sessions (network disconnect, context window limits).

Current State

The pipeline uses TodoWrite for progress tracking, but there's no mechanism to skip completed phases on re-run.

Acceptance Criteria

  • Add `--from-phase <phase-number|phase-name>` option to `/build-from-schema`
  • Validate that prerequisite artifacts exist before starting (e.g., `build-spec.json` must exist to start from phase 1)
  • Add `--only-phase ` to run a single phase
  • Persist phase completion status to a `.nerva/pipeline-state.json` file
  • On re-run without flags, detect previous state and prompt to resume or restart
  • Update the `orchestration` section of `pipeline.config.json`
  • CI passes

Example

```
/build-from-schema petstore.yaml --from-phase 3

Skipping Phase 0 (schema-intake) — build-spec.json exists
Skipping Phase 1 (database-design) — schema files exist
Skipping Phase 2 (tdd-scaffold) — test files exist
Starting Phase 3 (route-generation)...
```

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions