Skip to content
Open
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
1,345 changes: 1,237 additions & 108 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"dependencies": {
"@astrojs/markdown-remark": "^7.3.9",
"astro": "^7.4.0",
"mermaid": "^12.3.0",
"yaml": "^2.9.1",
"zod": "^4.6.7"
},
Expand Down
4 changes: 2 additions & 2 deletions project/v3/case-study/MODEL-CHECK.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Those checks established the internal consistency of the teaching fixture. The [

### Conservation

For each direction separately, `arrivals = departures + final queue`, because the initial queue is zero and the model has no losses. For scenario A this is NS: 2 = 1 + 1; EW: 2 = 2 + 0. For scenario B NS: 2 = 0 + 2; EW: 2 = 2 + 0. This detects a missed or double-counted departure in the trace but **does not** establish real-world fidelity.
For each direction separately, `arrivals = departures + final queue`, because the initial queue is zero and the model has no losses. For scenario A this is NS: 2 = 1 + 1; EW: 2 = 2 + 0. For scenario B NS: 2 = 0 + 2; EW: 2 = 2 + 0. This checks that the accounting balances; a missed departure and the extra vehicle left in the queue can still balance. The independent row comparison checks the stated service behavior. Neither check establishes real-world fidelity.

### Graph integrity

Expand All @@ -49,7 +49,7 @@ Every existing edge has a known source and target ID, a declared relation type,

[The data-quality fixture](data-quality-v1.json) retains original A/B counts and a deliberately incompatible C row. Comparison of C is **withheld** because the unit, model revision, metric meaning and observation horizon are unrecorded. Do not guess conversions or treat “20” as twenty vehicles, queueing seconds or a ratio to A/B.

The allowed editorial conclusion is narrow: **with T1's eight-slot rule and invented arrivals, arrival clustering changes the number still queued**. No real intersection, physical indication, safety or AI-agent performance is assessed.
The allowed editorial conclusion is narrow: **under T1's fixed eight-slot schedule, these invented arrival patterns leave different numbers still queued**. The patterns differ in placement relative to green as well as clustering. No real intersection, physical indication, safety or AI-agent performance is assessed.

## Follow-ups recorded in the original review on 16 November 2026

Expand Down
1 change: 1 addition & 0 deletions project/v3/case-study/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The [interface comparison is in Chapter 10](https://and-gu.github.io/executable-
| [trace-v1.csv](trace-v1.csv) | Sixteen computed state records, eight per scenario | Recomputed deterministic **toy-model calculation**, not a deployed V3 simulation or field measurement |
| [two-cycle-run.json](two-cycle-run.json) | Both scenarios across the cycle boundary with source checksums | Computed by running `node project/v3/case-study/run-two-cycles.mjs` from the repository root |
| [data-quality-v1.json](data-quality-v1.json) | Legitimate derived comparison and the deliberately inapplicable legacy C row | Editorial data-quality decisions |
| [queue-initiative.json](queue-initiative.json) | Before-and-after planning excerpt linked to the saved arrival-edit observation | Illustrative proposed update for team review, not an actual city or agent decision |
| [DECISION-CHAIN.md](DECISION-CHAIN.md) | Controlled next increment, agent task, reviewable slice, integration mismatch, evidence, governance, release, reuse and capstone | Proposed engineering decisions, not executed project actions |
| [MODEL-CHECK.md](MODEL-CHECK.md) | Exact model formula, checks and limitations for a future implementer/editor | Independent editorial recomputation record; not software/system qualification |

Expand Down
14 changes: 14 additions & 0 deletions project/v3/case-study/queue-initiative.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"id": "INIT-QUEUE-001",
"status": "illustrative planning record",
"before": {
"initiative": "Understand how arrival timing affects vehicle queues under the fixed signal sequence."
},
"proposed_after": {
"initiative": "Identify which arrival patterns just before and after the end of north-south green leave vehicles waiting, and under what conditions.",
"basis": "RESULT-B-NS-3-TO-2",
"reason": "Moving one arrival relative to green changed the eight-slot queue while the number of arrivals stayed the same.",
"next_increment": "Ask operations for north- and south-arm arrivals and signal phase history; establish the available timestamp precision or count-bin width around the end of north-south green and whether it can answer the question.",
"status": "proposed after engineer check; team review pending"
}
}
48 changes: 31 additions & 17 deletions project/v3/manuscripts/revised/01-the-new-engineering-paradigm.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,76 @@ Imagine joining a city workshop about a busy four-way intersection. Drivers desc
| --- | --- |
| Drivers | How many cars are still waiting after a green light? |
| Pedestrians | When can I start across, and could a turning car cross my path? |
| People with different mobility needs | Is there enough time and a usable route to reach the far curb? |
| Operators | How can we keep the intersection usable while a change is in progress? |
| Maintainers | If a signal looks wrong, can we tell what the controller requested and what the lamp actually showed? |

> **Concept**
>
> For drivers, reducing queues is the **intent**. Their **question** is how many cars are still waiting after a burst has had a chance to clear. A future **requirement** could call for fewer vehicles left waiting than under an agreed reference sequence, given the same arrivals and counting period. The city would need to agree on representative conditions and a separate criterion for people crossing.

The city's purpose is broad because the team has not yet agreed on all the conditions or trade-offs. In an agile approach, engineers work with the people affected while investigations and design choices reveal what a useful requirement needs to say. A queue requirement, for example, needs an identified approach, a counting period, reference conditions and a criterion for comparison. These are proposed details to agree with the city, not measurements already obtained.

## A system view in SysML

A traditional Systems Modeling Language (SysML) description can locate the parts before the team simulates behavior. This illustrative structural definition says that an intersection contains a controller, vehicle signals and crossings. The controller sends commands to the signals; drivers and people crossing respond to indications. The definition is a starting point for discussion, not evidence that equipment is installed or safe.

```sysml
part def Intersection {
part controller : Controller;
part vehicleSignals : VehicleSignals;
part crossings : Crossings;
}
part def Controller;
part def VehicleSignals;
part def Crossings;
```

The text names the `controller` part and its type. A [structural view in Chapter 4](04-engineering-knowledge-as-code.md#one-source-several-useful-perspectives) uses the same definition. It does not yet specify crossing indications, turning priority or the physical connections.

## Describe traffic flow

Traffic-flow information answers a different question: how many vehicles arrive at each approach, and when? The same total can arrive steadily or in a burst. Before combining a count with the system description, someone must identify which modeled approach it describes and the interval it covers.

For example, an invented count might record three arrivals on the north arm from 8:00 to 8:05. To use it with the two-group model, the team would relate that arm to the north–south group and combine it with the corresponding south-arm count. If the interval spans a phase change, the total alone cannot show whether the vehicles arrived before or after green ended. The team would need timestamps or counts grouped by phase. The current model cannot recover a north-arm count from its combined group. Its abstract slots are not those five minutes.

For the first illustrative comparison, the team groups traffic north–south (NS) and east–west (EW), starts both queues empty and uses eight abstract slots, not seconds. Its fixed phase sequence, arrival counts and service rules are maintained in the [T1 inputs](../../case-study/model-inputs-v1.json). The table is generated from those inputs: both invented scenarios contain two NS and two EW arrivals, placed at different times.

<!-- interactive: arrival-patterns -->

## Two views maintained as text

The following sequence shows one illustrative ordering of controller, signal and road-user interactions. The controller requests north–south green, the vehicle signal shows it, and a driver arrives and proceeds if permitted. A pedestrian asks what crossing indication is available. The controller then requests amber. The displayed vehicle indication and driver response are assumptions for this discussion; the queue model does not simulate a signal head or a pedestrian crossing. It has no rule for when a pedestrian may cross or a turning vehicle may proceed. Scroll the diagram horizontally to read the full sequence.

```mermaid
sequenceDiagram
actor Driver
participant Intersection
participant Signal
participant Controller
actor Pedestrian
Controller->>Signal: Request north-south green
Signal-->>Driver: Show vehicle green (assumed)
Driver->>Intersection: Arrive and proceed if permitted
Note over Pedestrian: Which crossing indication is available?
Note over Pedestrian: Crossing indication and turning priority remain open
Controller->>Signal: Request north-south amber
```

The flowchart focuses on the vehicle queue in one slot. Arrivals join first. If the group's phase is green and the queue is nonempty, one vehicle leaves; otherwise no vehicle departs. The remaining queue is recorded before the next slot. The pedestrian question raised in the sequence remains open.

```mermaid
flowchart TD
A[Add arrivals to the group queue] --> B{Green and queue nonempty?}
B -- Yes --> C[Serve one vehicle]
B -- No --> D[No vehicle departs]
C --> E[Record remaining queue]
D --> E
E --> F[Continue to next slot]
```

A conventional image handoff can make the picture easy to read, but someone must also find the definition and check its revision before changing it. These Mermaid definitions are readable, versioned text rendered as diagrams. An AI agent could read them with the other shared information and propose, for example, a note identifying a newly specified crossing indication. An engineer would compare the proposed text and rendered view with the agreed system description before accepting it. [Chapter 4](04-engineering-knowledge-as-code.md) develops that shared-information practice.

## A prototype for the first question

<span id="the-first-learning-question"></span>The drivers' accounts suggest a hypothesis about *when* cars arrive. Imagine that two patterns bring the same number of vehicles to each road over the same period. If the signals follow the same sequence, could the timing of the arrivals alone change how many vehicles are still waiting at the end?
Expand Down
38 changes: 31 additions & 7 deletions project/v3/manuscripts/revised/03-planning-under-uncertainty.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,43 @@ Before the next concept review, the team has time for one substantial investigat

The team chooses the arrival comparison. The north–south and east–west vehicle groups in the workshop sketch are enough to start. Fixed phases give the engineers a reference for a later proposal, such as a controller that adjusts its phases in response to arrivals. Mapping conflicts takes priority before a change to which movements can proceed together.

## Vision, initiative, increment and backlog are different things
## Trace the plan to intent

The **vision** describes the lasting outcome the city wants for the people who use the intersection. A **theme**, such as improving signal operation, groups related efforts toward that outcome. Within it, an **initiative** focuses on a problem worth sustained work. The vehicle-queue initiative asks under what arrival conditions a fixed sequence merits further study.
With traditional waterfall planning, an agreed requirement can be allocated to disciplines and traced down to their work and back to the check that demonstrates fulfillment. Suppose, for this hypothetical comparison, the city has agreed that a candidate plan must leave fewer vehicles on the north approach than the reference plan under the specified burst and counting conditions. The controls team defines the candidate phase plan, the modeler prepares the specified scenario, and the verification team checks whether the candidate meets that criterion. The requirement explains why each task belongs. If it changes, the team can identify those dependents and review the check as well.

The **roadmap** shows how one decision depends on another. First the engineers plan to compare the two arrival patterns. If they can explain the traces at the review, their next increment will be to draw up that request for arrival data with operations staff. A detector study moves up the roadmap if the information they need is missing.
In agile planning the team can start before that requirement is agreed. Three levels of intent make its changing choices traceable:

An **increment** is a piece of work with a result the team can evaluate. The first delivers the prototype and its two queue traces. The **backlog** orders the work for this and later increments. Entering the two patterns and tracing the queues over eight abstract time slots are tasks for this review. Further out, uncertainty is expected. A question about what a detector might need to sense is enough to keep that option on the roadmap.
| Level | Intersection example |
| --- | --- |
| **Vision** — lasting outcome and people served | Improve traffic flow while people can cross safely. |
| **Initiative** — the problem in focus now | Investigate arrival timing and queues under fixed phases. See [queue initiative INIT-QUEUE-001](../../case-study/queue-initiative.json). |
| **Increment** — the next result and decision | Produce two reproducible queue traces so the team can decide what arrival records to request from operations. |

The **backlog** orders the tasks needed for the increment: enter the two patterns, check the rule and compare the eight-slot traces. If the review accepts the traces and finds a timing effect worth investigating, the planned next increment is a phase-aligned data request to operations. A roadmap can show dependencies on later work, such as a detector study. A task traces upward to its increment, initiative and vision; a decision record lets the team follow a change back through the same chain.

## Three possible initiatives

### Reduce queues during bursts

The first increment compares two invented arrival patterns under the same fixed phases. It varies arrivals to learn which field records to request. A possible later requirement for an updated signal plan is: **for an agreed burst scenario, fewer vehicles shall remain on the north approach at the end of eight slots than under the reference plan**. The requirement and the following test are illustrative proposals, not an agreed city target or a completed test.

The proposed test, **Compare the candidate and reference plans under the same burst**, starts both plans with the same initial queues and identical arrivals, then counts vehicles waiting on the north approach after service in slot eight. Unlike the first investigation, it holds arrivals fixed and varies the plan. The present T1 model combines north and south approaches, so a test of the north arm alone would need separately represented approaches and suitable inputs before it could support that requirement.

### Protect people crossing a turning path

People crossing, including those with different mobility needs, want a usable crossing without conflict with turning vehicles. Drivers need understandable indications; operators need to know how a change affects movements they manage. An exploratory increment can map crossings and turning paths with those users and ask what is known about indications, crossing distances, how people use the crossing and vehicle movements. Which conflicts need protection, and what evidence would let the team assess them? The queue model does not answer those questions.

### Keep signals understandable and diagnosable

Operators and maintainers need to recognize a wrong or missing indication and know what the controller requested. A possible increment would identify the information available to them and the observations needed to distinguish a command from what a signal actually shows. This investigation supports the same city vision but needs interface and physical evidence beyond the queue traces.

<span id="two-roadmaps-should-influence-each-other"></span>

## Plan for more than software

<span id="exploration-and-delivery-can-run-together"></span>

The product roadmap leaves the choice of controller open, but the team can commit to delivering a trace for the review. Its engineering work depends on how often it expects to run that comparison. For one study, two colleagues might check a short trace by hand. If several designs will use the same model, a check that reruns a known input after each change may be worth building. The [case source collection](../../case-study/README.md) includes inputs and a reference trace for that purpose.
The product roadmap leaves the choice of controller open, but the team can commit to delivering a trace for the review. Choose the least costly investigation that could credibly change the next decision. Two colleagues can check one disputed slot by hand before investing in a model. If they expect to compare many candidate plans, keeping inputs, expected results and the reasons for choices together can make later comparisons cheaper and preserve learning. Compare the cost of building and maintaining that check with repeated manual work, delay and the potential cost of committing to the wrong design. The [case source collection](../../case-study/README.md) includes inputs and a reference trace for that purpose.

The modelers can try a change as soon as the inputs are ready. Assessing a new detector also depends on a supplier's interface definition and access to a sample. An installation trial would need cabinet access and a work window agreed with operators. Electrical and operations staff can identify those dependencies on the roadmap now, then schedule the physical work if the team takes the detector option forward.

Expand All @@ -66,13 +88,15 @@ The systems lead records why the next increment has changed and what would make
| Planning decision | Entry for the concept review |
| --- | --- |
| Provisional choice and reason | Keep fixed phases as the working baseline. The first-slot disagreement concerns when a vehicle can leave, and the prototype already defines that rule. |
| Revised increment | Postpone the request for arrival data. Deliver a comparison of the two existing patterns that both groups can reproduce. |
| Revised increment | Postpone the planned data request. Reconcile the counting convention together and deliver an agreed comparison of the two existing patterns that both groups can reproduce. |
| First backlog items | Correct the operations sketch, check the first slot together and rerun both patterns using the recorded rule. |
| Review trigger | When the modeler and operations engineer can account for the same queues slot by slot, return to the data request. Ask which available records could place an arrival within a signal phase. |

> **Concept**
>
> The disagreement about one slot changes the increment and its backlog. If the city makes pedestrian crossings its immediate priority, the team would revisit the vehicle-queue initiative and bring the movement-conflict investigation forward. Both choices serve the city's long-term intent.
> The disagreement about one slot changes the next increment and its backlog; the queue initiative and city vision still make sense. If the city makes pedestrian conflicts its immediate priority, the team would revisit the initiative and bring the movement-conflict investigation forward. Both choices serve the city's long-term vision, and the decision record explains why the plan changed.

For the next worked example, suppose the modeler and operations engineer check the first row together and agree to use the documented arrival-before-service convention. They can then compare both traces before requesting field records.

<!-- interactive: chapter-quiz -->

Expand Down
Loading
Loading