Ref sp agents policy
Skill swiftpostlabs/agentic-tools/.agents/skills/ref-sp-agents-policy
Shareable skills and tools for AI agents
npx -y skills add swiftpostlabs/agentic-tools --skill ref-sp-agents-policyAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Repository-specific guidance for the agents-policy feature, .agents/config.json policy section, and generated AI restriction outputs in this repo. Use when: working on the agents-policy feature, updating policy docs, or debugging Copilot, Claude Code, or Gemini policy generation here.
SKILL.md
6.4 KB, as published. Nobody here has run it
Swiftpost Agents Policy
Purpose
Document this repository's concrete AI policy implementation: the canonical policy file, the grouped agentic-tools policy CLI surface, the generated client outputs, and the service-selection model that decides which vendors receive managed files.
When to use this skill
- Working on the agents-policy feature or its generator logic.
- Updating policy docs, CI enforcement, or command references in this repo.
- Debugging why
.aiexclude,.claude/settings.json, or.vscode/settings.jsondid or did not change. - Explaining how the
policysection in.agents/config.jsonshould be authored in this repo.
Scope boundaries
This skill is the repo-local layer: how the agents-policy feature is actually built here — the
.agents/config.json policy section, the sync command, and the generated vendor outputs.
ref-sp-agents-security— the portable model behind it: protected vs excluded files, the multi-client enforcement story, and why the policy exists. Read that for the why, this for the how it is wired here.ref-sp-agents-skills-management— the other consumer of.agents/config.json. The two features share a config file, not a subject.ref-sp-dev-repo-conventions— where the feature's code belongs in this repo's layout.
Stable Surface
- Canonical policy file:
.agents/config.jsonwith a top-levelpolicyobject - Canonical commands:
uv run agentic-tools policy syncuv run agentic-tools policy checkuv run agentic-tools policy import-vscode
- Implemented as the
agents-policyfeature of theagentic-toolspackage (Python primary, with a legacy Node port); locate it by feature name rather than a fixed path while the package is being restructured. - Packaged CLI entrypoint:
agentic-tools; standalone policy bins are not exported.
Policy Model
The source-of-truth file is JSON. Its top-level policy object currently supports these main fields:
services— list of enabled client outputs, such asgemini,claude, andcopilotprotectedFiles— sensitive patterns that should be blocked or deterredexcludedFiles— noisy or generated patterns that should stay out of Gemini/native exclusion when enabledterminalAutoApprove— managed VS Code terminal approval map for Copilot-related toolingeditAutoApprove— managed VS Code edit approval map
If services is omitted, the implementation defaults to all supported services.
Generated Outputs
| Service | Output | Behavior |
|---|---|---|
gemini | .aiexclude | Generated from protectedFiles and excludedFiles. If Gemini is disabled, the managed file is removed. |
claude | .claude/settings.json | Managed permissions.deny Read(...) rules track protectedFiles. If Claude is disabled, managed read rules are cleaned. |
copilot | .vscode/settings.json | Managed file associations, Copilot language disablement, and approval maps track the policy. If Copilot is disabled, the managed sections are cleaned. |
Command Behavior
uv run agentic-tools policy sync
- Finds the nearest
.agents/config.jsonwith apolicyobject, with.agents/policy.jsonand legacy.ai-policy.jsonfallback. - Loads the policy file, validates
services, and syncs the enabled outputs. - Cleans managed sections for disabled outputs so stale vendor files do not linger.
uv run agentic-tools policy check
- Resolves the same policy and generated output paths as the normal sync flow.
- Compares the current managed files to the generated contents without rewriting them.
- Exits with an error when drift exists and tells the user to run either
uv run agentic-tools policy syncoruv run agentic-tools policy import-vscode.
uv run agentic-tools policy import-vscode
- Imports current VS Code approval maps into the policy section first.
- Writes the updated policy back to
.agents/config.jsonwhen using unified config. - Runs the same sync flow afterward.
Decision Rules
- Use
.agents/config.jsonas the source of truth for new work. - Prefer
servicesto control vendor coverage instead of hand-editing generated files. - Keep
.aiexcludeat the repo root; do not replace it with a made-up Gemini-only ignore file. - Treat
.claude/settings.jsonand.vscode/settings.jsonas partially managed outputs, not primary authoring surfaces for policy-owned sections. - Keep docs and CI on the canonical
agentic-tools policycommand family; do not add standalone policy entrypoints.
Validation
- Run
uv run agentic-tools policy syncafter changing.agents/config.jsonor the sync implementation. - Run
uv run agentic-tools policy checkin CI or before commit flows that should reject policy drift without mutating files. - Run the agents-policy unit tests with
uv run poe test(or target the feature's collocated*_test.py) when changing policy logic. - Check CI drift enforcement in
.github/workflows/ci.yamlif output file names or command names change. - Keep
.aiexclude,.claude/settings.json, and.vscode/settings.jsonaligned with the current policy file.
References
- Read
./references/checklist.mdfor a quick maintenance or debugging pass. - Read
./references/config-shape.mdfor the current.agents/config.jsonpolicy contract. - Read
./references/copilot.md,./references/claude-code.md, and./references/gemini.mdfor vendor-specific output details. - Read
.agents/skills/ref-sp-agents-security/SKILL.mdfor the portable concepts that sit above this repo's concrete implementation. - Read
./assets/trigger-eval-queries.example.jsonwhen testing trigger quality for policy-tooling prompts. - Review
./evals/evals.jsonwhen validating output quality for policy implementation explanations.