feat: implement wave ops commands (status, logs, cancel, artifacts)#1
Merged
nextlevelshit merged 19 commits intomainfrom Feb 2, 2026
Merged
feat: implement wave ops commands (status, logs, cancel, artifacts)#1nextlevelshit merged 19 commits intomainfrom
nextlevelshit merged 19 commits intomainfrom
Conversation
Add specification for new operational commands: - wave ps: view pipeline status - wave logs: view execution logs with --follow support - wave attach/stop: detached pipeline management - wave health: system health checks Includes 4 user stories (P1-P3), 22 functional requirements, and 6 measurable success criteria.
Initial plan.md template for 016-wave-ops-commands feature. To be completed with technical context and design decisions.
Update steps 2-4 (hypothesize, investigate, fix) to explicitly tell Claude to read from the artifacts/ directory where injected artifacts are placed. Previously, steps would ask for context instead of reading the available artifacts.
When CommandArgs is not provided, the test_suite validator now splits the Command string using strings.Fields() to extract the executable and arguments. This allows users to write natural commands like "go test ./... -v" instead of requiring separate command and command_args fields. Previously, the entire command string was passed as the executable name to exec.Command(), causing "no such file or directory" errors.
When ResultContent is empty (due to relay compaction, parsing failures, or adapter issues), skip writing output artifacts to preserve any existing content. This prevents a regression where artifacts get overwritten with empty content during token limit scenarios. Added regression test to verify existing artifact content is preserved when ResultContent is empty.
Add Claude Code command files for BMAD (Build Measure Analyze Design) workflow integration: - bmad.architecture - Create technical architecture from PRD - bmad.code-review - Validate code quality with review checklist - bmad.dev-story - Implement a single story from spec - bmad.epics - Create epic and story breakdown from architecture - bmad.help - Get contextual BMAD guidance - bmad.party - Multi-agent collaborative session - bmad.prd - Create Product Requirements Document - bmad.product-brief - Define problem, users, and MVP scope - bmad.quick-spec - Analyze codebase and produce tech-spec - bmad.sprint - Initialize sprint tracking - bmad.story - Create detailed story specification
Add supporting bash scripts for BMAD workflow: - bmad-quick-spec.sh - Quick path to generate tech specs - bmad-review.sh - Code review automation - bmad-setup.sh - Initialize BMAD project structure - bmad-sprint.sh - Sprint tracking initialization
Add templates for BMAD workflow documentation: - Product brief template - PRD (Product Requirements Document) template - Architecture document template - Epic and story templates - Sprint tracking templates
Add Claude Code command files for OpenSpec change management: - opsx.new - Create a new change proposal - opsx.ff - Fast-forward to generate design and tasks - opsx.apply - Execute implementation tasks - opsx.archive - Archive completed changes - opsx.onboard - Get started guide with workflow overview
Add supporting bash scripts for OpenSpec workflow: - opsx-new.sh - Create change proposal with directory structure - opsx-ff.sh - Fast-forward to generate design and tasks docs - opsx-apply.sh - Prepare context for task execution - opsx-archive.sh - Archive completed changes
Add templates for OpenSpec change management: - proposal.md - Change proposal with requirements and success criteria - design.md - Technical design document with architecture - tasks.md - Implementation task list with dependencies
Add additional test files for relay package: - relay_benchmark_test.go - Performance benchmarks - relay_concurrency_test.go - Concurrent access tests - relay_edge_cases_test.go - Edge case handling - relay_stress_test.go - Stress testing under load
Complete feature specification for Wave operational commands: - spec.md: 6 user stories (status, logs, clean, list runs, cancel, artifacts) - clarifications.md: 8 resolved design questions - plan.md: 8-phase implementation plan - tasks.md: 19 tasks with dependencies (38-50 hours estimated) - research.md: Codebase analysis with file:line references - checklists/implementation.md: Pre/post implementation checklist - quickstart.md: User guide with examples Key decisions resolved: - Log levels: --level all|info|error with --errors alias - Cancel: Database flag (graceful) + SIGTERM/SIGKILL (force) - Cleanup: Confirmation prompts, --force for CI, no daemon - Storage: SQLite event_log table for consistency
Add new operational commands for pipeline monitoring and management: - wave status: Show pipeline status (running, recent, by run-id) - wave logs: View pipeline event logs with filtering and follow mode - wave cancel: Cancel running pipelines (graceful and force modes) - wave artifacts: List and export pipeline artifacts Enhanced existing commands: - wave clean: Add --older-than, --status, --quiet flags with path traversal protection - wave list: Add runs subcommand for listing pipeline runs StateStore extensions: - New types: RunRecord, LogRecord, ArtifactRecord, CancellationRecord - New methods: CreateRun, UpdateRunStatus, GetRun, GetRunningRuns, ListRuns, DeleteRun, LogEvent, GetEvents, RegisterArtifact, GetArtifacts, RequestCancellation, CheckCancellation, ClearCancellation Schema additions: - pipeline_run table with status tracking - event_log table for NDJSON events - artifact table for produced files - cancellation table for cancel requests All commands support --format json for scripting integration. Tests pass with race detector.
96e3008 to
8e5380c
Compare
There was a problem hiding this comment.
Pull request overview
This pull request implements Wave operational commands for pipeline monitoring and management, adding capabilities for status checking, log viewing, pipeline cancellation, and artifact inspection as specified in spec 016-wave-ops-commands.
Changes:
- Added five new commands:
status,logs,cancel,artifacts, and enhancedcleanwith new filtering options - Extended state database schema with four new tables:
pipeline_run,event_log,artifact, andcancellation - Implemented
list runssubcommand for viewing recent pipeline executions - Enhanced pipeline executor to prevent overwriting artifacts with empty content during relay compaction
Reviewed changes
Copilot reviewed 70 out of 71 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| specs/016-wave-ops-commands/* | Complete specification with user stories, clarifications, and implementation checklists |
| internal/state/types.go | New types for run records, logs, artifacts, and cancellation tracking |
| internal/state/schema.sql | Database schema additions for ops commands with proper indexing |
| cmd/wave/commands/cancel.go | Cancel command with graceful and force termination support |
| cmd/wave/commands/artifacts.go | Artifacts listing and export functionality |
| cmd/wave/commands/list.go | Enhanced with runs subcommand for pipeline execution history |
| cmd/wave/commands/clean_test.go | Extended tests for new clean command flags |
| internal/pipeline/executor.go | Fix to preserve existing artifacts when ResultContent is empty |
| internal/contract/testsuite.go | Command string parsing improvements |
| README.md | Updated documentation with new commands and examples |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9 tasks
… entropy - Cancel command now returns Success: false when there are no running pipelines to cancel (was incorrectly returning Success: true) - Run ID suffix now uses crypto/rand for better collision resistance instead of truncated nanoseconds
4aeb4c2 to
8d07695
Compare
- Validate runID in forceKillRun to prevent path traversal - Validate artifact paths are within workspace before export
19 tasks
nextlevelshit
added a commit
that referenced
this pull request
Feb 23, 2026
Strip 130+ violations of CLAUDE.md rule #1 across 24 pipeline YAML files and 12 prompt templates. The executor now handles artifact injection and output path guidance via buildContractPrompt, so prompts no longer need to specify where to read/write. Removed: output path directives, artifact read instructions, inline JSON schema examples, and "matching the contract schema" phrases. Kept: semantic task descriptions and field meaning explanations.
3 tasks
nextlevelshit
added a commit
that referenced
this pull request
Feb 24, 2026
CLI commands like gh pr create --body-file need literal artifact paths. Clarify that rule #1 permits these while still forbidding inline schemas.
7 tasks
nextlevelshit
added a commit
that referenced
this pull request
Mar 4, 2026
feat: implement wave ops commands (status, logs, cancel, artifacts)
nextlevelshit
added a commit
that referenced
this pull request
Mar 4, 2026
Strip 130+ violations of CLAUDE.md rule #1 across 24 pipeline YAML files and 12 prompt templates. The executor now handles artifact injection and output path guidance via buildContractPrompt, so prompts no longer need to specify where to read/write. Removed: output path directives, artifact read instructions, inline JSON schema examples, and "matching the contract schema" phrases. Kept: semantic task descriptions and field meaning explanations.
nextlevelshit
added a commit
that referenced
this pull request
Mar 4, 2026
CLI commands like gh pr create --body-file need literal artifact paths. Clarify that rule #1 permits these while still forbidding inline schemas.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements spec 016-wave-ops-commands, adding operational commands for pipeline monitoring and management.
New Commands
wave status [run-id]- Show pipeline status (running, recent with--all, specific run details)wave logs [run-id]- View event logs with--follow,--tail,--errors,--step,--sincefilterswave cancel [run-id]- Cancel pipelines (graceful or--forcefor SIGKILL)wave artifacts [run-id]- List and export artifacts with--type,--step,--exportoptionswave list runs- List recent pipeline runs with--limit,--run-pipeline,--run-statusfiltersEnhanced Commands
wave clean- Added--older-than,--status,--quietflags with path traversal protectionStateStore Extensions
RunRecord,LogRecord,ArtifactRecord,CancellationRecordSchema Additions
pipeline_runtable with status trackingevent_logtable for NDJSON eventsartifacttable for produced filescancellationtable for cancel requestsImplementation Details
--format jsonfor scriptingTest plan
go test -race ./...)Review Summary