Bahn: aisupport, Analyse-O2C-C2S, awesome-bahn-mcp-servers, beam-mcp,
Confluence_Bot, db-planet-mcp-server, O2C-Harness, project-audit,
Projekt-KIQ-HP, teamlandkarte-mcp
Dhive: Jury-Voting
Privat: CV, NoteGraph (NOTE: NoteGraph needs complete redo after consolidation)
Shared: AI-Orchestrator, OrgMyLife, power_skills_and_more
Shared/references: symphony (read-only)
Bahn repos remain available as independent remotes - this monorepo
pulls them in via subtree, the originals are untouched.
5.9 KiB
Capacity Matching Specification
ADDED Requirements
Requirement: Workflow overview (Round 6)
The system SHALL support two primary workflows:
- Database task workflow (Phase 0): Users browse published tasks from the database, inspect details, optionally validate, and run a capacity search for an existing task.
- Ad-hoc workflow (Phases 1-3): Users gather requirements (free-text extraction, structured input, or guided capture), optionally update requirements, explicitly confirm, execute search, and refine results.
The system SHALL expose the MCP tools required to support the workflows below. The implementation MAY add additional tools over time.
Scenario: Tool surface includes both DB-task and ad-hoc workflows
Phase 0 – Task Management (Database tasks)
list_open_tasks(limit=20)get_task_details(task_id)validate_task_requirements(task_id)find_capacities_for_task(task_id)infer_roles(task_id? | task_description?, limit=5)
Phase 1 – Requirement Gathering (Ad-hoc)
extract_requirements(task_description)→ writes pending requirementscollect_structured_requirement_data(role_name?, competences?, date_start?, date_end?, description?)→ writes pending requirementsupdate_requirements(change_description)→ writes pending requirements- Guided capture tools:
start_guided_capture()guided_set_description(description)guided_set_role(role_name)guided_set_time_range(date_start?, date_end?)(open-ended allowed)guided_set_competences(competences)→ writes pending requirements
- Review/ask tools:
show_pending_requirements()→ returns a review table and marks that user confirmation was requestedrequest_requirements_confirmation()→ marks that the assistant asked the user to confirm (no table)
confirm_requirements(confirm: bool = True)
Phase 2 – Search Execution (Ad-hoc)
find_matching_capacities(role_name, competences, date_start?, date_end?)
Phase 3 – Result Refinement
filter_search_results(search_id, role_filter?, competence_filter?, availability_date_start?, availability_date_end?, min_similarity=0.7)→ returnsfilter_idget_results_by_category(search_id, filter_id?, category="Top", page=1, page_size=20)
Requirement: Confirmation gating
The system SHALL ensure that matching execution is confirmation-gated by default and behaves deterministically based on configuration.
Scenario: Matching is refused until requirements are confirmed (default)
- Confirmation gating:
- The server's confirmation state is stored in in-memory session state and is not safe as a multi-client / multi-tenant source of truth. Therefore, treat confirmation gating primarily as a client-side UX rule: clients should only trigger matching after an explicit user Yes/No.
- If
matching.require_confirmation = true(default), matching tools MUST refuse to run unless requirements have been explicitly confirmed. - If
matching.require_confirmation = false, clients MUST NOT ask for confirmation and MUST NOT call confirmation tools; matching MUST proceed once requirements are complete. - The confirmation flow MUST be two-step:
show_pending_requirements()(preferred) ORrequest_requirements_confirmation()- user explicitly confirms in chat
confirm_requirements(confirm=true)
- Servers MAY refuse
confirm_requirements(confirm=true)if step (1) did not occur.
Requirement: Tool outputs and result headers
The system SHALL emit table-first tool output formats and deterministic, machine-readable headers for search-session tools.
Scenario: Tool results are table-first and include deterministic header metadata
-
Tool outputs:
get_task_detailsMUST be table-first (summary table + description below)validate_task_requirementsMUST be table-first (single comparison table + short written summary)infer_rolesMUST return a ranked table:Rank | Role | Rationale
-
Search session output headers (robust client parsing):
- The tools
find_matching_capacities,filter_search_results, andget_results_by_categoryMUST emit deterministic, machine-readable header lines. - On success, the first line MUST be exactly:
Using SEARCH_ID=<uuid>
- The output MUST also contain:
SEARCH_ID=<uuid>FILTER_ID=<uuid>(only if a filter was created/used)META=<json>(MUST include at least{ "search_id": "...", "status": "ok"|... })
- The tools
Requirement: Search session validation and table guarantees
The system SHALL validate search session identifiers deterministically and MUST always return well-formed Markdown tables for search result tools.
Scenario: Invalid or expired search_id inputs produce deterministic errors and tables are always present
-
Search session validation:
search_idinputs MUST be validated as UUIDs.- If the
search_idis not a UUID, the tool MUST returnMETA.status=invalid_search_id_formatand guidance to copy the id from tool output. - If the
search_idis unknown/expired, the tool MUST returnMETA.status=unknown_or_expiredand guidance to re-run the matching tool.
-
Table-first guarantees for search results:
find_matching_capacitiesMUST include the## Summarytable.find_matching_capacitiesMUST include a results table for the first non-empty category in this order: Top → Good → Partial → Low.- If all categories are empty, it MUST still emit a valid Markdown table (a single dummy row is acceptable).
filter_search_resultsandget_results_by_categoryMUST NOT repeat the summary counts table.filter_search_resultsMUST output a flat results table (not split by category) and MUST include aCategorycolumn separate from the numericScore.filter_search_resultsMUST always return the results as a valid Markdown table (even for exactly one match, and also when there are zero matches).