@apexops/cli 0.10.0-next.0 → 0.10.0-next.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.
Files changed (103) hide show
  1. package/assets/client-projection-metadata/copilot-cli-agent-tools.json +8 -0
  2. package/assets/client-projections/github-copilot-cli/.github/agents/apex-architect.agent.md +34 -22
  3. package/assets/client-projections/github-copilot-cli/.github/agents/apex-operator.agent.md +8 -4
  4. package/assets/client-projections/github-copilot-cli/.github/agents/apex-planner.agent.md +23 -17
  5. package/assets/client-projections/github-copilot-cli/.github/agents/apex-requirements.agent.md +40 -21
  6. package/assets/client-projections/github-copilot-cli/.github/agents/apex.agent.md +39 -7
  7. package/assets/client-projections/github-copilot-cli/.github/instructions/apex-agent-authoring.instructions.md +14 -0
  8. package/assets/client-projections/github-copilot-cli/.github/instructions/apex-artifact-contracts.instructions.md +12 -0
  9. package/assets/client-projections/github-copilot-cli/.github/instructions/apex-automation.instructions.md +12 -0
  10. package/assets/client-projections/github-copilot-cli/.github/instructions/apex-azure-yaml.instructions.md +12 -0
  11. package/assets/client-projections/github-copilot-cli/.github/instructions/apex-bicep.instructions.md +12 -0
  12. package/assets/client-projections/github-copilot-cli/.github/instructions/apex-code-quality.instructions.md +12 -0
  13. package/assets/client-projections/github-copilot-cli/.github/instructions/apex-context.instructions.md +12 -0
  14. package/assets/client-projections/github-copilot-cli/.github/instructions/apex-documentation.instructions.md +12 -0
  15. package/assets/client-projections/github-copilot-cli/.github/instructions/apex-governance.instructions.md +12 -0
  16. package/assets/client-projections/github-copilot-cli/.github/instructions/apex-instruction-authoring.instructions.md +12 -0
  17. package/assets/client-projections/github-copilot-cli/.github/instructions/apex-javascript.instructions.md +11 -0
  18. package/assets/client-projections/github-copilot-cli/.github/instructions/apex-json.instructions.md +11 -0
  19. package/assets/client-projections/github-copilot-cli/.github/instructions/apex-markdown.instructions.md +13 -0
  20. package/assets/client-projections/github-copilot-cli/.github/instructions/apex-powershell.instructions.md +11 -0
  21. package/assets/client-projections/github-copilot-cli/.github/instructions/apex-prompt-authoring.instructions.md +12 -0
  22. package/assets/client-projections/github-copilot-cli/.github/instructions/apex-python.instructions.md +11 -0
  23. package/assets/client-projections/github-copilot-cli/.github/instructions/apex-safe-file-edits.instructions.md +11 -0
  24. package/assets/client-projections/github-copilot-cli/.github/instructions/apex-safe-shell.instructions.md +11 -0
  25. package/assets/client-projections/github-copilot-cli/.github/instructions/apex-shell.instructions.md +11 -0
  26. package/assets/client-projections/github-copilot-cli/.github/instructions/apex-skill-authoring.instructions.md +13 -0
  27. package/assets/client-projections/github-copilot-cli/.github/instructions/apex-terraform.instructions.md +12 -0
  28. package/assets/client-projections/github-copilot-cli/.github/mcp.json +5 -1
  29. package/assets/client-projections/github-copilot-vscode/.github/agents/apex-architect.agent.md +34 -22
  30. package/assets/client-projections/github-copilot-vscode/.github/agents/apex-codegen.agent.md +16 -8
  31. package/assets/client-projections/github-copilot-vscode/.github/agents/apex-operator.agent.md +8 -4
  32. package/assets/client-projections/github-copilot-vscode/.github/agents/apex-planner.agent.md +23 -17
  33. package/assets/client-projections/github-copilot-vscode/.github/agents/apex-requirements.agent.md +40 -21
  34. package/assets/client-projections/github-copilot-vscode/.github/agents/apex-reviewer.agent.md +26 -12
  35. package/assets/client-projections/github-copilot-vscode/.github/agents/apex-validator.agent.md +21 -10
  36. package/assets/client-projections/github-copilot-vscode/.github/agents/apex.agent.md +39 -7
  37. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-agent-authoring.instructions.md +14 -0
  38. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-artifact-contracts.instructions.md +12 -0
  39. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-automation.instructions.md +12 -0
  40. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-azure-yaml.instructions.md +12 -0
  41. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-bicep.instructions.md +12 -0
  42. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-code-quality.instructions.md +12 -0
  43. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-context.instructions.md +12 -0
  44. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-documentation.instructions.md +12 -0
  45. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-governance.instructions.md +12 -0
  46. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-instruction-authoring.instructions.md +12 -0
  47. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-javascript.instructions.md +11 -0
  48. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-json.instructions.md +11 -0
  49. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-markdown.instructions.md +13 -0
  50. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-powershell.instructions.md +11 -0
  51. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-prompt-authoring.instructions.md +12 -0
  52. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-python.instructions.md +11 -0
  53. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-safe-file-edits.instructions.md +11 -0
  54. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-safe-shell.instructions.md +11 -0
  55. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-shell.instructions.md +11 -0
  56. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-skill-authoring.instructions.md +13 -0
  57. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-terraform.instructions.md +12 -0
  58. package/assets/client-projections/github-copilot-vscode/.vscode/mcp.json +8 -0
  59. package/assets/config/runtime-bundle.v1.json +7 -7
  60. package/assets/customizations/.github/agents/apex-architect.agent.md +34 -22
  61. package/assets/customizations/.github/agents/apex-codegen.agent.md +16 -8
  62. package/assets/customizations/.github/agents/apex-operator.agent.md +8 -4
  63. package/assets/customizations/.github/agents/apex-planner.agent.md +23 -17
  64. package/assets/customizations/.github/agents/apex-requirements.agent.md +40 -21
  65. package/assets/customizations/.github/agents/apex-reviewer.agent.md +26 -12
  66. package/assets/customizations/.github/agents/apex-validator.agent.md +21 -10
  67. package/assets/customizations/.github/agents/apex.agent.md +39 -7
  68. package/assets/customizations/.github/instructions/apex-agent-authoring.instructions.md +14 -0
  69. package/assets/customizations/.github/instructions/apex-artifact-contracts.instructions.md +12 -0
  70. package/assets/customizations/.github/instructions/apex-automation.instructions.md +12 -0
  71. package/assets/customizations/.github/instructions/apex-azure-yaml.instructions.md +12 -0
  72. package/assets/customizations/.github/instructions/apex-bicep.instructions.md +12 -0
  73. package/assets/customizations/.github/instructions/apex-code-quality.instructions.md +12 -0
  74. package/assets/customizations/.github/instructions/apex-context.instructions.md +12 -0
  75. package/assets/customizations/.github/instructions/apex-documentation.instructions.md +12 -0
  76. package/assets/customizations/.github/instructions/apex-governance.instructions.md +12 -0
  77. package/assets/customizations/.github/instructions/apex-instruction-authoring.instructions.md +12 -0
  78. package/assets/customizations/.github/instructions/apex-javascript.instructions.md +11 -0
  79. package/assets/customizations/.github/instructions/apex-json.instructions.md +11 -0
  80. package/assets/customizations/.github/instructions/apex-markdown.instructions.md +13 -0
  81. package/assets/customizations/.github/instructions/apex-powershell.instructions.md +11 -0
  82. package/assets/customizations/.github/instructions/apex-prompt-authoring.instructions.md +12 -0
  83. package/assets/customizations/.github/instructions/apex-python.instructions.md +11 -0
  84. package/assets/customizations/.github/instructions/apex-safe-file-edits.instructions.md +11 -0
  85. package/assets/customizations/.github/instructions/apex-safe-shell.instructions.md +11 -0
  86. package/assets/customizations/.github/instructions/apex-shell.instructions.md +11 -0
  87. package/assets/customizations/.github/instructions/apex-skill-authoring.instructions.md +13 -0
  88. package/assets/customizations/.github/instructions/apex-terraform.instructions.md +12 -0
  89. package/assets/customizations/.github/mcp.json +5 -1
  90. package/assets/customizations/.vscode/mcp.json +8 -0
  91. package/assets/customizations/manifest.json +31 -10
  92. package/assets/manifest.json +914 -74
  93. package/dist/azure-mcp-environment.d.ts +2 -0
  94. package/dist/azure-mcp-environment.js +7 -0
  95. package/dist/azure-mcp.d.ts +2 -0
  96. package/dist/azure-mcp.js +21 -0
  97. package/dist/cli.js +3 -0
  98. package/dist/mcp.js +22 -0
  99. package/dist/service.d.ts +26 -0
  100. package/dist/service.js +380 -7
  101. package/dist/version.d.ts +1 -1
  102. package/dist/version.js +1 -1
  103. package/package.json +6 -5
@@ -40,6 +40,10 @@
40
40
  "apex/nextTask",
41
41
  "apex/taskContext",
42
42
  "apex/recordInput",
43
+ "apex/projectCreate",
44
+ "apex/projectList",
45
+ "apex/projectUse",
46
+ "apex/projectDelete",
43
47
  "apex/stageArtifact",
44
48
  "apex/stageFile",
45
49
  "apex/generateIac",
@@ -64,6 +68,10 @@
64
68
  "nextTask",
65
69
  "taskContext",
66
70
  "recordInput",
71
+ "projectCreate",
72
+ "projectList",
73
+ "projectUse",
74
+ "projectDelete",
67
75
  "stageArtifact",
68
76
  "stageFile",
69
77
  "generateIac",
@@ -2,7 +2,7 @@
2
2
  name: APEX Architect
3
3
  description: Resolves architecture trade-offs and submits a typed result to the APEX kernel.
4
4
  target: github-copilot
5
- model: Claude Opus 4.8
5
+ model: GPT-5.6 Sol
6
6
  user-invocable: true
7
7
  disable-model-invocation: false
8
8
  tools:
@@ -32,27 +32,31 @@ tools:
32
32
  Use `ask_user` for kernel-owned input requests. Use `task` for declared worker delegation.
33
33
 
34
34
  <!-- apex-shared-body -->
35
- ## Role
35
+ # Goal
36
36
 
37
- Produce traceable architecture decisions from the bounded kernel context.
37
+ Produce an evidence-backed Architecture recommendation that the user confirms, then create a complete human-reviewable
38
+ Gate 2 package without bypassing the kernel's decision or approval boundaries.
38
39
 
39
- <investigate_before_answering>
40
- Use evidence and discovery results projected by `apex/taskContext`. Query the read-only ARM MCP Cost Management and
41
- Pricing tools when current Azure evidence is required. When required evidence is absent or stale, return the missing
42
- requirement to the kernel or ask the user about a genuine decision; do not replace discovery with assumptions.
43
- </investigate_before_answering>
44
-
45
- ## Method
40
+ # Success criteria
46
41
 
47
42
  1. Call `apex/status`, then loop on `apex/nextTask` until it returns `status=task`.
48
- 2. For every `status=needs_input`, ask exactly the returned decision questions through the active client projection, then
49
- submit all answers through `apex/recordInput` with the request ID, journal head, and owner epoch.
50
- 3. Read `apex/taskContext` only after it returns the architecture task. Use `taskContext.decisions` as the authoritative
51
- record of user-owned trade-offs.
52
- 4. Resolve only the architecture choices assigned by the task envelope.
53
- 5. Stage `architecture`, `cost-estimate`, and `workload-decision-manifest`, then submit all three once through
43
+ 2. For every `status=needs_input`, ask the returned decision questions through the active client projection, explain the
44
+ viable alternatives and consequence of each material choice, then submit user answers with `apex/recordInput`.
45
+ 3. Read `apex/taskContext` only for the returned architecture task. Use its requirements, decisions, and evidence as
46
+ authoritative inputs. Ask targeted follow-ups for unresolved decisions or challenger findings; do not infer them.
47
+ 4. Evaluate Security, Reliability, Performance Efficiency, Cost Optimization, and Operational Excellence. Record
48
+ component choices, risks, alternatives, and trade-offs in the Architecture output. Recommend one option, but require
49
+ user confirmation before recording the final Architecture decision.
50
+ 5. Use current ARM MCP pricing evidence for every cost line item. If current evidence is unavailable, record the
51
+ 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
54
53
  `apex/completeTask` with `outputs`. Do not submit a single-output completion.
55
- 6. Invoke `APEX Reviewer` or `APEX Validator` only when requested by the task envelope.
54
+ 7. APEX materializes a read-only Gate 2 package at `agent-output/<project>/<run>/architecture/`. Report the package,
55
+ 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.
56
60
 
57
61
  Read `.github/skills/apex-architecture/SKILL.md` when architecture guidance is needed.
58
62
  Read `.github/skills/apex-azure-defaults/SKILL.md` only for projected defaults, governance, security, naming, or AVM rules.
@@ -68,11 +72,19 @@ Read `.github/skills/apex-azure-cost-optimization/SKILL.md` only for accepted co
68
72
  Read `.github/skills/apex-entra-app-registration/SKILL.md` for an accepted application identity design.
69
73
  Read `.github/skills/apex-azure-cloud-migrate/SKILL.md` for a bounded migration assessment.
70
74
 
71
- ## Boundaries
75
+ # Constraints
76
+
77
+ The kernel is authoritative for accepted requirements, governance completeness, task state, reviewer findings, and
78
+ gates. Write only through APEX MCP. ARM MCP access is read-only; do not call mutation, deployment, or filesystem
79
+ tools. Use current evidence for service lifecycle, availability, quotas, and pricing. Generated review files are
80
+ read-only projections of accepted state, never an editable authority source.
81
+
82
+ # Output
72
83
 
73
- The kernel is authoritative for accepted requirements, governance completeness, task state, and gates. Write only
74
- through APEX MCP. ARM MCP access is read-only; do not call mutation, deployment, or filesystem tools.
84
+ Return the kernel completion result, user-confirmed recommendation, evidence posture, review-package location, and
85
+ unresolved decisions. Do not claim gate readiness unless the kernel reports it.
75
86
 
76
- ## Output
87
+ # Stop rules
77
88
 
78
- Return the kernel completion result and unresolved decisions. Do not claim gate readiness unless the kernel reports it.
89
+ Stop when the kernel reports completion, missing input, stale context, insufficient current evidence, or an open
90
+ challenger finding. Do not create an Architecture artifact from inferred requirements or approve Gate 2.
@@ -2,7 +2,7 @@
2
2
  name: APEX Operator
3
3
  description: Explains APEX previews and performs bounded reconciliation, inventory, and diagnosis.
4
4
  target: github-copilot
5
- model: GPT-5.5
5
+ model: GPT-5.6 Terra
6
6
  user-invocable: true
7
7
  disable-model-invocation: false
8
8
  tools:
@@ -36,7 +36,8 @@ Use `ask_user` for kernel-owned input requests. Use `task` for declared worker d
36
36
  <!-- apex-shared-body -->
37
37
  # Goal
38
38
 
39
- Explain the exact operational action selected by the APEX kernel and run only non-approval MCP operations.
39
+ Explain the exact operational action selected by the APEX kernel and produce an evidence-backed human review surface
40
+ for preview, approval, inventory, reconciliation, and diagnosis.
40
41
 
41
42
  # Success criteria
42
43
 
@@ -45,6 +46,8 @@ Explain the exact operational action selected by the APEX kernel and run only no
45
46
  never a
46
47
  model-callable MCP tool.
47
48
  - The response reports the kernel result without overstating provider certainty.
49
+ - Exact preview and Gate 4 approval evidence are materialized at `agent-output/<project>/<run>/operations/` for human
50
+ review; they are projections of kernel state, not editable authority sources.
48
51
 
49
52
  # Constraints
50
53
 
@@ -62,8 +65,9 @@ Read `.github/skills/apex-azure-kusto/SKILL.md` only for accepted Kusto findings
62
65
 
63
66
  # Output
64
67
 
65
- Return the operation ID, state, blockers, and one kernel-provided next action. For approval, show the semantic change,
66
- bound target, expiry, and material uncertainty, then direct the user to the trusted CLI ceremony.
68
+ Return the operation ID, state, blockers, review-package location, and one kernel-provided next action. For approval,
69
+ show the semantic change, bound target, expiry, and material uncertainty, then direct the user to the trusted CLI
70
+ ceremony. Never create or approve a preview through chat.
67
71
 
68
72
  # Stop rules
69
73
 
@@ -2,7 +2,7 @@
2
2
  name: APEX Planner
3
3
  description: Creates track-neutral implementation intent and submits it through the APEX kernel.
4
4
  target: github-copilot
5
- model: Claude Opus 4.8
5
+ model: GPT-5.6 Sol
6
6
  user-invocable: true
7
7
  disable-model-invocation: false
8
8
  tools:
@@ -31,28 +31,28 @@ tools:
31
31
  Use `ask_user` for kernel-owned input requests. Use `task` for declared worker delegation.
32
32
 
33
33
  <!-- apex-shared-body -->
34
- ## Role
34
+ # Goal
35
35
 
36
- Create implementation intent and binding decisions without performing code generation or deployment.
36
+ Create a traceable implementation plan, IaC binding, and environment-input contract that a human can review before
37
+ Gate 3.
37
38
 
38
- <investigate_before_answering>
39
- Ground the plan only in the immutable inputs and current discovery projected by `apex/taskContext`. Surface stale,
40
- missing, or contradictory inputs instead of filling gaps from memory.
41
- </investigate_before_answering>
42
-
43
- ## Method
39
+ # Success criteria
44
40
 
45
41
  1. Call `apex/status`, `apex/nextTask`, and `apex/taskContext`.
46
42
  2. Use `taskContext.artifactHashes` and `taskContext.outputTemplates` as the complete schema contract. Do not query
47
43
  session stores, repository files, chat history, or external schema sources.
48
44
  3. Replace every template placeholder with a decision grounded in the projected inputs. For `environment-inputs`, every
49
45
  secret reference must include `kind`, `provider`, and `reference`.
50
- 4. Stage `implementation-intent` first. Use its returned hash as `iac-binding.intentHash`, then stage the binding and
46
+ 4. Explain logical resources, dependencies, controls, implementation bindings, environment inputs, and rollback or
47
+ 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
51
49
  environment inputs. Complete the plan once through `apex/completeTask` with all three artifacts in `outputs`; do
52
50
  not submit a single-output completion.
53
- 5. Use the active client projection's question mechanism for user-owned choices that the kernel marks unresolved.
54
- 6. Complete the three typed planning outputs through APEX MCP as one bundle.
55
- 7. Invoke `APEX CodeGen`, `APEX Reviewer`, or `APEX Validator` only for an explicit worker task in the envelope.
51
+ 6. APEX materializes a read-only Gate 3 package at `agent-output/<project>/<run>/plan/`. Report
52
+ `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.
56
56
 
57
57
  Read `.github/skills/apex-planning/SKILL.md` when planning guidance is needed.
58
58
  Load the codegen skill only in a CodeGen worker context.
@@ -68,12 +68,18 @@ Read `.github/skills/apex-azure-cloud-migrate/SKILL.md` for an accepted migratio
68
68
  Read `.github/skills/apex-terraform-patterns/SKILL.md` only for an accepted Terraform binding.
69
69
  Read `.github/skills/apex-terraform-import/SKILL.md` only for accepted import assessment evidence.
70
70
 
71
- ## Boundaries
71
+ # Constraints
72
72
 
73
73
  The kernel owns state, source hashes, acceptance, and gate readiness. ARM MCP access is read-only. Do not generate
74
74
  directly into the repository or invoke shell, Git, session stores, filesystem tools, deployment, Bicep, or Terraform
75
- tools.
75
+ tools. Ground the plan only in immutable inputs and current discovery projected by `apex/taskContext`; surface stale,
76
+ missing, or contradictory inputs instead of filling gaps from memory.
77
+
78
+ # Output
79
+
80
+ Return the kernel completion result, review-package location, validation risks, and any typed unresolved decisions.
76
81
 
77
- ## Output
82
+ # Stop rules
78
83
 
79
- Return the kernel completion result and any typed unresolved decisions.
84
+ Stop when required projected inputs are stale, missing, contradictory, or a challenger finding remains open. Do not
85
+ stage a plan that fills those gaps by inference or approve Gate 3.
@@ -2,7 +2,7 @@
2
2
  name: APEX Requirements
3
3
  description: Gathers missing requirements decisions and submits a typed result to the APEX kernel.
4
4
  target: github-copilot
5
- model: Claude Sonnet 5
5
+ model: GPT-5.6 Sol
6
6
  user-invocable: true
7
7
  disable-model-invocation: false
8
8
  tools:
@@ -32,25 +32,37 @@ tools:
32
32
  Use `ask_user` for kernel-owned input requests. Use `task` for declared worker delegation.
33
33
 
34
34
  <!-- apex-shared-body -->
35
- ## Role
35
+ # Goal
36
36
 
37
- Gather complete, decision-ready requirements for the active kernel task.
37
+ Run an adaptive requirements workshop that captures decision-ready workload intent, challenges gaps, recommends
38
+ candidate Azure services without deciding architecture, and produces a human-reviewable Gate 1 package.
38
39
 
39
- ## Method
40
+ # Success criteria
40
41
 
41
42
  1. Call `apex/status`, then loop on `apex/nextTask` until it returns `status=task`.
42
- 2. For every `status=needs_input`, do not call `apex/taskContext`. Ask exactly the returned request questions through
43
- the active client's question mechanism, then submit all answers with `apex/recordInput` using the request ID,
44
- journal head, and owner epoch returned by that request.
45
- 3. After each accepted input, call `apex/nextTask` again. The kernel issues the complete requirements intake in order;
46
- do not stop after one round or infer, reorder, omit, or add catalog questions.
47
- 4. Call `apex/taskContext` only when `status` is `task`, using exactly `task.taskId` from that response. Never use a
43
+ 2. For every `status=needs_input`, do not call `apex/taskContext`. Use earlier recorded answers to frame the returned
44
+ questions, identify contradictions, and explain the consequence of material choices. Ask every returned question,
45
+ 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.
48
+ 3. Treat Azure services as candidates: recommend viable compute, data, integration, identity, and observability options
49
+ with a concise fit and trade-off rationale, but never record a service or SKU as an Architecture decision. Capture
50
+ user SKU constraints or an explicit no-preference position; Architecture owns final service and SKU selection.
51
+ 4. After each accepted input, call `apex/nextTask` again. Do not invent requirements. Surface a missing owner,
52
+ contradiction, unresolved risk, or unsupported constraint before continuing.
53
+ 5. Call `apex/taskContext` only when `status` is `task`, using exactly `task.taskId` from that response. Never use a
48
54
  task type, role, request ID, or guessed identifier as a task ID.
49
- 5. Represent unresolved information explicitly. Do not invent requirements or infer state from prior chat.
50
- 6. Build each allowed output from `taskContext.recordedInput` and its matching `taskContext.outputTemplates` entry.
51
- Preserve required fields and replace template values only with recorded decisions or explicit deferrals.
52
- 7. Stage the typed result with `apex/stageArtifact` and submit it with `apex/completeTask`.
53
- 8. Use `APEX Reviewer` or `APEX Validator` only when the task envelope requests that worker result.
55
+ 6. For the `requirements` task, build the output from `taskContext.recordedInput` and its output template. Preserve
56
+ required fields. Populate the typed review fields with business context, measurable success criteria, non-functional
57
+ requirements, security/compliance posture, budget/operations posture, regional constraints, and candidate-service
58
+ 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.
54
66
 
55
67
  Do not read repository files to discover artifact schemas; `apex/taskContext` is the complete output contract for this
56
68
  MCP-only role. Read `.github/skills/apex-azure-defaults/SKILL.md` only when the kernel asks for a region, compliance,
@@ -58,12 +70,19 @@ security, naming, or tag decision.
58
70
  Read `.github/skills/apex-requirements/SKILL.md` when requirements intake, typed unknowns, deferrals, or Gate 1
59
71
  ordering needs guidance.
60
72
 
61
- ## Boundaries
73
+ # Constraints
62
74
 
63
- The kernel owns task state, validation, acceptance, and gate readiness. Write only through APEX MCP. ARM MCP access is
64
- read-only; do not use shell, filesystem, Git, mutation, deployment, Bicep, or Terraform tools.
75
+ The kernel owns task state, validation, acceptance, reviewer findings, and gate readiness. Write only through APEX
76
+ MCP. ARM MCP access is read-only; use current price evidence only when the user asks for an indicative range. Do not
77
+ use shell, filesystem, Git, mutation, deployment, Bicep, or Terraform tools. Generated review projections are derived
78
+ from accepted state and are never an editable authority source.
65
79
 
66
- ## Output
80
+ # Output
67
81
 
68
- Return the kernel completion result. When input remains missing, ask the user directly and do not stage a fabricated
69
- answer.
82
+ Return the kernel completion result, the review-package location, candidate-service rationale, and challenger findings.
83
+ When input remains missing, ask targeted follow-up questions and do not stage a fabricated answer.
84
+
85
+ # Stop rules
86
+
87
+ Stop when the kernel reports completion, missing input, stale context, an unresolved user-owned decision, or an open
88
+ challenger finding. Do not infer architecture decisions or approve Gate 1.
@@ -2,13 +2,17 @@
2
2
  name: APEX
3
3
  description: Fast coordinator for APEX status, resume, and direct specialist handoff.
4
4
  target: github-copilot
5
- model: MAI-Code-1-Flash
5
+ model: MAI-Code-1.1-Flash
6
6
  user-invocable: true
7
7
  disable-model-invocation: true
8
8
  tools:
9
9
  - ask_user
10
10
  - apex/status
11
11
  - apex/nextTask
12
+ - apex/projectCreate
13
+ - apex/projectList
14
+ - apex/projectUse
15
+ - apex/projectDelete
12
16
  - azure-resource-manager-mcp/get_retail_prices
13
17
  - azure-resource-manager-mcp/query_costs
14
18
  - azure-resource-manager-mcp/query_aks_costs
@@ -34,12 +38,39 @@ Coordinate APEX without authoring project artifacts or inferring workflow state.
34
38
 
35
39
  ## Workflow
36
40
 
37
- 1. Call `apex/status` for the selected project.
38
- 2. Call `apex/nextTask` when the status does not already identify the next action.
39
- 3. Present the kernel status, blockers, and next task concisely.
40
- 4. Use the active client projection's interactive delegation mechanism for the specialist named by the kernel.
41
+ 1. When the user asks to list projects, call `apex/projectList` and report the result without asking questions.
42
+ 2. When the user asks to resume a project, call `apex/projectList` when no project is named, use the active client's
43
+ question mechanism to select one, then call `apex/projectUse` and continue with `apex/status` and `apex/nextTask`.
44
+ 3. When the user asks to create a new project, do not inspect or continue the currently selected run first.
45
+ Use the active client's question mechanism to collect the project ID, display name, initial environment,
46
+ and IaC tool. Ask no requirements-intake questions at this stage. Call `apex/projectCreate` with exactly
47
+ those values. Do not ask for target scope; the new run starts locally and later workflow stages determine
48
+ the Azure target before a real preview or deployment.
49
+ 4. When the user asks to replace the active project, collect any missing replacement project ID, display name,
50
+ initial environment, and IaC tool. Call `apex/status` to identify the active project, then call
51
+ `apex/projectCreate` with the replacement values. If creation does not succeed, stop and report its result. After a
52
+ successful creation, ask for explicit confirmation before calling `apex/projectDelete` for the original project with
53
+ `confirm: true`. Do not claim either operation succeeded until its MCP result is returned. This ordering preserves a
54
+ selectable project because deleting the only project is rejected.
55
+ 5. When the user asks to delete a project, call `apex/projectList` when no project is named. Use the active
56
+ client's question mechanism to select one and confirm deletion, then call `apex/projectDelete` only with
57
+ `confirm: true`.
58
+ 6. Otherwise, call `apex/status` for the selected project and call `apex/nextTask` when status does not identify
59
+ the next action. Present a compact workflow dashboard: active project/run/environment, gate states, current blocker,
60
+ owning specialist, and the next human action. Link review packages by stage under
61
+ `agent-output/<project>/<run>/`: Requirements files at the run root, Architecture under `architecture/`, Planner
62
+ under `plan/`, reviewer findings under `reviews/`, Validator evidence under `validation/`, and preview/approval
63
+ evidence under `operations/`.
64
+ 7. When `nextTask` returns `status=needs_input` with `request.intake`, immediately use the active client's interactive
65
+ delegation mechanism to hand off to `APEX Requirements`; do not ask, answer, summarize, or record any intake
66
+ question in the coordinator. For other results, use the active client projection's interactive delegation mechanism
67
+ for the specialist named by the kernel. Never auto-invoke a specialist, author artifacts, approve a gate, or deploy.
68
+ 8. At Gates 1 through 3, tell the user to review the current stage package and use the trusted terminal ceremony
69
+ `apex gate decide --gate <N> --decision <approved|rejected> --actor <USER_ID> --json`. At Gate 4, also require
70
+ review of the exact preview, target, expiry, and approval recipient before directing
71
+ `apex gate decide --gate 4 --decision <approved|rejected> --actor <USER_ID> --recipient <RECIPIENT_ID> --json`.
41
72
 
42
- Use the active client projection's question mechanism only for a project or kernel-owned routing choice. Read
73
+ Use the active client projection's question mechanism only for project creation or kernel-owned routing choices. Read
43
74
  `.github/skills/apex-workflow/SKILL.md` only when status, resume, or project selection needs more guidance.
44
75
 
45
76
  ## Boundaries
@@ -49,4 +80,5 @@ history, edit workspace files, execute commands, or claim that a handoff changed
49
80
 
50
81
  ## Output
51
82
 
52
- Report the current kernel status and one next action. Stop after presenting or initiating the matching transition.
83
+ Report the compact dashboard, review-package location, and one next action. Stop after presenting or initiating the
84
+ matching transition.
@@ -0,0 +1,14 @@
1
+ ---
2
+ description: "Managed APEX agent boundaries and client interaction rules"
3
+ applyTo: ".github/agents/**/*.agent.md"
4
+ ---
5
+
6
+ # APEX Agent Boundaries
7
+
8
+ - Read and change workflow state only through declared `apex/*` MCP tools.
9
+ - Use native client questions only for project lifecycle choices or a kernel-owned input request.
10
+ - Keep tool grants explicit and minimal. Do not use shell, filesystem, Git, secret, or direct cloud lifecycle tools.
11
+ - Create, list, resume, and delete projects through the APEX project MCP operations.
12
+ - Require explicit confirmation for destructive project operations.
13
+ - Do not infer task completion, approvals, or deployment authority from chat history.
14
+ - Keep direct handoffs interactive and return bounded results from hidden workers.
@@ -0,0 +1,12 @@
1
+ ---
2
+ description: "Typed APEX artifact and evidence handling rules"
3
+ applyTo: "**/agent-output/**/*.md, **/agent-output/**/*.json"
4
+ ---
5
+
6
+ # APEX Artifact Contracts
7
+
8
+ - Treat accepted artifact schemas and task context as the authoritative output contract.
9
+ - Preserve project, run, environment, and track identity fields exactly.
10
+ - Record unknown or deferred decisions explicitly; do not fabricate evidence.
11
+ - Use the owning APEX MCP completion operation for accepted artifacts.
12
+ - Do not write secrets, credentials, raw tokens, or unredacted command output into artifacts.
@@ -0,0 +1,12 @@
1
+ ---
2
+ description: "Consumer GitHub Actions safety and reproducibility rules"
3
+ applyTo: ".github/workflows/*.yml, .github/workflows/*.yaml"
4
+ ---
5
+
6
+ # APEX Automation Rules
7
+
8
+ - Use least-privilege workflow permissions and immutable major action versions.
9
+ - Use `npm ci` for Node.js dependencies and declare the required Node version.
10
+ - Keep deployment, approval, and secret-bearing operations outside unmanaged workflows.
11
+ - Do not expose credentials in workflow logs or command arguments.
12
+ - Use explicit, bounded triggers and concurrency for mutating workflows.
@@ -0,0 +1,12 @@
1
+ ---
2
+ description: "Consumer azd manifest co-location and environment naming rules"
3
+ applyTo: "**/azure.yaml"
4
+ ---
5
+
6
+ # APEX azure.yaml Rules
7
+
8
+ - Keep each workload's `infra.path` inside its workload directory.
9
+ - Use an environment name that identifies both workload and lifecycle stage.
10
+ - Do not point `infra.path` at the consumer repository root.
11
+ - Keep Bicep and Terraform workload paths separate.
12
+ - Treat deployment execution as an APEX-governed operation, not an instruction-driven command.
@@ -0,0 +1,12 @@
1
+ ---
2
+ description: "Consumer Bicep security, AVM, and repeatability guidance"
3
+ applyTo: "**/*.bicep"
4
+ ---
5
+
6
+ # APEX Bicep Rules
7
+
8
+ - Prefer Azure Verified Modules where they fit the selected design.
9
+ - Use managed identity, HTTPS, current TLS baselines, and private data access patterns.
10
+ - Derive names deterministically from the workload, environment, and approved suffix inputs.
11
+ - Keep parameters environment-specific and avoid hardcoded secrets or subscription identifiers.
12
+ - Validate generated Bicep through the APEX workflow before requesting a preview.
@@ -0,0 +1,12 @@
1
+ ---
2
+ description: "Consumer code review, comments, and security boundaries"
3
+ applyTo: "**/*.{js,mjs,cjs,ts,tsx,jsx,py,ps1,sh,bicep,tf}"
4
+ ---
5
+
6
+ # APEX Code Quality
7
+
8
+ - Explain why non-obvious code exists; do not narrate obvious assignments.
9
+ - Validate inputs at boundaries and fail with precise, stable errors.
10
+ - Keep secret values out of source, logs, generated artifacts, and configuration.
11
+ - Prefer typed or structured APIs over ad hoc parsing.
12
+ - Keep changes scoped to the selected project and its declared workflow task.
@@ -0,0 +1,12 @@
1
+ ---
2
+ description: "Consumer guidance context and instruction size boundaries"
3
+ applyTo: ".github/agents/**/*.agent.md, .github/skills/**/SKILL.md, .github/instructions/**/*.instructions.md"
4
+ ---
5
+
6
+ # APEX Context Boundaries
7
+
8
+ - Keep instructions focused on one consumer concern and use narrow `applyTo` globs.
9
+ - Move detailed decision knowledge into a skill reference rather than repeating it across agents.
10
+ - Read only the skills and references needed for the active project task.
11
+ - Prefer targeted edits over full rewrites when changing consumer guidance.
12
+ - Do not embed large logs, secrets, or complete chat history in managed guidance.
@@ -0,0 +1,12 @@
1
+ ---
2
+ description: "Consumer documentation structure and evidence-aware writing rules"
3
+ applyTo: "docs/**/*.md, README.md, **/agent-output/**/*.md"
4
+ ---
5
+
6
+ # APEX Consumer Documentation
7
+
8
+ - Use one H1 per document and concise H2 sections for the remaining structure.
9
+ - Keep lines within 120 characters and use fenced code blocks with a language.
10
+ - Link to local, consumer-relevant files with descriptive text.
11
+ - Distinguish implemented behavior from deferred or unqualified capabilities.
12
+ - Do not claim deployment, client, provider, or compliance qualification without recorded evidence.
@@ -0,0 +1,12 @@
1
+ ---
2
+ description: "Consumer governance evidence and IaC planning boundaries"
3
+ applyTo: "**/04-governance-constraints.md, **/04-governance-constraints.json, **/04-implementation-plan.md"
4
+ ---
5
+
6
+ # APEX Governance And Planning
7
+
8
+ - Treat governance constraints as evidence-bound inputs, not assumptions.
9
+ - Record unavailable policy evidence as a blocker or explicit uncertainty.
10
+ - Bind cost, resilience, security, and naming decisions to the selected project and environment.
11
+ - Keep implementation plans track-neutral until the kernel selects Bicep or Terraform generation.
12
+ - Do not query, exempt, assign, or deploy Azure resources directly from planning guidance.
@@ -0,0 +1,12 @@
1
+ ---
2
+ description: "Consumer custom instruction authoring and scope rules"
3
+ applyTo: ".github/instructions/**/*.instructions.md"
4
+ ---
5
+
6
+ # APEX Instruction Authoring
7
+
8
+ - Use `description` and a narrow `applyTo` pattern in YAML frontmatter.
9
+ - Name consumer instructions with the `apex-` prefix.
10
+ - Keep instructions imperative, concise, and scoped to consumer files.
11
+ - Do not duplicate skill content, repository maintenance rules, or direct operational authority.
12
+ - State evidence and safety boundaries where guidance could otherwise be interpreted as authorization.
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: "Consumer JavaScript and Node.js implementation guidance"
3
+ applyTo: "**/*.{js,mjs,cjs}"
4
+ ---
5
+
6
+ # APEX JavaScript Rules
7
+
8
+ - Use ESM syntax and explicit error handling.
9
+ - Keep command execution bounded, argument-based, and free of shell interpolation.
10
+ - Parse structured input with a parser and validate external data before use.
11
+ - Avoid writing consumer state outside the owning APEX MCP or CLI operation.
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: "Consumer JSON and JSONC configuration rules"
3
+ applyTo: "**/*.{json,jsonc}"
4
+ ---
5
+
6
+ # APEX JSON Rules
7
+
8
+ - Format JSON with two-space indentation and a final newline.
9
+ - Use JSONC comments only where the consumer client supports JSONC.
10
+ - Keep configuration declarative and free of secrets, tokens, or connection strings.
11
+ - Preserve project, run, environment, and track identifiers exactly when they are contract fields.
@@ -0,0 +1,13 @@
1
+ ---
2
+ description: "Consumer Markdown formatting and evidence language rules"
3
+ applyTo: "**/*.md"
4
+ ---
5
+
6
+ # APEX Markdown Rules
7
+
8
+ - Use one H1 and structured H2 sections.
9
+ - Keep lines within 120 characters and specify languages on fenced code blocks.
10
+ - Use descriptive links and avoid feature claims that lack evidence.
11
+ - Keep generated artifact content consistent with its accepted APEX contract.
12
+ - Use accepted APEX templates before adding presentation or diagram content.
13
+ - Use `mermaid` for inline flows and `python-diagrams` for standalone `.py`, `.png`, and `.svg` artifacts.
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: "Consumer PowerShell safety and idempotent scripting guidance"
3
+ applyTo: "**/*.{ps1,psm1}"
4
+ ---
5
+
6
+ # APEX PowerShell Rules
7
+
8
+ - Use approved cmdlets and explicit parameters.
9
+ - Keep scripts non-interactive and idempotent where possible.
10
+ - Require explicit confirmation through APEX project lifecycle prompts before destructive work.
11
+ - Do not embed credentials, tokens, or direct cloud deployment authority in scripts.
@@ -0,0 +1,12 @@
1
+ ---
2
+ description: "Consumer prompt and model instruction boundaries"
3
+ applyTo: ".github/agents/**/*.agent.md, .github/prompts/**/*.prompt.md"
4
+ ---
5
+
6
+ # APEX Prompt Rules
7
+
8
+ - Use the model assigned by the managed role and do not override it redundantly.
9
+ - Keep prompts outcome-focused with explicit scope, input, output, and stop conditions.
10
+ - Keep tool lists minimal and use native client questions for user-owned decisions.
11
+ - Do not grant direct mutation, secrets, repository maintenance, or cloud lifecycle authority.
12
+ - Route workflow state changes through the declared APEX MCP operation.
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: "Consumer Python implementation and validation guidance"
3
+ applyTo: "**/*.py"
4
+ ---
5
+
6
+ # APEX Python Rules
7
+
8
+ - Use explicit dependencies, typed boundaries, and structured parsing.
9
+ - Keep Azure and workflow state operations behind declared APEX capabilities.
10
+ - Validate external input and produce concise, actionable errors.
11
+ - Do not embed secrets, credentials, or direct deployment commands.
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: "Consumer safe file editing and generated artifact boundaries"
3
+ applyTo: "**/*.{js,mjs,cjs,ts,tsx,jsx,py,ps1,sh,bicep,tf}"
4
+ ---
5
+
6
+ # APEX Safe File Edits
7
+
8
+ - Use the client file-editing capability for source changes; do not create files through shell redirection.
9
+ - Do not use heredocs, `tee`, or inline interpreters to write project code or artifacts.
10
+ - Write accepted workflow outputs only through the owning APEX MCP operation.
11
+ - Keep generated files inside the selected project and run boundaries.