Compare commits

...

1 Commits

Author SHA1 Message Date
HAL9000 e9a8c6178b docs(spec): update validation attach synopsis and project delete output
CI / benchmark-publish (pull_request) Has been skipped
CI / push-validation (pull_request) Successful in 16s
CI / build (pull_request) Successful in 24s
CI / lint (pull_request) Successful in 28s
CI / helm (pull_request) Successful in 32s
CI / typecheck (pull_request) Successful in 53s
CI / quality (pull_request) Successful in 57s
CI / security (pull_request) Successful in 1m5s
CI / e2e_tests (pull_request) Successful in 3m2s
CI / integration_tests (pull_request) Successful in 4m23s
CI / unit_tests (pull_request) Successful in 8m22s
CI / docker (pull_request) Successful in 10s
CI / coverage (pull_request) Successful in 10m24s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Successful in 56m56s
- Update validation attach synopsis from [<ARGS>...] to [--<key> <value>]...
- Update arguments description to document named option format
- Update inline references to use named option format
- Update management table to reflect named option format
- Add deleted_at field to project delete JSON and YAML output examples

These changes document the behavior implemented in PR #3837 (validation attach
named options) and PR #6639 (project delete deleted_at field).

ISSUES CLOSED: #7533
2026-04-13 04:11:46 +00:00
+51 -49
View File
@@ -3494,23 +3494,24 @@ Delete a project and unlink all associated resources. The resources themselves r
"command": "agents project delete local/docs",
"status": "ok",
"exit_code": 0,
"data": {
"deletion_summary": {
"project": "local/docs",
"resources_unlinked": 1,
"data_dir": "/repos/docs/.cleveragents"
},
"index_cleanup": {
"text_index": "cleared",
"vectors": "240 removed",
"graph_triples": "none",
"storage_freed_mb": 12
},
"backups": {
"snapshot": "/backups/local-docs-2026-02-08.tgz",
"retention_days": 7
}
},
"data": {
"deletion_summary": {
"project": "local/docs",
"resources_unlinked": 1,
"data_dir": "/repos/docs/.cleveragents",
"deleted_at": "2026-02-08T10:15:30Z"
},
"index_cleanup": {
"text_index": "cleared",
"vectors": "240 removed",
"graph_triples": "none",
"storage_freed_mb": 12
},
"backups": {
"snapshot": "/backups/local-docs-2026-02-08.tgz",
"retention_days": 7
}
},
"timing": { "duration_ms": 530 },
"messages": [{ "level": "ok", "text": "Project deleted" }]
}
@@ -3518,29 +3519,30 @@ Delete a project and unlink all associated resources. The resources themselves r
=== "YAML"
```yaml
command: agents project delete local/docs
status: ok
exit_code: 0
data:
deletion_summary:
project: local/docs
resources_unlinked: 1
data_dir: /repos/docs/.cleveragents
index_cleanup:
text_index: cleared
vectors: 240 removed
graph_triples: none
storage_freed_mb: 12
backups:
snapshot: /backups/local-docs-2026-02-08.tgz
retention_days: 7
timing:
duration_ms: 530
messages:
- level: ok
text: Project deleted
```
```yaml
command: agents project delete local/docs
status: ok
exit_code: 0
data:
deletion_summary:
project: local/docs
resources_unlinked: 1
data_dir: /repos/docs/.cleveragents
deleted_at: "2026-02-08T10:15:30Z"
index_cleanup:
text_index: cleared
vectors: 240 removed
graph_triples: none
storage_freed_mb: 12
backups:
snapshot: /backups/local-docs-2026-02-08.tgz
retention_days: 7
timing:
duration_ms: 530
messages:
- level: ok
text: Project deleted
```
Attempting to delete a project that has active plans (without `--force`):
@@ -9268,9 +9270,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).
@@ -9537,7 +9539,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;">&lt;PROJECT&gt;</span>|<span style="color: cyan;">--plan</span> <span style="color: #66cc66;">&lt;PLAN_ID&gt;</span>]
<span style="color: #66cc66;">&lt;RESOURCE&gt;</span> <span style="color: #66cc66;">&lt;VALIDATION&gt;</span> [<span style="color: #66cc66;">&lt;ARGS&gt;</span>...]</code></pre></div>
<span style="color: #66cc66;">&lt;RESOURCE&gt;</span> <span style="color: #66cc66;">&lt;VALIDATION&gt;</span> [<span style="color: cyan;">--&lt;key&gt;</span> <span style="color: #66cc66;">&lt;value&gt;</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.
@@ -9550,7 +9552,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 named arguments (passed through to the validation tool's `input_schema` at execution time). Each argument is provided as a named option: `--coverage-threshold 90`. Hyphens in option names are normalized to underscores in the input schema (e.g., `--coverage-threshold``coverage_threshold`). Positional `key=value` format is not accepted.
**Examples**
@@ -22534,7 +22536,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.
@@ -22544,7 +22546,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.
@@ -22554,7 +22556,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.
@@ -22984,7 +22986,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. |