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
2 changes: 1 addition & 1 deletion doc/agile/versions/v0/sprint_01/sprint.org
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Know what we build and what we must beat: the repository shape, and measured bas
| [[id:41FD3A9B-6D52-44A2-9676-6EC5FD28F8A9][Trace a break to its cause]] | DONE | 2026-11-21 | 2026-11-21 | Every commit and pull request states its story, task and environment, and compass traces a finding on main to the commit, pull request and environment that likely caused it. |
| [[id:67224021-6300-4FEE-BA62-518F2FEB22AB][Move the skill levels to the project]] | BACKLOG | | | The level of each skill becomes the project's data in a check document, compass stamps it and reports the slices, and ORE Studio's apply_skill_levels.py goes. |
| [[id:F9ED1184-6A62-4B08-A2F7-D109E2C28605][Gate the knowledge titles]] | DONE | 2026-11-22 | 2026-11-22 | A check codec holds every knowledge page's title to a noun phrase and its file name to the title in snake case, from words a project's check document lists. |
| [[id:1874A6CC-3640-4A89-B07F-C9A5F6AAD5F2][Surface the open blame reports]] | STARTED | 2026-11-29 | | Show every environment the blame reports still open on main, its own first, when it lists them, after it merges or rebases main and when it runs a gate, from the report types a project names in its configuration. |
| [[id:1874A6CC-3640-4A89-B07F-C9A5F6AAD5F2][Surface the open blame reports]] | DONE | 2026-11-29 | 2026-12-05 | Show every environment the blame reports still open on main, its own first, when it lists them, after it merges or rebases main and when it runs a gate, from the report types a project names in its configuration. |
| [[id:D8019709-7EF9-43E0-AC64-85DB34A078BE][Build the compass web front end]] | STARTED | 2026-11-29 | | Give developers and testers one web front end over compass's document service, compass.web in TypeScript on ores.web's stack over compass's C++ HTTP endpoints: search, documents, the sprint board with its stories and tasks, test runs with screenshots, a WebGL link graph and a local compass agent on llama.cpp, built in increments the product owner validates in a browser and ready to sit inside ores.web. |
| [[id:0D43BBF9-C7E9-4A41-BFF2-CC15D6F0AEDA][Give codegen the model contract]] | DONE | 2026-12-03 | 2026-12-04 | Refuse, with a message naming the fix, a model that omits a section or property its templates need, so a new model cannot generate C++ that does not compile. |
| [[id:4BD0292F-FA8C-4EB8-B31D-DAEDFE3BDA34][Share documents across projects and environments]] | BACKLOG | | | Decide where the truth of each kind of document lives once compass serves more than one project and each project more than one environment: what every environment shares, what stays in one environment until it merges (codegen models), how projects reference each other's documents, and what each view shows by default. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ would have caught the breaks before they reached main.

| Field | Value |
|---------------+----------------------------------------|
| State | STARTED |
| State | DONE |
| Parent sprint | [[id:850C1BC8-FE02-4EE0-A5D6-6085DC34CE27][Sprint 1]] |
| Now | =compass blames=, =check= and the git hooks show the open reports, the current environment's first and marked; the folder is analysed and three checks are proposed. The service query and the environment naming remain. |
| Now | Nothing. |
| Waiting on | Nothing. |
| Next | Serve the open reports over HTTP and MCP. |
| Next | Nothing. |
| Last touched | 2026-12-05 |

* Acceptance
Expand All @@ -68,7 +68,7 @@ would have caught the breaks before they reached main.
|------+-------+-------+-----+-------------|
| [[id:686B61EC-0AD8-4AEB-ADA7-1F9EAB504AC6][List the open blame reports]] | DONE | 2026-11-29 | 2026-12-04 | A compass blames command that lists the open reports of the types a project names, the current environment's first and marked, and the same short summary from check and the git hooks. |
| [[id:62A4D200-9C15-4D37-A47C-CB593BD51D64][Analyse the blame reports during the sprint]] | DONE | | 2026-12-04 | Read the blame folder at points during the sprint, class the breaks it records, and find the proactive checks that would have caught them before they reached main. |
| [[id:BFCA17AF-5BDD-4B4B-8B07-5325F191C472][Serve the open blame reports]] | BACKLOG | | | Answer the open reports over the document service, as an HTTP read route and an MCP tool generated from the route models, so agents that read compass through it see them too. |
| [[id:BFCA17AF-5BDD-4B4B-8B07-5325F191C472][Serve the open blame reports]] | DONE | 2026-12-05 | 2026-12-05 | Answer the open reports over the document service, as an HTTP read route and an MCP tool generated from the route models, so agents that read compass through it see them too. |
| [[id:8DFD6766-E279-4496-AAE6-A9CD7AC6457A][Unify environment names]] | DONE | 2026-12-05 | 2026-12-05 | Give an environment one name everywhere compass and its projects state one, by a migration that renames corpus.environment.name and the environment columns of activity in one transaction, not by naming it differently on the next sync. |

* Decisions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#+level: s1
#+filetags: :blame:serve:surface_the_open_blame_reports:sprint_01:v0:
#+owner: marco
#+branch:
#+pr:
#+branch: feature/serve-the-open-blame-reports
#+pr: 280
#+blocked_on:
#+blocked_since:
#+created: 2026-11-29
Expand Down Expand Up @@ -36,22 +36,43 @@ kinds first.

| Field | Value |
|--------------+----------------------------------------|
| State | BACKLOG |
| State | DONE |
| Parent story | [[id:1874A6CC-3640-4A89-B07F-C9A5F6AAD5F2][Surface the open blame reports]] |
| Now | Not yet started. |
| Now | Done: the reports are a query, and a Blames screen groups them by sprint and opens each one. |
| Waiting on | Nothing. |
| Next | Begin implementation. |
| Last touched | 2026-11-29 |
| Next | Nothing. |
| Last touched | 2026-12-05 |

* Acceptance

-
- A page of an environment's documents carries its =State= and the sprint its
path sits in, so a report list can show both without a second read.
- A list request may name up to two =* Status= fields and a heading; each
summary carries the fields' values as =owner= and =found_by= and whether
the heading's section holds text as =answered=. Names a regular
expression would read specially are refused and answer empty.
- compass.web has a Blames screen shaped like the prototype the product owner
signed off: count tiles first; three views; *By sprint* groups the reports
with a filter by state; *Outstanding* groups the open ones by owner, oldest
first; *Analysis* counts each owner's load, the open and addressed split,
and the days reports were filed on. Every row opens in the document view
by its =:ID:=.
- On a real folder, a report opens with its whole page rendered, its
=* Response= included.

* 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.)
1. The database already keeps each page's =State=, and a sprint is the
nearest =sprint_<N>= in its path. Add both, and an optional =owner_field=,
to =document_summary=; the owner is read from the document's source by a
regular expression whose field name is validated to letters, digits,
spaces, =_= and =-=, so no other input reaches the expression.
2. A Blames screen lists the documents of a type, groups them by sprint and
filters by the lifecycle state: a page is closed when its state is =DONE=
or =ABANDONED=, open otherwise. Each row links to the document view by
=:ID:=.
3. Verify on a real folder: three ORE Studio blame reports synced into a
throwaway database, the screen driven in Chromium, a report opened.

* Measurements

Expand All @@ -65,10 +86,29 @@ task and name that file in the Command column.

| What | Value | Command | Commit |
|------+-------+---------+--------|
| | | | |
| =compass.http.tests= | 9836 assertions in 390 cases | =compass.http.tests= | this branch |
| =@compass/pages= vitest | 255 tests in 12 files | =npx vitest run= | this branch |
| Real folder, open filter | 1 of 3 reports | Chromium against the throwaway database | this branch |
| A report opened | whole page rendered, =* Response= included | Chromium, click through from the list | this branch |

* Notes

- *The owner is read from the source at query time.* The database keeps a
page's state but not the field a project's reports use for an owner, and
the field's name is project data. The request names it, the server
validates the name, and the expression reads it from the stored source.
This costs a scan of each listed document's source; filling a column at
sync through the project's =* Open reports= table would replace it, and is
the follow-up when the list grows.
- *Closed means done or abandoned.* The database's state is the page's TODO
state, so the screen treats =DONE= and =ABANDONED= as closed and every
other state as open. A project whose open states differ needs the open
states from its =* Open reports= table instead; the =blames= command
already reads them.
- *The list is capped at 100*, the route's maximum; a page shows the first
hundred and says so through its count. Paging the screen is the follow-up
if a project keeps more than that.

* Test Scenarios

Manual QA scenarios (scaffolded via =compass add test_scenario=)
Expand All @@ -93,3 +133,15 @@ via its "Verifies task" field.
| | | | | |

* Result

A page of documents now carries its state, its sprint, its created date,
the requested Status fields' values as =owner= and =found_by=, and whether
the requested heading's section holds text as =answered=. compass.web gained the
Blames screen from the prototype: count tiles, the By sprint, Outstanding and
Analysis views, and every row opening in the document view by its =:ID:=.
It is the seventh screen in the menu, beside Documents.

Verified on a throwaway database seeded with three of ORE Studio's blame
reports: the open filter showed the one started report with its owner, All
showed the three, and clicking one opened its page with the owner's
=* Response= rendered.
13 changes: 12 additions & 1 deletion doc/knowledge/compass/compass_web_features.org
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@ marked unresolved rather than followed. The view also lists the document's
images, the documents it links to, and the documents that link to it, each
backlink with the heading path the link sits under. Documents are read-only.

** Blames

The Blames screen lists the reports a project keeps open, the breaks main
reported and the environment that owns each. It groups them by sprint, the
newest first, the open ones before the addressed within a group, and filters
by open or addressed. Each row names the report, its environment, the sprint
and whether a response was written; opening one shows the whole page, the
owner's response included. The screen reads the document service, so a
project states the type and the owner field in its configuration and compass
names none of them.

** The sprint

The Sprint screen draws the environment's present or an earlier sprint as a
Expand Down Expand Up @@ -101,7 +112,7 @@ first, so what the model no longer sees is counted rather than hidden.

Every address names an environment, and the picker lists every environment
the service holds, with the time of its last sync and its document count. All
six screens read only that environment. The server filters every read by the
every screen reads only that environment. The server filters every read by the
caller's environment, subject and view: run alone, compass has no sign-in and
local callers use the team view; behind ORE Studio's gateway, the caller's
session supplies the subject and view, and a knowledge view sees only what
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,12 @@ struct document_summary {
std::vector<std::string> tags;
std::string updated;
std::string excerpt;
std::string state;
std::string sprint;
std::string owner;
std::string created;
std::string found_by;
bool answered{};

friend bool operator==(const document_summary&, const document_summary&) = default;
};
Expand All @@ -349,6 +355,12 @@ struct document_summary {
::compass::db::codec::field{"tags", &document_summary::tags, true},
::compass::db::codec::field{"updated", &document_summary::updated},
::compass::db::codec::field{"excerpt", &document_summary::excerpt},
::compass::db::codec::field{"state", &document_summary::state},
::compass::db::codec::field{"sprint", &document_summary::sprint},
::compass::db::codec::field{"owner", &document_summary::owner},
::compass::db::codec::field{"created", &document_summary::created},
::compass::db::codec::field{"found_by", &document_summary::found_by},
::compass::db::codec::field{"answered", &document_summary::answered},
};
}

Expand All @@ -357,6 +369,9 @@ struct list_documents_request {
document_filter filter;
std::uint32_t limit = 50;
std::uint32_t offset = 0;
std::optional<std::string> owner_field;
std::optional<std::string> found_by_field;
std::optional<std::string> answered_heading;

friend bool operator==(const list_documents_request&, const list_documents_request&) = default;
};
Expand All @@ -371,6 +386,9 @@ struct list_documents_request {
::compass::db::codec::field{"filter", &list_documents_request::filter, true},
::compass::db::codec::field{"limit", &list_documents_request::limit, true},
::compass::db::codec::field{"offset", &list_documents_request::offset, true},
::compass::db::codec::field{"owner_field", &list_documents_request::owner_field},
::compass::db::codec::field{"found_by_field", &list_documents_request::found_by_field},
::compass::db::codec::field{"answered_heading", &list_documents_request::answered_heading},
};
}

Expand Down
82 changes: 82 additions & 0 deletions projects/compass.http/modeling/compass.http.document_queries.org
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,57 @@ The document's =#+updated:=.
The first lines of the document's body, clipped for a list. Empty when the
document has no body text.

*** state
:PROPERTIES:
:cpp_type: std::string
:END:

The document's =State= row, as the database derives it: =open= or
=addressed=. Empty when the page states none.

*** sprint
:PROPERTIES:
:cpp_type: std::string
:END:

The sprint the document's path sits in, the nearest =sprint_<N>= segment.
Empty when the path has none.

*** owner
:PROPERTIES:
:cpp_type: std::string
:END:

The value the requested =owner_field= holds in the document's =* Status=
table, bare of its code marks. Empty when the request names no field or the
document states none.

*** created
:PROPERTIES:
:cpp_type: std::string
:END:

The document's =#+created:=, which a list shows as the page's age. Empty
when the page states none.

*** found_by
:PROPERTIES:
:cpp_type: std::string
:END:

The value the requested =found_by_field= holds in the document's =* Status=
table, bare of its code marks. Empty when the request names no field or the
document states none.

*** answered
:PROPERTIES:
:cpp_type: bool
:END:

Whether the document has a section under the requested =answered_heading=
with text in it, as a report's =* Response= is. False when the request names
no heading or the section is absent or empty.

** list_documents_request
:PROPERTIES:
:tool: list_documents
Expand Down Expand Up @@ -543,6 +594,37 @@ The most documents to answer, at most 100; a larger limit is refused as

How many documents to skip, for the next page.

*** owner_field
:PROPERTIES:
:cpp_type: std::optional<std::string>
:http_in: query
:END:

A =* Status= field whose value each summary carries as =owner=, such as the
field that names the environment a report belongs to. A name of letters,
digits, spaces, =_= and =-=; any other is refused. Reading it scans each
document's source at query time; a column filled at sync would replace it.

*** found_by_field
:PROPERTIES:
:cpp_type: std::optional<std::string>
:http_in: query
:END:

A =* Status= field whose value each summary carries as =found_by=, such as
the field that names the environment that found the break. Validated and
read as =owner_field= is.

*** answered_heading
:PROPERTIES:
:cpp_type: std::optional<std::string>
:http_in: query
:END:

A heading whose section, when it holds text, makes =answered= true, such as
a report's =Response=. Validated and read as =owner_field= is.


** list_documents_response

*** documents
Expand Down
Loading
Loading