Topic 03

Team Policy

Team

Every team that uses coding agents already has a policy. On most teams it is whatever each engineer assumed: that the company plan was the one in use, that pasting a log was fine, that somebody else had read the terms. The written version fits on one page and answers four questions. What may be sent to a provider, which tools on which plans are approved, what must be disclosed, and who decides when the answer is unclear.

Cragmoor writes its page the week after the incident in Chapter 12, when Kai pasted a stack trace into a session and sent a staging database password to a provider, on a plan nobody had checked. Nobody broke a rule that day, because there was no rule to break. That is the case for writing one.

What May Be Sent

The first half of the page classifies data by a single test: may it enter an agent's context? Everything an agent reads can leave the machine, so the question is the same as asking whether it may be sent to the provider. The team's own code may. Code a client owns under contract may only if the contract allows it, and someone has to read the contract to know. Cragmoor has one such case: it maintains the booking widget a partner gym chain embeds on its own site, under a contract that forbids sharing the widget's code with third parties. That repository is on the policy's list of places agents do not go. Secrets never: keys, passwords and tokens stay out of every session, which is why Chapter 12 moved them out of the files the agent reads.

Personal data gets its own line. Member names, emails and birth dates appear in the booking service's fixtures and logs, and in a session they appear only as synthetic stand-ins. Production data and unredacted logs do not go in at all. When a bug needs real data, the policy says to reproduce it with made-up records first, which is what Chapter 10 asked for anyway.

May this enter an agent's session? Cragmoor's answers
The team's own code→Yes, on an approved plan
Code a client owns under contract→Only where the contract allows it
Keys, passwords, tokens→Never
Member names, emails, birth dates→Only as synthetic stand-ins
Production data and unredacted logs→No; reproduce with made-up records

This section became standard after a public case in 2023. Engineers at a large electronics manufacturer pasted internal source code into a consumer chat assistant to get help with it. The company found out, and in May 2023 restricted generative AI tools on its devices and networks while it put safeguards in place. The engineers were not careless people. They were reasonable people with no written rule, using the tool the way it invited them to.

Approved Tools and Plans

The data terms live in the plan, not the product. The same assistant can come in a consumer plan and a business plan whose terms differ on how long sessions are retained, whether they may be used for training, and where data is processed. One provider, for example, lets users of its individual plans choose whether their sessions train future models, with retention running to five years if they opt in, while its business plans and its API fall under separate commercial terms. Chapter 15 gives the current plans per tool, dated.

So the policy names approved plans, not tools: this tool, on the company's business plan, paid for by the company. It also says the one sentence that prevents most leaks: company code is never used under a personal account. An engineer whose personal plan is better than the company's will otherwise use it, with the company's code, under the personal plan's terms.

Disclosure

The policy says what is disclosed and where. AI-assisted commits are marked in the way Chapter 9 described, with a trailer in the commit message. The pull-request template gets one line: what the agent did, in a few words. "Wrote the tests and the first draft; I rewrote the offer logic." "Mechanical rename across 40 files." "None."

The purpose is routing review attention, as the previous two topics showed: a reviewer who knows the agent wrote the tests reads the tests first. It is not a confession, and a team that treats it as one gets fewer honest answers. Some clients and some open-source projects require disclosure as well, which the next topic covers; a team that records it routinely already has what they ask for.

Boundaries of Use

The third block is the set of defaults every session starts from. The permission settings the team shares, from Chapter 3, are checked into the repository so every engineer starts from the same list. No production credentials in any session, ever, which is the least-privilege rule of Chapter 12. Payments, authentication and refunds need a second human reviewer on any change, AI-assisted or not.

The block also names the code the team writes by hand, the decision Chapter 5 made for one change and Chapter 14 makes for whole areas. At Cragmoor that is the payment provider's signature check and, after Chapter 14's month of counting, the offer and hold logic in waitlist. And it says which repositories a cloud agent may be assigned to, a question the last topic of this chapter answers.

Who Decides

A policy needs an owner, a place to ask and a review date. Cragmoor's owner is Ines. Questions go in the team channel, and anything she cannot answer goes to whoever signs the provider contracts. The tools change monthly, and their plans' terms change with them, so a policy without a review date is accurate for about a quarter and then quietly wrong.

The page lives in the repository, next to the project instructions file, and changes go through a pull request like code. That gives the policy a history, a reviewer, and a diff that shows exactly what changed when someone asks why something that was allowed in May is not allowed in October.

Cragmoor's Page

The result is twelve lines. Each one is a default or a name, not a paragraph of principle, and every line answers a question someone on the team actually asked.

docs/ai-policy.md at Cragmoor
# Coding agents at Cragmoor                 owner: Ines   next review: 2027-01-15
Data:   our code yes · client code only where the contract allows · secrets never
        personal data only synthetic · production data and raw logs never
Plans:  the approved tools on the company business plan only; no personal accounts
Setup:  start from the shared permission settings in the repository; no edits to deny rules
Creds:  no production credentials in any session; staging keys only through the vault
Review: payments, authentication and refunds need a second human reviewer
By hand: payment signature check; waitlist offer and hold logic
Disclose: AI-assisted commits carry the trailer; pull-request template line filled in
Cloud agents: booking and schedule repositories only; issues labelled agent-ready
Unsure? Ask in #engineering before you paste, not after
Changes to this page go through a pull request reviewed by the owner

Kai's first reaction was that it was too short to matter. His second, a week later, was to check it before pasting a log, which is what it is for.

Team Policy vs the Project Instructions File

The project instructions file from Chapter 3 is read by the agent at the start of every session: commands, conventions, what not to touch. A rule the agent must obey belongs there or, better, in the permission settings, which are enforced rather than read.

The team policy is read by people: what may be sent, which tools on which plans, what to disclose, who decides. Rules about data cannot live only in the instructions file, because by the time the agent reads the file, the data has already been sent.

Misconceptions
  • "Our plan doesn't train on our data, so anything can be sent." Training is one exposure. Retention, the provider's sub-processors, the processing region and the rules on personal data all still apply.
  • "A policy is a list of bans." Mostly it is defaults and an owner. A ban without an approved alternative sends engineers to their personal accounts, which is worse than no ban.
  • "Disclosure means admitting lower quality." It is information for the reviewer about where to look. Teams that make it a routine one-line field get more of it, and more honest answers.
  • "Reasonable engineers do not need it written down." The incidents that made these policies standard were caused by reasonable people who had no written rule.
  • "Write it once." Plans and their terms change on a monthly scale. A policy without a review date goes quietly wrong within a quarter.
Why It Matters
  • Name approved plans, not just tools. The data terms are a property of the plan, and the same tool comes in plans with different terms.
  • Classify data by whether it may enter a context: your code yes, secrets never, personal data only synthetic. Everything in a context can leave the machine.
  • Make disclosure a one-line field in the pull-request template. Short and routine gets filled in; long and formal does not.
  • Give the policy a named owner and a review date, and keep it in the repository. It ages as fast as the tools do.

Knowledge Check

Under Cragmoor's policy, you need to debug a booking failure that only happens for one real member. What may go into the agent's session?

  • The member's real booking record, since it is needed to reproduce the bug
  • The relevant code plus a made-up record that reproduces the same failure
  • The raw production log lines, as long as the session is on the business plan
  • Anything at all, because the approved plan does not train on Cragmoor's data

Why does Cragmoor's policy approve plans rather than tools?

  • Business plans are cheaper per engineer than consumer plans of the same tool
  • Each plan of a tool offers different features, so approval must name the plan
  • Data terms such as retention and training use differ between plans of a tool
  • Tool names change often, while the names of plans stay stable for years

What is the disclosure line in the pull-request template for?

  • Holding AI-assisted changes to a stricter approval standard than others
  • Telling the reviewer where to look first, based on what the agent did
  • Satisfying copyright law, which requires every AI-assisted line to be marked
  • Recording who to blame if an AI-assisted change later causes an incident

Where should the rule "never send secrets to a provider" live?

  • Only in the project instructions file, so the agent knows to refuse secrets
  • Only in the permission settings, since enforced rules beat written ones
  • In the team policy for people, backed by deny rules on secret files
  • In the provider's settings, which filter secrets out of incoming context

A team wrote a careful policy in January and has not touched it since. It is now October. What is the most likely problem?

  • The approved tools and their plans' terms have changed under it
  • The data classes are out of date, since secrets are handled differently
  • It has expired, since a policy is only legally valid for one quarter
  • It has grown too long for engineers to read, since policies only grow

You got correct