Files
vpn-dns-gateway/manual/latex/devopsAIAgentGuide.tex
vsun1 828f6c555b
Automated Manual Build / manual (push) Successful in 1m27s
Add automated LaTeX manual build (refs #12)
2026-10-07 18:56:18 -04:00

181 lines
9.5 KiB
TeX

\chapter{AI Agent Usage Guide}
\ChapterLabel{AIAgentGuide}
\index{AI agent}
\index{AI agent!DevOps workflow}
\index{Appendix!AI Agent Usage Guide}
\section{How to Use This Appendix}
An AI agent that creates, reviews, or maintains an assignment shall first read
\ChapterRef{AIAgentRequirements}, then this guide. It shall identify the task
in the routing table, read the minimum
authoritative sources, and expand context only for a discovered dependency or
inconsistency. This guide is maintained in LaTeX so it is visible, versioned,
and reviewable with the assignment.
\section{Governing Principles}
The authored LaTeX files, versioned automation, and approved assignment
materials are authoritative. The PDF is a review artifact and shall not be
edited directly. AI may draft, explain, analyze, check consistency, and assist
with builds. It shall not invent completion, evidence, access, costs, grades,
approvals, command output, security posture, or operational results.
\section{AI Quick Start}
\begin{enumerate}
\item Read \ChapterRef{AIAgentRequirements}, this guide, and identify the requested outcome.
\item Select the closest task below and load only its listed sources.
\item Inspect supplied facts and report consequential gaps or assumptions.
\item Make narrowly scoped changes; preserve stable IDs, glossary terms, and history.
\item Never request, print, store, or commit credentials, tokens, personal data, or production data.
\item Build the complete PDF, inspect the log, visually inspect affected pages, and record material AI use in \ChapterRef{AIPromptLog}.
\end{enumerate}
\section{Local LaTeX Toolchain Setup}
\index{LaTeX!local toolchain}
\index{MiKTeX}
\index{TinyTeX}
An AI agent shall first detect an existing local toolchain and shall not assume
that one \texttt{pdflatex} pass is a complete build. TinyTeX is the project's
primary toolchain: \texttt{pdflatex} builds the document, \texttt{bibtex}
builds the bibliography, and \texttt{makeindex} builds the glossary, acronym
list, and index. The supplied PowerShell script runs these tools and the final
cross-reference passes in their required order.
On Windows, install TinyTeX when no working toolchain is available. Download
the \href{https://tinytex.yihui.org/install-bin-windows.bat}{official TinyTeX
Windows installer}, save it as a batch file, and run it. The installer uses
PowerShell, normally installs under
\texttt{\%APPDATA\%\textbackslash TinyTeX}, and does not require administrator
privileges.
The repository does not require a particular parent folder. A teammate may
optionally keep repositories under
\texttt{\%USERPROFILE\%\textbackslash Documents\textbackslash Projects} and a
shared TinyTeX installation under
\texttt{Projects\textbackslash Tools\textbackslash LaTeX\textbackslash TinyTeX}
for predictable organization. The normal per-user TinyTeX location is equally
valid. Do not hard-code another person's username or require this optional
layout. OneDrive redirection, institutional policy, or a teammate's existing
development layout may make a different user-writable location preferable.
After installing TinyTeX, open a new PowerShell window and install the packages
used by this project:
\begin{verbatim}
tlmgr install ltablex glossaries booktabs enumitem listings tcolorbox
tlmgr install upquote float lm fancyhdr amsmath hyperref xcolor
tlmgr install fancyvrb minted pgf makeindex
\end{verbatim}
The \texttt{minted} package also requires Python Pygments
(\texttt{pip install Pygments}); the build script passes
\texttt{-shell-escape} so \texttt{pdflatex} can call it.
The package manager installs dependencies automatically. If a later build
reports \texttt{missing-file.sty}, identify and install its owning package:
\begin{verbatim}
tlmgr search --global --file "/missing-file.sty"
tlmgr install package-name
\end{verbatim}
Clone the repository, open PowerShell in the \texttt{latex/} directory, and
verify and build as follows:
\begin{verbatim}
Get-Command pdflatex,bibtex,makeindex
.\makefilePowerShell.ps1 -Action pdf
\end{verbatim}
All three commands shall resolve before the build begins. The script moves the
finished PDF to the repository root as
\texttt{2026F-SSW-590-DevOps-Group-1.pdf}. An AI agent shall inspect
\texttt{devopsAssignment.log} for errors, missing files, undefined citations,
and unresolved references, and shall visually inspect the affected pages.
Detailed platform instructions and troubleshooting appear in
\ChapterRef{DocumentGuide}.
An AI agent may run under a restricted account whose filesystem and execution
permissions differ from the signed-in user's PowerShell session. Installation
under \texttt{AppData} does not make a compiler defective, and installation
under \texttt{Documents} does not automatically make it accessible. If the
compiler works in the user's terminal but the agent receives
\texttt{Access is denied}, grant the agent access only to the selected tool
directory or use an approved workspace/tool root. The PowerShell build also
accepts an explicit binary directory:
\begin{verbatim}
$env:DEVOPS_LATEX_BIN = 'C:\path\to\TinyTeX\bin\windows'
.\makefilePowerShell.ps1 -Action pdf
Remove-Item Env:DEVOPS_LATEX_BIN
\end{verbatim}
If TeX Live cannot resolve a long Windows path in a restricted session, map
the TinyTeX root temporarily, build through the short path, and remove the
mapping afterward:
\begin{verbatim}
subst T: "C:\path\to\TinyTeX"
$env:DEVOPS_LATEX_BIN = 'T:\bin\windows'
.\makefilePowerShell.ps1 -Action pdf
Remove-Item Env:DEVOPS_LATEX_BIN
subst T: /d
\end{verbatim}
MiKTeX Console is a configuration and package-management application; it does
not need to remain open while command-line compilers run. An existing MiKTeX
installation may be used as a fallback when its commands resolve and the full
build succeeds, but new Windows setups for this repository should use TinyTeX
to keep the documented workflow consistent.
\section{Task Routing}
\small
\begin{tabularx}{\linewidth}{L{4.0cm}Y}
\caption{AI Task-Routing Table\label{Table:AITaskRouting}}\\
\toprule \textbf{Task} & \textbf{Minimum authoritative sources}\\ \midrule
Initialize an assignment & \texttt{devopsAssignment.tex}, \texttt{prologue.tex}, \texttt{devopsIntroduction.tex}, \texttt{devopsActivityBrief.tex}, and the instructor's assignment facts.\\
Develop a workflow & \texttt{devopsActivityBrief.tex}, \texttt{devopsWorkflow.tex}, source repository materials, and authorized environment constraints.\\
Define evidence & \texttt{devopsActivityBrief.tex}, \texttt{devopsEvidence.tex}, \texttt{devopsWorkflow.tex}, and controlled execution outputs.\\
Review a retrospective & \texttt{devopsRetrospective.tex}, \texttt{devopsEvidence.tex}, and the submitted workflow or runbook.\\
Edit AI guidance & \texttt{devopsAIAgentRequirements.tex}, \texttt{devopsAIAgentGuide.tex}, \texttt{devopsAIPromptLog.tex}, \texttt{devopsDocumentGuide.tex}, and \texttt{devopsAssignment.tex}.\\
Compile or troubleshoot & \texttt{devopsAssignment.tex}, \texttt{makefilePowerShell.ps1}, \texttt{devopsDocumentGuide.tex}, the affected chapter, and the build log.\\ \bottomrule
\end{tabularx}
\normalsize
\section{DevOps-Specific Rules}
\begin{enumerate}
\item Prefer versioned, repeatable automation over undocumented manual steps.
\item Treat deployment output, monitoring data, and screenshots as evidence only when they reflect an actual execution.
\item Design failure exercises to be isolated, reversible, and authorized.
\item Apply least privilege and never place secrets in LaTeX, source control, prompts, screenshots, or logs.
\item State expected cloud cost, cleanup action, and resource ownership for each remote-environment activity.
\item Identify whether a recommendation is a proposal, an instructor directive, or demonstrated evidence.
\end{enumerate}
\section{Example AI Requests}
\subsection{Create an Assignment Brief}
\begin{verbatim}
Read devopsAIAgentGuide.tex and use the Initialize an Assignment context.
From the supplied SSW 590 objective and constraints, fill only supported
placeholders in the introduction and activity brief. Propose clear, observable
completion criteria, a safe cleanup action, and a rubric. Do not invent cloud
access, due dates, policy, costs, or approved tools. Update history, compile,
and report instructor decisions still needed.
\end{verbatim}
\subsection{Review a Student Workflow}
\begin{verbatim}
Read devopsAIAgentGuide.tex and the workflow, evidence, and retrospective
chapters. Review the supplied repository and sanitized evidence for
reproducibility, least privilege, observability, rollback, and cleanup.
Separate verified facts from gaps and recommendations. Do not claim that an
unexecuted command passed, and do not request credentials or operate resources.
\end{verbatim}
\section{Human Decisions and Information Boundaries}
The instructor retains authority over assignment scope, grading, due dates,
approved tooling, access, budgets, security posture, exceptions, and policy.
An AI agent shall surface alternatives and evidence, not represent a decision
as approved. Record material prompts, assumptions, corrections, and unresolved
issues in \ChapterRef{AIPromptLog}.
\section{Completion Checklist}
\begin{itemize}
\item Scope, deliverables, environment, constraints, and cleanup are clear.
\item Activity identifiers and evidence references are valid and unique.
\item Examples contain no secrets, personal data, or unsafe production actions.
\item New controlled terms are added to the glossary and indexed.
\item The newest approved change is recorded in document history.
\item The complete build succeeds with no unresolved references or missing files.
\item A human reviews all decisions requiring instructional or operational authority.
\end{itemize}