Local Team Setup
Set up one repository Code Nucleus, install the team's governance packs, give each developer a Nucleus-scoped token, and configure every coding host to request policy context before code work.
1. Establish the repository boundary
Use one Nucleus per repository or monorepo unless credentials, ownership, retention, deletion policy, region, or jurisdiction require a harder boundary.
Each developer stores credentials outside the repository:
export NEUTRON_API_URL="https://neutronai.dev/api"
export NEUTRON_API_TOKEN="<nucleus-access-token>"
export NEUTRON_NUCLEUS_ID="<repository-nucleus-id>"
Use a workspace API key only for control-plane installation. Use a Nucleus access token for day-to-day agent recall.
export NEUTRON_WORKSPACE_API_KEY="<workspace-api-key>"
Never commit either token or copy it into an agent instruction file, issue, workflow, screenshot, or log.
2. Install governance packs
In the platform, open Plugins, select the repository Nucleus, then search for and install:
- Team coding policy baseline
- Team-governed code change skill
- Team engineering governance knowledge base
- The standards, skill, and knowledge base for each language used by the repository
- GitHub CI/CD assets when the repository uses GitHub Actions
Built-in catalog installation requires an active Enterprise workspace. Teams on another plan can upload workspace-owned custom skills and knowledge bases with the same scope design.
To install complete catalog packs through the API, omit assetIds:
for plugin_id in \
team-code-governance \
typescript-javascript-engineering-governance \
rust-engineering-governance \
github-cicd-governance
do
curl --fail-with-body \
--request POST \
"$NEUTRON_API_URL/v1/platform/industry-library/plugins/$plugin_id/install" \
--header "Authorization: Bearer $NEUTRON_WORKSPACE_API_KEY" \
--header "Content-Type: application/json" \
--data "{\"nucleusId\":\"$NEUTRON_NUCLEUS_ID\"}"
done
Install a single asset by passing its ID:
curl --fail-with-body \
--request POST \
"$NEUTRON_API_URL/v1/platform/industry-library/plugins/cpp-engineering-governance/install" \
--header "Authorization: Bearer $NEUTRON_WORKSPACE_API_KEY" \
--header "Content-Type: application/json" \
--data "{
\"nucleusId\": \"$NEUTRON_NUCLEUS_ID\",
\"assetIds\": [\"cpp-coding-skill\"]
}"
Use a full pack for consistent defaults. Selective installation is useful when a repository already has a stricter standards document but still needs the coding skill or reference knowledge.
3. Make governance part of every context request
For Codex, add governance scopes to .neutron/codex-code-nucleus.json:
{
"nucleusId": "payments-service",
"agentId": "agent:codex",
"defaultScopes": [
"governance:team-code",
"standards:typescript-javascript",
"delivery:github-actions",
"repo:root",
"agent:codex"
]
}
Keep task-specific service, package, infrastructure, and test scopes out of a huge global default. Add them when the task requires them.
Put this policy in the root AGENTS.md, then use the dedicated host guide for Codex, Claude Code, Google Gemini, GitHub Copilot, Cursor, or Windsurf:
## Neutron team code governance
Before planning, editing, reviewing, testing, committing, or deploying code:
1. Validate the repository Nucleus ID.
2. Request `memory_agent_context` with `governance:team-code`, every relevant
`standards:*` scope, the smallest repo/service/test scopes, and this host's
`agent:*` scope.
3. Read the current repository instructions, manifests, tool configuration,
source, and tests before applying recalled guidance.
4. Surface missing, stale, or conflicting policy before editing.
Before completion:
1. Run the repository's formatter, analyzer, compile/type, test, security, and
build gates for every changed surface.
2. Report exact commands, real results, skipped checks, approved exceptions,
and residual risk. Do not invent results or weaken a gate to pass.
3. Store only safe reviewed outcomes in the current `agent:*` scope. Promote a
lesson into shared policy only after human approval.
Never send secrets, customer data, hidden prompts, model scratchpads, or private
reasoning to Neutron.
4. Request a bounded governance capsule
Example for a mixed Rust and TypeScript change:
{
"nucleusId": "payments-service",
"scopeIds": [
"governance:team-code",
"standards:rust",
"standards:typescript-javascript",
"delivery:github-actions",
"repo:root",
"service:payments-api",
"tests:payments-api",
"agent:claude-code"
],
"agentId": "agent:claude-code",
"task": "Add idempotent refund processing and update its CI coverage without changing the public API.",
"tokenBudget": 1800,
"cachePolicy": {
"mode": "prefer_cache",
"ttlSeconds": 300,
"keyMode": "intent_profile",
"includeDynamicRag": true
}
}
The agent should be able to name the applicable standards, likely files, required tests, public contracts, and security boundaries before it edits anything.
5. Add fast local gates
Create one repository-owned verification command rather than asking every agent to invent commands. For example:
#!/usr/bin/env bash
set -euo pipefail
pnpm format:check
pnpm lint
pnpm typecheck
pnpm test
cargo fmt --all -- --check
cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo test --workspace --all-features
Adapt this to the actual repository. Do not run commands for languages or packages the repository does not use.
A versioned pre-push hook can provide early feedback:
#!/usr/bin/env bash
set -euo pipefail
exec ./scripts/verify-local.sh
git config core.hooksPath .githooks
Local hooks are helpful but bypassable. Required CI checks and reviews remain the authoritative merge gate.
6. Prove each developer host
For every supported coding host:
- Start a fresh local session in the repository.
- Ask it to explain the applicable team and language rules for one bounded change.
- Confirm it requests the expected governance and repository scopes.
- Confirm it reads the current files rather than editing from memory alone.
- Introduce a safe test fixture that violates one deterministic rule and confirm the local gate fails.
- Fix the fixture and confirm the agent runs the real check successfully.
- Verify the handoff lists commands, results, exceptions, and remaining risk.
- Save one safe outcome, start a new session, and confirm it is recalled only for a relevant task.
7. Keep policy current
Review governance packs when language versions, toolchains, architecture, security policy, supported platforms, CI workflows, or ownership change. Tombstone obsolete policy and invalidate affected context caches. Do not let an archive, queue, or compaction job resurrect deleted standards.