ワンクリックで
extensibility
Guidelines for dual-use architecture (CLI and Go Library), dependency separation, and extensible registry patterns.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Guidelines for dual-use architecture (CLI and Go Library), dependency separation, and extensible registry patterns.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | extensibility |
| description | Guidelines for dual-use architecture (CLI and Go Library), dependency separation, and extensible registry patterns. |
dux is designed for two primary uses:
To support both use-cases cleanly, please adhere to the following rules when designing new systems, adapters, or capabilities:
pkg/)Code within pkg/ is considered the Library boundary. It must NEVER import from:
cmd/internal/ (e.g. internal/config)Why? Go strictly prevents external modules from importing internal/ directories. If pkg/ depends on an internal/ structure, the entire package becomes un-importable and fundamentally breaks the "as a Go library" use-case.
When initializing core abstractions (Providers, Enrichers, Adapters), their constructors and factories must accept:
string, int, time.Duration).*Option structs defined within the same package.Let the application layer (cmd/ or internal/) handle mapping from Viper/YAML specs to these foundational structures before passing them to the core framework constructors.
We avoid global, mutable registries (e.g., var registry = map[string]Constructor). If an object requires multiple optional configurations, utilize the Variadic Options Pattern (e.g. adapter.WithEnricher(...)).
Crucially: the pkg/ library does NOT need to map CLI string configurations (like YAML values "time") to structs (&timeEnricher{}). The application layer (internal/cli/ or internal/config/) handles all switch statements and deserialization of YAML values into core package constructors. pkg/ files should simply export functions like NewTime() and rely on the calling layer to map user configuration identically.
Whenever a new architectural enhancement, feature, or built-in agent capability is introduced, you MUST update the accompanying user documentation to provide concrete setup examples.
Rule: Provide structural examples featuring specific Prototype Agents (e.g., a "Q&A" agent) rather than generic placeholders. This ensures that documentation inherently acts as an integration test of practical use-cases. If a feature supports dynamic customization, provide an example showing how that feature configures a Q&A agent in agents.yaml.
Guidelines for creating, reviewing, and improving agent skills.
Guidelines for validation, staging, amending, and commit messages.
Guidelines for dependency injection patterns.
Guidelines for ensuring architectural changes are validated against core use cases.
Orchestrates efficient read and write interactions with the engram unified memory store via MCP tools. Provides deterministic workflows for decomposing observations into atomic memories, composing four-dimensional queries (context, similarity, relationship, time) for maximum retrieval accuracy, managing agent-managed focus context, and linking memories into associative webs at write time. Ensures memories are discoverable, precisely ranked, and structurally connected across sessions.
Guidelines for configuring the pi.hitl CEL-based permission sandbox via permissions.yaml files.