Skip to content

Add Tekton step-count and resource optimization guidance to cursor rules #3675

Description

@fullsend-ai-retro

What happened

PR #3602 (#3602) added build-vm-image v0.2 with 3 new SBOM steps (sbom-download, upload-sbom, report-sbom-url). The review bot completed 19 review runs between Jun 18 and Jul 7, analyzing the task YAML each time. None of the 35 inline findings addressed step count or resource efficiency. On Jun 22, human reviewer chmeliik commented on MIGRATION.md: 'Consider consolidating the steps if possible, fewer steps is better in Tekton (mainly due to compute resource requirements - it is the sum of all steps, not the max).' The author implemented this on Jun 25, merging upload-sbom and report-sbom-url into a single step. The existing .cursor/rules/tekton.mdc file contains guidance on base images, security (env vars over params), bash conventions (set -euo pipefail), and script language preferences, but nothing about step count, resource aggregation semantics, or consolidation best practices.

What could go better

The review agent could have suggested step consolidation on the first review run if the cursor rules included Tekton resource optimization guidance. Tekton computes pod resource requests as the sum of all step requests, not the maximum — a fact that significantly impacts scheduling in resource-constrained clusters. The bot had access to .cursor/rules/tekton.mdc but found no relevant guidance there. Confidence: high. The gap is clearly localized to missing documentation — the human reviewer applied knowledge the bot lacked, and the cursor rules are the established mechanism for conveying repo-specific conventions to the review agent. Uncertainty: the review agent may not always follow cursor rule guidance for optimization suggestions (vs hard requirements), so the improvement may be partial.

Proposed change

Add a 'Resource optimization' subsection to .cursor/rules/tekton.mdc with the following guidance: (1) Tekton pod resource requirements are the sum of all step resource requests — minimize step count to reduce scheduling overhead; (2) consolidate steps that share the same image and run sequentially, especially lightweight post-processing steps like result reporting; (3) when a step only writes a Tekton result value, merge it into the preceding step rather than running a separate container. This follows the same pattern as existing issues #3644 (changelog convention) and #3637 (CLI flag convention) which add domain knowledge to cursor rules.

Validation criteria

On the next PR that adds a new Tekton task with 3+ post-processing steps sharing the same image, the review agent suggests consolidating them and cites resource efficiency. Verify by checking the review output for step-consolidation suggestions. Alternatively, if a code agent creates a new task version, it produces consolidated steps from the start.


Generated by retro agent from #3602

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions