| 1 | export const CONSTITUTION_LAYERS = [ |
| 2 | { |
| 3 | n: "01", |
| 4 | name: { en: "Bundled Constitution", zh: "内置宪章" }, |
| 5 | path: { en: "compiled into every binary", zh: "编译进每一个二进制" }, |
| 6 | body: { |
| 7 | en: "The base rules. Its priority article fixes the authority order for any conflict, so a stale handoff can never outrank a fresh test result by accident.", |
| 8 | zh: "基础规则。其中的位阶条款为一切冲突固定裁决顺序——过期的交接不会稀里糊涂地压过刚跑出的测试结果。", |
| 9 | }, |
| 10 | }, |
| 11 | { |
| 12 | n: "02", |
| 13 | name: { en: "/constitution — your standing rules", zh: "/constitution——你的常备规则" }, |
| 14 | path: { en: "$CODEWHALE_HOME/constitution.json", zh: "$CODEWHALE_HOME/constitution.json" }, |
| 15 | body: { |
| 16 | en: "Structured data, not a raw prompt editor: guided setup renders it into a model-facing prose block. Drafted with your model's help, ratified by you, and carried across every project.", |
| 17 | zh: "结构化数据,不是裸的提示词编辑器:引导式设置把它渲染成面向模型的 prose 区块。可由模型协助起草,经你批准生效,跨项目随身携带。", |
| 18 | }, |
| 19 | }, |
| 20 | { |
| 21 | n: "03", |
| 22 | name: { en: "Your repo's rules", zh: "仓库自己的规则" }, |
| 23 | path: { en: ".codewhale/constitution.json", zh: ".codewhale/constitution.json" }, |
| 24 | body: { |
| 25 | en: "Protected invariants, branch policy, verification requirements, escalation conditions — loaded as a repo-local authority block above project instructions, memory, and handoffs.", |
| 26 | zh: "受保护的不变量、分支策略、验证要求、升级条件——作为仓库本地的权威区块加载,位阶高于项目说明、记忆与交接。", |
| 27 | }, |
| 28 | }, |
| 29 | ]; |
| 30 | |
| 31 | export type Scene = { |
| 32 | /** Short tab label for players that show one scene at a time. */ |
| 33 | tab: { en: string; zh: string }; |
| 34 | context: { en: string; zh: string }; |
| 35 | trace: string; |
| 36 | cites: string[]; |
| 37 | decision: { en: string; zh: string }; |
| 38 | }; |
| 39 | |
| 40 | export const CONSTITUTION_SCENES: Scene[] = [ |
| 41 | { |
| 42 | tab: { en: "Stale handoff", zh: "过期交接" }, |
| 43 | context: { |
| 44 | en: "When the prior session's summary didn't match the repo…", |
| 45 | zh: "当上一会话的总结与仓库真实状态不符时……", |
| 46 | }, |
| 47 | trace: |
| 48 | "Per Article II (truth) and V (verification), I report what's actually in the tree, not what the previous agent claimed.", |
| 49 | cites: ["Article II · Truth", "Article V · Verification"], |
| 50 | decision: { |
| 51 | en: "Reported the uncommitted work the summary left out, instead of repeating the claim.", |
| 52 | zh: "如实报告了总结遗漏的未提交改动,而不是照搬旧说法。", |
| 53 | }, |
| 54 | }, |
| 55 | { |
| 56 | tab: { en: "Conflicting orders", zh: "指令冲突" }, |
| 57 | context: { |
| 58 | en: "When a “pause” signal conflicted with the user's request to continue…", |
| 59 | zh: "当「暂停」信号与用户要求继续相冲突时……", |
| 60 | }, |
| 61 | trace: |
| 62 | "The user's current request outranks the runtime statute, so I keep executing the task, not stopping on a technicality.", |
| 63 | cites: ["Article III · User agency", "Article VII · Hierarchy"], |
| 64 | decision: { |
| 65 | en: "Finished the work the user actually asked for.", |
| 66 | zh: "完成了用户真正要求的工作。", |
| 67 | }, |
| 68 | }, |
| 69 | { |
| 70 | tab: { en: "Community credit", zh: "社区署名" }, |
| 71 | context: { |
| 72 | en: "When trimming the README, tempted to drop the contributor wall…", |
| 73 | zh: "精简 README 时,本可删掉贡献者名单……", |
| 74 | }, |
| 75 | trace: |
| 76 | "Deleting community credit would break the project's own ethos. Relocate it instead. No names lost.", |
| 77 | cites: ["Community ethos"], |
| 78 | decision: { |
| 79 | en: "Moved 200 lines of credits to docs/CONTRIBUTORS.md and linked from the README.", |
| 80 | zh: "把 200 行贡献记录迁到 docs/CONTRIBUTORS.md,并在 README 中给出链接。", |
| 81 | }, |
| 82 | }, |
| 83 | ]; |
| 84 |