Skip to content

Review agent should flag accidentally included internal scaffolding files #2220

Description

@fullsend-ai-retro

What happened

On PR #1814, the author accidentally committed an internal spec file at docs/superpowers/specs/2026-06-02-host-side-api-server-design.md alongside the ADR it was used to generate (ADR 0046). The review bot ran on the initial commit (2026-06-02) and approved with a single [low] finding about Tier 3 scope in architecture.md. It did not flag the spec file. Human reviewer rh-hemartin caught the issue the next day (2026-06-03), leaving 10 comments on the spec file and noting it should be renamed or removed. The author removed it entirely in the next revision (2026-06-09), explaining it was the internal document used by the superpowers skill to create the ADR and was never intended for the PR.

What could go better

The review agent should recognize when a PR includes files from paths that are typically internal scaffolding or tooling artifacts — paths like docs/superpowers/specs/, internal/scaffold/, or similar patterns that indicate generated/source material not meant for the final changeset. This is a high-confidence finding: the file was clearly an input artifact (spec used to generate the ADR) that leaked into the output PR. The bot's current review dimensions (technical accuracy, correctness, security) don't include a 'scope hygiene' check for unexpected file paths. This type of issue is distinct from existing proposals about docs review quality (#1480) or ADR-specific review behavior (#1659) — those address the depth of feedback on legitimate files, not the detection of files that shouldn't be present at all.

Proposed change

Add a scope-hygiene check to the review agent (or as a review sub-agent dimension) that flags files from known internal/scaffolding paths. The check should: (1) maintain a configurable list of path patterns considered internal (e.g., docs/superpowers/specs/**, internal/scaffold/**, .fullsend/** when reviewing the source repo), (2) flag any files matching these patterns with a [medium] or higher finding when they appear in a PR diff, and (3) include the rationale that these paths typically contain tooling artifacts not intended for the final changeset. This could be implemented in the review orchestrator's pre-flight checks (before dispatching sub-agents) or as a lightweight sub-agent focused on diff scope validation.

Validation criteria

On the next 5 PRs to fullsend-ai/fullsend that include files from docs/superpowers/specs/ or similar internal paths, the review agent should produce a finding flagging those files as potentially unintended inclusions. Verify by checking review bot comments on PRs that touch those paths. A false-positive rate below 20% (i.e., at most 1 in 5 flagged files was actually intended) would indicate the check is well-calibrated.


Generated by retro agent from #1814

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/reviewReview agentcomponent/harnessAgent harness, config, and skills loadingfeatureFeature-category issue awaiting human prioritizationpriority/mediumNormal priority, plan for next cycletriagedTriaged but awaiting human prioritization

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions