Skip to content

fix(upstream): Stop auto-creating opportunity issues - pattern matching generates noise #259

Closed

Description

@admarble

Problem

The /upstream skill auto-created issues for "opportunities" based on keyword matching. This generated noise:

After reviewing all three open assessments (#241, #255, #261), ~90% of flagged "opportunities" were noise. Only 3 out of 15+ were worth tracking, and all 3 were obvious to a human in seconds.

What's Already Done

The "no auto-create" behavior is already in practice — #261's assessment says "Per #259, no individual opportunity issues created." This is the highest-value change.

Remaining Work

1. Add outOfScope to baseline.json

Helps the skill skip irrelevant changes entirely rather than logging them as "no action":

{
  "outOfScope": [
    "PDF/document processing - users work with code and GitHub issues",
    "Slack/OAuth integrations - workflow is GitHub-centric",
    "Notebook editing - not a data science tool",
    "IDE-specific features (VSCode, JetBrains) - sequant is CLI/terminal focused",
    "Windows-specific fixes - sequant targets macOS/Linux"
  ]
}

2. Better assessment formatting

Assessment issues should have clear sections:

  • Actionable — breaking changes, deprecations, things that affect sequant
  • Informational — opportunities noted for human triage, no issues auto-created

3. Codify the "no auto-create" rule

Update the upstream skill to never auto-create individual opportunity issues. The assessment issue IS the deliverable. Human review handles triage (as demonstrated in #255, #261, #241 reviews).

Acceptance Criteria

  • AC-1: outOfScope added to baseline.json
  • AC-2: Upstream skill skips out-of-scope changes in assessment
  • AC-3: Assessment issues use Actionable/Informational sections
  • AC-4: Skill never auto-creates individual opportunity issues

What Was Cut (and Why)

The original proposal included userGoals, painPoints, and a semantic relevance check engine. This was over-engineered — human review of the assessment takes ~5 minutes and catches strategic nuance that automation can't. Negative ROI to automate.


Simplified from original proposal after reviewing #241, #255, #261 (2026-02-06)

Activity

  1. added
    enhancement
    upstream
    on Feb 4, 2026
  2. added
    auto-ready
    on Feb 16, 2026
  3. added
    ai-in-progress
    on Mar 1, 2026
  4. admarble commented on Mar 1, 2026

    @admarble
    ContributorAuthor

    Spec Plan — #259

    AC Checklist

    AC Description Verification
    AC-1 outOfScope added to baseline.json Unit Test
    AC-2 Upstream skill skips out-of-scope changes Unit Test
    AC-3 Assessment issues use Actionable/Informational sections Unit Test
    AC-4 Skill never auto-creates individual opportunity issues Unit Test

    Implementation Plan

    Phase 1: Type and config (AC-1)

    1. Add outOfScope?: string[] to Baseline interface in types.ts
    2. Add outOfScope array to .sequant/upstream/baseline.json
    3. Update getDefaultBaseline() in assessment.ts

    Phase 2: Out-of-scope filtering (AC-2)
    4. Add isOutOfScope() function in relevance.ts
    5. Modify analyzeChange() to skip out-of-scope changes

    Phase 3: Report restructuring (AC-3)
    6. Restructure generateAssessmentReport() — Actionable vs Informational sections
    7. Update getActionStatus() for opportunities → "Noted for review"

    Phase 4: Stop auto-creating opportunity issues (AC-4)
    8. Filter opportunities from createOrLinkFinding loop in assessVersion()

    Phase 5: Documentation
    9. Update .claude/skills/upstream/SKILL.md

    Files Changed

    File Change
    .sequant/upstream/baseline.json Add outOfScope array
    src/lib/upstream/types.ts Add outOfScope to Baseline
    src/lib/upstream/relevance.ts Add isOutOfScope(), modify analyzeChange()
    src/lib/upstream/report.ts Actionable/Informational sections
    src/lib/upstream/assessment.ts Filter opportunities, update default baseline
    .claude/skills/upstream/SKILL.md Documentation updates
  5. added
    ai-in-progress
    and removed
    ai-in-progress
    on Mar 1, 2026
  6. added a commit that references this issue on Mar 2, 2026
    2ac0237
  7. admarble commented on Mar 2, 2026

    @admarble
    ContributorAuthor

    /fullsolve Complete

    Issue: #259
    Status: READY_FOR_MERGE

    AC Coverage

    • AC-1: outOfScope added to baseline.json — MET
    • AC-2: Upstream skill skips out-of-scope changes — MET
    • AC-3: Assessment issues use Actionable/Informational sections — MET
    • AC-4: Skill never auto-creates individual opportunity issues — MET

    Summary

    • 8 files changed (+197, -69)
    • 98/98 upstream tests passing
    • Build succeeds
    • Report restructured: per-category sections → Actionable/Informational
    • Opportunities noted for human triage, no auto-created issues

    Iterations

    • Spec: 1 (pre-existing)
    • Exec: 1 (implementation pre-existing, tests added/fixed)
    • QA: 1

    PR: #344


    Ready for human review and merge.

  8. removed
    ai-in-progress
    on Mar 2, 2026
  9. admarble commented on Mar 2, 2026

    @admarble
    ContributorAuthor

    QA Review for Issue #259 (PR #344)

    AC Coverage

    AC Source Description Status Notes
    AC-1 Original outOfScope added to baseline.json MET 5 patterns added to both .sequant/upstream/baseline.json and skill documentation
    AC-2 Original Upstream skill skips out-of-scope changes MET isOutOfScope() implemented in relevance.ts:212, integrated into analyzeChange() at line 229
    AC-3 Original Assessment issues use Actionable/Informational sections MET Report restructured in report.ts:163-203 — Actionable (breaking, deprecation, new-tool, hook-change) and Informational (opportunities)
    AC-4 Original Skill never auto-creates individual opportunity issues MET assessment.ts:320 filters with issueWorthy = actionableFindings.filter(f => f.category !== "opportunity")

    Coverage: 4/4 AC items fully met


    CI Status

    Check State Bucket
    build (18.x) SUCCESS pass
    build (20.x) SUCCESS pass
    build (22.x) SUCCESS pass
    validate-skills SUCCESS pass
    typecheck SUCCESS pass
    validate-plugin SUCCESS pass

    CI Summary: 6 passed, 0 pending, 0 failed


    Quality Metrics

    Metric Value Status
    Type issues (any) 0 OK
    Deleted tests 0 OK
    Files changed 8 OK
    Lines added +197 -
    Lines deleted -69 -

    Test Coverage Analysis

    Changed File Tier Has Tests? Test File
    src/lib/upstream/relevance.ts Standard ✅ Yes __tests__/relevance.test.ts
    src/lib/upstream/report.ts Standard ✅ Yes __tests__/report.test.ts
    src/lib/upstream/assessment.ts Standard ✅ Yes __tests__/assessment.test.ts
    src/lib/upstream/types.ts Optional N/A Types only
    .sequant/upstream/baseline.json Optional N/A Config
    .claude/skills/upstream/SKILL.md Optional N/A Skill doc

    Coverage: 3/3 changed source files have corresponding tests
    98 tests passing across all 4 upstream test suites


    Code Review

    Strengths:

    • Clean separation of concerns: isOutOfScope() is a pure function with no side effects
    • Smart pattern matching: uses descriptive part before " - " separator, making outOfScope entries self-documenting
    • The opportunity filter in assessment.ts:320 is minimal and precise — single line change
    • Report restructuring consolidates 4 separate category sections into 2 semantic sections (Actionable/Informational), reducing noise
    • outOfScope is optional (string[]?) in the type definition, preserving backward compatibility
    • Default baseline includes outOfScope: [] — no breaking change for existing baselines

    Issues: None found.

    Suggestions: None — this is a well-scoped, focused change.


    Test Quality Review

    Category Status Notes
    Behavior vs Implementation ✅ OK Tests assert on outputs (true/false, category, impact), not internals
    Coverage Depth ✅ OK Tests cover: in-scope, out-of-scope, case-insensitive, empty list, integration with analyzeChange
    Mock Hygiene ✅ OK No mocks needed — pure functions
    Test Reliability ✅ OK Deterministic string matching, no timing dependencies

    Anti-Pattern Detection

    Code Patterns

    No anti-patterns detected. No N+1 queries, empty catch blocks, hardcoded secrets, or SQL injection patterns.

    Dependency Audit

    N/A — No package.json changes.


    Call-Site Review

    New exported functions detected: 1 (isOutOfScope)

    Function Call Sites Loop? Conditions AC Match
    isOutOfScope() relevance.ts:229 No Early return in analyzeChange() ✅ Matches AC-2

    isOutOfScope() is called at the top of analyzeChange() as an early-exit guard. If the change matches an out-of-scope pattern, it returns a no-action finding immediately, skipping all keyword/pattern matching. This is the correct placement — before any analysis work is done.


    Skill Command Verification

    Skill files changed: 1 (.claude/skills/upstream/SKILL.md)

    No new gh commands introduced in the diff. Changes are limited to:

    • Updated description text
    • Added outOfScope documentation to baseline JSON example
    • Restructured output format (Actionable/Informational sections)
    • Updated category table and issue creation rules

    Verification Status: Passed (no new commands to verify)


    CHANGELOG Verification

    Check Status
    CHANGELOG.md exists ✅ Found
    User-facing changes ✅ Yes (fix: commit — changes upstream skill behavior)
    [Unreleased] entry ⚠️ Missing

    Result: Missing CHANGELOG entry for user-facing changes. The upstream skill behavior change (no auto-creating opportunity issues, new outOfScope filtering) should be documented.


    Self-Evaluation

    • Verified working: Yes — 98 tests pass, build succeeds, code review confirms logic is correct
    • Test efficacy: High — isOutOfScope() has direct unit tests, analyzeChange() has integration test with outOfScope baseline, report tests verify Actionable/Informational sections
    • Likely failure mode: Edge case where an out-of-scope pattern's descriptive part (before " - ") accidentally matches a legitimate change. Mitigated by patterns being specific (e.g., "PDF/document processing" rather than just "PDF")
    • Verdict confidence: High — focused change with comprehensive tests and clean CI

    Verdict: AC_MET_BUT_NOT_A_PLUS

    All 4 AC items are fully met. Code quality is high and tests are comprehensive. However, a CHANGELOG entry under [Unreleased] is required for this user-facing behavior change before merging.

    Documentation

    • CHANGELOG entry needed (upstream skill behavior change)
    • Skill documentation updated (SKILL.md)
    • N/A — No README/docs changes needed

    Next Steps

    1. Add CHANGELOG entry under [Unreleased] > Fixed for fix(upstream): Stop auto-creating opportunity issues - pattern matching generates noise #259 (e.g., "Stop auto-creating opportunity issues in upstream assessments; add outOfScope filtering (fix(upstream): Stop auto-creating opportunity issues - pattern matching generates noise #259)")
    2. After CHANGELOG update, re-run /qa 259 for READY_FOR_MERGE verdict
  10. added 2 commits that reference this issue on Mar 2, 2026
  11. added 2 commits that reference this issue on Sep 9, 2026
    b007314
    51c74fe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    auto-readyenhancementupstream

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions