proof-composer
Validates entire engineering proof chain. Verifies architecture, backend maps, backend code, standardization, frontend types, infrastructure topology all compose correctly. This is the final DEPLOYMENT GATE - deployment blocked if proof chain invalid. Use when engineering thread completes all actions.
What this skill does
# proof-composer: System-Wide Proof Validation (DEPLOYMENT GATE)
## Purpose
Validate entire engineering proof chain and authorize deployment. This is the **final deployment gate** - nothing deploys without a valid composed proof.
**Key insight:** Each skill generates local proofs. proof-composer verifies they compose into a valid system-wide proof.
**Process:**
1. Collect all proofs (architecture, backend, frontend, infrastructure)
2. Verify version consistency (all use same spec version)
3. Validate proof chain (architecture → backend → standardization → frontend → infrastructure)
4. Check for gaps (missing proofs, incomplete verification)
5. Generate composed proof certificate (authorizes deployment)
---
## Position in Engineering Layer
You are skill #6 of 6 (FINAL GATE):
1. **system-architect** - Requirements → Specifications + Curry-Howard proofs
2. **backend-prover** - Specifications → Maps → Code + Runtime monitors
3. **standardization-layer** - Code → Middleware injection (naturality proofs)
4. **frontend-prover** - OpenAPI → TypeScript + Framework bindings + Type correspondence
5. **infrastructure-prover** - Services spec → Deployment configs + Topology isomorphism
6. **proof-composer** (YOU) - Validates entire chain + Authorizes deployment
---
## Input Requirements
**All proofs from previous skills:**
```
artifacts/engineering/proofs/
├── architecture/
│ ├── adt-correctness/
│ ├── functor-laws/
│ ├── composition-correctness/
│ ├── state-machines/
│ └── curry-howard-proofs/
│
├── backend/
│ ├── map-validation/
│ │ └── validation-report.json
│ ├── implementation-correctness/
│ ├── standardization/
│ │ └── naturality-certificate.proof
│ └── runtime-verification/
│
├── frontend/
│ └── type-correspondence/
│ └── openapi-to-typescript.proof
│
└── infrastructure/
└── topology/
└── deployment-isomorphism.proof
```
**Specification manifest:**
```
artifacts/engineering/specifications/manifest.json
```
**Generated artifacts:**
```
artifacts/engineering/
├── specifications/v{X}/ # From system-architect
├── maps/backend/ # From backend-prover Phase 1
├── code/backend/ # From backend-prover Phase 2
├── code/frontend/ # From frontend-prover
└── configs/ # From infrastructure-prover
```
---
## Validation Process
### Step 1: Collect All Proofs
```python
def collect_proofs():
"""
Collect all proof files from engineering artifacts
Returns dict of proofs by category
"""
proofs = {
'architecture': collect_architecture_proofs(),
'backend': collect_backend_proofs(),
'frontend': collect_frontend_proofs(),
'infrastructure': collect_infrastructure_proofs()
}
return proofs
def collect_architecture_proofs():
"""Collect from system-architect"""
return {
'adt_correctness': load_proof('architecture/adt-correctness/'),
'functor_laws': load_proof('architecture/functor-laws/'),
'composition': load_proof('architecture/composition-correctness/'),
'state_machines': load_proof('architecture/state-machines/'),
'curry_howard': load_proof('architecture/curry-howard-proofs/')
}
def collect_backend_proofs():
"""Collect from backend-prover + standardization-layer"""
return {
'map_validation': load_json('backend/map-validation/validation-report.json'),
'implementation': load_proof('backend/implementation-correctness/'),
'standardization': load_json('backend/standardization/naturality-certificate.proof'),
'runtime': load_proof('backend/runtime-verification/')
}
def collect_frontend_proofs():
"""Collect from frontend-prover"""
return {
'type_correspondence': load_json('frontend/type-correspondence/openapi-to-typescript.proof')
}
def collect_infrastructure_proofs():
"""Collect from infrastructure-prover"""
return {
'topology': load_json('infrastructure/topology/deployment-isomorphism.proof')
}
```
---
### Step 2: Verify Version Consistency
```python
def verify_version_consistency(proofs, manifest):
"""
Verify all proofs reference same specification version
Critical: Prevents race conditions where different skills
used different versions of the spec
"""
errors = []
# Get spec version from manifest
spec_version = manifest['version']
spec_hash = manifest['hash']
# Check architecture proofs
arch_version = proofs['architecture'].get('specification_version')
if arch_version != spec_version:
errors.append({
"type": "version_mismatch",
"skill": "system-architect",
"expected": spec_version,
"actual": arch_version
})
# Check backend proofs
backend_version = proofs['backend']['map_validation'].get('specification_version')
if backend_version != spec_version:
errors.append({
"type": "version_mismatch",
"skill": "backend-prover",
"expected": spec_version,
"actual": backend_version
})
# Check frontend proofs
frontend_version = proofs['frontend']['type_correspondence'].get('specification_version')
if frontend_version != spec_version:
errors.append({
"type": "version_mismatch",
"skill": "frontend-prover",
"expected": spec_version,
"actual": frontend_version
})
# Check infrastructure proofs
infra_version = proofs['infrastructure']['topology'].get('specification_version')
if infra_version != spec_version:
errors.append({
"type": "version_mismatch",
"skill": "infrastructure-prover",
"expected": spec_version,
"actual": infra_version
})
return {
"consistent": len(errors) == 0,
"specification_version": spec_version,
"specification_hash": spec_hash,
"errors": errors
}
```
---
### Step 3: Validate Proof Chain
```python
def validate_proof_chain(proofs):
"""
Verify proof chain composes correctly:
Requirements → Architecture (system-architect) ✓
↓
Backend Maps (backend-prover Phase 1) ✓
↓
Backend Code (backend-prover Phase 2) ✓
↓
Standardization (standardization-layer) ✓
↓
Frontend (frontend-prover) ✓
↓
Infrastructure (infrastructure-prover) ✓
"""
errors = []
# 1. Architecture proofs valid
if not architecture_proofs_valid(proofs['architecture']):
errors.append({
"type": "invalid_architecture_proof",
"details": "Architecture proofs failed validation"
})
# 2. Backend maps validated
if proofs['backend']['map_validation']['status'] != 'valid':
errors.append({
"type": "invalid_backend_maps",
"details": "Backend maps not validated"
})
# 3. Backend code matches maps
if not backend_code_matches_maps(proofs['backend']['implementation']):
errors.append({
"type": "code_map_mismatch",
"details": "Backend code doesn't match verified maps"
})
# 4. Standardization preserves composition
if not standardization_preserves_composition(proofs['backend']['standardization']):
errors.append({
"type": "standardization_broken",
"details": "Standardization doesn't preserve composition laws"
})
# 5. Frontend types correspond to backend API
if not proofs['frontend']['type_correspondence']['bijection']:
errors.append({
"type": "type_correspondence_failed",
"details": "Frontend types don't match backend API"
})
# 6. Infrastructure topology matches architecture
if not proofs['infrastructure']['topology']['isomorphism'Related in Web Dev
generating-lwc-components
IncludedLightning Web Components with PICKLES methodology and 165-point scoring. Use this skill when the user creates or edits LWC components, builds wire service patterns, or writes Jest tests for LWC. TRIGGER when: user creates/edits LWC components, touches lwc/**/*.js, .html, .css, .js-meta.xml files, or asks about wire service, SLDS, or Jest LWC tests. DO NOT TRIGGER when: Apex classes (use generating-apex), Aura components, or Visualforce.
tanstack-query
IncludedManage server state in React with TanStack Query v5. Set up queries with useQuery, mutations with useMutation, configure QueryClient caching strategies, implement optimistic updates, and handle infinite scroll with useInfiniteQuery. Use when: setting up data fetching in React projects, migrating from v4 to v5, or fixing object syntax required errors, query callbacks removed issues, cacheTime renamed to gcTime, isPending vs isLoading confusion, keepPreviousData removed problems.
document-processor-api
IncludedProcess documents with Nutrient DWS. Use when the user wants to generate PDFs from HTML or URLs, convert Office/images/PDFs, assemble or split packets, OCR scans, extract text/tables/key-value pairs, redact PII, watermark, sign, fill forms, optimize PDFs, or produce compliance outputs like PDF/A or PDF/UA. Triggers include convert to PDF, merge these PDFs, OCR this scan, extract tables, redact PII, sign this PDF, make this PDF/A, or linearize for web delivery.
nutrient-document-processing
IncludedProcess documents with Nutrient DWS. Use when the user wants to generate PDFs from HTML or URLs, convert Office/images/PDFs, assemble or split packets, OCR scans, extract text/tables/key-value pairs, redact PII, watermark, sign, fill forms, optimize PDFs, or produce compliance outputs like PDF/A or PDF/UA. Triggers include convert to PDF, merge these PDFs, OCR this scan, extract tables, redact PII, sign this PDF, make this PDF/A, or linearize for web delivery.
tanstack-query
IncludedManage server state in React with TanStack Query v5. Covers useMutationState, simplified optimistic updates, throwOnError, network mode (offline/PWA), and infiniteQueryOptions. Use when setting up data fetching, fixing v4→v5 migration errors (object syntax, gcTime, isPending, keepPreviousData), or debugging SSR/hydration issues with streaming server components.
accelint-nextjs-best-practices
IncludedNext.js performance optimization and best practices. Use when writing Next.js code (App Router or Pages Router); implementing Server Components, Server Actions, or API routes; optimizing RSC serialization, data fetching, or server-side rendering; reviewing Next.js code for performance issues; fixing authentication in Server Actions; or implementing Suspense boundaries, parallel data fetching, or request deduplication.