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: plans/agent-runtime-migration.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,5 @@
1
+
First, read the file (provided by the user). Make sure it is a pure logic file. It should only import from @codebuff/common and @codebuff/agent-runtime (which are pure logic libraries). For example, it should not use `fetch` or `fs`. If it does, you should ask the user what to do and end turn and disregard the rest of this file.
2
+
1
3
Move the file (provided by the user) from `backend/src/some/path.ts` to `packages/agent-runtime/src/some/path.ts`
2
4
If there is a test file, it will most likely be at `backend/src/some/__tests__/path.test.ts` If that file exists, move it to `packages/agent-runtime/src/some/__tests__/path.test.ts` If it does not exist, the test may or may not exist, do not worry for now.
3
5
@@ -6,12 +8,12 @@ Most likely, there will be import errors:
6
8
- Repeatedly run `bun run typecheck` in the project root and fix the typecheck errors.
7
9
- Any reference from `backend/` to `packages/agent-runtime/` should be imported as `@codebuff/agent-runtime/some/path`
8
10
- Any reference from `packages/agent-runtime/` to another file in `agent-runtime` should be imported relatively (e.g. `../some/path`)
9
-
- The file moved to `packages/agent-runtime` should never reference a file in `backend/`. If it does, this was an error and you should ask the user what to do and disregard the rest of this file.
11
+
- The file moved to `packages/agent-runtime` should never reference a file in `backend/`. If it does, this was an error and you should ask the user what to do and end turn and disregard the rest of this file.
10
12
- Also, search for the regex in `packages/agent-runtime/`: `@codebuff/agent-runtime`. You should find nothing in any _code_ files. If you find something, replace it with the relative path.
11
13
- It does appear in `package.json`, but ignore that file.
12
14
13
15
Run `bun test $(find . -name '*.test.ts')` twice: in `backend/` and `packages/agent-runtime/`
14
-
If they do not pass, do NOT fix the tests (unless it is an import error, which should have been fixed in the step before. You can fix the imports, but do not change the test logic). Ask the user what to do and disregard the rest of this file.
16
+
If they do not pass, do NOT fix the tests (unless it is an import error, which should have been fixed in the step before. You can fix the imports, but do not change the test logic). Ask the user what to do and end turn and disregard the rest of this file.
15
17
16
18
If the tests pass, git add the changed files (including the deleted files), then commit the changes. No need to use any subagent to commit, you have all the context you need.
0 commit comments