compose
Protocol composition authoring assistant — build composition SKILL.md files from protocol Lego blocks. Validates chains against graph.json, analyzes gate dispositions via the Constitution/Extension classification model, and generates pipeline templates. Use when the user asks to 'compose protocols', 'create composition skill', 'build protocol chain', 'combine protocols', or wants to author a composition workflow like /review.
What this skill does
# Compose: Protocol Composition Authoring
Build composition SKILL.md files from protocol chains. Validates graph constraints, catalogs gates, proposes dispositions, and generates a pipeline template following the `/review` structural pattern.
**This is an authoring tool, not a runtime executor.** The output is a SKILL.md file that the user can install and invoke independently.
## Pipeline Overview
```
SPECIFY → VALIDATE → CATALOG → DISPOSITION → GENERATE
(gated) (gated) (gated)
```
3 user gates across 5 phases. Phases 1-2 are autonomous (validation and collection).
## Phase 0: Specify (Chain Input)
Accept a protocol chain specification from the user.
**Input forms**:
- Inline argument: `/compose elicit → bound → inquire`
- Conversational: user describes the desired chain
- Cluster shortcut: `/compose planning` (resolve via the built-in Cluster Shortcuts table below)
**Normalization**: Accept protocol names (Aitesis), slash commands (/inquire), skill names (inquire), or short names. Case-insensitive. Arrow separators (`→`, `->`, `,`, spaces) all accepted. Resolve to canonical `(protocol_name, slash_command)` pairs using the registry below.
**Output path**: Ask the user where to write the generated SKILL.md. Default: `~/.claude/skills/{chain-name}/SKILL.md` for user-level skills, or suggest a project-level path if appropriate.
**Gate #1** (Qc — Phase 1 validates):
Present the interpreted chain with canonical protocol names, slash commands, and proposed output path. Options:
1. **Confirm** — proceed with this chain
2. **Modify** — adjust protocols, order, or output path
**Protocol registry**:
| Protocol | Slash | Skill token |
|----------|-------|-------------|
| Horismos | `/bound` | `bound` |
| Aitesis | `/inquire` | `inquire` |
| Prothesis | `/frame` | `frame` |
| Analogia | `/ground` | `ground` |
| Periagoge | `/induce` | `induce` |
| Euporia | `/elicit` | `elicit` |
| Syneidesis | `/gap` | `gap` |
| Prosoche | `/attend` | `attend` |
| Epharmoge | `/contextualize` | `contextualize` |
| Elenchus | `/sublate` | `sublate` |
| Diylisis | `/distill` | `distill` |
| Anamnesis | `/recollect` | `recollect` |
| Katalepsis | `/grasp` | `grasp` |
## Phase 1: Validate (Graph Constraints)
Read `references/graph.json` (bundled with this skill). Check three constraints:
### 1.1 Precondition Order
For each precondition edge `(source, target)` in graph.json: if both source and target are in the chain, source must appear before target.
On violation: present the precondition edge with its `satisfies` description and suggest reordering. Return to Phase 0 with the corrected chain.
### 1.2 Suppression Conflict
For each suppression edge `(source, target)`: if both are in the chain, warn. Present the `satisfies` description explaining why co-activation is problematic.
Options:
- Remove one protocol from the chain
- Confirm with explicit scope differentiation (user declares the protocols address different scopes)
### 1.3 Missing Preconditions
For each protocol in the chain: check if any precondition source is missing. The wildcard `"source": "*"` (Katalepsis) is excluded from this check — it means "structurally last" not "requires all."
On missing precondition: suggest inserting the missing protocol at the correct position.
**Design note — chain-position × regret interaction**: The concern that unbounded-regret gates positioned late in a chain degrade user judgment quality is valid but not yet addressed. Phase 3 disposition operates per-gate without chain-position awareness. A future revision will introduce a decision load model that quantifies remaining gate cost (loop depth × regret weight) per disposition choice, replacing the removed position-ratio advisory with a structurally sound, Phase 2-integrated mechanism.
**On all validations passing**: proceed to Phase 2 with the validated chain.
## Phase 2: Catalog (Gate Inventory)
Read all protocol SKILL.md files in parallel (paths are deterministic after Phase 1 validation). For each protocol:
1. **Locate SKILL.md**: Read `{protocol}/skills/{skill}/SKILL.md`
2. **Extract TOOL GROUNDING**: Grep for `TOOL GROUNDING` section
3. **Parse each entry**: Extract Phase number, label, classification (`constitution` or `extension`), inline condition (parenthetical text after the entry, if any), and downstream safety reference (if stated)
Build the gate inventory:
```
List<{
protocol: String,
phase: Number,
kind: Qc | Qs,
label: String,
classification: constitution | extension,
condition: String?, -- inline condition text for split (extension) entries (e.g., "when explicit_arg(U)")
safety_net: String? -- downstream Constitution gate reference
}>
```
Constitution entries are gated (user judgment required); Extension entries are conditional auto-resolutions whose condition is recorded inline. Pairs of (extension)/(constitution) entries within the same Phase represent split conditional gates — the Extension path takes the auto-resolution when its condition fires; otherwise the Constitution path requires user judgment.
Present the inventory as an informational summary (no gate — Phase 3 is where the user reviews):
```
## Gate Inventory
{protocol}: {N} entries ({M} Constitution, {K} Extension)
- Phase {X} ({label}): {classification}{ — when condition if Extension}
...
Chain Total: {total} entries ({total_constitution} Constitution, {total_extension} Extension)
```
## Phase 3: Disposition (Composition-Level Gate Analysis)
Apply the disposition decision flow to each gate in the inventory. Constitution/Extension classification (parsed from TOOL GROUNDING) is the input; composition-level disposition determines whether each Constitution gate becomes PRESENT, PRUNE, or ELIDE within this specific chain. Extension entries (split conditional auto-resolutions) require no disposition — they fire when their inline condition holds and otherwise fall through to the paired Constitution entry within the same Phase.
### Disposition Decision Flow
For each Constitution gate G in the composition context:
```
1. Qs(G)? → PRESENT
2. domain(G) ∈ Dismissed? → PRUNE
3. unbounded_regret(G)? → PRESENT
4. domain(G) ∈ UserSupplies ∪ AIPropose? → PRESENT
5. Qc(G) ∧ bounded_regret(G) ∧ epistemic_access(G)? → ELIDE candidate
6. otherwise → PRESENT (conservative default)
```
Steps 2 and 4 are **conditional** — apply only when Horismos is in the chain and BoundaryMap is available. When Horismos is absent, skip steps 2 and 4 (flow reduces to steps 1, 3, 5, 6). Generate BoundaryMap-dependent steps as conditional rules in the template, not fixed dispositions.
**Epistemic access** in composition context — any of:
- `system_state(G)`: answer derivable from codebase/environment (AI can self-resolve)
- `answer(G) ⊆ output(prior)`: prior protocol in the chain produces output that entails this gate's answer (e.g., ResolvedEndpoint from Euporia entails Horismos Phase 0 scope confirmation)
- `BoundaryMap(domain(G)) = AIAutonomous`: user delegated decision authority to AI via Horismos (only when Horismos is in the chain)
**RESOLVE-OR-PRESENT** (for Qs gates in AIAutonomous domains): The Qs gate itself is never elided — instead, the protocol's Phase 1 context collection scope expands for AIAutonomous domains. If Phase 1 resolves the uncertainty (entropy → 0), the Qs gate is never reached. If entropy remains > 0, the Qs gate fires as PRESENT. Encode this as a conditional pipeline context rule when applicable.
### Catch-Chain Invariant
For every Constitution gate G whose disposition is ELIDE, verify:
```
disposition(G) = ELIDE ⟹ disposition(safety_net(G)) ≠ ELIDE
```
If violated: promote the safety net gate to PRESENT. This prevents cascading composition-time delegation from removing all user checkpointRelated in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.