Skip to content

Stage 3 interaction model, part 1: skill + wireframe page contract + wiring (#291) - #317

Closed
MendixMau wants to merge 6 commits into
masterfrom
feat/interaction-model-skill
Closed

MendixMau wants to merge 6 commits into
masterfrom
feat/interaction-model-skill

Conversation

@MendixMau

@MendixMau MendixMau commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

#291, part 1 of 3: skill and wiring

Depends on #315. This branch merges chore/baseline-word-trim (#315), which frees room in the baseline word budget. Merge #315 first; this diff will then shrink to this PR's own changes.

Problem

Stage 3 never asks three questions:

  • where each role lands;
  • how each role finds its work;
  • which object each page is about, and who passes it to the page.

Wireframes get drawn as one role looking at one record, and every later check inherits that view. In three apps built with the toolkit, every gate passed:

  • Stage 3 and Stage 4: PASS
  • page fidelity: 81–89% on the affected pages
  • lint: 0 errors
  • e2e: 69/69

Meanwhile one of those apps had these defects:

  • 8 pages were rooted on a parameterless "current record" retrieve;
  • all 6 roles had the same home page;
  • 3 of the 6 menu items were process stages.

A navigation review of a second app found 16 more defects of the same kinds.

Fix

New skill skills/interaction-model.md (on demand). It runs at Stage 3, after the role model is CONFIRMED and before the first wireframe, and produces design/interaction-model.md with:

  • a home page per role;
  • an inbox per BRD user task;
  • an object hub for each object users follow over time;
  • a per-page table: page | how reached | page parameter / context object | data view source | nav entry | role(s).

The skill also contains:

  • Four rules for the table:
    1. A page about one object takes that object as its parameter.
    2. Every caller passes that object.
    3. Menu items are lists, inboxes or tools, never process stages.
    4. One main grid per page; sibling sets go in tabs.
  • A failure-mode table, each row with a one-line bad example using generic names:
    • a page whose data comes from a parameterless "current/first" retrieve;
    • show page called without its argument;
    • home pages that don't match the design;
    • process stages in the menu;
    • a forced grid min-width;
    • read-only fields with no rendering specified;
    • a save that reopens its own page.
  • A two-objects-two-roles walk before the Stage-3 ✋. It is a paper walk over the per-page table unless the wireframes actually draw two records.
  • "Done when" criteria with denominators.

Wireframe page contract (skills/design-artifacts.md Step 3). Every wireframe now opens with a <div class="wf-contract"> block containing three lines:

  • Page parameter:, written as Module.Entity or none — <reason>. The skill's per-page table uses exactly the same form, because a later gate will parse this line.
  • Reached from:
  • Drawn as role:

Because the block uses the wf- prefix, page-fidelity.js drops it as annotation and assemble-prototype.js hides it behind Show bindings.

Wiring:

  • skills/design-artifacts.md:
    • new Step 2b, pointing to skills/interaction-model.md;
    • design/interaction-model.md added to the output tree.
  • skills/conversion-runbook.md, Stage 3:
    • "Agent produces" now names design/interaction-model.md (first);
    • the Gate row adds "Interaction model walked with two objects, two roles."
  • bin/lib/skill-routing.tsv: new row, on demand, stage 3, lead,ba,architect (ba runs the Stage-3 interviews), group design. The re-render changed these files:
    • README.md
    • ROUTING.md
    • the architect and ba agent stubs
    • the stage-3 entry in gate-check.sh stage_protocol_paths

Evidence

  • The counts above come from the issue and its comments, cited without naming any app.
  • I ran page-fidelity.js on tests/wave2/fixtures/page-fidelity-mocks/bind-contract.html twice: once as is and once with a wf-contract block injected. The output was byte-identical.

Risks

Checks run

Check Result
bin/check-scripts.sh rc 0
bin/render-routing.sh --check in sync
bin/check-portability.sh rc 0
bin/check-no-private-citations.sh rc 0
bin/check-pr-discipline.sh origin/master rc 0
LEAKGUARD_ALLOW_NO_DENYLIST=1 bin/check-no-client-data.sh rc 0
Forbidden-term grep over added lines 0 hits

No fixture is included because no instrument changed. By inspection, the existing fixtures that mention the touched skills don't assert on the changed text.

Flake seen in render-routing.sh --check: twice it reported a random, actually routed skill (learned-microflow-patterns.md, then module-brief.md) as UNROUTED, with rc 2. Repeat runs passed. The two reported files are unrelated to this change, so it looks pre-existing.

Field-run status

Still owed. The skill has not yet been used on a real project's Stage 3.

Design for the follow-ups (not in this PR)

Part 2: Stage-3 gate facts (bin/gate-check.sh <p> 3, facts only). This also needs an artifact-manifest row for design/interaction-model.md (bin/lib/artifact-manifest.tsv, with Stage-3 consumers cited), so that a missing artifact reports PENDING out loud.

The gate reports PENDING when the artifact is absent, and FAIL when:

  • a role in the role model has no row in the Role homes table;
  • a BRD user task or approval has no inbox row and no stated reason;
  • a design/wireframes/*.html file has no Page parameter: line inside a wf-contract block, or the line matches neither Module.Entity nor none — <reason>.

These findings are waivable in the register. Projects already past an --adopt point report ADOPTED. checkpoint-design.md also gains a question, "who lands where, and how does each role find its work", asked alongside the layout question. Fixtures will be synthetic project trees, each failing on master.

Part 3: model-side check (Stage 5; a project-bin script or lint rules). It reads describe navigation, page data views and show page calls, then reports:

  • home pages per role compared with the artifact;
  • pages whose root data view is a parameterless microflow retrieving first from an entity that is not a singleton;
  • show page P with no argument, where P takes an object;
  • menu items whose target is a stage page or a page that takes a parameter;
  • optionally, a fixed min-width on grid selectors in the theme.

Its test input must be captured describe output from a real model, never hand-written. The acceptance target from the issue: on the affected app it reports at least 8 current-object pages, 1 home for 6 roles, and 3 stage menu items.

Journey and seed changes belong to testing-shape.md and journey-proof.md, which other PRs own. Those changes are 2+ open objects, and one journey per non-primary role starting at its home.

Refs #291

🤖 Generated with Claude Code

https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw

The always-on baseline tier counted by bin/render-routing.sh --check was
at 79,735 of its 80,000-word cap. This frees 3,772 words (now 75,964)
by moving narrative and setup-only text out of baseline files, keeping
every rule, STOP, denominator and gate cell in place, each rule still
paired with a one-line failure example plus a pointer to the full text.

- conversion-runbook.md, source-triage.md, interview-protocol.md: long
  incident narratives -> one line + pointer; originals verbatim in new
  on-demand process/baseline-incident-history.md (R1-R20, AR1, ST1-ST4,
  IP1-IP3). Runbook's duplicate open-questions status table now defers
  to interview-protocol.md section 4.
- agent-roles.md: the six template shapes (setup-only) moved to
  agents/README.md, which installers never copy (explicit MXTK_AGENTS).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
…low", ST1 id

Independent review of #315: obligations.tsv still pointed at agent-roles.md for
step 8a, which moved to agents/README.md; agent-roles.md said the example bodies
are "below"; the history header cited a non-existent section id.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
…ract before the first wireframe

Part 1 of 3 for #291. Stage 3 now writes design/interaction-model.md
after the role model is CONFIRMED and before the first wireframe: a
home per role, an inbox per BRD user task, and per screen how it is
reached, its page parameter / context object, its data view source,
nav entry and roles. Every wireframe opens with a wf-contract block
(Page parameter:, Reached from:, Drawn as role:), which page-fidelity
treats as annotation and the prototype hides behind Show bindings.

Wired: design-artifacts.md Step 2b + Step 3 contract + output tree,
conversion-runbook.md Stage 3 "Agent produces" (3 words; baseline is
now exactly at its 80,000-word budget), routing row (ondemand, Stage 3,
lead + architect) re-rendered.

Refs #291

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
…t, gate clause

- Routing row now lead,ba,architect (ba runs the Stage-3 interviews); re-rendered.
- Page parameter written as Module.Entity or "none — <reason>" in both the
  skill's table and design-artifacts.md Step 3, since a later gate parses it.
- Full paths design/ vs skills/interaction-model.md where ambiguous.
- Runbook Stage-3 Gate row names the two-objects-two-roles walk.
- Step 4 walk is a paper walk unless wireframes draw two records.
- Trimmed "Why this exists"; changed the min-width example value.

Refs #291

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
MendixMau pushed a commit that referenced this pull request Oct 13, 2026
Review: MERGE (after fix round + confirmation) — ba routed, one Page parameter format, full paths, Gate-row walk; no client names from #291 leaked (grepped all names); baseline 76,270.
MendixMau added a commit that referenced this pull request Oct 14, 2026
)

Every constituent PR was reviewed by a fresh agent that did not write it (CLAUDE.md "Merging a PR"); only MERGE verdicts joined. CI green on each constituent head and on this head (40814fc); full suites run on the branch.

Review lines (per merged PR):
- #315 context trim — MERGE; 360/385 removed lines found verbatim in their new homes, rest read by hand; baseline 79,997 -> 76,259.
- #316 independent-review + word-budget rules — MERGE-AFTER-FIX (3 rounds), fixes applied as specified.
- #318 page-fidelity displayed text — MERGE after fix round + confirmation.
- #317 interaction-model skill (#291 part 1) — MERGE after fix round + confirmation; no client names leaked.
- #321 PROOF-OF-LOOK per section; final-look not due before derived Stage 6 — MERGE after fix round + confirmation.
- #307 graph-sweep guard; per-BRD conformance ledgers — MERGE after two fix rounds + confirmation.
- #325 extraction-quality section; token-burn fixes — MERGE after fix round + confirmation.
- #310 e2e OQL by alias, negative-span liveness, APP-DOWN, #302 credential regression fix — MERGE after fix round + 3 confirmations.
- #323 inbox promotions — MERGE after fix round + confirmation.
- #308 lint gate BLIND on reverted stock rules — MERGE (FIRST-SEEN reverted) after two fix rounds + confirmation.
- #328 pipefail + grep -q flake — MERGE; 0/30 flakes vs 15/100 on master. Follow-up: run-all resolves bin/lib/ subjects (reviewed, MERGE).
- #319 test-stack-up command-line ownership proof — MERGE after fix round + 2 confirmations.
- #327 change-intake core + on-demand detail; CRLF-safe change log — MERGE after fix round + confirmation.
- #320 follow-ups to #290/#292; Dispatching split out — MERGE after fix round + confirmation.
- #326 status delivery rounds (existing-app mode) — MERGE after fix round + confirmation.
- #312 lint batch 4: SEC014, toolkit CONV009 — MERGE after review + 2 fix rounds + confirmation; field run on mxcli 0.26.
- #324 exec.sh change classes, shared stale-lock takeover, SEC014 note echo — MERGE (joint review); follow-up owed for a takeover race after a mid-takeover crash.
- #322 MxTest after-startup guard, mxcli-run pid check — MERGE (joint review).
- #314 doctor property-set exit code; sync announces its bound — MERGE (joint review).
- #330 review follow-ups (exit 4/5 docs, pipefail, NUL strip) — MERGE-AFTER-FIX, fixes applied; takeover re-check dropped.

Field runs are still owed for most instruments in this batch (stated in each PR).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
@MendixMau

Copy link
Copy Markdown
Owner Author

Landed on master as part of the integration squash #329 (commit 31e90ae), after independent review — its Review: line is in that commit message. Closing as superseded.


Generated by Claude Code

@MendixMau MendixMau closed this Oct 14, 2026
@MendixMau
MendixMau deleted the feat/interaction-model-skill branch October 15, 2026 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants