Skip to content
cccskills
FreePublished on GitHub

principle-separate-before-serializing-shared-state

Apply when changing shared mutable state, worker coordination, or task lifetimes in NeoHaskell framework internals. Reuse the owning subsystem, separate genuinely independent state, and use existing concurrency primitives where synchronization is required.

The English summary is being prepared. Showing the original description.

neohaskell/NeoHaskell348 stars(GitHub 348 + cccskills 0)

Run score Not tested

See how to install

Files included (2)

  • SKILL.md1.8 KB
  • agents/openai.yaml43 B

SKILL.md (original)

Review the instructions the agent will receive before you install.

Separate Before Serializing Shared State

Start with the framework subsystem that owns the state and its lifecycle, such as a dispatcher, store, or cache. Keep concurrency decisions there, behind operations callers can use. Keep pure transformations pure.

Why: Coordination belongs with the invariant it protects. Spreading mutable state or synchronization across callers makes the invariant harder to enforce. Instructions and conventions are not concurrency control.

Pattern:

  1. Find the owner and invariant. Identify the subsystem that owns the affected state or worker lifetime and read its existing concurrency design before changing it.
  2. Reuse or extend the owner's operations. If a new capability needs an atomic transition or coordinated lifecycle step, implement it at that boundary and have callers use it.
  3. Separate genuinely independent state. Prefer independent ownership when the state does not need to be shared. Preserve a canonical store or coordinated worker registry when its invariant requires one.
  4. Use NeoHaskell concurrency primitives when needed. Within the owning subsystem, read the relevant implementations in core/concurrency/ and choose the module whose ownership, blocking, atomicity, communication, and lifetime guarantees fit the operation. Preserve the whole transition: separately safe reads and writes may not form an atomic update. Follow the Foundational Thinking concurrency guidance.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Sketch types, signatures, and module structure before code, then stay in the loop while implementation fills in. Use for /architect, 'architect this', 'design this', or non-trivial work where jumping to code would lock in the wrong shape.

The English summary is being prepared. Showing the original description.

neohaskell/NeoHaskell348Updated Oct 26, 2026

arena

Free

Spawn N parallel candidates at the same task, pick a base, graft the strongest parts of the losers into it. Use for /arena, 'arena this', 'throw it in the arena', or when one attempt at a non-trivial artifact would lock in the wrong shape.

The English summary is being prepared. Showing the original description.

neohaskell/NeoHaskell348Updated Oct 26, 2026

Inspect or supervise a PR or stack through review and CI to merge-ready, using current GitHub evidence and the requested mode.

The English summary is being prepared. Showing the original description.

neohaskell/NeoHaskell348Updated Oct 26, 2026

Vet a perf measurement (limiter, tuning, limits, errors, repeatability, relevance, and whether the work happened) before you report or act on it. Use when you benchmark or report a measured speedup or regression, including complete framework flows and compilation of projects that consume the framework.

The English summary is being prepared. Showing the original description.

neohaskell/NeoHaskell348Updated Oct 26, 2026

bro

Free

Restate the last message in plain human language, with no jargon.

The English summary is being prepared. Showing the original description.

neohaskell/NeoHaskell348Updated Oct 26, 2026

Build or adapt a local harness to drive, inspect, and profile an interactive CLI or TUI without external services. Use for CLI UX checks, startup regressions, memory leaks, hangs, prompt flows, or terminal demos.

The English summary is being prepared. Showing the original description.

neohaskell/NeoHaskell348Updated Oct 26, 2026

See all skills by neohaskell

Report a problem with this skill