📐
Capillary Technologies · Solution Architecture

Capillary SDD Writer

An AI-powered skill that transforms a JIRA epic or BRD into a publication-ready Solution Design Document.

/capillary-sdd-writer PROJ-1234  # explicit
# — or — paste a BRD and Claude auto-detects  # implicit
MCP-Verified APIs Live Endpoint Validation 5-Tier Golden Path 25-Point Self-Check arc42 Structure
The SA Challenge

What Makes SDD Writing Hard

🔍⚡

API Discovery & Validation

200+ Capillary endpoints across v1.1 / v2 / v3. The SA must identify which exact endpoint fits — then set up OAuth2 auth, craft a test payload, and execute a live call to confirm it works before a single SDD line is written.

200+
endpoints to navigate
3–5
manual steps per API confirmed
📋

Consistency Cost

Every SA structures sections, tables, and diagrams differently. Missing ADRs, incomplete NFRs, no Data Mapping — peer review and client handoff become inconsistent and require rework.

Change Request SDD
2–3 days
New Project Full SDD
1–1.5 weeks
📚

Context Gathering

Before writing a single line, the SA pieces together context from JIRA epics, BRD PDFs, past Confluence SDDs, email threads, and colleague notes. There is no single source of truth — context is routinely incomplete or contradictory.

4–6
sources consulted before the first draft
⚙️

Product Config & Validation

Many requirements can be satisfied through native Capillary product config (Tier 1) with no code needed. But there is no structured catalog — SAs manually check menus, confirm valid values, and chase the Config Team to verify what is configurable vs. what needs a custom integration.

Adds 1–2 extra review cycles
before Tier 1 vs. custom integration is confirmed
💡

The skill solves all four. It queries Confluence + JIRA for full context, checks the Capillary Docs MCP to resolve product configs, discovers and live-validates APIs, and enforces a 25-item structure checklist — all automatically.

Architecture Overview

Invocation + 9-Step Orchestration

EXPLICIT User types the slash command
/capillary-sdd-writer PROJ-4251
/capillary-sdd-writer "New client: mobile loyalty..."
IMPLICIT Claude detects context automatically

User pastes a BRD, opens a JIRA epic in IDE, or discusses integration requirements — skill fires without the slash command.

0
MCP Health
Probe Atlassian · CapDocs · Mermaid
GATE
1
Parse Input
JIRA ID · URL · BRD text
2
Research
Confluence search · API Registry
3
SDD Gate
Full vs Lite decision
GATE
4
Tier Mapping
Golden Path T1→T5
4b
Validate APIs
Live HTTP · validate_api.py
BASH ONLY
5
Write SDD
All sections · diagram validate
6
Self-Verify
25-item checklist · fix gaps
7
Save File
output-sdd/{Brand}-{date}.md
8
Publish
Optional · Confluence · confirm
Step 1 — Auto-routing (LLM decides from context)
JIRA ID detected → MCP fetch stories + criteria (no interview)
|
URL detected → Step 1b: fetch document
|
Minimal text → Step 1c: single-message interview
Skill Verification

Test Cases — Decision Logic Validation

🧪

These test scenarios verify the skill routes to the correct SDD mode and solution tier. Each can be run by providing the input text and checking the skill's Step 3 + Step 4 decisions.

ID
Input Scenario
Mode
Tier
Result
TC-01
New brand "RetailCo" · mobile app + POS integration · earn & redeem loyalty
Full SDD: new brand. T3 Neo for lookup-or-create wrap; T2 for standard earn/redeem endpoints. API Gateway mandatory.
Full SDD T2 + T3
TC-02
Existing RetailCo SDD · "add OTP verification to login flow" change request
Lite SDD: existing Full SDD covers base; ≤2 new flows; additive only. T2 for OTP API call.
Lite SDD T2
TC-03
Sync 50k members nightly from CRM via SFTP CSV · no existing SDD
Full SDD: new Connect+ pipeline is a new integration. T4 for async SFTP file import. Not T3 — batch size & async rule out Neo.
Full SDD T4
TC-04
Custom reward calculation: iterate over last 12 transactions to compute bonus points
Full SDD: Neo BLOCKER — loop over API results. Connect+ not applicable. T5 Custom AWS + mandatory ADR explaining why T1–T4 insufficient.
Full SDD T5 + ADR
TC-05
Enable tier-upgrade push notifications via Engage+ for existing client
Lite SDD: change is additive (Engage+ journey config), existing Full SDD covers integration base. T1 — platform config only, no new API integration.
Lite SDD T1
MCP Tool Integration

MCP: The Verified Data Layer

ATLASSIAN MCP
🔷

JIRA + Confluence

Auto-fetch epic stories · search existing SDDs for reuse

✓ Proceed on 401 (auth)
CAPILLARY DOCS MCP
📚

API Specifications

Verify every endpoint schema, version, headers before writing

✗ STOP if unavailable
VERIFIED
DATA
🧠
SDD
OUTPUT
MERMAID MCP
📊

Diagram Validation

Validate every Mermaid diagram for syntax before including

⚠ Proceed with note on connect error
RESOLUTION LOGIC
🔍

Role-Based Lookup

atlassian, jira, cap-docs, capillary_docs — resolved by role, not exact name

✓ Flexible server naming

Health check runs at Step 0 — before any work begins. Capillary Docs unavailable = full stop (no unverified APIs can be written). Other MCP failures = proceed with tagged notes in the SDD.

Anti-Documentation Errors

API Discovery & Provenance Enforcement

Every Standard API — decision flow
1
Search mcp__capillary_docs__search-specs for endpoint
2
If not found → try alternative terms and related endpoints
Found: Document with latest version · include curl example · tag ✓ VERIFIED (Capillary Docs)
Not found: Tag [UNVERIFIED] · no curl · client must confirm path

⚡ Neo / Connect+ Endpoints

Custom APIs designed by the SA — no MCP lookup needed. Tagged ✓ VALIDATED after live HTTP test in Step 4b.

API Registry (built in Step 2)
APIMCP SourceVersionStatus
/customers/lookupcap_docsv2✓ VER
/transactions/bulkcap_docsv2✓ VER
/points/isredeemablecap_docsv1.1✓ VER
/neo/x/v2/enrollcustom✓ VALID

🔒 Verified (MCP found it)

Key Notes: ✓ VERIFIED (Capillary Docs). Curl with realistic sample data included.

⚠ Unverified (not in MCP)

Key Notes: [UNVERIFIED — not found in Capillary Docs]. No curl. Client must confirm before implementation.

Documentation Accuracy

Live Endpoint Validation — validate_api.py

Auth Resolution — First Match Wins
1
--headers arg — explicit override, highest priority
2
CAPILLARY_BEARER_TOKEN env → Authorization: Bearer
3
CAPILLARY_API_KEY + SECRET → OAuth2 POST → JWT cached for session
4
No auth — tag [SKIPPED — set credentials]
# stdlib only — zero pip installs
python3 validate_api.py \
  --url "https://in.api.capillarytech.com/v2/customers/lookup" \
  --method GET
# → {"status_code": 200, "success": true}
Result Interpretation
StatusMeaningSDD Tag
200–299Confirmed live✓ VALIDATED
401 / 403Endpoint exists; test auth✓ VALIDATED
404Path may be wrong⚠ FAILED
Network errTimeout / unreachable⚠ FAILED
No credsUser skipped⚠ SKIPPED

🔑 Step 4b Credential Gate

Before asking for test data, the skill checks for CAPILLARY_BEARER_TOKEN, CAPILLARY_API_KEY, and SECRET. If none found → explicitly asks user. Never silently skips. User can type "skip validation" to proceed without credentials.

🌐 Cluster Routing

CAPILLARY_CLUSTER env: inin.api.capillarytech.com · eu, apac2, apac, us — token cached per session.

Solution Strategy

The Golden Path: 5-Tier Decision Framework

Core rule: Assign every requirement to the LOWEST viable tier. Each escalation must be justified with an ADR.

Tier 1
Product Config
Loyalty rules, tier logic, earn/burn, campaigns, standard reporting. No code. Config Team. Document as config spec, not API flow.
Config Team
Tier 2
Standard APIs
Real-time client integrations using existing Capillary endpoints. UI clients use API Gateway (User→B2B token). Always verify version via MCP.
Real-time
Tier 3
Neo API
Low-code orchestration — lookup-or-create, multi-API wrappers, derived fields. BLOCKED BY: loops, form-data, async/batch processing.
Low-Code
Tier 4
Connect+
Async / event-driven — SFTP CSV imports, Kafka consumer, scheduled batch. Kafka mode: call ONE Neo API per message only.
Async
Tier 5
Custom AWS
Custom infrastructure — only when T1–T4 have confirmed blockers. Lambda, S3, SQS, EventBridge. ADR always required.
ADR Required
Right-Sized Documentation

Full vs Lite SDD — Scale-Based Decision

📋

Full SDD

Triggered if ANY condition is true
  • New brand or client
  • New system integration
  • More than 3 new Neo flows
  • New Connect+ pipeline
  • Any Tier 5 requirement
  • Multi-phase project
  • New loyalty program architecture
Output — 11 sections
vs
📄

Lite SDD

Triggered only if ALL conditions are true
  • Existing Full SDD covers base integration
  • Change is additive or corrective only
  • 2–3 new flows or fewer
  • No new system integrations
Output — 7 sections
💡

Section 9 elements (Tier + Rationale, Process Flow, Sequence Diagram, API Spec, Data Mapping) are identical depth in both formats — Lite SDD = same rigour, smaller scope.

Interactive Workflow

Requirements Gathering — Single Message Interview

Input Routing (Step 1)
A
JIRA Epic ID — MCP auto-fetches stories + criteria. No interview.
B
URL — Fetch BRD doc; fallback to pasted text on failure
C
BRD text — Parse from message, proceed to Step 2
D
Minimal / ambiguous — trigger Step 1c interview

One message. All questions.

All 7 interview questions sent in a single message — never spread across turns. Prevents multi-turn friction. Unanswered → tagged [ASSUMPTION - TO BE CONFIRMED].

Step 1c — 7 Questions
Q1

Client Region

India / APAC / EU / US — cluster, currency, data residency

Q2

Existing Setup

New org or existing? Any active config?

Q3

Channels

Mobile / POS / web / CRM / ecommerce?

Q4

Auth Method

OTP, SSO, social, guest?

Q5

Data Volumes

Members, TPS, batch sizes?

Q6

Out of Scope

Phase exclusions, deferred features?

Q7

Sample Data for Validation

Test customer ID, mobile, till ID — needed for Step 4b live API calls

Quality Assurance

25-Item Self-Verification Checklist

6
Structure
  • File in output-sdd/
  • Revision history
  • Approval table
  • All 11 sections
  • Decimal numbering
  • Config data last
7
Content
  • All requirements in §9
  • All systems in diagram
  • Tier + rationale
  • Data mapping tables
  • 3+ ADRs
  • All 6 NFR attrs
  • Out-of-scope tagged
5
Diagrams
  • 6 color classes declared
  • 4 network subgraphs
  • autonumber on sequences
  • API Gateway in UI flows
  • All arrows labeled
7
APIs
  • Latest version via MCP
  • Provenance tag in Key Notes
  • Credentials requested
  • Auth headers documented
  • Realistic JSON samples
  • Conditional req = Yes*
  • No unconfirmed paths
5
Patterns
  • Lookup-or-create applied
  • API Gateway shown in UI flows
  • Neo blockers verified
  • Connect+ for file imports
  • No hardcoded IDs
Write
Author Mermaid diagram
Validate
Call Mermaid MCP for syntax
Fix or Proceed
Parse error → fix. Connection error → note
🎯
Rule
Never ship a broken diagram
Delivery

Output & Optional Confluence Publishing

⚙️
Step 7
Save locally
output-sdd/
{Brand}-SDD-{date}.md
💬
Step 8a
Propose path
"SA › India › {Brand} SDD"
🔐
Explicit Gate
User types
"confirm"
🌍
Step 8b
Region route
SA space → region page
Published
Confluence
Local file is primary artefact
🇮🇳
India
SA › India › {Brand}
🌏
APAC
SA › APAC › {Brand}
🇪🇺
EMEA
SA › EMEA › {Brand}
🇺🇸
US
SA › US › {Brand}
🔐

Never publish without explicit user confirmation. The skill proposes the path, waits for "confirm", then calls Atlassian MCP. Local Markdown is always written first — Confluence is entirely optional.

Summary

Why This Matters for Solution Architects

🔍

API Discovery Automated

The Capillary Docs MCP searches 200+ endpoints to find the exact API that fits the requirement — no manual docs digging.

Execution Gap Closed

validate_api.py calls endpoints live before documenting. HTTP 200 or 4xx proves the path exists. 404 flags a bad path immediately.

📐

Consistent arc42 Structure

25-item checklist enforces all 11 sections, ADRs, NFRs, data mapping columns, and realistic JSON samples — every time.

🎯

Right-Sized Format

Full SDD for new integrations. Lite SDD for additive changes. 5-tier Golden Path assigns the lowest viable architecture per requirement.

🤖

Explicit + Implicit Invocation

Type the slash command or just paste a BRD — the skill auto-detects context and routes to the correct path automatically.

🚀

Hours, Not Weeks

New project Full SDD: 1–1.5 weeks → hours. Change Request Lite SDD: 2–3 days → under an hour. From JIRA to publication-ready Markdown.

/capillary-sdd-writer <EPIC-ID-OR-BRD>
Built on Claude · MCP · Capillary Docs API  ·  Skill for Claude Code & claude.ai
What's Next

Roadmap: Making the Skill Even Smarter

1
Git Repo Integration

Connect the client's or Capillary's custom-logic git repos so the skill understands existing implementation patterns, past Neo/Connect+ jobs, and reusable code — avoiding re-documenting what is already built and surfacing integration constraints early.

2
Cross-SDD Reference Linking

Auto-search Confluence for related SDDs during generation and surface dependency links ("this flow reuses the auth pattern from ADAC SDD §4.2") — reducing duplicate design work and keeping the document graph consistent across clients.

3
JIRA Lifecycle Triggers

Automatically fire the skill when a JIRA epic transitions to In Progress or a custom SDD Required status — zero-touch initiation, SDD draft in Confluence before the SA's kickoff call even begins.

4
Region & Client Config Profiles

Capture org-specific defaults — preferred cluster, naming conventions, standard NFR targets, approved tech stack — per client region (India / US / EMEA / APAC) so every SDD starts closer to the finished state.

5
Automated Peer Review Mode

/capillary-sdd-review <URL> — skill reads an existing SDD from Confluence, runs the full 25-item checklist, and outputs a structured gap report with prioritised fix suggestions ready for the author to act on.