协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
atomic-skills-spec【开发与工程】Defines criteria, thresholds, and migration patterns for splitting monolithic skills into focused atomic skills — including split heuristics, trigger engineering for new sub-skills, and gradual migration strategy.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
name: atomic-skills-spec description: Defines criteria, thresholds, and migration patterns for splitting monolithic skills into focused atomic skills — including split heuristics, trigger engineering for new sub-skills, and gradual migration strategy. license: MIT compatibility: opencode metadata: version: "1.0.0" domain: coding triggers: atomic skills, skill granularity, monolithic skill, skill splitting, refactoring skills, trigger calibration, skill architecture archetypes: - strategic - orchestration anti_triggers: - immediate restructure - breaking change - delete existing response_profile: verbosity: medium directive_strength: high abstraction_level: tactical role: reference scope: orchestration output-format: analysis
Defines the rules for when and how to split monolithic skills into focused atomic ones. This is a governance skill — it doesn't generate code or implement patterns, it governs how the skill ecosystem evolves.
Use this skill when:
Avoid splitting when:
A skill is a monolith when ANY of these conditions are met:
"Implements X, Y, Z" description — The frontmatter description lists 5+ distinct patterns, concepts, or features separated by commas or parentheses. This directly signals multiple topics masquerading as one skill.
description: Implements production reliability patterns (circuit breakers, retry with exponential backoff, bulkhead isolation, health checks, graceful degradation, distributed tracing) → 6 distinct patternsdescription: Comprehensive catalog of all 23 GoF design patterns... covering creational, structural, and behavioral → 23 patterns in one skill5+ independent "Pattern N:" or section headings — The Core Content covers 5+ clearly separable topics that each have their own implementation code and explanation.
"Implements X, Y, Z" + 15KB+ — A broad description combined with large file size (over 15KB) means the monolith is storing significant duplicated content.
Related-skills already exists for sub-topics — If related-skills lists skills that cover individual topics from this skill, the parent is likely over-scoped.
Multiple archetypes declared — A skill declaring both tactical and educational and orchestration may be doing too many different things for one audience.
Trigger overlap with sub-skills — If triggers include specific pattern names that could each justify their own skill (e.g., "factory method", "strategy pattern", "decorator pattern" all in one trigger list).
| Condition | Severity | Action |
|---|---|---|
| 3-4 patterns, under 15KB | LOW | Monitor — note as candidate but don't rush split |
| 5+ patterns OR "Implements X, Y, Z" + 20KB+ | HIGH | Plan split in next cycle |
| 10+ patterns (e.g., full GoF catalog) | CRITICAL | Split immediately — this is the highest-priority category |
| Template-generated trading skill with generic triggers | HIGH | Fix triggers during split |
A split is valid only if each resulting skill can stand alone. If a user loads the sub-skill, they should get complete, actionable guidance without needing to also load another skill.
Valid: coding-circuit-breaker covers circuit breakers end-to-end — concept, implementation, configuration, pitfalls.
Invalid: coding-breaker-states only covers CLOSED/OPEN/HALF_OPEN states — requires coding-circuit-breaker context.
Patterns that change for different reasons belong in different skills. If one pattern evolves independently of another, they should be separate.
Example: Circuit breakers (change when failure thresholds shift) vs bulkhead isolation (change when thread pool sizes shift) have independent evolution cycles → split. Counter-example: Health checks and graceful degradation always change together during deployment strategy shifts → can stay together.
After splitting, each new skill gets its own carefully calibrated trigger set of 3-8 terms (technical + conversational variants). Don't inherit all parent triggers.
Example: gof-design-patterns-catalog has 14 triggers. After split:
coding-creational-patterns: factory method, abstract factory, builder, prototype, singleton, how do i create objects, object creation (7 terms)coding-structural-patterns: adapter, bridge, composite, decorator, facade, proxy, flyweight, structural patterns (8 terms)coding-behavioral-patterns: observer, strategy, state, command, mediator, chain of responsibility, behavioral patterns (7 terms)If A lists B as related, B must list A. After a split:
This is NOT a breaking change. Existing monolithic skills remain in place. New atomic skills are added alongside them. Users benefit gradually:
This avoids: forced refactoring, breaking existing workflows, losing content during migration, coordination overhead across teams.
The monolith covers N distinct topics. Each topic becomes its own skill.
Before: coding/system-reliability-architecture (6 topics)
circuit breakers, retry/backoff, bulkhead isolation, health checks, graceful degradation, distributed tracing
After: 5 skills
coding/circuit-breaker — circuit breakers only
coding/retry-strategies — exponential backoff + jitter
coding/bulkhead-isolation — thread pool isolation
coding/health-checks-degradation — health checks + graceful degradation (closely coupled)
coding/observability-foundation — metrics, logging, OpenTelemetry tracing
The monolith covers patterns from multiple categories. Each category becomes its own skill.
Before: coding/gof-design-patterns-catalog (23 patterns across 3 families)
After: 3 skills
coding/creational-patterns — Factory Method, Abstract Factory, Builder, Prototype, Singleton
coding/structural-patterns — Adapter, Bridge, Composite, Decorator, Facade, Proxy, Flyweight
coding/behavioral-patterns — Observer, State, Strategy, Command, Template Method, Mediator, Chain of Responsibility, Iterator, Visitor, Memento, Interpreter
The monolith covers both "how to" implementation AND "why" architecture/design principles. Split into tactical and strategic layers.
Before: coding/security-engineering (5 domains, each with theory + implementation)
After:
coding/threat-modeling — STRIDE/DREAD methodology, attack surface analysis (reference)
coding/owasp-prevention — OWASP Top 10 secure coding patterns (implementation)
coding/security-pipeline — SAST/DAST/secret scanning CI integration (implementation)
coding/architectural-security — zero-trust, least-privilege networking (strategic)
The monolith covers a pattern applied across many contexts. Split by primary context.
Before: trading/risk-kill-switches (4 layers: account, strategy, market, infrastructure)
After: 4 skills
trading/account-kill-switch — account-level drawdown limits
trading/strategy-kill-switch — per-strategy circuit breakers
trading/market-kill-switch — market-wide halt conditions
trading/infra-kill-switch — infrastructure health monitors
When creating a new skill:
When you identify a monolith:
When creating an atomic skill from a monolith:
When splitting a monolith, each new skill gets a fresh trigger set of 3-8 terms. Derive these by:
Example: Splitting coding/system-reliability-architecture
Original triggers (broad, 8 terms): system reliability, circuit breaker, bulkhead isolation, distributed tracing, chaos engineering, fault tolerance, how do i make my system resilient, graceful degradation
For coding/circuit-breaker:
triggers: circuit breaker, three-state breaker, failure threshold, half-open state, cascade prevention, how do i prevent cascading failures, resilience pattern
For coding/retry-strategies:
triggers: retry strategy, exponential backoff, jitter, retry storm prevention, transient error handling, how do i retry failed requests, backoff calculator
Notice: each set is 7 terms, technically precise, includes a "how do I" variant, and doesn't overlap with sibling trigger sets.
When validating a split skill, check:
metadata.triggers has 5-8 meaningful termsThe following monoliths are identified as highest-priority split candidates, based on pattern count, file size, and description signals:
| Domain | Skill | Patterns | Proposed Split |
|---|---|---|---|
coding | gof-design-patterns-catalog | 23 GoF patterns | → 3 skills (creational, structural, behavioral) |
| Domain | Skill | Patterns | Proposed Split |
|---|---|---|---|
coding | system-reliability-architecture | 6 reliability patterns | → 5 skills (circuit breaker, retry, bulkhead, health checks+degradation, observability) |
coding | modern-architecture-patterns | 6 architecture patterns | → 5-6 skills (hexagonal arch, BFF, feature flags, CQRS/event sourcing, sidecar) |
coding | security-engineering | 5 security domains | → 4 skills (threat modeling, OWASP prevention, supply chain security, pipeline integration) |
trading | risk-kill-switches | 4 kill switch layers | → 4 skills (account, strategy, market, infrastructure) |
trading | execution-slippage-modeling | 5 slippage models | → 4 skills (estimation, simulation paths, fee modeling, partial fills) |
| Domain | Skill | Patterns | Proposed Action |
|---|---|---|---|
coding | design-systems-atomic | 5 topics | → 4 skills (atomic design, tokens, Storybook, accessibility) |
trading | backtest-lookahead-bias | 5 bias tests | → 4 skills (causality validation, delay detection, walk-forward, survivorship bias) |
coding | data-deduplication | 5 dedup layers | → 3-4 skills (schema dedup, ETL dedup, API dedup) |
trading | paper-realistic-simulation | 5 sub-models | Review + fix triggers during potential split |
When reviewing a skill for atomic compliance, produce:
| Skill | Purpose |
|---|---|
coding-code-review | Reviews individual skills for quality, stub detection, and trigger calibration |
trading-risk-stop-loss | Example of a well-scoped atomic skill (single pattern family) |
coding-security-engineering | Current monolith candidate for splitting (see Prioritized Split Queue) |
Authoritative documentation links for this domain. The model follows markdown links at load time to resolve external references and inline content.