Skip to content

Commit 87200d7

Browse files
authored
Merge pull request #1817 from OpenFn/update-claude-md
adjust claude.md to not write invariants
2 parents 0e2045d + 7330233 commit 87200d7

1 file changed

Lines changed: 11 additions & 23 deletions

File tree

‎claude.md‎

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,17 @@ review only—no automatic commits or PRs.
2222

2323
## File Invariants (CRITICAL)
2424

25-
### `Utils.js`
26-
27-
```javascript
28-
/**
29-
* INVARIANT: Must export function named `request`
30-
* - Infrastructure/helpers ONLY
31-
* - NO operational functions
32-
* - To extend: wrap it (e.g., requestWithRetry)
33-
*/
34-
export function request(configuration, path, params, callback) { ... }
35-
```
25+
These are rules for you to follow when generating code. They are constant across the whole repo.
3626

37-
### `Adaptors.js`
27+
**DO NOT write them into the generated files.** No `INVARIANT:` comments, no "Docs:" or "API:" header blocks, no file-level banner comments restating these rules. Generated files should contain only normal code and JSDoc for the functions themselves.
3828

39-
```javascript
40-
/**
41-
* INVARIANT: Must export function named `request`
42-
* - ALL operational functions go here
43-
*/
44-
export function request(method, path, body, options = {}){ ... }
45-
export function getData(params) { ... }
46-
```
29+
- `Utils.js`
30+
- Must export a function named `request`
31+
- Infrastructure/helpers ONLY; NO operational functions
32+
- To extend: wrap it (e.g., `requestWithRetry`)
33+
- `Adaptors.js`
34+
- Must export a function named `request`
35+
- ALL operational functions go here
4736

4837
---
4938

@@ -100,9 +89,8 @@ packages/<name>/
10089

10190
2. **Full file contents** with:
10291

103-
- Doc references
104-
- Invariant comment blocks
105-
- JSDoc annotations
92+
- JSDoc annotations on exported functions
93+
- No invariant comments, doc-reference headers or other file-level banner comments
10694

10795
3. **Test commands**
10896

0 commit comments

Comments
 (0)