@vesviet/agent-skills 5.6.1 → 5.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/INDEX.md +5 -5
- package/README.md +1 -1
- package/VERSION +1 -1
- package/adapters/antigravity/a2a-config.template.yaml +1 -1
- package/adapters/antigravity/role-skill-index.json +12 -12
- package/adapters/claude/CLAUDE_ADAPTER.md +1 -1
- package/core/contracts/README.md +1 -1
- package/core/contracts/schemas/data-pipeline-spec.json +1 -1
- package/core/contracts/schemas/design-tokens-spec.json +19 -0
- package/core/contracts/schemas/security-audit.json +143 -12
- package/core/contracts/schemas/system-design-spec.json +9 -1
- package/core/contracts/schemas/ux-flow-spec.json +66 -0
- package/core/roles/ai-systems-engineer.md +31 -18
- package/core/roles/aws-engineer.md +33 -29
- package/core/roles/backend-developer.md +6 -4
- package/core/roles/content-manager.md +7 -7
- package/core/roles/data-engineer.md +39 -36
- package/core/roles/qa-engineer.md +18 -18
- package/core/roles/references/ai-systems-engineer-review-checklist.md +11 -3
- package/core/roles/references/aws-engineer-review-checklist.md +29 -16
- package/core/roles/references/content-manager-governance-standards.md +2 -2
- package/core/roles/references/content-manager-review-checklist.md +7 -1
- package/core/roles/references/data-engineer-review-checklist.md +11 -3
- package/core/roles/references/qa-engineer-review-checklist.md +10 -5
- package/core/roles/references/security-engineer-review-checklist.md +8 -0
- package/core/roles/references/solution-architect-review-checklist.md +6 -1
- package/core/roles/references/system-engineer-review-checklist.md +11 -0
- package/core/roles/references/ui-ux-designer-review-checklist.md +12 -0
- package/core/roles/security-engineer.md +35 -5
- package/core/roles/solution-architect.md +7 -7
- package/core/roles/system-engineer.md +9 -4
- package/core/roles/ui-ux-designer.md +17 -3
- package/core/skills/agent/architect-mcp-server/SKILL.md +3 -3
- package/core/skills/agent/decompose-agentic-system/SKILL.md +1 -1
- package/core/skills/ai/deploy-vllm-inference/SKILL.md +14 -14
- package/core/skills/ai-agent/agent-evaluation/SKILL.md +5 -0
- package/core/skills/ai-agent/context-optimization/SKILL.md +9 -0
- package/core/skills/backend/add-api-endpoint/SKILL.md +1 -0
- package/core/skills/backend/add-event-handler/SKILL.md +1 -0
- package/core/skills/backend/add-service-client/SKILL.md +1 -0
- package/core/skills/backend/build-mcp-server/SKILL.md +1 -0
- package/core/skills/backend/implement-auth/SKILL.md +1 -0
- package/core/skills/backend/implement-structured-outputs/SKILL.md +1 -0
- package/core/skills/backend/optimize-postgres/SKILL.md +1 -0
- package/core/skills/backend/scaffold-new-service/SKILL.md +1 -0
- package/core/skills/content/audit-content/SKILL.md +3 -2
- package/core/skills/content/audit-content/references/information-gain-rubric.md +1 -1
- package/core/skills/content/design-content-strategy/SKILL.md +6 -5
- package/core/skills/content/design-content-strategy/references/information-gain-and-decay-triage.md +2 -2
- package/core/skills/content/optimize-seo/SKILL.md +6 -5
- package/core/skills/content/optimize-seo/references/geo-ai-citation-playbook.md +2 -2
- package/core/skills/content/optimize-seo/references/process-and-checklist.md +1 -1
- package/core/skills/content/repurpose-content/SKILL.md +4 -3
- package/core/skills/content/write-article/SKILL.md +6 -5
- package/core/skills/content/write-copy/SKILL.md +3 -2
- package/core/skills/document/pptx/SKILL.md +1 -0
- package/core/skills/foundation/design-review/SKILL.md +11 -1
- package/core/skills/foundation/design-ux-flow/SKILL.md +13 -1
- package/core/skills/foundation/performance-profiling/SKILL.md +3 -1
- package/core/skills/foundation/write-tests/SKILL.md +11 -10
- package/core/skills/frontend/anti-ui-slop-finish-gate/SKILL.md +5 -0
- package/core/skills/frontend/design-md-specification/SKILL.md +1 -0
- package/core/skills/frontend/design-system-engineering/SKILL.md +4 -2
- package/core/skills/meetings-analysis/analyze-business-requirements/SKILL.md +1 -1
- package/core/skills/platform/add-telemetry-instrumentation/SKILL.md +2 -1
- package/core/skills/platform/aws-infrastructure/SKILL.md +12 -11
- package/core/skills/platform/debug-runtime-platform/SKILL.md +1 -0
- package/core/skills/platform/setup-gpu-finops/SKILL.md +4 -0
- package/core/skills/platform/setup-llm-gateway/SKILL.md +2 -0
- package/core/skills/platform/supply-chain-security/SKILL.md +1 -0
- package/core/skills/platform/system-design/SKILL.md +7 -0
- package/core/skills/security-data/build-data-pipeline/SKILL.md +15 -14
- package/core/skills/security-data/build-data-pipeline/references/producer-contracts-and-lakehouse.md +5 -5
- package/core/skills/security-data/database-maintenance/SKILL.md +1 -0
- package/core/skills/security-data/database-maintenance/references/relational-and-vector-maintenance.md +5 -5
- package/core/skills/security-data/manage-secrets/SKILL.md +3 -0
- package/core/skills/security-data/optimize-olap-database/SKILL.md +14 -13
- package/core/skills/security-data/optimize-olap-database/references/olap-database-guide.md +2 -2
- package/core/skills/security-data/prompt-injection-defense/SKILL.md +3 -0
- package/core/skills/security-data/query-analytical-engine/SKILL.md +8 -7
- package/core/skills/security-data/query-analytical-engine/references/analytical-query-guide.md +3 -3
- package/core/skills/security-data/security-audit/SKILL.md +8 -1
- package/core/workflows/curriculum-delivery.md +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: design-system-engineering
|
|
3
3
|
description: Use when engineering design token architectures, calculating concentric border radii, establishing perceptual OKLCH color ramps, and verifying APCA contrast tables.
|
|
4
|
+
version: 2.0.0
|
|
4
5
|
allowed-tools: [read_file, write_file, edit_file, create_file, search_code, run_build]
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -64,7 +65,8 @@ Engineer scalable design token architectures, calculate concentric border radii
|
|
|
64
65
|
- *Discernible non-text dividers and subtle borders*: $L_c \ge 15$.
|
|
65
66
|
- *Placeholder / disabled text target*: $L_c \approx 30$.
|
|
66
67
|
- **Token Portability & Syntax**:
|
|
67
|
-
- Tokens must be exported to CSS variables and
|
|
68
|
+
- Tokens must be exported to CSS variables and DTCG Design Tokens Format Module 2025.10 JSON (first stable release; `$value`/`$type` syntax) for seamless Figma Variables synchronization; Style Dictionary v4 DTCG mode, Tokens Studio, and Terrazzo are the reference interchange consumers.
|
|
69
|
+
- Validate every token file against the DTCG format before pipeline adoption; reject files that mix legacy `{value}` syntax with DTCG `$value`.
|
|
68
70
|
- Avoid mixing styling paradigms; standardize on CSS custom properties or Tailwind `@theme` directives.
|
|
69
71
|
|
|
70
72
|
## Suggested Process
|
|
@@ -112,7 +114,7 @@ When producing design system specifications, emit `contracts/schemas/ui-componen
|
|
|
112
114
|
- [ ] APCA contrast verified: body text achieves $L_c \ge 75$ and headlines/controls achieve $L_c \ge 60$
|
|
113
115
|
- [ ] Semantic tokens define both light and dark surface modes without color inversion artifacts
|
|
114
116
|
- [ ] Component tokens limited to $\le 3$ documented exceptions per component
|
|
115
|
-
- [ ] Design tokens exported to
|
|
117
|
+
- [ ] Design tokens exported to DTCG Design Tokens Format Module 2025.10 (`$value`/`$type`) for Figma and toolchain portability
|
|
116
118
|
|
|
117
119
|
## Security Guardrails (OWASP ASI)
|
|
118
120
|
|
|
@@ -115,7 +115,7 @@ Scenario: [Happy path scenario]
|
|
|
115
115
|
## Security Guardrails (OWASP ASI)
|
|
116
116
|
|
|
117
117
|
- **ASI01 Goal Hijack**: cross-check refined requirements against original stakeholder intent.
|
|
118
|
-
- **ASI02
|
|
118
|
+
- **ASI02 Tool Misuse & Exploitation**: restrict agentic features to least-privilege MCP tool allowlists and mandatory kill-switches.
|
|
119
119
|
- **ASI07 Inter-Agent Communication**: hand off requirements strictly via validated `feature-ticket.json` schemas.
|
|
120
120
|
- **ASI09 Human Oversight**: enforce mandatory human sign-off on AI-assisted requirements before sprint lock.
|
|
121
121
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: add-telemetry-instrumentation
|
|
3
3
|
description: Add or update logging, metrics, and tracing by following the repo's observability patterns and OpenTelemetry (OTel) GenAI Semantic Conventions. Use when a service, feature, endpoint, job, or integration needs operational visibility — including AI/LLM features requiring token-level tracing (gen_ai.usage.tokens, gen_ai.response.model, TTFT), kernel-level eBPF socket telemetry, and MWMBR SLI recording rules.
|
|
4
|
+
version: 2.0.0
|
|
4
5
|
allowed-tools: [read_file, write_file, edit_file, create_file, search_code, run_tests, run_linter, run_build, execute_command]
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -27,7 +28,7 @@ Use this skill when code changes need matching observability so operators can un
|
|
|
27
28
|
- **EBPF-SOCKET-TELEMETRY**: deploy kernel-level eBPF socket profiling (Cilium Hubble, Grafana Beyla, Coroot) to capture L4/L7 flow telemetry, TCP retransmits, socket buffer queue drops, and DNS resolution latency directly from kernel space without injecting sidecar proxies
|
|
28
29
|
- **OTEL-V130-GENAI-CONVENTIONS**: use stable OpenTelemetry GenAI conventions (opt in via `OTEL_SEMCONV_STABILITY_OPT_IN=genai`); mandate `gen_ai.system`, `gen_ai.request.model`, `gen_ai.response.model`, `gen_ai.usage.tokens`, `gen_ai.usage.input_tokens`, `gen_ai.usage.output_tokens`, `gen_ai.response.finish_reasons`, and Time-To-First-Token (TTFT) for streaming responses
|
|
29
30
|
- **MWMBR-SLI-RECORDING-RULES**: configure Prometheus/OTel metric recording rules supporting Multi-Window Multi-Burn-Rate (MWMBR) error budget alerting across short (5m, 30m, 2h) and long (1h, 6h, 3d) evaluation windows with empty-vector coalescing (`or on() vector(0)`)
|
|
30
|
-
- **OTEL-PROFILING-4TH-PILLAR**: use continuous profiling
|
|
31
|
+
- **OTEL-PROFILING-4TH-PILLAR**: use continuous profiling via the OTLP profiling signal (public Alpha since 2026-03; eBPF agent collects most languages with zero code changes) alongside logs/metrics/traces — Pyroscope and Parca are the reference backends; treat the signal as alpha and keep a Parca/Pyroscope-native export path
|
|
31
32
|
- **NATIVE-HISTOGRAMS**: prefer native exponential histograms for dynamic bucket resolution over fixed-bucket counts
|
|
32
33
|
- **DORA-METRIC-SPANS**: emit CI/CD and deployment spans (`cicd.pipeline.run.*`, `deploy.environment`) for automated DORA metric computation
|
|
33
34
|
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: aws-infrastructure
|
|
3
3
|
description: Provision, configure, and optimize AWS cloud infrastructure via OpenTofu state KMS encryption, Crossplane Go compositions, Bottlerocket distroless EKS nodes, and IAM Zero-Trust. Use when provisioning VPCs, EKS, RDS, S3, Bedrock, or specialized silicon; authoring EKS Pod Identity roles and SCPs; or enforcing FinOps cost tags.
|
|
4
|
+
version: 2.0.0
|
|
4
5
|
allowed-tools: [read_file, write_file, edit_file, create_file, search_code, run_tests, run_linter, run_build, execute_command]
|
|
5
6
|
---
|
|
6
7
|
|
|
7
8
|
# AWS Infrastructure
|
|
8
9
|
|
|
9
|
-
Use this skill when designing, provisioning, or operating AWS cloud infrastructure using OpenTofu v1.
|
|
10
|
+
Use this skill when designing, provisioning, or operating AWS cloud infrastructure using OpenTofu v1.13+ with client-side KMS state encryption, Crossplane v2.4+ Go compositions, Bottlerocket distroless EKS nodes, AWS IAM Zero-Trust, Karpenter v1.x autoscaling (or managed EKS Auto Mode), Graviton5/Trainium3/Inferentia2 compute, and Amazon Bedrock PrivateLink isolation.
|
|
10
11
|
|
|
11
12
|
## When to Use
|
|
12
13
|
|
|
13
14
|
- provisioning VPCs, Bottlerocket EKS clusters, Aurora/RDS, or S3 storage via OpenTofu or Crossplane
|
|
14
15
|
- authoring IAM roles with EKS Pod Identity (v1.31+) or Control Tower Service Control Policies (SCPs)
|
|
15
16
|
- deploying sidecarless service networking via AWS VPC Lattice (Gateway API) and IAM SigV4 auth
|
|
16
|
-
- configuring Karpenter v1.
|
|
17
|
+
- configuring Karpenter v1.x declarative autoscaling (EKS Auto Mode as the managed default) with Graviton5 (c9g, m9g, r9g) and Spot fleets
|
|
17
18
|
- provisioning Amazon Bedrock PrivateLink VPC endpoints with Guardrails v2 (contextual grounding >= 0.7)
|
|
18
19
|
- enforcing FinOps cost allocation tags (`team`, `service`, `environment`, `cost-center`) at apply time
|
|
19
20
|
- emitting the `aws-infra-spec.json` machine handoff for downstream DevOps or System Engineers
|
|
@@ -45,12 +46,12 @@ terraform {
|
|
|
45
46
|
|
|
46
47
|
## Core Rules
|
|
47
48
|
|
|
48
|
-
- **OPENTOFU-KMS-LOCK**: All IaC state and plans must be client-side encrypted in-memory via OpenTofu v1.
|
|
49
|
-
- **CROSSPLANE-COMPOSITION-LOCK**: Universal cloud control planes must use Crossplane
|
|
49
|
+
- **OPENTOFU-KMS-LOCK**: All IaC state and plans must be client-side encrypted in-memory via OpenTofu v1.13+ using AWS KMS (AES-GCM) with `enforced = true`; unencrypted remote state in S3 is prohibited.
|
|
50
|
+
- **CROSSPLANE-COMPOSITION-LOCK**: Universal cloud control planes must use Crossplane v2.4+ Compositions powered by compiled Go functions (`function-go-templating`) or KCL; unstructured YAML patch-and-transform is banned.
|
|
50
51
|
- **BOTTLEROCKET-LOCK**: EKS node pools must run AWS Bottlerocket distroless container OS (`amiFamily: Bottlerocket` in `EC2NodeClass`) with SELinux enforcing and dm-verity integrity; general-purpose Linux with shells is prohibited.
|
|
51
52
|
- **AWS-IAM-ZERO-TRUST-LOCK**: Enforce IAM Identity Center for humans and EKS Pod Identity (v1.31+) with `pods.eks.amazonaws.com` for workloads; ban static IAM users and long-lived AKIA keys via root SCP.
|
|
52
|
-
- **KARPENTER-AUTOSCALING-LOCK**: Compute autoscaling must use Karpenter v1.
|
|
53
|
-
- **
|
|
53
|
+
- **KARPENTER-AUTOSCALING-LOCK**: Compute autoscaling must use EKS Auto Mode (managed Karpenter, default for new clusters) or self-managed Karpenter v1.x `NodePool` manifests with `WhenEmptyOrUnderutilized` consolidation and disruption budgets; static node groups are prohibited.
|
|
54
|
+
- **GRAVITON5-FIRST-LOCK**: Default compute to AWS Graviton5 (c9g, m9g, r9g — all GA by 2026-08; Graviton4 only where a Graviton5 family lacks regional availability); Trainium3 (trn3) for AI training and Inferentia2 (inf2) for inference; enforce multi-architecture images (`linux/arm64,linux/amd64`) in CI/CD.
|
|
54
55
|
- **VPC-LATTICE-LOCK**: Cross-VPC and cross-account service networking must route through AWS VPC Lattice via Gateway API (`amazon-vpc-lattice`) with IAM SigV4 auth; proxy sidecars are prohibited.
|
|
55
56
|
- **BEDROCK-ISOLATION-LOCK**: Bedrock endpoints must route exclusively through PrivateLink VPC endpoints; enforce Guardrails v2 with contextual grounding >= 0.7 and token-level cost attribution.
|
|
56
57
|
- **FINOPS-LOCK**: Apply mandatory cost allocation tags (`team`, `service`, `environment`, `cost-center`) enforced via SCP at creation time; review Compute Optimizer rightsizing monthly.
|
|
@@ -68,7 +69,7 @@ Configure multi-account landing zone SCPs, IAM Identity Center, VPC subnets, Pri
|
|
|
68
69
|
Author customer-managed IAM roles with EKS Pod Identity trust policies (`pods.eks.amazonaws.com`). Submit IAM definitions to Security Engineer and validate with IAM Access Analyzer.
|
|
69
70
|
|
|
70
71
|
### Step 4: Provision Compute, Storage & Managed AI via IaC
|
|
71
|
-
Deploy OpenTofu v1.
|
|
72
|
+
Deploy OpenTofu v1.13+ modules with KMS state encryption or Crossplane Go compositions. Configure Bottlerocket EKS clusters, Karpenter Graviton4 NodePools, Aurora Multi-AZ, and Bedrock PrivateLink endpoints.
|
|
72
73
|
|
|
73
74
|
### Step 5: Validate, Verify & Emit Machine Contract
|
|
74
75
|
Verify CIS benchmarks via AWS Config and telemetry via ADOT/CloudWatch. Emit `contracts/schemas/aws-infra-spec.json` for downstream DevOps Engineer consumption.
|
|
@@ -79,7 +80,7 @@ Verify CIS benchmarks via AWS Config and telemetry via ADOT/CloudWatch. Emit `co
|
|
|
79
80
|
- [ ] Crossplane Compositions authoring with compiled Go functions (`function-go-templating`) or KCL.
|
|
80
81
|
- [ ] EKS worker nodes run Bottlerocket distroless OS with SELinux enforcing and dm-verity active.
|
|
81
82
|
- [ ] Zero static AKIA access keys; workload credentials federated via EKS Pod Identity (v1.31+).
|
|
82
|
-
- [ ] Karpenter v1.
|
|
83
|
+
- [ ] Karpenter v1.x autoscaling (or EKS Auto Mode) configured with Graviton5 and `WhenEmptyOrUnderutilized` consolidation.
|
|
83
84
|
- [ ] VPC Lattice Gateway API configured with IAM SigV4 authorization; zero proxy sidecars.
|
|
84
85
|
- [ ] Bedrock accessed exclusively via PrivateLink; Guardrails v2 configured with grounding >= 0.7.
|
|
85
86
|
- [ ] Mandatory cost allocation tags (`team`, `service`, `environment`, `cost-center`) enforced by SCP.
|
|
@@ -106,9 +107,9 @@ Skip emission for local sandbox experimentation where no cloud resources are pro
|
|
|
106
107
|
## Security Guardrails (OWASP ASI)
|
|
107
108
|
|
|
108
109
|
- **ASI03 Identity & Privilege Abuse**: Enforce EKS Pod Identity and IAM Identity Center; reject wildcard permissions; run IAM Access Analyzer before apply.
|
|
109
|
-
- **ASI04 Supply Chain**: Mandate Bottlerocket distroless AMI and ECR immutable KMS-encrypted repositories; verify Bedrock PrivateLink isolation.
|
|
110
|
-
- **ASI05
|
|
111
|
-
- **ASI07 Inter-Agent Communication**: Treat `aws-infra-spec.json` as authoritative contract; validate schema before handing off to DevOps Engineer.
|
|
110
|
+
- **ASI04 Agentic Supply Chain**: Mandate Bottlerocket distroless AMI and ECR immutable KMS-encrypted repositories; verify Bedrock PrivateLink isolation.
|
|
111
|
+
- **ASI05 Unexpected Code Execution**: Never execute unvalidated scripts on EC2 hosts; manage Bottlerocket via transactional `apiclient` API without interactive shells.
|
|
112
|
+
- **ASI07 Insecure Inter-Agent Communication**: Treat `aws-infra-spec.json` as authoritative contract; validate schema before handing off to DevOps Engineer.
|
|
112
113
|
- **ASI09 Human-Agent Trust Exploitation**: Always surface wildcard permissions and unencrypted endpoints honestly; do not claim compliance without verification.
|
|
113
114
|
|
|
114
115
|
## Related Skills
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: debug-runtime-platform
|
|
3
3
|
description: Investigate deployment, environment, runtime, and rollout issues that are not purely application-code bugs. Use when the service behaves differently across environments or when deployment health is unclear.
|
|
4
|
+
version: 1.0.0
|
|
4
5
|
allowed-tools: [read_file, write_file, edit_file, create_file, search_code, run_tests, run_linter, run_build, execute_command]
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: setup-gpu-finops
|
|
3
3
|
description: Configure GPU telemetry, DCGM metrics, and Kubecost to attribute AI compute costs to specific namespaces or teams. Use when managing GPU infrastructure budgets, tracking AI workload unit economics, or optimizing accelerator capacity.
|
|
4
|
+
version: 2.0.0
|
|
4
5
|
allowed-tools: [read_file, write_file, edit_file, create_file, search_code, run_tests, run_linter, run_build, execute_command]
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -18,6 +19,9 @@ Use this skill to implement cost transparency for self-hosted AI models and GPU
|
|
|
18
19
|
- **MIG-MULTI-TENANT-ISOLATION**: For H100/A100/B200, configure NVIDIA MIG (Multi-Instance GPU) partitions to provide hardware-level isolation between teams sharing the same physical GPU — enforces memory and compute boundaries and prevents one tenant's OOM from affecting another's inference workload.
|
|
19
20
|
- **KEDA-INFERENCE-AUTOSCALING**: Deploy KEDA ScaledObjects driven by vLLM or Triton inference queue depth metrics to scale model replicas to zero when queues are empty for >15 minutes — configure `cooldownPeriod: 900s` to prevent flapping.
|
|
20
21
|
- **VLLM-APC-COST**: Enable vLLM v0.6+ Automatic Prefix Caching (APC) to reuse KV cache for repeated system prompts; structure prompts with static content first and dynamic user content last for maximum cache hit rate — reduces GPU compute cost by 20-60% for high-traffic repeated-context workloads.
|
|
22
|
+
- **KV-CACHE-OFFLOAD-COST (2026)**: for agentic and long-context workloads, extend KV cache into CPU RAM / storage tiers (vLLM-SGLang offloading, NVIDIA ICMS, storage-backed KV) before scaling GPU count — offloaded KV turns idle GPU VRAM back into serving capacity; price the tiers separately in cost dashboards.
|
|
23
|
+
- **SPECULATIVE-DECODING-THROUGHPUT (2026)**: EAGLE-3 / MTP draft models deliver up to 6.5x decode throughput on supported stacks (vLLM, SGLang; TPU support since 2026-10) — model the throughput-per-dollar gain using measured draft acceptance rate, and treat acceptance < ~70% as a net loss.
|
|
24
|
+
- **RACK-SCALE-PRICING (2026)**: maintain pricing sheets for rack-scale Blackwell systems (GB300 NVL72: 72 GPUs, ~278GB HBM3e each, NVLink-pooled domain) with per-GPU fractional allocation math; track the Vera Rubin roadmap for refresh depreciation windows.
|
|
21
25
|
|
|
22
26
|
## Suggested Process
|
|
23
27
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: setup-llm-gateway
|
|
3
3
|
description: Configure a centralized LLM proxy gateway for token routing, budgeting, and failover. Use when deploying multi-model routing, enforcing token rate limits, managing provider credentials, or centralizing AI observability.
|
|
4
|
+
version: 2.0.0
|
|
4
5
|
allowed-tools: [read_file, write_file, edit_file, create_file, search_code, run_tests, run_linter, run_build, execute_command]
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -26,6 +27,7 @@ Use this skill to implement an AI infrastructure gateway (e.g., LiteLLM, Portkey
|
|
|
26
27
|
Evaluate and select the LLM gateway engine based on technical requirements:
|
|
27
28
|
- LiteLLM Proxy for Python/Kubernetes native environments supporting 100+ LLM providers.
|
|
28
29
|
- Portkey or Cloudflare AI Gateway for edge-deployed, managed caching and routing pipelines.
|
|
30
|
+
- Agent Router (formerly Envoy AI Gateway; renamed 2026-09) for Kubernetes-native inference-aware routing via Gateway API Inference Extension (InferencePool, endpoint picking for KV/prefix-aware routing) when the gateway fronts self-hosted vLLM/SGLang fleets.
|
|
29
31
|
- Verify support for streaming responses, function/tool calling passthrough, and structured JSON output constraints.
|
|
30
32
|
|
|
31
33
|
### 2. Deploy Gateway Infrastructure & Vault Credentials
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: supply-chain-security
|
|
3
3
|
description: Implement software supply chain security by generating SBOMs (CycloneDX/SPDX), enforcing SLSA build provenance levels, integrating artifact signing (Sigstore), and maintaining VEX context for vulnerability management. Use when hardening CI/CD pipelines, generating per-build inventory, achieving SLSA Level 2 or 3 compliance, or auditing third-party dependencies including MCP server registries.
|
|
4
|
+
version: 1.0.0
|
|
4
5
|
allowed-tools: [read_file, write_file, edit_file, create_file, search_code, run_tests, run_linter, run_build, execute_command]
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: system-design
|
|
3
3
|
description: Design, specify, and document complex system architectures covering compute, network, storage, middleware, and AI inference layers. Translate NFRs into measurable infrastructure targets and produce capacity models. Use when designing or reviewing system topology, sizing infrastructure, planning capacity, or specifying AI infrastructure (GPU, inference servers, vector databases).
|
|
4
|
+
version: 2.0.0
|
|
4
5
|
allowed-tools: [read_file, write_file, edit_file, create_file, search_code, run_tests, run_linter, run_build, execute_command]
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -31,6 +32,9 @@ Use this skill when designing system topology for a new service or infrastructur
|
|
|
31
32
|
- **LLM-SLOS & TOKEN-ECONOMICS**: Set measurable LLM SLOs ($TTFT_{P95} \le 800\text{ms}$, $TBT_{P95} \le 25\text{ms}$, throughput $> 40$ tokens/s per user); compute Cost-Per-Token ($CPT$) and enforce Value-Per-Token ($VPT \ge 4 \times CPT$) viability before sizing clusters.
|
|
32
33
|
- **VECTOR-DB-TUNING**: Explicitly specify HNSW $m$ (connectivity), $ef\_construction$ (build quality), and query-time $ef$ (recall-latency trade-off).
|
|
33
34
|
- **EMBEDDING-CACHE**: Always design an embedding cache layer; repeated embedding of identical content is the most common preventable AI cost spike.
|
|
35
|
+
- **KV-CACHE-TIERING (2026)**: For agentic and long-context workloads, evaluate KV-cache offloading tiers (GPU → CPU RAM → storage; vLLM/SGLang offloading, NVIDIA ICMS) before scaling GPU count; record the tiering decision in `ai_infrastructure.kv_cache_tiering` — idle GPU VRAM used as a KV warehouse is the most expensive storage in the stack.
|
|
36
|
+
- **SPECULATIVE-DECODING-DECISION (2026)**: Evaluate EAGLE-3/MTP speculative decoding as a capacity lever for decode-bound workloads (up to 6.5x throughput on supported stacks); gate the decision on measured draft acceptance rate (net loss below ~70%) and record it in `ai_infrastructure.speculative_decoding`.
|
|
37
|
+
- **DRA-GPU-ALLOCATION (2026)**: On Kubernetes v1.34+, allocate accelerators via DRA ResourceClaims (GA; admin-access and extended-resource support GA in v1.36/v1.37) with structured VRAM requests instead of opaque integer `nvidia.com/gpu` counts; combine with MIG partitioning for multi-tenant isolation.
|
|
34
38
|
- See [`references/cellular-topology-and-capacity-sizing.md`](references/cellular-topology-and-capacity-sizing.md) for combinatorial proofs, Go HRW router code, and worked GPU sizing examples.
|
|
35
39
|
|
|
36
40
|
## Suggested Process
|
|
@@ -141,6 +145,9 @@ Before finalizing:
|
|
|
141
145
|
- [ ] all infrastructure changes represented in IaC — no manual-only configuration
|
|
142
146
|
- [ ] trade-offs documented: what was chosen, what was rejected, and why
|
|
143
147
|
- [ ] AI infrastructure specified (when in scope): GPU allocation, inference server config, vector DB, embedding pipeline
|
|
148
|
+
- [ ] KV-cache tiering decision recorded for agentic/long-context workloads (when AI in scope)
|
|
149
|
+
- [ ] speculative decoding decision recorded with draft acceptance basis (when AI in scope)
|
|
150
|
+
- [ ] GPU allocation via DRA ResourceClaims on K8s v1.34+ (no opaque integer GPU counts)
|
|
144
151
|
- [ ] system-design-spec.json produced when structured downstream handoff required
|
|
145
152
|
- [ ] open questions, accepted risks, and escalation items documented
|
|
146
153
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: build-data-pipeline
|
|
3
|
-
description: Design and implement transactional lakehouse pipelines (Iceberg
|
|
3
|
+
description: Design and implement transactional lakehouse pipelines (Iceberg v3/Delta 4.4), enforce ODCS v3.2.0 data contracts, execute Write-Audit-Publish (WAP) on isolated snapshot branches, route malformed records to DLQ with circuit breaker wired to contract SLA fields, enforce S3 prefix hashing, implement Iceberg REST protocol (scan planning, ETag, Idempotency-Key, credential vending), native table encryption (KMS), and OpenLineage explicit lineage. Use when building or maintaining reliable, contract-governed lakehouse data pipelines.
|
|
4
|
+
version: 2.0.0
|
|
4
5
|
allowed-tools: [read_file, write_file, edit_file, create_file, search_code, query_db, read_database, run_tests]
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -10,8 +11,8 @@ Use this skill when building or maintaining transactional lakehouse infrastructu
|
|
|
10
11
|
|
|
11
12
|
## When to Use
|
|
12
13
|
|
|
13
|
-
- implementing transactional lakehouse pipelines with Apache Iceberg
|
|
14
|
-
- enforcing Open Data Contract Standard (ODCS v3.
|
|
14
|
+
- implementing transactional lakehouse pipelines with Apache Iceberg v3 (metadata-only restructuring, Variant type) or Delta Lake 4.4 UniForm
|
|
15
|
+
- enforcing Open Data Contract Standard (ODCS v3.2.0) at producer boundaries before ingestion
|
|
15
16
|
- staging writes to isolated snapshot branches (`wap_audit_<run_id>`) for atomic Write-Audit-Publish (WAP)
|
|
16
17
|
- auditing branch data in-process via DuckDB zero-copy Arrow memory before publishing to `main`
|
|
17
18
|
- routing poisoned or non-conforming records into Dead-Letter Queue (DLQ) quarantine with circuit breaker **wired to contract SLA fields**
|
|
@@ -25,10 +26,10 @@ Use this skill when building or maintaining transactional lakehouse infrastructu
|
|
|
25
26
|
## Core Rules
|
|
26
27
|
|
|
27
28
|
- **Read-Only Sources**: treat all source inputs as read-only; never mutate upstream source files or CDC logs.
|
|
28
|
-
- **ODCS v3.
|
|
29
|
+
- **ODCS v3.2.0 Contract Verification**: validate raw payloads against version-controlled ODCS v3.2.0 schemas at producer boundaries before ingestion; reject uncontracted schema drift.
|
|
29
30
|
- **Modern Lakehouse Table Formats**:
|
|
30
|
-
- standardize on **Apache Iceberg
|
|
31
|
-
- support **Delta Lake 4.
|
|
31
|
+
- standardize on **Apache Iceberg v3** (1.11+/1.12 implementation line) with metadata-only restructuring (never data rewrites for schema/partition evolution), Puffin RoaringBitmap Deletion Vectors (DVs), and integer `spec-id` partition evolution; avoid legacy position deletes; treat the unratified Iceberg v4 spec strictly as roadmap.
|
|
32
|
+
- support **Delta Lake 4.4 UniForm** for universal Iceberg metadata compatibility and Liquid Clustering.
|
|
32
33
|
- **Variant as Canonical Semi-Structured Path**: adopt `VARIANT` type for schemaless JSON payloads, eliminating `string` blob anti-patterns and enabling pushdown predicate evaluation on nested fields.
|
|
33
34
|
- coordinate catalog metadata through REST Catalogs (Polaris, Unity Catalog OSS, Lakekeeper) with short-lived STS tokens.
|
|
34
35
|
- **Iceberg REST Catalog Protocol**: implement scan planning (`POST /v1/oauth/tokens`, `POST /v1/namespaces/{ns}/tables`), ETag-based freshness validation (`If-None-Match`), Idempotency-Key commits for exactly-once writes, and dynamic credential vending (`GET /v1/credentials`).
|
|
@@ -57,7 +58,7 @@ Use this skill when building or maintaining transactional lakehouse infrastructu
|
|
|
57
58
|
## Suggested Process
|
|
58
59
|
|
|
59
60
|
### 1. Ingest & Verify Producer Contract
|
|
60
|
-
Validate incoming batch or streaming event schemas against the ODCS v3.
|
|
61
|
+
Validate incoming batch or streaming event schemas against the ODCS v3.2.0 contract in producer CI/CD before persisting to storage.
|
|
61
62
|
|
|
62
63
|
### 2. Contract Validation, DLQ Quarantine & WAP Branch Staging
|
|
63
64
|
Validate incoming batch records against the ODCS contract. Route non-compliant records to the DLQ with structured envelopes. Calculate quarantine ratio $Q_r = (N_{\text{quarantined}} / N_{\text{total}}) \times 100\%$. Write and stage only compliant, deduplicated records to an isolated Iceberg snapshot branch (`wap_audit_<run_id>`) with `write.object-storage.enabled = true`.
|
|
@@ -83,8 +84,8 @@ Validate outputs against `contracts/schemas/data-pipeline-spec.json`. Tag mainte
|
|
|
83
84
|
## Checklist
|
|
84
85
|
|
|
85
86
|
- [ ] upstream source files and streaming CDC logs treated as strictly read-only
|
|
86
|
-
- [ ] ODCS v3.
|
|
87
|
-
- [ ] Iceberg
|
|
87
|
+
- [ ] ODCS v3.2.0 producer contracts validated at perimeter before storage persistence
|
|
88
|
+
- [ ] Iceberg v3 / Delta 4.4 UniForm configured with Puffin RoaringBitmap DVs and `spec-id` partition evolution
|
|
88
89
|
- [ ] **Variant type adopted for semi-structured JSON payloads** (canonical path)
|
|
89
90
|
- [ ] table property `write.object-storage.enabled = true` active to prevent AWS S3 503 Slow Down throttling
|
|
90
91
|
- [ ] **Iceberg REST Catalog protocol implemented**: scan planning, ETag freshness, Idempotency-Key commits, credential vending
|
|
@@ -117,7 +118,7 @@ When emitting pipeline specifications for downstream consumers, orchestrators, o
|
|
|
117
118
|
|
|
118
119
|
## Failure Modes
|
|
119
120
|
|
|
120
|
-
- **Silent schema poisoning**: unannounced upstream schema changes corrupt lakehouse tables. Mitigation: enforce ODCS v3.
|
|
121
|
+
- **Silent schema poisoning**: unannounced upstream schema changes corrupt lakehouse tables. Mitigation: enforce ODCS v3.2.0 pre-ingestion validation; route non-conforming payloads to DLQ quarantine.
|
|
121
122
|
- **S3 partition throttling storm**: high-volume writes hit single S3 prefix limits causing 503 Slow Down errors. Mitigation: set table property `write.object-storage.enabled = true` for prefix hashing.
|
|
122
123
|
- **Direct write corruption**: unvalidated rows written directly to `main`. Mitigation: mandate Write-Audit-Publish (WAP) isolated snapshot branches (`wap_audit_<run_id>`).
|
|
123
124
|
- **DLQ poison overflow**: high-volume bad data floods quarantine silently. Mitigation: enforce circuit breaker halting ingestion when $Q_r > 2.0%$ ($N \ge 50$).
|
|
@@ -129,10 +130,10 @@ When emitting pipeline specifications for downstream consumers, orchestrators, o
|
|
|
129
130
|
## Security Guardrails (OWASP ASI)
|
|
130
131
|
|
|
131
132
|
- **ASI03 Identity & Privilege Abuse**: classify PII with `data-classification.yaml`; enforce short-lived STS tokens via REST Catalog.
|
|
132
|
-
- **ASI04 Supply Chain**: validate connectors, dbt packages, and Iceberg catalog drivers against approved manifests.
|
|
133
|
-
- **ASI05
|
|
134
|
-
- **ASI06
|
|
135
|
-
- **ASI07 Inter-Agent Communication**: emit structured `data-pipeline-spec.json` contracts for downstream agents.
|
|
133
|
+
- **ASI04 Agentic Supply Chain**: validate connectors, dbt packages, and Iceberg catalog drivers against approved manifests.
|
|
134
|
+
- **ASI05 Unexpected Code Execution**: parameterize all dynamic SQL and partition paths; prohibit raw string interpolation.
|
|
135
|
+
- **ASI06 Memory & Context Poisoning**: sanitize and provenance-tag document chunks before RAG vector ingestion.
|
|
136
|
+
- **ASI07 Insecure Inter-Agent Communication**: emit structured `data-pipeline-spec.json` contracts for downstream agents.
|
|
136
137
|
- **ASI09 Human-Agent Trust Exploitation**: disclose residual ingestion risks, SLA deviations, and quality validation metrics truthfully.
|
|
137
138
|
- **NATIVE-ENCRYPTION-LOCK**: all Iceberg and Delta Lake tables must enforce AES-256 encryption at rest via cloud KMS; encryption keys managed through catalog-integrated key management.
|
|
138
139
|
- **OPENLINEAGE-LOCK**: all pipeline stages must emit column-level OpenLineage events for end-to-end traceability and impact analysis.
|
package/core/skills/security-data/build-data-pipeline/references/producer-contracts-and-lakehouse.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# Producer Contracts & Modern Lakehouse Storage — Reference
|
|
2
2
|
|
|
3
|
-
This reference documents standards and implementation procedures for enforcing Open Data Contract Standard (ODCS v3.
|
|
3
|
+
This reference documents standards and implementation procedures for enforcing Open Data Contract Standard (ODCS v3.2.0) specifications at producer boundaries and managing transactional lakehouse architectures (Apache Iceberg and Delta Lake).
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
## 1. Open Data Contract Standard (ODCS v3.
|
|
7
|
+
## 1. Open Data Contract Standard (ODCS v3.2.0) at Producer Boundary
|
|
8
8
|
|
|
9
9
|
Modern agentic data architectures replace fragile, undocumented data handoffs with explicit, machine-readable data contracts negotiated between data producers and consumers.
|
|
10
10
|
|
|
11
|
-
### 1.1 ODCS v3.
|
|
11
|
+
### 1.1 ODCS v3.2.0 Contract Specification
|
|
12
12
|
Every ingested dataset must possess an active contract specifying four foundational pillars:
|
|
13
13
|
|
|
14
14
|
```yaml
|
|
@@ -74,8 +74,8 @@ Data pipelines must organize storage into transactional, ACID-compliant tiers us
|
|
|
74
74
|
- **ACID Snapshot Isolation**: All write transactions commit atomically by updating the metadata pointer file (`metadata.json`). Readers query consistent snapshots without locking writers.
|
|
75
75
|
- **File Sizing Standards**: Optimize Parquet file sizes between 128 MB and 512 MB to balance scan throughput with query planning latency.
|
|
76
76
|
|
|
77
|
-
### 2.3 dbt
|
|
78
|
-
For high-volume event streams, use dbt 1.
|
|
77
|
+
### 2.3 dbt Core 2.0 Microbatch Incremental Strategy
|
|
78
|
+
For high-volume event streams, use dbt Core 2.0 (Rust-engine GA; the 1.12+ line remains in active support until 2027-07) microbatch models to enable partitioned backfills and granular auto-retries:
|
|
79
79
|
|
|
80
80
|
```sql
|
|
81
81
|
{{ config(
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: database-maintenance
|
|
3
3
|
description: Plan and execute operational data store and modern lakehouse maintenance, including Apache Iceberg/Delta 256MB bin-pack compaction merging Deletion Vectors, manifest rewriting, 7-day/50-snapshot expiration, 72h orphan vacuuming, and FinOps cost attribution. Use for cleanup, compaction, repair, and operational performance tasks.
|
|
4
|
+
version: 1.0.0
|
|
4
5
|
allowed-tools: [read_file, write_file, edit_file, create_file, search_code, query_db, read_database, run_tests]
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -67,15 +67,15 @@ Never execute plain `REINDEX TABLE` or `REINDEX INDEX` in production environment
|
|
|
67
67
|
|
|
68
68
|
---
|
|
69
69
|
|
|
70
|
-
## 3. PostgreSQL
|
|
70
|
+
## 3. PostgreSQL 18 Zero-Downtime Upgrades
|
|
71
71
|
|
|
72
|
-
When executing major PostgreSQL version upgrades (e.g. Postgres
|
|
72
|
+
When executing major PostgreSQL version upgrades (e.g. Postgres 16/17 → Postgres 18):
|
|
73
73
|
|
|
74
74
|
### 3.1 Logical Replication via `pg_createsubscriber`
|
|
75
|
-
1. **Provision Target Node**: Deploy new PostgreSQL
|
|
75
|
+
1. **Provision Target Node**: Deploy new PostgreSQL 18 replica matching existing cluster specifications.
|
|
76
76
|
2. **Convert to Subscriber**: Execute `pg_createsubscriber` to transform physical standby into logical subscriber:
|
|
77
77
|
```bash
|
|
78
|
-
pg_createsubscriber -D /var/lib/postgresql/
|
|
78
|
+
pg_createsubscriber -D /var/lib/postgresql/18/data -P "host=primary-db port=5432 user=replicator"
|
|
79
79
|
```
|
|
80
80
|
3. **Synchronize Sequences & DDL**: Manually replicate and apply DDL schema changes and advance sequence values.
|
|
81
|
-
4. **Traffic Cutover**: Switch application connection pools to PostgreSQL
|
|
81
|
+
4. **Traffic Cutover**: Switch application connection pools to PostgreSQL 18 target with sub-second downtime.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: manage-secrets
|
|
3
3
|
description: Add, update, rotate, or review secret handling by following the repo's source-of-truth, access-control, and rollout patterns. Use when code or deployment work touches credentials, tokens, keys, or sensitive configuration.
|
|
4
|
+
version: 2.0.0
|
|
4
5
|
allowed-tools: [read_file, write_file, edit_file, create_file, search_code, run_tests, run_linter, run_build, execute_command]
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -26,6 +27,7 @@ Use this skill when a change involves creating, rotating, wiring, or auditing se
|
|
|
26
27
|
- **WIMSE alignment (2027)**: for agent and workload identities, prefer SPIFFE/SVID issuance and short-lived WIMSE-style tokens (JOSE-based service-to-service chains) over static API keys; use RFC 8693 token exchange at trust boundaries — the first WIMSE RFCs are expected in 2027 as the IETF architecture (at IESG since July 2026) formalizes
|
|
27
28
|
- **Secrets-less preference**: prefer payment-native or federated access patterns (e.g., x402) that remove standing credentials entirely where the integration allows; where secrets remain, they must be NHI-scoped, rotated, and inventory-tracked
|
|
28
29
|
- maintain a **per-agent identity inventory**: every non-human identity (agent, service account, workload) recorded with owner, scope, and lifecycle state — untracked NHIs are prohibited
|
|
30
|
+
- **PQC crypto-agility**: record each key's algorithm and rotation cadence in the secret/NHI inventory so quantum-vulnerable algorithms (RSA, ECDSA) can be enumerated into the CBOM and scheduled ahead of NIST IR 8547 deadlines (deprecated 2030, disallowed 2035); prefer hybrid-capable, algorithm-negotiable libraries for new key material
|
|
29
31
|
- mitigate the elevated risk (2× secrets leakage rate) in AI-assisted code generation by enforcing automated pre-commit and CI pipeline scanning using Gitleaks or TruffleHog
|
|
30
32
|
- evaluate secret storage provider choices (e.g., OpenBao vs. HashiCorp Vault) against the organization's governance policies, licensing models (MPL vs. BSL), and migration/support requirements
|
|
31
33
|
- treat every secret rotation as an irreversible action that requires explicit user confirmation; never rotate a production credential without an approval gate
|
|
@@ -127,6 +129,7 @@ Confirm without exposing values:
|
|
|
127
129
|
- [ ] OIDC workload identity federation configured for pipeline authentication
|
|
128
130
|
- [ ] pre-commit and CI/CD secret scanning (Gitleaks/TruffleHog) active for AI-generated code validation
|
|
129
131
|
- [ ] governance alignment (OpenBao vs HashiCorp Vault) reviewed and documented
|
|
132
|
+
- [ ] crypto algorithm and rotation metadata recorded for CBOM/PQC inventory alignment
|
|
130
133
|
|
|
131
134
|
## Related Skills
|
|
132
135
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: optimize-olap-database
|
|
3
|
-
description: Design high-throughput OLAP schemas for Iceberg
|
|
3
|
+
description: Design high-throughput OLAP schemas for Iceberg v3, tune ClickHouse/DuckDB columnar engines, configure 8192-row sparse index granules, govern partition key cardinality, enable MinMax data skipping, implement streaming micro-batch buffering, profile query execution plans, enforce native table encryption (KMS), and prepare for Spark 4.2+/Flink 2.3. Use when designing, tuning, or troubleshooting high-throughput columnar databases and analytical storage engines.
|
|
4
|
+
version: 2.0.0
|
|
4
5
|
allowed-tools: [read_file, write_file, edit_file, create_file, search_code, run_build, run_tests]
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -10,7 +11,7 @@ Use this skill when designing, tuning, or troubleshooting high-throughput column
|
|
|
10
11
|
|
|
11
12
|
## When to Use
|
|
12
13
|
|
|
13
|
-
- designing columnar database schemas and primary sorting keys for ClickHouse, DuckDB, or Apache Iceberg
|
|
14
|
+
- designing columnar database schemas and primary sorting keys for ClickHouse, DuckDB, or Apache Iceberg v3
|
|
14
15
|
- configuring sparse primary index granules (8192-row alignment) to minimize index RAM footprint
|
|
15
16
|
- governing partition key cardinality (`PARTITION BY toYYYYMM`) to prevent the "Too many parts" error
|
|
16
17
|
- adding secondary data skipping indexes (minmax, set, bloom filter, tokenbf_v1) for non-prefix filter columns
|
|
@@ -20,7 +21,7 @@ Use this skill when designing, tuning, or troubleshooting high-throughput column
|
|
|
20
21
|
- configuring automated TTL lifecycle policies for data expiration and tiered storage migration to S3
|
|
21
22
|
- deploying specialized MergeTree engines (ReplacingMergeTree, SummingMergeTree, AggregatingMergeTree)
|
|
22
23
|
- **implementing native table encryption (KMS) for Iceberg and Delta Lake tables**
|
|
23
|
-
- **preparing for Spark 4.
|
|
24
|
+
- **preparing for Spark 4.2+ and Flink 2.3 compatibility**
|
|
24
25
|
|
|
25
26
|
## Core Rules
|
|
26
27
|
|
|
@@ -33,7 +34,7 @@ Use this skill when designing, tuning, or troubleshooting high-throughput column
|
|
|
33
34
|
- **Plan Profiling**: inspect execution plans via `EXPLAIN ESTIMATE` and `EXPLAIN PIPELINE header=1` before promoting queries to production dashboards.
|
|
34
35
|
- **TTL Lifecycle & Tiering**: declare table TTLs to purge stale data and tier cold partitions to S3 object storage (`TTL event_date + INTERVAL 30 DAY TO VOLUME 's3_cold'`).
|
|
35
36
|
- **Native Table Encryption (KMS)**: mandate AES-256 encryption at rest via cloud KMS (AWS KMS, GCP CMEK, Azure Key Vault) for all Iceberg and Delta Lake tables.
|
|
36
|
-
- **Spark 4.
|
|
37
|
+
- **Spark 4.2+ & Flink 2.3 Readiness**: prepare OLAP schemas for compatibility with Spark 4.2+ compute engines and Flink 2.3 streaming sinks; validate schema evolution paths and partition evolution strategies.
|
|
37
38
|
- Detailed architecture, DDL templates, and profiling runbooks are maintained in [`references/olap-database-guide.md`](references/olap-database-guide.md).
|
|
38
39
|
|
|
39
40
|
## Suggested Process
|
|
@@ -54,7 +55,7 @@ Select MergeTree family engine (`ReplacingMergeTree`, `AggregatingMergeTree`). C
|
|
|
54
55
|
Run `EXPLAIN ESTIMATE` and `EXPLAIN PIPELINE header=1`. Verify that index pruning eliminates >= 80% of unneeded granules without full table scans.
|
|
55
56
|
|
|
56
57
|
### 6. Native Encryption & Compatibility
|
|
57
|
-
Implement AES-256 encryption via KMS for all Iceberg tables. Validate Spark 4.
|
|
58
|
+
Implement AES-256 encryption via KMS for all Iceberg tables. Validate Spark 4.2+ and Flink 2.3 compatibility for schema evolution and partition strategies.
|
|
58
59
|
|
|
59
60
|
### 7. Emit Data Pipeline Specification
|
|
60
61
|
Validate specifications against `contracts/schemas/data-pipeline-spec.json` and document schema properties.
|
|
@@ -70,7 +71,7 @@ Validate specifications against `contracts/schemas/data-pipeline-spec.json` and
|
|
|
70
71
|
- [ ] automated TTL policies configured for data retention and S3 tiered storage migration
|
|
71
72
|
- [ ] schema specifications emitted and validated against `contracts/schemas/data-pipeline-spec.json`
|
|
72
73
|
- [ ] **Native table encryption (KMS) implemented** for Iceberg and Delta Lake tables
|
|
73
|
-
- [ ] **Spark 4.
|
|
74
|
+
- [ ] **Spark 4.2+ and Flink 2.3 compatibility validated** for schema evolution and partition strategies
|
|
74
75
|
|
|
75
76
|
## Related Skills
|
|
76
77
|
|
|
@@ -84,7 +85,7 @@ Validate specifications against `contracts/schemas/data-pipeline-spec.json` and
|
|
|
84
85
|
|
|
85
86
|
When emitting OLAP database specifications and performance audit results, emit:
|
|
86
87
|
|
|
87
|
-
- `contracts/schemas/data-pipeline-spec.json` — complete table definition, engine parameters, partition key, index granules, buffering rules, TTL policies, **native encryption (KMS) config, Spark 4.
|
|
88
|
+
- `contracts/schemas/data-pipeline-spec.json` — complete table definition, engine parameters, partition key, index granules, buffering rules, TTL policies, **native encryption (KMS) config, Spark 4.2+/Flink 2.3 compatibility notes**.
|
|
88
89
|
- `contracts/schemas/data-analysis-report.json` — query profiling benchmarks, scanned parts/marks metrics, and storage reduction figures.
|
|
89
90
|
|
|
90
91
|
## Failure Modes
|
|
@@ -94,15 +95,15 @@ When emitting OLAP database specifications and performance audit results, emit:
|
|
|
94
95
|
- **Primary key prefix misordering**: high-cardinality column placed first in `ORDER BY` disables pruning for subsequent columns. Mitigation: sort primary keys by cardinality ascending.
|
|
95
96
|
- **Unindexed cartesian joins**: joining large tables without dictionaries or subquery projections exhausts memory. Mitigation: pre-cache dimension tables in dictionaries and use `dictGet()`.
|
|
96
97
|
- **Missing native table encryption (KMS)**: Iceberg tables lack AES-256 encryption at rest. Mitigation: mandate KMS-managed encryption for all production lakehouse tables.
|
|
97
|
-
- **Incompatible with Spark 4.
|
|
98
|
+
- **Incompatible with Spark 4.2+/Flink 2.3**: OLAP schemas break with newer compute engines. Mitigation: validate compatibility, test schema evolution paths, prepare for VARIANT type support.
|
|
98
99
|
|
|
99
100
|
## Security Guardrails (OWASP ASI)
|
|
100
101
|
|
|
101
102
|
- **ASI03 Identity & Privilege Abuse**: enforce role-based access control and read-only connection scoping for analytical query clients.
|
|
102
|
-
- **ASI04 Supply Chain**: validate database connectors, dictionary source drivers, and extension packages against verified package repositories.
|
|
103
|
-
- **ASI05
|
|
104
|
-
- **ASI06
|
|
105
|
-
- **ASI07 Inter-Agent Communication**: emit machine-readable `data-pipeline-spec.json` contracts for downstream agents.
|
|
103
|
+
- **ASI04 Agentic Supply Chain**: validate database connectors, dictionary source drivers, and extension packages against verified package repositories.
|
|
104
|
+
- **ASI05 Unexpected Code Execution**: prohibit unvalidated raw SQL execution; parameterize dynamic filters and sanitize table identifiers.
|
|
105
|
+
- **ASI06 Memory & Context Poisoning**: sanitize document table extracts (Kreuzberg patterns) and validate schema contracts before lakehouse persistence.
|
|
106
|
+
- **ASI07 Insecure Inter-Agent Communication**: emit machine-readable `data-pipeline-spec.json` contracts for downstream agents.
|
|
106
107
|
- **ASI09 Human-Agent Trust Exploitation**: report true scanned row counts, query latencies, and storage overhead transparently.
|
|
107
108
|
- **NATIVE-ENCRYPTION-LOCK**: all Iceberg and Delta Lake tables must enforce AES-256 encryption at rest via cloud KMS; encryption keys managed through catalog-integrated key management.
|
|
108
|
-
- **SPARK-FLINK-COMPATIBILITY-LOCK**: OLAP schemas must maintain compatibility with Spark 4.
|
|
109
|
+
- **SPARK-FLINK-COMPATIBILITY-LOCK**: OLAP schemas must maintain compatibility with Spark 4.2+ compute engines and Flink 2.3 streaming sinks; validate schema evolution paths and partition strategies.
|
|
@@ -13,7 +13,7 @@ Columnar database engines organize data on physical storage by column rather tha
|
|
|
13
13
|
|
|
14
14
|
### Comparative Architectural Matrix
|
|
15
15
|
|
|
16
|
-
| Dimension | ClickHouse (MergeTree) | DuckDB (v1.
|
|
16
|
+
| Dimension | ClickHouse (MergeTree) | DuckDB (v1.5+) | Apache Iceberg v3 |
|
|
17
17
|
| :--- | :--- | :--- | :--- |
|
|
18
18
|
| **Primary Deployment** | Distributed high-throughput cluster & embedded chDB | In-process embedded engine | Open lakehouse format on object storage (S3/GCS) |
|
|
19
19
|
| **Index Granularity** | 8,192 rows per granule (`index_granularity = 8192`) | 122,880 rows per standard Parquet Row Group | Manifest file file-level and column-level stats |
|
|
@@ -317,7 +317,7 @@ Unstructured operational documents (PDF/DOCX reports, regulatory filings) freque
|
|
|
317
317
|
|
|
318
318
|
### Extraction Architecture
|
|
319
319
|
1. **Kreuzberg Engine**: High-throughput parsing detects table boundaries, multi-line headers, and cell alignments.
|
|
320
|
-
2. **Schema & Contract Validation**: Extracted tabular structures are parsed into typed Apache Arrow RecordBatches and validated against Open Data Contract Standard (ODCS v3.
|
|
320
|
+
2. **Schema & Contract Validation**: Extracted tabular structures are parsed into typed Apache Arrow RecordBatches and validated against Open Data Contract Standard (ODCS v3.2.0) definitions.
|
|
321
321
|
3. **Deterministic Natural Keys**: Rows are assigned deterministic SHA-256 composite identifiers:
|
|
322
322
|
```
|
|
323
323
|
natural_key = SHA256(document_hash || '|' || table_index || '|' || row_index)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: prompt-injection-defense
|
|
3
3
|
description: Use when safeguarding AI agents against direct and indirect prompt injection attacks, implementing bounded tool execution, enforcing structural delimiter isolation, and verifying canary token integrity.
|
|
4
|
+
version: 2.0.0
|
|
4
5
|
allowed-tools: [read_file, write_file, edit_file, create_file, search_code, run_tests, run_linter]
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -39,6 +40,7 @@ Harden LLM agents and autonomous tool execution chains against direct jailbreaks
|
|
|
39
40
|
- **Dual-LLM / Sandwich Pattern**:
|
|
40
41
|
- Sandwich untrusted input between the initial system constraints and a trailing reinforcement reminder at the prompt boundary.
|
|
41
42
|
- Where high-privilege tools are invoked, route raw external content through a quarantined reader LLM to extract structured facts before presenting data to the privileged executor agent.
|
|
43
|
+
- **CaMeL Capability Confinement (architectural SOTA)**: for agents acting on privileged data flows, adopt CaMeL-style system design (Google DeepMind, arXiv:2503.18813): a privileged planner LLM never touches raw untrusted content; a quarantined untrusted LLM extracts typed values; a security monitor enforces capability rules on provenance-tagged data flows. Prompt-level instructions alone are not a defense — the 2026 consensus is that injection is contained only by architecture, and since such architectures remain rare, their absence must be listed as residual risk instead of silently accepted.
|
|
42
44
|
|
|
43
45
|
## Suggested Process
|
|
44
46
|
|
|
@@ -84,6 +86,7 @@ When auditing prompt security or detecting injection anomalies, emit `contracts/
|
|
|
84
86
|
- [ ] Trailing reinforcement instructions appended after untrusted context to prevent attention hijack
|
|
85
87
|
- [ ] Maximum autonomous tool loop step limit enforced
|
|
86
88
|
- [ ] Security audit log records all blocked injections and schema boundary violations
|
|
89
|
+
- [ ] adversarial injection test suite aligned to the OWASP GenAI Red Teaming Manual v1.0 (2026-10-20) runs against the defended agent before production promotion
|
|
87
90
|
|
|
88
91
|
## Security Guardrails (OWASP ASI)
|
|
89
92
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: query-analytical-engine
|
|
3
|
-
description: Execute in-process analytical SQL with chDB and DuckDB v1.
|
|
3
|
+
description: Execute in-process analytical SQL with chDB and DuckDB v1.5+, orchestrate multi-step stateful pipelines via chdb.session, federate queries across S3 Parquet, PostgreSQL, MySQL, and Iceberg without heavy ETL, leverage Apache Arrow C Data Interface, and enforce safe read-only AST validation. Use when conducting fast in-process analytical queries, cross-source federation, or ad-hoc OLAP exploration.
|
|
4
|
+
version: 2.0.0
|
|
4
5
|
allowed-tools: [read_file, write_file, edit_file, create_file, search_code, run_build, run_tests]
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -10,7 +11,7 @@ Use this skill when executing in-process analytical queries, orchestrating multi
|
|
|
10
11
|
|
|
11
12
|
## When to Use
|
|
12
13
|
|
|
13
|
-
- running sub-second analytical queries directly in-process via embedded chDB or DuckDB v1.
|
|
14
|
+
- running sub-second analytical queries directly in-process via embedded chDB or DuckDB v1.5+
|
|
14
15
|
- orchestrating multi-step analytical pipelines and temporary session state using `chdb.session.Session`
|
|
15
16
|
- federating queries and joins across S3 Parquet, PostgreSQL, MySQL, and Apache Iceberg without ETL jobs
|
|
16
17
|
- transferring in-memory tabular datasets zero-copy via the Apache Arrow C Data Interface
|
|
@@ -20,7 +21,7 @@ Use this skill when executing in-process analytical queries, orchestrating multi
|
|
|
20
21
|
|
|
21
22
|
## Core Rules
|
|
22
23
|
|
|
23
|
-
- **In-Process Vectorized Execution**: execute analytical queries in-process using chDB or DuckDB v1.
|
|
24
|
+
- **In-Process Vectorized Execution**: execute analytical queries in-process using chDB or DuckDB v1.5+ (the 2.0 LTS line is current since 2026-10-21); avoid spinning up external warehouse clusters for sub-terabyte exploratory analysis.
|
|
24
25
|
- **Stateful Session Isolation**: manage multi-step data pipelines using `chdb.session.Session()`; isolate temporary views and tables within the session and execute explicit cleanup in try-finally blocks.
|
|
25
26
|
- **Zero-Copy Memory Interchange**: transfer tabular data between chDB, DuckDB, Polars, and PyArrow exclusively via the Apache Arrow C Data Interface (`__arrow_c_stream__`).
|
|
26
27
|
- **Direct Cross-Source Federation**: join operational databases (PostgreSQL, MySQL) directly with object storage Parquet/Iceberg layers using engine table functions (`s3()`, `postgresql()`, `iceberg()`).
|
|
@@ -85,8 +86,8 @@ When emitting analytical query findings and execution plans, emit:
|
|
|
85
86
|
## Security Guardrails (OWASP ASI)
|
|
86
87
|
|
|
87
88
|
- **ASI03 Identity & Privilege Abuse**: restrict database credentials used in `postgresql()` table functions to read-only replica users with row-level security.
|
|
88
|
-
- **ASI04 Supply Chain**: verify binary wheel provenance of embedded engine packages (`chdb`, `duckdb`, `pyarrow`).
|
|
89
|
-
- **ASI05
|
|
90
|
-
- **ASI06
|
|
91
|
-
- **ASI07 Inter-Agent Communication**: emit structured `data-analysis-report.json` contracts for downstream agents.
|
|
89
|
+
- **ASI04 Agentic Supply Chain**: verify binary wheel provenance of embedded engine packages (`chdb`, `duckdb`, `pyarrow`).
|
|
90
|
+
- **ASI05 Unexpected Code Execution**: prohibit dynamic SQL string interpolation; validate all queries against AST security policies.
|
|
91
|
+
- **ASI06 Memory & Context Poisoning**: verify data integrity against raw input Parquet cryptographic hashes before reporting findings.
|
|
92
|
+
- **ASI07 Insecure Inter-Agent Communication**: emit structured `data-analysis-report.json` contracts for downstream agents.
|
|
92
93
|
- **ASI09 Human-Agent Trust Exploitation**: disclose sample sizes, confidence intervals, and analytical limitations truthfully.
|
package/core/skills/security-data/query-analytical-engine/references/analytical-query-guide.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Analytical Query Engine & Cross-Source Federation Guide
|
|
2
2
|
|
|
3
|
-
This reference provides technical architecture specifications, Python code patterns, and security guardrails for executing in-process analytical SQL (chDB, DuckDB v1.
|
|
3
|
+
This reference provides technical architecture specifications, Python code patterns, and security guardrails for executing in-process analytical SQL (chDB, DuckDB v1.5+) and federating queries across disparate data sources without heavy ETL.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -91,7 +91,7 @@ finally:
|
|
|
91
91
|
|
|
92
92
|
---
|
|
93
93
|
|
|
94
|
-
## 3. DuckDB v1.
|
|
94
|
+
## 3. DuckDB v1.5+ Vectorized Engine & Out-of-Core Execution
|
|
95
95
|
|
|
96
96
|
DuckDB is an embedded columnar OLAP engine designed for complex ANSI SQL, recursive CTEs, and deep integration with Apache Arrow and Parquet.
|
|
97
97
|
|
|
@@ -216,7 +216,7 @@ Unstructured documents (PDFs, Word documents, annual reports) contain valuable t
|
|
|
216
216
|
### 6.1 Extraction Mechanics
|
|
217
217
|
- **Kreuzberg Rust Parser**: Extracts structural layout, tables, and bounding boxes at high throughput.
|
|
218
218
|
- **Header & Merge Resolution**: Normalizes multi-level headers and merged cells into flat columnar schemas.
|
|
219
|
-
- **Contract Enforcement**: Output is validated against Open Data Contract Standard (ODCS v3.
|
|
219
|
+
- **Contract Enforcement**: Output is validated against Open Data Contract Standard (ODCS v3.2.0) definitions before storage.
|
|
220
220
|
|
|
221
221
|
### 6.2 Ingestion Pattern
|
|
222
222
|
```python
|