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 @@ -69,7 +69,8 @@ code.
| [[id:6F19FA08-5DBE-4DE9-B853-03F541F5A4FC][Migrate a generated schema]] | STARTED | 2026-11-23 | | Keep hand-written, frozen migrations beside the generated schema, test that the migrations and the generated schema build the same catalog, and report a change to a retained table that has no migration. |
| [[id:55F578C5-6F25-4385-B0F2-CDFBDF9A753C][Model compass's service]] | STARTED | 2026-11-23 | | Add HTTP verb, path, field binding, MCP tool and caller properties to the operation model, and write the operation models of Serve the documents' endpoints and tools. |
| [[id:E754BE53-3A6B-4491-BB26-450D1A34F159][Generate JSON codecs]] | BACKLOG | | | Generate the JSON reading and writing of every type compass models, row types, enums and the service's messages, and the JSON Schema of each message, so no JSON is written by hand. |
| [[id:8CF40A62-82EB-4FE0-8CEC-2621BD0E66FE][Generate the HTTP and MCP service]] | BACKLOG | | | Write the cpp-httplib route, MCP tool description and tool table templates and the wire codec compass needs, and generate Serve the documents' HTTP and MCP service from its operation models. |
| [[id:8CF40A62-82EB-4FE0-8CEC-2621BD0E66FE][Generate the HTTP and MCP service]] | BACKLOG | | | Copy ORE Studio's route, catalogue declaration, router, start-up gates and typed bodies into a MASD template family, and generate Serve the documents' routes and MCP tool provider from its operation models with it. |
| [[id:A2D4D196-1BF0-48F1-8C9D-7096651F94E1][Converge the HTTP and MCP service templates with ORE Studio]] | BACKLOG | | | Once compass and ORE Studio stabilise, diff compass's copied HTTP, MCP and JSON codec families against ORE Studio's files, settle each difference as a parameter or a fix, and offer the families in compass's MASD library for ORE Studio to opt into. |
| [[id:8BA1802D-350E-42FB-8DAC-F51B6F1A4604][Tag evidence documents]] | STARTED | | | Mark recorded artefacts kept for reference with the evidence filetag so they keep the .org extension, are held to no contract, lend their IDs only when no live page has them, and are read by no codec that does not ask for evidence. |
| [[id:88A57B71-75AA-440C-8290-6FB0DCC2EB9D][Generate a time-of-day column]] | STARTED | 2026-11-22 | | Give a model column of SQL type time the template flags is_time and is_optional_time and a mapping in each of compass's type tables, so ORE Studio can generate a time of day without an empty type. |

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
:PROPERTIES:
:ID: A2D4D196-1BF0-48F1-8C9D-7096651F94E1
:END:
#+title: Task: Converge the HTTP and MCP service templates with ORE Studio
#+description: Once compass and ORE Studio stabilise, diff compass's copied HTTP, MCP and JSON codec families against ORE Studio's files, settle each difference as a parameter or a fix, and offer the families in compass's MASD library for ORE Studio to opt into.
#+type: task
#+level: s1
#+filetags: :own_the_masd_meta_model:sprint_01:v0:
#+owner: marco
#+branch:
#+pr:
#+blocked_on:
#+blocked_since:
#+created: 2026-11-23
#+updated: 2026-11-23
#+environment:
#+todo: DISCOVERED BACKLOG STARTED BLOCKED | DONE ABANDONED

This page documents a [[id:31C868B9-306E-4282-BA8C-07E647021B34][task]] in the [[id:E3C81059-FE00-4403-AA56-190FDBB9904A][Own the MASD meta model and generate compass with it]] story. It captures the goal, current status, acceptance, and any notes or results.

* Goal

compass copies ORE Studio's route machinery and JSON codec into MASD template
families and writes its own MCP transport, without waiting on ORE Studio, as
[[id:AF30B206-2FAB-435F-819F-9EC652D4E40D][Design: aligning the document service with ORE Studio's HTTP and MCP]]
decides. This task is the later, opt-in convergence. Once both projects
stabilise, it brings the two copies back to one and offers the families in
compass's MASD library for ORE Studio to opt into. It blocks nothing. Whether
and when ORE Studio opts in is ORE Studio's decision.

* Status

| Field | Value |
|--------------+----------------------------------------|
| State | BACKLOG |
| Parent story | [[id:E3C81059-FE00-4403-AA56-190FDBB9904A][Own the MASD meta model and generate compass with it]] |
| Now | Not yet started. |
| Waiting on | Both projects' HTTP and MCP service stabilising, and the product owner calling convergence. Nothing waits on this task. |
| Next | Nothing until the product owner calls convergence. |
| Last touched | 2026-11-23 |

* Acceptance

- A rerunnable script renders compass's =masd.cpp.http-service= and codec
families with ORE Studio's parameters and diffs them against ORE Studio's
files at a named commit. Every difference is either a divergence the design
records or is settled as a parameter or as a fix on one side.
- compass's MCP transport and ORE Studio's are compared against the design's
behaviour table and the MCP conformance runner, and one is kept or the two
are reconciled.
- The families are offered in compass's MASD library with ORE Studio's
parameters, for ORE Studio to opt into. Nothing in compass depends on
whether it does.

* 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 |
|------+-------+---------+--------|
| | | | |

* 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
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#+blocked_on:
#+blocked_since:
#+created: 2026-11-22
#+updated: 2026-11-22
#+updated: 2026-11-23
#+environment:
#+todo: DISCOVERED BACKLOG STARTED BLOCKED | DONE ABANDONED

Expand All @@ -22,9 +22,13 @@ This page documents a [[id:31C868B9-306E-4282-BA8C-07E647021B34][task]] in the [

Every type compass models reads and writes JSON through generated code: row
types (whose =jsonb= columns are JSON already), enums as their names, and the
service's request and response messages. Each message also gets a generated
JSON Schema, which the MCP tool descriptions embed. No JSON is encoded or
decoded by hand anywhere in compass.
service's request and response messages. The codec is ORE Studio's:
=ores.cpp.wire-codec='s templates and the yyjson codec runtime, copied from
ORE Studio's main into MASD now, without waiting on ORE Studio, as
[[id:AF30B206-2FAB-435F-819F-9EC652D4E40D][Design: aligning the document service with ORE Studio's HTTP and MCP]] decides. A message's JSON Schema comes from its wire traits at run
time, as ORE Studio's routes take it, so a route's schema and a tool's input
schema are one value. No JSON is encoded or decoded by hand anywhere in
compass.

* Status

Expand All @@ -35,21 +39,23 @@ decoded by hand anywhere in compass.
| Now | Not yet started. |
| Waiting on | Generate compass's schema and row types (the row types); Model compass's service (the messages). |
| Next | Begin implementation. |
| Last touched | 2026-11-22 |
| Last touched | 2026-11-23 |

* Acceptance

- A template family generates, per modelled type, a JSON writer and a reader
that rejects unknown and missing required fields with the field's name.
- Round-trip tests are generated with them: write then read gives the value
back, for every row type, enum and message.
- Each message's JSON Schema is generated and validates what its writer
writes, checked in a test.
- The JSON library is chosen in this task, measured against the design's
default (nlohmann-json), and is a vcpkg dependency that builds on Linux,
macOS and Windows.
- ORE Studio's wire-codec templates are reused where they fit, with the
product root as a parameter, and the choice is recorded.
- Each message's JSON Schema, from =json_schema<T>()=, validates what its
writer writes, checked in a test.
- The templates are the =ores.cpp.wire-codec= family and the codec runtime
copied from ORE Studio's main into MASD, with the product root as a
parameter and the MessagePack archetype left off. The task records the ORE
Studio commit it copied from, and every change from it is a divergence the
design records.
- The JSON underneath is yyjson, from vcpkg, on Linux, macOS and Windows.
nlohmann-json is not added.

* Plan

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
:ID: 8CF40A62-82EB-4FE0-8CEC-2621BD0E66FE
:END:
#+title: Task: Generate the HTTP and MCP service
#+description: Write the cpp-httplib route, MCP tool description and tool table templates and the wire codec compass needs, and generate Serve the documents' HTTP and MCP service from its operation models.
#+description: Copy ORE Studio's route, catalogue declaration, router, start-up gates and typed bodies into a MASD template family, and generate Serve the documents' routes and MCP tool provider from its operation models with it.
#+type: task
#+level: s1
#+filetags: :own_the_masd_meta_model:sprint_01:v0:
Expand All @@ -12,18 +12,26 @@
#+blocked_on:
#+blocked_since:
#+created: 2026-11-22
#+updated: 2026-11-22
#+updated: 2026-11-23
#+environment:
#+todo: DISCOVERED BACKLOG STARTED BLOCKED | DONE ABANDONED

This page documents a [[id:31C868B9-306E-4282-BA8C-07E647021B34][task]] in the [[id:E3C81059-FE00-4403-AA56-190FDBB9904A][Own the MASD meta model and generate compass with it]] story. It captures the goal, current status, acceptance, and any notes or results.

* Goal

Generate Serve the documents' HTTP and MCP service from its
operation models: cpp-httplib routes, MCP tool descriptions and the tool table,
over the messages' generated JSON codecs and schemas. The query functions, the caller and binding
helpers and the =/mcp= dispatcher are written by hand once.
Copy ORE Studio's route with its catalogue declaration, its router and route
builder with their start-up gates, and its typed bodies from ORE Studio's main
into a MASD template family, =masd.cpp.http-service=, rendered for compass
only. Then generate Serve the documents' HTTP and MCP service from its
operation models with it: one route per message, declared through the copied
builder with its tool, area, entity, whether it writes, its parameters and its
typed body, and handled by calling the query function in process; and a tool
provider for compass's =/mcp= that lists one tool per route, built from the
same declarations. The query functions and the caller read from gateway
headers are written by hand; there is no hand-written dispatcher. compass
does not wait on ORE Studio. See
[[id:AF30B206-2FAB-435F-819F-9EC652D4E40D][Design: aligning the document service with ORE Studio's HTTP and MCP]].

* Status

Expand All @@ -34,12 +42,21 @@ helpers and the =/mcp= dispatcher are written by hand once.
| Now | Not yet started. |
| Waiting on | [[id:E754BE53-3A6B-4491-BB26-450D1A34F159][Generate JSON codecs]]; [[id:55F578C5-6F25-4385-B0F2-CDFBDF9A753C][Model compass's service]]; [[id:B8F7849D-1477-4C30-80A1-49706AB2AA57][Generate compass's schema and row types]]. |
| Next | Begin implementation. |
| Last touched | 2026-11-22 |
| Last touched | 2026-11-23 |

* Acceptance

- Every route and tool of the service is generated.
- An MCP client lists the tools with the models' descriptions.
- =masd.cpp.http-service= holds the route, =route_catalogue=, the router and
route builder with their start-up gates, the typed bodies and the OpenAPI
registry, copied from ORE Studio's main. The task records the ORE Studio
commit it copied from, and every change from it is a divergence the design
records.
- Every route of the service is generated, and the copied router's start-up
gates accept it: a tool, an area, an entity and whether it writes on every
route, a typed body on every route that takes one.
- The generated tool provider lists one tool per route, with the models'
descriptions and the routes' input schemas.
- =GET /v1/catalogue= answers every route's declaration and input schema.
- =compass generate= on compass reports nothing to write.

* Plan
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ This page documents a [[id:31C868B9-306E-4282-BA8C-07E647021B34][task]] in the [

The operation model type exists, but it says how to reach a
message over NATS, not over HTTP or MCP. Add =:http_method:=, =:http_path:=,
=:http_in:=, =:mcp_tool:=, =:mcp_title:=, =:read_only:= and =:caller:=, and
=:http_in:=, =:tool:=, =:area:=, =:entity:=, =:writes:= and =:caller:=, named
after ORE Studio's route catalogue declaration as
[[id:AF30B206-2FAB-435F-819F-9EC652D4E40D][Design: aligning the document service with ORE Studio's HTTP and MCP]] decides (=:caller:= is =view= for a read and =subject= for a
write), and
write the operation models of Serve the documents' endpoints and tools, as
[[id:7FD52505-1436-4925-A1DE-4A3EC88F0133][Investigation: How compass generates itself]] sketches for search.

Expand Down
Loading