forked from HAL9000/cleveragents-core
135 lines
3.7 KiB
Markdown
135 lines
3.7 KiB
Markdown
# Project Context CLI Reference
|
|
|
|
The `agents project context` commands manage per-project context policies
|
|
that control what resources and files are visible during each ACMS phase.
|
|
|
|
## Overview
|
|
|
|
Context policies use **view inheritance**:
|
|
|
|
| Phase | Inherits from |
|
|
|------------|---------------|
|
|
| default | (none) |
|
|
| strategize | default |
|
|
| execute | strategize |
|
|
| apply | execute |
|
|
|
|
An empty policy defaults to including everything.
|
|
|
|
---
|
|
|
|
## `agents project context set`
|
|
|
|
Persist a context policy view for a project.
|
|
|
|
### Usage
|
|
|
|
```
|
|
agents project context set PROJECT [OPTIONS]
|
|
```
|
|
|
|
### Arguments
|
|
|
|
| Argument | Description |
|
|
|-----------|------------------------------|
|
|
| `PROJECT` | Project namespaced name |
|
|
|
|
### Options
|
|
|
|
| Option | Type | Description |
|
|
|----------------------|-----------|------------------------------------------|
|
|
| `--view`, `-v` | `str` | Phase view: default, strategize, execute, apply (default: default) |
|
|
| `--include-resource` | `str` | Resource pattern to include (repeatable) |
|
|
| `--exclude-resource` | `str` | Resource pattern to exclude (repeatable) |
|
|
| `--include-path` | `str` | File path glob to include (repeatable) |
|
|
| `--exclude-path` | `str` | File path glob to exclude (repeatable) |
|
|
| `--max-file-size` | `int` | Max file size in bytes (None = no limit) |
|
|
| `--max-total-size` | `int` | Max total context size in bytes |
|
|
| `--clear` | `flag` | Clear (reset) the view for the phase |
|
|
| `--format`, `-f` | `str` | Output format (json, yaml, plain, table, rich) |
|
|
|
|
### Examples
|
|
|
|
```bash
|
|
# Set default view with resource filters
|
|
agents project context set local/my-app \
|
|
--view default \
|
|
--include-resource "db-*" \
|
|
--exclude-resource "db-test"
|
|
|
|
# Set strategize view with path filters
|
|
agents project context set local/my-app \
|
|
--view strategize \
|
|
--include-path "src/**/*.py" \
|
|
--exclude-path "*.pyc"
|
|
|
|
# Set size limits
|
|
agents project context set local/my-app \
|
|
--max-file-size 1048576 \
|
|
--max-total-size 10485760
|
|
|
|
# Clear execute view (inherit from strategize)
|
|
agents project context set local/my-app --view execute --clear
|
|
```
|
|
|
|
---
|
|
|
|
## `agents project context show`
|
|
|
|
Display the context policy for a project.
|
|
|
|
### Usage
|
|
|
|
```
|
|
agents project context show PROJECT [OPTIONS]
|
|
```
|
|
|
|
### Arguments
|
|
|
|
| Argument | Description |
|
|
|-----------|-------------------------|
|
|
| `PROJECT` | Project namespaced name |
|
|
|
|
### Options
|
|
|
|
| Option | Type | Description |
|
|
|-----------------|-------|--------------------------------------------------|
|
|
| `--view`, `-v` | `str` | Show resolved view for a specific phase |
|
|
| `--format`, `-f`| `str` | Output format (json, yaml, plain, table, rich) |
|
|
|
|
### Examples
|
|
|
|
```bash
|
|
# Show all views
|
|
agents project context show local/my-app
|
|
|
|
# Show resolved view for execute phase
|
|
agents project context show local/my-app --view execute
|
|
|
|
# JSON output
|
|
agents project context show local/my-app --format json
|
|
```
|
|
|
|
---
|
|
|
|
## `agents project context inspect`
|
|
|
|
> **Stub** — requires ACMS wiring (not yet implemented).
|
|
|
|
Inspect the effective context for a project. This command will show
|
|
which resources and files would be included/excluded for each phase
|
|
based on the current policy and resource registry state.
|
|
|
|
Raises `NotImplementedError` with a descriptive message.
|
|
|
|
---
|
|
|
|
## `agents project context simulate`
|
|
|
|
> **Stub** — requires ACMS wiring (not yet implemented).
|
|
|
|
Simulate the context window for a project. This command will show
|
|
the estimated token counts and context composition for each phase.
|
|
|
|
Raises `NotImplementedError` with a descriptive message.
|