Skip to content

investigate: dual status classifiers — DO-NOT-RECOMMEND unification (#2898)#2933

Merged
rysweet merged 3 commits intomainfrom
investigate/2898-unify-status-classifiers
Mar 8, 2026
Merged

investigate: dual status classifiers — DO-NOT-RECOMMEND unification (#2898)#2933
rysweet merged 3 commits intomainfrom
investigate/2898-unify-status-classifiers

Conversation

@rysweet
Copy link
Owner

@rysweet rysweet commented Mar 7, 2026

Summary

  • Investigated whether unifying the two status classifiers into a canonical _status.py is worth doing
  • Added investigation document at docs/investigations/2898-status-classifiers.md
  • Added outside-in regression tests at tests/outside_in/test_status_classifiers_investigation.py

Finding: DO-NOT-RECOMMEND

The Two Classifiers

WorkflowClassifier SessionDetectionMixin
File src/amplihack/workflows/classifier.py .claude/tools/amplihack/hooks/power_steering_checker/session_detection.py
Timing Pre-action (session start) Post-hoc (hook invocation)
Input Single request string Full transcript with tool calls
Output 4 workflow names 6 session types
Method Keyword-only Keyword + tool usage evidence
Purpose Workflow routing Power-steering enforcement

They serve different purposes, accept different inputs, and produce different output vocabularies. The apparent similarity is superficial.

What's Actually Shared

~8 keyword strings overlap (investigate, understand, analyze, research, explore, how does, cleanup, clean up, organize). This does not justify coupling the two modules.

If keyword drift becomes a concrete bug, a thin _shared_keywords.py constants module (not a unified classifier) would be the right fix.

Test Plan

  • All 12 outside-in tests pass: uv run pytest tests/outside_in/test_status_classifiers_investigation.py -v
  • Tests verify both classifiers are importable and functional
  • Regression guard on keyword overlap count (alerts if it grows beyond current baseline)
  • Test verifies the two classifiers do not import each other

Quality Audit

  • No code changes — investigation only
  • Investigation document is factual, cites specific files and line counts
  • Tests follow existing project patterns (class-based, descriptive names)
  • No stubs, no dead code, no security concerns

🤖 Generated with Claude Code

…iers (#2898)

Investigation finding: DO-NOT-RECOMMEND unifying the two classifiers.
WorkflowClassifier (pre-action routing, string input) and SessionDetectionMixin
(post-hoc enforcement, transcript input) serve fundamentally different purposes
with different input types, output taxonomies, and consumers.

Adds outside-in regression tests that guard against unbounded keyword drift.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2026

🤖 Auto-fixed version bump

The version in pyproject.toml has been automatically bumped to the next patch version.

If you need a minor or major version bump instead, please update pyproject.toml manually and push the change.

@rysweet rysweet force-pushed the investigate/2898-unify-status-classifiers branch from 951ce5d to 5445549 Compare March 8, 2026 01:30
@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2026

🤖 Auto-fixed version bump

The version in pyproject.toml has been automatically bumped to the next patch version.

If you need a minor or major version bump instead, please update pyproject.toml manually and push the change.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2026

Repo Guardian - Action Required

1 file violates the repository policy on ephemeral content

Violation

File: docs/investigations/2898-status-classifiers.md

Why flagged: This is a point-in-time investigation report with temporal markers:

  • Date stamp: "Date: 2026-03-07"
  • Branch reference: "Branch: investigate/2898-unify-status-classifiers"
  • Content describes development work performed on a specific date

Investigation notes like this become stale as the codebase evolves and belong in:

Not in the repository as a permanent file.


What to do

Option 1: Remove the file

Option 2: Override
If you believe this file should remain (e.g., as a template for future investigations, or to establish a pattern for investigation documentation), add a comment containing:

repo-guardian:override This investigation establishes a pattern for documenting DO-NOT-RECOMMEND decisions; provides reference for future contributors considering similar unifications

The reason must explain why this temporal content should be preserved permanently.

AI generated by Repo Guardian

@rysweet rysweet merged commit 585662b into main Mar 8, 2026
2 checks passed
rysweet added a commit that referenced this pull request Mar 8, 2026
…2898) (#2933)

* investigate: add recommendation doc and tests for dual status classifiers (#2898)

Investigation finding: DO-NOT-RECOMMEND unifying the two classifiers.
WorkflowClassifier (pre-action routing, string input) and SessionDetectionMixin
(post-hoc enforcement, transcript input) serve fundamentally different purposes
with different input types, output taxonomies, and consumers.

Adds outside-in regression tests that guard against unbounded keyword drift.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* ci: trigger full CI pipeline

* [skip ci] chore: Auto-bump patch version

---------

Co-authored-by: Ubuntu <azureuser@deva.ftnmxvem3frujn3lepas045p5c.xx.internal.cloudapp.net>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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