to2d

A space for ideas, notes, and ongoing work.

Deterministic Planning via Structural Constraints

Structure is the reasoning

Why most agents fail in automation: they treat planning as free-form reasoning instead of a constrained transformation problem. This leads to unstable plans, incorrect step ordering, invented workflows, and brittle automation graphs.

Structural constraints fix this. They turn planning into a deterministic, verifiable process — essential for any system that interacts with browsers, documents, workflows, compliance, or multi-step enterprise logic.

Planning fails in LLM-driven systems not because the model is weak, but because the planning representation is unstable. Chain-of-thought, long context, and free-form reasoning push the latent state into high-variance regions where trajectories drift, contradict, and collapse.

Deterministic planning replaces this with structural constraints — representations that force correctness by construction.

This section formalizes how deterministic planning works, how to design structural constraints, and includes real examples from browser automation, workflow systems, and enterprise operations.

1. The problem with free-form reasoning (and why agents fail in automation)

Agent frameworks assume the model can "reason" through plans. In automation, this is catastrophic.

Free-form reasoning introduces:

  • inconsistent step ordering (breaks workflow engines),
  • invented actions or missing steps (browser agents fail),
  • unstable transitions (automation loops become unpredictable),
  • plans that contradict environment state (compliance workflows break),
  • formatting drift (downstream systems cannot consume outputs).

Real automation examples

  • A browser agent generates a 5-step plan. Step 3 requires an element that only appears after step 4.
  • A payroll agent invents a nonexistent form because the model "thinks" it should exist.
  • A document extractor rewrites steps on each iteration, making workflows nondeterministic.

Automation dies when the plan is unstable.

Traditional agent frameworks rely on:

  • chain-of-thought,
  • long narratives,
  • bullet lists with implicit meaning,
  • natural-language step generation.

These approaches are:

  • non-deterministic (minor token changes create new plans),
  • unverifiable (no schema to validate against),
  • drift-prone (reasoning hops domains),
  • not composable (free-form outputs break pipelines).

Real example

Ask an LLM: "Plan the steps to onboard an employee in California."

It produces:

  • steps in random order,
  • missing details,
  • invented substeps,
  • inconsistent formatting.

This is expected — natural language has no structural constraints.

2. Deterministic planning = structure-first, language-second

Instead of prompting the model to "think," deterministic planning gives it:

  • a structural representation of the task,
  • a schema for valid outputs, and
  • constraints that eliminate ambiguity before the operator is called.

The model is not reasoning — it is filling a structured container.

3. Formal definition

Let the planning state be represented as:

zₜ ∈ Z   (the canonical planning representation)

The operator proposes a structured plan:

uₜ = f(zₜ)

The verifier enforces:

yₜ = V(uₜ)  where  yₜ ∈ Y  (valid structured plans)

Plans become deterministic because only one structure is allowed.

4. Structural constraints (how to make planning automation-safe)

Structural constraints turn planning from "think and produce" into fill and verify.

In automation, constraints force the LLM to stay inside:

  • the allowed action set,
  • the allowed transitions,
  • the allowed selectors,
  • the allowed workflows,
  • the allowed compliance rules.

This prevents the model from generating:

  • new actions your orchestrator cannot execute,
  • new flows your backend cannot support,
  • inconsistent step ordering,
  • plans that the browser state makes impossible.

This is the difference between an agent that works 1000 times and one that works once.

A structural constraint is anything that restricts allowable outputs:

  • schemas,
  • enumerated fields,
  • strict step formats,
  • dependency graphs,
  • ordering rules,
  • precondition rules,
  • canonical templates.

These constraints collapse a large space of possible outputs into a single correct region of the manifold.

5. Real Example: Browser Planning

Bad: natural-language planning

"Go to page X, then click Y, then fill Z…"

  • fragile
  • order varies
  • steps change phrasing

Deterministic plan

{
  "steps": [
    { "action": "navigate", "url": "..." },
    { "action": "fill", "selector": "#email", "value": "..." },
    { "action": "click", "selector": "#submit" }
  ]
}

The model fills this structure.
The verifier checks:

  • selectors exist,
  • actions valid,
  • step order coherent.

6. Real Example: Document → Workflow Plans

Bad: "Write steps to process this document."

The model hallucinates missing sections.

Deterministic

{
  "fields": ["employer", "start_date", "gross_pay"],
  "steps": [
    { "field": "employer", "source": "header", "rule": "exact_match" },
    ...
  ]
}

No room for hallucination — the structure encodes the logic.

7. Representations that enforce correctness (critical for automation reliability)

Automation requires repeatable, environment-aligned plans. These representations enforce that.

1. Graph-based planning (for complex workflows)

A directed acyclic graph ensures:

  • no circular loops,
  • no impossible step orders,
  • deterministic transitions.

Perfect for: onboarding workflows, payroll sequences, compliance chains.

2. State-transition schemas (critical for browser automation)

Every browser step must satisfy:

(current_state, action) → next_state

LLM can propose actions; it cannot violate transitions.

3. Canonical lists (for documents and forms)

Enforce rigid structure so no invented fields appear.

4. Action primitives (for all agent systems)

Define the finite allowed action space:

NAVIGATE, CLICK, FILL, SELECT, UPLOAD, WAIT

The agent literally cannot invent impossible actions anymore.

8. How this enforces correctness without CoT or context

The structure is the reasoning.

  • Ordering is enforced by schema.
  • Dependencies encoded in the graph.
  • Valid actions enforced by the primitive set.
  • Invalid outputs rejected by the verifier.
  • No chain-of-thought needed.
  • No long context needed.

The model doesn't think — it fills.

9. Enterprise Example: Why typical agents break and structural planning doesn't

Long-context, chain-of-thought planning (common but broken)

  • LLM drifts and changes steps each time
  • Missing mandatory compliance steps
  • Wrong ordering leads to workflow rejection
  • Browser steps reference nonexistent selectors

This is why almost all current agent frameworks fail at scale.

Deterministic planning fixes all of this

Structure + constraints + verification = stable plans.

Even in:

  • multi-step onboarding flows
  • payroll cycles
  • jurisdiction-heavy compliance rules
  • browser automation with dynamic DOMs
  • document processing pipelines

10. Why deterministic planning is mandatory for large-scale automation

Automation systems don't need creativity. They need guaranteed correctness.

Deterministic planning provides:

  • reliability: no drift between runs
  • operational safety: no invalid actions
  • scalability: workflows become reusable components
  • observability: every step traceable and testable
  • maintainability: plans degrade gracefully, not chaotically

This is the missing piece in every agent platform today.

11. Research directions

  • expressive but stable structural plan languages,
  • plan-time vs runtime constraints,
  • minimizing operator entropy through schema choice,
  • designing universal planning primitives for enterprise workflows.

Deterministic planning via structural constraints is the only scalable alternative to natural-language reasoning. It is the mechanism that makes agentic systems verifiable, composable, and production-grade.

← Back to AI Era