Skip to content

fix: triage preserves cross-service hits on multi-step prompts#48

Closed
TerminalGravity wants to merge 5 commits intomainfrom
fix/triage-cross-service-multistep
Closed

fix: triage preserves cross-service hits on multi-step prompts#48
TerminalGravity wants to merge 5 commits intomainfrom
fix/triage-cross-service-multistep

Conversation

@TerminalGravity
Copy link
Copy Markdown
Collaborator

Fixes a bug where triagePrompt() checked multi-step before cross-service and returned early — prompts that were both multi-step AND cross-service lost all cross-service context (cross_service_hits was undefined, search-related-projects missing from recommended tools).

Now both signals are detected upfront and combined when they co-occur. Multi-step + cross-service prompts get confidence 0.9 and include all relevant tools.

Also adds resetConfig() export for testing and runtime config reloads.

Tests: 3 new tests covering the interaction (46 total, all passing).

… and contracts

The README references .preflight/ config extensively but there were no
concrete example files to copy. This adds a ready-to-use examples/.preflight/
directory with annotated config.yml, triage.yml, and contracts/api.yml,
plus a README explaining how to use them.
Created examples/USAGE_EXAMPLES.md with 8 real-world scenarios showing
what each tool looks like in practice: preflight_check catching vague
prompts, scope_work creating execution plans, enrich_agent_task for
sub-agents, sharpen_followup resolving ambiguity, session health checks,
semantic history search, weekly scorecards, and prompt grading.

Added link to usage examples in README nav bar.
- Reorder options: npx (zero install) → npm global → clone
- Add -y flag to npx for non-interactive use
- Explain what CLAUDE_PROJECT_DIR enables
- Note that .mcp.json paths must be absolute
- Use 'absolute' in path placeholders to prevent confusion
Previously, triagePrompt() checked multi-step before cross-service and
returned early, so prompts that were BOTH multi-step AND cross-service
lost all cross-service context (no cross_service_hits, no
search-related-projects in recommended tools).

Now both signals are detected upfront and combined when co-occurring.
Also adds resetConfig() export for testing/runtime config reloads.

Adds 3 tests covering the interaction.
Copy link
Copy Markdown
Collaborator Author

@TerminalGravity TerminalGravity left a comment

Choose a reason for hiding this comment

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

Node 18 failure expected (engine bump). Node 20 passes. The cross-service preservation fix looks correct. Ready to merge.

@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