package abono import ( "os" "strings" "testing" ) // skillBudget is the byte ceiling for SKILL.md. It is what an agent // loads instead of reading the source, so it is reviewed like code and // kept short; raise it here, with a reason, rather than trimming a // load-bearing fact to fit. const skillBudget = 9000 func TestSkillMDIsWithinBudgetAndNamesTheSurface(t *testing.T) { b, err := os.ReadFile("SKILL.md") if err != nil { t.Fatal(err) } if len(b) > skillBudget { t.Fatalf("SKILL.md is %d bytes, budget %d", len(b), skillBudget) } s := string(b) for _, want := range []string{ "abono.New", "abono.Schema", "BootSchema", "csrf.Exempt", "WebhookPath", "SyncPath", "carlos schedule", "Holder", "Claim", "OnChange", "idempotent", "HasPlan", "HasPlanIn", "HoldingsIn", "Holdings", "Describe", "Checkout", "Finish", "Portal", "Adopt", "Comp", "SeedPlans", "Templates()", "Catalog()", "abono pages", "abonotest", "Sandbox", "2025-03-31.basil", "Checkout Sessions", "Customer portal", "Subscriptions", "Customers", "Prices", "Promotion codes", "30 days", // The final review's fixes that change the surface or behaviour. "cards only", "UnpaidSince", "Processing", "Customers(ctx, subject)", "Portal(ctx, subject, customerID, returnPath)", "interval_count", "pinned", "one process", "reset the sandbox", } { if !strings.Contains(s, want) { t.Errorf("SKILL.md does not mention %q", want) } } if strings.Contains(s, "—") { t.Error("SKILL.md contains an em dash") } }