@apexops/cli 0.10.0-next.3 → 0.10.0-next.5

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.
Files changed (33) hide show
  1. package/README.md +40 -0
  2. package/assets/client-projection-metadata/copilot-cli-agent-tools.json +12 -0
  3. package/assets/client-projections/github-copilot-cli/.github/agents/apex-architect.agent.md +9 -8
  4. package/assets/client-projections/github-copilot-cli/.github/agents/apex-planner.agent.md +11 -8
  5. package/assets/client-projections/github-copilot-cli/.github/agents/apex-requirements.agent.md +23 -12
  6. package/assets/client-projections/github-copilot-cli/.github/agents/apex.agent.md +4 -0
  7. package/assets/client-projections/github-copilot-cli/.github/mcp.json +7 -0
  8. package/assets/client-projections/github-copilot-cli/.github/skills/apex-requirements/SKILL.md +7 -4
  9. package/assets/client-projections/github-copilot-vscode/.github/agents/apex-architect.agent.md +9 -8
  10. package/assets/client-projections/github-copilot-vscode/.github/agents/apex-planner.agent.md +11 -8
  11. package/assets/client-projections/github-copilot-vscode/.github/agents/apex-requirements.agent.md +23 -12
  12. package/assets/client-projections/github-copilot-vscode/.github/agents/apex-reviewer.agent.md +9 -5
  13. package/assets/client-projections/github-copilot-vscode/.github/agents/apex.agent.md +4 -0
  14. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-requirements/SKILL.md +7 -4
  15. package/assets/config/runtime-bundle.v1.json +7 -7
  16. package/assets/customizations/.github/agents/apex-architect.agent.md +9 -8
  17. package/assets/customizations/.github/agents/apex-planner.agent.md +11 -8
  18. package/assets/customizations/.github/agents/apex-requirements.agent.md +23 -12
  19. package/assets/customizations/.github/agents/apex-reviewer.agent.md +9 -5
  20. package/assets/customizations/.github/agents/apex.agent.md +4 -0
  21. package/assets/customizations/.github/mcp.json +7 -0
  22. package/assets/customizations/.github/skills/apex-requirements/SKILL.md +7 -4
  23. package/assets/customizations/manifest.json +1 -1
  24. package/assets/manifest.json +58 -58
  25. package/dist/cli.d.ts +1 -0
  26. package/dist/cli.js +42 -2
  27. package/dist/mcp.js +89 -16
  28. package/dist/service.d.ts +46 -1
  29. package/dist/service.js +466 -41
  30. package/dist/state-transfer.js +23 -6
  31. package/dist/version.d.ts +1 -1
  32. package/dist/version.js +1 -1
  33. package/package.json +5 -5
package/README.md ADDED
@@ -0,0 +1,40 @@
1
+ # @apexops/cli
2
+
3
+ APEX vNext command-line interface and local MCP server for governed Azure
4
+ platform engineering workflows.
5
+
6
+ ## Install
7
+
8
+ ```bash
9
+ npm install @apexops/cli
10
+ ```
11
+
12
+ ## Quick Start
13
+
14
+ From a consumer workspace:
15
+
16
+ ```bash
17
+ npx apex init --project my-workload
18
+ npx apex status --json
19
+ ```
20
+
21
+ Use `npx apex` rather than relying on a globally installed `apex` binary.
22
+
23
+ ## Copilot Clients
24
+
25
+ The CLI installs managed APEX agents, skills, instructions, and MCP
26
+ configuration for supported GitHub Copilot clients.
27
+
28
+ ```bash
29
+ npx apex update
30
+ ```
31
+
32
+ ## Documentation
33
+
34
+ - [APEX vNext repository](https://github.com/jonathan-vella/apex-vnext)
35
+ - [CLI reference](https://apexops.pro/reference/cli/)
36
+ - [First run tutorial](https://apexops.pro/tutorials/first-run/)
37
+
38
+ ## License
39
+
40
+ MIT.
@@ -44,11 +44,17 @@
44
44
  "apex/projectList",
45
45
  "apex/projectUse",
46
46
  "apex/projectDelete",
47
+ "apex/gateDecide",
47
48
  "apex/stageArtifact",
48
49
  "apex/stageFile",
49
50
  "apex/generateIac",
50
51
  "apex/validateTask",
51
52
  "apex/completeTask",
53
+ "apex/requirementsComplete",
54
+ "apex/architectureComplete",
55
+ "apex/reviewComplete",
56
+ "apex/reviewDecide",
57
+ "apex/planComplete",
52
58
  "apex/preview",
53
59
  "apex/reconcile",
54
60
  "apex/inventory",
@@ -72,11 +78,17 @@
72
78
  "projectList",
73
79
  "projectUse",
74
80
  "projectDelete",
81
+ "gateDecide",
75
82
  "stageArtifact",
76
83
  "stageFile",
77
84
  "generateIac",
78
85
  "validateTask",
79
86
  "completeTask",
87
+ "requirementsComplete",
88
+ "architectureComplete",
89
+ "reviewComplete",
90
+ "reviewDecide",
91
+ "planComplete",
80
92
  "preview",
81
93
  "reconcile",
82
94
  "inventory",
@@ -12,8 +12,9 @@ tools:
12
12
  - apex/nextTask
13
13
  - apex/recordInput
14
14
  - apex/taskContext
15
- - apex/stageArtifact
16
- - apex/completeTask
15
+ - apex/architectureComplete
16
+ - apex/reviewDecide
17
+ - apex/gateDecide
17
18
  - azure-resource-manager-mcp/get_retail_prices
18
19
  - azure-resource-manager-mcp/query_costs
19
20
  - azure-resource-manager-mcp/query_aks_costs
@@ -49,14 +50,14 @@ Gate 2 package without bypassing the kernel's decision or approval boundaries.
49
50
  user confirmation before recording the final Architecture decision.
50
51
  5. Use current ARM MCP pricing evidence for every cost line item. If current evidence is unavailable, record the
51
52
  unavailability and block the cost posture from being treated as confirmed; never invent prices or currency values.
52
- 6. Stage `architecture`, `cost-estimate`, and `workload-decision-manifest`, then submit all three once through
53
- `apex/completeTask` with `outputs`. Do not submit a single-output completion.
53
+ 6. Submit `architecture`, `cost-estimate`, and `workload-decision-manifest` atomically through
54
+ `apex/architectureComplete`.
54
55
  7. APEX materializes a read-only Gate 2 package at `agent-output/<project>/<run>/architecture/`. Report the package,
55
56
  including `architecture-assessment.md`, `cost-estimate.md`, `sku-comparison.md`, and `challenger-findings.md`.
56
- 8. When the kernel issues `architecture-review`, delegate the exact task to `APEX Reviewer`. Present every challenger
57
- finding and use targeted decision follow-ups for findings the user chooses to resolve. Findings must be remediated,
58
- accepted with rationale, or explicitly deferred before Gate 2 can open.
59
- 9. Gate 2 remains a human terminal ceremony after the user reviews the full evidence appendix; never approve it.
57
+ 8. When the kernel issues `architecture-review`, delegate the exact task to `APEX Reviewer`. Present returned findings
58
+ in one native decision panel and submit permitted decisions through `apex/reviewDecide`.
59
+ 9. After the user reviews the full evidence appendix, ask one explicit Proceed/Revise question. Only after Proceed,
60
+ call `apex/gateDecide` for Gate 2 with `confirm: true`, then use the Planning handoff.
60
61
 
61
62
  Read `.github/skills/apex-architecture/SKILL.md` when architecture guidance is needed.
62
63
  Read `.github/skills/apex-azure-defaults/SKILL.md` only for projected defaults, governance, security, naming, or AVM rules.
@@ -11,8 +11,9 @@ tools:
11
11
  - apex/status
12
12
  - apex/nextTask
13
13
  - apex/taskContext
14
- - apex/stageArtifact
15
- - apex/completeTask
14
+ - apex/planComplete
15
+ - apex/reviewDecide
16
+ - apex/gateDecide
16
17
  - azure-resource-manager-mcp/get_retail_prices
17
18
  - azure-resource-manager-mcp/query_costs
18
19
  - azure-resource-manager-mcp/query_aks_costs
@@ -45,14 +46,16 @@ Gate 3.
45
46
  secret reference must include `kind`, `provider`, and `reference`.
46
47
  4. Explain logical resources, dependencies, controls, implementation bindings, environment inputs, and rollback or
47
48
  validation risks. Ask targeted follow-ups only for unresolved user-owned choices; never infer secret values.
48
- 5. Stage `implementation-intent` first. Use its returned hash as `iac-binding.intentHash`, then stage the binding and
49
- environment inputs. Complete the plan once through `apex/completeTask` with all three artifacts in `outputs`; do
50
- not submit a single-output completion.
49
+ 5. Complete plans through `apex/planComplete` with the implementation intent, binding without `intentHash`, and
50
+ environment inputs. The kernel derives the canonical intent hash and atomically validates all three outputs. Do not
51
+ call `apex/completeTask` with a partial plan bundle or a placeholder `intentHash`.
51
52
  6. APEX materializes a read-only Gate 3 package at `agent-output/<project>/<run>/plan/`. Report
52
53
  `implementation-plan.md`, `iac-binding.md`, `environment-inputs.md`, and `challenger-findings.md` for human review.
53
- 7. When the kernel issues `plan-review`, delegate the exact task to `APEX Reviewer`. Present findings and use targeted
54
- follow-ups for decisions the user elects to revise. Gate 3 remains a human terminal ceremony.
55
- 8. Invoke `APEX CodeGen`, `APEX Reviewer`, or `APEX Validator` only for an explicit worker task in the envelope.
54
+ 7. When the kernel issues `plan-review`, delegate the exact task to `APEX Reviewer`. Present findings in one native
55
+ decision panel and submit permitted decisions through `apex/reviewDecide`.
56
+ 8. Ask one explicit Proceed/Revise question after review. Only after Proceed, call `apex/gateDecide` for Gate 3 with
57
+ `confirm: true`, then use the Operations handoff.
58
+ 9. Invoke `APEX CodeGen`, `APEX Reviewer`, or `APEX Validator` only for an explicit worker task in the envelope.
56
59
 
57
60
  Read `.github/skills/apex-planning/SKILL.md` when planning guidance is needed.
58
61
  Load the codegen skill only in a CodeGen worker context.
@@ -12,8 +12,9 @@ tools:
12
12
  - apex/nextTask
13
13
  - apex/recordInput
14
14
  - apex/taskContext
15
- - apex/stageArtifact
16
- - apex/completeTask
15
+ - apex/requirementsComplete
16
+ - apex/reviewDecide
17
+ - apex/gateDecide
17
18
  - azure-resource-manager-mcp/get_retail_prices
18
19
  - azure-resource-manager-mcp/query_costs
19
20
  - azure-resource-manager-mcp/query_aks_costs
@@ -39,12 +40,16 @@ candidate Azure services without deciding architecture, and produces a human-rev
39
40
 
40
41
  # Success criteria
41
42
 
42
- 1. Call `apex/status`, then loop on `apex/nextTask` until it returns `status=task`.
43
+ 1. Extract facts already supplied in the user's opening description. Call `apex/status`, then loop on `apex/nextTask`
44
+ until it returns `status=task`. Present matching supplied facts as recommended confirmations; do not make the user
45
+ retype them and do not record them before confirmation.
43
46
  2. For every `status=needs_input`, do not call `apex/taskContext`. Use earlier recorded answers to frame the returned
44
47
  questions, identify contradictions, and explain the consequence of material choices. Ask every returned question,
45
48
  batching independent questions through the active client mechanism. Render `options` as native single-select or
46
- multi-select controls without adding or reordering kernel options. For `data-classification` and `compliance`, convert
47
- selections to their required typed value. Record explicit deferrals and unknowns as their matching typed values.
49
+ multi-select controls without adding or reordering kernel options. When a question includes `recommendation`, mark
50
+ its matching option or options as recommended and show the rationale; never record it until the user confirms or
51
+ overrides it. For `data-classification` and `compliance`, convert selections to their required typed value. Record
52
+ explicit deferrals and unknowns as their matching typed values.
48
53
  3. Treat Azure services as candidates: recommend viable compute, data, integration, identity, and observability options
49
54
  with a concise fit and trade-off rationale, but never record a service or SKU as an Architecture decision. Capture
50
55
  user SKU constraints or an explicit no-preference position; Architecture owns final service and SKU selection.
@@ -56,13 +61,19 @@ candidate Azure services without deciding architecture, and produces a human-rev
56
61
  required fields. Populate the typed review fields with business context, measurable success criteria, non-functional
57
62
  requirements, security/compliance posture, budget/operations posture, regional constraints, and candidate-service
58
63
  rationale for Architecture.
59
- 7. Stage and submit the typed requirements artifact. APEX materializes read-only review projections at
60
- `agent-output/<project>/<run>/`; report those paths and their artifact hash, but do not edit the generated files.
61
- 8. When the kernel issues `requirements-review`, delegate the exact task to `APEX Reviewer`. Present every returned
62
- completeness or contradiction finding, then use targeted follow-up questions only for findings the user chooses to
63
- resolve. Findings must be remediated, accepted with rationale, or explicitly deferred before Gate 1 can open.
64
- 9. When review completes, direct the user to review `01-requirements.md`, `README.md`, `service-recommendations.md`,
65
- `sku-preferences.md`, and `challenger-findings.md`. Gate 1 remains a human terminal ceremony; never approve it.
64
+ 7. Submit the typed requirements artifact through `apex/requirementsComplete`. APEX materializes read-only review
65
+ projections at `agent-output/<project>/<run>/`; report those paths and their artifact hash, but do not edit the
66
+ generated files.
67
+ 8. Immediately call `apex/nextTask` after submitting requirements. In VS Code, when it returns the
68
+ `requirements-review` task, invoke `APEX Reviewer` through the `agent` tool with exactly that task context; do not
69
+ wait for the user to request the challenge. In a client without the Reviewer worker, report the exact pending review
70
+ task and do not claim the challenge ran.
71
+ 9. When `apex/nextTask` returns `needs_review`, present every finding in one native decision panel. Submit the complete
72
+ decision set through `apex/reviewDecide`. A revision must produce a new Requirements artifact and fresh review;
73
+ risk acceptance requires the rationale and future expiry requested by APEX.
74
+ 10. When review completes, direct the user to review `01-requirements.md`, `README.md`, `service-recommendations.md`,
75
+ `sku-preferences.md`, and `challenger-findings.md`. Ask one explicit Proceed/Revise question. Only after the user
76
+ chooses Proceed, call `apex/gateDecide` for Gate 1 with `confirm: true`, then use the Architecture handoff.
66
77
 
67
78
  Do not read repository files to discover artifact schemas; `apex/taskContext` is the complete output contract for this
68
79
  MCP-only role. Read `.github/skills/apex-azure-defaults/SKILL.md` only when the kernel asks for a region, compliance,
@@ -13,6 +13,7 @@ tools:
13
13
  - apex/projectList
14
14
  - apex/projectUse
15
15
  - apex/projectDelete
16
+ - apex/gateDecide
16
17
  - azure-resource-manager-mcp/get_retail_prices
17
18
  - azure-resource-manager-mcp/query_costs
18
19
  - azure-resource-manager-mcp/query_aks_costs
@@ -69,6 +70,9 @@ Coordinate APEX without authoring project artifacts or inferring workflow state.
69
70
  `apex gate decide --gate <N> --decision <approved|rejected> --actor <USER_ID> --json`. At Gate 4, also require
70
71
  review of the exact preview, target, expiry, and approval recipient before directing
71
72
  `apex gate decide --gate 4 --decision <approved|rejected> --actor <USER_ID> --recipient <RECIPIENT_ID> --json`.
73
+ 9. When the user explicitly says `approve Gate 1`, `approve Gate 2`, `approve Gate 3`, or the equivalent rejection,
74
+ call `apex/gateDecide` with that gate, decision, and `confirm: true`. The operation derives the actor from the local
75
+ OS username. Do not use it for Gate 4, and do not infer confirmation from an ambiguous message.
72
76
 
73
77
  Use the active client projection's question mechanism only for project creation or kernel-owned routing choices. Read
74
78
  `.github/skills/apex-workflow/SKILL.md` only when status, resume, or project selection needs more guidance.
@@ -11,16 +11,23 @@
11
11
  "capabilityStatus",
12
12
  "nextTask",
13
13
  "taskContext",
14
+ "readTaskInput",
14
15
  "recordInput",
15
16
  "projectCreate",
16
17
  "projectList",
17
18
  "projectUse",
18
19
  "projectDelete",
20
+ "gateDecide",
21
+ "reviewDecide",
19
22
  "stageArtifact",
20
23
  "stageFile",
21
24
  "generateIac",
22
25
  "validateTask",
23
26
  "completeTask",
27
+ "requirementsComplete",
28
+ "architectureComplete",
29
+ "reviewComplete",
30
+ "planComplete",
24
31
  "preview",
25
32
  "reconcile",
26
33
  "inventory",
@@ -24,10 +24,13 @@ Use this skill only for an active requirements task.
24
24
  4. Submit that request only through `apex/recordInput`, preserving its request ID, expected journal head, and owner
25
25
  epoch.
26
26
  5. Call `apex/nextTask` again and repeat until it returns a requirements `task`; only then read `apex/taskContext`.
27
- 6. Treat the service-preferences round as a preference boundary. Capture retained, prohibited, and preferred services,
28
- SKU preferences, and environment overrides without selecting architecture, SKUs, or implementation details.
29
- 7. Stage the task-context-defined requirements output, complete the requirements task, and wait for the required review
30
- result before reporting that Gate 1 is ready. Only the kernel opens or evaluates Gate 1.
27
+ 6. Treat service questions in the workload panel as a preference boundary. Present the kernel recommendation, then
28
+ capture retained, prohibited, and preferred services, SKU preferences, and environment overrides without selecting
29
+ architecture, SKUs, or implementation details.
30
+ 7. Submit the task-context-defined output through `apex/requirementsComplete`, invoke the required Reviewer, and handle
31
+ `needs_review` through one native findings panel and `apex/reviewDecide`.
32
+ 8. After a clean or fully dispositioned review, ask for explicit Gate 1 approval. Call `apex/gateDecide` only after the
33
+ user chooses Proceed, then continue to Architecture in the same turn.
31
34
 
32
35
  The kernel catalog and its versioned input contracts are authoritative. Do not choose architecture, SKUs, or
33
36
  implementation details while gathering requirements.
@@ -12,8 +12,9 @@ tools:
12
12
  - apex/nextTask
13
13
  - apex/recordInput
14
14
  - apex/taskContext
15
- - apex/stageArtifact
16
- - apex/completeTask
15
+ - apex/architectureComplete
16
+ - apex/reviewDecide
17
+ - apex/gateDecide
17
18
  - azure-resource-manager-mcp/get_retail_prices
18
19
  - azure-resource-manager-mcp/query_costs
19
20
  - azure-resource-manager-mcp/query_aks_costs
@@ -58,14 +59,14 @@ Gate 2 package without bypassing the kernel's decision or approval boundaries.
58
59
  user confirmation before recording the final Architecture decision.
59
60
  5. Use current ARM MCP pricing evidence for every cost line item. If current evidence is unavailable, record the
60
61
  unavailability and block the cost posture from being treated as confirmed; never invent prices or currency values.
61
- 6. Stage `architecture`, `cost-estimate`, and `workload-decision-manifest`, then submit all three once through
62
- `apex/completeTask` with `outputs`. Do not submit a single-output completion.
62
+ 6. Submit `architecture`, `cost-estimate`, and `workload-decision-manifest` atomically through
63
+ `apex/architectureComplete`.
63
64
  7. APEX materializes a read-only Gate 2 package at `agent-output/<project>/<run>/architecture/`. Report the package,
64
65
  including `architecture-assessment.md`, `cost-estimate.md`, `sku-comparison.md`, and `challenger-findings.md`.
65
- 8. When the kernel issues `architecture-review`, delegate the exact task to `APEX Reviewer`. Present every challenger
66
- finding and use targeted decision follow-ups for findings the user chooses to resolve. Findings must be remediated,
67
- accepted with rationale, or explicitly deferred before Gate 2 can open.
68
- 9. Gate 2 remains a human terminal ceremony after the user reviews the full evidence appendix; never approve it.
66
+ 8. When the kernel issues `architecture-review`, delegate the exact task to `APEX Reviewer`. Present returned findings
67
+ in one native decision panel and submit permitted decisions through `apex/reviewDecide`.
68
+ 9. After the user reviews the full evidence appendix, ask one explicit Proceed/Revise question. Only after Proceed,
69
+ call `apex/gateDecide` for Gate 2 with `confirm: true`, then use the Planning handoff.
69
70
 
70
71
  Read `.github/skills/apex-architecture/SKILL.md` when architecture guidance is needed.
71
72
  Read `.github/skills/apex-azure-defaults/SKILL.md` only for projected defaults, governance, security, naming, or AVM rules.
@@ -11,8 +11,9 @@ tools:
11
11
  - apex/status
12
12
  - apex/nextTask
13
13
  - apex/taskContext
14
- - apex/stageArtifact
15
- - apex/completeTask
14
+ - apex/planComplete
15
+ - apex/reviewDecide
16
+ - apex/gateDecide
16
17
  - azure-resource-manager-mcp/get_retail_prices
17
18
  - azure-resource-manager-mcp/query_costs
18
19
  - azure-resource-manager-mcp/query_aks_costs
@@ -55,14 +56,16 @@ Gate 3.
55
56
  secret reference must include `kind`, `provider`, and `reference`.
56
57
  4. Explain logical resources, dependencies, controls, implementation bindings, environment inputs, and rollback or
57
58
  validation risks. Ask targeted follow-ups only for unresolved user-owned choices; never infer secret values.
58
- 5. Stage `implementation-intent` first. Use its returned hash as `iac-binding.intentHash`, then stage the binding and
59
- environment inputs. Complete the plan once through `apex/completeTask` with all three artifacts in `outputs`; do
60
- not submit a single-output completion.
59
+ 5. Complete plans through `apex/planComplete` with the implementation intent, binding without `intentHash`, and
60
+ environment inputs. The kernel derives the canonical intent hash and atomically validates all three outputs. Do not
61
+ call `apex/completeTask` with a partial plan bundle or a placeholder `intentHash`.
61
62
  6. APEX materializes a read-only Gate 3 package at `agent-output/<project>/<run>/plan/`. Report
62
63
  `implementation-plan.md`, `iac-binding.md`, `environment-inputs.md`, and `challenger-findings.md` for human review.
63
- 7. When the kernel issues `plan-review`, delegate the exact task to `APEX Reviewer`. Present findings and use targeted
64
- follow-ups for decisions the user elects to revise. Gate 3 remains a human terminal ceremony.
65
- 8. Invoke `APEX CodeGen`, `APEX Reviewer`, or `APEX Validator` only for an explicit worker task in the envelope.
64
+ 7. When the kernel issues `plan-review`, delegate the exact task to `APEX Reviewer`. Present findings in one native
65
+ decision panel and submit permitted decisions through `apex/reviewDecide`.
66
+ 8. Ask one explicit Proceed/Revise question after review. Only after Proceed, call `apex/gateDecide` for Gate 3 with
67
+ `confirm: true`, then use the Operations handoff.
68
+ 9. Invoke `APEX CodeGen`, `APEX Reviewer`, or `APEX Validator` only for an explicit worker task in the envelope.
66
69
 
67
70
  Read `.github/skills/apex-planning/SKILL.md` when planning guidance is needed.
68
71
  Load the codegen skill only in a CodeGen worker context.
@@ -12,8 +12,9 @@ tools:
12
12
  - apex/nextTask
13
13
  - apex/recordInput
14
14
  - apex/taskContext
15
- - apex/stageArtifact
16
- - apex/completeTask
15
+ - apex/requirementsComplete
16
+ - apex/reviewDecide
17
+ - apex/gateDecide
17
18
  - azure-resource-manager-mcp/get_retail_prices
18
19
  - azure-resource-manager-mcp/query_costs
19
20
  - azure-resource-manager-mcp/query_aks_costs
@@ -48,12 +49,16 @@ candidate Azure services without deciding architecture, and produces a human-rev
48
49
 
49
50
  # Success criteria
50
51
 
51
- 1. Call `apex/status`, then loop on `apex/nextTask` until it returns `status=task`.
52
+ 1. Extract facts already supplied in the user's opening description. Call `apex/status`, then loop on `apex/nextTask`
53
+ until it returns `status=task`. Present matching supplied facts as recommended confirmations; do not make the user
54
+ retype them and do not record them before confirmation.
52
55
  2. For every `status=needs_input`, do not call `apex/taskContext`. Use earlier recorded answers to frame the returned
53
56
  questions, identify contradictions, and explain the consequence of material choices. Ask every returned question,
54
57
  batching independent questions through the active client mechanism. Render `options` as native single-select or
55
- multi-select controls without adding or reordering kernel options. For `data-classification` and `compliance`, convert
56
- selections to their required typed value. Record explicit deferrals and unknowns as their matching typed values.
58
+ multi-select controls without adding or reordering kernel options. When a question includes `recommendation`, mark
59
+ its matching option or options as recommended and show the rationale; never record it until the user confirms or
60
+ overrides it. For `data-classification` and `compliance`, convert selections to their required typed value. Record
61
+ explicit deferrals and unknowns as their matching typed values.
57
62
  3. Treat Azure services as candidates: recommend viable compute, data, integration, identity, and observability options
58
63
  with a concise fit and trade-off rationale, but never record a service or SKU as an Architecture decision. Capture
59
64
  user SKU constraints or an explicit no-preference position; Architecture owns final service and SKU selection.
@@ -65,13 +70,19 @@ candidate Azure services without deciding architecture, and produces a human-rev
65
70
  required fields. Populate the typed review fields with business context, measurable success criteria, non-functional
66
71
  requirements, security/compliance posture, budget/operations posture, regional constraints, and candidate-service
67
72
  rationale for Architecture.
68
- 7. Stage and submit the typed requirements artifact. APEX materializes read-only review projections at
69
- `agent-output/<project>/<run>/`; report those paths and their artifact hash, but do not edit the generated files.
70
- 8. When the kernel issues `requirements-review`, delegate the exact task to `APEX Reviewer`. Present every returned
71
- completeness or contradiction finding, then use targeted follow-up questions only for findings the user chooses to
72
- resolve. Findings must be remediated, accepted with rationale, or explicitly deferred before Gate 1 can open.
73
- 9. When review completes, direct the user to review `01-requirements.md`, `README.md`, `service-recommendations.md`,
74
- `sku-preferences.md`, and `challenger-findings.md`. Gate 1 remains a human terminal ceremony; never approve it.
73
+ 7. Submit the typed requirements artifact through `apex/requirementsComplete`. APEX materializes read-only review
74
+ projections at `agent-output/<project>/<run>/`; report those paths and their artifact hash, but do not edit the
75
+ generated files.
76
+ 8. Immediately call `apex/nextTask` after submitting requirements. In VS Code, when it returns the
77
+ `requirements-review` task, invoke `APEX Reviewer` through the `agent` tool with exactly that task context; do not
78
+ wait for the user to request the challenge. In a client without the Reviewer worker, report the exact pending review
79
+ task and do not claim the challenge ran.
80
+ 9. When `apex/nextTask` returns `needs_review`, present every finding in one native decision panel. Submit the complete
81
+ decision set through `apex/reviewDecide`. A revision must produce a new Requirements artifact and fresh review;
82
+ risk acceptance requires the rationale and future expiry requested by APEX.
83
+ 10. When review completes, direct the user to review `01-requirements.md`, `README.md`, `service-recommendations.md`,
84
+ `sku-preferences.md`, and `challenger-findings.md`. Ask one explicit Proceed/Revise question. Only after the user
85
+ chooses Proceed, call `apex/gateDecide` for Gate 1 with `confirm: true`, then use the Architecture handoff.
75
86
 
76
87
  Do not read repository files to discover artifact schemas; `apex/taskContext` is the complete output contract for this
77
88
  MCP-only role. Read `.github/skills/apex-azure-defaults/SKILL.md` only when the kernel asks for a region, compliance,
@@ -7,7 +7,8 @@ model:
7
7
  user-invocable: false
8
8
  tools:
9
9
  - apex/taskContext
10
- - apex/completeTask
10
+ - apex/readTaskInput
11
+ - apex/reviewComplete
11
12
  - azure-resource-manager-mcp/get_retail_prices
12
13
  - azure-resource-manager-mcp/query_costs
13
14
  - azure-resource-manager-mcp/query_aks_costs
@@ -31,16 +32,19 @@ resolve, accept with rationale, or defer through the owning interactive stage.
31
32
 
32
33
  # Success criteria
33
34
 
34
- 1. Call `apex/taskContext` once.
35
+ 1. Call `apex/taskContext` once. If its content is externalized or incomplete, call `apex/readTaskInput` with the
36
+ supplied task ID, then continue from each returned `nextOffset` until the bounded review subject is complete.
35
37
  2. Evaluate only supplied content, references, and review criteria. Test completeness, contradictions, traceability,
36
38
  evidence freshness, security/governance, reliability/operations, cost/scale, and stage-specific acceptance criteria
37
39
  when those lenses are present in the task.
38
- 3. Return one typed finding per issue with severity, evidence references, a concise impact, and a concrete remediation.
39
- Record no finding when the supplied evidence supports the criterion; do not manufacture findings to satisfy a quota.
40
+ 3. Return one typed finding per issue with `id`, `severity`, `title`, and `detail`. Put the challenged criterion,
41
+ evidence, impact, and concrete remediation in `detail`. Record no finding when the supplied evidence supports the
42
+ criterion; do not manufacture findings to satisfy a quota.
40
43
  4. The kernel materializes a read-only summary at `agent-output/<project>/<run>/reviews/<subject>-findings.md`.
41
44
  The owning interactive agent handles targeted follow-up and human dispositions; the Reviewer does not ask users or
42
45
  apply fixes.
43
- 5. Return evidence-linked findings through `apex/completeTask`.
46
+ 5. Return findings through `apex/reviewComplete`; APEX derives subject identity, hash, timestamp, disposition, and
47
+ evidence binding.
44
48
 
45
49
  # Constraints
46
50
 
@@ -14,6 +14,7 @@ tools:
14
14
  - apex/projectList
15
15
  - apex/projectUse
16
16
  - apex/projectDelete
17
+ - apex/gateDecide
17
18
  - azure-resource-manager-mcp/get_retail_prices
18
19
  - azure-resource-manager-mcp/query_costs
19
20
  - azure-resource-manager-mcp/query_aks_costs
@@ -88,6 +89,9 @@ Coordinate APEX without authoring project artifacts or inferring workflow state.
88
89
  `apex gate decide --gate <N> --decision <approved|rejected> --actor <USER_ID> --json`. At Gate 4, also require
89
90
  review of the exact preview, target, expiry, and approval recipient before directing
90
91
  `apex gate decide --gate 4 --decision <approved|rejected> --actor <USER_ID> --recipient <RECIPIENT_ID> --json`.
92
+ 9. When the user explicitly says `approve Gate 1`, `approve Gate 2`, `approve Gate 3`, or the equivalent rejection,
93
+ call `apex/gateDecide` with that gate, decision, and `confirm: true`. The operation derives the actor from the local
94
+ OS username. Do not use it for Gate 4, and do not infer confirmation from an ambiguous message.
91
95
 
92
96
  Use the active client projection's question mechanism only for project creation or kernel-owned routing choices. Read
93
97
  `.github/skills/apex-workflow/SKILL.md` only when status, resume, or project selection needs more guidance.
@@ -24,10 +24,13 @@ Use this skill only for an active requirements task.
24
24
  4. Submit that request only through `apex/recordInput`, preserving its request ID, expected journal head, and owner
25
25
  epoch.
26
26
  5. Call `apex/nextTask` again and repeat until it returns a requirements `task`; only then read `apex/taskContext`.
27
- 6. Treat the service-preferences round as a preference boundary. Capture retained, prohibited, and preferred services,
28
- SKU preferences, and environment overrides without selecting architecture, SKUs, or implementation details.
29
- 7. Stage the task-context-defined requirements output, complete the requirements task, and wait for the required review
30
- result before reporting that Gate 1 is ready. Only the kernel opens or evaluates Gate 1.
27
+ 6. Treat service questions in the workload panel as a preference boundary. Present the kernel recommendation, then
28
+ capture retained, prohibited, and preferred services, SKU preferences, and environment overrides without selecting
29
+ architecture, SKUs, or implementation details.
30
+ 7. Submit the task-context-defined output through `apex/requirementsComplete`, invoke the required Reviewer, and handle
31
+ `needs_review` through one native findings panel and `apex/reviewDecide`.
32
+ 8. After a clean or fully dispositioned review, ask for explicit Gate 1 approval. Call `apex/gateDecide` only after the
33
+ user chooses Proceed, then continue to Architecture in the same turn.
31
34
 
32
35
  The kernel catalog and its versioned input contracts are authoritative. Do not choose architecture, SKUs, or
33
36
  implementation details while gathering requirements.
@@ -1,31 +1,31 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "bundleVersion": "0.10.0-next.3",
3
+ "bundleVersion": "0.10.0-next.5",
4
4
  "capabilityProtocolVersion": "1.0.0",
5
5
  "components": {
6
6
  "cli": {
7
7
  "source": "local",
8
- "version": "0.10.0-next.3"
8
+ "version": "0.10.0-next.5"
9
9
  },
10
10
  "contracts": {
11
11
  "source": "local",
12
- "version": "0.10.0-next.3"
12
+ "version": "0.10.0-next.5"
13
13
  },
14
14
  "kernel": {
15
15
  "source": "local",
16
- "version": "0.10.0-next.3"
16
+ "version": "0.10.0-next.5"
17
17
  },
18
18
  "capabilities": {
19
19
  "source": "local",
20
- "version": "0.10.0-next.3"
20
+ "version": "0.10.0-next.5"
21
21
  },
22
22
  "renderers": {
23
23
  "source": "local",
24
- "version": "0.10.0-next.3"
24
+ "version": "0.10.0-next.5"
25
25
  },
26
26
  "customizationBundle": {
27
27
  "source": "local",
28
- "version": "0.10.0-next.3",
28
+ "version": "0.10.0-next.5",
29
29
  "manifest": "@apexops/cli/assets/customizations/manifest.json",
30
30
  "assetManifest": "@apexops/cli/assets/manifest.json",
31
31
  "compositionId": "apex-managed-workspace"
@@ -11,8 +11,9 @@ tools:
11
11
  - apex/nextTask
12
12
  - apex/recordInput
13
13
  - apex/taskContext
14
- - apex/stageArtifact
15
- - apex/completeTask
14
+ - apex/architectureComplete
15
+ - apex/reviewDecide
16
+ - apex/gateDecide
16
17
  - azure-resource-manager-mcp/get_retail_prices
17
18
  - azure-resource-manager-mcp/query_costs
18
19
  - azure-resource-manager-mcp/query_aks_costs
@@ -51,14 +52,14 @@ Gate 2 package without bypassing the kernel's decision or approval boundaries.
51
52
  user confirmation before recording the final Architecture decision.
52
53
  5. Use current ARM MCP pricing evidence for every cost line item. If current evidence is unavailable, record the
53
54
  unavailability and block the cost posture from being treated as confirmed; never invent prices or currency values.
54
- 6. Stage `architecture`, `cost-estimate`, and `workload-decision-manifest`, then submit all three once through
55
- `apex/completeTask` with `outputs`. Do not submit a single-output completion.
55
+ 6. Submit `architecture`, `cost-estimate`, and `workload-decision-manifest` atomically through
56
+ `apex/architectureComplete`.
56
57
  7. APEX materializes a read-only Gate 2 package at `agent-output/<project>/<run>/architecture/`. Report the package,
57
58
  including `architecture-assessment.md`, `cost-estimate.md`, `sku-comparison.md`, and `challenger-findings.md`.
58
- 8. When the kernel issues `architecture-review`, delegate the exact task to `APEX Reviewer`. Present every challenger
59
- finding and use targeted decision follow-ups for findings the user chooses to resolve. Findings must be remediated,
60
- accepted with rationale, or explicitly deferred before Gate 2 can open.
61
- 9. Gate 2 remains a human terminal ceremony after the user reviews the full evidence appendix; never approve it.
59
+ 8. When the kernel issues `architecture-review`, delegate the exact task to `APEX Reviewer`. Present returned findings
60
+ in one native decision panel and submit permitted decisions through `apex/reviewDecide`.
61
+ 9. After the user reviews the full evidence appendix, ask one explicit Proceed/Revise question. Only after Proceed,
62
+ call `apex/gateDecide` for Gate 2 with `confirm: true`, then use the Planning handoff.
62
63
 
63
64
  Read `.github/skills/apex-architecture/SKILL.md` when architecture guidance is needed.
64
65
  Read `.github/skills/apex-azure-defaults/SKILL.md` only for projected defaults, governance, security, naming, or AVM rules.
@@ -10,8 +10,9 @@ tools:
10
10
  - apex/status
11
11
  - apex/nextTask
12
12
  - apex/taskContext
13
- - apex/stageArtifact
14
- - apex/completeTask
13
+ - apex/planComplete
14
+ - apex/reviewDecide
15
+ - apex/gateDecide
15
16
  - azure-resource-manager-mcp/get_retail_prices
16
17
  - azure-resource-manager-mcp/query_costs
17
18
  - azure-resource-manager-mcp/query_aks_costs
@@ -48,14 +49,16 @@ Gate 3.
48
49
  secret reference must include `kind`, `provider`, and `reference`.
49
50
  4. Explain logical resources, dependencies, controls, implementation bindings, environment inputs, and rollback or
50
51
  validation risks. Ask targeted follow-ups only for unresolved user-owned choices; never infer secret values.
51
- 5. Stage `implementation-intent` first. Use its returned hash as `iac-binding.intentHash`, then stage the binding and
52
- environment inputs. Complete the plan once through `apex/completeTask` with all three artifacts in `outputs`; do
53
- not submit a single-output completion.
52
+ 5. Complete plans through `apex/planComplete` with the implementation intent, binding without `intentHash`, and
53
+ environment inputs. The kernel derives the canonical intent hash and atomically validates all three outputs. Do not
54
+ call `apex/completeTask` with a partial plan bundle or a placeholder `intentHash`.
54
55
  6. APEX materializes a read-only Gate 3 package at `agent-output/<project>/<run>/plan/`. Report
55
56
  `implementation-plan.md`, `iac-binding.md`, `environment-inputs.md`, and `challenger-findings.md` for human review.
56
- 7. When the kernel issues `plan-review`, delegate the exact task to `APEX Reviewer`. Present findings and use targeted
57
- follow-ups for decisions the user elects to revise. Gate 3 remains a human terminal ceremony.
58
- 8. Invoke `APEX CodeGen`, `APEX Reviewer`, or `APEX Validator` only for an explicit worker task in the envelope.
57
+ 7. When the kernel issues `plan-review`, delegate the exact task to `APEX Reviewer`. Present findings in one native
58
+ decision panel and submit permitted decisions through `apex/reviewDecide`.
59
+ 8. Ask one explicit Proceed/Revise question after review. Only after Proceed, call `apex/gateDecide` for Gate 3 with
60
+ `confirm: true`, then use the Operations handoff.
61
+ 9. Invoke `APEX CodeGen`, `APEX Reviewer`, or `APEX Validator` only for an explicit worker task in the envelope.
59
62
 
60
63
  Read `.github/skills/apex-planning/SKILL.md` when planning guidance is needed.
61
64
  Load the codegen skill only in a CodeGen worker context.