Skip to content

Read pinned internal knowledge decision cards - #633

Draft
Dong1017 wants to merge 3 commits into
mainfrom
codex/knowledge-decision-cards
Draft

Dong1017 wants to merge 3 commits into
mainfrom
codex/knowledge-decision-cards

Conversation

@Dong1017

@Dong1017 Dong1017 commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Codex, acting for @Dong1017 (implementing agent).

Governing Issue and delivery slice

Refs #626

Anchors touched: A7. Keep the existing Find and Read defaults compatible and pin every explicit decision read to the selected knowledge revision.

Changes

  • Add opt-in find --decision-cards and read --layer L1 --revision. Keep the existing source-entry commands and JSON output as the default.
  • Build a bounded decision card from the exact selected Skill, Case finding, Package, or Record revision. Include explicit coverage and links to the matching L2 evidence and L3 resources. Report partial, over-budget, and unavailable-revision states.
  • Preserve legacy Markdown Store entries and select a Case finding by stable finding ID or a revision-local JSON pointer.

Verification

  • Eight focused tests passed on Windows, including retained revisions, a reordered Case finding, a legacy Markdown Store entry, a small byte budget, and Package reads without PyYAML. Ruff and diff checks passed.
  • The broader Find, Read, and Store regression suite had 134 passed and one skipped because Windows denied symlink creation.
  • The wheel installed without optional dependencies. It passed three isolated command-line probes for a Skill, a Record and a historical Case finding.
  • This branch merges cleanly with current main, Share external knowledge source composition #631, and the current feat(knowledge): add full-catalog selection, applicability checks and bounded reads #534 branch in a local merge simulation. Combined retrieval delivery and model-outcome experiments remain follow-up work.
  • The broad Windows test collection is blocked by the existing fcntl import on this host.

Knowledge authorship declaration

{"schema_version":1,"head_sha":"da904044a5c39c026ead13f380372a96a799ba97","human_only":false,"material_ai_authors":[{"tool":"Codex","model_id":"gpt-6.2-astra","effort":"xhigh","role":"author"}]}

Project Skill, Record and Case finding decisions from one verified revision and expose opt-in Find links and bounded L1 reads.

Agent-assisted-by: Codex / gpt-6.2-astra [effort=xhigh] (author)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
@Dong1017

Copy link
Copy Markdown
Collaborator Author

Codex, acting for @Dong1017 (implementing agent).

@amy-why-3459 @zengchuang-hw 请分别复核与 #534 未来目录读取的衔接,以及当前草稿的固定版本语义。重点看 L1 与结果中核验的版本绑定、Case finding 重排后的身份,以及默认 Find/Read 保持兼容。已附 134 项回归和无 PyYAML 的 wheel 验证。

Draft head da904044a5c39c026ead13f380372a96a799ba97.

@zengchuang-hw zengchuang-hw 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.

NO PASS
dot, acting for @zengchuang-hw.

应 草稿检视请求,核对 #626:base fd349032c54dd42e57185e86c74fad543fb51617,head da904044a5c39c026ead13f380372a96a799ba97。范围检视。

  1. Find 必须保留选中的 finding 身份。 当前检查只比较用于排序的 Finding,不含作者声明的 ID。同样的可见字段、不同 ID 的 findings 若在两次读取间重排,比较仍会通过,随后用新文件的序号生成另一条 ID 的 L1 链接。比较排序时读到的 case.json 摘要,或保留并比对有序 ID/声明;补上只改变 ID 或等文本重排的回归,不改默认输出。
  2. 决策摘要不应丢掉同时存在的限制。 L1 投影用 or 取拒绝点、失败模式、限制的第一项。已有 Skill 同时声明三者,原值虽留在 declared,决策区却少了内容。请保留各类约束,并验证同时声明时的投影与 complete 状态。

旧版 Store 读取、明确版本不可用与默认 Find 路径已静态核对;未发现默认排序变化。未运行 pytest、wheel 或 CI,未把 #534 后续集成作为此轮门槛。

@amy-why-3459 amy-why-3459 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Codex, acting for @amy-why-3459.

复核了 Find 到固定版本 L1 的衔接。checkout Skill 在排序与读取之间发生变化时,搜索命中和决策卡可能来自两个版本,见行内意见。

"card_bytes": projection["card_bytes"], "read_args": args,
"open_argv": [*launcher(), *args]}

if source.kind != "case":

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[P2] 对 checkout Skill,rank 和 document.view 使用 load_corpus 时读到的描述,_read_preview 却会重新从磁盘读取。这里直接绑定后一次读取的 revision。可补一条回归:先加载描述含唯一查询词的 Skill,保持 ID、删除该词并改写适用条件,再用原 corpus 执行 find(..., decision_cards=True)。搜索仍按旧描述命中,打开 L1 却会得到新适用条件。建议在生成链接前核对参与排序的 Skill 内容与已验证 bundle;若两者已变化,返回 unavailable 并提示重新 Find,或者用同一份快照完成排序和投影。

Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
Agent-assisted-by: Codex / gpt-6.2-astra [effort=xhigh] (author)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
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.

3 participants