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
description: Prepare the codebase for CI. Runs formatting, linting, spell check, build, unit tests, e2e tests, and coverage checks iteratively until everything passes. Use before submitting a PR or when the user wants to ensure CI will pass.
3
+
description: Prepare the codebase for CI. Reads the CI workflow, builds a checklist, then loops through format/lint/build/test/coverage until every single check passes. Use before submitting a PR or when the user wants to ensure CI will pass.
You MUST NOT STOP until every check passes and coverage threshold is met. This is a loop, not a checklist you run once.
10
+
You MUST NOT STOP until every check passes and coverage threshold is met.
11
11
12
-
## Step 0: Read the CI Pipeline
12
+
## Step 1: Read the CI Pipeline and Build Your Checklist
13
13
14
-
Read the CI workflow file to understand exactly what CI will run:
14
+
Read the CI workflow file:
15
15
16
16
```bash
17
17
cat .github/workflows/ci.yml
18
18
```
19
19
20
-
Parse every step. The CI pipeline is the source of truth for what must pass. Do NOT assume you know the steps — read them fresh every time.
20
+
Parse EVERY step in the workflow. Extract the exact commands CI runs. Build yourself a numbered checklist of every check you need to pass. This is YOUR checklist — derived from the actual CI config, not from assumptions. The CI pipeline changes over time so you MUST read it fresh and build your list from what you find.
21
21
22
-
## Step 1: Coordinate with Other Agents
22
+
## Step 2: Coordinate with Other Agents
23
23
24
24
You are likely working alongside other agents who are editing files concurrently. Before making changes:
25
25
@@ -29,59 +29,34 @@ You are likely working alongside other agents who are editing files concurrently
29
29
4. Communicate what you are doing via TMC broadcasts
30
30
5. After each fix cycle, check TMC again — another agent may have broken something
31
31
32
-
## Step 2: Run the Full CI Check Sequence
32
+
## Step 3: The Loop
33
33
34
-
Run each CI step in order. Fix failures before moving to the next step. The sequence is derived from Step 0 but typically includes:
34
+
Run through your checklist from Step 1 in order. For each check:
35
35
36
-
### 2a. Format Check
36
+
1. Run the exact command from CI
37
+
2. If it passes, move to the next check
38
+
3. If it fails, FIX IT. Do NOT suppress warnings, ignore errors, remove assertions, or lower thresholds. Fix the actual code.
39
+
4. Re-run that check to confirm the fix works
40
+
5. Move to the next check
37
41
38
-
Run the format checker. If it fails, run the formatter to fix, then re-check.
42
+
When you reach the end of the checklist, GO BACK TO THE START AND RUN THE ENTIRE CHECKLIST AGAIN. Other agents are working concurrently and may have broken something you already fixed. A fix for one check may have broken an earlier check.
39
43
40
-
### 2b. Lint
44
+
**Keep looping through the full checklist until you get a COMPLETE CLEAN RUN with ZERO failures from start to finish.** One clean pass is not enough if you fixed anything during that pass — you need a clean pass where NOTHING needed fixing.
41
45
42
-
Run the linter. If it fails, fix every lint error. Do NOT suppress or ignore warnings. Re-run until clean.
43
-
44
-
### 2c. Spell Check
45
-
46
-
Run the spell checker if CI includes one. Fix any misspellings in source files.
47
-
48
-
### 2d. Build / Compile
49
-
50
-
Run the build step. Fix any compilation errors. Re-run until clean.
51
-
52
-
### 2e. Unit Tests
53
-
54
-
Run unit tests. If any fail, investigate and fix the root cause. Do NOT delete or weaken assertions. Re-run until all pass.
55
-
56
-
### 2f. E2E Tests with Coverage
57
-
58
-
Run e2e tests with coverage collection. If tests fail, fix them. If coverage is below the threshold, identify uncovered code and add tests or fix existing ones.
59
-
60
-
Note: E2E tests require no other VS Code instance running. If they cannot run in your environment, flag this to the user but still ensure everything else passes.
61
-
62
-
### 2g. Coverage Threshold
63
-
64
-
Run the coverage check. If it fails, you need more test coverage. Add assertions to existing tests or write new tests for uncovered paths.
65
-
66
-
## Step 3: Full Re-run
67
-
68
-
After fixing everything, run the ENTIRE sequence again from 2a to 2g. Other agents may have made changes while you were fixing things. You MUST verify the final state is clean.
69
-
70
-
If ANY step fails on re-run, go back to Step 2 and fix it. Repeat until a full clean run completes.
46
+
Do NOT stop after one loop. Do NOT stop after two loops. Keep going until a full pass completes with every single check green on the first try.
71
47
72
48
## Step 4: Final Coordination
73
49
74
-
1. Broadcast on TMC that CI prep is complete
50
+
1. Broadcast on TMC that CI prep is complete and all checks pass
75
51
2. Release any locks you hold
76
-
3. Report the final status to the user
52
+
3. Report the final status to the user with the output of each passing check
77
53
78
54
## Rules
79
55
80
56
- NEVER stop with failing checks. Loop until everything is green.
81
57
- NEVER suppress lint warnings, skip tests, or lower coverage thresholds.
82
58
- NEVER remove assertions to make tests pass.
83
-
- NEVER ignore spell check failures.
84
59
- Fix the CODE, not the checks.
85
-
- If you are stuck on a failure after 3 attempts, ask the user for help. Do NOT silently give up.
60
+
- If you are stuck on a failure after 3 attempts on the same issue, ask the user for help. Do NOT silently give up.
86
61
- Always coordinate with other agents via TMC. Check for messages regularly.
87
62
- Leave the codebase in a state that will pass CI on the first try.
0 commit comments