Move the phase entry points into aliased module folders
Check / check (pull_request) Successful in 46s
Check / check (pull_request) Successful in 46s
This commit is contained in:
@@ -34,13 +34,15 @@ import is banned in every file, owned or not
|
||||
(`import/no-relative-parent-imports`); runtime file URLs such as
|
||||
`new URL("../prompt.md", import.meta.url)` are paths, not imports, and stay.
|
||||
Files no alias owns need no `index.ts` and no alias, and import `./` siblings
|
||||
and subfolders freely. The aliases, in layer order, are `#agents` (Codex,
|
||||
and subfolders freely. Every top-level entry of `src/` is an aliased module
|
||||
folder. The aliases, in layer order, are the three phases `#prepare`, `#run`,
|
||||
and `#post`, then `#agents` (Codex,
|
||||
Claude Code and OpenCode specifics), `#processes` (child processes and the
|
||||
isolated profile users), `#runtime` (the prepared runtime and its
|
||||
credentials), `#profiles`, `#common` (error and JSON checks), and `#testing`
|
||||
(test helpers), each a `src/<name>/index.ts` barrel. The phase entry points
|
||||
`src/prepare.ts`, `src/run.ts`, and `src/post.ts` stay at the top of `src/`,
|
||||
unowned, because `action.yml` runs them by path. Tests that use the test
|
||||
(test helpers), each with a `src/<name>/index.ts` barrel. A phase's
|
||||
`index.ts` is also its entry point, which `action.yml` runs as
|
||||
`node src/<phase>/index.ts`. Tests that use the test
|
||||
helpers import `#testing`, and `tests/` imports `src/` only through it. Local convention, stricter than the general rule above: in
|
||||
this repo, aliases point only at a direct subfolder of `src/`
|
||||
(`"#helpers": "./src/helpers/index.ts"`), and code outside `src/` uses `./`
|
||||
|
||||
Reference in New Issue
Block a user