How this skill is triggered — by the user, by Claude, or both
Slash command
/rust:architecting-rustThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Invoke the `rust:standardizing-rust` skill before proceeding. If that skill is unavailable, report the missing skill and continue with the closest available workflow.
Invoke the rust:standardizing-rust skill before proceeding. If that skill is unavailable, report the missing skill and continue with the closest available workflow.
Invoke the rust:standardizing-rust-architecture skill before proceeding. If that skill is unavailable, report the missing skill and continue with the closest available workflow.
<essential_principles>
Standards are pre-loaded above. The first skill defines shared Rust standards; the architecture standard defines canonical ADR sections, how testability appears in ## Verification ### Audit rules, and what does not belong in an ADR.
After reading those standards, check for spx/local/rust.md and spx/local/rust-architecture.md at the repository root. Read each file that exists and apply each as repo-local routing to the product's governing specs and decisions. A local overlay supplements skill behavior; it does not declare product truth.
## Verification's ### Audit subsection as ALWAYS/NEVER rules -- not in a separate Testing Strategy section</essential_principles>
<context_loading> For spec-tree work items: Load complete context before creating ADRs.
If you're creating ADRs for a spec-tree work item (enabler/outcome), ensure complete hierarchical context is loaded:
spec-tree:contextualizing with the node pathThe spec-tree:contextualizing skill provides:
ADR creation requirements:
## Verification (### Audit ALWAYS/NEVER rules for DI, no mocking)If NOT working on spec-tree work item: Proceed directly with ADR creation using provided requirements. </context_loading>
<input_context> Before creating ADRs, you must understand:
1. Node Specification
## Requirements section## Test Strategy section2. Product Context
Read these files to understand product structure and workflow:
spx/CLAUDE.md - Product navigation, work item status, BSP dependenciesFor Rust test standards and methodology, read /standardizing-rust-tests, then invoke /testing-rust.
3. Existing Decisions
Read existing ADRs/PDRs to ensure consistency:
spx/{NN}-{slug}.adr.md - Product-level ADRs (interleaved at root)spx/{NN}-{slug}.pdr.md - Product-level PDRs (interleaved at root)</input_context>
<adr_scope> You produce ADRs. The scope depends on what you're deciding:
| Decision Scope | ADR Location | Example |
|---|---|---|
| Product-wide | spx/{NN}-{slug}.adr.md | "Use typed boundary errors across services" |
| Node-specific | spx/{NN}-{slug}.enabler/{NN}-{slug}.adr.md | "CLI command structure" |
| Nested node | spx/.../{NN}-{slug}.outcome/{NN}-{slug}.adr.md | "Use tokio task orchestration for workers" |
ADR Numbering:
new = floor((left + right) / 2)new = floor((last + 99) / 2)See /authoring skill for complete ordering rules.
Within-scope dependency order: adr-21 must be decided before adr-37 (lower BSP = dependency).
Cross-scope dependencies: Must be documented explicitly in ADR "Context" section using markdown links.
</adr_scope>
<adr_creation_protocol> Execute these phases IN ORDER.
Phase 0: Read Context
spx/CLAUDE.md - Product structure, navigation, work item management/standardizing-rust, then /standardizing-rust-architecturespx/local/rust.md and spx/local/rust-architecture.md if they exist/standardizing-rust-tests, then spx/local/rust-tests.md if it exists/testing-rust to understand testing methodologyspx/{NN}-{slug}.adr.md - Product-level ADRs/authoring skill for ADR templatePhase 1: Identify Decisions Needed
For each TRD section, ask:
List decisions needed before writing any ADRs.
Phase 2: Analyze Rust-Specific Implications
For each decision, consider:
Result, Option, thiserror, anyhow, retries, or fail-fast behavior?Send/Sync constraints follow?Drop, pools, guards, or lazy initialization matter?Phase 3: Write ADRs
Use the authoritative template (from /understanding). The ADR is decision-first:
# {Decision Name}, then the decision stated directly as permanent truth in 1-3 sentences -- what it governs and what it decides. No Purpose heading, no Context section; business impact and constraints fold into the decision statement and Rationale### Testing ([{assertion type}]), ### Eval ([eval]), ### Audit ([audit]), ordered by decreasing enforcement strength; the DI/mocking testability constraints are ### Audit rules carrying ([audit])Phase 4: Verify Consistency
</adr_creation_protocol>
<what_you_do_not_do>
</what_you_do_not_do>
<accessing_skill_files> When this skill is invoked, Claude Code provides the base directory in the loading message:
Base directory for this skill: {skill_dir}
Use this path to access skill files:
{skill_dir}/references/IMPORTANT: Do NOT search the product directory for skill files. </accessing_skill_files>
<reference_index> Detailed patterns and principles:
| File | Purpose |
|---|---|
references/adr-patterns.md | Common ADR patterns for Rust |
references/rust-principles.md | Ownership, type-driven design, safety, lifecycle, and crates |
</reference_index>
<output_format> When you complete ADR creation, provide:
Architectural Decisions Created
ADRs Written
| ADR | Scope | Decision Summary |
| ---------------------------------- | ------- | --------------------------- |
| [{ADR Name}]({path to ADR}) | {scope} | {one-line decision summary} |
| [{Second ADR Name}]({path to ADR}) | {scope} | {one-line decision summary} |
Key Constraints
1. {constraint from [{ADR Name}]({path to ADR})}
2. {constraint from [{Second ADR Name}]({path to ADR})}
</output_format>
<success_criteria> ADR is complete when:
### Audit) includes testability constraints (DI, no mocking) per /standardizing-rust-architecture/standardizing-rust was loaded before /standardizing-rust-architecture/standardizing-rust-tests was loaded before testing methodology was appliedRemember: Your decisions shape everything downstream. A well-designed architecture enables clean implementation. </success_criteria>
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub outcomeeng/plugins --plugin rust