一键导入
agentic-patterns
Patterns from "Agentic Design Patterns" (Gulli & Sauco, 2025) applied to CD orchestration and state-machine deployment workflows
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Patterns from "Agentic Design Patterns" (Gulli & Sauco, 2025) applied to CD orchestration and state-machine deployment workflows
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Select and coordinate multi-agent teams (topology kits, role-based squads, lifecycle, worktree isolation). Use this skill whenever launching parallel agents, designing a review board, running a debug council, scheduling an orchestrator-workers team, configuring agent tool restrictions, or deciding between solo and team execution. Triggers on: "launch a team", "parallel agents", "review board", "debug council", "architect-implementer-reviewer", "swarm", "multi-agent", "subagents for X", "team topology", "agent lifecycle".
Select and wire an agentic design pattern (reflection, prompt chaining, routing, parallelization, orchestrator-workers, evaluator-optimizer, ReAct, blackboard) into the 5-layer Claude Code stack. Use this skill whenever deciding how to structure a multi-step task, whether to spawn subagents, how to run parallel review, or when to use which pattern. Triggers on: "which pattern", "orchestrate", "parallel review", "self-review", "chain of thought", "eval-optimizer loop", "blackboard", "ReAct", "how to decompose this task".
Auto mode permission handling — classifier-based approvals, PermissionDenied hook, defer permissionDecision, and autonomy profiles for hands-off Claude Code usage
Configure Claude Code's autonomous operating mode — profile selection (conservative, balanced, aggressive, unattended-review), permission blocks, and the three gate agents (planner, verifier, reviewer). Use this skill whenever enabling autonomous mode, switching profiles, tightening permissions for production branches, or setting up unattended execution. Triggers on: "autonomy", "unattended mode", "auto-approve", "permission mode", "autonomy profile", "gates", "/cc-autonomy", "planner verifier reviewer", "let claude run on its own".
Manage Claude Code's context window — token arithmetic, /compact strategy, anchor preservation, progressive loading, session analytics. Use this skill whenever a session gets long, context approaches limits, after /compact, when deciding what to load into CLAUDE.md vs leave in references, or when analyzing session cost/token usage. Triggers on: "context full", "compact", "too many tokens", "budget", "session analytics", "save tokens", "context window", "/compact strategy".
Evidence-driven deep analysis for hard coding problems — architecture decisions, root-cause investigation, high-stakes refactor planning, performance bottleneck isolation. Use this skill whenever the user asks for "the best approach", a "deep analysis", "root cause", "principal engineer review", or runs /cc-intel. Also triggers on hard debugging questions, major architectural choices, tricky performance problems, or any task where a hypothesis tree and evidence table matter more than a fast answer.
| name | agentic-patterns |
| description | Patterns from "Agentic Design Patterns" (Gulli & Sauco, 2025) applied to CD orchestration and state-machine deployment workflows |
Patterns from "Agentic Design Patterns" (Gulli & Sauco, 2025) applied to CD orchestration and state-machine deployment workflows
Relevance: Deployment pipelines are inherently sequential — each stage must succeed before the next begins, making prompt chaining the foundational pattern.
Current Implementation: The start command triggers a linear pipeline of validate → build → deploy → verify stages, each passing state to the next.
Enhancement: Model each stage transition as a structured chain link with explicit input/output schemas. The output of the validate stage (manifest, checksums, env config) becomes the structured prompt input to the build stage, ensuring context is never lost across stage boundaries.
Relevance: Before initiating a deployment, the orchestrator must devise a strategy that accounts for environment, risk level, rollout type (canary, blue-green, rolling), and SLA windows.
Current Implementation: The orchestrator.md agent selects deployment strategies, but strategy selection is implicit.
Enhancement: Add an explicit planning phase that emits a deployment plan artifact (target envs, rollout %, health check thresholds, estimated duration, rollback triggers) before any execution begins. The plan is approved (by HITL or auto) before the pipeline proceeds.
Relevance: Deployment failures are not exceptional — they are expected scenarios that require structured recovery, not ad-hoc responses.
Current Implementation: The rollback.md agent and rollback command handle failure recovery; the validator.md agent detects issues.
Enhancement: Wrap each pipeline stage in a try/catch pattern with typed exception classes: ValidationError, BuildError, HealthCheckFailure, TimeoutError. Each exception type maps to a predefined recovery action (retry, rollback, notify, halt). The rollback agent receives the exception type as input context.
Relevance: Production deployments and rollbacks to critical environments require human authorization gates before proceeding.
Current Implementation: The approve command provides a manual approval mechanism at the pipeline level.
Enhancement: Formalize HITL as a blocking gate with configurable placement: pre-deploy approval, post-canary validation approval, and rollback confirmation. Each gate presents a structured summary (diff, risk score, affected services, estimated impact) and records the approver identity and timestamp in the deployment history.
Relevance: Deployments must enforce hard constraints — never deploy to production without passing health checks, never exceed a change-failure-rate threshold, never skip required approval stages.
Current Implementation: The validator.md agent checks pre-conditions; the pipeline has validation stages.
Enhancement: Extract guardrails into a declarative constraint layer evaluated before and after every stage. Guardrails include: artifact integrity checks, environment drift detection, concurrent deployment prevention (mutex lock), SLA window enforcement, and rollback-eligibility verification. Constraint violations immediately halt the pipeline with a structured error report.
Relevance: A deployment is successful only when it meets defined SLA targets — latency, error rate, availability — not simply when the deployment command exits 0.
Current Implementation: The pipeline tracks deploy status but success/failure is binary (command success vs. failure).
Enhancement: Define deployment goals as measurable SLA criteria attached to the pipeline plan. After deploy, the orchestrator evaluates whether goals are met (p99 latency < X ms, error rate < Y%, all health checks green for Z minutes). Only when goals are satisfied does the pipeline transition to COMPLETE; otherwise it triggers exception handling.
Relevance: Each deployment run is a data point. Evaluating outcomes over time improves future deployment decisions and detects degrading patterns.
Current Implementation: The history command surfaces past deployments, but evaluation is manual.
Enhancement: After each pipeline completion, emit a structured evaluation report: goal achievement (met/missed/partial), stage durations, rollback count, MTTR for failures, and change-failure rate trend. Store these in the deployment history for trend analysis and use them as context in the planning phase of subsequent deployments.
Relevance: Complex deployment workflows exceed the capability of a single agent — orchestration, validation, and rollback are distinct responsibilities requiring specialized agents.
Current Implementation: Three specialized agents exist — orchestrator.md, validator.md, rollback.md — with defined roles.
Enhancement: Formalize the multi-agent topology with explicit communication contracts: the orchestrator is the sole coordinator; validator and rollback agents are workers that receive structured task requests and return structured results. Add a monitoring agent that runs concurrently during deployment, watching health signals and alerting the orchestrator if guardrail thresholds are approached before they are breached.
User Request
│
▼
[Planning] ──────────────────────────────────────────────────────┐
Emit deployment plan (strategy, goals, guardrails config) │
│ │
▼ │
[HITL Gate] ← human approves plan │
│ │
▼ │
[Prompt Chaining] — stage-by-stage execution │
├── Stage N input = Stage N-1 structured output │
├── [Guardrails] checked at every stage boundary │
└── [Multi-Agent] Orchestrator ↔ Validator ↔ Monitor agents │
│ (concurrent monitoring during execution) │
▼ │
[Exception Handling] │
├── Typed exceptions → recovery map │
└── Rollback agent activated with exception context │
│ │
▼ │
[Goal Setting] — evaluate post-deploy SLA metrics │
│ │
▼ │
[Evaluation] — emit structured deployment report ←──────────────┘
Feeds back into Planning context for next deployment