diff --git a/doc/agile/versions/v0/sprint_02/keep_blame_cheap/story.org b/doc/agile/versions/v0/sprint_02/keep_blame_cheap/story.org new file mode 100644 index 00000000..79970f22 --- /dev/null +++ b/doc/agile/versions/v0/sprint_02/keep_blame_cheap/story.org @@ -0,0 +1,70 @@ +:PROPERTIES: +:ID: 23F4C8A3-5B63-4FF3-BA38-EE0803B3B4F7 +:END: +#+title: Story: Keep blame inside a gate's time +#+description: A gate that blames the findings already on main finishes within seconds: the history blame reads is walked once for all findings, not once per finding. +#+type: story +#+level: s2 +#+filetags: :blame:gates:sprint_02:v0: +#+created: 2026-12-05 +#+updated: 2026-12-05 +#+environment: +#+todo: BACKLOG STARTED | DONE ABANDONED + +This page documents a [[id:699A8D45-B67E-4D3E-9206-24FA17C51ADA][story]] in [[id:B60924CC-92F3-47FD-9285-7A023412EA0B][Sprint 2]]. It captures the goal, current status, acceptance criteria, and the tasks that compose it. + +* Goal + +A gate run that blames the findings already on main finishes in the time the +rest of the gate takes, on a project of ORE Studio's age and size. Today it +does not: on =ores_dev_bright_faraday=, =compass 0.0.15= spent 168 s in git +within the first 200 s of the blame pass, and the pass had not finished; with +=--no-blame= the same ratchet finished in 110 s. The culprit is one +=git log -1 --follow --diff-filter=A= walk per finding that needs its addition +commit: rename detection over the whole history costs 8-15 s per call, and a +tree with 277 inherited findings makes the pass longer than the 900 s gate +timeout the ORE Studio fleet hit. + +The fix is to read history once for all findings and answer each from that +read, so the git calls blame makes do not grow with the number of findings. + +* Status + +| Field | Value | +|---------------+----------------------------------------| +| State | STARTED | +| Parent sprint | [[id:B60924CC-92F3-47FD-9285-7A023412EA0B][Sprint 2]] | +| Now | The batch is in review as #285: the ORE Studio pass fell from over 300 s (killed) to 111.6 s. | +| Waiting on | Nothing. | +| Next | Batch the added-file walk, then measure the pass on the ORE Studio tree. | +| Last touched | 2026-12-05 | + +* Acceptance + +- On =ores_dev_bright_faraday=, =compass check --ratchet= with blame + completes in the same order of time as =--no-blame=, not minutes longer. +- The number of git processes a blame pass starts does not grow with the + number of findings, only with the number of distinct paths. +- A finding whose file cannot be traced still states why, and the culprits + blame names are unchanged for files added once and never renamed. + +* Tasks + +| Task | State | Start | End | Description | +|------+-------+-------+-----+-------------| +| [[id:CF50A53E-A47C-481F-8C52-57F3BC435DD0][Batch the added-file walk]] | STARTED | | | One history walk names the commit that added every path blame asks about, instead of a --follow walk per finding. | + +* Decisions + +- Blame is provenance, not a verdict. A slow blame never changes what the + ratchet decides, so a project may run =--no-blame= while this is fixed; the + gate in ORE Studio does so and records the reason. +- The batch replaces rename detection with the path as it is now. A file that + was renamed before it was blamed may name its addition under another path; + blame says it found no addition rather than walking history per path. + +* Out of scope + +- The bisect method, which runs the check at merges; it is off unless the + caller asks for =--blame=bisect= and is not what this story measures. +- The pull-request lookup, which is already cached per commit. diff --git a/doc/agile/versions/v0/sprint_02/keep_blame_cheap/task_batch_the_added_walk.org b/doc/agile/versions/v0/sprint_02/keep_blame_cheap/task_batch_the_added_walk.org new file mode 100644 index 00000000..958b406d --- /dev/null +++ b/doc/agile/versions/v0/sprint_02/keep_blame_cheap/task_batch_the_added_walk.org @@ -0,0 +1,100 @@ +:PROPERTIES: +:ID: CF50A53E-A47C-481F-8C52-57F3BC435DD0 +:END: +#+title: Task: Batch the added-file walk +#+description: One history walk names the commit that added every path blame asks about, instead of a --follow walk per finding. +#+type: task +#+level: s1 +#+filetags: :blame:gates:sprint_02:v0:keep_blame_cheap: +#+owner: marco +#+branch: +#+pr: 285 +#+blocked_on: +#+blocked_since: +#+created: 2026-12-05 +#+updated: 2026-12-05 +#+environment: +#+todo: DISCOVERED BACKLOG STARTED BLOCKED | DONE ABANDONED + +This page documents a [[id:31C868B9-306E-4282-BA8C-07E647021B34][task]] in the [[id:23F4C8A3-5B63-4FF3-BA38-EE0803B3B4F7][Keep blame inside a gate's time]] story. It captures the goal, current status, acceptance, and any notes or results. + +* Goal + +Blame names the commit that added a file from one map built by a single +history walk, instead of starting a =--follow= walk of the whole history for +each finding, so the blame pass of =check --ratchet= stays inside the time +the rest of the gate takes. + +* Status + +| Field | Value | +|--------------+----------------------------------------| +| State | STARTED | +| Parent story | [[id:23F4C8A3-5B63-4FF3-BA38-EE0803B3B4F7][Keep blame inside a gate's time]] | +| Now | The batch is in review as #285; the ORE Studio tree is remeasured. | +| Waiting on | Nothing. | +| Next | Land #285 and close the story. | +| Last touched | 2026-12-05 | + +* Acceptance + +- One =git log --diff-filter=A --name-only= walk answers every path that needs + an addition commit; no =--follow= call remains in blame. +- The parser of that output is a pure function with a test naming a path per + commit and the newest commit winning when a path was added twice. +- The blame pass on =ores_dev_bright_faraday= is remeasured with the same + command as the report. + +* Plan + +1. Add =parse_added_commits= to =ops/blame.hpp=: read the =--name-only= + output, keeping the first (newest) commit per path. +2. Give =tracer= an =added= map and one =load_added= that runs the walk with + the paths blame asks about as pathspecs. +3. Replace the =--follow= fallback in =blame_added= with a map lookup; keep + the =subject_text= search and the note when neither answers. +4. Test the parser; measure the pass on the ORE Studio tree before and after. + +* 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 | +|------+-------+---------+--------| +| Ratchet without blame | 110.3 s | =compass check --ratchet --no-blame= | 6fe7adec, on =ores_dev_bright_faraday= | +| Ratchet with blame, before | >300 s, killed; 168 s in 63 git calls within the first 200 s | =compass check --ratchet= (0.0.15) | 6fe7adec, on =ores_dev_bright_faraday= | +| Ratchet with blame, after | 111.6 s; blame 81.9 s of it; 0 new diagnostics | =compass check --ratchet= | 6fe7adec, on =ores_dev_bright_faraday= | +| Git cost of the added-file walk | 4.4 s, one call (was 8-15 s per call, 90 or more calls) | =strace -f -e trace=execve= | 6fe7adec, on =ores_dev_bright_faraday= | + +* Notes + +* 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 | +|----+-------| +| 285 | [cli] Read the added-file history once for every finding | + +* Review + +| # | Comment summary | File | Decision | Notes | +|---+-----------------+------+----------+-------| +| | | | | | + +* Result diff --git a/doc/agile/versions/v0/sprint_02/run_compass_beside_a_project/story.org b/doc/agile/versions/v0/sprint_02/run_compass_beside_a_project/story.org new file mode 100644 index 00000000..d6b8aea3 --- /dev/null +++ b/doc/agile/versions/v0/sprint_02/run_compass_beside_a_project/story.org @@ -0,0 +1,89 @@ +:PROPERTIES: +:ID: 955957FD-5E73-41E8-B2C0-C9A6EE7997BD +:END: +#+title: Story: Run compass beside a project +#+description: Make the installed compass usable by a project: ship compass's documentation in the release and layer it into every environment, review and sign-off authored pages, run tests in development and production, and serve production readers. +#+type: story +#+level: s2 +#+filetags: :compass:distribution:mcp:review:testing:sprint_02:v0: +#+created: 2026-12-05 +#+updated: 2026-12-05 +#+environment: +#+todo: BACKLOG STARTED | DONE ABANDONED + +This page documents a [[id:699A8D45-B67E-4D3E-9206-24FA17C51ADA][story]] in [[id:B60924CC-92F3-47FD-9285-7A023412EA0B][Sprint 2]]. It captures the goal, current status, acceptance criteria, and the tasks that compose it. + +* Goal + +A project can use a released compass to search and ask about its own +documents and compass's, review and sign off the pages it writes, run its +test scenarios in development and in production, and get the results back to +its developers, behind gateway views and roles that admit only what each use +may write. + +[[id:4CA0B3E0-B33D-47A3-BCC6-7BF9DEFBA7CF][Installed compass]] states what an +installation carries and separates the three uses this story serves: compass +development, ORE Studio development, and ORE Studio production. + +* Status + +| Field | Value | +|---------------+----------------------------------------| +| State | STARTED | +| Parent sprint | [[id:B60924CC-92F3-47FD-9285-7A023412EA0B][Sprint 2]] | +| Now | Captured with its six tasks; the architecture page is written. | +| Waiting on | Nothing. | +| Next | Ship compass's documentation in the release and layer it into every environment first; everything else needs it. | +| Last touched | 2026-12-05 | + +* Acceptance + +- A released compass carries its documentation under =share/compass/doc= and + a project needs no copy of compass's tree to use it. +- Every environment's search, agent and MCP answers questions about compass + itself from the shipped documents, under the project's own. +- A page can be put up for review; a reviewer signs it off or refuses it with + commentary, and the record is queryable. +- A reviewer can annotate a page's paragraphs inline without editing it. +- A testing team runs the sprint's scenarios against a deployed environment + and the recorded campaign reaches the development team's git. +- The production deployment serves the manual, the project's documents and + compass's through compass.web and MCP, behind a view that admits the + production documents and a role that admits test writes only. +- The three uses are documented in + [[id:4CA0B3E0-B33D-47A3-BCC6-7BF9DEFBA7CF][Installed compass]] and the + command surface does not confuse them. + +* Tasks + +| Task | State | Start | End | Description | +|------+-------+-------+-----+-------------| +| [[id:BBFD4646-1930-4BC8-AD1E-13495E0734F0][Ship compass's documentation beside the binary]] | BACKLOG | | | Copy the pages an installation needs into share/compass/doc and install them, so a released compass can describe itself and its tools. | +| [[id:1236ADF6-5EBA-402F-9F11-E3542AEB5FB5][Layer compass's documentation into every environment]] | BACKLOG | | | Search, the agent and the MCP server read compass's shipped documents under the project's, so an LLM can ask how to use compass and be answered. | +| [[id:C326D0F2-B559-482C-BA7E-D8E765BDE0FB][Author pages with review and sign-off]] | BACKLOG | | | A page can be put up for review; a reviewer signs it off or refuses it with commentary, and the decision is stored as a record. | +| [[id:6CAD6D96-B800-4B93-ADC9-3C0E7FF8C1FC][Annotate pages inline]] | BACKLOG | | | A reviewer leaves margin annotations on a page's paragraphs and their state, without editing the page. | +| [[id:B65B5CED-71AA-440E-B2C3-19D5562BCBC1][Run tests in production and route the results]] | BACKLOG | | | A testing team runs the sprint's scenarios against a deployed environment and the recorded campaign reaches the development team's git. | +| [[id:BB5F0800-1DD0-4E3A-B917-FF06209C7152][Serve production readers]] | BACKLOG | | | The production deployment serves the manual, the project's documents and compass's over compass.web's endpoints and MCP, with views and roles that admit test writes only. | + +* Decisions + +- *Project data stays with the project; generic MASD and compass's + documentation stay with compass.* The product owner's direction of + 2026-12-05. ORE Studio will delete every MASD and compass page from its + tree, so a release that does not carry them leaves an LLM unable to use + compass. +- *The library and documentation are layers, not environments.* A project + syncs its own checkout; compass's shipped material is read under it, the + way codegen reads =@compass= under the project's library. +- *The overlay shape, not a rename.* The generic MASD keeps its addresses; + a project's own additions layer over it, so ORE Studio's output does not + change and its =ores.*= addresses stay valid. + +* Out of scope + +- Moving ORE Studio's remaining Split pages and families; that is + [[id:E3C81059-FE00-4403-AA56-190FDBB9904A][Own the MASD meta model]]. + +* Out of scope + +- diff --git a/doc/agile/versions/v0/sprint_02/run_compass_beside_a_project/task_annotate_pages_inline.org b/doc/agile/versions/v0/sprint_02/run_compass_beside_a_project/task_annotate_pages_inline.org new file mode 100644 index 00000000..030ae93f --- /dev/null +++ b/doc/agile/versions/v0/sprint_02/run_compass_beside_a_project/task_annotate_pages_inline.org @@ -0,0 +1,92 @@ +:PROPERTIES: +:ID: 6CAD6D96-B800-4B93-ADC9-3C0E7FF8C1FC +:END: +#+title: Task: Annotate pages inline +#+description: A reviewer leaves margin annotations on a page's paragraphs and their state, without editing the page. +#+type: task +#+level: s1 +#+filetags: :run_compass_beside_a_project:sprint_02:v0: +#+owner: marco +#+branch: +#+pr: +#+blocked_on: +#+blocked_since: +#+created: 2026-12-05 +#+updated: 2026-12-05 +#+environment: +#+todo: DISCOVERED BACKLOG STARTED BLOCKED | DONE ABANDONED + +This page documents a [[id:31C868B9-306E-4282-BA8C-07E647021B34][task]] in the [[id:955957FD-5E73-41E8-B2C0-C9A6EE7997BD][Story: Run compass beside a project]] story. It captures the goal, current status, acceptance, and any notes or results. + +* Goal + +A reviewer leaves margin annotations on a page's paragraphs and their state, +without editing the page. + +* Status + +| Field | Value | +|--------------+----------------------------------------| +| State | BACKLOG | +| Parent story | [[id:955957FD-5E73-41E8-B2C0-C9A6EE7997BD][Story: Run compass beside a project]] | +| Now | Not yet started. | +| Waiting on | Nothing. | +| Next | Begin implementation. | +| Last touched | 2026-12-05 | + +* Acceptance + +- An annotation names a page, a heading or paragraph anchor, the reviewer, + the text and whether it is addressed. +- Annotations are stored, listed beside the page and resolvable without a + rewrite of the page's body. +- The page shows its annotations to a reader with the view's permission. + +* Plan + +1. Prototype the anchor: a heading's anchor or a paragraph's position and + its stability across edits. +2. Store and read them; decide whether they are a document type of their own. +3. Render them in the document view. +4. Verify on a page edited after its annotations. + +* 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 | +|------+-------+---------+--------| +| | | | | + +* Notes + +* 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 | +|----+-------| +| | | + +* Review + +| # | Comment summary | File | Decision | Notes | +|---+-----------------+------+----------+-------| +| | | | | | + +* Result diff --git a/doc/agile/versions/v0/sprint_02/run_compass_beside_a_project/task_author_pages_with_review_and_sign_off.org b/doc/agile/versions/v0/sprint_02/run_compass_beside_a_project/task_author_pages_with_review_and_sign_off.org new file mode 100644 index 00000000..da961e6a --- /dev/null +++ b/doc/agile/versions/v0/sprint_02/run_compass_beside_a_project/task_author_pages_with_review_and_sign_off.org @@ -0,0 +1,95 @@ +:PROPERTIES: +:ID: C326D0F2-B559-482C-BA7E-D8E765BDE0FB +:END: +#+title: Task: Author pages with review and sign-off +#+description: A page can be put up for review; a reviewer signs it off or refuses it with commentary, and the decision is stored as a record. +#+type: task +#+level: s1 +#+filetags: :run_compass_beside_a_project:sprint_02:v0: +#+owner: marco +#+branch: +#+pr: +#+blocked_on: +#+blocked_since: +#+created: 2026-12-05 +#+updated: 2026-12-05 +#+environment: +#+todo: DISCOVERED BACKLOG STARTED BLOCKED | DONE ABANDONED + +This page documents a [[id:31C868B9-306E-4282-BA8C-07E647021B34][task]] in the [[id:955957FD-5E73-41E8-B2C0-C9A6EE7997BD][Story: Run compass beside a project]] story. It captures the goal, current status, acceptance, and any notes or results. + +* Goal + +A page can be put up for review; a reviewer signs it off or refuses it with +commentary, and the decision is a record queryable beside the page. + +* Status + +| Field | Value | +|--------------+----------------------------------------| +| State | BACKLOG | +| Parent story | [[id:955957FD-5E73-41E8-B2C0-C9A6EE7997BD][Story: Run compass beside a project]] | +| Now | Not yet started. | +| Waiting on | Nothing. | +| Next | Begin implementation. | +| Last touched | 2026-12-05 | + +* Acceptance + +- A document has a review state apart from its TODO state: not under review, + ready for review, signed off, refused. +- Putting a page up for review and the reviewer's decision are writes with an + actor, a time and, for a refusal, commentary. +- The review queue lists what is ready for review, by environment and by + reviewer, and the page shows its review state. +- The decision is not an edit of the page's body. + +* Plan + +1. State the review states and where they live: a new column and records, + or a companion document type. +2. Add the writes and their gateway permissions. +3. Add the queue and the page's state to compass.web. +4. Verify the round trip: author, submit, sign off and refuse, and read the + record. + +* 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 | +|------+-------+---------+--------| +| | | | | + +* Notes + +* 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 | +|----+-------| +| | | + +* Review + +| # | Comment summary | File | Decision | Notes | +|---+-----------------+------+----------+-------| +| | | | | | + +* Result diff --git a/doc/agile/versions/v0/sprint_02/run_compass_beside_a_project/task_layer_compasss_documentation_into_every_environment.org b/doc/agile/versions/v0/sprint_02/run_compass_beside_a_project/task_layer_compasss_documentation_into_every_environment.org new file mode 100644 index 00000000..ddc2c0f1 --- /dev/null +++ b/doc/agile/versions/v0/sprint_02/run_compass_beside_a_project/task_layer_compasss_documentation_into_every_environment.org @@ -0,0 +1,95 @@ +:PROPERTIES: +:ID: 1236ADF6-5EBA-402F-9F11-E3542AEB5FB5 +:END: +#+title: Task: Layer compass's documentation into every environment +#+description: Search, the agent and the MCP server read compass's shipped documents under the project's, so an LLM can ask how to use compass and be answered. +#+type: task +#+level: s1 +#+filetags: :run_compass_beside_a_project:sprint_02:v0: +#+owner: marco +#+branch: +#+pr: +#+blocked_on: +#+blocked_since: +#+created: 2026-12-05 +#+updated: 2026-12-05 +#+environment: +#+todo: DISCOVERED BACKLOG STARTED BLOCKED | DONE ABANDONED + +This page documents a [[id:31C868B9-306E-4282-BA8C-07E647021B34][task]] in the [[id:955957FD-5E73-41E8-B2C0-C9A6EE7997BD][Story: Run compass beside a project]] story. It captures the goal, current status, acceptance, and any notes or results. + +* Goal + +An environment's search, agent and MCP answer from the project's documents +and compass's shipped ones together, so an LLM asked how to use compass is +answered from the release rather than from the project's tree. + +* Status + +| Field | Value | +|--------------+----------------------------------------| +| State | BACKLOG | +| Parent story | [[id:955957FD-5E73-41E8-B2C0-C9A6EE7997BD][Story: Run compass beside a project]] | +| Now | Not yet started. | +| Waiting on | Nothing. | +| Next | Begin implementation. | +| Last touched | 2026-12-05 | + +* Acceptance + +- The shipped documents are read as a layer under the project's, as codegen + reads =@compass= under the project's library. +- Search returns the shipped pages, marked as compass's, with the project's. + The agent cites them. MCP tools list and read them. +- A project's page of the same address wins over the shipped one. +- No project copies compass's tree into its own to get this. + +* Plan + +1. Decide the layer's identity: documents read from =share/compass/doc= + without a placement in the project's checkout, or synced into the corpus + by =compass sync= as a library layer. +2. Give the corpus and the query layer the layer, keeping the view filter. +3. Verify with a project checkout that holds no compass pages and an MCP + question about compass. + +* 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 | +|------+-------+---------+--------| +| | | | | + +* Notes + +* 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 | +|----+-------| +| | | + +* Review + +| # | Comment summary | File | Decision | Notes | +|---+-----------------+------+----------+-------| +| | | | | | + +* Result diff --git a/doc/agile/versions/v0/sprint_02/run_compass_beside_a_project/task_run_tests_in_production_and_route_the_results.org b/doc/agile/versions/v0/sprint_02/run_compass_beside_a_project/task_run_tests_in_production_and_route_the_results.org new file mode 100644 index 00000000..3adc7446 --- /dev/null +++ b/doc/agile/versions/v0/sprint_02/run_compass_beside_a_project/task_run_tests_in_production_and_route_the_results.org @@ -0,0 +1,96 @@ +:PROPERTIES: +:ID: B65B5CED-71AA-440E-B2C3-19D5562BCBC1 +:END: +#+title: Task: Run tests in production and route the results +#+description: A testing team runs the sprint's scenarios against a deployed environment and the recorded campaign reaches the development team's git. +#+type: task +#+level: s1 +#+filetags: :run_compass_beside_a_project:sprint_02:v0: +#+owner: marco +#+branch: +#+pr: +#+blocked_on: +#+blocked_since: +#+created: 2026-12-05 +#+updated: 2026-12-05 +#+environment: +#+todo: DISCOVERED BACKLOG STARTED BLOCKED | DONE ABANDONED + +This page documents a [[id:31C868B9-306E-4282-BA8C-07E647021B34][task]] in the [[id:955957FD-5E73-41E8-B2C0-C9A6EE7997BD][Story: Run compass beside a project]] story. It captures the goal, current status, acceptance, and any notes or results. + +* Goal + +A testing team runs the sprint's scenarios against a deployed environment, +records the outcomes, notes and screenshots, and the campaign reaches the +development team's git. + +* Status + +| Field | Value | +|--------------+----------------------------------------| +| State | BACKLOG | +| Parent story | [[id:955957FD-5E73-41E8-B2C0-C9A6EE7997BD][Story: Run compass beside a project]] | +| Now | Not yet started. | +| Waiting on | Nothing. | +| Next | Begin implementation. | +| Last touched | 2026-12-05 | + +* Acceptance + +- A deployed environment serves the Testing screen and the running of a + scenario, behind the gateway, for a production role. +- The recorded campaign is written to a checkout the development team reads, + by =compass test export= or by the path the product owner chooses, and the + result is a diff a developer can merge. +- The route states what a tester may write and what is refused. + +* Plan + +1. State the deployment: an environment synced from the production + checkout, served behind the gateway. +2. Decide the route to git: an export run where the checkout is, or a + hand-off the service performs. +3. Test the production view and role: a test write admitted, a document or + library write refused. +4. Verify a full run and its campaign in git. + +* 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 | +|------+-------+---------+--------| +| | | | | + +* Notes + +* 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 | +|----+-------| +| | | + +* Review + +| # | Comment summary | File | Decision | Notes | +|---+-----------------+------+----------+-------| +| | | | | | + +* Result diff --git a/doc/agile/versions/v0/sprint_02/run_compass_beside_a_project/task_serve_production_readers.org b/doc/agile/versions/v0/sprint_02/run_compass_beside_a_project/task_serve_production_readers.org new file mode 100644 index 00000000..6c07c813 --- /dev/null +++ b/doc/agile/versions/v0/sprint_02/run_compass_beside_a_project/task_serve_production_readers.org @@ -0,0 +1,94 @@ +:PROPERTIES: +:ID: BB5F0800-1DD0-4E3A-B917-FF06209C7152 +:END: +#+title: Task: Serve production readers +#+description: The production deployment serves the manual, the project's documents and compass's over compass.web's endpoints and MCP, with views and roles that admit test writes only. +#+type: task +#+level: s1 +#+filetags: :run_compass_beside_a_project:sprint_02:v0: +#+owner: marco +#+branch: +#+pr: +#+blocked_on: +#+blocked_since: +#+created: 2026-12-05 +#+updated: 2026-12-05 +#+environment: +#+todo: DISCOVERED BACKLOG STARTED BLOCKED | DONE ABANDONED + +This page documents a [[id:31C868B9-306E-4282-BA8C-07E647021B34][task]] in the [[id:955957FD-5E73-41E8-B2C0-C9A6EE7997BD][Story: Run compass beside a project]] story. It captures the goal, current status, acceptance, and any notes or results. + +* Goal + +The production deployment serves the manual, the project's documents and +compass's over compass.web's endpoints and the MCP server, for readers whose +view admits the production documents and whose role admits only test writes. + +* Status + +| Field | Value | +|--------------+----------------------------------------| +| State | BACKLOG | +| Parent story | [[id:955957FD-5E73-41E8-B2C0-C9A6EE7997BD][Story: Run compass beside a project]] | +| Now | Not yet started. | +| Waiting on | Nothing. | +| Next | Begin implementation. | +| Last touched | 2026-12-05 | + +* Acceptance + +- compass.web's six document screens and the Blames screen are reachable + through the gateway in production. +- The MCP tools list and read the same documents, with the tool descriptions + drawn from the shipped documentation. +- A production view sees the production documents and compass's; a write + outside the test records is refused. +- The manual is reachable from compass.web. + +* Plan + +1. State the production view and role, and where the secrets live. +2. Verify the endpoints and MCP against a deployment with them. +3. Add the manual to the served pages and link it. +4. Verify a reader's searches, a test write and a refused write. + +* 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 | +|------+-------+---------+--------| +| | | | | + +* Notes + +* 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 | +|----+-------| +| | | + +* Review + +| # | Comment summary | File | Decision | Notes | +|---+-----------------+------+----------+-------| +| | | | | | + +* Result diff --git a/doc/agile/versions/v0/sprint_02/run_compass_beside_a_project/task_ship_compasss_documentation_beside_the_binary.org b/doc/agile/versions/v0/sprint_02/run_compass_beside_a_project/task_ship_compasss_documentation_beside_the_binary.org new file mode 100644 index 00000000..4683bf28 --- /dev/null +++ b/doc/agile/versions/v0/sprint_02/run_compass_beside_a_project/task_ship_compasss_documentation_beside_the_binary.org @@ -0,0 +1,99 @@ +:PROPERTIES: +:ID: BBFD4646-1930-4BC8-AD1E-13495E0734F0 +:END: +#+title: Task: Ship compass's documentation beside the binary +#+description: Copy the pages an installation needs into share/compass/doc and install them, so a released compass can describe itself and its tools. +#+type: task +#+level: s1 +#+filetags: :run_compass_beside_a_project:sprint_02:v0: +#+owner: marco +#+branch: +#+pr: +#+blocked_on: +#+blocked_since: +#+created: 2026-12-05 +#+updated: 2026-12-05 +#+environment: +#+todo: DISCOVERED BACKLOG STARTED BLOCKED | DONE ABANDONED + +This page documents a [[id:31C868B9-306E-4282-BA8C-07E647021B34][task]] in the [[id:955957FD-5E73-41E8-B2C0-C9A6EE7997BD][Story: Run compass beside a project]] story. It captures the goal, current status, acceptance, and any notes or results. + +* Goal + +A released compass carries the documentation an installation needs, under +share/compass/doc beside the library and the web pages, and every package +for every platform includes it. + +* Status + +| Field | Value | +|--------------+----------------------------------------| +| State | BACKLOG | +| Parent story | [[id:955957FD-5E73-41E8-B2C0-C9A6EE7997BD][Story: Run compass beside a project]] | +| Now | Not yet started. | +| Waiting on | Nothing. | +| Next | Begin implementation. | +| Last touched | 2026-12-05 | + +* Acceptance + +- The pages an installation needs are chosen and stated: the manual, the + knowledge that explains compass and its tools, the recipes, and the meta + contract. +- =share/CMakeLists.txt= stages them under =share/compass/doc= and installs + them, so the tar.gz, deb, dmg and zip carry them. +- The binary finds them beside itself the way it finds the library and the + web pages. +- A release's =--version=, =config= and MCP tools describe where the + documentation is. + +* Plan + +1. List what an LLM needs: how to run compass, its commands, its MCP tools, + its document contract and its review workflow. +2. Choose the source tree (doc/knowledge, doc/meta, doc/recipes, doc/manual) + and copy at build time, not by hand. +3. Stage and install under =share/compass/doc=, and test that a staged tree + carries it. +4. Verify on the three platform packages that the path is present. + +* 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 | +|------+-------+---------+--------| +| | | | | + +* Notes + +* 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 | +|----+-------| +| | | + +* Review + +| # | Comment summary | File | Decision | Notes | +|---+-----------------+------+----------+-------| +| | | | | | + +* Result diff --git a/doc/agile/versions/v0/sprint_02/sprint.org b/doc/agile/versions/v0/sprint_02/sprint.org new file mode 100644 index 00000000..81405222 --- /dev/null +++ b/doc/agile/versions/v0/sprint_02/sprint.org @@ -0,0 +1,81 @@ +:PROPERTIES: +:ID: B60924CC-92F3-47FD-9285-7A023412EA0B +:END: +#+title: Sprint 2 +#+description: Iron out compass's three uses: compass development, ORE Studio development, and ORE Studio production. +#+type: sprint +#+level: s3 +#+filetags: :sprint_02:v0: +#+created: 2026-12-05 +#+start_date: 2026-12-05 +#+end_date: 2026-12-12 +#+updated: 2026-12-05 +#+todo: STARTED | DONE + +This page documents a [[id:0820B7FD-147C-4832-AC25-C043D38D5B61][sprint]] (*Sprint 2*) of ORE Studio. It captures the sprint's mission, current status, and the stories that compose it. For the surrounding context — version goals, sprint order, and product identity — see [[id:2ABEC8F1-4A0B-4E79-8BFC-D1AF9B340A23][Version 0]]. + +* Mission + +Iron out the three ways compass is used (compass development, ORE Studio +development and ORE Studio production), so a released compass carries +everything each use needs. + +* Status + +| Field | Value | +|----------------+----------------------------------------| +| State | STARTED | +| Parent version | [[id:2ABEC8F1-4A0B-4E79-8BFC-D1AF9B340A23][Version 0]] | +| Previous | [[id:850C1BC8-FE02-4EE0-A5D6-6085DC34CE27][Sprint 1]] | +| Start | 2026-12-05 | +| End (expected) | 2026-12-12 | +| Now | Sprint in flight: the three uses are stated in the architecture, and their tasks are captured. | +| Waiting on | Nothing. | +| Next | Ship compass's documentation in the release and layer it into every environment. | +| Release Notes | Added at end of sprint. | +| Last touched | 2026-12-05 | + +* Stories + +For the definitions of the themes see [[id:A064D838-F127-4DD6-BB42-9A7902039AEE][Themes]]. + +** Product + +#+ATTR_HTML: :class hug-leading +| Story | State | Start | End | Description | +|-------+-------+-------+-----+-------| +| [[id:955957FD-5E73-41E8-B2C0-C9A6EE7997BD][Run compass beside a project]] | STARTED | 2026-12-05 | | Make a released compass carry its documentation and serve the three uses: compass development, ORE Studio development and ORE Studio production. | +| [[id:23F4C8A3-5B63-4FF3-BA38-EE0803B3B4F7][Keep blame inside a gate's time]] | STARTED | 2026-12-05 | | Read history once for all findings, so a gate that blames the findings already on main stays inside its time. | + +** Hotfixes + +#+ATTR_HTML: :class hug-leading +| Story | State | Start | End | Description | +|-------+-------+-------+-----+-------------| +| | | | | | + +* Achievements + +Milestones worth capturing as they happen, so the release notes at +sprint close have the evidence to hand. Add a dated =** subheading= +per milestone, with any screenshot via =[[proj:assets/images/.png]]=. + +* Captures + +Real captures filed during this sprint that have *not* been pulled into a +story as tasks — listed here purely for visibility into what the sprint +surfaced. Each is an inbox capture (=compass capture=); triage them at the +health review (promote to a story, move to =next=, or discard). + +#+ATTR_HTML: :class hug-leading +| Capture | Tags | Description | +|---------+------+-------------| +| | | | + +* Health Review + +(Run =sprint-reviewer= to generate this section.) + +* Retrospective + +(Filled at sprint close.) diff --git a/doc/agile/versions/v0/version.org b/doc/agile/versions/v0/version.org index be21f5ad..029cf5a4 100644 --- a/doc/agile/versions/v0/version.org +++ b/doc/agile/versions/v0/version.org @@ -7,7 +7,7 @@ #+level: s4 #+filetags: :v0: #+created: 2026-10-27 -#+updated: 2026-11-16 +#+updated: 2026-12-05 #+todo: STARTED | RELEASED This page documents *v0* — the 0.x.x version series of compass-ng. It @@ -20,13 +20,14 @@ version-independent statement of what compass-ng is, see the [[id:2F71292F-CDB0- |--------------+------------------------------------------------------------------------------------| | State | STARTED | | Target | ORE Studio's codegen and build-free gates run through compass-ng: full regen under 30 s, gates under 10 s, edit-time checks under 1 s. | -| Now | Sprint 1 in flight: project shape, then the baseline measurements. | +| Now | Sprint 2 in flight: iron out the three uses of compass. | | Waiting on | Nothing. | -| Next | Create the build skeleton, then measure the baseline. | -| Last touched | 2026-11-16 | +| Next | Ship compass's documentation in the release and layer it into every environment. | +| Last touched | 2026-12-05 | * Sprints | Sprint | State | Start | End | Description | |-------------------------------------------------------+---------+------------+-----+----------------------------------------------| | [[id:850C1BC8-FE02-4EE0-A5D6-6085DC34CE27][Sprint 1]] | STARTED | 2026-10-27 | | Project shape, baseline measurements and the Version 0 stories. | +| [[id:B60924CC-92F3-47FD-9285-7A023412EA0B][Sprint 2]] | STARTED | 2026-12-05 | | Iron out the three uses of compass: development, ORE Studio development and ORE Studio production. | diff --git a/doc/compass.org b/doc/compass.org index 38a87127..831487cd 100644 --- a/doc/compass.org +++ b/doc/compass.org @@ -7,7 +7,7 @@ #+level: cross #+filetags: :meta:overview:entry_point: #+created: 2026-10-27 -#+updated: 2026-11-16 +#+updated: 2026-12-05 compass-ng is a fast, data-oriented C++ pipeline that loads a project's org documents and source code into memory and runs codecs over them: code @@ -39,6 +39,7 @@ projects/ 3. [[id:8A0E6F32-C4BC-4667-88E8-7F80CA25437C][Component architecture]] --- layout rules. 4. [[id:2ABEC8F1-4A0B-4E79-8BFC-D1AF9B340A23][Version 0]] --- what we are working on now. 5. [[id:DC058C8E-79D4-4AA4-A131-CA5AA435EFB4][Compass web features]] --- what compass.web can do. +6. [[id:4CA0B3E0-B33D-47A3-BCC6-7BF9DEFBA7CF][Installed compass]] --- how a released compass runs beside a project, and the three uses it serves. * Upstream ORE Studio lives at =~/Development/OreStudio=. Its =doc/compass.org=, diff --git a/doc/knowledge/architecture/installed_compass.org b/doc/knowledge/architecture/installed_compass.org new file mode 100644 index 00000000..6652f059 --- /dev/null +++ b/doc/knowledge/architecture/installed_compass.org @@ -0,0 +1,147 @@ +:PROPERTIES: +:ID: 4CA0B3E0-B33D-47A3-BCC6-7BF9DEFBA7CF +:END: +#+title: Installed compass +#+description: How a released compass runs beside a project: what it ships, the three uses it serves, and what each may write. +#+type: knowledge +#+level: cross +#+filetags: :compass:architecture:release:mcp:knowledge: +#+created: 2026-12-05 +#+updated: 2026-12-05 + +A project uses compass as a released binary that reads the project's checkout +and its own database, and never as a copy of this repository. That release +must carry everything a project needs to use compass, including the knowledge +an LLM needs to operate it, because the project will not hold compass's +documents. This page states what an installation is, the three uses it +serves, and what each use may read and write. They are distinct and must not +be confused in the design. + +* Detail + +** What an installation is + +A release installs, under =~/.local/opt/compass//=: + +| Path | What it holds | +|--------------------------+----------------------------------------------------------| +| =bin/compass= | the one binary; the compilers, codecs and service | +| =share/compass/masd/= | the MASD library: templates, archetype pages, the catalogue | +| =share/compass/web/= | compass.web's built pages | +| =THIRD_PARTY_NOTICES= | the licences of every library linked | + +=install_compass.sh= installs a named release after checking its checksum, +installs a build of =main= with =--build=, and reads a pinned version file so +a project can state which release it needs. The binary resolves its library +and web pages beside its own directory, so a project reads them from the +release, not from a checkout of compass. + +Each project has its own PostgreSQL database, named in the repository's local +settings (=.git/compass/local.org=). A database holds *environments*: one per +synced checkout, named by the project's convention, with the documents placed +in it. Compass reads and writes only through the database and the checkout; +nothing in a project's environment is stored inside the compass installation. + +What an installation does *not* carry today, and must: compass's own +documentation (this page among it), the manual, the recipes and the checks +documentation that an LLM needs to use the MCP tools and the CLI correctly. +The release ships the library and the web pages but no documentation, so an +installed compass can search a project's documents and not its own. + +** Use 1: compass development + +The use this repository serves. The developers of compass work in worktrees of +this checkout; each worktree is an environment, synced into the development +database, and =compass serve= answers the web front end, the MCP endpoint and +the agent from it. The corpus is this repository's own documents, including +the pages that describe compass; the library is the one in =share/masd=; CI +and the release are built here. Readers are compass's developers and their +LLMs, and everything under =doc/= is in scope. + +This use is the only one that writes compass's own library and code. + +** Use 2: ORE Studio development + +A developer of ORE Studio uses an installed compass against an ORE Studio +checkout. The project supplies the checkout, its =#+owner_prefix:= and its +document types; compass supplies the binary, the MASD library, the web pages +and, once this is fixed, its documentation. + +The corpus of an environment is the project's documents *plus* compass's +documentation, layered over them: an LLM that asks "how do I run a test +scenario with compass" or "what does this MCP tool do" must be answered from +compass's pages even though ORE Studio holds none of them. The agent, search +and MCP tools therefore read the project layer and the compass documentation +layer under it, the same way codegen reads =@compass= under the project's +library. + +What people and LLMs do here: + +- *Ask and search.* Query the document database through the MCP server and + the agent, including compass's own documentation, and follow citations into + the project's pages. +- *Know what is broken.* The open blame reports, by sprint and owner, from + the Blames screen and the =blames= command. +- *Test.* Run the project's test scenarios and record their results and + screenshots; the record lives in the database and =compass test export= + writes the campaign into the story's folder in the checkout, so it reaches + git by the ordinary review and merge. +- *Author.* Write new documents and edit existing ones, then put them up for + review: a page is ready for review, a reviewer signs it off or refuses it + with commentary, and the sign-off is a record, not an edit of the page. + Inline annotations, as a reviewer's margin notes, are wanted and are not + built. + +** Use 3: ORE Studio production + +The testing team uses a deployed compass against a production environment. +The corpus is that environment's documents; the writers are testers, not +developers; the LLM is an assistant to a person, not a code generator. + +What people do here: + +- Run the test scenarios a sprint publishes, step by step, recording outcomes, + notes and screenshots. +- Get those results to the development team: through =compass test export= + into a checkout the team reads, or through the service the team already + queries. Which path is the product owner's call; the record is in the + database either way. +- Read the documentation: the manual, the project's pages and compass's own + documentation, through compass.web's endpoints and the MCP server. + +What this use must not do: write code or the library, or change the project's +model. Its writes are test records and, at most, the documents it is +responsible for. The gateway's views and roles are what enforce that, so the +production deployment runs behind the gateway with a view that admits the +production documents and a role that admits test writes and nothing else. + +** What the three uses share, and what they do not + +Shared: + +- One environment is one checkout, named by the project's convention; the + installed library and documentation are layers, not environments. +- Every read is filtered by the caller's view; every write names its subject, + view and actor. +- Project data stays with the project: its models, its documents, its + database. Generic MASD and compass's documentation stay with compass. +- A release carries everything needed to use compass, and a project never + copies compass's tree into its own. + +Distinct, and to be kept distinct: + +| | Use 1 | Use 2 | Use 3 | +|-+-------+-------+-------| +| Corpus | compass's documents | project's + compass's | production environment's | +| Writes | compass's code and library | project's documents, test records, review records | test records, reviewed pages | +| Gateway | no | optional | yes, with a restricted view | +| Release used | the build under development | a pinned release | a pinned release | + +** Open questions and their capture + +The gaps above are captured in =Run compass beside a project= under Sprint 2: +shipping compass's documentation in the release and layering it into every +environment, the development MCP and authoring flow with review and +sign-off, inline annotations, production test runs and their route to git, +and the production readers' endpoints, manual and roles. Each is a task under +that story; this page is the statement the tasks are checked against.