Skip to content

Commit 2a31eee

Browse files
committed
Introduce structured manifest fields & CLI docs
Add structured arg_fields, wire_type, units, required/default metadata and remove legacy args/value_arg in the generated parameters manifest; update generated_at timestamp. Update README to document the new lean execution contract, new CLI commands (showall, backend commands, doctor command probe), structured get/set/act usage and partial-set autofill behavior. Add new planning/design/implementation docs under docs/plans. Apply corresponding changes to CLI, manifest generator, driver/extensions/instrument code and update tests to match the new manifest/CLI behavior.
1 parent d4a5967 commit 2a31eee

16 files changed

+15420
-36570
lines changed

README.md

Lines changed: 40 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -69,67 +69,91 @@ Runtime config controls host, candidate ports, timeout, backend, write policy, a
6969

7070
### Inspect and introspect
7171

72-
Get the machine-readable CLI contract (parameters, action commands, policy):
72+
Get the machine-readable execution contract (lean payload):
7373

7474
```powershell
7575
nqctl capabilities
7676
```
7777

78-
Include backend command discovery from the active backend:
78+
Show the legacy full payload (old capabilities surface):
7979

8080
```powershell
81-
nqctl capabilities --include-backend-commands --backend-match Scan
81+
nqctl showall
8282
```
8383

84-
List observable parameter metadata and high-level CLI action descriptors:
84+
Inspect backend command inventory and connectivity preflight:
85+
86+
```powershell
87+
nqctl backend commands --match Scan
88+
nqctl doctor --command-probe
89+
```
90+
91+
List observable metadata and high-level CLI action descriptors:
8592

8693
```powershell
8794
nqctl observables list
8895
nqctl actions list
8996
```
9097

91-
Inspect active policy, backend command inventory, and connectivity preflight:
98+
Inspect active runtime policy:
9299

93100
```powershell
94101
nqctl policy show
95-
nqctl backend commands --match Bias
96-
nqctl doctor --command-probe
97102
```
98103

99104
### Execute operations
100105

101-
Read one parameter:
106+
Read a parameter:
102107

103108
```powershell
104109
nqctl get bias_v
105110
```
106111

107-
Apply guarded strict single-step write:
112+
For multi-field responses, `get` returns structured fields (not only one scalar):
113+
114+
```powershell
115+
nqctl get scan_buffer
116+
```
117+
118+
Apply writes with structured args (canonical form):
108119

109120
```powershell
110-
nqctl set bias_v 0.12
121+
nqctl set bias_v --arg Bias_value_V=0.12 (single arg input)
122+
nqctl set scan_buffer --arg Pixels=512 --arg Lines=512 (multiple args input)
111123
```
112124

113-
Apply explicit guarded ramp:
125+
126+
Defaulting/autofill mechanism for partial `set`:
127+
128+
- Explicit `--arg` values always win.
129+
- Missing required set fields trigger one read (`get_cmd`) and are filled by normalized field name.
130+
- Matching is by field name, not response index position.
131+
- Get-only fields with no set counterpart are ignored.
132+
- Remaining unresolved optional fields can fall back to manifest defaults.
133+
134+
Apply explicit guarded ramp (scalar parameters):
114135

115136
```powershell
116137
nqctl ramp bias_v 0.10 0.25 0.01 --interval-s 0.10
117138
```
118139

119-
Invoke one manifest action command with argument overrides:
140+
Invoke one manifest action command with structured args:
120141

121142
```powershell
122143
nqctl act Scan_Action --arg Scan_action=0 --arg Scan_direction=1
144+
nqctl act Scan_WaitEndOfScan --arg Timeout_ms=5000
123145
```
124146

125-
### `act` vs action metadata
147+
For `act`, required/default behavior is driven by `action_cmd.arg_fields` in the manifest.
148+
149+
### `act` vs metadata surfaces
126150

127151
- `nqctl act <action_name> --arg key=value` executes one backend action command from
128152
the manifest `actions` section.
129153
- `nqctl actions list` lists CLI-level action descriptors (what workflows the CLI
130154
supports, with safety hints and templates).
131155
- `nqctl capabilities` exposes executable manifest action inventory under
132-
`action_commands.items[*]` (command name, args, arg types, safety mode).
156+
`action_commands.items[*]` (command schema, `arg_fields`, safety mode).
133157

134158
### Trajectory commands
135159

@@ -168,6 +192,8 @@ JSON is the default output format. Use `--text` for human-readable key/value out
168192

169193
```powershell
170194
nqctl -help
195+
nqctl -help showall
196+
nqctl -help set
171197
nqctl -help trajectory
172198
nqctl -help act
173199
```

0 commit comments

Comments
 (0)