@aicf/agent-skills 1.0.0-rc.4

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 (145) hide show
  1. package/.codex-plugin/plugin.json +40 -0
  2. package/CHANGELOG.md +28 -0
  3. package/LICENSE +21 -0
  4. package/README.md +114 -0
  5. package/assets/aicf-agent-skills-icon.svg +7 -0
  6. package/assets/aicf-agent-skills-logo.svg +9 -0
  7. package/docs/codex-plugin-distribution.md +50 -0
  8. package/docs/installation.md +96 -0
  9. package/docs/public-release-checklist.md +57 -0
  10. package/docs/skill-authoring-standard.md +55 -0
  11. package/docs/skill-index.md +157 -0
  12. package/docs/validation.md +50 -0
  13. package/package.json +61 -0
  14. package/scripts/README.md +6 -0
  15. package/scripts/aicf-skills.mjs +51 -0
  16. package/scripts/check-release-readiness.mjs +197 -0
  17. package/scripts/check-skills-public.mjs +12 -0
  18. package/scripts/check-trigger-coverage.mjs +20 -0
  19. package/scripts/generate-skill-index.mjs +30 -0
  20. package/scripts/install-skills.mjs +31 -0
  21. package/scripts/lib/skill-common.mjs +511 -0
  22. package/scripts/validate-skills.mjs +13 -0
  23. package/skills/README.md +12 -0
  24. package/skills/aicf-action-lifecycle/SKILL.md +87 -0
  25. package/skills/aicf-action-lifecycle/assets/action-handler.template.ts +24 -0
  26. package/skills/aicf-action-lifecycle/assets/approval-record.json +9 -0
  27. package/skills/aicf-action-lifecycle/assets/prepared-action-record.json +11 -0
  28. package/skills/aicf-action-lifecycle/references/action-state-machine.md +17 -0
  29. package/skills/aicf-action-lifecycle/references/approval-patterns.md +9 -0
  30. package/skills/aicf-action-lifecycle/references/idempotency-and-audit.md +8 -0
  31. package/skills/aicf-action-lifecycle/references/verification-patterns.md +7 -0
  32. package/skills/aicf-capability-authoring/SKILL.md +100 -0
  33. package/skills/aicf-capability-authoring/assets/capability.manifest.yaml +31 -0
  34. package/skills/aicf-capability-authoring/assets/entity.manifest.yaml +12 -0
  35. package/skills/aicf-capability-authoring/assets/eval-case.yaml +12 -0
  36. package/skills/aicf-capability-authoring/references/checklist.md +13 -0
  37. package/skills/aicf-capability-authoring/references/examples.md +12 -0
  38. package/skills/aicf-capability-authoring/references/field-guide.md +13 -0
  39. package/skills/aicf-capability-authoring/references/manifest-decision-tree.md +10 -0
  40. package/skills/aicf-control-plane-ui/SKILL.md +90 -0
  41. package/skills/aicf-control-plane-ui/assets/control-plane-wireframe.md +29 -0
  42. package/skills/aicf-control-plane-ui/assets/ui-acceptance-checklist.md +11 -0
  43. package/skills/aicf-control-plane-ui/references/api-contracts.md +14 -0
  44. package/skills/aicf-control-plane-ui/references/approval-console.md +12 -0
  45. package/skills/aicf-control-plane-ui/references/control-plane-screens.md +14 -0
  46. package/skills/aicf-control-plane-ui/references/operational-ux.md +7 -0
  47. package/skills/aicf-controls-and-budgets/SKILL.md +88 -0
  48. package/skills/aicf-controls-and-budgets/assets/budget-fixture.json +15 -0
  49. package/skills/aicf-controls-and-budgets/assets/controls-policy.yaml +14 -0
  50. package/skills/aicf-controls-and-budgets/references/budget-policy.md +12 -0
  51. package/skills/aicf-controls-and-budgets/references/circuit-breakers.md +13 -0
  52. package/skills/aicf-controls-and-budgets/references/control-types.md +10 -0
  53. package/skills/aicf-docs-and-examples/SKILL.md +87 -0
  54. package/skills/aicf-docs-and-examples/assets/example-readme-template.md +21 -0
  55. package/skills/aicf-docs-and-examples/assets/provider-guide-template.md +17 -0
  56. package/skills/aicf-docs-and-examples/references/docs-style-guide.md +9 -0
  57. package/skills/aicf-docs-and-examples/references/example-app-checklist.md +9 -0
  58. package/skills/aicf-docs-and-examples/references/public-api-docs.md +11 -0
  59. package/skills/aicf-docs-and-examples/references/quickstart-template.md +17 -0
  60. package/skills/aicf-eval-authoring/SKILL.md +86 -0
  61. package/skills/aicf-eval-authoring/assets/eval-case.yaml +17 -0
  62. package/skills/aicf-eval-authoring/assets/eval-result.json +15 -0
  63. package/skills/aicf-eval-authoring/assets/promptfoo.config.yaml +12 -0
  64. package/skills/aicf-eval-authoring/references/deterministic-scorers.md +13 -0
  65. package/skills/aicf-eval-authoring/references/eval-rubric.md +10 -0
  66. package/skills/aicf-eval-authoring/references/golden-test-patterns.md +8 -0
  67. package/skills/aicf-eval-authoring/references/real-provider-evals.md +8 -0
  68. package/skills/aicf-governance-lifecycle/SKILL.md +91 -0
  69. package/skills/aicf-governance-lifecycle/assets/lifecycle-change-request.md +21 -0
  70. package/skills/aicf-governance-lifecycle/assets/riskwaiver.md +17 -0
  71. package/skills/aicf-governance-lifecycle/references/compatibility-checks.md +21 -0
  72. package/skills/aicf-governance-lifecycle/references/impact-analysis.md +13 -0
  73. package/skills/aicf-governance-lifecycle/references/lifecycle-state-machine.md +15 -0
  74. package/skills/aicf-governance-lifecycle/references/riskcompiler-rules.md +13 -0
  75. package/skills/aicf-migration/SKILL.md +87 -0
  76. package/skills/aicf-migration/assets/legacy-tool-inventory.csv +3 -0
  77. package/skills/aicf-migration/assets/migration-plan.md +19 -0
  78. package/skills/aicf-migration/references/conversion-playbook.md +9 -0
  79. package/skills/aicf-migration/references/legacy-tool-riskmap.md +14 -0
  80. package/skills/aicf-migration/references/migration-inventory.md +12 -0
  81. package/skills/aicf-migration/references/rollout-plan.md +12 -0
  82. package/skills/aicf-observability-replay/SKILL.md +88 -0
  83. package/skills/aicf-observability-replay/assets/replay-fixture.json +23 -0
  84. package/skills/aicf-observability-replay/assets/trace-to-golden-template.yaml +14 -0
  85. package/skills/aicf-observability-replay/references/redacted-telemetry.md +7 -0
  86. package/skills/aicf-observability-replay/references/replay-simulation.md +10 -0
  87. package/skills/aicf-observability-replay/references/trace-span-map.md +17 -0
  88. package/skills/aicf-observability-replay/references/trace-to-golden.md +12 -0
  89. package/skills/aicf-policy-and-risk/SKILL.md +88 -0
  90. package/skills/aicf-policy-and-risk/assets/policy-broker.template.ts +29 -0
  91. package/skills/aicf-policy-and-risk/assets/policy-decision-fixture.json +15 -0
  92. package/skills/aicf-policy-and-risk/references/deny-approval-allow-matrix.md +12 -0
  93. package/skills/aicf-policy-and-risk/references/policy-broker-contract.md +13 -0
  94. package/skills/aicf-policy-and-risk/references/risktier-rules.md +10 -0
  95. package/skills/aicf-policy-and-risk/references/semantic-invariants.md +9 -0
  96. package/skills/aicf-provider-conformance/SKILL.md +88 -0
  97. package/skills/aicf-provider-conformance/assets/provider-conformance-case.yaml +18 -0
  98. package/skills/aicf-provider-conformance/assets/provider-matrix.json +19 -0
  99. package/skills/aicf-provider-conformance/references/provider-normalization-matrix.md +14 -0
  100. package/skills/aicf-provider-conformance/references/provider-runtime-boundaries.md +10 -0
  101. package/skills/aicf-provider-conformance/references/schema-compatibility.md +8 -0
  102. package/skills/aicf-provider-conformance/references/tool-call-mapping.md +8 -0
  103. package/skills/aicf-release-hygiene/SKILL.md +85 -0
  104. package/skills/aicf-release-hygiene/assets/release-report-template.md +19 -0
  105. package/skills/aicf-release-hygiene/references/forbidden-artifacts.md +12 -0
  106. package/skills/aicf-release-hygiene/references/package-smoke-test.md +10 -0
  107. package/skills/aicf-release-hygiene/references/release-checklist.md +10 -0
  108. package/skills/aicf-release-hygiene/references/source-archive-rules.md +8 -0
  109. package/skills/aicf-runtime-integration/SKILL.md +87 -0
  110. package/skills/aicf-runtime-integration/assets/context-builder.template.ts +22 -0
  111. package/skills/aicf-runtime-integration/assets/handler-registry.template.ts +20 -0
  112. package/skills/aicf-runtime-integration/assets/runtime-integration-plan.md +23 -0
  113. package/skills/aicf-runtime-integration/references/capability-router-patterns.md +8 -0
  114. package/skills/aicf-runtime-integration/references/context-builder-patterns.md +8 -0
  115. package/skills/aicf-runtime-integration/references/handler-registry-patterns.md +8 -0
  116. package/skills/aicf-runtime-integration/references/policy-broker-adapter.md +8 -0
  117. package/skills/aicf-runtime-integration/references/runtime-integration-checklist.md +10 -0
  118. package/skills/aicf-security-redteam/SKILL.md +89 -0
  119. package/skills/aicf-security-redteam/assets/promptfoo-redteam.config.yaml +13 -0
  120. package/skills/aicf-security-redteam/assets/redteam-case.yaml +15 -0
  121. package/skills/aicf-security-redteam/references/prompt-injection-patterns.md +12 -0
  122. package/skills/aicf-security-redteam/references/redteam-acceptance.md +11 -0
  123. package/skills/aicf-security-redteam/references/security-test-pack-map.md +11 -0
  124. package/skills/aicf-security-redteam/references/tool-misuse-patterns.md +11 -0
  125. package/skills/aicf-skill-pack-maintenance/SKILL.md +88 -0
  126. package/skills/aicf-skill-pack-maintenance/assets/skill-template.md +52 -0
  127. package/skills/aicf-skill-pack-maintenance/references/overlap-prevention.md +9 -0
  128. package/skills/aicf-skill-pack-maintenance/references/plugin-packaging.md +8 -0
  129. package/skills/aicf-skill-pack-maintenance/references/skill-authoring-rules.md +10 -0
  130. package/skills/aicf-skill-pack-maintenance/references/trigger-evaluation.md +9 -0
  131. package/skills/aicf-storage-and-aws/SKILL.md +86 -0
  132. package/skills/aicf-storage-and-aws/assets/dynamodb-store.template.ts +21 -0
  133. package/skills/aicf-storage-and-aws/assets/postgres-store.template.ts +22 -0
  134. package/skills/aicf-storage-and-aws/assets/step-functions-approval.template.ts +15 -0
  135. package/skills/aicf-storage-and-aws/references/aws-adapter-boundaries.md +8 -0
  136. package/skills/aicf-storage-and-aws/references/least-privilege-iam.md +11 -0
  137. package/skills/aicf-storage-and-aws/references/step-functions-approval.md +10 -0
  138. package/skills/aicf-storage-and-aws/references/store-interface-map.md +10 -0
  139. package/skills/aicf-trust-redaction-retention/SKILL.md +88 -0
  140. package/skills/aicf-trust-redaction-retention/assets/redaction-policy.yaml +15 -0
  141. package/skills/aicf-trust-redaction-retention/assets/trust-labelled-context.json +18 -0
  142. package/skills/aicf-trust-redaction-retention/references/redaction-rules.md +8 -0
  143. package/skills/aicf-trust-redaction-retention/references/retention-rules.md +11 -0
  144. package/skills/aicf-trust-redaction-retention/references/taint-rules.md +9 -0
  145. package/skills/aicf-trust-redaction-retention/references/trust-labels.md +16 -0
@@ -0,0 +1,9 @@
1
+ # Approval Patterns
2
+
3
+ - Store a prepared action before requesting approval.
4
+ - Present only a safe summary to the approver.
5
+ - Record requester, decider, reason, timestamp, and decision status as redacted refs or
6
+ summaries.
7
+ - Deny commits when approval is missing, rejected, expired, mismatched, or unrelated to
8
+ the prepared action.
9
+ - Approval UI and identity remain host responsibilities.
@@ -0,0 +1,8 @@
1
+ # Idempotency And Audit
2
+
3
+ - Scope idempotency keys by tenant/account/action context.
4
+ - Reserve before commit and complete with a safe result ref.
5
+ - Return the previous safe result for duplicate keys in the same scope.
6
+ - Write audit events for prepare, approval, commit started, commit succeeded, commit
7
+ failed, and denial.
8
+ - Do not audit raw tool args when hashes or summaries are enough.
@@ -0,0 +1,7 @@
1
+ # Verification Patterns
2
+
3
+ Verification checks whether a prepared or committed action still matches expected host
4
+ state.
5
+
6
+ Use verification for review flows, reconciliation, and post-commit checks. Verification
7
+ should return a safe envelope, never stack traces or private diagnostics.
@@ -0,0 +1,100 @@
1
+ ---
2
+ name: aicf-capability-authoring
3
+ description:
4
+ Author or modify AICF capability/entity manifests, schemas, model-facing slices, and
5
+ starter evals. Use when creating an AI tool, exposing app functionality to models, or
6
+ converting an operation into a governed AICF capability.
7
+ license: MIT
8
+ compatibility:
9
+ Codex and Agent Skills-compatible coding agents. Works in repositories using AICF or
10
+ migrating to AICF.
11
+ metadata:
12
+ aicf.skill.version: "1.0.0-rc.4"
13
+ aicf.skill.package: "@aicf/agent-skills"
14
+ aicf.skill.category: "capability-authoring"
15
+ aicf.skill.scope: "builder"
16
+ aicf.skill.strictness: "fail-closed-runtime"
17
+ ---
18
+
19
+ # AICF Capability Authoring
20
+
21
+ ## Purpose
22
+
23
+ Guide creation or modification of AICF capability and entity manifests so
24
+ model-accessible application operations are precise, governable, testable, and safe to
25
+ route.
26
+
27
+ ## Use this skill when
28
+
29
+ - Creating a new AICF capability manifest for read, prepare, commit, send, or workflow
30
+ operations.
31
+ - Turning an application operation into a governed model-facing tool.
32
+ - Adding entity manifests, input/output schemas, model-facing descriptions, or starter
33
+ evals.
34
+ - Reviewing an existing manifest for safety, lifecycle, routing, and schema quality.
35
+
36
+ ## Do not use this skill when
37
+
38
+ - Implementing runtime handlers, provider loops, storage adapters, approval UIs, or
39
+ model calls.
40
+ - Writing general app APIs that are not being exposed through AICF.
41
+ - Creating broad raw backend endpoints instead of capability-sized operations.
42
+
43
+ ## Inputs to inspect first
44
+
45
+ - `AGENTS.md` and public repository rules.
46
+ - Existing `schemas/`, `examples/`, `docs/start-here.md`, and nearby capability/entity
47
+ manifests.
48
+ - A target application operation, intended user, lifecycle operation, side effects, and
49
+ risk tier.
50
+ - Reference guides: [checklist](references/checklist.md),
51
+ [decision tree](references/manifest-decision-tree.md),
52
+ [field guide](references/field-guide.md), and [examples](references/examples.md).
53
+
54
+ ## Workflow
55
+
56
+ 1. Identify the smallest useful operation and reject broad generic APIs.
57
+ 2. Choose capability type, lifecycle operation, risk tier, side-effect metadata, and
58
+ required auth/account/tenant context.
59
+ 3. Draft or update the entity manifest when the capability acts on a domain entity.
60
+ 4. Write strict object input schemas and output schemas; prefer explicit required fields
61
+ and enums.
62
+ 5. Add model-facing descriptions that say what the capability does, when to use it, and
63
+ what it will not do.
64
+ 6. Add starter eval coverage for selection, valid input, invalid input, and forbidden
65
+ commit exposure.
66
+ 7. Validate the manifests and keep examples synthetic.
67
+
68
+ Use [capability template](assets/capability.manifest.yaml),
69
+ [entity template](assets/entity.manifest.yaml), and
70
+ [eval template](assets/eval-case.yaml) as starting points.
71
+
72
+ ## Required outputs
73
+
74
+ - Capability and, when needed, entity manifests with strict schemas and public-safe
75
+ descriptions.
76
+ - A short explanation of lifecycle, risk, side effects, approval/idempotency/audit
77
+ needs, and routing expectations.
78
+ - Starter eval cases or a concrete note explaining why no eval was added.
79
+
80
+ ## Validation
81
+
82
+ - Run the repo manifest validation command.
83
+ - Run generated-type checks if schemas changed.
84
+ - Confirm the model-facing slice excludes commit capabilities unless a host-only path
85
+ intentionally handles them.
86
+ - Confirm examples contain only synthetic identifiers and `example.com` URLs when URLs
87
+ are needed.
88
+
89
+ ## Hard rules
90
+
91
+ - Do not expose a broad application API as one capability.
92
+ - Do not weaken AICF validation to satisfy a provider schema.
93
+ - Do not add runtime execution, storage, provider SDK calls, model calls, or approval
94
+ workflows from this skill.
95
+ - Do not copy private notes into public manifests or docs.
96
+
97
+ ## Handoff format
98
+
99
+ Report changed manifests, created evals, validation commands run, safety decisions, and
100
+ any remaining gaps or follow-up work.
@@ -0,0 +1,31 @@
1
+ id: example.entity.action
2
+ version: "1.0.0"
3
+ status: draft
4
+ description: "Describe the narrow capability and when a model should select it."
5
+ capability_type: read
6
+ lifecycle:
7
+ operation: read
8
+ risk:
9
+ tier: low
10
+ input_schema:
11
+ type: object
12
+ additionalProperties: false
13
+ properties:
14
+ entity_id:
15
+ type: string
16
+ required:
17
+ - entity_id
18
+ output_schema:
19
+ type: object
20
+ additionalProperties: false
21
+ properties:
22
+ entity_id:
23
+ type: string
24
+ summary:
25
+ type: string
26
+ required:
27
+ - entity_id
28
+ - summary
29
+ policy:
30
+ requires_user: true
31
+ requires_tenant: true
@@ -0,0 +1,12 @@
1
+ id: example.entity
2
+ version: "1.0.0"
3
+ description: "Synthetic entity used by an example capability."
4
+ fields:
5
+ entity_id:
6
+ type: string
7
+ description: "Synthetic public-safe entity identifier."
8
+ summary:
9
+ type: string
10
+ description: "Short public-safe summary."
11
+ allowed_actions:
12
+ - read
@@ -0,0 +1,12 @@
1
+ id: example.entity.action.selects
2
+ description: "Model should select the narrow example capability for a matching request."
3
+ capability_under_test: example.entity.action
4
+ input:
5
+ user_message: "Show the summary for example entity EX-100."
6
+ expected:
7
+ selected_capabilities:
8
+ - example.entity.action
9
+ forbidden_tool_calls: []
10
+ scorers:
11
+ - selected_capability_exact
12
+ - no_forbidden_tool_call
@@ -0,0 +1,13 @@
1
+ # Capability Authoring Checklist
2
+
3
+ - Operation is one narrow application action, not a generic API wrapper.
4
+ - Capability ID is stable, domain-scoped, and readable.
5
+ - Capability type and lifecycle operation match the host behavior.
6
+ - Input schema is an object schema with clear required fields.
7
+ - Output schema is explicit enough for evals and consumers.
8
+ - Entity references point to public entity manifests where applicable.
9
+ - Risk tier, side effects, auth, tenant/account requirements, audit, approval, and
10
+ idempotency are consistent.
11
+ - Model-facing description says what the capability does and does not do.
12
+ - Restricted or destructive behavior is not model-exposed as commit.
13
+ - Starter evals cover selection, valid input, invalid input, and forbidden action paths.
@@ -0,0 +1,12 @@
1
+ # Public-Safe Examples
2
+
3
+ Use synthetic names and simple domains:
4
+
5
+ - `support.ticket.get`: read a support ticket by ID.
6
+ - `support.refund.prepare_case`: prepare a refund request for host approval.
7
+ - `support.refund.commit_case`: host-controlled commit for an approved prepared refund.
8
+ - `scheduling.invite.prepare`: prepare an invite message.
9
+ - `scheduling.invite.send`: host-controlled send path.
10
+
11
+ Avoid customer-like identifiers, real endpoints, tenant names, transcripts, or provider
12
+ transport details.
@@ -0,0 +1,13 @@
1
+ # Field Guide
2
+
3
+ - `id`: stable capability identifier, usually `domain.entity.action`.
4
+ - `description`: model-facing summary, written for safe selection.
5
+ - `status`: current manifest availability, not governance lifecycle by itself.
6
+ - `input_schema`: canonical AICF validation contract for tool arguments.
7
+ - `output_schema`: expected handler result shape.
8
+ - `risk`: declared risk; never declare lower than inferred side effects require.
9
+ - `side_effects`: machine-readable summary of writes, sends, deletes, money movement, or
10
+ external effects.
11
+ - `lifecycle`: read, prepare, commit, verify, or related lifecycle metadata.
12
+ - `policy`: requirements the host policy broker must enforce.
13
+ - `extensions`: public-safe metadata for governance, security packs, or provider hints.
@@ -0,0 +1,10 @@
1
+ # Manifest Decision Tree
2
+
3
+ 1. If the operation only retrieves data, model it as read/select behavior.
4
+ 2. If the operation stages a future side effect, model it as prepare and link the
5
+ host-controlled commit path.
6
+ 3. If the operation performs a side effect, keep commit host-controlled and require
7
+ policy, audit, and idempotency.
8
+ 4. If the operation sends messages, moves money, changes permissions, deletes records,
9
+ or affects tenants, treat it as high scrutiny.
10
+ 5. If the operation cannot be described precisely, split it before writing a manifest.
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: aicf-control-plane-ui
3
+ description:
4
+ Build or audit the optional AICF governance control-plane UI/API for capability
5
+ catalogue, lifecycle, policy decisions, approvals, eval status, traces, controls, and
6
+ evidence export.
7
+ license: MIT
8
+ compatibility:
9
+ Codex and Agent Skills-compatible coding agents. Works in repositories using AICF or
10
+ migrating to AICF.
11
+ metadata:
12
+ aicf.skill.version: "1.0.0-rc.4"
13
+ aicf.skill.package: "@aicf/agent-skills"
14
+ aicf.skill.category: "control-plane-ui"
15
+ aicf.skill.scope: "builder"
16
+ aicf.skill.strictness: "fail-closed-runtime"
17
+ ---
18
+
19
+ # AICF Control Plane UI
20
+
21
+ ## Purpose
22
+
23
+ Guide optional AICF governance control-plane UI/API work so capability, lifecycle,
24
+ approval, eval, trace, control, and evidence views stay dense, safe, and operational.
25
+
26
+ ## Use this skill when
27
+
28
+ - Building or auditing a docs-only mock, API, self-hosted UI, sample app, or production
29
+ integration for AICF governance.
30
+ - Creating capability catalogue, lifecycle, policy decision, approval, eval, trace,
31
+ controls, or evidence export views.
32
+ - Testing safe API response shapes and important UI states.
33
+
34
+ ## Do not use this skill when
35
+
36
+ - Building a generic analytics dashboard.
37
+ - Adding production auth, storage, workflow engines, or hosted SaaS behavior.
38
+ - Returning private raw data through UI/API responses.
39
+
40
+ ## Inputs to inspect first
41
+
42
+ - Control-plane contracts, existing example app, UI framework, design system, public
43
+ docs, API tests, and evidence export behavior.
44
+ - References: [screens](references/control-plane-screens.md),
45
+ [approval console](references/approval-console.md),
46
+ [operational UX](references/operational-ux.md), and
47
+ [API contracts](references/api-contracts.md).
48
+
49
+ ## Workflow
50
+
51
+ 1. Identify target surface: docs mock, API, self-hosted UI, sample app, or production
52
+ integration.
53
+ 2. Build dense views for capability catalogue, lifecycle state, risk tier, policy
54
+ decisions, approvals, eval/security status, traces/replay, kill switches, and
55
+ evidence export.
56
+ 3. Use the project UI framework and design system.
57
+ 4. Return only safe summaries, hashes, redacted refs, statuses, counts, and reasons.
58
+ 5. Add loading, empty, error, denied, approval-required, and disabled states.
59
+ 6. Add accessibility labels and keyboard paths where practical.
60
+ 7. Add tests for API contracts and critical UI states.
61
+
62
+ Use [wireframe](assets/control-plane-wireframe.md) and
63
+ [UI checklist](assets/ui-acceptance-checklist.md) templates.
64
+
65
+ ## Required outputs
66
+
67
+ - UI/API implementation or audit notes.
68
+ - Tests for safe response shapes, approval paths, controls, evidence export, and UI
69
+ states.
70
+ - Public-safety summary for data shown in the control plane.
71
+
72
+ ## Validation
73
+
74
+ - Run API, UI, package, docs, and public-safety checks relevant to the change.
75
+ - Use browser or screenshot verification for user-visible UI changes when practical.
76
+ - Confirm private data is not rendered or returned.
77
+
78
+ ## Hard rules
79
+
80
+ - Host apps own production auth, tenant enforcement, approval identity, storage, and
81
+ retention.
82
+ - Do not expose private prompts, transcripts, provider transport bodies, secrets,
83
+ account IDs, tenant IDs, or stack traces.
84
+ - Do not model-expose commit paths through the control plane.
85
+ - Do not create a hosted product or workflow engine.
86
+
87
+ ## Handoff format
88
+
89
+ Report surfaces changed, safe data model, tests run, UI verification, and remaining host
90
+ deployment obligations.
@@ -0,0 +1,29 @@
1
+ # Control Plane Wireframe
2
+
3
+ ## Header
4
+
5
+ - project and environment
6
+ - active controls summary
7
+
8
+ ## Navigation
9
+
10
+ - capabilities
11
+ - approvals
12
+ - evals
13
+ - traces
14
+ - controls
15
+ - evidence
16
+
17
+ ## Main panel
18
+
19
+ - dense table or detail view
20
+ - filters
21
+ - status badges
22
+ - safe action buttons
23
+
24
+ ## Detail panel
25
+
26
+ - summary
27
+ - reasons
28
+ - linked evidence
29
+ - safe metadata
@@ -0,0 +1,11 @@
1
+ # UI Acceptance Checklist
2
+
3
+ - Capability catalogue is scannable.
4
+ - Detail view includes lifecycle, risk, policy, eval, conformance, and evidence
5
+ summaries.
6
+ - Approval required state is clear.
7
+ - Disabled and denied states are clear.
8
+ - Safe errors omit stack traces.
9
+ - Keyboard path reaches primary controls.
10
+ - Mobile and desktop layouts do not overlap.
11
+ - No private raw data is rendered.
@@ -0,0 +1,14 @@
1
+ # API Contracts
2
+
3
+ Control-plane APIs should return JSON-serializable safe responses:
4
+
5
+ - status.
6
+ - IDs or redacted refs.
7
+ - summaries.
8
+ - counts.
9
+ - reason codes.
10
+ - coverage metadata.
11
+ - safe errors.
12
+
13
+ Do not return raw transcripts, provider transport details, stack traces, secrets, or
14
+ unredacted tenant/account/user IDs.
@@ -0,0 +1,12 @@
1
+ # Approval Console
2
+
3
+ Approval views should show:
4
+
5
+ - prepared action safe summary.
6
+ - requester and account refs as redacted refs.
7
+ - risk tier and approval reason.
8
+ - approve and reject actions.
9
+ - status history.
10
+ - expiry state.
11
+
12
+ Never show raw args or sensitive output by default.
@@ -0,0 +1,14 @@
1
+ # Control Plane Screens
2
+
3
+ Useful screens:
4
+
5
+ - capability catalogue.
6
+ - capability detail.
7
+ - lifecycle and risk status.
8
+ - policy decision ledger.
9
+ - approval queue.
10
+ - eval and security-pack status.
11
+ - conformance status.
12
+ - trace and replay index.
13
+ - controls and budgets.
14
+ - evidence export.
@@ -0,0 +1,7 @@
1
+ # Operational UX
2
+
3
+ Operational UIs should be dense, scannable, and predictable.
4
+
5
+ Include clear states for loading, empty, error, denied, approval required, disabled,
6
+ expired, and failed. Use tables and filters for repeated records. Keep decorative UI
7
+ minimal.
@@ -0,0 +1,88 @@
1
+ ---
2
+ name: aicf-controls-and-budgets
3
+ description:
4
+ Implement or audit AICF capability-level kill switches, circuit breakers, budgets, max
5
+ loops, rate controls, and fail-safe read-only modes without replacing a model gateway.
6
+ license: MIT
7
+ compatibility:
8
+ Codex and Agent Skills-compatible coding agents. Works in repositories using AICF or
9
+ migrating to AICF.
10
+ metadata:
11
+ aicf.skill.version: "1.0.0-rc.4"
12
+ aicf.skill.package: "@aicf/agent-skills"
13
+ aicf.skill.category: "controls-budgets"
14
+ aicf.skill.scope: "builder"
15
+ aicf.skill.strictness: "fail-closed-runtime"
16
+ ---
17
+
18
+ # AICF Controls And Budgets
19
+
20
+ ## Purpose
21
+
22
+ Guide AICF operational controls so capability exposure, execution, provider loops, and
23
+ side effects can be denied, downgraded, budgeted, or forced through approval.
24
+
25
+ ## Use this skill when
26
+
27
+ - Adding or auditing kill switches, circuit breakers, budgets, max loops, rate controls,
28
+ or read-only modes.
29
+ - Blocking provider/model/capability usage before runtime execution.
30
+ - Testing that controls fail closed without creating a model gateway.
31
+
32
+ ## Do not use this skill when
33
+
34
+ - Adding provider runtimes, production storage, UI dashboards, or cloud resources.
35
+ - Silently falling back to another provider after a control denial.
36
+ - Exposing commit tools to models.
37
+
38
+ ## Inputs to inspect first
39
+
40
+ - Controls schemas, runtime router/executor/lifecycle code, provider loops, governance
41
+ gate, policy broker, and tests.
42
+ - References: [control types](references/control-types.md),
43
+ [budget policy](references/budget-policy.md), and
44
+ [circuit breakers](references/circuit-breakers.md).
45
+
46
+ ## Workflow
47
+
48
+ 1. Identify control scopes: global, provider, model, capability, domain, tenant,
49
+ autonomy, risk, and environment.
50
+ 2. Add kill switches for deny, force approval, and read-only behavior.
51
+ 3. Add circuit breakers for validation failures, policy denials, approval rejections,
52
+ provider errors, cost spikes, latency spikes, loop limits, or suspected cross-tenant
53
+ issues.
54
+ 4. Add budgets for max tool calls, provider calls, runtime duration, retries, tokens,
55
+ cost, tenant/account, capability, and provider fallback.
56
+ 5. Wire controls into routing, tool execution, lifecycle commit/verify, and provider
57
+ loops.
58
+ 6. Return safe denied envelopes or safe provider errors when controls block a path.
59
+ 7. Add tests for disabled capability, forced approval, read-only mode, max loop, and
60
+ budget exceeded.
61
+
62
+ Use [controls policy](assets/controls-policy.yaml) and
63
+ [budget fixture](assets/budget-fixture.json) as examples.
64
+
65
+ ## Required outputs
66
+
67
+ - Controls implementation or audit notes with scopes and reason codes.
68
+ - Tests proving route/export/execution/provider loops fail closed.
69
+ - Handoff explaining host-owned storage and operational responsibilities.
70
+
71
+ ## Validation
72
+
73
+ - Run controls, runtime, provider mock, governance gate, or package checks relevant to
74
+ the change.
75
+ - Confirm denied controls prevent handler/provider calls before side effects.
76
+ - Confirm controls are optional unless configured.
77
+
78
+ ## Hard rules
79
+
80
+ - Do not create a general model gateway.
81
+ - Do not hide control failure with silent fallback.
82
+ - Do not execute prepare or commit when read-only controls apply.
83
+ - Do not require live credentials or cloud resources for tests.
84
+
85
+ ## Handoff format
86
+
87
+ Report controls added, scopes, decisions, runtime/provider seams touched, tests run, and
88
+ remaining host operations work.
@@ -0,0 +1,15 @@
1
+ {
2
+ "runId": "run_example_001",
3
+ "provider": "openai",
4
+ "model": "example-model",
5
+ "usage": {
6
+ "toolCalls": 4,
7
+ "providerCalls": 2,
8
+ "runtimeMs": 1200,
9
+ "retries": 0
10
+ },
11
+ "decision": {
12
+ "allowed": true,
13
+ "reasons": ["within_budget"]
14
+ }
15
+ }
@@ -0,0 +1,14 @@
1
+ schemaVersion: "1.0"
2
+ killSwitches:
3
+ - id: example-readonly-high-impact
4
+ mode: read_only
5
+ scope:
6
+ riskTier: high
7
+ reason: "Synthetic read-only control for high-impact actions."
8
+ budgets:
9
+ - id: example-run-budget
10
+ scope:
11
+ provider: openai
12
+ maxToolCallsPerRun: 8
13
+ maxProviderCallsPerRun: 8
14
+ maxRuntimeMsPerRun: 60000
@@ -0,0 +1,12 @@
1
+ # Budget Policy
2
+
3
+ Common budget limits:
4
+
5
+ - max tool calls per run.
6
+ - max provider calls per run.
7
+ - max runtime duration.
8
+ - max retries.
9
+ - optional token and cost limits.
10
+ - tenant/account or capability hooks.
11
+
12
+ When a hard limit is exceeded, fail closed with a safe reason.
@@ -0,0 +1,13 @@
1
+ # Circuit Breakers
2
+
3
+ Useful breaker metrics:
4
+
5
+ - validation failure rate.
6
+ - policy denial spike.
7
+ - provider error spike.
8
+ - approval rejection spike.
9
+ - latency or cost spike.
10
+ - loop limit exceeded.
11
+ - security-test failure.
12
+
13
+ Breaker state should be deterministic and visible through safe summaries.
@@ -0,0 +1,10 @@
1
+ # Control Types
2
+
3
+ Control modes:
4
+
5
+ - deny: block export, routing, execution, or provider call.
6
+ - force approval: permit prepare but require approval before commit.
7
+ - read only: permit read/select and block side-effect paths.
8
+
9
+ Scopes may include global, provider, model, capability, domain, tenant, autonomy, risk,
10
+ and environment.