Object responsibility review: six recorded examples
The downloads contain six original inputs, their expected labels and one recorded API observation per input revision. Disagreements stay visible.
Show the method, collaborator roles and field visibility. Separate foreign implementation access from ordinary data reads and public delegation without judging ownership from syntax alone.
Feature-envy-style review depends on responsibility, not a count of dots or field reads. Plain data records are meant to expose fields, while a behavior-owning object may need to keep its implementation behind an API.
The input therefore includes roles and visibility facts. Without them, a reviewer cannot reliably tell whether a method is borrowing private knowledge or using a normal data contract.
The linked clean-code reviewer checks object boundaries and foreign-data-heavy methods. This original example joins those related checks into one task and does not move methods or rewrite a class.
This is an independently authored text demonstration inspired by the linked X discussion. Its rules and synthetic inputs are ours. It does not reproduce the author’s application, verify reported outcomes, or perform an external action.

Use the sample to understand the rule, then test your own input for object responsibility review.

Show the method, collaborator roles and field visibility.

Open the decision rules and keep the intended distinction between Foreign internals, Ordinary use, Review. Edit the choices only when testing your own rule.

Use a sample first, then try your own input. Compare the selected label with the other returned probabilities.

Review Review before using a result. The label is a decision about the supplied information, not an executed action.
| Original input | Observed label | Leading probability |
|---|---|---|
| Behavior moved across a boundary | Foreign internals | 94.0% |
| Plain data record | Ordinary use | 99.0% |
| Public delegation | Ordinary use | 100% |
| Configuration reads | Ordinary use | 100% |
| Unknown ownership | Review | 97.0% |
| Conflicting visibility | Review | 98.0% |
These are six original synthetic inputs, tested once per request revision. The percentage is the leading option probability, not measured accuracy. Authored expectations and any disagreements remain in the downloadable evidence. 6 of 6 results matched the authored fixture expectations.Verified
The downloads contain six original inputs, their expected labels and one recorded API observation per input revision. Disagreements stay visible.
The single-request SDK runner uses your private TYPESAFE_API_KEY. The offline consumer reads saved observations, checks request hashes and prints a pending output. It does not call the model or change any external system.
# Offline: inspect the downloaded saved observations. No API key is needed.
python preview_choice_workflow.py samples.json saved-api-results.json
# Optional live request: install the SDK and set TYPESAFE_API_KEY privately.
npm install @typesafe-ai/sdk@0.6.0
node run-choice-sample.mjs samples.json case-1
# The live response prints to the terminal; it does not update saved-api-results.json.The input contract and these limits define what the result means.
No. A plain DTO or configuration record is intended to supply data. The example asks whether private behavior-owning state is being used to reimplement another object's responsibility.
The same syntax can represent ordinary data access or unwanted coupling. Explicit roles and visibility make that distinction reviewable.
It describes the distribution over the supplied choices for this request. These six synthetic examples are functional tests with authored expectations, not a production accuracy benchmark.
No. The demo displays a label and distribution. The downloadable consumer produces a pending preview packet. Application code and a separate authorization policy would control any real action.
Edit the example above to see how a changed fact affects the decision, or open the Playground for another task.