@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.
- package/.codex-plugin/plugin.json +40 -0
- package/CHANGELOG.md +28 -0
- package/LICENSE +21 -0
- package/README.md +114 -0
- package/assets/aicf-agent-skills-icon.svg +7 -0
- package/assets/aicf-agent-skills-logo.svg +9 -0
- package/docs/codex-plugin-distribution.md +50 -0
- package/docs/installation.md +96 -0
- package/docs/public-release-checklist.md +57 -0
- package/docs/skill-authoring-standard.md +55 -0
- package/docs/skill-index.md +157 -0
- package/docs/validation.md +50 -0
- package/package.json +61 -0
- package/scripts/README.md +6 -0
- package/scripts/aicf-skills.mjs +51 -0
- package/scripts/check-release-readiness.mjs +197 -0
- package/scripts/check-skills-public.mjs +12 -0
- package/scripts/check-trigger-coverage.mjs +20 -0
- package/scripts/generate-skill-index.mjs +30 -0
- package/scripts/install-skills.mjs +31 -0
- package/scripts/lib/skill-common.mjs +511 -0
- package/scripts/validate-skills.mjs +13 -0
- package/skills/README.md +12 -0
- package/skills/aicf-action-lifecycle/SKILL.md +87 -0
- package/skills/aicf-action-lifecycle/assets/action-handler.template.ts +24 -0
- package/skills/aicf-action-lifecycle/assets/approval-record.json +9 -0
- package/skills/aicf-action-lifecycle/assets/prepared-action-record.json +11 -0
- package/skills/aicf-action-lifecycle/references/action-state-machine.md +17 -0
- package/skills/aicf-action-lifecycle/references/approval-patterns.md +9 -0
- package/skills/aicf-action-lifecycle/references/idempotency-and-audit.md +8 -0
- package/skills/aicf-action-lifecycle/references/verification-patterns.md +7 -0
- package/skills/aicf-capability-authoring/SKILL.md +100 -0
- package/skills/aicf-capability-authoring/assets/capability.manifest.yaml +31 -0
- package/skills/aicf-capability-authoring/assets/entity.manifest.yaml +12 -0
- package/skills/aicf-capability-authoring/assets/eval-case.yaml +12 -0
- package/skills/aicf-capability-authoring/references/checklist.md +13 -0
- package/skills/aicf-capability-authoring/references/examples.md +12 -0
- package/skills/aicf-capability-authoring/references/field-guide.md +13 -0
- package/skills/aicf-capability-authoring/references/manifest-decision-tree.md +10 -0
- package/skills/aicf-control-plane-ui/SKILL.md +90 -0
- package/skills/aicf-control-plane-ui/assets/control-plane-wireframe.md +29 -0
- package/skills/aicf-control-plane-ui/assets/ui-acceptance-checklist.md +11 -0
- package/skills/aicf-control-plane-ui/references/api-contracts.md +14 -0
- package/skills/aicf-control-plane-ui/references/approval-console.md +12 -0
- package/skills/aicf-control-plane-ui/references/control-plane-screens.md +14 -0
- package/skills/aicf-control-plane-ui/references/operational-ux.md +7 -0
- package/skills/aicf-controls-and-budgets/SKILL.md +88 -0
- package/skills/aicf-controls-and-budgets/assets/budget-fixture.json +15 -0
- package/skills/aicf-controls-and-budgets/assets/controls-policy.yaml +14 -0
- package/skills/aicf-controls-and-budgets/references/budget-policy.md +12 -0
- package/skills/aicf-controls-and-budgets/references/circuit-breakers.md +13 -0
- package/skills/aicf-controls-and-budgets/references/control-types.md +10 -0
- package/skills/aicf-docs-and-examples/SKILL.md +87 -0
- package/skills/aicf-docs-and-examples/assets/example-readme-template.md +21 -0
- package/skills/aicf-docs-and-examples/assets/provider-guide-template.md +17 -0
- package/skills/aicf-docs-and-examples/references/docs-style-guide.md +9 -0
- package/skills/aicf-docs-and-examples/references/example-app-checklist.md +9 -0
- package/skills/aicf-docs-and-examples/references/public-api-docs.md +11 -0
- package/skills/aicf-docs-and-examples/references/quickstart-template.md +17 -0
- package/skills/aicf-eval-authoring/SKILL.md +86 -0
- package/skills/aicf-eval-authoring/assets/eval-case.yaml +17 -0
- package/skills/aicf-eval-authoring/assets/eval-result.json +15 -0
- package/skills/aicf-eval-authoring/assets/promptfoo.config.yaml +12 -0
- package/skills/aicf-eval-authoring/references/deterministic-scorers.md +13 -0
- package/skills/aicf-eval-authoring/references/eval-rubric.md +10 -0
- package/skills/aicf-eval-authoring/references/golden-test-patterns.md +8 -0
- package/skills/aicf-eval-authoring/references/real-provider-evals.md +8 -0
- package/skills/aicf-governance-lifecycle/SKILL.md +91 -0
- package/skills/aicf-governance-lifecycle/assets/lifecycle-change-request.md +21 -0
- package/skills/aicf-governance-lifecycle/assets/riskwaiver.md +17 -0
- package/skills/aicf-governance-lifecycle/references/compatibility-checks.md +21 -0
- package/skills/aicf-governance-lifecycle/references/impact-analysis.md +13 -0
- package/skills/aicf-governance-lifecycle/references/lifecycle-state-machine.md +15 -0
- package/skills/aicf-governance-lifecycle/references/riskcompiler-rules.md +13 -0
- package/skills/aicf-migration/SKILL.md +87 -0
- package/skills/aicf-migration/assets/legacy-tool-inventory.csv +3 -0
- package/skills/aicf-migration/assets/migration-plan.md +19 -0
- package/skills/aicf-migration/references/conversion-playbook.md +9 -0
- package/skills/aicf-migration/references/legacy-tool-riskmap.md +14 -0
- package/skills/aicf-migration/references/migration-inventory.md +12 -0
- package/skills/aicf-migration/references/rollout-plan.md +12 -0
- package/skills/aicf-observability-replay/SKILL.md +88 -0
- package/skills/aicf-observability-replay/assets/replay-fixture.json +23 -0
- package/skills/aicf-observability-replay/assets/trace-to-golden-template.yaml +14 -0
- package/skills/aicf-observability-replay/references/redacted-telemetry.md +7 -0
- package/skills/aicf-observability-replay/references/replay-simulation.md +10 -0
- package/skills/aicf-observability-replay/references/trace-span-map.md +17 -0
- package/skills/aicf-observability-replay/references/trace-to-golden.md +12 -0
- package/skills/aicf-policy-and-risk/SKILL.md +88 -0
- package/skills/aicf-policy-and-risk/assets/policy-broker.template.ts +29 -0
- package/skills/aicf-policy-and-risk/assets/policy-decision-fixture.json +15 -0
- package/skills/aicf-policy-and-risk/references/deny-approval-allow-matrix.md +12 -0
- package/skills/aicf-policy-and-risk/references/policy-broker-contract.md +13 -0
- package/skills/aicf-policy-and-risk/references/risktier-rules.md +10 -0
- package/skills/aicf-policy-and-risk/references/semantic-invariants.md +9 -0
- package/skills/aicf-provider-conformance/SKILL.md +88 -0
- package/skills/aicf-provider-conformance/assets/provider-conformance-case.yaml +18 -0
- package/skills/aicf-provider-conformance/assets/provider-matrix.json +19 -0
- package/skills/aicf-provider-conformance/references/provider-normalization-matrix.md +14 -0
- package/skills/aicf-provider-conformance/references/provider-runtime-boundaries.md +10 -0
- package/skills/aicf-provider-conformance/references/schema-compatibility.md +8 -0
- package/skills/aicf-provider-conformance/references/tool-call-mapping.md +8 -0
- package/skills/aicf-release-hygiene/SKILL.md +85 -0
- package/skills/aicf-release-hygiene/assets/release-report-template.md +19 -0
- package/skills/aicf-release-hygiene/references/forbidden-artifacts.md +12 -0
- package/skills/aicf-release-hygiene/references/package-smoke-test.md +10 -0
- package/skills/aicf-release-hygiene/references/release-checklist.md +10 -0
- package/skills/aicf-release-hygiene/references/source-archive-rules.md +8 -0
- package/skills/aicf-runtime-integration/SKILL.md +87 -0
- package/skills/aicf-runtime-integration/assets/context-builder.template.ts +22 -0
- package/skills/aicf-runtime-integration/assets/handler-registry.template.ts +20 -0
- package/skills/aicf-runtime-integration/assets/runtime-integration-plan.md +23 -0
- package/skills/aicf-runtime-integration/references/capability-router-patterns.md +8 -0
- package/skills/aicf-runtime-integration/references/context-builder-patterns.md +8 -0
- package/skills/aicf-runtime-integration/references/handler-registry-patterns.md +8 -0
- package/skills/aicf-runtime-integration/references/policy-broker-adapter.md +8 -0
- package/skills/aicf-runtime-integration/references/runtime-integration-checklist.md +10 -0
- package/skills/aicf-security-redteam/SKILL.md +89 -0
- package/skills/aicf-security-redteam/assets/promptfoo-redteam.config.yaml +13 -0
- package/skills/aicf-security-redteam/assets/redteam-case.yaml +15 -0
- package/skills/aicf-security-redteam/references/prompt-injection-patterns.md +12 -0
- package/skills/aicf-security-redteam/references/redteam-acceptance.md +11 -0
- package/skills/aicf-security-redteam/references/security-test-pack-map.md +11 -0
- package/skills/aicf-security-redteam/references/tool-misuse-patterns.md +11 -0
- package/skills/aicf-skill-pack-maintenance/SKILL.md +88 -0
- package/skills/aicf-skill-pack-maintenance/assets/skill-template.md +52 -0
- package/skills/aicf-skill-pack-maintenance/references/overlap-prevention.md +9 -0
- package/skills/aicf-skill-pack-maintenance/references/plugin-packaging.md +8 -0
- package/skills/aicf-skill-pack-maintenance/references/skill-authoring-rules.md +10 -0
- package/skills/aicf-skill-pack-maintenance/references/trigger-evaluation.md +9 -0
- package/skills/aicf-storage-and-aws/SKILL.md +86 -0
- package/skills/aicf-storage-and-aws/assets/dynamodb-store.template.ts +21 -0
- package/skills/aicf-storage-and-aws/assets/postgres-store.template.ts +22 -0
- package/skills/aicf-storage-and-aws/assets/step-functions-approval.template.ts +15 -0
- package/skills/aicf-storage-and-aws/references/aws-adapter-boundaries.md +8 -0
- package/skills/aicf-storage-and-aws/references/least-privilege-iam.md +11 -0
- package/skills/aicf-storage-and-aws/references/step-functions-approval.md +10 -0
- package/skills/aicf-storage-and-aws/references/store-interface-map.md +10 -0
- package/skills/aicf-trust-redaction-retention/SKILL.md +88 -0
- package/skills/aicf-trust-redaction-retention/assets/redaction-policy.yaml +15 -0
- package/skills/aicf-trust-redaction-retention/assets/trust-labelled-context.json +18 -0
- package/skills/aicf-trust-redaction-retention/references/redaction-rules.md +8 -0
- package/skills/aicf-trust-redaction-retention/references/retention-rules.md +11 -0
- package/skills/aicf-trust-redaction-retention/references/taint-rules.md +9 -0
- package/skills/aicf-trust-redaction-retention/references/trust-labels.md +16 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Conversion Playbook
|
|
2
|
+
|
|
3
|
+
1. Split broad tools into narrow capabilities.
|
|
4
|
+
2. Add entity manifests where domain objects are shared.
|
|
5
|
+
3. Define strict input and output schemas.
|
|
6
|
+
4. Add policy, risk, lifecycle, approval, audit, and idempotency metadata.
|
|
7
|
+
5. Route only selected read/prepare slices to models.
|
|
8
|
+
6. Wire handlers to existing app services.
|
|
9
|
+
7. Add deterministic evals and red-team tests.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Legacy Tool Risk Map
|
|
2
|
+
|
|
3
|
+
Classify legacy tools by:
|
|
4
|
+
|
|
5
|
+
- data sensitivity.
|
|
6
|
+
- side effects.
|
|
7
|
+
- tenant/account scope.
|
|
8
|
+
- external communication.
|
|
9
|
+
- money movement.
|
|
10
|
+
- permissions.
|
|
11
|
+
- workflow impact.
|
|
12
|
+
- existing validation and policy gaps.
|
|
13
|
+
|
|
14
|
+
Use the highest applicable risk tier until controls prove otherwise.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Migration Inventory
|
|
2
|
+
|
|
3
|
+
Capture:
|
|
4
|
+
|
|
5
|
+
- model providers and caller code.
|
|
6
|
+
- tool/function definitions.
|
|
7
|
+
- prompt templates and context sources.
|
|
8
|
+
- data access and side effects.
|
|
9
|
+
- auth, tenant, account, and permission sources.
|
|
10
|
+
- evals, traces, error handling, and current rollout controls.
|
|
11
|
+
|
|
12
|
+
Keep inventory public-safe when stored in this package.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Rollout Plan
|
|
2
|
+
|
|
3
|
+
Recommended stages:
|
|
4
|
+
|
|
5
|
+
- inventory and design.
|
|
6
|
+
- shadow mode.
|
|
7
|
+
- read-only mode.
|
|
8
|
+
- limited canary.
|
|
9
|
+
- production gate.
|
|
10
|
+
- rollback or disable path.
|
|
11
|
+
|
|
12
|
+
Each stage should have success criteria, monitoring, and rollback instructions.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: aicf-observability-replay
|
|
3
|
+
description:
|
|
4
|
+
Add AICF tracing, OpenTelemetry-style events, Langfuse/export adapters, replay
|
|
5
|
+
fixtures, simulation, and trace-to-golden workflows while keeping raw prompts and
|
|
6
|
+
provider payloads redacted by default.
|
|
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: "observability-replay"
|
|
15
|
+
aicf.skill.scope: "builder"
|
|
16
|
+
aicf.skill.strictness: "fail-closed-runtime"
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# AICF Observability Replay
|
|
20
|
+
|
|
21
|
+
## Purpose
|
|
22
|
+
|
|
23
|
+
Guide traceability, replay, simulation, and trace-to-golden work while keeping sensitive
|
|
24
|
+
content out of default telemetry and eval artifacts.
|
|
25
|
+
|
|
26
|
+
## Use this skill when
|
|
27
|
+
|
|
28
|
+
- Adding AICF trace events, span metadata, optional observability adapters, replay
|
|
29
|
+
fixtures, or trace-to-golden workflows.
|
|
30
|
+
- Testing redaction, provider attribution, replay determinism, or eval score capture.
|
|
31
|
+
- Turning sanitized runtime behavior into regression fixtures.
|
|
32
|
+
|
|
33
|
+
## Do not use this skill when
|
|
34
|
+
|
|
35
|
+
- Building an observability platform or requiring external SDKs at root import time.
|
|
36
|
+
- Capturing raw sensitive model input or provider transport bodies by default.
|
|
37
|
+
- Running live providers in normal tests.
|
|
38
|
+
|
|
39
|
+
## Inputs to inspect first
|
|
40
|
+
|
|
41
|
+
- Observability modules, runtime trace events, provider loops, eval runner, replay
|
|
42
|
+
fixtures, redaction helpers, and package tests.
|
|
43
|
+
- References: [trace span map](references/trace-span-map.md),
|
|
44
|
+
[replay simulation](references/replay-simulation.md),
|
|
45
|
+
[trace-to-golden](references/trace-to-golden.md), and
|
|
46
|
+
[redacted telemetry](references/redacted-telemetry.md).
|
|
47
|
+
|
|
48
|
+
## Workflow
|
|
49
|
+
|
|
50
|
+
1. Add trace events for context build, routing, model call, tool call, policy decision,
|
|
51
|
+
prepare, approval, commit, final response, and eval score.
|
|
52
|
+
2. Include run ID, provider, model, capability IDs, schema version, selected slice,
|
|
53
|
+
redacted args hash, decision reasons, latency, cost/tokens where available, and
|
|
54
|
+
outcome.
|
|
55
|
+
3. Redact sensitive content before sinks, exports, and replay fixtures.
|
|
56
|
+
4. Add replay fixture generation for deterministic mock, policy-only, router-only, and
|
|
57
|
+
validation-only paths.
|
|
58
|
+
5. Add trace-to-golden drafts with review required by default.
|
|
59
|
+
6. Keep OpenTelemetry and Langfuse integration optional and adapter-isolated.
|
|
60
|
+
7. Add tests for redaction, provider attribution, sink failure isolation, and replay
|
|
61
|
+
determinism.
|
|
62
|
+
|
|
63
|
+
Use [replay fixture](assets/replay-fixture.json) and
|
|
64
|
+
[trace-to-golden template](assets/trace-to-golden-template.yaml) as examples.
|
|
65
|
+
|
|
66
|
+
## Required outputs
|
|
67
|
+
|
|
68
|
+
- Trace/replay implementation or audit notes.
|
|
69
|
+
- Sanitized replay or eval draft fixtures where requested.
|
|
70
|
+
- Tests proving redaction and deterministic replay behavior.
|
|
71
|
+
|
|
72
|
+
## Validation
|
|
73
|
+
|
|
74
|
+
- Run observability, replay, eval, or provider mock tests relevant to the change.
|
|
75
|
+
- Confirm trace events contain provider attribution only when metadata supplies it.
|
|
76
|
+
- Confirm trace-to-golden output requires human review.
|
|
77
|
+
|
|
78
|
+
## Hard rules
|
|
79
|
+
|
|
80
|
+
- Do not capture private model input or provider transport bodies by default.
|
|
81
|
+
- Do not let sink failures fail runtime execution.
|
|
82
|
+
- Do not make optional observability SDKs required by root/runtime imports.
|
|
83
|
+
- Do not commit generated traces or archives.
|
|
84
|
+
|
|
85
|
+
## Handoff format
|
|
86
|
+
|
|
87
|
+
Report events added, replay modes covered, redaction behavior, optional adapters
|
|
88
|
+
touched, tests run, and remaining review gaps.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0",
|
|
3
|
+
"traceId": "trace_example_001",
|
|
4
|
+
"mode": "deterministic_mock",
|
|
5
|
+
"selectedCapabilities": ["support.ticket.get"],
|
|
6
|
+
"toolCalls": [
|
|
7
|
+
{
|
|
8
|
+
"callId": "call_example_001",
|
|
9
|
+
"capabilityId": "support.ticket.get",
|
|
10
|
+
"argsHash": "hash_example_args"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"toolResults": [
|
|
14
|
+
{
|
|
15
|
+
"callId": "call_example_001",
|
|
16
|
+
"status": "ok",
|
|
17
|
+
"resultHash": "hash_example_result"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"redactionSummary": {
|
|
21
|
+
"rawContentIncluded": false
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
schemaVersion: "1.0"
|
|
2
|
+
suite: synthetic-support
|
|
3
|
+
requireReview: true
|
|
4
|
+
sourceTraceRef:
|
|
5
|
+
traceId: trace_example_001
|
|
6
|
+
expected:
|
|
7
|
+
selectedCapabilities:
|
|
8
|
+
- support.ticket.get
|
|
9
|
+
forbiddenToolCalls: []
|
|
10
|
+
privateDetailsExcluded: true
|
|
11
|
+
scorers:
|
|
12
|
+
- selected_capability_exact
|
|
13
|
+
- no_forbidden_tool_call
|
|
14
|
+
- private_detail_excluded
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Redacted Telemetry
|
|
2
|
+
|
|
3
|
+
Default telemetry should include IDs, hashes, counts, status, reasons, provider/model
|
|
4
|
+
metadata, latency, token or cost summaries, and safe outcome summaries.
|
|
5
|
+
|
|
6
|
+
Default telemetry should not include private prompts, provider transport bodies,
|
|
7
|
+
secrets, stack traces, account IDs, tenant IDs, or sensitive tool output.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Replay Simulation
|
|
2
|
+
|
|
3
|
+
Replay modes should avoid live calls by default:
|
|
4
|
+
|
|
5
|
+
- deterministic mock compares recorded safe snapshots.
|
|
6
|
+
- policy only reruns decisions.
|
|
7
|
+
- router only reruns selected slices.
|
|
8
|
+
- tool validation only reruns parsing and schema validation.
|
|
9
|
+
|
|
10
|
+
Live replay must require explicit opt-in and caller-provided provider code.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Trace Span Map
|
|
2
|
+
|
|
3
|
+
Recommended trace events:
|
|
4
|
+
|
|
5
|
+
- runtime start and end.
|
|
6
|
+
- context build.
|
|
7
|
+
- capability route.
|
|
8
|
+
- provider call.
|
|
9
|
+
- tool call parse.
|
|
10
|
+
- tool execution.
|
|
11
|
+
- policy decision.
|
|
12
|
+
- action prepare, approval, commit, verify.
|
|
13
|
+
- eval scoring.
|
|
14
|
+
- runtime error.
|
|
15
|
+
|
|
16
|
+
Use stable AICF attributes and provider attributes only when the event supplies provider
|
|
17
|
+
metadata.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Trace To Golden
|
|
2
|
+
|
|
3
|
+
Trace-to-golden drafts should include:
|
|
4
|
+
|
|
5
|
+
- selected capability expectations.
|
|
6
|
+
- tool input subsets.
|
|
7
|
+
- policy decision and action state.
|
|
8
|
+
- forbidden tool calls.
|
|
9
|
+
- private-detail exclusion checks.
|
|
10
|
+
- review metadata.
|
|
11
|
+
|
|
12
|
+
Raw content is excluded unless an explicitly unsafe diagnostic mode is requested.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: aicf-policy-and-risk
|
|
3
|
+
description:
|
|
4
|
+
Implement or audit AICF policy broker, risk tiers, semantic invariants, tenant
|
|
5
|
+
isolation, permissions, entitlements, approval requirements, and fail-closed runtime
|
|
6
|
+
decisions.
|
|
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: "policy-risk"
|
|
15
|
+
aicf.skill.scope: "builder"
|
|
16
|
+
aicf.skill.strictness: "fail-closed-runtime"
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# AICF Policy And Risk
|
|
20
|
+
|
|
21
|
+
## Purpose
|
|
22
|
+
|
|
23
|
+
Guide implementation or review of policy decisions so AICF capabilities fail closed,
|
|
24
|
+
respect tenant/account/user context, and keep side effects under host authority.
|
|
25
|
+
|
|
26
|
+
## Use this skill when
|
|
27
|
+
|
|
28
|
+
- Adding or auditing a policy broker, decision request, or risk tier rule.
|
|
29
|
+
- Checking tenant isolation, permissions, entitlements, autonomy, approvals, or
|
|
30
|
+
idempotency.
|
|
31
|
+
- Investigating why a capability should be denied, allowed, or approval-required.
|
|
32
|
+
- Adding tests for semantic invariants or runtime decision behavior.
|
|
33
|
+
|
|
34
|
+
## Do not use this skill when
|
|
35
|
+
|
|
36
|
+
- Creating provider adapters, model loops, long-running workflows, or storage systems.
|
|
37
|
+
- Granting the model authority to override host policy.
|
|
38
|
+
- Weakening validation to make a tool call pass.
|
|
39
|
+
|
|
40
|
+
## Inputs to inspect first
|
|
41
|
+
|
|
42
|
+
- Capability manifests, policy docs, runtime context builder, router, executor, and
|
|
43
|
+
lifecycle manager.
|
|
44
|
+
- Existing tests for decisions, approvals, idempotency, and invalid args.
|
|
45
|
+
- References for [policy broker contract](references/policy-broker-contract.md),
|
|
46
|
+
[risk tiers](references/risktier-rules.md),
|
|
47
|
+
[decision matrix](references/deny-approval-allow-matrix.md), and
|
|
48
|
+
[semantic invariants](references/semantic-invariants.md).
|
|
49
|
+
|
|
50
|
+
## Workflow
|
|
51
|
+
|
|
52
|
+
1. Identify the capability, operation, risk tier, side effects, lifecycle state, and
|
|
53
|
+
required context.
|
|
54
|
+
2. Verify user, account, tenant, permission, autonomy, and entitlement inputs come from
|
|
55
|
+
host-controlled context.
|
|
56
|
+
3. Apply semantic invariants before policy hooks.
|
|
57
|
+
4. Let host hooks only make decisions stricter.
|
|
58
|
+
5. Return structured deny, approval-required, or allow decisions with safe reason codes.
|
|
59
|
+
6. Add tests for missing context, invalid args, risk ceilings, approval requirements,
|
|
60
|
+
and hook failures.
|
|
61
|
+
7. Keep policy decision records public-safe.
|
|
62
|
+
|
|
63
|
+
Use [policy broker template](assets/policy-broker.template.ts) and
|
|
64
|
+
[decision fixture](assets/policy-decision-fixture.json) as safe starting points.
|
|
65
|
+
|
|
66
|
+
## Required outputs
|
|
67
|
+
|
|
68
|
+
- Policy or risk changes with reason codes and tests.
|
|
69
|
+
- Updated docs or fixtures only when public contracts change.
|
|
70
|
+
- A clear statement of denied, approval-required, and allowed paths.
|
|
71
|
+
|
|
72
|
+
## Validation
|
|
73
|
+
|
|
74
|
+
- Run targeted runtime/policy tests and the package check relevant to the repo.
|
|
75
|
+
- Confirm errors are safe and stack traces or internal diagnostics are not model-facing.
|
|
76
|
+
- Confirm policy failures do not call handlers or commit side effects.
|
|
77
|
+
|
|
78
|
+
## Hard rules
|
|
79
|
+
|
|
80
|
+
- Fail closed when context, args, policy state, or host hooks are missing or ambiguous.
|
|
81
|
+
- Do not allow host hooks to turn a denial into allow.
|
|
82
|
+
- Do not expose commit to model-originated tool execution.
|
|
83
|
+
- Do not store raw identifiers in public evidence by default.
|
|
84
|
+
|
|
85
|
+
## Handoff format
|
|
86
|
+
|
|
87
|
+
List decisions changed, reason codes, tests added, commands run, and any remaining host
|
|
88
|
+
integration obligations.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { JsonObject } from "ai-capability-framework";
|
|
2
|
+
|
|
3
|
+
export type ExamplePolicyDecision = {
|
|
4
|
+
allowed: boolean;
|
|
5
|
+
approvalRequired: boolean;
|
|
6
|
+
reasons: string[];
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export function decideExamplePolicy(input: {
|
|
10
|
+
capabilityId: string;
|
|
11
|
+
operation: string;
|
|
12
|
+
args?: JsonObject;
|
|
13
|
+
permissions: string[];
|
|
14
|
+
tenantPresent: boolean;
|
|
15
|
+
}): ExamplePolicyDecision {
|
|
16
|
+
if (!input.tenantPresent) {
|
|
17
|
+
return {
|
|
18
|
+
allowed: false,
|
|
19
|
+
approvalRequired: false,
|
|
20
|
+
reasons: ["missing_tenant_context"]
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
if (
|
|
24
|
+
!input.permissions.includes(`capability:${input.capabilityId}:${input.operation}`)
|
|
25
|
+
) {
|
|
26
|
+
return { allowed: false, approvalRequired: false, reasons: ["missing_permission"] };
|
|
27
|
+
}
|
|
28
|
+
return { allowed: true, approvalRequired: false, reasons: ["policy_allowed"] };
|
|
29
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"capabilityId": "support.ticket.get",
|
|
3
|
+
"operation": "read",
|
|
4
|
+
"context": {
|
|
5
|
+
"subjectRef": "subject_hash_example",
|
|
6
|
+
"tenantRef": "tenant_hash_example",
|
|
7
|
+
"permissions": ["capability:support.ticket.get:read"],
|
|
8
|
+
"autonomyTier": "assistive"
|
|
9
|
+
},
|
|
10
|
+
"expected": {
|
|
11
|
+
"allowed": true,
|
|
12
|
+
"approvalRequired": false,
|
|
13
|
+
"reasons": ["policy_allowed"]
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Deny, Approval, Allow Matrix
|
|
2
|
+
|
|
3
|
+
| Condition | Decision |
|
|
4
|
+
| ------------------------------------------- | ------------------------------------------ |
|
|
5
|
+
| Missing required subject/account/tenant | deny |
|
|
6
|
+
| Invalid args | deny |
|
|
7
|
+
| Capability disabled or deprecated by policy | deny |
|
|
8
|
+
| Risk above autonomy ceiling | deny or approval required, based on policy |
|
|
9
|
+
| Prepare needs human approval | approval required |
|
|
10
|
+
| Commit lacks stored prepared action | deny |
|
|
11
|
+
| Host hook throws | deny |
|
|
12
|
+
| All required checks pass | allow |
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Policy Broker Contract
|
|
2
|
+
|
|
3
|
+
The broker maps runtime context and a capability request to one of three outcomes:
|
|
4
|
+
|
|
5
|
+
- deny
|
|
6
|
+
- approval required
|
|
7
|
+
- allow
|
|
8
|
+
|
|
9
|
+
Inputs must include capability ID, operation, args when required, subject/account/tenant
|
|
10
|
+
context, permissions, autonomy, and risk limits.
|
|
11
|
+
|
|
12
|
+
Policy hooks may add denials or approval requirements. They must not override core
|
|
13
|
+
safety denials.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Risk Tier Rules
|
|
2
|
+
|
|
3
|
+
- Low: read-only, narrow, no sensitive data.
|
|
4
|
+
- Medium: scoped data access, workflow preparation, or moderate operational impact.
|
|
5
|
+
- High: money movement, personal data, external messages, destructive behavior, or
|
|
6
|
+
permission-sensitive work.
|
|
7
|
+
- Critical: irreversible or broad high-impact action, privileged account changes, or
|
|
8
|
+
regulated data exposure.
|
|
9
|
+
|
|
10
|
+
When in doubt, infer the higher risk and require explicit controls.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Semantic Invariants
|
|
2
|
+
|
|
3
|
+
- Commit cannot be model-executed.
|
|
4
|
+
- Prepare and commit links must refer to the expected capability IDs.
|
|
5
|
+
- Destructive and money-moving actions require audit and idempotency.
|
|
6
|
+
- Tenant-scoped capabilities require tenant context.
|
|
7
|
+
- Account-scoped capabilities require account context.
|
|
8
|
+
- Output validation failures become safe runtime failures.
|
|
9
|
+
- Terminal action states cannot return to approved or pending.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: aicf-provider-conformance
|
|
3
|
+
description:
|
|
4
|
+
"Validate AICF capabilities across provider and framework adapters: OpenAI, Anthropic
|
|
5
|
+
Claude, Google Gemini, Vercel AI SDK, MCP, LangChain/LangGraph, and Semantic
|
|
6
|
+
Kernel-compatible workflows."
|
|
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: "provider-conformance"
|
|
15
|
+
aicf.skill.scope: "builder"
|
|
16
|
+
aicf.skill.strictness: "fail-closed-runtime"
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# AICF Provider Conformance
|
|
20
|
+
|
|
21
|
+
## Purpose
|
|
22
|
+
|
|
23
|
+
Guide provider and framework conformance work so one routed AICF capability slice maps
|
|
24
|
+
safely and reversibly across supported descriptor and runtime bridges.
|
|
25
|
+
|
|
26
|
+
## Use this skill when
|
|
27
|
+
|
|
28
|
+
- Validating OpenAI, Anthropic Claude, Google Gemini, Vercel AI SDK, MCP,
|
|
29
|
+
LangChain/LangGraph, or Semantic Kernel-compatible exports.
|
|
30
|
+
- Checking schema normalization, tool-name mapping, reverse binding, tool-call parsing,
|
|
31
|
+
or model-safe tool results.
|
|
32
|
+
- Running or updating a cross-provider conformance matrix.
|
|
33
|
+
|
|
34
|
+
## Do not use this skill when
|
|
35
|
+
|
|
36
|
+
- Adding a new provider runtime implementation.
|
|
37
|
+
- Calling live models or provider APIs.
|
|
38
|
+
- Weakening AICF schemas to satisfy a provider.
|
|
39
|
+
- Building a model gateway.
|
|
40
|
+
|
|
41
|
+
## Inputs to inspect first
|
|
42
|
+
|
|
43
|
+
- Provider adapter code, shared provider helpers, conformance tests, fixtures, schemas,
|
|
44
|
+
docs, and public examples.
|
|
45
|
+
- References: [provider matrix](references/provider-normalization-matrix.md),
|
|
46
|
+
[schema compatibility](references/schema-compatibility.md),
|
|
47
|
+
[tool-call mapping](references/tool-call-mapping.md), and
|
|
48
|
+
[runtime boundaries](references/provider-runtime-boundaries.md).
|
|
49
|
+
|
|
50
|
+
## Workflow
|
|
51
|
+
|
|
52
|
+
1. Identify the target provider or framework bridge.
|
|
53
|
+
2. Export descriptors from the routed read/prepare slice.
|
|
54
|
+
3. Validate provider-safe names, collision handling, and reverse binding.
|
|
55
|
+
4. Validate schema normalization and deterministic diagnostics for unsupported schema
|
|
56
|
+
features.
|
|
57
|
+
5. Validate tool-call parsing, arg validation, and unknown-tool handling.
|
|
58
|
+
6. Validate model-safe result envelopes and approval-required behavior.
|
|
59
|
+
7. Confirm commit capabilities are not exported or executable.
|
|
60
|
+
8. Run or update the conformance matrix with structured pass/fail output.
|
|
61
|
+
|
|
62
|
+
Use [conformance case](assets/provider-conformance-case.yaml) and
|
|
63
|
+
[provider matrix](assets/provider-matrix.json) templates as starting points.
|
|
64
|
+
|
|
65
|
+
## Required outputs
|
|
66
|
+
|
|
67
|
+
- Provider conformance changes or a conformance report summary.
|
|
68
|
+
- Diagnostics for unsupported schema features, collisions, invalid args, and unsafe
|
|
69
|
+
exports.
|
|
70
|
+
- Tests or fixtures proving provider-safe behavior.
|
|
71
|
+
|
|
72
|
+
## Validation
|
|
73
|
+
|
|
74
|
+
- Run provider conformance tests and package checks relevant to the repo.
|
|
75
|
+
- Confirm root/runtime imports remain free of optional provider SDK requirements.
|
|
76
|
+
- Confirm provider outputs never include private diagnostics or raw transport bodies.
|
|
77
|
+
|
|
78
|
+
## Hard rules
|
|
79
|
+
|
|
80
|
+
- AICF validation remains canonical.
|
|
81
|
+
- Reverse mapping must use generated bindings, not guessed provider names.
|
|
82
|
+
- Commit capabilities must not be model-exposed.
|
|
83
|
+
- Live provider calls must stay opt-in.
|
|
84
|
+
|
|
85
|
+
## Handoff format
|
|
86
|
+
|
|
87
|
+
Report providers checked, descriptors exported, failures or warnings, tests run, and
|
|
88
|
+
remaining conformance gaps.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
id: support.ticket.get.provider_matrix
|
|
2
|
+
providerTargets:
|
|
3
|
+
- openai
|
|
4
|
+
- anthropic
|
|
5
|
+
- gemini
|
|
6
|
+
- ai-sdk
|
|
7
|
+
- mcp
|
|
8
|
+
capabilityId: support.ticket.get
|
|
9
|
+
expected:
|
|
10
|
+
descriptorExported: true
|
|
11
|
+
commitExported: false
|
|
12
|
+
argsValidation: canonical_aicf
|
|
13
|
+
modelSafeEnvelope: true
|
|
14
|
+
scorers:
|
|
15
|
+
- tool_name_valid
|
|
16
|
+
- binding_matches_capability
|
|
17
|
+
- no_commit_export
|
|
18
|
+
- safe_error_envelope
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0",
|
|
3
|
+
"providers": [
|
|
4
|
+
"openai",
|
|
5
|
+
"anthropic",
|
|
6
|
+
"gemini",
|
|
7
|
+
"ai-sdk",
|
|
8
|
+
"mcp",
|
|
9
|
+
"langchain",
|
|
10
|
+
"semantic-kernel-openapi"
|
|
11
|
+
],
|
|
12
|
+
"dimensions": [
|
|
13
|
+
"descriptor_export",
|
|
14
|
+
"schema_normalization",
|
|
15
|
+
"tool_call_parsing",
|
|
16
|
+
"model_safe_envelope",
|
|
17
|
+
"commit_not_exported"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Provider Normalization Matrix
|
|
2
|
+
|
|
3
|
+
Track each provider target against:
|
|
4
|
+
|
|
5
|
+
- descriptor export.
|
|
6
|
+
- provider-safe name mapping.
|
|
7
|
+
- schema normalization.
|
|
8
|
+
- schema downgrade diagnostics.
|
|
9
|
+
- tool-call parsing.
|
|
10
|
+
- arg validation.
|
|
11
|
+
- model-safe result envelope.
|
|
12
|
+
- approval-required handling.
|
|
13
|
+
- commit-not-exported behavior.
|
|
14
|
+
- provider error normalization.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Provider Runtime Boundaries
|
|
2
|
+
|
|
3
|
+
Provider runtimes and bridges must:
|
|
4
|
+
|
|
5
|
+
- expose only routed read/prepare capabilities.
|
|
6
|
+
- keep commit host-controlled.
|
|
7
|
+
- keep SDK imports optional and subpath isolated.
|
|
8
|
+
- avoid raw transport capture by default.
|
|
9
|
+
- use mock clients in normal tests.
|
|
10
|
+
- fail closed on provider, parse, budget, or loop errors.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Schema Compatibility
|
|
2
|
+
|
|
3
|
+
Provider schema exports may use provider-compatible subsets, but AICF input schemas
|
|
4
|
+
remain canonical for validation.
|
|
5
|
+
|
|
6
|
+
Reject or diagnose non-object roots, unsupported composition, ambiguous nullable
|
|
7
|
+
handling, and provider features that would weaken validation. Clone schemas before
|
|
8
|
+
normalization.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Tool Call Mapping
|
|
2
|
+
|
|
3
|
+
- Generate provider-safe names deterministically.
|
|
4
|
+
- Preserve provider call IDs when available.
|
|
5
|
+
- Resolve provider tool names through the binding map.
|
|
6
|
+
- Reject unknown names and calls outside the routed slice.
|
|
7
|
+
- Validate args against the original AICF input schema.
|
|
8
|
+
- Return model-safe envelopes for validation errors and denials.
|