Skip to content

feat: a handoff note links relevant FAQ articles too - #23

Open
vbkunin wants to merge 4 commits into
mainfrom
feat/task-078-faq-references-handoff-note
Open

vbkunin wants to merge 4 commits into
mainfrom
feat/task-078-faq-references-handoff-note

Conversation

@vbkunin

@vbkunin vbkunin commented Sep 5, 2026

Copy link
Copy Markdown
Member

Summary

Second intake tool, find_relevant_faq_articles — mirrors find_similar_resolved_tickets in structure, but searches the faq family instead of tickets:

  • mandatory once before finish_handoff when enabled, same pattern as similar tickets (not model discretion)
  • result is [[Class:Id]] links only, no article text
  • own toggle faq_enabled, dependent on handoff_note_enabled (same coupling as similar_enabled)
  • own search settings, not shared with similar_*: faq_family, faq_candidates, faq_top, faq_min_score, faq_chunk_kinds
  • status filter faq_statuses, empty by default (iTop stock doesn't map FAQ status)
  • no age window — no FAQ date mapping in iTop stock, and article staleness isn't the same concept as "ticket closed long ago"

Not in scope: surfacing article text to the model, showing FAQ links to the requester, anything in vector//content_sources/ (the faq family already exists).

Closes TASK-078.

Test plan

  • uv run pytest — 1218 passed
  • uv run pre-commit run --all-files — all hooks passed

🤖 Generated with Claude Code

Second intake tool, find_relevant_faq_articles — mirrors
find_similar_resolved_tickets but over the faq family: mandatory once
before finish_handoff when enabled, links only (no article text), own
toggle (faq_enabled) and own search settings (faq_family, faq_candidates,
faq_top, faq_min_score, faq_chunk_kinds, faq_statuses) independent of
similar_*.

Closes TASK-078.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EKbZpE9vBUBe7PG6mC41dM
@read-the-docs-community

read-the-docs-community Bot commented Sep 5, 2026

Copy link
Copy Markdown

Documentation build overview

📚 itop-ai-assistant | 🛠️ Build #34429441 | 📁 Comparing 9818cce against latest (72da2a6)

  🔍 Preview build  

4 files changed
± admin-ui/index.html
± configuration/index.html
± prompts/index.html
± telemetry/index.html

@codecov

codecov Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

vbkunin and others added 3 commits September 5, 2026 15:48
The two docstrings this PR touched named a count (four switches, two
combinations) that the FAQ addition already broke once. Drop the number so
adding a sixth switch or a fourth combination doesn't require finding this
comment too.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EKbZpE9vBUBe7PG6mC41dM
find_similar_resolved_tickets and find_relevant_faq_articles were
near-identical bodies; the budget and handoff-note validators in
IntakeConfig repeated the same rule twice. Extracted _find_references,
_check_budget and require_note. compose.assemble now checks both
families' availability concurrently instead of one after the other.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EKbZpE9vBUBe7PG6mC41dM
faq_query passed no org_ids, so candidates came from every customer's
articles. The second ADR-003 layer does not catch this: confirm_visible
asks whether the run may read the article, under the service account or
the engineer's token, not whom the article was written for.

faq_query now takes org_ids as a required keyword — a caller that forgot
it must not silently get everybody's corpus — and the tool passes the
ticket's own organization. The rest is ADR-033 as it already stands:
an article with an empty acl_org_ids is published to everybody and
passes, one that names organizations passes only for its own. A ticket
without org_id warns and searches unfiltered; "the unrestricted articles
only" is not expressible through the pre-filter.

Inert on stock iTop, where the FAQ class declares no acl_org_fields and
every article's acl_org_ids is empty.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.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