Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ its own documentation screens in its favour.
|---------------+----------------------------------------|
| State | STARTED |
| Parent sprint | [[id:850C1BC8-FE02-4EE0-A5D6-6085DC34CE27][Sprint 1]] |
| Now | Captured with its tasks. Rename, the OpenAPI document and the inventory are done. Prototype the shell and the document view (#234), Prototype the link graph in WebGL (#236), Prototype the agent panel on llama.cpp (#237) and Prototype the sprint and testing views (#239) are signed off. Stand up compass.web on the ores.web stack (#241) is signed off: compass serve serves compass.web. Search the documents in the browser (#242) is signed off with decision 10's ranking. Read a document in the browser (#243) is signed off and merged. Retire the HTML document route (#244) is signed off and merged. Show the sprint board, its stories and its tasks (#246) is signed off and merged. Draw the sprint charts (#247) is signed off and merged. Run test scenarios with screenshots in the browser (#248) is signed off and merged. Draw the link graph in WebGL (#249) is signed off and merged. Talk to the compass agent in the browser (#252) is signed off and merged. Serve compass behind ORE Studio's gateway (#254) is signed off and merged. Open compass.web from ores.web (#256) is signed off and merged. Publish the developer link (#257) merged the packaging and install work; the team address remains the product owner's. Suggest searches and offer an AI mode (#259) is STARTED: the landing page keeps its box centered while typing, lists the closest documents in a combo box, and hands the typed query to the agent from AI mode. |
| Now | Captured with its tasks. Rename, the OpenAPI document and the inventory are done. Prototype the shell and the document view (#234), Prototype the link graph in WebGL (#236), Prototype the agent panel on llama.cpp (#237) and Prototype the sprint and testing views (#239) are signed off. Stand up compass.web on the ores.web stack (#241) is signed off: compass serve serves compass.web. Search the documents in the browser (#242) is signed off with decision 10's ranking. Read a document in the browser (#243) is signed off and merged. Retire the HTML document route (#244) is signed off and merged. Show the sprint board, its stories and its tasks (#246) is signed off and merged. Draw the sprint charts (#247) is signed off and merged. Run test scenarios with screenshots in the browser (#248) is signed off and merged. Draw the link graph in WebGL (#249) is signed off and merged. Talk to the compass agent in the browser (#252) is signed off and merged. Serve compass behind ORE Studio's gateway (#254) is signed off and merged. Open compass.web from ores.web (#256) is signed off and merged. Publish the developer link (#257) merged the packaging and install work; the team address remains the product owner's. Suggest searches and offer an AI mode (#259) is STARTED: the landing page keeps its box centered while typing, lists the closest documents in a combo box, and hands the typed query to the agent from AI mode. The agent's retrieval dropped compass itself; the fix is in review. |
| Waiting on | The product owner's team address for compass.web. |
| Next | Publish the developer link once the address is decided. |
| Last touched | 2026-12-01 |
Expand Down Expand Up @@ -107,6 +107,7 @@ its own documentation screens in its favour.
| [[id:55AACEE0-4551-43E8-8985-A79CE53666C2][Run test scenarios with screenshots in the browser]] | DONE | 2026-11-30 | 2026-12-01 | Add the testing pages: what needs testing in the sprint, a step-by-step scenario runner that records results, notes and pasted screenshots through the service's run routes, and the screenshots shown back. |
| [[id:D730E00C-E6DF-4ED8-8B38-ECD40C335EF4][Draw the link graph in WebGL]] | DONE | 2026-11-30 | 2026-12-01 | Serve the environment's ID-link graph from a new compass route and draw it in compass.web with sigma.js and graphology, with search, local graph, colouring by type and the Zettelkasten overlays. |
| [[id:A4FFB55D-43E3-4E2E-AA22-2503F0A49090][Talk to the compass agent in the browser]] | DONE | 2026-11-30 | 2026-12-01 | Add the compass agent: a chat panel in compass.web over a compass route that runs the signed-off loop against a local llama-server, retrieves through the query layer, streams over SSE and cites documents that open in compass.web. |
| [[id:AF19ABDD-FCB6-4241-ACA3-9A50388BB245][Answer questions about compass itself]] | STARTED | 2026-12-01 | | Search the agent's question for compass itself: the stop-word list dropped the product name, so what is compass searched for nothing. Keep compass and compass's as terms, with a test. |
| [[id:D6F014EB-CB9F-44D6-B14A-9544B2691943][Serve compass behind ORE Studio's gateway]] | DONE | 2026-12-01 | 2026-12-01 | Run compass.http behind ores.http as its gateway and compass.web inside ores.web on ores.web's session, while compass on its own keeps running with no sign-in, and hand ORE Studio the forwarder and view mapping its side needs. |
| [[id:44146C3F-FE10-4832-9311-7C2A87D17CDC][Open compass.web from ores.web]] | DONE | 2026-12-01 | 2026-12-01 | Make compass.web reachable from ores.web: first an external menu entry, then compass.web's pages as a package ores.web adds as a dependency and mounts, reading compass through ores.http, so ORE Studio can decommission its own documentation screens. |
| [[id:131CF0B6-CF93-40A0-A6AC-4635F4A3CE8A][Publish the developer link]] | STARTED | 2026-12-01 | | Run compass.web for the team at a stable address, link it from compass's developer pages, and ship its built files with compass's releases. |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
:PROPERTIES:
:ID: AF19ABDD-FCB6-4241-ACA3-9A50388BB245
:END:
#+title: Task: Answer questions about compass itself
#+description: Search the agent's question for compass itself: the stop-word list dropped the product name, so what is compass searched for nothing and the model was told no document matched. Keep compass and compass's as terms, with a test.
#+type: task
#+level: s1
#+filetags: :build_the_compass_web_front_end:sprint_01:v0:
#+owner: marco
#+branch: feature/agent-search-compass
#+pr: 260
#+blocked_on:
#+blocked_since:
#+created: 2026-12-01
#+updated: 2026-12-01
#+environment:
#+todo: DISCOVERED BACKLOG STARTED BLOCKED | DONE ABANDONED

This page documents a [[id:31C868B9-306E-4282-BA8C-07E647021B34][task]] in the [[id:D8019709-7EF9-43E0-AC64-85DB34A078BE][Build the compass web front end]] story. It captures the goal, current status, acceptance, and any notes or results.

* Goal

A person asks the agent what compass is, or another question whose only
content word is the product name. The agent searches its documents for
compass and answers from them.

* Status

| Field | Value |
|--------------+----------------------------------------|
| State | STARTED |
| Parent story | [[id:D8019709-7EF9-43E0-AC64-85DB34A078BE][Build the compass web front end]] |
| Now | The stop-word list dropped compass; the fix keeps it, the agent tests pass, and the live agent now searches compass and answers from the documents. |
| Waiting on | The product owner's sign-off. |
| Next | The product owner's sign-off. |
| Last touched | 2026-12-01 |

* Acceptance

- A question such as =what is compass= searches for =compass= and returns
passages.
- The keyword list keeps =compass= and =compass's= as search terms.
- The agent tests pass natively.

* Plan

(Implementation strategy. Written when work starts; key decisions
are distilled into the parent story's =* Decisions= at close, but the
plan itself stays — it is the historical record of what we did.)

* Measurements

Every number this task claims about a tree, with the command that produced it
and the commit it was measured at. A number without both is not a measurement,
because a clean-up record describes a tree and trunk moves under a branch: a
consumer count, a gate's component count and a suite's size all change with no
code changing, and the reader of a bare number cannot tell which tree it came
from. Where the raw output matters, put it in an =evidence/= file beside the
task and name that file in the Command column.

| What | Value | Command | Commit |
|------+-------+---------+--------|
| Agent search terms for =what is compass=, before | none | =curl -sN 'http://127.0.0.1:8080/v1/compass/agent?q=what%20is%20compass'= | d234b035 |
| Agent search terms for =what is compass=, after | =compass= | =curl -sN 'http://127.0.0.1:8080/v1/compass/agent?q=what%20is%20compass'= | 4c1cd93f |
| Agent retrieval tests, before the fix | 2 failed | =compass.http.tests "[agent][ops]"= | 93c7e7e0 |
| Agent retrieval tests, after the fix | 53 assertions in 10 cases passed | =compass.http.tests "[agent][ops]"= | 4c1cd93f |

* Notes

The product owner reported that the agent answered =what is compass= with
"No compass document matched your query", and the panel said the agent
searched for nothing. =agent_keywords= removes the stop words, and the list
held =compass= and =compass's=, the product's own name. The question then had
no terms, =search_relaxed= ran no query, and the model was told no document
matched. The plain search route already answers =what is compass= with
compass's documents.

The live check after the fix returned =queries:["compass"]=, five passages and
an answer citing passage 1: 753 prompt tokens, 90 generated in 89 seconds on
the CPU model.

* Test Scenarios

Manual QA scenarios (scaffolded via =compass add test_scenario=)
that verify this task. Link
new ones here as they're created; the scenario doc itself links back
via its "Verifies task" field.

| Scenario | State | Notes |
|----------+-------+-------|
| | | |

* PRs

| PR | Title |
|----+-------|
| [[https://github.com/MASD-Project/compass/pull/260][#260]] | [http] Keep compass in the agent's search terms |

* Review

| # | Comment summary | File | Decision | Notes |
|---+-----------------+------+----------+-------|
| | | | | |

* Result

=compass= and =compass's= leave the stop-word list. The keyword list keeps
the product name, and a question about compass searches for it and answers
from the documents. The regression test fails on main and passes with the
fix.
5 changes: 2 additions & 3 deletions projects/compass.http/src/ops/agent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,12 @@ constexpr std::size_t max_clauses = 3;
constexpr std::array<std::string_view, 7> weak_headings{
"see also", "prs", "review", "test scenarios", "measurements", "result", "status"};

constexpr std::array<std::string_view, 60> stop_words{
constexpr std::array<std::string_view, 58> stop_words{
"a", "about", "an", "and", "are", "as", "at", "be", "by", "can", "could", "do", "does",
"for", "from", "has", "have", "how", "i", "in", "is", "it", "its", "me", "my", "of",
"on", "or", "our", "should", "so", "that", "the", "their", "them", "then", "there",
"these", "they", "this", "to", "use", "used", "uses", "using", "was", "we", "what",
"when", "where", "which", "who", "why", "will", "with", "would", "you", "your",
"compass", "compass's"};
"when", "where", "which", "who", "why", "will", "with", "would", "you", "your"};

constexpr std::string_view knowledge_rules =
"You answer questions about the compass repository's documents. Answer only from the "
Expand Down
18 changes: 17 additions & 1 deletion projects/compass.http/tests/ops_agent_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,30 @@ ops::agent_passage_text passage(std::uint32_t n, std::string kind_title,
TEST_CASE("the agent searches the question's words, less its function words",
"[agent][ops]") {
CHECK(ops::agent_keywords("How do I register compass's MCP server with Claude Code?") ==
strings{"register", "mcp", "server", "claude", "code"});
strings{"register", "compass", "mcp", "server", "claude", "code"});
CHECK(ops::agent_keywords("Why are C++ builds capped at -j2?") ==
strings{"c++", "builds", "capped", "j2"});
CHECK(ops::agent_keywords("Does compass.http serve HTML, html?") ==
strings{"compass.http", "serve", "html"});
CHECK(ops::agent_keywords("how do i").empty());
}

TEST_CASE("a question about compass itself searches for compass", "[agent][ops]") {
std::vector<std::string> asked;
const auto search = [&](const std::string& q) {
asked.push_back(q);
if (q != "compass")
return std::vector<search_hit>{};
return std::vector{hit("C", {"Answer"}, 1.0)};
};
const auto sections = [](const search_hit& h) {
return std::vector{section(h.heading_path, long_text)};
};
const auto found = ops::agent_retrieve("what is compass", search, sections);
CHECK(asked == strings{"compass"});
REQUIRE(found.passages.size() == 1);
}

TEST_CASE("a compound question is searched a clause at a time", "[agent][ops]") {
CHECK(ops::agent_clauses("What is the viable system model and how does compass use it?") ==
strings{"What is the viable system model", "how does compass use it?"});
Expand Down
Loading