Skip to content

docs(claude): document @colony/process in layout and dep-order rule#38

Merged
NagyVikt merged 2 commits intomainfrom
agent/claude/extract-colony-process-2026-04-24-11-11
Apr 24, 2026
Merged

docs(claude): document @colony/process in layout and dep-order rule#38
NagyVikt merged 2 commits intomainfrom
agent/claude/extract-colony-process-2026-04-24-11-11

Conversation

@NagyVikt
Copy link
Copy Markdown
Collaborator

Automated by gx branch finish (PR flow).

NagyVikt added 2 commits April 24, 2026 11:18
`isMainEntry()`, pidfile helpers, and the cross-platform `spawn
process.execPath` pattern had diverged across apps/cli/src/commands/
{lifecycle,worker}.ts, apps/mcp-server/src/server.ts,
apps/worker/src/server.ts, and packages/hooks/src/auto-spawn.ts. The
0.2.0 release notes already flag this surface as the place Windows
EFTYPE and npm-symlink-shim regressions keep landing; duplicating the
fix four ways means the next regression gets missed in one.

Introduce `@colony/process` exporting `isMainEntry`, `isAlive`,
`readPidFile` / `writePidFile` / `removePidFile`, and
`spawnNodeScript` (wraps `spawn(process.execPath, [script, ...args],
{ detached, stdio: 'ignore' })`). All five call sites now share one
implementation.

No behavior change — the old regex pidfile path, the EFTYPE guard,
and the realpath-normalized `isMainEntry` all move verbatim.
Add the new `@colony/process` package to the repository layout and the
"Architectural rules" dependency-order invariant in CLAUDE.md. `process`
has no upstream workspace deps — only `node:` builtins — so it sits
before `config` in the dep chain.
@NagyVikt NagyVikt merged commit 185a9d9 into main Apr 24, 2026
@NagyVikt NagyVikt deleted the agent/claude/extract-colony-process-2026-04-24-11-11 branch April 24, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant