Table of Contents
Fetching ...

NormCode Canvas: Making LLM Agentic Workflows Development Sustainable via Case-Based Reasoning

Xin Guan, Yunshan Li, Ze Wang

Abstract

We present NormCode Canvas (v1.1.3), a deployed system realizing Case-Based Reasoning at two levels for multi-step LLM workflows. The foundation is NormCode, a semi-formal planning language whose compiler-verified scope rule ensures every execution checkpoint is a genuinely self-contained case -- eliminating the implicit shared state that makes retrieval unreliable and failure non-localizable in standard orchestration frameworks. Level 1 treats each checkpoint as a concrete case (suspended runtime); Fork implements retrieve-and-reuse, Value Override implements revision with automatic stale-boundary propagation. Level 2 treats each compiled plan as an abstract case; the compilation pipeline is itself a NormCode plan, enabling recursive case learning. Three structural properties follow: (C1) direct checkpoint inspection; (C2) pre-execution review via compiler-generated narrative; (C3) scope-bounded selective re-execution. Four deployed plans serve as structured evidence: PPT Generation produces presentation decks at ~40s per slide on commercial APIs; Code Assistant carries out multi-step software-engineering tasks spanning up to ten reasoning cycles; NC Compilations converts natural-language specifications into executable NormCode plans; and Canvas Assistant, when connected to an external AI code editor, automates plan debugging. Together these plans form a self-sustaining ecosystem in which plans produce, debug, and refine one another -- realizing cumulative case-based learning at system scale.

NormCode Canvas: Making LLM Agentic Workflows Development Sustainable via Case-Based Reasoning

Abstract

We present NormCode Canvas (v1.1.3), a deployed system realizing Case-Based Reasoning at two levels for multi-step LLM workflows. The foundation is NormCode, a semi-formal planning language whose compiler-verified scope rule ensures every execution checkpoint is a genuinely self-contained case -- eliminating the implicit shared state that makes retrieval unreliable and failure non-localizable in standard orchestration frameworks. Level 1 treats each checkpoint as a concrete case (suspended runtime); Fork implements retrieve-and-reuse, Value Override implements revision with automatic stale-boundary propagation. Level 2 treats each compiled plan as an abstract case; the compilation pipeline is itself a NormCode plan, enabling recursive case learning. Three structural properties follow: (C1) direct checkpoint inspection; (C2) pre-execution review via compiler-generated narrative; (C3) scope-bounded selective re-execution. Four deployed plans serve as structured evidence: PPT Generation produces presentation decks at ~40s per slide on commercial APIs; Code Assistant carries out multi-step software-engineering tasks spanning up to ten reasoning cycles; NC Compilations converts natural-language specifications into executable NormCode plans; and Canvas Assistant, when connected to an external AI code editor, automates plan debugging. Together these plans form a self-sustaining ecosystem in which plans produce, debug, and refine one another -- realizing cumulative case-based learning at system scale.
Paper Structure (27 sections, 2 equations, 7 figures, 1 table)

This paper contains 27 sections, 2 equations, 7 figures, 1 table.

Figures (7)

  • Figure 1: NormCode syntax and scope rule. Left: annotated .ncds; right: isolation boundary at runtime. Each node's tensor is self-contained (C1).
  • Figure 2: Two-level CBR architecture. Level 2 (top): abstract cases (plans); Level 1 (bottom): concrete cases (suspended runtimes). Route A distills experience into plans; Route B instantiates plans to generate Level 1 cases.
  • Figure 3: NormCode Canvas (v1.1.3). The Graph Canvas (center) renders the full inference graph; the Detail Panel (right) inspects any node's bounded inputs --- failure localization (C1).
  • Figure 4: Three trace views in NormCode Canvas. (a) Agent-centric: LLM call detail with prompt input and structured output. (b) Graph-centric: scoped reference data between selected node indices (C1). (c) Orchestration-centric: execution log with error chain and cycle-level breakdown.
  • Figure 5: Core excerpts from three production NormCode plans as Level 2 cases (.ncds); actual production plans are larger and more complex. Left: NC Compilations --- sequential compilation pipeline (Sect. \ref{['sec:level2:distillation']}). Center: PPT Generation --- nested dual-output loop (HTML + PPTX per slide). Right: Code Assistant --- ReAct outer loop yao2023 with inner explore, plan, edit, and verify stages. <- Value; <= Functional; <* Context. All three plans are reviewable as explicit plans before any run begins (C2).
  • ...and 2 more figures