Agents

Team Code Governance

Neutron gives a development team one durable, scoped source of coding policy that can follow work across Codex, Claude Code, Gemini CLI, GitHub Copilot, Cursor, and Windsurf. Install team policy, language standards, coding skills, and source-anchored knowledge bases into the repository's Code Nucleus, then require every coding agent to request those scopes before it plans or edits code.

Neutron improves consistency, but it is not a compiler or a policy engine by itself. Reliable enforcement combines agent guidance with deterministic local checks, protected-branch CI, reviews, and deployment approvals.

The four control layers

LayerPurposeAuthority
Repository instructionsProject-specific architecture, naming, security, ownership, and commands in AGENTS.md or the host adapter.Closest rule to the code.
Code Nucleus governanceShared team policy, installed language skills, standards, reference knowledge, and reviewed outcomes.Scoped supporting context.
Local gatesFast formatter, analyzer, compiler/type, test, secret, and build feedback.Developer feedback; locally bypassable.
CI and reviewRequired checks, code owners, rulesets, environments, attestations, and deployment approval.Authoritative merge and release gate.

The coding agent must use all four. A successful Neutron recall is not proof that code complies, and a passing formatter is not proof that architecture or security policy was followed.

Installable governance catalog

The Industry Library includes:

  • Team Code Governance — shared policy, an always-invoked change workflow, and governance reference knowledge in governance:team-code.
  • Language Engineering Governance — three assets per language in standards:<language>:
    • coding standards
    • governed coding skill
    • source-anchored language knowledge base
  • GitHub CI/CD Governance — workflow standards, a CI/CD review skill, and GitHub Actions knowledge in delivery:github-actions.

Supported language packs cover C++, Rust, Go, Swift, TypeScript and JavaScript, Java, Kotlin, C# and .NET, Python, PHP, Ruby, Shell, and SQL/database engineering.

See the language pack catalog for every pack ID, scope, validation baseline, and source set.

For a TypeScript service deployed through GitHub Actions, request:

governance:team-code
standards:typescript-javascript
delivery:github-actions
repo:root
service:edge-api
tests:edge-api
agent:codex

Use only the languages and repository surfaces relevant to the task. A polyglot change can request multiple standards:* scopes, but a documentation-only change should not pull every language pack into context.

Required agent loop

flowchart LR
  A["Bounded developer task"] --> B["Validate Nucleus and request governance scopes"]
  B --> C["Read repository rules and current files"]
  C --> D["Plan and implement with installed skills"]
  D --> E["Run deterministic local checks"]
  E --> F["CI, review, and approval"]
  F --> G["Store safe reviewed outcome"]

The agent should stop and report the gap when a required policy scope is missing, stale, or contradictory. It must never silently replace team policy with a generic model preference.

Policy precedence

Use this order when instructions conflict:

  1. Security, privacy, legal, tenant-isolation, and data-handling requirements.
  2. The current developer task and explicit human decisions.
  3. Repository and path-specific instructions.
  4. Team architecture decisions and supported-version policy recalled from the current Nucleus.
  5. Installed language and delivery standards.
  6. General model knowledge.

Record exceptions with the rule, affected paths, reason, owner, approver, risk, compensating test, and expiry or review date. Do not teach an exception back to shared memory as a new rule unless the team approves it.

Failure-safe behavior

If Neutron is unavailable, the agent should still read repository instructions and run deterministic checks. It should clearly mark governance context as unavailable and must not claim full policy verification. For high-risk changes, teams can require the agent to stop until governance context is restored.

Never send secrets, access tokens, production data, private customer payloads, hidden prompts, model scratchpads, or raw chain-of-thought to Neutron.

Continue