Contributing to Shared Agents
Thank you for helping improve the Core open-source project. This document covers what belongs here, how to develop locally, and how to submit changes.
Website: shared-agents docs — Contributing (when served from the project website).
Core vs team data
| Contribute here (Core PR) | Do not commit to Core |
|---|---|
scripts/, sa CLI | team/learnings/ |
adapters/, adapters/manifest.json | config.local.yaml |
skills/ (shared, OSS-safe) | Secrets, customer URLs, internal runbooks |
rules/ (shared core rules, OSS-safe) | team/rules/ (private team rules) |
docs/ | Private team content |
Learnings, team rules, and optional team-only skills live in a separate private Git repository, mounted at $SHARED_AGENTS_HOME/team/. Configure it during sa bootstrap or in config.local.yaml (team.remote).
Team rules use flat team/rules/*.mdc (like team/skills/) — no pending/review workflow.
Development setup
Clone and install into your home directory (or use an existing bootstrap):
git clone git@github.com:netgrade-digital/shared-agents.git
cd shared-agents
./sa install --home "$HOME/.shared-agents"
source ~/.bashrc
Work on the clone, then test changes:
sa install --dry-run
sa install
sa check
Run scripts directly when debugging: python3 scripts/install-adapters.py check ~/.shared-agents
Pull requests
- Branch from
mainwith a focused change (one feature or fix per PR). - Test with
sa installandsa checkon at least one supported tool you have installed. - Describe what changed and why; include
sa checkoutput if you touched adapters. - No secrets — no tokens, private URLs, or team learnings in Core.
- CLI changes — update
scripts/saand keepsa helpaccurate; extend skills/sa-cli/SKILL.md when behavior is non-obvious.
We use fast-forward merges on main. Keep PRs small and reviewable.
Adding support for a new AI tool
-
Add an entry to
adapters/manifest.json:detect— config directory (e.g.~/.cursor)detect_bins— optional CLI names on$PATHagents_mdand/orsync— see existing tools
-
Add
adapters/<tool-id>/README.mdwith setup notes. -
Verify:
sa install --dry-run sa install sa check -
Open a PR with sample
sa checkoutput.
Manifest fields
| Field | Purpose |
|---|---|
detect | Config dir exists → tool considered installed |
detect_bins | Binary on $PATH → also counts as installed |
agents_md | Global instructions file (marker block merged on install) |
sync | Hook-based sync (e.g. Cursor, Claude Code) |
Installed ≠ configured. sa install only configures tools that are detected as installed. sa check reports the full matrix.
For tools without a manifest entry, users can copy adapters/generic/instructions.md into their global agent config.
See also docs/adapters.md.
Adding or changing Core skills
- Place skills under
skills/<name>/SKILL.md. - Keep content safe for a public repo (no credentials, no client-specific paths).
- After adding a skill or rule, teammates run
sa sync(auto-links). Usesa installfor first-time adapter setup. - If the skill changes agent workflow (paths, sync, learnings, rules), update rules/shared-agents-knowledge.mdc and skills/shared-agents-knowledge/SKILL.md when relevant.
Team skills and rules (team repo, not Core)
Private team content lives under team/skills/ and team/rules/ (flat .mdc for rules). Use the wizards:
sa skill new # team/skills/<name>/SKILL.md
sa skill rm # remove (picker)
sa rule new # team/rules/<slug>.mdc
sa rule rm # remove (picker)
Commit/push defaults to yes after create/remove (--no-git to skip). Teammates run sa sync. No pending/review workflow (unlike learnings).
Learnings (team repo, not Core)
Agents draft learnings in team/learnings/pending/ after explicit user approval. Humans promote them with sa review into team/learnings/approved/.
Contributors documenting this flow should edit docs/learnings.md and docs/canonical-paths.md, not put learning files in Core PRs.
Documentation (website + repo)
Guides live under docs/ and render on the project website at /docs/<slug>. When adding topics:
- Write in English
- Use clear H1 titles (become page titles)
- Cross-link with
docs/other-topic.mdor/docs/other-topic
CONTRIBUTING.md (this file) is also published as /docs/contributing.
Shared MCPs (planned)
MCP wiring is specced in docs/shared-mcps.md. When implemented:
- Mirror
install-adapters.pypatterns (stdlib only, idempotent,--check,--dry-run) - Integrate via
sa install/install.sh - Never commit
mcps.local.yamlor secrets - Use managed prefix
sa-for team servers
Reference: mcps/manifest.example.json
Code guidelines
| Area | Rule |
|---|---|
| Installer Python | stdlib only — no pip dependencies |
| Shell | bash, set -euo pipefail where applicable |
| Idempotency | Re-running sa install must be safe |
| Ctrl+C | Interactive scripts use UserCancelled / run_cli_main from sa_ui.py |
| Paths | Team files under $SHARED_AGENTS_HOME — see docs/canonical-paths.md |
Questions
Open a GitHub issue for bugs or design questions. For day-to-day CLI usage, run sa help or read the CLI reference and sa-cli skill.