What Can Engineers Safely Give an AI Assistant?
A workflow for code, logs and test data
An AI assistant may need the structure of a failed transformation. It rarely needs the customer identities inside the records that triggered it. It may need to understand how a job retrieves credentials. It does not need the credentials themselves.
For engineering managers and security teams, the practical question is not simply whether AI is approved. It is whether a particular combination of code, logs, requirements and data is appropriate for a particular task in an approved environment.
At Publicis Sapient, our approach combines AI-assisted engineering with human validation, purposeful data use and clear accountability. The workflow below translates those principles into proposed review checklists for four everyday activities: reviewing unfamiliar code, debugging failed jobs, drafting transformations and generating tests.
The starting rule: share the minimum context that preserves the engineering problem—not the maximum information available.
Before the task: establish the information boundary
Engineering, platform, security and privacy owners should agree on an operating policy before engineers begin submitting material. That policy should identify approved environments, permitted information categories, prohibited inputs and escalation routes.
For each task, record:
- Purpose: What specific question should the assistant help answer?
- Inputs: Which code fragments, fields, logs and requirements are necessary?
- Environment: Which approved assistant, model and connected systems will process them?
- Handling: What are the arrangements for access, storage, retention and any use for model training?
- Ownership: Who can approve disclosure, and who validates the result?
Review connected context as well as the visible prompt. Repository access, documentation integrations and context stores should fall within the same approved boundary. Permission to use an assistant should not be treated as permission to expose every system an engineer can access.
Use three decision paths: proceed within an established policy; minimize or substitute the inputs and review again; or pause for explicit approval. If the problem cannot be explained without exposing restricted information, keep the investigation within an appropriately controlled environment or use a non-AI method.
1. Reviewing unfamiliar code
Objective: Understand behavior, dependencies and assumptions without disclosing an entire application unnecessarily.
Start with the smallest coherent function or module, its input and output contracts, and a focused question. Ask the assistant to distinguish what the code demonstrates from what it is inferring.
Review checklist
- Necessary context: Include relevant types, dependencies and calling behavior. Can unrelated modules and implementation details be omitted without making the explanation misleading?
- Confidential business logic: Inspect algorithms, thresholds, comments and naming conventions. Does the excerpt reveal proprietary rules? Where possible, substitute a generic rule with the same control flow. Otherwise, seek approval for the exact logic.
- Personal information: Review embedded examples, fixtures and comments. Replace real people and account references with invented identifiers where identities are not relevant.
- Credentials: Remove passwords, tokens, private keys and credential-bearing configuration. Use placeholders or mocked interfaces to describe authentication behavior.
- Approval ownership: The code owner should confirm scope and interpretation. The business or intellectual-property owner should approve restricted logic, with security review for authentication-related material.
Validation before use: Compare the explanation with the actual code and its dependencies. A fluent explanation is not evidence that the assistant has understood an undocumented business exception.
2. Debugging failed jobs
Objective: Reproduce the failure with a narrow diagnostic example rather than submit a production log bundle.
Prepare the relevant error, a limited stack trace, the execution context and the smallest input that still reproduces the issue. Keep the original evidence in its controlled location.
Review checklist
- Necessary context: Include the failing operation, expected behavior, relevant runtime details and the sequence leading to the error. Confirm that the reduced example still fails in the same way.
- Confidential business logic: Review query text, table names, paths and operational messages. Replace sensitive labels consistently while preserving dependencies needed for diagnosis.
- Personal information: Inspect record payloads and free-text messages, not just obvious identity fields. Use approved masked or pseudonymized records only when an entirely invented reproduction is insufficient.
- Credentials: Check configuration dumps, connection details and error messages for secrets. Represent credential retrieval with placeholders; do not paste a secret to demonstrate an authentication failure.
- Approval ownership: The job or service owner should approve the diagnostic scope. Security should review credential and access issues; the data owner and privacy reviewer should assess any remaining sensitive records.
The secrets-manager lesson
On a Publicis Sapient modernization project, Sapient Slingshot helped translate legacy processing logic into a PySpark module. The engineer still needed to refine credential handling through a secrets manager and validate the solution in its target environment.
The practical lesson is to give the assistant the required authentication pattern and a mocked retrieval interface—not a live credential. Engineers should then verify the generated implementation against the approved secrets-manager integration. Faster translation does not establish that credential handling is correct.
3. Drafting transformations
Objective: Generate an implementation from an approved specification, not an unrestricted extract of production data.
A useful input package can contain a minimized schema, field meanings, transformation rules and invented input/output pairs. Describe the relationships explicitly rather than expecting the assistant to infer them from customer records.
Review checklist
- Necessary context: Specify join keys, data types, null handling, ordering, aggregation and expected outputs. Include only the columns needed for the transformation.
- Confidential business logic: Identify commercially sensitive calculations or decision rules. Can the engineering pattern be drafted with generic parameters, leaving restricted values inside the controlled implementation?
- Personal information: Remove identity fields unless the operation genuinely depends on their structure. Use invented values or approved pseudonyms to demonstrate linkage without supplying real identities.
- Credentials: Provide source and destination interface descriptions without access secrets. Keep runtime credential configuration separate from the prompt.
- Approval ownership: The data owner should approve the schema and examples; the business-rule owner should confirm the specification. Engineering should validate implementation, with security and privacy review for exceptions.
Validation before use: Check results against independently reviewed expectations. Syntactically valid code can still use the wrong join, count duplicate events twice or apply a business rule at the wrong level.
4. Generating tests
Objective: Expand coverage without turning production records into reusable prompt content.
Ask for scenarios from an approved behavioral specification. Request expected outcomes and the reasoning behind each test so reviewers can challenge both the fixture and the assertion.
Review checklist
- Necessary context: Supply the behavior under test, invariants and known edge cases. Distinguish functional correctness from performance or environment-specific testing.
- Confidential business logic: Check whether test assertions disclose protected thresholds or algorithms. Keep restricted expectations within an approved testing environment when they cannot be generalized.
- Personal information: Prefer synthetic scenarios built from rules. If real-derived fixtures are necessary, review their source, transformation and remaining identification risk before submission.
- Credentials: Use mocks and nonfunctional placeholders for access-related tests. Do not include production secrets in fixtures or generated examples.
- Approval ownership: The engineering or quality lead should own coverage and assertions. Domain owners should validate business outcomes; data and privacy owners should approve sensitive or real-derived fixtures.
For example, a case-lifecycle test could use invented cases and workers to represent switching between cases, leaving one open overnight and returning eight hours later. The important relationship is between events, elapsed time and the productivity rule—not the identity of the worker. Reviewers should establish the expected productive time independently rather than accept the assistant’s calculation.
Minimize exposure without removing the meaning
Substituting data is only useful if the replacement preserves what the test needs to prove. Choose the technique around that requirement.
Minimized examples retain only the code, fields and records needed to demonstrate behavior. Confirm that removing surrounding context has not removed the cause of the failure.
Masked records modify or remove selected values. Review the resulting relationships: independently shuffling fields or changing dates may obscure identities while also destroying the ordering or correlation being tested.
Pseudonymized records replace identities with artificial identifiers. Use consistent replacements where joins or repeated events matter, and keep any reidentification mapping outside the assistant’s inputs under separate control. Pseudonymization is not anonymization.
Synthetic scenarios construct invented records from approved requirements. Start with the required behavior rather than asking an unapproved assistant to synthesize data from a confidential production extract.
Before approving any substitute, check:
- Do related records still join correctly, including one-to-many relationships?
- Are event order, relevant time intervals and boundary conditions preserved?
- Are nulls, duplicates, invalid values and rare cases represented?
- Are the distributions needed for this test represented, or is this only a functional example?
- Could the remaining combination of attributes identify someone or reveal confidential business behavior?
Masking and synthetic generation should not be treated as automatic privacy clearance. Review both how the alternative was created and what it still reveals. Preserving enough detail for a meaningful test requires a separate judgment from whether that detail is appropriate to disclose.
Organizational safeguards are not product features
Sapient Slingshot supports contextual engineering workflows and offers capabilities such as on-premises deployment options, customizable security controls and human-in-the-loop oversight. These capabilities can support an organization’s controls; they do not decide which information a team is authorized to submit.
Organizations remain responsible for classification, vendor evaluation, approval ownership, configuration, employee training, monitoring and audits. Platform owners should verify the controls in the actual deployment rather than infer protection from a product label or deployment location. No masking technique, hosting choice or generated-code check automatically establishes compliance.
Close the loop before shipping
Treat the assistant’s output as a draft requiring engineering judgment. Review generated code, explanations and tests for correctness, inappropriate disclosure and alignment with the real environment.
Keep a proportionate decision record: the task, approved input categories, substitutions made, approver and validation outcome—without unnecessarily duplicating sensitive material. Reassess approval when the task, connected sources or information scope changes.
The goal is not to deprive engineers of context. It is to make context deliberate: enough to solve the problem, constrained to the approved purpose and backed by a human who remains accountable for the result.