feat(gcp-to-aws): AI-only flow asks compliance + Activate credits - #165
feat(gcp-to-aws): AI-only flow asks compliance + Activate credits#165herosjourney wants to merge 6 commits into
Conversation
|
Applied the Cursor review (commit 5fa7711) — all five points. Note on provenance: when I opened the worktree, uncommitted drafts for points 1–4 were already present (Cursor working in the same tree). I reviewed them line-by-line, verified their two nontrivial contract claims against the specs before adopting (the ≥0.8 extraction threshold is real — clarify.md L201; the disjoint question-lists rule is real — clarify.md L829 gate check), and folded them in with one refinement. 1. Clarify → Design wiring — closed in this PR. New 2. "Never drop" vs "use defaults" — disambiguated. The fast-path rule now states: "never dropped" means always presented; an explicit "use defaults for the rest" is the sanctioned default path (compliance → 3. Q11 disambiguation — added ("AI-only Q11 ≡ full-flow Q27; unrelated to full-flow Q11/Q11b — the flows number independently"). 4. 5. Fresh-agent replays — run, both REPLAY_OK.
Full |
…rify wiring hardening (Cursor round 1)
…I-only Q1.5 Rebase resolution: schema-preferences.md constraint catalog took main's table (which carries awslabs#171's ['unknown'] compliance semantics) with this branch's two AI-only annotations grafted on (Q2 -> 'Q2 (AI-only: Q1.5)' with the Bedrock-gating consequence; Q27 -> 'Q27 (AI-only: Q11)'). Semantic alignment with awslabs#171 (landed after this branch forked): AI-only Q1.5 skip/default now records ['unknown'] with source default:Q1.5 — never a silent 'none'; explicit answer A records ['none'] chosen_by user. design-ai Step 0.7 and its checklist treat 'unknown' like 'none' for model/region selection but require the compliance-not-confirmed caveat.
5fa7711 to
7188de8
Compare
|
Rebased onto main (4725d85) and resolved conflicts — branch is MERGEABLE again. One heads-up for reviewers: the rebase included a semantic alignment, not just conflict resolution. Conflict resolution (mechanical): both sides had rewritten the Semantic alignment (new in 7188de8): this branch forked before #171 changed the compliance skip-default from silent
Verified post-rebase: full |
leon1418
left a comment
There was a problem hiding this comment.
[🤖 AI review 🤖]
Scope reviewed: All 5 changed files end-to-end (clarify-ai-only.md, clarify.md, design-ai.md, generate-artifacts-ai.md, schema-preferences.md). Cross-referenced against full-flow Q2 (clarify-global.md), Q14 (clarify-ai.md), Q19 (clarify-ai.md), Q27 (clarify-ai.md), and the main clarify.md gate check. Verified rebase alignment with #171's ["unknown"] semantics and confirmed no supersedure from the 5 commits merged to main since this PR's rebase point.
Summary: This PR closes two correctness gaps in the AI-only clarify flow — missing compliance gating (Q1.5) and missing Activate credits question (Q11). The additions are well-wired: Q1.5 feeds into a new design-ai Step 0.7 with a validation checklist item, the generate script carries compliance through, and schema-preferences.md annotations match. The ["unknown"] vs ["none"] semantics are correctly aligned with post-#171 main. Q11 is faithful to Q27's options, enum, and never-infer-from-spend rule, with the agentic escalation condition correctly adapted from agentic_profile.is_agentic to the AI-only signal proxies (Q1 D/E/F or Q10 = F).
One finding (non-blocking but worth addressing):
generate-artifacts-ai.mdcompliance carry-through condition saysnot "none"but does not exclude"unknown".design-ai.mdStep 0.7 correctly skips fornone,unknown, or absent — the generate script should match.
Otherwise: fast-path grows from 3→5 correctly, disjoint-list rule and draft-save-skip are specified, Q1 skip condition is more rigorous than before, Q5 confidence threshold aligns with Q19 (0.8). The PR is not stale — main's 5 newer commits touch only unrelated files (.github template, advisor setup, migrate README). Merge state is BEHIND (trivial rebase, no conflict).
Recommendation: Merge-ready after the generate-artifacts-ai.md unknown exclusion is addressed (a one-word fix).
| - Dry-run by default (`--execute` flag to run for real) | ||
| - Step 1 — Request model access: List each model from `aws-design-ai.json` → `bedrock_models[].aws_model_id` and the embedding model | ||
| - Step 2 — Create IAM role: Trust policy for the compute platform (Lambda, ECS, or EC2 based on `aws-design.json` if present). Bedrock policy: `bedrock:InvokeModel` and `bedrock:InvokeModelWithResponseStream` scoped to `arn:aws:bedrock:*::foundation-model/*` | ||
| - Compliance carry-through: if `preferences.json` → `design_constraints.compliance` is set and not `none` (full-flow Q2 / AI-only Q1.5), the script and its printed notes MUST reflect the design's Step 0.7 constraints — `AWS_REGION` from the compliance-constrained region (GovCloud for fedramp, EU for gdpr), `eu.` inference-profile model IDs for gdpr, and for hipaa a printed warning that Bedrock invocation logs retain original content (KMS-encrypt + restrict IAM on the log group before enabling) |
There was a problem hiding this comment.
[🤖 AI review 🤖]
Nit: The condition here says not "none" but design-ai.md Step 0.7 correctly skips when the value is none, unknown, or absent. Since unknown means "not user-confirmed" and behaves like none for service selection (per both the full-flow Q2 semantics and the new Q1.5 spec), this script should also exclude unknown — otherwise an agent that defaulted compliance would still try to apply GovCloud/EU region constraints.
Suggested: …is set and not "none" or "unknown"…
…rough Align generate-artifacts-ai.md with design-ai Step 0.7 so defaulted compliance (unknown) does not trigger GovCloud/EU/HIPAA script constraints. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Addressed the review nit on |
Summary
The standalone AI-only clarify flow (
clarify-ai-only.md, Q1–Q10) asked no compliance question and no Activate credits question. Compliance gates Bedrock regions, models, and logging even when infrastructure stays on GCP — customer prompts and completions flow to AWS the moment model calls do, so skipping it is a correctness gap (a GDPR or HIPAA customer could get a design that can't be deployed). And skipping the credits question means AI-only customers — the leads Activate credits most directly help, since Bedrock usage is credit-eligible — never hear about $5K–$200K. This PR adds both questions using the house suffix/append numbering convention (like Q3.5/Q11b in the full flow) so no existing question renumbers.Changes
clarify-ai-only.md:clarify-global.mdQ2, with a Bedrock-specific impact table for this path: BAA-eligible models + the Guardrails-doesn't-mask-CloudWatch-logs warning for HIPAA, GovCloud-only catalog for FedRAMP,eu.geographic inference profiles (notglobal.) for GDPR, retention/deletion workflow for CCPA. Interprets todesign_constraints.compliance(same field as full flow). Default "none" + report caveat, matching the full-flow default rule.startup_constraints.startup_program_statusfield and enum, never inferred from spend, neutral copy on default. Escalations adapted to AI-only signals: Credits for AI Startups at >$10K spend; GenAI Accelerator at ≥$2K spend + agentic (Q1 includes D/E/F or Q10 = F).clarify.md: routing table row updated (Q1–Q10 → Q1–Q11 + Q1.5).Relationship to other PRs
Independent — based on current
main(post-#162). Touchesclarify-ai-only.md(no open PR touches it) and one routing-table line ofclarify.md(no conflict with #161's clarify.md trigger-table lines, different rows).Test plan
mise run buildgreen (160/160 checks)design_constraints.compliance,startup_constraints.startup_program_statusper clarify.md §schema)clarify-ai.mdQ27