本文へ移動
cccskills
無料GitHub で公開

principle-design-for-throughput

Apply when designing, implementing or reviewing NeoHaskell framework data structures, service flows, concurrency, storage, codecs or generated APIs. Design toward a hypothetical 50,000 requests per second with explicit cost and workload assumptions; distinguish design reasoning from measured performance.

日本語の概要は準備中です。原文の説明を表示しています。

neohaskell/NeoHaskellスター 348(GitHub 348 + cccskills 0)

実行スコア 未検証

インストール方法を見る

含まれるファイル(1)

  • SKILL.md4.3 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Design for Throughput

Use 50,000 requests per second as a hypothetical design workload for framework service flows. Choose efficient structures, ownership and defaults while shaping the design. State assumptions about request mix, payloads, history/state size, hot keys and deployment resources; do not silently turn an aggregate target into a per-core or per-service capacity claim. The target guides architecture. It does not require a benchmark at that load, promise achieved capacity or impose fixed per-stage latency budgets.

  1. Account for the complete operation. Trace the path the caller waits for: context/authorization, fetch or replay, decision execution, encoding, append and any promised downstream visibility. Distinguish accepted, queued, persisted and visible outcomes. Identify repeated work, allocations, copying, scans, round trips, critical sections and retained state; describe how costs grow with workload dimensions. Keep rough estimates labeled with their assumptions. Do not infer request latency by taking the reciprocal of the throughput target.
  2. Match structure to access. Choose indexes, incremental state, snapshots, batching or reused setup where their semantics and access patterns justify them. A page limit after materializing all rows still performs the scan. Keep pure transformations clear and put reusable dependencies/setup in the owning service's lifecycle. Avoid repeated codec round trips and rebuilding invariant work per request. Do not add speculative caches, distribution or sharding without naming their lifetime, invalidation, ordering and consistency costs.
  3. Make concurrency and overload explicit. Identify the invariant and the contention domain before choosing the existing NeoHaskell concurrency module. Ask which operations can proceed independently and which require ordering; a faster shared collection does not remove a transactional invariant. Bound pending work, memory and concurrency at their owner, with an admission/backpressure or rejection policy and cancellation/cleanup. A stream or asynchronous API does not by itself establish bounded resources. Treat key skew, bursts, slow storage and retries as workload dimensions. Retain Security by Construction and the promised durability semantics while reducing cost.
  4. Inspect Haskell's actual work. Read wrapper implementations, compiler/build flags and demand behavior. Count required evaluation of pure values, executed Task/decision effects, codec paths and allocation/GC costs. Check what a strict container or fold already guarantees, and what it does not. Inspect the actual encoding path rather than assuming handwritten, Generic or Template Haskell generation is faster. Choose INLINE, INLINABLE, SPECIALIZE, UNPACK or stricter evaluation only for a specific demonstrated mechanism; avoid blanket pragma/strictness rules. Include consumer compilation, splice/instance work and generated-code size when the design shifts cost onto user builds.
  5. Separate the design case from the measured result. Explain why the chosen shape avoids a named scaling bottleneck and what uncertainty remains. Design reasoning can justify a choice before implementation; an achieved rate or speedup needs appropriate measurements under Benchmark Checklist. Use proportionate focused, whole-flow or consumer-build evidence for the claim, not a mandatory 50,000-RPS run. Do not import unverified absolute budgets or make speculative micro-optimizations override correctness and maintainability.

Architect candidates and code reviews should expose the relevant cost model, limiting shared resource and accepted tradeoffs alongside the type/service sketch. Keep the reasoning concise for changes without a throughput-sensitive path; compiler/toolchain work uses its own build-cost dimensions. The framework should carry efficient, secure defaults so downstream users need fewer tuning knobs.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

architect

無料

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.

日本語の概要は準備中です。原文の説明を表示しています。

neohaskell/NeoHaskell3482026年10月26日 更新

arena

無料

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.

日本語の概要は準備中です。原文の説明を表示しています。

neohaskell/NeoHaskell3482026年10月26日 更新

babysit

無料

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

日本語の概要は準備中です。原文の説明を表示しています。

neohaskell/NeoHaskell3482026年10月26日 更新

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.

日本語の概要は準備中です。原文の説明を表示しています。

neohaskell/NeoHaskell3482026年10月26日 更新

bro

無料

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

日本語の概要は準備中です。原文の説明を表示しています。

neohaskell/NeoHaskell3482026年10月26日 更新

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.

日本語の概要は準備中です。原文の説明を表示しています。

neohaskell/NeoHaskell3482026年10月26日 更新

neohaskell のスキルをすべて見る

このスキルの問題を報告する