Files
2026-10-26 22:21:04 -05:00

15 KiB

Development Philosophy

Simplicity is the default

Speculative architecture always has negative value.

The cost of writing code is small compared with the cost of carrying it. Every abstraction, hook, compatibility layer, option, fallback, extension point, and anticipated future feature becomes something the project must understand and preserve. Worse, later work begins building on guesses about a future that has not arrived yet.

If we understand A and B, partly understand C and D, and only imagine E, build A and B. Do not pour foundations for C, D, or E. When C becomes real, A and B will have taught us things we could not know beforehand. That evidence lets us build C once and integrate it with what actually exists. Premature preparation for E can occupy the very ground the real E eventually needs and can force A through D to depend on a mistaken future.

The only reliable speculation is that simplicity will pay off.

Build the smallest thing that fully serves the need we concretely understand. Do not future-proof by predicting the future. Preserve the future by refusing to obstruct it.

Discussion before action

A problem report is information, not an instruction to patch the nearest code.

When something breaks, first understand what happened, why it happened, which behavior was intentional, and what solution landscape the evidence supports. A clear path is not necessarily the right path. The right path tends to reveal itself when investigation and discussion converge on an obvious next step.

This is not ceremony. The discussion may be brief. The rule is simply that action follows understanding rather than replacing it.

Do not make meaningful behavioral or architectural changes merely because they appear straightforward. Surface the evidence, alternatives, and consequences first and agree on direction.

Beauty over perfection

We are not building machinery to eliminate every imperfect judgment, irregular case, or possible mistake. Predictably good, useful, approachable work is more valuable than elaborate systems designed to force perfection.

An occasional exception is allowed to remain an exception. Do not immediately turn anomalies into rules, validation systems, abstractions, fallbacks, or special cases. Forgive exceptions until repeated evidence shows that the exception is actually part of the shape of the problem.

This applies to code and to the content these tools help produce. Complexity introduced to prevent every possible imperfection often damages the work more than the imperfection would have.

Follow evidence without an agenda

Investigate the actual code, data, failures, and outputs rather than speculating about what they probably mean. Do not steer evidence toward a preferred architecture or conclusion.

For translation and ancient-text work, the received text is the authority. Tradition is context, not a destination. We are not trying to reinforce tradition or tear it down, and we do not bend the text toward doctrine, dogma, skepticism, apologetics, or novelty. The aim is unbiased, approachable, useful, compelling translation of ancient wisdom.

Not every participant in a creative or translation pipeline produces evidence. Explorers, philosophers, and literary voices may speculate, reach, or occasionally indulge wishful thinking when that is useful to their role. Be rigorous about what is called evidence and which roles have authority to alter the received text; do not turn the entire endeavor into an academic apparatus in pursuit of impossible perfection.

Synchronous blocking execution is the intended project-family architecture

The applications using Optimus are blocking batch tools, not concurrent servers. Their desired control flow is one path at a time: ensure one dependency, finish it, persist/publish it, return, then continue. Do not treat Node's conventional async style as a design requirement.

Optimus currently contains Promise-aware plumbing because the existing projects still contain legacy async functions. That is transitional compatibility, not an invitation to spread async/await, Promise returns, callback orchestration, parallel sibling ensures, or queues. A separate refactor will unwind this plumbing. Until then, do not make that future conversion harder.

Optimus

Optimus is a lightly opinionated framework for organizing pull-driven transformer operations.

Like Optimus Prime, Optimus does not solve every problem itself. It leads a team that works by a recognizable method. An Optimus project should clearly look and behave like an Optimus project even though its modules remain loosely coupled and domain-specific.

Optimus organizes modules. Some modules are transformers. Some are not. Optimus also participates directly by providing the shared services that let modules locate one another, request work, wrap results in metadata, persist artifacts, and determine whether previously completed work can still be trusted.

Core concepts

Modules are the team

A module is a participant in an Optimus operation. It may transform data, provide services, coordinate work, interact with an LLM, interact with a human, import external material, publish results, or do something else entirely.

Optimus gives modules a shared project environment and a way to locate one another without requiring a central monolith.

Peer dependencies are resolved by Optimus

Treat each registered module as a dependency-injection boundary. A module may use relative imports for private implementation files inside its own module directory. It should not know the filesystem location of a peer module.

When one module depends on another, resolve that dependency by semantic name through utils.loadModule(name). settings/modules.json is the composition map that decides which implementation/location satisfies that name.

module.exports = utils => {
    const source = utils.loadModule("standard-source");
    return { /* ... */ };
};

Do not bypass Optimus with sideways imports such as require("../standard-source") or require("../lib/...") when that neighboring directory is functioning as a peer module. If shared code deserves an independent neighboring module directory, register it and load it through Optimus. If it is private to one module, keep it inside that module.

The reason is architectural rather than stylistic. Consumers should depend on a peer's semantic contract, not today's repository layout. That allows the project mapping to relocate, extract, package, or replace modules later without rewriting their consumers, and it prevents two competing dependency-resolution systems from emerging without two distinct needs.

Transformers are artifact-producing modules

A transformer is a module that can be asked for an artifact and can determine whether an existing artifact is stale according to that transformer's needs.

All transformers are modules. Not all modules are transformers.

A transformer is not required to be a tiny one-transformation machine. One coherent transformer module may own several closely related transformations and several artifact layers. For example, an importer may naturally produce volume-, book-, and chapter-level artifacts. Prefer coherent responsibility over artificial micro-modules.

Artifacts are durable work, not a private cache

A transformer's artifact area is an organized workbench and warehouse. Humans should be able to enter it and directly find the artifact they want to inspect. Do not turn artifact storage into an opaque hash cache or private implementation laboratory.

Artifacts may be produced by deterministic code, LLMs, humans, external systems, or combinations of them. Optimus does not privilege one producer type over another.

Caching is a useful behavior of durable artifacts, not their identity. Persist work because the work is meaningful, inspectable, reusable, expensive, nondeterministic, or useful for evaluating freshness—not because every function deserves a cache entry.

Pull drives the operation

Optimus is a pull queue, not a push pipeline runner.

A caller asks for a desired artifact. The responsible module asks for what it needs. Those modules ask for what they need. Existing work is reused where it remains valid, and work happens only where the dependency chain requires it.

Do not replace this with a centrally scheduled sequence or a duplicate declarative DAG unless concrete evidence proves the ordinary module calls are insufficient.

Transformer-owned validity

Optimus provides services that make freshness easy to record and evaluate. Optimus does not own the semantic definition of freshness for every transformation.

The transformer owns its recipe: which inputs matter, which implementation or settings changes matter, and what must be compared before an artifact can be reused. resolveArtifact() and sameSourceHash() provide a small, useful exact-parent-hash policy, but they are framework services, not a restriction that every transformer must define validity in exactly the same way.

Every transformer is responsible for verifying that the artifacts it returns are current according to its own declared needs.

That ownership includes artifact lifecycle and cleanup, not only dependency hashes. A transformer should understand whether its work is cheap or expensive, deterministic or flexible/nondeterministic, and whether payload-level defects can make an otherwise well-provenanced artifact unusable. Cheap deterministic work may choose eager recalculation. Expensive LLM work will often be more conservative, while still needing a deliberate way to force a fresh call when the actual result is not viable.

There is no universal Optimus staleness policy and there should not become one. Named logic revisions and accepted-revision sets are an available pattern when a transformer needs compatibility tracking, not a requirement that every transformer version itself. Likewise, a shared utility or wisdom stack may expose a revision identity without making every consumer stale; the consuming transformer decides whether that revision participates in its own validity rule.

Changes to those validity judgments are behavioral decisions. Discuss them deliberately rather than allowing a cleanup/refactor to redefine artifact freshness accidentally.

A transformer also owns keeping its artifact warehouse meaningful. Preserve useful durable history, but do not knowingly retain junk artifacts that are no longer valid and cannot participate in the active graph.

Do not centralize domain-specific invalidation policy into Optimus merely because several transformers use the same helper today.

Services, not restrictions

Optimus is a framework, but it should preserve maximum flexibility within its operating method.

Optimus should make it easy to:

  • organize modules;
  • locate modules by semantic name;
  • read project settings;
  • request named top-level artifacts;
  • pull dependencies recursively through ordinary code;
  • wrap work in content/provenance metadata;
  • persist and read durable artifacts;
  • evaluate common freshness patterns;
  • invalidate targeted persisted work;
  • report artifact ensure/build decisions according to project presentation settings.

Optimus should not decide:

  • what a domain artifact means;
  • what a transformer's complete recipe is;
  • how a human participates in a transformation;
  • how an LLM is configured or called;
  • how a translation is judged;
  • whether a module must be a transformer;
  • how many related transformations one module may own;
  • what every artifact directory must contain beyond what the owning transformer needs.

If a human-interaction workflow becomes useful, a module such as a future Bumblebee transformer can own that experience and persist/stamp its results. Optimus does not need a generic human-task system in order to permit human-produced artifacts.

Intentional boundaries

The following behavior is deliberate. Do not remove or substantially reshape it without discussion:

  • Optimus is pull-driven rather than a centrally pushed stage runner.
  • Modules are the primary participants; transformers are a subset of modules.
  • Peer-module dependencies are resolved by semantic name through Optimus; modules do not reach across peer boundaries by filesystem path.
  • Ordinary module calls may express the dependency graph. A second graph definition is not required.
  • Transformer modules may own multiple closely related transformations.
  • Transformers own their freshness semantics; Optimus supplies common mechanisms.
  • Durable artifacts are human-inspectable work products, not opaque cache internals.
  • Content hashes stop unnecessary downstream propagation when rebuilt content is unchanged.
  • Human-, LLM-, code-, and externally-produced work may all become legitimate artifacts when the owning transformer knows how to validate them.
  • Side effects and diagnostics do not become semantic dependencies merely because they are useful to retain.
  • Presentation (showOnEnsure, showOnBuild, reportEnsure(), reportBuild(), and legacy setArtifactOutcome()) is reporting only and never participates in artifact identity or freshness.
  • Settings remain domain-agnostic JSON owned by the Optimus project. Optimus does not need to understand their meaning.
  • Module initialization is free to do the work its module actually needs. Do not add lifecycle restrictions merely to force every module into the same shape.

Current direction

The current Optimus runtime already expresses this vision with a small amount of machinery: settings, modules, named artifacts, recursive module calls, artifact nodes, persistence helpers, hashing, invalidation, and CLI orchestration.

The present direction is therefore to clarify and protect the framework rather than expand it. Add capability only when an actual Optimus project demonstrates that the current services are insufficient.

Deliberately not doing yet

  • generic human-task or approval workflow infrastructure;
  • a universal transformer interface beyond the behavior actual modules already need;
  • one-module-per-transformation enforcement;
  • a central declarative dependency graph;
  • schemas or type systems for arbitrary project settings;
  • an opaque content-addressed artifact cache replacing human-readable artifact warehouses;
  • generalized workflow states, queues, schedulers, or orchestration engines beyond the pull method already in use;
  • framework-level understanding of LLM providers, translation semantics, publishing semantics, or other domain relationships that belong in modules.

Vacuuming the durable artifact warehouse

npx optimus --vacuum examines every declared target through its current pull chain without allowing rebuilds; --vacuum --apply independently rechecks a previously reviewed checksummed plan before deleting unreachable artifact files. Do not use a single chosen output as the only root. Every defined target and every meaningful intermediate artifact it pulls must survive. Keep the planning report in disposable side-effects. Custom transformers with their own artifact writers must call utils.requireCurrentArtifact(filename, isReusable) after their freshness check and before any external work, so vacuum fails closed rather than accidentally regenerating. Do not infer reachability from reportEnsure or reportBuild: presentation is diagnostic only.