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
This document contains information you'll need no matter what the task is, but we have a separate library of content that you'll need to consult depending on the issue.
5
+
6
+
You have been given the `md-fragments` MCP server.
7
+
Before doing anything, query its `list-topics` endpoint and remember all the topics you saw.
8
+
Consult these topics often, as they contain important information relevant to the work.
9
+
MOST OPERATIONS (adding tests, running them, etc) HAVE RELEVANT DOCUMENTATION.
10
+
11
+
YOU MUST FOLLOW DIRECTIONS FROM THE "HOW TO FINISH A SESSION" TOPIC BEFORE FINISHING A PULL REQUEST.
12
+
13
+
## Mandatory Workflow
14
+
15
+
This repo uses test-driven development. When fixing bugs or implementing features, you must follow this workflow:
16
+
17
+
1.**Make a testcase that demonstrates the behavior**
18
+
- Run it (by itself) and review the baselines it generates to ensure it demonstrates the bug
19
+
- Add the test and its baselines in one commit
20
+
- You may need to debug in order to figure out how to write a testcase; this is normal
21
+
- DO NOT TRY TO FIX A BUG UNTIL YOU HAVE A TESTCASE THAT CORRECTLY DEMONSTRATES THE PROBLEM
22
+
23
+
2.**Fix the bug by changing code as appropriate**
24
+
- Put this fix in another commit
25
+
26
+
3.**Run the test you wrote again**
27
+
- Ensure the baselines change in a way that demonstrates that the bug is fixed
28
+
- Put this baseline diff in its own commit
29
+
30
+
4.**Add more testing**
31
+
- Once you've got the basics figured out, enhance your test to cover edge cases and other variations
32
+
- Run the test again and commit the baseline diff along with the test edit
33
+
34
+
5.**Run all other tests to ensure you didn't break anything**
35
+
- Run `npx hereby runtests-parallel` and wait for it to finish (10-15 minutes is normal!)
36
+
- Some collateral baseline changes are normal, but review for correctness
37
+
- Put these diffs in another commit
38
+
1
39
## Due Diligence
2
40
3
41
As part of your summary, you will need to provide an extensive root cause analysis of why the bug has occurred.
@@ -10,19 +48,9 @@ In particular, pay attention to which phase the bug occurs in. For example:
10
48
11
49
Always read maintainer comments that ask you for demonstrated reasoning about particular aspects of the bug.
12
50
13
-
## Documentation MCP server
51
+
## Time Constraints
14
52
15
-
The repo is large and the project is complex.
16
-
This document contains information you'll need no matter what the task is, but we have a separate library of content that you'll need to consult depending on the issue.
17
-
18
-
You have been given the `md-fragments` MCP server.
19
-
Before doing anything, query its `list-topics` endpoint and remember all the topics you saw.
20
-
Consult these topics often, as they contain important information relevant to the work.
21
-
MOST OPERATIONS (adding tests, running them, etc) HAVE RELEVANT DOCUMENTATION.
22
-
23
-
YOU MUST FOLLOW DIRECTIONS FROM THE "HOW TO FINISH A SESSION" TOPIC BEFORE FINISHING A PULL REQUEST
24
-
25
-
Before you end a session, read the `How to Finish a Session` topic.
53
+
If you're running out of time, consult the "How to give up" documentation topic.
26
54
27
55
## Asking Questions
28
56
@@ -45,51 +73,7 @@ npx hereby lint # Run lint. Always do this before submitting
45
73
npx hereby format # Run code formatting. Always do this before submitting
46
74
```
47
75
48
-
## Test Writing Best Practices
49
-
50
-
### For Fourslash Tests
51
-
1.**Prefer validation over baselines** - Use `verify.currentLineContentIs()` instead of `verify.baseline*()`
52
-
2.**Use simple, focused examples** - Test one feature at a time
53
-
3.**Name markers clearly** - Use descriptive marker names like `/*completion*/`
54
-
4.**Test the simplest form first** - Start with basic cases before complex scenarios
55
-
56
-
### For Compiler Tests
57
-
1.**Use clear file names** - Name tests after the feature being tested
58
-
2.**Add explanatory comments** - Document expected behavior with comments
59
-
3.**Test error cases** - Include both valid and invalid code examples
60
-
4.**Keep tests focused** - One primary feature per test file
61
-
62
-
### General Guidelines
63
-
1.**Make tests deterministic** - Avoid random or environment-dependent behavior
64
-
2.**Use realistic examples** - Test scenarios developers actually encounter
65
-
3.**Start simple** - Begin with the most basic case of a feature
66
-
4.**Test edge cases** - Include boundary conditions and error scenarios
67
-
68
76
## Understanding the Assigned Task
69
77
70
78
- Maintainer comments in the issue should generally take priority over OP's comments
71
79
- Maintainers might give you hints on where to start. They are not always right, but a good place to start
72
-
73
-
## Recommended Workflow
74
-
75
-
When fixing bugs or implementing features, follow this workflow:
76
-
77
-
1.**Make a testcase that demonstrates the behavior**
78
-
- Run it (by itself) and review the baselines it generates to ensure it demonstrates the bug
79
-
- Add the test and its baselines in one commit
80
-
81
-
2.**Fix the bug by changing code as appropriate**
82
-
- Put this fix in another commit
83
-
84
-
3.**Run the test you wrote again**
85
-
- Ensure the baselines change in a way that demonstrates that the bug is fixed
86
-
- Put this baseline diff in its own commit
87
-
88
-
4.**Add more testing**
89
-
- Once you've got the basics figured out, enhance your test to cover edge cases and other variations
90
-
- Run the test again and commit the baseline diff along with the test edit
91
-
92
-
5.**Run all other tests to ensure you didn't break anything**
93
-
- Run `npx hereby runtests-parallel` and wait for it to finish (10-15 minutes is normal!)
94
-
- Some collateral baseline changes are normal, but review for correctness
0 commit comments