Skip to content

Ship protocol-neutral progressive delegation so Lyra grows through real work #123

Description

@George-RD

What to build

OpenSpine must prove progressive delegation is portable: Lyra learns a capability on one channel (email) and exports the grant; a different product (Bell) consumes it on a different channel (WhatsApp) and executes it without privilege escalation. Ship the neutral protocol.

Acceptance criteria

  1. Implement channel-agnostic delegation grant format. 2. Write tests proving: Lyra export on Email → Bell import on WhatsApp with no authority upgrade. 3. Document the protocol invariants.

Blocked by

Bell fit review decision (post-fit-review)

Fence: Do not start before the Bell fit review lands on build-on. Route through delivery vehicle in DIRECTION.md.

Original report

North star

OpenSpine is not a safer Gmail drafting tool. It is the governed system underneath an employee-like personal AI whose capability and autonomy grow as the owner delegates real work.

The user experience should feel like onboarding and managing a strong employee:

  1. delegate one clear job;
  2. let Lyra do internal work freely inside the task boundary;
  3. ask only at a real effect or disclosure boundary;
  4. review the result and any exception;
  5. turn repeated decisions into a clear proposal for reusable responsibility;
  6. approve, narrow, reject, pause, resume, expire, or revoke it;
  7. require less interruption on future matching work while every task still receives a bounded grant;
  8. return changed context, drift, policy conflict, or exhausted budget for review rather than silently widening.

The core product sentence remains:

Lyra can learn the job. Learning does not become permission by itself.

Adversarial architecture correction

Recurring Gmail draft creation remains the right smallest useful proof. It is not the architecture. A deep review found these decomposition and safety gaps in the current substrate and the superseded renderer PR:

  1. A standing rule is not the whole responsibility. It is an action-level reusable-approval/composition input. A user-facing responsibility also includes the job/workflow, reviewed scope, limits, exceptions, receipts, and controls.
  2. Live standing-rule matching is action-only. Connector implementation/instance, account, target, counterparty, and task shape are not part of the rule match.
  3. Only one active rule effectively survives per action. Activation revokes other active rules sharing the action, so separate responsibilities for different accounts or relationships cannot coexist safely.
  4. Miner evidence is the wrong equivalence class. The owner-approval audit supplies only the payload ref, not the approved target; the scheduled miner groups (payload_digest, action_id). Identical text for different targets can group, while normal repeated work with different text will not.
  5. The reusable Gmail effect is not executable. email.create_draft runs through a special post-approval path and is deliberately absent from the ordinary handler registry. Standing-rule admission can reach a successful missing-handler stub, finalize budget, and create no draft.
  6. Owner review is channel-coupled. Telegram text/buttons and raw integer chat IDs are being treated as the review/destination model rather than one adapter over a principal-bound owner surface.
  7. Action meaning/delegatability is ad hoc. Owner labels are guessed in renderer code; there is no catalog-owned declaration that an action implementation has a real executor/resolver, safe reviewed-scope requirements, risk-tiered limits, destination semantics, or reusable-delegation support.
  8. Connector writes are under-classified. email.create_draft writes content to an external owner account but is classified as neither a rated egress endpoint nor an output channel. Draft, direct send, workspace post, and public publish need distinct effect/destination semantics.
  9. Proposal evaluation is not proposal-specific enough. Non-model replay currently proves owner-control history exists rather than replaying the exact proposal; the standing-rule judge chiefly proves that the action ID exists.
  10. Proposal copy can outrun evidence. A manual proposal can be described as a repeated pattern, and activation can become stale relative to policy, descriptor/executor, connector/account, identity, or base state.
  11. Generic request construction is not a trusted scope source. Generic mediation stores a shell payload, extracts string parameters, and leaves target refs/digests empty; AD-036/AD-120 require the kernel to resolve identity- and scope-bearing fields.
  12. Headless autonomy is intentionally absent. The current headless lane refuses standing-rule downgrade. That is safe, but whole unattended responsibilities need a separately reviewed trigger/headless contract rather than removal of the guard.
  13. Dark-window Allow can amplify authority. Pending actions are deduplicated only by request fingerprint, with no per-rule outstanding cap. Many distinct over-budget requests can queue many silence-based waivers.
  14. The capability map conflates capability and proof. Progressive delegation is the capability. Recurring Gmail draft creation is the first vertical proof. A second protocol is separate portability evidence, and a whole responsibility is a later maturity stage.

These are decomposition gaps under the change-sequence rule. They must be specified explicitly rather than hidden inside local Gmail copy or handler patches.

Product and runtime vocabulary

Standing rule

A versioned, reviewed, budgeted, expiring reusable-approval/authority-composition input that can smooth one effect boundary. It never replaces the task grant and is never a second live authority object. #126 must reconcile this wording with AD-010 and the actual common mediation path.

Responsibility

The owner-facing unit of delegation: the job, workflow, exact scope, reusable effects, remaining boundaries, limits, exception behavior, receipts, provenance, and lifecycle controls.

The first proof may render a responsibility view over an existing workflow plus one scoped standing rule. Long-term responsibility composition is tracked separately so OpenSpine does not stop at an approval shortcut.

Progressive delegation

The generic lifecycle by which repeated, kernel-verifiable owner decisions can become a proposed, evaluated, reviewed, scoped, executable, reversible responsibility. It is protocol-neutral.

Invariants

  • The task grant remains the only live authority object and the upper bound for every task.
  • The shell sends intents; the kernel resolves trusted connector/account/target/counterparty context and effect identity.
  • Identity is not authority.
  • Preference/persona learning is separate from permission growth.
  • A model, miner, workflow, skill, package, or connector cannot approve or activate its own authority.
  • Only distinct principal-authenticated owner decisions may count as repeated-approval evidence. Standing-rule auto-allows, dark-window defaults, worker/model/workflow allows, receipts, and audit replay never recursively increase that evidence.
  • Reusable authority requires a real executor, complete action and implementation descriptors, kernel resolver, reviewed scope, coherent evidence set, and current proposal-specific evaluation.
  • Missing executor, resolver, descriptor, policy compatibility, evaluation, or scope fails closed before owner review or budget use.
  • Scope mismatch or ambiguous overlapping rules happen before quota/rate reservation and before dark-window scheduling.
  • Multiple disjoint scoped responsibilities for one canonical action may coexist; their budgets and authority are never pooled.
  • Per-instance approval and delegated admission converge on the same kernel-owned effect executor and immutable request semantics.
  • Owner channels render one canonical review object and submit typed principal-bound decisions; they do not define lifecycle or authority semantics.
  • A connector write has an explicit effect kind and data destination/visibility even when it is reversible or not yet delivered to a counterparty.
  • Silence never creates more authority than an explicitly reviewed, bounded exception allowance.
  • Headless/inbound/scheduled reuse requires an explicitly reviewed trigger contract; ordinary standing rules do not make arbitrary headless work self-approving.
  • No documentation calls progressive delegation shipped until a real effect completes through the reusable path and all fallback/control paths pass.

Roadmap and dependencies

Phase 0 — Resolve the invalid renderer slice

The branch remains available for selective reuse of tests and validation hardening. Its renderer/action-string design must not be revived wholesale because it inferred evidence, scope, execution readiness, evaluation, and Telegram review semantics from insufficient inputs.

Phase 1 — Define the protocol-neutral contract

Settle the distinction between responsibility and standing rule and define:

  • canonical action descriptors versus connector-specific action implementations;
  • executor/resolver readiness and safe action semantic granularity;
  • effect kind, reversibility, destination/visibility, egress/output classifications, and risk-tiered limits;
  • kernel-resolved action context;
  • reviewed action scope;
  • delegation evidence and evidence-set identity;
  • typed owner surfaces and a channel-neutral owner review object;
  • compatibility/schema versions and dark-window eligibility.

Add the necessary AD/D decisions and OpenSpec/change-sequence dependencies before behavior changes.

Phase 1B — Correct the checked roadmap model

After #126 settles vocabulary, separate the generic capability, selected Gmail proof, portability evidence, and whole-responsibility maturity in the checked capability-map schema and generated roadmap. This slice may land before runtime implementation while the capability remains product_surface_missing.

Phase 2A — Build independent foundations after the contract

These may proceed in parallel after #126 if their boundaries remain cohesive.

Phase 2B — Build scoped evidence and deterministic matching

Requires #126 and #127. Bind owner evidence to approved payload and target plus complete kernel-resolved context; support multiple disjoint scoped rules per action; fail closed on overlap; match before budget/defaults; invalidate on policy/descriptor/executor/connector/account/identity/workflow drift.

Phase 2C — Bound silence-based exceptions

The immediate fail-closed restriction on communication/connector-write Allow defaults may land early. Full bounded pending-exception semantics use #126/#128 context and must prevent many distinct requests from queuing unbounded quota waivers or owner notifications.

Phase 2D — Make evaluation real

Requires #126 and the context/evidence contracts from #128. Structurally judge and actually replay/simulate the exact proposal against its evidence and adversarial changed-context, overlap, executor, destination, and dark-window cases. Store verdicts bound to proposal and runtime compatibility epochs. Owner copy may state only what these verdicts prove.

Phase 3 — Ship the first complete proof

Requires #126, #127, #128, #129, and #133. It must use no dark-window Allow unless #135 has completed and the action descriptor explicitly permits the bounded exception policy.

Use the existing selected-thread Gmail workflow as the vertical proof. The positive path must create a real Gmail draft through the same executor used by exact approval. Changed connector/account/target/counterparty, ambiguous overlap, stale evaluation, budget, pause, expiry, drift, policy change, or revocation must fall back before effect.

Only then may the checked capability map move generic progressive delegation to Wired into Lyra. The map must keep the first Gmail proof separate from protocol portability and whole-responsibility maturity.

Phase 4 — Prove the architecture is not secretly Gmail

After #130, exercise a second materially different communication shape through the same contracts and #133 evaluator. A deterministic test connector is acceptable before a real product connector. Curated built-ins remain acceptable; this phase does not require an untrusted plugin marketplace.

Phase 5 — Grow from effect shortcuts into whole responsibilities

Compose reviewed triggers/routes, workflows, skills, scope, authority, budgets, exception policy, results, and controls into one atomic owner-facing responsibility lifecycle. Preserve the current headless refusal until a reviewed trigger/headless proof replaces it. This is the step from “do not ask me for this one effect again” to “own this job and bring me receipts/exceptions.”

Relationship to existing product work

#118 — first-run trust loop

This is a parallel product track. A user needs to reach the first bounded task easily before they can experience longitudinal delegation. #118 should consume the owner-review/receipt vocabulary once #126/#129 settle it, but setup polish is not a runtime prerequisite for #127/#128.

The product milestone should converge as:

first-run task (#118)
        +
reusable delegation proof (#130)
        =
first credible OpenSpine experience

#117 — installable assistant system

The package store and install/use/run model remain important, but they should not block proving the defining delegation loop. Package installation/selection cannot declare connector/action trust or install reusable authority outside the normal reviewed lifecycle.

Capability-map truth model

#134 must represent:

Open issues are blockers/plans, not repository proof. Archived changes, real artifact paths, and named owner-path tests remain required before status advances.

Dark-window posture

AD-012 remains marked leaning. The first external-communication proof should not use a dark-window Allow default unless #126 explicitly permits it for the effect/destination class, #128 resolves scope before scheduling, #135 bounds outstanding exceptions and notifications, and #133 evaluates the exact behavior. A generic disclosure of the timeout is not enough.

Done when

First complete loop

  • one owner-facing workflow demonstrates first task → repeated exact approvals → evidence-backed scoped proposal → proposal-specific evaluation → review → activation → real matching effect with less interruption → concise receipt;
  • changed scope, ambiguous overlap, stale compatibility/evaluation, budget saturation, pause, expiry, drift, policy conflict, and revocation all restore review/denial before effect;
  • the owner never needs to understand task grants, standing rules, artifact lifecycle, or YAML.

Architecture

  • the generic engine contains no Gmail/Slack/WhatsApp/Outlook-specific matching or lifecycle branches;
  • every delegatable action implementation has reviewed descriptor, resolver, executor, scope, evidence, destination, limit, and evaluation contracts;
  • per-instance approval and reusable authority use the same executor;
  • the miner cannot aggregate different required targets/scopes or automatic allows into one owner pattern;
  • multiple disjoint rules for one action coexist without budget pooling, while overlaps fail closed;
  • dark-window exceptions and notifications are atomically bounded;
  • owner review works through at least Telegram and terminal using a typed owner surface;
  • a second communication shape passes the conformance suite without changing generic lifecycle/evaluation code.

Product truth

  • README, website, roadmap, and capability map distinguish the employee-like promise, landed runtime machinery, first Gmail proof, wider protocol status, and whole-responsibility maturity;
  • a standing-rule row, proposal message, generic corpus check, successful stub, or open issue is never counted as shipped autonomy;
  • no learned preference, correction, repeated approval, model suggestion, workflow update, skill/package update, connector change, evaluation staleness, or silence queue can silently widen authority.

Execution discipline

  • The open PR queue is clear: Superseded: prototype responsibility proposal copy #125 is closed as superseded. The next code/spec PR starts with Define the protocol-neutral responsibility contract above standing rules #126.
  • Use TDD for every behavioral slice. Characterize the current stub-success, payload-only evidence, action-only matching, single-rule-per-action, unbounded pending-default, and non-proposal-specific evaluation failures before implementation.
  • Use OpenSpec and the change sequence for architecture/spec work; do not scope-stretch a running change.
  • Merge only cohesive, independently reviewable slices with the full repository gate green and review threads resolved.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    fence:post-fit-reviewDo not start before the Bell fit review lands on build-on

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions