From ffab5e81555061bdcde9e631e47bf45468867e8c Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 00:54:40 +0000 Subject: [PATCH 1/4] Compliance over time, round five: three levels, from the owner to one item The page opens on the project: who needs attention first, who is doing well, one card per firm with how late or ahead it is, its share of what is missing and who it holds back, then the biggest problems. Opening a firm shows its summary, chart and items. Opening an item shows its full history. Format 0.5 adds optional usedBy. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01PYjDnEAE2YjM6FXu9VUKu8 --- compliance/FORMAT.md | 19 ++- compliance/build_example.py | 16 +-- compliance/example-school.json | 23 +++- compliance/index.html | 244 +++++++++++++++++++++++++++------ compliance/series.js | 6 +- compliance/test/test_page.js | 28 +++- 6 files changed, 276 insertions(+), 60 deletions(-) diff --git a/compliance/FORMAT.md b/compliance/FORMAT.md index b941ca1..e5e8a41 100644 --- a/compliance/FORMAT.md +++ b/compliance/FORMAT.md @@ -6,7 +6,7 @@ results are shown over time, and fixes the contract so that **a different plan n The page at `/compliance/` contains no project name, no goal, no firm, no rule and no milestone. It reads all of them from one file. A VIM Flex page, or any other screen, can read the same file and follow the same rules. -- Format name: `openbep-compliance-series`, version `0.4` (draft). 0.2 added three optional counts per role; 0.3 the plan's escalation steps and the owner of a failing rule; 0.4 an icon per check. All optional. Older files still load. +- Format name: `openbep-compliance-series`, version `0.5` (draft). 0.2 added three optional counts per role; 0.3 the plan's escalation steps and the owner of a failing rule; 0.4 an icon per check; 0.5 the roles that use each check's data. All optional. Older files still load. - Example: [example-school.json](example-school.json), simulated, written by `build_example.py`. - Validator: [series.js](series.js), `validateSeries(doc)` returns a list of problems in plain words. The page runs it on every file and refuses a file that fails, with the reasons. @@ -42,8 +42,9 @@ plan roles[] { code, role, firm, document, from } from = null, or the date the role joins escalation[] the plan's steps when a firm misses milestones in a row, in order (optional, 0.3) model { server, project, source, schedule, cadenceDays (7 when absent) } -valueChecks[] { id, goal, label, icon } -rules[] { id, goal, label, limit, unit, limitText, direction, icon } +valueChecks[] { id, goal, label, icon, usedBy } +rules[] { id, goal, label, limit, unit, limitText, direction, icon, usedBy } + usedBy (optional, 0.5): role codes that need this data to do their own work. icon (optional, 0.4): one of value, code, material, fire, asset, room, workset, name, level, clash, warning, duplicate. Anything else, or none, shows the icon of the kind of check. direction: lowerIsBetter | higherIsBetter @@ -90,11 +91,23 @@ versions[] in order | Urgency | Overdue: open through a milestone it should have met. Will miss: closes after the milestone, or never. On course: closes in time. | | Severity | Required values: points below the target. Critical 15 or more, major 5 to 15, minor under 5. A rule in %: the same, in points from its limit. A counted rule: critical at half its limit or more beyond it, major from a tenth; with a limit of 0, critical from 10, major from 3. | | Payment check | Per firm, four conditions: its model was uploaded and checked in the latest working period; its own compliance is at the target; no model rule fails on its elements; nothing of its own is overdue. A rule not split by firm holds no single firm. The contract decides payment. | +| Late or ahead | values short of the target ÷ (values fixed − values broken per working period), against the working periods left | +| Firm verdict | Badly behind: 4 working periods or more late, or never reaches the target at its pace, or 2 milestones missed in a row. Behind: late by less, or an item overdue or going to miss. Otherwise on track. | +| Holds back | a firm holds back each other role named in `usedBy` of one of its open deficiencies | +| Share of what is missing | the firm's values short of the target ÷ all firms' values short | | Step set by the plan | milestones a firm missed in a row on its own elements, read against `plan.escalation` | | New elements arrive filled | newMet ÷ newRequired over the last four working periods | ## What every screen shows the same way +Three levels, from the owner to the investigator. The address keeps the level (`firm`, `item`). + +- **Project.** The gate, who needs attention first and who is doing well, one card per firm (verdict, compliance and trend, late or ahead, share of what is missing, who it holds back, milestones missed in a row, open items, payment claim), the five biggest problems, the milestone track, compliance over time. +- **Firm.** Its verdict and facts, its compliance over time, its deficiencies, its accountability row, its payment check. +- **Item.** One check of one firm: severity and urgency, the numbers now, the chart over every version, the timeline, the result at each milestone, and every version's numbers. + +The parts, in the order they were added: + 1. The gate: would this version pass the milestone, and which conditions fail. Then the summary: overall compliance, model rules met, forecast, versions checked. Then one card per milestone: date, target, result, failing rules, firms below the target. diff --git a/compliance/build_example.py b/compliance/build_example.py index ae63516..d06cd21 100644 --- a/compliance/build_example.py +++ b/compliance/build_example.py @@ -39,18 +39,18 @@ # Value checks: required values that must be filled with a real value. k = required values per element, by role. # lag < 1 means the role fills this check later than its other work. VALUE_CHECKS = [ - {'id': 'assembly-code', 'icon': 'code', 'goal': 'cost', 'label': 'Assembly Code filled', 'k': {'ARCH': 1, 'STRUCT': 1, 'MECH': 1, 'CON': .2}, 'lag': {'MECH': .85}}, + {'id': 'assembly-code', 'usedBy': ['CON'], 'icon': 'code', 'goal': 'cost', 'label': 'Assembly Code filled', 'k': {'ARCH': 1, 'STRUCT': 1, 'MECH': 1, 'CON': .2}, 'lag': {'MECH': .85}}, {'id': 'real-material', 'icon': 'material', 'goal': 'cost', 'label': 'Elements with a real material', 'k': {'ARCH': 1, 'STRUCT': 1}, 'lag': {'ARCH': .9}}, {'id': 'lod-params', 'icon': 'value', 'goal': 'change', 'label': 'Parameters required by the LOD matrix at this milestone', 'k': {'ARCH': 2.2, 'STRUCT': 2.6, 'MECH': 2.0, 'CON': .5}, 'lag': {}}, - {'id': 'fire-rating', 'icon': 'fire', 'goal': 'change', 'label': 'Fire rating on walls, doors and floors', 'k': {'ARCH': .35, 'STRUCT': .2}, 'lag': {'ARCH': 1.05}}, - {'id': 'asset-data', 'icon': 'asset', 'goal': 'handover', 'label': 'Equipment asset data (OB_ asset parameters)', 'k': {'MECH': 1.6, 'ARCH': .15, 'CON': 3.0}, 'lag': {'MECH': .55, 'ARCH': .7, 'CON': .8}}, - {'id': 'rooms', 'icon': 'room', 'goal': 'handover', 'label': 'Rooms numbered and named by the plan', 'k': {'ARCH': .12}, 'lag': {'ARCH': 1.1}}, + {'id': 'fire-rating', 'usedBy': ['MECH'], 'icon': 'fire', 'goal': 'change', 'label': 'Fire rating on walls, doors and floors', 'k': {'ARCH': .35, 'STRUCT': .2}, 'lag': {'ARCH': 1.05}}, + {'id': 'asset-data', 'usedBy': ['CON'], 'icon': 'asset', 'goal': 'handover', 'label': 'Equipment asset data (OB_ asset parameters)', 'k': {'MECH': 1.6, 'ARCH': .15, 'CON': 3.0}, 'lag': {'MECH': .55, 'ARCH': .7, 'CON': .8}}, + {'id': 'rooms', 'usedBy': ['MECH'], 'icon': 'room', 'goal': 'handover', 'label': 'Rooms numbered and named by the plan', 'k': {'ARCH': .12}, 'lag': {'ARCH': 1.1}}, {'id': 'worksets', 'icon': 'workset', 'goal': 'basics', 'label': 'Elements on a named workset', 'k': {'ARCH': 1, 'STRUCT': 1, 'MECH': 1, 'CON': 1}, 'lag': {'ARCH': 1.15, 'STRUCT': 1.2, 'MECH': 1.1, 'CON': 1.2}}, {'id': 'view-names', 'icon': 'name', 'goal': 'basics', 'label': 'Views named by the naming rules', 'k': {'ARCH': .06, 'STRUCT': .05, 'MECH': .05, 'CON': .03}, 'lag': {'MECH': .8}}, ] RULES = [ - {'id': 'on-level', 'icon': 'level', 'goal': 'cost', 'label': 'Elements on a level', 'limit': 95, 'unit': '%', 'limitText': 'at least 95 %', 'direction': 'higherIsBetter'}, - {'id': 'clashes', 'icon': 'clash', 'goal': 'change', 'label': 'Clashes open for more than one coordination cycle', 'limit': 25, 'unit': '', 'limitText': 'at most 25', 'direction': 'lowerIsBetter'}, + {'id': 'on-level', 'usedBy': ['CON'], 'icon': 'level', 'goal': 'cost', 'label': 'Elements on a level', 'limit': 95, 'unit': '%', 'limitText': 'at least 95 %', 'direction': 'higherIsBetter'}, + {'id': 'clashes', 'usedBy': ['ARCH', 'STRUCT', 'MECH', 'CON'], 'icon': 'clash', 'goal': 'change', 'label': 'Clashes open for more than one coordination cycle', 'limit': 25, 'unit': '', 'limitText': 'at most 25', 'direction': 'lowerIsBetter'}, {'id': 'warnings', 'icon': 'warning', 'goal': 'change', 'label': 'Revit warnings', 'limit': 1500, 'unit': '', 'limitText': 'at most 1,500', 'direction': 'lowerIsBetter'}, {'id': 'dup-mark', 'icon': 'duplicate', 'goal': 'handover', 'label': 'No duplicate Mark', 'limit': 0, 'unit': '', 'limitText': 'limit 0', 'direction': 'lowerIsBetter'}, {'id': 'worksets-exist', 'icon': 'workset', 'goal': 'basics', 'label': 'The named worksets exist', 'limit': 0, 'unit': '', 'limitText': 'limit 0 missing', 'direction': 'lowerIsBetter'}, @@ -201,13 +201,13 @@ def rule_values(day, i): versions.append(v) doc = { - 'format': 'openbep-compliance-series', 'formatVersion': '0.4', 'example': True, + 'format': 'openbep-compliance-series', 'formatVersion': '0.5', 'example': True, 'note': 'SIMULATED. Invented numbers for a made-up school project. No real model, firm or VIM Server was measured. Written by compliance/build_example.py.', 'plan': {'name': 'Example: Primary school renovation and extension', 'owner': 'School service centre (example)', 'delivery': 'Design-bid-build', 'goals': GOALS, 'milestones': MILESTONES, 'holidays': HOLIDAYS, 'roles': ROLES, 'escalation': ESCALATION}, 'model': {'server': 'VIM Server (simulated)', 'project': 'Primary school (example)', 'source': 'SCH-FEDERATED.vim', 'schedule': 'One version every Friday, built from the Revit models each firm uploaded that week.'}, - 'valueChecks': [{k: v for k, v in vc.items() if k in ('id', 'goal', 'label', 'icon')} for vc in VALUE_CHECKS], + 'valueChecks': [{k: v for k, v in vc.items() if k in ('id', 'goal', 'label', 'icon', 'usedBy')} for vc in VALUE_CHECKS], 'rules': RULES, 'versions': versions, } diff --git a/compliance/example-school.json b/compliance/example-school.json index 8f3bc69..0a5bb5a 100644 --- a/compliance/example-school.json +++ b/compliance/example-school.json @@ -1,6 +1,6 @@ { "format": "openbep-compliance-series", - "formatVersion": "0.4", + "formatVersion": "0.5", "example": true, "note": "SIMULATED. Invented numbers for a made-up school project. No real model, firm or VIM Server was measured. Written by compliance/build_example.py.", "plan": { @@ -118,6 +118,9 @@ "valueChecks": [ { "id": "assembly-code", + "usedBy": [ + "CON" + ], "icon": "code", "goal": "cost", "label": "Assembly Code filled" @@ -136,18 +139,27 @@ }, { "id": "fire-rating", + "usedBy": [ + "MECH" + ], "icon": "fire", "goal": "change", "label": "Fire rating on walls, doors and floors" }, { "id": "asset-data", + "usedBy": [ + "CON" + ], "icon": "asset", "goal": "handover", "label": "Equipment asset data (OB_ asset parameters)" }, { "id": "rooms", + "usedBy": [ + "MECH" + ], "icon": "room", "goal": "handover", "label": "Rooms numbered and named by the plan" @@ -168,6 +180,9 @@ "rules": [ { "id": "on-level", + "usedBy": [ + "CON" + ], "icon": "level", "goal": "cost", "label": "Elements on a level", @@ -178,6 +193,12 @@ }, { "id": "clashes", + "usedBy": [ + "ARCH", + "STRUCT", + "MECH", + "CON" + ], "icon": "clash", "goal": "change", "label": "Clashes open for more than one coordination cycle", diff --git a/compliance/index.html b/compliance/index.html index af917d2..87606a9 100644 --- a/compliance/index.html +++ b/compliance/index.html @@ -198,6 +198,18 @@ .steps .pass .nd{background:var(--good);border-color:var(--good);color:var(--surface)}.steps .miss .nd{background:var(--bad);border-color:var(--bad);color:var(--surface)}.steps .now .nd{border-color:var(--accent);color:var(--accent-ink)} .steps b{color:var(--ink);font-weight:500} .steps .td{position:absolute;top:-28px;transform:translateX(-50%);font-size:10px;color:var(--ink);white-space:nowrap;line-height:1.15;z-index:2} +#app[data-level="1"] [data-lv]:not([data-lv~="1"]),#app[data-level="2"] [data-lv]:not([data-lv~="2"]),#app[data-level="3"] [data-lv]:not([data-lv~="3"]){display:none!important} +.crumb{display:flex;flex-wrap:wrap;gap:4px 8px;align-items:center;margin-top:12px;font-size:14px}.crumb:empty{display:none}.crumb b{font-weight:700} +.crumb button,.lnk{background:none;border:0;padding:0;color:var(--accent-ink);cursor:pointer;font:inherit;font-weight:500;text-align:left;text-decoration:underline} +#dig>summary{font-size:15px;font-weight:700;color:var(--ink);padding:12px 16px;border:1px solid var(--line);border-radius:var(--r-md);background:var(--surface);margin-top:26px} +.fc.good{border-top-color:var(--good)}.fc.warn{border-top-color:var(--warn)}.fc.bad{border-top-color:var(--bad)} +.big{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px}.big .mv{font-size:26px;font-weight:700}.big .mv small{font-size:13px;font-weight:400;color:var(--muted)} +.lead{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px;margin-top:12px} +.lead>div{border:1px solid var(--line);border-left:5px solid var(--faint);border-radius:var(--r-md);background:var(--surface);padding:10px 14px;display:flex;flex-direction:column;gap:4px;align-items:flex-start;min-width:0} +.lead .bad{border-left-color:var(--bad)}.lead .good{border-left-color:var(--good)} +.lead .k{font-size:12px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}.lead .t{font-size:17px;font-weight:700} +.gate.warn{border-left-color:var(--warn)}.gate .dl{min-width:0} +.tl.big{width:100%;max-width:460px} .rules{margin:8px 0 0;padding-left:18px;font-size:13px;color:var(--muted);max-width:100ch}.rules li{margin:2px 0}.rules b{color:var(--ink)} td small.sm{display:block;color:var(--muted);font-size:12px} .seg{display:inline-flex}.seg .btn{border-radius:0;margin-left:-1px}.seg .btn:first-child{border-radius:var(--r-sm) 0 0 var(--r-sm);margin-left:0}.seg .btn:last-child{border-radius:0 var(--r-sm) var(--r-sm) 0} @@ -211,7 +223,7 @@ .chart .scope{fill:none;stroke:var(--ink);stroke-width:1.6;opacity:.75} tr.dim td{opacity:.45} @media print{ - .top nav,.ctl,.example,details,#firmsBtn,.seg{display:none!important} + .top nav,.ctl,.example,details:not(.keep),#firmsBtn,.seg,.crumb,.msc .btn,.lead .btn{display:none!important} body{background:#fff;font-size:11px}.wrap{max-width:none;padding:0} .top{background:none;color:#000}.top .home,.top h1{color:#000} .panel,.tile,.gate,.tw{break-inside:avoid} @@ -271,44 +283,56 @@ -
-
-
+
+ +
+
+
+
+

The firms

The firm that needs the most attention comes first. Open a firm to see its work.
+
+
+
+

Biggest problems

The most urgent and most severe open items across all firms. Open one for its full history.
+
+
+
-
+

Major milestones

What the model had to reach at each milestone, and what it reached. Seen from the version selected above.
    -
    +
    Show each milestone in detail
    -
    +
    +

    Compliance over time

    Share of the values the plan requires that are filled, in every element of every firm's model. The dashed line is the target of the milestone in force.
    +
    +
    +
    +
    +
    Show the numbers as a table
    +
    +
    + +

    Active deficiencies

      -
      +

      Accountability

      Each firm's record against the milestones, what it has open now, and the step the plan sets.
      -
      +

      Payment check

      • A claim is valid under the plan when the firm meets all four conditions. The contract decides payment: these conditions count only where the contract makes them part of a valid payment claim.
      -
      -

      Overall compliance

      Share of the values the plan requires that are filled, in every element of every firm's model. The dashed line is the target of the milestone in force.
      -
      -
      -
      -
      -
      Show the numbers as a table
      -
      -
      - +
      Dig deeper: pace by firm, each goal, what changed, every check by version

      Who contributes at what pace

      Each firm's own elements. Pace is counted over the last four working weeks; holiday weeks are not counted.
      @@ -335,6 +359,8 @@

      Values fixed each week, by firm

      Every check, every version

      Green is met, red is failed. The arrow shows which way the value moved since the version before; its colour says whether that is better or worse. Select a column or a cell to open that version.
      +
      +