You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude/CLAUDE.md
+35-4Lines changed: 35 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,18 +70,20 @@ Both are FOSS with independent governance (no Big Tech).
70
70
71
71
### TypeScript Exemptions (Approved)
72
72
73
-
The "no new TypeScript" rule has nine approved exemptions in this repo. These paths are *not* policy violations — they are documented carve-outs because the file format or downstream consumer requires TypeScript:
73
+
The "no new TypeScript" rule has seven approved exemptions in this repo. These paths are *not* policy violations — they are documented carve-outs because the file format or downstream consumer requires TypeScript:
74
74
75
75
| Path | Files | Rationale | Unblock condition |
76
76
|---|---|---|---|
77
77
|`packages/affine-js/types.d.ts`| 1 | TypeScript declaration file — the public API contract by which JS callers consume AffineScript-compiled artefacts. `.d.ts` is TS by definition. | Generate from canonical compiler output (issue: see ROADMAP). |
78
-
|`packages/affine-ts/types.d.ts`| 1 | Same, for TS callers. | Same as above. |
|`affinescript-deno-test/*.ts`| 6 | Deno-based test harness for AffineScript itself: `cli.ts`, `mod.ts`, `lib/{compile,discover,runner}.ts`, `example/smoke_driver.ts`. Deno test runner is TS-native. | AffineScript stdlib + Deno bindings (no scheduled issue). |
81
79
82
80
Adding to this list requires explicit user approval and an unblock condition. New TypeScript files outside this list are still banned per the policy table above.
83
81
84
-
The 5 external references to `affinescript-deno-test/` (CI workflow, status docs, history docs) and the 3 references to `packages/affine-{js,ts}/` (status docs, Deno config) are why physical relocation into a `vendor/` subtree was rejected — the relocation cost exceeded the visibility benefit when the directories are already named clearly.
82
+
**Closed exemptions:**
83
+
-`editors/vscode/src/extension.ts` — closed 2026-05-03 by issue #35 Phase 3 (Node-target codegen + Vscode bindings landed). Source of truth is now `editors/vscode/src/extension.affine`, compiled to `out/extension.cjs`. Re-introducing the .ts file is blocked by `tools/check-no-extension-ts.sh` (wired into `just check` and `.github/workflows/ci.yml`).
84
+
-`packages/affine-ts/` — removed 2026-05-11 (issue #66 closed won't-do). TypeScript is not a first-class consumer; TS callers should use `@hyperpolymath/affine-js` directly and supply their own typings.
85
+
86
+
The 5 external references to `affinescript-deno-test/` (CI workflow, status docs, history docs) and the references to `packages/affine-js/` (status docs, Deno config) are why physical relocation into a `vendor/` subtree was rejected — the relocation cost exceeded the visibility benefit when the directories are already named clearly.
85
87
86
88
### Package Management
87
89
@@ -97,3 +99,32 @@ The 5 external references to `affinescript-deno-test/` (CI workflow, status docs
97
99
- SHA-pinned dependencies
98
100
- SPDX license headers on all files
99
101
102
+
## Hypatia and gitbot-fleet standing rules
103
+
104
+
Standing governance rules for the Hypatia review bot and the gitbot-fleet
105
+
auto-merge bot. These are estate-wide policies; this section is the canonical
106
+
copy that bots read at PR-review time. Keep this section standalone so it can
107
+
be read cold without requiring the rest of CLAUDE.md as context.
108
+
109
+
### DOC-FORMAT
110
+
Rule: All documentation files in docs/ must use .adoc extension.
111
+
Exception: GitHub community-health files must use .md by name (CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md, CHANGELOG.md, README.md).
112
+
Action (Hypatia): On any PR that adds or renames a docs/ file with .md extension (excluding the above exceptions), post a review comment requesting rename to .adoc and request-changes.
113
+
Action (gitbot): Reject auto-merge for any PR with a docs/ .md file that is not a community-health file name.
114
+
115
+
### DOC-DEDUP
116
+
Rule: Before creating a new docs/specs/*.adoc or adding a major new section to SPEC.adoc, search existing specs for overlapping coverage.
117
+
Action (Hypatia): On any PR that closes the same issue number as another open PR, post a comment listing both PRs and ask the author to confirm which is canonical.
118
+
Action (gitbot): Block merge if two open PRs share a "Closes #N" reference to the same issue.
119
+
120
+
### STACK-SIGNAL
121
+
Rule: A docs PR that documents a feature implemented in a sibling feature PR must declare the dependency in its PR body.
122
+
Format: Add a line "Depends on: #NNN" near the top of the PR body.
123
+
Action (Hypatia): On any docs PR whose title or body references types/grammar/syntax added in an open feat PR, check whether "Depends on:" is present; if missing, request it.
124
+
Action (gitbot): Do not auto-merge a PR with "Depends on: #NNN" until #NNN is merged.
125
+
126
+
### ISSUE-CLOSURE
127
+
Rule: An issue is closed only by explicit merge of a PR with "Closes #N" OR by explicit human comment agreement in the issue thread. bots may not self-close issues.
128
+
Action (Hypatia): When asked to close an issue, confirm via a reply on the issue thread before doing so.
129
+
Action (gitbot): Never use GitHub's "close issue" API directly; only close via PR merge with "Closes #N" keywords.
0 commit comments