forked from bai/curriculum-project-hub
3f9b60f692
The spec/ Lean semantic master had no conformance gate, no codegen, and no CI tie to implementations — alignment was carried entirely by human review, the same mechanism that carries the ADRs. In practice the ADRs plus greppable code comments were already the load-bearing artifacts, so spec/ was the most expensive kind of stale documentation. - delete spec/ and the spec-check CI workflow - README: constitution rewritten around ADRs as decision truth - AGENTS.md/CLAUDE.md: discipline re-anchored (new decisions -> new ADR, never rewrite ADR history; supersede instead) - code comments: re-anchor 'Mirrors Spec.X' invariants to ADR numbers (cph-diag, cph-check, cph-model, hub runner/capacity/org, prisma) - leave ADR bodies and .scratch audit snapshots untouched (history); fix live references in open readiness tickets
1.7 KiB
1.7 KiB
CLAUDE.md —— agent 操作手册(全 repo)
本 repo 是 monorepo。先读根 README.md 的"宪法"4 条,那是一切工作的前提。本文件是给在这里干活的 coding agent 的纪律。
这个 repo 是什么
docs/adr/是系统级决策的唯一权威来源;CONTEXT.md是平台语言词汇表;代码注释把关键不变量锚到 ADR 编号,可 grep。hub/的平台层按 SaaS 形态演进:Organization是 tenant root;Project/Team必须归属 org,TEAM→PROJECT 授权不得跨 org(见 ADR-0020)。- org 后台 project explorer 里
Folder是透明组织节点,不是权限资源;project 仍是权限边界。 普通老师可在飞书群自助建 project 但受 org policy 控制(见 ADR-0021)。
纪律
-
不得用预训练先验脑补本领域。 这个领域很新,你没有相关先验。ADR 与
CONTEXT.md是语义的唯一权威来源;没写的,就是没定的。 -
凡 ADR 未写明者,不得假设。 遇到没覆盖的地方,显式 surface 出来让开发者决定,绝不擅自替它选一个解。
-
新语义决策进 ADR。 跨部件的语义分歧点按编号顺延新增
docs/adr/NNNN-*.md;代码里的关键不变量用注释锚到 ADR 编号,保持可 grep。已有 ADR 正文不改写历史——推翻旧决策就写新 ADR 标记 supersede。 -
实现向 ADR 对齐;偏离必须 surface。 没有 CI gate 替你把关 ADR↔实现的一致性(见宪法第 2 条)——这道对齐靠 review 和你巡逻 diff。发现实现与决策不一致时,报告它,不要默默让其中一边将就另一边。
-
写操作谨慎。 线上操作、git 写操作前与开发者确认(这是开发者的全局偏好)。