Skip to content

feat(content-ops): add interactive learning creation and replay - #7004

Merged
loopx-agent merged 4 commits into
mainfrom
codex/operations-interactive-creation-20261021
Oct 21, 2026
Merged

loopx-agent merged 4 commits into
mainfrom
codex/operations-interactive-creation-20261021

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Content production can now turn a prepared finite model into a learning task: compare conditions with a fixed policy, make successive decisions under a declared effort budget, or compare and replay two strategies. The native CLI and the packaged App use the same TypeScript rule owner; an Agent prepares the source once, and the reader operates the model in the existing Content production workbench.

The model retains its source, assumptions, revision and explicit transition rules. Invalid/overlapping rules, stale revisions, unavailable actions and exhausted budgets have explicit results. A damaged model can be replaced only with a validated source and its known current revision; healthy models remain usable. Readers can reset, export the model and decision traces, or explicitly record the model Canvas to a silent local WebM. This content interaction runs no author script, real Goal action, paid provider, microphone or screen capture.

Placement: builtin content-ops / loopx-core; reuse the existing private Goal content workspace and optional video renderer boundary. A small content-format wrapper preserves the default video and reference paths; transport-only TS types are shared with the frontend. The content protocol does not extend Goal/Todo authority vocabulary. Arbitrary scripted worlds and full film editing remain separate work.

Validation

  • Two reusable synthetic briefs: evidence return and service diagnosis. TS semantic tests cover cost, conditional rules, manual/policy parity, reset, limits and malformed input; real CLI/HTTP checks cover revision binding, corrupt-source recovery, wrong-Goal/path/origin rejection and isolation.
  • Packaged React/Chat bundle with its real local backend and a disposable synthetic Goal: desktop 1440×1000, narrow 390×920, keyboard decisions and replay, actual source revision change, recovery and export. Browser-generated Game/Mini-World WebM files decode successfully. Page-local simulated network/unsupported-API cases verify fallback separately from the real browser checks.
  • Passed at this head: 23 TS tests, 15 Python tests, full control-plane typecheck, packaged frontend build/CSS checks and whole Content-Ops/changed-API Ruff. Native premerge passed 6 direct, 10 catalog, 8 risk-profile and 1 public-boundary checks; quality receipt cqr_31948997c542307872ba matches the current base/head and verifies valid. All four commits carry DCO sign-offs. Five existing optional heavy-renderer cases are explicit skips because that dependency is unavailable; no renderer output qualification is claimed. Adjacent media statement formatting is AST-identical, and three CLI branches reuse the same JSON renderer.
  • Thirteen real legacy CLI/HTTP cases have identical full base/head responses and diagnostics under matched synthetic fixtures. A budget-guard mutation in an isolated source snapshot fails an independent oracle through the real CLI; the fixed head passes. Current managed policy has wait_for_ci=false; remote CI was not queried or waited for.
  • This delivers a reusable learning-content creation path. Independent learner outcomes, creative film quality and complete production-cost comparisons require their own evidence.

Visual evidence

Actual packaged UI, synthetic local Goal, unchanged component sources tested at this head d5908cbed2dde9cbdf8a9d82db2bbcb38d79c55e. The original UI had video/source entries; the new UI adds interactive learning and an optional focused task view. Screenshots contain no personal operating data. Local synthetic preview only; no installed-user or public-hosted deployment claim.

Before · desktopAfter · desktop
Previous content workbench on desktopInteractive learning entry in the content workbench
Before · narrowAfter · narrowDecision practice · narrow
Previous narrow content workbenchNarrow interactive learning entryKeyboard-operated decision practice at 390 pixels

Same scenario, two strategies with explicit outcome and replay controls

Protocol and reproducible preparation: Content-Ops interactive learning models.

Related integration: #6876 owns generated media and the proposed Goal artifact entry. This slice uses current main’s native content workbench and does not depend on generated-media results. Later Goal-entry integration should reuse this player and revalidate the journey; peer adoption is not claimed.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent | gpt-6.1-sol | OpenAI | runtime_reported | reasoning_effort=max

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

动机

需要把一个机制讲清楚的内容创作者,以及希望亲手检验条件、行动和结果的读者。

此前只能查看固定视频或素材;例如解释证据如何返回请求人时,读者无法改变条件、选择行动并核对其实际后果。现在同一模型可以对照条件、在预算内作决策,再逐步回放另一策略。

已验证的改进是可操作、可重置、可导出并可显式录制的学习内容路径;三种形式的结果均来自同一个后端规则执行器。

本 PR 不执行任意作者脚本,不操作真实 Goal,不进行收费模型调用或自动发布;模型目标达成不表示学习收益已经验证。

合并后的安装采用、完整作品的创意质量、独立读者理解收益与完整制作成本比较仍需另行验收。

改动思路

保留一个 TS 规则归属、复用原有私有工作区与入口,才能同时提供条件对照、真实行动和策略回放;存储只做 IO,前端只投影结果,没有增加开关、第二套决策或重型 provider。

当前边界是可操作的有限学习模型、原生 CLI/API、三种工作台任务、重置/轨迹导出和本图静音录制;完整影片、任意脚本世界与安装采用不在本 PR 的完成声明内。

最强的不发布理由是:作者仍需对有限模型的假设和规则负责,成功的轨迹不能证明真实世界或教学有效性。固定视频、加一个可点按钮和独立私有页面都不能提供可复用的原生规则执行;反过来,为本任务增加任意脚本引擎或独立扩展也没有必要。这里只补既有内容能力所缺的有限模型执行,不扩张到通用世界、影片编辑或真实任务控制。

创作者把已知目的和来源交给 Agent 准备一次,读者从原 Goal 工作台进入交互学习,无需重填 JSON、重复说明或新增授权确认。预测与观察记录均可跳过;多次决策是所需学习任务本身。默认仍打开视频制作,原有视频和素材组件保留。

下表是按提交 d5908cbed2dde9cbdf8a9d82db2bbcb38d79c55e 源码整理的路径说明,不是执行证据;实际执行依据是后文的原生 CLI/HTTP、打包浏览器和故障恢复验证。

触发 规则与状态归属 可见结果/失败恢复
Agent 准备来源模型 TS 验证;原 Goal 私有目录原子写入 稳定标识、摘要与修订;旧修订拒绝
条件对照/人工行动/策略运行 同一个 TS 有限执行器 真实路径、成本和明确失败;不操作真实 Goal
读者回放、重置、导出或录制 页面投影与自身 Canvas 可读状态、JSON/静音 WebM;录制不可用仍可操作/导出
来源变更、坏文件或请求失败 原生修订检查与可信来源修复 保留原结果,重新读取后继续;其他模型仍可用

具体改动

依据未被本 PR 改写的 docs/development/frontend-delivery.md,规范修订 973914e8cb713ee176737c95750aedb3072b9ea8。下列 TF-1 至 TF-6 对应其 Task-first delivery 的六个编号步骤,是本次评审的映射标签。

  • TF-1 — implemented:比较原请求到可用交互的完整路径;Agent 负责已知内容准备,没有第二个配置表或强制预测问答。
  • TF-2 — implemented:复用 Content-Ops、既有 Goal 私有媒体工作区、TS effect runtime 与能力编辑入口;浏览器只投影结果,不再建一套状态/规则归属。
  • TF-3 — implemented:预算不足不得转移/扣款、旧修订不得运行是独立语义;实际原生调用验证,并用移除预算守卫的隔离副本证明检查能够失败。
  • TF-4 — implemented:打包 React/Chat 与真实后端联调,实际桌面、390 像素窄屏、键盘决策/回放、来源修订和损坏恢复;中文/英文操作文案与作者自带内容分开。网络/不支持 API 情形明确是页面内故障模拟。
  • TF-5 — implemented:以原任务而非新增配置项判断价值;检查了不改、固定播放器、单独页面和新增 provider 的替代方案。复用的 UI/TS 证据在本次 head 的组件源码未变,最终 CLI 格式整理另有当前验证。
  • TF-6 — implemented:源码提案、打包验证、合并和安装采用明确分开;本评审没有执行或宣称已完成用户安装升级,也没有以此证明学习收益。

规范原文:Task-first delivery @ 973914e8cb713ee176737c95750aedb3072b9ea8。

关键代码讲解

  1. validateExperiencePlan 检查完整来源模型、有限大小、状态/行动引用、成本及互斥条件。摘要包含来源和假设;同状态/行动的重叠条件直接拒绝,输入顺序不能决定因果。
  2. runExperience 把场景与明确覆盖值送入同一执行器,人工行动与策略互斥。先检查规则与剩余预算,失败帧保留原状态/用量;终点、步数上限与未执行行动都有明确结果。
  3. ExperienceWorkspace.prepare 只承担安全 IO:相同来源重试复用身份,显式旧修订在幂等返回前就拒绝,当前内容修复需要可信修订和有效新来源。保存后独立 inspect 再校验。
  4. _content_experience_request 沿用所选 Goal 和同源边界,只接收有界的列举、读取和运行;浏览器不能传文件路径、创建模型或运行作者代码。原有媒体 API 的合法/拒绝路径保持一致。
  5. ExperiencePlayer 提供三种不同任务,展示来源、规则、结果和失败。旧来源或未确认结果要求重新读取;录制只获取本图 Canvas,卸载/停止会清理流、计时器与下载 URL。

31 个改动文件包括两份可复用合成模型和六张实际视口图片,未提交构建产物、私有运行状态或原始轨迹。额外的媒体语句展开保持 AST 一致;三个重复 JSON lambda 已归并为一个命名渲染函数。

对主干的风险

没有发现当前 head 的阻塞问题。最大的风险是把作者模型中的成功当成真实完成,或在来源变更后继续显示可信结果。前者通过内容协议边界和 learning_effect=not_tested、publish_authorized=false 明示;后者有原生摘要/修订校验、旧结果保留和来源修复后恢复操作的真实路径验证。来源不明或元数据坏掉不会被静默重建。

已运行 23 项 TS 语义测试、15 项 Python/原生 CLI/HTTP 测试,全量控制面类型检查、前端构建、CSS 与整个 content_ops/改动 API/test 的 Ruff。预合并的 6 项直接检查、10 项 catalog canary、8 项风险 smoke 和 1 项公共边界扫描通过;质量凭据 cqr_31948997c542307872ba 对应当前 base/head 且验证有效。四个提交均有 DCO,已提交 diff 的双语 RFC 检查通过。

原有入口另做了不可变 base 与当前 head 的 13 个真实 CLI/HTTP 对照:同一合成输入下完整响应、退出状态、错误详情和持久化回读一致,仅归一化时钟与合成目录前缀。预算规则的隔离变异通过真实 CLI 被独立断言识别:变异错误地到达目标,当前 head 则停在 lost、已用 3、余量 1、未应用行动。录制的 Game/Mini-World WebM 均真实解码无错误。

五项既有重型 renderer 用例因可选依赖不可用而显式跳过,不属于本次改动的必需验证;没有据此宣称完整 renderer 资格。媒体格式整理具有 AST 等价和原生入口对照。更早的质量凭据缺失、Ruff 失败与只读网络超时保留为历史观测;当前精确范围的验证已覆盖暴露的实际条件,没有放宽断言或阈值。按当前管理策略 wait_for_ci=false,未查询、轮询或等待 GitHub CI。

相关开放 PR #6876 负责生成媒体与 Goal 成果入口迁移;本 head 仍以当前 main 的能力工作台为验证入口,交互模型不依赖其生成产物。后续接入新入口应复用本组件并重新走查,当前评审不声称对方已经采用。#3313 的浏览器发布门是另一个责任边界,本 PR 不接管。

语义与 CI 对齐

新词汇只属于有限学习内容:状态/成本/终点采用显式类型和精确 ID,不以文案或子串猜测真实 Goal 状态。通用控制面义务、权限、调度、配额与发布门没有变更。可发现性不表示激活,默认视频和原 provider 绑定保持;新的模式、帮助和能力文案是明确披露的可用性扩展,并未声称默认关闭会隐藏这些文案。纯模型不会获得其他真实工作或后续 Goal 的执行权。

我的整体评价

problem_context=justified_increment:这个边界交付了可复用且实际可操作的内容创作路径,适合作为后续完整作品的原子能力。long_horizon=preserved:来源、重复准备、修订与恢复可持续复用,未证明真实 Agent 效率提升。user_experience=improved:原工作台里可完成条件探索、人工决策和策略回放,错误可恢复,不要求重复准备或额外确认。

保留一个 TS 规则归属、复用原有私有工作区与入口,才能同时提供条件对照、真实行动和策略回放;存储只做 IO,前端只投影结果,没有增加开关、第二套决策或重型 provider。 当前边界是可操作的有限学习模型、原生 CLI/API、三种工作台任务、重置/轨迹导出和本图静音录制;完整影片、任意脚本世界与安装采用不在本 PR 的完成声明内。

机制与问题规模相称;保留同一个内容规则归属和现有媒体/素材兼容边界,未见必须先扩张或拆出另一层生命周期的理由。已应用的命名 JSON 渲染复用与 AST 等价整理足够有界。剩余最强证据缺口是独立学习效果、创意成片及完整成本比较、用户安装采用与可选重型渲染环境;这些都不由本次通过的轨迹或截图代替。来源内容真实性仍由作者负责。合并仍需当前提交的独立 readiness 与既有授权,评审本身不授予权限。

English verdict: APPROVE — exact head d5908cbed2dde9cbdf8a9d82db2bbcb38d79c55e. No blocking finding. This is a justified, usable Content-Ops increment: one typed finite-model owner, existing private workspace/routing, three real packaged learning tasks, truthful recovery and explicit local export/recording. Native local checks, 13 complete baseline/head public-entry comparisons and a falsified budget-guard mutation support the reviewed boundary. Five optional unchanged heavy-renderer checks are explicit skips. Learner benefit, creative quality, installed-user adoption and full production costs remain unverified; approval grants no merge, installation or publication authority.

@loopx-agent
loopx-agent merged commit 26e3f31 into main Oct 21, 2026
27 of 32 checks passed
@loopx-agent
loopx-agent deleted the codex/operations-interactive-creation-20261021 branch October 21, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant