/phoenix-prd-pipeline:phoenix-contract-architectfrom phoenix-prd-pipeline
Transforms Phoenix Security requirements into precise API contracts: REST endpoints with auth patterns, tenant isolation, cursor-based pagination, response envelopes, event schemas with idempotency keys, and numeric error code taxonomy.
Ships in phoenix-prd-pipeline. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Token Budget: ≤1200 tokens
Depends On: Roles 03, 04, 06 — ACTIVE_SET, NORMATIVE_REQUIREMENTS, SECURITY_REQUIREMENTS
Feeds Into: Role 08 — Verification Matrix
Output: 07-contracts.md
GET /api/v1/{tenantId}/resource
Authorization: Bearer {token}
# tenantId extracted from JWT — NEVER trusted from request body
{
"data": { ... },
"meta": {
"tenant_id": "...",
"request_id": "uuid-v4",
"timestamp": "ISO 8601"
},
"errors": []
}
?cursor=<opaque_token>&limit=100 (max 500)
Response: { next_cursor, total_count }
| Range | Domain |
|---|---|
| 4001–4099 | Auth / authz |
| 4100–4199 | Tenant isolation violations |
| 4200–4299 | Input validation |
| 4300–4399 | Integration / ingestion errors |
| 4400–4499 | Rate limit / throttle |
| 5001–5099 | Internal service errors |
| 5100–5199 | AI/LLM errors |
| 5200–5299 | Upstream integration failures |
schema_version field required in all events---
meta:
role: 07-contract-architect
session_id: session-[YYYYMMDD-HHMMSS]
token_count: [actual]
api_count: [N]
event_count: [N]
status: complete
next_role: 08-verification-matrix
---
### CONTRACTS
#### APIS
- API-001: <METHOD> <PATH>
- Auth: Bearer | API-key | internal-only
- Tenant_Isolation: JWT-extracted | path-param validated | N/A
- Request_Schema: {field: type [required|optional] — constraints}
- Response_Schema: {Phoenix envelope + data shape}
- Errors: [E-code: condition]
- Invariants: [statements that must hold]
- Idempotency: idempotency-key header | N/A
- Examples: {minimal request + response}
#### EVENTS (if applicable)
- EVT-001: <event_name>
- Producer / Consumers
- Schema: {fields + types + schema_version}
- Delivery: at-least-once | exactly-once
- Idempotency: idempotency_key field required
#### TYPES
- T-001: <TypeName> {field: type — constraint}
#### ERROR_TAXONOMY
- E-4001: UNAUTHORIZED → token missing/invalid → re-authenticate → retry: no
- E-4100: TENANT_ISOLATION_VIOLATION → tenantId mismatch → report bug → retry: no
- E-4301: INTEGRATION_INGESTION_FAILED → upstream error → retry with backoff → retry: yes (max 3)
- E-5001: INTERNAL_ERROR → server fault → report → retry: yes (max 1)
- E-5101: LLM_ERROR → model/prompt failure → surface to user → retry: yes (max 1)
Save: outputs/{session-id}/07-contracts.md
→ Pass to: phoenix-verification-matrix (Role 08)
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub security-phoenix-demo/security-skills-claude-code --plugin phoenix-prd-pipeline13 skills in this plugin
/phoenix-ambiguity-hunterRole 05 of the Phoenix Security spec pipeline. Red-teams normative requirements for Phoenix-specific failure modes: multi-tenant isolation gaps, vague integration surface definitions, AI agent safety holes (PSC-08), missing auth controls (PSC-06), reachability vs CVSS conflicts, RFC 2119 drift, competitor brand exposure, and requirements that will cause incorrect code generation or missed security controls. Use this skill when you have a requirements set that needs quality review, when someone says "review these requirements", "find the ambiguities", "red-team this spec", "what will break if we implement this", or "clean up these MUSTs". Loops back to phoenix-requirements-engineer if critical issues found (max 3 iterations).
/phoenix-batch-plannerRole 09 of the Phoenix Security spec pipeline. Slices a Phoenix Security feature into safe, incremental batches sized for a 12-person team (1–3 engineer-days each), with P0 security requirements always in Batch 1, API contracts before consumers, integrations last, explicit rollback strategies for irreversible steps, AI gate flags for LLM-touching batches, and a Cursor plan summary for direct drop into .cursor/plans/. Use this skill when you have verified requirements and contracts and need a delivery plan, or when someone says "create the implementation plan", "batch this up", "how do we build this", "create the delivery batches", "sprint plan for this feature", or "cursor plan". Always run after phoenix-verification-matrix and before phoenix-final-gate.
Other plugins' skills for the same job