Repository navigation
docs(agents): keep only what is necessary — metadata-application principle first, rules not narratives, no inventories; add CLAUDE.md pointer; correct the two *.workflow.ts briefs - #1830
Conversation
Rewrite AGENTS.md top-down from the necessity test: the metadata-application
principle and the four Scope rules open the file; every kept rule is one to
three lines with its failure mode; measurement transcripts, superseded-claim
histories, origin anecdotes and precedent rosters leave; hand-copied
inventories (the 12-suffix File Suffix Protocol, rule 5's own drift tally, the
chart-type list) are replaced by the neighbour-file rule and pointers at
src/{type}/. Rule 6 now states its real width (list view names take the pack
wording; other pack-carried nouns keep English, the tile guard's ablation is
the discriminator). Platform Upgrades gains step 5 (re-scope, never renumber;
version-agnostic, cross-line, identifiers and labels; hits are candidates;
honest about what a grep cannot see). 651 lines -> 248.
CLAUDE.md is a pointer to AGENTS.md and nothing else, modelled on
.github/copilot-instructions.md.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MoTv7pn338AZ71owsp19gQ
…surviving sites .github/instructions/automation.md section 1 and .github/tasks/autonomous_feature_dev.md step 4 taught a workflow metadata type no installed @objectstack/* package defines (WorkflowRuleSchema: 0 files under node_modules/@objectstack; control FlowSchema: 34). Both now route the reader to the three real destinations AGENTS.md names, mirroring its wording, and the automation example that also dropped the crm_ prefix is gone. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MoTv7pn338AZ71owsp19gQ
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
维护者速读 — hotcrm PR #1830(#1823 折叠 #1745 #1620 #1618 #1818 #1681,skills 席终稿,2026-09-09T14:30Z)改了什么 — 为什么改 — 你的直接指示:agents.md 太乱,只留必要的;claude.md 直接让读 agents.md,不维护两套;并同时把 hotcrm 的指令面任务合并派发。651 行里叙事与手抄清单淹没规则,而清单已被本仓自己的卡证明会双向漂移。 风险与代价(含回滚) — 删掉的叙事里若有对某个读者负担性的句子:dev 实测读 席位意见 — 接受。本席在分支头通读了新 248 行:第一原则开篇、七条裁决逐条成立、无手抄清单、目录树因 你要做的 — 读一遍新 Generated by Claude Code |
`CLAUDE.md` landed at the repo root in PR #1830 and outside `ROOT_TEXT_FILES`, the whitelist the source hygiene gate reads the root through. Measured on `62e23f5`: a raw 0x01 planted in `CLAUDE.md` leaves `pnpm hygiene` at exit 0 with "no raw control bytes in first-party files"; with the entry added the same tree exits 1 and names `CLAUDE.md` by path. One entry, alphabetically between `CHANGELOG.md` and `CONTRIBUTING.md`. No test edit: #1314 made the three sandbox suites import this list, so the fixtures, the banner assertion (`ROOT_TEXT_FILES.length`) and the per-file `it.each` all follow it (53 tests to 54). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DuzfS5chho38Yx1jxx9DEj
Fixes #1823
Fixes #1745
Fixes #1620
Fixes #1618
Fixes #1818
Fixes #1681
Maintainer direct instruction to the skills seat, 2026-09-09, verbatim and untranslated:
One fold of six cards, landing as one rewrite of
AGENTS.md, one new rootCLAUDE.md, and #1818's two brief sites (its own commit,0f446c1). Governed surface (AGENTS.md,CLAUDE.md,.github/instructions/**;.github/tasks/**treated as governed) — this PR stays a draft for the maintainer's own merge;skip-changesetapplied (nothing shipped to users moves: the repo isprivate: truewith nofiles[]).Line budget (measured at
0f446c1):AGENTS.md651 → 248 lines (a 61% cut; budget ≤ 250).CLAUDE.md6 lines..github/instructions/automation.md64 → 46 lines;.github/tasks/autonomous_feature_dev.mdunchanged at 23 lines, one line rewritten.维护者速读(草稿)
改了什么
AGENTS.md从 651 行重写为 248 行:开篇即「HotCRM 是元数据应用,平台功能在 objectstack 开发」(两段裁决原文保留)加原有 🚫 Scope 四条;其后每条规则只留一到三行「规则 + 失败形态」。度量记录、「本文件曾说……」类的历史、来源轶事、「Supersedes …」尾注和先例名册全部移出(卡片与 ADR 是档案,每条规则最多保留一个引用)。AGENTS.mdFile Suffix Protocol is an inventory that drifted both ways: 4 of its 12 declared suffixes have zero instances insrc/, and 8 suffixes the app really authors are absent from it #1745)改为「照邻居文件写、三种编写形态」并指向src/{type}/;规则 5 自己的漂移计数与名册(AGENTS.md:348counts the drift its own rule forbids as "four times", and the ledger at:353has not been incremented since #1620)、图表类型清单、crm_名册历史都不再出现。AGENTS.md→ Platform Upgrades has no step for re-scoping the claims that name the old pin — which is why #1460, #1467 and #1676 are the same card three times #1681,两行):只改范围不改版本号、版本无关且跨行搜索、命中是候选需人工分类、诚实说明 grep 抓不到什么、标识符与人类可读标签同时搜。.github/instructions/automation.md§1 与.github/tasks/autonomous_feature_dev.md第 17 行不再教*.workflow.ts(.github/instructions/automation.md§1 and.github/tasks/autonomous_feature_dev.md:17still teach a*.workflow.tsmetadata type no installed package defines — #852's class, two surviving sites #1818),措辞照抄AGENTS.md的「没有 workflow 元数据类型」段;automation 的示例(object: 'lead'漏crm_前缀)一并删除。这两个文件只动这两处。CLAUDE.md:只指向AGENTS.md,不复述任何规则(按.github/copilot-instructions.md的指针模型;[program] CLAUDE.md is a pointer to AGENTS.md in every repo — no second instruction set to maintain (maintainer 2026-09-09) objectstack#17161 项目锚)。被移除的每一节的去向:
packages/说明)test/docs-src-tree-paths.test.ts解析它)crm_长段)where/filter度量叙事、「Superseded」段、「Measured … (17.2.0)」、flow/page 的 filter 形态)*.agent.ts)bogusUnknownKey度量记录、barrel、parse()、「无实例」名册、workflow 说明)bogusUnknownKey记录与「无实例」名册:叙事/清单,删除has()表保留;日志记录删除为什么改
维护者 2026-09-09 直接指示:agents.md 太乱,只留必要的;claude.md 直接让读 agents.md,不维护两套。651 行的指令文件里,度量记录和历史叙事让真正的规则难以被 AI 读到;手抄清单已被本仓自己的卡片证明会双向漂移(#1745:12 个后缀 4 个零实例、8 个真实后缀未列)。
风险与代价(含回滚)
AGENTS.md的三个测试(zh-Hant 理由、目录树、角色层级词表)与docs/MAINTENANCE.md、CONTRIBUTING.md、docs/architecture/module-split-plan.md引用的节名全部保留并复跑绿。CLAUDE.md不再有任何摘要,只读CLAUDE.md的会话在读到指针之前没有规则(本仓无 hooks 作底,这是 objectstack#17161 已记录的已知成本)。git revert两个提交即可,无数据、无元数据、无发布物变动。席位意见
(留空,席位定稿成评论。)
你要做的
AGENTS.md(248 行),确认「只留下必要的」的取舍符合你的意图,尤其是上表中标「删除」的项。skip-changeset对本 PR 成立(此前同类AGENTS.mdPR 用的是空 frontmatter changeset,两者门禁等价)。Per-member acceptance
AGENTS.mdrewritten top-down from the necessity test: 651 → 248 lines; first principle first with both rulings verbatim; rules not narratives; no hand-copied inventories; newCLAUDE.mdpointer. Every kept line is addressed to the agent reading the file.AGENTS.mdFile Suffix Protocol is an inventory that drifted both ways: 4 of its 12 declared suffixes have zero instances insrc/, and 8 suffixes the app really authors are absent from it #1745 — the 12-suffix File Suffix Protocol leaves the file (4 declared suffixes had zero instances, 8 authored ones were absent); the trimmed file states the neighbour-file rule and the three authoring forms and points atsrc/{type}/. No suffix roster is restated anywhere in the new file.AGENTS.md:348counts the drift its own rule forbids as "four times", and the ledger at:353has not been incremented since #1620 — premise re-checked onorigin/main965933b: PR docs: stop teaching the retiredreference_tokey and an object shape the repo never uses #1809 moved the bullet; the "drifting four times" sentence and the ledger stood atAGENTS.md:412–418, not:348/:353. Executed per this fold's ruling (rule 5's own drift count and precedent ledger leave; the rule keeps one ref,#1620): the sentence now says "measured it drifting repeatedly". Deviation noted for the maintainer: therepo:hotcrmseat's grading onAGENTS.md:348counts the drift its own rule forbids as "four times", and the ledger at:353has not been incremented since #1620 (5555833480) had ruled the roster be kept and extended; the later maintainer instruction 「只留下必要的」 and this fold's ruling 3 supersede it, and the cards remain the archive.test/docs-dashboard-tiles.test.tsis named as the tile guard; measures are named as the same class, currently unguarded — no guard built (Scope rule 3, epic Epic: bring this repo's test farm back under the 2026-08-31 ruling — platform-first,os lint --strictfirst, then retire the local re-implementations by family #1579 step 6)..github/instructions/automation.md§1 and.github/tasks/autonomous_feature_dev.md:17still teach a*.workflow.tsmetadata type no installed package defines — #852's class, two surviving sites #1818 — both sites corrected in their own commit0f446c1, mirroring theAGENTS.mdwording; theobject: 'lead'example is gone with the section. Re-measured before editing:WorkflowRuleSchemafiles undernode_modules/@objectstack/= 0 (controlFlowSchemaunderspec/dist= 34);*.workflow.tsundersrc/= 0 (control*.flow.ts= 23). Nothing else in either file moved; §2 and §3 ofautomation.mduntouched.AGENTS.md→ Platform Upgrades has no step for re-scoping the claims that name the old pin — which is why #1460, #1467 and #1676 are the same card three times #1681 — step 5 added in the shape its thread settled (5558732623 / 5558770183 / 5558918648), in two lines: re-scope never renumber; version-agnostic and cross-line; identifiers and labels; hits are candidates classified by hand with [finding] The 17.3.0 upgrade left 19 comments asserting 17.2.0 is "the pinned" version — third recurrence of #1460 / #1467, and #1669 names only 1 of the 13 files #1676's criterion; honest about what a grep cannot see. No literal version and no grep is written into the step. ItsRestart-whennamed theAGENTS.md§🔒 Schema Validation Requirements: all seven items prescribe anXSchema.parse()call the repo makes nowhere — item 1 names the wrong method, and the section's premise sentence is false as written #1573 / AGENTS.md rule 6 says "UI nouns take the zh-CN pack wording", but a pack-carried noun that is not a list view must stay English — and only an ablation reveals it #1618 /AGENTS.md:348counts the drift its own rule forbids as "four times", and the ledger at:353has not been incremented since #1620 chain: AGENTS.md rule 6 says "UI nouns take the zh-CN pack wording", but a pack-carried noun that is not a list view must stay English — and only an ablation reveals it #1618 andAGENTS.md:348counts the drift its own rule forbids as "four times", and the ledger at:353has not been incremented since #1620 clear inside this fold. Its absorbed half (b) — theTech Stackitem-2 sentence "Measured per method against the pinned@objectstackpackages (17.2.0)",AGENTS.mdstill says the pinned@objectstackpackages are 17.2.0 — the same claim #1676 re-scoped everywhere else, in the file agents read first #1688, already closed 2026-09-06 — is resolved by removal: the where-rule is now version-free and points attest/hook-query-predicate.test.tsinstead of carrying a pin claim.Acceptance notes
Gates run locally (all at
0f446c1, docs-only diff):pnpm hygiene— exit 0,✓ source hygiene clean(its byte scan readsAGENTS.mdviaROOT_TEXT_FILES).pnpm validate— exit 0,✓ Validation passed,Data: 18 Objects 331 Fields,Runtime: 0 plugins(unchanged; nothing undersrc/moves).vitestunder the shared verify lock — the five suites that readAGENTS.md(docs-zh-hant-justification,docs-src-tree-paths,docs-role-hierarchy,docs-declared-versions,docs-object-coverage):Test Files 5 passed (5),Tests 80 passed (80),VERDICT command-exit 0. One red on the first run — my own wording "subordinate to this one" tripped the role-hierarchy vocabulary guard — fixed before commit.pnpm verifyin full was not run (typecheck / lint / build / the whole test suite readsrc/andtest/, which this diff does not touch; the three suites that parseAGENTS.mdplus two that cite it ran).link-check— NOT MEASURED locally:markdown-link-checkis not installed in this container and the workflow's action is not runnable here; CI runs it on this PR (the diff carries.md). The only links in the new files are relative (./AGENTS.md,docs/README.md,docs/archive/) and the release-notes URL kept from the old file.External readers of section names, kept:
docs/MAINTENANCE.mdcites "§⬆️ Platform Upgrades step 4" (step 4 is still the changeset step) and "Verifying UI in the browser";CONTRIBUTING.mdcites "§How a green PR lands";docs/architecture/module-split-plan.mdcites "A platform defect means you WAIT for the platform fix", "Do not build platform-level tooling", "Documentation discipline item 5", "Project Architecture", "Platform Upgrades";src/**comments cite "house rule 9", "metadata rule 8", "scope rule 3", "Validation predicates must be TOTAL", "Constraint Checklist → Dependencies" — all headings and rule numbers unchanged.test/docs-zh-hant-justification.test.tsparses the zh-Hant bullet by its opening text — kept byte-identical;test/docs-src-tree-paths.test.tsrequires the file to draw asrc/tree — kept, every drawn directory exists.Overlap of the other
.github/instructions/*.mdwithAGENTS.md(reported, not edited — outside this fold's surface):architect.md— consistent withAGENTS.md(flatsrc/{kind}/, no workspace layout; .github/instructions/architect.md prescribes apackages/layout hotcrm does not have — in its standing rules and its mandatory Output Format, not only in its worked example #1518). Its planned file names drop thecrm_prefix only in the object name column that it does not show; no contradiction.metadata.md— §1/§2 agree withAGENTS.md(explicitcrm_, named export,ObjectSchema.create). §3 teachesvalidation: [{ formula: … }]; measured at0f446c1on the installed spec:ObjectSchema.createrejects it —unknown key(s) — validation— while the realvalidations[]form (control) is accepted; zero objects undersrc/spell it that way. Same class as.github/instructions/metadata.mdteachesreference_to:(an unrecognized key — the spec prescribesreference) and anObjectSchemaimport/export shape the repo never uses #1686 (thereference_tokey this file taught). Filed, see below.security.md— teaches.role.ts,.permission.tsand.rls.tsfiles (0 instances each undersrc/;AGENTS.mdnames*.permission.tsas authored nowhere) with an unprefixedobject: 'account'; only §4.sharing.tsis a real type. Same class as.github/instructions/automation.md§1 and.github/tasks/autonomous_feature_dev.md:17still teach a*.workflow.tsmetadata type no installed package defines — #852's class, two surviving sites #1818. Filed, see below.ui.md— teachesexport defaultview/action/dashboard literals with unprefixedobject: 'account'/'opportunity', whereAGENTS.mdsays views aredefineView()named exports registered through the barrel;.report.tsin §4 is real (5 files). Same class; included in the filed card.automation.md§3 — teaches.trigger.ts(0 instances undersrc/;TriggerSchemadoes exist in@objectstack/spec). Outside.github/instructions/automation.md§1 and.github/tasks/autonomous_feature_dev.md:17still teach a*.workflow.tsmetadata type no installed package defines — #852's class, two surviving sites #1818's ruling; included in the filed card as a question rather than a defect.logic.md— not re-measured here (10 KB; .github/instructions/logic.md points its action example at packages/crm/src/ — a layout hotcrm does not have, and no gate covers that directory #1233 already gates its paths).Findings filed / noted: filed as #1832 — the remaining briefs (
security.md,metadata.md§3,ui.md,automation.md§3) teaching forms the app authors nowhere or the spec rejects, same class as #1818; filed as #1833 (Blocked-by: #1830) —CLAUDE.mdis a new root text file outsidescripts/lib/source-hygiene-surface.mjsROOT_TEXT_FILES, so the hygiene byte scan does not read it — that list's own comment says a new first-class root file must be added there; not done in this PR because it is a gate-surface edit outside the declared file surface. Noted, not filed (承接者: whoever takes #1819):src/objects/index.ts's header comment still mentions*.state.tsstate machines "auto-associated by naming convention" — 0 such files exist.Changeset:
skip-changesetlabel (ruling C). Precedent: PR #1820 / #1798 used an empty-frontmatter changeset for the same "AGENTS.md only" case; the workflow treats the two as equivalent.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01MoTv7pn338AZ71owsp19gQ
Generated by Claude Code