runward 0.12.1 → 0.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/NOTICE.md CHANGED
@@ -6,7 +6,7 @@ The doctrine **“Designing and Running Agentic Systems”** (Thibault Souris, 2
6
6
 
7
7
  What this means in practice:
8
8
 
9
- - The **ideas and methods** (the six-phase method, the LLM Boundary Principle, floor-first delivery, evolution on triggers, lethal trifecta rule…) are free by nature. This repository implements them; you can too.
9
+ - The **ideas and methods** (the six-phase method, the architecture that frames the model, floor-first delivery, evolution on triggers, lethal trifecta rule…) are free by nature. This repository implements them; you can too.
10
10
  - The **expression** of the doctrine (its text, figures, layout) is protected: you may share the published PDFs unmodified, you may not create derivative versions of the text.
11
11
  - Workflows and templates in this repository are original MIT-licensed writings that implement the method. They are the contribution surface.
12
12
 
package/README.md CHANGED
@@ -22,7 +22,7 @@ Spec-driven frameworks answered the first half of that problem: write the right
22
22
 
23
23
  Agentic systems break four assumptions of classical distributed engineering. The core component is **non-deterministic**: same input, different output, by design. **Input is indistinguishable from instruction**: anything the model reads can try to command it, so prompt injection is structural, not a bug to patch. **Forgetting becomes an engineering problem**: memory that only grows drowns the signal, so decay, invalidation and consolidation have to be designed, not hoped for. And the **blast radius is unprecedented**: an agent with tools acts on the world, so a bad output is no longer just a bad answer.
24
24
 
25
- Runward's answer opens with a founding inversion the **LLM Boundary Principle**: the architecture constrains the model, never the other way around. That opening posture unfolds into five gestures: boundaries before the stack; start simple, isolate by contract, grow on evidence; keep the deterministic out of the model; explicit state and governed memory; govern, trace and evaluate from day zero. The full base is the method itself: six gated phases (a gate: a checkpoint you cross on evidence, never on assertion), each with a Definition of Ready and a Definition of Done, a 22-arbitration decision matrix, and 54 craft rules. The inversion opens the method; the phases, gestures and rules are what carry it.
25
+ Runward is the **FDE method** made executable. Its guiding principle: the architecture frames the model, never the other way around the model and the infrastructure are adapter decisions, taken behind stable contracts. From there, five architecture gestures: boundaries before the stack; start simple, isolate by contract, grow on evidence; keep the deterministic out of the model; explicit state and governed memory; govern, trace and evaluate from day zero. And a delivery spine: six gated phases (a gate: a checkpoint you cross on evidence, never on assertion), each with a Definition of Ready and a Definition of Done, a 22-arbitration decision matrix, and 60 craft rules. The phases, gestures and rules are what carry it.
26
26
 
27
27
  ## Who it's for — and when
28
28
 
@@ -83,7 +83,7 @@ your-project/
83
83
  │ ├── shared-bricks.md # bricks beyond the app: placement families, brick matrix, sovereignty by data class
84
84
  │ ├── floor.md # the smallest system that proves value on real traffic
85
85
  │ ├── adr/ # one ADR per structural decision, with re-evaluation trigger
86
- │ ├── rules/ # 54 craft rules your agent applies while building
86
+ │ ├── rules/ # 60 craft rules your agent applies while building
87
87
  │ ├── governance/
88
88
  │ │ ├── threat-model.md # lethal trifecta, 2-of-3 rule on the context window
89
89
  │ │ ├── evaluation-rubric.md # test the deterministic, evaluate the non-deterministic
@@ -118,7 +118,7 @@ Phase 5 is transverse: it starts at day zero, not after the incident.
118
118
  - **Floor, not MVP deck.** The floor is the smallest *running* system that proves value on real traffic. A presentation is not a floor.
119
119
  - **Evolution on evidence.** Multi-agent, long-term memory, microservices, a bigger model: each has a sober default and an explicit trigger. No trigger, no complexity. Every switch is an ADR.
120
120
  - **Security by architecture, not detection.** Prompt injection is constrained structurally (lethal trifecta, 2-of-3 rule), not filtered heuristically.
121
- - **Craft rules, not vibes.** 54 engineering craft rules ship with the mission (memory scoring, tiered retrieval, event sourcing, request-id propagation, multi-provider fallback, cost routing, post-turn pipelines, prompt-injection defenses…) — your agent applies them, `runward check` will not invent them. Code examples follow the reference-stack default (a single language in the core — TypeScript by default, an adapter decision like any other: see the decision matrix). The patterns are the contract; the language is the adapter.
121
+ - **Craft rules, not vibes.** 58 engineering craft rules ship with the mission (memory scoring, tiered retrieval, event sourcing, request-id propagation, multi-provider fallback, cost routing, post-turn pipelines, prompt-injection defenses…) — your agent applies them, `runward check` will not invent them. Code examples follow the reference-stack default (a single language in the core — TypeScript by default, an adapter decision like any other: see the decision matrix). The patterns are the contract; the language is the adapter.
122
122
  - **One accountable operator, not a simulated team.** One human owns every gate while the agent executes the workflows — see [the operator role](docs/operator-role.md).
123
123
  - **Handover as a deliverable.** The mission ends when the receiving team is autonomous, with proof.
124
124
 
package/dist/cli.js CHANGED
@@ -87,7 +87,7 @@ program
87
87
  program
88
88
  .command("compliance")
89
89
  .description("assemble a regime-framed evidence pack from the mission (deterministic, read-only; a readiness draft, never a compliance claim)")
90
- .argument("[regime]", "iso-42001 (nist-ai-rmf / eu-ai-act: coming)")
90
+ .argument("[regime]", "iso-42001 | nist-ai-rmf | eu-ai-act")
91
91
  .option("-p, --path <path>", "project directory")
92
92
  .action(complianceCommand);
93
93
  program.parseAsync();
@@ -25,11 +25,6 @@ export async function complianceCommand(regime, opts) {
25
25
  process.exit(2);
26
26
  }
27
27
  const spec = REGIMES[key];
28
- if (!spec.render) {
29
- console.error(status.error(`The ${spec.label} lens is not assembled yet — only iso-42001 for now (ADR-0016, built piece by piece).`));
30
- console.log(" " + c.darkGray(`See the framing reference: docs/compliance/${key}.md`));
31
- process.exit(2);
32
- }
33
28
  const root = findMissionRoot(resolve(process.cwd(), opts.path ?? "."));
34
29
  if (!root) {
35
30
  console.error(status.error("No runward/ mission found here or above. Run `runward init` first."));
@@ -54,6 +54,7 @@ function readRules(missionDir) {
54
54
  /** The three build-phase deliverables that carry a `## Rule conformance` manifest (as `check --strict`). */
55
55
  const CONFORMANCE_DELIVERABLES = [
56
56
  ["Architect", "architecture.md"],
57
+ ["Topology", "execution-topology.md"],
57
58
  ["Floor", "floor.md"],
58
59
  ["Govern", "governance/threat-model.md"],
59
60
  ];
@@ -1,8 +1,8 @@
1
1
  /** Total number of craft rules shipped under templates/rules/. */
2
- export const EXPECTED_RULES = 58;
2
+ export const EXPECTED_RULES = 60;
3
3
  /** Gate adapters shipped under templates/adapters/ (ADR-0012): one per harness seam, plus the port-contract README. */
4
4
  export const EXPECTED_ADAPTERS = 4;
5
5
  /** Routed-count floor: minimum CRITICAL/HIGH rules mapped to each build phase (ADR-0002).
6
6
  * Lowering a floor is a deliberate, tracked edit — the `phases:` mapping cannot be silently
7
7
  * stripped to make `check --strict` pass vacuously. */
8
- export const EXPECTED_MAPPED = { architect: 6, topology: 4, floor: 10, govern: 10 };
8
+ export const EXPECTED_MAPPED = { architect: 6, topology: 4, floor: 10, govern: 12 };
@@ -1,7 +1,7 @@
1
1
  export const RULE_MIGRATIONS = {
2
2
  "hexa-llm-boundary-principle": {
3
3
  to: "hexa-move-deterministic-out",
4
- reason: "the name is reserved for the founding inversion",
4
+ reason: "renamed to name the pattern directly (move the deterministic out of the model)",
5
5
  since: "v0.7.0",
6
6
  },
7
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "runward",
3
- "version": "0.12.1",
3
+ "version": "0.12.2",
4
4
  "description": "After the spec: ship and run. A delivery framework for agentic systems — floor first, evolution on evidence, governance from day zero, handover with proof.",
5
5
  "keywords": [
6
6
  "agentic",
@@ -12,7 +12,7 @@ tags: [architecture, llm, frontier, grounding, safety, determinism]
12
12
  > **The model writes prose. The program owns the facts.**
13
13
  > Anything that can be retrieved, computed, validated or decided deterministically must live in code, never in the model's free generation. The model is rented and non-deterministic; the boundary around it is owned and tested.
14
14
 
15
- This is the strongest form of the LLM Boundary Principle: not only move deterministic *logic* out (routing, classification), but move deterministic *truth* out. The model is allowed to phrase, summarise and connect. It is never the source of a number, a citation, a price, a date, or an authorisation.
15
+ This is the strongest form of that boundary: not only move deterministic *logic* out (routing, classification), but move deterministic *truth* out. The model is allowed to phrase, summarise and connect. It is never the source of a number, a citation, a price, a date, or an authorisation.
16
16
 
17
17
  **Why structured outputs are not enough:** constrained decoding and JSON schema guarantee the *shape* of the output, never its *meaning*. A model can emit a perfectly valid JSON number that is invented. Shape validation and truth validation are two different jobs.
18
18
 
@@ -7,7 +7,7 @@ impactDescription: Reduces LLM costs and latency by moving deterministic logic o
7
7
  tags: [architecture, llm, cost-optimization, performance]
8
8
  ---
9
9
 
10
- ## LLM Boundary Principle
10
+ ## Move the Deterministic out of the Model
11
11
 
12
12
  > **Everything that can be deterministic, testable, and cacheable must be moved out of the LLM.**
13
13
 
@@ -0,0 +1,20 @@
1
+ ---
2
+ title: Unexpected Code Execution Runs Sandboxed, Never In-Process
3
+ impact: CRITICAL
4
+ asi: [ASI05, ASI02]
5
+ phases: [govern]
6
+ impactDescription: Caps the blast radius of any code the agent runs (generated or tool-provided) by isolating it from the host, secrets and network
7
+ tags: [security, code-execution, sandbox, isolation]
8
+ ---
9
+
10
+ ## Unexpected Code Execution Runs Sandboxed, Never In-Process
11
+
12
+ > **Code the model produced, or a tool ran, is untrusted input that acts.** It executes in an isolated, least-privilege sandbox, never in the agent's own process.
13
+
14
+ Any path where a model output becomes execution — a code interpreter, a shell tool, an `eval`, a generated script, a plugin that runs code — is treated as **unexpected code execution** and confined:
15
+
16
+ - **Isolation, not trust.** The code runs in a sandbox with no access to the host filesystem, the agent's process memory, the network, or secrets, unless a capability was explicitly and narrowly granted. Generated code never inherits the agent's privileges.
17
+ - **An explicit, approved capability, never an implicit tool.** "Run arbitrary code" is not a default tool the model may call at will; it is a declared, approval-gated capability with a bounded scope (allowed language, timeout, resource ceiling, allowed paths and syscalls).
18
+ - **No path from untrusted content to execution.** Retrieved or user-supplied content must not reach a code-execution surface without the deterministic guard and human approval on the action (see `security-prompt-injection`, the 2-of-3 rule).
19
+
20
+ Form validation is not enough: a model can emit syntactically valid code that deletes data or exfiltrates a secret. The boundary around execution is owned and tested, not hoped.
@@ -0,0 +1,20 @@
1
+ ---
2
+ title: Provenance on Every Field, So the Human Never Trusts a Guess
3
+ impact: HIGH
4
+ asi: [ASI09]
5
+ phases: [govern]
6
+ impactDescription: Stops a model-proposed value being read as a verified fact at the approval point — the human decides on real provenance, never on fabricated confidence
7
+ tags: [security, trust, provenance, human-oversight]
8
+ ---
9
+
10
+ ## Provenance on Every Field, So the Human Never Trusts a Guess
11
+
12
+ > **The model writes the prose; the program owns the facts — and the human must be able to tell which is which.** A model-proposed value is never presented as verified.
13
+
14
+ Human-agent trust breaks when a person approves an action believing the agent's output was checked, when it was only proposed. The guard is provenance made visible, and approval placed on the action:
15
+
16
+ - **Every field carries a provenance marker** — `computed`, `verified`, or `model-proposed` — so the human, and the code, can tell a fact the program owns from a value the model guessed. A `model-proposed` value that would act on the world is refused fail-closed until it is verified or approved (see `frontier-deterministic-boundary`, `data-memory-provenance`).
17
+ - **Approval is on the action, shown with its provenance**, never on a wall of confident prose. The human sees what is proposed versus verified before deciding, so a sign-off is a real decision, not a reflex.
18
+ - **The agent never impersonates a human or an authority.** It is an identified principal, distinct from the user it serves; its outputs are attributable to the agent, and it never claims a certainty, a sign-off, or an identity it does not have.
19
+
20
+ Confident tone is not correctness. The system makes the difference legible, so the human's trust is placed on evidence, not on fluency.
@@ -19,11 +19,11 @@ Use this workflow once framing is decided and structure must follow: "how do we
19
19
 
20
20
  ## Procedure
21
21
 
22
- **Refuse stack questions, again.** Contracts first, technology later. The phase rests on the method's founding inversion — the LLM Boundary Principle: the architecture constrains the model, never the reverse. The model and the infrastructure are adapter decisions, taken behind stable contracts. That is why boundaries come before stack. Each stack choice is taken adapter by adapter once boundaries are known, justified by a local technical reason — never by habit.
22
+ **Refuse stack questions, again.** Contracts first, technology later. The phase rests on the doctrine's guiding principle: the architecture constrains the model, never the reverse. The model and the infrastructure are adapter decisions, taken behind stable contracts. That is why boundaries come before stack. Each stack choice is taken adapter by adapter once boundaries are known, justified by a local technical reason — never by habit.
23
23
 
24
24
  **Fix the two boundaries that make the stack secondary.**
25
25
 
26
- 1. **Domain ports.** The domain expresses its needs as contracts: generate a model completion, persist state, execute an action, read a source. Each contract is honored by an adapter written in any language, as long as it honors the contract. The model port is a port like any other: the reasoning engine is bound only by its contract, not by its brand. The daily dividend is a domain testable without the model; substitutability is the insurance you keep in reserve. This is the founding inversion made concrete: the model is a replaceable adapter behind a stable port.
26
+ 1. **Domain ports.** The domain expresses its needs as contracts: generate a model completion, persist state, execute an action, read a source. Each contract is honored by an adapter written in any language, as long as it honors the contract. The model port is a port like any other: the reasoning engine is bound only by its contract, not by its brand. The daily dividend is a domain testable without the model; substitutability is the insurance you keep in reserve. This is the guiding principle made concrete: the model is a replaceable adapter behind a stable port.
27
27
  2. **The cross-process integration protocol.** When a capability lives in another process or language, expose it through a standardized tool protocol. The system consumes that process as a tool provider and publishes its own capabilities the same way. A service is just an adapter that moved into its own process; the domain does not change.
28
28
 
29
29
  **Govern every contract.** A port is more than a typed schema. Version it; make changes additive by default; read as a tolerant reader that ignores unknown fields and accepts missing optional ones. For a genuinely breaking change, expand then contract: introduce the new, migrate consumers, retire the old — never in one move. Track provenance: who produces, who consumes, under which version, so impact is measurable before a change. Fix meaning per bounded context: without pinned semantics the model will invent false mappings; the semantic contract is to meaning what the typed schema is to malformed data. On legacy, the adapter becomes an anticorruption layer that translates the old dialect into the domain language without contaminating the new — and that boundary is never free: name the translation cost and budget it.
@@ -12,7 +12,7 @@ Use this workflow whenever an agentic-system mission needs to be planned, advanc
12
12
 
13
13
  ## Procedure
14
14
 
15
- **Hold the posture before any phase.** Three rules outrank every tooling preference. Mentor as much as engineer — listening outranks solving: understand the process as it actually runs, not as it is described. Prove with a running system, not a deck. Decide architecture before models: the model and the infrastructure are adapter choices, reversible, made behind stable ports. The founding inversion underneath — the LLM Boundary Principle: the architecture constrains the model, never the reverse — opens the method; what carries it is the six phases, the **five architecture gestures** — boundaries before stack; isolate by contract and complexify on proof; take determinism out of the model; keep state explicit and memory governed; govern, trace and evaluate from day zero — and the decision matrix. These architecture gestures shape the system, and are not to be confused with the opening moves that start the mission (below).
15
+ **Hold the posture before any phase.** Three rules outrank every tooling preference. Mentor as much as engineer — listening outranks solving: understand the process as it actually runs, not as it is described. Prove with a running system, not a deck. Decide architecture before models: the model and the infrastructure are adapter choices, reversible, made behind stable ports. The principle underneath — the architecture constrains the model, never the reverse — opens the method; what carries it is the six phases, the **five architecture gestures** — boundaries before stack; isolate by contract and complexify on proof; take determinism out of the model; keep state explicit and memory governed; govern, trace and evaluate from day zero — and the decision matrix. These architecture gestures shape the system, and are not to be confused with the opening moves that start the mission (below).
16
16
 
17
17
  **Open the chain with four opening moves, in order, with the sponsor** — the mission's opening ritual, distinct from the five architecture gestures above. Together with show-before-you-build, they form four opening moves plus a standing show-before-you-build discipline.
18
18