ALWAYS invoke this skill when writing ADRs for TypeScript.
From typescriptnpx claudepluginhub outcomeeng/claude --plugin typescriptThis skill is limited to using the following tools:
references/adr-patterns.mdreferences/typescript-principles.mdSearches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
<essential_principles>
Read /standardizing-typescript-architecture before writing any ADR. It defines the canonical ADR sections, how testability appears in Compliance rules, and what does NOT belong in an ADR.
any without explicit justification in ADR</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:
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. Project Context
Read these files to understand project structure and workflow:
spx/CLAUDE.md - Project navigation, work item status, BSP dependenciesFor testing methodology, invoke the /testing-typescript skill
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 Zod for all data validation" |
| Node-specific | spx/{NN}-{slug}.enabler/{NN}-{slug}.adr.md | "CLI command structure" |
| Nested node | spx/.../{NN}-{slug}.outcome/{NN}-{slug}.adr.md | "Use execa for subprocess execution" |
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 - Project structure, navigation, work item management/standardizing-typescript-architecture for canonical ADR conventions/testing-typescript 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 TypeScript-Specific Implications
For each decision, consider:
Phase 3: Write ADRs
Use the authoritative template (from /understanding). Each ADR includes:
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 project directory for skill files. </accessing_skill_files>
<reference_index> Detailed patterns and principles:
| File | Purpose |
|---|---|
references/adr-patterns.md | Common ADR patterns for TypeScript |
references/typescript-principles.md | Type safety, clean architecture, security |
</reference_index>
<output_format> When you complete ADR creation, provide:
## Architectural Decisions Created
### ADRs Written
| ADR | Scope | Decision Summary |
| ----------------------------------------------------------- | -------------- | -------------------------------- |
| [Type Safety](spx/21-type-safety.adr.md) | Product | Use strict TS, Zod at boundaries |
| [CLI Structure](spx/32-cli.enabler/21-cli-structure.adr.md) | 32-cli enabler | Commander.js with subcommands |
### Key Constraints
1. {constraint from [Type Safety](spx/21-type-safety.adr.md)}
2. {constraint from [CLI Structure](spx/32-cli.enabler/21-cli-structure.adr.md)}
</output_format>
<success_criteria> ADR is complete when:
/standardizing-typescript-architectureRemember: Your decisions shape everything downstream. A well-designed architecture enables clean implementation. </success_criteria>