Skip to content

fix: suppress QUICK classification announcement and deduplicate classification rules#185

Merged
dean0x merged 5 commits intomainfrom
fix/suppress-quick-classification
Apr 19, 2026
Merged

fix: suppress QUICK classification announcement and deduplicate classification rules#185
dean0x merged 5 commits intomainfrom
fix/suppress-quick-classification

Conversation

@dean0x
Copy link
Copy Markdown
Owner

@dean0x dean0x commented Apr 18, 2026

Summary

Suppresses noisy QUICK classification announcements in preamble hook and eliminates redundant loading of classification rules during ambient router initialization. Conditional router loading gates output to GUIDED and ORCHESTRATED depths only.

Changes

  • Preamble hook: Conditional router loading based on classification depth
  • Session-start-classification: Early exit for QUICK depth to skip announcements
  • Skill references: Extract classification-rules.md from router/references/ to router/ to streamline the preamble execution path
  • Tests: Updated ambient activation and classification test paths

Breaking Changes

None

Testing

  • Ambient classification tests pass
  • Skill reference tests pass
  • Integration tests pass

Related Issues

Relates to ambient classification noise reduction.

…ification rules

Conditional router loading in preamble hook gates loading and classification
output to GUIDED and ORCHESTRATED depths, suppressing noisy QUICK announcements.
Extract classification-rules.md from router/references/ to router/ to eliminate
redundant loading and streamline the preamble execution path.

- Preamble hook: conditional router loading based on depth
- Session-start-classification: early exit for QUICK depth
- Tests: updated ambient activation and classification test paths
- CLAUDE.md: updated skill-references paths

Co-Authored-By: Claude <noreply@anthropic.com>
@dean0x
Copy link
Copy Markdown
Owner Author

dean0x commented Apr 18, 2026

PR Comments Created

Inline Comments

  • 1 inline comment created for missing assertion in QUICK-tier slash command test
  • Skipped: 0 (no duplicates detected)

Summary

One blocking MEDIUM issue found across architecture, testing, and consistency reviews: the fourth QUICK-tier test (slash-command preamble filter) is missing the hasClassification assertion that should verify QUICK prompts don't emit classification output. This is a regression guard for the PR's core behavior change.

@dean0x
Copy link
Copy Markdown
Owner Author

dean0x commented Apr 18, 2026

tests/integration/ambient-activation.test.ts (Line 57-62)

Missing hasClassification assertion in slash-command preamble filter test.

Three of the four QUICK-tier tests (lines 38, 45, 53) correctly assert expect(hasClassification(result)).toBe(false), but the fourth test at lines 57-62 does not include this check. Since this test shares the same semantic contract with the others (QUICK prompts should suppress classification output), this assertion should be added for consistency.

Suggested fix:

it('preamble filter — slash command prefix skipped before classification', async () => {
  const result = await runClaudeStreaming('/help with something', { timeout: 20000 });
  expect(hasSkillInvocations(result)).toBe(false);
  expect(hasClassification(result)).toBe(false);  // ← Add this line
  console.log(`preamble filter (slash command): no skills (${result.durationMs}ms)`);
});

Confidence: 90% | Category: Test assertion consistency | Reviewers: Testing (82%), Consistency (90%)

Dean Sharon and others added 4 commits April 19, 2026 14:27
…nd preamble test

The slash-command preamble filter test was missing the
`expect(hasClassification(result)).toBe(false)` assertion present in the
other three QUICK-tier tests, leaving the contract for that code path
incompletely specified.

Co-Authored-By: Claude <noreply@anthropic.com>
…eamEvent

- Remove hasDevFlowBranding (identical to hasClassification) and its tests
- Extract parseStreamEvent from runClaudeStreaming to reduce nesting (5→3 levels)
- Add parseStreamEvent unit tests (5 cases) and classification pattern variation guard
getLatestSubagentPreloadedSkills picked the single most-recent transcript
by mtime. When Claude spawns auxiliary subagents alongside the target agent,
the wrong transcript could win the race — causing the Designer test to read
Git agent skills instead. Now returns all transcripts so tests can match
against the correct one.
The legacy path can never fire — the hook and the classification-rules.md
file are always installed together by devflow init.
@dean0x dean0x merged commit ec0199e into main Apr 19, 2026
4 checks passed
@dean0x dean0x deleted the fix/suppress-quick-classification branch April 19, 2026 21:07
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