AI CodeOps

ADR Writer agent

The ADR Writer agent turns a threat model into an Architecture Decision Record with context, decision, consequences and alternatives, saved as a proposed ADR.

The ADR Writer agent records decisions. It writes a structured Architecture Decision Record (ADR) with four parts: Context, Decision, Consequences and Alternatives.

Where it runs

WorkflowStep
Threat ModelRecord ADR

Threat Model has three steps. The Architect describes the scope and how data flows through the system. The Security Auditor runs a STRIDE analysis on it: spoofing, tampering, repudiation, information disclosure, denial of service and elevation of privilege. The ADR Writer then records the result as a decision.

Inputs

  • The session task, for example "threat model the new public webhooks API".
  • A read-only snapshot of relevant files from the project's repository.
  • The scope and the STRIDE analysis from the two earlier steps.

Outputs

An ADR in text, with Context, Decision, Consequences and Alternatives.

The platform saves it to the workspace's ADR log as a proposed decision, linked to the session and to the agent's step, and to the project when the session has one. Its title is taken from the first meaningful line of the record. A very short answer is not saved, because it does not settle anything.

Saving as proposed is deliberate. An AI-written decision enters the same review flow as one written by a person, so the log never ratifies a decision nobody looked at.

Example run

Illustrative example, not a recorded session. Matt runs Threat Model on a new webhooks feature. The Architect maps the flow: customer configures a URL, the platform signs and sends events, the customer's server verifies them. The Security Auditor flags request forgery towards internal addresses, replayed events and secrets leaking in logs. The ADR Writer records the decision: block private address ranges for webhook targets, sign every event with a timestamp and reject old ones, and never log the signing secret. It lists the consequences, such as customers on private networks needing a relay, and the rejected alternative of IP allow-listing. The ADR appears in the log as proposed.

Limits

  • Its decision is only as good as the analysis before it. It does not add security research of its own.
  • It only runs in Threat Model. Architecture Debate and Discovery & Spec also save proposed ADRs, but from the Architect's final synthesis and the Product Analyst's requirements, not from this agent.
  • It does not check that the decision was implemented.

Frequently asked questions

Is an ADR written by the agent accepted automatically?

No. It is saved with the status proposed. A person in the workspace accepts or rejects it, the same as an ADR written by hand.

What happens if I run the same Threat Model session again?

The ADR id comes from the session, so a re-run of that session updates its ADR instead of adding a duplicate.