AgentKit
Tài liệuBộ kitTham chiếu CLIỨng dụng Desktop

test

ak test optimize

Giải thích các check được chọn theo mức ảnh hưởng, và tuỳ chọn chạy các lệnh đáng tin cậy.

Giải thích các check được chọn theo mức ảnh hưởng, và tuỳ chọn chạy các lệnh đáng tin cậy.

Khi không có manifest tại đường dẫn --manifest, lệnh báo lỗi và yêu cầu bạn cấu hình các group đáng tin cậy và full_suite. Với --run, lệnh đọc lại manifest và báo lỗi nếu manifest đã thay đổi sau khi lập kế hoạch.

Các chế độ semantic dùng consumer test-impact. Lệnh chỉ gọi provider khi bạn đã bật semantic_decision ở user scope, đặt semantic_decision.consumers.test-impact thành true, và cung cấp TYPESAFE_API_KEY trong môi trường. Quyền cấp này là bắt buộc kể cả khi bạn không có map consumers. Xem ak config prefs set.

Dùng ak test optimize với đối số và tùy chọn dưới đây. Phần help nguyên bản giữ nguyên thuật ngữ, cú pháp, tác động và điều kiện thực thi của CLI để đối chiếu chính xác.

Contract và help của lệnh

Explain impact-selected checks, optionally execute trusted commands

Synopsis

Default is read-only planning. Supply a trusted manifest with group commands, ownership, full-suite groups and explicit policy mappings. Invalid optional evidence broadens; missing mandatory mappings block. --run executes repository code without a sandbox.

Effects: Planning reads Git and policy only. --run executes trusted commands in this repository; --output creates a local receipt. Semantic mode defaults off; an explicitly permitted mode may send compact facts and incur provider charges. Shadow never changes the effective plan.

Exit status: 0 executable plan or all selected checks passed 1 invalid inputs, blocked plan, failed or stale execution 2 invalid arguments

ak test optimize [flags]

Examples

  ak test optimize --base origin/dev --json
  ak test optimize --base origin/dev --run --json

Options

      --base string               Git comparison base (required)
      --evidence string           Optional bounded external evidence JSON
      --head string               Git comparison head; local changes also count (default "HEAD")
  -h, --help                      help for optimize
      --json                      Emit machine-readable JSON (implies --no-interactive)
      --manifest string           Repository-owned executable group manifest (default ".agentkit/test-impact.json")
      --no-interactive            Disable interactive prompts (CI-safe)
      --output string             Create a new local JSON result file; never overwrite
  -q, --quiet                     Suppress non-error output on stderr
      --run                       Execute trusted manifest commands; this is not a sandbox
      --semantic string           Optional semantic observations: off, shadow, or advisory; requires explicit user consent (default "off")
      --semantic-context string   Reviewed compact semantic context JSON bound to this request
  -V, --verbose                   Extra diagnostic output on stderr (loses to --quiet)
  -y, --yes                       Assume yes for all prompts

SEE ALSO

  • ak test - Plan and execute repository test-impact checks