AI Insights: AI Coding Assistants for developers in HMG
This guidance outlines how His Majesty's Government (HMG) developers can safely and effectively use AI coding assistants. It adapts the ten principles from the AI Playbook for the UK Government to cover use cases, security, intellectual property, human control, and commercial collaboration. The document aims to help organizations enjoy productivity benefits while minimizing risks such as shadow IT, security vulnerabilities, and license compliance issues.
Summary and content fields are drawn from the document text and are pending editorial review.
Who issued it
Who it governs
Developers, technical leaders, and public sector organizations looking to safely adopt AI coding assistants.
What the document contains
The document addresses the use of artificial intelligence coding assistants (AICAs) within government development environments. It covers practical measures for secure deployment, managing intellectual property and license risks, maintaining human control over code changes, and adhering to government digital service standards.
It does not provide binding legal enforcement mechanisms or detailed regulatory penalties for non-compliance, focusing instead on internal organizational guidance and best practices.
- AI coding assistants act as inexperienced colleagues with good recall and require human oversight and validation for all generated code.
- Developers must use enterprise-level contracts or local open source models to prevent proprietary code and prompts from being recorded for external training.
- Main branch protections, vulnerability scanning, and peer reviews are essential safeguards against hallucinations and security risks.
- Organizations should work with commercial and information assurance colleagues from the start to ensure compliance with policies.
- Open source tools and models should be considered first to align with government service standards and technical codes of practice.
· Introduction
· Guidance
- Principles
- Principle 1: You know what AI is and what its limitations are
- Principle 2: You use AI lawfully, ethically and responsibly
- Principle 3: You know how to use AI securely
- Principle 4: You have meaningful human control at the right stages
- Principle 5: You understand how to manage the full AI lifecycle
- Principle 6: You use the right tool for the job
- Principle 7: You are open and collaborative
- Principle 8: You work with commercial colleagues from the start
- Principle 9: You have the skills and expertise needed to implement and use AI solutions
- Principle 10: You use these principles alongside your organisation’s policies and have the right assurance in placeHow it scores
Each score is backed by a quote verified against the document text. Editorial review has not yet confirmed them.
Accountability
4/5Clear responsibility for AI outcomes
As a developer, you are fully responsible for the code you produce, whether this is AI assisted or not.
Principle 4
screening score · 2026-11-26
Fairness
2/5Non-discrimination and equitable treatment
However, AICAs will not actively recognise or flag bias, so it remains up to you to make sure your code does not contain bias.
Principle 2
screening score · 2026-11-26
Human Dignity
0/5Respect for the inherent worth of persons
screening score · 2026-11-26
Human Oversight
4/5Humans remain in control of consequential decisions
Merges made to the main branch need to be subject to human peer review by one or more peers, and adhere to your organisation’s policies.
Principle 4
screening score · 2026-11-26
Privacy
3/5Protection of personal data and private life
At this time, most proprietary AICAs that are available free of charge or on a personal licence level will record prompts and responses in order to train their provider’s models.
Principle 3
screening score · 2026-11-26
Transparency
1/5Openness about how AI systems work and are used
From this, you will be able to make an informed decision on usage.
Principle 2
screening score · 2026-11-26
Enforcement
1/5Consequences and compliance mechanisms with real force
If in doubt, your information assurance (IA) colleagues or senior responsible owners can help to determine the feasibility of use
Principle 3
screening score · 2026-11-26
Impact Assessment
1/5Required assessment of an AI system's risks/impacts before or during use
Commercial colleagues will have knowledge of commercial processes and requirements such as organisational policy compliance with processes such as commercial and technical information assurance (IA) and data protection impact assessments (DPIA).
Principle 8
screening score · 2026-11-26