On this page

Plan exactly what will happen

Dryv separates semantic selection from rendering and plans generated output before a client mutates a project.

Planning is where deterministic generation becomes visible.

Selection creates generation work

A pack starts by selecting canonical subjects.

The result should retain enough information to explain:

  • which canonical subject matched;
  • which selection rule caused the match;
  • which candidates were skipped;
  • how work was partitioned;
  • which pack and template own the invocation.

Selection is semantic planning, not template rendering.

Template invocation plans

A template invocation plan can carry information such as:

  • stable invocation identity;
  • pack identity;
  • template identity;
  • selected canonical subject or partition;
  • requested context dependencies;
  • planned artifact identity;
  • planned generated symbols;
  • generated dependencies;
  • destination and output-path intent;
  • provenance.

This model allows Dryv to inspect generation work before templates execute.

Artifacts, symbols, and dependencies are different

A generated file is an artifact.

A target-language name exported from that artifact is a generated symbol.

A dependency says that one planned result requires another planned result or symbol.

Keeping these concepts distinct allows packs to describe imports, exports, barrels, inheritance, registration, or other target relationships without collapsing them into filenames.

Planning precedes mutation

The engine can return plans, diagnostics, traces, and generated artifacts to a workspace-aware client.

The client decides how to show diffs and whether to apply changes to the real filesystem.

This separation enables:

  • dry-run workflows;
  • editor previews;
  • remote generation;
  • browser tooling;
  • collision detection;
  • explicit create, update, delete, or conflict behavior.

Explainability is a product contract

A user should be able to ask:

Why was this selected?

Dryv should identify the canonical subject, pack, selection rule, and relevant semantic facts.

What did the template receive?

Dryv should expose the bounded context paths and explain where values came from.

Why does this import or dependency exist?

Dryv should trace the declared generated dependency and the planned artifact or symbol that satisfies it.

Why does this file exist?

Dryv should trace the artifact through canonical meaning, pack, template, invocation, renderer, and destination.

Stable identity

Stable identities for canonical subjects, invocations, artifacts, symbols, and dependencies make reproducible planning, collision detection, caching, and tracing possible.

Identity must not depend on nondeterministic process state.

Cache correctness

Reusable generation work is valid only while all output-affecting inputs remain compatible.

Those inputs can include:

  • canonical meaning;
  • pack configuration;
  • project bindings;
  • template content;
  • renderer identity and compatible version;
  • relevant context dependencies.

Correct invalidation matters more than maximizing cache hits.

Example trace

A trace may conceptually contain information like:

text
artifact      generated/users/user.ts
subject       #/schemas/User
pack          @example/typescript
template      model
selected      schema + public facet
context       selected.fields, imports
renderer      handlebars
dependsOn     generated/shared/id.ts
result        create

The exact presentation can differ by client, but the underlying explanation should remain available.

Search in