Learning

Handbook

Chainable Stories · Handbook

Learn to preserve a product promise through code and change.

Contents

  1. Keep a Product Promise Intact
  2. Choose Your Reading Path
  3. Why Put the Promise in the Code?
  4. Read the Rust Without Guessing
  5. One Story, Many Registrations
  6. Composition Chooses; Chaining Connects
  7. Follow the Same Promise Inward
  8. Let a State Carry What It Knows
  9. Similar Code Can Have Different Owners
  10. Continue the Same Work
  11. A Receipt Is Not Current Permission
  12. Say What Happened
  13. Change the Promise Deliberately
  14. Ask All the Architecture Questions
  15. Choose a Tool for the Question
  16. Share a Status, Not Every Sentence
  17. Change Entry Policy, Keep Other Conditions
  18. A Matching Type Is Not Matching Work
  19. Recover After a Lost Response
  20. A Dropped Handle Does Not Finish the Work
  21. Replace the Engine Without Losing Old Work
  22. Design a Story You Know
  23. Read the Reference through Its Root
  24. Human Glossary
  25. Sources and Further Reading
  26. Read Online or Keep a Copy

Start Here

Keep a Product Promise Intact

A workshop lets people register with Google. They may enter before confirming their email, as long as their session is still valid. The workshop still owes them a confirmation message.

One Registration What It Means
Ari's identity is accepted. The configured identity check accepted Ari's submitted assertion.
Ari enters. The current session and chosen entry rule permit this visit.
Ari closes the browser. The workshop still owns the unfinished confirmation work.
Registration and its two follow-ups Verify identity Admit registration Record account EntryConfirmation Session + owed confirmation Check the sessionand entry policy Deliver message↓Confirm contact

Chainable Stories, also called USaT, is a doctrine for keeping such commitments understandable and consequential in Rust software. A commitment is work or behavior the product owes. The doctrine explains what engineering must preserve; a design pattern is one possible way of implementing part of it.

You will follow this workshop, compare two choices, and predict what a change should affect. Each concept has a worked example. Engineering Depth explains the Rust. Worked Discussion explains a practice answer after you have made your own prediction.

The human course stands on its own. The separate doctrine and agent guide are references, not required detours to understand a lesson. Choose a reading path, or continue to why the doctrine exists.

Engineering Depth

The reference can select either entry policy:

pub type OpenWorkshop<P> = Workshop<Google<P>, WithoutPassword, CookieValid>;
pub type ConfirmedWorkshop<P> = Workshop<Google<P>, WithoutPassword, ConfirmedOnly>;

Both selections use Google identity and collect no registration password. The last type changes the entry rule. P names the provider implementation; the workshop object still holds the particular provider used for this registration.

Selection Before Confirmation After Confirmation
OpenWorkshop Entry can proceed with a valid session. The session must still be valid.
ConfirmedWorkshop Entry is refused. The session must still be valid.

These aliases do not authenticate a person. Their implementations connect the selected policy to actual checks. The complete reference is a bounded in-memory teaching model.

Reflect

Ari enters successfully, then closes the browser. Which promise has been fulfilled, and which work remains?

Worked Discussion

That visit was admitted. The pending confirmation is still owed by the workshop. Entry does not prove delivery, and closing a browser does not cancel the service's obligation. Later lessons follow that work through interruption and recovery.

Start Here

Choose Your Reading Path

Choose the questions you need to answer. Product, quality and engineering readers share the same example; they do not need the same depth of Rust knowledge.

Your Work Suggested Path What You Will Practice
Product or delivery Why → Story → Architecture questions → Change entry policy State a promise and trace the consequence of changing it.
Quality or assurance Same work → Outcomes → Lost response → Owed work Distinguish facts, assumptions and evidence of completion.
Software engineering Read the Rust → Core Ideas → Reference → Your design Connect contracts, carried data, current checks and effects.

These are reading paths, not classifications of people. A product manager or SQA practitioner can read every engineering section; doing so does not change their role.

Each substantive lesson has an example, a comparison and a practice question. Make a prediction before opening Worked Discussion. Return later and explain one result without looking at your earlier answer.

Use the human glossary for a term, the thinking-tools lesson for an investigation, and the reference walkthrough for executable code. The agent guide is a separate publication for agents carrying out Rust work.

Start Here

Why Put the Promise in the Code?

A refactor changes a condition from “valid session” to “valid session and confirmed email.” It is one extra check, but it changes who may enter.

Current Promise Refactor's Behavior
A valid session may enter before confirmation. The same session is refused until confirmation.
Confirmation remains owed independently. Entry has accidentally been made dependent on confirmation.

The error is not the number of lines. The code has made a policy decision that the workshop owner did not make.

The doctrine asks engineers to keep the governing contract readable and connected to permitted behavior. That lets a reviewer locate the decision being changed and lets Rust reject relationships that the contract does not allow.

It also protects freedom to change implementation. Replacing a network library should not require renegotiating entry policy. Replacing a policy should not be disguised as a harmless library cleanup.

Change Engineering Question
Replace the identity client's HTTP library. Does it preserve the same verified observations and failure meanings?
Require confirmed email before entry. Who owns this changed promise, and where must it apply?
Engineering Depth

Compare the two implemented entry rules:

impl EntryRule for CookieValid {
    fn permits(_: bool) -> bool {
        true
    }
}
impl EntryRule for ConfirmedOnly {
    fn permits(confirmed: bool) -> bool {
        confirmed
    }
}

CookieValid ignores the confirmation Boolean. ConfirmedOnly uses it. These are two supported product choices, not a stronger and weaker implementation of the same choice.

// A different product selection:
type WorkshopEntry<P> = ConfirmedWorkshop<P>;

// A machine-level detail could instead change inside the provider P.
// That must preserve P's existing verification contract.

A named type earns its place when its selection affects the actual handler. A decorative name beside an unrelated if statement does not preserve the promise.

Reflect

An engineer says, “All existing tests still pass, so adding confirmation to the entry condition is safe.” What question has not been answered?

Worked Discussion

Whether the owner authorized that changed entry policy. Tests may not cover the earlier promise, or may have been changed alongside the implementation. Start with the promised behavior, identify its owner, then use the project's evidence to check the authorized realization.

Start Here

Read the Rust Without Guessing

You can follow the product questions without writing Rust. When a code block is useful, read its domain words first: verify identity, admit registration, record it, then handle the follow-up.

This contract says what verification can produce:

pub trait VerifyIdentity: private::Stage + Sized {
    type Registered: RecordedRegistration;
    type Verified: AdmitRegistration<Registered = Self::Registered>;
    fn verify(self) -> Result<Self::Verified, IdentityFailure>;
}
Code Plain Meaning
trait VerifyIdentity A contract that provides identity verification.
type Verified: AdmitRegistration Its successful next value must support registration admission.
Registered = Self::Registered The next contract preserves the declared registration-result type.
fn verify(self) Calling verification consumes this submitted stage.
Result<..., IdentityFailure> At runtime it returns a successful next stage or an identity failure.
private::Stage Outside callers cannot freely invent implementations of this protected stage.
Sized This contract uses an ordinary statically sized receiver; it does not mean a state must be zero-sized.

The declaration connects a legitimate successor. It does not say that every submitted assertion is valid.

Engineering Depth

Read a consuming chain from left to right:

shop.signup(assertion)
    .verify()?
    .admit()?
    .record()
    .into_followups()

This is a fragment inside a function whose error type can represent the declared failures. ? returns early on a failure; it does not ignore it. The reference's known-valid test consumer uses unwrap() instead. That test shorthand would be inappropriate for handling arbitrary user input in an application.

Compare two receivers:

Signature Fragment What the Caller Retains
fn inspect(&self) A borrow; the caller still owns the value.
fn finish(self) Ownership moves into the call. A non-copyable value cannot then be reused.

In &'a mut Workshop, &mut is an exclusive borrow and 'a names how long that borrow can be used. It can stop local code from swapping a resource while a stage uses it. It does not lock another process or make data survive a crash.

More syntax: :: selects an associated item, . calls through a value, and <P> supplies a type parameter. Follow the glossary when a term still hides a product question.

Reflect

Which part says that admission is the legitimate next operation? Which part represents the possibility that the identity provider is unavailable?

Worked Discussion

The associated successor bound Verified: AdmitRegistration supplies the first relationship. Result<..., IdentityFailure> supplies the runtime alternative. The compiler can enforce the declared relationship while a real request still fails at the provider boundary.

Core Ideas

One Story, Many Registrations

Ari registers today. Bima registers tomorrow. Their details differ, but both registrations can follow the same selected promise.

A story is that promise expressed as a compile-time abstraction: a structure Rust can use to restrict permitted combinations and operations. An occurrence is one particular piece of work using actual data and resources.

Question Answer
Which policy applies? The selected story says whether confirmation is required for entry.
Which code carries it out? The realization connects that selection to verification, recording and entry checks.
Whose registration is this? This occurrence binds Ari's assertion, subject and workshop instance.
One promise can govern different registrations. One selected story constrains the workshop realization, which handles separate occurrences for Ari and Bima.One promise can govern different registrations. One selected story constrains the workshop realization, which handles separate occurrences for Ari and Bima.

Calling every request a different story hides what is shared. Calling every request “the same story” without retaining its actual data hides what is different.

Engineering Depth

These are different policy selections:

pub type OpenWorkshop<P> = Workshop<Google<P>, WithoutPassword, CookieValid>;
pub type ConfirmedWorkshop<P> = Workshop<Google<P>, WithoutPassword, ConfirmedOnly>;

Now consider two values of the same selection, using demonstration providers:

let morning = OpenWorkshop::new(Google::new(
    DemonstrationGoogle::new("assertion-a", "ari"),
));
let evening = OpenWorkshop::new(Google::new(
    DemonstrationGoogle::new("assertion-b", "bima"),
));

They share a Rust type and entry policy. They do not share a provider instance or store. A handle belonging to morning must not be accepted by evening merely because its type matches.

Difference Chosen in This Model
Entry policy Type selection: CookieValid or ConfirmedOnly
Actual provider and records Data held by a particular workshop value
Current session validity A runtime check on each visit

The demonstration providers compare strings. They are fixtures, not real Google authentication.

Reflect

Ari and Bima use the same policy and provider type. Which facts must still stay distinct?

Worked Discussion

Their submitted assertions, verified subjects, account records, sessions and owning workshop instances. The shared type explains compatible behavior; it does not identify the same work. That is why the binding lesson keeps actual data with its continuation.

Core Ideas

Composition Chooses; Chaining Connects

The workshop selects identity verification, password collection and entry policy together. Those choices form a larger commitment. Within a registration, verification establishes what admission may consume.

These are different relationships:

Relationship Workshop Example Question to Ask
Composition Google identity + no registration password + selected entry rule Are these choices compatible, and what do they jointly promise?
Chaining Submitted assertion → verified subject → admitted registration What must this step establish before the next may act?
Independent follow-up Entry and confirmation after registration Does one really have to wait for the other?

A composition joins owned commitments. A successor is a legitimate continuation. A chain can branch or resume later; it need not be one long fluent call.

Registration and its two follow-ups Verify identity Admit registration Record account EntryConfirmation Session + owed confirmation Check the sessionand entry policy Deliver message↓Confirm contact

Forcing delivery before entry would change the open-entry promise. Leaving delivery unowned would lose a different promise. The structure must express both independence and responsibility.

Engineering Depth

The verification contract connects its result to admission:

pub trait VerifyIdentity: private::Stage + Sized {
    type Registered: RecordedRegistration;
    type Verified: AdmitRegistration<Registered = Self::Registered>;
    fn verify(self) -> Result<Self::Verified, IdentityFailure>;
}

Compare an unrelated result with a constrained successor:

// A result type with no declared next capability:
type Verified;

// A declared successor relationship:
type Verified: AdmitRegistration<Registered = Self::Registered>;

These are alternative associated-type declarations inside a trait. The second lets a generic consumer continue through admission without knowing the private carrier's concrete type. It also keeps the declared registration result connected.

The reference exposes independent follow-ups together:

pub trait RecordedRegistration: private::Stage + Sized {
    type Session;
    type Confirmation;
    fn into_followups(self) -> (Self::Session, Self::Confirmation);
}

A returned confirmation handle is not proof that the message was sent. The workshop retains the obligation separately, so dropping the handle does not erase it.

Reflect

An implementation makes enter() available only after deliver(). Under the open-entry policy, what promise changed?

Worked Discussion

Entry now waits for delivery even though only current session validity was required. That is a new dependency, not a cosmetic call-order choice. The correct arrangement can keep delivery independently owned while permitting the eligible visit.

Core Ideas

Follow the Same Promise Inward

You want to know whether an unconfirmed participant may enter. The source should give you a clear entrance and a useful next step, rather than a search through unrelated helpers.

Telescoping means following the same commitment into the detail needed for your question.

Three views of the same promise 1 · PRODUCT CHOICE Register through Google No registration password Entry before confirmation allowed 2 · CONNECTED CONTRACTS Verify → Admit → Record Entry and confirmation follow-ups 3 · THIS OCCURRENCE This person, provider and store Real data · Current checks Recorded result · Work still owed
Start With Then Follow Question Answered
OpenWorkshop Its entry selection Which policy did this realization choose?
WorkshopStories::Visit EnterWorkshop Where is entry behavior exposed?
The entry realization Session facts and E::permits How does the selected rule affect this visit?

A folder named stories can help navigation. It cannot make a misleading root truthful. Likewise, a large diagram that lists every helper is not a readable statement of the product promise.

Compare two entry surfaces:

Surface Reader's Burden
run(mode, flags, payload) Open the body to discover what the flags mean and which work may follow.
A selected entry policy and a reachable Visit contract Follow the named choice into its implementation and current checks.
Engineering Depth

At the root, the reference exposes a visit contract:

type Visit<'a>: EnterWorkshop
where
    Self: 'a;

fn visit<'a>(&'a self, session: &'a Self::Session) -> Self::Visit<'a>;

This excerpt from WorkshopStories names the next readable contract. The borrowed workshop and session are then retained by the realization until enter() checks them.

The meaning must survive the next step inward:

if !account.active {
    return Err(EntryFailure::Revoked);
}
if self.workshop.now >= account.expires {
    return Err(EntryFailure::Expired);
}
if !E::permits(account.confirmed) {
    return Err(EntryFailure::ConfirmationRequired);
}

E::permits is connected to the chosen policy. active and expires remain current facts. A named Entry parameter that never reaches this check would be decorative.

Reflect

The root shows ConfirmedOnly, but the handler always returns success for active sessions. Which part needs correction?

Worked Discussion

The declared selection and its behavior disagree. Determine the authorized policy, then connect its contract to the implementation that enforces it. Renaming the type or adding another diagram would not repair the relationship.

Core Ideas

Let a State Carry What It Knows

Ari's identity check succeeds. The next stage needs the verified subject and the actual workshop that performed the check. A label saying “verified” is not enough if the caller can supply someone else afterward.

Design What It Retains What Can Go Wrong
A marker plus a later subject argument Only a stage label The later argument can replace the verified subject.
A private state carrying subject and workshop This verified work and its resource Progression can use the retained data without asking the caller to repeat it.

A state carrier is a value that holds the data and relationships needed by a stage. A zero-sized type holds no data. Both can be useful; their size is not the doctrine's goal.

Engineering Depth

An unsafe shape can leave the subject outside the verified state:

// Sketch of a weak contract: the caller supplies the subject again.
trait RecordWithCallerSubject {
    fn record(self, subject: String) -> Registered;
}

The reference instead retains the subject inside its protected carrier:

pub struct Verified<'a, P, E> {
    workshop: &'a mut Workshop<Google<P>, WithoutPassword, E>,
    subject: String,
}

The fields are private. The exclusive workshop borrow also prevents local code from swapping its resource while the stage exists. Admission and recording consume stages that retain those bindings.

Now compare a valid use of a data-free marker:

pub struct WithoutPassword;

It selects “do not collect a registration password.” It does not claim to carry a verified person's identity, a stored approval or current permission. Making this policy marker public does not make it an authorization proof.

Reflect

Can a later step accept any new argument, or must every method be argument-free?

Worked Discussion

New input is legitimate when the continuation needs it—for example, a source observation about the already-bound operation. It must not silently retarget the work. The guarantee concerns the relationship, not an argument-count rule.

Core Ideas

Similar Code Can Have Different Owners

The preview and archive both display “Registration open.” The preview owner now wants a warmer invitation. The archive must keep its historical wording.

Elsewhere, badges and manifests both use the organization's official identifier format. That format changes, and both consumers must follow it.

Pair Reason to Change Desired Reach
Preview and archive wording Different presentation purposes Change preview alone.
Badge and manifest identifiers One shared policy Change both identifiers.

The code looks similar in both cases. The ownership relationship is different. Coupling means a change in one part can require or cause a change elsewhere; some coupling is intended.

Independent wording decisions. Preview and archive wording follow separate owners.Independent wording decisions. Preview and archive wording follow separate owners.
Shared identifier policy. Badge and manifest identifiers both follow one authoritative rule.Shared identifier policy. Badge and manifest identifiers both follow one authoritative rule.
Engineering Depth

Two small leaves can preserve independent wording:

fn preview_label() -> &'static str { "Join the workshop" }
fn archive_label() -> &'static str { "Registration open" }

Compare that with both callers using one changed registration_label(): the archive would change accidentally. Adding an is_archive flag solely to keep the helper can make the helper own a decision that belongs to its callers.

The official identifier is different:

fn official_id(number: u32) -> String {
    format!("W-{number:04}")
}

Badge and manifest can both call this one owned rule. They need not share their layout, storage or deployment just because they share identifier policy.

Reflect

The badge layout changes. Must the manifest layout or identifier policy change too?

Worked Discussion

No, unless that is part of the requirement. Sharing one rule does not make every surrounding choice jointly owned. Conversely, if the official identifier changes, both intended consumers must follow it. Explain the owner and reason for the change before counting duplicate lines.

Core Ideas

Continue the Same Work

A reviewer approves announcement version 7. Publication receives version 8. Both are announcements, but the approval does not apply to both.

The same mistake can hide behind a record number: store A and store B both have record 7. Matching types and numbers do not establish matching work.

What Matches? What Still Must Match?
Record type Actual record and owning scope
Provider type Configured provider instance
Proposal ID Reviewed version or content digest
Department role Actual person and current authority

Binding means retaining which actual work and resources a continuation belongs to. A digest identifies bytes; it does not itself establish who approved them.

Approval belongs to one version. Version 7 can be published under its review. Editing to version 8 creates different work that needs its own applicable decision.Approval belongs to one version. Version 7 can be published under its review. Editing to version 8 creates different work that needs its own applicable decision.
Engineering Depth

The reference keeps the verified subject and actual workshop together:

pub struct Verified<'a, P, E> {
    workshop: &'a mut Workshop<Google<P>, WithoutPassword, E>,
    subject: String,
}

The fields are private. The exclusive borrow keeps local code from swapping that workshop while the registration stages use it.

Later handles also check instance identity:

if !Arc::ptr_eq(&self.workshop.identity, &self.session.workshop) {
    return Err(EntryFailure::ForeignSession);
}
Protection What It Establishes Its Limit
Type compatibility The handle has the expected shape. It may still belong to another instance.
Retained resource borrow This stage uses this local resource. It does not lock another process.
Runtime instance/version check Actual work matches at that boundary. A later boundary may need to establish it again.

A human delay cannot be covered by keeping a database transaction open indefinitely. A durable realization would store the versioned decision, then reload and check current facts inside the relevant transaction when publication resumes.

Reflect

A source reports a new execution observation after approval. Is accepting that observation necessarily a forbidden later argument?

Worked Discussion

No. It can be new evidence about the original operation. Check its identity and scope. Replacing the approved proposal would be different work; adding truthful evidence about the same bound operation can be a legitimate continuation.

Core Ideas

A Receipt Is Not Current Permission

Ari entered at tick 2. The workshop then revokes the session. Ari still has a record of the earlier visit; that record does not authorize another one.

Item What It Says What It Does Not Say
Historical visit receipt That visit was admitted. Every future visit is allowed.
Session reference Which session to check. The session is currently valid.
Current admission result This operation passed its owning checks. An unrelated operation has the same permission.

A browser can display a receipt or a previously enabled button. The service that owns the work still decides whether a new request may proceed using current facts.

Engineering Depth

This model excerpt uses known-valid fixtures:

let earlier = shop.visit(&session).enter().unwrap();
shop.revoke(&session).unwrap();
let later = shop.visit(&session).enter();
assert_eq!(later, Err(EntryFailure::Revoked));

earlier remains a historical value. later is refused. The new visit does not inherit authority from the old result.

Compare two kinds of cloning:

Value Why Cloning May or May Not Fit
A session reference Repeated visits are allowed, but each visit rechecks validity.
A single-use execution permit Cloning could allow a caller to repeat work that was meant to consume the permit.

The reference's session is cloneable because it is a model handle, not a perpetual entry capability. A serialized receipt likewise carries data under its contract; decoding JSON must not create fresh authority.

Reflect

An export lists an approval made yesterday. The approver lost membership today. Should the export erase yesterday's decision? Should a new operation accept it without current checks?

Worked Discussion

Keep the historical decision as a fact. Re-evaluate whatever current authority the new operation requires. Revocation can block subsequent work without rewriting history. The exact policy belongs to the owning product, not to a receipt's format.

Core Ideas

Say What Happened

Registration was recorded. Confirmation is pending. The account view failed to load. Calling all three “registration failed” encourages the participant to repeat work that already succeeded.

Operation Known Result Useful Next Action
Registration Recorded Keep that result.
Confirmation Pending Continue the owed delivery.
Account view Unavailable Refresh the view.

A remote timeout is different again: the source may have applied the effect even though no acknowledgement arrived. Pending means work is known to remain; unknown means available evidence does not establish the outcome.

Misleading Message More Accurate Message
“Registration failed. Try again.” “Registered. Confirmation pending. Reload your account view.”
“Send failed.” after losing the response “Send outcome unknown. Check operation 42 before resending.”
Reconcile a lost response. After a response is lost, inspect the original operation. Evidence may establish applied, not applied, or still unknown.Reconcile a lost response. After a response is lost, inspect the original operation. Evidence may establish applied, not applied, or still unknown.
Engineering Depth

The reference names real identity alternatives:

pub enum IdentityFailure {
    Rejected,
    Unavailable,
    InvalidObservation,
}

A presentation can distinguish them without inventing permission:

match failure {
    IdentityFailure::Rejected => "Identity was not accepted.",
    IdentityFailure::Unavailable => "Identity check is unavailable.",
    IdentityFailure::InvalidObservation => "The provider returned invalid data.",
}

The match is exhaustive: every declared alternative is handled. Replacing it with a catch-all “try again” would erase meaning, even if it compiled.

This enum belongs to identity verification. A pure label formatter does not need the same alternatives; remote delivery may need other outcomes, including uncertainty. The story decides which alternatives are real.

Reflect

An authorized reviewer records “reject this proposal.” Did the review operation fail?

Worked Discussion

The review completed with a rejection decision. Refusing an unauthorized person's attempt to review is a different outcome. Name the effect whose success or failure you mean: recording the decision, executing the operation, loading the view or verifying the result.

Core Ideas

Change the Promise Deliberately

One engineer replaces a storage implementation. Another changes the entry condition. The first edit might be large; the second might be one line. Their consequences decide the kind of review they need.

Before After Question
Find an account in a vector. Find it in an index. Are meaning, compatibility and pending work preserved?
Require confirmation before entry. Permit entry without it. Is the changed policy authorized?
New work uses provider A. New work uses B. Where does old unresolved work remain?
Registration is available. New registration is retired. Who still owns existing obligations?

Authority is the mandate to decide or act. An implementation convenience does not create it. The current task may already authorize a policy change; use that mandate rather than inventing another approval ceremony.

Engineering Depth

These two implementations make different entry decisions:

impl EntryRule for CookieValid {
    fn permits(_: bool) -> bool {
        true
    }
}
impl EntryRule for ConfirmedOnly {
    fn permits(confirmed: bool) -> bool {
        confirmed
    }
}

A change from one selection to the other must reach both initial and later visits. It should not accidentally alter unrelated verification or confirmation delivery.

Compare two review statements:

Statement Missing Reasoning
“Only one impl changed.” Which new behavior does it admit?
“All tests are green.” Do the checks represent the authorized promise, or the altered implementation?

The reference tests demonstrate the changed policy's consequence:

assert_eq!(
    shop.visit(&session).enter(),
    Err(EntryFailure::ConfirmationRequired)
);

That observation supports this configured model. It cannot approve the underlying business decision. Your project owns its checks and release cadence.

Reflect

A private helper is removed, but a test insists on its old three-call sequence. Must the new design preserve that sequence?

Worked Discussion

Trace the assertion back to a legitimate consumer requirement. Preserve required behavior and compatibility. If the sequence was only an incidental private arrangement, it can retire with the helper. Evidence should protect the commitment, not make obsolete machinery permanent.

Architecture and Reasoning

Ask All the Architecture Questions

“We implemented entry” leaves several questions unanswered. Which session? Under whose policy? At what time? Using which source of facts?

Zachman is a way to classify architectural descriptions. It combines six questions with six transformations from an idea to an operating instance. It is not a sequence of release tasks.

Question Ask About the Workshop
What What are an account, session and pending confirmation?
How What work establishes registration and permits entry?
Where Where are identity checked and session facts held?
Who Who chooses policy, initiates work and owns the follow-up?
When What triggers entry, and when does permission expire?
Why Why may someone enter before confirmation?

Now compare representations of one decision:

Representation Example
Business meaning A participant may enter before confirming, with a valid session.
Logical model Entry depends on current session validity, independently of pending confirmation.
Rust specification Select CookieValid and apply it in the entry handler.
Running occurrence This particular session is active at tick 3 and is admitted.

The last row needs an observation. A policy sentence or type selection cannot substitute for it.

The complete worked map covers all 36 intersections. Use it as a reference; this lesson's comparison is enough to begin asking which representation a claim belongs to.

Engineering Depth
type OpenWorkshop<P> = Workshop<Google<P>, WithoutPassword, CookieValid>;

This selection answers a technical question about the chosen realization. It does not answer “who authorized this policy?” or “is this actual session valid?” Those answers have different owners and evidence.

Compare that selection with a runtime entry check:

if !account.active {
    return Err(EntryFailure::Revoked);
}
if self.workshop.now >= account.expires {
    return Err(EntryFailure::Expired);
}
if !E::permits(account.confirmed) {
    return Err(EntryFailure::ConfirmationRequired);
}

The selected E supplies the confirmation rule. The account's active flag and expiry supply current facts. Code alone also leaves the deployment question open: this reference stores facts in memory, so it cannot support a claim of restart recovery.

Reflect

Someone points to ConfirmedOnly as proof that the owner approved requiring confirmation. What kind of evidence is missing?

Worked Discussion

The type shows a configured technical selection, not the business decision that authorized it. Trace the selection back to the owner's intended meaning. Then trace it forward to initial and later entry behavior. The map connects these representations without pretending they are the same fact.

Architecture and Reasoning

Choose a Tool for the Question

A thinking tool helps you ask a better question. It does not decide the owner's policy or make an assumption true. Use one when the current problem needs it.

When You Are Stuck Try A Concrete Question
The request already assumes a solution. Abstraction laddering Why do we need an “approved” flag? What promise must it preserve?
People confuse story, request and result. Concept map Which thing constrains, binds or observes which other thing?
A reported failure has several possible causes. Issue tree Is there a decision record matching the published version, or not?
An observation is turning into a confident claim. Ladder of inference Does a timeout mean “not applied,” or only “no reply”?
A local change affects other work. Second-order thinking What happens to old operations when new ones move to another provider?
A proposed guarantee sounds too easy. Inversion How could a caller substitute work or forge a prerequisite?

For a lost response, write the observation first: no acknowledgement arrived by the deadline. “The send failed” adds an assumption. “Retry immediately” adds an action based on that assumption.

Compare an evidence-led conclusion: keep the original operation ID, inspect the source, then choose the permitted continuation. The lost-response exercise works through this decision.

Engineering Depth

Inversion can challenge this contract sketch:

trait Publish {
    fn publish(self, approved: bool, version: u64);
}

Ask who can supply true, which reviewed content the Boolean identifies, and whether a later version can be substituted. Those questions expose missing relationships; they do not dictate one universal Approved type.

A better story would establish and retain the required decision/version binding, then recheck mutable facts where needed. In the workshop, the analogous binding is visible here:

pub struct Verified<'a, P, E> {
    workshop: &'a mut Workshop<Google<P>, WithoutPassword, E>,
    subject: String,
}

The particular subject and workshop travel together. The comparison explains why a data-bearing state is useful; “always use a ZST” would discard the reason.

Reflect

A teammate proposes one shared helper because two functions currently match. Which question would you investigate first, and with which tool?

Worked Discussion

Ask whether the consumers are intended to change together and who owns that decision. A concept map can expose the ownership relationships; second-order thinking can follow the effect of a later change. Counting identical lines cannot answer those questions.

What-If Cases

Share a Status, Not Every Sentence

A participant page and an audit export both describe confirmation delivery. They share the meaning of Pending and Delivered. Their wording serves different readers.

The product owner asks for two changes: make the participant's pending message friendlier, and add a new official delivery state, Cancelled.

Change Participant Wording Audit Representation Shared Status Model
Friendlier pending message Changes Should stay stable unless separately requested Same meaning
New official Cancelled state Must account for it Must account for it Changes

Work out the intended reach before choosing a helper. Reusing the status definition does not require one shared display sentence.

Engineering Depth

A shared model can express the common meaning:

enum DeliveryState { Pending, Delivered }

Separate presentation functions can then serve their own readers:

fn audit_label(state: DeliveryState) -> &'static str {
    match state {
        DeliveryState::Pending => "pending",
        DeliveryState::Delivered => "delivered",
    }
}

The participant function can use a friendlier sentence. Changing that sentence need not alter this export. Adding Cancelled to the enum makes exhaustive consumers revisit the new case; it does not tell them which wording their owner wants.

Compare a common display(state, audience_flag) helper: it now owns two audiences' wording decisions. That may be a deliberate contract, but saving a few identical lines does not establish that shared authority.

Reflect

The audit consumer promises stable machine-readable labels. A UI refactor renames Pending to “Almost there.” What should remain unchanged, and what would you review before adding Cancelled?

Worked Discussion

Keep the existing export label unless its compatibility contract is deliberately changed. For Cancelled, establish the new state's meaning and owner, then update each affected consumer truthfully. A compile error can expose an unhandled variant; it cannot supply the state definition or approve a wire-format change.

What-If Cases

Change Entry Policy, Keep Other Conditions

The owner now requires confirmation before entry. Earlier, a valid session could enter before confirmation.

Predict the results below. An active session has not been revoked; an unexpired session is still inside its validity window.

Visit Facts Open Policy Confirmation Required
Active, unexpired, not confirmed Allowed ?
Active, unexpired, confirmed Allowed ?
Expired, confirmed Refused ?
Revoked, confirmed Refused ?

A separate proposal removes password collection during registration. That is a different choice from deciding how later login works.

Engineering Depth

The policy selection changes here:

pub type OpenWorkshop<P> = Workshop<Google<P>, WithoutPassword, CookieValid>;
pub type ConfirmedWorkshop<P> = Workshop<Google<P>, WithoutPassword, ConfirmedOnly>;

Every relevant visit reaches the same current checks:

if !account.active {
    return Err(EntryFailure::Revoked);
}
if self.workshop.now >= account.expires {
    return Err(EntryFailure::Expired);
}
if !E::permits(account.confirmed) {
    return Err(EntryFailure::ConfirmationRequired);
}

The order makes each condition visible. Confirmation does not revive an expired or revoked session. Initial and later visits use the selected rule; changing only the first entry path would leave the product inconsistent.

Compare two edits:

Edit Consequence
Choose ConfirmedOnly, applied through the shared entry contract. The new confirmation condition reaches initial and later entry.
Add a check only to the registration screen. A later visit or another client may still bypass the intended policy.

The reference's confirmation delivery remains independent. Requiring confirmation for entry does not mean that delivery must wait for entry.

Reflect

Fill the final column. Then explain why removing registration password collection does not answer the later-login question.

Worked Discussion

The results are refused, allowed, refused, refused. The changed condition is confirmation; current session validity still matters. Registration's password choice has a named scope. Follow the separately owned login contract before changing its policy.

What-If Cases

A Matching Type Is Not Matching Work

Two workshop objects contain an account in slot 0. A confirmation ticket was created by the left workshop, but is sent to the right one.

Fact What It Establishes
Both tickets have the same Rust type. Compatible structure and operations.
Both accounts use slot 0. The same position inside different stores.
The ticket retains the left workshop's identity. Which actual store owns the work.

The right workshop must refuse the foreign ticket. That refusal must not erase the left workshop's pending confirmation.

Engineering Depth

The reference compares instance identity, not just a slot number:

if !Arc::ptr_eq(&self.workshop.identity, &self.session.workshop) {
    return Err(EntryFailure::ForeignSession);
}

Its runtime case checks both refusal and retained obligation:

assert!(matches!(right.delivery(ticket), Err(ForeignWork)));
assert_eq!(left.owed_messages(), 1);

This does not require a different Rust type for every workshop instance. The type constrains what kind of value can be passed; the runtime binding identifies the actual owner.

Now transfer the reasoning to a review:

Approval Fact Attempted Use Missing Relationship
Version 7 was reviewed. Publish version 8. Exact content/version binding
Store A's record 7 was reviewed. Act on store B's record 7. Store/scope identity
A person was authorized yesterday. Perform a new protected action today. Current authority where the action requires it

A transaction can keep a current check and its stored change together. It cannot be stretched indefinitely across a person's review delay. Durable work must retain the decision and re-establish the required current facts when it resumes.

Reflect

Which facts would a later publication request reload? Which could be retained in an immutable historical decision?

Worked Discussion

Retain who decided, the exact version/content and the decision's evidence. Reload the current record, scope and whatever current authority publication requires. A historical decision remains a fact; whether it is sufficient for this next action is a current story question.

What-If Cases

Recover After a Lost Response

The source received operation 42, but the caller lost the response. The form is now edited. Sending the edited form under operation 42 would silently change the meaning of an existing operation; sending the original again may duplicate an effect.

First separate the facts:

Situation What Is Known Safe Direction
Local registration committed; view refresh failed Registration exists. Reload the view.
Source accepted work and reports it pending The operation is still running. Observe the original operation.
No acknowledgement; source outcome unavailable Its effect is unknown. Reconcile; retain the uncertainty.
Source authoritatively confirms no effect The original did not apply under that source's contract. Follow its permitted recovery/retry rule.

An operation ID names one business intent. A correlation ID helps trace a request. Another request can observe the same operation without becoming new business work.

Engineering Depth

A Boolean cannot preserve these observations:

// Illustrative source observations, not an authorization capability.
enum SourceObservation {
    Applied,
    ConfirmedNotApplied,
    Unknown,
}

Compare treating Unknown as ConfirmedNotApplied: both might be represented by success == false, yet only one establishes a non-effect. A truthful match preserves the distinction:

match observation {
    SourceObservation::Applied => "Record source evidence",
    SourceObservation::ConfirmedNotApplied => "Follow the source recovery contract",
    SourceObservation::Unknown => "Keep reconciling the original operation",
}

This sketch classifies observations; it does not prove that an adapter told the truth or that a retry is authorized. A real realization must bind the operation to its original input and source and handle concurrency at its owning boundary.

Reflect

The user presses Retry after editing the destination. Is that necessarily another attempt of operation 42?

Worked Discussion

No. Changed intent is different work. Preserve operation 42 and its recovery path rather than retargeting it. The new intent needs the prerequisites and authorization its own story requires. UI wording should make that distinction visible.

What-If Cases

A Dropped Handle Does Not Finish the Work

Registration records an account and an owed confirmation. The participant leaves. A worker later abandons its delivery handle. Who still owns the unfinished message?

Place the Work Lives Browser Leaves Handle Is Dropped Process Is Lost
Only the browser's memory Work can disappear. Not a service guarantee. No survival.
Workshop's in-memory record Still owned. Still discoverable. Lost with the process.
Appropriately durable intent Can remain owned. Can be reclaimed safely. Can be recovered within its promised durability boundary.

The last row is a requirement on a real durable realization, not a claim about the teaching reference.

Follow-up remains owned after the caller leaves. Recording registration creates pending confirmation. The browser may close while a worker later continues that stored obligation.Follow-up remains owned after the caller leaves. Recording registration creates pending confirmation. The browser may close while a worker later continues that stored obligation.
Engineering Depth

The reference demonstrates one limited survival boundary:

drop(work);
let delivery = shop.pending_confirmation().unwrap();
drop(delivery);
assert_eq!(shop.owed_messages(), 1);

Rust permits dropping values. Moving a ticket into a function does not force the business obligation to complete. The workshop retains the pending fact independently of the returned handle.

Compare an implementation that stores pending work only inside the returned ticket: dropping that ticket could erase the only record of what is owed. Adding a name such as MustDeliver would not change that fact.

A production story that promises restart recovery needs durable intent and source-safe recovery. An outbox is one possible pattern for committing intent alongside local state; the pattern still needs an owner, dispatch behavior and correct settlement.

Reflect

New registration is retired. May the system discard all existing pending confirmations automatically?

Worked Discussion

No. Retirement must state how old work finishes, migrates or is cancelled under the applicable authority. Closing the entrance for new work does not settle earlier obligations. The same reasoning applies when a worker, browser or process stops at a boundary the product promised to survive.

What-If Cases

Replace the Engine Without Losing Old Work

Provider B now handles new messages. Operation 42 was already sent to provider A and its result is unknown. A late worker also returns after another worker has taken over.

Two changes need different reasoning:

Change Risk
New-work routing changes from A to B. Recovery may accidentally ask B about an operation only A knows.
A new worker takes over the same operation. An older worker may overwrite newer settlement unless current ownership is checked.
New routing does not rewrite an old operation. New operation 43 goes to B. Existing unknown operation42 is reconciled against A.New routing does not rewrite an old operation. New operation 43 goes to B. Existing unknown operation42 is reconciled against A.
Engineering Depth

Compare two pieces of data:

// Sketch: a current configuration answers where new work should go.
struct RoutingConfig { provider: ProviderId }

// A recorded operation retains where its own intent was dispatched.
struct Operation { id: OperationId, provider: ProviderId }

The names ProviderId and OperationId stand for the owning product's validated identifiers. Storing the field is necessary only if it is also checked and used correctly. Recovery should follow the operation's binding, not silently replace it with the latest routing configuration.

A fence can stop a stale worker from settling after its claim is superseded. For example, stored settlement may require the current claim generation to match. Consuming the older worker's local Rust value alone cannot establish that current distributed fact.

Claim What Must Support It
“This worker may settle now.” Current stored claim/version under the owning concurrency rule
“Provider A applied operation 42.” Evidence from A or an authorized, evidence-preserving migration
“The new adapter preserves the promise.” The existing consumer contract and relevant observed behavior

Reflect

Can the team delete provider A's adapter as soon as all new traffic uses B?

Worked Discussion

Only after accounting for work still bound to A, including unresolved outcomes, verification and relevant history. Keeping an adapter for old recovery may be required even when it accepts no new work. Decide that boundary explicitly instead of letting “current provider” erase it.

Apply It

Design a Story You Know

Choose familiar work: reserve equipment, publish an announcement, resolve a support request or admit someone to an event. Use invented data.

First write one promise. For example: publish the exact announcement version approved by its owner.

Prepare Announcement Example
Actor and beneficiary An editor requests publication; readers receive the approved announcement.
Exact work Announcement 42, version 7, with its content identity.
Decision owner The role entitled to approve this announcement under the product's policy.
Same-promise change Replace file storage while preserving versions, decisions and outcomes.
Changed promise Permit a different role to approve.
Interruption Publication may have happened, but the response was lost.

Use the architecture questions to find missing descriptions and the thinking tools when a specific uncertainty needs investigation. Do not add a ceremony for every box in a framework.

Engineering Depth

Compare two signature sketches:

trait PublishByFlag {
    fn publish(self, approved: bool, version: u64);
}
trait PublishReviewed {
    type Reviewed;
    type Outcome;
    fn publish(self, work: Self::Reviewed) -> Self::Outcome;
}

The second gives the design a place to retain reviewed work. It is not sufficient by name: explain who can construct Reviewed, what actual version/resources it binds, which facts must be current, and what the outcome really means.

An alternative design can be valid. Show the meaningful relationships rather than imitating a trait count. A database transaction, borrowing boundary or another appropriate mechanism may establish parts of the guarantee; state its limits.

Reflect

Make one implementation change and one promise change. Predict their consequences first. What evidence would distinguish an alternative realization from a weakened commitment?

Worked Discussion

Follow both changes to the owner, admitted work, actual binding, current checks, observed effect and remaining obligation. A storage replacement may preserve those relationships; a new approver changes one. Keep the original promise visible while explaining the difference. Discuss the result with your reviewer; Kresna reviews exercises in the guided sessions.

Go Deeper

Read the Reference through Its Root

Download the complete Rust reference. Its README states the promise, checks and limits.

The model verifies a demonstration assertion, admits a unique subject, records an account/session/owed confirmation, and applies one of two entry policies. Entry and confirmation remain separate continuations.

Reading Step Source Question
Selected promise OpenWorkshop and ConfirmedWorkshop in src/model.rs Which entry choice is configured?
Exposed relationships WorkshopStories in src/contract.rs Which prerequisites and continuations can a consumer follow?
Actual work Private stage fields and implementations in src/model.rs Which subject and workshop are retained?
Observed consequence tests/flows.rs What changes when the policy or current facts change?
Engineering Depth

The generic consumer can follow the story without naming private carrier types:

fn register<S: WorkshopStories>(shop: &mut S, assertion: &str) -> (S::Session, S::Confirmation) {
    shop.signup(assertion.into())
        .verify()
        .unwrap()
        .admit()
        .unwrap()
        .record()
        .into_followups()
}

unwrap() belongs to this known-valid test fixture. An application must handle its declared refusal and unavailability outcomes.

Compare an attempted shortcut:

// Invalid use: Submitted has no record() method.
shop.signup("a".into()).record();

Verification and admission establish the legitimate next capabilities. Merely naming the variable verified would not change its type or the facts established.

After recording, the reference exposes both follow-ups:

pub trait RecordedRegistration: private::Stage + Sized {
    type Session;
    type Confirmation;
    fn into_followups(self) -> (Self::Session, Self::Confirmation);
}
Relationship Evidence in the Model
Identity before admission Associated successor contracts
Same actual workshop Retained borrow and later instance check
Current session facts Entry checks on every visit
Owed work after a dropped handle Pending record retained by the workshop
Work after process loss Not implemented; memory is lost

The last row is a boundary, not an invitation to claim that ownership equals durability.

Reflect

Find one static relationship, one runtime check and one unsupported production claim. Then explain how a different realization could preserve the same promise.

Worked Discussion

A successful verifier returns a successor supporting admission. Entry still checks revocation and expiry. A process crash destroys the reference's memory. A durable realization could preserve the promise using appropriate storage and source-safe recovery, but must earn those guarantees with its own implementation and evidence.

Go Deeper

Human Glossary

Definitions here use the workshop example. Follow a term back to a lesson when you want to see the choice, code and consequence together.

Commitment

Behavior or work the product owes within a named scope. “Permit entry with a valid session before confirmation” and “retain pending confirmation” are two workshop commitments. Start with the promise.

Story

The compile-time abstraction expressing a selected commitment and its meaningful relationships. It can govern many registrations. Ari's one registration is an occurrence, not a new policy definition. Story lesson.

Compile-Time Abstraction

A representation whose declared relationships Rust can check before execution. For example, a successor can be required to support admission. The compiler does not thereby know whether today's identity assertion is genuine.

Realization

Code and selected collaborators that implement a story. A different storage implementation can be another realization of the same promise if it preserves the required behavior and boundaries.

Occurrence

One actual piece of work, with particular actors, input, versions and resources. Two registrations can use the same Rust types while belonging to different workshop objects.

Contract

An exposed agreement about permitted use, relationships and outcomes. In this doctrine, the executable boundary must make relevant distinctions consequential; a reassuring method name alone is insufficient. Composition and chaining.

Invariant

A condition that must remain true within its stated boundary. “This continuation uses the subject that was verified” is a scoped invariant. It is not a claim that every external fact remains unchanged forever.

Authority

A mandate to decide or act, limited by role, scope and current conditions. The policy owner chooses the entry rule; an implementation convenience does not supply that authority. Changing a promise.

Mandate

The specific permission or instruction authorizing work. A task can already authorize a policy change; the doctrine does not require asking again merely because the code changes.

Actor and Beneficiary

The actor initiates or performs work; the beneficiary receives its outcome. They can be different people. Neither a second login context nor a simulated counterpart creates another real person's independent contribution.

Scope

The work, records and decisions covered by a commitment. Registration's WithoutPassword choice does not decide every future login policy. Jurisdiction is the related idea of which decisions this owner may make.

Composition

Owned commitments selected together through compatible relationships. Google identity, no registration password and an entry rule form part of the workshop's selected composition. Worked comparison.

Successor

A legitimate continuation that can consume what earlier work established. In the reference, successful verification produces a value supporting admission; admission can then produce a recordable registration.

Telescoping

Following the same commitment from its readable entrance into the detail needed to answer the next question. A directory tree can help but cannot replace truthful contracts. Follow the promise inward.

Representation

A description made for a particular purpose or perspective. A business policy, logical relationship, Rust implementation and actual runtime observation are related representations, not interchangeable evidence. Architecture questions.

Reification

Transforming an idea into a defined, represented, specified, configured and operating thing. In Zachman, these transformations are not levels of detail or a mandatory project workflow.

Derivability

The owner's broader term is not reduced here to Rust's derive, inheritance or one associated-type technique. The course practices consequence tracing: predict what a changed choice permits, then explain it through the story.

Coupling

A relationship through which changing one part can affect another. Sharing an official identifier policy creates intended coupling; sharing unrelated wording may create accidental coupling. Sharing lesson.

Binding

Retaining which actual work and resources a continuation belongs to. A review of version 7 must not silently become permission for version 8. Same-work lesson.

Digest

A value calculated from bytes to help identify their content. A digest can detect that reviewed and submitted content differ under its algorithm's properties. It does not identify an approver or grant permission by itself.

Admission

Establishing that this actual occurrence may proceed using its required current facts. Verification of identity and admission of a registration are separate questions.

Current Facts

Facts that may change: membership, revocation, expiry, stored versions or worker claims. Re-establish them when the next boundary requires it. A historical receipt does not freeze them.

Receipt

A record of what happened under its stated contract. A successful earlier visit remains a historical fact after revocation, but does not authorize a new visit. Receipt comparison.

Pending

Work is known to remain unfinished. The workshop can know that a confirmation is still owed. Pending does not necessarily mean its final outcome is unknowable.

Unknown Outcome

Available evidence does not establish whether a particular effect occurred. A lost acknowledgement can leave a remote send unknown. Lost-response exercise.

Refusal

The requested progression is not permitted under its contract. Refusing an unauthorized review differs from successfully recording an authorized reviewer's rejection decision.

Operation Identity

An identifier for one logical business intent across attempts and observations. Preserve its input and source binding during recovery; an edited destination can be different work.

Correlation Identity

An identifier connecting logs or messages for a request. Several requests may observe the same operation. Changing correlation does not itself create new business intent.

Reconciliation

Comparing relevant records or obtaining source evidence to establish what happened. For an unknown send, ask about the original operation rather than treating absence of a reply as absence of an effect.

Settlement

Recording an operation's outcome under the owning contract. Local intent recorded, source effect applied and independently verified completion are different facts; name which one is settled.

Transaction

A boundary that groups stored reads/changes under specified atomicity and concurrency guarantees. It can support a current check plus update. It should not remain open across a person's lengthy review merely to preserve a type.

Durability

A stated ability for data or work to survive a failure boundary. An in-memory record can survive a dropped handle but not loss of its process. Owed-work exercise.

Outbox

A pattern that records intent for later dispatch alongside a local state change. It still needs dispatch ownership, retry/reconciliation behavior and truthful settlement; naming an outbox does not prove delivery.

Idempotency

A contract under which repeating the same logical request does not create an additional effect beyond the first. Its scope, key, input comparison and retention must be specified by the owning source. It is not a guarantee of distributed exactly-once completion.

Fencing

Rejecting a stale holder after a newer claim supersedes it, often by comparing a stored generation or token during settlement. A worker's local Rust value alone cannot prove its claim is still current. Worker/provider changes.

Adapter

Code implementing a boundary to another component or source. A trusted identity adapter must report truthful observations under its contract. Implementing a trait alone does not prove real authentication or delivery.

Type

A kind of value with particular permitted structure and operations. Two values of the same type can carry different subjects, stores or versions. Type compatibility is not runtime identity.

Trait

A Rust contract declaring capabilities and relationships that implementations must supply. A trait can represent a meaningful story constituent, but every helper does not need a trait.

Associated Type

A type named by a trait implementation, such as its particular successor. type Verified: AdmitRegistration requires that successor to support admission.

Generic Parameter

A type supplied to a definition, such as the provider P in OpenWorkshop<P>. It can express a meaningful choice; it does not identify which actual provider instance is held.

State Carrier

A value retaining the data or resource relationship a stage needs. A private Verified carrier can hold the actual subject and workshop borrow. State comparison.

Capability and Proof

A capability permits an operation under its guarantees. A “proof” value records prerequisites established by a controlled entry point. Its name is not a proof; construction, mutation and use must preserve the claimed boundary.

Typestate

A technique in which a value's type determines which operations are available at a stage. It can support part of a story; it does not, alone, establish business authority, current database facts or durable completion.

ZST

A zero-sized type needs no storage for instance data. WithoutPassword can express a data-free policy selection. A state needing an actual subject or resource may carry those data instead. ZSTs also implement Rust's Sized.

Borrow

A reference that permits scoped use of a value without transferring ownership. &mut is an exclusive borrow. It can exclude conflicting local access, but is not a lock on a different process.

Lifetime

A Rust relationship constraining how long borrowed data may be used. The 'a in a carrier borrowing a workshop names that relationship; it is not a wall-clock expiry time.

Consuming Transition

An operation taking ownership of its input value, often written with self. A non-copyable consumed value cannot be reused by that caller. It can still be dropped; consumption does not force a business obligation to finish.

Private Construction

Restricting how callers can create or mutate a protected value. Private fields and validated constructors help; an unchecked public conversion, deserializer or unsafe boundary can defeat the intended guarantee.

Sealed Trait

A trait whose implementations are restricted through a private prerequisite or equivalent boundary. Use it where arbitrary implementations would forge authority. Intended trusted adapter ports can remain open.

Newtype

A distinct type wrapping another value, such as a validated operation identifier around a string. It can stop accidental interchange of different kinds of values; it still needs appropriate validation and runtime identity checks.

Result and Enum

An enum represents alternatives. Result<T, E> represents success carrying T or failure carrying E. These are useful for genuine runtime possibilities, not a requirement to advertise every outcome in every operation.

Exhaustive Match

A Rust match that handles every declared alternative. Adding a variant can require consumers to revisit their handling. A catch-all branch can hide that decision, so use one only when it preserves the intended contract.

MECE

Mutually exclusive, collectively exhaustive: branches do not overlap and together cover the chosen question. State the scope before claiming completeness. It is an analysis aid, not proof that a whole enterprise has been modeled.

About the Materials

Sources and Further Reading

These sources support worked examples, comparison, self-explanation and control over reading depth. They do not establish a fixed human attention span or certify this course's effectiveness.

Source What It Helps Explain
Schwartz & Bransford, 1998 Comparing cases can prepare learners to understand a later explanation.
Chi and colleagues, 1994 Explaining why an outcome follows can develop understanding beyond repeating it.
IES practice guide, 2007 Connect concrete examples and abstract ideas, combine useful graphics with words, and revisit learning.
Zachman: framework definition Classify architectural descriptions by question and transformation.
Zachman: what the rows mean Distinguish transformations of representation from levels of detail.
Untools Select a reasoning tool for a particular framing, investigation or change question.

The studies concern different learners, subjects and settings. Use their findings with those limits in mind. The course's thinking-tools lesson and architecture lesson provide original applications to this subject.

For further detail, the governing doctrine states the commitments separately from the human examples. Reading a reference is optional when the worked lesson already answers your question.

About the Materials

Read Online or Keep a Copy

Use the format that fits the next task. All downloads below are actual files; the offline reader includes its fonts, diagrams and code highlighting.

Format Open or Download Use
Offline reader Download the ZIP Unzip it, then open the top-level index.html. No server is needed.
Human handbook Download the PDF Read or print the human course, including worked discussions.
Complete course view Open the handbook Read the human lessons in one browser view.
Rust reference Download the source Inspect and run the bounded example using its README.
Governing doctrine Download the doctrine Read the commitments and rationale separately from teaching.
Compact agent guide Download the Markdown Give an agent the independent Rust application guide.

Your Notes

Notes remain in the browser where you wrote them. Use Export Notes before moving devices or clearing browser data. Earlier saved notes remain on their corresponding pages after presentation updates; keep the context of the example you originally discussed.

The PDF and JavaScript-disabled view use your own notebook. External source links need an internet connection; internal navigation in the extracted offline reader does not.

Edition

This is edition 0.3.0. The human course, governing doctrine and compact agent guide have different purposes and separate contents. They share the same commitments and explicit source lineage.

Exercises are self-paced. Bring your reasoning to your reviewer; the course does not award a score. Projects retain their own business authority and release workflow.

Navigation