docs(cli): update agents validation attach synopsis to use --key value named option format
CI / helm (push) Successful in 30s
CI / benchmark-publish (push) Failing after 44s
CI / build (push) Successful in 51s
CI / lint (push) Successful in 1m15s
CI / quality (push) Successful in 1m20s
CI / push-validation (push) Successful in 35s
CI / typecheck (push) Successful in 1m35s
CI / security (push) Successful in 1m42s
CI / e2e_tests (push) Successful in 4m7s
CI / integration_tests (push) Successful in 4m10s
CI / unit_tests (push) Successful in 5m1s
CI / docker (push) Successful in 1m31s
CI / coverage (push) Successful in 11m28s
CI / status-check (push) Successful in 18s
CI / push-validation (pull_request) Successful in 24s
CI / helm (pull_request) Successful in 30s
CI / lint (pull_request) Successful in 54s
CI / build (pull_request) Successful in 52s
CI / quality (pull_request) Successful in 1m20s
CI / typecheck (pull_request) Successful in 1m24s
CI / security (pull_request) Successful in 1m34s
CI / benchmark-publish (pull_request) Has been skipped
CI / e2e_tests (pull_request) Successful in 4m15s
CI / integration_tests (pull_request) Successful in 5m8s
CI / unit_tests (pull_request) Successful in 6m2s
CI / docker (pull_request) Successful in 1m41s
CI / coverage (pull_request) Failing after 19m6s
CI / status-check (pull_request) Has been cancelled
CI / helm (push) Successful in 30s
CI / benchmark-publish (push) Failing after 44s
CI / build (push) Successful in 51s
CI / lint (push) Successful in 1m15s
CI / quality (push) Successful in 1m20s
CI / push-validation (push) Successful in 35s
CI / typecheck (push) Successful in 1m35s
CI / security (push) Successful in 1m42s
CI / e2e_tests (push) Successful in 4m7s
CI / integration_tests (push) Successful in 4m10s
CI / unit_tests (push) Successful in 5m1s
CI / docker (push) Successful in 1m31s
CI / coverage (push) Successful in 11m28s
CI / status-check (push) Successful in 18s
CI / push-validation (pull_request) Successful in 24s
CI / helm (pull_request) Successful in 30s
CI / lint (pull_request) Successful in 54s
CI / build (pull_request) Successful in 52s
CI / quality (pull_request) Successful in 1m20s
CI / typecheck (pull_request) Successful in 1m24s
CI / security (pull_request) Successful in 1m34s
CI / benchmark-publish (pull_request) Has been skipped
CI / e2e_tests (pull_request) Successful in 4m15s
CI / integration_tests (pull_request) Successful in 5m8s
CI / unit_tests (pull_request) Successful in 6m2s
CI / docker (pull_request) Successful in 1m41s
CI / coverage (pull_request) Failing after 19m6s
CI / status-check (pull_request) Has been cancelled
Update docs/specification.md to clarify that agents validation attach extra arguments use --key value named option format (not positional [<ARGS>...] format). Updates synopsis, argument description, and all inline references across the specification. ISSUES CLOSED: #4747
This commit was merged in pull request #10919.
This commit is contained in:
+10
-10
@@ -268,7 +268,7 @@ The following standards are integrated into the architecture:
|
||||
|
||||
<span style="color: cyan; font-weight: 600;">agents</span> validation add <span style="color: cyan;">--config</span>|<span style="color: yellow;">-c</span> <span style="color: #66cc66;"><FILE></span> [<span style="color: cyan;">--update</span>]
|
||||
<span style="color: cyan; font-weight: 600;">agents</span> validation attach [<span style="color: cyan;">--project</span> <span style="color: #66cc66;"><PROJECT></span>|<span style="color: cyan;">--plan</span> <span style="color: #66cc66;"><PLAN_ID></span>]
|
||||
<span style="color: #66cc66;"><RESOURCE></span> <span style="color: #66cc66;"><VALIDATION></span> [<span style="color: #66cc66;"><ARGS></span>...]
|
||||
<span style="color: #66cc66;"><RESOURCE></span> <span style="color: #66cc66;"><VALIDATION></span> [<span style="color: cyan;">--<KEY></span> <span style="color: #66cc66;"><VALUE></span>]...
|
||||
<span style="color: cyan; font-weight: 600;">agents</span> validation detach [<span style="color: cyan;">--yes</span>|<span style="color: yellow;">-y</span>] <span style="color: #66cc66;"><ATTACHMENT_ID></span>
|
||||
|
||||
<span style="color: cyan; font-weight: 600;">agents</span> actor run [(<span style="color: magenta;"><span style="color: cyan;">--output</span>|<span style="color: yellow;">-o</span></span>) <span style="color: #66cc66;"><OUTPUT_FILE></span>]
|
||||
@@ -9378,9 +9378,9 @@ Because Validations are a subtype of Tool and share the same Tool Registry and n
|
||||
- **Remove a validation**: `agents tool remove <NAME>` (automatically removes all attachments)
|
||||
|
||||
A validation is always attached to a resource. The optional `--project` or `--plan` flag controls the scope of the attachment:
|
||||
- **Direct attachment** (no scope flag): The validation is always active for that resource, regardless of which plan or project accesses it. Use `agents validation attach <RESOURCE> <VALIDATION> [args...]`.
|
||||
- **Project-scoped attachment** (`--project`): The validation only runs for that resource when it is being interacted with through the specified project. Use `agents validation attach --project <PROJECT> <RESOURCE> <VALIDATION> [args...]`.
|
||||
- **Plan-scoped attachment** (`--plan`): The validation only runs for that resource when it is being interacted with through the specified plan. Use `agents validation attach --plan <PLAN_ID> <RESOURCE> <VALIDATION> [args...]`.
|
||||
- **Direct attachment** (no scope flag): The validation is always active for that resource, regardless of which plan or project accesses it. Use `agents validation attach <RESOURCE> <VALIDATION> [--<KEY> <VALUE>]...`.
|
||||
- **Project-scoped attachment** (`--project`): The validation only runs for that resource when it is being interacted with through the specified project. Use `agents validation attach --project <PROJECT> <RESOURCE> <VALIDATION> [--<KEY> <VALUE>]...`.
|
||||
- **Plan-scoped attachment** (`--plan`): The validation only runs for that resource when it is being interacted with through the specified plan. Use `agents validation attach --plan <PLAN_ID> <RESOURCE> <VALIDATION> [--<KEY> <VALUE>]...`.
|
||||
|
||||
The same validation can be attached to the same resource multiple times — directly, through different projects, and through different plans — and since validations accept arguments, attaching the same validation to the same resource multiple times with different arguments is a common and useful configuration pattern (e.g., running the same test suite with different coverage thresholds for different projects).
|
||||
|
||||
@@ -9647,7 +9647,7 @@ Register a new validation. The validation is fully defined by the YAML configura
|
||||
##### agents validation attach
|
||||
|
||||
<div class="highlight"><pre><code><span style="color: cyan; font-weight: 600;">agents</span> validation attach [<span style="color: cyan;">--project</span> <span style="color: #66cc66;"><PROJECT></span>|<span style="color: cyan;">--plan</span> <span style="color: #66cc66;"><PLAN_ID></span>]
|
||||
<span style="color: #66cc66;"><RESOURCE></span> <span style="color: #66cc66;"><VALIDATION></span> [<span style="color: #66cc66;"><ARGS></span>...]</code></pre></div>
|
||||
<span style="color: #66cc66;"><RESOURCE></span> <span style="color: #66cc66;"><VALIDATION></span> [<span style="color: cyan;">--<KEY></span> <span style="color: #66cc66;"><VALUE></span>]...</code></pre></div>
|
||||
|
||||
**Purpose**
|
||||
Attach a registered validation to a resource, with an optional project or plan scope. A resource is always required — validations are fundamentally resource-centric. The optional `--project` or `--plan` flag narrows when the validation is active: without either flag, the validation runs whenever any plan or project accesses the resource; with `--project`, it only runs when the resource is accessed through that project; with `--plan`, it only runs when the resource is accessed through that plan. At most one scope flag may be provided per invocation.
|
||||
@@ -9660,7 +9660,7 @@ The command returns a system-assigned **attachment ULID** that uniquely identifi
|
||||
- `<VALIDATION>`: Validation name (positional argument, required).
|
||||
- `--project PROJECT`: Scope the attachment to a specific project. The validation only runs for this resource when it is accessed through the specified project.
|
||||
- `--plan PLAN_ID`: Scope the attachment to a specific plan. The validation only runs for this resource when it is accessed through the specified plan.
|
||||
- `<ARGS>...`: Optional validation-specific arguments (passed through to the validation tool's `input_schema` at execution time).
|
||||
- `[--<KEY> <VALUE>]...`: Optional validation-specific arguments in named option format. Each argument is passed as `--key value` (e.g. `--coverage-threshold 90`). Hyphens in option names are converted to underscores in the stored argument dict (e.g. `--coverage-threshold` becomes `coverage_threshold`). Positional `key=value` format is not accepted.
|
||||
|
||||
**Examples**
|
||||
|
||||
@@ -22676,7 +22676,7 @@ Validations are not globally active — they must be explicitly **attached** to
|
||||
|
||||
A validation is always attached to a resource. The optional `--project` or `--plan` flag controls the scope under which the validation is active for that resource:
|
||||
|
||||
1. **Direct attachment** (`agents validation attach <RESOURCE> <VALIDATION> [args...]`)
|
||||
1. **Direct attachment** (`agents validation attach <RESOURCE> <VALIDATION> [--<KEY> <VALUE>]...`)
|
||||
|
||||
The validation is always active when that resource is accessed by any plan, regardless of which project or plan is involved. This scope is for invariants that must hold for a resource in all contexts — e.g., a lint check that must pass for a repository no matter what project is using it.
|
||||
|
||||
@@ -22686,7 +22686,7 @@ A validation is always attached to a resource. The optional `--project` or `--pl
|
||||
- Security scanning on any codebase resource
|
||||
- License compliance checks
|
||||
|
||||
2. **Project-scoped attachment** (`agents validation attach --project <PROJECT> <RESOURCE> <VALIDATION> [args...]`)
|
||||
2. **Project-scoped attachment** (`agents validation attach --project <PROJECT> <RESOURCE> <VALIDATION> [--<KEY> <VALUE>]...`)
|
||||
|
||||
The validation is active only for that resource when it is being interacted with through the specified project. Different projects using the same resource can have different validation requirements. This is the most common attachment scope.
|
||||
|
||||
@@ -22696,7 +22696,7 @@ A validation is always attached to a resource. The optional `--project` or `--pl
|
||||
- API compatibility checks for a microservice project
|
||||
- Bundle size checks for a frontend project
|
||||
|
||||
3. **Plan-scoped attachment** (`agents validation attach --plan <PLAN_ID> <RESOURCE> <VALIDATION> [args...]`)
|
||||
3. **Plan-scoped attachment** (`agents validation attach --plan <PLAN_ID> <RESOURCE> <VALIDATION> [--<KEY> <VALUE>]...`)
|
||||
|
||||
The validation is active only for that resource when it is being interacted with through the specified plan. This is the most targeted scope, useful for one-off or experimental validations.
|
||||
|
||||
@@ -23126,7 +23126,7 @@ Validations are **registered** via `agents validation add` and **attached** via
|
||||
|-----------|---------|-------|
|
||||
| **Register** | `agents validation add --config <FILE>` | Validation-specific. Config file defines all properties including mode (`required`/`informational`). |
|
||||
| **Update** | `agents validation add --config <FILE> --update` | Uses the `--update` flag to overwrite existing registration. |
|
||||
| **Attach** | `agents validation attach [--project\|--plan] <RESOURCE> <VALIDATION> [args...]` | Returns an attachment ULID. Resource is always required; project/plan scope is optional. |
|
||||
| **Attach** | `agents validation attach [--project\|--plan] <RESOURCE> <VALIDATION> [--<KEY> <VALUE>]...` | Returns an attachment ULID. Resource is always required; project/plan scope is optional. |
|
||||
| **Detach** | `agents validation detach [--yes] <ATTACHMENT_ID>` | Uses the attachment ULID, not the validation name. |
|
||||
| **List** | `agents tool list --type validation` | Shared with tools. Use `--type validation` to filter. |
|
||||
| **Show** | `agents tool show <NAME>` | Shows validation-specific fields when the entry is a Validation. |
|
||||
|
||||
Reference in New Issue
Block a user