feat(pipeline): unify platform-specific pipelines with forge template variables#375
feat(pipeline): unify platform-specific pipelines with forge template variables#375nextlevelshit merged 3 commits intomainfrom
Conversation
Defines 7 user stories (P1-P3), 12 functional requirements, and 8 measurable success criteria for consolidating 25 platform-specific pipeline files into 7 unified pipelines with forge template variables.
…241) Phase 0 research covers pipeline similarity analysis, forge detection integration points, persona resolution strategy, and backward compatibility mechanism. Phase 1 design defines the ForgeInfo extension, PipelineContext injection helper, unified pipeline YAML structure, and deprecated name resolver.
… variables (#241) Replace 25 platform-specific pipeline YAML files (gh-*, gl-*, bb-*, gt-*) with 6 unified pipelines that use {{ forge.* }} template variables resolved at runtime based on git remote detection. Core changes: - Add PRTerm/PRCommand fields to ForgeInfo struct - Add InjectForgeVariables() to populate forge.* context variables - Resolve step.Persona, step.Exec.SourcePath, and requires.tools through ResolvePlaceholders() in the executor - Create unified implement, scope, research, rewrite, refresh, pr-review pipelines with {{ forge.prefix }}, {{ forge.cli_tool }}, {{ forge.pr_term }} - Add ResolveDeprecatedName() for backward-compatible name resolution with deprecation warnings (gh-implement -> implement, etc.) - Update suggest engine to prefer unified names over forge-prefixed - Delete 25 legacy pipeline YAMLs and 4 prompt directories (-4008 lines)
Code Review (Wave Pipeline)Verdict: REQUEST_CHANGES This PR consolidates 25+ forge-specific pipeline YAML files into unified pipelines using Critical Issues (must fix)1. Template-resolved 2. Deprecated name resolution not wired at pipeline loading layer (Quality/Security — HIGH) 3. CLAUDE.md references deprecated pipeline names (Quality — HIGH) Suggested Improvements
Positive Observations
Generated by Wave gh-pr-review pipeline |
Code Review (Wave Pipeline)Verdict: REQUEST_CHANGES This PR makes a strong architectural move — consolidating 25+ forge-specific pipeline/prompt files into 6 unified pipelines with Critical Issues (must fix)1. Persona naming mismatch breaks all 6 unified pipelines at runtimeUnified pipelines use Every step using Affected files: Fix options: (a) Add 2.
|
Reviewed code manually + partial automated review. CI all green. Merge-tree verified safe with recent #369 merge.
Summary
Replaces 25 platform-specific pipeline YAML files (
gh-*,gl-*,bb-*,gt-*) with 6 unified pipelines that use{{ forge.* }}template variables, resolved at runtime based on git remote detection.ForgeInfowithPRTerm/PRCommandfields; addedInjectForgeVariables()to populateforge.prefix,forge.cli_tool,forge.pr_term,forge.pr_commandin pipeline contextResolvePlaceholders()in the executor resolves template variables instep.Persona,step.Exec.SourcePath, andrequires.toolsbefore step executionimplement,scope,research,rewrite,refresh, andpr-reviewpipelines with platform-agnostic prompts using forge variablesResolveDeprecatedName()maps old prefixed names (e.g.,gh-implement→implement) with deprecation warningsCloses #241
Spec
See
specs/241-unify-platform-pipelines/for the full specification, research, implementation plan, and task breakdown.Key Changes
internal/forge/detect.goPRTerm,PRCommandtoForgeInfointernal/pipeline/context.goInjectForgeVariables()for template variable populationinternal/pipeline/executor.goResolvePlaceholders()for runtime template resolutioninternal/pipeline/deprecated.goResolveDeprecatedName()with warning logsinternal/defaults/pipelines/*.yamlinternal/defaults/prompts/implement/internal/suggest/engine.gointernal/preflight/preflight.goTest Plan
go test -race ./...— all 29 packages passInjectForgeVariables()(6 test cases covering GitHub, GitLab, Bitbucket, Gitea, unknown, empty remote)ResolvePlaceholders()(placeholder resolution in persona, source path, tools)ResolveDeprecatedName()(all 10 deprecated → unified mappings + unknown passthrough)embed_test.goto validate unified pipeline namesPRTerm/PRCommandfieldsKnown Limitations
{{ forge.* }}patterns but may need upgrading if more complex templating is needed later