Skip to content

fix: move pattern-boost logic into triagePrompt - #53

Closed
TerminalGravity wants to merge 1 commit into
mainfrom
fix/triage-pattern-boost
Closed

fix: move pattern-boost logic into triagePrompt#53
TerminalGravity wants to merge 1 commit into
mainfrom
fix/triage-pattern-boost

Conversation

@TerminalGravity

Copy link
Copy Markdown
Collaborator

What

patternMatchCount was declared in TriageConfig but never actually used inside triagePrompt — the boost was applied externally in preflight-check.ts. Any other caller of triagePrompt wouldn't get pattern-aware classification.

Changes

  • triagePrompt now handles the boost internally: if patternMatchCount > 0 and prompt would be clear, bumps to ambiguous
  • Pattern loading moved before triage call in preflight-check.ts
  • Removed redundant external boost logic
  • Added proper tests (replaces placeholder)

Relates to #8

patternMatchCount was declared in TriageConfig but never used inside
triagePrompt — the boost was applied externally in preflight-check.ts.
This meant any other caller of triagePrompt wouldn't get pattern-aware
classification.

Now triagePrompt itself handles the boost: if patternMatchCount > 0 and
the prompt would otherwise be 'clear', it bumps to 'ambiguous' so the
caller gets a warning about known pitfalls.

- Move pattern loading before triage call in preflight-check.ts
- Pass patternMatchCount through triageConfig
- Remove redundant external boost logic
- Add proper tests (replaces the placeholder test that just checked types)

Closes partially: #8 (smart triage classification)

@TerminalGravity TerminalGravity left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean refactor. Moving the pattern-boost into triagePrompt itself is the right call — having it external meant anyone else calling triage directly would miss it. The test coverage here is important since this was previously untested behavior.

@TerminalGravity

Copy link
Copy Markdown
Collaborator Author

Closing — superseded by newer PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant