Skip to content

Define auditable continuous Task episodes - #7

Merged
Gandy2025 merged 4 commits into
mainfrom
feat/task-episode-definition
Jul 30, 2026
Merged

Define auditable continuous Task episodes#7
Gandy2025 merged 4 commits into
mainfrom
feat/task-episode-definition

Conversation

@Gandy2025

@Gandy2025 Gandy2025 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • preserve the minimal Task / Read / optional single Effect model introduced on main
  • redefine a clear Task as a single-Agent-owned continuous work episode
  • release the stricter contract as Skill 0.4.0 and Task judgment schema v3
  • require auditable ownership, objective, outcome, deliverable, and boundary anchors
  • merge continuations and delivery phases into their parent episode; split only for a new independent objective, scope, ownership acceptance, and outcome
  • classify weak greetings, status pings, continuation prompts, clarifications, and non-independent subphases as structured exclusions
  • render the complete clear and excluded Task inventory with episode anchors and boundary rationale

Deterministic enforcement

  • require ownership to be assigned, transferred, or explicitly accepted by the audited Agent
  • couple objective evidence to the ownership-compatible sender
  • require a distinct, strictly later audited-Agent outcome anchor
  • prevent reuse or overlap of episode identity, continuation, and outcome anchors
  • bind Reads, choices, and Effect outcomes to the evidence-established episode window
  • reject weak/deictic objectives such as please continue, 请继续, 修一下吧, and status please, while preserving concrete independent deliverables
  • reject superseded task-type, quota, saturation, exposure, confidence, and support fields
  • retain one observed/unresolved Read judgment and at most one optional Effect per Task

Breaking artifact contract

Task judgment schemas v1 and v2 are intentionally unsupported by Skill 0.4.0. Existing artifacts must be reconstructed under schema v3; this change does not provide a compatibility reader or migration path.

Validation

  • python3 scripts/validate_skill.py
  • python3 -m compileall -q skills tests scripts
  • Skill Creator quick_validate.py
  • python3 -m unittest discover -s tests -p 'test_*.py' -v — 48/48 passed
  • git diff --check
  • two independent reviews with no remaining blocker/P1
  • fresh episode-classification forward evaluation

@Gandy2025
Gandy2025 requested a review from yuezengwu as a code owner July 30, 2026 06:02

@yuezengwu yuezengwu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested

实现目标与核心改动:本 PR 将 Task 从边界较弱的判断单元升级为单 Agent 所有的连续工作 episode,并用 schema v2 增加 ownership、objective、outcome、deliverable、boundary 与 task-type rationale 锚点;reporter 同步校验时序、锚点复用、跨 Chat linkage、抽样与完整 inventory。整体方向清晰。

阻塞项:skills/context-tree-value-audit/scripts/context_tree_value_audit.py:5162is_weak_task_fragment() 只在空白/标点归一化后匹配一组完全相等的短语。常见的等价弱提示,例如 please continue请继续修一下吧status please,都会被视为“非弱” objective;它们也能作为 objective source anchor 通过 validate_task_refs()。这样 schema-v2 judgment 仍可把 continuation/status/fix-again 提示铸造成 clear Task,进而抬高 100-Task quota 或补齐 type coverage,直接违背本 PR 的 deterministic enforcement 目标。请把礼貌词/语气词等常见包装纳入保守的闭集归一化或锚定模式,并加入这些等价变体及“包含 continue 但确有独立交付目标”的反例测试。

数据结构提醒:这是有意的 task-judgments.jsonl schema v1 → v2 不兼容变更;diff 中没有数据库变更。请 human 重点确认旧 artifact 必须重建、而不是迁移/兼容读取的发布假设。

按本 reviewer 约定未运行测试;GitHub 上 Python 3.11 / 3.12 checks 均为成功。Reviewed head: 536418b7b28f55ad4b3671babb4a3583cf0385ca.

@Gandy2025

Copy link
Copy Markdown
Contributor Author

Addressed in f990cfe.

The weak-fragment guard now:

  • strips a closed set of polite/modal prefixes and suffixes;
  • recognizes anchored deictic whole-command forms such as please continue fixing it, 继续修一下, and 帮忙修下;
  • strips edge-only Unicode punctuation and symbol decoration;
  • strips one or more leading First Tree Agent mentions using the exact slug grammar, without swallowing punctuation-adjacent objective text.

Regression coverage now rejects please continue, 请继续, 修一下吧, status please, decorated equivalents, and single/multiple-mention equivalents as standalone objective anchors. Counterexamples that contain continue but still name a concrete scope and deliverable remain valid.

Validation at this head:

  • Skill validator: passed
  • Skill Creator validator: passed
  • compileall: passed
  • unit tests: 48/48 passed
  • git diff --check: passed
  • GitHub Actions Python 3.11 / 3.12: passed
  • two independent final reviews: approved with no blocker/P1

The schema v1 → v2 release assumption remains intentionally rebuild-only: v1 artifacts do not contain the ownership/objective/outcome evidence needed to support v2 semantics. I am requesting explicit product-owner confirmation of that assumption before merge.

yuezengwu
yuezengwu previously approved these changes Jul 30, 2026

@yuezengwu yuezengwu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved

上一轮 blocker 已解决。最新提交用闭集 prefix/suffix wrapper 归一化、deictic 弱命令锚定模式、Unicode 边缘装饰清理和精确的多 Agent mention 处理,覆盖了 please continue请继续修一下吧status please 等等价弱提示;新增反例同时证明包含 continue 但明确命名独立目标与交付物的消息不会被误拒。

我重新检查了从 536418b 到当前 head 的完整 successor diff(实现、schema 文档、manual behavior checklist 和 tests),未发现新的 blocker。schema v1 → v2 仍是有意的不兼容 artifact 变更,且没有数据库变更。

按 reviewer 约定未运行测试;GitHub Python 3.11 / 3.12 checks 均成功。Reviewed head: f990cfeb63c8f03fd9a42bb439dd0f623d6dd64a.

@Gandy2025

Copy link
Copy Markdown
Contributor Author

Product-owner decision confirmed:

  • Existing schema v1 audit artifacts must be re-adjudicated and rebuilt under schema v2.
  • The tool will continue to reject v1 artifacts explicitly.
  • No migration or compatibility reader will be added, because v1 does not contain the ownership, objective, outcome, deliverable, and boundary evidence required by the v2 Task contract.

This confirms the intentional rebuild-only release assumption noted in review.

@Gandy2025

Copy link
Copy Markdown
Contributor Author

Resolved the main integration conflicts in 8f00a15 without reintroducing the superseded audit model.

The merged result:

  • preserves main's minimal Task / Read / optional single Effect contract
  • releases the stricter episode contract as Skill 0.4.0 / Task judgment schema v3
  • enforces single-Agent ownership plus distinct objective and strictly later outcome anchors
  • keeps Task type, quota, saturation, exposure, confidence, and support semantics removed
  • treats schema v1/v2 artifacts as rebuild-only; there is no compatibility reader or migration path

The v3 breaking-artifact contract was explicitly confirmed by the product owner.

Validation on head 8f00a15:

  • repository validator passed
  • compileall passed
  • Skill Creator validator passed
  • 48/48 unit tests passed
  • diff check passed
  • two independent post-integration reviews found no remaining blocker/P1
  • GitHub Python 3.11 and 3.12 checks passed

The PR description has been updated to match the integrated model.

@Gandy2025
Gandy2025 requested a review from yuezengwu July 30, 2026 07:02

@yuezengwu yuezengwu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested

实现目标与合并后的核心改动:当前 head 将已落到 main 的 minimal Task / Read / optional single Effect 模型与 continuous episode 边界合并,发布为 Skill 0.4.0、Task judgment schema v3;schema v1/v2 均 rebuild-only,且无数据库变更。product-owner 对该发布假设已确认。

新 head 有两个 episode chronology blocker:

  1. skills/context-tree-value-audit/scripts/context_tree_value_audit.py:5857-5926 先确认“至少一个 ownership-compatible objective anchor 是 concrete”,但 evidence_started_at 仍使用所有 objective anchors 的最早时间。若 objective anchors 同时包含 10:00 的弱 please continue 与 10:05 的 concrete assignment,10:02 的 Read 会通过,因为起点被算成 10:00;这会把发生在唯一 concrete objective 之前的 Read 归入 Task。请从 ownership-compatible 且 non-weak 的 objective anchors 计算 concrete-objective 起点,并增加“弱早锚点 + concrete 晚锚点 + 中间 Read 必须拒绝”的回归测试。

  2. skills/context-tree-value-audit/scripts/context_tree_value_audit.py:5899-5938 只要求 outcome anchors 中“至少一个”来自 audited Agent,然后用全部 outcome anchors 的最大时间作为 episode end。这样可以把 10:10 的 Agent delivery 与 10:20 的 human follow-up 都列为 outcome anchors,让 10:15 的 post-delivery Read 通过;Effect 也可以绑定那条 human anchor。请要求每个 outcome anchor 都是非空的 current-Agent message(或只从符合该条件的 outcome anchors 派生 end 并禁止 Effect 绑定其他 sender),并加入 mixed-sender outcome regression。

这两点会直接破坏 PR body 所述“bind Reads/choices/Effect outcomes to the evidence-established episode window”和“reject post-outcome evidence”,因此阻塞批准。按 reviewer 约定未运行测试;GitHub Python 3.11 / 3.12 checks 均成功。Reviewed head: 8f00a15da760ac8a653427de684e65602b980d39.

@Gandy2025

Copy link
Copy Markdown
Contributor Author

Addressed both chronology blockers in dff1787, plus the symmetric mixed-sender ownership case found during independent review.

  • evidence_started_at now uses the later of:
    • the earliest ownership anchor whose sender is compatible with ownership.kind; and
    • the earliest ownership-compatible, non-weak objective anchor.
  • Earlier weak objective anchors and incompatible-sender ownership anchors can no longer admit Reads or choices before the episode is established.
  • Every outcome anchor must independently be a non-empty current-Agent message.
  • A human or other-Agent follow-up therefore cannot extend episode_ended_at or bind an Effect.

Added regressions for:

  • weak early objective + concrete later objective + intermediate Read;
  • incompatible early ownership + compatible later acceptance + intermediate Read;
  • current-Agent outcome + later human outcome used as an Effect anchor.

Validation on dff1787:

  • repository validator passed;
  • compileall passed;
  • Skill Creator validator passed;
  • 48/48 unit tests passed;
  • diff check passed;
  • two independent post-fix reviews found no remaining blocker/P1.

@Gandy2025
Gandy2025 requested a review from yuezengwu July 30, 2026 07:13

@yuezengwu yuezengwu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved

上一轮两个 episode chronology blocker 已解决。evidence_started_at 现在取 ownership-kind-compatible ownership anchor 与 ownership-compatible、non-weak objective anchor 各自最早时间的较晚者,弱早 objective 或错误 sender 的早 ownership 都不能再把 Read/choice 窗口向前移动。所有 outcome anchor 也必须分别是非空 current-Agent 消息,因此 human/其他 Agent follow-up 无法延长 episode 或绑定 Effect。

我检查了 8f00a15..dff1787 的实现、schema 文档、manual behavior checklist 和新增回归;覆盖了弱早 objective + 晚 concrete objective + 中间 Read、错误 sender 的早 ownership + 晚 accepted ownership + 中间 Read、以及 current-Agent outcome + 晚 human outcome/Effect 三类场景,未发现新的 blocker。

核心数据结构仍是 Skill 0.4.0 / Task judgment schema v3,schema v1/v2 rebuild-only;product owner 已明确确认该不兼容发布假设,且没有数据库变更。按 reviewer 约定未运行本地测试;GitHub Python 3.11 / 3.12 checks 均成功。Reviewed head: dff1787d1f0a1b9af8a8cd034ba5f7b8b5b4efe3.

@Gandy2025
Gandy2025 merged commit b030b73 into main Jul 30, 2026
2 checks passed
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.

2 participants