Skip to content

epic: seed AWS composites and agent-facing tooling from the aws-bench scenario corpus #1139

Closed

Description

@lex00

The 8 aws-bench scenarios (github.com/aws-bench/aws-bench-datasets) are real-world CDK apps; mining their L2 construct usage against our 24 AWS composites gives a frequency-ranked gap list, and their 134 tasks give a question corpus for agent-facing graph features.

Construct usage across all 8 scenarios (instantiation counts)

iam.Role 134 · iam.PolicyStatement 129 · s3.Bucket 100 · ec2.SecurityGroup 79 · lambda.Function 72 · ec2.Vpc 70 · logs.LogGroup 57 · dynamodb.Table 51 · s3deploy.BucketDeployment 37 · ec2.Instance 25 · sqs.Queue 21 · cloudwatch.Metric 21 · ecs.FargateTaskDefinition/Cluster 18 · kms.Key 15 · cr.AwsCustomResource 15 · ecs.FargateService 14 · elbv2 ALB+TG 22 · stepfunctions LambdaInvoke 10 · ec2.LaunchTemplate 10 · autoscaling.ASG 7 · ecr.Repository 7 · apigateway.RestApi 7 · elbv2.NLB 6

Composite gaps (child issues)

  • Seeded bucket (Bucket + deployment of content + cleanup) — BucketDeployment x37, no equivalent
  • EC2 instance bundle family (instance + role/profile + SG + subnet placement; launch-template instance; ASG fleet) — x42 combined, only ec2-instance-role exists
  • Monitoring stack (dashboard + metrics + alarms) — x44 combined, nothing shipped
  • DynamoDB table patterns (GSI/stream/TTL presets) — x51, only lambda-dynamodb glue
  • NLB service (NLB + target group + listener) — ALB composites exist, NLB none
  • Step Functions workflow (state machine + Lambda tasks + role) — x10
  • ECR repository with lifecycle policy — x7

Agent-facing tooling (child issues)

  • chant search <query> — search composite catalog (names/descriptions/intent tags) AND the estate's composite instances; builds on fold package-export inventory (feat(core): fold cross-file references into lexicon package exports (Azure/GCP pseudo-params, action constants) #1063)
  • Internet-exposure lens — answer reachability questions (public subnet + IGW route + open SG -> exposed) statically from the graph; the WAW audit rules already encode the semantics
  • Unused-resources lens — SG/ENI/EIP attachment analysis from the graph, zero API calls
  • Live snapshot cache for graph --live — one observation reused across queries
  • Agent skill: estate-question workflow (tier pyramid: composite map -> lens slice -> full IR -> live values), shippable to any agent harness that mounts skills

Notes

  • AwsCustomResource (x15) maps to chant Ops, not composites — document the pattern mapping.
  • Every new composite gets a one-line description + intent tags at authoring time; that's what chant search indexes.
  • Context: the aws-bench-on-Floci benchmark (aws-bench compatibility — tracking (gap matrix + dual-track plan) lex00/floci#17) measures whether small models answer estate questions better on chant; composite-tier graphs are the mechanism.

Activity

  1. lex00 commented on Jul 27, 2026

    @lex00
    ContributorAuthor

    Sharpened requirement from measured data (aws-bench k=3 matrix, 15 trials/cell): workspace-as-readable-map FAILED on cost — mounting chant source + raw graph IR made a Haiku agent consume 2.6x the tokens of a bare agent with zero accuracy gain, because its only interface was reading. The search/query surface is therefore the primary agent interface, not a convenience:

    • chant search <query> over the ESTATE must answer structural questions directly ("instances in public subnets", "security groups attached to nothing", "resources in us-west-1") with output budgeted in tens-to-hundreds of tokens — kind/tag/name/attribute predicates plus composite-instance grouping, free text over names/descriptions.
    • Raw IR and full source become bottom-tier fallbacks the skill explicitly discourages.
    • Success metric per query: tokens(answer) << tokens(equivalent AWS CLI sweep). Baseline to beat, measured: ~87k input tokens per task for a bare agent's live sweep on an 18-resource estate.
    • The agent skill's contract: query first; read source only to explain intent; touch live APIs only for runtime values the graph marks as live-only.
  2. added
    epic
    area:aws
    on Aug 23, 2026
  3. 1 remaining item

  4. added a commit that references this issue on Aug 25, 2026
  5. lex00 commented on Aug 25, 2026

    @lex00
    ContributorAuthor

    Progress: the composite track is complete — all 7 corpus-identified composites shipped and merged: BucketDeployment (#1921), MonitoringStack (#1920+#1929), DynamoDBTable (#1924), NlbService (#1926), EcrRepository (#1927), Ec2InstanceBundle (#1928), StepFunctionsWorkflow (#1932). Companion lint rules WAW061 (subnet CIDR containment), WAW062 (duplicate export/resource names), WAW063 (Allow/Deny contradiction) shipped via #1140 (PR #1934). Each composite carries unit tests, doc rows, and Floci verification; emulator gaps recorded in test/floci-gaps.md entries 11-15. Remaining epic scope (internet-exposure/unused-resources lenses, live-snapshot cache, query-first agent skill) needs a design pass and stays open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:awsepic

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions