Advanced Software Development

Chapter 15
AI-Assisted Development and Emerging Futures

Bachelors Program in Computer Science Engineering
Advanced Software Development   •   Bachelor

AI-Assisted Development and Emerging Futures

Introduction

Generative artificial intelligence (AI) has become a significant development tool rather than merely a research topic. Large language models (LLMs), code-generation assistants, automated test generators, documentation systems, and AI-enabled operations platforms can accelerate software work. However, generated code is not automatically correct, secure, maintainable, or legally usable. The central professional skill is therefore not simply prompting an AI system, but integrating it into an engineering process that preserves human responsibility, technical verification, and organizational accountability.

AI-assisted development refers to the use of machine-learning systems to support activities across the software life cycle: requirements analysis, design, programming, testing, documentation, deployment, monitoring, and maintenance. The term assisted is important. In most professional contexts, AI should increase the capability of a development team while leaving authority for important decisions with accountable people.

This chapter examines practical uses of generative AI, validation and governance requirements, autonomous agents, low-code development, green software, and likely future ecosystems.

Learning Objectives

After studying this chapter, a student should be able to:

  1. Explain how generative AI supports coding, testing, documentation, and operations.
  2. Critically evaluate generated outputs using software-engineering evidence.
  3. Identify security, privacy, bias, intellectual-property, and accountability risks.
  4. Design a controlled workflow for human–AI collaboration.
  5. Compare autonomous agents, low-code platforms, and conventional development.
  6. Apply sustainability principles to AI-enabled software systems.
  7. Recommend governance and professional practices for emerging development ecosystems.

1. Generative AI in the Software Life Cycle

A generative model produces text, code, images, tests, or other artifacts from an input prompt and its learned statistical representations. In software engineering, a prompt may contain a natural-language requirement, existing source code, an error message, or a desired test behavior. The model generates a candidate artifact, not a verified solution.

A useful distinction is between four activities:

  • Generation: producing a candidate implementation or explanation.
  • Transformation: translating, refactoring, summarizing, or documenting existing material.
  • Evaluation: checking correctness, security, quality, and compliance.
  • Orchestration: coordinating tools, repositories, tests, and deployment systems.

The first two can often be automated more readily than the third. Evaluation requires a specification, measurable criteria, and appropriate evidence. A fluent answer can still contain incorrect assumptions, obsolete APIs, insecure defaults, or fabricated references.

1.1 Coding assistance

AI coding tools can provide code completion, function generation, API examples, refactoring suggestions, migration support, and explanations of unfamiliar code. They are especially useful for repetitive boilerplate, test fixtures, serialization code, and adaptations between well-established frameworks.

Their weaknesses are equally important. A model may infer the wrong business rule, confuse library versions, omit error handling, introduce inefficient algorithms, or reproduce vulnerable patterns. Generated code can also create an illusion of understanding: a developer may accept code that compiles without being able to maintain it.

A disciplined coding workflow is:

  1. State the requirement, constraints, interfaces, and non-functional properties.
  2. Ask for a small, reviewable change rather than an entire system.
  3. Inspect assumptions and dependencies.
  4. Run compilation, static analysis, unit tests, integration tests, and security checks.
  5. Review the result as if it had been written by an unfamiliar developer.
  6. Record the use of AI when organizational policy or licensing requires it.

1.2 Testing and quality assurance

AI can generate unit-test cases, boundary-value examples, mocks, property-based test ideas, test-data transformations, and explanations of failing tests. It can also classify failures and suggest likely causes. These capabilities are valuable because developers often under-test exceptional paths and invalid inputs.

Generated tests are not proof of correctness. If the same mistaken assumption appears in both implementation and test, the test may merely confirm the error. This is an instance of test oracle weakness: the system lacks an independent way to determine the correct result. Stronger practice combines AI-generated tests with requirements-based tests, mutation testing, security tests, and human review.

Useful questions include:

  • Does the test express a business requirement or merely repeat implementation details?
  • Are null, empty, extreme, malformed, concurrent, and unauthorized inputs covered?
  • Could the test pass even when the feature is wrong?
  • Is test data free from personal or confidential information?
  • Are nondeterministic model outputs controlled by suitable assertions?

1.3 Documentation and knowledge management

AI can summarize modules, generate API descriptions, convert comments into reference material, and draft release notes. It can improve documentation coverage, but summaries may omit constraints or state unsupported claims confidently. Documentation must therefore be validated against source code, executable examples, and current interfaces.

A strong pattern is documentation from evidence: generate a draft from the repository, link statements to source locations or tests, and require review when behavior affects safety, privacy, finance, or legal compliance.

1.4 Operations and DevOps

In operations, AI may assist with log summarization, incident correlation, runbook retrieval, alert deduplication, capacity recommendations, and infrastructure-as-code generation. It can reduce time spent searching large operational datasets. Yet granting an AI direct production authority creates risks of destructive commands, mistaken diagnoses, and cascading failures.

Operational safeguards include read-only access by default, least privilege, approval gates for changes, sandbox execution, command allowlists, rollback plans, audit logs, and independent monitoring. An AI-generated remediation should not bypass change-management controls merely because an outage is urgent.

2. A Validation Model for AI-Generated Artifacts

The core engineering principle is: generation is not validation. A generated artifact should pass several forms of evaluation.

DimensionMain questionTypical evidence
Functional correctnessDoes it satisfy the stated behavior?Unit, integration, acceptance tests
ReliabilityDoes it behave acceptably under failure and variation?Fault injection, load tests, recovery tests
SecurityDoes it resist misuse and protect assets?Threat modeling, SAST, DAST, review
MaintainabilityCan a team understand and change it?Code review, complexity and dependency analysis
ComplianceDoes it meet organizational and legal duties?Records, approvals, provenance, audits
Operational fitnessCan it be deployed and observed safely?Staging evidence, telemetry, rollback rehearsal

Validation should occur at multiple levels. Syntax and type checking catch local defects. Tests examine specified behavior. Static analysis identifies patterns associated with defects. Review examines design assumptions and social or legal consequences. Production monitoring tests whether real-world behavior remains within acceptable limits.

A practical risk-based rule is to increase scrutiny with potential impact. A generated user-interface label may need ordinary review; generated authentication, medical, financial, or safety-control code requires specialized review, threat analysis, and often formal approval.

2.1 Requirements as evaluation instruments

AI systems perform better when requirements are explicit. A useful requirement identifies inputs, outputs, invariants, failure behavior, authorization, performance expectations, and relevant constraints. Acceptance criteria convert these elements into observable tests.

For example, “validate a payment” is inadequate. A stronger requirement states that the service must reject expired credentials, prevent duplicate transaction identifiers, authorize the account, record an audit event, and return a defined response within an agreed service-level objective. The clearer specification also makes hallucinations easier to detect.

2.2 Measuring productivity carefully

Completion counts alone are weak productivity measures. A tool may increase lines of code while increasing defects, review time, or dependency risk. Teams should consider lead time, change-failure rate, escaped defects, review rework, incident frequency, and developer comprehension. Measurements must also avoid pressuring developers to accept unsafe suggestions.

3. Security, Privacy, Bias, Intellectual Property, and Accountability

3.1 Security risks

AI-assisted development introduces both ordinary software vulnerabilities and AI-specific threats. Generated code may contain injection flaws, insecure deserialization, weak cryptography, missing authorization, or exposed secrets. AI systems themselves may be attacked through prompt injection, malicious repository content, poisoned examples, or data exfiltration through tool calls.

A secure workflow should:

  • prohibit secrets and unnecessary personal data in prompts;
  • classify repositories and restrict model access accordingly;
  • use dependency and secret scanning;
  • treat retrieved documents and tool output as untrusted input;
  • separate planning from execution;
  • constrain tools with least privilege;
  • log prompts, outputs, approvals, and actions where appropriate;
  • test for prompt injection and unauthorized data access.

3.2 Privacy and data protection

Source code may contain personal data, customer information, credentials, or commercially sensitive algorithms. Sending it to an external service may constitute disclosure or cross-border processing. Before adoption, an organization should determine what data is collected, retained, used for model training, encrypted, and available to subprocessors.

Privacy protection includes data minimization, redaction, access control, retention limits, contractual review, and use of approved enterprise configurations. A developer should never assume that a “private” prompt is automatically outside the provider’s operational systems.

3.3 Bias and representational harm

Models learn from data that may encode social, linguistic, or cultural bias. In software, bias can appear in generated labels, eligibility rules, moderation logic, hiring systems, or prioritization algorithms. Technical evaluation should therefore include representative datasets, subgroup analysis, domain review, and mechanisms for appeal.

Fairness is context-dependent. A single numerical measure cannot decide whether a system is acceptable, particularly when error costs differ among groups. Engineers must identify affected stakeholders and justify design choices rather than treating fairness as a checkbox.

3.4 Intellectual property and provenance

Training-data provenance, generated-code licensing, repository licenses, and ownership rules vary by jurisdiction and provider agreement. Generated code may resemble public code without clear provenance. Teams should use approved tools, preserve records of significant generated artifacts, scan dependencies, respect licenses, and obtain legal advice for high-value products.

A model output is not a substitute for a license analysis. The fact that code was generated rather than copied manually does not remove obligations attached to incorporated libraries or protected material.

3.5 Accountability and professional responsibility

Accountability cannot be delegated to a model. The deploying organization and responsible professionals remain answerable for outcomes. Governance should assign owners for model selection, data handling, evaluation, deployment, monitoring, incident response, and retirement.

A useful accountability record contains the use case, model and version, data classification, prompts or task description, evaluation evidence, reviewer, approval decision, known limitations, and monitoring plan. High-impact uses should have stronger independent review and an explicit ability to stop or override the system.

4. Autonomous Agents and Tool-Using Systems

An autonomous software agent is a system that observes a goal and environment, plans actions, uses tools, and adapts according to results. A coding agent may inspect a repository, create a branch, edit files, run tests, interpret failures, and propose a pull request.

Agents differ from simple completion tools because they can execute multi-step loops. A conceptual loop is:

Controlled AI software agent loop Goal and constraints Planpropose actions Tool executionsandboxed access Evaluatetests and policy Human approval or stop
Controlled AI software agent loop
Figure: Controlled AI software agent loop

Figure: A controlled agent loop in which planning, tool use, evaluation, and human approval are separated.

Agent reliability depends on the quality of the goal, available tools, state tracking, and stopping conditions. Common failure modes include infinite retries, incorrect interpretations of test failures, privilege escalation, and destructive changes. Therefore, agents should operate in isolated workspaces, use short-lived credentials, require confirmation for irreversible actions, and produce inspectable plans and logs.

The appropriate design principle is bounded autonomy: automate low-risk, reversible actions while reserving consequential decisions for authorized humans.

5. Low-Code, No-Code, and the Changing Developer Role

Low-code and no-code platforms provide visual components, configuration rules, generated integrations, and reusable workflows. They can allow domain experts to create internal applications rapidly and reduce routine implementation effort. Professional developers still matter because integration, architecture, security, data governance, performance, accessibility, testing, and lifecycle management do not disappear.

A major risk is shadow development: applications created outside formal governance and later connected to sensitive systems. Organizations should maintain an application inventory, define approved connectors, enforce identity and data policies, version configurations, and establish support ownership.

The developer’s role is shifting from typing every statement toward specifying behavior, evaluating generated artifacts, designing systems, and governing change. This increases the importance of systems thinking, communication, domain knowledge, testing, security, and ethical reasoning.

6. Green Software and AI Infrastructure

AI systems consume energy and require hardware, cooling, networking, and data-center resources. Sustainability must be considered across the life cycle rather than only during model training. Relevant strategies include smaller models, caching, batching, quantization, efficient algorithms, selective invocation, carbon-aware scheduling, efficient data retention, and longer hardware life.

A simple operational estimate for energy is:

E = P × t

where E is energy, P is average power, and t is operating time. If power is measured in kilowatts and time in hours, energy is measured in kilowatt-hours. This estimate assumes power is approximately constant; real systems may require time-varying measurement and may include embodied energy separately.

For example, a 0.4 kW service operating for 500 hours uses:

E = 0.4 × 500 = 200 kWh.

If an emissions factor is available, estimated operational emissions can be expressed as:

C = E × f

where C is emissions, usually in kilograms of CO₂-equivalent, and f is the regional or supplier-specific emissions factor in kilograms CO₂-equivalent per kilowatt-hour. This is an estimate, not a universal constant; the factor, boundary, and accounting method must be documented.

Efficiency should not be pursued by sacrificing reliability, accessibility, privacy, or safety. The relevant objective is useful service per unit of environmental impact, not merely a smaller model.

7. Illustrative Case: AI-Assisted Defect Repair in a Banking Service

Background

A fictional regional bank maintains a Java service that calculates overdraft fees. The service has a large test suite but limited documentation, and a production incident has revealed inconsistent treatment of leap-year dates.

Problem

The team wants to use an AI coding agent to diagnose the defect and prepare a patch. The repository contains customer-related test fixtures, deployment scripts, and internal documentation. A careless agent could expose data, modify unrelated files, or produce a patch that passes existing tests while violating fee policy.

Analysis

The team first classifies repository contents and replaces realistic customer data with synthetic fixtures. It writes acceptance criteria from the policy: the fee period must use calendar rules, leap-day transactions must be handled consistently, duplicate events must not create duplicate fees, and all changes must produce an audit record.

Approach and solution

The agent receives read-only access initially and is restricted to a temporary branch. It proposes a diagnosis, identifies date-handling code, and generates boundary tests for February 28, February 29, March 1, year boundaries, duplicate events, and invalid timestamps. The team independently reviews the policy and writes at least one reference test without using the agent’s implementation suggestion.

Static analysis, dependency scanning, mutation testing, and integration tests are executed in a sandbox. The agent proposes a patch, but a senior developer rejects its first version because it uses local time rather than the service’s specified time zone. A revised patch passes the acceptance suite and is reviewed by a security engineer. Deployment proceeds through staging with monitoring and an explicit rollback plan.

Outcome

The defect is corrected without exposing customer data. The process takes longer than accepting the first generated patch, but it creates traceable evidence and reveals a hidden time-zone assumption. The team adds a reusable date-policy test library and updates its AI-use policy.

Learning points

  1. Clear requirements improve both generation and evaluation.
  2. Independent tests reduce correlated errors.
  3. Repository access must be limited according to data sensitivity.
  4. Human review is most valuable when it challenges assumptions, not merely formatting.
  5. Safe automation includes staging, monitoring, rollback, and auditability.

8. Contemporary and Future Development Ecosystems

Future development environments are likely to combine repositories, issue trackers, design systems, test infrastructure, deployment platforms, and AI agents through standardized interfaces. Developers may describe goals at a higher level while agents produce multiple implementation alternatives and evidence packages. Software supply chains may increasingly include model cards, dataset statements, generated-artifact provenance, and automated policy checks.

Several trends deserve critical attention:

  • Repository-scale reasoning: tools will analyze architecture and dependencies rather than isolated files.
  • Multimodal engineering: requirements may combine text, diagrams, traces, screenshots, and runtime telemetry.
  • Continuous verification: generated changes may be evaluated automatically against security, performance, accessibility, and policy constraints.
  • Specialized models: smaller domain models may offer better privacy, cost, latency, or consistency than general systems.
  • Human–agent teams: people may allocate tasks among agents while retaining responsibility for architecture and risk.
  • Regulated AI engineering: high-impact systems will require documentation, testing, monitoring, incident reporting, and demonstrable oversight.

These developments do not eliminate foundational software engineering. Abstraction can increase the distance between intention and implementation, making specifications, testing, observability, and governance more important. A future engineer must be able to understand enough of the generated system to challenge it.

9. Best-Practice Framework

An organization adopting AI-assisted development can use the following sequence:

  1. Define purpose: identify the problem and expected benefit.
  2. Classify risk: consider safety, privacy, security, financial, legal, and social impact.
  3. Select an approved tool: evaluate retention, training use, access controls, reliability, and contracts.
  4. Minimize data: redact secrets and personal information; use synthetic examples where possible.
  5. Constrain access: apply least privilege, sandboxing, branch isolation, and tool allowlists.
  6. Specify acceptance criteria: define behavior, quality attributes, and failure conditions.
  7. Generate incrementally: prefer small, reviewable changes.
  8. Validate independently: combine tests, static analysis, security review, and human reasoning.
  9. Record provenance: preserve relevant model, version, task, evidence, and approval information.
  10. Monitor in operation: measure incidents, drift, quality, cost, and environmental impact.
  11. Improve or retire: revise prompts, controls, or models when evidence shows weakness.

The framework should be proportional. Excessive controls can encourage unapproved shadow use, while inadequate controls can create unacceptable risk.

Challenges and Limitations

Generative AI systems remain probabilistic and can be confidently wrong. They may reproduce bias, depend on incomplete training data, and fail on novel domain constraints. Model updates can change behavior, making reproducibility difficult. Costs include licensing, integration, review, security controls, and environmental impact. Overreliance can erode programming knowledge and reduce a team’s ability to diagnose failures independently.

There is also a measurement problem: faster code production is not necessarily better engineering. Organizations should assess delivered value, reliability, maintainability, and risk rather than treating generated volume as success. Finally, legal and regulatory expectations continue to develop, so local policy and professional advice remain necessary.

Chapter Summary

Generative AI can support coding, testing, documentation, operations, and software delivery, but it produces candidates rather than guarantees. Effective use requires explicit requirements, independent validation, secure data handling, controlled access, and human accountability. Security threats include vulnerable code, prompt injection, data leakage, and excessive agent privileges. Privacy, bias, intellectual property, and provenance must be addressed as engineering and governance concerns.

Autonomous agents extend AI assistance by planning and using tools; bounded autonomy, sandboxing, approval gates, and audit logs are essential. Low-code platforms broaden participation but require professional governance. Green software practice considers energy, emissions, hardware, and service efficiency. The emerging developer role emphasizes specification, evaluation, architecture, security, ethics, and system stewardship. The most robust future is not human-free development, but evidence-based collaboration between professionals and constrained, observable AI systems.

Key Terms

Generative AI: AI that produces new text, code, or other artifacts from learned patterns.

Large language model: A model trained to predict and generate sequences of language or code.

AI-assisted development: Use of AI tools to support activities in the software life cycle.

Hallucination: A plausible-looking but unsupported or incorrect model output.

Test oracle: A mechanism for determining whether an observed result is correct.

Static analysis: Examination of software without executing it.

Prompt injection: Malicious or unintended instructions that manipulate an AI system.

Least privilege: Giving a user or tool only the access required for its task.

Autonomous agent: A system that plans and performs multi-step actions toward a goal.

Bounded autonomy: Automation limited by permissions, policies, approvals, and stopping conditions.

Low-code platform: A development environment using visual or configuration-based construction.

Shadow development: Uncontrolled software creation outside formal organizational governance.

Data minimization: Collecting and exposing only data necessary for a defined purpose.

Provenance: Information about the origin, transformation, and ownership of an artifact.

Model drift: Change in model behavior or data conditions that reduces performance over time.

Green software: Software designed and operated to reduce environmental impact.

Carbon-aware computing: Scheduling or configuring computation with attention to emissions intensity.

Accountability: Assignment of responsibility for decisions, outcomes, and remediation.

Review Questions

Short Answer Questions

  1. Why is generated code not equivalent to validated code?
  2. Identify two safeguards for an AI agent that can execute tools.
  3. What is test oracle weakness?
  4. Why should personal data be minimized in AI prompts?
  5. Distinguish low-code development from professional software governance.

Long Answer Questions

  1. Explain how generative AI can support coding, testing, documentation, and operations, including one limitation for each activity.
  2. Discuss security, privacy, bias, and intellectual-property risks in an AI-assisted development process.
  3. Describe a risk-based validation workflow for generated authentication or payment code.
  4. Explain bounded autonomy and evaluate its importance for autonomous coding agents.
  5. Discuss how software engineers’ responsibilities may change as AI and low-code tools become widespread.

Analytical / Application Questions

  1. Design an AI-assisted workflow for a healthcare application that processes sensitive patient data. Specify access controls, validation evidence, human approvals, and monitoring.
  2. A team reports that an AI tool increased code output by 40% but also increased escaped defects and review time. Analyze why output volume is an inadequate success measure and recommend better metrics.
  3. A service consumes 0.25 kW continuously for 800 hours. Calculate its estimated energy use using E = P × t, state the unit, and identify two additional factors needed for a more complete environmental assessment.

Multiple Choice Questions with Answers

Question 1

Which statement best describes generated source code?

A. It is automatically secure if it compiles

B. It is a candidate artifact requiring validation

C. It replaces acceptance criteria

D. It cannot contain licensing concerns

Correct Answer: B. It is a candidate artifact requiring validation

Question 2

Which practice most directly reduces the risk of an autonomous coding agent making destructive changes?

A. Giving it administrator privileges

B. Removing all logs

C. Using sandboxing and approval gates

D. Allowing unlimited retries

Correct Answer: C. Using sandboxing and approval gates

Question 3

What is test oracle weakness?

A. A test runs too quickly

B. A system lacks an independent way to determine the correct result

C. A compiler rejects a test

D. A test contains too many assertions

Correct Answer: B. A system lacks an independent way to determine the correct result

Question 4

Which item is an appropriate privacy safeguard when using an external AI service?

A. Including production secrets for context

B. Disabling access control

C. Minimizing and redacting sensitive data

D. Uploading the entire database

Correct Answer: C. Minimizing and redacting sensitive data

Question 5

What does least privilege mean?

A. Every tool receives full repository access

B. Access is limited to what the task requires

C. Only administrators may test software

D. Credentials never expire

Correct Answer: B. Access is limited to what the task requires

Question 6

Which activity is most characteristic of a low-code platform?

A. Constructing workflows through visual components and configuration

B. Proving every program formally

C. Replacing all security review

D. Eliminating the need for data governance

Correct Answer: A. Constructing workflows through visual components and configuration

Question 7

Using E = P × t, how much energy does a 0.25 kW service use in 800 hours at constant power?

A. 200 kWh

B. 320 kWh

C. 800.25 kWh

D. 3,200 kWh

Correct Answer: A. 200 kWh

Question 8

Which is the strongest evidence that generated documentation is reliable?

A. It is fluent and lengthy

B. It agrees with executable examples and current source behavior

C. It was produced quickly

D. It uses advanced vocabulary

Correct Answer: B. It agrees with executable examples and current source behavior

Question 9

Why is independent testing valuable for AI-generated code?

A. It guarantees zero defects

B. It reduces the chance that the same mistaken assumption exists in code and tests

C. It eliminates the need for requirements

D. It prevents all bias

Correct Answer: B. It reduces the chance that the same mistaken assumption exists in code and tests

Question 10

Which principle best describes professional accountability for AI-assisted software?

A. Responsibility belongs entirely to the model provider

B. No person is responsible for generated output

C. Authorized people and organizations remain responsible for outcomes

D. Only the end user is responsible

Correct Answer: C. Authorized people and organizations remain responsible for outcomes

Advanced Software Development
Chapter 15 of 15