Skip to content
Machine BehaviorCTO
Menu

Masthead page

The masthead shows the seats of the house, the holder of each, the machinery that runs the seat's staff work, and the gates that apply with where each one runs, plus the editorial standards. The seats come from one data file, inside/masthead/seats.json; scripts/build_masthead.py writes the page's blocks from it (ADR-0032).

The file

KeyFormMeaning
schemathe integer 1The contract version
updatedYYYY-MM-DDThe date of the last edit; the sitemap date of the page must match it
houseup to 60 characters: letters, digits, spaces, . and -The house name, in one place
sourceup to 400 charactersOne paragraph on where the file comes from
wherean object of 1 to 8 entries, each a short key and one lineThe places a gate can run; every gate's where is one of these keys
seatsa list, one entry per seat, in masthead orderceo, cto, cfo, chro, publisher, cko; each at most once

Per seat:

KeyFormMeaning
seatone of the six keysThe seat
titleup to 80 charactersThe title shown on the page
holderup to 80 charactersThe person who holds the seat
areasa non-empty list of distinct keys from the cockpit's eightThe areas the seat reads; each links to the cockpit
bundlenull or a slugThe bundle of the seat in the CTO powersuit, once one exists
lens2 to 6 questions of up to 160 charactersThe questions the seat asks of a finding; shown at the top of the seat's tab
machinery1 to 20 rows of name and whatThe modules and skills that do the seat's staff work
gates1 to 20 rows of check, where, and whatThe checks a change in the seat's scope passes, each with where it runs

Free text (what, source, the values of where, and each lens question) is at most 400 characters (160 for a lens question) with no angle bracket, no control or format character (bidi overrides and zero-width characters included), and no URL. Names, titles, holders, and where keys allow letters, digits, spaces, and . , & / : ( ) -.

Build and check

python3 scripts/build_masthead.py            # check the file, write the blocks, apply the chrome
python3 scripts/build_masthead.py --check    # write nothing; exit 1 on a contract error, a stale block, or a stale sitemap date
python3 scripts/test_build_masthead.py       # the tests: contract variants, blocks, --check on an edited copy

The build writes five blocks between <!-- static:masthead-… --> markers in inside/masthead/index.html: the eyebrow, the lede, the where map, the seat tabs, and the seats. The seat tabs come from inside/cockpit/cockpit.json through the cockpit generator's own functions (totals, the 14-day trend, the area sections), filtered to the seat's areas; the chief executive's tab shows every area at the level of the totals and the open decisions. The deploy job rebuilds the page after the cockpit's fetch, so the live tabs are as fresh as the cockpit; --check compares the committed page with the committed data. Everything outside the markers is hand-written page content. The build also sets the page's lastmod in sitemap.xml to the file's updated date, which the chrome uses for the page's Updated line and dateModified.

--check runs in the Conformity checks job before the gate, so a file that breaks the contract, or a page whose blocks were edited by hand, can neither merge nor deploy. The tests run in the Script tests job. The area titles are read through scripts/build_cockpit.py from site/powersuit.yml and cto-powersuit/modules.json, so the masthead and the cockpit cannot drift apart on them.

Editing

  1. Edit inside/masthead/seats.json. A seat that moves to another person is one changed holder. A new gate needs a where from the map; a gate this site does not run cannot carry site gate.
  2. Set updated to today.
  3. Run the build, then python3 scripts/site_chrome.py --check and the gate dry run from CLAUDE.md.
  4. After a refresh of the committed inside/cockpit/cockpit.json or a move of the powersuit pin, run python3 scripts/build_masthead.py as well: the seat tabs and the area titles come from there, and the required check compares the page with both files (scripts/build_powersuit.py runs it after the cockpit build).
  5. Open the pull request with the issue in its title.

The file is hand-edited for now. The seats file of the local cockpit, and a command that writes this public copy from it, are planned outside this repository.

Built from scripts/docs by build_docs.py.