Repository navigation
docs(skills): embed adversarial invariant, deletion, property-test, and 100x lenses into core skills - #10284
docs(skills): embed adversarial invariant, deletion, property-test, and 100x lenses into core skills#10284songoow wants to merge 2 commits into
Conversation
…nd 100x lenses into core skills Directly integrate the four adversarial engineering lenses into the four existing LoopX workflow skills without adding new skills or altering authority boundaries: - skills/loopx-pr-review/SKILL.md: add compact Adversarial Invariant & Deletion Pass as optional sharpening lenses inside review_execution_contract (implicit invariants & executable counterexamples, deletion pressure on redundant layers/duplicate authority, bug fixes to property/mutation tests, and 100x structural cost check) without adding packet gates, verdict states, or submission/merge authority; also break up the single-line null-action/Draft/fresh-audit block into scannable bullets and place 'For every actionable PR:' directly above the numbered steps. - skills/loopx-self-repair/SKILL.md: upgrade the Repair Loop to prefer deleting duplicate authority over patch layers, route bad rules/docs to their owning source instead of altering accurate projections, turn reusable code/projection/skill/contract bug fixes into property/parameterized/mutation tests with minimal public-safe counterexamples while allowing active task/Todo state-only repairs to resume after verified CLI readback, and break Retry & Continuation Boundaries into scannable bullets. - skills/loopx-performance-diagnosis/SKILL.md: add the 'make this 100x faster' structural elimination lens in step 6 paired with explicit equivalence invariants, boundary counterexample checks, and strict freshness/authority/soundness guardrails. - skills/loopx-pr-merge/SKILL.md: add Bounded future-facing refactoring & adversarial check under Product And Architecture Judgment, add property/mutation test verification to Validation Checklist, and require resolving and verifying PR_BASE_REF against the current PR's actual target branch with guarded uv run commands for both check_rfc_bilingual.py and canary premerge. - tests/test_packaged_skill_metadata.py: add section-scoped lens/guardrail assertions, 9 mutation-regression tests (including submission-authority and --base HEAD corruption cases), an executable temporary-repo behavioral test for the documented loopx-pr-merge RFC command against a non-main release branch, doctor required-phrase checks, and 24,000 B per-skill budget checks. Signed-off-by: song <xinxinsong66@gmail.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Signed-off-by: Codex <codex@openai.com> Signed-off-by: song <liusongstep@gmail.com>
songoow
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · GPT-6 Astra Pro · OpenAI · self_reported
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机 / Motivation
维护者在评审和准备合并时,需要知道哪些检查能验证当前 PR,也需要判断现有回归用例是否足够。此前工作流要求核对目标分支,但复制命令时,一个上次留下的非空分支变量就能让检查比较错误的提交。现在两个合并前命令都从指定 PR 读取目标及提交,与本地 HEAD 比对后才运行。本轮只验证随仓库分发的工作流、文档命令和安装回归。
改动思路 / Approach
沿用项目现成的评审和合并工具。审查技能把反例、可删的重复逻辑和性能假设写成可选问题;修复技能区分可复用的规则缺陷与已纠正的任务状态;性能诊断要求先守住结果等价和数据新鲜度,再讨论省去工作。两个合并前命令则共用同一个只读目标分支查询。
具体改动 / Changes
这次总共修改四份工作流及一个测试模块。合并指引新增的 Bash 函数从同一份 GitHub 元数据中读取 head 和 base,检查本地 HEAD,一旦不匹配就在运行双语检查之前停止。核对的基线规范是 skills/loopx-pr-merge/SKILL.md,版本 e410b01。其中 Decision Precondition 要求判断真实目标分支;Validation Checklist 要求按风险提供验证。已有测试能够发现回归时可以沿用,可复用规则优先增加属性或边界用例。审查指引保留了无待办动作、草稿和新一轮完整复审的既有分工。合并指引 · 临时 Git 仓库回归
对主干的风险 / Risks
对目标为 release、只更新英文 RFC 的 PR,预设 PR_BASE_REF=main。旧命令退出 0,新命令从 PR 取得 release 对应的 commit,报告缺少中文配对并退出 1。在同一 PR 中补上中文并让测试提供更新后的远端 head,约定的命令成功。此外,测试覆盖漏填 PR 地址及本地检出与 GitHub 所报 head 不一致时的拒绝路径。Git、Bash 和 RFC 检查器均实际运行;错误的远端分支状态由测试提供。根指令、持久化数据、合并权限和评审协议都没有新增入口。
我的整体评价 / Verdict
通过。打包技能及安装回归共 69 项通过,2 项因 Linux 主机没有原生 PowerShell 跳过,主干也跳过同两项。已核对 lint、双语差异和分发路径。这里验证的是维护者能否按指引在正确提交上执行命令;长期模型采用率需要不同的证据。
English verdict: APPROVE at 884f9f9 — the shipped workflow rejects a stale target or mismatched checkout, and correctly paired release-branch changes pass.
Goal And Delivered Outcome
skills/loopx-pr-review/SKILL.md,skills/loopx-self-repair/SKILL.md,skills/loopx-performance-diagnosis/SKILL.md,skills/loopx-pr-merge/SKILL.md) without introducing new skills or altering capability/authority boundaries.loopx-pr-reviewnull-action/Draft/fresh-audit rules,loopx-self-repairretry boundaries) and unguarded$PR_BASE_REFcommands inloopx-pr-merge.skills/loopx-pr-review/SKILL.md: Added## Adversarial Invariant & Deletion Passas optional sharpening lenses insidereview_execution_contract(falsify_claims, reuse/simplification, validation) without adding required packet fields, verdict states, or merge/submission authority; split the long single-line null-action/Draft/fresh-audit wall into scannable bullets and placedFor every actionable PR:directly above its numbered steps.skills/loopx-self-repair/SKILL.md: Upgraded## Repair Loopto prefer deleting duplicate authority over patch layers, route rule/doc bugs to their owning source instead of altering accurate projections, encode reusable code/projection/skill/contract bug fixes into property/parameterized/mutation tests with minimal public-safe counterexamples while letting active task/Todo state-only repairs resume after verified CLI readback, and structured### Retry & Continuation Boundariesinto scannable bullets.skills/loopx-performance-diagnosis/SKILL.md: Added the"make this 100x faster"structural elimination lens in step 6 paired with explicit equivalence invariants, boundary counterexample checks, and strict freshness/authority/soundness guardrails.skills/loopx-pr-merge/SKILL.md: AddedBounded future-facing refactoring & adversarial checkunder## Product And Architecture Judgment, added property/mutation test verification to## Validation Checklist, and required resolving and verifyingPR_BASE_REFagainst the current PR's actual target branch with guardeduv runcommands for bothscripts/check_rfc_bilingual.pyandloopx canary premerge.tests/test_packaged_skill_metadata.py(37/37 passing in 0.51s, including 9 mutation checks, an executable non-mainrelease-branch Git test for the documentedloopx-pr-mergeRFC command,loopx.doctorrequired-phrase checks, and 24,000 B per-skill budgets).main(e410b012e67a2fa75ff0056b16ab1362b931764d); independent of docs(agents): streamline AGENTS.md into 3-layer routing and add delivery invariants #10274 (zero overlapping files).Follow-up verification at
884f9f9a8The two base-dependent commands now read the PR head and target OIDs together, verify the checked-out head, and pass the immutable target to the existing checker. A retained nonempty main ref no longer hides an English-only change against release. The packaged-skill and installation suites report 69 passed and two native PowerShell skips on Linux.
Author Declaration
codex reviewpass.Implemented against
skills/loopx-pr-review/SKILL.md,skills/loopx-self-repair/SKILL.md,skills/loopx-performance-diagnosis/SKILL.md,skills/loopx-pr-merge/SKILL.md),loopx/doctor.py(REQUIRED_INSTALLED_SKILL_PHRASES), andAGENTS.mdate410b012e67a2fa75ff0056b16ab1362b931764d.skills/loopx-pr-review/SKILL.md,skills/loopx-self-repair/SKILL.md,skills/loopx-performance-diagnosis/SKILL.md,skills/loopx-pr-merge/SKILL.mdpytest -v tests/test_packaged_skill_metadata.pyloopx-pr-reviewthin-adapter ownership (review_execution_contract,completion_gate, no extra mandatory gates/verdict states, no escaping local links, no pinnedpolicy_revision)skills/loopx-pr-review/SKILL.mdtest_workflow_skill_local_links_remain_inside_the_distributed_skill,test_pr_review_skill_tracks_the_capability_policy_revision,test_adversarial_engineering_lenses_and_guardrails_in_workflow_skillsloopx-self-repairrule-vs-projection layer routing and state-only CLI readback resumption intactskills/loopx-self-repair/SKILL.mdtest_adversarial_engineering_lenses_and_guardrails_in_workflow_skills,test_repair_pattern_lookup.pyPR_BASE_REFcommands inloopx-pr-mergeskills/loopx-pr-merge/SKILL.mdtest_pr_merge_documented_rfc_command_executes_against_non_main_targetREQUIRED_INSTALLED_SKILL_PHRASESand 24,000 B per-skill cap across all packaged skillsskills/loopx-*/SKILL.md,tests/test_packaged_skill_metadata.pytest_required_installed_skill_phrases_and_size_budgets_hold24da9744d75b319827624c44e26afad8dcaefc37cleanly rebased ontoorigin/main(e410b012e67a2fa75ff0056b16ab1362b931764d). Ranruff check,pytest -v tests/test_packaged_skill_metadata.py(37/37), 5 related skill/contract suites (102 passed, 2 skipped),scripts/check_rfc_bilingual.py,loopx checkboundary scan, andgit diff --check. Ran an independent localcodex reviewpass and addressed all 1 P1 and 4 P2 findings before pushing.Scope And Continuation
SKILL.mdfiles andtests/test_packaged_skill_metadata.py(zero runtime code changes, zero overlap with docs(agents): streamline AGENTS.md into 3-layer routing and add delivery invariants #10274).loopx-pr-reviewandloopx-self-repairinto scannable bullets, placedFor every actionable PR:directly above its numbered list, added explicitPR_BASE_REFtarget-verification guards toloopx-pr-merge, and backed the skill guardrails with mutation and real-git behavioral tests.Validation
24da9744d75b319827624c44e26afad8dcaefc37(the 5 additional regression suites were also run on the pre-rebase content-identical commit).finishedsynthetic,public_fixturestaticpassedruff check tests/test_packaged_skill_metadata.py— 0 issues on24da9744d75b319827624c44e26afad8dcaefc37.unitpassedpython -m pytest -v tests/test_packaged_skill_metadata.py— 37 passed in 0.51s on24da9744d75b319827624c44e26afad8dcaefc37(frontmatter, display names, wheel packaging, link containment, 4-skill lens/guardrail checks, 9 mutation checks, executable temporary-Gitrelease-branch RFC command test, doctor required phrases, and 24,000 B budgets).regression_paritypassedpython -m pytest -q tests/test_workflow_skill_install.py tests/test_repair_pattern_lookup.py tests/capabilities/test_pr_review_contract.py tests/test_repository_instruction_delivery.py tests/test_project_skill_cli.py— 102 passed, 2 skipped.staticpassedpython scripts/check_rfc_bilingual.py --base origin/main --head HEAD,git diff --check origin/main...HEAD, andloopx check --scan-path skills/loopx-pr-review/SKILL.md --scan-path skills/loopx-self-repair/SKILL.md --scan-path skills/loopx-performance-diagnosis/SKILL.md --scan-path skills/loopx-pr-merge/SKILL.md --scan-path tests/test_packaged_skill_metadata.py— public boundary scan clean (5 files, errors=0).test_pr_merge_documented_rfc_command_executes_against_non_main_targetskips gracefully only ifbashis unavailable on the host.Frontend / Visual Evidence
nonenoneType of Change
LoopX Area
Technical Direction
skills/loopx-pr-review,skills/loopx-self-repair,skills/loopx-performance-diagnosis, andskills/loopx-pr-merge.Shared-authority RFC fixture impact
N/A
Boundary Checklist
.loopx/,.codex/goals/, and liveACTIVE_GOAL_STATE.md).python3 scripts/check_rfc_bilingual.py --base origin/main --head HEADpasses, or no paired RFC changed.none.Signed-off-bytrailer (git commit -s).