agent-contracts-runtime 0.31.4 → 0.32.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,6 +15,8 @@ then runs workflows through pluggable SDK adapters.
15
15
  - [run](#agent-runtime-run)
16
16
  - [list](#agent-runtime-list)
17
17
  - [show-prompt](#agent-runtime-show-prompt)
18
+ - [implement](#agent-runtime-implement)
19
+ - [audit-implementation](#agent-runtime-audit-implementation)
18
20
  - [doctor](#agent-runtime-doctor)
19
21
 
20
22
  ---
@@ -95,12 +97,12 @@ agent-runtime init [--adapter] [--output] [--force]
95
97
 
96
98
  ```yaml
97
99
  x-agent:
98
- risk_level: low
99
- requires_confirmation: false
100
+ riskLevel: low
101
+ requiresConfirmation: false
100
102
  idempotent: false
101
- side_effects:
103
+ sideEffects:
102
104
  - filesystem_write
103
- safe_dry_run_option:
105
+ safeDryRunOption:
104
106
  ```
105
107
 
106
108
  ---
@@ -254,12 +256,12 @@ current generated files and expected output.
254
256
 
255
257
  ```yaml
256
258
  x-agent:
257
- risk_level: low
258
- requires_confirmation: false
259
+ riskLevel: low
260
+ requiresConfirmation: false
259
261
  idempotent: true
260
- side_effects:
262
+ sideEffects:
261
263
  - filesystem_write
262
- safe_dry_run_option: check
264
+ safeDryRunOption: check
263
265
  ```
264
266
 
265
267
  ---
@@ -531,11 +533,11 @@ user-request arguments are read from the file instead of CLI args.
531
533
 
532
534
  - **stderr:** format=`text`
533
535
 
534
- **Exit 2:** Invalid arguments or unknown workflow/adapter.
536
+ **Exit 3:** Input validation failed (invalid arguments, unknown workflow/adapter, or generated files outdated).
535
537
 
536
538
  - **stderr:** format=`text`
537
539
 
538
- **Exit 3:** Generated files outdated. Run `agent-runtime generate` first.
540
+ **Exit 12:** Adapter initialization error (missing API key, etc.).
539
541
 
540
542
  - **stderr:** format=`text`
541
543
 
@@ -543,14 +545,15 @@ user-request arguments are read from the file instead of CLI args.
543
545
 
544
546
  ```yaml
545
547
  x-agent:
546
- risk_level: high
547
- requires_confirmation: true
548
+ riskLevel: high
549
+ requiresConfirmation: true
548
550
  idempotent: false
549
- side_effects:
551
+ sideEffects:
550
552
  - sdk_call
551
553
  - filesystem_write
552
- safe_dry_run_option: dry-run
553
- recommended_before_use:
554
+ safeDryRunOption: dry-run
555
+ expectedDurationMs: 300000
556
+ recommendedBeforeUse:
554
557
  - Run `agent-runtime generate --check` to ensure contracts are up to date.
555
558
  - Run `agent-runtime doctor` to verify SDK configuration.
556
559
  ```
@@ -648,10 +651,10 @@ agent-runtime list <resource> [--format]
648
651
 
649
652
  ```yaml
650
653
  x-agent:
651
- risk_level: low
652
- requires_confirmation: false
654
+ riskLevel: low
655
+ requiresConfirmation: false
653
656
  idempotent: true
654
- side_effects:
657
+ sideEffects:
655
658
 
656
659
  ```
657
660
 
@@ -749,15 +752,668 @@ agent-runtime show-prompt <task-id> [--user-request] [--format] [--with-plugins]
749
752
 
750
753
  ```yaml
751
754
  x-agent:
752
- risk_level: low
753
- requires_confirmation: false
755
+ riskLevel: low
756
+ requiresConfirmation: false
754
757
  idempotent: true
755
- side_effects:
758
+ sideEffects:
756
759
 
757
760
  ```
758
761
 
759
762
  ---
760
763
 
764
+ ### implement
765
+
766
+ Implement LLM-powered commands in a CLI tool.
767
+
768
+ Uses an agentic LLM adapter (Claude, Cursor, etc.) to analyze the
769
+ target project and implement LLM-powered commands following the
770
+ agent-contracts + agent-contracts-runtime + cli-contracts stack.
771
+
772
+ The agent reads the project structure, cli-contract.yaml, and existing
773
+ code, then generates DSL definitions, TypeScript modules (orchestrator,
774
+ context-builder, formatter), CLI command handlers, and updates the
775
+ CLI contract with x-agent metadata.
776
+
777
+ Requires an agentic adapter that supports tool use (file read/write).
778
+
779
+
780
+ **Usage:**
781
+
782
+ ```
783
+ agent-runtime implement <description> [--adapter] [--project-dir] [--dry-run] [--model] [--output] [--report-format]
784
+ ```
785
+
786
+ #### Arguments
787
+
788
+ | Name | Required | Description |
789
+ |---|---|---|
790
+ | `description` | Yes | Natural language description of the LLM feature(s) to implement. Examples: "Add an audit command for migration safety", "Add propose and explain commands for SQL optimization". |
791
+
792
+ #### Options
793
+
794
+ | Option | Aliases | Required | Default | Description |
795
+ |---|---|---|---|---|
796
+ | `--adapter` | -a | No | `"claude"` | SDK adapter to use. Must be an agentic adapter (claude, cursor). |
797
+ | `--project-dir` | -p | No | `"."` | Path to the target project directory. |
798
+ | `--dry-run` | -n | No | `false` | Output the prompt context without calling the LLM. |
799
+ | `--model` | | No | | Model name override for the selected adapter. |
800
+ | `--output` | -o | No | | Write the result to a file instead of stdout. |
801
+ | `--report-format` | | No | `"text"` | Output format for the result. |
802
+
803
+ #### Exit Codes
804
+
805
+ **Exit 0:** Implementation completed successfully.
806
+
807
+ - **stdout:** format=`json`
808
+
809
+ | Property | Type | Required | Description |
810
+ |---|---|---|---|
811
+ | `files_created` | `string[]` | Yes | List of new files created. |
812
+ | `files_modified` | `string[]` | Yes | List of existing files modified. |
813
+ | `summary` | `string` | Yes | Human-readable summary of what was implemented. |
814
+ | `commands_added` | `object[]` | No | |
815
+ | `commands_added[].name` | `string` | Yes | |
816
+ | `commands_added[].type` | `"audit" \| "propose" \| "explain"` | Yes | |
817
+ | `commands_added[].description` | `string` | No | |
818
+ | `next_steps` | `string[]` | No | Recommended next steps for the developer. |
819
+
820
+ <details>
821
+ <summary>JSON Schema</summary>
822
+
823
+ ```json
824
+ {
825
+ "type": "object",
826
+ "required": [
827
+ "files_created",
828
+ "files_modified",
829
+ "summary"
830
+ ],
831
+ "properties": {
832
+ "files_created": {
833
+ "type": "array",
834
+ "items": {
835
+ "type": "string"
836
+ },
837
+ "description": "List of new files created."
838
+ },
839
+ "files_modified": {
840
+ "type": "array",
841
+ "items": {
842
+ "type": "string"
843
+ },
844
+ "description": "List of existing files modified."
845
+ },
846
+ "summary": {
847
+ "type": "string",
848
+ "description": "Human-readable summary of what was implemented."
849
+ },
850
+ "commands_added": {
851
+ "type": "array",
852
+ "items": {
853
+ "type": "object",
854
+ "required": [
855
+ "name",
856
+ "type"
857
+ ],
858
+ "properties": {
859
+ "name": {
860
+ "type": "string"
861
+ },
862
+ "type": {
863
+ "type": "string",
864
+ "enum": [
865
+ "audit",
866
+ "propose",
867
+ "explain"
868
+ ]
869
+ },
870
+ "description": {
871
+ "type": "string"
872
+ }
873
+ }
874
+ }
875
+ },
876
+ "next_steps": {
877
+ "type": "array",
878
+ "items": {
879
+ "type": "string"
880
+ },
881
+ "description": "Recommended next steps for the developer."
882
+ }
883
+ }
884
+ }
885
+ ```
886
+
887
+ </details>
888
+
889
+ **Exit 1:** Implementation failed.
890
+
891
+ - **stderr:** format=`text`
892
+
893
+ **Exit 3:** Input validation failed (e.g. project directory not found).
894
+
895
+ - **stderr:** format=`text`
896
+
897
+ **Exit 12:** Adapter initialization error.
898
+
899
+ - **stderr:** format=`text`
900
+
901
+ #### Extensions
902
+
903
+ ```yaml
904
+ x-agent:
905
+ riskLevel: high
906
+ requiresConfirmation: true
907
+ idempotent: false
908
+ sideEffects:
909
+ - sdk_call
910
+ - filesystem_write
911
+ safeDryRunOption: dry-run
912
+ expectedDurationMs: 300000
913
+ retryableExitCodes:
914
+ - 1
915
+ - 12
916
+ recommendedBeforeUse:
917
+ - Ensure the target project has a cli-contract.yaml or plan to create one.
918
+ - Run in a clean git working tree so changes can be reviewed.
919
+ ```
920
+
921
+ ---
922
+
923
+ ### audit-implementation
924
+
925
+ Audit an LLM command integration for pattern conformance.
926
+
927
+ Analyzes a target project's LLM command integration to verify it
928
+ correctly follows the agent-contracts + agent-contracts-runtime +
929
+ cli-contracts stack conventions.
930
+
931
+ Checks all three layers:
932
+ 1. DSL definitions (agents, tasks, workflows, handoff schemas)
933
+ 2. Runtime integration (adapter usage, runTask/runWorkflow, registries)
934
+ 3. CLI contract (standard options, x-agent metadata, exit codes)
935
+
936
+ Produces structured findings with severity, category, and
937
+ concrete remediation steps. Read-only — does not modify files.
938
+
939
+
940
+ **Usage:**
941
+
942
+ ```
943
+ agent-runtime audit-implementation [project-dir] [--adapter] [--focus] [--dry-run] [--fail-on] [--model] [--output] [--report-format]
944
+ ```
945
+
946
+ #### Arguments
947
+
948
+ | Name | Required | Description |
949
+ |---|---|---|
950
+ | `project-dir` | No | Path to the project directory to audit. Defaults to current directory. |
951
+
952
+ #### Options
953
+
954
+ | Option | Aliases | Required | Default | Description |
955
+ |---|---|---|---|---|
956
+ | `--adapter` | -a | No | `"claude"` | SDK adapter to use for the audit agent. |
957
+ | `--focus` | | No | `"all"` | Limit audit to a specific layer. Defaults to all layers. |
958
+ | `--dry-run` | -n | No | `false` | Output the prompt context without calling the LLM. |
959
+ | `--fail-on` | | No | `"error"` | Minimum finding severity that causes a non-zero exit. |
960
+ | `--model` | | No | | Model name override for the selected adapter. |
961
+ | `--output` | -o | No | | Write the result to a file instead of stdout. |
962
+ | `--report-format` | | No | `"text"` | Output format for the audit report. |
963
+
964
+ #### Exit Codes
965
+
966
+ **Exit 0:** Audit completed with no findings above threshold.
967
+
968
+ - **stdout:** format=`json`
969
+
970
+ | Property | Type | Required | Description |
971
+ |---|---|---|---|
972
+ | `summary` | `string` | Yes | One-paragraph overall assessment. |
973
+ | `riskLevel` | `"low" \| "medium" \| "high" \| "critical"` | Yes | Derived from worst finding severity. |
974
+ | `findings` | `object[]` | Yes | |
975
+ | `findings[].id` | `string` | No | Unique finding identifier (e.g. F-001). |
976
+ | `findings[].severity` | `"info" \| "warning" \| "error" \| "critical"` | Yes | |
977
+ | `findings[].category` | `string` | Yes | Domain vocabulary category (e.g. cli-contract-options, runtime-adapter). |
978
+ | `findings[].target` | `string` | No | File path or resource the finding applies to. |
979
+ | `findings[].location` | `string` | No | Line range or specific location within the target. |
980
+ | `findings[].message` | `string` | Yes | Human-readable description of the finding. |
981
+ | `findings[].recommendation` | `string` | No | Concrete remediation step. |
982
+ | `findings[].confidence` | `number (min: 0, max: 1)` | No | Confidence score (0–1) for the finding. |
983
+ | `findings[].evidence` | `object[]` | No | |
984
+ | `findings[].evidence[].type` | `string` | Yes | Evidence type (e.g. code_snippet, file_excerpt, lint_output). |
985
+ | `findings[].evidence[].content` | `string` | Yes | The evidence content. |
986
+ | `findings[].evidence[].source` | `string` | No | Source file path or URL for the evidence. |
987
+ | `findings[].details` | `object` | No | Additional structured details specific to the finding category. |
988
+ | `recommendedActions` | `object[]` | No | |
989
+ | `recommendedActions[].kind` | `enum(6 values)` | Yes | |
990
+ | `recommendedActions[].title` | `string` | Yes | Short human-readable title for the action. |
991
+ | `recommendedActions[].command` | `string` | No | Shell command to run (when kind is run_command). |
992
+ | `recommendedActions[].target` | `string` | No | File path to edit (when kind is edit_file). |
993
+ | `recommendedActions[].rationale` | `string` | No | Explanation of why this action is recommended. |
994
+ | `metadata` | `object` | No | |
995
+ | `metadata.tool` | `string` | No | |
996
+ | `metadata.command` | `string` | No | |
997
+ | `metadata.version` | `string` | No | |
998
+ | `metadata.generatedAt` | `string` | No | |
999
+ | `metadata.adapter` | `string` | No | |
1000
+ | `metadata.model` | `string` | No | |
1001
+
1002
+ <details>
1003
+ <summary>JSON Schema</summary>
1004
+
1005
+ ```json
1006
+ {
1007
+ "type": "object",
1008
+ "required": [
1009
+ "summary",
1010
+ "riskLevel",
1011
+ "findings"
1012
+ ],
1013
+ "properties": {
1014
+ "summary": {
1015
+ "type": "string",
1016
+ "description": "One-paragraph overall assessment."
1017
+ },
1018
+ "riskLevel": {
1019
+ "type": "string",
1020
+ "enum": [
1021
+ "low",
1022
+ "medium",
1023
+ "high",
1024
+ "critical"
1025
+ ],
1026
+ "description": "Derived from worst finding severity."
1027
+ },
1028
+ "findings": {
1029
+ "type": "array",
1030
+ "items": {
1031
+ "type": "object",
1032
+ "required": [
1033
+ "severity",
1034
+ "category",
1035
+ "message"
1036
+ ],
1037
+ "properties": {
1038
+ "id": {
1039
+ "type": "string",
1040
+ "description": "Unique finding identifier (e.g. F-001)."
1041
+ },
1042
+ "severity": {
1043
+ "type": "string",
1044
+ "enum": [
1045
+ "info",
1046
+ "warning",
1047
+ "error",
1048
+ "critical"
1049
+ ]
1050
+ },
1051
+ "category": {
1052
+ "type": "string",
1053
+ "description": "Domain vocabulary category (e.g. cli-contract-options, runtime-adapter)."
1054
+ },
1055
+ "target": {
1056
+ "type": "string",
1057
+ "description": "File path or resource the finding applies to."
1058
+ },
1059
+ "location": {
1060
+ "type": "string",
1061
+ "description": "Line range or specific location within the target."
1062
+ },
1063
+ "message": {
1064
+ "type": "string",
1065
+ "description": "Human-readable description of the finding."
1066
+ },
1067
+ "recommendation": {
1068
+ "type": "string",
1069
+ "description": "Concrete remediation step."
1070
+ },
1071
+ "confidence": {
1072
+ "type": "number",
1073
+ "minimum": 0,
1074
+ "maximum": 1,
1075
+ "description": "Confidence score (0–1) for the finding."
1076
+ },
1077
+ "evidence": {
1078
+ "type": "array",
1079
+ "items": {
1080
+ "type": "object",
1081
+ "required": [
1082
+ "type",
1083
+ "content"
1084
+ ],
1085
+ "properties": {
1086
+ "type": {
1087
+ "type": "string",
1088
+ "description": "Evidence type (e.g. code_snippet, file_excerpt, lint_output)."
1089
+ },
1090
+ "content": {
1091
+ "type": "string",
1092
+ "description": "The evidence content."
1093
+ },
1094
+ "source": {
1095
+ "type": "string",
1096
+ "description": "Source file path or URL for the evidence."
1097
+ }
1098
+ }
1099
+ }
1100
+ },
1101
+ "details": {
1102
+ "type": "object",
1103
+ "description": "Additional structured details specific to the finding category."
1104
+ }
1105
+ }
1106
+ }
1107
+ },
1108
+ "recommendedActions": {
1109
+ "type": "array",
1110
+ "items": {
1111
+ "type": "object",
1112
+ "required": [
1113
+ "kind",
1114
+ "title"
1115
+ ],
1116
+ "properties": {
1117
+ "kind": {
1118
+ "type": "string",
1119
+ "enum": [
1120
+ "run_command",
1121
+ "edit_file",
1122
+ "review",
1123
+ "confirm",
1124
+ "block",
1125
+ "ignore"
1126
+ ]
1127
+ },
1128
+ "title": {
1129
+ "type": "string",
1130
+ "description": "Short human-readable title for the action."
1131
+ },
1132
+ "command": {
1133
+ "type": "string",
1134
+ "description": "Shell command to run (when kind is run_command)."
1135
+ },
1136
+ "target": {
1137
+ "type": "string",
1138
+ "description": "File path to edit (when kind is edit_file)."
1139
+ },
1140
+ "rationale": {
1141
+ "type": "string",
1142
+ "description": "Explanation of why this action is recommended."
1143
+ }
1144
+ }
1145
+ }
1146
+ },
1147
+ "metadata": {
1148
+ "type": "object",
1149
+ "properties": {
1150
+ "tool": {
1151
+ "type": "string"
1152
+ },
1153
+ "command": {
1154
+ "type": "string"
1155
+ },
1156
+ "version": {
1157
+ "type": "string"
1158
+ },
1159
+ "generatedAt": {
1160
+ "type": "string"
1161
+ },
1162
+ "adapter": {
1163
+ "type": "string"
1164
+ },
1165
+ "model": {
1166
+ "type": "string"
1167
+ }
1168
+ }
1169
+ }
1170
+ }
1171
+ }
1172
+ ```
1173
+
1174
+ </details>
1175
+
1176
+ **Exit 1:** Audit failed (agent error, unexpected failure).
1177
+
1178
+ - **stderr:** format=`text`
1179
+
1180
+ **Exit 3:** Input validation failed (e.g. project directory not found).
1181
+
1182
+ - **stderr:** format=`text`
1183
+
1184
+ **Exit 10:** Audit completed with findings above --fail-on threshold.
1185
+
1186
+ - **stdout:** format=`json`
1187
+
1188
+ | Property | Type | Required | Description |
1189
+ |---|---|---|---|
1190
+ | `summary` | `string` | Yes | One-paragraph overall assessment. |
1191
+ | `riskLevel` | `"low" \| "medium" \| "high" \| "critical"` | Yes | Derived from worst finding severity. |
1192
+ | `findings` | `object[]` | Yes | |
1193
+ | `findings[].id` | `string` | No | Unique finding identifier (e.g. F-001). |
1194
+ | `findings[].severity` | `"info" \| "warning" \| "error" \| "critical"` | Yes | |
1195
+ | `findings[].category` | `string` | Yes | Domain vocabulary category (e.g. cli-contract-options, runtime-adapter). |
1196
+ | `findings[].target` | `string` | No | File path or resource the finding applies to. |
1197
+ | `findings[].location` | `string` | No | Line range or specific location within the target. |
1198
+ | `findings[].message` | `string` | Yes | Human-readable description of the finding. |
1199
+ | `findings[].recommendation` | `string` | No | Concrete remediation step. |
1200
+ | `findings[].confidence` | `number (min: 0, max: 1)` | No | Confidence score (0–1) for the finding. |
1201
+ | `findings[].evidence` | `object[]` | No | |
1202
+ | `findings[].evidence[].type` | `string` | Yes | Evidence type (e.g. code_snippet, file_excerpt, lint_output). |
1203
+ | `findings[].evidence[].content` | `string` | Yes | The evidence content. |
1204
+ | `findings[].evidence[].source` | `string` | No | Source file path or URL for the evidence. |
1205
+ | `findings[].details` | `object` | No | Additional structured details specific to the finding category. |
1206
+ | `recommendedActions` | `object[]` | No | |
1207
+ | `recommendedActions[].kind` | `enum(6 values)` | Yes | |
1208
+ | `recommendedActions[].title` | `string` | Yes | Short human-readable title for the action. |
1209
+ | `recommendedActions[].command` | `string` | No | Shell command to run (when kind is run_command). |
1210
+ | `recommendedActions[].target` | `string` | No | File path to edit (when kind is edit_file). |
1211
+ | `recommendedActions[].rationale` | `string` | No | Explanation of why this action is recommended. |
1212
+ | `metadata` | `object` | No | |
1213
+ | `metadata.tool` | `string` | No | |
1214
+ | `metadata.command` | `string` | No | |
1215
+ | `metadata.version` | `string` | No | |
1216
+ | `metadata.generatedAt` | `string` | No | |
1217
+ | `metadata.adapter` | `string` | No | |
1218
+ | `metadata.model` | `string` | No | |
1219
+
1220
+ <details>
1221
+ <summary>JSON Schema</summary>
1222
+
1223
+ ```json
1224
+ {
1225
+ "type": "object",
1226
+ "required": [
1227
+ "summary",
1228
+ "riskLevel",
1229
+ "findings"
1230
+ ],
1231
+ "properties": {
1232
+ "summary": {
1233
+ "type": "string",
1234
+ "description": "One-paragraph overall assessment."
1235
+ },
1236
+ "riskLevel": {
1237
+ "type": "string",
1238
+ "enum": [
1239
+ "low",
1240
+ "medium",
1241
+ "high",
1242
+ "critical"
1243
+ ],
1244
+ "description": "Derived from worst finding severity."
1245
+ },
1246
+ "findings": {
1247
+ "type": "array",
1248
+ "items": {
1249
+ "type": "object",
1250
+ "required": [
1251
+ "severity",
1252
+ "category",
1253
+ "message"
1254
+ ],
1255
+ "properties": {
1256
+ "id": {
1257
+ "type": "string",
1258
+ "description": "Unique finding identifier (e.g. F-001)."
1259
+ },
1260
+ "severity": {
1261
+ "type": "string",
1262
+ "enum": [
1263
+ "info",
1264
+ "warning",
1265
+ "error",
1266
+ "critical"
1267
+ ]
1268
+ },
1269
+ "category": {
1270
+ "type": "string",
1271
+ "description": "Domain vocabulary category (e.g. cli-contract-options, runtime-adapter)."
1272
+ },
1273
+ "target": {
1274
+ "type": "string",
1275
+ "description": "File path or resource the finding applies to."
1276
+ },
1277
+ "location": {
1278
+ "type": "string",
1279
+ "description": "Line range or specific location within the target."
1280
+ },
1281
+ "message": {
1282
+ "type": "string",
1283
+ "description": "Human-readable description of the finding."
1284
+ },
1285
+ "recommendation": {
1286
+ "type": "string",
1287
+ "description": "Concrete remediation step."
1288
+ },
1289
+ "confidence": {
1290
+ "type": "number",
1291
+ "minimum": 0,
1292
+ "maximum": 1,
1293
+ "description": "Confidence score (0–1) for the finding."
1294
+ },
1295
+ "evidence": {
1296
+ "type": "array",
1297
+ "items": {
1298
+ "type": "object",
1299
+ "required": [
1300
+ "type",
1301
+ "content"
1302
+ ],
1303
+ "properties": {
1304
+ "type": {
1305
+ "type": "string",
1306
+ "description": "Evidence type (e.g. code_snippet, file_excerpt, lint_output)."
1307
+ },
1308
+ "content": {
1309
+ "type": "string",
1310
+ "description": "The evidence content."
1311
+ },
1312
+ "source": {
1313
+ "type": "string",
1314
+ "description": "Source file path or URL for the evidence."
1315
+ }
1316
+ }
1317
+ }
1318
+ },
1319
+ "details": {
1320
+ "type": "object",
1321
+ "description": "Additional structured details specific to the finding category."
1322
+ }
1323
+ }
1324
+ }
1325
+ },
1326
+ "recommendedActions": {
1327
+ "type": "array",
1328
+ "items": {
1329
+ "type": "object",
1330
+ "required": [
1331
+ "kind",
1332
+ "title"
1333
+ ],
1334
+ "properties": {
1335
+ "kind": {
1336
+ "type": "string",
1337
+ "enum": [
1338
+ "run_command",
1339
+ "edit_file",
1340
+ "review",
1341
+ "confirm",
1342
+ "block",
1343
+ "ignore"
1344
+ ]
1345
+ },
1346
+ "title": {
1347
+ "type": "string",
1348
+ "description": "Short human-readable title for the action."
1349
+ },
1350
+ "command": {
1351
+ "type": "string",
1352
+ "description": "Shell command to run (when kind is run_command)."
1353
+ },
1354
+ "target": {
1355
+ "type": "string",
1356
+ "description": "File path to edit (when kind is edit_file)."
1357
+ },
1358
+ "rationale": {
1359
+ "type": "string",
1360
+ "description": "Explanation of why this action is recommended."
1361
+ }
1362
+ }
1363
+ }
1364
+ },
1365
+ "metadata": {
1366
+ "type": "object",
1367
+ "properties": {
1368
+ "tool": {
1369
+ "type": "string"
1370
+ },
1371
+ "command": {
1372
+ "type": "string"
1373
+ },
1374
+ "version": {
1375
+ "type": "string"
1376
+ },
1377
+ "generatedAt": {
1378
+ "type": "string"
1379
+ },
1380
+ "adapter": {
1381
+ "type": "string"
1382
+ },
1383
+ "model": {
1384
+ "type": "string"
1385
+ }
1386
+ }
1387
+ }
1388
+ }
1389
+ }
1390
+ ```
1391
+
1392
+ </details>
1393
+
1394
+ **Exit 12:** Adapter initialization error.
1395
+
1396
+ - **stderr:** format=`text`
1397
+
1398
+ #### Extensions
1399
+
1400
+ ```yaml
1401
+ x-agent:
1402
+ riskLevel: low
1403
+ requiresConfirmation: false
1404
+ idempotent: true
1405
+ sideEffects:
1406
+ - network
1407
+ sideEffectNote: Network calls to LLM provider when adapter is not mock. Filesystem write only when --output is specified.
1408
+ safeDryRunOption: dry-run
1409
+ expectedDurationMs: 180000
1410
+ retryableExitCodes:
1411
+ - 1
1412
+ - 12
1413
+ ```
1414
+
1415
+ ---
1416
+
761
1417
  ### doctor
762
1418
 
763
1419
  Verify configuration, generated files, and SDK connectivity.
@@ -901,10 +1557,10 @@ agent-runtime doctor
901
1557
 
902
1558
  ```yaml
903
1559
  x-agent:
904
- risk_level: low
905
- requires_confirmation: false
1560
+ riskLevel: low
1561
+ requiresConfirmation: false
906
1562
  idempotent: true
907
- side_effects:
1563
+ sideEffects:
908
1564
 
909
1565
  ```
910
1566
 
@@ -1222,13 +1878,261 @@ Type: `object`
1222
1878
  }
1223
1879
  }
1224
1880
  },
1225
- "retries_used": {
1226
- "type": "integer",
1227
- "minimum": 0
1228
- },
1229
- "elapsed_ms": {
1230
- "type": "integer",
1231
- "minimum": 0
1881
+ "retries_used": {
1882
+ "type": "integer",
1883
+ "minimum": 0
1884
+ },
1885
+ "elapsed_ms": {
1886
+ "type": "integer",
1887
+ "minimum": 0
1888
+ }
1889
+ }
1890
+ }
1891
+ ```
1892
+
1893
+ </details>
1894
+
1895
+ ### ListResult
1896
+
1897
+ Type: `object`
1898
+
1899
+ | Property | Type | Required | Description |
1900
+ |---|---|---|---|
1901
+ | `resource` | `"workflows" \| "tasks" \| "agents"` | Yes | |
1902
+ | `items` | `object[]` | Yes | |
1903
+ | `items[].id` | `string` | Yes | |
1904
+ | `items[].description` | `string` | Yes | |
1905
+
1906
+ <details>
1907
+ <summary>JSON Schema</summary>
1908
+
1909
+ ```json
1910
+ {
1911
+ "type": "object",
1912
+ "required": [
1913
+ "resource",
1914
+ "items"
1915
+ ],
1916
+ "properties": {
1917
+ "resource": {
1918
+ "type": "string",
1919
+ "enum": [
1920
+ "workflows",
1921
+ "tasks",
1922
+ "agents"
1923
+ ]
1924
+ },
1925
+ "items": {
1926
+ "type": "array",
1927
+ "items": {
1928
+ "type": "object",
1929
+ "required": [
1930
+ "id",
1931
+ "description"
1932
+ ],
1933
+ "properties": {
1934
+ "id": {
1935
+ "type": "string"
1936
+ },
1937
+ "description": {
1938
+ "type": "string"
1939
+ }
1940
+ }
1941
+ }
1942
+ }
1943
+ }
1944
+ }
1945
+ ```
1946
+
1947
+ </details>
1948
+
1949
+ ### ShowPromptResult
1950
+
1951
+ Type: `object`
1952
+
1953
+ | Property | Type | Required | Description |
1954
+ |---|---|---|---|
1955
+ | `task_id` | `string` | Yes | The task ID used to build the prompt. |
1956
+ | `agent_id` | `string` | Yes | The target agent ID for this task. |
1957
+ | `prompt` | `string` | Yes | The full generated prompt text. |
1958
+ | `handoff_schema` | `string` | No | The handoff schema ID for the task result. |
1959
+ | `plugins_applied` | `boolean` | No | Whether plugin prompt enhancers were applied. |
1960
+
1961
+ <details>
1962
+ <summary>JSON Schema</summary>
1963
+
1964
+ ```json
1965
+ {
1966
+ "type": "object",
1967
+ "required": [
1968
+ "task_id",
1969
+ "agent_id",
1970
+ "prompt"
1971
+ ],
1972
+ "properties": {
1973
+ "task_id": {
1974
+ "type": "string",
1975
+ "description": "The task ID used to build the prompt."
1976
+ },
1977
+ "agent_id": {
1978
+ "type": "string",
1979
+ "description": "The target agent ID for this task."
1980
+ },
1981
+ "prompt": {
1982
+ "type": "string",
1983
+ "description": "The full generated prompt text."
1984
+ },
1985
+ "handoff_schema": {
1986
+ "type": "string",
1987
+ "description": "The handoff schema ID for the task result."
1988
+ },
1989
+ "plugins_applied": {
1990
+ "type": "boolean",
1991
+ "description": "Whether plugin prompt enhancers were applied."
1992
+ }
1993
+ }
1994
+ }
1995
+ ```
1996
+
1997
+ </details>
1998
+
1999
+ ### DoctorResult
2000
+
2001
+ Type: `object`
2002
+
2003
+ | Property | Type | Required | Description |
2004
+ |---|---|---|---|
2005
+ | `checks` | `object[]` | Yes | |
2006
+ | `checks[].name` | `string` | Yes | Check name (e.g. config_exists, dsl_exists, manifest_fresh). |
2007
+ | `checks[].status` | `"pass" \| "fail" \| "warn"` | Yes | |
2008
+ | `checks[].message` | `string` | No | Human-readable detail. |
2009
+ | `all_passed` | `boolean` | Yes | |
2010
+
2011
+ <details>
2012
+ <summary>JSON Schema</summary>
2013
+
2014
+ ```json
2015
+ {
2016
+ "type": "object",
2017
+ "required": [
2018
+ "checks",
2019
+ "all_passed"
2020
+ ],
2021
+ "properties": {
2022
+ "checks": {
2023
+ "type": "array",
2024
+ "items": {
2025
+ "type": "object",
2026
+ "required": [
2027
+ "name",
2028
+ "status"
2029
+ ],
2030
+ "properties": {
2031
+ "name": {
2032
+ "type": "string",
2033
+ "description": "Check name (e.g. config_exists, dsl_exists, manifest_fresh)."
2034
+ },
2035
+ "status": {
2036
+ "type": "string",
2037
+ "enum": [
2038
+ "pass",
2039
+ "fail",
2040
+ "warn"
2041
+ ]
2042
+ },
2043
+ "message": {
2044
+ "type": "string",
2045
+ "description": "Human-readable detail."
2046
+ }
2047
+ }
2048
+ }
2049
+ },
2050
+ "all_passed": {
2051
+ "type": "boolean"
2052
+ }
2053
+ }
2054
+ }
2055
+ ```
2056
+
2057
+ </details>
2058
+
2059
+ ### ImplementResult
2060
+
2061
+ Type: `object`
2062
+
2063
+ | Property | Type | Required | Description |
2064
+ |---|---|---|---|
2065
+ | `files_created` | `string[]` | Yes | List of new files created. |
2066
+ | `files_modified` | `string[]` | Yes | List of existing files modified. |
2067
+ | `summary` | `string` | Yes | Human-readable summary of what was implemented. |
2068
+ | `commands_added` | `object[]` | No | |
2069
+ | `commands_added[].name` | `string` | Yes | |
2070
+ | `commands_added[].type` | `"audit" \| "propose" \| "explain"` | Yes | |
2071
+ | `commands_added[].description` | `string` | No | |
2072
+ | `next_steps` | `string[]` | No | Recommended next steps for the developer. |
2073
+
2074
+ <details>
2075
+ <summary>JSON Schema</summary>
2076
+
2077
+ ```json
2078
+ {
2079
+ "type": "object",
2080
+ "required": [
2081
+ "files_created",
2082
+ "files_modified",
2083
+ "summary"
2084
+ ],
2085
+ "properties": {
2086
+ "files_created": {
2087
+ "type": "array",
2088
+ "items": {
2089
+ "type": "string"
2090
+ },
2091
+ "description": "List of new files created."
2092
+ },
2093
+ "files_modified": {
2094
+ "type": "array",
2095
+ "items": {
2096
+ "type": "string"
2097
+ },
2098
+ "description": "List of existing files modified."
2099
+ },
2100
+ "summary": {
2101
+ "type": "string",
2102
+ "description": "Human-readable summary of what was implemented."
2103
+ },
2104
+ "commands_added": {
2105
+ "type": "array",
2106
+ "items": {
2107
+ "type": "object",
2108
+ "required": [
2109
+ "name",
2110
+ "type"
2111
+ ],
2112
+ "properties": {
2113
+ "name": {
2114
+ "type": "string"
2115
+ },
2116
+ "type": {
2117
+ "type": "string",
2118
+ "enum": [
2119
+ "audit",
2120
+ "propose",
2121
+ "explain"
2122
+ ]
2123
+ },
2124
+ "description": {
2125
+ "type": "string"
2126
+ }
2127
+ }
2128
+ }
2129
+ },
2130
+ "next_steps": {
2131
+ "type": "array",
2132
+ "items": {
2133
+ "type": "string"
2134
+ },
2135
+ "description": "Recommended next steps for the developer."
1232
2136
  }
1233
2137
  }
1234
2138
  }
@@ -1236,16 +2140,41 @@ Type: `object`
1236
2140
 
1237
2141
  </details>
1238
2142
 
1239
- ### ListResult
2143
+ ### AuditImplementationResult
1240
2144
 
1241
2145
  Type: `object`
1242
2146
 
1243
2147
  | Property | Type | Required | Description |
1244
2148
  |---|---|---|---|
1245
- | `resource` | `"workflows" \| "tasks" \| "agents"` | Yes | |
1246
- | `items` | `object[]` | Yes | |
1247
- | `items[].id` | `string` | Yes | |
1248
- | `items[].description` | `string` | Yes | |
2149
+ | `summary` | `string` | Yes | One-paragraph overall assessment. |
2150
+ | `riskLevel` | `"low" \| "medium" \| "high" \| "critical"` | Yes | Derived from worst finding severity. |
2151
+ | `findings` | `object[]` | Yes | |
2152
+ | `findings[].id` | `string` | No | Unique finding identifier (e.g. F-001). |
2153
+ | `findings[].severity` | `"info" \| "warning" \| "error" \| "critical"` | Yes | |
2154
+ | `findings[].category` | `string` | Yes | Domain vocabulary category (e.g. cli-contract-options, runtime-adapter). |
2155
+ | `findings[].target` | `string` | No | File path or resource the finding applies to. |
2156
+ | `findings[].location` | `string` | No | Line range or specific location within the target. |
2157
+ | `findings[].message` | `string` | Yes | Human-readable description of the finding. |
2158
+ | `findings[].recommendation` | `string` | No | Concrete remediation step. |
2159
+ | `findings[].confidence` | `number (min: 0, max: 1)` | No | Confidence score (0–1) for the finding. |
2160
+ | `findings[].evidence` | `object[]` | No | |
2161
+ | `findings[].evidence[].type` | `string` | Yes | Evidence type (e.g. code_snippet, file_excerpt, lint_output). |
2162
+ | `findings[].evidence[].content` | `string` | Yes | The evidence content. |
2163
+ | `findings[].evidence[].source` | `string` | No | Source file path or URL for the evidence. |
2164
+ | `findings[].details` | `object` | No | Additional structured details specific to the finding category. |
2165
+ | `recommendedActions` | `object[]` | No | |
2166
+ | `recommendedActions[].kind` | `enum(6 values)` | Yes | |
2167
+ | `recommendedActions[].title` | `string` | Yes | Short human-readable title for the action. |
2168
+ | `recommendedActions[].command` | `string` | No | Shell command to run (when kind is run_command). |
2169
+ | `recommendedActions[].target` | `string` | No | File path to edit (when kind is edit_file). |
2170
+ | `recommendedActions[].rationale` | `string` | No | Explanation of why this action is recommended. |
2171
+ | `metadata` | `object` | No | |
2172
+ | `metadata.tool` | `string` | No | |
2173
+ | `metadata.command` | `string` | No | |
2174
+ | `metadata.version` | `string` | No | |
2175
+ | `metadata.generatedAt` | `string` | No | |
2176
+ | `metadata.adapter` | `string` | No | |
2177
+ | `metadata.model` | `string` | No | |
1249
2178
 
1250
2179
  <details>
1251
2180
  <summary>JSON Schema</summary>
@@ -1254,35 +2183,166 @@ Type: `object`
1254
2183
  {
1255
2184
  "type": "object",
1256
2185
  "required": [
1257
- "resource",
1258
- "items"
2186
+ "summary",
2187
+ "riskLevel",
2188
+ "findings"
1259
2189
  ],
1260
2190
  "properties": {
1261
- "resource": {
2191
+ "summary": {
2192
+ "type": "string",
2193
+ "description": "One-paragraph overall assessment."
2194
+ },
2195
+ "riskLevel": {
1262
2196
  "type": "string",
1263
2197
  "enum": [
1264
- "workflows",
1265
- "tasks",
1266
- "agents"
1267
- ]
2198
+ "low",
2199
+ "medium",
2200
+ "high",
2201
+ "critical"
2202
+ ],
2203
+ "description": "Derived from worst finding severity."
1268
2204
  },
1269
- "items": {
2205
+ "findings": {
1270
2206
  "type": "array",
1271
2207
  "items": {
1272
2208
  "type": "object",
1273
2209
  "required": [
1274
- "id",
1275
- "description"
2210
+ "severity",
2211
+ "category",
2212
+ "message"
1276
2213
  ],
1277
2214
  "properties": {
1278
2215
  "id": {
1279
- "type": "string"
2216
+ "type": "string",
2217
+ "description": "Unique finding identifier (e.g. F-001)."
1280
2218
  },
1281
- "description": {
1282
- "type": "string"
2219
+ "severity": {
2220
+ "type": "string",
2221
+ "enum": [
2222
+ "info",
2223
+ "warning",
2224
+ "error",
2225
+ "critical"
2226
+ ]
2227
+ },
2228
+ "category": {
2229
+ "type": "string",
2230
+ "description": "Domain vocabulary category (e.g. cli-contract-options, runtime-adapter)."
2231
+ },
2232
+ "target": {
2233
+ "type": "string",
2234
+ "description": "File path or resource the finding applies to."
2235
+ },
2236
+ "location": {
2237
+ "type": "string",
2238
+ "description": "Line range or specific location within the target."
2239
+ },
2240
+ "message": {
2241
+ "type": "string",
2242
+ "description": "Human-readable description of the finding."
2243
+ },
2244
+ "recommendation": {
2245
+ "type": "string",
2246
+ "description": "Concrete remediation step."
2247
+ },
2248
+ "confidence": {
2249
+ "type": "number",
2250
+ "minimum": 0,
2251
+ "maximum": 1,
2252
+ "description": "Confidence score (0–1) for the finding."
2253
+ },
2254
+ "evidence": {
2255
+ "type": "array",
2256
+ "items": {
2257
+ "type": "object",
2258
+ "required": [
2259
+ "type",
2260
+ "content"
2261
+ ],
2262
+ "properties": {
2263
+ "type": {
2264
+ "type": "string",
2265
+ "description": "Evidence type (e.g. code_snippet, file_excerpt, lint_output)."
2266
+ },
2267
+ "content": {
2268
+ "type": "string",
2269
+ "description": "The evidence content."
2270
+ },
2271
+ "source": {
2272
+ "type": "string",
2273
+ "description": "Source file path or URL for the evidence."
2274
+ }
2275
+ }
2276
+ }
2277
+ },
2278
+ "details": {
2279
+ "type": "object",
2280
+ "description": "Additional structured details specific to the finding category."
2281
+ }
2282
+ }
2283
+ }
2284
+ },
2285
+ "recommendedActions": {
2286
+ "type": "array",
2287
+ "items": {
2288
+ "type": "object",
2289
+ "required": [
2290
+ "kind",
2291
+ "title"
2292
+ ],
2293
+ "properties": {
2294
+ "kind": {
2295
+ "type": "string",
2296
+ "enum": [
2297
+ "run_command",
2298
+ "edit_file",
2299
+ "review",
2300
+ "confirm",
2301
+ "block",
2302
+ "ignore"
2303
+ ]
2304
+ },
2305
+ "title": {
2306
+ "type": "string",
2307
+ "description": "Short human-readable title for the action."
2308
+ },
2309
+ "command": {
2310
+ "type": "string",
2311
+ "description": "Shell command to run (when kind is run_command)."
2312
+ },
2313
+ "target": {
2314
+ "type": "string",
2315
+ "description": "File path to edit (when kind is edit_file)."
2316
+ },
2317
+ "rationale": {
2318
+ "type": "string",
2319
+ "description": "Explanation of why this action is recommended."
1283
2320
  }
1284
2321
  }
1285
2322
  }
2323
+ },
2324
+ "metadata": {
2325
+ "type": "object",
2326
+ "properties": {
2327
+ "tool": {
2328
+ "type": "string"
2329
+ },
2330
+ "command": {
2331
+ "type": "string"
2332
+ },
2333
+ "version": {
2334
+ "type": "string"
2335
+ },
2336
+ "generatedAt": {
2337
+ "type": "string"
2338
+ },
2339
+ "adapter": {
2340
+ "type": "string"
2341
+ },
2342
+ "model": {
2343
+ "type": "string"
2344
+ }
2345
+ }
1286
2346
  }
1287
2347
  }
1288
2348
  }
@@ -1290,17 +2350,15 @@ Type: `object`
1290
2350
 
1291
2351
  </details>
1292
2352
 
1293
- ### ShowPromptResult
2353
+ ### DoctorCheck
1294
2354
 
1295
2355
  Type: `object`
1296
2356
 
1297
2357
  | Property | Type | Required | Description |
1298
2358
  |---|---|---|---|
1299
- | `task_id` | `string` | Yes | The task ID used to build the prompt. |
1300
- | `agent_id` | `string` | Yes | The target agent ID for this task. |
1301
- | `prompt` | `string` | Yes | The full generated prompt text. |
1302
- | `handoff_schema` | `string` | No | The handoff schema ID for the task result. |
1303
- | `plugins_applied` | `boolean` | No | Whether plugin prompt enhancers were applied. |
2359
+ | `name` | `string` | Yes | Check name (e.g. config_exists, dsl_exists, manifest_fresh). |
2360
+ | `status` | `"pass" \| "fail" \| "warn"` | Yes | |
2361
+ | `message` | `string` | No | Human-readable detail. |
1304
2362
 
1305
2363
  <details>
1306
2364
  <summary>JSON Schema</summary>
@@ -1309,30 +2367,25 @@ Type: `object`
1309
2367
  {
1310
2368
  "type": "object",
1311
2369
  "required": [
1312
- "task_id",
1313
- "agent_id",
1314
- "prompt"
2370
+ "name",
2371
+ "status"
1315
2372
  ],
1316
2373
  "properties": {
1317
- "task_id": {
1318
- "type": "string",
1319
- "description": "The task ID used to build the prompt."
1320
- },
1321
- "agent_id": {
2374
+ "name": {
1322
2375
  "type": "string",
1323
- "description": "The target agent ID for this task."
2376
+ "description": "Check name (e.g. config_exists, dsl_exists, manifest_fresh)."
1324
2377
  },
1325
- "prompt": {
2378
+ "status": {
1326
2379
  "type": "string",
1327
- "description": "The full generated prompt text."
2380
+ "enum": [
2381
+ "pass",
2382
+ "fail",
2383
+ "warn"
2384
+ ]
1328
2385
  },
1329
- "handoff_schema": {
2386
+ "message": {
1330
2387
  "type": "string",
1331
- "description": "The handoff schema ID for the task result."
1332
- },
1333
- "plugins_applied": {
1334
- "type": "boolean",
1335
- "description": "Whether plugin prompt enhancers were applied."
2388
+ "description": "Human-readable detail."
1336
2389
  }
1337
2390
  }
1338
2391
  }
@@ -1340,17 +2393,25 @@ Type: `object`
1340
2393
 
1341
2394
  </details>
1342
2395
 
1343
- ### DoctorResult
2396
+ ### AgentFinding
1344
2397
 
1345
2398
  Type: `object`
1346
2399
 
1347
2400
  | Property | Type | Required | Description |
1348
2401
  |---|---|---|---|
1349
- | `checks` | `object[]` | Yes | |
1350
- | `checks[].name` | `string` | Yes | Check name (e.g. config_exists, dsl_exists, manifest_fresh). |
1351
- | `checks[].status` | `"pass" \| "fail" \| "warn"` | Yes | |
1352
- | `checks[].message` | `string` | No | Human-readable detail. |
1353
- | `all_passed` | `boolean` | Yes | |
2402
+ | `id` | `string` | No | Unique finding identifier (e.g. F-001). |
2403
+ | `severity` | `"info" \| "warning" \| "error" \| "critical"` | Yes | |
2404
+ | `category` | `string` | Yes | Domain vocabulary category (e.g. cli-contract-options, runtime-adapter). |
2405
+ | `target` | `string` | No | File path or resource the finding applies to. |
2406
+ | `location` | `string` | No | Line range or specific location within the target. |
2407
+ | `message` | `string` | Yes | Human-readable description of the finding. |
2408
+ | `recommendation` | `string` | No | Concrete remediation step. |
2409
+ | `confidence` | `number (min: 0, max: 1)` | No | Confidence score (0–1) for the finding. |
2410
+ | `evidence` | `object[]` | No | |
2411
+ | `evidence[].type` | `string` | Yes | Evidence type (e.g. code_snippet, file_excerpt, lint_output). |
2412
+ | `evidence[].content` | `string` | Yes | The evidence content. |
2413
+ | `evidence[].source` | `string` | No | Source file path or URL for the evidence. |
2414
+ | `details` | `object` | No | Additional structured details specific to the finding category. |
1354
2415
 
1355
2416
  <details>
1356
2417
  <summary>JSON Schema</summary>
@@ -1359,40 +2420,77 @@ Type: `object`
1359
2420
  {
1360
2421
  "type": "object",
1361
2422
  "required": [
1362
- "checks",
1363
- "all_passed"
2423
+ "severity",
2424
+ "category",
2425
+ "message"
1364
2426
  ],
1365
2427
  "properties": {
1366
- "checks": {
2428
+ "id": {
2429
+ "type": "string",
2430
+ "description": "Unique finding identifier (e.g. F-001)."
2431
+ },
2432
+ "severity": {
2433
+ "type": "string",
2434
+ "enum": [
2435
+ "info",
2436
+ "warning",
2437
+ "error",
2438
+ "critical"
2439
+ ]
2440
+ },
2441
+ "category": {
2442
+ "type": "string",
2443
+ "description": "Domain vocabulary category (e.g. cli-contract-options, runtime-adapter)."
2444
+ },
2445
+ "target": {
2446
+ "type": "string",
2447
+ "description": "File path or resource the finding applies to."
2448
+ },
2449
+ "location": {
2450
+ "type": "string",
2451
+ "description": "Line range or specific location within the target."
2452
+ },
2453
+ "message": {
2454
+ "type": "string",
2455
+ "description": "Human-readable description of the finding."
2456
+ },
2457
+ "recommendation": {
2458
+ "type": "string",
2459
+ "description": "Concrete remediation step."
2460
+ },
2461
+ "confidence": {
2462
+ "type": "number",
2463
+ "minimum": 0,
2464
+ "maximum": 1,
2465
+ "description": "Confidence score (0–1) for the finding."
2466
+ },
2467
+ "evidence": {
1367
2468
  "type": "array",
1368
2469
  "items": {
1369
2470
  "type": "object",
1370
2471
  "required": [
1371
- "name",
1372
- "status"
2472
+ "type",
2473
+ "content"
1373
2474
  ],
1374
2475
  "properties": {
1375
- "name": {
2476
+ "type": {
1376
2477
  "type": "string",
1377
- "description": "Check name (e.g. config_exists, dsl_exists, manifest_fresh)."
2478
+ "description": "Evidence type (e.g. code_snippet, file_excerpt, lint_output)."
1378
2479
  },
1379
- "status": {
2480
+ "content": {
1380
2481
  "type": "string",
1381
- "enum": [
1382
- "pass",
1383
- "fail",
1384
- "warn"
1385
- ]
2482
+ "description": "The evidence content."
1386
2483
  },
1387
- "message": {
2484
+ "source": {
1388
2485
  "type": "string",
1389
- "description": "Human-readable detail."
2486
+ "description": "Source file path or URL for the evidence."
1390
2487
  }
1391
2488
  }
1392
2489
  }
1393
2490
  },
1394
- "all_passed": {
1395
- "type": "boolean"
2491
+ "details": {
2492
+ "type": "object",
2493
+ "description": "Additional structured details specific to the finding category."
1396
2494
  }
1397
2495
  }
1398
2496
  }
@@ -1400,15 +2498,17 @@ Type: `object`
1400
2498
 
1401
2499
  </details>
1402
2500
 
1403
- ### DoctorCheck
2501
+ ### AgentRecommendedAction
1404
2502
 
1405
2503
  Type: `object`
1406
2504
 
1407
2505
  | Property | Type | Required | Description |
1408
2506
  |---|---|---|---|
1409
- | `name` | `string` | Yes | Check name (e.g. config_exists, dsl_exists, manifest_fresh). |
1410
- | `status` | `"pass" \| "fail" \| "warn"` | Yes | |
1411
- | `message` | `string` | No | Human-readable detail. |
2507
+ | `kind` | `enum(6 values)` | Yes | |
2508
+ | `title` | `string` | Yes | Short human-readable title for the action. |
2509
+ | `command` | `string` | No | Shell command to run (when kind is run_command). |
2510
+ | `target` | `string` | No | File path to edit (when kind is edit_file). |
2511
+ | `rationale` | `string` | No | Explanation of why this action is recommended. |
1412
2512
 
1413
2513
  <details>
1414
2514
  <summary>JSON Schema</summary>
@@ -1417,25 +2517,75 @@ Type: `object`
1417
2517
  {
1418
2518
  "type": "object",
1419
2519
  "required": [
1420
- "name",
1421
- "status"
2520
+ "kind",
2521
+ "title"
1422
2522
  ],
1423
2523
  "properties": {
1424
- "name": {
1425
- "type": "string",
1426
- "description": "Check name (e.g. config_exists, dsl_exists, manifest_fresh)."
1427
- },
1428
- "status": {
2524
+ "kind": {
1429
2525
  "type": "string",
1430
2526
  "enum": [
1431
- "pass",
1432
- "fail",
1433
- "warn"
2527
+ "run_command",
2528
+ "edit_file",
2529
+ "review",
2530
+ "confirm",
2531
+ "block",
2532
+ "ignore"
1434
2533
  ]
1435
2534
  },
1436
- "message": {
2535
+ "title": {
1437
2536
  "type": "string",
1438
- "description": "Human-readable detail."
2537
+ "description": "Short human-readable title for the action."
2538
+ },
2539
+ "command": {
2540
+ "type": "string",
2541
+ "description": "Shell command to run (when kind is run_command)."
2542
+ },
2543
+ "target": {
2544
+ "type": "string",
2545
+ "description": "File path to edit (when kind is edit_file)."
2546
+ },
2547
+ "rationale": {
2548
+ "type": "string",
2549
+ "description": "Explanation of why this action is recommended."
2550
+ }
2551
+ }
2552
+ }
2553
+ ```
2554
+
2555
+ </details>
2556
+
2557
+ ### AgentEvidence
2558
+
2559
+ Type: `object`
2560
+
2561
+ | Property | Type | Required | Description |
2562
+ |---|---|---|---|
2563
+ | `type` | `string` | Yes | Evidence type (e.g. code_snippet, file_excerpt, lint_output). |
2564
+ | `content` | `string` | Yes | The evidence content. |
2565
+ | `source` | `string` | No | Source file path or URL for the evidence. |
2566
+
2567
+ <details>
2568
+ <summary>JSON Schema</summary>
2569
+
2570
+ ```json
2571
+ {
2572
+ "type": "object",
2573
+ "required": [
2574
+ "type",
2575
+ "content"
2576
+ ],
2577
+ "properties": {
2578
+ "type": {
2579
+ "type": "string",
2580
+ "description": "Evidence type (e.g. code_snippet, file_excerpt, lint_output)."
2581
+ },
2582
+ "content": {
2583
+ "type": "string",
2584
+ "description": "The evidence content."
2585
+ },
2586
+ "source": {
2587
+ "type": "string",
2588
+ "description": "Source file path or URL for the evidence."
1439
2589
  }
1440
2590
  }
1441
2591
  }