Skip to content

docs(agents): retire the six role briefs under .github/instructions/ - #1977

Merged
os-zhuang merged 2 commits into
mainfrom
claude/issue-1832-retire-role-briefs
Oct 3, 2026
Merged

os-zhuang merged 2 commits into
mainfrom
claude/issue-1832-retire-role-briefs

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #1832

Ruling: batch #142 item 4, option B (maintainer 「同意」, comment 5696850948), plus the .github/tasks/* scope addition in comment 5825877235.

维护者速读(草稿)

  • 删了什么:.github/instructions/ 下六份角色简报(architect / automation / logic / metadata / security / ui)全部删除,AGENTS.md 成为唯一的一套指令。
  • 并入了什么:逐份对照 AGENTS.md 后,只有 logic.md 里有 AGENTS.md 缺的必要内容,已并入「Tech Stack」第 3 条:沙箱只执行函数体、不能引用模块作用域;action 只能在声明的 capabilities 下访问数据;系统/种子写入时没有 ctx.user;方法契约以 _hook-api.ts 类型为准。已测实的陷阱(*.role.ts / *.permission.ts / *.rls.ts、单数 validation:、default-export 视图、不带 crm_ 的 object:)没有并回。
  • 顺带改的:治理路径清单去掉 .github/instructions/**;.github/tasks/* 与 .github/AGENT_GUIDE.md 里指向简报的 5 处引用改指 AGENTS.md;两个测试里只守简报路径的钉子同步移除。
  • 风险与回滚:不涉及 src/、配置或发布产物;回滚即 revert 本 PR。
  • 席位意见:
  • 你要做的:本 PR 动了受治理路径(AGENTS.md 与 .github/instructions/**),保持 draft,合并由维护者本人点击。

The reading (first commit, ffb4036)

Each brief was diffed against AGENTS.md on origin/main (a228df1, post-#1910 src/ package layout).

brief necessary content AGENTS.md lacked disposition
architect.md none: the two layout rules are AGENTS.md §Project Architecture rules 1-3; the plan table is a prompt template dropped
automation.md none: §1 is AGENTS.md §Schema Validation's no-workflow note; §2's flow example is export default (not the Automation.Flow typed literal); §3 *.trigger.ts is the ruling's unanswered question dropped
metadata.md none: naming, prefix, ObjectSchema.create, barrel registration and field types are in AGENTS.md; §3 is the validation: trap dropped
security.md none: §1-§3 are the measured traps; §4's sharing example is unprefixed dropped
ui.md none: default-export literals with unprefixed object: dropped
logic.md yes, folded (below) folded

Folded into AGENTS.md §Tech Stack rule 3 (two new sub-bullets, each re-measured against src/ before writing):

  1. The ctx.api method contract is the src/sales/objects/_hook-api.ts types: count takes where only (HookCountQuery), reads cap with top (HookQuery), update is (doc carrying its id, { where }) (HookUpdateDoc / HookUpdateOptions).
  2. Hook handlers and script action bodies run body-only in a QuickJS sandbox with no module scope (test/action-sandbox.test.ts lowers every registered hook via allHooks); action bodies reach data only under declared capabilities (src/*/actions declare api.read / api.write); ctx.user is absent on system and seed writes (relied on in opportunity_line_item.hook.ts, quote.hook.ts, account.hook.ts, contact.hook.ts).

The path test/docs-src-tree-paths.test.ts pinned in logic.md was src/sales/objects/_hook-api.ts; AGENTS.md already names it and is already enrolled in that file's TREE_DOCS, so the pin's subject survives.

Not folded, deliberately: the measured traps listed in the ruling; logic.md's operator table (a platform vocabulary, and rejected spellings answer loudly with 400); its hook-event list (the schema enum rejects other spellings); and its claim that a hook needs "no barrel entry", which is itself stale: src/*/objects/hooks.ts are the four registration barrels AGENTS.md already names.

Deleted

.github/instructions/architect.md, automation.md, logic.md, metadata.md, security.md, ui.md (616 lines).

Re-pointed references (full grep for .github/instructions, instructions/ and the brief file names, excluding CHANGELOG.md)

  • .github/tasks/autonomous_feature_dev.md:5: /load .github/instructions/architect.md to /load AGENTS.md
  • .github/tasks/autonomous_feature_dev.md:14: the "Feature-to-File Mapping Strategy in architect.md" to the layout rules in AGENTS.md §Project Architecture (the file table it asks for is kept)
  • .github/tasks/new-feature.md:21: .github/instructions/metadata.md to AGENTS.md
  • .github/AGENT_GUIDE.md:5: the instructions/ handbook entry to /AGENTS.md, the one instruction set
  • .github/AGENT_GUIDE.md:14: review against instructions/ to review against /AGENTS.md
  • AGENTS.md governed-paths list: .github/instructions/** dropped

CLAUDE.md and .github/copilot-instructions.md name no brief and are unchanged. CHANGELOG.md has one historical mention, left as release history.

Test edits (pins on the retired paths only)

No skip, no quarantine, no new gate, test or lint rule.

Verification

pnpm install --frozen-lockfile --prefer-offline then pnpm verify at 54c5bad: os-verify-lock: VERDICT command-exit 0. validate ✓ Validation passed; typecheck; lint (exit 0, pre-existing flow expression warnings only); lint:i18n-gate 0 i18n/missing-* issues; hygiene ✓ source hygiene clean; hygiene:tokens; build; test Test Files 173 passed (173), Tests 3721 passed | 1 skipped (3722).

Changeset: .changeset/retire-role-briefs.md, empty frontmatter (agent instructions only, nothing ships).

Acceptance notes

  • .github/AGENT_GUIDE.md was outside the claim's listed file surface but inside the dispatch's "any other file that references .github/instructions, re-pointed only" clause.

Generated by Claude Code

claude added 2 commits October 1, 2026 02:20
…s into AGENTS.md

First commit of #1832 is a reading, not a deletion. Each of the six
.github/instructions/ briefs was diffed against AGENTS.md; the only
necessary content AGENTS.md lacked came from logic.md:

- the ctx.api method contract lives in the _hook-api.ts types (count
  takes where only, reads cap with top, update is (doc with id, {where}));
- hook handlers and script action bodies run body-only in a QuickJS
  sandbox with no module scope, gated by declared capabilities;
- ctx.user is absent on system and seed writes.

The measured traps (role/permission/rls files, validation: singular,
default-export views, unprefixed object: names) are not folded back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X8U3asekbiC7yWoEPWR4Dg
AGENTS.md is the one instruction set. Delete architect, automation,
logic, metadata, security and ui briefs; drop .github/instructions/**
from the governed-paths list; retire the docs-src-tree-paths block that
guarded only those files (AGENTS.md stays enrolled in TREE_DOCS); and
re-point the .github/tasks prompts and AGENT_GUIDE.md at AGENTS.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X8U3asekbiC7yWoEPWR4Dg
@vercel

vercel Bot commented Oct 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
hotcrm Ignored Ignored Oct 1, 2026 2:26am UTC

Request Review

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

维护者速读(终稿)

repo:hotcrm 席位,session_01ER8ntXZhYebyQ66aXWdjfT,2026-10-02T21:46Z。草稿出自 dev(见 PR 正文),本稿由席位对照自己读过的 diff 校正。复核记录:#1832 5961968471。

改了什么

  • 删除 .github/instructions/ 下的六份角色简报(616 行)。AGENTS.md 从此是唯一的一套 agent 指令。
  • 六份简报里,只有 logic.md 带着 AGENTS.md 缺的必要内容,已先并入 AGENTS.md 第 3 条:
    • hook / 动作体在 QuickJS 沙箱里只执行函数体,不能引用模块作用域;
    • 动作只能在声明的 capabilities 下读写数据;
    • 系统写、种子写时没有 ctx.user;
    • 方法签名以 _hook-api.ts 的类型为准。
      席位已在当前 main 上逐条核实。
  • AGENTS.md 的受治理路径清单去掉 .github/instructions/**。
  • .github/tasks/* 与 .github/AGENT_GUIDE.md 里指向简报的 5 处引用,改指 AGENTS.md。
  • 两个测试里只守简报路径的那段同步删除。守 AGENTS.md 的规则未动。

为什么改
你 9 月 16 日裁的 B(批 #142 第 4 项「同意」):「没必要维护两套」。三份简报在教 app 里根本不存在的写法:*.role.ts / *.rls.ts、单数 validation:、default-export 视图。修三处只会漂到第四处,所以删掉产生它们的机制。

风险与代价(含回滚)

  • 不碰 src/、配置或任何发布产物,changeset 为空(零发布)。
  • 原 dev 会话已失联,PR 搁了约 42 小时没人复核,本席已接管并复核。
  • 这期间 main 升到了 17.6.0,但没碰本 PR 的任何文件,合并无冲突。
  • CI 9/9 绿。
  • 回滚:revert 本 PR 即可。

席位意见
ACCEPT,建议合并。改动与裁决逐项一致,无越界;唯一的范围外文件 .github/AGENT_GUIDE.md 已在 PR 里申报,属裁决允许的改指引用。

你要做的
点 Approve(或直接合并)。批准后由本席转 ready 并入队;本席不会自己批准或合并。


Generated by Claude Code

@os-zhuang
os-zhuang marked this pull request as ready for review October 3, 2026 03:04
@os-zhuang
os-zhuang added this pull request to the merge queue Oct 3, 2026
Merged via the queue into main with commit a9bb57b Oct 3, 2026
11 checks passed
@objectstack-fleet objectstack-fleet Bot removed the needs-user-decision Needs the maintainer's call before work proceeds label Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd CI plumbing and the verification pipeline documentation Improvements or additions to documentation

Projects

None yet

3 participants