[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71GP2R32J7H05NBTEG1TDER":3,"skill-same:01M71GP2R32J7H05NBTEG1TDER":82},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":59,"commitSha":60,"skillDirectory":61,"forksCount":62,"repositoryHtmlUrl":63,"repositoryHomepageUrl":6,"ownerHtmlUrl":64,"ownerBlogUrl":65,"ownerDescription":66,"updatedAt":67,"install":68,"resources":81},"01M71GP2R32J7H05NBTEG1TDER","connect-review",null,"Review an Amazon Connect contact center, IVR or voice bot for latency, reliability, cost and flow design.","timurgaleev\u002Fvibestack","timurgaleev","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F32696429?v=4","01M71GMS53Z9B4JQTCQEFXAE9E","Timur Galeev","01M71GMS5S1Q7BEYB3Z7GY3E85",8,"MIT","https:\u002F\u002Fgithub.com\u002Ftimurgaleev\u002Fvibestack\u002Fblob\u002Fmain\u002Fskills\u002Fconnect-review\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"connect","review","connect review","assistant","flow","voice","grep","write","read","contact center","amazon","cost","bot","lex","Bash","design","phone","for","latency","reliability","2026-11-10 10:12:30",false,"---\nname: connect-review\ndescription: |\n  Review an Amazon Connect contact center, IVR or voice bot for latency, reliability, cost and flow design.\ntriggers:\n  - review contact flow\n  - amazon connect review\n  - lex bot review\n  - voice bot review\n  - connect latency\n  - ivr review\n  - review the phone assistant\nallowed-tools:\n  - Bash\n  - Read\n  - Grep\n  - Glob\n  - Write\n  - AskUserQuestion\n---\n\nIf this session was compacted, the copy of this skill in context may be cut off.\nRead `${CLAUDE_SKILL_DIR}\u002FSKILL.md` from disk and resume at the step you are on.\n\n## When to invoke\n\nUse when: \"review the contact flow\", \"review this Connect solution\", \"is the Lex bot well designed\", \"why is the voice bot slow\", \"review the IVR\", \"check the phone assistant before go-live\".\n\n## Preamble\n\n```bash\neval \"$(\"${VIBESTACK_HOME:-$HOME\u002F.vibestack}\u002Fbin\u002Fvibe-slug\" 2>\u002Fdev\u002Fnull)\" 2>\u002Fdev\u002Fnull || SLUG=\"unknown\"\n_LEARN_FILE=\"${VIBESTACK_HOME:-$HOME\u002F.vibestack}\u002Fprojects\u002F${SLUG:-unknown}\u002Flearnings.jsonl\"\nif [ -f \"$_LEARN_FILE\" ]; then\n  _LEARN_COUNT=$(wc -l \u003C \"$_LEARN_FILE\" 2>\u002Fdev\u002Fnull | tr -d ' ')\n  echo \"LEARNINGS: $_LEARN_COUNT entries loaded\"\n  if [ \"$_LEARN_COUNT\" -gt 5 ] 2>\u002Fdev\u002Fnull; then\n    \"${VIBESTACK_HOME:-$HOME\u002F.vibestack}\u002Fbin\u002Fvibe-learnings-search\" --limit 5 2>\u002Fdev\u002Fnull || true\n  fi\nelse\n  echo \"LEARNINGS: none yet\"\nfi\n```\n\n{{include lib\u002Fsnippets\u002Fsession-host.md}}\n\n{{include lib\u002Fsnippets\u002Fdecision-brief.md}}\n\n{{include lib\u002Fsnippets\u002Fworking-protocols.md}}\n\n{{include lib\u002Fsnippets\u002Fstate-protocols.md}}\n\n## User-invocable\nWhen the user types `\u002Fconnect-review`, run this skill.\n\n---\n\n## Step 0: Find the inputs\n\nLocate the five inputs in the repo before reviewing anything. Use Glob and Grep; do not guess from file names alone.\n\n| Input | How to find it |\n|-------|----------------|\n| Contact flows | JSON exports: files containing `\"Version\": \"2019-10-30\"` and `\"Actions\"`. IaC: `aws_connect_contact_flow`, `aws_connect_hours_of_operation`, `aws_connect_instance` (Terraform) or `CfnContactFlow` (CDK). |\n| Lex V2 bot | Export zips unpacked to `BotLocales\u002F\u003Clocale>\u002FIntents\u002F*\u002FIntent.json` and `Slots\u002F*\u002FSlot.json`, or `aws_lexv2models_bot`, `aws_lexv2models_intent`, `aws_lexv2models_slot`, `aws_lexv2models_bot_locale`. |\n| Lambda source | Handlers referenced by `InvokeLambdaFunction` in flows, by `fulfillmentCodeHook` \u002F `dialogCodeHook` in intents, or `aws_lambda_function` \u002F SAM `AWS::Serverless::Function`. |\n| Prompts | Files under `prompts\u002F`, names matching `*prompt*`, or a `system`\u002F`systemPrompt` string near `converse(`, `invoke_model(`, `InvokeModel`, `ConverseCommand`. |\n| Session schema | `aws_dynamodb_table` or `AWS::DynamoDB::Table` with a `ttl`\u002F`expiresAt` attribute, plus any `sessionAttributes` writes in Lambda code. |\n\n```bash\ngrep -rlE '\"Version\": *\"2019-10-30\"' --include='*.json' . 2>\u002Fdev\u002Fnull | head\ngrep -rlE 'aws_connect_|aws_lexv2models_|CfnContactFlow|CfnBot' --include='*.tf' --include='*.ts' --include='*.py' . 2>\u002Fdev\u002Fnull | head\ngrep -rlE 'converse\\(|invoke_model\\(|InvokeModelCommand|ConverseCommand|bedrock-runtime' . 2>\u002Fdev\u002Fnull | grep -vE 'node_modules|\\.venv' | head\ngrep -rlE 'sampleUtterances|\"intentName\"' --include='*.json' . 2>\u002Fdev\u002Fnull | head\n```\n\nIf an input is missing, ask the user for the path or the resource id. If the `aws` CLI is configured, fill gaps with read-only calls. The region the context block prints decides whether the German-market notes apply.\n\n{{include lib\u002Fsnippets\u002Faws-context.md}}\n\n```bash\naws connect list-instances --query 'InstanceSummaryList[].[Id,InstanceAlias]' --output table\naws connect list-contact-flows --instance-id \"$INSTANCE_ID\" --output table\naws connect describe-contact-flow --instance-id \"$INSTANCE_ID\" --contact-flow-id \"$FLOW_ID\" --query 'ContactFlow.Content' --output text > \"${TMPDIR:-\u002Ftmp}\u002Fconnect-review-flow.json\"\naws lexv2-models list-bots --output table\naws lexv2-models describe-bot --bot-id \"$BOT_ID\"\naws lexv2-models list-intents --bot-id \"$BOT_ID\" --bot-version DRAFT --locale-id de_DE\naws lambda get-function-configuration --function-name \"$FN\" --query '[Timeout,MemorySize,Runtime]'\n```\n\nOnly `describe`, `list`, `get` and `filter-log-events` calls are allowed. Never call `update-*`, `create-*`, `build-bot-locale` or `put-*`.\n\nWrite down the solution shape in one paragraph before continuing: entry number → flow → Lex bot → Lambda → Bedrock → back, plus which locale, which model and which region. This becomes the \"Solution summary\" in the report.\n\n---\n\n## Step 1: Flow structure\n\nWalk every flow from `StartAction` following `Transitions.NextAction`, `Transitions.Conditions[].NextAction` and `Transitions.Errors[].NextAction`. Build the graph before judging it — a block that looks unreachable in the JSON often is.\n\n| Check | How | Finding |\n|-------|-----|---------|\n| Error branch on every fallible block | For each action of type `InvokeLambdaFunction`, `ConnectParticipantWithLexBot`, `GetParticipantInput`, `TransferContactToQueue`, `TransferToPhoneNumber`, `CheckHoursOfOperation`, `UpdateContactAttributes`: does `Transitions.Errors` exist and point somewhere other than the same block? | Missing → HIGH. The caller hears silence and the contact drops. |\n| Disconnect and timeout paths | `GetParticipantInput` and Lex blocks carry `InputTimeLimitExceeded` \u002F `NoMatchingCondition` \u002F `NoMatchingError` error names. Each must route to a re-prompt with a counter, then to a human or a polite disconnect. | Missing → MEDIUM. Timeout routed straight to `DisconnectParticipant` → HIGH. |\n| Transfer to agent reachable | Is there a path from `StartAction` to `TransferContactToQueue`? Is it reachable from the Lex fallback branch and from the Lambda error branch? | No path at all → HIGH. Not reachable from fallback → MEDIUM. |\n| Hours of operation and overrides | `CheckHoursOfOperation` precedes every queue transfer; the closed branch plays a message and offers callback, voicemail or disconnect. Holidays and short days live on the hours-of-operation resource as overrides — recurring, temporary, or inherited from a linked parent — not in the flow, so read the resource before judging the flow. The block also supports an optional branch per named override; the flow-language reference documents only the True\u002FFalse conditions for this action, so read the flow JSON rather than assume a branch shape. | No hours check → HIGH. Resource read, no override on it or on its parents, and no other holiday mechanism (Lambda, attribute, DynamoDB flag) → MEDIUM (LOW if the business is 24\u002F7). Resource not readable → N-A. |\n| Loop guards | Every `Loop` action has a bounded `LoopCount`. Any cycle through `GetParticipantInput` or a Lex block without a counter is an infinite loop for a confused caller. | Unbounded loop → HIGH. |\n| Attribute naming | Collect all keys from `UpdateContactAttributes`. Mixed `camelCase`, `snake_case` and `Title Case`, or the same concept under two names (`customerId`, `CustomerID`). | LOW. |\n| No secrets in attributes | Grep attribute values and Lambda return maps for `api[_-]?key`, `token`, `password`, `secret`, `Bearer`. Contact attributes appear in contact records, the agent workspace and Contact Lens exports. A keyword hit names a candidate, not a leak — read the matched line and decide whether the value is credential material or a field name, a placeholder or a boolean flag. | Credential value confirmed in an attribute → CRITICAL. Hit whose value cannot be resolved from the source (built at runtime, read from a variable) → MEDIUM, and name what would confirm it. |\n| Flow logging | A `UpdateFlowLoggingBehavior` action with `\"FlowLoggingBehavior\": \"Enabled\"` early in the flow. Logging set by that action carries into any flow the contact is transferred to, even one that has no such action, so trace back to the entry flow before judging a transferred flow. | Absent from the entry flow and from every flow on the path to it → MEDIUM. Nothing in CloudWatch when a call goes wrong. Absent only from a transferred flow whose entry flow enables it → not a finding. |\n\nEvidence for a flow finding is the flow name plus the block `Identifier` (or Terraform resource address and line).\n\n```bash\n# Overrides live on the hours-of-operation resource, not in the flow. An empty\n# override list only means something if the call succeeded — otherwise N-A.\nif hoo=$(aws connect describe-hours-of-operation \\\n      --instance-id \"$INSTANCE_ID\" --hours-of-operation-id \"$HOO_ID\" \\\n      --query 'HoursOfOperation.[Name,TimeZone,ParentHoursOfOperations[].Id]' \\\n      --output json 2>\u002Fdev\u002Fnull); then\n  printf '%s\\n' \"$hoo\"\n  aws connect list-hours-of-operation-overrides \\\n    --instance-id \"$INSTANCE_ID\" --hours-of-operation-id \"$HOO_ID\" \\\n    --query 'HoursOfOperationOverrideList[].[Name,OverrideType,EffectiveFrom,EffectiveTill]' \\\n    --output json 2>\u002Fdev\u002Fnull \\\n    || echo \"OVERRIDES: N-A (list call failed for $HOO_ID)\"\nelse\n  echo \"HOURS: N-A (describe failed — no access, or wrong instance\u002Fhours id)\"\nfi\n# Repeat both calls for every id in ParentHoursOfOperations: a child inherits the\n# parent's overrides, and they are not in the child's own list.\n```\n\n---\n\n## Step 2: Lex bot design\n\nRead every `Intent.json` and `Slot.json` in each locale, or the equivalent IaC resources.\n\n| Check | How | Finding |\n|-------|-----|---------|\n| Intent overlap | Normalise sample utterances (lowercase, strip punctuation) and compare across intents. Identical utterance in two intents, or two intents whose utterance sets share most of their tokens (`kündigen` vs `vertrag kündigen` vs `kündigung widerrufen`). | Identical utterance → HIGH. Heavy overlap → MEDIUM. |\n| Slot elicitation | `valueElicitationSetting.promptSpecification.maxRetries` is 2 or 3 and the retry messages differ from the first prompt (a caller who did not understand the question the first time will not understand it the third time). | No retries → MEDIUM. Retries with identical wording → LOW. |\n| Fallback routes somewhere useful | `AMAZON.FallbackIntent` either hands to a Lambda that offers a menu or sets a session attribute the flow uses to transfer to a queue. Fallback that re-prompts the same intent forever is a dead end. | Fallback loops → HIGH. Fallback disconnects → MEDIUM. |\n| Confidence threshold | `nluIntentConfidenceThreshold` on the bot locale. Unset means 0.40 by default. | Unset → MEDIUM (say what the default does). Below 0.40 → LOW. |\n| Locale and voice match | `localeId` (`de_DE`), `voiceSettings.voiceId` and the flow's `SetVoice` block must agree. Bedrock prompt language must match too. | Mismatch → HIGH. The caller hears a German sentence in an English voice, or ASR runs on the wrong language. |\n| Sensitive slots obfuscated | Slots for IBAN, card number, date of birth, address, customer number carry `obfuscationSetting.obfuscationSettingType: DefaultObfuscation`. Also check whether conversation logs are enabled with text logs. | Sensitive slot without obfuscation → HIGH. In eu-* regions with text logs on → CRITICAL. |\n\n```bash\n# An utterance is a collision only when two DIFFERENT intents in the SAME locale\n# share it. Keep locale and intent from the export path\n# (BotLocales\u002F\u003Clocale>\u002FIntents\u002F\u003Cintent>\u002FIntent.json) and normalise the text\n# before comparing — dropping the filenames turns repeats inside one intent, and\n# the same utterance in two locales, into false collisions. grep exits 1 for\n# \"no matches\" and above 1 for a real failure; tell them apart instead of\n# reading an empty result as \"no duplicates\". Case folding is ASCII only, so a\n# capitalised umlaut is compared as written.\nBOT_ROOT=\"${BOT_ROOT:-BotLocales}\"\nraw=$(grep -rHoE '\"utterance\"[[:space:]]*:[[:space:]]*\"[^\"]*\"' \\\n        --include='Intent.json' \"$BOT_ROOT\" 2>\u002Fdev\u002Fnull)\nst=$?\nif [ \"$st\" -gt 1 ]; then\n  echo \"UTTERANCES: N-A (scan failed, grep status $st)\"\nelif [ \"$st\" -eq 1 ]; then\n  echo \"UTTERANCES: N-A (no sample utterances found under $BOT_ROOT)\"\nelse\n  printf '%s\\n' \"$raw\" | awk '\n    {\n      if (match($(0), \u002FBotLocales\\\u002F[^\\\u002F]+\\\u002FIntents\\\u002F[^\\\u002F]+\\\u002FIntent\\.json:\u002F) == 0) { skipped++; next }\n      path = substr($(0), RSTART, RLENGTH - 1)\n      rest = substr($(0), RSTART + RLENGTH)\n      split(path, p, \"\u002F\")\n      if (match(rest, \u002F\"[^\"]*\"$\u002F) == 0) next\n      u = tolower(substr(rest, RSTART + 1, RLENGTH - 2))\n      gsub(\u002F[[:punct:]]\u002F, \" \", u)\n      gsub(\u002F[[:space:]]+\u002F, \" \", u)\n      sub(\u002F^ \u002F, \"\", u); sub(\u002F $\u002F, \"\", u)\n      if (u == \"\") next\n      k = p[2] SUBSEP u\n      if (!(k in ints)) ints[k] = p[4]\n      else if (index(\",\" ints[k] \",\", \",\" p[4] \",\") == 0) ints[k] = ints[k] \",\" p[4]\n    }\n    END {\n      for (k in ints) if (index(ints[k], \",\")) {\n        split(k, q, SUBSEP)\n        print \"COLLISION  locale=\" q[1] \"  intents=\" ints[k] \"  utterance=\" q[2]\n      }\n      if (skipped) print \"UTTERANCES: \" skipped \" line(s) N-A — path is not BotLocales\u002F\u003Clocale>\u002FIntents\u002F\u003Cintent>\u002FIntent.json\"\n    }'\nfi\n```\n\n---\n\n## Step 3: Bedrock \u002F LLM turn\n\nRead the Lambda that calls Bedrock end to end. Trace the input from the Lex event to the model call and the output from the model to the spoken message.\n\n| Check | How | Finding |\n|-------|-----|---------|\n| System prompt present, scoped, versioned | A `system` block that names the assistant's role, the allowed topics and the refusal behaviour. Loaded from a file with a version, or from Bedrock Prompt Management with a pinned `promptVersion`. | No system prompt → HIGH. Inline string with no version → MEDIUM. |\n| PII stripped before the model call | Caller number (`CustomerEndpoint.Address`), name and any slot value tagged sensitive are removed or tokenised before they enter the prompt. | Raw caller data in the prompt → HIGH. In eu-* → CRITICAL unless a DPA covers the model region. |\n| Hallucination guard | Either retrieval (`retrieve`, `retrieve_and_generate`, a Knowledge Base id) with the prompt instructing \"answer only from the provided context\", or an explicit \"I don't know — let me transfer you\" branch in the prompt and the flow. | Neither → HIGH. |\n| Output validation | Model output is checked before it is spoken: max length, no URLs or phone numbers the model invented, escaped for SSML if injected into `\u003Cspeak>`. | No validation → MEDIUM. Unescaped output inside SSML → HIGH. |\n| Where the model call lands | In a Lambda the runtime sets `AWS_REGION`, so a client built without `region_name` already resolves to the deployed region — the absence of the argument is not itself a defect. Check the destination instead: the `modelId` or inference profile prefix (`eu.`, `us.`, `apac.`), any explicit `endpoint_url`, and the function's own region from `get-function-configuration`. | Cross-region profile whose geography sits outside the function's region — a `us.` profile called from an eu-* function → HIGH (data leaves the EU). Model id or region supplied at runtime from configuration this review cannot read → N-A; name the value to check. |\n| Timeouts and retries | `botocore.config.Config(connect_timeout=, read_timeout=, retries={...})` or the JS SDK `requestHandler` timeouts. Default read timeout is 60 s, which is far beyond what Lex or Connect will wait. | Defaults left in place → HIGH. |\n| Conversation state and memory admission | Find where the Lambda writes anything that outlives the turn: Lex session attributes, Connect contact attributes, DynamoDB, a Knowledge Base ingest or a memory store. Check which text goes in — the caller's words and verified tool results, or the model's own reply. | Model output written back as a fact the next turn or the next call reads as true (an account status, a promised refund, a summary used as context) → HIGH. Caller corrections overwritten by an earlier model statement → HIGH. |\n| Streaming | `converse_stream` \u002F `InvokeModelWithResponseStream` when the audio path can consume partial output (custom media with Polly). In a plain Lex-in-Connect design the full response is needed before TTS, so streaming buys nothing — note that rather than report it. | Custom media path without streaming → MEDIUM. |\n\n```bash\ngrep -nE 'read_timeout|connect_timeout|requestTimeout|retries' \"$LAMBDA_FILE\"\ngrep -nE 'region_name|AWS_REGION|inferenceProfile|modelId|model_id' \"$LAMBDA_FILE\"\ngrep -nE 'system=|\"system\"|systemPrompt|SYSTEM_PROMPT' \"$LAMBDA_FILE\"\ngrep -nE 'sessionAttributes|put_item|PutItem|update_item|UpdateContactAttributes|start_ingestion_job|memory' \"$LAMBDA_FILE\"\n```\n\n---\n\n## Step 4: Latency budget\n\nCallers perceive a gap of more than about 800 ms after they stop talking as the bot not understanding them. Build the budget for the slowest turn (usually the Bedrock turn).\n\n| Check | How | Finding |\n|-------|-----|---------|\n| Lambda timeout inside the Connect limit | Read `InvocationType` on the `InvokeLambdaFunction` action first. `SYNCHRONOUS` holds the contact and waits at most 8 s; `ASYNCHRONOUS` allows up to 60 s and the contact moves on immediately, so only the synchronous case puts the caller-facing limit at risk. The wait is `InvocationTimeLimitSeconds` on the action, not the Lambda's own `Timeout`. The Lambda `Timeout` belongs at or below it, and the Bedrock read timeout lower still, so the Lambda fails cleanly instead of Connect taking the error branch while the Lambda keeps running. Lex code hooks wait 30 s by default (raised with the `x-amz-lex:codehook-timeout-ms` session attribute) and the caller hears silence throughout. | Synchronous, Lambda `Timeout` ≥ `InvocationTimeLimitSeconds` → HIGH. Bedrock read timeout ≥ Lambda `Timeout` → HIGH. Asynchronous → no finding on the 8 s limit; check instead that a `Wait` block or a `Load Lambda result` action collects the response. `InvocationType` not in the source → N-A. |\n| Measured turn time | If CloudWatch is reachable, take p50\u002Fp95 of the `Duration` field on Lambda `REPORT` lines. `Duration` is the handler's own wall clock: the model call made inside the handler is already inside it, and cold start is not — `Init Duration` is reported separately. So this measurement separates handler-plus-model from init, and separates neither of them from ASR or TTS, which happen outside the function. | Measured turn over 800 ms with no filler → HIGH. No measurement available and every stage estimated → MEDIUM, and say so in the latency table. |\n| Filler prompt or streaming | Lex V2 `fulfillmentUpdatesSpecification` with `startResponse` (spoken immediately) and `updateResponse` (spoken while waiting), or a `PlayPrompt` before the Lambda block. | Missing on a turn over 800 ms → HIGH. |\n| Barge-in | Long prompts and menus have `allowInterrupt: true` on Lex messages; `PlayPrompt` blocks that read a menu are followed by input blocks that accept DTMF during playback. | Missing on menus → MEDIUM. |\n| Cold starts on the hot path | `aws_lambda_provisioned_concurrency_config`, SnapStart, or a scheduled warmer on the Lex fulfilment and Connect Lambdas. Weigh by runtime: Java or Python with large dependencies cold-starts in seconds. | Heavy runtime, no mitigation → HIGH. Slim Node\u002FPython, no mitigation → LOW. |\n\n```bash\n# A REPORT line carries Duration, Billed Duration and Init Duration (and Restore\n# Duration under SnapStart). Strip the qualified ones first — only wall-clock\n# Duration belongs in the latency budget. Init Duration is the cold-start\n# number for the latency table — it comes out of a second pass below.\n# Capture the aws status: an empty pipeline here means \"no access\" as often as\n# it means \"no invocations\", and those are not the same answer.\nif ! raw=$(aws logs filter-log-events --log-group-name \"\u002Faws\u002Flambda\u002F$FN\" \\\n      --filter-pattern \"REPORT\" --start-time \"$(( $(date +%s) - 86400 ))000\" \\\n      --query 'events[].message' --output text 2>\u002Fdev\u002Fnull); then\n  echo \"LATENCY: N-A (filter-log-events failed — no access, or no such log group)\"\nelse\n  printf '%s\\n' \"$raw\" \\\n    | sed -E 's\u002F(Billed|Init|Restore) Duration: [0-9.]+ ms\u002F\u002Fg' \\\n    | grep -oE 'Duration: [0-9.]+ ms' | awk '{print $(2)}' | sort -n \\\n    | awk 'function q(a, n, p,   i) { i = int(n * p); if (i \u003C n * p) i++; if (i \u003C 1) i = 1; if (i > n) i = n; return a[i] }\n           { a[NR] = $(1) }\n           END { if (NR) printf \"handler p50=%s p95=%s n=%d\\n\", q(a, NR, 0.5), q(a, NR, 0.95), NR;\n                 else print \"LATENCY: N-A (no REPORT lines in the window)\" }'\n  # Second pass for the cold-start row. The aws call already succeeded, so an\n  # absence of Init Duration lines means no cold start was sampled, not no\n  # access — which is a different answer from the N-A above.\n  printf '%s\\n' \"$raw\" \\\n    | grep -oE 'Init Duration: [0-9.]+ ms' | awk '{print $(3)}' | sort -n \\\n    | awk 'function q(a, n, p,   i) { i = int(n * p); if (i \u003C n * p) i++; if (i \u003C 1) i = 1; if (i > n) i = n; return a[i] }\n           { a[NR] = $(1) }\n           END { if (NR) printf \"init p50=%s p95=%s n=%d\\n\", q(a, NR, 0.5), q(a, NR, 0.95), NR;\n                 else print \"INIT: no cold start in the sampled window — leave the init row out, or mark it estimated\" }'\nfi\n```\n\nThe percentile is nearest-rank: index `ceil(n × p)`, clamped to the array. Adding one to the floor overshoots by a place whenever `n × p` is already a whole number.\n\nEstimate any stage you cannot measure and mark it as an estimate. Typical ranges: Lex ASR 300–600 ms after end of speech; Lambda cold start 200 ms–3 s by runtime; Bedrock first token 400–1500 ms and full answer proportional to output tokens; Polly neural TTS 200–400 ms for one sentence. Sum them in the latency table in the report — but never add an estimated model time on top of a measured handler `Duration`, which already contains it. Init Duration is its own row, for the cold-start case only.\n\n---\n\n## Step 5: State and idempotency\n\n| Check | How | Finding |\n|-------|-----|---------|\n| Session data with TTL | The DynamoDB session table has TTL enabled and every write sets the TTL attribute. | No TTL → MEDIUM. In eu-* with caller data stored → HIGH (retention with no expiry). |\n| Idempotent handlers | Connect retries an invocation that is throttled or hits a 500, and retries up to three times when the invocation returns an error, all inside the configured timeout; Lex takes its configured timeout or failure response instead of retrying. So a repeat is possible rather than guaranteed — and a caller who redials repeats the side effect either way. Any side effect (create ticket, send SMS, book appointment) needs a key covering both the contact and the operation — `\u003CContactId>#\u003Coperation>#\u003Chash of the arguments>` — behind a conditional write or an idempotency table. `ContactId` or `sessionId` alone collides as soon as one contact legitimately performs two side effects, and the second one is silently dropped. | Side effect with no key → HIGH. Key that is only the contact or session id where the handler can perform more than one side effect → MEDIUM. |\n| Retries are safe | SDK retry config on non-idempotent calls (payments, notifications) is off or guarded. | Unguarded retries on a side-effecting call → MEDIUM. |\n| Attribute size limits | Contact attributes total 32 KB; Lex session attributes are also bounded. Storing a transcript, a model response history or a JSON blob in attributes hits the limit mid-call. | Transcript or history in attributes → HIGH. |\n\n```bash\n# TTL is spelled differently per tool: a `ttl` block in Terraform,\n# TimeToLiveSpecification in CloudFormation, timeToLiveAttribute (TS) or\n# time_to_live_attribute (Python) in CDK. A hit is not proof — read the match\n# and confirm it is enabled and names a real attribute.\nttl=$(grep -rnE '(^|[^[:alnum:]_])ttl[[:space:]]*\\{|TimeToLiveSpecification|timeToLiveAttribute|time_to_live|ttl_enabled' \\\n  --include='*.tf' --include='*.yml' --include='*.yaml' --include='*.ts' --include='*.py' . 2>\u002Fdev\u002Fnull)\nst=$?\nif [ \"$st\" -gt 1 ]; then\n  echo \"TTL: N-A (scan failed, grep status $st)\"\nelif [ \"$st\" -eq 1 ]; then\n  echo \"TTL: no declaration in the scanned files — a finding only if the table is defined here; otherwise N-A\"\nelse\n  printf '%s\\n' \"$ttl\"\nfi\ngrep -nE 'ConditionExpression|attribute_not_exists|idempotency' \"$LAMBDA_FILE\"\n```\n\n---\n\n## Step 6: Observability\n\n| Check | How | Finding |\n|-------|-----|---------|\n| Transcripts | Contact Lens enabled on the instance and the flow, or a transcript export to S3 via Lex conversation logs \u002F Kinesis. | Neither → MEDIUM. |\n| Metrics and alarms | CloudWatch alarms on Lambda `Errors`, `Throttles`, `Duration` p95; Lex `MissedUtteranceCount` and `RuntimeRequestErrors`; Bedrock `InvocationClientErrors`, `InvocationServerErrors`, `InvocationLatency`. | No alarms → MEDIUM. Alarm with an empty `AlarmActions` list, or with `ActionsEnabled` false → LOW. Nothing reaches anyone when it fires. |\n| Trace id end to end | `ContactId` is logged in every Lambda log line and passed as request metadata to Bedrock, or X-Ray is enabled across Lambda and the SDK client. | Cannot correlate a bad call across flow, Lambda and model → MEDIUM. |\n\n```bash\n# An empty AlarmActions list is the case being hunted, so project the list\n# itself. Keep --output json: the table formatter cannot render a list cell.\nif ! aws cloudwatch describe-alarms \\\n      --query 'MetricAlarms[].{Alarm:AlarmName,Namespace:Namespace,Metric:MetricName,ActionsEnabled:ActionsEnabled,AlarmActions:AlarmActions}' \\\n      --output json 2>\u002Fdev\u002Fnull; then\n  echo \"ALARMS: N-A (describe-alarms failed — no access)\"\nfi\ngrep -nE 'ContactId|contactId|sessionId|correlation' \"$LAMBDA_FILE\"\n```\n\nGerman-market note (eu-* regions): transcripts and conversation logs are personal data under the DSGVO. Report where transcripts land, the S3 lifecycle rule that deletes them, and whether the retention period is documented. Missing lifecycle rule → HIGH.\n\n---\n\n## Step 7: Cost per contact\n\nDo not hardcode prices. Every line of the formula needs its own rate, fetched one component at a time. `get-products` without `--filters` returns whatever products happen to match the service code, and truncating that JSON with `head` leaves a fragment of unrelated products rather than a rate — an estimate built on it would be invented. The Price List API is served from `us-east-1`, `eu-central-1` and `ap-south-1` regardless of where the workload runs: `--region` picks the endpoint, the `regionCode` filter picks the priced region.\n\n```bash\n# What each service can be filtered on. Do this before writing any filter — a\n# guessed field or value returns an empty set that reads like a zero rate.\n# The authoritative service-code list is:\n#   aws pricing describe-services --region us-east-1 --query 'Services[].ServiceCode'\nfor svc in AmazonConnect AmazonLex AmazonBedrock AWSLambda AmazonPolly AmazonDynamoDB; do\n  if attrs=$(aws pricing describe-services --region us-east-1 --service-code \"$svc\" \\\n        --query 'Services[0].AttributeNames' --output text 2>\u002Fdev\u002Fnull); then\n    printf '%s: %s\\n' \"$svc\" \"$attrs\"\n  else\n    printf '%s: N-A (describe-services failed — no access, or wrong service code)\\n' \"$svc\"\n  fi\ndone\n\n# Values that actually exist for one attribute, so the TERM_MATCH filter matches.\naws pricing get-attribute-values --region us-east-1 \\\n  --service-code AmazonConnect --attribute-name usagetype --max-results 100 \\\n  --query 'AttributeValues[].Value' --output text 2>\u002Fdev\u002Fnull \\\n  || echo \"ATTRIBUTES: N-A (get-attribute-values failed for AmazonConnect\u002Fusagetype)\"\n\n# One filtered query per formula line. Repeat with the service code, region and\n# usage type for each component; keep --output json and do not truncate it.\naws pricing get-products --region us-east-1 --service-code \"$SVC\" \\\n  --filters \"Type=TERM_MATCH,Field=regionCode,Value=$WORKLOAD_REGION\" \\\n            \"Type=TERM_MATCH,Field=usagetype,Value=$USAGE_TYPE\" \\\n  --max-results 10 --output json 2>\u002Fdev\u002Fnull \\\n  || echo \"PRICING: N-A (get-products failed for $SVC\u002F$USAGE_TYPE)\"\n```\n\nTelephony is priced per country, number type and direction, and negotiated rates are common, so ask the user for the per-minute rate on the numbers actually in use rather than deriving one.\n\n```\ncost_per_call =\n    call_minutes           x (connect_service_rate + telephony_rate_per_minute)\n  + lex_speech_requests    x lex_speech_rate\n  + lex_text_requests      x lex_text_rate\n  + bedrock_input_tokens   x input_token_rate\n  + bedrock_output_tokens  x output_token_rate\n  + lambda_invocations     x lambda_request_rate\n  + lambda_gb_seconds      x lambda_duration_rate\n  + call_minutes           x contact_lens_rate            (if enabled)\n  + tts_characters         x polly_neural_rate            (if neural voices are used)\n  + dynamodb_writes        x write_request_rate\n```\n\nFill a rate only from a query that returned one. Mark every other rate \"user input\", and then report the total as an order of magnitude rather than a price — say which lines are missing. What the user has to supply:\n\n- inbound per-minute telephony rate for the country and number type in use\n- the model id, and its input and output token rates\n- average call length and Lex turns per call, from a real call sample\n- Lambda memory, and the measured duration from Step 4\n- whether Contact Lens, neural voices and any analytics add-on are enabled\n\nEstimate the per-call quantities from a representative call: count Lex turns from the flow, tokens from the prompt size plus a typical answer, Lambda GB-seconds from memory × measured duration. Show the assumptions next to each number. Then name the largest line item and the one change that would cut it.\n\n---\n\n## Output\n\n```\nCONNECT REVIEW\n==============\n\nSolution summary\n  \u003Cone paragraph: entry point, flows, bot and locale, Lambdas, model and region, session store>\n  Region: \u003Cregion>  (DSGVO notes: yes\u002Fno)\n\nFindings\n| #  | Severity | Area        | Evidence                                   | Fix |\n|----|----------|-------------|--------------------------------------------|-----|\n| 1  | CRITICAL | Flow        | main-inbound.json block 3f2a (UpdateContactAttributes) | Remove `apiKey` from attributes; read it from Secrets Manager inside the Lambda |\n| 2  | HIGH     | Latency     | handler.py:41 read_timeout unset           | Config(read_timeout=4, connect_timeout=1, retries={\"max_attempts\": 1}) |\n| 3  | MEDIUM   | Lex         | BotLocales\u002Fde_DE\u002FIntents\u002FCancel\u002FIntent.json | Add two distinct retry prompts, maxRetries 2 |\n\nLatency budget (slowest turn)\n| Stage                           | Measured \u002F Estimated | ms    |\n|---------------------------------|----------------------|-------|\n| Lex ASR end-of-speech           | estimated            | 500   |\n| Lambda init (cold start)        | measured p95         | 1800  |\n| Lambda handler incl. model call | measured p95         | 2100  |\n| TTS                             | estimated            | 300   |\n| Total                           |                      | 4700  |\n| Budget                          |                      | 800   |\n\n  Filler prompt: \u003Cnone \u002F startResponse at 400 ms>\n\nCost per call (assumptions in brackets)\n  \u003Cone line per formula item: quantity x rate = amount, each rate marked fetched or user input>\n  Total: \u003Camount>  — order of magnitude if any rate is user input\n  Largest item: \u003Cname> — \u003Cone change that cuts it>\n\nWhat to test next\n  1. \u003Ccall scenario that exercises the worst finding, e.g. say nothing for 10 s at the main menu>\n  2. \u003Ccall scenario for the fallback path, e.g. ask an off-topic question twice>\n  3. \u003Ccall scenario for latency, e.g. ask the longest knowledge question at 09:00 after a cold night>\n\nNot checked\n  \u003Ccheck> — \u003Cwhy: no CLI access, input missing, value only resolved at runtime>\n```\n\nThe handler row already contains the model call. Never add a separately estimated model time to a measured handler duration.\n\nSeverity meaning: CRITICAL — caller data or credentials exposed, or callers dropped; HIGH — a real call fails or the caller gives up; MEDIUM — degrades quality or costs money at scale; LOW — hygiene; N-A — the check could not run, which is reported as N-A and never as a pass or a fail.\n\nIf the user asks for a file, write the report to `docs\u002Fconnect-review-\u003CYYYY-MM-DD>.md` with Write. Otherwise print it.\n\n---\n\n## Important Rules\n\n1. **Read-only against AWS.** Only `describe`, `list`, `get` and log queries. Never modify a flow, bot, Lambda, alarm or table, never publish a bot version, never purchase anything and never write to the customer account.\n2. **Never modify flows or bots in the repo either.** Report the fix; do not apply it. This skill produces findings, not diffs.\n3. **Evidence or it is not a finding.** Every row cites a file and line, a flow block identifier, or a resource id. A concern without evidence goes into \"What to test next\", not into the table.\n4. **Never log real caller data into learnings.** Phone numbers, names, transcripts and slot values seen during the review stay out of the learnings log and out of the report. Use placeholders.\n5. **German-market notes when the region is eu-*.** Add DSGVO notes on transcript retention, log obfuscation, model region and session TTL. Do not add them for other regions.\n6. **Estimates are labelled.** A latency or cost number you did not measure says \"estimated\" next to it.\n7. **Say what you could not check.** If an input was missing or the CLI had no access, the row is N-A and goes under \"Not checked\" at the end of the report. Never let a failed call read as a clean result: capture the exit status of every `aws` call and every grep whose emptiness would otherwise be taken as evidence.\n8. **Caller-facing output carries only the answer.** The caller hears the final business answer or a safe error message (\"I can't look that up right now, let me transfer you\"), never model reasoning, an exception string (`str(e)`, a stack trace), a tool trace, internal notes or prompt text. A Lambda or bot that returns any of those into the contact flow, where a prompt block or Lex message can speak them, is a finding: cite the return path. This rule covers what reaches the caller in the contact center; it is not a general policy for other outbound messages.\n\n{{include lib\u002Fsnippets\u002Fcapture-learnings.md}}\n","If this session was compacted, the copy of this skill in context may be cut off.\nRead `${CLAUDE_SKILL_DIR}\u002FSKILL.md` from disk and resume at the step you are on.\n\n## When to invoke\n\nUse when: \"review the contact flow\", \"review this Connect solution\", \"is the Lex bot well designed\", \"why is the voice bot slow\", \"review the IVR\", \"check the phone assistant before go-live\".\n\n## Preamble\n\n```bash\neval \"$(\"${VIBESTACK_HOME:-$HOME\u002F.vibestack}\u002Fbin\u002Fvibe-slug\" 2>\u002Fdev\u002Fnull)\" 2>\u002Fdev\u002Fnull || SLUG=\"unknown\"\n_LEARN_FILE=\"${VIBESTACK_HOME:-$HOME\u002F.vibestack}\u002Fprojects\u002F${SLUG:-unknown}\u002Flearnings.jsonl\"\nif [ -f \"$_LEARN_FILE\" ]; then\n  _LEARN_COUNT=$(wc -l \u003C \"$_LEARN_FILE\" 2>\u002Fdev\u002Fnull | tr -d ' ')\n  echo \"LEARNINGS: $_LEARN_COUNT entries loaded\"\n  if [ \"$_LEARN_COUNT\" -gt 5 ] 2>\u002Fdev\u002Fnull; then\n    \"${VIBESTACK_HOME:-$HOME\u002F.vibestack}\u002Fbin\u002Fvibe-learnings-search\" --limit 5 2>\u002Fdev\u002Fnull || true\n  fi\nelse\n  echo \"LEARNINGS: none yet\"\nfi\n```\n\n{{include lib\u002Fsnippets\u002Fsession-host.md}}\n\n{{include lib\u002Fsnippets\u002Fdecision-brief.md}}\n\n{{include lib\u002Fsnippets\u002Fworking-protocols.md}}\n\n{{include lib\u002Fsnippets\u002Fstate-protocols.md}}\n\n## User-invocable\nWhen the user types `\u002Fconnect-review`, run this skill.\n\n---\n\n## Step 0: Find the inputs\n\nLocate the five inputs in the repo before reviewing anything. Use Glob and Grep; do not guess from file names alone.\n\n| Input | How to find it |\n|-------|----------------|\n| Contact flows | JSON exports: files containing `\"Version\": \"2019-10-30\"` and `\"Actions\"`. IaC: `aws_connect_contact_flow`, `aws_connect_hours_of_operation`, `aws_connect_instance` (Terraform) or `CfnContactFlow` (CDK). |\n| Lex V2 bot | Export zips unpacked to `BotLocales\u002F\u003Clocale>\u002FIntents\u002F*\u002FIntent.json` and `Slots\u002F*\u002FSlot.json`, or `aws_lexv2models_bot`, `aws_lexv2models_intent`, `aws_lexv2models_slot`, `aws_lexv2models_bot_locale`. |\n| Lambda source | Handlers referenced by `InvokeLambdaFunction` in flows, by `fulfillmentCodeHook` \u002F `dialogCodeHook` in intents, or `aws_lambda_function` \u002F SAM `AWS::Serverless::Function`. |\n| Prompts | Files under `prompts\u002F`, names matching `*prompt*`, or a `system`\u002F`systemPrompt` string near `converse(`, `invoke_model(`, `InvokeModel`, `ConverseCommand`. |\n| Session schema | `aws_dynamodb_table` or `AWS::DynamoDB::Table` with a `ttl`\u002F`expiresAt` attribute, plus any `sessionAttributes` writes in Lambda code. |\n\n```bash\ngrep -rlE '\"Version\": *\"2019-10-30\"' --include='*.json' . 2>\u002Fdev\u002Fnull | head\ngrep -rlE 'aws_connect_|aws_lexv2models_|CfnContactFlow|CfnBot' --include='*.tf' --include='*.ts' --include='*.py' . 2>\u002Fdev\u002Fnull | head\ngrep -rlE 'converse\\(|invoke_model\\(|InvokeModelCommand|ConverseCommand|bedrock-runtime' . 2>\u002Fdev\u002Fnull | grep -vE 'node_modules|\\.venv' | head\ngrep -rlE 'sampleUtterances|\"intentName\"' --include='*.json' . 2>\u002Fdev\u002Fnull | head\n```\n\nIf an input is missing, ask the user for the path or the resource id. If the `aws` CLI is configured, fill gaps with read-only calls. The region the context block prints decides whether the German-market notes apply.\n\n{{include lib\u002Fsnippets\u002Faws-context.md}}\n\n```bash\naws connect list-instances --query 'InstanceSummaryList[].[Id,InstanceAlias]' --output table\naws connect list-contact-flows --instance-id \"$INSTANCE_ID\" --output table\naws connect describe-contact-flow --instance-id \"$INSTANCE_ID\" --contact-flow-id \"$FLOW_ID\" --query 'ContactFlow.Content' --output text > \"${TMPDIR:-\u002Ftmp}\u002Fconnect-review-flow.json\"\naws lexv2-models list-bots --output table\naws lexv2-models describe-bot --bot-id \"$BOT_ID\"\naws lexv2-models list-intents --bot-id \"$BOT_ID\" --bot-version DRAFT --locale-id de_DE\naws lambda get-function-configuration --function-name \"$FN\" --query '[Timeout,MemorySize,Runtime]'\n```\n\nOnly `describe`, `list`, `get` and `filter-log-events` calls are allowed. Never call `update-*`, `create-*`, `build-bot-locale` or `put-*`.\n\nWrite down the solution shape in one paragraph before continuing: entry number → flow → Lex bot → Lambda → Bedrock → back, plus which locale, which model and which region. This becomes the \"Solution summary\" in the report.\n\n---\n\n## Step 1: Flow structure\n\nWalk every flow from `StartAction` following `Transitions.NextAction`, `Transitions.Conditions[].NextAction` and `Transitions.Errors[].NextAction`. Build the graph before judging it — a block that looks unreachable in the JSON often is.\n\n| Check | How | Finding |\n|-------|-----|---------|\n| Error branch on every fallible block | For each action of type `InvokeLambdaFunction`, `ConnectParticipantWithLexBot`, `GetParticipantInput`, `TransferContactToQueue`, `TransferToPhoneNumber`, `CheckHoursOfOperation`, `UpdateContactAttributes`: does `Transitions.Errors` exist and point somewhere other than the same block? | Missing → HIGH. The caller hears silence and the contact drops. |\n| Disconnect and timeout paths | `GetParticipantInput` and Lex blocks carry `InputTimeLimitExceeded` \u002F `NoMatchingCondition` \u002F `NoMatchingError` error names. Each must route to a re-prompt with a counter, then to a human or a polite disconnect. | Missing → MEDIUM. Timeout routed straight to `DisconnectParticipant` → HIGH. |\n| Transfer to agent reachable | Is there a path from `StartAction` to `TransferContactToQueue`? Is it reachable from the Lex fallback branch and from the Lambda error branch? | No path at all → HIGH. Not reachable from fallback → MEDIUM. |\n| Hours of operation and overrides | `CheckHoursOfOperation` precedes every queue transfer; the closed branch plays a message and offers callback, voicemail or disconnect. Holidays and short days live on the hours-of-operation resource as overrides — recurring, temporary, or inherited from a linked parent — not in the flow, so read the resource before judging the flow. The block also supports an optional branch per named override; the flow-language reference documents only the True\u002FFalse conditions for this action, so read the flow JSON rather than assume a branch shape. | No hours check → HIGH. Resource read, no override on it or on its parents, and no other holiday mechanism (Lambda, attribute, DynamoDB flag) → MEDIUM (LOW if the business is 24\u002F7). Resource not readable → N-A. |\n| Loop guards | Every `Loop` action has a bounded `LoopCount`. Any cycle through `GetParticipantInput` or a Lex block without a counter is an infinite loop for a confused caller. | Unbounded loop → HIGH. |\n| Attribute naming | Collect all keys from `UpdateContactAttributes`. Mixed `camelCase`, `snake_case` and `Title Case`, or the same concept under two names (`customerId`, `CustomerID`). | LOW. |\n| No secrets in attributes | Grep attribute values and Lambda return maps for `api[_-]?key`, `token`, `password`, `secret`, `Bearer`. Contact attributes appear in contact records, the agent workspace and Contact Lens exports. A keyword hit names a candidate, not a leak — read the matched line and decide whether the value is credential material or a field name, a placeholder or a boolean flag. | Credential value confirmed in an attribute → CRITICAL. Hit whose value cannot be resolved from the source (built at runtime, read from a variable) → MEDIUM, and name what would confirm it. |\n| Flow logging | A `UpdateFlowLoggingBehavior` action with `\"FlowLoggingBehavior\": \"Enabled\"` early in the flow. Logging set by that action carries into any flow the contact is transferred to, even one that has no such action, so trace back to the entry flow before judging a transferred flow. | Absent from the entry flow and from every flow on the path to it → MEDIUM. Nothing in CloudWatch when a call goes wrong. Absent only from a transferred flow whose entry flow enables it → not a finding. |\n\nEvidence for a flow finding is the flow name plus the block `Identifier` (or Terraform resource address and line).\n\n```bash\n# Overrides live on the hours-of-operation resource, not in the flow. An empty\n# override list only means something if the call succeeded — otherwise N-A.\nif hoo=$(aws connect describe-hours-of-operation \\\n      --instance-id \"$INSTANCE_ID\" --hours-of-operation-id \"$HOO_ID\" \\\n      --query 'HoursOfOperation.[Name,TimeZone,ParentHoursOfOperations[].Id]' \\\n      --output json 2>\u002Fdev\u002Fnull); then\n  printf '%s\\n' \"$hoo\"\n  aws connect list-hours-of-operation-overrides \\\n    --instance-id \"$INSTANCE_ID\" --hours-of-operation-id \"$HOO_ID\" \\\n    --query 'HoursOfOperationOverrideList[].[Name,OverrideType,EffectiveFrom,EffectiveTill]' \\\n    --output json 2>\u002Fdev\u002Fnull \\\n    || echo \"OVERRIDES: N-A (list call failed for $HOO_ID)\"\nelse\n  echo \"HOURS: N-A (describe failed — no access, or wrong instance\u002Fhours id)\"\nfi\n# Repeat both calls for every id in ParentHoursOfOperations: a child inherits the\n# parent's overrides, and they are not in the child's own list.\n```\n\n---\n\n## Step 2: Lex bot design\n\nRead every `Intent.json` and `Slot.json` in each locale, or the equivalent IaC resources.\n\n| Check | How | Finding |\n|-------|-----|---------|\n| Intent overlap | Normalise sample utterances (lowercase, strip punctuation) and compare across intents. Identical utterance in two intents, or two intents whose utterance sets share most of their tokens (`kündigen` vs `vertrag kündigen` vs `kündigung widerrufen`). | Identical utterance → HIGH. Heavy overlap → MEDIUM. |\n| Slot elicitation | `valueElicitationSetting.promptSpecification.maxRetries` is 2 or 3 and the retry messages differ from the first prompt (a caller who did not understand the question the first time will not understand it the third time). | No retries → MEDIUM. Retries with identical wording → LOW. |\n| Fallback routes somewhere useful | `AMAZON.FallbackIntent` either hands to a Lambda that offers a menu or sets a session attribute the flow uses to transfer to a queue. Fallback that re-prompts the same intent forever is a dead end. | Fallback loops → HIGH. Fallback disconnects → MEDIUM. |\n| Confidence threshold | `nluIntentConfidenceThreshold` on the bot locale. Unset means 0.40 by default. | Unset → MEDIUM (say what the default does). Below 0.40 → LOW. |\n| Locale and voice match | `localeId` (`de_DE`), `voiceSettings.voiceId` and the flow's `SetVoice` block must agree. Bedrock prompt language must match too. | Mismatch → HIGH. The caller hears a German sentence in an English voice, or ASR runs on the wrong language. |\n| Sensitive slots obfuscated | Slots for IBAN, card number, date of birth, address, customer number carry `obfuscationSetting.obfuscationSettingType: DefaultObfuscation`. Also check whether conversation logs are enabled with text logs. | Sensitive slot without obfuscation → HIGH. In eu-* regions with text logs on → CRITICAL. |\n\n```bash\n# An utterance is a collision only when two DIFFERENT intents in the SAME locale\n# share it. Keep locale and intent from the export path\n# (BotLocales\u002F\u003Clocale>\u002FIntents\u002F\u003Cintent>\u002FIntent.json) and normalise the text\n# before comparing — dropping the filenames turns repeats inside one intent, and\n# the same utterance in two locales, into false collisions. grep exits 1 for\n# \"no matches\" and above 1 for a real failure; tell them apart instead of\n# reading an empty result as \"no duplicates\". Case folding is ASCII only, so a\n# capitalised umlaut is compared as written.\nBOT_ROOT=\"${BOT_ROOT:-BotLocales}\"\nraw=$(grep -rHoE '\"utterance\"[[:space:]]*:[[:space:]]*\"[^\"]*\"' \\\n        --include='Intent.json' \"$BOT_ROOT\" 2>\u002Fdev\u002Fnull)\nst=$?\nif [ \"$st\" -gt 1 ]; then\n  echo \"UTTERANCES: N-A (scan failed, grep status $st)\"\nelif [ \"$st\" -eq 1 ]; then\n  echo \"UTTERANCES: N-A (no sample utterances found under $BOT_ROOT)\"\nelse\n  printf '%s\\n' \"$raw\" | awk '\n    {\n      if (match($(0), \u002FBotLocales\\\u002F[^\\\u002F]+\\\u002FIntents\\\u002F[^\\\u002F]+\\\u002FIntent\\.json:\u002F) == 0) { skipped++; next }\n      path = substr($(0), RSTART, RLENGTH - 1)\n      rest = substr($(0), RSTART + RLENGTH)\n      split(path, p, \"\u002F\")\n      if (match(rest, \u002F\"[^\"]*\"$\u002F) == 0) next\n      u = tolower(substr(rest, RSTART + 1, RLENGTH - 2))\n      gsub(\u002F[[:punct:]]\u002F, \" \", u)\n      gsub(\u002F[[:space:]]+\u002F, \" \", u)\n      sub(\u002F^ \u002F, \"\", u); sub(\u002F $\u002F, \"\", u)\n      if (u == \"\") next\n      k = p[2] SUBSEP u\n      if (!(k in ints)) ints[k] = p[4]\n      else if (index(\",\" ints[k] \",\", \",\" p[4] \",\") == 0) ints[k] = ints[k] \",\" p[4]\n    }\n    END {\n      for (k in ints) if (index(ints[k], \",\")) {\n        split(k, q, SUBSEP)\n        print \"COLLISION  locale=\" q[1] \"  intents=\" ints[k] \"  utterance=\" q[2]\n      }\n      if (skipped) print \"UTTERANCES: \" skipped \" line(s) N-A — path is not BotLocales\u002F\u003Clocale>\u002FIntents\u002F\u003Cintent>\u002FIntent.json\"\n    }'\nfi\n```\n\n---\n\n## Step 3: Bedrock \u002F LLM turn\n\nRead the Lambda that calls Bedrock end to end. Trace the input from the Lex event to the model call and the output from the model to the spoken message.\n\n| Check | How | Finding |\n|-------|-----|---------|\n| System prompt present, scoped, versioned | A `system` block that names the assistant's role, the allowed topics and the refusal behaviour. Loaded from a file with a version, or from Bedrock Prompt Management with a pinned `promptVersion`. | No system prompt → HIGH. Inline string with no version → MEDIUM. |\n| PII stripped before the model call | Caller number (`CustomerEndpoint.Address`), name and any slot value tagged sensitive are removed or tokenised before they enter the prompt. | Raw caller data in the prompt → HIGH. In eu-* → CRITICAL unless a DPA covers the model region. |\n| Hallucination guard | Either retrieval (`retrieve`, `retrieve_and_generate`, a Knowledge Base id) with the prompt instructing \"answer only from the provided context\", or an explicit \"I don't know — let me transfer you\" branch in the prompt and the flow. | Neither → HIGH. |\n| Output validation | Model output is checked before it is spoken: max length, no URLs or phone numbers the model invented, escaped for SSML if injected into `\u003Cspeak>`. | No validation → MEDIUM. Unescaped output inside SSML → HIGH. |\n| Where the model call lands | In a Lambda the runtime sets `AWS_REGION`, so a client built without `region_name` already resolves to the deployed region — the absence of the argument is not itself a defect. Check the destination instead: the `modelId` or inference profile prefix (`eu.`, `us.`, `apac.`), any explicit `endpoint_url`, and the function's own region from `get-function-configuration`. | Cross-region profile whose geography sits outside the function's region — a `us.` profile called from an eu-* function → HIGH (data leaves the EU). Model id or region supplied at runtime from configuration this review cannot read → N-A; name the value to check. |\n| Timeouts and retries | `botocore.config.Config(connect_timeout=, read_timeout=, retries={...})` or the JS SDK `requestHandler` timeouts. Default read timeout is 60 s, which is far beyond what Lex or Connect will wait. | Defaults left in place → HIGH. |\n| Conversation state and memory admission | Find where the Lambda writes anything that outlives the turn: Lex session attributes, Connect contact attributes, DynamoDB, a Knowledge Base ingest or a memory store. Check which text goes in — the caller's words and verified tool results, or the model's own reply. | Model output written back as a fact the next turn or the next call reads as true (an account status, a promised refund, a summary used as context) → HIGH. Caller corrections overwritten by an earlier model statement → HIGH. |\n| Streaming | `converse_stream` \u002F `InvokeModelWithResponseStream` when the audio path can consume partial output (custom media with Polly). In a plain Lex-in-Connect design the full response is needed before TTS, so streaming buys nothing — note that rather than report it. | Custom media path without streaming → MEDIUM. |\n\n```bash\ngrep -nE 'read_timeout|connect_timeout|requestTimeout|retries' \"$LAMBDA_FILE\"\ngrep -nE 'region_name|AWS_REGION|inferenceProfile|modelId|model_id' \"$LAMBDA_FILE\"\ngrep -nE 'system=|\"system\"|systemPrompt|SYSTEM_PROMPT' \"$LAMBDA_FILE\"\ngrep -nE 'sessionAttributes|put_item|PutItem|update_item|UpdateContactAttributes|start_ingestion_job|memory' \"$LAMBDA_FILE\"\n```\n\n---\n\n## Step 4: Latency budget\n\nCallers perceive a gap of more than about 800 ms after they stop talking as the bot not understanding them. Build the budget for the slowest turn (usually the Bedrock turn).\n\n| Check | How | Finding |\n|-------|-----|---------|\n| Lambda timeout inside the Connect limit | Read `InvocationType` on the `InvokeLambdaFunction` action first. `SYNCHRONOUS` holds the contact and waits at most 8 s; `ASYNCHRONOUS` allows up to 60 s and the contact moves on immediately, so only the synchronous case puts the caller-facing limit at risk. The wait is `InvocationTimeLimitSeconds` on the action, not the Lambda's own `Timeout`. The Lambda `Timeout` belongs at or below it, and the Bedrock read timeout lower still, so the Lambda fails cleanly instead of Connect taking the error branch while the Lambda keeps running. Lex code hooks wait 30 s by default (raised with the `x-amz-lex:codehook-timeout-ms` session attribute) and the caller hears silence throughout. | Synchronous, Lambda `Timeout` ≥ `InvocationTimeLimitSeconds` → HIGH. Bedrock read timeout ≥ Lambda `Timeout` → HIGH. Asynchronous → no finding on the 8 s limit; check instead that a `Wait` block or a `Load Lambda result` action collects the response. `InvocationType` not in the source → N-A. |\n| Measured turn time | If CloudWatch is reachable, take p50\u002Fp95 of the `Duration` field on Lambda `REPORT` lines. `Duration` is the handler's own wall clock: the model call made inside the handler is already inside it, and cold start is not — `Init Duration` is reported separately. So this measurement separates handler-plus-model from init, and separates neither of them from ASR or TTS, which happen outside the function. | Measured turn over 800 ms with no filler → HIGH. No measurement available and every stage estimated → MEDIUM, and say so in the latency table. |\n| Filler prompt or streaming | Lex V2 `fulfillmentUpdatesSpecification` with `startResponse` (spoken immediately) and `updateResponse` (spoken while waiting), or a `PlayPrompt` before the Lambda block. | Missing on a turn over 800 ms → HIGH. |\n| Barge-in | Long prompts and menus have `allowInterrupt: true` on Lex messages; `PlayPrompt` blocks that read a menu are followed by input blocks that accept DTMF during playback. | Missing on menus → MEDIUM. |\n| Cold starts on the hot path | `aws_lambda_provisioned_concurrency_config`, SnapStart, or a scheduled warmer on the Lex fulfilment and Connect Lambdas. Weigh by runtime: Java or Python with large dependencies cold-starts in seconds. | Heavy runtime, no mitigation → HIGH. Slim Node\u002FPython, no mitigation → LOW. |\n\n```bash\n# A REPORT line carries Duration, Billed Duration and Init Duration (and Restore\n# Duration under SnapStart). Strip the qualified ones first — only wall-clock\n# Duration belongs in the latency budget. Init Duration is the cold-start\n# number for the latency table — it comes out of a second pass below.\n# Capture the aws status: an empty pipeline here means \"no access\" as often as\n# it means \"no invocations\", and those are not the same answer.\nif ! raw=$(aws logs filter-log-events --log-group-name \"\u002Faws\u002Flambda\u002F$FN\" \\\n      --filter-pattern \"REPORT\" --start-time \"$(( $(date +%s) - 86400 ))000\" \\\n      --query 'events[].message' --output text 2>\u002Fdev\u002Fnull); then\n  echo \"LATENCY: N-A (filter-log-events failed — no access, or no such log group)\"\nelse\n  printf '%s\\n' \"$raw\" \\\n    | sed -E 's\u002F(Billed|Init|Restore) Duration: [0-9.]+ ms\u002F\u002Fg' \\\n    | grep -oE 'Duration: [0-9.]+ ms' | awk '{print $(2)}' | sort -n \\\n    | awk 'function q(a, n, p,   i) { i = int(n * p); if (i \u003C n * p) i++; if (i \u003C 1) i = 1; if (i > n) i = n; return a[i] }\n           { a[NR] = $(1) }\n           END { if (NR) printf \"handler p50=%s p95=%s n=%d\\n\", q(a, NR, 0.5), q(a, NR, 0.95), NR;\n                 else print \"LATENCY: N-A (no REPORT lines in the window)\" }'\n  # Second pass for the cold-start row. The aws call already succeeded, so an\n  # absence of Init Duration lines means no cold start was sampled, not no\n  # access — which is a different answer from the N-A above.\n  printf '%s\\n' \"$raw\" \\\n    | grep -oE 'Init Duration: [0-9.]+ ms' | awk '{print $(3)}' | sort -n \\\n    | awk 'function q(a, n, p,   i) { i = int(n * p); if (i \u003C n * p) i++; if (i \u003C 1) i = 1; if (i > n) i = n; return a[i] }\n           { a[NR] = $(1) }\n           END { if (NR) printf \"init p50=%s p95=%s n=%d\\n\", q(a, NR, 0.5), q(a, NR, 0.95), NR;\n                 else print \"INIT: no cold start in the sampled window — leave the init row out, or mark it estimated\" }'\nfi\n```\n\nThe percentile is nearest-rank: index `ceil(n × p)`, clamped to the array. Adding one to the floor overshoots by a place whenever `n × p` is already a whole number.\n\nEstimate any stage you cannot measure and mark it as an estimate. Typical ranges: Lex ASR 300–600 ms after end of speech; Lambda cold start 200 ms–3 s by runtime; Bedrock first token 400–1500 ms and full answer proportional to output tokens; Polly neural TTS 200–400 ms for one sentence. Sum them in the latency table in the report — but never add an estimated model time on top of a measured handler `Duration`, which already contains it. Init Duration is its own row, for the cold-start case only.\n\n---\n\n## Step 5: State and idempotency\n\n| Check | How | Finding |\n|-------|-----|---------|\n| Session data with TTL | The DynamoDB session table has TTL enabled and every write sets the TTL attribute. | No TTL → MEDIUM. In eu-* with caller data stored → HIGH (retention with no expiry). |\n| Idempotent handlers | Connect retries an invocation that is throttled or hits a 500, and retries up to three times when the invocation returns an error, all inside the configured timeout; Lex takes its configured timeout or failure response instead of retrying. So a repeat is possible rather than guaranteed — and a caller who redials repeats the side effect either way. Any side effect (create ticket, send SMS, book appointment) needs a key covering both the contact and the operation — `\u003CContactId>#\u003Coperation>#\u003Chash of the arguments>` — behind a conditional write or an idempotency table. `ContactId` or `sessionId` alone collides as soon as one contact legitimately performs two side effects, and the second one is silently dropped. | Side effect with no key → HIGH. Key that is only the contact or session id where the handler can perform more than one side effect → MEDIUM. |\n| Retries are safe | SDK retry config on non-idempotent calls (payments, notifications) is off or guarded. | Unguarded retries on a side-effecting call → MEDIUM. |\n| Attribute size limits | Contact attributes total 32 KB; Lex session attributes are also bounded. Storing a transcript, a model response history or a JSON blob in attributes hits the limit mid-call. | Transcript or history in attributes → HIGH. |\n\n```bash\n# TTL is spelled differently per tool: a `ttl` block in Terraform,\n# TimeToLiveSpecification in CloudFormation, timeToLiveAttribute (TS) or\n# time_to_live_attribute (Python) in CDK. A hit is not proof — read the match\n# and confirm it is enabled and names a real attribute.\nttl=$(grep -rnE '(^|[^[:alnum:]_])ttl[[:space:]]*\\{|TimeToLiveSpecification|timeToLiveAttribute|time_to_live|ttl_enabled' \\\n  --include='*.tf' --include='*.yml' --include='*.yaml' --include='*.ts' --include='*.py' . 2>\u002Fdev\u002Fnull)\nst=$?\nif [ \"$st\" -gt 1 ]; then\n  echo \"TTL: N-A (scan failed, grep status $st)\"\nelif [ \"$st\" -eq 1 ]; then\n  echo \"TTL: no declaration in the scanned files — a finding only if the table is defined here; otherwise N-A\"\nelse\n  printf '%s\\n' \"$ttl\"\nfi\ngrep -nE 'ConditionExpression|attribute_not_exists|idempotency' \"$LAMBDA_FILE\"\n```\n\n---\n\n## Step 6: Observability\n\n| Check | How | Finding |\n|-------|-----|---------|\n| Transcripts | Contact Lens enabled on the instance and the flow, or a transcript export to S3 via Lex conversation logs \u002F Kinesis. | Neither → MEDIUM. |\n| Metrics and alarms | CloudWatch alarms on Lambda `Errors`, `Throttles`, `Duration` p95; Lex `MissedUtteranceCount` and `RuntimeRequestErrors`; Bedrock `InvocationClientErrors`, `InvocationServerErrors`, `InvocationLatency`. | No alarms → MEDIUM. Alarm with an empty `AlarmActions` list, or with `ActionsEnabled` false → LOW. Nothing reaches anyone when it fires. |\n| Trace id end to end | `ContactId` is logged in every Lambda log line and passed as request metadata to Bedrock, or X-Ray is enabled across Lambda and the SDK client. | Cannot correlate a bad call across flow, Lambda and model → MEDIUM. |\n\n```bash\n# An empty AlarmActions list is the case being hunted, so project the list\n# itself. Keep --output json: the table formatter cannot render a list cell.\nif ! aws cloudwatch describe-alarms \\\n      --query 'MetricAlarms[].{Alarm:AlarmName,Namespace:Namespace,Metric:MetricName,ActionsEnabled:ActionsEnabled,AlarmActions:AlarmActions}' \\\n      --output json 2>\u002Fdev\u002Fnull; then\n  echo \"ALARMS: N-A (describe-alarms failed — no access)\"\nfi\ngrep -nE 'ContactId|contactId|sessionId|correlation' \"$LAMBDA_FILE\"\n```\n\nGerman-market note (eu-* regions): transcripts and conversation logs are personal data under the DSGVO. Report where transcripts land, the S3 lifecycle rule that deletes them, and whether the retention period is documented. Missing lifecycle rule → HIGH.\n\n---\n\n## Step 7: Cost per contact\n\nDo not hardcode prices. Every line of the formula needs its own rate, fetched one component at a time. `get-products` without `--filters` returns whatever products happen to match the service code, and truncating that JSON with `head` leaves a fragment of unrelated products rather than a rate — an estimate built on it would be invented. The Price List API is served from `us-east-1`, `eu-central-1` and `ap-south-1` regardless of where the workload runs: `--region` picks the endpoint, the `regionCode` filter picks the priced region.\n\n```bash\n# What each service can be filtered on. Do this before writing any filter — a\n# guessed field or value returns an empty set that reads like a zero rate.\n# The authoritative service-code list is:\n#   aws pricing describe-services --region us-east-1 --query 'Services[].ServiceCode'\nfor svc in AmazonConnect AmazonLex AmazonBedrock AWSLambda AmazonPolly AmazonDynamoDB; do\n  if attrs=$(aws pricing describe-services --region us-east-1 --service-code \"$svc\" \\\n        --query 'Services[0].AttributeNames' --output text 2>\u002Fdev\u002Fnull); then\n    printf '%s: %s\\n' \"$svc\" \"$attrs\"\n  else\n    printf '%s: N-A (describe-services failed — no access, or wrong service code)\\n' \"$svc\"\n  fi\ndone\n\n# Values that actually exist for one attribute, so the TERM_MATCH filter matches.\naws pricing get-attribute-values --region us-east-1 \\\n  --service-code AmazonConnect --attribute-name usagetype --max-results 100 \\\n  --query 'AttributeValues[].Value' --output text 2>\u002Fdev\u002Fnull \\\n  || echo \"ATTRIBUTES: N-A (get-attribute-values failed for AmazonConnect\u002Fusagetype)\"\n\n# One filtered query per formula line. Repeat with the service code, region and\n# usage type for each component; keep --output json and do not truncate it.\naws pricing get-products --region us-east-1 --service-code \"$SVC\" \\\n  --filters \"Type=TERM_MATCH,Field=regionCode,Value=$WORKLOAD_REGION\" \\\n            \"Type=TERM_MATCH,Field=usagetype,Value=$USAGE_TYPE\" \\\n  --max-results 10 --output json 2>\u002Fdev\u002Fnull \\\n  || echo \"PRICING: N-A (get-products failed for $SVC\u002F$USAGE_TYPE)\"\n```\n\nTelephony is priced per country, number type and direction, and negotiated rates are common, so ask the user for the per-minute rate on the numbers actually in use rather than deriving one.\n\n```\ncost_per_call =\n    call_minutes           x (connect_service_rate + telephony_rate_per_minute)\n  + lex_speech_requests    x lex_speech_rate\n  + lex_text_requests      x lex_text_rate\n  + bedrock_input_tokens   x input_token_rate\n  + bedrock_output_tokens  x output_token_rate\n  + lambda_invocations     x lambda_request_rate\n  + lambda_gb_seconds      x lambda_duration_rate\n  + call_minutes           x contact_lens_rate            (if enabled)\n  + tts_characters         x polly_neural_rate            (if neural voices are used)\n  + dynamodb_writes        x write_request_rate\n```\n\nFill a rate only from a query that returned one. Mark every other rate \"user input\", and then report the total as an order of magnitude rather than a price — say which lines are missing. What the user has to supply:\n\n- inbound per-minute telephony rate for the country and number type in use\n- the model id, and its input and output token rates\n- average call length and Lex turns per call, from a real call sample\n- Lambda memory, and the measured duration from Step 4\n- whether Contact Lens, neural voices and any analytics add-on are enabled\n\nEstimate the per-call quantities from a representative call: count Lex turns from the flow, tokens from the prompt size plus a typical answer, Lambda GB-seconds from memory × measured duration. Show the assumptions next to each number. Then name the largest line item and the one change that would cut it.\n\n---\n\n## Output\n\n```\nCONNECT REVIEW\n==============\n\nSolution summary\n  \u003Cone paragraph: entry point, flows, bot and locale, Lambdas, model and region, session store>\n  Region: \u003Cregion>  (DSGVO notes: yes\u002Fno)\n\nFindings\n| #  | Severity | Area        | Evidence                                   | Fix |\n|----|----------|-------------|--------------------------------------------|-----|\n| 1  | CRITICAL | Flow        | main-inbound.json block 3f2a (UpdateContactAttributes) | Remove `apiKey` from attributes; read it from Secrets Manager inside the Lambda |\n| 2  | HIGH     | Latency     | handler.py:41 read_timeout unset           | Config(read_timeout=4, connect_timeout=1, retries={\"max_attempts\": 1}) |\n| 3  | MEDIUM   | Lex         | BotLocales\u002Fde_DE\u002FIntents\u002FCancel\u002FIntent.json | Add two distinct retry prompts, maxRetries 2 |\n\nLatency budget (slowest turn)\n| Stage                           | Measured \u002F Estimated | ms    |\n|---------------------------------|----------------------|-------|\n| Lex ASR end-of-speech           | estimated            | 500   |\n| Lambda init (cold start)        | measured p95         | 1800  |\n| Lambda handler incl. model call | measured p95         | 2100  |\n| TTS                             | estimated            | 300   |\n| Total                           |                      | 4700  |\n| Budget                          |                      | 800   |\n\n  Filler prompt: \u003Cnone \u002F startResponse at 400 ms>\n\nCost per call (assumptions in brackets)\n  \u003Cone line per formula item: quantity x rate = amount, each rate marked fetched or user input>\n  Total: \u003Camount>  — order of magnitude if any rate is user input\n  Largest item: \u003Cname> — \u003Cone change that cuts it>\n\nWhat to test next\n  1. \u003Ccall scenario that exercises the worst finding, e.g. say nothing for 10 s at the main menu>\n  2. \u003Ccall scenario for the fallback path, e.g. ask an off-topic question twice>\n  3. \u003Ccall scenario for latency, e.g. ask the longest knowledge question at 09:00 after a cold night>\n\nNot checked\n  \u003Ccheck> — \u003Cwhy: no CLI access, input missing, value only resolved at runtime>\n```\n\nThe handler row already contains the model call. Never add a separately estimated model time to a measured handler duration.\n\nSeverity meaning: CRITICAL — caller data or credentials exposed, or callers dropped; HIGH — a real call fails or the caller gives up; MEDIUM — degrades quality or costs money at scale; LOW — hygiene; N-A — the check could not run, which is reported as N-A and never as a pass or a fail.\n\nIf the user asks for a file, write the report to `docs\u002Fconnect-review-\u003CYYYY-MM-DD>.md` with Write. Otherwise print it.\n\n---\n\n## Important Rules\n\n1. **Read-only against AWS.** Only `describe`, `list`, `get` and log queries. Never modify a flow, bot, Lambda, alarm or table, never publish a bot version, never purchase anything and never write to the customer account.\n2. **Never modify flows or bots in the repo either.** Report the fix; do not apply it. This skill produces findings, not diffs.\n3. **Evidence or it is not a finding.** Every row cites a file and line, a flow block identifier, or a resource id. A concern without evidence goes into \"What to test next\", not into the table.\n4. **Never log real caller data into learnings.** Phone numbers, names, transcripts and slot values seen during the review stay out of the learnings log and out of the report. Use placeholders.\n5. **German-market notes when the region is eu-*.** Add DSGVO notes on transcript retention, log obfuscation, model region and session TTL. Do not add them for other regions.\n6. **Estimates are labelled.** A latency or cost number you did not measure says \"estimated\" next to it.\n7. **Say what you could not check.** If an input was missing or the CLI had no access, the row is N-A and goes under \"Not checked\" at the end of the report. Never let a failed call read as a clean result: capture the exit status of every `aws` call and every grep whose emptiness would otherwise be taken as evidence.\n8. **Caller-facing output carries only the answer.** The caller hears the final business answer or a safe error message (\"I can't look that up right now, let me transfer you\"), never model reasoning, an exception string (`str(e)`, a stack trace), a tool trace, internal notes or prompt text. A Lambda or bot that returns any of those into the contact flow, where a prompt block or Lex message can speak them, is a finding: cite the return path. This rule covers what reaches the caller in the contact center; it is not a general policy for other outbound messages.\n\n{{include lib\u002Fsnippets\u002Fcapture-learnings.md}}\n",{"name":5,"triggers":44,"description":52,"allowed-tools":53},[45,46,47,48,49,50,51],"review contact flow","amazon connect review","lex bot review","voice bot review","connect latency","ivr review","review the phone assistant","Review an Amazon Connect contact center, IVR or voice bot for latency, reliability, cost and flow design.\n",[33,54,55,56,57,58],"Read","Grep","Glob","Write","AskUserQuestion","main","777ec643a83c17a0955856b2eb7f596601709fda","skills\u002Fconnect-review",0,"https:\u002F\u002Fgithub.com\u002Ftimurgaleev\u002Fvibestack","https:\u002F\u002Fgithub.com\u002Ftimurgaleev","https:\u002F\u002Ftgaleev.com\u002F","Forward Deployed Engineer \u002F\r\nAWS Community Builder \u002F Cloud Architect ","2026-11-11 15:42:25",{"source":8,"skillName":5,"commands":69,"prompt":79,"zipAvailable":80},[70,73,76],{"tool":71,"command":72},"npx","npx skills add timurgaleev\u002Fvibestack --skill connect-review",{"tool":74,"command":75},"bunx","bunx skills add timurgaleev\u002Fvibestack --skill connect-review",{"tool":77,"command":78},"pnpm","pnpm dlx skills add timurgaleev\u002Fvibestack --skill connect-review","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftimurgaleev\u002Fvibestack\u002Fblob\u002Fmain\u002Fskills\u002Fconnect-review\u002FSKILL.md",true,[],[83,89,95,101,107,113],{"skillNo":84,"name":85,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":39},"01M71GVHCCSQCCPVM8XPSPTA73","docs","https:\u002F\u002Fgithub.com\u002Ftimurgaleev\u002Fvibestack\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Frender\u002F15-backtick-info-string\u002Fskills\u002Fdocs\u002FSKILL.md",[],[85],{"skillNo":90,"name":91,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":39},"01M71GVFT1S5MRNM0AYRT2E6VQ","fences","https:\u002F\u002Fgithub.com\u002Ftimurgaleev\u002Fvibestack\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Frender\u002F14-indented-tilde-fence\u002Fskills\u002Ffences\u002FSKILL.md",[],[91],{"skillNo":96,"name":97,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":39},"01M71GVEYB54K1S83FGRNKN8CF","dirty","https:\u002F\u002Fgithub.com\u002Ftimurgaleev\u002Fvibestack\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Frender\u002F10-check-with-drift\u002Fskills\u002Fdirty\u002FSKILL.md",[],[97],{"skillNo":102,"name":103,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":39},"01M71GVDX9PMND1337C4388DK4","clean","https:\u002F\u002Fgithub.com\u002Ftimurgaleev\u002Fvibestack\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Frender\u002F09-check-no-drift\u002Fskills\u002Fclean\u002FSKILL.md",[],[103],{"skillNo":108,"name":109,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":39},"01M71GVC3VM66F1ZQT2G8JXDR0","bare","https:\u002F\u002Fgithub.com\u002Ftimurgaleev\u002Fvibestack\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Frender\u002F08-no-frontmatter\u002Fskills\u002Fbare\u002FSKILL.md",[],[109],{"skillNo":114,"name":115,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":39},"01M71GV9T8DAYZT0PX52QX0TE1","idem","https:\u002F\u002Fgithub.com\u002Ftimurgaleev\u002Fvibestack\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Frender\u002F07-idempotent-rerender\u002Fskills\u002Fidem\u002FSKILL.md",[],[115]]