agentleFS
coddy-projectcoddy-project/coddy-agent/.cursor/rules/process-lifecycle.mdc

coddy-agent / rules

Cursor rule187 starsChanged 9 days agoMITView on GitHub

Cross-platform process identity, adoption, and termination

We split this process-lifecycle.mdc into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every exec.Cmd goes through platform.AdaptCommand before Start.

    line 15

≈ “Common” is an estimate: at least 1 in 5 of the 6,350 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
process-lifecycle.mdc
---
description: Cross-platform process identity, adoption, and termination
globs:
  - "internal/platform/**/*.go"
  - "internal/bgtask/**/*.go"
  - "internal/tools/shell/**/*.go"
  - "internal/hooks/**/*.go"
alwaysApply: false
---
# Process lifecycle

- On Windows, process identity is PID plus creation time. Verify it while holding the handle through tree termination, and do not reap legacy rows without identity.
- Unix process-group liveness does not require the original leader.
- On Darwin, EPERM means an empty or zombie-only group only in the termination path, not in liveness checks.
- Every `exec.Cmd` goes through `platform.AdaptCommand` before `Start`.
- A foreground timeout adopts the same process into the existing pool; never restart it through a second scheduler.
- Background starts and adoptions cannot promise that daemon descendants close inherited pipes.
- Process-group changes require real macOS tests.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.