The Autonomous Author / Page 03 — DDLC-ADM · Design & Architecture

DDLC-ADM
Documentation Development
Lifecycle Architecture

Phases A through F

The Documentation Development Lifecycle Architecture Development Method applied to the Maya Chen engagement. Every phase produces a living artifact that traces back to a requirement documented on Page 02. This is not a methodology summary — it is a working architecture record.

DDLC-ADM · 6 Phases 12 Architecture Principles 5 Architecture Artifacts 6 ADRs 3 Migration Horizons Requirements Traceability
Preliminary Phase

Architecture Principles —
the rules the design cannot break.

Twelve principles established before any architecture work begins. These are not aspirational guidelines — they are binding constraints on every design decision that follows. Any component that violates a principle requires a documented rebuttal in the Rebuttals & Pushbacks section explaining the trade-off and the alternative considered.

12 ARCHITECTURE PRINCIPLES — BINDING CONSTRAINTS ON EVERY DESIGN DECISION P-01 Explainability engineered in XAI card per agent · AR-01 Not added after the fact P-02 Human gate is non-bypassable Export disabled until review · AR-02 Designed in UI state machine P-03 Compliance is a structural property Mandatory pipeline stage · BR-02 Not a post-publish check P-04 Single responsibility per agent One job, one contract · AR-06 Independently testable P-05 Client-side enforces privacy No backend · AR-03 · C-01 Architectural, not policy P-06 Rules as data, not LLM memory rules.json versioned · AR-04 Deterministic, citable P-07 Every ADR states alternatives Not just the decision · AR-10 Reasoning persistent P-08 Workflow neutral by default Outputs to Maya's formats · C-03 Zero workflow disruption P-09 DDD ambiguity is a defect Detected before review · BR-03 Not caught in eng review P-10 Placeholder over inference (P2) [REQUIRES INPUT:] · AR-08 Inferred DDD = defect P-11 Confidence scores guide review attention 0.0–1.0 per output · AR-07 Low score = review priority P-12 Session state in writer's browser only IndexedDB · AR-05 · AR-03 Never a remote store Core pipeline principles (P-01–P-04) Infrastructure principles (P-05–P-08) Quality & safety principles (P-09–P-12) DDLC-ADM PHASES PRELIMINARY PHASE A PHASE B PHASE C PHASE D PHASE E PHASE F REQ MGMT (continuous)
Diagram 07 12 Architecture Principles mapped to requirement IDs · DDLC-ADM phase strip below
Phase A — Architecture Vision

Architecture Vision
Statement of Architecture Work

Architecture Vision Statement

"To deliver a DDLC-ADM aligned, explainability-first documentation pipeline for Maya Chen that automates the intake-to-draft lifecycle for both feature release and document-driven development workflows — with the human review gate, Google Style Guide compliance, and DDD ambiguity detection engineered as structural properties of the pipeline, not post-hoc additions. Zero infrastructure cost. Zero workflow disruption. Zero black-box decisions."

Scope

Both pipeline modes (P1 feature docs, P2 DDD specs). Both workflow configurations (Agile, Waterfall). Full 5-agent pipeline. 80-rule compliance engine. XAI layer. Human gate UI. Export formats: Markdown, HTML, plain text. Collaboration features, CMS integrations, and publishing automation are explicitly out of scope.

Architecture Sponsor

Maya Chen (S-01) — primary. Priya Nair (S-02) — DDD quality co-sponsor. James Okafor (S-03) — feature accuracy sponsor.

Binding Time Constraint

P2 ambiguity detection is the highest-urgency capability — sprint regressions from ambiguous specs are the most expensive failure mode. H1 scope is driven by this constraint.

Phase B — Workflow Architecture

To-Be DDLC Value Streams —
both personas.

Phase B translates the Architecture Vision into a concrete model of how Maya's documentation workflow operates after the pipeline is deployed. The As-Is DDLC from Page 02 is the baseline. The To-Be below is the target — every manual bottleneck replaced by an agent-mediated stage with a defined output contract and an XAI reasoning card.

PERSONA 1 — FEATURE RELEASE (AGILE) · TO-BE MAYA (WRITER) AGENT PIPELINE (AUTONOMOUS) HUMAN GATE (MAYA REQUIRED) Paste ticket or PR / brief ≤ 2 min Intake Agent Doc brief · P1 XAI card ↑ Research Agent Context pack XAI card ↑ Draft Agent P1 mode · feature doc XAI card ↑ Compliance Agent 80-rule check XAI card ↑ Review Prep Writer-ready view XAI card ↑ ⬡ HUMAN GATE — Maya reviews Accept · Edit · Reject per item Export enabled only after review Export: MD · HTML Clipboard-ready TOTAL P1 TIME TARGET: ≤ 15 minutes Automated: Intake (1min) + Research (2min) + Draft (4min) + Compliance (2min) + Review Prep (1min) = 10 min agent time · Maya review: 5 min = 15 min total XAI 5 cards surfaced
Diagram 08 To-Be P1 value stream — feature release (Agile). Agent-mediated stages, XAI cards, mandatory human gate, 15-min target.
PERSONA 2 — DDD SPEC (WATERFALL) · TO-BE Intent stmt or PM brief ≤ 2 min Intake Agent P2 mode XAI card ↑ Research Agent gap detection XAI card ↑ Draft Agent P2 · imperative XAI card ↑ Ambiguity Detector ← P2 only P2 only Compliance Agent 80-rule check XAI card ↑ Review Prep + ambiguity flags XAI card ↑ ⬡ HUMAN GATE — Maya reviews Style violations · Ambiguity flags [REQUIRES INPUT:] placeholders Export enabled only after review Version metadata Waterfall AS-IS P2: No ambiguity detection · No compliance · 9-12 day cycle · Sprint regressions from vague specs TO-BE P2: Ambiguity Detector fires before review · Compliance mandatory · ≤ 20 min pipeline · Version metadata attached XAI card per agent · 6 reasoning cards total (5 pipeline + 1 ambiguity) · Human gate non-bypassable · [REQUIRES INPUT:] for missing context TOTAL P2 TIME TARGET: ≤ 20 minutes Intake(1) + Research(2) + Draft(4) + Ambiguity(2) + Compliance(2) + Review Prep(1) = 12 min agent · Maya review: 8 min = 20 min total
Diagram 09 To-Be P2 value stream — DDD spec (Waterfall). Ambiguity Detector fires as a mandatory branch after Draft Agent. 20-min target.
Phase C — Information Architecture

Document Session
Canonical Data Model

Phase C defines what data the pipeline needs to manage and how it is structured. The canonical data model below shows the six shared entities that underpin all pipeline sessions — the proof that the Autonomous Author is a coherent system with a defined information architecture, not a collection of disconnected API calls.

DocumentSession PKsession_id persona · P1/P2 workflow_mode · Agile/WF raw_input · text status · enum created_at · ts export_format → AgentRun · DraftDocument AgentRun PKrun_id FKsession_id agent_name input_ref output_ref confidence_score status · duration_ms ts → XAICard (1:1) XAICard PKcard_id FKrun_id understood · text decided · text why · text uncertainties[] confidence · 0.0–1.0 visible_in_ui · bool XAI principle · AR-01 DraftDocument PKdraft_id FKsession_id content_md · text version · semver doc_type · enum approved_at · ts export_ready · bool word_count · int → ComplianceReport · AmbiguityReport ComplianceReport PKreport_id FKdraft_id violations[] · rule_id[] violation_count · int rules_version · semver rules.json · AR-04 AmbiguityReport (P2) PKamb_id FKdraft_id vague_terms[] undefined_terms[] missing_error_states[] P2 mode only · AR-08 1:N 1:1 1:N 1:1 P2 STORAGE — IndexedDB (browser) All 6 entities persist in IndexedDB Writer's browser only · Never a remote store Survives page refresh · History browsable Export: writer-initiated only AR-03 · AR-05 · P-05 · P-12 Groq API receives: raw_input + draft context only, during session
Diagram 10 Canonical data model — 6 entities. All stored in IndexedDB. AmbiguityReport created only in P2 mode. XAICard 1:1 with AgentRun.
Phase D — Technology Architecture

Client-Side Stack —
full technical reference.

Phase D defines every named technology component, its responsibility, and how it integrates with adjacent components. This is the diagram that makes a front-end architect or a technically literate hiring manager stop and read.

BROWSER RUNTIME — All processing happens here GitHub Pages CDN → static HTML/CSS/JS · No server · No auth · No data store except browser APIs UI LAYER — Vanilla JS / HTML5 Intake Form Pipeline Monitor Review & Edit UI ⬡ Compliance Viewer Export Panel AGENT PIPELINE — LangGraph-pattern · JS async/await Intake → DocBrief Research → ContextPack Draft P1/P2 mode Ambiguity P2 only Compliance 80-rule check Review Prep XAI LAYER — reasoning card emitted after every agent · confidence score · uncertainties surfaced · AR-01 · P-01 STATE MANAGEMENT — Browser APIs IndexedDB Sessions · Drafts · Agent logs localStorage API key · UI prefs rules.json (static) 80 compliance rules · versioned asset sessionStorage Active pipeline state CI/CD — GitHub Actions → GitHub Pages git push main → Action: lint HTML + validate rules.json schema → Deploy to Pages CDN → Live in <90s Branch: feature/* → Preview deploy (Pages preview URL) · PR gate: rules.json schema validation must pass Zero-server guarantee: document content touches Groq API only · no TAA backend ever receives document data Writer retains full custody · API key in writer's localStorage · session ends, data stays in writer's IndexedDB AR-03 · AR-05 · C-01 · C-03 · P-05 · P-12 Groq API (External) Model: Llama 3.1 70B Rate: 300+ tok/s Auth: writer's API key Tier: free (ADR-002) Fallback: Together AI HTTPS GitHub Pages Static CDN · Free tier Auto-deploy on push raosiddharthp.github.io/... EXTERNAL SERVICES
Diagram 11 Full client-side technology architecture — 4 layers, Groq API integration, GitHub Pages deployment, zero-server guarantee annotated.
Phases E–F — Opportunities, Solutions & Migration

Gap Analysis &
Three-Horizon Roadmap

GAP ANALYSIS — AS-IS vs TO-BE · 6 CAPABILITY AREAS CAPABILITY AS-IS (Maya today) TO-BE (with pipeline) HRZ Context packaging Ticket → writer-ready brief 2.8 day SME wait Manual · fragmented Intake + Research agents Structured · ≤3 min H1 Style guide compliance Google Developer Style Guide 43% violation rate Informal · often skipped 80-rule Compliance Agent Mandatory · 0% violations target H1 DDD ambiguity detection Spec quality before engineering Does not exist 0 specs have automated check Ambiguity Detector (P2) Mandatory before review · P2 only H1 AI reasoning transparency XAI — explainable decisions Black-box (ChatGPT) No reasoning surfaced XAI cards · confidence scores Per-agent reasoning · visible H1 Workflow mode switching Agile delta vs Waterfall artifact Manual · no tooling Same approach for both Agile / Waterfall mode toggle Delta-aware · Version metadata H2 Live demo & portfolio integration Embedded Groq-powered demo Does not exist Static portfolio only Embedded demo panel Live API calls · real pipeline run H3 H1 Months 1–2 · MVP
Diagram 12 Gap analysis — 6 capability areas, As-Is vs To-Be, horizon assignment. H1 = MVP. H2 = Workflow modes. H3 = Live demo.
Horizon 1 · Months 1–2

Foundation & MVP Pipeline

  • rules.json — 80-rule compliance set authored + schema validated
  • 5 agents implemented — Intake through Review Prep
  • Ambiguity Detector — P2 mode branch
  • XAI reasoning cards surfaced in pipeline monitor
  • Review UI — human gate enforced in state machine
  • IndexedDB session persistence
Horizon 2 · Months 3–4

Workflow Modes & Export

  • Agile delta mode — patch draft generation
  • Waterfall mode — version metadata + traceability table
  • Export panel — MD, HTML, plain text, clipboard
  • Compliance-only mode (standalone)
  • Session history browser — past sessions readable
  • GitHub Actions CI/CD — rules.json validation gate
Horizon 3 · Months 5–6

Live Demo & Polish

  • Embedded demo panel — live Groq API calls from portfolio
  • Evaluation harness — 20-rule test set with known violations
  • Model swap abstraction — Together AI fallback
  • Accessibility pass — keyboard nav, screen reader labels
  • rules.json v1.0.0 — changelog, contribution guide
  • Full portfolio site — all 9 pages live on GitHub Pages
Requirements Management

Every requirement traced to a
phase and artifact.

Requirements Management is continuous throughout the DDLC-ADM. The matrix below shows how every requirement from Page 02 is satisfied by a specific phase, artifact, and pipeline component. No requirement is unaddressed. No phase produces an artifact that cannot be traced back to a requirement.

Req IDSummaryDDLC-ADM PhaseArtifactComponent
BR-01First draft ≤15 minPhase B · ETo-Be P1 value streamAll agentsGroq API
BR-02Style guide compliance before reviewPhase B · DTo-Be stream · Tech archCompliance Agentrules.json
BR-03DDD ambiguity detectionPhase B · DTo-Be P2 value streamAmbiguity DetectorP2 mode
BR-04Persona-aware pipeline P1/P2Phase BBoth value streamsDraft AgentPersona selector
BR-05Agile and Waterfall modesPhase B · FValue stream · Roadmap H2Intake AgentSession config
BR-06Export to Maya's toolsPhase C · DData model · Tech archExport PanelReview UI
AR-01XAI reasoning card per agentPrelim · DP-01 principle · Tech archXAI LayerXAICard entity
AR-02Human gate non-bypassablePrelim · BP-02 principle · Value streamsReview UIUI state machine
AR-03Client-side onlyPrelim · DP-05 principle · Tech archBrowser runtimeZero-server
AR-04Compliance rules as versioned JSONPhase C · DData model · Tech archrules.jsonP-06
AR-05Session state in IndexedDBPhase C · DData model · Tech archIndexedDBDocumentSession
AR-06Single responsibility per agentPrelimP-04 principleAgent pipelineADR-003
AR-07Confidence scores on outputsPhase DXAI Layer specXAICard.confidenceReview UI
AR-08Placeholder insertion P2Prelim · DP-10 principle · Agent specDraft Agent P2System prompt
C-01Zero infrastructure costPrelimP-05 · ADR-001 · ADR-002GitHub PagesGroq free tier
C-03No workflow disruptionPrelimP-08 principleExport PanelWorkflow-neutral
C-04Single writer — no collaborationPhase AArchitecture Vision scopeScope boundaryOut of scope
Rebuttals & Pushbacks

Six decisions. Every
challenge documented.

Every significant architectural decision attracted a challenge from a reasonable engineer or architect. Each rebuttal below states the challenge, the tempting alternative, why it was rejected, and the trade-off accepted. These are not post-hoc rationalisations — they are the actual design arguments that locked each decision.

ADR-001 · Client-Side Architecture
Accepted · Phase A
The Challenge

"Why not use a hosted backend? Render free tier is free, gives you proper server-side processing, and doesn't expose an API key in the browser."

The Temptation

Render free tier FastAPI backend with server-side Groq calls. Clean separation of concerns. API key never in the browser. Standard web architecture.

Why We Rejected It

Render free tier spins down after 15 minutes of inactivity — the first pipeline run after idle takes 30+ seconds just to wake the dyno, destroying the sub-15-minute target. More critically: a backend receives Maya's document content. For an enterprise writer, this is a data governance question. Client-side means document content goes only to Groq (writer's own key), never to a third-party infrastructure layer we operate. The zero-server guarantee is a real enterprise privacy argument, not a cost optimisation.

Trade-off Accepted

API key visible in localStorage (mitigated by scoping the key to Groq only, not a master credential). No server-side rate limiting. No server-side logging for debugging. These are acceptable for a portfolio MVP where the privacy guarantee is worth more than the operational convenience.

ADR-002 · Groq as Inference Provider
Accepted · Phase A
The Challenge

"Why Groq and not OpenAI or Anthropic? Those models produce better technical writing quality and have more predictable outputs."

The Temptation

OpenAI GPT-4o mini (cheap) or Anthropic Claude Haiku (excellent technical writing). Both produce higher-quality output on complex technical prose than Llama 3.1 70B.

Why We Rejected It

C-01 (zero infrastructure cost) is a binding constraint. GPT-4o mini and Claude Haiku both cost money at any meaningful usage volume. Groq's free tier delivers Llama 3.1 70B at 300+ tokens/second — fast enough for a 5-agent pipeline to complete in under 15 minutes. Speed compensates for the modest quality delta. The abstraction layer is designed to swap to Together AI (also free tier) if Groq changes its pricing. Quality on technical documentation is adequate; it is not the differentiator — the pipeline architecture is.

Trade-off Accepted

Llama 3.1 70B produces slightly less polished technical prose than GPT-4o or Claude. The Compliance Agent catches style violations regardless of model quality. The writer reviews and edits before publishing. Model quality is the least important variable in a pipeline with a mandatory human gate.

ADR-003 · 5 Separate Agents Over 1 Large Prompt
Accepted · Phase D
The Challenge

"Why 5 separate API calls? That's 5× the latency, 5× the cost, and you could do this in one large system prompt with chain-of-thought."

The Temptation

One large LLM call with a structured system prompt: "You are a technical writing pipeline. Do intake, research, drafting, compliance, and review prep in one pass. Output JSON with all sections."

Why We Rejected It

Single-agent collapse destroys XAI. If the entire pipeline is one call, what does the reasoning card say? "I did everything"? The value of multi-agent is that each stage has a discrete, inspectable output with a named confidence score. The Research Agent's uncertainty about an unknown proper noun is a specific, actionable piece of information the writer can act on. Collapsed into one call, that uncertainty is invisible. Additionally: AR-06 (single responsibility) is a binding principle. Single-agent compliance is not a trade-off — it's a principle violation.

Trade-off Accepted

~4–5 additional API calls per session at Groq speeds (~1–2s per call) adds 5–8 seconds of total latency. At 300+ tok/s, this is negligible. The pipeline monitor makes the latency feel like progress rather than waiting — the writer watches each stage complete in real time.

ADR-004 · rules.json Over RAG for Compliance
Accepted · Phase D
The Challenge

"Why not RAG the full Google Style Guide? A proper vector search over the full guide would catch far more violations than 80 curated rules."

The Temptation

Embed the full Google Developer Style Guide into a client-side vector store (transformers.js + HNSW), run semantic search at compliance time, return the top-N matching rules for every sentence.

Why We Rejected It

RAG over the style guide introduces hallucinated citation risk — the LLM finds semantically similar passages and may cite them inaccurately. The entire value of the Compliance Agent is that every violation has a named, citable rule the writer can look up. A RAG system that returns approximate matches with uncertain provenance is worse than no compliance check — it trains the writer to distrust the output. The 80-rule JSON is deterministic: rule ID 047 = "avoid Latin abbreviations". That is binary. It either fires or it doesn't. Additionally, client-side vector search adds 200–400KB of model weight and 1–2s of load time for marginal coverage gain. Not worth it.

Trade-off Accepted

80 curated rules cover the high-impact, verifiable subset of the style guide. Edge cases and stylistic judgment calls are left to Maya. The compliance check is not meant to be exhaustive — it is meant to be accurate and citable. Coverage over correctness is the wrong trade-off for a tool whose XAI principle depends on every output being trustworthy.

ADR-005 · LangGraph-Pattern JS Over AutoGPT-Style Loops
Accepted · Phase D
The Challenge

"Why implement a LangGraph-pattern manually in JS? Just use an autonomous agent loop — give the LLM a list of tools and let it decide the sequence."

The Temptation

AutoGPT-style agentic loop: give the LLM a set of tool descriptions, let it decide which tool to call next, iterate until it decides the task is done. Simpler implementation, more "agentic".

Why We Rejected It

Non-deterministic agent loops violate P-02 (human gate as non-bypassable) and AR-02. If the LLM decides the sequence, it might skip the Compliance Agent when it "decides" the draft is already clean. The pipeline must be deterministic — every session runs every stage in the defined order. The human gate fires after Review Prep, always, not when the LLM thinks the document is ready. Additionally, autonomous loops are difficult to test and impossible to explain — which violates P-01 (explainability engineered in). A LangGraph-pattern graph with defined nodes and edges is inspectable, testable, and the XAI layer knows exactly which node produced which output.

Trade-off Accepted

Less "agentic" in the AutoGPT sense — the pipeline doesn't self-direct. More robust, more explainable, more compliant with the architecture principles. For a documentation tool where compliance and human oversight are first-class concerns, deterministic pipelines are strictly better than autonomous loops.

ADR-006 · Ambiguity Detector as Separate Agent
Accepted · Phase D
The Challenge

"Why is the Ambiguity Detector a separate agent? Just add 'check for ambiguous language' to the Draft Agent's system prompt. That's one less API call."

The Temptation

Add an ambiguity_check field to the Draft Agent's output schema. The same LLM call that produces the draft also flags ambiguous terms. One call, two outputs.

Why We Rejected It

The Draft Agent and the Ambiguity Detector have structurally opposed goals. The Draft Agent's objective is to produce fluent, complete prose — it is optimised for coverage and coherence. The Ambiguity Detector's objective is to find holes, missing definitions, and vague language — it is optimised for critique. Asking one model to be both author and critic in a single call is a known failure mode: the LLM rationalises the content it just produced rather than genuinely critiquing it. A separate agent call, with a system prompt scoped exclusively to ambiguity detection and given the draft as an external artefact, produces significantly better detection rates than self-critique. AR-06 (single responsibility) also applies: the Ambiguity Detector's output contract is an AmbiguityReport, not a DraftDocument with embedded notes.

Trade-off Accepted

One additional API call per P2 session (~2 seconds at Groq speeds). This pushes the P2 pipeline to a 20-minute target vs the P1 15-minute target. The quality gain from genuine self-critique separation is worth the latency. The 5-minute differential is disclosed clearly in the UI.